/* screen.css — the big screen: lobby, bridge, debrief. Sized for a TV across the room. */

/* ── lobby ──────────────────────────────────────────────────────────────── */
.slobby {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 3vw;
  padding: 3vh 3vw;
  align-items: start;
}
@media (max-width: 900px) { .slobby { grid-template-columns: 1fr; } }
.sl-left { display: flex; flex-direction: column; align-items: center; gap: 2.4vh; }
.sl-left .logo .l1 { font-size: clamp(34px, 4.6vw, 96px); }
.sl-left .logo .l2 { font-size: clamp(56px, 8vw, 170px); }
.sl-join { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sl-url { font-family: var(--font-mono); font-size: clamp(16px, 1.5vw, 28px); color: var(--ink-dim); }
.sl-code {
  font-family: var(--font-display);
  font-size: clamp(80px, 11vw, 220px);
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--amber);
  text-shadow: 0 6px 0 #6a4500, 0 0 40px rgba(255, 182, 39, 0.35);
  padding-left: 0.18em;
}
.sl-qr { width: clamp(160px, 15vw, 300px); height: auto; border-radius: 14px; background: #fff; padding: 8px; image-rendering: pixelated; }
.sl-left .promise { font-size: clamp(16px, 1.4vw, 26px); max-width: 32ch; }

.sl-right { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.sl-crew-title { font-family: var(--font-display); letter-spacing: 0.08em; font-size: 22px; color: var(--ink-dim); margin-bottom: 10px; }
.sl-crew { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; min-height: 60px; }
.sl-empty { grid-column: 1 / -1; color: var(--ink-faint); font-size: 20px; }
.sl-mate {
  position: relative;
  border-radius: 14px;
  padding: 10px 14px;
  background: linear-gradient(180deg, hsl(var(--hue) 60% 42%), hsl(var(--hue) 55% 26%));
  border: 2px solid hsl(var(--hue) 70% 62%);
  display: flex;
  flex-direction: column;
  animation: tile-in 0.4s ease-out;
}
.sl-mate.off { filter: grayscale(0.8) brightness(0.6); }
.sl-mate.poked { animation: poke 0.35s ease-out; }
@keyframes poke { 30% { transform: translateY(-14px) scale(1.06) rotate(-2deg); } }
@keyframes tile-in { from { transform: scale(0.4); opacity: 0; } }
.sl-mate-name { font-family: var(--font-display); font-size: clamp(22px, 1.9vw, 36px); letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-mate-state { font-size: 14px; font-family: var(--font-display); letter-spacing: 0.08em; opacity: 0.8; }
.sl-kick { position: absolute; top: 4px; right: 6px; background: none; border: 0; color: rgba(255, 255, 255, 0.5); font-size: 20px; cursor: pointer; }
.sl-optpanel { display: flex; flex-direction: column; gap: 8px; }
.sl-ship { width: 100%; max-width: 360px; height: auto; align-self: center; }
.sl-optrow { display: flex; flex-direction: column; gap: 6px; }
.sl-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  border: 2px solid var(--line);
  background: #0a0f22;
  color: var(--ink-dim);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-size: 16px;
  cursor: pointer;
}
.pill.on { background: var(--shield); color: #00202a; border-color: var(--shield); }
.sl-blurb { color: var(--ink-faint); font-size: 15px; margin-top: -2px; }
.sl-start { align-self: stretch; font-size: clamp(36px, 3vw, 60px); min-height: 96px; }
.sl-hint { text-align: center; color: var(--ink-dim); margin: 0; }
.sl-voyages { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.sl-voyage { font-size: 15px; color: var(--ink-dim); }
.sl-voyage.good::before { content: '✓ '; color: var(--ok); }
.sl-voyage.bad::before { content: '✗ '; color: var(--red); }
.sl-toggles { justify-content: flex-start; }

/* ── bridge ─────────────────────────────────────────────────────────────── */
body[data-screen='bridge'] { overflow: hidden; background: #000; }
.bridge { position: fixed; inset: 0; background: #000; }
.bridge-canvas { display: block; }
.bridge-menu { position: fixed; right: 10px; bottom: 10px; display: flex; gap: 6px; opacity: 0.25; transition: opacity 0.2s; }
.bridge-menu:hover { opacity: 1; }
.bm-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: rgba(10, 15, 34, 0.9); color: var(--ink); cursor: pointer; font-size: 18px; }
.bridge-unlock { position: fixed; left: 50%; top: 46%; transform: translateX(-50%); z-index: 10; }

/* ── debrief ────────────────────────────────────────────────────────────── */
.debrief { min-height: 100vh; padding: 2.5vh 3vw; display: flex; flex-direction: column; gap: 1.6vh; }
.db-wait { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.db-head { text-align: center; }
.db-title { font-family: var(--font-display); font-size: clamp(54px, 7vw, 140px); line-height: 0.95; letter-spacing: 0.02em; animation: title-in 0.7s cubic-bezier(0.2, 1.6, 0.4, 1); }
.db-title.good { color: var(--ok); text-shadow: 0 6px 0 #0d4a1c; }
.db-title.bad { color: var(--red); text-shadow: 0 6px 0 #5a0a0e; }
@keyframes title-in { from { transform: scale(2.2); opacity: 0; } }
.db-sub { font-family: var(--font-display); letter-spacing: 0.06em; color: var(--ink-dim); font-size: clamp(16px, 1.5vw, 28px); margin-top: 6px; }
.db-shiprow { display: grid; grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr); gap: 2vw; align-items: center; }
.db-ship { width: 100%; height: auto; }
.db-score { text-align: center; }
.db-points { font-family: var(--font-display); font-size: clamp(54px, 5.5vw, 110px); color: var(--amber); line-height: 1; }
.db-bonus { font-size: 15px; color: var(--ink-dim); margin-top: 6px; }
.db-bonus div { display: flex; justify-content: space-between; gap: 12px; }
.db-bonus b { color: var(--ok); font-weight: 600; }
.db-best { margin-top: 8px; font-family: var(--font-display); letter-spacing: 0.06em; color: var(--amber); }
.db-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4vw; flex: 1; min-height: 0; }
@media (max-width: 1100px) { .db-grid { grid-template-columns: 1fr 1fr; } }
.db-grid .panel { display: flex; flex-direction: column; gap: 8px; transition: opacity 0.4s, transform 0.4s; }
.db-hidden { opacity: 0; transform: translateY(20px); }
.db-lines { display: flex; flex-direction: column; gap: 4px; }
.db-line { display: flex; justify-content: space-between; gap: 10px; font-size: clamp(14px, 1.1vw, 20px); border-bottom: 1px dashed rgba(255, 255, 255, 0.08); padding-bottom: 3px; }
.db-line b { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.04em; }
.db-line.good b { color: var(--ok); }
.db-line.bad b { color: var(--red); }
.db-award { border-left: 4px solid var(--amber); padding: 2px 0 2px 10px; }
.db-award-who { font-family: var(--font-display); letter-spacing: 0.04em; font-size: clamp(16px, 1.2vw, 22px); }
.db-award-title { font-family: var(--font-display); color: var(--amber); font-size: clamp(18px, 1.4vw, 26px); letter-spacing: 0.03em; }
.db-award-txt { color: var(--ink-dim); font-size: 14px; }
.db-tl { max-height: 44vh; overflow: hidden; }
.db-tl-row { display: flex; gap: 12px; font-size: clamp(13px, 1vw, 18px); padding: 2px 0; }
.db-tl-t { font-family: var(--font-mono); color: var(--ink-faint); min-width: 3.4em; }
.db-tl-row.good span:last-child { color: var(--ok); }
.db-tl-row.bad span:last-child { color: #ff9a8f; }
.db-tl-row.threat span:last-child { color: var(--amber); }
.db-tl-row.fault span:last-child { color: var(--shield); }
.db-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
