/* ADVANCE — NEATLABS™ */
:root {
  --bg: #0b0a09; --ink: #f5f1ea; --mut: #b0a89c; --dim: #6f685e; --line: rgba(245,241,234,.1); --line2: rgba(245,241,234,.2);
  --panel: rgba(14,13,11,.82); --panel2: rgba(22,20,17,.95);
  --brand: #f47d3d; --brand2: #ff9a62; --gold: #ffc15e; --gold2: #ffd896; --ok: #5be3a1; --bad: #ff4d5e; --warn: #ffc15e; --cyan: #5cc8f0;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
button, select { font: inherit; color: inherit; }
a { color: var(--brand2); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.btn { border: 1px solid var(--line2); background: rgba(20,18,15,.74); border-radius: 10px; padding: 11px 18px; cursor: pointer; font-weight: 600; font-size: 15px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #1a0d05; }
.btn.primary:hover { background: var(--brand2); }
.btn.big { font-size: 18px; padding: 14px 28px; }
.btn.sm { font-size: 13px; padding: 7px 13px; border-radius: 8px; }
.btn.ghost { background: rgba(10,9,8,.5); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.pill { border: 1px solid var(--line2); background: rgba(10,9,8,.55); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--mut); }
.pill:hover { color: var(--ink); border-color: var(--ink); }
.pill.sm { padding: 6px 11px; font-size: 12px; }
.pill.round { width: 32px; height: 32px; padding: 0; }

/* ---------- title ---------- */
.screen { position: fixed; inset: 0; z-index: 20; }
.title { display: flex; flex-direction: column; pointer-events: none; background: radial-gradient(1100px 820px at 6% 55%, rgba(11,10,9,.9), rgba(11,10,9,.4) 55%, transparent 76%); }
.title > * { pointer-events: auto; }
.t-top { display: flex; justify-content: space-between; align-items: center; padding: 22px 32px; }
.neat { font-weight: 800; font-size: 18px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.neat span { color: var(--brand); }
.t-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 6vw 60px; max-width: 800px; }
.t-kick { margin: 0 0 6px; font: 600 14px var(--mono); color: var(--gold); letter-spacing: .03em; }
.t-word { margin: 0; font-weight: 900; font-size: clamp(60px, 11.5vw, 156px); line-height: .86; letter-spacing: -.01em; display: flex; }
.t-word span { display: inline-block; animation: rise 1.4s cubic-bezier(.2,.8,.2,1) both; }
.t-word span:nth-child(2) { animation-delay: .05s; } .t-word span:nth-child(3) { animation-delay: .1s; color: var(--gold); text-shadow: 0 0 50px rgba(255,193,94,.45); }
.t-word span:nth-child(4) { animation-delay: .15s; } .t-word span:nth-child(5) { animation-delay: .2s; } .t-word span:nth-child(6) { animation-delay: .25s; } .t-word span:nth-child(7) { animation-delay: .3s; }
@keyframes rise { 0% { opacity: 0; transform: translateY(26px); filter: blur(10px); } 100% { opacity: 1; transform: none; filter: none; } }
.t-line { margin: 16px 0 6px; font-size: clamp(22px, 3vw, 34px); font-weight: 700; letter-spacing: -.01em; }
.t-sub { margin: 0 0 18px; color: var(--mut); font-size: 17px; max-width: 560px; }
.t-today { display: flex; gap: 14px; margin: 0 0 20px; max-width: 600px; flex-wrap: wrap; }
.t-today .card { flex: 1 1 240px; border: 1px solid var(--line2); border-radius: 12px; padding: 11px 14px; background: rgba(10,9,8,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.t-today .card span { display: block; font-size: 12px; color: var(--mut); }
.t-today .card b { display: block; font-size: 16px; }
.t-today .card em { font-style: normal; font-size: 13px; color: var(--mut); }
.t-btns { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.t-stats { margin: 16px 0 0; color: var(--mut); font-size: 14px; } .t-stats b { color: var(--ink); }
.t-next { margin: 4px 0 0; color: var(--dim); font: 13px var(--mono); }
.t-challenge { border: 1px solid var(--gold); color: var(--gold2); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-weight: 600; max-width: 560px; background: rgba(10,9,8,.65); }
.t-done { border: 1px solid var(--line2); border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; max-width: 560px; background: rgba(10,9,8,.65); }
.t-done p { margin: 0 0 8px; } .t-done .row { display: flex; gap: 10px; flex-wrap: wrap; }
.t-fine { position: absolute; left: 32px; right: 32px; bottom: 14px; margin: 0; font-size: 11.5px; color: var(--dim); max-width: 900px; }

/* ---------- HUD ---------- */
.hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.hud > * { pointer-events: auto; }
.h-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 16px; padding: 10px 16px 14px; background: linear-gradient(180deg, rgba(11,10,9,.92), rgba(11,10,9,0)); }
.logo { font-weight: 900; letter-spacing: .02em; font-size: 22px; color: var(--ink); text-decoration: none; }
.logo span { color: var(--gold); }
.h-mission { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.h-mission b { font-size: 14px; white-space: nowrap; } .h-mission span { font-size: 12px; color: var(--mut); white-space: nowrap; }
.steps { list-style: none; margin: 0 0 0 10px; padding: 0; display: flex; gap: 4px; }
.steps li { font-size: 12px; font-weight: 600; color: var(--dim); padding: 5px 10px; border-radius: 999px; border: 1px solid transparent; }
.steps li.on { color: var(--bg); background: var(--gold); }
.steps li.done { color: var(--mut); border-color: var(--line2); }
.h-clock { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; }
.h-clock b { font: 600 28px var(--mono); } .h-clock span { font-size: 12px; color: var(--mut); }
.h-time { position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; background: rgba(255,255,255,.06); }
.h-time i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--brand)); transition: width .6s ease; }
.h-clock.tick b { animation: tick .5s ease; }
@keyframes tick { 50% { color: var(--gold); } }

.panel { position: absolute; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.p-left { left: 14px; top: 78px; width: 330px; bottom: 82px; display: flex; flex-direction: column; overflow: hidden; }
.p-left h3 { margin: 0; padding: 12px 14px 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; border-bottom: 1px solid var(--line); }
.drawer { background: none; border: 0; padding: 0; font-weight: 700; font-size: 14px; cursor: default; display: inline-flex; gap: 8px; align-items: center; }
.drawer em { font: 600 11px var(--mono); font-style: normal; background: rgba(255,255,255,.1); border-radius: 999px; padding: 2px 7px; color: var(--mut); }
.f-sub { font-size: 11.5px; color: var(--dim); font-weight: 500; }
.feed { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.post { display: grid; grid-template-columns: 30px 1fr; gap: 9px; padding: 9px 8px; border-radius: 10px; }
.post + .post { border-top: 1px solid var(--line); }
.post.new { animation: newP 1.6s ease; }
@keyframes newP { 0% { background: rgba(255,193,94,.18); } 100% { background: transparent; } }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #111; }
.post .hd { display: flex; gap: 6px; align-items: baseline; font-size: 12.5px; }
.post .hd b { font-weight: 700; } .post .hd time { margin-left: auto; font: 500 11px var(--mono); color: var(--dim); }
.post p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.38; }
.post .tag { margin-top: 6px; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line2); background: rgba(255,255,255,.04); border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; color: var(--gold2); }
.post .tag:hover { border-color: var(--gold); }
.post .tag.done { color: var(--mut); }
.post .ph { margin-top: 6px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); display: block; width: 100%; max-width: 240px; }
.feed-empty { padding: 16px 12px; color: var(--dim); font-size: 13px; }

.p-right { right: 14px; top: 78px; width: 350px; max-height: calc(100% - 160px); overflow-y: auto; scrollbar-width: thin; }
.ins { padding: 14px 16px 16px; position: relative; }
.ins-k { margin: 0; font: 600 11.5px var(--mono); color: var(--mut); }
.ins h4 { margin: 2px 0 6px; font-size: 20px; letter-spacing: -.01em; }
.ins .meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--mut); margin: 0 0 12px; }
.ins .meta b { color: var(--ink); font-weight: 600; }
.finds { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.finds li { font-size: 13.5px; padding: 9px 11px 9px 30px; border-radius: 10px; position: relative; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.finds li::before { content: ''; position: absolute; left: 11px; top: 13px; width: 9px; height: 9px; border-radius: 50%; background: var(--mut); }
.finds li.ok::before { background: var(--ok); } .finds li.look::before { background: var(--cyan); } .finds li.warn::before { background: var(--warn); } .finds li.threat::before { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.finds li.threat { border-color: rgba(255,77,94,.45); background: rgba(255,77,94,.08); }
.ins .why { margin: 0 0 12px; color: var(--mut); font-size: 13.5px; }
.ins .unk { margin: 0 0 12px; color: var(--dim); font-size: 13px; font-style: italic; }
.ins-x { position: absolute; right: 8px; top: 8px; background: none; border: 0; color: var(--mut); font-size: 20px; cursor: pointer; display: none; }
.ins-empty { padding: 16px; color: var(--mut); font-size: 13.5px; }
.ins-empty b { color: var(--ink); display: block; font-size: 15px; margin: 0 0 4px; }
.ins-empty ul { margin: 10px 0 0; padding-left: 18px; } .ins-empty li { margin: 0 0 4px; }
.reported { border: 1px solid rgba(91,227,161,.5); background: rgba(91,227,161,.08); color: #c8f6df; border-radius: 10px; padding: 8px 11px; font-size: 13px; margin: 0 0 12px; }

/* plan board */
.plan { padding: 14px 16px 16px; }
.plan h4 { margin: 0 0 2px; font-size: 19px; } .plan > p { margin: 0 0 12px; color: var(--mut); font-size: 13px; }
.pq { margin: 0 0 14px; }
.pq > span { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; color: var(--mut); margin: 0 0 6px; }
.pq > span em { font-style: normal; font-weight: 500; color: var(--dim); }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.opts.three { grid-template-columns: 1fr; }
.opt { text-align: left; border: 1px solid var(--line2); background: rgba(255,255,255,.03); border-radius: 9px; padding: 7px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; position: relative; }
.opt b { font-size: 13px; } .opt small { font-size: 11.5px; color: var(--mut); line-height: 1.3; }
.opt:hover { border-color: var(--gold); }
.opt.on { border-color: var(--gold); background: rgba(255,193,94,.12); box-shadow: inset 0 0 0 1px var(--gold); }
.opt.flag small { color: #ffb4bc; }
.opt.flag::after { content: '!'; position: absolute; right: 8px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bad); color: #fff; font: 800 11px/16px var(--sans); text-align: center; }
.agent { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: center; margin: 0 0 6px; font-size: 13px; }
.agent b { display: flex; align-items: center; gap: 6px; } .agent b i { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.agent.pat b i { background: #6f9cff; }
.agent select { width: 100%; border: 1px solid var(--line2); background: rgba(10,9,8,.8); border-radius: 8px; padding: 7px 8px; font-size: 13px; }
.go-row { position: sticky; bottom: 0; margin: 6px -16px -16px; padding: 12px 16px; background: linear-gradient(0deg, var(--panel2) 70%, rgba(22,20,17,0)); }
.go-row .btn { width: 100%; }
.go-row p { margin: 0 0 8px; font-size: 12px; color: var(--dim); text-align: center; }

.h-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 14px; align-items: flex-end; padding: 12px 16px 14px; pointer-events: none; }
.h-bottom > * { pointer-events: auto; }
.dossier { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid rgba(255,193,94,.45); background: rgba(30,22,10,.7); border-radius: 12px; padding: 8px 14px; cursor: pointer; text-align: left; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dossier:hover { border-color: var(--gold); }
.dossier span { font-size: 11px; color: var(--gold); } .dossier b { font-size: 15px; } .dossier em { font-style: normal; font-size: 12px; color: var(--mut); }
.legend { margin-left: auto; display: flex; gap: 14px; font-size: 12px; color: var(--mut); background: rgba(10,9,8,.55); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.pin { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.pin.un { border: 1.5px solid #fff; } .pin.ok { background: var(--ok); } .pin.warn { background: var(--warn); } .pin.bad { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.dos-card { position: absolute; left: 16px; bottom: 84px; width: 370px; background: var(--panel2); border: 1px solid rgba(255,193,94,.4); border-radius: 14px; padding: 14px 16px; z-index: 3; }

.pcard { border: 1px solid rgba(255,193,94,.4); background: linear-gradient(135deg, rgba(255,193,94,.1), rgba(255,193,94,.02)); border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; display: grid; grid-template-columns: 64px 1fr; gap: 4px 14px; }
.pcard .face { grid-row: span 3; width: 64px; height: 64px; border-radius: 12px; background: linear-gradient(160deg, #3a3124, #15120e); display: grid; place-items: center; font-weight: 900; font-size: 24px; color: var(--gold); border: 1px solid rgba(255,193,94,.35); }
.pcard h3 { margin: 0; font-size: 20px; } .pcard .role { margin: 0; color: var(--mut); font-size: 13px; }
.pcard dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 13.5px; grid-column: 2; }
.pcard dt { color: var(--gold); font-weight: 600; } .pcard dd { margin: 0; }

.toasts { position: absolute; left: 50%; top: 78px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; z-index: 4; width: min(560px, 90vw); }
.toast { background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 14px; font-size: 14px; animation: tin .35s ease both; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.gold { border-color: rgba(255,193,94,.6); color: var(--gold2); } .toast.bad { border-color: rgba(255,77,94,.6); color: #ffc3c9; } .toast.ok { border-color: rgba(91,227,161,.6); color: #c9f7df; }
.toast.out { animation: tout .4s ease both; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes tout { to { opacity: 0; transform: translateY(-8px); } }

#labels { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; font-size: 11.5px; font-weight: 600; color: #fff; white-space: nowrap; text-shadow: 0 1px 3px #000, 0 0 8px rgba(0,0,0,.8); padding: 2px 7px; border-radius: 6px; display: flex; align-items: center; gap: 5px; pointer-events: auto; cursor: pointer; }
.lbl i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #fff; flex: none; }
.lbl.ok i { background: var(--ok); border-color: var(--ok); } .lbl.warn i { background: var(--warn); border-color: var(--warn); } .lbl.bad i { background: var(--bad); border-color: var(--bad); box-shadow: 0 0 8px var(--bad); }
.lbl.sel { background: rgba(255,193,94,.92); color: #1d1300; text-shadow: none; }
.lbl.sel i { border-color: #1d1300; }
.lbl.occ { opacity: .28; }
.lbl.small { font-size: 10.5px; font-weight: 500; opacity: .85; }
.lbl.reveal { background: rgba(60,8,14,.85); border: 1px solid rgba(255,77,94,.7); color: #ffd0d4; font-size: 11.5px; text-shadow: none; }
.lbl.reveal.ok { background: rgba(8,40,26,.85); border-color: rgba(91,227,161,.6); color: #c9f7df; }
.lbl.near { background: rgba(50,36,6,.85); border: 1px solid rgba(255,193,94,.7); color: var(--gold2); text-shadow: none; }
.hidesmall .lbl.small:not(.sel) { display: none !important; }
.nolabels .lbl { display: none !important; }

/* showtime */
.show { position: fixed; inset: 0; z-index: 12; pointer-events: none; }
.sh-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: linear-gradient(180deg, rgba(0,0,0,.65), transparent); pointer-events: auto; }
.sh-clock { font: 600 30px var(--mono); }
.sh-phase { font-size: 15px; color: var(--gold2); font-weight: 600; }
.sh-top .pill { margin-left: auto; }
.show::before, .show::after { content: ''; position: absolute; left: 0; right: 0; height: 6vh; background: #000; }
.show::before { top: 0; } .show::after { bottom: 0; }
.captions { position: absolute; left: 50%; bottom: 9vh; transform: translateX(-50%); width: min(680px, 92vw); display: flex; flex-direction: column; gap: 8px; }
.cap { background: rgba(10,9,8,.86); border: 1px solid var(--line2); border-left: 4px solid var(--gold); border-radius: 10px; padding: 11px 16px; animation: tin .4s ease both; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cap.ok { border-left-color: var(--ok); } .cap.bad { border-left-color: var(--bad); } .cap.near { border-left-color: var(--warn); }
.cap b { display: block; font-size: 16px; } .cap time { font: 600 12px var(--mono); color: var(--mut); margin-right: 8px; }
.cap p { margin: 3px 0 0; font-size: 14px; color: #ddd6cb; }
.cap.out { animation: tout .5s ease both; }

/* verdict */
.verdict { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; pointer-events: none; padding: 18px; background: radial-gradient(760px 440px at 50% 50%, rgba(8,7,6,.78), rgba(8,7,6,0) 75%); }
.v-box { pointer-events: auto; text-align: center; max-width: 720px; animation: vin .9s cubic-bezier(.2,.9,.2,1) both; }
.v-kick { margin: 0; font: 600 14px var(--mono); color: var(--ok); }
.v-box h2 { margin: 4px 0 0; font-size: clamp(46px, 8.6vw, 112px); font-weight: 900; line-height: .92; letter-spacing: -.01em; color: var(--ok); text-shadow: 0 0 60px rgba(91,227,161,.45), 0 4px 0 #000; }
.verdict.close .v-box h2 { color: var(--gold); text-shadow: 0 0 60px rgba(255,193,94,.5), 0 4px 0 #000; } .verdict.close .v-kick { color: var(--gold); }
.verdict.incident .v-box h2 { color: var(--bad); text-shadow: 0 0 60px rgba(255,77,94,.55), 0 4px 0 #000; } .verdict.incident .v-kick { color: #ff9aa4; }
.v-how { margin: 14px auto 20px; font-size: 18px; font-weight: 600; max-width: 600px; text-shadow: 0 2px 10px #000; }
@keyframes vin { 0% { opacity: 0; transform: scale(1.35); filter: blur(12px); } 100% { opacity: 1; transform: none; filter: none; } }

/* debrief */
.debrief { position: fixed; right: 0; top: 0; bottom: 0; width: min(580px, 100%); z-index: 25; background: linear-gradient(90deg, rgba(11,10,9,0), rgba(11,10,9,.92) 7%, rgba(11,10,9,.97)); overflow-y: auto; scrollbar-width: thin; }
.d-inner { padding: 26px 28px 40px 46px; }
.d-top { display: flex; justify-content: space-between; align-items: center; margin: 0 0 16px; }
.d-k { margin: 0; font: 600 13px var(--mono); color: var(--gold); }
.d-h { margin: 2px 0 6px; font-size: 34px; line-height: 1.05; letter-spacing: -.02em; }
.d-h.safe { color: var(--ok); } .d-h.close { color: var(--gold); } .d-h.incident { color: #ff7a86; }
.d-sub { margin: 0 0 16px; font-size: 15px; color: var(--mut); }
.score { display: flex; align-items: center; gap: 18px; border: 1px solid var(--line2); border-radius: 14px; padding: 14px 18px; margin: 0 0 16px; background: rgba(255,255,255,.02); }
.grade { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; font-size: 36px; font-weight: 900; background: var(--ok); color: #062317; flex: none; }
.grade.B, .grade.C { background: var(--gold); color: #241600; } .grade.D, .grade.F { background: var(--bad); color: #fff; }
.score .pts b { display: block; font: 700 30px var(--mono); line-height: 1; } .score .pts span { font-size: 12.5px; color: var(--mut); }
.score .brk { margin-left: auto; font: 500 11.5px var(--mono); color: var(--dim); text-align: right; line-height: 1.5; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 18px; }
.stats div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stats b { display: block; font: 600 20px var(--mono); } .stats span { font-size: 12px; color: var(--mut); }
.d-sec { margin: 0 0 20px; }
.d-sec h4 { margin: 0 0 10px; font-size: 15px; }
.tcard { border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; margin: 0 0 8px; display: grid; grid-template-columns: 22px 1fr; gap: 2px 10px; }
.tcard .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--ok); color: #062317; grid-row: span 4; }
.tcard.bad .ic { background: var(--bad); color: #fff; } .tcard.near .ic { background: var(--warn); color: #241600; }
.tcard.bad { border-color: rgba(255,77,94,.4); } .tcard.near { border-color: rgba(255,193,94,.4); }
.tcard b { font-size: 14.5px; } .tcard .tk { font: 600 11px var(--mono); color: var(--dim); } .tcard p { margin: 2px 0 0; font-size: 13.5px; color: var(--mut); }
.tcard .tell { margin-top: 6px; font-size: 12.5px; color: var(--gold2); }
.tcard .tell.miss { color: #ffb4bc; }
.lesson { border-left: 3px solid var(--gold); padding: 2px 0 2px 12px; margin: 0 0 10px; font-size: 14px; color: var(--mut); }
.lesson b { color: var(--ink); }
.sharebox { border: 1px solid var(--line2); border-radius: 14px; padding: 14px; margin: 0 0 16px; background: rgba(255,255,255,.02); }
.sharebox pre { margin: 0 0 12px; font: 500 13.5px/1.5 var(--mono); white-space: pre-wrap; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.d-cta { border: 1px solid rgba(244,125,61,.4); border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; background: linear-gradient(135deg, rgba(244,125,61,.1), transparent); }
.d-cta p { margin: 0 0 10px; font-size: 14px; color: var(--mut); } .d-cta b { color: var(--ink); }
.d-foot { color: var(--dim); font-size: 12px; margin: 10px 0 0; }

#flash { position: fixed; inset: 0; z-index: 28; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, rgba(255,77,94,.5), rgba(255,77,94,0) 62%); }
#flash.go { animation: fl 1.1s ease-out; }
#flash.white { background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.55), rgba(255,255,255,0) 60%); }
@keyframes fl { 0% { opacity: 1; } 100% { opacity: 0; } }
#fade { position: fixed; inset: 0; z-index: 50; pointer-events: none; background: #000; opacity: 0; transition: opacity .5s; }
#fade.on { opacity: 1; }

/* modals (shared) */
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(5,4,3,.62); padding: 18px; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.m-box { background: var(--panel2); border: 1px solid var(--line2); border-radius: 18px; padding: 26px 28px; max-width: 520px; width: 100%; max-height: calc(100% - 20px); overflow-y: auto; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.m-box.wide { max-width: 760px; }
.m-kick { margin: 0 0 6px; font: 600 13px var(--mono); color: var(--gold); }
.m-box h2 { margin: 0 0 14px; font-size: 26px; letter-spacing: -.015em; line-height: 1.15; }
.steps3 { list-style: none; counter-reset: s; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.steps3 li { counter-increment: s; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 13.5px; }
.steps3 li::before { content: counter(s); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #241600; font-weight: 800; font-size: 12px; margin: 0 0 6px; }
.steps3 b { display: block; margin: 0 0 3px; } .steps3 span { color: var(--mut); }
.m-btns { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 14px; }
.help-grid > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.help-grid b { font-size: 14.5px; } .help-grid p { margin: 6px 0 0; font-size: 13.5px; color: var(--mut); }
.help-fine { color: var(--dim); font-size: 13px; margin: 0 0 14px; }

@media (max-width: 1100px) { .legend { display: none; } .steps { display: none; } }
@media (max-width: 900px) { .p-left { width: 290px; } .p-right { width: 310px; } .h-mission span { display: none; } }
@media (max-width: 760px) {
  body { font-size: 14px; }
  .t-top { padding: 14px 18px; }
  .t-main { padding: 0 18px 100px; justify-content: flex-end; }
  .t-sub { font-size: 15px; }
  .t-today { gap: 8px; } .t-today .card { padding: 8px 12px; }
  .t-fine { left: 18px; right: 18px; font-size: 10.5px; bottom: 10px; }
  .title { background: linear-gradient(0deg, rgba(11,10,9,.97) 40%, rgba(11,10,9,.4) 78%, transparent); }
  .h-top { gap: 10px; padding: 8px 10px 12px; }
  .logo { font-size: 18px; }
  .h-mission { flex: 1; } .h-mission b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
  .h-clock b { font-size: 20px; } .h-clock span { font-size: 10.5px; }
  #hMute { display: none; }
  #finishBtn { padding: 7px 10px; font-size: 12px; white-space: nowrap; }
  .p-left { left: 8px; right: 8px; width: auto; top: auto; bottom: 66px; max-height: 40vh; }
  .p-left.closed { max-height: 44px; } .p-left.closed .feed { display: none; }
  .p-left .f-sub { display: none; }
  .drawer { cursor: pointer; } .drawer::after { content: '▾'; font-size: 12px; color: var(--mut); } .p-left.closed .drawer::after { content: '▸'; }
  .p-right { left: 8px; right: 8px; width: auto; top: auto; bottom: 66px; max-height: 62vh; z-index: 6; background: var(--panel2); box-shadow: 0 -10px 40px rgba(0,0,0,.5); }
  .p-right.empty { display: none; }
  .ins-x { display: block; }
  .h-bottom { padding: 8px; }
  .dossier { padding: 6px 10px; } .dossier b { font-size: 13px; } .dossier em { display: none; }
  .dos-card { left: 8px; right: 8px; width: auto; bottom: 66px; z-index: 7; }
  .toasts { top: 72px; }
  .m-box { padding: 20px 18px; } .m-box h2 { font-size: 21px; }
  .pcard { grid-template-columns: 48px 1fr; } .pcard .face { width: 48px; height: 48px; font-size: 18px; } .pcard dl { grid-column: 1 / -1; }
  .steps3 { grid-template-columns: 1fr; gap: 8px; }
  .help-grid { grid-template-columns: 1fr; }
  .captions { bottom: 8vh; } .cap b { font-size: 14.5px; } .cap p { font-size: 13px; }
  .sh-clock { font-size: 22px; } .sh-phase { font-size: 13px; }
  .debrief { width: 100%; top: 36vh; background: linear-gradient(180deg, rgba(11,10,9,0), rgba(11,10,9,.95) 40px, rgba(11,10,9,.98)); }
  .d-inner { padding: 40px 18px 40px; }
  .d-h { font-size: 27px; }
  .lbl { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .t-word span, .v-box, .toast, .post.new, .cap { animation: none !important; } }

