:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --surface: #fbfaf6;
  --surface-raised: #fffdf8;
  --ink: #242320;
  --muted: #655f56;
  --line: #dcd6cb;
  --accent: #ad3a2c;
  --accent-hover: #8e2d21;
  --accent-soft: #f6e8e2;
  --green: #3b614e;
  --green-soft: #e6ece2;
  --gold: #79551e;
  --gold-soft: #f6eacf;
  --video: #222321;
  --rail: #232520;
  --rail-ink: #f2eee3;
  --rail-muted: #bcb9ac;
  --rail-line: #44453c;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 10px;
  --shadow: 0 8px 24px rgb(47 38 27 / 9%);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 300px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--body); }
button, input, select, textarea { font: inherit; }
button, summary, select, input[type="range"] { cursor: pointer; }
button:disabled, input:disabled { cursor: default; opacity: .58; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
a { color: inherit; }
p, li { text-wrap: pretty; }
p { margin: 0 0 12px; max-width: 72ch; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-size: 2.7rem; letter-spacing: -.054em; font-weight: 760; }
h2 { font-size: 1.36rem; letter-spacing: -.036em; font-weight: 730; }
h3 { font-size: 1rem; letter-spacing: -.014em; font-weight: 700; }
small, .muted { color: var(--muted); }
small { font-size: .8125rem; }
.mono, time { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; transform: translateY(-200%); background: var(--surface); color: var(--ink); padding: 10px; }
.skip-link:focus { transform: none; }

.shell { min-height: 100svh; display: grid; grid-template-columns: 200px minmax(0, 1fr); }
.rail { position: sticky; top: 0; align-self: start; height: 100svh; display: flex; flex-direction: column; background: var(--rail); color: var(--rail-ink); padding: 24px 15px 18px; }
.wordmark { display: flex; align-items: center; gap: 10px; margin: 0 5px 44px; color: var(--rail-ink); font-weight: 750; font-size: 1rem; letter-spacing: -.06em; white-space: nowrap; text-decoration: none; }
.wordmark-slash { padding-inline: 3px; color: #eb846f; }
.court-mark { position: relative; flex: 0 0 29px; width: 29px; height: 19px; border: 1.5px solid #eb846f; border-radius: 3px; }
.court-mark::before, .court-mark::after { content: ""; position: absolute; top: 0; bottom: 0; border-left: 1px solid #eb846f; }
.court-mark::before { left: 6px; }
.court-mark::after { right: 6px; }
.court-mark span { position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid #eb846f; }
.rail-nav, .rail-footer { display: grid; gap: 4px; }
.rail-nav a, .rail-footer a { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 10px; color: var(--rail-muted); text-decoration: none; border-radius: 6px; font-weight: 560; }
.rail-nav a:hover, .rail-footer a:hover { color: var(--rail-ink); background: #35362f; }
.rail-nav a[aria-current="page"], .rail-footer a[aria-current="page"] { color: var(--rail-ink); background: #3c3931; box-shadow: inset 0 0 0 1px #565044; }
.rail-nav a[aria-current="page"] .nav-symbol { color: #eb846f; }
.rail-footer { margin-top: auto; border-top: 1px solid var(--rail-line); padding-top: 12px; }
.nav-symbol { width: 20px; font: 1.15rem/1 var(--mono); text-align: center; }
.stage { min-width: 0; }
.topbar { height: 62px; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 0 clamp(18px, 3.3vw, 52px); border-bottom: 1px solid var(--line); background: var(--surface); }
.breadcrumb { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: .875rem; color: var(--muted); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; font-weight: 635; }
.breadcrumb-separator { color: #8c8172; }
#workspace { padding: 28px clamp(18px, 3.3vw, 52px) 64px; max-width: 1680px; margin: 0 auto; }
#workspace:focus { outline: none; }
.share-shell { display: block; }
.share-shell .rail, .share-shell .topbar-action { display: none; }
.share-shell #workspace { max-width: 1470px; }
.share-shell .topbar { height: 52px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-raised); color: var(--ink); font-size: .875rem; font-weight: 650; line-height: 1.28; text-decoration: none; white-space: nowrap; transition: background-color .18s, border-color .18s, color .18s; }
.button:hover { border-color: #c4b8a6; background: #f0ebe0; }
.button.primary { background: var(--accent); color: var(--surface-raised); border-color: var(--accent); }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.subtle { background: transparent; }
.button.subtle:hover { background: #efe9dd; }
.button.danger { color: var(--accent-hover); }
.button.icon { width: 36px; padding-inline: 0; font-family: var(--mono); }
.button:disabled:hover { background: var(--surface-raised); border-color: var(--line); }
.button.primary:disabled:hover { background: var(--accent); border-color: var(--accent); }
.button[aria-pressed="true"], .button[aria-current="true"] { background: var(--accent-soft); border-color: #cb9c8b; color: var(--accent-hover); }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badge { display: inline-flex; align-items: center; width: fit-content; min-height: 23px; border-radius: 4px; padding: 2px 7px; color: var(--muted); background: #ede7db; font-size: .71rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.badge.is-good { color: var(--green); background: var(--green-soft); }
.badge.is-warn { color: var(--gold); background: var(--gold-soft); }
.badge.is-bad { color: var(--accent-hover); background: var(--accent-soft); }
.kicker { display: block; color: var(--muted); font: 630 .72rem/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.page-head { display: flex; justify-content: space-between; gap: 16px 32px; align-items: end; margin-bottom: 22px; }
.page-head .kicker { margin-bottom: 8px; }
.page-head p { color: var(--muted); margin: 8px 0 0; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.section { margin: 26px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 13px; }
.paper { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.padded { padding: 18px; }
.stack { display: grid; gap: 12px; }
.loading, .empty { padding: 24px; border: 1px dashed #c7bdad; border-radius: var(--radius); background: var(--surface); }
.empty p, .loading { color: var(--muted); }
.empty p:last-child { margin-bottom: 0; }
.empty h2, .empty h3 { margin-bottom: 8px; }
.status-line, .notice { padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--surface); }
.notice.error { color: var(--accent-hover); background: var(--accent-soft); border-color: #d6a997; }
.notice.warn { color: var(--gold); background: var(--gold-soft); border-color: #e0c58f; }
.notice.success { color: var(--green); background: var(--green-soft); }
.toast { position: fixed; z-index: 10; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); max-width: min(430px, calc(100vw - 36px)); padding: 12px 15px; border-radius: 8px; background: var(--rail); color: var(--rail-ink); box-shadow: var(--shadow); }

.library-list { display: grid; gap: 10px; }
.match-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 16px; padding: 10px; align-items: center; }
.match-thumb { aspect-ratio: 16/9; overflow: hidden; display: grid; place-items: center; min-width: 0; background: var(--video); border-radius: 5px; color: var(--rail-muted); }
.match-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.match-row p { margin: 4px 0 0; }
.match-row h2 { font-size: 1.04rem; overflow-wrap: anywhere; }
.match-row .button { margin-right: 5px; }

.field { display: grid; align-content: start; gap: 4px; min-width: 0; color: var(--ink); font-size: .875rem; font-weight: 640; }
.field small { font-weight: 400; }
.fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.fieldset legend { font-weight: 700; margin-bottom: 9px; padding: 0; }
.form-grid, .two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
input:not([type="checkbox"], [type="range"], [type="file"]), select, textarea { min-height: 40px; width: 100%; padding: 7px 10px; border: 1px solid #cfc5b5; border-radius: 6px; background: var(--surface-raised); color: var(--ink); }
input[type="range"], input[type="checkbox"], progress { accent-color: var(--accent); }
.progress-wrap { display: grid; gap: 8px; }
.progress-wrap progress { width: 100%; height: 10px; }
.form-area { width: min(760px, 100%); }
.drop-zone { position: relative; display: grid; gap: 6px; place-content: center; text-align: center; min-height: 124px; padding: 16px; border: 1px dashed #b9ad98; border-radius: 8px; background: #f9f4e8; cursor: pointer; overflow-wrap: anywhere; }
.drop-zone:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.drop-zone:hover, .drop-zone.is-dragging { background: #f6e8df; border-color: var(--accent); }
.drop-zone input { position: absolute; inset: 0; cursor: pointer; opacity: 0; height: 100%; width: 100%; }
.capture-stage { position: relative; display: grid; place-items: center; background: var(--video); border-radius: 8px; overflow: hidden; }
.capture-stage video { display: block; max-height: 54vh; width: 100%; object-fit: contain; }
.capture-guide { position: absolute; inset: 14% 14% 12%; border: 1px dashed #eee9d9; border-radius: 3px; pointer-events: none; }
.capture-guide::before, .capture-guide::after { position: absolute; content: ""; inset: 50% 0 auto; border-top: 1px dashed #eee9d9; }
.capture-guide::after { inset: 0 auto 0 50%; border-top: 0; border-left: 1px dashed #eee9d9; }

.table-scroll { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table th { color: var(--muted); font-size: .75rem; font-weight: 680; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td { overflow-wrap: anywhere; }
.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric { min-width: 0; padding: 12px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric strong { display: block; font: 700 1.4rem/1 var(--mono); margin: 3px 0 5px; }
.metric small { display: block; }

@media (max-width: 950px) {
  .shell { grid-template-columns: 158px minmax(0, 1fr); }
  .rail { padding-inline: 9px; }
  .wordmark { margin-inline: 4px; gap: 7px; }
}
@media (max-width: 730px) {
  .shell { display: block; }
  .rail { position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto; height: auto; padding: 12px 16px 0; gap: 8px 10px; }
  .wordmark { margin: 0; min-height: 32px; }
  .rail-nav { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 5px; flex-wrap: nowrap; min-width: 0; overflow-x: auto; padding-bottom: 7px; }
  .rail-nav a, .rail-footer a { min-height: 42px; padding: 6px 8px; font-size: .8125rem; }
  .nav-symbol { font-size: .94rem; width: 15px; }
  .rail-footer { display: flex; border: 0; padding: 0; }
  .rail-footer a { min-height: 34px; }
  .topbar { height: 52px; padding: 0 15px; }
  #workspace { padding: 19px 15px 35px; }
  h1 { font-size: 2rem; }
  .page-head { margin-bottom: 15px; align-items: start; flex-direction: column; }
  .page-head p { margin-top: 5px; }
  .section { margin-block: 19px; }
  .padded { padding: 13px; }
  .button { min-height: 44px; }
  .topbar-action { min-height: 36px; }
}
@media (max-width: 460px) {
  .rail-nav { gap: 2px; }
  .rail-nav a .nav-symbol { display: none; }
  .match-row { grid-template-columns: 87px minmax(0, 1fr); gap: 10px; }
  .match-row .button { grid-column: 2; justify-self: start; }
  .form-grid { grid-template-columns: 1fr; }
  .metric { padding: 9px; }
  .data-table th, .data-table td { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0s !important; transition-duration: 0s !important; }
}

.review-head { margin-bottom: 19px; }
.review-head h1 { max-width: 22ch; overflow-wrap: anywhere; }
.review-head .kicker { color: var(--accent-hover); }
.review-actions { justify-content: end; }
.review-workbench { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(258px, 1fr); align-items: start; gap: 15px; }
.media-pane { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.video-stage { position: relative; display: grid; place-items: stretch; width: 100%; aspect-ratio: var(--video-ratio, 16/9); max-height: 65vh; overflow: hidden; background: var(--video); }
.video-stage.is-portrait { aspect-ratio: auto; height: min(52vh, 500px); min-height: 280px; }
.video-stage video, .video-stage canvas, .video-empty, .video-empty img { position: absolute; display: block; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.video-stage canvas { pointer-events: none; }
.video-stage.is-picking canvas { pointer-events: auto; cursor: crosshair; }
.video-pick-hint { position: absolute; top: 12px; left: 12px; max-width: calc(100% - 24px); padding: 5px 9px; border-radius: 5px; color: var(--rail-ink); background: var(--video); font-size: .84rem; pointer-events: none; }
.video-stage video:focus-visible { outline-offset: -3px; }
.video-empty { display: grid; place-items: center; color: var(--rail-muted); }
.poster-play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: transparent; }
.poster-play:focus-visible { outline-color: #f6cf9f; outline-offset: -4px; }
.poster-play span { display: grid; place-items: center; width: 57px; height: 57px; padding-left: 3px; border: 1px solid #f2eee3; border-radius: 50%; background: rgb(35 37 32 / 85%); color: #f2eee3; font-size: 1.16rem; }
.poster-play:hover span { background: rgb(173 58 44 / 95%); }
.media-tools { display: grid; gap: 9px; padding: 10px 12px; color: var(--rail-ink); background: var(--video); }
.timeline-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) 48px; align-items: center; gap: 8px; }
.timeline-row time { font-size: .73rem; white-space: nowrap; text-align: center; }
.timeline { position: relative; height: 21px; display: grid; align-items: center; overflow: hidden; }
.timeline-ink { position: absolute; inset: 7px 8px; background: #55534a; border-radius: 5px; overflow: hidden; }
.timeline-rally { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: #936b4b; }
.timeline-rally.confirmed { background: #dc765d; }
.timeline-hit { position: absolute; top: 0; bottom: 0; width: 1px; background: #f8e2a8; }
.timeline input { position: relative; height: 21px; width: 100%; margin: 0; appearance: none; cursor: ew-resize; background: transparent; }
.timeline input::-webkit-slider-thumb { appearance: none; width: 13px; height: 17px; border: 2px solid var(--video); border-radius: 4px; background: #fff1d9; }
.timeline input::-moz-range-thumb { width: 10px; height: 14px; border: 2px solid var(--video); border-radius: 4px; background: #fff1d9; }
.media-controls, .media-controls > div { display: flex; align-items: center; min-width: 0; gap: 7px; }
.media-controls { justify-content: space-between; flex-wrap: wrap; }
.media-controls .button, .media-controls select { min-height: 30px; padding: 4px 6px; color: var(--rail-ink); background: #30312c; border-color: #595b50; font-size: .75rem; }
.media-controls .button:hover, .media-controls select:hover { background: #47473d; }
.media-controls .media-icon { width: 29px; font: 1.25rem/1 var(--mono); }
.overlay-controls { flex-wrap: wrap; }
.overlay-controls label { display: inline-flex; align-items: center; gap: 4px; min-height: 29px; color: #e2ddce; font-size: .73rem; white-space: nowrap; }
.overlay-controls label input { margin: 0; }
.overlay-controls select { width: auto; max-width: 118px; text-overflow: ellipsis; }
.overlay-status, .credits { display: block; padding: 7px 12px; margin: 0; font-size: .71rem; color: var(--muted); }
.credits { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; border-top: 1px solid var(--line); }
.credits a { text-underline-offset: 3px; }
.credits a:hover { color: var(--accent); }
.pose-details { border-top: 1px solid var(--line); padding: 8px 12px; }
.pose-details summary { color: var(--muted); font-size: .8125rem; font-weight: 650; }
.pose-details[open] summary { margin-bottom: 8px; }
.pose-details .notice p { margin-block: 3px 7px; }
.episode-pane { min-width: 0; overflow: hidden; }
.episodes-head { display: flex; gap: 8px; justify-content: space-between; align-items: center; padding: 10px 12px 8px 13px; }
.episodes-head h2 { font-size: 1.2rem; }
.episodes-head .button { border-color: transparent; padding-inline: 6px; font-size: .75rem; }
.score-line { padding: 8px 12px 9px 13px; background: #f2ede1; border-block: 1px solid var(--line); }
.score-line > div { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-height: 26px; }
.score-line strong { font-size: .95rem; }
.score-team { font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-dot { width: 7px; height: 7px; border-radius: 50%; }
.team-a { background: var(--accent); }
.team-b { background: var(--green); }
.score-line small { font-size: .7rem; }
.episode-list { list-style: none; margin: 0; padding: 0; }
.episode-list li + li { border-top: 1px solid var(--line); }
.episode-jump { display: grid; grid-template-columns: 27px minmax(0, 1fr) auto; gap: 8px; place-items: center start; width: 100%; min-height: 48px; padding: 8px 10px 8px 12px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.episode-jump:hover, .episode-jump.is-current { color: var(--accent-hover); background: var(--accent-soft); }
.episode-jump:focus-visible { outline-offset: -2px; }
.ep-icon { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #d8c9b3; border-radius: 4px; color: var(--accent-hover); font-size: .66rem; }
.ep-summary { display: grid; min-width: 0; }
.ep-summary strong { font-size: .84rem; line-height: 1.2; }
.ep-summary small { font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.episode-jump time { color: var(--muted); font-size: .7rem; white-space: nowrap; }
.episode-empty { padding: 14px; }
.episode-empty p { margin-top: 4px; font-size: .85rem; }
.episode-more { padding: 8px 12px; border-top: 1px solid var(--line); margin: 0; }
#compact-episodes .episode-list { max-height: 362px; overflow: auto; }
.analysis-tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 23px 0 18px; border-bottom: 1px solid var(--line); }
.tab { position: relative; min-height: 39px; padding: 8px 1px; border: 0; background: transparent; color: var(--muted); font-size: .875rem; font-weight: 650; }
.tab:hover, .tab[aria-selected="true"] { color: var(--accent-hover); }
.tab[aria-selected="true"]::after { position: absolute; bottom: -1px; right: 0; left: 0; content: ""; height: 2px; background: var(--accent); }
.analysis-panel:focus { outline: none; }
.analysis-panel:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.review-summary-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; }
.warnings { margin: 2px 0 0; padding-left: 19px; color: var(--muted); }
.warnings li { padding-block: 3px; }
.warnings a { color: var(--accent-hover); }
.large-metric { font-size: 1.65rem; }
.overview-metrics { margin-bottom: 10px; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; }
.inline-field select { width: auto; max-width: 220px; }
.filters { gap: 6px; }
.rally-length { display: grid; gap: 8px; max-width: 610px; }
.rally-length div { display: grid; grid-template-columns: 90px minmax(0, 1fr) 58px; gap: 8px; align-items: center; }
.rally-length progress { width: 100%; }
.event-source { display: block; margin-top: 3px; min-width: 70px; }
.players-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.player-name-form .field { flex: 1 1 8em; }
.player-panel .metric-row { margin-top: 12px; }
.player-zones { margin: 10px 0 0; }
.player-panel details { margin-top: 8px; }
.court-figure { display: grid; margin: 0; place-items: center; padding: 11px; max-height: fit-content; }
#heatmap { display: block; aspect-ratio: 1/2; width: min(100%, 260px); height: auto; border-radius: 5px; margin-bottom: 8px; }
.court-figure figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; align-items: center; color: var(--muted); font-size: .78rem; }
.heat-legend { display: inline-block; width: 36px; height: 7px; border-radius: 3px; background: linear-gradient(90deg, #d4ac73, #ac3f2f); }
.landing-key { display: inline-block; width: 9px; height: 9px; border: 1px solid var(--muted); border-radius: 50%; background: #eee4cd; }
.landing-key.team-a { background: #ffc09a; }
.landing-key.team-b { background: #a6e1df; }
.landing-list { max-height: 320px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.landing-list li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding-block: 7px; border-top: 1px solid var(--line); }
.landing-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 7px; align-items: center; }
.landing-meta small { grid-column: 2; }
.landing-heading { flex-wrap: wrap; align-items: center; margin-bottom: 0; }
.landing-editor { border-top: 1px solid var(--line); padding: 8px 0 0; }
.landing-editor summary { font-weight: 650; }
.landing-editor[open] summary { margin-bottom: 8px; }
.rally-count-note { margin-top: 8px; }
.shot-time-actions { flex-wrap: nowrap; gap: 2px; }
#event-editor { scroll-margin: 14px; }
.settings-details { max-width: 810px; }
.settings-details > summary { padding: 12px 15px; font-weight: 690; }
.settings-details[open] > summary { border-bottom: 1px solid var(--line); }
.court-input-row { display: grid; align-items: end; grid-template-columns: 16px 1fr 1fr; gap: 8px; }
.court-input-row > span { align-self: end; padding-bottom: 10px; color: var(--muted); font: .8rem var(--mono); }
.delete-details { padding-top: 9px; border-top: 1px solid var(--line); }
.delete-details summary { color: var(--accent-hover); }
.delete-details p { margin-top: 6px; }
.action-menu { position: relative; }
.action-menu summary { list-style: none; }
.action-menu summary::-webkit-details-marker { display: none; }
.action-menu summary::after { content: "⌄"; }
.action-menu > div { position: absolute; z-index: 3; min-width: 310px; right: 0; top: calc(100% + 6px); box-shadow: var(--shadow); }
.review-share { margin-bottom: 16px; }
.review-share p { margin-bottom: 0; }
.share-value { flex: 1 1 240px; }

@media (max-width: 1100px) {
  .review-workbench { grid-template-columns: minmax(0, 1.65fr) minmax(237px, 1fr); gap: 11px; }
  .episode-jump { grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px; }
  .ep-icon { width: 22px; height: 22px; }
}
@media (max-width: 895px) {
  .review-workbench { grid-template-columns: minmax(0, 1fr); }
  .episodes-head .button { min-height: 38px; }
  #compact-episodes .episode-list { max-height: 226px; }
}
@media (max-width: 730px) {
  .review-head { margin-bottom: 13px; }
  .review-actions { justify-content: start; }
  .review-summary-grid, .players-grid { grid-template-columns: 1fr; }
  .analysis-tabs { gap: 2px 12px; margin-block: 15px; flex-wrap: nowrap; overflow-x: auto; }
  .tab { flex: none; min-height: 44px; font-size: .82rem; }
  .tab[aria-selected="true"]::after { bottom: 0; }
  .action-menu > div { left: 0; right: auto; min-width: min(310px, calc(100vw - 30px)); }
  .media-controls select, .media-controls .button, .overlay-controls label { min-height: 37px; }
  .media-controls .media-icon { width: 36px; }
  .ep-summary strong { font-size: .9rem; }
}
