/* Fonts are served from this site: Inter (variable) and DM Serif Display, both under the SIL Open Font License (assets/fonts). */
@font-face { font-family:"Inter"; src:url("../assets/fonts/inter-latin-wght.woff2") format("woff2"); font-weight:100 900; font-display:swap; }
@font-face { font-family:"DM Serif Display"; src:url("../assets/fonts/dm-serif-display-latin-400.woff2") format("woff2"); font-weight:400; font-display:swap; }
:root { --bg:#07090B; --panel:#10161A; --line:#22302A; --green:#5BBF4B; --cream:#F4F1EA; --dim:#9AA5A0; --amber:#E9B44C; --red:#E2603F; }
* { box-sizing: border-box; }
html, body { margin:0; height:100%; background:var(--bg); color:var(--cream); font:16px/1.5 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; overflow:hidden; }
#scene { position:fixed; inset:0; width:100%; height:100%; display:block; touch-action:none; }
.hidden { display:none !important; }
button { font:inherit; cursor:pointer; border-radius:10px; border:1px solid #33403A; background:#0d1316; color:var(--cream); padding:8px 14px; }
button:hover { border-color:var(--green); }
button.primary { background:var(--green); color:#07090B; border-color:var(--green); font-weight:700; }
button.ghost { background:transparent; }
input { font:inherit; padding:10px 12px; border-radius:10px; border:1px solid #33403A; background:#0b1012; color:var(--cream); width:100%; }

#hud { position:fixed; top:12px; left:12px; right:12px; display:flex; justify-content:space-between; pointer-events:none; z-index:5; }
#hud > div { pointer-events:auto; }
.hud-left { background:rgba(10,14,16,.82); border:1px solid var(--line); border-radius:14px; padding:10px 14px; min-width:230px; }
.brand { font-weight:800; letter-spacing:.06em; font-size:13px; color:var(--dim); } .brand b { color:var(--green); }
.lvl { font-weight:700; margin-top:2px; }
.bar { height:6px; background:#1b2420; border-radius:6px; margin:6px 0; overflow:hidden; } .bar i { display:block; height:100%; width:0; background:var(--green); transition:width .4s; }
.mini { font-size:12.5px; color:var(--dim); } #letters { color:var(--amber); font-family:ui-monospace, Menlo, monospace; letter-spacing:.1em; }
.hud-right { display:flex; gap:8px; align-items:flex-start; }
.hud-right button { background:rgba(10,14,16,.85); }

#prompt { position:fixed; left:50%; bottom:110px; transform:translateX(-50%); background:rgba(10,14,16,.9); border:1px solid var(--green); padding:8px 16px; border-radius:999px; z-index:5; font-weight:600; }
#actBtn { position:fixed; right:22px; bottom:40px; width:84px; height:84px; border-radius:50%; background:var(--green); color:#07090B; font-weight:800; border:0; z-index:6; }
#joy { position:fixed; left:24px; bottom:30px; width:130px; height:130px; border-radius:50%; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.15); z-index:6; touch-action:none; }
#knob { position:absolute; left:40px; top:40px; width:50px; height:50px; border-radius:50%; background:rgba(91,191,75,.7); }
#toast { position:fixed; top:84px; left:50%; transform:translateX(-50%); z-index:20; display:flex; flex-direction:column; gap:8px; align-items:center; pointer-events:none; }
#toast div { background:#0f1a12; border:1px solid var(--green); padding:8px 16px; border-radius:12px; font-weight:600; animation:pop .25s ease-out; }
@keyframes pop { from { transform:translateY(-8px); opacity:0 } to { transform:none; opacity:1 } }
#minimap { position:fixed; right:12px; top:70px; z-index:5; background:rgba(10,14,16,.85); border:1px solid var(--line); border-radius:12px; padding:6px; }

#intro, #modal { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(4,6,8,.72); z-index:10; padding:16px; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:18px; padding:22px 24px; max-width:640px; width:100%; max-height:88vh; overflow:auto; box-shadow:0 20px 60px rgba(0,0,0,.5); }
.intro-card h1 { font-family:'DM Serif Display', Georgia, serif; font-weight:400; font-size:46px; margin:4px 0 6px; }
.presenter { display:flex; align-items:center; gap:12px; margin-bottom:4px; }
.presenter div { display:flex; flex-direction:column; gap:3px; } .presenter span { color:var(--dim); font-size:12px; letter-spacing:.14em; text-transform:uppercase; font-weight:700; }
.brand span { color:var(--dim); font-weight:600; text-transform:lowercase; } .brand img { vertical-align:-1px; margin-left:3px; }
.credit { display:flex; align-items:center; gap:10px; } .credit img { flex:none; }
.kicker { color:var(--green); font-weight:700; font-size:13px; letter-spacing:.08em; text-transform:uppercase; }
.controls { display:grid; grid-template-columns:1fr 1fr; gap:6px 14px; font-size:14px; color:var(--dim); margin:12px 0 14px; }
.controls b { color:var(--cream); }
#startBtn { width:100%; margin-top:10px; padding:12px; }
.tiny { font-size:12px; color:var(--dim); margin-top:10px; text-align:center; }

.mhead { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.mhead h2 { margin:2px 0 8px; font-family:'DM Serif Display', Georgia, serif; font-weight:400; font-size:30px; }
.tag { display:inline-block; font-size:11.5px; font-weight:800; letter-spacing:.08em; padding:3px 8px; border-radius:6px; background:#1b2420; color:var(--green); }
.close { background:transparent; border:0; font-size:24px; color:var(--dim); padding:0 4px; }
.lesson { background:#0b1012; border:1px solid var(--line); border-radius:14px; padding:16px; margin:10px 0; }
.lesson h3 { margin:0 0 6px; color:var(--amber); }
.steps { display:flex; gap:6px; margin:6px 0 2px; } .steps i { flex:1; height:4px; border-radius:4px; background:#1b2420; } .steps i.on { background:var(--green); }
.opts { display:grid; gap:8px; margin-top:10px; }
.opts button { text-align:left; padding:10px 12px; }
.opts button.right { border-color:var(--green); background:#13241a; } .opts button.wrong { border-color:var(--red); background:#2a1612; }
.why { margin-top:10px; color:var(--dim); font-size:14.5px; }
.row { display:flex; gap:8px; justify-content:flex-end; margin-top:14px; flex-wrap:wrap; }
.guide { display:flex; gap:12px; align-items:center; background:#0b1012; border:1px dashed #33403A; border-radius:14px; padding:10px 12px; margin:8px 0; font-size:14.5px; }
.guide .av { width:42px; height:42px; border-radius:50%; flex:none; }
.guide a { color:var(--green); }
.list { display:grid; gap:8px; margin:8px 0; } .list div { background:#0b1012; border:1px solid var(--line); border-radius:12px; padding:10px 12px; } .list b { color:var(--cream); } .list span { color:var(--dim); font-size:14px; display:block; }
.tabs { display:flex; gap:6px; margin:6px 0 10px; flex-wrap:wrap; } .tabs button.on { border-color:var(--green); color:var(--green); }
table.price { width:100%; border-collapse:collapse; font-size:14.5px; margin:8px 0; } table.price th, table.price td { border-bottom:1px solid var(--line); padding:8px 6px; text-align:left; vertical-align:top; } table.price th { color:var(--dim); font-size:12px; letter-spacing:.06em; }
.ctf { background:#0b1012; border:1px solid var(--line); border-radius:14px; padding:12px 14px; margin:10px 0; }
.ctf.solved { border-color:var(--green); }
.ctf pre { white-space:pre-wrap; font:14px/1.5 ui-monospace, Menlo, monospace; color:var(--cream); margin:8px 0; }
.ctf .meta { color:var(--dim); font-size:13px; }
.ctf .ans { display:flex; gap:8px; margin-top:8px; } .ctf .ans input { flex:1; }
.stamps { display:grid; grid-template-columns:repeat(5, 1fr); gap:8px; margin:10px 0; }
.stamp { aspect-ratio:1; border-radius:50%; border:2px dashed #33403A; display:flex; align-items:center; justify-content:center; text-align:center; font-size:11px; font-weight:800; color:var(--dim); padding:6px; }
.stamp.on { border:3px solid var(--c); color:var(--c); transform:rotate(-8deg); background:rgba(255,255,255,.03); }
a { color:var(--green); }
@media (max-width: 640px) { .hud-left { min-width:0; } .brand { display:none; } .card { padding:18px; } .intro-card h1 { font-size:36px; } .controls { grid-template-columns:1fr; } #minimap { display:none !important; } }

/* ---------- multiplayer: chat, people, theatre ---------- */
#chat { position:fixed; left:12px; bottom:12px; width:340px; height:330px; display:flex; flex-direction:column; background:rgba(10,14,16,.9); border:1px solid var(--line); border-radius:14px; z-index:7; }
.chat-head { display:flex; gap:4px; padding:6px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.chat-head button { padding:4px 9px; font-size:13px; border-radius:8px; }
.chat-head button.on { border-color:var(--green); color:var(--green); }
#dmBadge { display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--red); margin-left:3px; }
#chatBody { flex:1; overflow-y:auto; padding:6px 10px; font-size:14px; }
#chatBody .msg { padding:3px 0; word-wrap:break-word; position:relative; }
#chatBody .msg b { color:var(--green); cursor:pointer; } #chatBody .msg.me b { color:var(--amber); }
#chatBody .msg .act { display:none; position:absolute; right:0; top:2px; } #chatBody .msg:hover .act { display:inline; }
#chatBody .act button { padding:0 6px; font-size:12px; border-radius:6px; margin-left:3px; }
#chatBody .sys { color:var(--dim); font-style:italic; font-size:13px; }
#chatBody .person { display:flex; justify-content:space-between; align-items:center; padding:5px 0; border-bottom:1px solid #18211d; }
#chatBody .person button { padding:2px 8px; font-size:12.5px; margin-left:4px; }
#chatForm { display:flex; gap:6px; padding:6px; border-top:1px solid var(--line); }
#chatForm input { padding:7px 10px; } #chatForm button { padding:6px 12px; }
#chatShow { position:fixed; left:12px; bottom:12px; z-index:7; }
label.chk { display:flex; gap:8px; align-items:center; font-size:14px; color:var(--dim); margin-top:10px; } label.chk input { width:auto; }
.rules { text-align:left; }
#theatre { position:fixed; top:70px; left:50%; transform:translateX(-50%); width:min(760px, 94vw); background:rgba(10,14,16,.95); border:1px solid var(--amber); border-radius:14px; z-index:8; padding:10px 12px 12px; }
.th-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.vid { position:relative; padding-top:56.25%; } .vid iframe { position:absolute; inset:0; width:100%; height:100%; border:0; border-radius:8px; }
.live-row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:8px; }
.live-row input { width:170px; }
.dot { display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--red); margin-right:6px; animation:blink 1.2s infinite; }
@keyframes blink { 50% { opacity:.3 } }
@media (max-width: 640px) { #chat { width:calc(100vw - 24px); height:42vh; bottom:180px; } #theatre { top:60px; } }

/* ---------- visual polish ---------- */
.hud-left, .hud-right button, #minimap, #chat, #prompt { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hud-left { background:linear-gradient(135deg, rgba(16,24,28,.82), rgba(10,14,16,.7)); box-shadow:0 8px 30px rgba(0,0,0,.35); }
.bar i { background:linear-gradient(90deg, #5BBF4B, #E9B44C); }
#prompt { box-shadow:0 0 24px rgba(91,191,75,.35); }
#btnMusic.off { opacity:.5; text-decoration:line-through; }
#intro { background:radial-gradient(ellipse at 50% 30%, rgba(20,40,30,.55), rgba(4,6,8,.88)); }
.intro-card { border-color:#2c4a36; box-shadow:0 0 0 1px rgba(91,191,75,.08), 0 30px 80px rgba(0,0,0,.6); }
.card { background:linear-gradient(180deg, #121a1f, #0d1316); }
.av-pick { display:flex; align-items:center; gap:8px; margin:4px 0 12px; flex-wrap:wrap; }
.av-pick span { color:var(--dim); font-size:14px; margin-right:4px; }
.av-pick button { display:inline-flex; align-items:center; gap:8px; padding:5px 16px 5px 6px; color:var(--dim); border-radius:999px; }
.av-pick img { width:44px; height:44px; border-radius:50%; display:block; }
.av-pick button.on { border-color:var(--green); color:var(--cream); background:#13241a; }
#emoteBtns { position:fixed; right:18px; bottom:140px; display:flex; flex-direction:column; gap:10px; z-index:6; }
#emoteBtns button { width:72px; padding:10px 0; border-radius:14px; background:rgba(10,14,16,.82); font-weight:700; backdrop-filter:blur(6px); }
@media (max-width: 640px) { #chat { width:calc(100vw - 108px); } #emoteBtns button { width:64px; } }
.lesson .kind { font-size:11.5px; font-weight:800; letter-spacing:.09em; margin-bottom:4px; }
.lesson h3 { line-height:1.25; }
.lesson.story { border-color:#5a4a22; background:linear-gradient(180deg, #14120b, #0b1012); }
.lesson .src { margin-top:10px; font-size:13px; color:var(--dim); }
.card h3.sub { font-size:13px; letter-spacing:.08em; text-transform:uppercase; color:var(--dim); margin:14px 0 4px; }
.meta-inline { display:inline !important; font-size:12.5px !important; color:var(--amber) !important; margin-left:4px; }
.list div.featured { border-color:#5a4a22; }
/* phones: no minimap, so no Map button; compact buttons so the progress panel keeps its width */
@media (max-width: 640px) {
  #btnMap { display:none; }
  .hud-right { gap:6px; } .hud-right button { padding:6px 9px; font-size:13px; }
  .hud-left { min-width:150px; padding:8px 10px; }
}
/* desktop: the welcome card sits on the left so the night scene shows on the right */
@media (min-width: 980px) {
  #intro { justify-content:flex-start; padding-left:6vw; background:linear-gradient(90deg, rgba(4,6,8,.88) 0%, rgba(4,6,8,.55) 42%, rgba(4,6,8,0) 75%); }
  #intro .intro-card { max-width:560px; }
}
/* partner labels (plan 7.1): sponsored material is always labelled */
.spons { display:inline-block; font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:#07090B; background:#E9B44C; border-radius:4px; padding:1px 6px; vertical-align:1px; }
.presented { margin:0 0 10px; font-size:14px; color:var(--dim); } .presented a { color:var(--cream); font-weight:700; }
.partner-cards { display:grid; gap:8px; margin:10px 0; } .partner-cards div { background:rgba(255,255,255,.04); border-radius:8px; padding:10px 12px; } .partner-cards b { display:block; margin-bottom:2px; }
.desk { display:grid; grid-template-columns: 1fr 1fr; gap:10px; align-items:end; margin:10px 0; } .desk label { font-size:13px; color:var(--dim); display:flex; flex-direction:column; gap:4px; }
.desk input[type=text] { width:100%; } .desk input[type=color] { width:100%; height:40px; border:0; background:none; padding:0; }
.desk-previews { display:flex; gap:10px; justify-content:center; margin:8px 0; } .desk-previews canvas { border-radius:6px; max-width:48%; height:auto; background:#0b1114; }
.events .when { color:#E9B44C; font-weight:700; font-size:13px; } .events .row { justify-content:flex-start; margin-top:6px; } .events button { padding:6px 10px; font-size:13px; }
@media (max-width: 520px) { .desk { grid-template-columns: 1fr; } }
/* lite mode (plan 8.7): a plain page, scrollable, no 3D */
body.lite { overflow:auto; height:auto; } html:has(body.lite) { overflow:auto; height:auto; }
body.lite #hud, body.lite #minimap, body.lite #joy, body.lite #emoteBtns, body.lite #prompt, body.lite #actBtn, body.lite #chat { display:none !important; }
#lite { max-width:1100px; margin:0 auto; padding:12px 16px 40px; }
.litehead { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:8px 0 12px; border-bottom:1px solid var(--line); }
.litehead .t { font-weight:800; letter-spacing:.06em; color:var(--dim); } .litehead .t b { color:var(--green); } .litehead em { color:var(--amber); font-style:normal; font-size:12px; margin-left:4px; }
.litehead .prog { color:var(--dim); font-size:13px; flex:1 1 220px; } .litehead nav { display:flex; gap:8px; } .litehead nav a { text-decoration:none; }
#lite .intro { color:#cfd8d4; max-width:760px; }
.litegrid { display:grid; grid-template-columns:minmax(260px, 420px) 1fr; gap:20px; align-items:start; }
.litemap { width:100%; height:auto; background:#0b1114; border:1px solid var(--line); border-radius:12px; }
.litemap .area { fill:#141c22; stroke:#2a3a34; stroke-width:.3; } .litemap .mh { fill:#2a1418; } .litemap .out { fill:#10161c; }
.litemap .carpet { fill:#13302a; } .litemap .gate { fill:#5BBF4B; } .litemap .lbl { fill:#9AA5A0; font:700 2.4px Inter, sans-serif; text-anchor:middle; letter-spacing:.2px; } .litemap .small { font-size:2px; }
.litemap circle { stroke:#07090B; stroke-width:.5; cursor:pointer; } .litemap a:focus circle, .litemap a:hover circle { stroke:#F4F1EA; stroke-width:.8; }
.litelist h2 { font-family:"DM Serif Display", Georgia, serif; font-weight:400; font-size:22px; margin:6px 0 6px; } .litelist ul { list-style:none; padding:0; margin:0 0 12px; display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:6px; }
.litelist button { width:100%; text-align:left; display:flex; align-items:center; gap:10px; } .litelist i { width:12px; height:12px; border-radius:50%; flex:0 0 12px; }
.litelist .done { margin-left:auto; color:var(--green); font-size:12px; font-weight:700; }
.linkish { background:none; border:0; padding:0; color:var(--cream); text-align:left; cursor:pointer; } .linkish:hover b { color:var(--green); }
@media (max-width:760px) { .litegrid { grid-template-columns:1fr; } }
/* the quest line under the HUD card (plan 6.1) */
.quest { margin-top:6px; font-size:12.5px; color:var(--cream); background:rgba(91,191,75,.12); border:1px solid rgba(91,191,75,.35); border-radius:8px; padding:4px 8px; max-width:330px; }
.quest b { color:var(--green); letter-spacing:.06em; font-size:11.5px; }
/* photo mode (plan 6.6): the HUD hides, a frame shows what the saved photo will look like */
body.photo-mode #hud, body.photo-mode #minimap, body.photo-mode #prompt, body.photo-mode #actBtn, body.photo-mode #joy, body.photo-mode #emoteBtns, body.photo-mode #chat { display:none !important; }
#photoUI { position:fixed; inset:0; z-index:6; pointer-events:none; }
#photoUI .pframe { position:absolute; inset:0; border:6px solid #F4F1EA; border-bottom:0; }
#photoUI .pfoot { position:absolute; left:0; right:0; bottom:0; height:7.5%; min-height:34px; background:rgba(7,9,11,.88); border-top:6px solid #F4F1EA; display:flex; align-items:center; justify-content:space-between; padding:0 14px; gap:10px; color:#cfd8d4; font-size:13px; }
#photoUI .pt { font-weight:900; letter-spacing:.04em; color:var(--cream); } #photoUI .pt b { color:var(--green); }
#photoUI .pbar { position:absolute; top:14px; left:50%; transform:translateX(-50%); display:flex; gap:8px; align-items:center; pointer-events:auto; background:rgba(7,9,11,.75); padding:6px 10px; border-radius:12px; }
#photoUI .pbar .tiny { color:var(--dim); font-size:12px; }
@media (max-width:600px) { #photoUI .pbar .tiny { display:none; } }
/* labs (plan 6.2) */
.labintro { background:rgba(233,180,76,.07); border:1px solid rgba(233,180,76,.3); border-radius:10px; padding:12px 14px; } .labintro h3 { margin:4px 0 6px; } .ring { color:var(--amber); font-weight:800; }
.aisum { padding-left:22px; margin:0 0 10px; } .aisum li { margin:5px 0; } .aisum button { width:100%; text-align:left; line-height:1.4; }
.aisum button.on { border-color:var(--red); background:rgba(226,96,63,.14); } .aisum button.bad { border-color:var(--red); } .aisum button.good { opacity:.75; }
.aisum button.bad.on { background:rgba(91,191,75,.16); border-color:var(--green); } .aisum button.good.on { background:rgba(226,96,63,.18); }
.regcard { background:#0d1418; border:1px solid var(--line); border-radius:10px; padding:10px 14px; display:grid; gap:4px; } .regcard h3 { margin:2px 0; }
.reg { color:var(--green); font-weight:600; } .regnav { margin:0 0 6px; } .meta-inline { color:var(--dim); font-size:12.5px; }
.lab .opts { display:grid; gap:6px; } .lab .opts button { text-align:left; }
.seamap { width:100%; height:auto; border-radius:10px; border:1px solid var(--line); display:block; margin:4px 0 8px; }
.lab .term { background:#06090b; border:1px solid var(--line); border-radius:10px; padding:10px 12px; font:13px/1.5 ui-monospace, Consolas, monospace; color:#9fd89a; max-height:220px; overflow:auto; white-space:pre-wrap; word-break:break-all; margin:6px 0; }
.lab table.board { width:100%; border-collapse:collapse; font-size:13px; margin:6px 0; } .lab table.board th { text-align:left; color:var(--dim); font-weight:600; padding:4px 6px; border-bottom:1px solid var(--line); } .lab table.board td { padding:5px 6px; border-bottom:1px solid rgba(255,255,255,0.05); } .lab table.board tr.on td { background:rgba(233,180,76,0.10); } .lab table.board code { font-size:12px; }
@media (max-width:600px) { .lab table.board { font-size:11px; } .lab table.board th, .lab table.board td { padding:3px 3px; } }
.lab .row3 { grid-template-columns:repeat(3, 1fr); } .lab .row3 i { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:4px; }
.ais { max-height:140px; overflow:auto; font:12px/1.5 ui-monospace, Menlo, monospace; color:#cfd8d4; margin-top:4px; } .ais .gap { color:var(--amber); font-weight:700; }
.labq { display:grid; gap:8px; margin:10px 0; } .labq label { display:flex; gap:8px; align-items:center; justify-content:space-between; flex-wrap:wrap; font-size:14px; }
.labq select, .labq input { min-width:150px; }
@media (max-width:600px) { .lab .row3 { grid-template-columns:1fr; } }
.lab select { background:#0d1418; color:var(--cream); border:1px solid #2a3a34; border-radius:8px; padding:7px 10px; font:inherit; font-size:14px; }
/* the Geolocation lab and GeoDaily */
.geophoto { width:100%; border-radius:10px; border:1px solid var(--line); display:block; margin:6px 0; }
.labhud { position:fixed; top:12px; left:50%; transform:translateX(-50%); z-index:7; display:flex; gap:10px; align-items:center; background:rgba(7,9,11,.88); border:1px solid var(--line); border-radius:12px; padding:8px; max-width:min(560px, 94vw); }
.labhud img { width:150px; border-radius:8px; } .labhud b { display:block; } .labhud span { color:var(--dim); font-size:13px; } .labhud .row { margin-top:6px; justify-content:flex-start; } .labhud button { padding:6px 10px; font-size:13px; }
.geooverlay { position:fixed; inset:0; width:100%; height:100%; object-fit:cover; opacity:.5; z-index:6; pointer-events:none; }
.dial { display:block; margin:8px auto; max-width:100%; } .clockrow { display:flex; gap:10px; align-items:center; justify-content:center; flex-wrap:wrap; } .clockrow input { width:min(360px, 80vw); }
.share { background:#0d1418; border:1px solid var(--line); border-radius:8px; padding:10px; font:14px/1.5 ui-monospace, Menlo, monospace; white-space:pre-wrap; }
@media (max-width:600px) { .labhud img { width:96px; } }
/* passport v2 */
.pp-top { margin-bottom:6px; } .stamp.ring { box-shadow:0 0 0 3px #E9B44C; }
.pp-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:8px; margin:10px 0; }
.pp-grid div { background:rgba(255,255,255,.04); border:1px solid var(--line); border-radius:10px; padding:8px 10px; display:flex; flex-direction:column; gap:2px; }
.pp-grid b { font-size:18px; } .pp-grid span { color:var(--dim); font-size:12.5px; } .pp-grid .medal.on b { color:var(--amber); }
.pp-notes { margin:6px 0; } .pp-notes div { margin:6px 0; font-size:14px; } .pp-notes a { color:var(--green); font-size:12.5px; }
/* Case File 001 (plan 6.4) */
.casepanel ol.stages { margin:8px 0 4px; padding-left:22px; display:grid; gap:2px; } .casepanel ol.stages li.done button { color:#6fdc5b; }
.casebrief { border-left:3px solid #E2603F; }
img.frontpage { width:100%; max-width:420px; display:block; margin:8px auto; border-radius:6px; box-shadow:0 6px 24px rgba(0,0,0,.5); }
.lab table.board td:not(:last-child) { white-space:nowrap; }
@media (max-width:600px) { .lab table.board { display:block; overflow-x:auto; max-width:100%; } }
.lab table.board td:last-child { min-width:150px; }
/* lab choices: whatever the player has picked is clearly marked (owner request 2026-11-20) */
.lab button.on { border-color:var(--green); background:#13241a; color:var(--cream); box-shadow:inset 0 0 0 1px var(--green); font-weight:700; }
.lab .opts button.on::before, .lab .row3 button.on::before { content:"✓ "; color:var(--green); }
.lab .posts { display:grid; gap:10px; margin:8px 0; }
.lab .post { border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:#0d1418; transition:border-color .15s, background .15s; }
.lab .post.first { border-color:var(--green); background:#10201a; box-shadow:inset 0 0 0 1px var(--green); }
.lab .post.coord { border-color:var(--amber); }
.lab .post.first.coord { box-shadow:inset 0 0 0 1px var(--green), 0 0 0 1px var(--amber); }
.lab .post .tagpick { display:inline-block; margin-left:8px; font-size:12px; font-weight:800; padding:1px 8px; border-radius:6px; }
.lab .post .tagpick.f { background:var(--green); color:#07090B; } .lab .post .tagpick.c { background:var(--amber); color:#07090B; }
.lab .post .pv { margin:6px 0; padding:14px 10px; border-radius:8px; background:#1a2229; text-align:center; font-weight:800; letter-spacing:.04em; color:#cfd8d4; }
.lab .post .pv.mir span { display:inline-block; transform:scaleX(-1); }
.lab .labwarn { margin:8px 0 0; padding:8px 12px; border-radius:8px; border:1px solid var(--amber); background:rgba(233,180,76,.10); color:var(--amber); font-weight:600; font-size:14px; }
.lab .labwarn.flash { animation:labwarn .5s; } @keyframes labwarn { 0% { transform:translateX(-4px); } 50% { transform:translateX(4px); } 100% { transform:none; } }
.casepanel ol.stages li.now { color:var(--amber); font-weight:700; } .casepanel ol.stages li.later { color:var(--dim); } .casepanel ol.stages li.done { color:#6fdc5b; }
.lab .fakeq { display:grid; gap:2px; margin:4px 0; }
/* "YOUR TASK": numbered steps at the top of every lab and case stage (owner request 2026-11-20) */
.task { background:#0d1418; border:1px solid var(--line); border-left:3px solid var(--green); border-radius:10px; padding:10px 14px; margin:0 0 10px; text-align:left; }
.task .goal { font-weight:700; margin:2px 0 4px; } .task ol { margin:4px 0 2px; padding-left:22px; display:grid; gap:3px; font-size:14.5px; } .task .meta-inline { display:block; margin-top:6px; }
.task.casebrief { border-left-color:#E2603F; }
.lab .fakeq label.chk { justify-content:flex-start; }

/* the player's rank (owner request 2026-11-20): prominent in the HUD and passport, a banner on promotion */
.lvl .rk { font-size:10px; letter-spacing:.12em; color:var(--dim); font-weight:800; } #lvlName { font-size:17px; color:var(--amber); font-weight:800; } #xpText { color:var(--dim); font-weight:600; font-size:12.5px; margin-left:4px; }
.nextlvl { font-size:11.5px; color:var(--dim); margin:-3px 0 4px; }
.promo { position:fixed; left:50%; top:22%; transform:translateX(-50%); z-index:60; text-align:center; background:rgba(10,14,16,.92); border:1px solid var(--amber); border-radius:14px; padding:14px 26px; box-shadow:0 8px 40px rgba(0,0,0,.6); animation:promo .5s ease-out; pointer-events:none; }
.promo span { display:block; font-size:12px; letter-spacing:.2em; color:var(--amber); font-weight:800; } .promo b { display:block; font-family:'DM Serif Display', Georgia, serif; font-weight:400; font-size:38px; color:var(--cream); margin:2px 0; }
.promo i { display:block; font-style:normal; color:var(--cream); } .promo em { display:block; font-style:normal; color:var(--dim); font-size:13px; margin-top:6px; }
.promo.out { opacity:0; transition:opacity .6s; } @keyframes promo { from { transform:translate(-50%, 12px) scale(.94); opacity:0; } to { transform:translateX(-50%); opacity:1; } }
.rankcard { display:grid; grid-template-columns:auto 1fr; gap:4px 16px; align-items:center; background:#0d1418; border:1px solid var(--amber); border-radius:12px; padding:12px 16px; margin:4px 0 12px; }
.rankcard .ins { grid-row:span 3; width:64px; height:64px; border-radius:50%; border:3px solid var(--amber); display:grid; place-items:center; font:800 13px Inter, sans-serif; color:var(--amber); text-align:center; line-height:1.1; }
.rankcard .ins b { display:block; font-size:24px; } .rankcard h3 { margin:0; font-family:'DM Serif Display', Georgia, serif; font-weight:400; font-size:28px; } .rankcard .line { color:var(--dim); }
.rankcard .bar { grid-column:1 / -1; height:8px; } .rankcard .nx { grid-column:1 / -1; font-size:14px; }
.ladder { display:flex; flex-wrap:wrap; gap:4px; grid-column:1 / -1; margin-top:4px; } .ladder span { font-size:11.5px; padding:2px 8px; border-radius:6px; border:1px solid var(--line); color:var(--dim); }
.ladder span.got { color:#6fdc5b; border-color:#2f5a2a; } .ladder span.now { color:#07090B; background:var(--amber); border-color:var(--amber); font-weight:800; }
.earn { grid-column:1 / -1; font-size:12.5px; color:var(--dim); }
.rankcard .ins svg { width:46px; height:46px; display:block; } .promo .pic { color:var(--amber); display:grid; place-items:center; margin:6px auto 0; width:58px; height:58px; border:2px solid var(--amber); border-radius:50%; } .promo .pic svg { width:34px; height:34px; }
.ladder span { display:inline-flex; align-items:center; gap:5px; padding:3px 9px 3px 5px; } .ladder span svg { width:20px; height:20px; flex:none; } .ladder span:not(.got):not(.now) svg { opacity:.55; }
.ladder span.now svg { color:#07090B; }
/* zoom buttons (owner request 2026-11-20): right edge, halfway down; hold to keep zooming */
.zoombox { position:fixed; right:12px; top:58%; transform:translateY(-50%); display:flex; flex-direction:column; gap:6px; pointer-events:auto; z-index:5; }
.zoombox button { width:42px; height:42px; border-radius:12px; font-size:24px; font-weight:700; line-height:1; padding:0; background:rgba(10,14,16,.85); touch-action:none; user-select:none; }
@media (max-width:600px) { .zoombox { top:auto; bottom:150px; transform:none; } .zoombox button { width:46px; height:46px; } }
/* keyboard focus is always visible (Phase 7 access) */
:focus { outline:none; } :focus-visible { outline:3px solid var(--green); outline-offset:2px; border-radius:6px; }
/* announcer captions (Phase 7 access) */
#caption { position:fixed; left:50%; bottom:22px; transform:translate(-50%, 10px); max-width:min(640px, 92vw); padding:8px 16px; border-radius:10px; background:rgba(7,9,11,.88); color:var(--cream); font-size:16px; text-align:center; opacity:0; transition:opacity .3s, transform .3s; pointer-events:none; z-index:40; }
#caption.on { opacity:1; transform:translate(-50%, 0); } @media (max-width:600px) { #caption { bottom:120px; font-size:15px; } }
/* reduce motion (setting or the device's own preference): no panel or banner animations */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation:none !important; transition:none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation:none !important; transition:none !important; } }

/* talks: reactions and questions in the theatre panel (plan 7.3) */
.talk .react button { font-size:22px; line-height:1; padding:6px 12px; }
.talk .qlist { max-height:240px; overflow:auto; margin-top:8px; text-align:left; }
.talk .q { display:flex; gap:10px; align-items:flex-start; padding:7px 0; border-top:1px solid #1b2420; }
.talk .q > span:not(.act) { flex:1; min-width:0; overflow-wrap:anywhere; }
.talk .q [data-vote] { min-width:58px; white-space:nowrap; }
.talk .q [data-vote].on { background:#5bbf4b; color:#07090b; border-color:#5bbf4b; }
.talk .q.pinned { background:#14201a; border-left:3px solid #e9b44c; padding-left:8px; }
.talk .q i { color:#e9b44c; font-style:normal; font-size:12px; font-weight:700; }
.talk .q .act { display:flex; gap:4px; }
/* The Main Hall's panel docks at an edge unless it is showing a film: bottom right on a wide screen, under the top bar
   on a phone (the joystick and chat own the bottom there). It must never cover the player's character. */
#theatre.dock { top:auto; left:auto; transform:none; right:64px; bottom:12px; width:min(390px, calc(100vw - 24px)); max-height:min(56vh, 520px); overflow:auto; padding:8px 10px 10px; }
#theatre.dock #thBody > div:first-child b { font-size:16px !important; }
#theatre.dock .tiny { text-align:left; margin-top:6px; }
#theatre.dock .live-row input { width:auto; flex:1; min-width:120px; }
.talk .react button[data-react] { font-size:20px; padding:5px 10px; }
.talk .react button[data-qtoggle] { font-size:13px; padding:7px 10px; }
.talk .qlist { max-height:200px; }
@media (max-width: 640px) { #theatre.dock { top:auto; bottom:176px; right:12px; left:12px; width:auto; max-height:44vh; } #theatre.dock .tiny { display:none; } }
#theatre .hint { font-size:11.5px; color:var(--dim); margin-top:8px; }
/* a screening laid over the big screen (js/ui/theatre.js fits it every frame): above the 3D picture, below every panel */
#film { position:fixed; left:0; top:0; width:1080px; height:540px; transform-origin:0 0; z-index:2; background:#000; }
#film iframe { width:960px; height:540px; margin-left:60px; border:0; display:block; }
#film .shield { position:absolute; inset:0; }   /* viewers can't click the player: the moderator runs the film */
.spk { margin-top:8px; } .spk summary { cursor:pointer; color:var(--dim); font-size:12.5px; }
#theatre.dock .live-row select { max-width:100%; }
#theatre.dock .live-row a { font-size:12.5px; }
/* a slide shown larger: click anywhere to close */
#lightbox { position:fixed; inset:0; z-index:40; background:rgba(4,6,8,.92); display:flex; align-items:center; justify-content:center; cursor:zoom-out; }
#lightbox img { max-width:94vw; max-height:90vh; border:1px solid #e9b44c; border-radius:6px; }
/* the docked panel stays low: smaller buttons, so a moderator's extra rows don't climb over the big screen */
#theatre.dock button { font-size:13px; padding:6px 10px; }
#theatre.dock .live-row { margin-top:6px; gap:6px; }
#theatre.dock details summary { font-size:12.5px; }

