:root {
  color-scheme: light;
  --ink: #141922;
  --muted: #697386;
  --surface: #ffffff;
  --canvas: #edf1f5;
  --line: #d9e0e8;
  --blue: #1268e3;
  --blue-soft: #e7f0ff;
  --red: #df3f52;
  --red-soft: #ffeaed;
  --signal: #f2ca3b;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); }
button, input, select { font: inherit; }
a { color: inherit; }

.app-header {
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  color: white;
  background: var(--ink);
}
.body--operator .app-header { min-height: 48px; padding-block: 6px; }
.wordmark { display: flex; flex-direction: column; text-decoration: none; font-size: 11px; letter-spacing: .18em; line-height: 1; }
.wordmark strong { margin-top: 4px; font: 900 18px/1 "Arial Black", Impact, sans-serif; letter-spacing: -.04em; }
.app-header__actions { display: flex; align-items: center; gap: 8px; }
.public-header {
  min-height: 72px;
  padding: 10px clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: white;
  background: var(--ink);
}
.public-header nav { display: flex; align-items: center; gap: 18px; }
.public-header nav > a:not(.telegram-button) { font-size: 13px; font-weight: 900; text-decoration: none; }

.page-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: clamp(28px, 5vw, 64px) 0 80px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-heading--compact { align-items: center; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2 { margin-top: 0; letter-spacing: -.035em; }
h1 { margin-bottom: 0; font: 900 clamp(38px, 7vw, 70px)/.95 "Arial Black", Impact, sans-serif; }
h2 { margin-bottom: 12px; font-size: 24px; }
.lede { color: var(--muted); font-size: 17px; }

.primary-button, .secondary-button, .quiet-button {
  min-height: 46px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.primary-button { color: white; background: var(--ink); }
.primary-button:hover { background: #293244; }
.primary-button:disabled, .secondary-button:disabled { opacity: .4; cursor: not-allowed; }
.secondary-button { color: var(--ink); border: 1px solid var(--line); background: white; }
.quiet-button { min-height: 40px; padding-inline: 10px; color: inherit; background: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

.login-shell { width: 100%; min-height: calc(100vh - 72px); padding: 0; display: grid; place-items: center; background: linear-gradient(135deg, #141922 0 48%, #202a3a 48%); }
.login-card { position: relative; width: min(520px, calc(100% - 32px)); padding: clamp(28px, 7vw, 56px); overflow: hidden; border-radius: 24px; background: white; box-shadow: 0 24px 80px #06080d66; }
.score-mark { position: absolute; top: -12px; right: -8px; display: flex; color: #edf1f5; font: 900 86px/1 ui-monospace, monospace; letter-spacing: -.18em; transform: rotate(-4deg); }
.login-card h1 { position: relative; font-size: clamp(42px, 10vw, 68px); }
.stack-form { display: grid; gap: 10px; margin-top: 32px; }
.stack-form label, .field label, .field-label { font-size: 13px; font-weight: 800; }
input[type="text"], input[type="url"], input[type="password"], input[type="number"], input[type="datetime-local"], select {
  width: 100%; min-height: 48px; padding: 10px 12px; color: var(--ink); border: 1px solid #b8c2d0; border-radius: 9px; background: white;
}
.field-error, .errorlist { margin: 4px 0 0; padding: 0; color: #a62034; font-size: 13px; list-style: none; }
.dev-hint { margin: 20px 0 0; color: var(--muted); font: 12px/1.4 ui-monospace, monospace; }

.rush-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rush-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; border-bottom: 1px solid var(--line); }
.rush-row:last-child { border: 0; }
.rush-row:hover { background: #f8fafc; }
.rush-row__link { min-width: 0; padding: 18px 14px 18px 20px; display: grid; grid-template-columns: 110px 1fr auto 24px; align-items: center; gap: 18px; text-decoration: none; }
.rush-row form { padding: 10px 12px 10px 0; display: grid; place-items: center; }
.delete-rush-button, .danger-button { min-height: 42px; padding: 8px 12px; border: 1px solid #e2a9b1; border-radius: 9px; color: #982337; background: #fff3f5; font-weight: 800; cursor: pointer; }
.delete-rush-button:hover, .danger-button:hover { background: #ffe5e9; }
.rush-state { width: fit-content; padding: 5px 8px; border-radius: 999px; color: var(--muted); background: #edf1f5; font-size: 12px; font-weight: 800; }
.rush-state--live { color: #0c6635; background: #dff6e9; }
.rush-state--finished { color: #343c49; background: #e4e8ed; }
.rush-state--stopped { color: #8b4a13; background: #fff0d8; }
.rush-state--canceled { color: #8b2434; background: #ffe8ec; }
.rush-pair { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-name--blue { color: var(--blue); }
.team-name--red { color: var(--red); }
.row-score { margin-left: auto; font: 900 18px/1 ui-monospace, monospace; white-space: nowrap; }
.versus { color: var(--muted); font: 600 .8em/1 ui-monospace, monospace; }
.rush-location { grid-column: 2; color: var(--muted); font-size: 12px; }
.rush-row__link time { grid-column: 3; grid-row: 1 / 3; color: var(--muted); font: 12px/1.4 ui-monospace, monospace; text-align: right; }
.row-arrow { grid-column: 4; grid-row: 1 / 3; font-size: 22px; }

.empty-state { min-height: 420px; padding: 48px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed #a9b4c3; border-radius: var(--radius); background: #f5f8fa; }
.empty-state p { margin-top: 0; color: var(--muted); }
.empty-court { width: 120px; height: 70px; margin-bottom: 24px; border: 3px solid var(--blue); background: linear-gradient(90deg, transparent 49%, var(--blue) 49% 51%, transparent 51%); box-shadow: inset 0 0 0 12px #f5f8fa, inset 0 0 0 14px var(--blue); transform: skew(-8deg); }

.rush-details-grid, .team-setup-grid, .roster-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rush-details-grid { margin-bottom: 22px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.rush-details-disclosure { margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.rush-details-disclosure > summary { padding: 16px 20px; font-weight: 900; cursor: pointer; }
.rush-details-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.rush-details-disclosure .rush-details-grid { margin: 0; border: 0; }
.rush-details-grid .field { margin: 0; }
.schedule-field { margin: 0; }
.schedule-field small { display: block; margin-top: 5px; color: var(--muted); }
.team-card { min-width: 0; margin: 0; padding: 24px; border: 1px solid var(--line); border-top-width: 6px; border-radius: var(--radius); background: white; }
.team-card--blue { border-top-color: var(--blue); }
.team-card--red { border-top-color: var(--red); }
.team-card legend { padding: 0 8px; font: 900 22px/1 "Arial Black", Impact, sans-serif; }
.field { margin-top: 20px; }
.field-label { display: flex; justify-content: space-between; }
.field-label small { color: var(--muted); font-weight: 600; }
.field > label, .field-label { display: block; margin-bottom: 7px; }
[data-hidden-captain], [data-hidden-players], [data-hidden-pool] { display: none; }
.recruitment-pool { margin-bottom: 18px; padding: 20px 22px; border: 1px solid var(--line); border-top: 6px solid var(--signal); border-radius: var(--radius); background: white; }
.recruitment-pool__heading, .recruitment-team-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.recruitment-pool__heading h2 { margin: 0; }
.recruitment-pool__heading > strong { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--signal); font-size: 20px; }
.recruitment-pool > p { margin: 8px 0 14px; color: var(--muted); }
.recruitment-pool .player-picker { max-width: 560px; }
.participant-list { margin-top: 10px; display: grid; gap: 8px; }
.recruitment-pool .participant-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.recruitment-team-status { margin-top: 16px; padding: 10px 0; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.participant-role { margin-top: 14px; }
.player-picker, .autocomplete { min-width: 0; position: relative; }
.selected-player { min-height: 58px; padding: 8px 8px 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #b8c2d0; border-radius: 9px; background: #f8fafc; }
.selected-player--captain { border-color: #d0a800; box-shadow: inset 3px 0 var(--signal); }
.selected-player span, .player-result-option { min-width: 0; display: grid; text-align: left; }
.selected-player strong, .player-result-option strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-player small, .player-result-option small { color: var(--muted); font-size: 11px; }
.selected-player__actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.participant-action { min-height: 32px; padding: 5px 7px; border: 0; border-radius: 6px; color: #334155; background: #e5eaf0; font-size: 11px; font-weight: 800; cursor: pointer; }
.participant-action--captain { color: #6d5700; background: #fff2af; }
.participant-remove { flex: 0 0 32px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #e5eaf0; font-size: 19px; cursor: pointer; }
.participant-empty { margin: 0; padding: 13px; color: var(--muted); border: 1px dashed #b8c2d0; border-radius: 9px; font-size: 12px; }
.autocomplete-results { position: absolute; z-index: 8; top: calc(100% + 4px); left: 0; right: 0; max-height: 330px; padding: 6px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 14px 34px #0a102033; }
.autocomplete-more { display: block; padding: 8px 10px 2px; color: var(--muted); }
.player-result-option, .create-player-option { width: 100%; min-height: 48px; padding: 8px 10px; border: 0; border-radius: 7px; background: white; cursor: pointer; }
.player-result-option:hover, .create-player-option:hover { background: #eef3f8; }
.player-result-option:disabled { opacity: .5; cursor: not-allowed; }
.create-player-option { color: var(--blue); font-weight: 900; text-align: left; }
.inline-player-form { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.inline-player-form input, .inline-player-form select { min-width: 0; min-height: 42px; }
.inline-player-form .field-error, .inline-player-form button { grid-column: 1 / -1; }
.form-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 10px; }
.form-alert { margin-bottom: 18px; padding: 14px 16px; color: #8b1d2d; border: 1px solid #f0aeba; border-radius: 10px; background: #fff0f2; }
.form-alert .errorlist { margin: 0; }

.player-dialog { width: min(480px, calc(100% - 24px)); padding: 28px; border: 0; border-radius: 18px; box-shadow: 0 24px 80px #0a102066; }
.player-dialog::backdrop { background: #0c1220b8; backdrop-filter: blur(4px); }
.dialog-close { position: absolute; top: 12px; right: 12px; }
.dialog-close button { width: 40px; height: 40px; border: 0; border-radius: 50%; font-size: 24px; background: #edf1f5; cursor: pointer; }
.roster-summary ul { margin-bottom: 0; color: var(--muted); }
.schedule-card { margin-bottom: 18px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.schedule-card .eyebrow { margin-bottom: 4px; }
.schedule-card strong { font-size: 20px; }
.schedule-card--recruitment { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 28px; }
.rush-countdown { min-width: 210px; padding: 14px 16px; display: grid; gap: 3px; border-radius: 10px; color: white; background: var(--ink); }
.rush-countdown span { color: #aeb8c7; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.rush-countdown strong { color: var(--signal); font: 900 24px/1.1 ui-monospace, monospace; }
.recruitment-state { grid-column: 1 / -1; padding-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.recruitment-state span { color: var(--blue); font-weight: 900; }
.recruitment-state strong { font-size: 13px; text-align: right; }
.scheduled-team__heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.scheduled-team__heading h2 { margin: 0; }
.scheduled-team__heading > strong { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #edf1f5; font-size: 18px; }
.scheduled-captain { margin: 18px 0 0; padding: 10px 0; display: grid; gap: 3px; border-block: 1px solid var(--line); }
.scheduled-captain span { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.scheduled-players { min-height: 54px; margin: 12px 0 0; padding-left: 20px; }
.scheduled-players li { margin: 5px 0; }
.scheduled-players .participant-empty { margin-left: -20px; list-style: none; }
.scheduled-pool { margin-top: 18px; padding: 18px 22px; display: grid; grid-template-columns: 1fr auto; gap: 12px 18px; border: 1px solid var(--line); border-left: 6px solid var(--signal); border-radius: var(--radius); background: white; }
.scheduled-pool h2 { margin: 0; }
.scheduled-pool > strong { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--signal); }
.scheduled-pool ul { grid-column: 1 / -1; margin: 0; padding-left: 20px; columns: 2; }
.rush-place { margin: 8px 0 0; color: var(--muted); }
.map-link { width: 44px; height: 44px; margin: -12px -8px -12px 2px; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; color: var(--blue); border-radius: 50%; }
.map-link:hover { background: var(--blue-soft); }
.map-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map-link--dark { color: var(--signal); }
.map-link--dark:hover { background: #ffffff18; }
.detail-action { margin-top: 18px; display: flex; justify-content: flex-end; }
.detail-action > div { display: grid; justify-items: end; gap: 7px; }
.detail-action small { max-width: 540px; color: var(--muted); text-align: right; }
.notice-panel { margin-top: 18px; padding: 32px; border-radius: var(--radius); background: var(--ink); color: white; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.share-button { min-height: 44px; padding: 8px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; font-weight: 800; cursor: pointer; }
.share-button:hover { background: #f2f6fa; }
.share-button.is-copied { color: #0c6635; border-color: #78c89b; background: #e4f7ec; }
.share-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share-button--icon { width: 44px; min-width: 44px; min-height: 44px; padding: 8px; }
.share-button--header { color: white; border-color: #ffffff35; background: transparent; }
.share-button--header:hover { background: #ffffff14; }
.share-button--header.is-copied { color: var(--signal); border-color: #f2ca3b80; background: #f2ca3b1c; }
.telegram-button { min-height: 48px; padding: 12px 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: white; background: #228be6; font-weight: 900; text-decoration: none; }
.telegram-button:hover { background: #1475c9; }
.telegram-button--header { min-height: 44px; padding: 10px 16px; }
.telegram-button--hero { min-height: 56px; margin-bottom: 30px; padding-inline: 28px; font-size: 17px; }

.play-cta { margin-top: 18px; padding: clamp(22px, 4vw, 34px); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-radius: 18px; color: white; background: linear-gradient(120deg, #1268e3, #174ca9); box-shadow: 0 18px 44px #1268e326; }
.play-cta .eyebrow { color: #b9d4ff; }
.play-cta h2 { margin-bottom: 6px; font-size: clamp(26px, 5vw, 40px); }
.play-cta p:last-child { margin: 0; color: #e0ebff; }
.play-cta .telegram-button { flex: 0 0 auto; color: var(--ink); background: var(--signal); }

.landing-shell { width: min(1040px, calc(100% - 32px)); padding-top: 24px; }
.rush-hero { max-width: 900px; }
.rush-hero h1 { font-size: clamp(58px, 13vw, 132px); line-height: .8; }
.rush-hero h1 span { color: var(--blue); }
.rush-hero > p:not(.eyebrow) { max-width: 620px; margin: 28px 0; color: var(--muted); font-size: clamp(18px, 3vw, 26px); }
.heat-signature { height: 12px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.heat-signature i { border-radius: 999px; background: var(--ink); }
.heat-signature i:nth-child(n+5) { background: var(--signal); }
.featured-rush { margin-top: clamp(42px, 8vw, 90px); padding: clamp(22px, 5vw, 44px); display: flex; align-items: end; justify-content: space-between; gap: 24px; border-radius: 20px; color: white; background: var(--ink); }
.featured-rush h2 { margin-bottom: 8px; font-size: clamp(28px, 6vw, 54px); }
.featured-rush .eyebrow { color: var(--signal); }
.featured-rush .rush-place { color: #bdc6d2; }
.featured-rush time { display: block; margin-top: 8px; color: #e5eaf0; font: 13px/1.4 ui-monospace, monospace; }
.featured-rush .primary-button { color: var(--ink); background: var(--signal); white-space: nowrap; }
.past-rushes { margin-top: 56px; }
.compact-rush-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.compact-rush-list a { padding: 16px 18px; display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); text-decoration: none; }
.compact-rush-list a:last-child { border: 0; }
.compact-rush-list strong { font-family: ui-monospace, monospace; }

.operator-shell { width: min(1400px, calc(100% - 24px)); padding: 10px 0 40px; }
.spectator-shell { width: min(900px, calc(100% - 24px)); padding-top: 14px; }
.rush-console { position: relative; }
.rush-primary-screen { min-height: calc(100svh - 58px); }
.csrf-source { display: none; }
.timer-strip { margin-bottom: 12px; display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 8px; }
.timer-block { min-width: 0; padding: 12px; display: grid; gap: 4px; text-align: center; border-radius: 12px; color: white; background: var(--ink); }
.timer-block span { color: #aeb7c5; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.timer-block strong { font: 900 clamp(26px, 6vw, 54px)/1 ui-monospace, "SFMono-Regular", monospace; letter-spacing: -.08em; }
.timer-block--main { color: var(--ink); background: var(--signal); }
.timer-block--main span { color: #514613; }
.heat-progress { width: 100%; height: 7px; margin-bottom: 10px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.heat-progress i { border-radius: 999px; background: #cbd3dd; }
.heat-progress i.is-done { background: #596578; }
.heat-progress i.is-current { background: var(--signal); }
.scoreboard { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.team-control { position: relative; min-width: 0; padding: clamp(14px, 2vw, 22px); border: 1px solid var(--line); border-top: 7px solid; border-radius: 15px; background: white; }
.team-control--blue { border-top-color: var(--blue); }
.team-control--red { border-top-color: var(--red); }
.serve-ball { position: absolute; top: 10px; left: 50%; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #786500; background: var(--signal); box-shadow: 0 2px 8px #14192233; transform: translateX(-50%); }
.team-control.is-serving, .timer-block.is-serving { animation: serve-pulse 1.1s ease-in-out infinite alternate; }
@keyframes serve-pulse { to { box-shadow: 0 0 0 4px #f2ca3b80, 0 8px 24px #1419221f; } }
.team-control__heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 12px; }
.team-control__heading h2 { min-width: 0; margin: 0; font-size: clamp(20px, 3vw, 32px); overflow-wrap: anywhere; }
.team-total { flex: 0 0 auto; text-align: right; }
.team-total span, .heat-score span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.team-total strong { font: 900 clamp(34px, 6vw, 64px)/.85 ui-monospace, monospace; }
.heat-score { grid-column: 1 / -1; padding: 5px 0 7px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.heat-score strong { font: 900 25px/1 ui-monospace, monospace; }
.score-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.score-buttons button { min-height: clamp(82px, 13vw, 132px); border: 0; border-radius: 12px; color: white; font: 900 clamp(34px, 7vw, 66px)/1 "Arial Black", Impact, sans-serif; cursor: pointer; touch-action: manipulation; }
.team-control--blue .score-buttons button { background: var(--blue); }
.team-control--red .score-buttons button { background: var(--red); }
.score-buttons button:hover { filter: brightness(.92); }
.score-buttons button:disabled, .timeout-button:disabled { opacity: .36; cursor: not-allowed; }
.timeout-button { width: 100%; min-height: 52px; margin-top: 8px; border: 1px solid currentColor; border-radius: 10px; color: var(--ink); background: white; font-weight: 900; cursor: pointer; }
.rush-primary-actions { margin-top: 8px; display: grid; }
.rush-primary-actions button { min-height: 48px; }
.official-actions { margin-top: 12px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.official-actions h2 { margin: 2px 0 14px; }
.official-actions__buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.official-actions__buttons button { min-height: 48px; }
.undo-button { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rush-overlay { position: fixed; z-index: 10; inset: 0; padding: 24px; display: grid; place-items: center; align-content: center; gap: 18px; color: white; background: #101722ef; text-align: center; }
.rush-overlay[hidden] { display: none; }
.rush-overlay strong { font: 900 clamp(72px, 18vw, 170px)/1 ui-monospace, monospace; letter-spacing: -.08em; }
.rush-overlay .eyebrow { margin: 0; color: var(--signal); font-size: 16px; }
.rush-overlay--timeout { background: #101722f7; }
.rush-overlay--technical { z-index: 12; background: #0d1420fa; }
.overlay-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.score-dialog { width: min(820px, calc(100% - 20px)); height: min(760px, calc(100dvh - 20px)); padding: 20px; overflow: auto; border: 0; border-radius: 18px; box-shadow: 0 24px 80px #0a102066; }
.score-dialog::backdrop { background: #0c1220c7; }
.score-dialog fieldset { margin: 12px 0; padding: 10px; display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 10px; }
.score-dialog legend { padding: 0 6px; font-weight: 900; }
.opponent-error-option { width: 100%; min-height: 52px; margin-top: 12px; border: 0; border-radius: 8px; color: white; background: var(--ink); font-weight: 900; cursor: pointer; }
.opponent-error-option.is-selected { color: var(--ink); background: var(--signal); }
.opponent-error-option[hidden] { display: none; }
.scorer-list { grid-template-columns: 1fr; }
.scorer-option { width: 100%; min-height: 46px; padding: 7px 9px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 7px; color: var(--ink); background: #f3f6f9; font: inherit; text-align: left; cursor: pointer; }
.scorer-option:hover, .scorer-option.is-selected { background: #e7edf4; }
.scorer-option span { min-width: 0; display: grid; }
.scorer-option strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scorer-option small { color: var(--muted); font-size: 10px; }
.correction-target { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.correction-target button { min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: white; font-weight: 800; cursor: pointer; }
.correction-target button.is-selected { border-color: var(--signal); background: #fff9d7; }
.score-dialog .primary-button { width: 100%; }
.dialog-error { min-height: 20px; color: #a62034; font-weight: 700; }
.operator-toast { position: fixed; z-index: 20; right: 16px; bottom: 16px; max-width: min(440px, calc(100% - 32px)); padding: 13px 16px; border-radius: 10px; color: white; background: var(--ink); box-shadow: 0 10px 35px #0a102044; }
.spectator-status { margin-bottom: 10px; padding: 11px 14px; border-radius: 9px; color: white; background: var(--ink); font-weight: 900; text-align: center; }
.scoreboard--spectator .team-control { min-height: 150px; }
.team-roster { margin-top: 12px; border-top: 1px solid var(--line); }
.team-roster summary { min-height: 48px; padding: 10px 2px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); cursor: pointer; list-style: none; }
.team-roster summary::-webkit-details-marker { display: none; }
.team-roster summary::after { content: "⌄"; color: var(--ink); font-size: 20px; line-height: 1; transition: transform .15s ease; }
.team-roster[open] summary::after { transform: rotate(180deg); }
.team-roster summary span { font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.team-roster summary strong { margin-left: auto; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.team-roster ul { margin: 0; padding: 2px 0 8px; list-style: none; }
.team-roster li { min-height: 42px; padding: 7px 2px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); }
.team-roster li > span { min-width: 0; }
.team-roster li > strong { flex: 0 0 auto; font: 800 12px/1.2 ui-monospace, monospace; }
.team-roster small { padding: 2px 5px; border-radius: 4px; color: var(--muted); background: #e7ebf0; font-size: 10px; }
.leader-crown { margin-right: 5px; color: #9b7600; background: none !important; font-size: 16px !important; }
.player-badge { padding: 2px 5px; border-radius: 4px; color: var(--ink); background: var(--signal); font-size: 10px; }
.event-log { margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.event-log__heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.event-log__heading h2 { margin: 2px 0 12px; font-size: 20px; }
.event-log__heading a { margin-bottom: 12px; color: var(--blue); font-size: 13px; font-weight: 900; }
.event-list { margin: 0; padding: 0; display: grid; gap: 6px; list-style: none; }
.event-list--full { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.event-item { min-width: 0; padding: 9px 11px; display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 12px; border-left: 4px solid; border-radius: 7px; background: #f4f7fa; }
.event-item--blue { border-color: var(--blue); }
.event-item--red { border-color: var(--red); }
.event-item time { color: var(--muted); font: 700 11px/1.2 ui-monospace, monospace; }
.event-item div { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.event-item strong { flex: 0 0 auto; }
.event-item span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.event-empty { padding: 18px; color: var(--muted); text-align: center; }
.rush-secondary-info { min-height: 44px; padding: 4px 4px 0; display: flex; align-items: center; color: var(--muted); font-size: 12px; font-weight: 800; }
.pagination { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 18px; }
.pagination a { color: var(--blue); font-weight: 900; }
.result-page-actions { margin-bottom: 10px; display: flex; justify-content: flex-end; }
.result-hero { padding: clamp(22px, 5vw, 48px); overflow: hidden; border-radius: 20px; color: white; background: var(--ink); }
.result-hero--stopped { background: #3a3025; }
.result-brand { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #c4cedb; font-size: 11px; font-weight: 900; letter-spacing: .15em; }
.result-brand strong { color: var(--signal); }
.result-scoreline { margin: clamp(22px, 5vw, 42px) 0 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(10px, 3vw, 28px); }
.result-scoreline > strong { display: flex; align-items: center; gap: .1em; font: 900 clamp(48px, 11vw, 104px)/.82 ui-monospace, monospace; letter-spacing: -.1em; }
.result-scoreline b { font: inherit; }
.result-scoreline i { color: var(--signal); font-style: normal; }
.result-team { min-width: 0; font: 900 clamp(18px, 4vw, 38px)/1 "Arial Black", Impact, sans-serif; overflow-wrap: anywhere; }
.result-team--blue { color: #67a4ff; }
.result-team--red { color: #ff7584; text-align: right; }
.result-winner { margin: 0 0 22px; display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.result-winner span { color: #bdc7d4; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.result-winner strong { color: var(--signal); font-size: clamp(20px, 4vw, 34px); }
.result-meta { padding-top: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; border-top: 1px solid #ffffff24; color: #c7d0dc; font-size: 13px; text-align: center; }
.result-mvp { margin-top: 14px; padding-top: 12px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; border-top: 1px solid #ffffff24; color: white; }
.result-mvp span { color: var(--signal); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.result-mvp div { display: grid; gap: 4px; }
.result-mvp strong { overflow-wrap: anywhere; }
.result-heats { margin-top: 18px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.result-heats div { min-width: 0; padding: 8px 3px; display: grid; gap: 3px; border-radius: 7px; text-align: center; background: #ffffff12; }
.result-heats span { color: #9ca9b9; font-size: 9px; font-weight: 900; }
.result-heats strong { font: 800 clamp(11px, 2vw, 15px)/1 ui-monospace, monospace; }
.result-section { margin-top: 16px; padding: clamp(18px, 4vw, 28px); border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.section-heading h2 { margin-bottom: 18px; }
.player-results { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.player-result { padding: 16px; border-top: 5px solid; border-radius: 10px; background: #f3f6f9; }
.player-result--blue { border-color: var(--blue); }
.player-result--red { border-color: var(--red); }
.player-result h3 { margin: 0 0 10px; font-size: 20px; }
.result-player-list { display: grid; }
.player-result__row { min-height: 44px; padding: 8px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.player-result__row:last-child { border: 0; }
.player-result__row > span:last-child { flex: 0 0 auto; font-size: 13px; }
.player-result__row small { color: var(--muted); }
.player-result__row b { padding: 2px 5px; border-radius: 4px; background: var(--signal); font-size: 10px; }

@media (max-width: 720px) {
  .app-header { gap: 12px; }
  .page-shell { width: min(100% - 24px, 640px); padding-top: 28px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .page-heading .primary-button, .page-heading .secondary-button, .page-heading .share-button:not(.share-button--icon) { width: 100%; }
  .page-actions { display: grid; grid-template-columns: 1fr; }
  .rush-row { grid-template-columns: minmax(0, 1fr) auto; }
  .rush-row__link { padding: 14px 8px 14px 14px; grid-template-columns: 1fr 20px; gap: 8px 10px; }
  .rush-state, .rush-row__link time, .rush-location { grid-column: 1; grid-row: auto; text-align: left; }
  .rush-pair { grid-column: 1; flex-wrap: wrap; }
  .row-score { width: 100%; margin-left: 0; }
  .row-arrow { grid-column: 2; grid-row: 1 / 5; align-self: center; }
  .rush-row form { padding-right: 8px; }
  .delete-rush-button { width: 42px; padding: 0; overflow: hidden; color: transparent; font-size: 0; }
  .delete-rush-button::after { content: "×"; color: #982337; font-size: 20px; }
  .rush-details-grid, .team-setup-grid, .roster-summary { grid-template-columns: 1fr; }
  .rush-details-grid { padding: 16px; }
  .recruitment-pool { padding: 16px; }
  .recruitment-pool .participant-list { grid-template-columns: 1fr; }
  .schedule-card--recruitment { grid-template-columns: 1fr; }
  .rush-countdown { min-width: 0; }
  .recruitment-state { grid-column: auto; align-items: flex-start; flex-direction: column; }
  .recruitment-state strong { text-align: left; }
  .scheduled-pool ul { columns: 1; }
  .form-actions { display: grid; grid-template-columns: 1fr; }
  .form-actions .quiet-button { order: 3; }
  .body--operator .app-header { min-height: 46px; padding: 4px 10px; }
  .body--operator .wordmark { font-size: 9px; }
  .body--operator .wordmark strong { font-size: 15px; }
  .operator-shell { width: min(100% - 10px, 640px); padding-top: 6px; }
  .rush-primary-screen { min-height: calc(100svh - 52px); }
  .timer-strip { margin-bottom: 8px; gap: 5px; }
  .timer-block { padding: 7px 4px; }
  .timer-block strong { font-size: clamp(23px, 8vw, 38px); }
  .timer-block span { font-size: 9px; letter-spacing: .06em; }
  .scoreboard { grid-template-columns: 1fr; gap: 6px; }
  .team-control { padding: 9px 8px; border-top-width: 5px; border-radius: 11px; }
  .team-control__heading { gap: 3px 6px; }
  .team-control__heading h2 { min-height: 38px; display: -webkit-box; overflow: hidden; font-size: 17px; line-height: 1.1; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .team-total strong { font-size: 34px; }
  .team-total span, .heat-score span { font-size: 8px; letter-spacing: .05em; }
  .heat-score { padding-block: 3px 5px; }
  .heat-score strong { font-size: 22px; }
  .score-buttons { gap: 5px; }
  .score-buttons button { min-height: 74px; border-radius: 9px; font-size: 38px; }
  .timeout-button { min-height: 44px; margin-top: 6px; padding: 6px 2px; font-size: 12px; }
  .rush-primary-actions { margin-top: 6px; }
  .rush-primary-actions button { min-height: 46px; }
  .official-actions { padding: 16px; }
  .official-actions__buttons { grid-template-columns: 1fr; }
  .undo-button { white-space: normal; }
  .player-results { grid-template-columns: 1fr; }
  .player-result__row { align-items: flex-start; flex-direction: column; gap: 3px; }
  .event-item { grid-template-columns: 1fr; gap: 4px; }
  .event-item div { display: grid; gap: 2px; }
  .event-item span { white-space: normal; }
  .score-dialog { width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 14px; border-radius: 0; }
  .score-dialog h2 { margin-bottom: 6px; }
  .score-dialog fieldset { margin: 8px 0; padding: 8px; gap: 4px; }
  .scorer-option { min-height: 40px; padding-block: 4px; }
  .rush-hero h1 { font-size: clamp(52px, 18vw, 84px); }
  .featured-rush { align-items: stretch; flex-direction: column; }
  .featured-rush .primary-button { width: 100%; }
  .play-cta { align-items: stretch; flex-direction: column; }
  .play-cta .telegram-button { width: 100%; }
  .result-scoreline { grid-template-columns: 1fr 1fr; grid-template-areas: "blue red" "score score"; gap: 10px; }
  .result-scoreline > strong { grid-area: score; justify-self: center; font-size: clamp(48px, 16vw, 68px); }
  .result-team { font-size: clamp(15px, 5vw, 20px); }
  .result-team--blue { grid-area: blue; }
  .result-team--red { grid-area: red; }
  .result-mvp { grid-template-columns: 1fr; }
  .result-mvp span { grid-row: auto; }
  .result-heats { gap: 3px; }
  .result-heats div { padding-inline: 1px; }
}

@media (max-width: 520px) {
  .public-header { min-height: 62px; padding: 8px 12px; gap: 10px; }
  .public-header .wordmark { font-size: 9px; }
  .public-header .wordmark strong { font-size: 15px; }
  .public-header nav { gap: 8px; }
  .public-header__rushes { display: none; }
  .telegram-button--header { min-height: 42px; padding: 8px 11px; font-size: 13px; }
  .login-shell { min-height: calc(100vh - 62px); }
  .scoreboard--spectator { grid-template-columns: 1fr; }
  .team-roster summary strong { max-width: 68%; }
  .selected-player { align-items: stretch; flex-direction: column; }
  .selected-player__actions { justify-content: flex-start; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
