/* ============================================================
   Glitch Hunters — stylesheet
   Art direction (GDD §1): cartoon/stylised flat-colour, warm,
   lightly humorous. Evidence photos always unaltered inside a
   distinct evidence frame (GR-G09). Min viewport 1024x600 (GB-D3).
   Colour is never the only signal (CF-08): every state also has
   an icon or label.
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper: #fdf6e9;        /* bureau paper */
  --warm: #f6e3c5;
  --ink: #3a2f2a;          /* warm dark ink */
  --ink-soft: #6b5d54;
  --teal: #2b7a78;         /* bureau teal */
  --teal-dark: #205e5c;
  --amber: #e8a33d;
  --amber-dark: #c67f1b;
  --red: #c94f42;
  --green: #4a8f52;
  --blue: #4a6fa5;
  --buzz: #d156a3;         /* BuzzHive pink (vanity metric) */
  --card: #fffdf7;
  --shadow: 0 3px 0 rgba(58,47,42,.16);
  --radius: 14px;
}

html, body { height: 100%; }
body {
  background: #2f2a26;
  font-family: "Segoe UI", "Trebuchet MS", Verdana, system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.45;
  -webkit-user-select: none; user-select: none;
}

#app { display: flex; flex-direction: column; align-items: center; min-height: 100vh; }

#stage {
  width: min(1180px, 100vw);
  min-height: 600px;
  flex: 1;
  background: var(--paper);
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,.5);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.hidden { display: none !important; }

/* ---------------- HUD ---------------- */
#hud {
  width: min(1180px, 100vw);
  background: var(--teal-dark);
  color: #fff;
  display: flex; align-items: center; gap: 14px;
  padding: 6px 14px;
  font-size: 15px;
  z-index: 40;
}
#hud .hud-slot { display: flex; align-items: center; gap: 6px; }
#hud .hud-rank { font-weight: 700; letter-spacing: .3px; }
#hud .hud-ip { background: #ffffff22; border-radius: 10px; padding: 2px 10px; font-weight: 700; }
#hud .hud-buzz { background: #ffffff14; border-radius: 10px; padding: 2px 10px; color: #f7c9e4; }
#hud .hud-spacer { flex: 1; }
#hud button {
  background: var(--amber); border: none; color: var(--ink);
  padding: 4px 12px; border-radius: 10px; font-weight: 700; cursor: pointer;
  font-family: inherit; font-size: 14px;
}
#hud button:hover { background: #f4b558; }
#hud .hud-spread { color: #ffd9d4; font-size: 13px; }

/* ---------------- Generic scene layout ---------------- */
.scene { flex: 1; display: flex; flex-direction: column; padding: 18px 26px; overflow-y: auto; }
.scene.centered { align-items: center; justify-content: center; text-align: center; }

.scene h1 { font-size: 42px; margin-bottom: 8px; color: var(--teal-dark); }
.scene h2 { font-size: 24px; margin-bottom: 10px; color: var(--teal-dark); }
.scene h3 { font-size: 18px; margin-bottom: 6px; }
.scene .subtitle { color: var(--ink-soft); font-size: 17px; }

.room-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--warm); border-radius: var(--radius);
  padding: 6px 14px; margin-bottom: 12px; font-weight: 700; color: var(--ink);
  align-self: flex-start; font-size: 15px;
}
.room-banner .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  background: var(--teal); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 10px 22px; font-size: 17px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  box-shadow: var(--shadow);
  transition: transform .06s;
}
.btn:hover { background: var(--teal-dark); }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn.amber { background: var(--amber); color: var(--ink); }
.btn.amber:hover { background: var(--amber-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--teal-dark); box-shadow: none; border: 2px dashed var(--teal); }
.btn.small { padding: 6px 14px; font-size: 14px; }
.btn.big { padding: 14px 34px; font-size: 21px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-row { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------------- Dialogue ---------------- */
.dlg-bar {
  display: flex; align-items: flex-end; gap: 14px;
  padding: 10px 4px 4px 4px;
  min-height: 118px;
  margin-top: auto;
}
.dlg-portrait { width: 92px; height: 92px; flex: none; }
.dlg-portrait svg { width: 100%; height: 100%; }
.dlg-bubble {
  background: var(--card); border: 3px solid var(--ink);
  border-radius: 18px; padding: 12px 18px; font-size: 18px;
  position: relative; flex: 1; max-width: 860px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.dlg-bubble::before {
  content: ""; position: absolute; left: -14px; bottom: 20px;
  border: 8px solid transparent; border-right-color: var(--ink);
}
.dlg-bubble .dlg-who { font-size: 13px; font-weight: 700; color: var(--teal-dark); text-transform: uppercase; letter-spacing: .5px; }
.dlg-bubble .dlg-next { position: absolute; right: 12px; bottom: 6px; font-size: 12px; color: var(--ink-soft); }
.dlg-bubble.mimic { border-color: var(--blue); }
.dlg-bubble.mimic .dlg-who { color: var(--blue); }

/* ---------------- Evidence frame (GR-G09) ---------------- */
.evidence {
  background: #fff;
  padding: 10px 10px 30px 10px;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  position: relative;
  display: inline-block;
}
.evidence .ev-imgwrap { position: relative; overflow: hidden; display: block; line-height: 0; }
.evidence img { display: block; max-width: 100%; height: auto; image-rendering: auto; }
.evidence .ev-stamp {
  position: absolute; bottom: 4px; left: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--teal-dark); text-transform: uppercase;
  border: 1.5px solid var(--teal-dark); border-radius: 3px; padding: 0 5px;
  transform: rotate(-2deg); opacity: .85;
}
.evidence .ev-label { position: absolute; bottom: 5px; right: 10px; font-size: 12px; color: var(--ink-soft); }

/* photo still downloading (preload revision 2026-09-07): reserve the square
   frame and show a light "developing" shimmer instead of a collapsed blank —
   removed by magnifier.js the moment the photo arrives */
.evidence .ev-imgwrap.ev-loading {
  min-height: 180px; aspect-ratio: 1 / 1;
  background: linear-gradient(110deg, #e8e0d2 40%, #f6f1e7 50%, #e8e0d2 60%);
  background-size: 220% 100%;
  animation: evDevelop 1.4s linear infinite;
}
.evidence .ev-imgwrap.ev-loading::after {
  content: "developing…";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; letter-spacing: 1px; line-height: 1.4;
  color: var(--ink-soft); text-transform: uppercase;
}
@keyframes evDevelop { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* the darkroom safety-gate screen (assessment photo warm-up) */
.preload-dots { display: flex; gap: 12px; justify-content: center; margin: 18px 0; }
.preload-dots .dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--amber);
  animation: dotPulse 1.1s ease-in-out infinite;
}
.preload-dots .dot:nth-child(2) { animation-delay: .18s; }
.preload-dots .dot:nth-child(3) { animation-delay: .36s; }
@keyframes dotPulse { 0%, 100% { transform: scale(.7); opacity: .45; } 50% { transform: scale(1.15); opacity: 1; } }

/* magnifier lens */
.lens {
  position: absolute; width: 150px; height: 150px;
  border: 4px solid var(--amber); border-radius: 50%;
  pointer-events: none;
  background-repeat: no-repeat;
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
  z-index: 10;
  display: none;
}

/* marking pins + feedback outlines */
.pin {
  position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; border: 3px solid #fff;
  background: var(--amber); color: var(--ink);
  font-size: 14px; font-weight: 700; text-align: center; line-height: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
  z-index: 8; pointer-events: none;
}
.pin.bad { background: var(--red); color: #fff; }
.anno {
  position: absolute; border: 3px dashed var(--amber); border-radius: 8px;
  z-index: 7; pointer-events: none;
}
/* tags sit INSIDE the outlined region on a solid dark plate and wrap instead of
   truncating (playtest bug: tags above the region were clipped by the photo
   frame and unreadable over busy pixels) */
.anno .anno-tag {
  position: absolute; top: 2px; left: 2px; max-width: calc(100% - 4px);
  background: rgba(43, 32, 24, .92); color: #ffe9c4; font-size: 12px; font-weight: 700;
  border: 1.5px solid var(--amber); border-radius: 6px; padding: 2px 7px;
  white-space: normal; line-height: 1.25;
}
.anno.innocent { border-color: var(--green); }
.anno.innocent .anno-tag { background: rgba(30, 66, 34, .92); color: #dff3de; border-color: var(--green); }

/* ---------------- Case desk ---------------- */
.desk { display: flex; gap: 20px; flex: 1; min-height: 0; }
.desk-left { flex: 0 0 46%; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.desk-right { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.stations { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.station-tab {
  background: var(--warm); border: 2px solid transparent; border-radius: 10px 10px 0 0;
  padding: 6px 10px; font-size: 13.5px; font-weight: 700; cursor: pointer;
  color: var(--ink-soft); font-family: inherit;
}
.station-tab .st-num {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink-soft); color: #fff; font-size: 12px; line-height: 18px; text-align: center; margin-right: 5px;
}
.station-tab.active { background: var(--card); border-color: var(--teal); color: var(--ink); }
.station-tab.active .st-num { background: var(--teal); }
.station-tab.done .st-num { background: var(--green); }
.station-tab:disabled { opacity: .5; cursor: default; }
.station-body {
  background: var(--card); border: 2px solid var(--teal); border-radius: 0 12px 12px 12px;
  padding: 14px; flex: 1; overflow-y: auto; font-size: 16px;
}
.station-hint { color: var(--ink-soft); font-size: 14px; margin-bottom: 8px; }

/* scan region picks */
.regions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.region-btn {
  background: var(--warm); border: 2px solid var(--ink-soft); border-radius: 10px;
  padding: 8px 14px; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 600;
}
.region-btn.picked { background: var(--amber); border-color: var(--amber-dark); }

/* evidence scale */
.scale-wrap { text-align: center; padding: 6px 0; }
.scale-beam {
  width: 320px; height: 8px; background: var(--ink); margin: 30px auto 2px auto;
  border-radius: 4px; position: relative; transition: transform .5s;
}
.scale-beam::after { content:""; position: absolute; left: 50%; top: 8px; margin-left: -9px;
  border: 9px solid transparent; border-top-color: var(--ink); }
.scale-pan {
  position: absolute; top: -26px; width: 120px; text-align: center; font-size: 12.5px; font-weight: 700;
}
.scale-pan.fake { left: -20px; color: var(--red); }
.scale-pan.real { right: -20px; color: var(--green); }
.scale-verdict { font-size: 15px; font-weight: 700; margin-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0; }
.chip {
  background: var(--amber); color: var(--ink); font-size: 13px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; border: 2px solid var(--amber-dark);
}
.chip.zero { background: #ddd; border-color: #aaa; color: #666; text-decoration: line-through; }
.chip.real-chip { background: #d8ecd9; border-color: var(--green); color: var(--green); }

/* confidence + verdict */
.verdict-row { display: flex; gap: 12px; justify-content: center; margin: 10px 0; }
.verdict-btn {
  border: 3px solid var(--ink-soft); background: var(--card); border-radius: 12px;
  font-size: 18px; font-weight: 800; padding: 10px 26px; cursor: pointer; font-family: inherit;
}
.verdict-btn.sel-real { border-color: var(--green); background: #d8ecd9; }
.verdict-btn.sel-fake { border-color: var(--red); background: #f6d9d5; }
.conf-row { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.conf-btn {
  border: 2px solid var(--teal); background: var(--card); color: var(--teal-dark);
  border-radius: 10px; padding: 7px 10px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.conf-btn:hover, .conf-btn.picked { background: var(--teal); color: #fff; }
.conf-note { text-align: center; font-size: 16px; font-weight: 700; color: var(--ink); margin-top: 6px; }
/* the confidence prompt must stay readable on the dark assessment console
   (playtest bug: it was invisible there) */
.console-screen .conf-note { color: #fff; font-size: 18px; }
.console-screen .conf-btn { background: #17323d; color: #d9f3ef; border-color: #7fd8cf; }
.console-screen .conf-btn:hover, .console-screen .conf-btn.picked { background: #2b7a78; color: #fff; }

/* source panel */
.source-panel {
  background: #eef4f4; border: 2px solid var(--teal); border-radius: 12px;
  padding: 10px 14px; font-size: 14.5px; width: 100%;
}
.source-panel h4 { color: var(--teal-dark); font-size: 14px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.source-panel table { border-collapse: collapse; width: 100%; }
.source-panel td { padding: 2px 6px 2px 0; vertical-align: top; }
.source-panel td:first-child { font-weight: 700; white-space: nowrap; color: var(--ink-soft); }
.source-panel .sp-flag { color: var(--red); font-weight: 700; }
.source-panel .sp-ok { color: var(--green); font-weight: 700; }
.source-panel .motive {
  margin-top: 6px; font-style: italic; color: var(--teal-dark); font-size: 13.5px;
  border-top: 1px dashed var(--teal); padding-top: 5px;
}

/* feedback panel */
.feedback {
  background: var(--card); border: 3px solid var(--amber); border-radius: 14px;
  padding: 14px 18px; margin: 10px 0; font-size: 16px;
}
.feedback h4 { color: var(--amber-dark); margin-bottom: 6px; }
.feedback .fb-good { color: var(--green); font-weight: 700; }
.feedback .fb-bad { color: var(--red); font-weight: 700; }
.feedback ul { margin: 6px 0 0 20px; }

/* ---------------- Clue cards ---------------- */
.clue-card {
  width: 200px; background: var(--card); border: 3px solid var(--amber-dark);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); flex: none;
}
.clue-card .cc-head { background: var(--amber); padding: 6px 10px; font-weight: 800; font-size: 16px; color: var(--ink); display:flex; gap:6px; align-items:center; }
.clue-card .cc-head svg { width: 26px; height: 26px; flex: none; }
.clue-card .cc-body { padding: 8px 10px; font-size: 13px; }
.clue-card .cc-why { border-top: 1.5px dashed var(--amber-dark); margin-top: 6px; padding-top: 5px; font-style: italic; color: var(--ink-soft); font-size: 12.5px; }
.clue-card .cc-caveat { margin-top: 5px; font-size: 12px; color: var(--red); }
.clue-card .cc-weight { float: right; background: var(--ink); color: #fff; border-radius: 8px; padding: 0 7px; font-size: 12px; }
.clue-card.archive { border-color: var(--blue); filter: saturate(.7); }
.clue-card.archive .cc-head { background: #b9cbe4; }
.clue-card.locked { filter: grayscale(1) opacity(.45); }
.card-grid { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding: 10px; }

/* mint animation */
.mint-pop { animation: mintpop .5s ease-out; }
@keyframes mintpop { 0% { transform: scale(.3) rotate(-8deg); opacity: 0; } 70% { transform: scale(1.08) rotate(2deg); } 100% { transform: scale(1); opacity: 1; } }

/* ---------------- Overlay ---------------- */
#overlay {
  position: fixed; inset: 0; background: rgba(47,42,38,.78);
  display: flex; align-items: center; justify-content: center; z-index: 90;
}
.overlay-panel {
  background: var(--paper); border-radius: 18px; padding: 22px 28px;
  max-width: 920px; max-height: 88vh; overflow-y: auto; width: min(920px, 94vw);
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.overlay-panel h2 { color: var(--teal-dark); margin-bottom: 10px; }

/* toast */
.toast {
  position: absolute; top: 14px; right: 16px; z-index: 60;
  background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 16px;
  font-size: 15px; font-weight: 600; max-width: 320px;
  animation: toastin .3s ease-out; box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
.toast.ip-up { background: var(--green); }
.toast.ip-down { background: var(--red); }
.toast.buzz { background: var(--buzz); }
@keyframes toastin { from { transform: translateY(-16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- BuzzHive / ClassChat mocks ---------------- */
.bh-post {
  background: #fff; border: 2px solid #e5d9c6; border-radius: 14px;
  width: 420px; max-width: 100%; padding: 12px; font-size: 15px; box-shadow: var(--shadow);
}
.bh-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.bh-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; background: var(--warm); }
.bh-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bh-avatar svg { width: 100%; height: 100%; }
.bh-name { font-weight: 800; }
.bh-sub { font-size: 12.5px; color: var(--ink-soft); }
.bh-body { margin: 6px 0; }
.bh-photo { border-radius: 10px; overflow: hidden; margin: 6px 0; }
.bh-photo img { width: 100%; display: block; }
.bh-stats { display: flex; gap: 16px; color: var(--ink-soft); font-size: 13.5px; border-top: 1px solid #eee; padding-top: 6px; }
.bh-stats .bz { color: var(--buzz); font-weight: 700; }
.bh-tag { display:inline-block; background:#f3e6f0; color: var(--buzz); font-size: 12px; font-weight:700; border-radius: 8px; padding: 0 8px; margin-left: 6px;}

.chat {
  background: #e8eef5; border-radius: 14px; padding: 14px; width: 460px; max-width: 100%;
  display: flex; flex-direction: column; gap: 8px; font-size: 15px;
}
.chat-title { font-weight: 800; color: var(--blue); font-size: 14px; text-align: center; }
.chat-msg { background: #fff; border-radius: 12px; padding: 8px 12px; max-width: 85%; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.chat-msg .cm-who { font-size: 12px; font-weight: 800; color: var(--blue); }
.chat-msg.me { align-self: flex-end; background: #d9ead3; }
.chat-msg.voice { border: 2px solid var(--blue); }
.chat-msg .cm-audio { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--blue); }
.chat-msg .cm-play {
  background: var(--blue); color: #fff; border: none; border-radius: 8px;
  padding: 3px 10px; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.chat-msg .cm-play:hover { background: #3a5a8c; }
.chat-msg .cm-playnote { font-size: 11px; color: var(--ink-soft); }
.chat-msg .cm-caption { font-size: 13px; color: var(--ink-soft); font-style: italic; margin-top: 3px; }

.reachbars { margin: 10px auto; width: 380px; max-width: 100%; font-size: 14px; }
.reachbars .rb-row { margin-bottom: 8px; }
.reachbars .rb-bar { height: 20px; border-radius: 10px; background: var(--red); }
.reachbars .rb-bar.fix { background: var(--green); }
.reachbars .rb-label { font-weight: 700; margin-bottom: 2px; }

/* ---------------- Assessment console ---------------- */
.console {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 16px 24px; overflow-y: auto;
}
.console-screen {
  background: #10232b; border: 10px solid #37474f; border-radius: 18px;
  color: #d9f3ef; width: min(880px, 96%); padding: 24px 30px; position: relative;
  box-shadow: inset 0 0 30px rgba(0,0,0,.6), var(--shadow);
  font-size: 17px;
}
.console-screen .cs-head { color: #7fd8cf; font-size: 13px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; display: flex; justify-content: space-between;}
.console-screen h3 { color: #fff; font-size: 20px; margin-bottom: 14px; }
.opt-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.opt-btn {
  text-align: left; background: #17323d; color: #d9f3ef; border: 2px solid #2b5a63;
  border-radius: 10px; padding: 10px 14px; font-size: 16px; cursor: pointer; font-family: inherit;
}
.opt-btn:hover { border-color: #7fd8cf; }
.opt-btn.picked { background: #2b7a78; border-color: #7fd8cf; color: #fff; }
.opt-btn:disabled { opacity: .4; cursor: default; }
.opt-letter { font-weight: 800; margin-right: 8px; color: #7fd8cf; }
.console .evidence { background: #fff; }
.assess-imgs { display: flex; gap: 18px; justify-content: center; align-items: flex-start; flex-wrap: wrap; margin: 8px 0; }
.assess-imgs .evidence { max-width: 46%; }
.assess-imgs .evidence.pick { cursor: pointer; }
.assess-imgs .evidence.picked { outline: 5px solid var(--amber); }
.kq-rows { display: flex; flex-direction: column; gap: 12px; }
.kq-rowcard { background: #17323d; border-radius: 10px; padding: 10px 14px; border: 2px solid #2b5a63; }
.kq-rowcard.active { border-color: #7fd8cf; }
.kq-rowcard .rc-text { margin-bottom: 8px; }
.kq-assign { font-size: 13.5px; color: #7fd8cf; font-weight: 700; }
.seq-slots { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.seq-slot {
  border: 2px dashed #2b5a63; border-radius: 10px; min-width: 150px; min-height: 44px;
  padding: 6px 10px; font-size: 14px; color: #7fd8cf; display: flex; align-items: center; gap: 6px;
}
.seq-slot.filled { border-style: solid; background: #2b7a78; color: #fff; }

/* smileyometer */
.smiley-row { display: flex; gap: 14px; justify-content: center; margin: 16px 0 6px 0; flex-wrap: wrap; }
.smiley-btn { background: none; border: 3px solid transparent; border-radius: 14px; padding: 6px; cursor: pointer; }
.smiley-btn svg { width: 74px; height: 74px; }
.smiley-btn:hover { border-color: #7fd8cf; }
.smiley-btn .sm-anchor { font-size: 12.5px; color: #d9f3ef; max-width: 92px; margin-top: 4px; }

/* ---------------- Permit desk / lens ---------------- */
.lens-dials { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.dial {
  display: flex; align-items: center; gap: 10px; background: var(--warm);
  border-radius: 12px; padding: 8px 12px; flex-wrap: wrap;
}
.dial .dial-q { font-weight: 800; flex: 1 1 220px; }
.dial .dial-opts { display: flex; gap: 6px; }
.dial-opt {
  border: 2px solid var(--ink-soft); background: var(--card); border-radius: 10px;
  padding: 5px 12px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.dial-opt.picked { background: var(--teal); border-color: var(--teal-dark); color: #fff; }

.drawers { display: flex; gap: 16px; justify-content: center; margin: 14px 0; }
.drawer {
  width: 200px; background: #8d6e5a; border-radius: 12px; padding: 12px; cursor: pointer;
  color: #fff; text-align: center; border: 3px solid #6d503d; box-shadow: var(--shadow);
}
.drawer:hover { background: #9d7d67; }
.drawer .dr-name { font-size: 19px; font-weight: 800; letter-spacing: 1px; }
.drawer .dr-gloss { font-size: 12.5px; margin-top: 4px; color: #f3e3d5; }
.drawer .dr-handle { width: 60px; height: 8px; border-radius: 4px; background: #4d3626; margin: 8px auto 0 auto; }

.permit-request {
  background: var(--card); border: 3px solid var(--blue); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 10px; font-size: 16px; display: flex; gap: 14px; align-items: flex-start;
}
.permit-request .pr-portrait { width: 64px; height: 64px; flex: none; }
.permit-request .pr-portrait svg { width: 100%; height: 100%; }
.permit-meta { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }

/* response options */
.resp-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.resp-btn {
  text-align: left; background: var(--card); border: 2px solid var(--teal);
  border-radius: 12px; padding: 10px 14px; font-size: 15.5px; cursor: pointer; font-family: inherit;
}
.resp-btn:hover { background: #e6f0ef; }
.resp-btn .rv { font-weight: 800; color: var(--teal-dark); margin-right: 6px; text-transform: uppercase; font-size: 12.5px; letter-spacing: .5px;}

/* ---------------- MIMIC bench ---------------- */
.bench { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; }
.bench-machine { text-align: center; }
.bench-machine svg { width: 300px; height: 260px; }
.tray { display: flex; flex-wrap: wrap; gap: 6px; width: 240px; justify-content: center; }
.tray .face-card { cursor: pointer; border-radius: 8px; border: 2px solid var(--ink-soft); background: #fff; padding: 2px; }
.tray .face-card.fed { opacity: .25; cursor: default; }
.tray .face-card svg { width: 46px; height: 46px; display: block; }
.bench-out { text-align: center; }
.bench-out svg { width: 150px; height: 150px; }
.bench-levers { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.lever-btn { border: 2px solid var(--blue); background: var(--card); border-radius: 10px; padding: 6px 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.lever-btn.picked { background: var(--blue); color: #fff; }

/* licence assembly */
.frag-pool, .licence-frame { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0; }
.frag {
  background: var(--card); border: 2px solid var(--amber-dark); border-radius: 10px;
  padding: 8px 14px; font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.frag.used { opacity: .3; cursor: default; }
.licence-frame {
  min-height: 56px; border: 3px dashed var(--teal); border-radius: 12px; padding: 10px;
  width: min(760px, 96%); margin: 10px auto; align-items: center;
}
.licence-frame .frag { background: var(--teal); color: #fff; border-color: var(--teal-dark); }

/* casing nesting — three CONCENTRIC rings (playtest revision: circles make the
   "each sits inside the next" relation visible; boxes in a row did not) */
.casing-zone { display: flex; gap: 22px; justify-content: center; align-items: flex-start; margin: 12px 0; flex-wrap: wrap; }
.ring {
  border: 4px dashed var(--ink-soft); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer; text-align: center;
  background: rgba(255, 253, 247, .45);
}
.ring .ring-label {
  position: absolute; top: 6%; left: 50%; transform: translateX(-50%);
  font-size: 12.5px; font-weight: 800; color: var(--ink-soft);
  background: var(--card); border-radius: 8px; padding: 0 8px; white-space: nowrap;
}
.ring.placed { border-style: solid; border-color: var(--green); }
.ring.placed > .ring-label { color: var(--green); }
.ring-outer { width: 360px; height: 360px; }
.ring-middle { width: 250px; height: 250px; }
.ring-inner { width: 140px; height: 140px; background: var(--warm); }
.ring-inner .ring-label { position: static; transform: none; white-space: normal; background: none; }
.casing-key { max-width: 330px; font-size: 14.5px; }
.casing-key .ck-row { background: var(--card); border: 2px solid var(--warm); border-radius: 10px; padding: 7px 10px; margin-bottom: 8px; }
.casing-key .ck-row b { color: var(--teal-dark); }

/* media bets */
.bet-files { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.bet-file {
  width: 190px; background: var(--card); border: 3px solid var(--ink-soft); border-radius: 12px;
  padding: 12px; text-align: center; font-weight: 700;
}
.bet-file svg { width: 60px; height: 60px; }
.bet-file .bet-btns { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.bet-file.done { border-color: var(--green); }

/* wanted poster drill */
.poster {
  background: #f3e2b8; border: 6px double #8d6e5a; padding: 16px; text-align: center;
  width: 300px; border-radius: 6px;
}
.poster h3 { font-family: Georgia, serif; letter-spacing: 2px; }
.poster svg { width: 160px; height: 160px; }

/* certificate */
.certificate {
  background: #fffef8; border: 10px double var(--teal-dark); border-radius: 8px;
  padding: 30px 40px; text-align: center; width: min(680px, 94%);
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.certificate h2 { font-family: Georgia, serif; color: var(--teal-dark); font-size: 30px; }
.certificate .cert-name { font-size: 26px; font-weight: 800; margin: 10px 0; color: var(--amber-dark); }
.certificate .cert-seal { width: 90px; height: 90px; margin: 8px auto; }

/* field guide */
.field-guide { background: #fff; color: #222; padding: 20px; border-radius: 8px; max-width: 860px; margin: 0 auto; font-size: 13px; }
.field-guide h2 { color: var(--teal-dark); }
.field-guide h3 { margin: 10px 0 4px 0; color: var(--amber-dark); }
.fg-cards { display: flex; flex-wrap: wrap; gap: 8px; }
.fg-card { border: 1.5px solid var(--amber-dark); border-radius: 8px; padding: 5px 8px; width: 245px; }
.fg-card b { display: block; }
.fg-two { display: flex; gap: 20px; flex-wrap: wrap; }
.fg-two > div { flex: 1 1 300px; }
.fg-routes li { margin-bottom: 3px; }

/* progress strip */
.acc-strip { display: flex; gap: 5px; align-items: center; }
.acc-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink-soft); font-size: 0; }
.acc-dot.hit { background: var(--green); border-color: var(--green); }
.acc-dot.miss { background: var(--red); border-color: var(--red); }

/* clue wall board */
.wallboard { background: #7a5c46; border-radius: 16px; padding: 16px; }

/* ---------------- Title screen (Act 0.1) — presentation only ---------------- */
.scene.title-screen {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 16%, #fffdf2 0%, transparent 58%),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(43,122,120,.05) 34px 35px),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(43,122,120,.05) 34px 35px);
}
.title-deco { position: absolute; inset: 0; pointer-events: none; }
.t-chip {
  position: absolute; width: 15px; height: 15px; border-radius: 4px;
  opacity: .45; animation: chipDrift 9s ease-in-out infinite;
}
.t-chip-0 { left: 7%;  top: 16%; background: var(--teal);  animation-delay: 0s;    transform: rotate(12deg); }
.t-chip-1 { left: 14%; top: 66%; background: var(--amber); animation-delay: 1.4s;  width: 11px; height: 11px; }
.t-chip-2 { left: 24%; top: 34%; background: var(--buzz);  animation-delay: 2.6s;  width: 9px;  height: 9px; }
.t-chip-3 { left: 82%; top: 20%; background: var(--blue);  animation-delay: .8s; }
.t-chip-4 { left: 90%; top: 58%; background: var(--amber); animation-delay: 3.4s;  width: 12px; height: 12px; }
.t-chip-5 { left: 74%; top: 76%; background: var(--teal);  animation-delay: 2s;    width: 10px; height: 10px; }
.t-chip-6 { left: 40%; top: 82%; background: var(--red);   animation-delay: 4.2s;  width: 9px;  height: 9px; }
.t-chip-7 { left: 60%; top: 10%; background: var(--green); animation-delay: 1s;    width: 11px; height: 11px; }
@keyframes chipDrift {
  0%, 100% { transform: translateY(0) rotate(-10deg); }
  50%      { transform: translateY(-26px) rotate(14deg); }
}
.title-seal {
  width: 132px; height: 132px; margin: 0 auto 2px auto; position: relative;
  filter: drop-shadow(0 6px 12px rgba(58,47,42,.28));
  animation: sealBob 5s ease-in-out infinite;
}
.title-seal svg { width: 100%; height: 100%; }
@keyframes sealBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-8px) rotate(2deg); }
}
.scene .game-logo {
  font-size: clamp(44px, 7vw, 66px);
  letter-spacing: .04em;
  color: var(--teal-dark);
  text-shadow: 3px 3px 0 var(--amber), 6px 6px 0 rgba(58,47,42,.14);
  margin-bottom: 12px;
  position: relative;
}
.title-tagline {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--warm); border-radius: 999px;
  padding: 6px 18px; font-weight: 700; font-size: 15px; color: var(--ink);
  box-shadow: var(--shadow);
}
.title-tagline .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }
.title-sub { margin-top: 12px; font-size: 18px; }
.btn.title-start {
  padding: 16px 48px; font-size: 24px; letter-spacing: .03em;
  box-shadow: 0 5px 0 var(--amber-dark), 0 12px 22px rgba(58,47,42,.25);
  animation: startPulse 2.6s ease-in-out infinite;
}
.btn.title-start:hover { animation-play-state: paused; transform: translateY(-2px) scale(1.03); }
.btn.title-start:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--amber-dark); }
@keyframes startPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.title-note { margin-top: 16px; font-size: 13.5px; color: var(--ink-soft); }
.title-note.faint { margin-top: 4px; font-size: 12px; opacity: .78; }
@media (prefers-reduced-motion: reduce) {
  .t-chip, .title-seal, .btn.title-start, .ev-imgwrap.ev-loading, .preload-dots .dot { animation: none; }
}

@media print {
  body * { visibility: hidden; }
  .field-guide, .field-guide * { visibility: visible; }
  .field-guide { position: absolute; left: 0; top: 0; width: 100%; }
}
