@font-face { font-family: Inter; src: local('Inter'); }
:root {
  color-scheme: light;
  --bg: #f7f5f0; --surface: #fffdf8; --raised: #f0ece4; --border: #ded9ce;
  --muted: #746e64; --text: #302e2a; --accent: #b65c40; --accent-hover: #9e4c34;
  --accent-soft: #f3e6dd; --lime: var(--accent); --sage: #526e57; --sage-soft: #eaf0e6;
  --red: #bc5150; --blue: #557ca1;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font: 400 42px/1.15 Georgia, 'Times New Roman', serif; letter-spacing: -1.3px; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
h3 { font-weight: 600; }
small { display: block; }
.lime { color: var(--accent); }
.muted { color: var(--muted); }
.small-text { font-size: 11px; line-height: 1.5; }

.sidebar { position: fixed; inset: 0 auto 0 0; width: 214px; border-right: 1px solid var(--border); padding: 30px 18px 20px; display: flex; flex-direction: column; background: #eeeae1; z-index: 10; }
.brand { display: flex; gap: 11px; align-items: center; font-size: 17px; font-weight: 750; letter-spacing: 1px; margin: 0 7px 43px; }
.brand small { font: 9px ui-monospace, monospace; letter-spacing: 2.7px; color: var(--muted); margin-top: 3px; }
.brand-mark { height: 38px; width: 38px; flex-shrink: 0; background: var(--accent); color: #fff9f2; border-radius: 10px; font-size: 30px; line-height: 38px; font-style: italic; letter-spacing: -6px; padding-left: 5px; position: relative; overflow: hidden; }
.brand-mark span { font-size: 23px; position: absolute; right: 3px; top: -4px; }
.nav-label { font-size: 10px; letter-spacing: 1.15px; color: #85796b; padding: 0 13px; margin-bottom: 12px; }
.nav-link { display: flex; align-items: center; gap: 11px; color: #6a645c; font-size: 13px; padding: 12px; border-radius: 8px; margin-bottom: 5px; transition: background .15s, color .15s; }
.nav-link:hover { background: #e5dfd4; color: var(--text); }
.nav-link.active { background: #e8dbce; color: #91462f; font-weight: 600; }
.nav-icon { font-size: 18px; width: 19px; line-height: 1; }
.nav-count { margin-left: auto; font: 11px ui-monospace, monospace; background: #d8c4b4; color: #744129; padding: 1px 6px; border-radius: 5px; }
.sidebar-note { margin-top: auto; border: 1px solid #d8cdbf; border-radius: 11px; padding: 8px; background: #f6f1e8; }
.tiny-spark { font-size: 25px; line-height: 1; color: var(--accent); }
.sidebar-note button { width: 100%; justify-content: space-between; }
.local-state { display: flex; align-items: center; gap: 9px; margin-top: 22px; padding: 0 4px; font-size: 12px; }
.local-state small { font-size: 10px; color: var(--muted); margin-top: 3px; }
.status-dot, .live-dot { display: inline-block; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--sage); }
.status-dot.offline { background: var(--red); }
.lock-icon { margin-left: auto; color: var(--muted); font-size: 20px; }
.workspace { margin-left: 214px; }
.topbar { height: 64px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 32px; font-size: 12px; background: #f7f5f0e8; }
.breadcrumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.breadcrumb span { padding: 0 12px; color: #aaa193; }
.breadcrumb strong { color: var(--text); font-weight: 500; }
.topbar-right { display: flex; gap: 18px; align-items: center; flex-shrink: 0; }
.topbar-right .text-link { white-space: nowrap; }
.local-pill { border: 1px solid #d6d0c3; border-radius: 5px; padding: 3px 7px; font-size: 9px; letter-spacing: .7px; color: #7a7468; white-space: nowrap; }
.engine-status { color: #62705c; display: flex; gap: 7px; align-items: center; font-size: 11px; }
main { padding: 25px 32px 0; max-width: 1800px; margin: auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; gap: 18px; }
.eyebrow { font-size: 10px; letter-spacing: 1.35px; color: #857766; margin-bottom: 9px; }
.page-heading p { font-size: 13px; color: var(--muted); margin-top: 10px; }
#page-arena > .page-heading .eyebrow { font-size: 9px; margin-bottom: 6px; }
#page-arena > .page-heading p { margin-top: 7px; }
#page-arena > .page-heading { margin-bottom: 20px; }
.heading-actions { display: flex; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 7px; padding: 10px 15px; font-size: 12px; font-weight: 600; white-space: nowrap; min-height: 40px; transition: background .15s, border-color .15s; }
.button.primary { background: var(--accent); color: #fffcf7; }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); }
.button.secondary { background: var(--surface); border-color: #d4cbbb; color: #514b42; }
.button.secondary:hover:not(:disabled), .button.quiet:hover:not(:disabled) { background: #eee7dc; border-color: #c7b7a4; }
.button.quiet { border-color: #d6c7b5; background: transparent; color: #89533a; }
.button.small { padding: 8px 12px; font-size: 11px; min-height: 40px; }
.button span { font-size: 16px; line-height: 1; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 23px 0; }
.metric { background: #f2eee6; border: 1px solid #e2dbcf; border-radius: 9px; padding: 16px; display: flex; align-items: flex-start; gap: 13px; position: relative; min-height: 99px; }
.metric-icon { width: 33px; height: 33px; background: #e9e3d8; border: 1px solid #ddd4c6; border-radius: 8px; display: grid; place-items: center; font-size: 18px; color: #8a7c69; }
.metric-icon.lime { background: #ebdfd2; border-color: #d9c4af; color: var(--accent); }
.metric-label { font-size: 9px; letter-spacing: 1px; color: #857b6e; display: block; margin: 1px 0 4px; }
.metric strong { font-size: 25px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.metric strong small { display: inline; font-size: 13px; color: #978c7c; }
.metric-foot { position: absolute; bottom: 12px; left: 62px; font-size: 10px; color: #897e6f; }
.panel { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: 0 3px 16px #44362205; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.section-title { display: flex; gap: 9px; align-items: center; min-width: 0; }
.tag, .count-badge { font-size: 9px; line-height: 1.35; letter-spacing: .25px; border: 1px solid #dcd3c4; border-radius: 5px; padding: 3px 6px; color: #867462; white-space: nowrap; }
.count-badge { color: #7d776c; border-color: #e0d9cd; background: #f2eee6; }
.tag.exhibition { color: #5f7390; background: #eff2f5; border-color: #d4dce4; }
.tag.calibration { color: #617452; background: #edf0e7; border-color: #d3dcc8; }

/* The fight stays central; camera and playback actions remain visible. */
.arena-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.watch-panel { min-width: 0; scroll-margin-top: 20px; }
.watch-intro { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; }
.watch-status-copy { min-width: 0; }
.watch-status-copy h2 { font: 400 24px/1.3 Georgia, serif; letter-spacing: -.4px; overflow-wrap: anywhere; }
.watch-status-copy p { color: var(--muted); font-size: 12px; line-height: 1.65; margin-top: 5px; max-width: 590px; }
.watch-status-copy .eyebrow { margin-bottom: 6px; font-size: 9px; }
.watch-heading-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 7px; }
.watch-heading-meta .eyebrow { margin: 0; }
.watch-heading-meta .tag { font-size: 8px; padding: 2px 5px; }
.watch-shortcuts { display: flex; gap: 7px; flex-shrink: 0; flex-wrap: wrap; align-items: center; }
.watch-shortcuts .button { min-height: 40px; padding: 9px 12px; }
.watch-quick-button { border: 1px solid #d7c8b7; border-radius: 7px; background: #f8f1e8; color: #955637; min-height: 40px; padding: 8px 13px; font-size: 12px; font-weight: 600; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; background: var(--surface); border: 1px solid #dcd2c3; border-radius: 7px; color: #706353; font-size: 18px; flex-shrink: 0; }
.icon-button:hover:not(:disabled) { background: #f0e8dc; border-color: #c5b198; }
.viewer-shell { height: clamp(320px, calc(100svh - 565px), 560px); position: relative; background: #f2eee4; overflow: hidden; }
#fight-canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.viewer-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: radial-gradient(ellipse at center, #faf7efe8, #f5f0e378 75%); pointer-events: none; }
.viewer-buffer { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 20px; background: #f7f5f0a8; pointer-events: none; }
.buffer-card { width: min(100%, 350px); border: 1px solid var(--border); border-radius: 12px; padding: 23px; background: #fffdf8f5; box-shadow: 0 10px 35px #4d3a2112; text-align: center; }
.buffer-card h3 { font: 400 23px/1.3 Georgia, serif; color: var(--text); }
.buffer-card progress { display: block; width: 100%; height: 7px; margin: 19px 0 10px; accent-color: var(--accent); border: 0; border-radius: 10px; overflow: hidden; }
.buffer-card progress::-webkit-progress-bar { background: var(--raised); border-radius: 10px; }
.buffer-card progress::-webkit-progress-value { background: var(--accent); border-radius: 10px; }
.buffer-card progress::-moz-progress-bar { background: var(--accent); border-radius: 10px; }
.viewer-empty .button { pointer-events: auto; margin-top: 20px; }
.empty-ring { height: 53px; width: 53px; border: 1px solid #d8c5b2; border-radius: 14px; display: grid; place-items: center; color: var(--accent); font-size: 31px; background: #f6e9dd; margin-bottom: 17px; }
.viewer-empty h3 { font: 400 27px/1.3 Georgia, serif; letter-spacing: -.6px; }
.viewer-empty p { font-size: 13px; color: var(--muted); margin-top: 9px; line-height: 1.75; }
.viewer-top, .viewer-bottom { position: absolute; left: 18px; right: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; pointer-events: none; }
.viewer-top { top: 16px; }
.viewer-bottom { bottom: 13px; color: #786d5e; font-size: 10px; }
.viewer-badge { font-size: 10px; letter-spacing: .5px; background: #fffdf5e8; border: 1px solid #d8cfc0; color: #786b58; padding: 5px 8px; border-radius: 5px; }
.viewer-badge.is-live { color: #48684b; border-color: #bdcbb7; background: #f2f8eced; }
.viewer-hint { font-size: 10px; color: #817461; }
.coordinate-label { color: #8b7b65; font-size: 10px; }
.viewer-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 17px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fbf8f1; }
.camera-presets, .viewer-zoom-controls { display: flex; align-items: center; gap: 4px; }
.camera-button { min-height: 40px; padding: 8px 11px; border: 1px solid transparent; border-radius: 6px; font-size: 11px; font-weight: 500; color: #7a6e5e; background: transparent; white-space: nowrap; }
.camera-button:hover:not(:disabled) { background: #eee5d9; }
.camera-button[aria-pressed="true"] { color: #8c4e35; border-color: #ddc3ac; background: #f3e5d6; }
.viewer-zoom-controls .icon-button { width: 36px; height: 40px; }
.viewer-zoom-controls > span, .camera-presets > span { font-size: 10px; color: #8a7f6e; margin-right: 4px; }
.fight-scoreboard { display: flex; align-items: center; justify-content: space-between; padding: 17px 21px; border-bottom: 1px solid var(--border); gap: 14px; min-height: 86px; }
.fighter-name { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.fighter-name > div { min-width: 0; }
.fighter-name strong { font-size: 14px; font-weight: 600; display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.fighter-name small { font-size: 11px; color: #867b6c; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.corner-dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
.corner-dot.red { background: var(--red); }
.corner-dot.blue { background: var(--blue); }
.fight-points { font: 27px ui-monospace, monospace; font-variant-numeric: tabular-nums; color: #544a3e; margin-left: auto; flex-shrink: 0; border-radius: 6px; }
.fight-points.point-awarded { color: #975815; background: #f9e8bf; box-shadow: 0 0 0 5px #f9e8bf; }
.blue-name { text-align: right; justify-content: flex-end; }
.blue-name .fight-points { margin: 0 auto 0 0; }
.versus { font-size: 10px; text-align: center; color: #8c7e6a; min-width: 70px; }
.versus small { font-size: 9px; color: #8d7e69; margin-top: 5px; }
.playback { display: flex; flex-direction: column; gap: 13px; padding: 15px 19px 17px; }
.playback-actions { display: flex; align-items: center; gap: 7px; width: 100%; }
.play-button { min-width: 93px; min-height: 42px; }
.skip-controls { display: flex; gap: 0; margin-left: 4px; padding-left: 6px; border-left: 1px solid #e4d9c9; }
.speed-control { display: flex; align-items: center; gap: 7px; margin-left: auto; color: #897962; font-size: 11px; white-space: nowrap; }
.playback-timeline { display: flex; align-items: center; gap: 11px; width: 100%; }
.play-time { font: 11px ui-monospace, monospace; color: #8a7c68; white-space: nowrap; }
input[type="range"] { min-width: 30px; width: 100%; height: 24px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.playback select { color: #73644f; background: #f7f1e8; border: 1px solid #e1d4c1; border-radius: 5px; font-size: 11px; min-height: 40px; max-width: 62px; padding: 7px; }
.playback select:disabled { opacity: .45; cursor: default; }
.live-button { border: 1px solid #c6d1bd; background: #edf3e8; color: var(--sage); border-radius: 6px; min-height: 40px; padding: 7px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.watch-options { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 11px 19px; border-top: 1px solid #ebe3d5; color: #867765; font-size: 11px; line-height: 1.6; }
.watch-options > span { min-width: 0; }
.watch-options .watch-mini { flex-shrink: 0; }
.fight-detail { border-top: 1px solid #ebe3d5; padding: 10px 19px; color: #8d7c64; font-size: 10px; min-height: 37px; }
.contact-panel { padding: 16px 19px; border-top: 1px solid var(--border); background: #fcfaf5; }
.contact-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.contact-heading h3 { font-size: 13px; font-weight: 600; }
.contact-heading > span { font-size: 10px; color: var(--muted); }
.contact-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 10px; color: #776c5d; }
.contact-legend > span { display: inline-flex; gap: 6px; align-items: center; }
.contact-key { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.contact-key.scored { background: #c18b2c; box-shadow: 0 0 0 3px #f7e9c8; }
.contact-key.guard { background: #4197a0; box-shadow: 0 0 0 3px #dfedef; }
.contact-intro, .contact-log-empty { font-size: 11px; line-height: 1.7; color: #7d7161; margin-top: 11px; }
.scoring-rules { font-size: 11px; margin-top: 10px; line-height: 1.75; }
.scoring-rules > summary { cursor: pointer; color: #8d5337; padding: 4px 0; }
.scoring-rules > div { padding: 3px 0 8px; color: #6b6257; }
.scoring-rules p + p { margin-top: 9px; }
.contact-log { list-style: none; padding: 0; margin: 10px 0 0; max-height: 255px; overflow-y: auto; }
.contact-event { border-top: 1px solid #e8e0d3; border-left: 3px solid #c18b2c; background: #faf3e3; }
.contact-event.guard { border-left-color: #4197a0; background: #f0f6f5; }
.contact-event summary { cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px; font-size: 11px; list-style: none; }
.contact-event summary::-webkit-details-marker { display: none; }
.contact-event time { font: 10px ui-monospace, monospace; color: #82745f; flex-shrink: 0; }
.contact-event summary > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.contact-event strong { color: #946211; font: 600 12px ui-monospace, monospace; white-space: nowrap; }
.contact-event.guard strong { color: #397780; font-size: 9px; }
.contact-event summary::after { content: '+'; font-size: 13px; color: #8b7a62; }
.contact-event details[open] summary::after { content: '−'; }
.contact-event p { padding: 0 11px 11px; font-size: 10px; color: #786b58; line-height: 1.8; overflow-wrap: anywhere; }
.rings-panel { display: flex; flex-direction: column; }
.rings-panel > .panel-heading > .small-text { display: none; }
.rings-list { display: flex; flex-direction: column; }
.rings-section-label { font-size: 10px; letter-spacing: .8px; color: #8d7b63; padding: 14px 18px 7px; background: #faf6ee; border-bottom: 1px solid #eee6d8; }
.rings-empty { padding: 20px 18px; color: #857663; font-size: 12px; line-height: 1.75; background: #faf7f0; }
.rings-empty button.text-link { min-height: 36px; border: 0; background: transparent; padding: 3px 0; }
.ring-card { display: block; text-align: left; width: 100%; border: 0; border-bottom: 1px solid #e9e1d5; background: transparent; padding: 17px 18px; min-height: 110px; transition: background .15s; }
.ring-card:last-child { border-bottom: 0; }
.ring-card:hover { background: #f5efe5; }
.ring-card.selected { background: #f4e8da; border-left: 3px solid var(--accent); padding-left: 15px; }
.ring-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.ring-index { font-size: 10px; color: #8e7b62; letter-spacing: .4px; }
.ring-state { font-size: 9px; letter-spacing: .2px; color: #8e7a61; }
.ring-state.busy { color: var(--sage); }
.ring-bots { display: flex; gap: 7px; align-items: center; font-size: 12px; min-width: 0; }
.ring-bots .bot-label { max-width: 89px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ring-bots .bot-label.is-winner { color: #3f5b34; background: #e4eadb; border-radius: 4px; padding: 3px 5px; font-weight: 700; }
.ring-bots .vs { color: #9c886e; font-size: 10px; }
.ring-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; color: #8d785c; font-size: 10px; }
.ring-meta.replay-actions { justify-content: flex-end; }
.ring-watch-label { color: var(--accent); font-size: 11px; font-weight: 600; }
.idle-line { font-size: 12px; color: #8e7a60; }
.panel-footer { display: flex; align-items: center; gap: 7px; border-top: 1px solid var(--border); padding: 12px 17px; font-size: 10px; color: #8f7c62; min-height: 40px; }
.panel-footer .status-dot { width: 5px; height: 5px; }

body.theater-active { overflow: hidden; }
.watch-panel.is-theater, body.theater-active .watch-panel, .watch-panel:fullscreen { position: fixed; inset: 14px; z-index: 1000; display: flex; flex-direction: column; border-color: #cfc0ac; box-shadow: 0 0 0 100vmax #2c251ed9; margin: 0; overflow: auto; }
.watch-panel.is-theater .viewer-shell, body.theater-active .watch-panel .viewer-shell, .watch-panel:fullscreen .viewer-shell { height: auto; flex: 1 0 220px; min-height: 180px; }
.watch-panel.is-theater .watch-intro, body.theater-active .watch-panel .watch-intro { padding-top: 13px; padding-bottom: 13px; flex-shrink: 0; }
.watch-panel.is-theater .viewer-toolbar, body.theater-active .watch-panel .viewer-toolbar { flex-shrink: 0; }
.watch-panel.is-theater .fight-detail, body.theater-active .watch-panel .fight-detail { display: none; }
.watch-panel.is-theater .contact-panel, body.theater-active .watch-panel .contact-panel, .watch-panel:fullscreen .contact-panel { display: none; }
.watch-panel:fullscreen { inset: 0; border-radius: 0; box-shadow: none; }

.lower-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; margin-top: 22px; }
.segmented { display: flex; gap: 2px; border: 1px solid #e0d4c2; border-radius: 6px; padding: 3px; background: #f7f1e7; }
.segmented button { background: transparent; border: 0; border-radius: 4px; color: #88765e; font-size: 10px; padding: 5px 8px; min-height: 30px; }
.segmented button.selected { background: #ead9c6; color: #865237; }
.schedule-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 16px 20px; border-bottom: 1px solid #eee5d6; gap: 12px; }
.schedule-row:last-child { border: 0; }
.schedule-names { display: flex; align-items: center; gap: 7px; font-size: 13px; overflow: hidden; }
.schedule-names strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 165px; }
.schedule-names span { font-size: 10px; color: #9c8567; }
.schedule-meta { font-size: 11px; color: #8b7456; margin-top: 6px; }
.schedule-result { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.schedule-result small { font-size: 9px; color: #8d7a60; margin-top: 4px; }
.watch-mini { border: 1px solid #d9c4ab; background: #f5e9da; color: #93613c; border-radius: 5px; padding: 8px 10px; font-size: 10px; white-space: nowrap; min-height: 35px; }
.watch-mini:hover:not(:disabled) { background: #ecdac4; }
.recent-row { display: block; background: transparent; border: 0; border-bottom: 1px solid #eee5d6; padding: 15px 18px; width: 100%; text-align: left; }
.recent-row:last-child { border-bottom: 0; }
.recent-row.selected { background: #f5eee3; }
.recent-row:hover { background: #f5eee3; }
.recent-top { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.recent-top strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 91px; }
.recent-top span { color: #988063; font-size: 10px; }
.recent-top .replay-icon { margin-left: auto; color: var(--accent); font-size: 15px; }
.recent-result { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 10px; color: #8b7456; }
.recent-score { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.empty-state { text-align: center; padding: 34px 22px; color: #917b5b; }
.empty-state > span { font-size: 25px; color: #a48661; display: block; margin-bottom: 10px; }
.empty-state h3 { font-size: 14px; color: #7e6c54; margin-bottom: 6px; }
.empty-state p { font-size: 12px; line-height: 1.75; max-width: 330px; margin: auto; color: #8d7759; }
.arena-footnote { display: flex; gap: 13px; align-items: center; margin: 25px 0 29px; color: #8c785c; font-size: 11px; }
.arena-footnote > span:first-child { font-size: 23px; color: #a88a64; }
.arena-footnote p { max-width: 740px; }
.arena-footnote strong { color: #827053; font-weight: 500; }
.arena-footnote .mono { margin-left: auto; font: 9px ui-monospace, monospace; white-space: nowrap; color: #948168; letter-spacing: .5px; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; border-top: 1px solid #e3d8c7; color: #8c775a; font-size: 10px; padding: 22px 0 25px; }
.footer-wordmark { font-size: 11px; letter-spacing: 1.1px; color: #8a7659; font-weight: 650; }
.footer-wordmark span { font: 9px ui-monospace, monospace; color: #9c8768; }
.connection-banner { border: 1px solid #dbc0a0; background: #fbefdc; color: #946234; padding: 13px 16px; border-radius: 8px; margin-bottom: 23px; font-size: 12px; }

.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 21px; }
.search-field { display: flex; align-items: center; gap: 10px; border: 1px solid #d9cbb6; border-radius: 7px; background: var(--surface); padding: 11px 14px; width: 310px; color: #987a55; }
.search-field input { background: transparent; color: var(--text); border: 0; outline: none; width: 100%; font-size: 13px; }
.bots-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; min-height: 400px; align-content: start; margin-bottom: 35px; }
.bots-grid > .empty-state { grid-column: 1 / -1; padding-top: 90px; }
.bot-card { padding: 23px; }
.bot-card-top { display: flex; justify-content: space-between; gap: 10px; }
.bot-avatar { width: 44px; height: 44px; border-radius: 10px; border: 1px solid #d7b99a; color: #aa6642; background: #f3e5d3; display: grid; place-items: center; font: 19px Georgia, serif; }
.bot-card h3 { margin-top: 20px; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-author { font-size: 12px; color: var(--muted); margin: 4px 0 20px; }
.bot-stats { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding-top: 16px; margin-bottom: 21px; }
.bot-stats span { font-size: 9px; color: #8e7758; }
.bot-stats strong { display: block; font-size: 17px; margin-top: 6px; color: #7c6445; font-weight: 500; }
.bot-card .button { width: 100%; }
.bot-download { display: block; margin-top: 14px; text-align: center; }
.ranking-explanation { display: flex; align-items: center; gap: 17px; padding: 23px; margin-bottom: 25px; }
.ranking-explanation strong { font-size: 14px; }
.ranking-explanation p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.ranking-explanation .tag { margin-left: auto; }
.table-panel { margin-bottom: 50px; overflow: auto; min-height: 300px; }
table { border-collapse: collapse; width: 100%; text-align: left; white-space: nowrap; }
th { font-size: 10px; font-weight: 500; color: #8d7251; padding: 18px 20px; letter-spacing: .45px; border-bottom: 1px solid var(--border); background: #fcf8f0; }
td { padding: 19px 20px; font-size: 13px; border-bottom: 1px solid #eee2d0; }
td:first-child { font-size: 15px; color: #9b7040; }
td strong { font-weight: 500; }
td small { font-size: 11px; color: var(--muted); margin-top: 3px; }
.rating-number { font: 16px ui-monospace, monospace; }
.provisional { color: #997333; background: #fbf3df; border-color: #e1cfa2; }
.archive-link { color: #9b6a3d; font-size: 10px; letter-spacing: .2px; }
.archive-link:hover { color: var(--accent); }
.archive-pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 19px; }

dialog { width: min(550px, calc(100vw - 30px)); max-height: calc(100vh - 35px); padding: 29px; background: var(--surface); border: 1px solid #d3bea2; border-radius: 14px; box-shadow: 0 24px 100px #47331e38; color: var(--text); }
dialog::backdrop { background: #30291f75; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.dialog-heading h2 { font: 400 29px/1.25 Georgia, serif; letter-spacing: -.7px; }
.dialog-heading .eyebrow { font-size: 9px; }
.dialog-intro { font-size: 13px; color: #8a765c; margin: 17px 0 24px; line-height: 1.8; }
.drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #c3a784; background: #faf2e6; border-radius: 9px; min-height: 173px; cursor: pointer; text-align: center; padding: 18px; }
.drop-zone.drag-over { background: #f0dec4; border-color: var(--accent); }
.drop-zone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop-zone:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.upload-glyph { font-size: 31px; color: var(--accent); margin-bottom: 8px; }
.drop-zone strong { font-size: 14px; font-weight: 500; }
.drop-zone > span:last-child { font-size: 11px; color: #9a7b52; margin-top: 7px; }
.upload-help { font-size: 12px; color: #8b7150; line-height: 1.8; margin: 18px 0 12px; }
code { font: 11px ui-monospace, monospace; color: #996637; background: #f2e6d5; border-radius: 4px; padding: 2px 5px; }
.text-link { color: #a4663d; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover { color: var(--accent-hover); }
.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; padding-top: 22px; border-top: 1px solid #e6d5be; }
.package-preview { margin-top: 15px; padding: 15px; background: #eff3e8; border: 1px solid #c7d2b6; border-radius: 8px; font-size: 13px; }
.package-preview strong { color: #607b43; font-weight: 500; }
.package-preview small { font-size: 11px; color: #7d8b6b; margin-top: 5px; word-break: break-all; }
.form-error { font-size: 12px; line-height: 1.7; border: 1px solid #ddb5aa; background: #fbede6; padding: 12px 14px; border-radius: 7px; color: #aa533d; margin-top: 16px; }
.matchup-selects { display: flex; align-items: center; gap: 14px; }
.matchup-selects label { min-width: 0; flex: 1; }
.field-label { display: flex; align-items: center; gap: 7px; font-size: 10px; color: #8c704f; margin-bottom: 10px; }
.matchup-selects select { width: 100%; background: #faf3e8; border: 1px solid #d8bc96; color: #795e3a; padding: 12px 9px; border-radius: 6px; font-size: 12px; }
.select-vs { font-size: 11px; color: #a3865f; margin-top: 25px; }
.queue-rules { display: flex; gap: 14px; padding: 18px; background: #f7efe1; border: 1px solid #e0c7a6; border-radius: 9px; margin-top: 24px; }
.queue-rules strong { font-size: 13px; font-weight: 500; }
.queue-rules p { font-size: 12px; color: #927650; line-height: 1.7; margin-top: 6px; }
.starter-downloads { border-top: 1px solid #e6d5be; padding-top: 16px; margin-top: 16px; }
.starter-downloads h3 { font-size: 13px; color: #8c6540; }
.starter-downloads p { font-size: 12px; color: #8b7150; line-height: 1.7; margin-top: 6px; }
.starter-download-links { display: flex; flex-wrap: wrap; gap: 11px 21px; margin-top: 13px; }
.toast { position: fixed; bottom: 25px; right: 25px; padding: 15px 20px; max-width: min(460px, 90vw); background: #f4f4e8; border: 1px solid #bcc59e; border-radius: 10px; color: #657044; font-size: 13px; box-shadow: 0 8px 35px #493b2020; z-index: 2000; }

@media (min-width: 1600px) {
  .arena-grid, .lower-grid { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1200px) {
  .sidebar { width: 188px; padding-left: 12px; padding-right: 12px; }
  .workspace { margin-left: 188px; }
  main { padding: 27px 23px 0; }
  .topbar { padding: 0 23px; }
  .arena-grid, .lower-grid { grid-template-columns: minmax(0, 1fr) 260px; }
  .metric { padding: 14px 12px; gap: 9px; }
  .metric-foot { left: 54px; }
  .metric-label { font-size: 8px; letter-spacing: .7px; }
  .viewer-shell { height: clamp(320px, calc(100svh - 565px), 520px); }
  .heading-actions .button { padding: 10px 12px; }
  .fighter-name strong { font-size: 12px; }
  .panel-heading { padding: 15px; }
  .watch-intro { align-items: flex-start; flex-direction: column; gap: 13px; padding: 19px; }
  .bots-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .sidebar { width: 72px; padding: 25px 11px; }
  .brand { margin: 0 5px 35px; }
  .brand > span:last-child, .nav-label, .nav-count, .sidebar-note, .local-state div, .lock-icon { display: none; }
  .nav-link { font-size: 0; gap: 0; justify-content: center; padding: 13px 0; }
  .nav-icon { font-size: 21px; }
  .local-state { margin-top: auto; justify-content: center; padding: 10px; }
  .workspace { margin-left: 72px; }
  .arena-grid, .lower-grid { grid-template-columns: minmax(0, 1fr) 240px; }
  h1 { font-size: 37px; }
  .metric-icon { display: none; }
  .metric-foot { left: 13px; }
  .metric { min-height: 90px; }
  .viewer-hint, .coordinate-label { display: none; }
  .fighter-name { gap: 7px; }
  .fighter-name small { font-size: 10px; }
  .versus { min-width: 48px; }
  .fight-scoreboard { padding: 15px; }
  .fight-points { font-size: 25px; }
  .playback { padding: 13px; }
  .playback-actions { flex-wrap: wrap; }
  .playback .camera-button { padding-left: 8px; padding-right: 8px; }
  .watch-options { align-items: flex-start; flex-direction: column; gap: 8px; }
  .arena-footnote .mono, .ranking-explanation .tag { display: none; }
  .ring-bots .bot-label { max-width: 74px; }
  .ranking-explanation { align-items: flex-start; }
}
@media (max-width: 820px) {
  .arena-grid, .lower-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .viewer-shell { height: clamp(380px, 50vh, 510px); }
  .watch-intro { flex-direction: row; align-items: center; }
  .rings-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rings-section-label, .rings-empty { grid-column: 1 / -1; }
  .ring-card { min-height: 112px; border-right: 1px solid #e9e1d5; }
  .ring-card:last-child { border-top: 0; }
  .ring-bots .bot-label { max-width: 130px; }
  .watch-options { align-items: center; flex-direction: row; }
  .viewer-hint { display: block; }
  .lower-grid { margin-top: 18px; }
  .watch-panel.is-theater, body.theater-active .watch-panel { inset: 8px; }
}
@media (min-width: 821px) and (max-height: 820px) {
  .topbar { height: 56px; }
  main { padding-top: 20px; }
  #page-arena > .page-heading { margin-bottom: 17px; min-height: 40px; }
  #page-arena > .page-heading h1 { font-size: 34px; }
  #page-arena > .page-heading .eyebrow, #page-arena > .page-heading p { display: none; }
  .watch-intro { padding-top: 13px; padding-bottom: 13px; }
  .watch-status-copy p { display: none; }
  .fight-scoreboard { min-height: 75px; padding-top: 12px; padding-bottom: 12px; }
  .fighter-name strong { font-size: 12px; }
  .fighter-name small { font-size: 10px; }
  .fight-points { font-size: 26px; }
  .playback { padding-top: 10px; padding-bottom: 10px; gap: 10px; }
}
@media (max-width: 600px) {
  .sidebar { position: static; width: auto; padding: 12px 13px 7px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { margin: 0 0 9px; gap: 9px; font-size: 15px; }
  .brand > span:last-child { display: inline; }
  .brand small { display: none; }
  .brand-mark { width: 29px; height: 29px; font-size: 24px; line-height: 29px; border-radius: 8px; }
  .brand-mark span { font-size: 18px; right: 2px; top: -3px; }
  .sidebar nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
  .nav-link { flex-direction: column; font-size: 9px; line-height: 1.3; gap: 4px; padding: 7px 2px; margin: 0; min-height: 48px; white-space: nowrap; }
  .nav-icon { font-size: 16px; width: auto; }
  .local-state { display: none; }
  .workspace { margin-left: 0; }
  .topbar { display: none; }
  main { padding: 20px 13px 0; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 17px; }
  .eyebrow { font-size: 9px; margin-bottom: 6px; }
  h1 { font-size: 33px; }
  .page-heading p { font-size: 12px; margin-top: 6px; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; min-height: 40px; }
  #page-arena > .page-heading .eyebrow, #page-arena > .page-heading p { display: none; }
  #page-arena > .page-heading h1 { font-size: 29px; letter-spacing: -.9px; }
  #page-arena > .page-heading { margin-bottom: 14px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 18px 0; }
  .metric { min-height: 85px; }
  .metric-foot { font-size: 9px; }
  .metric-label { font-size: 8px; }
  .viewer-shell { height: 360px; }
  .watch-intro { gap: 11px; flex-direction: column; align-items: flex-start; padding: 15px; }
  .watch-status-copy h2 { font-size: 22px; }
  .watch-status-copy p { display: none; }
  .watch-status-copy .eyebrow { font-size: 8px; margin-bottom: 5px; }
  .watch-shortcuts { gap: 7px; }
  .watch-shortcuts .button { min-height: 40px; font-size: 11px; padding: 8px 11px; }
  .viewer-toolbar { padding: 8px 10px; gap: 5px; justify-content: center; }
  .camera-presets { gap: 2px; }
  .camera-button { font-size: 10px; min-height: 40px; padding: 8px 10px; }
  .camera-presets > span, .viewer-zoom-controls > span { display: none; }
  .viewer-zoom-controls .icon-button { width: 36px; height: 40px; }
  .viewer-empty h3 { font-size: 24px; }
  .viewer-empty p { font-size: 12px; }
  .viewer-top, .viewer-bottom { left: 13px; right: 13px; }
  .viewer-bottom { font-size: 9px; }
  .viewer-hint { display: none; }
  .fighter-name strong { font-size: 12px; }
  .fighter-name small { font-size: 10px; }
  .versus { min-width: 39px; font-size: 9px; }
  .versus small { font-size: 8px; }
  .fight-scoreboard { gap: 8px; padding: 14px 12px; min-height: 75px; }
  .fight-points { font-size: 25px; }
  .playback { padding: 13px; gap: 12px; }
  .playback-actions { gap: 5px; }
  .playback-actions .camera-button { padding-left: 7px; padding-right: 7px; }
  .play-button { min-width: 83px; font-size: 11px; }
  .skip-controls { margin: 0; padding-left: 3px; }
  .speed-control { font-size: 0; gap: 0; }
  .playback-timeline { gap: 8px; }
  .play-time { font-size: 10px; }
  .playback select { max-width: 55px; padding: 7px 4px; font-size: 10px; }
  .live-button { padding: 7px 8px; font-size: 10px; }
  .watch-options { align-items: flex-start; flex-direction: column; padding: 11px 13px; font-size: 10px; }
  .fight-detail { font-size: 9px; padding: 10px 13px; }
  .panel-heading { padding: 14px 12px; gap: 8px; }
  .panel-heading h2 { font-size: 14px; }
  .tag, .count-badge { font-size: 8px; }
  .section-title { gap: 7px; }
  .rings-list { grid-template-columns: minmax(0, 1fr); }
  .ring-card { min-height: 106px; padding: 15px; border-right: 0; }
  .ring-card.selected { padding-left: 12px; }
  .ring-bots .bot-label { max-width: 132px; }
  .schedule-row { padding: 14px; gap: 9px; }
  .schedule-names { font-size: 12px; }
  .schedule-names strong { max-width: 110px; }
  .schedule-meta { font-size: 10px; }
  .segmented button { font-size: 9px; padding: 5px 6px; }
  .footer > span:nth-child(2) { display: none; }
  .bots-grid { grid-template-columns: 1fr; }
  .search-field { width: min(250px, 80%); padding: 10px; }
  .library-toolbar .small-text { font-size: 9px; }
  .matchup-selects { gap: 8px; }
  .dialog-heading h2 { font-size: 26px; }
  dialog { padding: 23px; }
  .queue-rules { padding: 14px; }
  .arena-footnote { margin-top: 20px; font-size: 10px; }
  .ranking-explanation { padding: 18px; }
  .ranking-explanation p { font-size: 11px; }
  .watch-panel.is-theater, body.theater-active .watch-panel { inset: 5px; border-radius: 10px; }
  .watch-panel.is-theater .watch-intro, body.theater-active .watch-panel .watch-intro { flex-direction: row; align-items: center; padding: 12px; }
  .watch-panel.is-theater .watch-status-copy h2, body.theater-active .watch-panel .watch-status-copy h2 { font-size: 19px; }
  .watch-panel.is-theater .watch-shortcuts, body.theater-active .watch-panel .watch-shortcuts { display: none; }
  .watch-panel.is-theater .viewer-toolbar, body.theater-active .watch-panel .viewer-toolbar { padding-top: 7px; padding-bottom: 7px; }
  .watch-panel.is-theater .watch-options, body.theater-active .watch-panel .watch-options { display: none; }
  .watch-panel.is-theater .viewer-shell, body.theater-active .watch-panel .viewer-shell { flex-basis: 240px; }
}
@media (max-width: 480px) {
  .sidebar { flex-direction: row; align-items: center; gap: 8px; padding: 9px 10px; }
  .brand { margin: 0; flex-shrink: 0; }
  .brand > span:last-child { display: none; }
  .sidebar nav { flex: 1; min-width: 0; gap: 1px; }
  .nav-link { font-size: 8px; }
  .watch-intro { flex-direction: row; align-items: center; gap: 9px; padding: 10px 12px; }
  .watch-status-copy h2 { font-size: 21px; }
  .watch-status-copy .eyebrow { font-size: 8px; }
  .watch-heading-meta { gap: 6px; margin-bottom: 6px; }
  .watch-heading-meta .tag { font-size: 7px; }
  .watch-shortcuts { flex-direction: column; gap: 5px; }
  .watch-shortcuts .button { min-height: 40px; width: 98px; padding: 8px; font-size: 10px; }
  .viewer-toolbar { flex-wrap: wrap; justify-content: space-between; gap: 4px; padding-left: 9px; padding-right: 9px; }
  .camera-presets [data-camera="corner"], .viewer-zoom-controls #camera-reset { display: none; }
  .camera-button { padding-left: 8px; padding-right: 8px; }
  .viewer-zoom-controls { gap: 3px; }
  .viewer-zoom-controls .icon-button { width: 34px; }
  .viewer-shell { height: clamp(260px, 38svh, 340px); }
}
@media (max-width: 400px) {
  main { padding-left: 10px; padding-right: 10px; }
  .nav-link { font-size: 8px; }
  #page-arena > .page-heading h1 { font-size: 27px; }
  .fighter-name { gap: 5px; }
  .fighter-name strong { font-size: 11px; }
  .fighter-name small { font-size: 9px; }
  .fight-points { font-size: 19px; }
  .fight-scoreboard .fighter-name { flex-wrap: wrap; }
  .fight-scoreboard .fighter-name > div { flex: 1; }
  .fight-scoreboard .fight-points { flex-basis: 100%; text-align: left; }
  .fight-scoreboard .blue-name .fight-points { order: 2; text-align: right; }
  .contact-panel { padding: 13px 12px; }
  .contact-event summary { gap: 7px; font-size: 10px; }
  .playback { padding-left: 9px; padding-right: 9px; }
  .playback-actions { gap: 3px; }
  .playback-actions .camera-button { padding-left: 6px; padding-right: 6px; }
  .play-button { min-width: 76px; padding-left: 9px; padding-right: 9px; }
  .speed-control { margin-left: auto; }
  .versus { min-width: 33px; }
  .versus small { font-size: 7px; }
  .schedule-names strong { max-width: 100px; }
  .watch-mini { font-size: 9px; padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Compatible bot builds share the local match queue. */
.arena-picker{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted,#777);}
.arena-picker[hidden]{display:none;}.arena-picker select{max-width:235px;padding:8px 26px 8px 10px;border:1px solid #ddd8ce;border-radius:8px;background:#fffdf8;color:#3d3a35;font:inherit;}
.arena-context{font-size:13px;color:#777066;margin:0 0 18px;}.bot-family{font-size:12px;color:#8c503c;margin:0 0 12px;}.bot-card h3{overflow-wrap:anywhere;}
@media(max-width:750px){.arena-picker>span{display:none;}.arena-picker select{max-width:175px;}.topbar-right>.text-link{display:none;}}
.bot-card h3{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.35;min-height:2.7em;}

.bot-build-info{font-size:11px;color:var(--muted);margin:-10px 0 12px;}.bot-build-info code{font-size:10px;}

/* Keep the fight central; expose reference information only when requested. */
.nav-divider { height: 1px; margin: 18px 10px; background: var(--border); }
.nav-submit { color: var(--text); font-weight: 600; }
#page-arena > .page-heading { min-height: 42px; margin-bottom: 18px; }
#page-arena > .page-heading h1 { font-size: 32px; }
.watch-intro { padding: 16px 20px; }
.watch-status-copy h2 { font-size: 23px; }
.watch-status-copy { min-width: 0; flex: 1; }
#watch-heading { display: flex; align-items: baseline; gap: 7px; }
.watch-fighter { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-versus { flex-shrink: 0; color: var(--muted); font-size: .65em; }
.watch-shortcuts { flex-shrink: 0; }
.watch-status-copy p:empty { display: none; }
.viewer-shell { height: clamp(280px, calc(100svh - 520px), 600px); }
.viewer-bottom { opacity: 0; transition: opacity .15s; }
.viewer-shell:hover .viewer-bottom, .viewer-shell:focus-within .viewer-bottom { opacity: 1; }
.contact-panel { padding: 0; }
.contact-panel > summary { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; font-size: 12px; font-weight: 600; }
.contact-panel > summary::after { content: '+'; margin-left: 4px; color: var(--muted); }
.contact-panel[open] > summary::after { content: '−'; }
.contact-panel > summary #contact-count { margin-left: auto; font-weight: 400; color: var(--muted); }
.contact-content { padding: 0 20px 18px; }
.contact-legend a { margin-left: auto; }
.arena-more { margin-top: 22px; border-top: 1px solid var(--border); }
.arena-more > summary { padding: 18px 0; font-size: 12px; cursor: pointer; color: var(--muted); }
.arena-more .lower-grid { margin-top: 0; }
.arena-more .arena-footnote { margin-bottom: 10px; }
.ranking-explanation { display: block; padding: 18px 20px; margin-bottom: 18px; }
.ranking-explanation > summary, .queue-rules > summary, .starter-downloads > summary, .bot-build-details > summary { cursor: pointer; font-size: 12px; font-weight: 500; }
.ranking-explanation[open] > summary, .queue-rules[open] > summary, .starter-downloads[open] > summary { margin-bottom: 14px; }
.queue-rules { display: block; }
.bot-build-details { margin: 14px 0; color: var(--muted); }
.bot-build-details .bot-stats { margin-top: 12px; }
.starter-downloads p:empty { display: none; }
.local-state small { margin: 0; }
@media (max-width: 1000px) {
  .watch-intro { flex-direction: row; align-items: center; }
  .viewer-shell { height: clamp(360px, 48svh, 560px); }
}
@media (max-width: 600px) {
  #page-arena > .page-heading { gap: 14px; }
  #page-arena > .page-heading h1 { font-size: 28px; }
  .heading-actions { width: 100%; }
  .heading-actions > * { flex: 1; }
  .watch-intro { align-items: flex-start; gap: 10px; padding: 14px 12px; }
  .watch-status-copy h2 { font-size: 18px; }
  .watch-shortcuts { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .watch-shortcuts .button { font-size: 10px; min-height: 34px; padding: 7px 9px; }
  .viewer-shell { height: 370px; }
  .contact-panel > summary { padding: 14px 12px; }
  .contact-content { padding: 0 12px 14px; }
  .nav-divider { display: none; }
  .topbar { display: flex; justify-content: flex-end; height: auto; min-height: 48px; padding: 8px 13px; }
  .breadcrumb, .topbar-right > .arena-picker, .topbar-right > .engine-status { display: none; }
  .topbar-right { width: 100%; justify-content: flex-end; }
  .account-controls { display: flex; align-items: center; justify-content: flex-end; gap: 12px; width: 100%; }
  .account-controls > span { max-width: 140px; }
  .account-controls .button { min-height: 32px; font-size: 11px; padding: 7px 10px; }
}

/* A challenge is a match, with its rounds kept together. */
.fight-sidebar { display: flex; flex-direction: column; gap: 16px; min-width: 0; align-self: start; }
.match-card { padding: 17px; }
.match-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
.auto-next-label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 10px; color: var(--muted); cursor: pointer; }
.auto-next-label input { accent-color: var(--accent); }
.match-scoreboard { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 9px; margin: 18px 0; }
.match-scoreboard > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; }
.match-scoreboard > span:last-child { text-align: right; }
.match-scoreboard > strong { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.match-rounds { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.match-round { min-width: 0; padding: 11px 5px; border: 1px solid var(--border); border-radius: 7px; background: transparent; text-align: center; }
.match-round strong { display: block; font-size: 11px; }
.match-round span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: var(--muted); margin-top: 6px; }
.match-round.is-current { border-color: var(--accent); background: #f5e8dc; }
.match-round.is-finished:not(.is-current) { background: #eaf0e3; }
.match-round:disabled { opacity: .65; }
.match-progress { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.match-progress p { font-size: 11px; line-height: 1.5; color: var(--muted); }
.match-progress button { align-self: flex-start; font-size: 11px; padding: 0; border: 0; background: none; }
.round-transition { position: absolute; inset: 0; display: grid; place-items: center; background: #f7f5f0b8; padding: 20px; z-index: 5; }
.round-transition-card { position: relative; width: min(100%,360px); text-align: center; padding: 34px 24px 28px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 35px #4d3a2112; }
.round-transition-card > .icon-button { position: absolute; right: 8px; top: 8px; }
.round-transition-card h3 { font: 400 28px/1.3 Georgia,serif; overflow-wrap: anywhere; margin: 12px 0; }
.round-transition-card p { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
@media(max-width:820px) {
  .fight-sidebar { display: contents; }
  #match-card { order: -1; padding: 13px 15px; }
  .match-scoreboard { margin: 10px 0; }
  .match-scoreboard > span { font-size: 12px; }
  .match-progress { margin-top: 10px; flex-direction: row; align-items: center; justify-content: space-between; }
}
