/* src/client/darkstar.css — Dark Star in the new client (B8; darkstar.mjs). Live's layout and hierarchy, restyled to
 * the brand (brand.css): void panels with hairline borders, Inter Tight for the display text, DM Sans for the rest,
 * no glow. The game's colour is amber (--amber, Dark Star's in the brand): credits, lit tiles, the clue shop, the
 * result's stars; red is the stakes (the final guess, a miss, a loss). Phone (under 700 px): live mobile's dock. */

.ds-root [hidden] { display: none !important; }
.ds-root { --ds-line: rgba(var(--vega-rgb), 0.16); --ds-panel: rgba(5, 5, 7, 0.9); --ds-red: 255, 107, 92; --ds-amber: 255, 192, 97; }
.ds-root button { font: inherit; color: inherit; }

/* The home screen steps aside for the game (and stays hidden through "Explore This Film"'s handoff) */
body.ds-active .chrome .home, body.ds-handoff .chrome .home { opacity: 0 !important; pointer-events: none; }
body.ds-active .chrome .home *, body.ds-handoff .chrome .home * { pointer-events: none !important; }
body.ds-active #sky { cursor: default; }

/* ── HUD ── */
#ds-hud {
  position: fixed; top: calc(16px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 230px; box-sizing: border-box;
  padding: 11px 46px 9px; border: 1px solid var(--ds-line); border-radius: 4px; background: var(--ds-panel);
  color: var(--text); text-align: center; animation: dsIn 0.45s ease both; transition: border-color 0.3s;
}
#ds-hud-head { font: 500 16px/1 var(--display); letter-spacing: -0.02em; color: rgb(var(--ds-amber)); white-space: nowrap; }
#ds-no { color: var(--text); opacity: 0.8; }
#ds-mode { font: 400 9.5px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: rgb(var(--ds-amber)); border: 1px solid rgba(var(--ds-amber), 0.6); border-radius: 3px; padding: 2px 6px; vertical-align: 2px; margin-left: 2px; }
#ds-mode:empty { display: none; }
#ds-hud-actions { display: flex; gap: 14px; align-items: center; }
#ds-hud-actions button, #ds-exit { background: none; border: 0; cursor: pointer; padding: 2px 0; font: 300 10.5px/1.2 var(--body); letter-spacing: 0.09em; text-transform: uppercase; color: var(--grey); transition: color 0.2s; }
#ds-hud-actions button:hover { color: var(--text); }
#ds-exit { position: absolute; top: 5px; right: 8px; padding: 3px 7px; font: 300 19px/1 var(--body); letter-spacing: 0; text-transform: none; }
#ds-exit:hover { color: var(--text); }
#ds-boot-exit { position: fixed; z-index: 61; top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--grey); font: 300 22px/1 var(--body); cursor: pointer; }
#ds-boot-exit:hover, #ds-boot-exit:focus-visible { color: var(--text); }
#ds-results { display: none; }
#ds-hud.warn { border-color: rgba(var(--ds-amber), 0.5); }
#ds-hud.danger { border-color: rgba(var(--ds-red), 0.6); animation: dsDanger 1.4s ease-in-out infinite; }
@keyframes dsDanger { 50% { border-color: rgba(var(--ds-red), 0.25); } }

/* The status row: pips are guesses remaining (deplete right to left), escalating near the end */
#ds-hud-stat { display: flex; align-items: center; gap: 9px; min-height: 18px; font: 300 12px/1 var(--body); color: rgba(242, 242, 240, 0.7); }
#ds-pips { display: flex; gap: 5px; align-items: center; }
.ds-pip { width: 7px; height: 7px; border-radius: 50%; flex: none; border: 1px solid rgba(242, 242, 240, 0.4); box-sizing: border-box; transition: background 0.3s, border-color 0.3s; }
.ds-pip.live { background: rgba(242, 242, 240, 0.8); border-color: transparent; }
.ds-pip.spent { background: transparent; border-color: rgba(242, 242, 240, 0.18); }
.ds-pip.warn { background: rgb(var(--ds-amber)); }
.ds-pip.danger { background: rgb(var(--ds-red)); animation: dsPulse 1s ease-in-out infinite; }
@keyframes dsPulse { 50% { transform: scale(1.35); opacity: 0.6; } }
#ds-remain { font-size: 11.5px; letter-spacing: 0.03em; color: var(--grey); }
#ds-remain:empty { display: none; }
#ds-remain.warn { color: rgb(var(--ds-amber)); }
#ds-remain.danger { color: rgb(var(--ds-red)); font-weight: 400; text-transform: uppercase; letter-spacing: 0.08em; animation: dsBlink 1s ease-in-out infinite; }
@keyframes dsBlink { 50% { opacity: 0.5; } }
.ds-dot { color: var(--grey); }
.ds-cred { color: rgb(var(--ds-amber)); letter-spacing: 0.03em; }
.ds-cred b { font-weight: 400; }
#ds-credits { display: inline-block; }
#ds-credits.bump { animation: dsBump 0.6s cubic-bezier(.2, 1.6, .4, 1); will-change: transform; }
@keyframes dsBump { 35% { transform: scale(1.9); } }
body.ds-hard .ds-credonly, body.ds-hard #ds-clues { display: none !important; }

/* ── The dock: masked title, warm line, guess field, clue shop, the guesses so far ── */
#ds-panel {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(92vw, 680px); box-sizing: border-box;
  padding: 15px 24px 16px; border: 1px solid var(--ds-line); border-radius: 4px; background: var(--ds-panel); color: var(--text);
  animation: dsIn 0.45s ease both;
}
@keyframes dsIn { from { opacity: 0; } to { opacity: 1; } }
#ds-panel.danger #ds-input { border-color: rgba(var(--ds-red), 0.55); }
#ds-mask { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; max-width: 100%; padding: 2px 0 4px; }
.ds-word { display: flex; gap: 4px; }
.ds-tile {
  min-width: 25px; height: 36px; padding: 0 1px; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  border-bottom: 1.5px solid rgba(242, 242, 240, 0.34); font: 500 23px/1 var(--display); color: var(--text);
  transition: color 0.3s, border-color 0.3s;
}
.ds-tile.lit { border-bottom-color: rgba(var(--ds-amber), 0.8); color: rgb(var(--ds-amber)); }
.ds-tile.punct { min-width: 9px; border-bottom-color: transparent; color: rgba(242, 242, 240, 0.5); }
.ds-tile.num { font: 300 16px/1 var(--body); color: rgba(242, 242, 240, 0.32); }
/* A hit's tiles land a beat apart (delays from darkstar.mjs); `backwards` holds each blank until its beat, and the
   settled amber is .lit's own, so reduced motion still lands on a lit tile */
.ds-tile.new { animation: dsTilePop 0.85s cubic-bezier(.2, 1.5, .4, 1) backwards; }
@keyframes dsTilePop {
  0% { transform: scale(1); color: transparent; border-bottom-color: rgba(242, 242, 240, 0.34); }
  45% { transform: scale(1.45); color: #ffe2b0; border-bottom-color: rgb(var(--ds-amber)); }
  100% { transform: scale(1); color: rgb(var(--ds-amber)); border-bottom-color: rgba(var(--ds-amber), 0.8); }
}
#ds-mask.lost .ds-tile.lit:not(.punct) { color: rgb(255, 138, 112); border-bottom-color: rgba(255, 138, 112, 0.5); }
#ds-flash { position: fixed; inset: 0; z-index: 70; pointer-events: none; display: none; background: radial-gradient(ellipse at center, transparent 32%, rgba(150, 22, 22, 0.45) 100%); }
#ds-flash.show { display: block; animation: dsFlash 1.5s ease forwards; }
@keyframes dsFlash { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }

#ds-input-row { position: relative; display: flex; gap: 8px; width: min(100%, 440px); }
#ds-input-row.shake { animation: dsShake 0.4s; }
@keyframes dsShake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
#ds-input {
  flex: 1; min-width: 0; box-sizing: border-box; margin: 0; padding: 9px 12px; border: 1px solid rgba(var(--vega-rgb), 0.28); border-radius: 3px;
  background: transparent; color: var(--text); font: 300 16px/1.2 var(--body); outline: none; -webkit-appearance: none; appearance: none; transition: border-color 0.2s;
}
#ds-input::placeholder { color: var(--grey); opacity: 1; }
#ds-input:focus { border-color: rgba(var(--ds-amber), 0.6); }
#ds-input::-webkit-search-cancel-button { display: none; }
#ds-guess { flex: none; cursor: pointer; padding: 9px 18px; border: 1px solid rgba(var(--ds-amber), 0.75); border-radius: 3px; background: rgba(var(--ds-amber), 0.1); color: rgb(var(--ds-amber)); font: 400 13px/1 var(--body); letter-spacing: 0.04em; transition: background 0.2s; }
#ds-guess:hover { background: rgba(var(--ds-amber), 0.2); }
/* A miss or a note: a pill just above the field, where the eye already is */
#ds-msg { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); display: none; white-space: nowrap; pointer-events: none; z-index: 6; font: 400 12px/1 var(--body); letter-spacing: 0.02em; padding: 6px 12px; border-radius: 3px; background: var(--void); }
#ds-msg.show { display: block; animation: dsMsg 1.7s ease forwards; }
#ds-msg.miss { color: #ffb3a0; border: 1px solid rgba(255, 138, 112, 0.45); }
#ds-msg.note { color: #ffe2b0; border: 1px solid rgba(var(--ds-amber), 0.45); }
@keyframes dsMsg { 0% { opacity: 0; transform: translate(-50%, 6px); } 12%, 78% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -4px); } }
/* The warmer/colder line: in the flow between the title and the field, so it never covers the title */
#ds-warm { display: none; max-width: min(94vw, 540px); text-align: center; font: 400 12px/1.45 var(--body); letter-spacing: 0.02em; padding: 5px 12px; border-radius: 3px; animation: dsWarmIn 0.32s ease both; }
#ds-warm.warm { color: #ffe0a3; border: 1px solid rgba(var(--ds-amber), 0.36); }
#ds-warm.cold { color: #ffb3a0; border: 1px solid rgba(255, 138, 112, 0.32); }
#ds-warm.checking { color: var(--grey); border: 1px solid var(--ds-line); }
@keyframes dsWarmIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* The +1: lifts off the counter it just bumped, composited (transform and opacity only, always laid out) */
#ds-credit-float { position: fixed; z-index: 80; opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, 0) translateZ(0); will-change: transform, opacity; backface-visibility: hidden; font: 400 15px/1 var(--body); color: rgb(var(--ds-amber)); }
#ds-credit-float span { display: block; will-change: transform; }
#ds-credit-float.show { visibility: visible; opacity: 1; animation: dsCreditRise 1.25s cubic-bezier(.17, .67, .3, 1) forwards; }
#ds-credit-float.show span { animation: dsCreditPop 0.42s cubic-bezier(.2, 1.8, .4, 1) both; }
@keyframes dsCreditRise { 0% { opacity: 0; transform: translate(-50%, 6px) translateZ(0); } 12%, 64% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -36px) translateZ(0); } }
@keyframes dsCreditPop { 0% { transform: scale(0.45); } 100% { transform: scale(1); } }

/* Suggestions: body-level, placed over the field by darkstar.mjs (positionAc) */
#ds-ac { position: fixed; z-index: 66; display: none; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; padding: 5px 0; border: 1px solid var(--ds-line); border-radius: 4px; background: var(--void); }
#ds-ac button { background: none; border: 0; cursor: pointer; text-align: left; font: 300 14px/1.3 var(--body); color: rgba(242, 242, 240, 0.8); padding: 8px 13px; flex: none; }
#ds-ac button:hover, #ds-ac button.active { background: rgba(var(--vega-rgb), 0.08); color: var(--vega); }

/* The clue shop: always open; .can-buy says positively what's affordable now */
#ds-clues { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
#ds-clues button { cursor: pointer; padding: 6px 12px; border: 1px solid rgba(var(--ds-amber), 0.35); border-radius: 3px; background: none; color: rgb(var(--ds-amber)); font: 400 11.5px/1.2 var(--body); letter-spacing: 0.03em; transition: background 0.2s, opacity 0.2s, border-color 0.2s; }
#ds-clues button:hover:not([disabled]) { background: rgba(var(--ds-amber), 0.12); }
#ds-clues button[disabled] { opacity: 0.35; cursor: default; }
#ds-clues button.can-buy { border-color: rgba(var(--ds-amber), 0.85); background: rgba(var(--ds-amber), 0.1); animation: dsCanBuy 2.2s ease-in-out 3; }
@keyframes dsCanBuy { 50% { background: rgba(var(--ds-amber), 0.22); } }
.ds-cost-short { display: none; }
#ds-clue-nudge { display: none; align-items: center; gap: 9px; align-self: center; cursor: pointer; padding: 5px 9px 5px 13px; border: 1px solid rgba(var(--ds-amber), 0.36); border-radius: 3px; background: none; color: rgb(var(--ds-amber)); font: 300 11.5px/1.2 var(--body); letter-spacing: 0.02em; animation: dsNudgeIn 0.45s ease both; }
#ds-clue-nudge.show { display: flex; }
.ds-nudge-x { font-size: 13px; opacity: 0.6; }
@keyframes dsNudgeIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
#ds-guesses-wrap { display: flex; align-items: baseline; justify-content: center; gap: 9px; max-width: 100%; }
#ds-guesses-label { font: 400 9.5px/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey); }
#ds-guesses { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; max-width: 100%; }
.ds-guess-row { font: 300 12.5px/1.3 var(--body); color: rgba(242, 242, 240, 0.4); text-decoration: line-through; text-decoration-color: rgba(242, 242, 240, 0.25); }
.ds-guess-row.warm { color: rgba(var(--ds-amber), 0.8); text-decoration-color: rgba(var(--ds-amber), 0.4); }
.ds-guess-row.correct { color: #9de7ad; text-decoration: none; }
.ds-guess-letter { font: 500 13px/1.3 var(--display); padding: 0 3px; color: rgba(242, 242, 240, 0.32); text-decoration: line-through; text-decoration-color: rgba(242, 242, 240, 0.22); }
.ds-guess-letter.hit { color: rgb(var(--ds-amber)); text-decoration: none; }

/* Review: the finished board, read only */
body.ds-review #ds-exit, body.ds-review #ds-help, body.ds-review #ds-input-row, body.ds-review #ds-clues,
body.ds-review #ds-clue-nudge, body.ds-review .ds-credonly { display: none !important; }
body.ds-review #ds-hud { min-width: 280px; }
body.ds-review #ds-results { position: absolute; top: 6px; right: 8px; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; color: rgb(var(--ds-amber)); border: 1px solid rgba(var(--ds-amber), 0.35); border-radius: 3px; }
body.ds-review #ds-results svg { width: 15px; height: 15px; }
#ds-review-back { display: none; }

/* ── The clue preview (desktop: the right side, where /next's details sit; phone: over its star) ── */
#ds-clue-preview { position: fixed; right: 24px; top: calc(50% - 180px); z-index: 65; width: 280px; pointer-events: none; overflow: hidden; opacity: 0; transform: translateX(14px); border: 1px solid var(--ds-line); border-radius: 4px; background: rgba(5, 5, 7, 0.96); transition: opacity 0.3s ease, transform 0.3s ease; }
#ds-clue-preview.visible { opacity: 1; transform: none; }
#ds-clue-preview-img, #ds-clue-preview-fallback { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #0b0b10; }
#ds-clue-preview-fallback { display: flex; align-items: center; justify-content: center; font-size: 20px; color: rgba(var(--ds-amber), 0.5); }
#ds-clue-preview[data-kind="cast"], #ds-clue-preview[data-kind="crew"] { grid-template-columns: 96px minmax(0, 1fr); }
#ds-clue-preview[data-kind="cast"].visible, #ds-clue-preview[data-kind="crew"].visible { display: grid; }
#ds-clue-preview[data-kind="cast"] #ds-clue-preview-img, #ds-clue-preview[data-kind="crew"] #ds-clue-preview-img,
#ds-clue-preview[data-kind="cast"] #ds-clue-preview-fallback, #ds-clue-preview[data-kind="crew"] #ds-clue-preview-fallback { width: 96px; height: 144px; aspect-ratio: 2 / 3; object-position: center top; }
#ds-clue-preview-body { padding: 14px 16px 16px; align-self: center; }
#ds-clue-preview-kind { font: 400 9.5px/1 var(--body); letter-spacing: 0.13em; text-transform: uppercase; color: rgba(var(--ds-amber), 0.75); margin-bottom: 6px; }
#ds-clue-preview-title { font: 500 17px/1.15 var(--display); letter-spacing: -0.02em; color: var(--text); overflow-wrap: anywhere; }
#ds-clue-preview-year { font: 300 12px/1.2 var(--body); color: var(--grey); margin-top: 5px; }
#ds-clue-preview-why { font: 300 12px/1.35 var(--body); color: var(--text); margin-top: 6px; }
#ds-clue-preview-genres { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.ds-clue-genre { font: 400 10px/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase; color: rgba(242, 242, 240, 0.6); border: 1px solid var(--ds-line); border-radius: 3px; padding: 3px 6px; }

/* ── Modals: the tutorial, stats, share ── */
.ds-modal { position: fixed; inset: 0; z-index: 85; display: flex; align-items: center; justify-content: center; background: rgba(5, 5, 7, 0.78); }
.ds-box { box-sizing: border-box; border: 1px solid var(--ds-line); border-radius: 4px; background: var(--void); color: var(--text); outline: none; animation: dsPop 0.5s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes dsPop { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
#ds-tut-box { max-width: 460px; width: 90vw; max-height: 92vh; overflow-y: auto; padding: 30px 30px 28px; text-align: center; }
#ds-tut-title { font: 500 30px/1 var(--display); letter-spacing: -0.03em; color: rgb(var(--ds-amber)); }
#ds-tut-sub { font-size: 14.5px; color: rgba(242, 242, 240, 0.7); margin-top: 10px; line-height: 1.5; }
#ds-tut-rules { text-align: left; margin: 22px auto 0; max-width: 370px; display: flex; flex-direction: column; gap: 11px; }
.ds-tut-rule { display: flex; gap: 10px; font-size: 14px; color: rgba(242, 242, 240, 0.85); line-height: 1.45; }
.ds-tut-rule i { color: rgb(var(--ds-amber)); flex: none; font-style: normal; }
#ds-tut-more { max-width: 370px; margin: 18px auto 0; color: rgba(242, 242, 240, 0.6); }
#ds-tut-more summary { cursor: pointer; font: 400 11px/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); list-style-position: inside; }
#ds-tut-more summary:hover { color: var(--text); }
#ds-tut-more-copy { font-size: 13px; line-height: 1.5; margin-top: 12px; }
#ds-tut-hard { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--text); cursor: pointer; }
#ds-tut-hard input { accent-color: rgb(var(--ds-amber)); }
#ds-tut-actions { display: flex; align-items: center; justify-content: center; gap: 9px; flex-wrap: wrap; margin-top: 26px; }
.ds-primary, #ds-tut-play { cursor: pointer; padding: 11px 24px; border: 1px solid rgb(var(--ds-amber)); border-radius: 3px; background: rgb(var(--ds-amber)); color: var(--void); font: 500 14px/1 var(--body); letter-spacing: 0.02em; }
#ds-tut-practice { cursor: pointer; padding: 11px 18px; border: 1px solid rgba(var(--ds-amber), 0.45); border-radius: 3px; background: none; color: rgb(var(--ds-amber)); font: 400 13.5px/1 var(--body); }
#ds-tut-practice:hover { background: rgba(var(--ds-amber), 0.1); }

/* ── The result card ── */
#ds-overlay { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(5, 5, 7, 0.7); }
#ds-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
#ds-card { position: relative; z-index: 2; box-sizing: border-box; width: 88vw; max-width: 400px; max-height: 92vh; overflow: auto; border: 1px solid var(--ds-line); border-radius: 4px; background: var(--void); text-align: center; outline: none; animation: dsPop 0.55s cubic-bezier(.2, .9, .3, 1.2) both; }
#ds-card.popped { animation: none; }
#ds-card { --ds-card-drag-y: 0px; }
#ds-card.swiping { animation: none; transition: none; transform: translateY(var(--ds-card-drag-y)); }
#ds-card-swipe-handle { display: none; }
#ds-result-close { position: absolute; z-index: 3; top: 8px; right: 8px; width: 40px; height: 40px; padding: 0; border: 1px solid var(--ds-line); border-radius: 3px; background: rgba(5, 5, 7, 0.72); color: var(--text); font: 300 20px/1 var(--body); cursor: pointer; }
#ds-result-close:hover { border-color: rgba(var(--vega-rgb), 0.4); }
#ds-card-art { display: none; width: 100%; height: auto; object-fit: cover; background: #0b0b10; }
#ds-card-art[data-kind="backdrop"] { aspect-ratio: 16 / 9; }
#ds-card-art[data-kind="poster"] { width: min(48%, 180px); aspect-ratio: 2 / 3; margin: 18px auto 0; border-radius: 3px; }
#ds-card-body { padding: 18px 28px 26px; }
#ds-result-sub { font: 400 10.5px/1 var(--body); letter-spacing: 0.18em; text-transform: uppercase; color: var(--grey); }
#ds-result-title { font: 500 26px/1.15 var(--display); letter-spacing: -0.025em; color: rgb(var(--ds-amber)); margin-top: 8px; }
#ds-score-label { margin-top: 14px; font: 400 10.5px/1 var(--body); letter-spacing: 0.13em; text-transform: uppercase; color: var(--grey); }
#ds-stars { display: flex; justify-content: center; gap: 9px; margin-top: 7px; }
.ds-star { font-size: 30px; line-height: 1; color: rgba(242, 242, 240, 0.16); display: inline-block; animation: dsStar 0.55s cubic-bezier(.2, 1.5, .4, 1) both; }
.ds-star.filled { color: rgb(var(--ds-amber)); }
@keyframes dsStar { 0% { transform: scale(0) rotate(-45deg); } 70% { transform: scale(1.35) rotate(8deg); } 100% { transform: none; } }
#ds-result-line { font-size: 13.5px; letter-spacing: 0.02em; color: rgba(242, 242, 240, 0.78); margin-top: 12px; }
#ds-streak { font: 400 11px/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(var(--ds-amber), 0.85); margin-top: 12px; }
#ds-unlocks { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.ds-unlock { font: 400 11px/1 var(--body); letter-spacing: 0.04em; color: rgb(var(--ds-amber)); border: 1px solid rgba(var(--ds-amber), 0.45); border-radius: 3px; padding: 5px 9px; animation: dsNudgeIn 0.5s ease 0.9s both; }
#ds-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
#ds-actions button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 42px; box-sizing: border-box; cursor: pointer; border-radius: 3px; font: 400 13px/1.1 var(--body); letter-spacing: 0.02em; }
.ds-action-icon { width: 16px; height: 16px; flex: none; }
#ds-primary-actions, #ds-bottom-actions, #ds-utility-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ds-action-stack { display: flex; flex-direction: column; gap: 5px; }
.ds-action-note { font: 300 11px/1.2 var(--body); color: var(--grey); }
#ds-practice { border: 1px solid rgb(var(--ds-amber)); background: rgb(var(--ds-amber)); color: var(--void); font-weight: 500 !important; }
#ds-share { border: 1px solid rgba(var(--ds-amber), 0.7); background: none; color: rgb(var(--ds-amber)); }
#ds-share:hover { background: rgba(var(--ds-amber), 0.1); }
#ds-review, #ds-stats-open { border: 0; background: none; color: var(--grey); }
#ds-review:hover, #ds-stats-open:hover { color: var(--text); }
#ds-home { border: 1px solid rgba(var(--vega-rgb), 0.24); background: none; color: var(--text); }
#ds-explore { border: 1px solid rgba(var(--vega-rgb), 0.6); background: none; color: var(--vega); }
#ds-home:hover, #ds-explore:hover { background: rgba(var(--vega-rgb), 0.07); }

/* ── Stats ── */
#ds-stats-box { width: 92vw; max-width: 420px; max-height: 88vh; overflow-y: auto; padding: 22px 24px 24px; }
#ds-stats-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
#ds-stats-title { font: 500 22px/1 var(--display); letter-spacing: -0.025em; }
#ds-stats-close, #ds-share-close { width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 3px; background: none; color: var(--grey); font: 300 20px/1 var(--body); cursor: pointer; }
#ds-stats-close:hover, #ds-share-close:hover { color: var(--text); border-color: rgba(var(--vega-rgb), 0.28); }
#ds-stats-nums, #ds-stats-nums2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.ds-stat-cell { text-align: center; }
.ds-stat-n { font: 500 22px/1.1 var(--display); color: var(--text); }
.ds-stat-l { font: 400 10px/1.2 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); margin-top: 3px; }
#ds-stats-nums2 .ds-stat-n { font-size: 17px; color: rgba(242, 242, 240, 0.85); }
#ds-stats-empty { font-size: 13.5px; color: rgba(242, 242, 240, 0.75); line-height: 1.5; margin: 4px 0 8px; }
.ds-stats-h { font: 400 10.5px/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey); margin: 18px 0 9px; display: flex; justify-content: space-between; }
.ds-h-x { letter-spacing: 0.04em; text-transform: none; }
#ds-stats-dist { display: flex; flex-direction: column; gap: 4px; }
.ds-dist-row { display: flex; align-items: center; gap: 8px; }
.ds-dist-k { width: 10px; font: 300 12px/1 var(--body); color: var(--grey); }
.ds-dist-bar { min-width: 18px; box-sizing: border-box; padding: 3px 6px; text-align: right; font: 400 11px/1 var(--body); color: var(--void); background: rgba(242, 242, 240, 0.7); border-radius: 2px; }
.ds-dist-bar.empty { background: rgba(242, 242, 240, 0.12); color: var(--grey); }
.ds-dist-bar.cur { background: rgb(var(--ds-amber)); }
#ds-stats-ach { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: start; }
.ds-ach { display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer; padding: 8px 10px; border: 1px solid var(--ds-line); border-radius: 3px; background: none; opacity: 0.55; }
.ds-ach.got { opacity: 1; border-color: rgba(var(--ds-amber), 0.4); }
.ds-ach-head { display: flex; align-items: center; gap: 7px; font: 400 12.5px/1.2 var(--body); }
.ds-ach-ic { color: rgb(var(--ds-amber)); }
.ds-ach-t { flex: 1; }
.ds-ach-x { font-size: 10px; color: var(--grey); transition: transform 0.2s; }
.ds-ach.open .ds-ach-x { transform: rotate(180deg); }
.ds-ach-b { display: none; flex-direction: column; gap: 6px; }
.ds-ach.open .ds-ach-b { display: flex; }
.ds-ach-d { font: 300 11px/1.4 var(--body); color: rgba(242, 242, 240, 0.75); }
.ds-ach-p { display: flex; align-items: center; gap: 7px; }
.ds-ach-track { flex: 1; height: 3px; background: rgba(242, 242, 240, 0.12); border-radius: 2px; overflow: hidden; }
.ds-ach-fill { display: block; height: 100%; background: rgb(var(--ds-amber)); }
.ds-ach-n { font: 300 10.5px/1 var(--body); color: var(--grey); }

/* ── Share: the desktop's row of targets, the phone's Copy Score and Share… ── */
#ds-share-sheet { z-index: 90; }
#ds-share-box { width: 92vw; max-width: 520px; padding: 20px 22px 22px; }
#ds-share-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
#ds-share-title { font: 500 20px/1.1 var(--display); letter-spacing: -0.02em; }
#ds-share-sub { font-size: 13px; color: var(--grey); margin-top: 4px; }
#ds-share-scroll { position: relative; margin-top: 16px; }
#ds-share-row { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; }
#ds-share-row::-webkit-scrollbar { display: none; }
.ds-share-btn { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: none; width: 64px; padding: 0; border: 0; background: none; cursor: pointer; }
.ds-share-ico { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid rgba(var(--vega-rgb), 0.28); border-radius: 50%; color: var(--text); transition: border-color 0.2s, background 0.2s; }
.ds-share-btn:hover .ds-share-ico { border-color: rgba(var(--vega-rgb), 0.7); }
.ds-share-btn.primary .ds-share-ico { border-color: rgb(var(--ds-amber)); background: rgb(var(--ds-amber)); color: var(--void); }
.ds-share-label { font: 300 11.5px/1 var(--body); color: rgba(242, 242, 240, 0.8); }
.ds-share-nav { position: absolute; top: 12px; width: 28px; height: 28px; padding: 0; border: 1px solid var(--ds-line); border-radius: 50%; background: var(--void); color: var(--text); cursor: pointer; z-index: 2; }
#ds-share-prev { left: -6px; }
#ds-share-next { right: -6px; }
#ds-share-actions { display: none; gap: 10px; margin-top: 16px; }
#ds-share-actions button { flex: 1; min-height: 46px; cursor: pointer; border-radius: 3px; font: 400 14px/1 var(--body); }
#ds-share-copy { border: 1px solid rgb(var(--ds-amber)); background: rgb(var(--ds-amber)); color: var(--void); font-weight: 500 !important; }
#ds-share-native { border: 1px solid rgba(var(--ds-amber), 0.7); background: none; color: rgb(var(--ds-amber)); }
#ds-share-preview { margin-top: 16px; padding: 12px 14px; max-height: 160px; overflow-y: auto; white-space: pre-wrap; text-align: left; border: 1px solid var(--ds-line); border-radius: 3px; font: 300 13px/1.5 var(--body); color: rgba(242, 242, 240, 0.8); user-select: text; -webkit-user-select: text; }

/* ── Its row in the Games panel, and the way back ── */
/* The game's star (an empty ring, rippling as the board's core does) beside its name, today's line in grey under it.
   Solved, the ring's dot is lit */
.ds-entry { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; width: 100%; box-sizing: border-box; padding: 14px 0; border: 0; border-bottom: 1px solid rgba(var(--vega-rgb), 0.1); background: none; color: var(--text); cursor: pointer; text-align: left; }
.ds-entry:focus-visible { outline: 1px solid var(--vega); outline-offset: 3px; }
.ds-entry-head { display: flex; align-items: center; gap: 10px; }
.ds-entry-mark { position: relative; flex: none; width: 11px; height: 11px; box-sizing: border-box; border: 1px solid rgba(var(--vega-rgb), 0.72); border-radius: 50%; background: var(--void); transition: border-color 160ms ease; }
.ds-entry-mark::after { content: ''; position: absolute; inset: -1px; border: 1px solid rgba(var(--vega-rgb), 0.55); border-radius: 50%; opacity: 0; animation: dsEntryPing 3.2s cubic-bezier(.22, 1, .36, 1) infinite; }
@keyframes dsEntryPing { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(2.8); opacity: 0; } }
.ds-entry.played .ds-entry-mark::after { animation: none; }
.ds-entry.solved .ds-entry-mark { border-color: rgba(var(--ds-amber, 255, 192, 97), 0.8); background: radial-gradient(circle, var(--amber) 0 2.2px, var(--void) 2.8px); }
.ds-entry-title { font: 500 16px/1 var(--display); letter-spacing: -0.02em; color: var(--text); transition: color 160ms ease; }
.ds-entry:hover .ds-entry-title, .ds-entry:focus-visible .ds-entry-title { color: var(--vega); }
.ds-entry:hover .ds-entry-mark, .ds-entry:focus-visible .ds-entry-mark { border-color: var(--vega); }
.ds-entry-sub, .ds-entry-meta { padding-left: 21px; } /* under the name, past the ring */
.ds-entry-sub { font: 300 12.5px/1.3 var(--body); letter-spacing: 0.02em; color: var(--grey); }
.ds-entry-meta { font: 300 11.5px/1.2 var(--body); letter-spacing: 0.02em; color: rgba(106, 106, 112, 0.8); }
.ds-entry-star { color: var(--amber); margin-left: 1px; }
.ds-entry-star.dim { color: var(--grey); }
body.ds-return .topbar .exit-btn { width: auto; padding: 0 10px; color: var(--amber); font: 400 13px/1 var(--body); letter-spacing: 0.02em; border-color: rgba(255, 192, 97, 0.35); }
body.ds-return .topbar .exit-btn:hover { border-color: rgba(255, 192, 97, 0.75); }

/* ── Phone: live mobile's dock ── */
@media (max-width: 699px) {
  #ds-hud { top: max(env(safe-area-inset-top, 0px), 10px); left: 10px; right: 10px; transform: none; min-width: 0; flex-direction: row; justify-content: space-between; gap: 10px; min-height: 46px; padding: 8px 44px 8px 14px; }
  #ds-hud-head { font-size: 15px; }
  #ds-hud-actions { gap: 4px; }
  #ds-hud-actions button { min-width: 44px; min-height: 32px; font-size: 10px; letter-spacing: 0.06em; }
  #ds-exit { top: 50%; right: 4px; transform: translateY(-50%); min-width: 38px; min-height: 38px; }
  #ds-panel { left: 8px; right: 8px; bottom: max(env(safe-area-inset-bottom, 0px), 8px); transform: none; width: auto; gap: 9px; max-height: min(44dvh, 360px); overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px 11px; }
  #ds-mask { gap: 6px 14px; }
  .ds-word { gap: 3px; }
  .ds-tile { min-width: 18px; height: 28px; font-size: 17px; }
  .ds-tile.num { font-size: 12px; }
  #ds-mask.long .ds-tile { min-width: 14px; height: 24px; font-size: 14px; }
  #ds-input-row { width: 100%; }
  #ds-input { padding: 10px 11px; }
  #ds-guess { min-height: 42px; padding: 0 16px; }
  #ds-clues { flex-wrap: nowrap; width: 100%; gap: 6px; }
  #ds-clues button { flex: 1; min-height: 40px; padding: 4px 6px; font-size: 11px; line-height: 1.25; }
  .ds-cost-long { display: none; }
  .ds-cost-short { display: block; }
  #ds-guesses-wrap { width: 100%; justify-content: flex-start; }
  #ds-guesses { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  #ds-guesses .ds-guess-row, #ds-guesses .ds-guess-letter { flex: none; white-space: nowrap; }
  #ds-clue-preview { right: auto; width: 220px; transform: translateY(5px) scale(0.97); }
  #ds-clue-preview.visible { transform: none; }
  #ds-clue-preview[data-art="poster"] { width: 170px; }
  #ds-clue-preview[data-art="poster"] #ds-clue-preview-img { aspect-ratio: 2 / 3; }
  /* review: the HUD goes, one back arrow stands where the card's × was */
  body.ds-review #ds-hud { display: none !important; }
  body.ds-review #ds-review-back { display: flex; position: fixed; z-index: 61; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(var(--ds-amber), 0.4); border-radius: 3px; background: var(--void); color: rgb(var(--ds-amber)); cursor: pointer; }
  body.ds-review #ds-review-back svg { width: 18px; height: 18px; }
  /* full-screen scrolling overlays */
  #ds-overlay { align-items: flex-start; overflow-y: auto; }
  #ds-card { width: calc(100vw - 20px); max-width: none; max-height: none; margin: max(env(safe-area-inset-top, 0px), 10px) auto 16px; overflow: visible; }
  #ds-card-body { padding: 16px 18px 22px; }
  #ds-card-swipe-handle { display: block; position: absolute; top: 0; left: 0; right: 0; height: 32px; z-index: 2; touch-action: none; }
  #ds-card-swipe-handle::after { content: ''; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: rgba(242, 242, 240, 0.4); }
  #ds-actions button { min-height: 46px; }
  .ds-modal { align-items: flex-end; }
  #ds-tut-box, #ds-stats-box { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); margin-bottom: max(env(safe-area-inset-bottom, 0px), 10px); }
  #ds-share-box { width: calc(100vw - 20px); margin-bottom: max(env(safe-area-inset-bottom, 0px), 10px); }
  #ds-share-scroll { display: none; }
  #ds-share-actions { display: flex; }
  #ds-share-actions.solo #ds-share-copy { flex: 1; }
}
@media (max-width: 699px) and (max-height: 650px) {
  #ds-panel { max-height: 42dvh; gap: 6px; padding-top: 7px; padding-bottom: 7px; }
  .ds-tile { min-width: 16px; height: 23px; font-size: 15px; }
  #ds-clues button { min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .ds-pip.danger, #ds-remain.danger, #ds-hud.danger, #ds-credits.bump, .ds-tile.new, #ds-input-row.shake, #ds-credit-float.show, #ds-credit-float.show span,
  #ds-msg.show, #ds-flash.show, #ds-clues button.can-buy, #ds-clue-nudge, #ds-card, .ds-box, .ds-star, .ds-unlock, #ds-hud, #ds-panel, #ds-warm { animation: none !important; }
  #ds-clue-preview, .ds-ach-x { transition: none !important; }
  .ds-entry-mark::after { animation: none; }
}
