:root {
  color-scheme: light;
  --page: #f5f4ee;
  --paper: #fffef8;
  --ink: #172b25;
  --muted: #52635a;
  --green: #205c49;
  --line: #d9ded3;
  --brand-red: #a33d3a;
  --brand-blue: #3a6bac;
  --dg-ink: var(--ink);
}
body.live-page { display: block; height: auto; overflow: auto; margin: 0; background: var(--page); color: var(--ink); font-family: system-ui, sans-serif; }
body.live-page, .live-page :is(button, select, a, .maia-chessboard, #event-moves, #round-rail) { touch-action: manipulation; }
.live-page [hidden] { display: none !important; }
.event-nav { display: flex; align-items: center; gap: .65rem; padding: .35rem max(.8rem, calc((100% - 1136px) / 2)); border-bottom: 1px solid var(--line); white-space: nowrap; }
.event-brand { color: var(--green); font-size: 1.1rem; font-weight: 800; }
.event-nav-link { font-size: .83rem; font-weight: 600; text-decoration: none; padding: .2rem .5rem; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); }
.event-nav-link:hover { border-color: var(--green); }
.event-nav a, .event-source a { color: var(--green); }
.event-main { max-width: 1160px; margin: 0 auto; padding: .45rem .8rem 1rem; }
.event-nav h1 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; font-size: .98rem; font-weight: 720; line-height: 1.2; }
.event-nav h1::before { content: '·'; margin-right: .48rem; color: var(--muted); }
.event-status { color: var(--green); font-weight: 650; }
.event-status[data-state="stale"] { color: #874818; }
.match-score { display: flex; gap: .38rem; align-items: center; margin-left: auto; color: var(--muted); font-size: .85rem; }
.match-score strong { color: var(--ink); font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.match-score .score-short, #mobile-gauge-score, .toolbar-icon, #mobile-moment-slot { display: none; }
.round-rail { display: flex; gap: .35rem; overflow-x: auto; padding: .18rem 18px .32rem 2px; margin-bottom: .25rem; scrollbar-width: thin; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 16px), transparent); }
.round-rail:empty { display: none; }
.live-page .round-rail button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .35rem; min-height: 28px; padding: .18rem .55rem; border-radius: 999px; font-variant-numeric: tabular-nums; }
.round-rail button span { color: var(--muted); font-size: .75rem; }
.round-rail button strong { white-space: nowrap; font-size: .76rem; }
.live-page .round-rail button[aria-current="true"] { background: #e1eee5; border-color: #789a87; color: #164532; }
.round-rail button[data-status="live"] strong::before { content: ''; display: inline-block; width: .46rem; height: .46rem; margin-right: .32rem; border-radius: 50%; background: #268353; }
.event-layout { display: grid; grid-template-columns: minmax(0, min(60%, clamp(280px, calc(100dvh - 197px), 690px))) minmax(0, 1fr); gap: 1rem; }
.live-page .board-column { min-width: 0; max-width: none; gap: 2px; }
.round-strip { display: flex; align-items: center; gap: .5rem; min-height: 1.65rem; white-space: nowrap; font-size: .81rem; color: var(--muted); }
.round-strip h2 { flex: 0 0 auto; font-size: .89rem; color: var(--ink); }
.round-strip .event-status { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.round-strip time { margin-left: auto; }
.round-strip strong { color: var(--green); font-size: .88rem; font-variant-numeric: tabular-nums; }
.seat { display: flex; align-items: center; justify-content: space-between; gap: .55rem; min-height: 38px; padding: .2rem 0 .2rem 2rem; font-weight: 650; }
.seat time { display: inline-flex; align-items: center; justify-content: flex-end; min-width: 5.9rem; padding: .22rem .52rem; background: #e6eae0; color: var(--ink); border-radius: 5px; font: 750 1.4rem/1.05 var(--dg-mono, monospace); font-variant-numeric: tabular-nums; }
.seat time[data-low="true"] { background: #f5dfd5; color: #872f28; }
.seat[data-to-move="true"] { background: #e0ebdf; border-radius: 5px; }
.seat[data-to-move="true"] time { background: var(--green); color: white; }
.seat[data-to-move="true"] time[data-low="true"] { background: #9a3c30; color: white; }
.seat[data-to-move="true"] time::before { content: ''; width: .43rem; height: .43rem; margin-right: .45rem; border-radius: 50%; background: currentColor; animation: clock-pulse 1.8s ease-in-out infinite; }
@keyframes clock-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .seat[data-to-move="true"] time::before { animation: none; } }
.live-page .board-with-evaluation { grid-template-columns: 34px minmax(0, 1fr); gap: 5px; }
.live-page .evaluation-gauge { font-size: 10px; }
#event-board { width: 100%; max-width: none; aspect-ratio: 1; --board-light: #e4e9da; --board-dark: #92ae94; box-shadow: 0 7px 22px #263e3124; touch-action: pan-y pinch-zoom; }
#event-board .maia-chessboard { width: 100%; height: 100%; }
:is(#event-board, #trend-board) .maia-chessboard { touch-action: pan-y pinch-zoom; }
.round-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; margin-top: .25rem; }
.board-share { display: flex; gap: .25rem; margin-left: auto; }
.live-page button, .live-page select { font: inherit; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; min-height: 36px; padding: .3rem .6rem; }
.event-nav button, .event-nav select, .round-controls button, .engine-controls button { min-height: 31px; padding: .18rem .45rem; font-size: .83rem; }
.event-nav #language { max-width: 5.5rem; }
.event-nav .btn-settings { width: 36px; height: 36px; padding: 0; }
.live-page .round-controls .btn-nav { width: 32px; height: 32px; padding: 0; border: 0; background: transparent; border-radius: 6px; }
.live-page .round-controls .btn-nav:hover:not(:disabled) { background: #e1eee5; }
.round-controls .btn-nav[aria-pressed="true"]:not(#sound) { color: var(--green); background: #e1eee5; }
.board-share #moment { background: var(--green); color: white; border-color: var(--green); }
.live-page button:disabled { opacity: .45; cursor: default; }
.live-page button:focus-visible, .live-page select:focus-visible, .live-page a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.event-panel { display: flex; flex-direction: column; align-self: start; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.event-observer { min-width: 0; }
.moves-heading, .engine-pane header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.moves-heading, .engine-pane { padding: .7rem .8rem; }
.live-page h2 { font-size: 1.04rem; line-height: 1.25; margin: 0; }
#ply-note { margin-left: auto; color: var(--muted); font-size: .83rem; }
.live-page #return-game { min-height: 28px; padding: .1rem .5rem; font-size: .76rem; color: var(--green); white-space: nowrap; }
.event-moves { overflow: auto; max-height: min(14rem, 32dvh); min-height: 4.75rem; border-block: 1px solid var(--line); }
.event-moves:empty::before { display: block; content: "—"; padding: 1rem; color: var(--muted); }
.move-row { display: grid; grid-template-columns: 2.35rem repeat(2, minmax(0, 1fr)); gap: .4rem; align-items: center; padding: .2rem .7rem; }
.move-row:nth-child(odd) { background: #f2f4ed; }
.move-row > span { color: var(--muted); font-variant-numeric: tabular-nums; }
.move-row > button { text-align: left; background: transparent; border-color: transparent; }
.move-row > button[aria-current="step"] { background: var(--green); color: white; }
.live-page .update-button { border: 0; border-radius: 0; background: #dcece1; color: #134936; min-height: 42px; }
.engine-pane p { margin: .55rem 0; color: var(--muted); }
#engine-note:empty { display: none; }
.intuition-tag { display: inline-block; font-size: .78rem; font-weight: 720; color: #133f30; background: #dcece1; padding: .17rem .34rem; border-radius: 4px; }
.engine-controls { display: flex; gap: .3rem; }
#show-lines { display: none; }
.engine-lines { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; margin-top: .35rem; }
.live-engine-group { min-width: 0; }
.live-engine-group .candidate-heading { justify-content: flex-start; margin: 0; color: var(--green); }
.live-engine-group .candidate-heading::before { content: ''; width: .43rem; height: .43rem; border-radius: 50%; background: currentColor; }
.maia-group .candidate-heading { color: #8b5819; }
.live-engine-group .candidate-line { grid-template-columns: 52px minmax(0, 1fr); padding: 3px 0; border-bottom: 1px solid var(--line); }
.live-engine-group .candidate-line:last-child { border-bottom: 0; }
.live-engine-group.maia-group .candidate-line { grid-template-columns: 52px minmax(0, 1fr) 64px; }
.maia-group .candidate-probability { color: #87551b; text-align: right; font: 700 12px/1.7 var(--dg-mono, monospace); }
.live-engine-group .candidate-score { font: 12px/1.7 var(--dg-mono, monospace); }
.live-engine-group .candidate-score.approximate { color: var(--muted); white-space: nowrap; }
.live-engine-group .candidate-variation { gap: .36rem; max-height: none; align-items: baseline; }
.live-engine-group .candidate-variation > * { font: 12px/1.7 var(--dg-mono, monospace); color: var(--muted); }
.live-engine-group .candidate-variation strong { color: var(--ink); font-weight: 750; }
.engine-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
#trend-mobile-slot { display: none; }
.live-engine-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin-top: .65rem; }
.live-engine-settings label { display: grid; gap: .2rem; min-width: 0; font-size: .8rem; color: var(--muted); }
.live-engine-settings select { width: 100%; }
.live-arrow-prefs { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .8rem 0; font-size: .9rem; }
.live-arrow-prefs label { display: flex; align-items: center; gap: .35rem; }
.live-arrow-prefs input { accent-color: var(--green); }
.engine-hint { margin: .5rem 0 0; color: var(--muted); font-size: .79rem; white-space: pre-line; }
.engine-hint:empty, .live-link-status:empty { display: none; }
.engine-health { margin: .65rem 0 0; padding-left: 1rem; font-size: .77rem; color: var(--muted); }
.engine-downloads:has(progress:not([hidden])) { display: flex; gap: .5rem; margin-top: .45rem; }
.engine-downloads progress { flex: 1; width: 100%; height: .34rem; accent-color: var(--green); }
#maia-progress { accent-color: #a66e20; }
.live-link-field { width: 100%; padding: .45rem; margin-top: .45rem; border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.live-link-status { margin: .35rem 0 0; color: var(--muted); font-size: .8rem; }
.live-page :is(.share-card-dialog, .live-settings, .live-trend) { width: min(690px, calc(100vw - 24px)); max-height: 94dvh; overflow: auto; margin: auto; padding: clamp(.75rem, 3vw, 1.25rem); border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
.live-page .live-settings { width: min(490px, calc(100vw - 24px)); }
.live-page :is(.share-card-dialog, .live-settings, .live-trend)::backdrop { background: #172a24aa; }
.live-share-heading, .share-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.live-share-heading { justify-content: space-between; }
.share-card-actions { justify-content: center; margin-top: .65rem; }
.share-card-preview-wrap { display: grid; place-items: center; margin-top: .4rem; padding: .4rem; background: var(--page); border-radius: 6px; }
.poster-progress { height: 3px; border-radius: 3px; overflow: hidden; background: #e7eadf; margin-top: .45rem; }
.poster-progress span { display: block; height: 100%; width: 0; background: var(--green); transition: width .35s ease; }
.poster-placeholder { display: grid; gap: 5%; align-content: start; width: min(100%, 41dvh); aspect-ratio: 1080 / 1560; border-radius: 8px; padding: 7%; background: var(--paper); border: 1px solid var(--line); }
.poster-placeholder span { display: block; border-radius: 5px; background: #eaece4; height: .9rem; width: 82%; }
.poster-placeholder span:nth-child(2) { width: 96%; height: auto; aspect-ratio: 1; }
.poster-placeholder span:last-child { width: 96%; height: 2rem; }
#share-card-canvas { display: block; max-width: 100%; max-height: 60dvh; width: auto; height: auto; animation: poster-reveal .28s ease-out; }
@keyframes poster-reveal { from { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { #share-card-canvas, .poster-progress span { animation: none; transition: none; } }
#trend-board { width: min(100%, 300px, 52dvh); aspect-ratio: 1; margin: .5rem auto .75rem; --board-light: #e4e9da; --board-dark: #92ae94; box-shadow: none; border-radius: 6px; touch-action: pan-y pinch-zoom; }
#trend-board .maia-chessboard { width: 100%; height: 100%; }
.trend-subtitle { margin-bottom: .12rem; font-size: .95rem; }
#trend-conclusion { margin-bottom: .55rem; font-size: .86rem; color: var(--green); }
#trend-status { margin-top: .38rem; font-size: .8rem; }
.trend-views, #trend-legend { display: flex; flex-wrap: wrap; gap: .4rem; }
.trend-views button[aria-pressed="true"] { background: var(--green); color: white; }
#trend-legend { list-style: none; margin: .45rem 0; padding: 0; }
#trend-legend button { display: inline-flex; gap: .3rem; align-items: center; min-height: 34px; font-size: .86rem; }
#trend-legend button[aria-pressed="true"] { border-color: var(--trend-color); background: var(--page); }
.live-trend :is(.trend-sf, .trend-consensus) { --trend-color: #276a4b; --trend-dash: none; }
.live-trend .trend-maia { --trend-color: #996119; --trend-dash: 8 4; }
.live-trend .trend-neutral { --trend-color: #555c70; --trend-dash: 1 4; }
.live-trend .trend-teal { --trend-color: #266f7a; --trend-dash: 7 3 1 3; }
.live-trend .trend-muted { opacity: .28; }
#trend-chart svg { display: block; width: 100%; }
#trend-chart svg text { font: 11px system-ui, sans-serif; fill: var(--muted); }
.live-trend .maia-trend-grid { stroke: var(--line); }
.live-trend .maia-trend-current { stroke: var(--muted); stroke-dasharray: 4 4; }
.live-trend .maia-trend-series path { fill: none; stroke: var(--trend-color); stroke-width: 1.8; stroke-dasharray: var(--trend-dash); stroke-linecap: round; }
.live-trend .maia-trend-series circle { fill: var(--paper); stroke: var(--trend-color); stroke-width: 1.5; }
.live-trend .maia-trend-data { overflow-x: auto; }
.live-trend table { width: 100%; border-collapse: collapse; text-align: right; font-size: .82rem; font-variant-numeric: tabular-nums; }
.live-trend :is(td, th) { padding: .3rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.event-source { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.1rem 0 0; font-size: .86rem; color: var(--muted); }
@media (max-width: 720px) {
  .event-main { padding: 0 0 1rem; }
  .event-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .live-page .board-column, .event-observer, .event-panel, .engine-pane { display: contents; }
  .event-nav { gap: .25rem; padding-inline: .45rem; }
  .event-nav h1 { font-size: .85rem; min-width: 0; flex: 1 1 auto; }
  .event-nav-link { padding: .15rem .4rem; font-size: .75rem; flex-shrink: 0; }
  .event-nav #language { max-width: 3.4rem; padding-inline: .25rem; font-size: .74rem; flex-shrink: 0; }
  .event-brand { font-size: .92rem; flex-shrink: 0; }
  .settings-label, .match-score .score-full { display: none; }
  .match-score { gap: .25rem; font-size: .74rem; }
  .match-score .score-short { display: inline; }
  .match-score strong { font-size: .95rem; }
  .round-rail { margin: 0; padding: 2px 8px 3px; }
  .round-rail, .event-moves { scrollbar-width: none; overscroll-behavior-inline: contain; }
  .event-moves { order: 0; display: flex; min-height: 30px; max-height: 30px; padding-inline: 8px; gap: .16rem; white-space: nowrap; overflow: auto hidden; background: var(--paper); }
  .event-moves:empty::before { content: attr(data-placeholder); align-self: center; padding: 0; font-size: .77rem; }
  .move-row { display: flex; flex: 0 0 auto; gap: .08rem; padding: 0; }
  .move-row:nth-child(odd) { background: transparent; }
  .move-row > span { font-size: .72rem; }
  .live-page .move-row > button { min-height: 28px; min-width: 30px; padding: .13rem .24rem; font-size: .84rem; text-align: center; }
  .moves-heading { order: 9; padding: .25rem .55rem; }
  .moves-heading h2, .moves-heading #ply-note:empty { display: none; }
  #ply-note { font-size: .72rem; }
  .moves-heading:has(#ply-note[data-following="true"]) { display: none; }
  .round-strip { order: 2; min-height: 20px; padding-inline: .52rem; gap: .35rem; }
  .round-strip h2, .round-strip strong { font-size: .78rem; }
  .live-page .round-strip .update-button { min-height: 20px; margin-left: auto; padding: 0 .35rem; border-radius: 4px; font-size: .73rem; }
  .seat { order: 3; min-height: 32px; padding: 1px .5rem; font-size: .83rem; }
  .seat > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .seat time { flex-shrink: 0; min-width: 5.75rem; padding-block: .16rem; }
  #white-seat, .board-column[data-orientation="black"] #black-seat { order: 5; }
  .board-column[data-orientation="black"] #white-seat { order: 3; }
  .live-page .board-with-evaluation { order: 4; grid-template-columns: minmax(0, 1fr) 36px; gap: 0 3px; grid-template-rows: 10px auto; align-items: center; }
  .live-page .evaluation-gauge { flex-direction: row; height: 6px; border-radius: 0; }
  .evaluation-gauge .gauge-white { order: -1; flex: 0 0 var(--white-share, 50%); background: #fcfcf5; box-shadow: inset 0 0 0 1px #ccd6ca; }
  .evaluation-gauge .gauge-black { flex: 1; }
  .evaluation-gauge :is(.gauge-white, .gauge-black) { height: 100% !important; transition: flex-basis .18s ease; }
  .evaluation-gauge span { display: none; }
  #mobile-gauge-score { display: block; font: 700 10px/1 var(--dg-mono, monospace); text-align: center; }
  #event-board { grid-column: 1 / -1; border-radius: 0; }
  .engine-summary { order: 6; padding: 1px .5rem .2rem; background: var(--paper); }
  .engine-summary header { min-height: 24px; gap: .25rem; flex-wrap: wrap; }
  .engine-summary h2 { font-size: .78rem; white-space: nowrap; }
  #mobile-moment-slot { display: block; min-width: 0; }
  #mobile-moment-slot .intuition-tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font-size: .69rem; }
  .engine-controls { flex-wrap: wrap; max-width: 100%; }
  .engine-controls button { min-height: 24px; padding: 0 .36rem; font-size: .73rem; }
  #show-lines { display: inline-block; }
  #engine-note { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .engine-lines { gap: .4rem; margin: 0; }
  .engine-lines:not(.expanded) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .engine-lines:not(.expanded) .live-engine-group { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .22rem; align-items: center; min-height: 26px; min-width: 0; max-width: 100%; overflow: hidden; }
  .engine-lines:not(.expanded) .candidate-heading { font-size: .68rem; white-space: nowrap; }
  .engine-lines:not(.expanded) .candidate-heading::before { width: .32rem; height: .32rem; }
  .engine-lines:not(.expanded) .candidate-line { grid-template-columns: 43px minmax(0, 1fr); gap: .15rem; min-height: 0; padding: 0; border: 0; }
  .engine-lines:not(.expanded) .maia-group .candidate-line { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .engine-lines:not(.expanded) .candidate-score.approximate { font-size: 10px; }
  .engine-lines:not(.expanded) .candidate-probability { font-size: 10px; }
  .engine-lines:not(.expanded) .candidate-score { font-size: 11px; }
  .engine-lines:not(.expanded) :is(.candidate-line:nth-child(n+2), .candidate-variation span) { display: none; }
  .engine-lines #load-maia { min-height: 22px; padding: 2px .28rem; border-color: #b88641; color: #723f17; font-size: .72rem; white-space: normal; max-width: 100%; overflow-wrap: anywhere; line-height: 1.15; text-align: left; }
  .engine-downloads:has(progress:not([hidden])) { margin: 0 0 2px; }
  .engine-downloads progress { height: 3px; }
  .round-controls { order: 7; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .25rem; margin: 0; padding: .18rem .5rem; }
  .round-controls button { min-height: 42px; padding: .08rem; font-size: 1.1rem; }
  .live-nav { display: contents; }
  #trend-mobile-slot { display: contents; }
  .live-page .round-controls .btn-nav { width: 100%; background: var(--paper); border: 1px solid var(--line); }
  .round-controls .desktop-control { display: none; }
  .toolbar-text, #copy-live-link { display: none; }
  .toolbar-icon { display: block; width: 20px; height: 20px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .board-share { display: contents; }
  .engine-actions, .live-link-field, .live-link-status { order: 10; margin-inline: .5rem; }
  .event-source { margin-inline: .5rem; }
}

@media (max-width: 480px) {
  .round-strip[data-counting-down="true"] .event-status:not([data-state="stale"]) { display: none; }
}

@media (max-width: 380px) {
  .event-nav-link { display: none; }
  .event-nav .btn-settings { width: 32px; height: 32px; }
  .event-nav button { min-height: 30px; padding: .15rem .35rem; font-size: .78rem; }
}

.channel-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem 1.2rem;
  margin: 0 0 .45rem; padding: .62rem .78rem; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.channel-copy { min-width: 0; }
.channel-panel h2 { margin: 0; font-size: .96rem; line-height: 1.4; }
.channel-panel p { margin: .12rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.channel-panel a, .live-review a { color: var(--green); font-weight: 650; }
.channel-panel[data-state="live"] { border-color: #799a87; }
.channel-panel[data-state="stale"] { border-color: #ba986a; }
.channel-actions, .review-downloads { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .65rem; }
.channel-panel button { min-height: 33px; padding: .23rem .6rem; font-size: .8rem; }
.channel-panel :is(#channel-follow, .workbench-game) { background: var(--green); border-color: var(--green); color: white; }
.channel-actions:has(.workbench-game:not([hidden])) #channel-follow {
  background: var(--paper);
  border-color: var(--line);
  color: var(--green);
}
.channel-panel .workbench-game {
  display: inline-flex;
  align-items: center;
  min-height: 33px;
  padding: .23rem .6rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: .8rem;
  text-decoration: none;
}
.channel-panel .review-downloads { gap: .3rem; }
.channel-panel .gif-status { flex-basis: 100%; }
.channel-events { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: .4rem;
  margin-block: 0 .45rem; }
.channel-events a { display: grid; align-content: center; gap: .15rem; min-width: 0; padding: .5rem .7rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); text-decoration: none; }
.channel-events a[aria-current] { border-color: #789a87; background: #eaf2ea; }
.channel-events strong { font-size: .8rem; line-height: 1.25; overflow-wrap: anywhere; }
.channel-events span { color: var(--muted); font-size: .73rem; line-height: 1.25; }
.channel-events a[data-status="live"] span { color: #226446; font-weight: 650; }
.channel-events a[data-status="live"] span::before { content: ''; display: inline-block; width: .48rem; height: .48rem;
  margin-inline-end: .35rem; border-radius: 50%; background: #268353; }
.channel-events a:hover { border-color: var(--green); }
.team-round { margin-block: .35rem .6rem; }
.team-round-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .2rem .65rem; margin-bottom: .42rem; }
.team-round-header h2 { margin: 0; font-size: .91rem; }
.team-round-header a, #schedule-standings { color: var(--green); font-size: .76rem; font-weight: 650; }
.team-matchups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .38rem; }
.live-page .team-match { min-width: 0; padding: .45rem .58rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--paper); color: var(--ink); white-space: normal; text-align: start; }
.live-page .team-match[aria-pressed="true"], .live-page .team-board-list button[aria-pressed="true"] {
  border-color: #789a87; background: #eaf2ea; }
.team-match-label { display: block; margin-bottom: .2rem; font-size: .72rem; font-weight: 650; color: var(--muted); }
.team-match-names { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .38rem;
  font-size: .86rem; font-weight: 680; line-height: 1.22; overflow-wrap: anywhere; }
.team-match-names strong { font-size: 1.12rem; color: var(--green); white-space: nowrap; font-variant-numeric: tabular-nums; }
.team-match-names span:last-child { text-align: end; }
.team-board-list { display: flex; gap: .35rem; overflow-x: auto; margin-top: .4rem; padding: .15rem .15rem .3rem;
  scrollbar-width: thin; overscroll-behavior-inline: contain; }
.live-page .team-board-list button { flex: 1 0 min(36%, 10rem); min-width: 7.25rem; display: grid; align-content: start;
  gap: .22rem; padding: .37rem .48rem; text-align: start; white-space: normal; }
.team-board-list strong { font-size: .77rem; line-height: 1.22; overflow-wrap: anywhere; }
.team-board-meta { display: flex; justify-content: space-between; gap: .25rem; color: var(--muted); font-size: .69rem; }
.team-board-list button[data-status="live"] .team-board-meta span:last-child { color: #226446; }
.event-layout[data-team-watch="true"] :is(.engine-pane, .evaluation-gauge, #mobile-gauge-score) { display: none; }
.live-page .event-layout[data-team-watch="true"] .board-with-evaluation { grid-template: auto / minmax(0, 1fr); }
.channel-boards { display: flex; align-items: center; gap: .65rem; margin: .3rem 0; font-size: .84rem; }
.channel-boards select { max-width: 100%; min-width: 0; }
#channel-schedule-dialog { width: min(calc(100% - 1.5rem), 570px); max-height: 82dvh; overflow: auto;
  padding: .85rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
#channel-schedule-dialog::backdrop { background: #172b2588; }
#channel-schedule-dialog header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .3rem .65rem; }
#channel-schedule-dialog h2 { font-size: .92rem; margin: 0; }
#channel-rounds, #review-positions { display: grid; gap: .35rem; list-style: none; margin: .55rem 0 0; padding: 0; }
#channel-rounds button, #review-positions button { width: 100%; text-align: start; white-space: normal; }
.live-review { padding: .65rem .82rem; background: #f4f8ef; border-block: 1px solid var(--line); font-size: .83rem; }
.live-review summary { cursor: pointer; color: var(--green); font-weight: 650; }
.live-review p { margin: .33rem 0 0; color: var(--muted); }
#review-positions:empty { display: none; }
#review-guess { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .4rem; }
.live-page :is(.channel-panel, .channel-events, .team-round, .channel-boards, .live-review, #channel-schedule-dialog) :focus-visible {
  outline: 2px solid var(--green); outline-offset: 2px;
}
.live-page .event-layout { --event-top: 251px; }
@media (min-width: 721px) {
  .live-page .event-layout { grid-template-columns: min(60%, clamp(280px, calc(100dvh - var(--event-top, 197px)), 690px)) minmax(0, 1fr); }
  .event-layout:has(.team-round:not([hidden])) { --event-top: 292px; }
  .team-round { margin-top: 0; }
  .team-matchups { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
  .team-board-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.6rem), 1fr)); }
  .live-page .team-board-list button { min-width: 0; }
}
@media (max-width: 720px) {
  .channel-events { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); margin: .3rem .4rem; }
  .channel-events a { padding: .42rem .46rem; }
  .channel-events strong { font-size: .74rem; }
  .channel-events span { font-size: .68rem; }
  .team-round { order: -1; margin-inline: .4rem; }
  .team-matchups { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.75rem), 1fr)); }
  .live-page .team-match { padding-inline: .42rem; }
  .team-match-names { font-size: .76rem; gap: .25rem; }
  .team-match-names strong { font-size: .99rem; }
  .channel-panel { margin: .25rem .4rem; padding: .4rem .55rem; gap: .25rem .55rem; }
  .channel-panel h2 { font-size: .84rem; }
  .channel-panel p { font-size: .76rem; }
  .channel-panel button { min-height: 33px; font-size: .75rem; }
  .channel-boards { margin-inline: .45rem; }
  .live-review { margin: .25rem 0; padding: .55rem .6rem; }
}

@media (max-width: 720px) {
  .event-main:has(.channel-panel[data-watching="true"]) { display: flex; flex-direction: column; }
  .event-main:has(.channel-panel[data-watching="true"]) .round-rail { order: 2; }
  .event-main:has(.team-round:not([hidden])) .round-rail { order: 0; }
  .event-main:has(.channel-panel[data-watching="true"]) .event-source { order: 3; }
  .channel-panel[data-watching="true"] { flex-wrap: nowrap; justify-content: space-between; margin-block: 1px; padding-block: 0; }
  .channel-panel[data-watching="true"] #channel-detail {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  }
  .channel-panel[data-watching="true"] #channel-calendar { display: none; }
  .live-review { order: 8; }
}

.channel-schedule-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
#channel-rounds .schedule-phase { border: 1px solid var(--line); border-radius: 7px; padding: .42rem .52rem; }
.schedule-phase > summary, .schedule-match > summary { cursor: pointer; color: var(--green); font-weight: 650; }
.schedule-phase > ol { display: grid; gap: .42rem; list-style: none; padding: .45rem 0 0; margin: 0; }
.schedule-match { margin: .35rem 0 0 .3rem; padding-inline-start: .45rem; border-inline-start: 2px solid var(--line); font-size: .8rem; }
#channel-rounds ul { display: grid; gap: .25rem; margin: .25rem 0 .5rem; padding-inline-start: .8rem; list-style: none; }
#channel-game-filter { max-width: 100%; padding: .4rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); }
#event-moves[data-guessing="true"] { visibility: hidden; }

#channel-countdown { display: block; color: var(--green); font: 750 clamp(1.55rem, 4vw, 2.3rem)/1.2 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .channel-panel[data-watching="true"] :is(#channel-calendar, #channel-countdown) { display: none; }
}


.event-main:has(#channel-countdown:not([hidden])) :is(.engine-pane, .evaluation-gauge, #mobile-gauge-score) {
  display: none;
}
.event-main:has(#channel-countdown:not([hidden])) .board-with-evaluation {
  grid-template: auto / minmax(0, 1fr);
}
