/* CASE ZERO — The Investigation Network */
:root {
  --bg: #0c0d0f; --bg2: #111215; --panel: #15171a; --panel2: #1a1c20; --line: #2a2c31; --line2: #383a40;
  --text: #ebe6dc; --muted: #9a958b; --dim: #6c6860;
  --red: #b3261e; --red2: #d6372d; --amber: #c9a227; --amber2: #e5bd4a; --green: #4f9a6b; --blue: #6c8fb3;
  --paper: #ece4d2; --paper-ink: #2a241b;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --radius: 4px; --shadow: 0 18px 60px rgba(0,0,0,.55);
  --side: 232px; --top: 60px;
}
[data-theme="yard"] { --bg:#0b100d; --bg2:#0f1511; --panel:#131b16; --panel2:#18221b; --line:#25332a; --line2:#33453a; --red:#9a2f22; --red2:#c0402f; --amber:#b89a4a; --amber2:#d4b562; }
[data-theme="crimson"] { --bg:#100a0b; --bg2:#150d0e; --panel:#1b1112; --panel2:#221516; --line:#3a2023; --line2:#4c2a2e; --red:#c0272d; --red2:#e03a40; --amber:#d8c3a5; --amber2:#efdcc0; }
[data-theme="sepia"] { --bg:#14100b; --bg2:#19140e; --panel:#1f1911; --panel2:#262016; --line:#3b3022; --line2:#4d3f2c; --text:#efe3cc; --muted:#a8987c; --red:#a3402a; --red2:#c45a3f; --amber:#d1a24e; --amber2:#e8bb62; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow-x: hidden; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(179,38,30,.10), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(201,162,39,.06), transparent 60%); }
a { color: var(--amber2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: .01em; margin: 0 0 .4em; }
h1 { font-size: 34px; } h2 { font-size: 24px; } h3 { font-size: 18px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); } .dim { color: var(--dim); }
.red { color: var(--red2); } .amber { color: var(--amber2); } .green { color: var(--green); }
.kicker { font: 600 11px/1 var(--mono); letter-spacing: .28em; text-transform: uppercase; color: var(--amber); }
.hidden { display: none !important; }
::selection { background: var(--red); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #2c2e33; border-radius: 6px; border: 2px solid var(--bg); } ::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text);
  padding: 10px 16px; border-radius: var(--radius); cursor: pointer; font-weight: 600; font-size: 13px; letter-spacing: .04em; transition: background .15s, border-color .15s, transform .08s; white-space: nowrap; }
.btn:hover { background: #24272c; border-color: #4a4d55; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.qbtn .k svg { width: 14px; height: 14px; }
.interro > * { min-width: 0; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red2); border-color: var(--red2); }
.btn.gold { background: transparent; border-color: var(--amber); color: var(--amber2); }
.btn.gold:hover { background: rgba(201,162,39,.12); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255,255,255,.04); }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn.lg { padding: 14px 22px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.btn.block { width: 100%; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid var(--line2); border-radius: 99px; font: 600 11px/1.4 var(--mono); letter-spacing: .06em; color: var(--muted); }
.chip.red { border-color: rgba(214,55,45,.5); color: #ef8a82; background: rgba(179,38,30,.12); }
.chip.amber { border-color: rgba(201,162,39,.5); color: var(--amber2); background: rgba(201,162,39,.1); }
.chip.green { border-color: rgba(79,154,107,.5); color: #8fd1a7; background: rgba(79,154,107,.1); }
input[type=text], input[type=password], input[type=email], input[type=number], textarea, select {
  width: 100%; background: #0e0f12; border: 1px solid var(--line2); color: var(--text); padding: 11px 12px; border-radius: var(--radius); font: inherit; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(201,162,39,.15); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.err { color: #ef8a82; font-size: 13px; min-height: 18px; }

/* ---------- shell */
#app { position: relative; z-index: 1; min-height: 100vh; }
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: linear-gradient(180deg, var(--bg2), var(--bg)); display: flex; flex-direction: column; padding: 18px 14px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; color: var(--text); }
.brand b { display: block; font: 700 16px/1 var(--serif); letter-spacing: .14em; }
.brand small { display: block; font: 500 9px/1.6 var(--mono); letter-spacing: .22em; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); color: var(--muted); font-weight: 500; font-size: 14px; position: relative; }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { color: var(--text); background: rgba(255,255,255,.035); text-decoration: none; }
.nav a.active { color: var(--text); background: rgba(179,38,30,.12); }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; background: var(--red); }
.nav .badge { margin-left: auto; font: 700 10px/1 var(--mono); background: var(--red); color: #fff; padding: 3px 6px; border-radius: 99px; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 26px; border-bottom: 1px solid var(--line); background: rgba(12,13,15,.86); backdrop-filter: blur(10px); }
.topbar .title { font: 600 12px/1 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.topbar .spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line2); border-radius: 99px; font: 600 12px/1 var(--mono); background: var(--panel); cursor: pointer; color: var(--text); }
.pill:hover { border-color: var(--amber); text-decoration: none; }
.pill .coin { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f3d77a, #a87d1c); box-shadow: inset 0 0 0 1.5px #6e5112; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line2); border-radius: 50%; background: var(--panel); cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--text); border-color: var(--amber); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.on { color: var(--amber2); border-color: rgba(201,162,39,.6); }
.view { padding: 28px 30px 60px; max-width: 1320px; width: 100%; margin: 0 auto; }
.tabbar { display: none; }

/* ---------- layout bits */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.dash { grid-template-columns: 1.55fr 1fr; }
.card { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: 6px; padding: 20px; position: relative; }
.card.tight { padding: 14px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-h h3 { margin: 0; }
.row { display: flex; align-items: center; gap: 12px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .col { display: flex; flex-direction: column; gap: 10px; }
.sep { height: 1px; background: var(--line); margin: 16px 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 640px; }
.stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.stat b { display: block; font: 600 24px/1.1 var(--mono); }
.stat span { font: 600 10px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.progress { height: 6px; background: #22242a; border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--amber)); border-radius: 99px; transition: width .6s; }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line2); border-radius: 6px; }
.list { display: flex; flex-direction: column; }
.list .li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.list .li:last-child { border-bottom: 0; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font: 600 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line2); }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.tbl tr.me td { background: rgba(201,162,39,.07); }
.pos { font: 700 13px var(--mono); color: var(--muted); width: 36px; }
.pos.p1 { color: var(--amber2); } .pos.p2 { color: #cfd3d8; } .pos.p3 { color: #c88a54; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; padding: 11px 14px; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--text); border-color: var(--red); }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 99px; padding: 3px; background: var(--panel); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 99px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 600; }
.seg button.active { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }

/* ---------- avatars & frames */
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font: 700 22px var(--serif); background: radial-gradient(circle at 35% 30%, #3a2a24, #16110f); color: var(--amber2); flex: none; position: relative; }
.avatar.lg { width: 84px; height: 84px; font-size: 34px; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.frame-brass { box-shadow: 0 0 0 3px #b08a3e, 0 0 0 5px #3a2a10, 0 0 18px rgba(201,162,39,.35); }
.frame-noir { box-shadow: 0 0 0 3px #111, 0 0 0 4px #555, 0 0 24px rgba(0,0,0,.9); filter: grayscale(.4); }
.frame-redline { box-shadow: 0 0 0 2px var(--red), 0 0 0 5px rgba(179,38,30,.25); }

/* ---------- landing / auth */
.landing { min-height: 100vh; display: grid; grid-template-columns: 1.2fr 1fr; }
.land-art { position: relative; overflow: hidden; border-right: 1px solid var(--line); }
.land-art .scene-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.land-art .overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,13,15,.2), rgba(12,13,15,.85)), linear-gradient(0deg, rgba(12,13,15,.95), transparent 50%); }
.land-copy { position: absolute; left: 48px; bottom: 56px; right: 48px; }
.land-copy h1 { font-size: clamp(38px, 5vw, 64px); line-height: 1.02; margin: 14px 0; letter-spacing: .02em; }
.land-copy p { color: #cfc8bb; font-size: 17px; max-width: 520px; }
.land-panel { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 5vw, 70px); }
.case-stamp { display: inline-block; border: 2px solid var(--red2); color: var(--red2); padding: 6px 14px; font: 700 13px var(--mono); letter-spacing: .3em; transform: rotate(-3deg); }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 26px 0; font-size: 13px; color: var(--muted); }
.features div::before { content: "▸ "; color: var(--red2); }
.challenge-banner { border: 1px solid rgba(201,162,39,.4); background: rgba(201,162,39,.08); padding: 12px 14px; border-radius: 6px; margin-bottom: 18px; font-size: 14px; }

/* ---------- dashboard */
.profile-card { display: flex; gap: 18px; align-items: center; }
.profile-card .meta { flex: 1; min-width: 0; }
.rank-name { font: 700 13px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--amber2); }
.continue { display: grid; grid-template-columns: 220px 1fr; gap: 0; padding: 0; overflow: hidden; }
.continue .cover { position: relative; min-height: 170px; }
.continue .cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.continue .body { padding: 20px; }
.daily-mini { background: linear-gradient(135deg, rgba(179,38,30,.16), transparent 60%), linear-gradient(180deg, var(--panel), var(--bg2)); }
.countdown { font: 600 22px var(--mono); letter-spacing: .06em; }
.ann { padding: 12px 0; border-bottom: 1px solid var(--line); } .ann:last-child { border: 0; }
.ann b { display: block; margin: 6px 0 2px; }
.ann p { margin: 0; color: var(--muted); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #444; flex: none; }
.dot.on { background: #4fd17b; box-shadow: 0 0 8px #4fd17b; }

/* ---------- library */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.case-card { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel); display: flex; flex-direction: column; transition: transform .2s, border-color .2s, box-shadow .2s; }
.case-card:hover { transform: translateY(-3px); border-color: var(--line2); box-shadow: var(--shadow); }
.case-card .cover { position: relative; height: 160px; }
.case-card .cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.case-card .cover .cid { position: absolute; left: 14px; top: 12px; font: 600 11px var(--mono); letter-spacing: .2em; color: #d8d2c6; background: rgba(0,0,0,.45); padding: 4px 8px; }
.case-card .cover .status { position: absolute; right: 12px; top: 12px; }
.case-card .body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.case-card h3 { margin: 0; font-size: 20px; }
.case-card p { margin: 0; color: var(--muted); font-size: 13px; }
.case-card .facts { display: flex; gap: 14px; font: 12px var(--mono); color: var(--muted); flex-wrap: wrap; }
.pips { display: inline-flex; gap: 3px; } .pips i { width: 10px; height: 4px; background: #333; } .pips i.on { background: var(--red2); }
.case-card.upcoming { opacity: .85; } .case-card.upcoming .cover::after { content: "IN PRODUCTION"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 13px var(--mono); letter-spacing: .4em; color: rgba(255,255,255,.55); background: rgba(0,0,0,.35); }

/* ---------- modal & toasts */
.modal-bg { position: fixed; inset: 0; background: rgba(5,5,7,.78); backdrop-filter: blur(4px); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line2); border-radius: 8px; box-shadow: var(--shadow); padding: 26px; position: relative; animation: rise .25s; }
.modal.wide { width: min(860px, 100%); } .modal.xwide { width: min(1080px, 100%); }
.modal .x { position: absolute; right: 14px; top: 14px; }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 40px)); }
.toast { background: var(--panel2); border: 1px solid var(--line2); border-left: 3px solid var(--amber); padding: 12px 14px; border-radius: 4px; box-shadow: var(--shadow); font-size: 13px; animation: rise .25s; }
.toast.err { border-left-color: var(--red2); } .toast.ok { border-left-color: var(--green); }
.toast b { display: block; font-size: 12px; font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
.consent { position: fixed; left: 20px; bottom: 20px; z-index: 150; max-width: 460px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 18px; box-shadow: var(--shadow); font-size: 13px; }

/* ---------- investigation workspace */
.ws { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: grid; grid-template-rows: 56px 1fr; grid-template-columns: minmax(0, 1fr); }
.ws-top { min-width: 0; overflow: hidden; }
.ws-top { display: flex; align-items: center; gap: 14px; padding: 0 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #141518, #0f1012); }
.ws-top .case-name { font: 700 16px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-top .case-id { font: 600 11px var(--mono); letter-spacing: .2em; color: var(--red2); }
.ws-top .meters { display: flex; gap: 16px; font: 12px var(--mono); color: var(--muted); margin-left: auto; align-items: center; }
.ws-top .meters b { color: var(--text); }
.ws-body { display: grid; grid-template-columns: 76px 1fr 320px; min-height: 0; }
.ws-body > * { min-width: 0; }
.ws-rail { border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 8px 6px; gap: 2px; overflow-y: auto; background: var(--bg2); }
.ws-rail button { background: none; border: 0; color: var(--muted); padding: 9px 4px; border-radius: 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 600 9.5px/1.1 var(--mono); letter-spacing: .06em; text-transform: uppercase; position: relative; }
.ws-rail button svg { width: 20px; height: 20px; }
.ws-rail button:hover { color: var(--text); background: rgba(255,255,255,.04); }
.ws-rail button.active { color: var(--text); background: rgba(179,38,30,.15); }
.ws-rail button .n { position: absolute; top: 4px; right: 6px; background: var(--red); color: #fff; border-radius: 99px; font-size: 9px; padding: 2px 5px; }
.ws-main { min-width: 0; min-height: 0; overflow: auto; padding: 20px; position: relative; }
.ws-side { border-left: 1px solid var(--line); background: var(--bg2); display: flex; flex-direction: column; min-height: 0; }
.ws-side .side-sec { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ws-side .log { flex: 1; overflow-y: auto; padding: 10px 16px; font-size: 12.5px; }
.log-item { padding: 7px 0; border-bottom: 1px dashed var(--line); display: grid; grid-template-columns: 44px 1fr; gap: 8px; }
.log-item time { font: 11px var(--mono); color: var(--dim); }
.log-item.contradiction { color: #ef8a82; } .log-item.lab { color: #a9c3dc; } .log-item.hint { color: var(--amber2); } .log-item.evidence { color: var(--text); }

.loc-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 12px; }
.loc-thumb { flex: none; width: 150px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; cursor: pointer; background: var(--panel); position: relative; padding: 0; text-align: left; }
.loc-thumb .mini { height: 74px; position: relative; overflow: hidden; }
.loc-thumb .mini svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.loc-thumb span { display: block; padding: 7px 9px; font-size: 12px; font-weight: 600; }
.loc-thumb small { position: absolute; right: 6px; top: 6px; font: 600 10px var(--mono); background: rgba(0,0,0,.6); padding: 2px 6px; border-radius: 99px; }
.loc-thumb.active { border-color: var(--red2); box-shadow: 0 0 0 1px var(--red2); }
.scene-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line2); border-radius: 4px; overflow: hidden; background: #000; cursor: crosshair; user-select: none; }
.scene-wrap .scene-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-wrap::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(0,0,0,.6); }
.hotspot { position: absolute; border: 0; background: transparent; cursor: zoom-in; border-radius: 6px; padding: 0; z-index: 2; }
.hotspot:hover { background: rgba(229,189,74,.08); box-shadow: inset 0 0 0 1px rgba(229,189,74,.35); }
.hotspot.obvious::after, .hotspot.found::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; transform: translate(-50%,-50%); border-radius: 50%; border: 2px solid var(--amber2); box-shadow: 0 0 12px rgba(229,189,74,.6); }
.hotspot.found::after { border-color: #8fd1a7; box-shadow: none; width: 10px; height: 10px; background: rgba(79,154,107,.5); }
.hotspot.obvious:not(.found)::after { animation: pulse 1.8s infinite; }
.hotspot.highlighted::after { content: ""; position: absolute; inset: -6px; border: 2px dashed var(--red2); border-radius: 8px; animation: pulse 1.2s infinite; }
.hotspot .hs-label { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap; font: 600 11px var(--mono); background: rgba(0,0,0,.8); padding: 3px 7px; border-radius: 3px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.hotspot:hover .hs-label { opacity: 1; }
@keyframes pulse { 50% { opacity: .35; } }
.scene-desc { margin-top: 12px; color: var(--muted); font-style: italic; }
.rain { animation: rain .5s linear infinite; } @keyframes rain { to { transform: translate(-8px, 40px); } }
.flicker { animation: flicker 2.6s infinite; } @keyframes flicker { 0%,100% { opacity: .85; } 40% { opacity: 1; } 60% { opacity: .7; } }
.lightning.flash { animation: flash .9s; } @keyframes flash { 0% { opacity: 0; } 8% { opacity: .55; } 14% { opacity: .05; } 22% { opacity: .4; } 100% { opacity: 0; } }
.pendulum { transform-origin: 160px 340px; animation: swing 2s ease-in-out infinite alternate; } @keyframes swing { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }

.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.ev-card { border: 1px solid var(--line); background: var(--panel); border-radius: 4px; padding: 14px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, transform .15s; position: relative; }
.ev-card:hover { border-color: var(--amber); transform: translateY(-2px); }
.ev-card .ev-icon { width: 34px; height: 34px; color: var(--amber2); }
.ev-card b { font-size: 14px; } .ev-card p { margin: 0; font-size: 12.5px; color: var(--muted); }
.ev-card .eid { position: absolute; right: 12px; top: 12px; font: 600 10px var(--mono); color: var(--dim); }
.ev-card.unknown { cursor: default; border-style: dashed; opacity: .5; display: grid; place-items: center; min-height: 120px; font: 600 11px var(--mono); letter-spacing: .2em; color: var(--dim); }
.ev-card.unknown:hover { transform: none; border-color: var(--line); }
.doc { background: var(--paper); color: var(--paper-ink); padding: 26px 28px; border-radius: 2px; box-shadow: 0 10px 30px rgba(0,0,0,.5); font-family: 'Courier Prime', var(--mono); font-size: 14px; line-height: 1.6; position: relative; white-space: pre-wrap; }
.doc::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 27px, rgba(0,0,0,.035) 27px 28px); pointer-events: none; }
.doc .stamp { position: absolute; right: 18px; top: 14px; border: 2px solid #9b2c24; color: #9b2c24; font: 700 11px var(--mono); padding: 3px 8px; letter-spacing: .2em; transform: rotate(4deg); opacity: .8; }
.doc h4 { margin: 0 0 10px; font: 700 12px var(--mono); letter-spacing: .2em; color: #5a4a32; }
.lab-result { margin-top: 14px; padding: 14px 16px; background: #0f1a24; border: 1px solid #284057; border-radius: 4px; color: #cfe2f5; font: 13px/1.6 var(--mono); white-space: pre-wrap; }
.lab-result b { display: block; font-size: 11px; letter-spacing: .2em; color: #7fb0dc; margin-bottom: 6px; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.person { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--panel); cursor: pointer; text-align: left; padding: 0; display: flex; flex-direction: column; transition: border-color .15s; }
.person:hover { border-color: var(--amber); }
.person .ph { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.person .ph svg { width: 100%; height: 100%; display: block; }
.person .ph .tag { position: absolute; left: 10px; bottom: 10px; }
.person .pb { padding: 12px 14px; }
.person .pb b { display: block; font-family: var(--serif); font-size: 17px; }
.person .pb small { color: var(--muted); font-size: 12px; }
.composure { margin-top: 10px; } .composure .progress > i { background: linear-gradient(90deg, #6b1a14, var(--amber)); }

.interro { display: grid; grid-template-columns: 300px 1fr; gap: 18px; min-height: 0; }
.interro .who { border: 1px solid var(--line); border-radius: 4px; background: var(--panel); overflow: hidden; align-self: start; position: sticky; top: 0; }
.interro .who .ph svg { width: 100%; height: auto; display: block; }
.interro .who .info { padding: 14px; font-size: 13px; color: var(--muted); }
.transcript { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 4px; background: #0e0f11; min-height: 260px; max-height: 52vh; overflow-y: auto; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 10px; font-size: 14px; line-height: 1.55; }
.bubble.q { align-self: flex-end; background: #1f2a36; border: 1px solid #2c3d50; color: #dbe7f3; border-bottom-right-radius: 2px; }
.bubble.a { align-self: flex-start; background: var(--panel2); border: 1px solid var(--line2); border-bottom-left-radius: 2px; font-family: var(--serif); font-size: 15px; }
.bubble.a.contra { border-color: rgba(214,55,45,.6); box-shadow: 0 0 0 1px rgba(214,55,45,.25); }
.bubble .note { display: block; margin-top: 8px; font: italic 12px var(--sans); color: var(--amber2); }
.questions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.qbtn { text-align: left; padding: 11px 14px; border: 1px solid var(--line2); background: var(--panel); border-radius: 4px; cursor: pointer; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.qbtn:hover { border-color: var(--amber); }
.qbtn.confront { border-color: rgba(214,55,45,.5); background: rgba(179,38,30,.08); }
.qbtn.asked { opacity: .5; }
.qbtn .k { font: 600 10px var(--mono); letter-spacing: .14em; color: var(--muted); flex: none; }
.typing { display: inline-flex; gap: 4px; } .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .2; } }
.flash-red { animation: flashred .7s; } @keyframes flashred { 0% { box-shadow: inset 0 0 0 9999px rgba(214,55,45,.25); } 100% { box-shadow: none; } }

.lab-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); margin-bottom: 10px; }
.lab-row .ev-icon { width: 30px; height: 30px; color: #7fb0dc; }

.tl-list { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.tl-card { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line2); background: var(--panel); border-radius: 4px; cursor: grab; }
.tl-card.dragging { opacity: .4; } .tl-card.over { border-color: var(--amber); }
.tl-card .n { font: 700 13px var(--mono); color: var(--red2); }
.tl-pool .tl-card { border-style: dashed; }

.board-wrap { position: relative; display: grid; grid-template-columns: 220px 1fr; gap: 14px; height: calc(100vh - 56px - 40px); }
.board-tray { overflow-y: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); padding: 10px; }
.tray-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 4px; margin-bottom: 6px; font-size: 12px; cursor: grab; background: var(--bg2); }
.tray-item .ev-icon { width: 20px; height: 20px; color: var(--amber2); flex: none; }
.tray-item.on { opacity: .4; }
.board { position: relative; overflow: auto; border: 1px solid var(--line2); border-radius: 4px; background: #1b1511; background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px), radial-gradient(rgba(0,0,0,.25) 1px, transparent 1px); background-size: 22px 22px, 7px 7px; }
.board-canvas { position: relative; width: 1800px; height: 1100px; }
.board svg.threads { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.board svg.threads line { stroke: #c62f26; stroke-width: 2.4; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.board svg.threads text { fill: #f0d0c8; font: 600 12px var(--mono); paint-order: stroke; stroke: #1b1511; stroke-width: 4px; }
.bnode { position: absolute; width: 150px; background: var(--paper); color: var(--paper-ink); padding: 10px 10px 8px; border-radius: 2px; box-shadow: 0 8px 18px rgba(0,0,0,.55); cursor: move; user-select: none; font-size: 12px; line-height: 1.35; touch-action: none; }
.bnode::before { content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff6a5e, #8a1a14); transform: translateX(-50%); box-shadow: 0 2px 3px rgba(0,0,0,.5); }
.bnode b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.bnode .ev-icon { width: 22px; height: 22px; color: #6b4a1a; float: right; margin-left: 4px; }
.bnode.person { background: #d9d2c4; }
.bnode.person svg.portrait-svg { width: 100%; height: auto; display: block; margin-bottom: 6px; }
.bnode.sel { outline: 3px solid var(--amber); }
.bnode .rm { position: absolute; right: -8px; top: -8px; width: 20px; height: 20px; border-radius: 50%; background: #222; color: #fff; border: 1px solid #555; font-size: 12px; line-height: 18px; text-align: center; cursor: pointer; display: none; }
.bnode:hover .rm { display: block; }
.board-tools { position: absolute; right: 12px; top: 12px; z-index: 5; display: flex; gap: 8px; }

.notebook textarea { min-height: 50vh; font: 15px/1.7 var(--serif); background: #111214; resize: vertical; }

.accuse-steps { display: flex; gap: 6px; margin-bottom: 18px; }
.accuse-steps i { flex: 1; height: 3px; background: #2a2c31; } .accuse-steps i.on { background: var(--red2); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pick { border: 1px solid var(--line2); border-radius: 4px; background: var(--panel); padding: 0; cursor: pointer; overflow: hidden; text-align: left; }
.pick svg { width: 100%; height: auto; display: block; }
.pick span { display: block; padding: 8px 10px; font-weight: 600; font-size: 13px; }
.pick.sel { border-color: var(--red2); box-shadow: 0 0 0 2px var(--red2); }
.opt { display: block; width: 100%; text-align: left; border: 1px solid var(--line2); background: var(--panel); padding: 12px 14px; border-radius: 4px; cursor: pointer; margin-bottom: 8px; font-size: 14px; }
.opt:hover { border-color: var(--amber); } .opt.sel { border-color: var(--red2); background: rgba(179,38,30,.12); }

.verdict { text-align: center; padding: 10px 0 18px; }
.verdict .big-stamp { display: inline-block; font: 800 clamp(30px, 6vw, 52px)/1 var(--serif); letter-spacing: .12em; padding: 12px 26px; border: 4px solid currentColor; transform: rotate(-4deg); animation: stamp .45s cubic-bezier(.2,1.6,.4,1); }
.verdict .big-stamp.ok { color: #6fcf8f; } .verdict .big-stamp.bad { color: var(--red2); }
@keyframes stamp { from { transform: scale(2.4) rotate(-12deg); opacity: 0; } to { transform: scale(1) rotate(-4deg); opacity: 1; } }
.breakdown .li span:last-child { margin-left: auto; font-family: var(--mono); }
.solution p { color: #d6d0c4; line-height: 1.7; }

.team { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 10px 16px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.chat .msgs .m b { color: var(--amber2); font-weight: 600; margin-right: 6px; }
.chat .msgs .m.sys { color: var(--muted); font-style: italic; }
.chat form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }

/* ---------- daily */
.daily-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.clue { padding: 12px 14px; border-left: 3px solid var(--amber); background: var(--panel); margin-bottom: 8px; border-radius: 0 4px 4px 0; font-size: 14px; animation: rise .3s; }
.clue .n { font: 700 11px var(--mono); color: var(--amber); margin-right: 8px; }
.clue.locked { border-left-color: var(--line2); color: var(--dim); font-style: italic; }
.attempts { display: flex; gap: 6px; } .attempts i { width: 26px; height: 8px; background: #2a2c31; border-radius: 2px; } .attempts i.used { background: var(--red2); } .attempts i.win { background: var(--green); }
.suspect-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.sp { text-align: left; border: 1px solid var(--line2); background: var(--panel); padding: 14px; border-radius: 4px; cursor: pointer; }
.sp:hover:not(:disabled) { border-color: var(--amber); }
.sp.sel { border-color: var(--red2); box-shadow: 0 0 0 1px var(--red2); }
.sp.wrong { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
.sp.right { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.sp b { display: block; font-family: var(--serif); font-size: 16px; } .sp small { color: var(--muted); } .sp p { margin: 8px 0 0; font-size: 13px; font-style: italic; color: #cfc8bb; }

/* ---------- share card */
.share-card { width: 100%; max-width: 420px; margin: 0 auto; border: 1px solid var(--line2); background: linear-gradient(180deg, #17181b, #0f1012); padding: 26px; position: relative; }
.share-card::before { content: ""; position: absolute; inset: 8px; border: 1px solid #26272b; pointer-events: none; }
.share-card .sc-brand { font: 600 11px var(--mono); letter-spacing: .32em; color: var(--amber); }
.share-card h2 { font-size: 28px; letter-spacing: .08em; margin: 14px 0 4px; }
.share-card .sc-row { display: flex; justify-content: space-between; border-bottom: 1px dashed #2c2d31; padding: 8px 0; font: 14px var(--mono); }
.share-card .sc-row b { color: var(--text); }
.share-card .sc-id { margin-top: 14px; font: 11px var(--mono); color: var(--dim); letter-spacing: .14em; }

/* ---------- store */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.product { border: 1px solid var(--line); border-radius: 6px; background: linear-gradient(180deg, var(--panel), var(--bg2)); padding: 20px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.product.feature { border-color: rgba(201,162,39,.5); box-shadow: 0 0 0 1px rgba(201,162,39,.2), 0 20px 40px rgba(0,0,0,.4); }
.product .price { font: 700 26px var(--mono); }
.product .ribbon { position: absolute; top: 14px; right: 14px; }
.product p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
.coins { font: 700 30px var(--mono); color: var(--amber2); display: flex; align-items: center; gap: 10px; }
.coins .coin { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f3d77a, #a87d1c); box-shadow: inset 0 0 0 2px #6e5112; }
.theme-swatch { height: 70px; border-radius: 4px; border: 1px solid var(--line2); display: flex; align-items: flex-end; padding: 8px; gap: 6px; }
.theme-swatch i { width: 18px; height: 18px; border-radius: 50%; }

/* ---------- achievements */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.ach { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); }
.ach .ai { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #24262b; color: var(--dim); flex: none; font-size: 18px; }
.ach.on .ai { background: radial-gradient(circle at 35% 35%, #f3d77a, #8a6514); color: #2a1d05; }
.ach b { display: block; font-size: 13px; } .ach small { color: var(--muted); font-size: 12px; }
.ach:not(.on) { opacity: .55; }

/* ---------- responsive */
@media (max-width: 1180px) {
  .ws-body { grid-template-columns: 70px 1fr; }
  .ws-side { display: none; }
  .ws-side.open { display: flex; position: fixed; right: 0; top: 56px; bottom: 0; width: min(340px, 90vw); z-index: 40; box-shadow: var(--shadow); }
}
@media (max-width: 980px) {
  .dash, .daily-hero, .g3, .g4 { grid-template-columns: 1fr 1fr; }
  .landing { grid-template-columns: 1fr; }
  .land-art { min-height: 46vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .interro { grid-template-columns: 1fr; }
  .interro .who { position: static; display: grid; grid-template-columns: 120px 1fr; }
}
@media (max-width: 760px) {
  :root { --top: 54px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 14px; }
  .topbar .title { display: none; }
  .view { padding: 18px 14px 96px; }
  h1 { font-size: 27px; }
  .dash, .daily-hero, .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .continue { grid-template-columns: 1fr; } .continue .cover { min-height: 130px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: rgba(15,16,18,.96); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); backdrop-filter: blur(10px); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font: 600 10px var(--mono); letter-spacing: .04em; padding: 4px 0; }
  .tabbar a svg { width: 21px; height: 21px; }
  .tabbar a.active { color: var(--text); } .tabbar a.active svg { color: var(--red2); }
  .tabbar a:hover { text-decoration: none; }
  .land-copy { left: 20px; right: 20px; bottom: 26px; }
  .land-panel { padding: 28px 18px 60px; }
  .features { grid-template-columns: 1fr; }
  .ws { grid-template-rows: 52px 1fr 60px; }
  .ws-top { padding: 0 10px; gap: 8px; }
  .ws-top .meters .hide-m { display: none; }
  .ws-body { grid-template-columns: 1fr; }
  .ws-rail { grid-row: 3; position: fixed; left: 0; right: 0; bottom: 0; height: 60px; flex-direction: row; border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; padding: 4px; z-index: 35; }
  .ws-rail button { flex: none; min-width: 64px; padding: 6px 4px; }
  .ws-main { padding: 12px 12px 76px; overflow-x: hidden; }
  .ws-top .case-name { max-width: 38vw; font-size: 14px; }
  .ws-top .meters { gap: 6px; }
  .ws-top .meters .icon-btn { width: 32px; height: 32px; }
  .interro .who { grid-template-columns: 96px 1fr; }
  .board-wrap { grid-template-columns: 1fr; grid-template-rows: 120px 1fr; height: calc(100vh - 52px - 60px - 24px); }
  .board-tray { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; }
  .tray-item { flex: none; margin: 0; }
  .modal { padding: 20px 16px; }
  .consent { left: 10px; right: 10px; bottom: 74px; max-width: none; }
  .toasts { bottom: 76px; right: 10px; }
  .bubble { max-width: 94%; }
}
/* =================================================================== v2 polish */
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.enter, .view > * { animation: enter .35s cubic-bezier(.2,.7,.2,1) both; }
.view > *:nth-child(2) { animation-delay: .04s; } .view > *:nth-child(3) { animation-delay: .08s; } .view > *:nth-child(4) { animation-delay: .12s; }
.ev-card, .person, .case-card { animation: cardIn .4s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 35ms); }
.show-m { display: none; }
.page-head.compact { margin-bottom: 14px; }
.page-head.compact h2 { margin-bottom: 2px; }
.banner-amber { border-color: var(--amber) !important; margin-bottom: 14px; }
.banner-closed { margin-bottom: 14px; border-color: var(--line2); }
.ws-top .ev-meter { display: inline-flex; align-items: center; gap: 5px; }
.ws-top .ev-meter svg { width: 15px; height: 15px; }
.ws-top .icon-btn { width: 34px; height: 34px; }
.side-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.side-stats b { color: var(--text); font-family: var(--mono); }
.log-item.deduction { color: var(--amber2); }
.brief-title { margin-top: 18px; font-size: clamp(34px, 6vw, 52px); }
.brief-grid { grid-template-columns: 1.5fr 1fr; align-items: start; }
.howto { font-size: 13px; padding-left: 18px; margin: 10px 0 0; line-height: 1.75; }
.howto b { color: var(--text); }

/* scene: zoom stage, flashlight, atmosphere */
.scene-wrap { cursor: default; touch-action: none; }
.scene-stage { position: absolute; inset: 0; will-change: transform; }
.scene-wrap .scene-svg { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.scene-wrap.zoomed { cursor: grab; }
.scene-wrap.zoomed .scene-svg { transform: none !important; }
.scene-tools { position: absolute; right: 10px; top: 10px; z-index: 6; display: flex; flex-direction: column; gap: 6px; }
.scene-tools .icon-btn { width: 34px; height: 34px; background: rgba(12,13,15,.75); backdrop-filter: blur(4px); font: 600 16px var(--mono); color: var(--text); }
.scene-caption { position: absolute; left: 12px; bottom: 10px; z-index: 6; display: flex; gap: 10px; align-items: baseline; background: rgba(8,8,10,.7); padding: 6px 10px; border-radius: 3px; font-size: 13px; pointer-events: none; }
.scene-caption span { font: 11px var(--mono); color: var(--muted); }
.torch-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(circle 150px at var(--tx, 50%) var(--ty, 50%), rgba(0,0,0,0) 0, rgba(0,0,0,0) 45%, rgba(0,0,0,.82) 100%); }
.scene-wrap.torch .torch-layer { opacity: 1; }
.motes circle { animation: drift linear infinite; }
@keyframes drift { 0% { transform: translate(0,0); opacity: 0; } 15% { opacity: .9; } 85% { opacity: .7; } 100% { transform: translate(40px,-70px); opacity: 0; } }
.fog rect { animation: fog 26s ease-in-out infinite alternate; }
@keyframes fog { to { transform: translateX(-160px); } }
.hotspot { transition: background .2s, box-shadow .2s; }
.hotspot:hover { background: rgba(229,189,74,.10); box-shadow: inset 0 0 0 1px rgba(229,189,74,.45), 0 0 24px rgba(229,189,74,.15); }
.loc-thumb { transition: transform .2s, border-color .2s; } .loc-thumb:hover { transform: translateY(-2px); }
.note-card { margin-top: 10px; border-left: 3px solid var(--amber); animation: enter .3s both; }
.note-card p { margin: 6px 0 0; }
.tip { font-size: 12px; }

/* evidence inspection */
.inspect-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: start; }
.inspect { position: relative; aspect-ratio: 800 / 460; overflow: hidden; border: 1px solid var(--line2); border-radius: 3px; background: #000; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.inspect-stage { position: absolute; inset: 0; }
.inspect-stage .ev-art { width: 100%; height: 100%; display: block; }
.inspect.zoomed { cursor: grab; }
.spot { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; border: 2px solid var(--amber2); background: rgba(12,13,15,.55); color: var(--amber2); font: 700 12px var(--mono); cursor: zoom-in; display: grid; place-items: center; animation: pulse 1.6s infinite; z-index: 2; padding: 0; }
.spot.seen { animation: none; border-color: #8fd1a7; color: #8fd1a7; }
.spot.pop { animation: pop .4s; }
@keyframes pop { 50% { transform: scale(1.5); } }
.observations { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.obs { font-size: 13px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); display: flex; gap: 10px; }
.obs b { font-family: var(--mono); color: var(--amber2); }
.obs.pending { color: var(--dim); font-style: italic; }
.flash-amber { animation: flashamber .9s; } @keyframes flashamber { 0% { background: rgba(201,162,39,.25); } }
.doc-tools { display: flex; justify-content: flex-end; gap: 4px; margin-bottom: 6px; }
.lab-offer { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.discovery { display: flex; gap: 16px; align-items: center; margin: 18px 0; animation: flipin .5s cubic-bezier(.2,1.4,.4,1) both; }
.disc-icon { width: 64px; height: 64px; flex: none; color: var(--amber2); border: 1px solid rgba(201,162,39,.4); border-radius: 6px; display: grid; place-items: center; background: rgba(201,162,39,.08); box-shadow: 0 0 30px rgba(201,162,39,.15); }
.disc-icon .ev-icon { width: 40px; height: 40px; }
@keyframes flipin { from { transform: rotateX(70deg); opacity: 0; } }
.evidence-modal .doc { max-height: 52vh; overflow: auto; }

/* people & interrogation */
.meter-row { display: flex; justify-content: space-between; font: 600 10px var(--mono); letter-spacing: .12em; color: var(--muted); margin: 10px 0 4px; }
.meter-row .green { color: #8fd1a7; } .meter-row .amber { color: var(--amber2); } .meter-row .red { color: #ef8a82; }
.progress.cred > i { background: linear-gradient(90deg, #8a1f18, var(--amber), #4f9a6b); }
.clamp3 { font-size: 12px; margin: 8px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.person .ph svg { transition: transform .5s; } .person:hover .ph svg { transform: scale(1.04); }
.interro .who .info h3 { color: var(--text); margin-bottom: 2px; }
.trait { margin: 0 0 6px; font-size: 13px; color: #cfc8bb; font-style: italic; }
.claims { display: flex; flex-direction: column; gap: 8px; }
.claim { padding: 8px 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg2); }
.claim p { margin: 6px 0 2px; font: 14px/1.4 var(--serif); color: var(--text); }
.claim small { color: var(--muted); font-size: 11px; }
.claim.disproved { border-color: rgba(214,55,45,.45); } .claim.disproved p { text-decoration: line-through; text-decoration-color: rgba(214,55,45,.7); }
.claim.verified { border-color: rgba(79,154,107,.4); }
.demeanor { font: italic 15px/1.5 var(--serif); color: #cfc8bb; padding: 10px 14px; border-left: 3px solid var(--line2); margin-bottom: 12px; background: linear-gradient(90deg, rgba(255,255,255,.03), transparent); animation: enter .4s both; }
.demeanor.mood-pressed { border-color: var(--amber); } .demeanor.mood-broken { border-color: var(--red2); }
.interro-main { min-width: 0; }
.qbtn { transition: border-color .15s, transform .15s, background .15s; } .qbtn:hover { transform: translateX(3px); }
.qbtn.approach.press { border-color: rgba(214,55,45,.4); } .qbtn.approach.soft { border-color: rgba(108,143,179,.5); }
.qbtn.approach .k { color: var(--amber2); }
.qbtn.closed { opacity: .4; cursor: default; } .qbtn.closed:hover { transform: none; border-color: var(--line2); }
.branch-hint { font-size: 12px; font-style: italic; }
.bubble { animation: enter .3s both; }
.bubble .note { transition: opacity .4s; }
.portrait-svg { display: block; }
.lab-right { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

/* timeline */
.tl-card { grid-template-columns: 24px 30px 1fr auto; cursor: default; transition: transform .15s, box-shadow .15s; touch-action: auto; }
.tl-card.pool { grid-template-columns: 30px 1fr auto; }
.tl-card .grip { cursor: grab; color: var(--dim); font: 700 14px var(--mono); touch-action: none; user-select: none; padding: 6px 0; text-align: center; }
.tl-card.dragging { opacity: .95; box-shadow: 0 14px 30px rgba(0,0,0,.6); z-index: 5; position: relative; border-color: var(--amber); }
.tl-card .t { min-width: 0; }
.tl-btns { display: flex; gap: 2px; }

/* board v2 */
.board-wrap { grid-template-columns: 230px 1fr; height: calc(100vh - 56px - 40px); }
.board-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: 8px; }
.board { flex: 1; min-height: 0; overscroll-behavior: contain; }
.board-sizer { position: relative; width: 1800px; height: 1100px; }
.board-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.board-tools { position: sticky; top: 10px; left: 10px; float: right; margin: 10px; z-index: 6; display: flex; gap: 6px; align-items: center; }
.board-tools .icon-btn { width: 32px; height: 32px; font: 600 15px var(--mono); color: var(--text); background: rgba(12,13,15,.8); }
.tray-h { margin: 6px 0 8px; }
.tray-item { cursor: grab; touch-action: none; user-select: none; transition: border-color .15s; }
.tray-item:hover { border-color: var(--amber); }
.tray-face { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; flex: none; }
.drag-ghost { position: fixed; z-index: 300; pointer-events: none; opacity: .9; box-shadow: 0 10px 30px rgba(0,0,0,.6); transform: rotate(-3deg); width: 200px; }
.bnode { transition: box-shadow .2s; } .bnode:hover { box-shadow: 0 14px 28px rgba(0,0,0,.65); }
.bnode::before { display: none; }
.bnode .pin { position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff6a5e, #8a1a14); box-shadow: 0 2px 4px rgba(0,0,0,.5); cursor: crosshair; z-index: 2; touch-action: none; }
.bnode .pin:hover { transform: scale(1.25); }
.bnode .sub { color: #6b5a44; }
.board svg.threads { overflow: visible; }
.board svg.threads path { fill: none; stroke: #c62f26; stroke-width: 2.6; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.board svg.threads path.gold { stroke: #e5bd4a; stroke-width: 3.2; filter: drop-shadow(0 0 6px rgba(229,189,74,.6)); }
.board svg.threads path.temp { stroke-dasharray: 6 6; stroke: #ff8a7a; }
.link-label { position: absolute; z-index: 3; padding: 2px 8px; font: 600 11px var(--mono); background: #2a1513; color: #f0d0c8; border: 1px solid #5a221d; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.link-label.confirmed { background: #2e2408; color: var(--amber2); border-color: rgba(229,189,74,.6); box-shadow: 0 0 12px rgba(229,189,74,.3); }
.board-empty { position: absolute; left: 40px; top: 80px; color: #8a7a68; font: 16px/1.6 var(--serif); max-width: 420px; }
.deductions-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* notebook & theories */
.theories { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; }
.theory-grid { display: grid; grid-template-columns: 70px 1fr; gap: 4px 10px; font-size: 13px; margin-top: 10px; }
.theory-grid span { color: var(--muted); font: 600 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding-top: 3px; }
.support { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.ev-pick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 200px; overflow: auto; }
.ev-pick label { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; border: 1px solid var(--line2); padding: 5px 9px; border-radius: 99px; cursor: pointer; }
.ev-pick label.on { border-color: var(--amber); color: var(--amber2); }
.ev-pick input { display: none; }
.stmt { margin-bottom: 10px; } .stmt .claim { margin-top: 8px; }
.mini-face { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: inline-block; flex: none; }
.deduction { margin-bottom: 10px; border-left: 3px solid var(--amber); } .deduction p { margin: 6px 0 0; }

/* accusation & result */
.pick span small { display: block; font: 600 10px var(--mono); letter-spacing: .1em; margin-top: 2px; }
.pick span small.green { color: #8fd1a7; } .pick span small.amber { color: var(--amber2); } .pick span small.red { color: #ef8a82; }
.verdict-stats { display: flex; justify-content: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.conclusion { padding: 12px 0; border-bottom: 1px solid var(--line); }
.conclusion:last-of-type { border-bottom: 0; }
.conclusion p { margin: 6px 0 0; font-size: 14px; color: #d6d0c4; line-height: 1.6; }
.conclusion.ok b { color: #8fd1a7; } .conclusion.bad b { color: #ef8a82; }
.stat-text { font-size: 15px !important; font-family: var(--sans) !important; margin-top: 6px; }
.sol-tl { margin: 10px 0 0; padding-left: 20px; line-height: 1.8; }
.team-tab { display: flex !important; position: static !important; border: 1px solid var(--line); border-radius: 4px; min-height: 70vh; width: auto !important; box-shadow: none !important; }

/* case intro */
.intro-modal { width: min(520px, 100%); background: linear-gradient(180deg, rgba(26,20,18,.97), rgba(14,15,17,.98)); border-color: rgba(179,38,30,.35); }
.intro-title { font-size: clamp(30px, 5vw, 42px); margin: 16px 0 10px; }
.intro-lead { font: 17px/1.6 var(--serif); color: #e2dbcf; margin: 0; }
.intro-steps { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 14px; }
.intro-steps li::before { content: "▸ "; color: var(--red2); }
.intro-steps b { color: var(--text); }

/* main menu */
.menu-screen { position: fixed; inset: 0; z-index: 40; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); background: #07080a; }
.menu-art { position: relative; overflow: hidden; }
.menu-art .scene-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: scale(1.06); animation: kenburns 40s ease-in-out infinite alternate; }
@keyframes kenburns { to { transform: scale(1.16) translate(-2%, -1%); } }
.menu-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,8,10,.1), rgba(7,8,10,.95) 92%), linear-gradient(0deg, rgba(7,8,10,.9), transparent 45%); }
.menu-title { position: absolute; left: 6%; bottom: 10%; z-index: 2; }
.menu-title h1 { font-size: clamp(48px, 8vw, 104px); letter-spacing: .08em; line-height: .95; margin: 14px 0 6px; text-shadow: 0 10px 40px rgba(0,0,0,.8); }
.menu-title .kicker { font-size: 13px; }
.menu-panel { padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; gap: 4px; background: linear-gradient(180deg, rgba(17,18,21,.96), rgba(10,11,13,.98)); border-left: 1px solid var(--line); position: relative; z-index: 2; }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border: 1px solid transparent; border-radius: 4px; color: var(--text); font: 600 15px var(--sans); letter-spacing: .14em; text-transform: uppercase; background: none; cursor: pointer; text-align: left; animation: enter .45s both; }
.menu-item small { display: block; font: 400 12px var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted); margin-top: 3px; }
.menu-item:hover, .menu-item:focus-visible { background: rgba(179,38,30,.12); border-color: rgba(179,38,30,.4); text-decoration: none; }
.menu-item:hover .arrow { transform: translateX(4px); color: var(--red2); }
.menu-item .arrow { transition: transform .2s; color: var(--dim); }
.menu-item.primary { background: var(--red); border-color: var(--red); }
.menu-item.primary small { color: #f3d6d2; } .menu-item.primary .arrow { color: #fff; }
.menu-item.primary:hover { background: var(--red2); }
.menu-who { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }

@media (max-width: 980px) {
  .inspect-grid, .brief-grid { grid-template-columns: 1fr; }
  .menu-screen { grid-template-columns: 1fr; grid-template-rows: 42vh 1fr; }
  .menu-panel { padding: 22px 18px 30px; border-left: 0; overflow-y: auto; }
  .menu-title { bottom: 8%; }
}
@media (max-width: 760px) {
  .show-m { display: inline; } .hide-m { display: none !important; }
  .ws-rail button span:not(.n) { font-size: 9px; }
  .ws-top .case-name { max-width: none; }
  .ws-top .meters { gap: 6px; }
  .scene-tools { top: 6px; right: 6px; } .scene-tools .icon-btn { width: 32px; height: 32px; }
  .scene-caption { font-size: 12px; }
  .board-wrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: calc(100vh - 52px - 60px - 24px); }
  .board-tray { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 8px; max-height: none; }
  .board-tray .tray-h { display: none; }
  .tray-item { flex: none; margin: 0; max-width: 170px; }
  .tray-item span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bnode { width: 136px; font-size: 11px; }
  .tl-card { grid-template-columns: 22px 26px 1fr; }
  .tl-card .tl-btns { grid-column: 1 / -1; justify-content: flex-end; }
  .tl-card.pool { grid-template-columns: 26px 1fr auto; }
  .interro .who { grid-template-columns: 1fr; }
  .interro .who .ph { max-height: 210px; overflow: hidden; }
  .interro .who .ph svg { margin-top: -10%; }
  .transcript { max-height: none; min-height: 160px; }
  .verdict-stats .stat { flex: 1 1 40%; }
  .modal.xwide, .modal.wide { width: 100%; }
  .modal-bg { padding: 8px; align-items: end; }
  .modal { max-height: calc(100vh - 16px); border-radius: 10px 10px 4px 4px; }
  .theories { grid-template-columns: 1fr; }
  .seg.scroll-x { max-width: 100%; overflow-x: auto; }
  .page-head { gap: 10px; }
  .menu-item { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
