:root {
  --bg: #16110D;
  --bg-2: #1D1712;
  --ink: #F4EADB;
  --text: #E8DDCB;
  --muted: rgba(232, 221, 203, .82);
  --dim: rgba(232, 221, 203, .64);
  --rule: rgba(232, 221, 203, .14);
  --ochre: #D9845A;
  --f-head: "Young Serif", Georgia, serif;
  --f-body: "Literata", Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--f-body); overflow: hidden; }
button { font: inherit; }
kbd { font-family: var(--f-body); font-size: .85em; padding: 1px 6px; border: 1px solid var(--rule); border-radius: 3px; color: var(--muted); }

.game { position: fixed; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- HUD ---------- */
.hud { position: absolute; inset: 0; pointer-events: none; }
.hud-top { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.meter { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.bar { width: min(260px, 40vw); height: 10px; border-radius: 6px; background: rgba(232, 221, 203, .12); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--ochre); transition: width .4s ease; }
.count { margin: 0; font-size: 15px; color: var(--muted); text-align: right; }
.count b { color: var(--ink); font-weight: 600; }
.taskbox { position: absolute; top: 46px; left: 16px; width: min(330px, 46vw); padding: 10px 14px 11px; background: rgba(22, 17, 13, .78); border-left: 2px solid var(--ochre); }
.tb-head { margin: 0 0 2px; font-family: var(--f-head); font-size: 16px; color: var(--ink); }
.tb-head #tb-count { font-family: var(--f-body); font-size: 13px; color: var(--dim); }
.tb-toggle { display: none; }
.tasks { margin: 0; padding: 0; list-style: none; font-size: 14.5px; line-height: 1.65; }
.tasks li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 8px 1px 0; border-radius: 50%; border: 1.5px solid var(--ochre); }
.tasks li.done::before { background: var(--ochre); }
.tb-next { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--rule); font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.tb-next b { color: var(--ink); font-weight: 600; }
.mini { position: absolute; top: 44px; right: 16px; width: 200px; height: 125px; border-radius: 4px; background: rgba(22, 17, 13, .8); box-shadow: 0 0 0 1px var(--rule); pointer-events: auto; cursor: pointer; }
.prompt { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(460px, calc(100vw - 300px)); padding: 11px 16px 12px; background: rgba(22, 17, 13, .9); border-top: 2px solid var(--ochre); text-align: center; }
.prompt b { display: block; font-family: var(--f-head); font-weight: 400; font-size: 18px; color: var(--ink); margin-bottom: 3px; }
.prompt span { display: block; font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.p-bar { height: 7px; margin-top: 8px; border-radius: 4px; background: rgba(232, 221, 203, .12); overflow: hidden; display: none; }
.p-bar.on { display: block; }
.p-bar i { display: block; height: 100%; width: 0; background: var(--ochre); }
.map-card { width: min(860px, 100%); text-align: left; }
#big { display: block; width: 100%; aspect-ratio: 1.6; border-radius: 4px; background: #0d0a08; cursor: pointer; }
.map-key { margin: 10px 0 0; font-size: 14px; color: var(--dim); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.map-key i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.map-key i:first-child { margin-left: 0; }
.k-you { background: #F4EADB; } .k-task { background: #D9845A; } .k-bell { background: #B5533C; }
.tasks li.done { color: var(--dim); text-decoration: line-through; }
.tasks .room { color: var(--dim); }
.toast { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); margin: 0; padding: 8px 16px; background: rgba(22, 17, 13, .85); color: var(--ink); font-size: 15.5px; opacity: 0; transition: opacity .3s; white-space: nowrap; }
.toast.on { opacity: 1; }
.actions { position: absolute; right: 16px; bottom: 18px; display: flex; gap: 10px; pointer-events: auto; }
.act { padding: 14px 20px; border: 0; border-radius: 3px; background: var(--ochre); color: var(--bg); font-weight: 600; font-size: 16px; cursor: pointer; }
.act kbd { color: var(--bg); border-color: rgba(22, 17, 13, .35); }
.act:disabled { background: rgba(232, 221, 203, .12); color: var(--dim); cursor: default; }
.act:disabled kbd { color: var(--dim); border-color: var(--rule); }
.stick { position: absolute; left: 0; top: 0; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; border: 2px solid rgba(232, 221, 203, .25); display: none; }
.stick i { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(217, 132, 90, .7); }
.stick.on { display: block; }

/* ---------- screens ---------- */
.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(12, 9, 7, .78); overflow-y: auto; }
.screen[hidden], .hud[hidden] { display: none; }
.card { width: min(560px, 100%); max-height: 100%; overflow-y: auto; padding: 30px 32px; background: var(--bg-2); border-top: 3px solid var(--ochre); }
.logo { display: block; margin-bottom: 10px; }
h1, h2 { font-family: var(--f-head); font-weight: 400; color: var(--ink); margin: 0 0 12px; line-height: 1.08; }
h1 { font-size: 44px; }
h2 { font-size: 32px; }
.lede { font-size: 17px; color: var(--muted); margin: 0 0 16px; line-height: 1.55; }
.how { margin: 0 0 16px; padding-left: 18px; font-size: 15.5px; line-height: 1.55; color: var(--muted); }
.how b { color: var(--ink); font-weight: 600; }
.keys { font-size: 14.5px; color: var(--dim); margin: 0 0 20px; line-height: 1.6; }
.btn { display: inline-block; padding: 13px 26px; border: 0; border-radius: 3px; background: var(--ochre); color: var(--bg); font-weight: 600; font-size: 16.5px; text-decoration: none; cursor: pointer; }
.btn-alt { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.btn:disabled { opacity: .4; cursor: default; }

/* start + lobby */
.card.wide { width: min(900px, 100%); }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; font-size: 14.5px; color: var(--dim); }
input { font: inherit; font-size: 16px; padding: 11px 13px; border: 0; border-radius: 3px; background: rgba(232, 221, 203, .08); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); outline: none; }
input:focus { box-shadow: inset 0 0 0 1px var(--ochre); }
.start-actions, .lobby-actions, .meet-actions, .end-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
h3 { font-family: var(--f-head); font-weight: 400; color: var(--ink); font-size: 19px; margin: 22px 0 8px; }
.rooms { list-style: none; margin: 0 0 12px; padding: 0; }
.rooms li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.rooms li.empty { color: var(--dim); font-size: 14.5px; border: 0; }
.rooms b { color: var(--ink); font-weight: 600; letter-spacing: .06em; }
.code-form { display: flex; gap: 8px; }
.code-form input { width: 110px; text-transform: uppercase; letter-spacing: .12em; }
.conn { margin: 12px 0 0; font-size: 13.5px; color: var(--dim); }
.btn.small { padding: 9px 16px; font-size: 14.5px; }
.lede.small { font-size: 15px; margin-bottom: 10px; }
.lobby-head, .meet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lobby-head h2 span { color: var(--ochre); letter-spacing: .08em; }

/* everyone as a whole little figure */
.figures { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.figures li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 7px; border-radius: 4px; background: rgba(232, 221, 203, .04); cursor: pointer; }
.figures li:hover { background: rgba(232, 221, 203, .08); }
.figures li canvas { width: 56px; height: 70px; }
.figures .who { font-size: 13.5px; font-weight: 600; color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.figures .tag { font-size: 11.5px; color: var(--dim); }
.figures li.gone { opacity: .38; cursor: default; }
.figures li.me { cursor: default; }
.figures li.picked { background: rgba(217, 132, 90, .18); box-shadow: inset 0 0 0 2px var(--ochre); }
.figures li.ai-mate .who { color: #E0645A; }
.figures .check { position: absolute; top: 6px; right: 7px; font-size: 13px; color: var(--ochre); }
.figures .votes { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; min-height: 10px; }
.figures .votes i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }

/* one shared chat */
.chat { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.chat-log { list-style: none; margin: 0; padding: 8px 10px; height: 190px; overflow-y: auto; background: rgba(12, 9, 7, .45); border-radius: 4px; font-size: 14.5px; line-height: 1.45; }
.chat-log li { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; }
.chat-log li canvas { width: 18px; height: 22px; flex: none; margin-top: 1px; }
.chat-log .from { font-weight: 600; color: var(--ink); margin-right: 4px; }
.chat-log .sys { color: var(--dim); font-style: italic; }
.chat-log .mention { padding: 0 5px; border-radius: 3px; color: #16110D; font-weight: 600; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; min-width: 0; }
.chat-form input:disabled { opacity: .5; }

/* meeting */
.meet { padding: 22px 26px; }
.meet h2 { font-size: 28px; margin-bottom: 6px; }
.timer { font-size: 15px; color: var(--dim); }
.why { margin: 0 0 12px; color: var(--muted); font-size: 16px; }
.result { margin: 0 0 0 6px; font-size: 16.5px; color: var(--ink); }
.role .card { text-align: center; }
.role h2 { font-size: 40px; }

@media (max-width: 700px) {
  .card { padding: 22px 18px; }
  h1 { font-size: 36px; }
  .taskbox { top: 40px; left: 10px; width: 56vw; padding: 7px 9px; }
  .tb-head { font-size: 14px; }
  .taskbox { pointer-events: auto; }
  .taskbox:not(.open) .tasks { display: none; }
  .tb-toggle { display: block; font-family: var(--f-body); font-size: 11.5px; color: var(--dim); }
  .taskbox.open .tb-toggle { display: none; }
  .taskbox:not(.open) .tb-next { margin-top: 4px; padding-top: 0; border-top: 0; }
  .tasks { font-size: 12.5px; line-height: 1.5; }
  .tb-next { font-size: 12px; }
  .mini { top: 40px; right: 10px; width: 130px; height: 81px; }
  .prompt { bottom: 76px; width: calc(100vw - 20px); }
  .meter span { display: none; }
  .act { padding: 13px 16px; font-size: 15px; }
  .act kbd { display: none; }
  .figures { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
  .figures li canvas { width: 44px; height: 55px; }
  .chat-log { height: 150px; font-size: 14px; }
  .meet { padding: 16px 14px; }
  .toast { top: auto; bottom: 86px; white-space: normal; width: max-content; max-width: 90vw; text-align: center; }
}

/* ---------- room name, shown when you walk in ---------- */
.roomname { position: absolute; left: 50%; top: 40px; transform: translate(-50%, -6px); margin: 0; font-family: var(--f-head); font-size: 30px; color: var(--ink); letter-spacing: .04em; text-shadow: 0 2px 0 rgba(0,0,0,.6), 0 0 18px rgba(0,0,0,.8); opacity: 0; transition: opacity .35s, transform .35s; pointer-events: none; white-space: nowrap; }
.roomname.on { opacity: 1; transform: translate(-50%, 0); }
.tasks .room { color: var(--muted); }

/* ---------- task panel ---------- */
.taskpanel { background: rgba(12, 9, 7, .55); }
.task-card { width: min(560px, 100%); padding: 18px 20px 20px; border-top-color: #ffd666; box-shadow: 0 0 0 1px rgba(255,214,102,.25), 0 0 40px rgba(255,214,102,.12); }
.task-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.task-room { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #ffd666; }
.task-head h2 { font-size: 26px; margin: 2px 0 6px; }
.task-close { border: 0; background: rgba(232,221,203,.1); color: var(--ink); width: 36px; height: 36px; border-radius: 50%; font-size: 16px; cursor: pointer; flex: none; }
.tp-hint { margin: 0 0 12px; font-size: 15px; color: var(--muted); line-height: 1.45; }
.tp-stage { user-select: none; -webkit-user-select: none; touch-action: none; }
.tg-canvas { display: block; width: 100%; border-radius: 6px; background: #0f0c0a; box-shadow: inset 0 0 0 1px var(--rule); cursor: crosshair; touch-action: none; }
.tg-slider { display: grid; grid-template-columns: 54px 1fr 18px; align-items: center; gap: 10px; margin-top: 10px; font-size: 14.5px; color: var(--muted); }
.tg-slider input { padding: 0; box-shadow: none; background: transparent; accent-color: #ffd666; }
.tg-slider .tg-ok { color: #7ee08a; opacity: 0; transition: opacity .2s; }
.tg-slider.good .tg-ok { opacity: 1; }
.tg-btn { display: block; width: 100%; margin-top: 12px; padding: 14px; border: 0; border-radius: 4px; background: #ffd666; color: #16110D; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; touch-action: none; }
.tg-btn:active { filter: brightness(.9); }
.tg-btn.alt { margin: 0; padding: 12px 10px; background: rgba(232,221,203,.1); color: var(--ink); font-weight: 600; font-size: 15px; box-shadow: inset 0 0 0 1px var(--rule); }
.tg-btn.alt:disabled { opacity: .35; }
.tg-steps { margin: 0 0 12px; padding-left: 22px; font-size: 15px; color: var(--muted); line-height: 1.7; }
.tg-steps li.done { color: #7ee08a; text-decoration: line-through; }
.tg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tg-status { min-height: 1.4em; margin: 10px 0 0; font-size: 14.5px; color: #ffd666; }
.tg-find.words { display: flex; flex-wrap: wrap; gap: 6px; padding: 16px; border-radius: 6px; background: #0f0c0a; }
.tg-find.words .tg-item { border: 0; background: transparent; color: #f4eadb; font: inherit; font-size: 19px; padding: 2px 4px; border-radius: 3px; cursor: pointer; }
.tg-find.words .tg-item:hover { background: rgba(255,214,102,.12); }
.tg-find.words .tg-item.found { color: #7ee08a; background: rgba(126,224,138,.12); }
.tg-find.cables { display: grid; gap: 7px; }
.tg-find.cables .tg-item { position: relative; display: flex; align-items: center; height: 34px; padding: 0 12px 0 0; border: 0; border-radius: 4px; background: #1d2124; color: var(--ink); font: inherit; font-size: 14.5px; cursor: pointer; overflow: hidden; }
.tg-find.cables .tg-item::before { content: ""; flex: 1; height: 8px; margin-right: 12px; border-radius: 4px; background: var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
.tg-find.cables .tg-item.found::before { flex: .2; opacity: .4; }
.tg-find.cables .tg-item.found { color: #7ee08a; }
.tg-drag { display: grid; gap: 14px; }
.tg-zones { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 12px; border-radius: 6px; background: #3e281a; box-shadow: inset 0 -8px 0 #2a1b11; }
.tg-zones.shelf .tg-zone { height: 74px; border-radius: 3px; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 2px rgba(255,214,102,.25); display: flex; align-items: center; justify-content: center; }
.tg-zones.coasters { grid-template-columns: repeat(2, 90px); justify-content: center; gap: 60px; background: #8a5a3a; box-shadow: inset 0 -8px 0 #5e3c27; }
.tg-zones.coasters .tg-zone { height: 90px; border-radius: 50%; background: #c9a14a; box-shadow: inset 0 0 0 3px rgba(0,0,0,.25), 0 0 0 2px rgba(255,214,102,.4); display: flex; align-items: center; justify-content: center; }
.tg-zones.coasters + .tg-pieces .tg-piece, .tg-zones.coasters .tg-piece { width: 58px; height: 58px; padding: 0; align-items: center; border-radius: 50%; font-size: 26px; }
.tg-zones.shelf .tg-zone:only-child { grid-column: 3; }
.tg-zones.corners { display: block; height: 210px; background: #4b4136; box-shadow: none; }
.tg-backdrop.poster { position: absolute; inset: 14px 16%; border-radius: 3px; background: linear-gradient(#e8ddcb, #d8cab2); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.tg-backdrop.poster::before { content: "SLOW DOWN, TOGETHER."; position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-family: var(--f-head); font-size: 22px; color: #16110D; }
.tg-backdrop.poster::after { content: "Sign the petition · Team Human"; position: absolute; left: 0; right: 0; top: 58%; text-align: center; font-size: 12px; color: #6b4630; }
.tg-zones.corners .tg-zone { position: absolute; width: 34px; height: 34px; margin: -6px 0 0 -6px; border-radius: 50%; box-shadow: 0 0 0 2px #ffd666, 0 0 12px rgba(255,214,102,.6); }
.tg-zones.corners .tg-zone.filled { box-shadow: none; }
.tg-pieces { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; min-height: 74px; }
.tg-piece { display: flex; align-items: flex-end; justify-content: center; width: 52px; height: 70px; padding-bottom: 6px; border-radius: 4px; color: #f4eadb; font-size: 13px; font-weight: 600; box-shadow: inset 0 0 0 2px rgba(0,0,0,.4), 0 3px 8px rgba(0,0,0,.4); cursor: grab; touch-action: none; }
.tg-zones.corners ~ .tg-pieces .tg-piece, .tg-zones.corners .tg-piece { width: 22px; height: 22px; padding: 0; border-radius: 50%; }
.tg-piece.dragging { cursor: grabbing; transform: scale(1.08); }
.tg-zone .tg-piece { margin: 0; }
.tg-shake { animation: tgshake .35s; }
@keyframes tgshake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (max-width: 700px) {
  .roomname { font-size: 22px; top: auto; bottom: 140px; }
  .task-card { padding: 14px; }
  .tg-find.words .tg-item { font-size: 17px; }
}

/* ---------- lobby settings, Among Us style ---------- */
.settings-box { margin: 0 0 14px; border-radius: 4px; background: rgba(12, 9, 7, .35); }
.settings-box summary { padding: 9px 12px; cursor: pointer; font-family: var(--f-head); color: var(--ink); font-size: 16px; }
.settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2px 18px; padding: 4px 12px 12px; }
.opt { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--rule); font-size: 14px; color: var(--muted); }
.opt span { flex: 1; }
.opt b { min-width: 52px; text-align: center; color: var(--ink); font-weight: 600; }
.opt button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(232,221,203,.1); color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer; }
.opt button:hover { background: rgba(255,214,102,.25); }
/* ---------- ghosts and the ejection screen ---------- */
.chat-log li.ghost { opacity: .7; font-style: italic; }
.chat-log li.ghost .from::after { content: " (ghost)"; color: var(--dim); font-weight: 400; }
.eject { background: #070504; z-index: 60; }
.eject-in { text-align: center; animation: drift 4.4s linear both; }
.eject-in p { margin: 18px 0 0; font-family: var(--f-head); font-size: clamp(24px, 4vw, 40px); color: var(--ink); }
@keyframes drift { from { transform: translateX(-30vw) rotate(-8deg); opacity: 0; } 15% { opacity: 1; } to { transform: translateX(20vw) rotate(10deg); opacity: 1; } }
#eject-fig canvas { width: 84px; height: 105px; }

.killfx { padding: 0; background: #070504; z-index: 70; }
.killfx canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- roles ---------- */
.act.role-btn { background: #6fd3ff; }
.act.role-btn:disabled { background: rgba(232,221,203,.12); }
.ventbar { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; padding: 10px 12px; background: rgba(22,17,13,.92); border-top: 2px solid #55606a; pointer-events: auto; }
.ventbar span { font-size: 14px; color: var(--muted); margin-right: 4px; }
.ventbar .act.alt { background: rgba(232,221,203,.12); color: var(--ink); }
.trackinfo { position: absolute; right: 16px; top: 178px; margin: 0; padding: 6px 10px; background: rgba(22,17,13,.85); color: #6fd3ff; font-size: 14px; }
.vitals { position: absolute; right: 16px; top: 178px; width: 230px; padding: 10px 12px; background: rgba(12,16,18,.94); border-top: 2px solid #7ee08a; pointer-events: auto; }
.vitals h3 { margin: 0 0 6px; font-size: 16px; color: #7ee08a; font-family: var(--f-head); font-weight: 400; }
.vitals ul { list-style: none; margin: 0 0 8px; padding: 0; font-size: 14px; }
.vitals li { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--ink); }
.vitals li i { width: 12px; height: 12px; border-radius: 50%; }
.vitals li b { margin-left: auto; font-size: 12px; color: #7ee08a; letter-spacing: .06em; }
.vitals li.st0 b { color: #e0645a; } .vitals li.st2 b { color: var(--dim); }
.battery { height: 6px; border-radius: 3px; background: rgba(232,221,203,.12); overflow: hidden; }
.battery i { display: block; height: 100%; background: #7ee08a; }
.settings-group { grid-column: 1 / -1; margin: 10px 0 2px; font-family: var(--f-head); color: #ffd666; font-size: 14px; letter-spacing: .04em; }
@media (max-width: 700px) { .trackinfo, .vitals { top: 128px; right: 10px; } .ventbar { bottom: 140px; } }

/* =====================================================================
   Site look for the menus and screens: the same page as the Team Human
   site (open layout, rules instead of boxes, grain, big serif heads,
   Courier Prime for codes and timers, the cream band for the role reveal).
   The map, the figures and the task panels are not touched here.
   ===================================================================== */
:root { --f-mono: "Courier Prime", ui-monospace, monospace; }
#start, #lobby, #end, #bigmap { background: var(--bg); }
#start::before, #lobby::before, #end::before, #role::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
#start, #lobby, #end { align-items: flex-start; padding: 56px 32px; }
#start > .card, #lobby > .card, #end > .card, #bigmap > .card { position: relative; max-height: none; overflow: visible; padding: 0; background: transparent; border-top: 0; }
h1 { font-size: clamp(42px, 5vw, 66px); line-height: 1.04; margin-bottom: 18px; }
#lobby h2, #end h2, #bigmap h2 { font-size: clamp(30px, 3vw, 40px); line-height: 1.1; }

/* start: words on the left, joining on the right, like the site's intro */
.start-card { width: min(1080px, 100%); display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; }
.start-card .logo { width: 64px; height: 64px; margin-bottom: 16px; }
.start-card .lede { font-size: 18px; line-height: 1.65; margin-bottom: 22px; }
.how { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.how li { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.6; }
.start-join { padding-top: 84px; }
.start-join .field { font-size: 15px; }
.rooms-head { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--rule); }
.rooms b { font-family: var(--f-mono); font-weight: 400; letter-spacing: .1em; color: var(--ochre); }
.code-form input { font-family: var(--f-mono); }
.conn { font-family: var(--f-mono); }

/* waiting room */
#lobby > .card.wide, #end > .card { width: min(1080px, 100%); }
.lobby-head { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--rule); }
.lobby-head h2 span { font-family: var(--f-mono); font-size: .8em; letter-spacing: .12em; }
.figures li { border-radius: 0; background: transparent; border-bottom: 2px solid transparent; }
.figures li:hover { background: transparent; border-bottom-color: var(--rule); }
.figures li.picked { background: transparent; box-shadow: none; border-bottom-color: var(--ochre); }
.settings-box { border-radius: 0; background: transparent; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.settings-box summary { padding: 12px 0; font-size: 19px; }
.settings { padding: 0 0 14px; }
.opt button { border-radius: 3px; }
.settings-group { color: var(--ochre); font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.chat-log { border-radius: 0; background: transparent; padding: 10px 0; border-bottom: 1px solid var(--rule); }

/* role reveal: the site's cream band */
#role { background: var(--ink); }
#role > .card { max-width: 760px; padding: 0 16px; background: transparent; border-top: 0; }
#role h2 { font-size: clamp(44px, 6vw, 80px); line-height: 1.02; color: var(--bg); margin-bottom: 18px; }
#role .lede { font-size: 19px; color: rgba(22, 17, 13, .78); }

/* meeting: a plain sheet over the dimmed map */
#meeting { background: rgba(12, 9, 7, .86); }
.meet { border-top: 0; background: var(--bg); box-shadow: 0 0 0 1px var(--rule); }
.meet h2 { font-size: 34px; }
.meet-head { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--rule); }
.timer { font-family: var(--f-mono); font-size: 17px; color: var(--ochre); }

/* end */
#end > .card { max-width: 760px; }
#end h2 { font-size: clamp(42px, 5vw, 66px); line-height: 1.04; margin-bottom: 18px; }
#end .lede { font-size: 18px; line-height: 1.65; }

/* full map */
#bigmap > .card { width: min(900px, 100%); }
#big { border-radius: 0; }

@media (max-width: 900px) {
  #start, #lobby, #end { padding: 28px 16px; }
  .start-card { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .start-join { padding-top: 0; }
  h1 { font-size: 40px; }
}

/* ---------- the call-out before a meeting: the site's ochre on a dark band ---------- */
.splash { position: absolute; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(12, 9, 7, .9); }
.splash[hidden] { display: none; }
.splash-in { width: 100%; padding: 34px 16px; background: var(--ochre); text-align: center; animation: splash-in .35s ease-out both; }
.sp-kind { margin: 0; font-family: var(--f-head); font-size: clamp(40px, 7vw, 86px); line-height: 1; color: var(--bg); }
.sp-who { margin: 12px 0 0; font-size: 19px; color: rgba(22, 17, 13, .8); }
@keyframes splash-in { from { transform: scaleY(.2); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- ghosts ---------- */
.ghostchat { position: absolute; left: 16px; bottom: 18px; width: min(340px, 60vw); margin: 0; padding: 8px 10px 10px; background: rgba(14,18,22,.88); border-top: 2px solid #9fb4c8; pointer-events: auto; }
.ghostchat summary { cursor: pointer; font-size: 13.5px; color: #9fb4c8; margin-bottom: 6px; }
.ghostchat .chat-log { height: 120px; }
.act.alt { background: rgba(232,221,203,.14); color: var(--ink); }
.figures li.gone::after { content: "✕"; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); font-size: 42px; line-height: 1; color: rgba(224,72,72,.85); pointer-events: none; }
@media (max-width: 700px) { .ghostchat { bottom: 76px; left: 10px; width: 62vw; } .ghostchat .chat-log { height: 80px; } }

/* ---------- sabotage fixes ---------- */
.tg-switches { display: flex; gap: 12px; justify-content: center; padding: 18px; border-radius: 6px; background: #1a1d20; }
.tg-switch { position: relative; width: 44px; height: 84px; border: 0; border-radius: 6px; background: #2e3438; box-shadow: inset 0 0 0 2px #0e1012; cursor: pointer; }
.tg-switch i { position: absolute; left: 8px; right: 8px; height: 30px; bottom: 8px; border-radius: 4px; background: #e0645a; transition: bottom .15s, background .15s; }
.tg-switch.on i { bottom: 46px; background: #7ee08a; }
.tg-note { margin: 0 0 10px; padding: 10px 12px; background: #f2d76b; color: #2a211a; font-weight: 600; transform: rotate(-1.5deg); box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.tg-screen { height: 46px; margin-bottom: 10px; border-radius: 4px; background: #0f1416; color: #7ee08a; font: 600 26px/46px "Courier New", monospace; text-align: center; letter-spacing: .1em; }
.tg-screen.ok { color: #ffd666; }
.tg-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tg-key { padding: 12px 0; border: 0; border-radius: 4px; background: rgba(232,221,203,.1); color: var(--ink); font: 600 20px var(--f-body); cursor: pointer; }
.tg-key:active { background: rgba(255,214,102,.3); }
.tg-scan { display: flex; justify-content: center; padding: 16px; border-radius: 8px; background: #102028; box-shadow: inset 0 0 0 2px #2a4a58; }
.tg-scan img { width: 120px; height: 120px; opacity: .55; transition: opacity .2s, filter .2s; }
.tg-scan.on { box-shadow: inset 0 0 0 2px #6fd3ff, 0 0 24px rgba(111,211,255,.35); }
.tg-scan.on img { opacity: 1; filter: drop-shadow(0 0 10px #6fd3ff); }
