/* Generated from appsettings and style.css. Do not edit. */
:root { --settings-background: #090a0b; --settings-foreground: #f4f4f2; --settings-muted: #b2b5b8; --settings-line: #383b3e; --settings-ball: #FFD700; --settings-grow: #90EE90; --settings-shrink: #FF6B6B; --settings-bomb: #FF6B35; --settings-combined: #A78BFA; --settings-aim: #60A5FA; --settings-pierce: #56D5E8; --settings-electric: #F6D365; --settings-mark: #F28DC5; }
/* MiraFit design system. Edit this source, never the generated CSS. */
/* 1. Foundations — game and cosmetic palettes remain independent. */
:root {
  color-scheme: dark;
  --ds-bg: var(--settings-background);
  --ds-surface: #111315;
  --ds-surface-raised: #191b1e;
  --ds-surface-hover: #24272b;
  --ds-text: var(--settings-foreground);
  --ds-text-muted: var(--settings-muted);
  --ds-border: var(--settings-line);
  --ds-border-strong: #626970;
  --ds-success: #74e8c2;
  --ds-warning: #f3c16e;
  --ds-danger: #ff775d;
  --ds-ink: #101112;
  --ds-font-ui: 'Segoe UI', Arial, sans-serif;
  --ds-font-score: Consolas, monospace;
  --ds-text-xs: .75rem;
  --ds-text-sm: .875rem;
  --ds-text-base: 1rem;
  --ds-text-lg: 1.25rem;
  --ds-text-xl: 1.5rem;
  --ds-text-display: 2rem;
  --ds-space-1: 4px;
  --ds-space-2: 8px;
  --ds-space-3: 12px;
  --ds-space-4: 16px;
  --ds-space-6: 24px;
  --ds-space-8: 32px;
  --ds-radius-control: 8px;
  --ds-radius-panel: 12px;
  --ds-radius-dialog: 16px;
  --ds-motion-fast: 120ms ease-out;
  --ds-motion-panel: 180ms ease-out;
  --ds-target: 44px;
  --muted: var(--ds-text-muted);
  --line: var(--ds-border);
  font-family: var(--ds-font-ui);
  color: var(--ds-text);
  background: var(--ds-bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
/* Resolve on body: equipment sets --accent on this element. */
body { --ds-accent: var(--accent, var(--ds-text)); }
/* 2. Base controls and application frame */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { height: 100dvh; overflow: hidden; }
body { margin: 0; min-width: 300px; height: 100%; overflow: hidden; background: var(--ds-bg); }
.sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
button, input, select, textarea { font: inherit; }
button { min-height: 44px; min-width: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--ds-radius-control); color: var(--ds-text); background: var(--ds-surface-raised); font-size: var(--ds-text-sm); line-height: 1.3; cursor: pointer; touch-action: manipulation; overflow-wrap: anywhere; }
button:hover:not(:disabled):not([aria-busy="true"]) { background: var(--ds-surface-hover); }
button:disabled { color: var(--ds-text-muted); background: var(--ds-surface); border-color: var(--ds-border); cursor: not-allowed; }
button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 3px; }
p { line-height: 1.5; color: var(--muted); }
.app { width: min(100%, 520px); height: 100%; margin: auto; padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; }
.topbar, .hud-dock, .page-footer { width: min(100%, 430px); flex: none; }
.topbar { min-height: 44px; display: grid; grid-template-columns: max-content minmax(0,1fr) 44px; gap: var(--ds-space-2); align-items: center; }
.brand { display: flex; min-width: 0; justify-content: center; align-items: center; gap: 6px; font-size: 24px; font-weight: 700; letter-spacing: -.06em; white-space: nowrap; overflow-wrap: anywhere; }
.brand-mark { font-size: var(--ds-text-lg); color: var(--ds-accent); }
.topbar-controls { justify-self: end; }
.icon-button { width: 44px; height: 44px; padding: 10px; }
.icon-button svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#menu-button { padding-inline: 9px; font-size: var(--ds-text-sm); }
.game-wrap { position: relative; width: min(100%,430px); flex: 1; min-height: 0; margin-top: var(--ds-space-2); overflow: hidden; border: 1px solid #2b2e30; border-radius: var(--ds-radius-panel); background: #0a0b0c; }
.first-aim-guide:not([hidden]) { position: absolute; z-index: 2; left: 50%; bottom: 14%; transform: translateX(-50%); max-width: 85%; padding: 8px 12px; border: 1px solid var(--ds-accent); border-radius: 18px; color: #fff; background: #111d; font-size: var(--ds-text-sm); text-align: center; pointer-events: none; }
.first-aim-guide span { display: inline-block; margin-right: 5px; font-size: var(--ds-text-xl); vertical-align: middle; }
@media (prefers-reduced-motion: no-preference) { .first-aim-guide span { animation: aim-cue 1.4s ease-in-out infinite alternate; } }
@keyframes aim-cue { from { transform: translate(-4px, 4px); } to { transform: translate(4px, -4px); } }
.game-stage { display: contents; }
/* Only viewport changes resize the stage; dynamic HUD/footer content stays in its own tracks. */
body[data-view="play"] { overflow: auto; }
body[data-view="play"] .app { --play-header-height: max(44px, 2.75rem); --play-hud-height: max(88px, 5.5rem); --play-footer-height: max(104px, 6.5rem); --play-field-width: min(100%, 560px, calc((100cqh - var(--play-header-height) - var(--play-hud-height) - var(--play-footer-height) - 24px) * 2 / 3)); width: min(100%, 584px); min-height: max(600px, 37.5rem); padding-right: max(12px, env(safe-area-inset-right)); container-type: size; display: grid; grid-template-rows: var(--play-header-height) var(--play-hud-height) auto var(--play-footer-height); align-content: start; gap: var(--ds-space-2); justify-items: center; }
body[data-view="play"] :is(.topbar,.hud-dock,.game-stage,.page-footer) { width: var(--play-field-width); }
body[data-view="play"] .game-stage { display: grid; aspect-ratio: 2 / 3; min-width: 0; min-height: 0; }
body[data-view="play"] .game-wrap { width: 100%; height: 100%; min-height: 0; margin: 0; }
body[data-view="play"] .topbar { height: 100%; min-height: 0; }
body[data-view="play"] .hud-dock { height: 100%; min-height: 0; margin: 0; }
body[data-view="play"] .page-footer { display: grid; grid-template-rows: max(52px, 3.25rem) max(44px, 2.75rem); gap: var(--ds-space-2); height: 100%; min-width: 0; min-height: 0; }
body[data-view="play"] .power-stat { grid-row: 1; min-height: 0; margin: 0; overflow: auto; }
body[data-view="play"] .power-strip { width: max-content; min-width: 100%; flex-wrap: nowrap; }
body[data-view="play"] .instructions { grid-row: 2; height: 100%; min-height: 0; margin: 0; overflow: auto; }
body:is([data-view="home"],[data-view="pause"]) .app { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; align-items: stretch; }
body:is([data-view="home"],[data-view="pause"]) .game-wrap { flex: none; height: 100%; max-height: none; min-height: 0; margin-top: 0; aspect-ratio: auto; }
canvas { width: 100%; height: 100%; display: block; touch-action: none; }
canvas:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.overlay { position: absolute; inset: 0; padding: var(--ds-space-4); overflow-y: auto; z-index: 1; background: #090a0bf5; }
.overlay.hidden { display: none; }
.overlay-card { width: 100%; max-width: 430px; margin: auto; }
body:not([data-view="play"]) .app .hud-dock,
body:not([data-view="play"]) .power-stat { display: none; }
body:not(:is([data-view="play"],[data-view="home"],[data-view="pause"])) .page-footer { display: none; }
body:not([data-view="play"]) .instructions { display: none; }
body:not([data-view="play"]) #field { visibility: hidden; }
body:not([data-view="play"]) .first-aim-guide { display: none; }
body:not([data-view="play"]) .game-wrap { border: 0; background: transparent; }
body:not([data-view="play"]) .overlay { background: transparent; padding: 8px 0 16px; }
body:is([data-view="pause"],[data-view="home"]) .overlay { display: flex; flex-direction: column; justify-content: safe center; }
body:is([data-view="pause"],[data-view="home"]) .overlay-card { flex: none; }
body[data-view="home"] .overlay { padding: var(--ds-space-4) 0; }
body:is([data-view="home"],[data-view="pause"]) .overlay-card { margin: 0 auto; }
body[data-view="home"] .home-heading h1 { margin: 0 0 var(--ds-space-4); }
.home-heading h1, .overlay h1 { font-size: var(--ds-text-display); margin: 6px 0 18px; letter-spacing: -.04em; line-height: 1.15; overflow-wrap: anywhere; }
.home-modes { display: grid; gap: var(--ds-space-3); }
.home-mode-picker { display: none; }
.home-mode-picker button { min-width: 0; }
/* Shared panels and actions */
.mode-card { padding: var(--ds-space-4); border: 1px solid var(--line); border-radius: var(--ds-radius-panel); background: var(--ds-surface); }
.mode-card h2 { margin: 0 0 8px; font-size: var(--ds-text-xl); }
.mode-card p { margin: 8px 0; font-size: var(--ds-text-base); }
.mode-card .mode-progress:empty { display: none; }
.play-button { width: 100%; padding: 13px 16px; min-height: 48px; margin-top: var(--ds-space-3); display: flex; justify-content: center; align-items: center; gap: 10px; color: var(--ds-ink); background: var(--ds-accent); border-color: transparent; font-size: var(--ds-text-base); font-weight: 600; }
.play-button:hover:not(:disabled) { background: color-mix(in srgb, var(--ds-accent), white 15%); }
.play-button:disabled { background: var(--ds-surface-hover); color: var(--ds-text-muted); }
.mode-secondary { display: flex; gap: var(--ds-space-2); flex-wrap: wrap; margin-top: var(--ds-space-2); }
.mode-secondary button { flex: 1; font-size: var(--ds-text-sm); padding: 10px 8px; background: transparent; }
.menu-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--ds-space-2); margin-top: 18px; }
.menu-nav button { display: grid; place-items: center; padding: var(--ds-space-2); }
.menu-nav svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.page-footer .menu-nav { display: none; margin: 0; }
body:is([data-view="home"],[data-view="pause"]) .page-footer { padding-top: 8px; border-top: 1px solid var(--line); }
body:is([data-view="home"],[data-view="pause"]) .page-footer .menu-nav { display: grid; }
.menu-notice { font-size: var(--ds-text-sm); }
.menu-notice:empty { display: none; }
#pause-panel { margin: 8px 0 24px; }
#pause-panel > button { width: 100%; margin-top: var(--ds-space-2); }
body[data-view="pause"] .home-heading, body[data-view="pause"] .home-modes, body[data-view="pause"] #result-panel { display: none; }
body[data-view="results"] .home-heading { display: none; }
.result-score { color: var(--ds-accent); display: block; font: 700 var(--ds-text-display) var(--ds-font-score); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; margin-bottom: 10px; }
#result-panel { margin-bottom: 20px; }
#result-panel p { font-size: var(--ds-text-base); }
#result-panel > button { margin: 4px 4px 4px 0; }
/* Game HUD: score and combo share one hierarchy. */
.hud-dock { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; align-content: center; gap: 12px; min-width: 0; margin-top: 8px; padding: 12px; border: 1px solid var(--ds-border); border-radius: var(--ds-radius-panel); background: var(--ds-surface); }
.hud-dock:focus-visible, .power-stat:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 2px; }
.hud-dock > div { min-width: 0; display: grid; gap: 6px; }
.stat-label { color: var(--ds-text-muted); font-size: var(--ds-text-xs); line-height: 1.2; letter-spacing: .035em; overflow-wrap: anywhere; }
.hud-dock strong { font: 700 var(--ds-text-lg)/1.1 var(--ds-font-score); font-variant-numeric: tabular-nums; }
.score-heading { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.score-stat { container-type: inline-size; --score-max-font-size: var(--ds-text-display); }
.hud-dock .score-value { display: block; max-width: 100%; overflow-x: auto; overflow-y: hidden; white-space: nowrap; color: var(--ds-accent); font-size: clamp(var(--ds-text-sm), calc(100cqw / (var(--score-characters, 1) * .62)), var(--score-max-font-size)); line-height: 1.25; letter-spacing: -.04em; scrollbar-width: thin; }
.score-value:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 2px; }
.multiplier-stat { display: inline-flex; align-items: center; flex: none; padding: 3px 6px; border-radius: 5px; color: var(--ds-accent); background: color-mix(in srgb, var(--ds-accent) 12%, var(--ds-surface)); }
.hud-dock .multiplier-stat strong { font-size: var(--ds-text-sm); }
.turn-stat, .balls-stat { padding-left: 12px; border-left: 1px solid var(--ds-border); }
.timer-stat { text-align: right; color: var(--ds-success); }
.timer-stat[data-urgent="true"] { color: var(--ds-danger); }
.timer-stat[data-urgent="true"] .stat-label::before { content: '! '; font-weight: 700; color: var(--ds-danger); }
.hud-dock:has(.timer-stat:not([hidden])) { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 4px 12px; padding-block: 8px; }
.hud-dock:has(.timer-stat:not([hidden])) .score-stat { grid-column: 1; grid-row: 1; gap: 2px; }
.hud-dock:has(.timer-stat:not([hidden])) .score-stat { --score-max-font-size: var(--ds-text-xl); }
.hud-dock .timer-stat strong { font-size: var(--ds-text-xl); }
.hud-dock:has(.timer-stat:not([hidden])) .timer-stat { grid-column: 2; grid-row: 1; gap: 2px; }
.hud-dock:has(.timer-stat:not([hidden])) :is(.turn-stat,.balls-stat) { display: flex; align-items: baseline; gap: 8px; padding: 0; border: 0; grid-row: 2; }
.hud-dock:has(.timer-stat:not([hidden])) .balls-stat { justify-content: end; }
.hud-dock:has(.timer-stat:not([hidden])) :is(.turn-stat,.balls-stat) strong { font-size: var(--ds-text-sm); }
.danger-status { position: absolute; top: 100%; left: 0; right: 0; z-index: 2; padding: var(--ds-space-2); border-radius: var(--ds-radius-control); color: #ffc2b2; background: #431b16; font-size: var(--ds-text-sm); line-height: 1.4; }
.instructions { display: flex; align-items: center; gap: var(--ds-space-2); height: max(44px,2.8em); margin-top: var(--ds-space-1); color: var(--muted); font-size: var(--ds-text-sm); line-height: 1.4; }
.instructions #hint { flex: 1; min-width: 0; max-height: 100%; overflow-y: auto; overflow-wrap: anywhere; }
.instructions #hint:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 2px; }
.instructions #hint:empty { display: none; }
.recall-button { flex: none; min-height: 44px; }
.recall-button kbd { font: inherit; margin-left: 4px; }
/* Dialogs and secondary areas */
dialog { width: min(600px,calc(100% - 24px)); max-width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: var(--ds-space-4); margin: auto; color: var(--ds-text); background: var(--ds-surface); border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius-dialog); overflow-y: auto; overflow-wrap: anywhere; }
dialog::backdrop { background: #000c; }
.dialog-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--ds-space-3); margin-bottom: var(--ds-space-3); }
.dialog-header h2 { flex: 1 1 12ch; min-width: 0; margin: 0; font-size: var(--ds-text-xl); line-height: 1.2; }
.dialog-header button { flex: none; }
dialog h3 { font-size: var(--ds-text-lg); margin: 24px 0 12px; }
dialog p { font-size: var(--ds-text-base); margin: 12px 0; }
.mode-tabs, .player-tabs, .board-view-tabs { display: flex; gap: 6px; margin: 12px 0; }
.mode-tabs button, .player-tabs button, .board-view-tabs button { flex: 1; min-width: 0; padding-inline: 6px; }
.mode-tabs { flex-wrap: wrap; }
.mode-tabs button { flex-basis: 6em; }
.favored-label { display: block; font-size: var(--ds-text-sm); margin-bottom: 7px; }
.favored-list { display: flex; flex-wrap: wrap; gap: 5px; }
.favored-item { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid #8051a577; border-radius: var(--ds-radius-control); background: #241b2c; font-size: var(--ds-text-xs); color: var(--ds-text); }
.favored-item svg { width: 16px; height: 16px; flex: none; color: #d6a6ff; }
.power-stat { min-width: 0; margin-top: var(--ds-space-2); }
.power-strip { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; align-items: center; }
.power-group { display: inline-grid; grid-template-columns: auto minmax(0,1fr); align-items: baseline; gap: 6px; flex: none; }
.power-items { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.power-group + .power-group { border-left: 1px solid var(--ds-border); padding-left: 12px; }
.power-group-label { font-size: var(--ds-text-xs); color: var(--ds-text-muted); white-space: nowrap; }
.power-chip { display: inline-flex; align-items: baseline; gap: 6px; flex: none; min-height: 30px; padding: 4px 8px; border-radius: var(--ds-radius-control); border: 1px solid color-mix(in srgb, var(--ds-accent) 35%, var(--ds-border)); background: color-mix(in srgb, var(--ds-accent) 7%, var(--ds-surface)); color: var(--ds-text); font-size: var(--ds-text-sm); line-height: 1.2; white-space: nowrap; }
.power-chip svg { align-self: center; width: 16px; height: 16px; flex: none; color: var(--ds-accent); }
.power-chip[data-phase="pending"] { border-style: dashed; border-color: var(--ds-border-strong); background: var(--ds-surface); }
.power-chip[data-phase="pending"] svg { color: var(--ds-text-muted); }
.power-chip strong { font: 700 var(--ds-text-sm)/1 var(--ds-font-score); color: var(--ds-accent); }
.power-chip small { color: var(--ds-text-muted); font-size: var(--ds-text-xs); }
.chaos-guide { padding-top: 4px; }
.chaos-guide h3 { scroll-margin-top: 78px; }
.chaos-guide h4 { font-size: var(--ds-text-base); margin: 16px 0 8px; }
.guide-grid { display: grid; gap: 7px; }
.guide-entry { display: flex; align-items: flex-start; gap: 10px; padding: 9px; border: 1px solid var(--line); border-radius: var(--ds-radius-control); background: var(--ds-surface-raised); }
.guide-entry strong, .guide-entry small { display: block; }
.guide-entry small { margin-top: 3px; line-height: 1.35; color: var(--muted); }
.guide-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: var(--ds-radius-control); color: #dbadff; background: #2a2033; }
.guide-icon svg { width: 26px; height: 26px; }
.guide-actions, .tutorial-actions { display: flex; gap: var(--ds-space-2); flex-wrap: wrap; margin-top: 14px; }
.guide-actions button, .tutorial-actions button { flex: 1; }
.tutorial-example { display: flex; gap: var(--ds-space-3); align-items: center; padding: 10px; border-radius: var(--ds-radius-panel); background: #211b28; }
.tutorial-example .guide-icon { width: 64px; height: 64px; }
.tutorial-example .guide-icon svg { width: 40px; height: 40px; }
.tutorial-actions .play-button { margin-top: 0; }
#chaos-tutorial::backdrop { background: rgba(0,0,0,.42); }
#pause-chaos-guide { width: 100%; margin-top: var(--ds-space-2); }
@media (max-width: 600px) {
  dialog { width: 100%; max-width: 100%; max-height: min(85dvh, 850px); margin: auto 0 0; padding: 16px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); border-radius: var(--ds-radius-dialog) var(--ds-radius-dialog) 0 0; }
  .dialog-header { position: sticky; top: -16px; z-index: 2; padding: 4px 0 10px; background: var(--ds-surface); }
  .page-footer .instructions { min-width: 0; }
}
.player-tabs { flex-wrap: wrap; }
.player-tabs button { flex-basis: 7em; }
button[aria-pressed="true"]:not(.sound-button) { color: var(--ds-accent); border-color: var(--ds-accent); background: var(--ds-surface-hover); box-shadow: inset 0 -2px 0 var(--ds-accent); }
label { display: block; font-size: var(--ds-text-base); margin: 18px 0 8px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px; color: #fff; background: var(--ds-bg); border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius-control); font-size: var(--ds-text-base); }
input[type="range"] { padding: 0; accent-color: var(--ds-accent); }
.analytics-choice { display: flex; align-items: center; gap: var(--ds-space-3); min-height: 44px; }
.analytics-choice input { width: 24px; min-height: 24px; height: 24px; padding: 0; flex-shrink: 0; accent-color: var(--ds-accent); }
dialog output { float: right; color: var(--muted); font-variant-numeric: tabular-nums; }
dialog form > button { width: 100%; margin-top: 18px; }
.difficulty-heading { position: relative; display: flex; align-items: center; gap: 6px; margin: 14px 0 6px; }
.difficulty-heading #difficulty-label { font-size: var(--ds-text-xs); }
.difficulty-heading .difficulty-help { display: grid; place-items: center; flex: none; width: var(--ds-target); min-width: var(--ds-target); height: var(--ds-target); min-height: var(--ds-target); margin: 0; padding: 0; border: 1px solid #777; border-radius: 50%; color: #ccc; font-size: var(--ds-text-xs); line-height: 1; cursor: help; }
.difficulty-heading #difficulty-details { display: none; position: absolute; top: 100%; left: 0; z-index: 2; width: min(280px, 100%); box-sizing: border-box; padding: 10px; border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius-control); background: var(--ds-surface-raised); color: #ddd; font-size: var(--ds-text-xs); line-height: 1.4; }
.difficulty-help:is(:hover, :focus) + #difficulty-details, .difficulty-heading #difficulty-details:hover { display: block; }
.difficulty-selector { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: stretch; border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius-control); overflow: hidden; background: var(--ds-bg); }
.difficulty-selector button { min-width: 0; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: var(--ds-text-lg); }
.difficulty-selector button:hover, .difficulty-selector button:focus-visible { background: #252627; }
.difficulty-selector output { display: grid; place-items: center; float: none; color: #fff; font-size: var(--ds-text-sm); font-weight: 600; }
details { margin-top: 18px; font-size: var(--ds-text-base); }
summary { cursor: pointer; min-height: 44px; padding-block: 12px; color: var(--ds-text); }
#google-signin { display: grid; justify-content: center; margin: 16px 0; }
#google-signin > div { min-width: 0; max-width: 100%; }
#google-signin [role="button"] { min-height: 44px; height: auto; max-width: 100%; }
#google-signin [role="button"] span { white-space: normal; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--ds-text-sm); }
th, td { text-align: left; padding: 12px 6px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
th:first-child { width: 15%; }
th:nth-child(2) { width: 44%; }
th:last-child, td:last-child { text-align: right; }
table[data-period="time-attack"] { font-size: var(--ds-text-sm); }
table[data-period="time-attack"] th, table[data-period="time-attack"] td { padding: 10px 4px; }
table[data-period="time-attack"] th:nth-child(1) { width: 8%; }
table[data-period="time-attack"] th:nth-child(2) { width: 29%; }
table[data-period="time-attack"] th:nth-child(3) { width: 15%; }
table[data-period="time-attack"] th:nth-child(4) { width: 28%; }
table[data-period="time-attack"] th:nth-child(5) { width: 20%; }
table[data-period="time-attack"] td:nth-child(4) { font-variant-numeric: tabular-nums; }
table caption { font-size: var(--ds-text-sm); text-align: left; margin-bottom: 10px; color: var(--muted); }
.badge { margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--ds-radius-panel); }
.badge progress { width: 100%; accent-color: var(--ds-accent); }
.badge-tier { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.badge-tier p { margin: 4px 0; }
.help-powers { padding: 0 12px; border: 1px solid var(--line); border-radius: var(--ds-radius-control); }
.help-powers summary { font-weight: 600; }
.help-powers ul { list-style: none; padding: 0; margin-top: 0; }
.help-powers li { display: grid; grid-template-columns: minmax(28px,max-content) minmax(0,1fr); gap: var(--ds-space-2); margin: 16px 0; font-size: var(--ds-text-base); line-height: 1.5; color: var(--muted); }
.help-powers li > span:first-child { color: #fff; white-space: nowrap; }
@media (max-width: 380px) { dialog { padding: var(--ds-space-4); } .player-tabs button { font-size: var(--ds-text-sm); } }
@media (max-height: 500px) and (orientation: landscape) {
  body[data-view="play"] .app { min-height: max(300px, 18.75rem); width: min(100%,900px); grid-template-columns: minmax(0,1fr) minmax(0,230px); grid-template-rows: var(--play-header-height) minmax(0,1fr) var(--play-footer-height); }
  body[data-view="play"] .topbar { width: min(100%, 430px); grid-column: 1/-1; justify-self: center; }
  body[data-view="play"] .game-stage { width: min(100%, 560px, calc((100cqh - var(--play-header-height) - 8px) * 2 / 3)); align-self: start; grid-column: 1; grid-row: 2/4; }
  body[data-view="play"] .hud-dock { grid-column: 2; grid-row: 2; width: 100%; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-self: stretch; overflow-y: auto; }
  body[data-view="play"] .hud-dock:not(:has(.timer-stat:not([hidden]))) .score-stat { grid-column: 1/-1; }
  body[data-view="play"] .hud-dock .turn-stat { padding-left: 0; border-left: 0; }
  body[data-view="play"] .hud-dock .score-stat { --score-max-font-size: var(--ds-text-xl); }
  body[data-view="play"] .page-footer { grid-column: 2; grid-row: 3; width: 100%; }
}
.player-label { display: inline-flex; flex-direction: column; gap: var(--ds-space-1); max-width: 100%; }
@media (min-width: 900px) and (height > 500px) {
  body[data-view="play"] .app { --play-footer-height: max(124px, 7.75rem); width: min(100%,744px); }
  body[data-view="play"] .page-footer { width: 100%; grid-template-rows: max(72px, 4.5rem) max(44px, 2.75rem); }
  body[data-view="play"] .power-strip { width: 100%; min-width: 0; flex-wrap: wrap; gap: 6px 12px; align-items: start; }
  body[data-view="play"] .power-group { flex: 1 1 280px; min-width: 0; }
  body[data-view="play"] .power-items { flex-wrap: wrap; }
  body[data-view="play"] .power-stat { overflow-x: hidden; overflow-y: auto; }
}
.player-label strong { font-size: inherit; overflow-wrap: anywhere; }
.player-label small { font-size: var(--ds-text-sm); font-weight: normal; color: #bcc0c4; }
.player-frame { padding: 4px 5px; border: 1px solid var(--frame-color); border-radius: var(--ds-radius-control); }
.player-frame[data-frame="breakthrough-frame"], .player-frame[data-frame="weekly-gold-frame"] { border-width: 3px; border-style: double; }
.player-frame[data-frame="collector-frame"] { border-radius: 12px 2px; }
.cosmetic-preview { display: block; font-size: var(--ds-text-sm); margin-top: 10px; padding: 6px; color: #ddd; }
.cosmetic-preview[data-locked="true"] { opacity: .65; }
.preview-trail { border-bottom: 3px solid var(--frame-color); background: linear-gradient(90deg, transparent, #ffffff08); }
.preview-frame { border: 1px solid var(--frame-color); border-radius: var(--ds-radius-control); }
.preview-title { color: var(--frame-color); }
#profile-dialog { width: min(800px, calc(100% - 28px)); }
#collections-dialog { width: min(570px, calc(100% - 28px)); }
.profile-editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.profile-controls { min-width: 0; }
.equipment-preview { position: relative; min-width: 0; height: 215px; overflow: hidden; border: 1px solid var(--preview-accent, var(--line)); border-radius: var(--ds-radius-control); background: #080d11; }
.cosmetic-scene { width: 100%; height: 100%; }
#equipment-preview-label { position: absolute; left: 12px; bottom: 12px; padding: 7px 9px; border-radius: var(--ds-radius-control); background: var(--ds-bg)db; color: var(--preview-accent, #fff); }
#equipment-preview-label .player-label small { color: #dde1e3; }
.cosmetic-selector { margin-top: 13px; }
.selector-label { display: block; margin-bottom: 5px; font-size: var(--ds-text-sm); }
.selector-controls { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 5px; align-items: stretch; }
.selector-controls button { margin: 0; padding: 0; font-size: var(--ds-text-base); }
.selector-controls output { display: grid; place-items: center; min-height: 44px; padding: 5px 7px; border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius-control); background: var(--ds-bg); color: var(--ds-text); font-size: var(--ds-text-sm); text-align: center; overflow-wrap: anywhere; }
.collection-preview { height: clamp(250px, 48svh, 410px); }
.collection-carousel-controls { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: var(--ds-space-3); margin-top: var(--ds-space-3); }
.collection-carousel-controls button { min-width: 44px; min-height: 44px; margin: 0; padding: 0; font-size: var(--ds-text-lg); }
.collection-carousel-controls #collection-position { text-align: center; color: #ccc; font-size: var(--ds-text-xs); }
#collection-preview { touch-action: pan-y; }
#collections-detail-view h3 { margin: 16px 0 10px; font-size: 17px; }
#collections-back { width: auto; margin-top: 15px; }
#collections-status:empty { display: none; }
@media (max-width: 600px) {
  #profile-dialog { width: 100%; max-width: 100%; margin-inline: 0; }
  #collections-dialog { width: 100%; max-width: 100%; margin-inline: 0; padding: var(--ds-space-4); }
  #collections-back { display: none; }
  .collection-preview { height: clamp(200px, 40svh, 340px); }
  #collections-detail-view h3 { margin-top: 10px; overflow-wrap: anywhere; }
}
@media (min-width: 720px) {
  .profile-editor { grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr); align-items: start; }
  .profile-editor .equipment-preview { height: 390px; }
}
@media (max-width: 719px) {
  .profile-editor .equipment-preview { height: 180px; }
}
@media (max-width: 380px) {
  dialog { padding: var(--ds-space-4); }
  th, td { padding: 8px 3px; }
}
tr.is-me { color: var(--ds-accent); background: var(--ds-surface-raised); }
tr.is-me td:first-child { box-shadow: inset 3px 0 0 var(--ds-accent); }
body[data-accent="cyan"] { --accent: #64dce9; }
body[data-accent="amber"] { --accent: #f3c16e; }
body[data-accent="violet"] { --accent: #c4a0fb; }
#weekly-collections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ds-space-2); }
.weekly-collection-preview { display: flex; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 1; padding: 6px; border-radius: var(--ds-radius-control); border: 1px solid #ffffff33; cursor: pointer; color: #ddd; }
.weekly-collection-preview span { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #fff; box-shadow: 0 0 5px #fff8; }
.weekly-collection-preview i { width: 9px; height: 9px; background: var(--particle-color); transform: rotate(25deg); }
.weekly-collection-preview { position: relative; overflow: hidden; isolation: isolate; }
.weekly-collection-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; z-index: -1; }
.weekly-collection-preview[aria-pressed="true"] { border-color: #fff; }
.weekly-collection-preview:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.weekly-collection-pages { display: flex; align-items: center; justify-content: space-between; margin: 12px 0; }
.weekly-collection-pages button { width: auto; min-width: 76px; }
.player-label small, .cosmetic-preview[data-locked="true"] { color: #bfc3c7; opacity: 1; }
#profile-summary:empty, #profile-notice:empty, #account-label:empty { display: none; }
#weekly-collection-detail { font-size: var(--ds-text-base); }
.weekly-collection-preview small { position: absolute; bottom: 5px; font-size: var(--ds-text-sm); background: color-mix(in srgb, var(--ds-bg) 90%, transparent); padding: 3px; color: #fff; }
#collections-detail-view h3 { font-size: var(--ds-text-lg); }
.profile-controls { min-width: 0; }
#classic-best strong { font: inherit; color: #fff; }
#time-attack-connection { grid-column: 1/-1; }
#time-attack-panel .mode-secondary { flex-wrap: wrap; }
#time-attack-notice:empty { display: none; }
body[data-view="results"] .home-modes .mode-card { display: none; }
body[data-view="results"][data-result-mode="classic"] #classic-panel,
body[data-view="results"][data-result-mode="daily"] #daily-panel,
body[data-view="results"][data-result-mode="chaos"] #chaos-panel,
body[data-view="results"][data-result-mode="time-attack"] #time-attack-panel { display: block; }
.rank-eligibility { display: block; color: var(--muted); font-size: var(--ds-text-sm); margin-top: 6px; }
body[data-view="pause"] #saved-results-button, body[data-view="results"] #saved-results-button { display: none; }
body[data-view="results"] .mode-card { padding: 0; background: transparent; border: 0; }
body[data-view="results"] .mode-card > h2, body[data-view="results"] .mode-card > p, body[data-view="results"] #skip-menu-button { display: none; }
body[data-view="results"][data-result-mode="classic"] #daily-panel,
body[data-view="results"][data-result-mode="classic"] #chaos-panel,
body[data-view="results"][data-result-mode="daily"] #classic-panel,
body[data-view="results"][data-result-mode="daily"] #chaos-panel,
body[data-view="results"][data-result-mode="chaos"] #classic-panel,
body[data-view="results"][data-result-mode="chaos"] #daily-panel { display: none; }
body[data-view="results"] .home-modes { display: block; }
body[data-view="results"] .menu-nav { display: none; }
body[data-view="results"] #daily-play:disabled { display: none; }
body[data-view="results"] #daily-deadline:not([hidden]) { display: block; }
.play-demo { margin: 18px 0 24px; padding: 14px; border: 1px solid var(--line); border-radius: var(--ds-radius-panel); }
.play-demo h3 { margin-top: 0; }
#demo-field { display: block; width: 100%; height: 260px; background: #090a0b; border-radius: var(--ds-radius-control); }
#demo-field[data-stage="0"] { cursor: crosshair; }
#demo-steps { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--ds-space-2); padding: 0; font-size: var(--ds-text-sm); color: var(--muted); counter-reset: demo-step; }
#demo-steps li { list-style: none; counter-increment: demo-step; }
#demo-steps li::before { content: counter(demo-step) '. '; }
#demo-steps li[aria-current="step"] { color: var(--ds-accent); font-weight: 700; }
#demo-next { width: 100%; margin-top: var(--ds-space-3); }
#creator-dialog { width: min(940px, calc(100% - 24px)); }
#creator-dialog h3 { margin-bottom: var(--ds-space-2); }
#creator-library { display: grid; gap: var(--ds-space-2); margin: 12px 0; }
.creator-library-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: var(--ds-space-2); border: 1px solid var(--line); border-radius: var(--ds-radius-control); }
.creator-library-row span { flex: 1 1 240px; }
#creator-editor { border-top: 1px solid var(--line); margin-top: var(--ds-space-4); padding-top: 16px; }
#creator-preview { display: flex; justify-content: center; background: #080d12; border-radius: var(--ds-radius-control); max-height: 500px; overflow: hidden; }
#creator-preview canvas { display: block; width: auto; height: min(500px, 55vh); max-width: 100%; }
.creator-controls, #creator-highlights { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); align-items: center; margin: 10px 0; }
#creator-timeline, #creator-progress { display: block; width: 100%; margin: 10px 0; }
.creator-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; }
.creator-fields label { display: grid; gap: var(--ds-space-1); }
.creator-fields input:not([type=checkbox]), .creator-fields select { width: 100%; min-width: 0; }
#creator-file { display: block; max-width: 100%; max-height: 460px; margin: 12px auto; }
#creator-file[hidden] { display: none; }
@media (max-width: 600px) { .creator-fields { grid-template-columns: 1fr; } #creator-dialog { width: 100%; max-width: 100%; } }

/* Home scrolls as one surface when enlarged text or a short screen needs more room. */
body[data-view="home"] .app { grid-template-rows: auto minmax(min-content,1fr) auto; overflow-y: auto; }
body[data-view="home"] .game-wrap { height: auto; overflow: visible; }
body[data-view="home"] #field { display: none; }
body[data-view="home"] .overlay { position: relative; inset: auto; min-height: 100%; overflow: visible; }
/* Home composition: one panel on all viewports. CSS visibility permits result reuse. */
body[data-view="home"] .home-mode-picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--ds-space-2); margin-bottom: var(--ds-space-4); }
.home-mode-picker button { padding: var(--ds-space-3); }
body[data-view="home"] .home-modes .mode-card { display: none; }
body[data-view="home"] .home-modes[data-active-mode="classic"] #classic-panel,
body[data-view="home"] .home-modes[data-active-mode="daily"] #daily-panel,
body[data-view="home"] .home-modes[data-active-mode="chaos"] #chaos-panel,
body[data-view="home"] .home-modes[data-active-mode="time-attack"] #time-attack-panel,
body[data-view="home"] .home-modes[data-active-mode="custom"] #custom-panel { display: block; }
body[data-view="home"] .home-mode-picker button:last-child { grid-column: 1 / -1; }
.custom-power-selector { min-width: 0; margin: var(--ds-space-3) 0; border: 1px solid var(--ds-border); padding: var(--ds-space-3); }
.custom-power-layout { container-type: inline-size; }
.custom-power-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--ds-space-2); }
@container (min-width: calc(10em + 8px)) { .custom-power-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@container (min-width: calc(20em + 24px)) { .custom-power-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
.custom-power-selector .custom-power-option { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: start; gap: var(--ds-space-1); min-width: 44px; min-height: 44px; padding: var(--ds-space-2); background: var(--ds-surface); color: var(--ds-text-muted); transition: none; }
.custom-power-selector .custom-power-option[aria-pressed="true"] { border-color: var(--ds-accent); color: var(--ds-accent); background: color-mix(in srgb,var(--ds-accent) 8%,var(--ds-surface)); }
.custom-power-option:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 2px; }
.custom-power-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: none; }
.custom-power-icon svg { width: 24px; height: 24px; transition: width var(--ds-motion-fast), height var(--ds-motion-fast); }
.custom-power-option[aria-pressed="true"] svg { width: 32px; height: 32px; }
.custom-power-name { max-width: 100%; overflow-wrap: anywhere; }
.custom-power-check { position: absolute; top: 2px; right: 4px; font-size: 12px; visibility: hidden; }
.custom-power-option[aria-pressed="true"] .custom-power-check { visibility: visible; }
.custom-power-description { margin-top: var(--ds-space-3); color: var(--ds-text-muted); overflow-wrap: anywhere; }
.custom-power-description strong { color: var(--ds-text); }
.custom-power-description p { margin: var(--ds-space-1) 0 0; }
.custom-power-help { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .custom-power-icon svg { transition: none; } }
#custom-difficulty { width: 100%; }
#custom-continue { margin-bottom: var(--ds-space-2); }
.power-chip[data-used="true"] { opacity: .65; }
.power-chip[data-permanent="true"] small { display: none; }
.power-chip[data-used="true"] strong::after { content: ' ✓'; }
body[data-view="home"] .mode-card { border-top: 2px solid var(--ds-accent); }
.mode-progress { color: var(--ds-text); font-variant-numeric: tabular-nums; }
.mode-secondary button:not(.ds-button-danger) { color: var(--ds-text-muted); }
.menu-nav button { gap: var(--ds-space-2); background: transparent; border-color: transparent; color: var(--ds-text-muted); }
.menu-nav button:hover { color: var(--ds-text); border-color: var(--ds-border); }
@media (min-width: 860px) {
  body[data-view="home"] .app { width: min(100%, 720px); }
  body[data-view="home"] :is(.topbar,.game-wrap,.page-footer) { width: 100%; }
  body[data-view="home"] .overlay-card { max-width: 640px; }
  body[data-view="home"] .home-mode-picker { grid-template-columns: repeat(5,minmax(0,1fr)); }
  body[data-view="home"] .home-mode-picker button:last-child { grid-column: auto; }
  body[data-view="home"] .mode-card { padding: var(--ds-space-6); }
  body:is([data-view="home"],[data-view="pause"]) .page-footer .menu-nav { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
/* Component states: shared by application and catalogue. */
button { font-weight: 600; transition: background var(--ds-motion-fast), border-color var(--ds-motion-fast), color var(--ds-motion-fast); }
button:active:not(:disabled) { border-color: var(--ds-accent); }
button[aria-busy="true"] { cursor: progress; }
button[aria-busy="true"]::after { content: '…'; margin-inline-start: var(--ds-space-2); }
.ds-button-primary { color: var(--ds-ink); background: var(--ds-accent); border-color: transparent; min-height: 48px; }
.ds-button-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--ds-accent), white 15%); }
.ds-button-quiet, .dialog-header button { background: transparent; border-color: transparent; color: var(--ds-text-muted); }
.ds-button-danger { color: var(--ds-danger); border-color: var(--ds-danger); background: transparent; }
.ds-button-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--ds-danger) 12%, var(--ds-bg)); }
input[aria-invalid="true"] { border-color: var(--ds-danger); }
.ds-field-help { margin: var(--ds-space-2) 0; font-size: var(--ds-text-sm); }
.ds-field-error { color: var(--ds-danger); }
input[type="checkbox"] { width: 24px; min-height: 24px; height: 24px; accent-color: var(--ds-accent); }
label:has(input[type="checkbox"]) { display: flex; align-items: center; gap: var(--ds-space-3); min-height: var(--ds-target); }
.ds-notice { padding: var(--ds-space-3); border: 1px solid var(--ds-border); border-inline-start: 3px solid var(--ds-accent); border-radius: var(--ds-radius-control); color: var(--ds-text); background: var(--ds-surface); }
.ds-notice:empty { display: none; }
.ds-notice[data-tone="success"], .ds-status[data-tone="success"] { border-color: var(--ds-success); }
.ds-notice[data-tone="warning"], .ds-status[data-tone="warning"] { border-color: var(--ds-warning); }
.ds-notice[data-tone="danger"], .ds-status[data-tone="danger"] { border-color: var(--ds-danger); }
.ds-status { display: inline-flex; align-items: center; gap: var(--ds-space-2); padding: 4px 8px; border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); font-size: var(--ds-text-sm); color: var(--ds-text); }
.ds-status::before { content: ''; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.badge strong { font-size: var(--ds-text-lg); }
.badge-tier strong { font-size: var(--ds-text-base); }
dialog { box-shadow: 0 24px 80px #0008; }
dialog[open] { animation: ds-panel-in var(--ds-motion-panel); }
@keyframes ds-panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
th { color: var(--ds-text-muted); font-weight: 600; }
td:last-child { font-variant-numeric: tabular-nums; }
#settings-form > label:not(.analytics-choice) { margin-top: var(--ds-space-6); }
#result-panel .result-score { font-size: var(--ds-text-display); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
/* Catalogue layout only: examples use the production components above. */
html:has(body.ds-catalog) { height: auto; overflow: auto; }
body.ds-catalog { height: auto; overflow: visible; }
.ds-catalog main { max-width: 1080px; margin: auto; padding: var(--ds-space-6); }
.ds-catalog header { padding-block: var(--ds-space-8); border-bottom: 1px solid var(--ds-border); }
.ds-catalog h1 { font-size: var(--ds-text-display); letter-spacing: -.04em; margin: 12px 0; }
.ds-catalog h2 { font-size: var(--ds-text-xl); }
.ds-catalog h3 { font-size: var(--ds-text-lg); }
.ds-catalog a { color: var(--ds-accent); text-underline-offset: 4px; }
.ds-catalog nav { display: flex; flex-wrap: wrap; gap: var(--ds-space-3); margin-block: var(--ds-space-4); }
.ds-catalog nav a { min-height: var(--ds-target); display: inline-flex; align-items: center; }
.ds-catalog section { margin-block: var(--ds-space-8); scroll-margin-top: var(--ds-space-4); }
.ds-catalog-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: var(--ds-space-4); }
.ds-catalog-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-3); }
.ds-catalog-sample { padding: var(--ds-space-4); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-panel); background: var(--ds-surface); min-width: 0; }
.ds-swatch { display: block; height: 64px; border-radius: var(--ds-radius-control); background: var(--swatch); border: 1px solid var(--ds-border); }
.ds-catalog code { color: var(--ds-text-muted); font-size: var(--ds-text-sm); overflow-wrap: anywhere; }
.ds-catalog .play-button { width: auto; margin: 0; }
.ds-catalog .hud-dock { width: 100%; }
.ds-catalog output { display: block; margin-top: var(--ds-space-3); color: var(--ds-text-muted); }
.ds-space-sample { height: 12px; width: var(--space); background: var(--ds-accent); margin-block: 8px; }
.ds-catalog select { max-width: 280px; }
@media (max-width: 600px) { .ds-catalog main { padding: var(--ds-space-4); } }

/* Catalogue HUD specimens have intrinsic height, not the adjacent card height. */
.ds-hud-sample { align-self: start; }
.ds-hud-sample h3 { margin: 0 0 16px; }
.ds-hud-sample .hud-dock { margin: 0; }
.ds-hud-sample .power-strip { margin-top: 16px; gap: 10px; }
.ds-hud-sample .power-group { grid-template-columns: minmax(0,1fr); }
.ds-hud-sample .power-items { flex-wrap: wrap; }
.ds-hud-sample .power-group + .power-group { border: 0; padding: 0; }
.ds-hud-sample .power-group-label { width: 100%; }
@media (max-width: 380px) {
  .hud-dock { gap: 8px; padding-inline: 8px; }
  .turn-stat, .balls-stat { padding-left: 8px; }
  .hud-dock .score-stat { --score-max-font-size: 1.75rem; }
}
