:root {
  --ink: #eaf7f4;
  --muted: #8aa3a2;
  --void: #031016;
  --deep: #071b22;
  --panel: rgba(8, 31, 38, 0.78);
  --line: rgba(137, 232, 214, 0.2);
  --cyan: #62f6d2;
  --acid: #d8ff54;
  --orange: #ff6938;
  --yellow: #ffd05b;
  --display: Impact, Haettenschweiler, "Franklin Gothic Condensed", sans-serif;
  --body: "Trebuchet MS", Verdana, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--void); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--body);
  background:
    radial-gradient(circle at 18% 12%, rgba(30, 157, 145, 0.17), transparent 34rem),
    radial-gradient(circle at 90% 85%, rgba(255, 105, 56, 0.1), transparent 30rem),
    linear-gradient(145deg, #020b10, #061921 54%, #031016);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
.hidden { display: none !important; }

.starfield, .starfield::before, .starfield::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.8) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(98,246,210,.55) 0 1px, transparent 1.5px);
  background-position: 0 0, 52px 71px;
  background-size: 137px 137px, 211px 211px;
}
.starfield::before { transform: scale(.8) rotate(8deg); opacity: .4; }
.starfield::after { transform: scale(1.2) rotate(-5deg); opacity: .2; }

.masthead {
  width: min(1480px, calc(100% - 44px));
  height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid var(--cyan); border-radius: 50%;
  color: var(--cyan); font-family: var(--display); font-size: 21px; letter-spacing: -2px;
  box-shadow: inset 0 0 18px rgba(98,246,210,.12), 0 0 18px rgba(98,246,210,.08);
}
.brand-mark span { color: var(--orange); }
.brand > span:last-child { display: flex; flex-direction: column; line-height: .9; letter-spacing: 2px; }
.brand b { font-family: var(--display); font-size: 22px; font-weight: 500; }
.brand em { color: var(--orange); font-family: var(--display); font-size: 14px; font-style: normal; letter-spacing: 4px; }
.signal { display: flex; align-items: center; gap: 9px; color: #6f8988; font-size: 10px; font-weight: 900; letter-spacing: 2px; }
.signal i { width: 8px; height: 8px; border-radius: 50%; background: #667373; box-shadow: 0 0 0 4px rgba(102,115,115,.1); }
.signal.online { color: var(--cyan); }
.signal.online i { background: var(--cyan); box-shadow: 0 0 15px var(--cyan); animation: pulse 1.7s infinite; }

main { width: min(1480px, calc(100% - 44px)); margin: 0 auto; }
.view { animation: reveal .55s cubic-bezier(.2,.75,.2,1) both; }
.glass {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(15,45,53,.88), rgba(4,21,27,.88));
  box-shadow: 0 24px 80px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.025);
  backdrop-filter: blur(16px);
}
.eyebrow { margin: 0 0 14px; color: var(--cyan); font-size: 10px; font-weight: 900; letter-spacing: 4px; }

.entry-grid { min-height: calc(100vh - 82px); display: grid; grid-template-columns: 1.35fr .65fr; align-items: center; gap: clamp(50px, 8vw, 130px); padding: 50px 4vw 80px; }
.hero-panel { position: relative; }
.hero-panel h1 { margin: 0; font-family: var(--display); font-size: clamp(66px, 8.4vw, 142px); font-weight: 500; line-height: .78; letter-spacing: 1px; text-transform: uppercase; }
.hero-panel h1 span { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.4); }
.hero-copy { max-width: 650px; margin: 34px 0 26px; color: #a5bcba; font-size: clamp(14px, 1.2vw, 18px); line-height: 1.65; }
.feature-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-strip span { padding: 7px 12px; border: 1px solid var(--line); color: var(--cyan); font-size: 9px; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; }
.orbit-graphic { position: absolute; width: 360px; aspect-ratio: 1; right: -90px; top: 3%; z-index: -1; opacity: .34; border: 1px solid rgba(98,246,210,.3); border-radius: 50%; animation: spin 26s linear infinite; }
.orbit-graphic::before, .orbit-graphic::after { content: ""; position: absolute; border: 1px solid var(--line); border-radius: 50%; inset: 16%; }
.orbit-graphic::after { inset: 34%; }
.orbit-graphic i { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); top: 10%; left: 25%; box-shadow: 0 0 16px var(--orange); }
.orbit-graphic i:nth-child(2) { top: 76%; left: 80%; background: var(--cyan); }
.orbit-graphic i:nth-child(3) { top: 46%; left: -1%; background: var(--acid); }
.orbit-graphic b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 70px; color: rgba(255,255,255,.08); }

.access-panel { width: 100%; max-width: 470px; justify-self: end; padding: clamp(24px, 3vw, 46px); clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.tab { padding: 13px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
.tab.active { border-color: var(--cyan); color: var(--cyan); }
label { display: block; margin: 0 0 22px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
input { width: 100%; margin-top: 10px; padding: 15px 2px; border: 0; border-bottom: 1px solid rgba(255,255,255,.2); border-radius: 0; background: transparent; color: var(--ink); font-size: 20px; letter-spacing: 1px; }
input::placeholder { color: #4e6666; }
.primary {
  width: 100%; min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 10px; padding: 0 8px 0 22px; border: 0; background: var(--acid); color: #101900; cursor: pointer;
  font-size: 11px; font-weight: 900; letter-spacing: 2px; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: filter .18s, transform .18s;
}
.primary b { width: 42px; height: 42px; display: grid; place-items: center; background: rgba(0,0,0,.12); font-size: 21px; }
.primary:hover:not(:disabled) { filter: brightness(1.13); transform: translateY(-2px); }
.primary:disabled { cursor: not-allowed; filter: grayscale(1); opacity: .45; }
.microcopy { margin: 18px 0 0; color: #617979; font-size: 11px; line-height: 1.5; }
.error { min-height: 20px; margin: 13px 0 0; color: #ff8f6c; font-size: 12px; }

.lobby { min-height: calc(100vh - 82px); padding: clamp(42px, 7vw, 100px) 7vw; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-content: center; }
.lobby-copy { align-self: center; padding-right: 7vw; }
.lobby-copy h2, .meeting h2, .ending h2 { margin: 0 0 20px; font-family: var(--display); font-size: clamp(50px, 7vw, 105px); font-weight: 500; line-height: .88; text-transform: uppercase; }
.lobby-copy > p:last-child { max-width: 550px; color: var(--muted); line-height: 1.7; }
.code-card { min-height: 180px; display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 30px; }
.code-card > span { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: 3px; }
.code-card strong { grid-column: 1 / -1; font-family: var(--display); font-size: clamp(50px, 6vw, 92px); font-weight: 500; line-height: .8; letter-spacing: 10px; color: var(--cyan); }
.ghost { min-height: 40px; padding: 0 15px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--cyan); cursor: pointer; font-size: 9px; font-weight: 900; letter-spacing: 2px; }
.ghost:disabled { opacity: .3; cursor: not-allowed; }
.code-card .ghost { grid-row: 1; grid-column: 2; }
.crew-card { grid-column: 2; padding: 30px; }
.section-title { display: flex; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 2px; }
.section-title b { color: var(--cyan); }
.lobby-players { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 20px 0; }
.crew-chip { display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 10px; min-height: 52px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.025); }
.crew-chip i, .vote-card i { width: 18px; height: 26px; border-radius: 9px 9px 6px 6px; background: var(--crew); box-shadow: 0 0 12px color-mix(in srgb, var(--crew), transparent 50%); }
.crew-chip span { overflow: hidden; text-overflow: ellipsis; }
.crew-chip b { grid-column: 2; color: var(--muted); font-size: 7px; letter-spacing: 1.5px; }
.crew-card > p { color: var(--muted); font-size: 12px; }
.text-button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; }
.text-button:hover { color: var(--orange); }
.leave-button { grid-column: 2; justify-self: end; }

.game { padding: 22px 0 38px; }
.game-topbar { display: grid; grid-template-columns: 120px 100px 180px 1fr; align-items: center; min-height: 66px; padding: 10px 22px; margin-bottom: 14px; }
.game-topbar > div:not(.task-progress) { display: flex; flex-direction: column; gap: 3px; }
.game-topbar span, .task-progress b { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: 2px; }
.game-topbar strong { font-family: var(--display); font-size: 20px; font-weight: 500; letter-spacing: 2px; }
.role-readout strong[data-role="crew"] { color: var(--cyan); }
.role-readout strong[data-role="saboteur"] { color: var(--orange); }
.task-progress { display: flex; flex-direction: column; gap: 9px; }
.task-progress > span { display: flex; justify-content: space-between; }
.task-progress em { color: var(--ink); font-size: 10px; font-style: normal; }
.task-progress > i { height: 7px; overflow: hidden; background: rgba(255,255,255,.07); }
.task-progress > i b { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #21c4a8, var(--acid)); box-shadow: 0 0 14px var(--cyan); transition: width .35s; }
.game-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 220px; gap: 14px; align-items: start; }
.mission-panel, .action-panel { min-height: 560px; padding: 20px; }
.task-list { display: grid; gap: 8px; margin-top: 18px; }
.task-item { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 9px; padding: 11px 0; border: 0; border-bottom: 1px solid rgba(255,255,255,.06); background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.task-item > span { font-size: 11px; font-weight: 900; }
.task-item > small { color: var(--muted); font-size: 7px; letter-spacing: 1.5px; }
.task-item.done { opacity: .42; cursor: default; text-decoration: line-through; }
.task-run { grid-column: 2; justify-self: start; margin-top: 7px; padding: 5px 8px; border: 1px solid var(--cyan); background: transparent; color: var(--cyan); cursor: pointer; font-size: 7px; font-weight: 900; letter-spacing: 1px; }
.task-run:disabled { border-color: #42605d; color: #42605d; cursor: not-allowed; }
.station-note, .sabotage-note { margin-top: 22px; padding: 14px; border-left: 2px solid var(--yellow); background: rgba(255,208,91,.05); color: #839996; font-size: 10px; line-height: 1.55; }
.sabotage-note { border-color: var(--orange); }
.sabotage-note b { color: var(--orange); font-size: 9px; letter-spacing: 1.5px; }
.map-shell { min-width: 0; }
.station-map { position: relative; width: 100%; aspect-ratio: 900 / 560; overflow: hidden; border: 1px solid var(--line); background: #071c23; touch-action: none; clip-path: polygon(13px 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%, 0 13px); }
.map-grid { position: absolute; inset: 0; opacity: .3; background-image: linear-gradient(rgba(109,225,207,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(109,225,207,.08) 1px, transparent 1px); background-size: 4.44% 7.14%; }
.zone { position: absolute; z-index: 2; width: 23%; height: 28%; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; border: 1px solid rgba(255,255,255,.12); background: rgba(15,49,56,.84); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.zone::before { content: ""; position: absolute; inset: 0; opacity: .15; background: radial-gradient(circle at 50% 35%, var(--zone-color), transparent 50%); }
.zone b { z-index: 1; color: #bad0cc; font-family: var(--display); font-size: clamp(10px, 1.25vw, 19px); font-weight: 500; letter-spacing: 1px; }
.zone span { position: absolute; top: 10px; right: 12px; color: rgba(255,255,255,.17); font-family: var(--display); font-size: 26px; }
.zone-bridge { --zone-color:#42d9c8; left: 2%; top: 4%; }
.zone-reactor { --zone-color:#ff6b35; right: 2%; top: 4%; }
.zone-bio { --zone-color:#a5d63f; left: 2%; bottom: 4%; }
.zone-cargo { --zone-color:#ffc857; right: 2%; bottom: 4%; }
.zone-core { --zone-color:#55a7ff; width: 25%; height: 31%; left: 37.5%; top: 34.5%; justify-content: center; align-items: center; }
.corridor { position: absolute; z-index: 1; background: rgba(25,66,72,.8); border: 1px solid rgba(255,255,255,.06); }
.corridor.horizontal { left: 12%; right: 12%; height: 12%; top: 44%; }
.corridor.vertical { top: 15%; bottom: 15%; width: 9%; left: 45.5%; }
.map-entities { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.astronaut { position: absolute; left: var(--x); top: var(--y); width: clamp(15px, 2.1vw, 29px); height: clamp(19px, 2.8vw, 38px); border: 2px solid rgba(0,0,0,.45); border-radius: 48% 48% 34% 34%; background: var(--crew); box-shadow: 0 7px 14px rgba(0,0,0,.5); transform: translate(-50%, -50%); transition: left .11s linear, top .11s linear; }
.astronaut::before { content: ""; position: absolute; width: 28%; height: 65%; right: -24%; top: 22%; border-radius: 4px; background: color-mix(in srgb, var(--crew), black 28%); }
.astronaut i { position: absolute; width: 65%; height: 30%; top: 15%; left: 18%; border: 2px solid rgba(0,0,0,.4); border-radius: 8px; background: linear-gradient(145deg, #d9ffff, #5799a4 65%, #234550); }
.astronaut span { position: absolute; width: 110px; left: 50%; top: calc(100% + 5px); transform: translateX(-50%); text-align: center; text-shadow: 0 2px 3px #000; font-size: clamp(6px, .75vw, 10px); font-weight: 900; }
.astronaut.self { outline: 2px solid var(--acid); outline-offset: 3px; }
.astronaut.ghost { opacity: .32; filter: grayscale(.8); }
.body-marker { position: absolute; left: var(--x); top: var(--y); width: 30px; height: 11px; transform: translate(-50%,-50%) rotate(-8deg); border: 2px solid #6b1516; border-radius: 10px; background: #e74333; box-shadow: 0 0 16px rgba(255,45,32,.6); }
.body-marker::after { content:""; position:absolute; width:9px; height:9px; right:-5px; top:-1px; border-radius:50%; background:#eaf7f4; }
.map-caption { display: flex; justify-content: space-between; padding: 8px 4px; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: 2px; }
.map-caption span:first-child { color: var(--cyan); }
.mobile-pad { display: none; }
.action-panel { display: flex; flex-direction: column; gap: 10px; }
.action-panel .section-title { margin-bottom: 8px; }
.action { min-height: 67px; padding: 10px 13px; border: 1px solid rgba(98,246,210,.25); background: rgba(98,246,210,.05); color: var(--cyan); cursor: pointer; text-align: left; }
.action span, .action small { display: block; }
.action span { font-family: var(--display); font-size: 16px; letter-spacing: 1px; }
.action small { margin-top: 4px; font-size: 7px; font-weight: 900; letter-spacing: 1.2px; opacity: .65; }
.action.danger { border-color: rgba(255,105,56,.5); background: rgba(255,105,56,.09); color: #ff835a; }
.action:disabled { filter: grayscale(.8); opacity: .3; cursor: not-allowed; }
.radar { position: relative; width: min(150px, 85%); aspect-ratio: 1; margin: auto; border: 1px solid var(--line); border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 21%, rgba(98,246,210,.08) 22% 23%); overflow: hidden; }
.radar::before { content:""; position:absolute; inset:50% 0 auto; border-top:1px solid var(--line); }
.radar::after { content:""; position:absolute; inset:0 auto 0 50%; border-left:1px solid var(--line); }
.radar b { position:absolute; inset:0; background: conic-gradient(from 0deg, rgba(98,246,210,.25), transparent 20%); animation: spin 3s linear infinite; }
.radar i { position:absolute; z-index:2; width:4px; height:4px; border-radius:50%; background:var(--acid); box-shadow:0 0 8px var(--acid); }
.radar i:nth-child(1){left:30%;top:34%}.radar i:nth-child(2){left:68%;top:57%}.radar i:nth-child(3){left:48%;top:74%}

.meeting { min-height: calc(100vh - 82px); padding: 40px 6vw 80px; text-align: center; }
.meeting-header { position: relative; max-width: 900px; margin: 0 auto 30px; }
.meeting h2 { font-size: clamp(48px, 6vw, 88px); }
.timer-ring { width: 80px; height: 80px; display: grid; place-items: center; margin: 20px auto; border: 1px solid var(--orange); border-radius: 50%; box-shadow: inset 0 0 24px rgba(255,105,56,.1); }
.timer-ring strong { grid-area: 1/1; font-family: var(--display); font-size: 29px; font-weight: 500; }
.timer-ring span { grid-area: 1/1; align-self: end; margin-bottom: 10px; color: var(--muted); font-size: 7px; letter-spacing: 1px; }
.meetingPrompt, #meetingPrompt { color: var(--muted); }
.vote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; max-width: 1050px; margin: 0 auto 20px; }
.vote-card { min-height: 125px; display: grid; place-items: center; gap: 4px; padding: 16px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.vote-card i { width: 25px; height: 36px; }
.vote-card span { max-width: 130px; overflow: hidden; text-overflow: ellipsis; font-weight: 900; }
.vote-card small { color: var(--cyan); font-size: 7px; letter-spacing: 1.5px; }
.vote-card:hover:not(:disabled) { border-color: var(--orange); transform: translateY(-2px); }
.vote-card:disabled { cursor: not-allowed; opacity: .45; }
.vote-skip { min-width: 220px; }

.ending { min-height: calc(100vh - 82px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; }
.ending h2 { max-width: 950px; }
.ending h2[data-winner="crew"] { color: var(--cyan); }
.ending h2[data-winner="saboteur"] { color: var(--orange); }
.ending > p:not(.eyebrow) { color: var(--muted); }
.reveal-card { width: min(520px, 100%); margin: 25px 0; padding: 13px 22px; color: var(--ink); }
.reveal-line { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.reveal-line:last-child { border-bottom: 0; }
.reveal-line b { color: var(--cyan); font-size: 9px; letter-spacing: 1.5px; }
.reveal-line.saboteur b { color: var(--orange); }
.ending .primary { max-width: 360px; }
.end-orbit { position:absolute; z-index:-1; width:min(500px,80vw); aspect-ratio:1; border:1px solid var(--line); border-radius:50%; opacity:.3; animation:spin 28s linear infinite; }
.end-orbit i { position:absolute; inset:17%; border:1px solid var(--line); border-radius:50%; }
.end-orbit b { position:absolute; left:48%; top:-12px; color:var(--acid); font-size:25px; }

.toast { position: fixed; z-index: 20; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); max-width: calc(100% - 32px); padding: 12px 18px; border: 1px solid var(--cyan); background: #092029; color: var(--cyan); box-shadow: 0 10px 50px rgba(0,0,0,.5); opacity: 0; transform: translate(-50%, 20px); pointer-events: none; font-size: 12px; transition: .25s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast[data-kind="error"] { border-color: var(--orange); color: #ff9471; }

@keyframes reveal { from { opacity: 0; transform: translateY(12px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

@media (max-width: 1100px) {
  .entry-grid { grid-template-columns: 1fr .75fr; gap: 35px; padding-inline: 0; }
  .game-layout { grid-template-columns: 210px 1fr; }
  .action-panel { grid-column: 1 / -1; min-height: auto; display: grid; grid-template-columns: repeat(3, 1fr) auto; align-items: center; }
  .action-panel .section-title { grid-column: 1 / -1; }
  .radar { display: none; }
}

@media (max-width: 760px) {
  .masthead, main { width: min(100% - 24px, 1480px); }
  .masthead { height: 64px; }
  .brand-mark { width: 38px; height: 38px; font-size: 17px; }
  .brand b { font-size: 18px; }.brand em { font-size: 10px; }
  .entry-grid { min-height: calc(100dvh - 64px); grid-template-columns: 1fr; align-content: center; gap: 32px; padding: 38px 0 60px; }
  .hero-panel h1 { font-size: clamp(52px, 18vw, 88px); }
  .hero-copy { margin: 24px 0 18px; font-size: 13px; }
  .orbit-graphic { width: 240px; right: -60px; top: -5%; }
  .access-panel { max-width: none; padding: 25px; }
  .lobby { min-height: calc(100dvh - 64px); grid-template-columns: 1fr; padding: 35px 0 55px; }
  .lobby-copy { padding: 0; }.lobby-copy h2 { font-size: 58px; }
  .crew-card, .leave-button { grid-column: 1; }
  .code-card strong { font-size: 55px; letter-spacing: 7px; }
  .game { padding-top: 12px; }
  .game-topbar { grid-template-columns: 1fr 1fr; gap: 13px; padding: 14px; }
  .task-progress { grid-column: 1 / -1; }
  .game-layout { display: flex; flex-direction: column; }
  .map-shell { order: 1; width: 100%; }
  .mission-panel { order: 2; width: 100%; min-height: auto; }
  .action-panel { order: 3; width: 100%; grid-template-columns: 1fr 1fr; }
  .action-panel .text-button { grid-column: 1 / -1; }
  .station-map { width: calc(100% + 24px); margin-left: -12px; aspect-ratio: 1 / .78; }
  .zone { padding: 7px; }.zone span { font-size: 16px; top:5px; right:6px; }
  .astronaut { width: 18px; height: 25px; }.astronaut span { font-size: 7px; }
  .mobile-pad { width: 174px; height: 166px; margin: 8px auto 2px; display: grid; grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(3, 52px); gap: 5px; justify-content: center; touch-action: none; }
  .mobile-pad button { border: 1px solid var(--line); background: rgba(10,38,45,.92); color: var(--cyan); border-radius: 8px; user-select: none; -webkit-user-select: none; }
  .mobile-pad button:active { background: var(--cyan); color: #041217; }
  .mobile-pad [data-dir="up"] { grid-column:2; }.mobile-pad [data-dir="left"] { grid-column:1; grid-row:2; }.mobile-pad .pad-core { grid-column:2; grid-row:2; opacity:.35; }.mobile-pad [data-dir="right"] { grid-column:3; grid-row:2; }.mobile-pad [data-dir="down"] { grid-column:2; grid-row:3; }
  .meeting { min-height: calc(100dvh - 64px); padding-inline: 0; }
  .vote-grid { grid-template-columns: repeat(2, 1fr); }
  .vote-card { min-height: 105px; }
}

@media (max-width: 420px) {
  .signal span { display: none; }
  .feature-strip span { font-size: 8px; }
  .lobby-players { grid-template-columns: 1fr; }
  .action-panel { grid-template-columns: 1fr; }
  .action-panel .section-title, .action-panel .text-button { grid-column: 1; }
  .zone b { font-size: 8px; }
}
