:root { color-scheme: dark; --bg: #0c0d10; --card: #16181d; --card2: #1d2027; --line: #2a2e37; --ink: #f3f4f6; --muted: #a1a6b3; --accent: #fbbf24; --hot: #f97316; --bad: #ef4444; --ok: #4ade80;
  --c-red: #ef4444; --c-blue: #3b82f6; --c-yellow: #facc15; --c-white: #f1f5f9; --c-black: #1f2229; --c-green: #22c55e; --c-purple: #a855f7; --c-orange: #fb923c; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; background: radial-gradient(1200px 500px at 50% -200px, #2a1a0b 0%, transparent 70%), var(--bg); }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); font-weight: 500; }
.sm { font-size: 14px; }
.top { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 8px; background: linear-gradient(var(--bg) 70%, transparent); }
html.inroom .top { position: static; }
.back-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--ink); }
.app { width: min(560px, 100%); margin: 0 auto; padding: 4px 16px calc(env(safe-area-inset-bottom, 0px) + 96px); }
html.inroom .app.live-wide, .app:has(.live) { width: min(1100px, 100%); }
.lbslot { padding-top: 0; margin-top: -80px; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; }
.btn { appearance: none; font: inherit; font-weight: 700; color: var(--ink); background: var(--card2); border: 1px solid var(--line); border-radius: 14px; min-height: 48px; padding: 0 18px; cursor: pointer; touch-action: manipulation; }
.btn:hover:not(:disabled) { border-color: #3d424e; background: #252932; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 999px; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); }
.btn.pri { background: var(--accent); color: #1c1203; border-color: var(--accent); }
.btn.pri:hover:not(:disabled) { background: #fcd34d; }
.btn.big { min-height: 60px; font-size: 18px; width: 100%; border-radius: 18px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.row { display: flex; gap: 10px; align-items: stretch; }
.row .grow { flex: 1; }
.row .btn.big { width: auto; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: grid; gap: 12px; margin-bottom: 12px; }
.panel h3 { font-size: 17px; }
.fld { display: grid; gap: 6px; }
.fld span { font-size: 13px; color: var(--muted); font-weight: 600; }
input { font: inherit; font-size: 18px; color: var(--ink); background: #08090b; border: 1px solid var(--line); border-radius: 14px; min-height: 52px; padding: 0 14px; width: 100%; }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input.code { text-transform: uppercase; letter-spacing: .3em; font-weight: 800; text-align: center; flex: 1; min-width: 0; }
input.code::placeholder { letter-spacing: .1em; font-weight: 600; }
.row .btn { min-width: 96px; }
.or { position: relative; text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.or::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.or span { position: relative; background: var(--card); padding: 0 10px; }
.err { color: #fca5a5; margin: 0; font-size: 15px; }
.hero { text-align: center; padding: 14px 0 20px; }
.logo { line-height: 0; margin-bottom: 6px; filter: drop-shadow(0 8px 24px rgba(249,115,22,.35)); }
.logo svg { width: 76px; height: 76px; }
.logo svg circle:nth-of-type(3) { animation: spark .35s steps(2) infinite; }
@keyframes spark { 50% { opacity: .4; } }
.hero h1 { font-size: 42px; font-weight: 900; }
.tag { color: var(--muted); margin: 8px auto 0; max-width: 36ch; }
.foot { color: var(--muted); font-size: 14px; text-align: center; margin: 18px 0 0; }
.roombar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 12px; font-size: 14px; color: var(--muted); }
.roombar .rc b { color: var(--ink); letter-spacing: .12em; }
.roombar .off { color: var(--accent); }
.roombar .btn:first-of-type { margin-left: auto; }
.codebox { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px 14px 16px; margin-bottom: 12px; }
.lbl { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.codebox .hint { margin: 0 0 10px; }
.bigcode { margin: 2px 0 10px; font-size: 52px; font-weight: 900; letter-spacing: .14em; font-variant-numeric: tabular-nums; color: var(--accent); }
.names { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.names li { background: #08090b; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 15px; }
.names li i { color: var(--muted); font-style: normal; font-size: 12px; }
.names li i.h { color: var(--accent); }
.hint { margin: 0; font-size: 13px; color: var(--muted); }
.wait { color: var(--muted); text-align: center; margin: 16px 0; }
details.mini { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; }
details.mini summary { cursor: pointer; font-weight: 700; }
details.mini ul { padding-left: 18px; margin: 8px 0 0; display: grid; gap: 6px; color: #d4d6dc; font-size: 15px; }

/* brief / results */
.brief, .result { text-align: center; display: grid; gap: 10px; padding: 8px 0; }
.bigbomb svg { width: 120px; height: 120px; filter: drop-shadow(0 10px 30px rgba(249,115,22,.35)); animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-3deg); } }
.brief h2 { font-size: 28px; font-weight: 850; }
.rule { margin: 0; color: #fecaca; }
.jobs { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.jobs li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.jk { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.arming { font-size: 18px; margin: 4px 0 0; }
.arming b { color: var(--accent); font-variant-numeric: tabular-nums; }
.warn { color: #fca5a5; }
.big { font-size: clamp(48px, 15vw, 84px); font-weight: 950; letter-spacing: .02em; line-height: 1; }
.result.ok .big { color: var(--ok); text-shadow: 0 0 40px rgba(74,222,128,.4); }
.result.bad .big { color: var(--hot); text-shadow: 0 0 40px rgba(249,115,22,.55); }
.result p { margin: 0; }
.score b { font-size: 22px; }
.final { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin: 6px 0; }
.final .num { font-size: 72px; font-weight: 950; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }

/* live */
.live { display: grid; gap: 10px; }
.bar { position: sticky; top: 0; z-index: 15; display: flex; gap: 12px; align-items: center; background: linear-gradient(180deg, #1b1d22, #121317); border: 1px solid #343842; border-radius: 18px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(0,0,0,.45); margin-top: calc(env(safe-area-inset-top, 0px) * 0); }
.clock { flex: none; background: #050505; border: 2px solid #2b2b2b; border-radius: 12px; padding: 4px 10px; font: 800 34px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #ff4d4d; text-shadow: 0 0 12px rgba(255,60,60,.65); font-variant-numeric: tabular-nums; min-width: 112px; text-align: center; }
.clock.low { animation: pulse 1s steps(2) infinite; }
@keyframes pulse { 50% { color: #ff9a9a; } }
.facts { min-width: 0; display: grid; gap: 6px; flex: 1; }
.strikes { display: flex; align-items: center; gap: 6px; }
.strikes i { width: 16px; height: 16px; border-radius: 50%; background: #2b2f38; border: 1px solid #444a56; }
.strikes i.on { background: var(--bad); border-color: #fca5a5; box-shadow: 0 0 10px rgba(239,68,68,.8); }
.strikes span { font-size: 12px; color: var(--muted); margin-left: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; font-size: 13px; }
.tags > span { background: #0a0b0d; border: 1px solid #343842; border-radius: 8px; padding: 2px 7px; white-space: nowrap; }
.serial b { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; color: #fff; }
.ind { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; letter-spacing: .05em; }
.ind i { width: 8px; height: 8px; border-radius: 50%; background: #3a3f4a; }
.ind.lit i { background: #fde047; box-shadow: 0 0 8px #fde047; }
.ind.none { color: var(--muted); font-weight: 500; letter-spacing: 0; }
.ovw { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.ovw::-webkit-scrollbar { display: none; }
.ovw li { flex: none; display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; font-size: 13px; position: relative; }
.ovw li .ic { grid-row: span 2; font-size: 18px; }
.ovw li .pp { color: var(--muted); font-size: 12px; }
.ovw li.mine { border-color: #6b5a2a; }
.ovw li.done { border-color: #166534; background: #0f1d14; }
.ovw li .ck { position: absolute; top: -6px; right: -6px; background: var(--ok); color: #052e16; border-radius: 50%; width: 18px; height: 18px; display: grid; place-items: center; font-size: 12px; font-weight: 900; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.tab { font: inherit; font-weight: 700; min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { background: #2a2416; color: var(--accent); }
.tab b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 11px; background: #0a0b0d; font-size: 12px; margin-left: 4px; }
.panes { display: grid; gap: 12px; }
.panes[data-tab="mods"] .man, .panes[data-tab="man"] .mods { display: none; }
.pane { display: grid; gap: 12px; align-content: start; }
.empty { color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 16px; padding: 16px; margin: 0; }
.hostfoot { text-align: center; margin: 4px 0 0; }
@media (min-width: 900px) {
  .tabs { display: none; }
  .panes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .panes[data-tab] .man, .panes[data-tab] .mods { display: grid; }
  .pane.man { position: sticky; top: 110px; max-height: calc(100dvh - 130px); overflow: auto; padding-right: 4px; }
}

/* modules */
.mod { background: linear-gradient(160deg, #2a2d34, #1b1d22); border: 1px solid #3b3f49; border-radius: 18px; padding: 12px 14px 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 18px rgba(0,0,0,.35); position: relative; }
.mod::before, .mod::after { content: ""; position: absolute; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: #50555f; box-shadow: inset 0 -1px 0 #000; }
.mod::before { left: 8px; } .mod::after { right: 8px; }
.mod header { display: flex; align-items: center; gap: 8px; margin: 0 6px 10px; }
.mod h3 { font-size: 16px; flex: 1; }
.mod .who { font-size: 12px; color: var(--muted); }
.led { width: 14px; height: 14px; border-radius: 50%; background: #3a1010; border: 1px solid #000; box-shadow: inset 0 0 4px #000; }
.led.on { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.mod.solved { border-color: #166534; }
.mod.solved > *:not(header) { opacity: .45; pointer-events: none; }
.mod.hit { animation: hit .45s; }
@keyframes hit { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); box-shadow: 0 0 0 3px var(--bad); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.mod .hint { margin-top: 8px; }
.c-red { --c: var(--c-red); } .c-blue { --c: var(--c-blue); } .c-yellow { --c: var(--c-yellow); } .c-white { --c: var(--c-white); } .c-black { --c: var(--c-black); } .c-green { --c: var(--c-green); } .c-purple { --c: var(--c-purple); } .c-orange { --c: var(--c-orange); }
/* wires */
.wires { list-style: none; margin: 0; padding: 4px 0; display: grid; gap: 6px; background: #121317; border-radius: 12px; border: 1px solid #2c3038; }
.wire { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; border: 0; background: none; color: var(--ink); cursor: pointer; font: inherit; touch-action: manipulation; }
.wire .n { width: 22px; height: 22px; border-radius: 50%; background: #2f333c; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.wire .cable { flex: 1; height: 12px; border-radius: 6px; background: var(--c); box-shadow: inset 0 3px 2px rgba(255,255,255,.25), inset 0 -3px 3px rgba(0,0,0,.35); position: relative; }
.wire.c-black .cable { outline: 1px solid #4b5060; }
.wire .cn { width: 54px; text-align: right; font-size: 12px; color: var(--muted); text-transform: capitalize; flex: none; }
.wire:hover:not(:disabled) .cable { filter: brightness(1.2); }
.wire.cut .cable { background: linear-gradient(90deg, var(--c) 0 44%, transparent 44% 56%, var(--c) 56%); box-shadow: none; }
.wire:disabled { cursor: default; }
/* button */
.bwrap { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 8px 0; }
.bigbtn { width: 132px; height: 132px; border-radius: 50%; border: 6px solid #0d0e11; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.4), rgba(255,255,255,0) 55%, rgba(0,0,0,.35)), var(--c); box-shadow: 0 8px 0 #050506, 0 12px 24px rgba(0,0,0,.5); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .06s, box-shadow .06s; }
.bigbtn span { font: 900 22px/1 system-ui, sans-serif; letter-spacing: .08em; color: #111; }
.bigbtn.c-blue span, .bigbtn.c-red span { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.bigbtn.down { transform: translateY(6px); box-shadow: 0 2px 0 #050506, 0 4px 10px rgba(0,0,0,.5); }
.strip { width: 18px; height: 120px; border-radius: 9px; background: #101114; border: 2px solid #2c3038; transition: background .15s, box-shadow .15s; }
.strip.on { background: var(--c); box-shadow: 0 0 18px var(--c); }
/* glyphs */
.glyphs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.glyph { aspect-ratio: 1.4; font-size: 40px; line-height: 1; border-radius: 14px; border: 2px solid #3e434e; background: #e9e4d4; color: #1b1b1b; cursor: pointer; touch-action: manipulation; box-shadow: 0 4px 0 #0c0d10; font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "Noto Sans Symbols", system-ui, sans-serif; }
.glyph.on { background: #bbf7d0; border-color: var(--ok); box-shadow: 0 0 12px rgba(74,222,128,.6); }
.glyph:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #0c0d10; }
.glyph:disabled { opacity: 1; cursor: default; }
/* pulse */
.pads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 270px; margin: 0 auto; }
.pad { aspect-ratio: 1.5; border-radius: 16px; border: 3px solid #0d0e11; background: linear-gradient(rgba(0,0,0,.22), rgba(0,0,0,.22)), var(--c); background: color-mix(in srgb, var(--c) 78%, #000); box-shadow: inset 0 -6px 10px rgba(0,0,0,.35); cursor: pointer; touch-action: manipulation; transition: background .08s, box-shadow .08s, transform .08s; }
.pad.lit { background: linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,.3)), var(--c); background: color-mix(in srgb, var(--c) 70%, #fff); border-color: #fff; box-shadow: 0 0 30px var(--c), 0 0 0 3px var(--c), inset 0 0 22px rgba(255,255,255,.7); transform: scale(1.04); }
/* breaker */
.brkr { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.bled { width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: 0 0 16px var(--c), inset 0 -3px 4px rgba(0,0,0,.3); border: 2px solid #0d0e11; }
.sws { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sw { display: grid; justify-items: center; gap: 4px; background: #121317; border: 1px solid #2c3038; border-radius: 12px; padding: 8px 0 6px; cursor: pointer; color: var(--muted); font: inherit; touch-action: manipulation; }
.sw .lever { width: 18px; height: 52px; border-radius: 9px; background: #08090b; position: relative; }
.sw .lever::after { content: ""; position: absolute; left: -3px; right: -3px; height: 24px; border-radius: 8px; background: linear-gradient(#e5e7eb, #9ca3af); transition: top .1s; top: 28px; }
.sw.up .lever::after { top: 0; }
.sw .n { font-size: 12px; font-weight: 800; }
.lock { grid-column: 1 / -1; background: #3a1414; border-color: #7f1d1d; color: #fecaca; letter-spacing: .12em; }

/* manual pages */
.page { background: #efe9da; color: #1d1b16; border-radius: 14px; padding: 14px 16px; box-shadow: 0 6px 18px rgba(0,0,0,.35); font-size: 15px; }
.page h3 { font-size: 18px; border-bottom: 2px solid #1d1b16; padding-bottom: 6px; margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.page .ed { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a5a12; margin: -2px 0 6px; }
.edbar { font-size: 13px; color: #f3c56b; margin: 0 0 8px; text-align: center; }
.edline { margin-top: 6px; }
.page .for { font-size: 13px; font-weight: 600; color: #6b6355; }
.page h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin: 12px 0 4px; }
.page p { margin: 6px 0; }
.page ol, .page ul { margin: 4px 0; padding-left: 22px; display: grid; gap: 4px; }
.page table { border-collapse: collapse; margin: 6px 0; width: 100%; font-size: 14px; }
.page th, .page td { border: 1px solid #b9b09b; padding: 4px 6px; text-align: left; }
.page th { background: #e2d9c4; }
.page .brk td:not(:first-child), .page .brk th:not(:first-child) { text-align: center; font-size: 16px; }
i.swc { display: inline-block; width: 11px; height: 11px; border-radius: 3px; background: var(--c); border: 1px solid #00000066; margin-right: 4px; vertical-align: -1px; }
.gcols { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 8px; }
.gcol { list-style: none; margin: 0; padding: 4px 0; display: grid; gap: 2px; border: 1px solid #b9b09b; border-radius: 8px; text-align: center; font-size: 26px; line-height: 1.25; font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "Noto Sans Symbols", system-ui, sans-serif; }

/* effects */
.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 12px); transform: translateX(-50%); background: #f3f4f6; color: #111; font-weight: 700; padding: 10px 16px; border-radius: 999px; z-index: 60; box-shadow: 0 8px 30px rgba(0,0,0,.4); max-width: 90vw; pointer-events: none; text-align: center; }
.flash { position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: 0; }
.flash.strike { animation: fl .5s ease-out; background: radial-gradient(circle, transparent 30%, rgba(239,68,68,.55)); }
.flash.good { animation: fl .9s ease-out; background: radial-gradient(circle, transparent 30%, rgba(74,222,128,.45)); }
@keyframes fl { from { opacity: 1; } to { opacity: 0; } }
.fx { position: fixed; inset: 0; z-index: 70; pointer-events: none; display: grid; place-items: center; overflow: hidden; }
.fx .fireball { position: absolute; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle, #fff 0%, #fde047 25%, #f97316 55%, #b91c1c 75%, transparent 76%); }
.fx.go .fireball { animation: fire 1.3s ease-out forwards; }
@keyframes fire { 0% { transform: scale(.2); opacity: 1; } 30% { transform: scale(18); opacity: 1; } 100% { transform: scale(30); opacity: 0; } }
.fx .ring { position: absolute; width: 60px; height: 60px; border-radius: 50%; border: 8px solid rgba(253,224,71,.9); opacity: 0; }
.fx.go .ring { animation: ring 1s ease-out forwards; }
.fx.go .ring.r2 { animation-delay: .15s; border-color: rgba(249,115,22,.8); }
@keyframes ring { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(16); opacity: 0; } }
.fx .debris i { position: absolute; left: 50%; top: 50%; width: 12px; height: 8px; margin: -4px -6px; background: #374151; border-radius: 2px; opacity: 0; }
.fx .debris i:nth-child(3n) { background: #f97316; } .fx .debris i:nth-child(4n) { background: #9ca3af; }
.fx.go .debris i { animation: deb 1.2s cubic-bezier(.15,.7,.3,1) forwards; }
@keyframes deb { 0% { opacity: 1; transform: translate(0,0) rotate(0) scale(var(--s)); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(var(--s)); } }
.fx .boomtxt { position: relative; font: 950 clamp(64px, 22vw, 160px)/1 system-ui, sans-serif; color: #fff7ed; text-shadow: 0 0 30px #f97316, 0 0 60px #b91c1c; margin: 0; opacity: 0; }
.fx.go .boomtxt { animation: btxt 1.6s ease-out forwards; }
@keyframes btxt { 0% { transform: scale(.4); opacity: 0; } 15% { transform: scale(1.15); opacity: 1; } 70% { opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
body.shake .app { animation: shake .6s; }
@keyframes shake { 10%, 50%, 90% { transform: translate(-6px, 3px); } 30%, 70% { transform: translate(6px, -4px); } }

dialog { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; padding: 20px; width: min(520px, calc(100vw - 24px)); max-height: 85dvh; }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h2 { font-size: 22px; margin-bottom: 8px; }
dialog ol { padding-left: 20px; margin: 0 0 12px; display: grid; gap: 10px; }
dialog ul { padding-left: 18px; margin: 6px 0 0; display: grid; gap: 4px; }
dialog li { color: #d4d6dc; }
dialog .fine { color: var(--muted); font-size: 13px; }
dialog .btn { width: 100%; }
@media (max-width: 380px) { .bigcode { font-size: 42px; } .hero h1 { font-size: 34px; } .clock { font-size: 28px; min-width: 92px; } .bigbtn { width: 116px; height: 116px; } .gcol { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { .btn:active:not(:disabled) { transform: none; } body.shake .app, .bigbomb svg, .logo svg circle { animation: none; } }
/* torn manual (3+ players): the page card becomes a clipboard note; the scrap is the only paper */
.page.torn { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.page.torn h3 { border-bottom-color: var(--line); }
.page.torn .for { color: var(--muted); }
.page.torn .ed { color: #f3c56b; }
.page.torn .intro { color: #d6d3cc; font-size: 14px; }
.page.torn .intro b { color: var(--ink); }
.pmiss { color: #f3c56b; font-size: 13px; margin: 8px 0 12px; }
.scrapw { margin: 8px 4px 14px; filter: drop-shadow(0 0 .6px rgba(140,118,80,.9)) drop-shadow(0 5px 7px rgba(0,0,0,.55)); transform-origin: 50% 40%; }
.scrap { position: relative; overflow: hidden; color: #1d1b16; background: #f4eedd; background-image: radial-gradient(120% 90% at 30% 20%, rgba(255,255,255,.55), transparent 60%), repeating-linear-gradient(0deg, transparent 0 25px, rgba(120,140,170,.10) 25px 26px), radial-gradient(rgba(150,120,70,.07) 1px, transparent 1.4px); background-size: auto, auto, 7px 7px; }
.scrap .sheet { padding: 0 16px; font-size: 15px; }
.scrap .sheet > :first-child { margin-top: 0; }
.scrap .tg { visibility: hidden; }
.scrap li.tl::marker { color: transparent; }
.scrap h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin: 12px 0 4px; }
.scrap p { margin: 6px 0; }
.scrap ol, .scrap ul { margin: 4px 0; padding-left: 22px; display: grid; gap: 4px; }
.scrap table { border-collapse: collapse; margin: 6px 0; width: 100%; font-size: 14px; }
.scrap th, .scrap td { border: 1px solid #b9b09b; padding: 4px 6px; text-align: left; }
.scrap th { background: rgba(200,185,150,.35); }
.scrap .brk td:not(:first-child), .scrap .brk th:not(:first-child) { text-align: center; font-size: 16px; }
.page.torn { padding: 12px 10px; }
.page.torn h3, .page.torn .ed, .page.torn .intro, .page.torn .pmiss { padding: 0 4px; }
.scrapw { margin: 8px 0 14px; }
.scrap .sheet { padding: 0 10px; }
.scrap .gcols { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.scrap .gcol { font-size: 22px; }
@media (max-width: 360px) { .scrap .gcol { font-size: 19px; } .scrap .sheet { font-size: 14px; padding: 0 8px; } .scrap table { font-size: 12px; } .scrap th, .scrap td { padding: 3px 2px; } .scrap .swc { margin-right: 2px; } }

/* ——— 3D bomb on a table (bomb holder's view): CSS preserve-3d box, no WebGL ——— */
.live.ondef:not(.solo) .bar .clock { display: none; }
.live.ondef:not(.solo) .bar, .live.ondef:not(.solo) .ovw, .live.ondef:not(.solo) .tabs { display: none; }
.live.ondef.solo[data-tab="mods"] .bar, .live.ondef.solo[data-tab="mods"] .ovw { display: none; }
.bench { --bw: min(290px, calc(100vw - 104px)); --bh: var(--bw); --bd: calc(var(--bw) * .38); position: relative; height: clamp(430px, calc(100dvh - 160px), 640px); border-radius: 22px; overflow: hidden; border: 1px solid #2a2e37; background: #3a3e44; container-type: inline-size; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.live.ondef.solo .bench { height: clamp(430px, calc(100dvh - 214px), 640px); }
.scene { position: absolute; inset: 0 0 64px 0; perspective: 1000px; perspective-origin: 50% 40%; }
.bench.held .scene { touch-action: none; cursor: grab; }
.bench.held .scene:active { cursor: grabbing; }
.table { --tw: 360px; --tw: min(520px, 90cqw); position: absolute; left: 50%; top: 65%; width: var(--tw); height: calc(var(--tw) * .6); margin: calc(var(--tw) * -.3) 0 0 calc(var(--tw) / -2);
  transform: rotateX(62deg); transform-origin: 50% 50%; transform-style: preserve-3d; pointer-events: none; border-radius: 6px;
  background: radial-gradient(closest-side at 50% 45%, rgba(255,255,255,.1), transparent 85%), linear-gradient(180deg, #6c7178, #787d84 60%, #80858b); box-shadow: inset 0 0 0 3px #8f949a, inset 0 0 0 5px #5f646a;
  transition: opacity .5s, transform .6s cubic-bezier(.2,.8,.2,1); }
.bench.held .table { opacity: .28; transform: rotateX(62deg) translateY(140px); }
/* table apron + legs hang below the top (preserve-3d children rotated -90deg under it) */
.table .tap, .table .tlg { position: absolute; display: block; pointer-events: none; }
.table .tap.f { left: 0; right: 0; top: 100%; height: calc(var(--tw) * .06); transform-origin: 50% 0; transform: rotateX(-90deg); background: linear-gradient(#6b7077, #565a60); }
.table .tap.l, .table .tap.r { top: 0; bottom: 0; width: calc(var(--tw) * .06); background: #4f5359; }
.table .tap.l { left: 0; transform-origin: 0 50%; transform: rotateY(90deg); }
.table .tap.r { right: 0; transform-origin: 100% 50%; transform: rotateY(-90deg); }
.table .tlg { width: calc(var(--tw) * .045); height: calc(var(--tw) * .5); transform-origin: 50% 0; transform: rotateX(-90deg); background: linear-gradient(90deg, #3c4045, #5a5f65 45%, #3a3d42); }
.table .tlg.a, .table .tlg.c { left: 3%; } .table .tlg.b, .table .tlg.d { right: 3%; }
.table .tlg.a, .table .tlg.b { top: calc(100% - var(--tw) * .05); } .table .tlg.c, .table .tlg.d { top: 2%; }
/* office room (inline SVG from app.js OFFICE_SVG), behind everything, dims a little when the bomb is picked up / a module is open */
.office { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.office .of-room { position: absolute; left: 0; top: -12%; width: 100%; height: 112%; display: block; }
.office::after { content: ""; position: absolute; inset: 0; background: radial-gradient(130% 90% at 50% 62%, transparent 45%, rgba(6,7,9,.55) 100%), linear-gradient(rgba(6,7,9,.18), rgba(6,7,9,0) 40%); transition: background-color .5s; }
.bench.held .office::after { background-color: rgba(6,7,9,.28); }
.bench.zoomed .office::after { background-color: rgba(6,7,9,.42); }
.rig { position: absolute; left: 50%; top: 50%; width: var(--bw); height: var(--bh); margin: calc(var(--bh) / -2) 0 0 calc(var(--bw) / -2); transform-style: preserve-3d;
  transform: translateY(6%) scale(.62) rotateX(58deg) rotateZ(-16deg); transition: transform .6s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.rig.dragging { transition: none; }
.b3d { position: absolute; inset: 0; transform-style: preserve-3d; }
.face { position: absolute; left: 0; top: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 10px; background: linear-gradient(155deg, #4a4f58, #2b2f36 55%, #1f2228); border: 2px solid #15171b; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 4px rgba(0,0,0,.18); }
.face.fr, .face.bk { width: var(--bw); height: var(--bh); display: grid; grid-template: 1fr 1fr / 1fr 1fr; gap: 8px; padding: 12px; }
.face.fr { transform: translateZ(calc(var(--bd) / 2)); }
.face.bk { transform: rotateY(180deg) translateZ(calc(var(--bd) / 2)); }
.face.rt, .face.lf { width: var(--bd); height: var(--bh); left: calc((var(--bw) - var(--bd)) / 2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 8px 4px; background: linear-gradient(180deg, #3a3e46, #24272d); }
.face.rt { transform: rotateY(90deg) translateZ(calc(var(--bw) / 2)); }
.face.lf { transform: rotateY(-90deg) translateZ(calc(var(--bw) / 2)); }
.face.tp, .face.bt { width: var(--bw); height: var(--bd); top: calc((var(--bh) - var(--bd)) / 2); }
.face.tp { transform: rotateX(90deg) translateZ(calc(var(--bh) / 2)); background: repeating-linear-gradient(-45deg, #facc15 0 12px, #1a1a1a 12px 24px); display: grid; place-items: center; }
.face.bt { transform: rotateX(-90deg) translateZ(calc(var(--bh) / 2)); background: #1b1d21; }
.handle { width: 46%; height: 34%; border-radius: 10px; background: #15171b; box-shadow: inset 0 0 0 5px #2b2f36; }
.bshadow { position: absolute; inset: -6%; transform: translateZ(calc(var(--bd) / -2 - 3px)); background: radial-gradient(closest-side, rgba(0,0,0,.75), transparent); transition: opacity .4s; pointer-events: none; }
.bench.held .bshadow { opacity: 0; }
.slot { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; padding: 18px 6px 16px; border-radius: 8px; border: 1px solid #0b0c0e; background: linear-gradient(160deg, #23262c, #16181c); box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.08); color: var(--ink); font: inherit; cursor: pointer; pointer-events: none; overflow: hidden; touch-action: manipulation; }
.bench.held[data-face="0"] .fr .slot[data-z], .bench.held[data-face="2"] .bk .slot[data-z] { pointer-events: auto; }
.bench.held .slot[data-z]:hover { box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 0 0 2px rgba(251,191,36,.6); }
.slot.done { box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 0 0 1px #166534; }
.slot.done > :not(.sled):not(.snm) { opacity: .45; }
.slot.blank { cursor: default; background: linear-gradient(160deg, #2c3036, #202328); }
.vent { width: 60%; height: 40%; background: repeating-linear-gradient(180deg, #0d0e10 0 4px, transparent 4px 9px); border-radius: 3px; opacity: .8; }
.sled { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: #4a1212; border: 1px solid #000; }
.sled.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.snm { position: absolute; left: 0; right: 0; bottom: 3px; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8b909b; text-align: center; white-space: nowrap; overflow: hidden; }
.pvw { display: flex; flex-direction: column; gap: 5px; width: 80%; }
.pvw i { height: 6px; border-radius: 3px; background: var(--c); box-shadow: inset 0 2px 1px rgba(255,255,255,.25); }
.pvw i.c-black { outline: 1px solid #4b5060; }
.pvw i.cut { background: linear-gradient(90deg, var(--c) 0 42%, transparent 42% 58%, var(--c) 58%); box-shadow: none; }
.pvb { width: 58%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; border: 3px solid #0d0e11; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.4), rgba(255,255,255,0) 55%, rgba(0,0,0,.35)), var(--c); }
.pvb em { font: 900 9px/1 system-ui, sans-serif; font-style: normal; letter-spacing: .06em; color: #111; }
.pvb.c-blue em, .pvb.c-red em { color: #fff; }
.pvg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 76%; }
.pvg em { font-style: normal; display: grid; place-items: center; aspect-ratio: 1.3; border-radius: 4px; background: #e9e4d4; color: #1b1b1b; font-size: 15px; line-height: 1; font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "Noto Sans Symbols", system-ui, sans-serif; }
.pvg em.on { background: #bbf7d0; }
.pvp { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; width: 72%; }
.pvp i { aspect-ratio: 1.5; border-radius: 5px; border: 2px solid #0d0e11; background: linear-gradient(rgba(0,0,0,.22), rgba(0,0,0,.22)), var(--c); background: color-mix(in srgb, var(--c) 78%, #000); transition: background .08s, box-shadow .08s; }
.pvp i.lit { background: linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,.3)), var(--c); background: color-mix(in srgb, var(--c) 70%, #fff); border-color: #fff; box-shadow: 0 0 14px var(--c); }
.pvk { display: flex; align-items: center; gap: 5px; }
.pvk i { width: 9px; height: 26px; border-radius: 5px; background: #08090b; position: relative; }
.pvk i::after { content: ""; position: absolute; left: -2px; right: -2px; height: 11px; border-radius: 4px; background: linear-gradient(#e5e7eb, #9ca3af); top: 15px; }
.pvk i.up::after { top: 0; }
.pvk i.bl { width: 13px; height: 13px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); margin-right: 3px; }
.pvk i.bl::after { display: none; }
.tslot { gap: 6px; align-content: center; }
.tdisp { background: #050505; border: 2px solid #2b2b2b; border-radius: 6px; padding: 3px 8px; font: 800 clamp(20px, calc(var(--bw) * .09), 30px)/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #ff4d4d; text-shadow: 0 0 10px rgba(255,60,60,.7); font-variant-numeric: tabular-nums; }
.tdisp.low b, .tbig.low b, .cuclk.low b { animation: pulse 1s steps(2) infinite; }
.tstr { justify-content: center; gap: 5px; }
.tslot .tstr i { width: 10px; height: 10px; }
.pickup { position: absolute; inset: 0; width: 100%; background: transparent; border: 0; cursor: pointer; }
.bench.held .pickup { display: none; }
.bhint { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; text-align: center; color: #f3c56b; font-weight: 700; font-size: 15px; pointer-events: none; animation: bob 1.6s ease-in-out infinite; }
.bench.held .bhint { display: none; }
.bctl { position: absolute; left: 8px; right: 8px; bottom: 8px; max-width: 340px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 8px; visibility: hidden; }
.bench.held .bctl { visibility: visible; }
@media (max-width: 899px) { .bctl { right: 72px; left: 6px; gap: 6px; } }
.rotb { min-width: 52px; font-size: 22px; padding: 0 10px; }
.fcap { flex: 1; min-width: 0; text-align: center; font-size: 13px; font-weight: 700; color: #d4d6dc; line-height: 1.25; }
.putb { position: absolute; top: 10px; right: 10px; min-height: 44px; visibility: hidden; background: rgba(12,13,16,.6); }
.bench.held:not(.zoomed) .putb { visibility: visible; }
.closeup { position: absolute; inset: 0; z-index: 3; overflow: auto; overscroll-behavior: contain; padding: 10px 10px 16px; background: rgba(9,10,12,.9); animation: cuin .32s both; display: flex; flex-direction: column; }
.cumods { flex: 1; display: grid; align-content: center; padding-bottom: 24px; }
.cumods > article.cuin { animation: cuin .26s both; }
.closeup[hidden] { display: none; }
@keyframes cuin { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.cutop { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.backb { min-height: 44px; }
.cuclk { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cuclk b { background: #050505; border: 1px solid #2b2b2b; border-radius: 8px; padding: 3px 8px; font: 800 20px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #ff4d4d; font-variant-numeric: tabular-nums; }
.cuclk .strikes i { width: 12px; height: 12px; }
.cumods > article { width: 100%; max-width: 440px; margin: 0 auto; }
.cumods > article[hidden] { display: none; }
.closeup .link { min-height: 44px; padding: 0 6px; }
.tcard { background: linear-gradient(160deg, #2a2d34, #1b1d22); border: 1px solid #3b3f49; border-radius: 18px; padding: 12px 14px 14px; display: grid; gap: 12px; justify-items: center; }
.tcard header { display: flex; align-items: center; gap: 8px; width: 100%; }
.tcard h3 { font-size: 16px; flex: 1; }
.tcard .who { font-size: 12px; color: var(--muted); }
.tbig { background: #050505; border: 3px solid #2b2b2b; border-radius: 14px; padding: 10px 22px; font: 800 64px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #ff4d4d; text-shadow: 0 0 18px rgba(255,60,60,.7); font-variant-numeric: tabular-nums; }
.tstr.big i { width: 22px; height: 22px; }
.tcard .hint { text-align: center; }
.plate { background: #e8e4d8; color: #111; border-radius: 4px; padding: 4px 5px; text-align: center; width: 92%; }
.plate .pl { color: #555; }
.pl { display: block; font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #9aa0ab; text-align: center; }
.sn { display: block; font: 800 clamp(10px, calc(var(--bd) * .13), 15px)/1.1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; word-break: break-all; }
.bats { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.batt { width: calc(var(--bd) * .5); height: 14px; border-radius: 3px; background: linear-gradient(90deg, #1f2937 0 70%, #d97706 70%); position: relative; box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.batt::after { content: ""; position: absolute; right: -4px; top: 4px; width: 4px; height: 6px; background: #9ca3af; border-radius: 0 2px 2px 0; }
.inds { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.ind3 { display: flex; flex-direction: column; align-items: center; gap: 3px; background: #0d0e10; border: 1px solid #343842; border-radius: 6px; padding: 5px 6px; }
.ind3 i { width: 12px; height: 12px; border-radius: 50%; background: #3a3f4a; }
.ind3.lit i { background: #fde047; box-shadow: 0 0 10px #fde047; }
.ind3 b { font-size: 11px; letter-spacing: .06em; }
.ind3 .ist { font: 600 9px/1 system-ui, sans-serif; font-style: normal; color: #9aa1ad; text-transform: uppercase; letter-spacing: .06em; }
.ind3.lit .ist { color: #fde047; }
.sn, .serial b { font-variant-numeric: slashed-zero; }
.bench.hit .scene { animation: hit .45s; }
@media (min-width: 900px) {
  .bench { --bw: 340px; }
  .live.ondef:not(.solo) .panes { grid-template-columns: minmax(0, 1fr); }
  .live.ondef:not(.solo) .panes[data-tab] .man { display: none; }
  .live.ondef.solo .bar { display: flex; }
  .live.ondef.solo .bar .clock { display: none; }
  .live.ondef.solo .ovw { display: flex; }
}
@media (prefers-reduced-motion: reduce) { .rig, .table { transition-duration: .01s; } .bhint { animation: none; } }

/* ——— Focused module with the bomb still in view (follow-up 2026-12-03): phones = bomb strip on top + module panel below;
   wide benches (>= 680px, JS adds .wide) = bomb on the left, panel on the right. The bomb stays live: tap a module to switch,
   rotate buttons / drag to turn it. ——— */
.bench { --mh: clamp(170px, 34%, 250px); }
.bench.zoomed:not(.wide) .scene { bottom: auto; height: var(--mh); }
.bench.zoomed .table { opacity: .12; }
.bench.zoomed:not(.wide) .closeup { top: var(--mh); border-top: 1px solid #3a2a14; border-radius: 0 0 22px 22px; padding-top: 8px; box-shadow: 0 -10px 24px rgba(0,0,0,.45); }
.bench.zoomed:not(.wide) .bctl { top: calc(var(--mh) / 2 - 26px); bottom: auto; left: 6px; right: 6px; max-width: none; justify-content: space-between; pointer-events: none; }
.bench.zoomed .bctl .rotb { pointer-events: auto; background: rgba(12,13,16,.72); }
.bench.zoomed:not(.wide) .fcap { visibility: hidden; }
.bench.zoomed.wide .scene { right: 54%; }
.bench.zoomed.wide .bctl { right: 54%; left: 8px; }
.bench.zoomed.wide .closeup { left: 46%; border-left: 1px solid #3a2a14; background: rgba(9,10,12,.86); }
.bench.zoomed .rig { transition-duration: .45s; }
.slot.sel { box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 0 0 3px #fbbf24, 0 0 18px rgba(251,191,36,.55) !important; }
/* keep the bottom of tall modules clear of the floating bug button (52px at 16px from the corner) */
.closeup { padding-bottom: 76px; }
.cumods { padding-bottom: 0; }

/* ——— Suspense (follow-up 2026-12-03): under 1:00 a slow red edge glow, under 0:30 a faster, stronger one. ——— */
.tense { position: fixed; inset: 0; z-index: 45; pointer-events: none; opacity: 0; transition: opacity 1.2s; background: radial-gradient(130% 100% at 50% 50%, transparent 58%, rgba(220,38,38,.55) 100%); }
body.t1 .tense { opacity: .35; animation: tense 2.4s ease-in-out infinite; }
body.t2 .tense { opacity: .6; animation: tense 1s ease-in-out infinite; }
@keyframes tense { 0%, 100% { opacity: .18; } 50% { opacity: .5; } }
body.t2 .tense { animation-name: tense2; }
@keyframes tense2 { 0%, 100% { opacity: .3; } 45% { opacity: .75; } }
body.t1 .tdisp, body.t1 .cuclk b, body.t1 .tbig { color: #ff6b4a; }
body.t2 .bench { border-color: #7f1d1d; box-shadow: 0 0 0 1px rgba(220,38,38,.35), 0 0 22px rgba(220,38,38,.25); }
@media (prefers-reduced-motion: reduce) { body.t1 .tense, body.t2 .tense { animation: none; } body.t1 .tense { opacity: .25; } body.t2 .tense { opacity: .45; } }
/* Close + clock stay pinned while a tall module scrolls in the panel */
.closeup .cutop { position: sticky; top: -10px; z-index: 2; margin: -10px -10px 8px; padding: 10px 10px 6px; background: linear-gradient(rgba(9,10,12,.97) 80%, rgba(9,10,12,0)); }

/* ——— Direct module play (bug chat 2026-12-03, thread MwI2g1CD6xvI6-XKkDyCH4pW): no pop-up panel. Tapping a bay flies the
   camera onto it (rig translate+scale, face-on) and the real module lives inside the bay, so you cut wires / press buttons
   right on the bomb. Bomb facts (serial, batteries, indicators) are only on the bomb's sides. ——— */
.slot > .bayb { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px 6px 16px; border: 0; border-radius: inherit; background: none; color: inherit; font: inherit; cursor: pointer; touch-action: manipulation; }
.slot.done > .bayb > :not(.sled):not(.snm) { opacity: .45; }
.slot.sel > .bayb { visibility: hidden; }
.bayin { position: absolute; left: 0; top: 0; width: 300px; transform-origin: 0 0; z-index: 1; }
.bayin[hidden] { display: none; }
.bayin > .mod { width: 300px; border-radius: 14px; box-shadow: none; background: linear-gradient(160deg, #24272d, #17191d); }
#bench.zoomed .scene { inset: 56px 0 8px 0; height: auto; right: 0; cursor: default; touch-action: manipulation; }
#bench.zoomed .bctl, #bench.zoomed .putb, #bench .closeup { display: none; }
#bench.zoomed .table { opacity: 0; }
#bench .slot.sel { box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 0 0 2px rgba(251,191,36,.45) !important; }
.zback, .zclk { display: none; }
#bench.zoomed .zback { display: inline-flex; position: absolute; top: 8px; left: 8px; z-index: 4; min-height: 44px; background: rgba(12,13,16,.72); }
#bench.zoomed .zclk { display: flex; position: absolute; top: 8px; right: 8px; z-index: 4; min-height: 44px; margin: 0; padding: 0 10px; border-radius: 12px; background: rgba(12,13,16,.72); }

/* —— new modules: Cipher Dial, Pressure Valve, Compass Keys —— */
.dial { display: grid; place-items: center; }
.dring { position: relative; width: min(268px, 78vw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #1d2027 0 52%, #121317 53% 100%); border: 2px solid #2c3038; box-shadow: inset 0 4px 14px rgba(0,0,0,.6); }
.dkey { position: absolute; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; border: 2px solid #3e434e; background: #e9e4d4; color: #1b1b1b; font: 800 22px/1 system-ui, sans-serif; cursor: pointer; touch-action: manipulation; box-shadow: 0 3px 0 #0c0d10; }
.dkey:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #0c0d10; }
.dkey.miss { background: #fecaca; border-color: var(--bad); }
.dkey:disabled { cursor: default; }
.dscr { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #0b1a10; color: #86efac; border: 2px solid #0d0e11; border-radius: 8px; padding: 8px 10px; font: 800 22px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .14em; text-shadow: 0 0 8px rgba(134,239,172,.6); }
.valve { display: grid; justify-items: center; gap: 12px; }
.gauge { position: relative; width: min(260px, 76vw); aspect-ratio: 100 / 60; background: #e9e4d4; border-radius: 130px 130px 12px 12px; border: 3px solid #0d0e11; overflow: hidden; }
.gface { position: absolute; inset: 0; width: 100%; height: 100%; }
.gface .garc { fill: none; stroke: #b9b09b; stroke-width: 1.2; }
.gface line { stroke: #1d1b16; stroke-width: 1.6; }
.gface text { font: 800 7px system-ui, sans-serif; fill: #1d1b16; text-anchor: middle; }
.needle { position: absolute; left: 50%; bottom: 10%; width: 3px; height: 72%; margin-left: -1.5px; background: var(--bad); border-radius: 2px; transform-origin: 50% 100%; transition: transform .18s; }
.needle::after { content: ""; position: absolute; left: -6px; bottom: -7px; width: 15px; height: 15px; border-radius: 50%; background: #1d1b16; }
.vread { margin-top: -4px; min-width: 64px; text-align: center; background: #0b1a10; color: #86efac; border: 2px solid #0d0e11; border-radius: 8px; padding: 6px 10px; font: 800 18px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; text-shadow: 0 0 8px rgba(134,239,172,.6); }
.vwheel { width: 112px; height: 112px; border-radius: 50%; border: 10px solid var(--c); background: radial-gradient(circle, #2a2e37 0 22%, transparent 23%), conic-gradient(from 0deg, var(--c) 0 6%, #16181d 6% 19%, var(--c) 19% 31%, #16181d 31% 44%, var(--c) 44% 56%, #16181d 56% 69%, var(--c) 69% 81%, #16181d 81% 94%, var(--c) 94%); box-shadow: 0 6px 0 #050506, 0 10px 20px rgba(0,0,0,.5); cursor: pointer; touch-action: manipulation; display: grid; place-items: center; padding: 0; }
.vwheel span { background: #0d0e11; color: var(--ink); font: 900 11px/1 system-ui, sans-serif; letter-spacing: .12em; padding: 6px 7px; border-radius: 6px; }
.vwheel:active:not(:disabled) { transform: translateY(3px) rotate(20deg); box-shadow: 0 2px 0 #050506; }
.cmp { display: grid; justify-items: center; gap: 14px; }
.carrs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: min(280px, 82vw); }
.carr { aspect-ratio: 1; display: grid; place-items: center; background: #121317; border: 2px solid #2c3038; border-radius: 12px; color: var(--c); }
.carr .arw { width: 70%; height: 70%; fill: currentColor; }
.carr.on { border-color: var(--ok); box-shadow: 0 0 12px rgba(74,222,128,.55); }
.dpad { display: grid; grid-template-columns: repeat(3, 60px); grid-template-rows: repeat(3, 60px); gap: 6px; }
.dbtn { border-radius: 14px; border: 2px solid #3e434e; background: #e9e4d4; color: #1b1b1b; cursor: pointer; touch-action: manipulation; box-shadow: 0 4px 0 #0c0d10; display: grid; place-items: center; padding: 0; }
.dbtn .arw { width: 30px; height: 30px; fill: currentColor; }
.dbtn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #0c0d10; }
.dctr { display: grid; place-items: center; font: 800 14px/1 system-ui, sans-serif; color: var(--muted); }
.pvd { background: #0b1a10; color: #86efac; border-radius: 4px; padding: 4px 5px; font: 800 11px/1 ui-monospace, Menlo, monospace; letter-spacing: .1em; }
.pvv { width: 52%; aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--c); background: conic-gradient(var(--c) 0 8%, #16181d 8% 25%, var(--c) 25% 33%, #16181d 33% 50%, var(--c) 50% 58%, #16181d 58% 75%, var(--c) 75% 83%, #16181d 83%); }
.pvc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; width: 62%; }
.pvc em { display: grid; place-items: center; aspect-ratio: 1; background: #121317; border-radius: 4px; color: var(--c); }
.pvc em.on { outline: 1px solid var(--ok); }
.pvc .arw { width: 80%; height: 80%; fill: currentColor; }
