/* Airlock: full-window WebGL station, glass HUD, meeting room and task cards. */
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url("/assets/fonts/unbounded-700.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap; src: url("/assets/fonts/unbounded-800.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 500; font-display: swap; src: url("/assets/fonts/sora-500.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("/assets/fonts/sora-700.woff2") format("woff2"); }

:root { --spawn: #31e981; --ink-on-spawn: #0b1a12; --font-display: "Unbounded", system-ui, sans-serif; --font-body: "Sora", system-ui, sans-serif; --fg: #f4f1ea; --fg-2: rgba(244, 241, 234, 0.72); --line: rgba(255, 255, 255, 0.16); --glass: rgba(8, 10, 24, 0.62); --glass-2: rgba(255, 255, 255, 0.08); --crew: #4fd1ff; --imp: #ff4d5a; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: #05070f; color: var(--fg); font-family: var(--font-body); font-weight: 500; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-font-smoothing: antialiased; touch-action: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; }
#game { position: fixed; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; outline: 0; }
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.label { position: absolute; left: 0; top: 0; transform: translate(-9999px, -9999px); margin-left: -60px; width: 120px; text-align: center; font-size: 0.72rem; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 8px rgba(0,0,0,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label .sw { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; border: 1px solid rgba(0,0,0,.5); }
.label.ghost { opacity: 0.55; }
.label[hidden] { display: none; }
#vision { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
#vision[hidden] { display: none; }
#flash { position: fixed; inset: 0; pointer-events: none; z-index: 3; background: rgba(220, 20, 40, 0.55); }
#flash[hidden] { display: none; }
.nogl { position: fixed; inset: 40% 16px auto; text-align: center; font-weight: 700; }
.nogl[hidden] { display: none; }

.hud { position: fixed; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 12px 8px; pointer-events: none; z-index: 5; }
.hud[hidden] { display: none; }
.tasks-box { pointer-events: auto; width: min(300px, 60vw); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; }
.tasks-head { display: flex; justify-content: space-between; width: 100%; background: none; border: 0; padding: 2px 0 6px; font-family: var(--font-display); font-size: 0.82rem; font-weight: 800; cursor: pointer; }
.tasks-head .muted { font-family: var(--font-body); font-size: 0.7rem; }
.taskbar { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.12); overflow: hidden; }
.taskbar-fill { height: 100%; width: 0; background: var(--spawn); transition: width 0.4s; }
#tasks { list-style: none; margin: 8px 0 0; padding: 0; font-size: 0.78rem; line-height: 1.45; }
#tasks li.done { text-decoration: line-through; color: var(--fg-2); }
.tasks-box.collapsed #tasks { display: none; }
.hud-right { display: flex; align-items: center; gap: 6px; pointer-events: auto; }
.chip { background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 0.76rem; font-weight: 700; }
.chip-bad { background: rgba(200, 30, 50, 0.7); animation: blink 0.8s infinite alternate; }
.chip[hidden] { display: none; }
@keyframes blink { to { opacity: 0.55; } }
.icon-btn { width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); color: var(--fg); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
#btn-sound .ic-off { display: none; }
#btn-sound[aria-pressed="false"] .ic-on { display: none; }
#btn-sound[aria-pressed="false"] .ic-off { display: block; }

.banner { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 6; background: rgba(10, 12, 30, 0.9); border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; font-weight: 700; font-size: 0.88rem; max-width: 92vw; text-align: center; pointer-events: none; }
.banner.bad { border-color: var(--imp); color: #ffd3d7; }
.banner[hidden] { display: none; }
.toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%) translateY(10px); z-index: 20; background: rgba(20, 20, 28, 0.92); border: 1px solid var(--line); color: var(--fg); padding: 10px 16px; border-radius: 999px; font-size: 0.88rem; font-weight: 700; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast[hidden] { display: none; }
.eject-text { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 8; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.1rem, 3vw, 1.9rem); text-align: center; max-width: 90vw; text-shadow: 0 2px 20px rgba(0,0,0,.8); pointer-events: none; animation: pop 0.4s; }
.eject-text[hidden] { display: none; }

.stick { position: fixed; left: max(18px, env(safe-area-inset-left)); bottom: max(22px, env(safe-area-inset-bottom)); width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,0.08); border: 1px solid var(--line); z-index: 5; touch-action: none; }
.stick[hidden] { display: none; }
.stick-nub { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(255,255,255,0.35); border: 1px solid rgba(255,255,255,0.5); pointer-events: none; }
.actions { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.act { border-radius: 999px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); color: var(--fg); font-weight: 800; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; }
.act-primary { width: 96px; height: 96px; font-family: var(--font-display); font-size: 0.95rem; background: rgba(49, 233, 129, 0.85); color: var(--ink-on-spawn); border-color: var(--spawn); }
.act:disabled { opacity: 0.4; cursor: default; }
.act-primary.hold { background: rgba(255, 209, 102, 0.9); }
.imp-tools { display: flex; gap: 8px; }
.imp-tools[hidden] { display: none; }
.act.small { height: 48px; padding: 0 16px; font-size: 0.85rem; }
.act-kill { background: rgba(255, 77, 90, 0.85); border-color: var(--imp); }
.act[hidden] { display: none; }
.sab-menu { position: absolute; right: 0; bottom: 160px; display: flex; gap: 6px; background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.sab-menu[hidden] { display: none; }

.overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(3, 4, 12, 0.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow: auto; }
.overlay[hidden] { display: none; }
.overlay-role { background: rgba(3, 4, 12, 0.75); cursor: pointer; }
.card { width: 100%; max-width: 480px; color: var(--fg); background: linear-gradient(180deg, rgba(22, 26, 52, 0.97), rgba(8, 10, 26, 0.99)); border: 1px solid var(--line); border-radius: 26px; padding: 26px 24px 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); animation: pop 0.28s cubic-bezier(.2,.9,.2,1.2); max-height: calc(100dvh - 32px); overflow: auto; }
@keyframes pop { from { transform: scale(0.92) translateY(10px); opacity: 0; } }
.kicker { margin: 0 0 6px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--spawn); }
.card h1, .card h2 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1.1; }
.muted { color: var(--fg-2); margin: 0; line-height: 1.55; font-size: 0.95rem; }
.muted.small { font-size: 0.8rem; margin-top: 10px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; font-size: 0.95rem; cursor: pointer; text-decoration: none; color: inherit; }
.btn-primary { background: var(--spawn); color: var(--ink-on-spawn); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--fg); }
.btn.tiny { padding: 7px 14px; font-size: 0.8rem; }
.btn[hidden] { display: none; }
.link { background: none; border: 0; color: var(--spawn); font-size: 0.8rem; font-family: var(--font-body); cursor: pointer; text-decoration: underline; padding: 0; margin-left: 8px; }
.link[hidden] { display: none; }
.join-row { display: flex; gap: 8px; margin-top: 14px; }
.join-row input, .chat-row-in input { flex: 1; min-width: 0; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.06); color: var(--fg); padding: 10px 14px; font: inherit; text-transform: uppercase; }
.chat-row-in input { text-transform: none; }
.plist { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 0.86rem; }
.plist li { display: flex; align-items: center; gap: 8px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.5); flex: none; }
.colours { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); cursor: pointer; }
.swatch.mine { border-color: #fff; box-shadow: 0 0 0 2px var(--spawn); }
.swatch.taken { opacity: 0.3; cursor: not-allowed; }
.settings { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.85rem; margin-top: 6px; }
.settings select { font: inherit; background: rgba(255,255,255,0.08); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; }
.settings select option { color: #000; }
#host-controls[hidden], #wait-note[hidden], #lobby-start[hidden], #lobby-room[hidden] { display: none; }

.role { text-align: center; max-width: 520px; }
.role h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 8vw, 3.4rem); margin: 0 0 10px; letter-spacing: -0.02em; }
.role p { font-size: 1.05rem; line-height: 1.5; }
.role-crew { color: var(--crew); text-shadow: 0 0 30px rgba(79, 209, 255, 0.5); }
.role-imp { color: var(--imp); text-shadow: 0 0 30px rgba(255, 77, 90, 0.5); }

.card-task { max-width: 420px; }
.task-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.task-head h2 { margin: 0; font-size: 1.1rem; }
.task-host { min-height: 240px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.task-hint { margin: 0; color: var(--fg-2); font-size: 0.86rem; text-align: center; }
.task-big { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.wires { width: 100%; }
.wires-svg { width: 100%; height: 220px; touch-action: none; }
.bar { width: 100%; height: 18px; border-radius: 999px; background: rgba(255,255,255,0.12); overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--crew); }
.scan-ring { --k: 0; width: 140px; height: 140px; border-radius: 50%; background: conic-gradient(var(--crew) calc(var(--k) * 360deg), rgba(255,255,255,0.1) 0); display: grid; place-items: center; }
.scan-ring::after { content: ""; width: 110px; height: 110px; border-radius: 50%; background: #0c1020; }
.reader { position: relative; width: 100%; height: 110px; border-radius: 14px; background: rgba(255,255,255,0.06); border: 1px solid var(--line); overflow: hidden; touch-action: none; }
.reader-slot { position: absolute; left: 10px; right: 10px; top: 24px; height: 8px; background: rgba(0,0,0,0.6); border-radius: 4px; }
.card-id { position: absolute; left: 10px; top: 42px; width: 110px; height: 60px; border-radius: 8px; background: linear-gradient(135deg, #ffd166, #ff8a2a); color: #3a1d00; font-weight: 800; display: grid; place-items: center; cursor: grab; touch-action: none; }
.rail { position: relative; width: 60px; height: 240px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid var(--line); touch-action: none; }
.rail-target { position: absolute; left: 0; right: 0; height: 14px; margin-top: -7px; background: rgba(49, 233, 129, 0.5); }
.rail-knob { position: absolute; left: 50%; width: 52px; height: 32px; margin: -16px 0 0 -26px; border-radius: 10px; background: var(--crew); cursor: grab; touch-action: none; }
.rail-knob.ok { background: var(--spawn); }
.tank { width: 110px; height: 180px; border-radius: 12px; border: 2px solid var(--line); background: rgba(255,255,255,0.05); display: flex; align-items: flex-end; overflow: hidden; }
.tank-fill { width: 100%; height: 0; background: linear-gradient(180deg, #ffd166, #ff8a2a); }
.hold-btn { touch-action: none; }
.task-canvas { width: 100%; max-width: 320px; border-radius: 12px; touch-action: none; }
.hexes { display: grid; grid-template-columns: repeat(4, 60px); gap: 8px; }
.hex { width: 60px; height: 60px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.12); cursor: pointer; }
.hex.red { background: #e0343a; }
.numpad { display: grid; grid-template-columns: repeat(5, 54px); gap: 8px; }
.num { height: 54px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.08); font-family: var(--font-display); font-weight: 800; cursor: pointer; }
.num.ok { background: var(--spawn); color: var(--ink-on-spawn); }
.numpad.shake { animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.dial { position: relative; width: 200px; height: 200px; border-radius: 50%; border: 3px solid var(--line); touch-action: none; cursor: pointer; }
.dial-zone { position: absolute; inset: -3px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--spawn); }
.dial-mark { position: absolute; left: 50%; top: 50%; width: 4px; height: 96px; margin: -96px 0 0 -2px; background: #fff; transform-origin: 50% 100%; border-radius: 2px; }

.overlay-meeting { align-items: stretch; padding: 10px; }
.meeting { width: 100%; max-width: 980px; margin: auto; background: linear-gradient(180deg, rgba(22, 26, 52, 0.98), rgba(8, 10, 26, 0.99)); border: 1px solid var(--line); border-radius: 22px; padding: 16px; max-height: calc(100dvh - 20px); display: flex; flex-direction: column; gap: 10px; }
.meeting-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.meeting-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.05rem; }
.timer { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--imp); }
.result { margin: 0; font-weight: 700; color: #ffd166; }
.result[hidden] { display: none; }
.meeting-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; min-height: 0; flex: 1; }
.vote-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; overflow: auto; }
.vcard { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(255,255,255,0.05); border-radius: 12px; padding: 8px 10px; font-size: 0.85rem; cursor: pointer; min-height: 46px; }
.vcard.sel { border-color: var(--spawn); }
.vcard.dead { opacity: 0.45; cursor: default; }
.vcard b { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard .tag { font-size: 0.68rem; color: var(--fg-2); }
.vcard .tag.voted { color: var(--spawn); }
.vcard .votes { color: #ffd166; letter-spacing: 2px; font-size: 0.7rem; }
.chat { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.chat-log { flex: 1; min-height: 120px; max-height: 40vh; overflow: auto; background: rgba(0,0,0,0.3); border-radius: 12px; padding: 8px 10px; font-size: 0.82rem; line-height: 1.45; }
.chat-row { display: flex; align-items: baseline; gap: 6px; }
.chat-row .sw { width: 10px; height: 10px; }
.quick-row { display: flex; flex-wrap: wrap; gap: 6px; }
.quick { border: 1px solid var(--line); background: rgba(255,255,255,0.06); color: var(--fg); border-radius: 999px; padding: 6px 10px; font-size: 0.74rem; cursor: pointer; }
.chat-row-in { display: flex; gap: 6px; }
.chat-row-in input:disabled { opacity: 0.4; }
.card-win { text-align: center; }
.card-win .card-actions { justify-content: center; }
.how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.how li { display: flex; gap: 12px; align-items: flex-start; color: var(--fg-2); line-height: 1.5; font-size: 0.9rem; }
.how-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 800; }
.ic-a { background: linear-gradient(180deg, #4fd1ff, #1f6bb8); }
.ic-b { background: linear-gradient(180deg, #ff6b6b, #b02a2a); }
.ic-c { background: linear-gradient(180deg, #ffd166, #c97a12); }
.keys { margin: 14px 0 0; font-size: 0.78rem; color: var(--fg-2); line-height: 1.7; }
kbd { font-family: inherit; font-weight: 700; font-size: 0.78em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--glass-2); margin: 0 1px; }

@media (max-width: 700px) {
  .meeting-body { grid-template-columns: 1fr; }
  .chat-log { max-height: 26vh; }
  .vote-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tasks-box { width: min(300px, 62vw); padding: 6px 8px; }
  .tasks-head { font-size: 0.74rem; }
  #tasks { font-size: 0.7rem; }
  .chip { padding: 6px 10px; font-size: 0.7rem; white-space: nowrap; }
  .icon-btn { width: 32px; height: 32px; }
  .act-primary { width: 84px; height: 84px; font-size: 0.85rem; }
  .hexes { grid-template-columns: repeat(4, 54px); }
  .numpad { grid-template-columns: repeat(5, 48px); }
}
@media (prefers-reduced-motion: reduce) { .card, .eject-text { animation: none; } }

/* ---- v2: room banner, map, cameras, lobby chip */
.room-banner { position: fixed; left: 50%; top: 22%; transform: translateX(-50%); z-index: 4; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.2rem, 3.4vw, 2.2rem); letter-spacing: 0.06em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.85); pointer-events: none; }
.room-banner[hidden] { display: none; }
.room-banner.fade { animation: room-fade 1.9s ease forwards; }
@keyframes room-fade { 0% { opacity: 0; transform: translateX(-50%) translateY(8px); } 15% { opacity: 1; transform: translateX(-50%) translateY(0); } 70% { opacity: 1; } 100% { opacity: 0; } }
.chip-btn { cursor: pointer; color: var(--fg); font-family: var(--font-body); }
.chip-btn[hidden] { display: none; }
#tasks li.part { color: #ffe9a8; }
#tasks li.warn { color: #ff9aa2; font-weight: 700; }
.taskbar[hidden] { display: none; }
.act-primary.report { background: rgba(255, 77, 90, 0.9); border-color: var(--imp); color: #fff; }
.overlay-map { background: rgba(3, 4, 12, 0.72); }
.map-card { width: min(96vw, 980px); height: min(86dvh, 640px); background: linear-gradient(180deg, rgba(22, 26, 52, 0.97), rgba(8, 10, 26, 0.99)); border: 1px solid var(--line); border-radius: 22px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.map-box { position: relative; flex: 1; min-height: 0; }
#map-canvas { position: absolute; inset: 0; display: block; }
#map-buttons { position: absolute; inset: 0; pointer-events: none; }
.sab-btn { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; border: 2px solid var(--imp); background: rgba(255, 77, 90, 0.85); color: #fff; font-weight: 800; border-radius: 999px; padding: 9px 16px; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.sab-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.overlay-cams { position: fixed; inset: 0; z-index: 25; pointer-events: none; }
.overlay-cams[hidden] { display: none; }
.cam-frame { position: absolute; border: 2px solid rgba(255,255,255,0.35); border-radius: 6px; box-shadow: inset 0 0 40px rgba(0,0,0,0.6); background: repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 4px); }
.cam-frame span { position: absolute; left: 8px; top: 6px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; color: #d8f6ff; text-shadow: 0 1px 3px #000; }
.cams-top { position: absolute; left: 0; right: 0; top: 0; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: rgba(5, 7, 15, 0.92); pointer-events: auto; }
.cams-top b { flex: 1; font-family: var(--font-display); font-size: 0.9rem; }
.rec { color: #ff4d5a; font-weight: 800; font-size: 0.8rem; animation: blink 0.9s infinite alternate; }

/* ---- v2 task mini-games */
.accept { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 14px 28px; border-radius: 16px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); }
.accept-lamp { width: 26px; height: 26px; border-radius: 50%; background: #3a1418; box-shadow: inset 0 0 6px #000; }
.accept-lamp.on { background: #31e981; box-shadow: 0 0 18px #31e981; }
.accept-lever { width: 120px; height: 64px; border-radius: 14px; border: 2px solid var(--line); background: linear-gradient(180deg, #4a5468, #2a3142); color: #fff; font-weight: 800; letter-spacing: 0.1em; cursor: pointer; transition: transform 0.2s; }
.accept-lever.on { transform: translateY(8px); background: linear-gradient(180deg, #31e981, #1a9c6a); color: #0b1a12; }
.sliders { display: flex; gap: 10px; justify-content: center; }
.slider { display: flex; flex-direction: column; align-items: center; gap: 6px; opacity: 0.55; }
.slider.target { opacity: 1; }
.slider-track { position: relative; width: 18px; height: 190px; border-radius: 999px; background: rgba(255,255,255,0.1); border: 1px solid var(--line); touch-action: none; }
.slider.target .slider-track { box-shadow: 0 0 14px rgba(255, 209, 102, 0.6); border-color: #ffd166; }
.slider-knob { position: absolute; left: 50%; bottom: 0; width: 34px; height: 22px; margin-left: -17px; border-radius: 8px; background: #8a94a8; touch-action: none; }
.slider.target .slider-knob { background: #ffd166; cursor: grab; }
.slider-knob.ok { background: #31e981; }
.slider-label { font-size: 0.66rem; color: var(--fg-2); font-weight: 700; }
.simon { display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; }
.simon-cell { width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.08); cursor: pointer; transition: background 0.1s, box-shadow 0.1s; }
.simon-cell.on { background: #4fd1ff; box-shadow: 0 0 20px #4fd1ff; }
.simon-cell.bad { background: #ff4d5a; box-shadow: 0 0 20px #ff4d5a; }
.chute-wrap { display: flex; align-items: flex-end; gap: 14px; }
.chute { position: relative; width: 170px; height: 200px; border-radius: 10px 10px 4px 4px; border: 2px solid var(--line); background: rgba(255,255,255,0.04); overflow: hidden; }
.trash { position: absolute; width: 26px; height: 22px; border-radius: 6px; transition: transform 0.4s ease-in, opacity 0.4s; }
.trash.gone { transform: translateY(240px); opacity: 0; }
.chute-lever { width: 70px; height: 150px; border-radius: 14px; border: 2px solid var(--line); background: linear-gradient(180deg, #ff6b6b, #b02a2a); color: #fff; font-size: 1.4rem; font-weight: 800; cursor: pointer; touch-action: none; transition: transform 0.12s; }
.chute-lever.down { transform: translateY(16px); }
.filter { position: relative; width: 100%; max-width: 330px; height: 220px; border-radius: 12px; border: 2px solid var(--line); background: repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 14px), #13202a; touch-action: none; overflow: hidden; }
.filter-vent { position: absolute; left: 0; top: 0; bottom: 0; width: 12%; background: repeating-linear-gradient(0deg, #05070f 0 6px, #2a3142 6px 12px); }
.leaf { position: absolute; width: 34px; height: 20px; border-radius: 0 100% 0 100%; background: #6fc04a; cursor: grab; touch-action: none; box-shadow: inset -4px -2px 0 rgba(0,0,0,0.15); }
.leaf.gone { opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.pots { display: flex; gap: 12px; }
.pot { position: relative; width: 62px; height: 110px; border: 0; background: none; cursor: pointer; }
.pot::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 0; height: 40px; border-radius: 0 0 14px 14px; background: #a0603a; }
.plant { position: absolute; left: 50%; bottom: 36px; width: 16px; height: 34px; margin-left: -8px; border-radius: 8px 8px 0 0; background: #6a8f4a; transition: height 0.3s, background 0.3s; }
.plant.grown { height: 56px; background: #4fc03a; }
.pot-gauge { position: absolute; right: -4px; bottom: 6px; width: 8px; height: 60px; border-radius: 4px; background: rgba(255,255,255,0.12); overflow: hidden; z-index: 1; }
.pot-level { position: absolute; left: 0; right: 0; bottom: 0; background: #4fd1ff; }
.pot.splash { filter: brightness(1.3); }
.code-card { display: flex; flex-direction: column; align-items: center; padding: 8px 20px; border-radius: 10px; background: linear-gradient(135deg, #ffd166, #ff8a2a); color: #3a1d00; }
.code-card span { font-size: 0.65rem; font-weight: 800; letter-spacing: 0.15em; }
.code-card b { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: 0.12em; }
.code-display { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 0.1em; padding: 6px 14px; border-radius: 10px; background: rgba(0,0,0,0.35); min-width: 180px; text-align: center; }
.code-display.ok { color: #31e981; }
.keypad { display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; }
.keypad.shake { animation: shake 0.3s; }
.hull { position: relative; width: 100%; max-width: 330px; height: 210px; border-radius: 12px; background: repeating-linear-gradient(0deg, rgba(0,0,0,0.12) 0 1px, transparent 1px 30px), repeating-linear-gradient(90deg, rgba(0,0,0,0.12) 0 1px, transparent 1px 40px), #8a94a8; overflow: hidden; }
.crack { position: absolute; width: 54px; height: 10px; border: 0; border-radius: 2px; background: #05070f; cursor: pointer; box-shadow: 0 0 10px rgba(79,209,255,0.6); }
.crack::before, .crack::after { content: ""; position: absolute; width: 18px; height: 6px; background: #05070f; }
.crack::before { left: 10px; top: -6px; transform: rotate(-30deg); }
.crack::after { right: 6px; top: 8px; transform: rotate(25deg); }
.crack.patched { background: #c9ced8; box-shadow: none; }
.crack.patched::before, .crack.patched::after { background: #c9ced8; }
.tubes { display: flex; gap: 12px; min-height: 120px; align-items: flex-end; }
.tube { position: relative; width: 36px; height: 110px; border-radius: 0 0 18px 18px; border: 2px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.06); cursor: pointer; overflow: hidden; }
.tube i { position: absolute; left: 0; right: 0; bottom: 0; height: 60%; }
.tube.ok { box-shadow: 0 0 16px #31e981; border-color: #31e981; }
.breakers { display: flex; gap: 14px; }
.breaker { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.breaker-light { width: 16px; height: 16px; border-radius: 50%; background: #2a1418; }
.breaker-light.on { background: #ffd166; box-shadow: 0 0 12px #ffd166; }
.breaker-switch { width: 40px; height: 76px; border-radius: 10px; border: 2px solid var(--line); background: linear-gradient(180deg, #2a3142 50%, #8a94a8 50%); cursor: pointer; }
.breaker-switch.on { background: linear-gradient(180deg, #ffd166 50%, #2a3142 50%); }
.wheel { position: relative; width: 190px; height: 190px; border-radius: 50%; border: 12px solid #c9ced8; background: radial-gradient(circle, #8a94a8 0 18%, transparent 19%); cursor: grab; touch-action: none; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.spoke { position: absolute; left: 50%; top: 50%; width: 166px; height: 12px; margin: -6px 0 0 -83px; border-radius: 6px; background: #c9ced8; }
.sort-area { position: relative; width: 100%; max-width: 340px; height: 250px; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); touch-action: none; overflow: hidden; }
.sort-area.shake { animation: shake 0.3s; }
.bins { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; display: flex; gap: 8px; padding: 8px; }
.bin { flex: 1; border-radius: 10px; border: 2px dashed rgba(255,255,255,0.35); display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; font-size: 0.78rem; font-weight: 700; color: var(--fg-2); }
.item { position: absolute; width: 34px; height: 34px; cursor: grab; touch-action: none; z-index: 2; }
.item.can { border-radius: 50%; background: radial-gradient(circle at 35% 35%, #9fd0ff, #2d5bff); }
.item.box { border-radius: 4px; background: linear-gradient(135deg, #ffc27a, #ff8a2a); }
.item.sorted { pointer-events: none; opacity: 0.85; transition: left 0.2s, top 0.2s; }
.task-canvas.round { border-radius: 50%; max-width: 240px; }
@media (max-width: 700px) {
  .map-card { height: 78dvh; padding: 10px; }
  .simon { grid-template-columns: repeat(3, 56px); }
  .simon-cell { width: 56px; height: 56px; }
  .slider-track { height: 150px; }
  .sliders { gap: 6px; }
}

body.mode-cams .hud, body.mode-cams .actions, body.mode-cams .stick, body.mode-cams #labels, body.mode-cams .room-banner { display: none; }
