:root { color-scheme: dark; font-family: system-ui, sans-serif; color: #eef3fa; background: #0d1725; }
* { box-sizing: border-box; } [hidden] { display: none !important; }
body { margin: 0; } main { max-width: 1100px; margin: 0 auto; padding: 32px 24px 64px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 36px; }
.brand { text-decoration: none; color: #eef3fa; font-weight: 800; letter-spacing: .1em; font-size: 1.1rem; }
.brand span { display: block; font-size: .65rem; color: #5ce0bd; margin-top: 5px; }
.eyebrow { color: #5ce0bd; letter-spacing: .12em; font-size: .75rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.08; margin: 20px 0; overflow-wrap: anywhere; }
h2 { margin-top: 0; overflow-wrap: anywhere; } p { line-height: 1.65; color: #b7c6d8; }
section { margin-top: 24px; padding: 28px; background: #162438; border: 1px solid #31465e; border-radius: 16px; }
.auth-card { max-width: 480px; } label { display: block; font-size: .9rem; color: #d7e2ee; }
input { display: block; width: 100%; margin: 8px 0 20px; padding: 13px; background: #0d1725; border: 1px solid #53677e; border-radius: 7px; color: #fff; font: inherit; }
button, .button { display: inline-block; cursor: pointer; padding: 12px 16px; min-height: 44px; border: 1px solid transparent; border-radius: 7px; background: #5ce0bd; color: #072c24; font: inherit; font-size: .9rem; font-weight: 650; text-decoration: none; text-align: center; }
.secondary { background: transparent; color: #d7e2ee; border-color: #53677e; } .danger { color: #ffacac; }
button:hover, .button:hover { filter: brightness(1.15); } button:disabled { opacity: .5; cursor: wait; }
a { color: #5ce0bd; } :focus-visible { outline: 2px solid #5ce0bd; outline-offset: 4px; }
.hint { font-size: .85rem; } .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.create-row { display: flex; align-items: end; gap: 14px; margin: 32px 0; }
.create-row label { flex: 1; } .create-row input { margin-bottom: 0; }
#notice:not(:empty) { background: #20354b; border-left: 3px solid #5ce0bd; padding: 12px 16px; }
dialog { background: #162438; color: #eef3fa; border: 1px solid #53677e; border-radius: 16px; padding: 28px; width: min(520px, 90vw); }
dialog::backdrop { background: #000b; }
#summary-dialog { width: min(720px, 92vw); }
#summary-content { max-height: min(60vh, 560px); overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; border: 1px solid #31465e; border-radius: 8px; background: #0d1725; color: #eef3fa; font: 500 .95rem/1.65 ui-monospace, monospace; }
@media (max-width: 600px) { main { padding: 24px 16px; } section { padding: 20px; } .create-row { align-items: stretch; flex-direction: column; } .actions > * { flex: 1 1 140px; } }
@media (max-width: 600px) { .game-filters { grid-template-columns: 1fr; }.form-action { padding-bottom: 12px; } }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.score-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.score-card { padding: 20px; background: #0d1725; border-radius: 12px; margin-bottom: 20px; }
.score-card h3, .game-row h3 { overflow-wrap: anywhere; }
.points { color: #5ce0bd; font-size: 4rem; font-weight: 750; margin: 12px 0; font-variant-numeric: tabular-nums; }
.game-row { border-top: 1px solid #31465e; margin-top: 24px; padding-top: 12px; }
.game-filters { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(220px, 1.3fr); gap: 0 16px; align-items: end; margin-top: 24px; padding: 16px; background: #162438; border: 1px solid #31465e; border-radius: 10px; }
.game-filters label { min-width: 0; }.game-filters select, .game-filters input { margin-bottom: 0; }.game-filters .hint { grid-column: 1 / -1; margin: 10px 0 0; }
.form-action { display: flex; align-items: end; padding-bottom: 20px; }.form-action button { width: 100%; }
@media (max-width: 600px) { .score-grid { grid-template-columns: 1fr; gap: 0; } }
select { display: block; width: 100%; margin: 8px 0 20px; padding: 12px; color: #fff; background: #0d1725; border: 1px solid #53677e; border-radius: 7px; font: inherit; }
.timeout-panel { padding: 20px; margin-top: 20px; background: #0d1725; border: 1px solid #31465e; border-radius: 12px; }
.timeout-team { padding: 16px; min-width: 0; background: #162438; border-radius: 10px; }
.timeout-team h4 { overflow-wrap: anywhere; }
.timeout-pips { display: flex; gap: 8px; margin: 10px 0; }
.timeout-pip { display: inline-block; width: 15px; height: 15px; border-radius: 50%; background: #5ce0bd; }
.timeout-pip.used { background: #68778a; }
.serving-ball { width: 21px; height: 21px; vertical-align: -4px; margin-right: 8px; }
.game-actions { margin: 14px 0; }
.game-order { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.check { display: flex; align-items: center; gap: 10px; margin: 16px 0; } .check input { width: auto; margin: 0; }
details { margin: 24px 0; } summary { cursor: pointer; padding: 12px 0; font-weight: 650; }
.clock-value { font-size: 2.4rem; font-variant-numeric: tabular-nums; color: #5ce0bd; margin: 8px 0; }
#sets-list li, #event-list li { margin: 10px 0; line-height: 1.6; overflow-wrap: anywhere; }
#event-list { max-height: 350px; overflow-y: auto; } .undone { color: #a9b0bc; text-decoration: line-through; }
.collaboration-notice { margin: 16px 0; padding: 16px; border: 1px solid #e6ad58; border-left: 5px solid #e6ad58; border-radius: 8px; background: #352b1c; color: #fff1d2; }
.collaboration-notice p { margin: 0 0 12px; line-height: 1.5; }
.serving { color: #5ce0bd; } .set-count { font-size: .95rem; color: #b7c6d8; }
.visual-editor { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
.visual-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.visual-preview-column { min-width: 0; position: sticky; top: 16px; }
#visual-preview { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: repeating-conic-gradient(#26394e 0% 25%, #1d2e42 0% 50%) 50% / 28px 28px; border: 1px solid #53677e; border-radius: 8px; touch-action: none; }
#visual-frame { position: absolute; top: 0; left: 0; width: 1920px; height: 1080px; transform-origin: top left; }
.visual-board { position: absolute; box-sizing: border-box; width: 640px; color: var(--visual-text, #eef3fa); background: var(--visual-background, #0d1725); border-left: 5px solid var(--visual-accent, #5ce0bd); box-shadow: 0 8px 28px #0005; cursor: grab; user-select: none; }
.visual-board:active { cursor: grabbing; }
.visual-board .visual-overlay-name { margin: 0; padding: 12px 24px; color: var(--visual-accent); text-transform: uppercase; letter-spacing: .08em; font-size: 17px; overflow-wrap: anywhere; }
.competition-brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; box-sizing: border-box; padding: 12px 24px 0; color: var(--visual-text); font-size: 18px; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.competition-logo-frame { display: block; width: var(--competition-logo-size, 64px); height: var(--competition-logo-size, 64px); flex: 0 0 var(--competition-logo-size, 64px); overflow: hidden; border-radius: 5px; }
.competition-brand img { display: block; width: 100%; height: 100%; border-radius: 5px; }
.team-logo-frame { display: block; width: 42px; height: 42px; flex: 0 0 42px; margin-right: 12px; overflow: hidden; border-radius: 5px; }
.team-logo { display: block; width: 100%; height: 100%; border-radius: 5px; }
.logo-preview-frame { width: 180px; height: 120px; margin: 12px 0 20px; overflow: hidden; background: #0d1725; border: 1px solid #53677e; border-radius: 8px; }
.logo-preview { display: block; width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%; }
#branding-editor { margin-top: 24px; }
.media-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 12px 0 24px; }
.media-card { min-width: 0; padding: 12px; background: #0d1725; border: 1px solid #31465e; border-radius: 10px; }
.media-thumbnail { display: block; width: 100%; height: 150px; margin-bottom: 10px; object-fit: contain; background: repeating-conic-gradient(#26394e 0% 25%, #1d2e42 0% 50%) 50% / 20px 20px; border-radius: 6px; }
.media-details { display: grid; gap: 4px; min-height: 58px; overflow-wrap: anywhere; }.media-details span { color: #b7c6d8; font-size: .82rem; }
.media-card .actions { margin-top: 10px; }.media-card .actions > * { flex: 1 1 130px; min-width: 0; }
.visual-board .visual-set-label, .visual-board .visual-history { margin: 0; padding: 8px 24px; font-size: 15px; color: var(--visual-muted); }
.visual-board .score-columns, .visual-board .score-row { display: grid; grid-template-columns: var(--score-columns); align-items: center; }
.visual-board .score-columns { min-height: 34px; padding: 0 14px 0 24px; background: var(--visual-panel); color: var(--visual-text); font-size: 16px; font-weight: 650; }
.visual-board .timeout-heading, .visual-board .sets-heading, .visual-board .points-heading { text-align: center; }
.visual-board .score-row { min-height: 80px; border-top: 1px solid #53677e66; }
.visual-board .score-team { display: flex; align-items: center; min-width: 0; padding: 14px 14px 14px 24px; font-size: 28px; font-weight: 650; overflow-wrap: anywhere; }
.visual-board .score-row strong { color: var(--visual-accent); font-size: 42px; text-align: center; font-variant-numeric: tabular-nums; }.visual-board .score-row .sets { color: var(--visual-text); font-size: 24px; }
.visual-board .serve-slot { display: inline-flex; align-items: center; justify-content: flex-start; width: 32px; height: 24px; flex: 0 0 32px; }.visual-board .serving-ball { display: block; width: 21px; height: 21px; flex: 0 0 auto; margin: 0; color: var(--visual-accent); }
.visual-board .timeout-cell { display: flex; min-height: 52px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.visual-board .timeout-clock-icon { width: 19px; height: 19px; color: var(--visual-accent); }.visual-board .timeout-pips { justify-content: center; gap: 5px; margin: 0; }.visual-board .timeout-pip { width: 9px; height: 9px; background: var(--visual-accent); }.visual-board .timeout-pip.used { background: #77848c; }
.visual-board .score-row .points-score { color: var(--visual-accent); }
.visual-board .visual-status { margin: 0; padding: 9px 24px; background: var(--visual-panel); color: var(--visual-text); text-transform: uppercase; letter-spacing: .12em; font-size: 13px; }
.visual-board .visual-clock { margin: 0; padding: 12px 24px; text-align: center; color: var(--visual-text); font-size: 24px; font-variant-numeric: tabular-nums; background: var(--visual-background); border-top: 1px solid #53677e66; }
.visual-options { margin: 18px 0; padding: 10px 12px; border: 1px solid #53677e; border-radius: 8px; }.visual-options legend { padding: 0 6px; font-weight: 650; }
.shortcut-controls { align-items: center; margin: 12px 0 4px; }.shortcut-controls p { margin: 0; }.shortcut-help { margin: 10px 0 20px; padding: 0 14px; border: 1px solid #31465e; border-radius: 8px; }.shortcut-help li { margin: 8px 0; }
kbd { display: inline-block; min-width: 1.7em; padding: 2px 6px; border: 1px solid #53677e; border-radius: 5px; background: #0d1725; color: #eef3fa; font: 600 .85em/1.5 ui-monospace, monospace; text-align: center; }
@media (max-width: 900px) { .visual-editor { grid-template-columns: 1fr; }.visual-preview-column { position: static; } }
