/* ==========================================================================
   Party touches: reactions, speaking rings, ghosts, the dawn recap, the
   10-second countdown, AFK, the "what now?" line, the first-game coach,
   ship names, bios, the season table and the share card.
   Loaded after retro.css and uses its tokens.
   ========================================================================== */

/* ---------- Top bar: ship name and "what do I do now?" ---------- */
.ship-name { font-family: var(--font-title); font-size: 0.7rem; color: var(--amber); letter-spacing: 0.06em; text-transform: uppercase; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 0 8px rgba(255, 181, 71, 0.45); }
.hud-todo { max-width: min(520px, 70vw); margin: 2px auto 0; font-size: 0.95rem; color: #d6fbff; text-shadow: 0 0 8px rgba(108, 240, 255, 0.35); line-height: 1.15; }
.hud-todo:empty { display: none; }

/* ---------- Emoji reactions ---------- */
.reactions {
  position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%); display: flex; gap: 6px; padding: 5px 8px;
  background: rgba(4, 6, 16, 0.75); border: 1px solid rgba(108, 240, 255, 0.25);
  clip-path: polygon(0 var(--cut), var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}
.reactions .react-btn { width: 44px; height: 40px; padding: 0; font-size: 1.35rem; line-height: 1; background: transparent; border-color: transparent; box-shadow: none; clip-path: none; }
.reactions .react-btn:hover:not(:disabled) { transform: translateY(-3px) scale(1.15); background: rgba(108, 240, 255, 0.12); }
.reactions .react-btn:active:not(:disabled) { transform: scale(0.9); }
.react-float { position: fixed; z-index: 40; pointer-events: none; font-size: 1.7rem; transform: translate(-50%, 0); animation: react-up 1.6s ease-out forwards; }
@keyframes react-up {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.5); }
  15% { opacity: 1; transform: translate(-50%, -14px) scale(1.25); }
  100% { opacity: 0; transform: translate(-50%, -110px) scale(1); }
}

/* ---------- Speaking rings and AFK on the bridge table ---------- */
.seat.speaking .token { box-shadow: 0 0 0 3px #7dffa8, 0 0 14px #7dffa8; animation: talk 0.5s ease-in-out infinite alternate; }
@keyframes talk { to { box-shadow: 0 0 0 4px #7dffa8, 0 0 22px #7dffa8; } }
.seat .afk-badge { position: absolute; left: -9px; bottom: -8px; font-size: 0.75rem; filter: drop-shadow(0 0 3px #000); }
.lobby-players .bio { display: block; color: var(--muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Ghost tools ---------- */
.action.predict span, .action.haunt span { background: radial-gradient(circle at 50% 30%, rgba(185, 164, 255, 0.4), rgba(185, 164, 255, 0.06)); box-shadow: inset 0 0 0 1px rgba(185, 164, 255, 0.45); }
.action.predict, .action.haunt { border-color: rgba(185, 164, 255, 0.45); }
.haunt-menu { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); padding: 10px; display: grid; gap: 6px; width: min(320px, calc(100% - 20px)); z-index: 6; }
.night-ghost { border-color: rgba(185, 164, 255, 0.5); }
.night-ghost h3 { color: #b9a4ff; }
.night-ghost .chat-log { max-height: 200px; min-height: 80px; }
.night-ghost .row { justify-content: space-between; }
.bet-picker .pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin-top: 10px; }
.bet-picker .pick { display: flex; align-items: center; gap: 6px; text-align: left; }
.bet-picker .pick .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.bet-picker .pick.chosen { border-color: #b9a4ff; background: rgba(185, 164, 255, 0.22); }
.bet-picker .pick.dead { opacity: 0.6; }

/* ---------- "Previously on No More Space…" ---------- */
.recap {
  position: absolute; left: 10px; top: 230px; width: min(320px, calc(100% - 20px)); padding: 10px 12px; display: grid; gap: 4px; z-index: 5;
  border-color: rgba(255, 181, 71, 0.5); animation: recap-in 0.45s ease-out;
}
.recap.out { opacity: 0; transform: translateX(-20px); transition: opacity 0.6s, transform 0.6s; }
.recap-title { font-family: var(--font-title); font-size: 0.72rem; color: var(--amber); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2px; }
.recap-line { font-size: 1rem; line-height: 1.15; }
@keyframes recap-in { from { opacity: 0; transform: translateX(-24px); } }

/* The timer block is taller now (timer, black hole, "what now?"), so toasts and banners sit lower. */
body:not(.phase-night):not(.phase-dawn):not(.phase-dusk):not(.phase-lastwords) .toasts { top: 112px; }
body.phase-dawn .toasts, body.phase-dusk .toasts, body.phase-lastwords .toasts { bottom: 132px; } /* above the reactions */
.phase-banner { top: 116px; }

/* ---------- The 10-second countdown ---------- */
.countdown {
  position: absolute; left: 50%; top: 24vh; transform: translateX(-50%); pointer-events: none; z-index: 5;
  font-family: var(--font-digital); font-weight: 900; font-size: 3.2rem; line-height: 1; color: var(--amber);
  text-shadow: 0 0 18px rgba(255, 181, 71, 0.8), 0 0 40px rgba(255, 46, 77, 0.4);
}
.countdown.pop { animation: count-pop 0.9s ease-out; }
@keyframes count-pop { 0% { transform: translateX(-50%) scale(1.5); opacity: 0.3; } 25% { transform: translateX(-50%) scale(1); opacity: 1; } }

/* ---------- First-game coach ---------- */
.coach {
  position: fixed; z-index: 45; width: min(300px, calc(100vw - 16px)); padding: 10px 12px; display: grid; gap: 8px; justify-items: end;
  background: #0b1a2a; border: 1px solid var(--amber); color: #fff3d6; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 181, 71, 0.35);
  animation: coach-in 0.35s cubic-bezier(.2, 1.4, .4, 1);
}
.coach-text { justify-self: stretch; font-size: 1rem; line-height: 1.2; }
.coach-text b { color: var(--amber); }
.coach::after { content: ''; position: absolute; left: var(--arrow, 50%); bottom: -7px; width: 12px; height: 12px; background: #0b1a2a; border-right: 1px solid var(--amber); border-bottom: 1px solid var(--amber); transform: translateX(-50%) rotate(45deg); }
.coach.below::after { bottom: auto; top: -7px; transform: translateX(-50%) rotate(-135deg); }
@keyframes coach-in { from { opacity: 0; transform: translateY(6px) scale(0.96); } }

/* ---------- Lobby: ship name, bio, season ---------- */
.lobby-ship { font-family: var(--font-title); font-size: 0.75rem; color: var(--amber); text-transform: uppercase; letter-spacing: 0.06em; margin: -2px 0 6px; }
.lobby-ship .badge:empty { display: none; }
.bio-field { margin: 4px 0 2px; color: var(--text); }
.bio-field b { color: var(--phosphor); }
.lobby-shipname { margin: 10px 0; }
.season { margin-top: 12px; }
.season-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.season-table th, .season-table td { padding: 3px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.season-table td:nth-child(2) { text-align: left; max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.season-table tr:nth-child(2) td { color: #ffe9b8; }

/* ---------- End screen extras and the share card ---------- */
.bets, .famous-last-words { margin: 10px 0; }
.famous-last-words p { font-size: 1.15rem; margin: 4px 0; }
.share-card { display: grid; gap: 10px; justify-items: center; }
.share-preview { width: min(360px, 100%); height: auto; border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); }

/* ---------- Phones ---------- */
@media (max-width: 820px) {
  .reactions { bottom: 64px; }
  .reactions .react-btn { width: 38px; height: 36px; font-size: 1.2rem; }
  .recap { top: 64px; left: 50%; transform: translateX(-50%); }
  .recap.out { transform: translateX(-50%) translateY(-10px); }
  .hud-todo { font-size: 0.85rem; max-width: 92vw; }
  .ship-name { display: none; }
  .countdown { top: 26vh; font-size: 2.6rem; }
}
body.phase-night .reactions, body.phase-ended .reactions { display: none; }
@media (prefers-reduced-motion: reduce) {
  .react-float, .countdown.pop, .coach, .recap, .seat.speaking .token { animation: none !important; }
}

/* ---------- Invites: the QR code ---------- */
.lobby-invite { display: grid; justify-items: end; gap: 4px; }
.lobby-qr { width: 74px; height: 74px; background: #fff; padding: 3px; cursor: zoom-in; image-rendering: pixelated; border: 1px solid var(--line); }
.qr-modal { display: grid; justify-items: center; gap: 10px; text-align: center; }
.qr-big { width: min(320px, 80vw); height: auto; background: #fff; padding: 8px; image-rendering: pixelated; }

/* ---------- Player card ---------- */
.player-card { display: grid; gap: 8px; }
.player-card-head { display: flex; gap: 12px; align-items: center; }
.player-card .dot.big { width: 34px; height: 34px; border-radius: 50%; flex: none; border: 2px solid rgba(255, 255, 255, 0.5); }
.volume-row { align-items: center; }
.ring .seat:not(.selectable) { cursor: pointer; }

/* ---------- Letters on tokens (colour is never the only cue) ---------- */
.seat .token .initial { font-family: var(--font-title); font-size: 0.72rem; line-height: 1; }

/* ---------- @mentions ---------- */
.chat-log .msg .at { color: var(--amber); font-weight: 700; }
.chat-log .msg.mention { background: rgba(255, 181, 71, 0.14); border-left: 3px solid var(--amber); padding-left: 4px; }

/* ---------- Spectators: watch, react and chat; no action buttons ---------- */
body.is-spectator .actionbar, body.is-spectator .minimap { display: none !important; }

/* ---------- The Ship's Wiki ---------- */
.modal.wide .modal-box { width: min(1000px, 100%); }
.wiki-cta { margin-top: 10px; }
.wiki { display: grid; grid-template-columns: 190px 1fr; grid-template-rows: auto 1fr; gap: 12px 18px; }
.wiki-title { grid-column: 1 / -1; margin: 0; }
.wiki-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; align-self: start; }
.wiki-nav button { text-align: left; background: transparent; box-shadow: none; border-color: transparent; }
.wiki-nav button.active { color: var(--amber); border-color: rgba(255, 181, 71, 0.5); background: rgba(255, 181, 71, 0.1); }
.wiki-page { min-width: 0; display: grid; gap: 12px; align-content: start; }
.wiki-lead { font-size: 1.15rem; line-height: 1.3; margin: 0; }
.wiki-figure { margin: 0; display: grid; gap: 6px; justify-items: center; }
.wiki-figure figcaption { color: var(--muted); font-size: 0.95rem; text-align: center; }
.wiki-svg { width: 100%; max-width: 560px; height: auto; font-family: var(--font-body); }
.wiki-cycle { max-width: 360px; }
.wiki-split { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 16px; align-items: center; }
.wiki-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.25; }
.wiki-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }
.wiki-team { padding: 12px; border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.wiki-team.good { border-color: rgba(108, 240, 255, 0.5); background: rgba(108, 240, 255, 0.06); }
.wiki-team.evil { border-color: rgba(255, 59, 92, 0.5); background: rgba(255, 59, 92, 0.07); }
.wiki-type { display: grid; gap: 2px; }
.wiki-type span { color: var(--muted); font-size: 0.95rem; }
.wiki-goal { margin-top: 4px; color: var(--amber); }
.wiki-vs { align-self: center; font-family: var(--font-title); color: var(--muted); }
.wiki-rule { padding: 10px 12px; border-left: 3px solid var(--amber); background: rgba(255, 181, 71, 0.08); line-height: 1.25; }
.wiki-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wiki-filters button.active { color: var(--amber); border-color: var(--amber); }
.wiki-search { flex: 1; min-width: 140px; }
.wiki-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.wiki-role { padding: 10px; border: 1px solid var(--line); border-top: 3px solid var(--tc, var(--line)); background: rgba(255, 255, 255, 0.03); cursor: pointer; display: grid; gap: 4px; align-content: start; }
.wiki-role:hover { background: rgba(255, 255, 255, 0.06); }
.wiki-role p { margin: 0; line-height: 1.2; }
.wiki-role .tips { margin: 4px 0 0; font-size: 0.95rem; }
.wiki-role-head { display: flex; gap: 10px; align-items: center; }
.wiki-role-icon { font-size: 2rem; line-height: 1; }
.wiki-role-meta { color: var(--muted); font-size: 0.85rem; }
.wiki-system { font-size: 0.92rem; color: #cfe9ff; }
.wiki-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.wiki-legend i { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }
.wiki-lie { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: start; padding: 8px; border: 1px solid var(--line); }
.wiki-lie p { margin: 2px 0 0; line-height: 1.2; color: #cfd6f2; }
.wiki-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.wiki-key { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .wiki { grid-template-columns: 1fr; }
  .wiki-nav { flex-direction: row; flex-wrap: wrap; position: static; }
  .wiki-split, .wiki-teams { grid-template-columns: 1fr; }
  .wiki-vs { justify-self: center; }
}

/* ---------- Text size (Settings): zoom the interface, never the 3D ship ---------- */
#screen-home, #screen-lobby, #hud, #night, .modal, .story, #reveal, .toasts, .coach, .problem, .restart-banner, .reconnect-banner, .replay-start { zoom: var(--ui-zoom, 1); }

/* ---------- Settings ---------- */
.settings { display: grid; gap: 8px; }
.settings h3 { margin-top: 8px; }
.set-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.set-choices { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.set-choices button.active { color: var(--amber); border-color: var(--amber); background: rgba(255, 181, 71, 0.12); }
@media (max-width: 560px) { .set-row { grid-template-columns: 1fr; } .set-choices { justify-content: flex-start; } }
body.no-crt::before, body.no-crt::after { display: none !important; }
.home-buttons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.home-buttons button { background: var(--panel); backdrop-filter: blur(8px); }

/* ---------- Server restart countdown ---------- */
.restart-banner {
  position: fixed; z-index: 50; top: 10px; left: 50%; transform: translateX(-50%); width: min(620px, calc(100% - 24px));
  padding: 10px 14px; text-align: center; background: rgba(40, 24, 4, 0.95); border: 1px solid var(--amber); color: #ffe9b8;
  box-shadow: 0 0 24px rgba(255, 181, 71, 0.35);
}

/* ---------- Robots in the lobby ---------- */
.robot-row { gap: 6px; }

/* ---------- The suspicion web ---------- */
.web { margin: 10px 0; display: grid; justify-items: center; gap: 6px; }
.web .hint { justify-self: stretch; }
.web-svg { width: min(420px, 100%); height: auto; font-family: var(--font-body); }

/* ---------- Replay start card ---------- */
.replay-start { position: fixed; z-index: 30; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 24px; display: grid; gap: 12px; justify-items: center; text-align: center; width: min(460px, calc(100% - 24px)); }
body.screen-replay #hud { display: none; }

/* ---------- Sound captions ---------- */
.captions { position: absolute; right: 12px; bottom: 96px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; pointer-events: none; z-index: 6; }
.caption { padding: 4px 10px; font-size: 1rem; color: #fff; background: rgba(0, 0, 0, 0.78); border-left: 3px solid var(--amber); animation: caption-in 0.18s ease-out; }
@keyframes caption-in { from { opacity: 0; transform: translateX(8px); } }
@media (max-width: 820px) { .captions { bottom: 132px; right: 6px; } .caption { font-size: 0.85rem; } }

/* ---------- The full-screen map (Tab) ---------- */
.map-expand { position: absolute; left: 160px; top: 82px; width: 28px; height: 26px; padding: 0; font-size: 0.95rem; line-height: 1; }
body.screen-lobby .map-expand, body.is-captain .map-expand, body.phase-ended .map-expand, body.is-spectator .map-expand { display: none; }
@media (max-width: 820px) { .map-expand { left: 8px; top: 64px; width: 38px; height: 34px; } }
.bigmap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 7; width: min(94vw, 980px); max-height: 92vh; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: rgba(4, 7, 18, 0.94); }
.bigmap[hidden] { display: none; }
.bigmap-head { display: flex; align-items: center; gap: 12px; }
.bigmap-head h3 { margin: 0; font-size: 1rem; }
.bigmap-head .hint { flex: 1; }
.bigmap canvas { width: 100%; height: auto; max-height: calc(92vh - 60px); object-fit: contain; cursor: pointer; }

/* ---------- Settings: volume sliders ---------- */
.set-sliders { display: grid; gap: 4px; min-width: 210px; }
.set-slider { flex-direction: row; align-items: center; gap: 8px; }
.set-slider span { width: 1.6em; text-align: center; }
input[type='range'] { flex: 1; padding: 0; height: 22px; accent-color: var(--amber); background: transparent; border: none; box-shadow: none; }

/* ---------- Locked visors ---------- */
.swatch.locked { opacity: 0.45; font-size: 0.75rem; line-height: 1; filter: grayscale(0.6); }

/* ---------- Your profile ---------- */
.profile { display: grid; gap: 10px; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.pf-stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.pf-stat b { font-size: 1.35rem; color: var(--amber); font-family: var(--font-title); }
.pf-stat span { font-size: 0.85rem; color: var(--muted); }
.pf-awards { display: flex; flex-wrap: wrap; gap: 5px; }
.pf-unlocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.pf-unlock { display: grid; gap: 3px; padding: 7px 10px; border: 1px solid var(--line); opacity: 0.8; }
.pf-unlock.open { opacity: 1; border-color: rgba(122, 240, 193, 0.5); background: rgba(122, 240, 193, 0.06); }
.pf-bar { position: relative; height: 14px; background: rgba(255, 255, 255, 0.08); }
.pf-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.pf-bar small { position: relative; display: block; text-align: center; font-size: 0.7rem; line-height: 14px; color: #fff; text-shadow: 0 0 3px #000; }

/* ---------- Public ships ---------- */
.public-ships { display: grid; gap: 10px; }
.ship-list { display: grid; gap: 6px; max-height: 55vh; overflow-y: auto; }
.ship-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.ship-main { flex: 1; min-width: 0; }
.ship-main b { margin-right: 8px; }
.ship-main .code { font-family: var(--font-title); font-size: 0.75rem; color: var(--accent); letter-spacing: 0.1em; }

/* ---------- Night: the "I'm done" bar (the night ends when everyone is ready) ---------- */
.night-footer { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; max-width: 1100px; margin: 18px auto 0; padding: 10px 14px; background: rgba(6, 4, 22, 0.94); border: 1px solid rgba(185, 164, 255, 0.45); }
.night-footer button { min-width: 250px; }
.night-footer button.on { border-color: var(--good); }
.night-footer .hint { text-align: center; }
@media (max-width: 560px) { .night-footer button { min-width: 0; width: 100%; } }

/* ---------- Doors: lock the room you are talking in, knock, let people in ---------- */
.action.door { --edge: var(--amber); border-color: rgba(255, 181, 71, 0.55); }
.action.door.dim { opacity: 0.7; }
.door-card { position: absolute; right: 10px; bottom: 150px; z-index: 8; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; max-width: 340px; border-color: rgba(255, 181, 71, 0.6); box-shadow: 0 0 22px rgba(255, 181, 71, 0.3); }
.door-card[hidden] { display: none; }
.knock-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.knock-row > span { flex: 1 1 100%; }
@media (max-width: 820px) { .door-card { bottom: 130px; right: 6px; } }

/* ---------- Scripts (the cast of characters) in the docking bay ---------- */
.lobby-script { display: grid; gap: 8px; margin: 10px 0; }
.lobby-script h3 { margin: 0; }
.script-cards { display: grid; gap: 6px; }
.script-card { display: grid; grid-template-columns: 2.2rem 1fr; grid-template-rows: auto auto auto; gap: 0 10px; align-items: center; text-align: left; padding: 8px 10px; }
.script-card .script-ico { grid-row: 1 / span 3; font-size: 1.8rem; text-align: center; }
.script-card b { font-size: 0.95rem; }
.script-card small { color: var(--muted); text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-size: 0.95rem; line-height: 1.1; }
.script-card .script-min { color: var(--amber); }
.script-card.selected { border-color: var(--amber); background: rgba(255, 181, 71, 0.12); }
.script-card:disabled { cursor: default; opacity: 1; }
.script-current { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.script-current .script-ico { font-size: 1.8rem; }
.script-current small { display: block; color: var(--muted); }
.script-help { padding: 8px 10px; border: 1px solid var(--line); font-size: 1rem; line-height: 1.2; }
.script-help ul { margin: 6px 0 0; padding-left: 1.2em; }
.script-help li { margin-bottom: 4px; }
.hint.warn { color: var(--amber); }

/* ---------- The Clown's last pie ---------- */
.wish { position: fixed; inset: 0; z-index: 12; display: grid; place-items: center; background: rgba(8, 4, 20, 0.78); zoom: var(--ui-zoom, 1); }
.wish[hidden] { display: none; }
.wish-card { width: min(520px, calc(100% - 28px)); max-height: 92vh; overflow-y: auto; display: grid; gap: 10px; text-align: center; padding: 18px 16px; background: var(--panel-solid); border: 2px solid var(--amber); box-shadow: 0 0 40px rgba(255, 181, 71, 0.4); }
.wish-ico { font-size: 3rem; line-height: 1; animation: wish-bob 1.2s ease-in-out infinite; }
@keyframes wish-bob { 50% { transform: translateY(-6px) rotate(8deg); } }
.wish-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.wish-pick { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; }
.wish-pick .dot { width: 12px; height: 12px; border-radius: 50%; }
.wish-pick.chosen { border-color: var(--amber); background: rgba(255, 181, 71, 0.2); }

/* ---------- The Jackpot's wheel ---------- */
.jp-card { position: relative; width: min(640px, calc(100% - 28px)); gap: 14px; border-color: #ffd23f; box-shadow: 0 0 50px rgba(255, 210, 63, 0.45); background: radial-gradient(ellipse at 50% 0%, #3a1240, var(--panel-solid) 70%); }
.jp-title { margin: 0; font-size: 2.2rem; letter-spacing: 0.08em; color: #ffd23f; text-shadow: 0 0 18px rgba(255, 210, 63, 0.7); animation: jp-flash 0.9s steps(2) infinite; }
@keyframes jp-flash { 50% { color: #ff5ab4; text-shadow: 0 0 18px rgba(255, 90, 180, 0.8); } }
.jp-reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.jp-reel { display: grid; justify-items: center; gap: 6px; padding: 10px 6px; border: 3px solid #ffd23f; border-radius: 14px; background: #120618; }
.jp-window { width: 100%; height: 72px; overflow: hidden; border-radius: 8px; background: #fff7e0; box-shadow: inset 0 6px 10px rgba(0, 0, 0, 0.45), inset 0 -6px 10px rgba(0, 0, 0, 0.45); }
.jp-strip { display: flex; flex-direction: column; animation: jp-spin 0.7s linear infinite; }
.jp-reel:nth-child(2) .jp-strip { animation-duration: 0.55s; }
.jp-reel:nth-child(3) .jp-strip { animation-duration: 0.85s; }
.jp-strip span { height: 72px; display: grid; place-items: center; font-size: 2.6rem; line-height: 1; }
@keyframes jp-spin { to { transform: translateY(-50%); } }
.jp-reel.done .jp-strip { animation: none; transform: translateY(-72px); } /* stopped on a skull: nobody can tell what they chose */
.jp-token { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; }
.jp-name { font-size: 1.25rem; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jp-state { font-size: 1.6rem; line-height: 1; }
.jp-rule { margin: 0; font-size: 1.3rem; }
.jp-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#jackpot .jp-buttons button { padding: 20px 10px; font-size: 1.6rem; letter-spacing: 0.06em; }
.jp-live { background: #1d6b3a; border-color: #7dffa8; color: #fff; }
.jp-die { background: #6b1d2a; border-color: #ff5a77; color: #fff; }
.jp-wait { font-size: 2.4rem; }
.jp-timer { font-size: 1.3rem; }
.jp-close { position: absolute; top: 8px; right: 8px; padding: 4px 10px; font-size: 1.2rem; }

/* ---------- The wiki's Scripts page ---------- */
.wiki-script { padding: 12px 14px; margin: 10px 0; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); display: grid; gap: 6px; }
.wiki-script.current { border-color: var(--amber); box-shadow: 0 0 18px rgba(255, 181, 71, 0.2); }
.wiki-script p { margin: 0; }
.wiki-script-roles { display: flex; flex-wrap: wrap; gap: 4px; font-size: 1.4rem; line-height: 1.2; }
.wiki-script-roles span { cursor: help; }
.wiki-scenarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
.wiki-scenario { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.wiki-scenario p { margin: 2px 0 0; font-size: 0.95rem; line-height: 1.25; color: var(--ink); }

/* After the game: a bar with the way back to the docking bay, whenever the reveal is not showing */
.postgame { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 14; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 18px; text-align: center; max-width: min(92vw, 520px); }
.postgame .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
