:root {
  color-scheme: light;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  font-synthesis: none;
  --page: #f6f6f3;
  --surface: #fff;
  --ink: #252a2e;
  --muted: #626970;
  --line: #d9dddf;
  --accent: #245c91;
  --preview: #202427;
  --on-accent: #fff;
  --status-idle: #818990;
  --preview-icon: #8d98a3;
  --metadata-surface: #ebedee;
  --image-surface: #454545;
  --surface-subtle: #f1f3f4;
  --surface-hover: #eceff1;
  --border-strong: #9da6ae;
  --text-disabled: #767c82;
  --accent-hover: #194a78;
  --accent-active: #123d64;
  --success: #256343;
  --success-dot: #318557;
  --danger: #a12e26;
  --danger-surface: #fff3f0;
  --warning: #805d21;
  --preview-text: #e4e8ec;
  --preview-muted: #b7bec5;
  --preview-border: #454a4f;
  --preview-frame: #171a1d;
  --radius-control: 4px;
  --space-half: 6px;
  --space-medium: 20px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --text-meta: 11px;
  --text-secondary: 12px;
  --text-compact: 13px;
  --text-title: 18px;
  --text-body: 14px;
  --text-heading: 16px;
  --motion-control: 120ms;
  background: var(--page);
  color: var(--ink);
  font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { color: var(--text-disabled); background: var(--surface-subtle); border-color: var(--line); cursor: not-allowed; }
:where(button, input, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.app { display: flex; flex-direction: column; height: 100dvh; min-height: 520px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-medium); padding: var(--space-4) var(--space-5); }
.topbar > div:first-child { min-width: 0; }
h1 { margin: 0; font-size: var(--text-title); font-weight: 600; line-height: 1.4; letter-spacing: .02em; }
.topbar-right { display: flex; align-items: center; gap: var(--space-4); flex: none; }
.status { display: inline-flex; align-items: center; gap: var(--space-2); flex: none; color: var(--muted); font-size: var(--text-secondary); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--status-idle); }
.status.is-live { color: var(--success); }
.status.is-live::before { background: var(--success-dot); }
.author-menu { position: relative; flex: none; }
.author-toggle { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; overflow: hidden; border: 1px solid #bfdbfe; border-radius: 50%; background: #eff6ff; color: #2563eb; transition: border-color 150ms ease, box-shadow 150ms ease; }
.author-toggle:hover, .author-toggle[aria-expanded="true"] { border-color: #60a5fa; box-shadow: 0 0 0 2px #dbeafe; }
.author-toggle img { display: block; width: 100%; height: 100%; object-fit: contain; }
.author-panel { position: absolute; z-index: 30; top: calc(100% + 12px); right: 0; width: min(288px, calc(100vw - 32px)); overflow: visible; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; box-shadow: 0 16px 48px -12px rgb(30 58 138 / 22%); }
.author-panel::before { content: ""; position: absolute; top: -7px; right: 20px; z-index: 1; width: 12px; height: 12px; transform: rotate(45deg); border-top: 1px solid #e2e8f0; border-left: 1px solid #e2e8f0; background: #eff6ff; }
.author-panel-top { padding: 16px 16px 20px; border-radius: 16px 16px 0 0; background: linear-gradient(#eff6ff, #eef2ff); }
.author-panel h2 { margin: 0; color: #64748b; font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.author-intro { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.author-intro > img { display: block; flex: none; width: 48px; height: 48px; border: 1px solid #fff; border-radius: 16px; background: rgb(255 255 255 / 80%); object-fit: contain; box-shadow: 0 1px 3px rgb(30 58 138 / 10%); }
.author-identity { flex: none; min-width: 0; }
.author-identity p { margin: 0 0 2px; color: #64748b; font-size: 10px; font-weight: 500; letter-spacing: .1em; }
.author-identity strong { display: block; overflow-wrap: anywhere; color: #1e293b; font-size: 20px; font-weight: 700; letter-spacing: .04em; }
.author-tagline { position: relative; flex: none; margin: 0; padding: 8px 10px; border: 1px solid #dbeafe; border-radius: 12px; background: #fff; color: #475569; font-size: 11px; font-weight: 700; line-height: 1.5; white-space: nowrap; box-shadow: 0 1px 3px rgb(30 58 138 / 10%); }
.author-tagline::before { content: ""; position: absolute; top: calc(50% - 4px); left: -5px; width: 8px; height: 8px; transform: rotate(45deg); border-bottom: 1px solid #dbeafe; border-left: 1px solid #dbeafe; background: #fff; }
.author-panel-bottom { padding: 16px 16px 20px; }
.author-details { margin: 0; font-size: 12px; }
.author-details > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.author-details dt { color: #6b7280; }
.author-details dd { margin: 0; }
.author-version { flex: none; padding: 4px 8px; border-radius: 99px; background: #eff6ff; color: #2563eb; font-size: 11px; }
.author-history { margin: 12px 0 16px; padding: 4px; border: 0; border-radius: 4px; background: transparent; color: #2563eb; font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.author-history:hover { color: #1d4ed8; }
.author-repository { border-top: 1px solid #f1f5f9; }
.author-repository > div { padding-top: 12px; }
.author-repository-status { color: #64748b; }
.release-dialog { width: min(420px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.release-dialog::backdrop { background: rgb(15 22 28 / 44%); }
.release-dialog h2 { margin: 0; font-size: var(--text-heading); }
.release-dialog p { line-height: 1.7; }
.release-dialog .release-version { color: var(--muted); font-size: var(--text-secondary); }
.release-dialog button { display: block; margin: 20px 0 0 auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.capture-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 36%); flex: 1; min-height: 0; }
.workspace { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); }
.button { min-height: 36px; border: 1px solid var(--line); border-radius: var(--radius-control); padding: var(--space-2) var(--space-3); font-size: var(--text-secondary); font-weight: 600; transition: background var(--motion-control) ease; }
.button-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); }
.button-secondary { background: var(--surface); color: var(--ink); }
.button-secondary:hover:not(:disabled) { background: var(--surface-hover); }
.stage-wrap { display: flex; align-items: center; justify-content: center; flex: 1; min-height: 0; overflow: hidden; padding: var(--space-medium); background: var(--preview); }
.stage { position: relative; flex-shrink: 0; aspect-ratio: 542 / 992; overflow: hidden; background: var(--preview-frame); outline: 1px solid var(--preview-border); }
canvas { display: block; width: 100%; height: 100%; }
.overlay { position: absolute; inset: 0; pointer-events: none; }
.screen-prompt { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--space-4); background: rgb(23 26 29 / 48%); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--preview-text); text-align: center; pointer-events: none; }
.screen-prompt p { margin: 0; font-size: clamp(12px, 3.8cqi, 18px); font-weight: 600; line-height: 1.8; overflow-wrap: anywhere; }
.stage { container-type: inline-size; }
.empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: var(--space-5); padding: var(--space-5) var(--space-4); overflow-y: auto; text-align: center; color: var(--preview-text); }
.share-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); width: 100%; max-width: 680px; padding: 0; margin: 0; list-style: none; }
.share-steps li { min-width: 0; }
.share-step-image { display: block; width: 100%; max-width: 200px; margin: 0 auto var(--space-3); }
.share-steps p { display: flex; justify-content: center; align-items: flex-start; gap: var(--space-2); margin: 0; font-size: var(--text-secondary); line-height: 1.8; text-align: left; }
.share-step-number { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border: 1px solid var(--preview-muted); border-radius: 50%; font-size: var(--text-secondary); font-weight: 600; }
.guide-surface { fill: var(--surface); }
.guide-line { fill: none; stroke: var(--line); }
.guide-muted-fill { fill: var(--border-strong); }
.guide-accent-fill { fill: var(--accent); }
.guide-title { fill: var(--ink); font-size: 10px; font-weight: 600; }
.guide-muted-label { fill: var(--muted); font-size: 9px; }
.guide-accent-label { fill: var(--accent); font-size: 9px; font-weight: 600; }
.guide-button-label { fill: var(--on-accent); font-size: 10px; font-weight: 600; }
.guide-accent-line { fill: none; stroke: var(--accent); stroke-width: 3; }
.guide-thumbnail { fill: var(--surface-subtle); stroke: var(--line); }
.guide-selection { fill: var(--surface-subtle); stroke: var(--accent); stroke-width: 2; }
.guide-game { fill: var(--accent); }
.guide-game-line, .guide-check { fill: none; stroke: var(--on-accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.guide-pointer { fill: var(--ink); stroke: var(--surface); stroke-width: 1.5; stroke-linejoin: round; }
@container (max-width: 520px) {
  .share-steps { grid-template-columns: 1fr; gap: var(--space-3); max-width: 340px; }
  .share-steps li { display: flex; align-items: center; gap: var(--space-3); }
  .share-step-image { width: 112px; flex: none; margin: 0; }
  .share-steps p { justify-content: flex-start; }
}
.empty .button { min-height: 40px; padding-inline: var(--space-4); font-size: var(--text-body); }
.empty .button:focus-visible { outline-color: var(--preview-text); }
.results { min-width: 0; min-height: 0; overflow-y: auto; overflow-wrap: anywhere; padding: var(--space-medium) var(--space-5); background: var(--surface); }
.results-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.results h2 { margin: 0; font-size: var(--text-heading); font-weight: 600; }
.results-actions { display: flex; align-items: center; gap: var(--space-1); flex: none; }
.clear-list { flex: none; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: var(--muted); padding: var(--space-half) var(--space-2); font-size: var(--text-meta); min-height: 32px; }
.clear-list:hover:not(:disabled) { background: var(--surface-subtle); color: var(--danger); }
.archive-folder { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: var(--muted); }
.archive-folder:hover:not(:disabled) { background: var(--surface-subtle); color: var(--accent); }
.archive-folder svg, .archive-delete svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.archive-dialog { width: min(420px, calc(100vw - 32px)); max-height: min(80dvh, 600px); overflow: auto; padding: var(--space-5); border: 1px solid var(--border-strong); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); }
.archive-dialog::backdrop { background: rgb(15 22 28 / 44%); }
.archive-dialog h2 { margin: 0; font-size: var(--text-heading); font-weight: 600; }
.archive-dialog p { margin: var(--space-3) 0 0; color: var(--muted); font-size: var(--text-secondary); line-height: 1.7; }
.archive-name-field { display: grid; gap: var(--space-2); margin-top: var(--space-4); font-size: var(--text-secondary); font-weight: 600; }
.archive-name-field input { width: 100%; min-height: 40px; padding: var(--space-2); border: 1px solid var(--border-strong); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font-size: var(--text-body); }
.archive-dialog .archive-error { color: var(--danger); }
.archive-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-5); }
.archive-dialog-actions .archive-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.archive-dialog-actions .archive-danger:hover { background: #87261f; }
.archive-list { padding: 0; margin: var(--space-4) 0 0; list-style: none; max-height: 45dvh; overflow-y: auto; border-top: 1px solid var(--line); }
.archive-list li { display: flex; align-items: center; gap: var(--space-2); min-height: 54px; border-bottom: 1px solid var(--line); }
.archive-open { flex: 1; min-width: 0; padding: var(--space-2) 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.archive-open:hover { color: var(--accent); }
.archive-open strong, .archive-open span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-open strong { font-size: var(--text-compact); font-weight: 600; }
.archive-open span { margin-top: var(--space-1); color: var(--muted); font-size: var(--text-meta); }
.archive-delete { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: var(--muted); }
.archive-delete:hover { background: var(--danger-surface); color: var(--danger); }
.saved-count { margin: var(--space-2) 0; color: var(--ink); font-size: var(--text-secondary); font-variant-numeric: tabular-nums; }
.list-columns { display: flex; justify-content: space-between; padding: var(--space-2) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--text-meta); }
.rate-list { list-style: none; padding: 0; margin: 0; }
.rate-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 44px; padding: var(--space-3) 0; border-bottom: 1px solid var(--line); font-size: var(--text-compact); }
.rate-list .name { overflow-wrap: anywhere; }
.rate-list .rate { flex: none; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.rate-list .placeholder { min-height: 80px; color: var(--muted); font-size: var(--text-secondary); }
.legacy-records { margin-top: var(--space-5); color: var(--muted); font-size: var(--text-secondary); }
summary { cursor: pointer; }
.legacy-records .rate-list { margin-top: var(--space-3); }
.my-score { margin-bottom: var(--space-medium); padding-bottom: var(--space-4); border-bottom: 1px solid var(--line); }
.my-score-table { margin-top: var(--space-3); margin-bottom: var(--space-2); }
.my-score-table .my-score-rank-editor { justify-content: flex-start; }
.my-score-table .my-score-rank-editor input { width: 76px; }
.contest-table.my-score-table .is-editing th { padding-top: var(--space-2); }
.my-score-note { margin: 0; color: var(--muted); font-size: var(--text-secondary); line-height: 1.6; }
.contest-view-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: var(--space-4); }
.contest-view-tabs button { flex: 1; min-height: 40px; padding: var(--space-2); border: 0; border-bottom: 2px solid transparent; background: var(--surface); color: var(--muted); font-size: var(--text-compact); font-weight: 600; }
.contest-view-tabs button:hover { background: var(--surface-hover); }
.contest-view-tabs button:active { background: var(--line); }
.contest-view-tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent); }
.contest-views { display: grid; overflow: clip; touch-action: pan-y; }
.contest-view { grid-area: 1 / 1; min-width: 0; transition: transform 220ms ease, visibility 220ms; }
.contest-view[aria-hidden="true"] { visibility: hidden; height: 0; overflow: hidden; pointer-events: none; }
#contest-prediction-view { transform: translateX(100%); }
.contest-views[data-view="prediction"] #contest-records-view { transform: translateX(-100%); }
.contest-views[data-view="prediction"] #contest-prediction-view { transform: translateX(0); }
.prediction-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }
.prediction-fields label { display: grid; gap: var(--space-2); color: var(--muted); font-size: var(--text-secondary); }
.prediction-fields label > span { display: flex; align-items: center; gap: var(--space-1); }
.prediction-fields input { min-width: 0; width: 100%; min-height: 40px; padding: var(--space-2); border: 1px solid var(--border-strong); border-radius: var(--radius-control); color: var(--ink); background: var(--surface); text-align: right; font-variant-numeric: tabular-nums; }
.prediction-fields input:hover { border-color: var(--accent); }
.prediction-output { margin-top: var(--space-5); }
.prediction-status { margin: var(--space-2) 0 var(--space-4); font-size: var(--text-secondary); color: var(--muted); line-height: 1.7; }
.prediction-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: var(--text-secondary); margin-bottom: var(--space-5); content-visibility: auto; contain-intrinsic-size: auto 208px; }
.prediction-table caption { text-align: left; font-size: var(--text-compact); font-weight: 600; padding-bottom: var(--space-2); }
.prediction-table th, .prediction-table td { border-bottom: 1px solid var(--line); padding: var(--space-2) var(--space-1); text-align: right; }
.prediction-table thead th { border-top: 1px solid var(--line); color: var(--muted); font-size: var(--text-meta); font-weight: 500; white-space: nowrap; }
.prediction-table th:first-child { width: 32px; text-align: left; font-weight: 500; }
.prediction-table td strong { display: block; font-size: var(--text-compact); font-weight: 600; }
.prediction-table td span { display: block; color: var(--muted); font-size: var(--text-meta); margin-top: var(--space-1); }
.prediction-table tbody tr:hover { background: var(--surface-subtle); }
.prediction-table td.has-player-card { cursor: zoom-in; }
.prediction-table td.has-player-card:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .contest-view { transition: none; } }
.contest-table { width: 100%; border-collapse: collapse; font-size: var(--text-compact); font-variant-numeric: tabular-nums; }
.contest-table th, .contest-table td { padding: var(--space-2) 0; border-bottom: 1px solid var(--line); text-align: left; }
.contest-table thead th { position: sticky; top: -20px; z-index: 1; background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--text-meta); font-weight: 500; }
.contest-table tbody th { font-weight: 500; white-space: nowrap; }
.contest-table th:nth-child(2), .contest-table .contest-rate { text-align: right; padding-inline: var(--space-2) var(--space-3); white-space: nowrap; }
.contest-rate { font-weight: 600; }
.contest-table .contest-points { text-align: right; padding-inline: var(--space-2) var(--space-3); white-space: nowrap; }
.contest-table th:last-child, .contest-table .contest-actions { width: 88px; text-align: right; white-space: nowrap; }
.contest-actions .contest-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; vertical-align: middle; }
.contest-actions .button:not([hidden]) ~ .button:not([hidden]) { margin-left: var(--space-half); }
.contest-icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contest-icon-button[aria-busy="true"] svg { animation: contest-recognizing 1s linear infinite; }
@keyframes contest-recognizing { to { transform: rotate(360deg); } }
.contest-table tbody tr:hover { background: var(--surface-subtle); }
.contest-table tbody tr.has-player-card > th { cursor: zoom-in; }
.player-card-preview { position: fixed; z-index: 12; width: min(400px, calc(100vw - 24px)); margin: 0; padding: var(--space-2); border: 1px solid var(--border-strong); border-radius: var(--radius-control); background: var(--surface); box-shadow: 0 4px 16px rgb(0 0 0 / .18); pointer-events: none; }
.player-card-preview[hidden] { display: none; }
.player-card-preview figcaption { margin: 0 0 var(--space-2); color: var(--muted); font-size: var(--text-secondary); }
.player-card-preview img { display: block; width: 100%; height: auto; }
.contest-toast { position: fixed; z-index: 10; margin: 0; padding: var(--space-3); border: 1px solid var(--ink); border-radius: var(--radius-control); background: var(--ink); color: var(--on-accent); font-size: var(--text-secondary); line-height: 1.6; overflow-wrap: anywhere; pointer-events: none; }
.contest-toast.is-error { background: var(--danger-surface); color: var(--danger); border-color: var(--danger); }
.contest-table .is-editing { background: var(--surface-subtle); }
.contest-table .is-editing td, .contest-table .is-editing th { vertical-align: top; }
.contest-table .is-editing th { padding-top: var(--space-4); }
.contest-inline-editor { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-1); }
.contest-inline-editor input { width: 96px; min-width: 0; min-height: 36px; padding: var(--space-half); text-align: right; border: 1px solid var(--border-strong); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 400; }
.contest-inline-editor input[aria-invalid="true"] { border-color: var(--danger); }
.contest-edit-error { max-width: 180px; margin: var(--space-2) 0 0 auto; white-space: normal; color: var(--danger); font-size: var(--text-secondary); font-weight: 400; line-height: 1.6; }
.contest-actions .contest-save { color: var(--accent); border-color: var(--accent); }
.capture-panel { margin: var(--space-5) 0 0; padding: var(--space-3) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.capture-panel summary { font-size: var(--text-secondary); font-weight: 600; }
.capture-panel p { color: var(--muted); font-size: var(--text-secondary); line-height: 1.8; }
.capture-panel button { min-height: 32px; border: 1px solid var(--line); border-radius: var(--radius-control); padding: var(--space-half) var(--space-3); background: var(--surface); color: var(--ink); font-size: var(--text-secondary); }
.capture-panel button:hover:not(:disabled) { background: var(--surface-subtle); }
.capture-panel button:disabled { color: var(--text-disabled); background: var(--surface-subtle); }
.message { flex-shrink: 0; margin: 0; padding: var(--space-2) var(--space-5); border-top: 1px solid var(--line); color: var(--muted); line-height: 1.6; font-size: var(--text-meta); }
.message.is-error { color: var(--danger); background: var(--danger-surface); }
@media (max-width: 719px) {
  .app { height: auto; min-height: 100dvh; }
  .topbar { padding: var(--space-4); gap: var(--space-3); }
  .topbar-right { gap: var(--space-3); }
  .capture-layout { display: flex; flex-direction: column; }
  .workspace { border-right: 0; }
  .stage-wrap { flex: none; height: clamp(280px, 48dvh, 440px); padding: var(--space-4); }
  .results { overflow: visible; padding: var(--space-medium) var(--space-4); border-top: 1px solid var(--line); }
  .message { padding: var(--space-3) var(--space-4); }
}
/* The idle instruction belongs to the preview area, not its narrow capture frame. */
.stage:has(> .empty:not([hidden])) { width: 100% !important; height: 100% !important; outline: none; background: transparent; }
.stage:has(> .empty:not([hidden])) canvas { visibility: hidden; }
.capture-panel p.is-error { color: var(--danger); }

/* Controls use the same hover, press and focus language throughout the app. */
.button-primary:active:not(:disabled) { background: var(--accent-active); }
:where(.button-secondary, .clear-list, .archive-folder, .archive-delete, .capture-panel button):active:not(:disabled) { background: var(--line); }
summary { border-radius: var(--radius-control); }
summary:hover { color: var(--accent); }
summary:active { color: var(--accent-active); }
.rate-list li:not(.placeholder):hover{ background: var(--surface-subtle); }
.list-columns { position: sticky; top: -20px; background: var(--surface); z-index: 1; }
@media (max-width: 719px) {
  .stage-wrap:has(.empty:not([hidden])) { height: 400px; }
  .button, .clear-list, .archive-folder, .capture-panel button { min-height: 40px; }
  .archive-folder { width: 40px; }
  .list-columns{ position: static; }
  .contest-table thead th { top: 0; }
  .contest-actions .contest-icon-button { width: 40px; height: 40px; }
  .contest-inline-editor input { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .contest-icon-button[aria-busy="true"] svg { animation: none; }
}
@media (max-width: 400px) {
  .topbar { gap: 8px; padding: 12px 16px; }
  .topbar-right { gap: 8px; }
  h1 { font-size: 14px; }
  .contest-table:not(.my-score-table) .contest-inline-editor input { width: 72px; }
}
