:root {
    color-scheme: light;
    --ink: #17191b;
    --ink-2: #292d30;
    --paper: #f3f4f1;
    --surface: #ffffff;
    --surface-2: #e9ebe7;
    --line: #d4d7d1;
    --line-dark: #aeb3ad;
    --muted: #626862;
    --red: #9f1d2d;
    --red-dark: #761522;
    --red-soft: #f7e8ea;
    --gold: #a77d31;
    --green: #24704b;
    --green-soft: #e7f2eb;
    --amber: #a55f12;
    --amber-soft: #fff0d9;
    --blue: #27658a;
    --blue-soft: #e7f0f6;
    --danger: #b32c2c;
    --shadow: 0 12px 34px rgba(18, 23, 20, .08);
    --font: Inter, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
    --number: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
    --space-1: .25rem;
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --control-min: 3rem;
    --text-xs: .6875rem;
    --text-sm: .8125rem;
    --text-md: 1rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    /* 静态设计稿顶部有 34px 的 .prototype-ribbon；运行时不渲染它，故偏移为 0。 */
    --shell-offset: 0px;
}

* { box-sizing: border-box; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font); font-size: .875rem; line-height: 1.5; letter-spacing: 0; }
button, input, select, textarea { color: inherit; font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd { margin: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(39, 101, 138, .25); outline-offset: 2px; }

.prototype-ribbon { min-height: 34px; padding: 7px 20px; color: #fff; background: var(--red-dark); display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 12px; }
.prototype-ribbon strong { color: #fff; }
.prototype-ribbon nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.prototype-ribbon a { padding: 4px 9px; color: rgba(255,255,255,.72); white-space: nowrap; }
.prototype-ribbon a:hover, .prototype-ribbon a.on { color: #fff; background: rgba(255,255,255,.12); }

.event-bar { min-height: 68px; padding: 10px 24px; color: #fff; background: var(--ink); border-bottom: 3px solid var(--red); display: flex; align-items: center; gap: 20px; }
.event-brand { min-width: 260px; display: flex; align-items: center; gap: 12px; }
.event-brand img { width: 42px; height: 42px; object-fit: contain; }
.event-brand strong, .event-brand small { display: block; }
.event-brand strong { font-size: 15px; }
.event-brand small { margin-top: 2px; color: #aeb3ad; font-size: 10px; }
.event-context { display: flex; align-items: center; gap: 8px; }
.event-context span { padding: 7px 10px; border: 1px solid #474b4e; color: #d7dad7; font-size: 12px; }
.event-account { margin-left: auto; display: flex; align-items: center; gap: 12px; color: #c6cac6; font-size: 12px; }
.event-account form .btn, .registration-top form .btn { min-height: 44px; }
.online { display: inline-flex; align-items: center; gap: 6px; color: #9bd3b2; }
.online::before { width: 7px; height: 7px; border-radius: 50%; background: #50b77c; content: ""; }
.online time { color: currentColor; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.online[data-state="checking"] { color: #e1be7a; }
.online[data-state="checking"]::before { background: #d4a445; }
.online[data-state="disconnected"] { color: #f1a4a4; }
.online[data-state="disconnected"]::before { background: #d45757; }
.language { display: flex; align-items: center; gap: 3px; }
.language button { min-width: 30px; height: 30px; padding: 0; border: 0; color: #8e948e; background: transparent; font-size: 11px; }
.language button.on { color: #fff; border-bottom: 2px solid var(--red); }
.language a { min-width: 30px; height: 30px; padding: 0; border: 0; color: #8e948e; background: transparent; font-size: 11px; display: grid; place-items: center; }
.language a.on { color: #fff; border-bottom: 2px solid var(--red); }

.btn { min-height: 44px; padding: 9px 15px; border: 1px solid var(--line-dark); border-radius: 4px; color: var(--ink); background: var(--surface); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.btn:hover { border-color: var(--ink); }
.btn-primary { border-color: var(--red); color: #fff; background: var(--red); }
.btn-primary:hover { border-color: var(--red-dark); background: var(--red-dark); }
.btn-dark { border-color: var(--ink); color: #fff; background: var(--ink); }
.btn-success { border-color: var(--green); color: #fff; background: var(--green); }
.btn-danger { border-color: var(--danger); color: var(--danger); background: #fff; }
.btn-small { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.btn-icon { width: 44px; padding: 0; font-size: 22px; }
.btn[disabled] { cursor: not-allowed; border-color: var(--line); color: #969b96; background: #eceeeb; }
.file-picker { cursor: pointer; }

.status { display: inline-flex; min-height: 26px; padding: 4px 8px; border-radius: 3px; align-items: center; gap: 6px; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status-green { color: var(--green); background: var(--green-soft); }
.status-red { color: var(--red); background: var(--red-soft); }
.status-amber { color: var(--amber); background: var(--amber-soft); }
.status-blue { color: var(--blue); background: var(--blue-soft); }
.readiness-matrix { min-width: 1040px; }
.readiness-cell { min-width: 116px; display: grid; align-content: start; justify-items: start; gap: 5px; }
.readiness-cell small { color: var(--muted); line-height: 1.35; }
.readiness-cell code { max-width: 150px; overflow-wrap: anywhere; color: var(--danger); font-size: 10px; line-height: 1.25; white-space: normal; }
.readiness-cell .readiness-issue { color: var(--danger); font-size: 11px; }
.eyebrow { display: block; color: var(--red); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.muted { color: var(--muted); }
.number { font-family: var(--number); font-variant-numeric: tabular-nums; }
.divider { height: 1px; background: var(--line); }

.field { display: grid; gap: 6px; min-width: 0; }
.field > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line-dark); border-radius: 3px; background: #fff; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.field-inline { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(70px, 1fr)); gap: 8px; }

.registration-shell { min-height: calc(100vh - var(--shell-offset)); display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.registration-side { color: #fff; background: var(--ink); border-right: 1px solid #323638; display: flex; flex-direction: column; }
.registration-brand { min-height: 94px; padding: 18px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #363a3d; }
.registration-brand img { width: 48px; height: 48px; object-fit: contain; }
.registration-brand strong, .registration-brand small { display: block; }
.registration-brand strong { font-size: 15px; }
.registration-brand small { margin-top: 3px; color: #989e99; font-size: 10px; }
.registration-steps { padding: 22px 14px; display: grid; gap: 5px; }
.registration-steps a { min-height: 54px; padding: 10px 12px; border-left: 3px solid transparent; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; color: #b8bdb8; }
.registration-steps a:hover, .registration-steps a.on { color: #fff; background: #25292b; border-color: var(--red); }
.registration-steps b { width: 25px; height: 25px; border: 1px solid #5f6560; border-radius: 50%; display: grid; place-items: center; font-size: 11px; }
.registration-steps a.done b { border-color: var(--green); color: #fff; background: var(--green); }
.registration-steps small { font-size: 10px; color: #7e847f; }
.side-help { margin-top: auto; padding: 18px 20px; border-top: 1px solid #363a3d; color: #909690; font-size: 11px; }
.registration-main { min-width: 0; }
.registration-top { min-height: 66px; padding: 10px 28px; border-bottom: 1px solid var(--line); background: #fff; display: flex; align-items: center; gap: 12px; }
.registration-top strong { font-size: 13px; }
.registration-top .language { margin-left: auto; }
.registration-top .language button.on { color: var(--ink); }
.registration-top .language a.on { color: var(--ink); }
.registration-mobile-menu-button, .registration-mobile-menu-backdrop, .registration-mobile-menu { display: none; }
.registration-mobile-menu-button { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-dark); border-radius: 4px; color: var(--ink); background: #fff; place-items: center; cursor: pointer; }
.registration-mobile-menu-button .icon { width: 23px; height: 23px; }
.registration-mobile-menu-backdrop[hidden], .registration-mobile-menu[hidden] { display: none; }
.registration-content { width: min(100%, 1360px); margin: 0 auto; padding: 30px 30px 70px; }
.page-title { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.page-title h1 { margin-top: 4px; font-size: 30px; line-height: 1.25; }
.page-title p { margin-top: 7px; color: var(--muted); }
.registration-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.content-stack { display: grid; gap: 26px; }
.content-section { min-width: 0; padding: 0 0 24px; border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-head h2 { font-size: 18px; }
.section-head p { color: var(--muted); font-size: 12px; }
.team-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: #fff; }
.team-facts div { min-height: 72px; padding: 13px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.team-facts div:nth-child(3n) { border-right: 0; }
.team-facts div:nth-last-child(-n+3) { border-bottom: 0; }
.team-facts dt { color: var(--muted); font-size: 10px; }
.team-facts dd { margin-top: 5px; font-weight: 700; }
.data-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); background: #fff; }
.data-table th { height: 38px; padding: 8px 11px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; white-space: nowrap; }
.data-table td { min-height: 58px; padding: 11px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td strong, .data-table td small { display: block; }
.data-table td small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.members-table { min-width: 920px; table-layout: fixed; }
.members-table th:nth-child(1) { width: 16%; }
.members-table th:nth-child(2) { width: 7%; }
.members-table th:nth-child(3) { width: 11%; }
.members-table th:nth-child(4) { width: 11%; }
.members-table th:nth-child(5) { width: 22%; }
.members-table th:nth-child(6) { width: 21%; }
.members-table th:nth-child(7) { width: 12%; }
.members-table td { vertical-align: top; }
.member-gender-cell { font-size: 14px; font-weight: 700; }
.member-age-cell strong { font-size: 15px; }
.members-table .member-age-cell small { margin-top: 4px; font-size: 12px; white-space: nowrap; }
.member-entry-content > strong { font-size: 14px; }
.member-entry-list { margin-top: 7px; display: block; color: var(--ink-2); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.member-fee-lines { display: grid; gap: 7px; }
.member-fee-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.member-fee-line span { color: var(--ink-2); font-size: 12px; line-height: 1.4; }
.member-fee-line strong { color: var(--red); font-size: 13px; white-space: nowrap; }
.members-table .member-actions { display: table-cell; text-align: right; white-space: nowrap; }
.member-action-buttons { display: flex; justify-content: flex-end; gap: 6px; }
.member-action-buttons form { margin: 0; }
.member-action-buttons .btn { min-height: 44px; }
.fee-expression { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; white-space: nowrap; }
.fee-expression b { color: var(--red); }
.overview-team-section { border-top: 4px solid var(--ink); padding-top: 17px; }
.fee-column { position: sticky; top: 18px; display: grid; gap: 14px; }
.fee-side { position: static; border-top: 4px solid var(--ink); background: #fff; box-shadow: var(--shadow); }
.fee-side > header { padding: 17px 18px; border-bottom: 1px solid var(--line); }
.fee-side > header h2 { font-size: 17px; }
.fee-lines { padding: 6px 18px; }
.fee-line { min-height: 52px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.fee-line span, .fee-line small { display: block; }
.fee-line small { color: var(--muted); font-size: 10px; }
.fee-total { padding: 18px; color: #fff; background: var(--ink); display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.fee-total span { color: #babfba; font-size: 11px; }
.fee-total strong { color: #fff; font: 700 30px/1 var(--number); }
.registration-submit-action { display: block; }
.registration-submit-action .btn { width: 100%; }
.registration-submit-state { display: block; color: var(--muted); font-size: 11px; }

.workspace { min-height: calc(100vh - var(--shell-offset)); background: var(--paper); }
.workspace-main { width: min(100%, 1540px); margin: 0 auto; padding: 24px 26px 50px; }
.workspace-title { margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.workspace-title h1 { margin-top: 3px; font-size: 27px; }
.workspace-title-actions { display: flex; align-items: center; gap: 8px; }
.assignment-banner { min-height: 52px; margin-bottom: 18px; padding: 10px 14px; border: 1px solid #c9d9e3; border-left: 4px solid var(--blue); background: var(--blue-soft); display: flex; align-items: center; gap: 14px; }
.assignment-banner strong { color: var(--blue); }
.assignment-banner .status { margin-left: auto; }

.competitor-strip { min-height: 88px; margin-bottom: 16px; padding: 13px 17px; color: #fff; background: var(--ink); border-left: 5px solid var(--red); display: grid; grid-template-columns: auto minmax(0, 1fr) repeat(3, auto); align-items: center; gap: 20px; }
.bib { min-width: 112px; font: 800 46px/1 var(--number); }
.competitor-strip h2 { font-size: 20px; }
.competitor-strip p { margin-top: 4px; color: #adb2ad; font-size: 12px; }
.strip-metric { padding-left: 18px; border-left: 1px solid #43484a; }
.strip-metric span, .strip-metric strong { display: block; }
.strip-metric span { color: #939993; font-size: 10px; }
.strip-metric strong { margin-top: 3px; font: 700 18px var(--number); }

.judge-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; align-items: start; }
.judge-panel { min-width: 0; border: 1px solid var(--line); background: #fff; }
.judge-panel-head { min-height: 58px; padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.judge-panel-head h2 { font-size: 16px; }
.judge-panel-head small { color: var(--muted); }
.segment { display: inline-flex; border: 1px solid var(--line-dark); border-radius: 4px; overflow: hidden; }
.segment button, .segment a { min-height: 36px; padding: 7px 12px; border: 0; border-right: 1px solid var(--line-dark); background: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.segment button:last-child, .segment a:last-child { border-right: 0; }
.segment button.on, .segment a.on { color: #fff; background: var(--ink); }
.routine-list { max-height: calc(100vh - 348px); padding: 10px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); align-content: start; gap: 8px; background: var(--surface-2); }
.routine-row { min-width: 0; min-height: 94px; border: 1px solid var(--line); background: #fff; display: grid; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: minmax(46px, auto) auto; align-items: center; }
.routine-row.is-marked { border-color: var(--red); box-shadow: inset 0 3px var(--red); background: var(--red-soft); }
.step-no { width: 30px; height: 30px; margin-left: 8px; background: var(--surface-2); display: grid; place-items: center; font: 800 13px var(--number); }
.routine-row.is-marked .step-no { color: #fff; background: var(--red); }
.routine-name { min-width: 0; padding: 7px 8px 7px 3px; }
.routine-name strong { display: block; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.code-buttons { grid-column: 1 / -1; min-height: 47px; padding: 6px 8px; border-top: 1px solid var(--line); background: rgba(255,255,255,.72); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 5px; }
.code-option { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 3.25rem; gap: .3rem; align-items: stretch; }
.code-mark { min-width: 0; cursor: pointer; }
.code-occurrence { min-width: 0; display: grid; grid-template-rows: auto 1fr; gap: .1rem; align-items: center; color: var(--muted); font-size: var(--text-xs); font-weight: 700; }
.code-occurrence input { width: 100%; min-width: 0; min-height: 2.2rem; padding: .25rem; border: 1px solid var(--line-dark); text-align: center; font: 700 var(--text-sm) var(--number); }
.code-button { width: 100%; min-width: 0; min-height: 38px; padding: 5px 8px; border: 1px solid var(--line-dark); border-radius: 3px; background: #fff; font-size: 11px; font-weight: 800; }
.code-button.on { border-color: var(--red); color: #fff; background: var(--red); }
.judge-side { position: sticky; top: 16px; display: grid; gap: 12px; }
.selected-errors { border: 1px solid var(--line); background: #fff; }
.selected-errors header { padding: 13px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.selected-errors header span { color: var(--red); font-weight: 800; }
.error-list { min-height: 170px; padding: 5px 14px; }
.error-item { min-height: 48px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.error-item:last-child { border-bottom: 0; }
.error-item small { color: var(--muted); }
.error-item b { color: var(--red); }
.submit-panel { padding: 14px; border: 1px solid var(--line); background: #fff; }
.save-state { margin-bottom: 10px; color: var(--green); font-size: 11px; }
.submit-panel .btn { width: 100%; min-height: 50px; }
.submit-panel p { margin-top: 8px; color: var(--muted); font-size: 10px; text-align: center; }

.b-score-layout { min-height: 520px; padding: 24px; display: grid; grid-template-columns: minmax(300px, .8fr) minmax(340px, 1.2fr); gap: 34px; align-items: center; }
.level-reference { display: grid; gap: 9px; }
.level { min-height: 82px; padding: 13px 15px; border: 1px solid var(--line); display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 15px; }
.level.on { border-color: var(--gold); box-shadow: inset 4px 0 var(--gold); }
.level strong { font: 800 24px var(--number); }
.level span { display: block; font-weight: 700; }
.level small { color: var(--muted); }
.score-entry { text-align: center; }
.score-entry label { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.score-input-row { margin: 16px 0; display: grid; grid-template-columns: 58px minmax(180px, 280px) 58px; justify-content: center; gap: 10px; }
.score-input-row input { width: 100%; min-width: 0; height: 82px; border: 2px solid var(--ink); text-align: center; font: 800 48px var(--number); }
.score-input-row button { border: 1px solid var(--line-dark); background: #fff; font-size: 28px; }
.score-scale { width: min(100%, 420px); margin: 0 auto 24px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.score-scale button { min-height: 40px; border: 1px solid var(--line); background: var(--surface-2); font: 700 13px var(--number); }
.score-entry .btn { width: min(100%, 420px); min-height: 54px; }
.score-entry p { margin-top: 10px; color: var(--muted); font-size: 11px; }

.head-layout { padding: 16px; display: grid; gap: 14px; }
.head-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); }
.head-summary div { min-height: 80px; padding: 12px 14px; border-right: 1px solid var(--line); }
.head-summary div:last-child { border-right: 0; }
.head-summary span, .head-summary strong { display: block; }
.head-summary span { color: var(--muted); font-size: 10px; }
.head-summary strong { margin-top: 7px; font: 800 26px var(--number); }
.submission-matrix { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.submission { min-height: 78px; padding: 10px; border: 1px solid var(--line); background: #fff; }
.submission strong, .submission small, .submission b { display: block; }
.submission strong { font-size: 11px; }
.submission b { margin-top: 5px; font: 800 23px var(--number); }
.submission small { color: var(--muted); font-size: 10px; }
.head-actions { padding: 14px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

.checkin-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; }
.group-rail { border: 1px solid var(--line); background: #fff; }
.group-rail header { padding: 14px; border-bottom: 1px solid var(--line); }
.group-link { min-height: 72px; padding: 11px 13px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.group-link:last-child { border-bottom: 0; }
.group-link.on { color: #fff; background: var(--ink); box-shadow: inset 4px 0 var(--red); }
.group-link strong, .group-link small { display: block; }
.group-link small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.group-link.on small { color: #aeb3ad; }
.checkin-board { min-width: 0; }
.checkpoint-tabs { margin-bottom: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-dark); background: #fff; }
.checkpoint { min-height: 54px; padding: 8px 12px; border: 0; border-right: 1px solid var(--line); background: #fff; text-align: left; }
.checkpoint:last-child { border-right: 0; }
.checkpoint.on { color: #fff; background: var(--ink); }
.checkpoint strong, .checkpoint small { display: block; }
.checkpoint small { color: var(--muted); font-size: 10px; }
.checkpoint.on small { color: #b8bdb8; }
.checkin-table td:first-child { width: 90px; }
.checkin-bib { font: 800 27px var(--number); }
.inspection { display: flex; gap: 6px; flex-wrap: wrap; }
.inspection button { min-height: 34px; padding: 6px 9px; border: 1px solid var(--line-dark); border-radius: 3px; background: #fff; font-size: 11px; }
.inspection button.checked { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.inspection label { cursor: pointer; }
.inspection label span, .inspection > span { min-height: 34px; padding: 6px 9px; border: 1px solid var(--line-dark); border-radius: 3px; background: #fff; display: inline-flex; align-items: center; font-size: 11px; }
.inspection label input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.inspection label span.checked, .inspection > span.checked { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.attendance-switch { display: inline-flex; border: 1px solid var(--line-dark); border-radius: 3px; overflow: hidden; }
.attendance-switch button { min-width: 58px; min-height: 36px; border: 0; background: #fff; font-size: 11px; font-weight: 800; }
.attendance-switch button.on { color: #fff; background: var(--green); }
.attendance-switch button.absent.on { background: var(--danger); }
.checkin-confirm { margin-top: 12px; padding: 12px 14px; border: 1px solid #e4b6b6; border-left: 4px solid var(--danger); background: var(--red-soft); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.checkin-confirm[hidden] { display: none; }
.checkin-confirm strong { display: block; margin-top: 2px; }
.checkin-confirm-actions { display: flex; align-items: center; gap: 8px; }
.checkin-action-cell { padding: 8px !important; }
.checkin-inline-form { display: grid; grid-template-columns: minmax(190px, 1fr) auto minmax(120px, .7fr); align-items: center; gap: 10px; }
.checkin-note-input { width: 100%; min-height: 36px; }
.checkin-metrics { width: min(260px, 100%); margin: 0; grid-template-columns: repeat(2, 1fr); }
.checkin-metrics .metric { min-height: 66px; padding: 8px 12px; }
.checkin-metrics .metric strong { font-size: 22px; }
.checkin-entry-add { margin-bottom: 12px; padding: 12px; }
.checkin-entry-add summary, .timing-correction summary { cursor: pointer; font-weight: 800; }
.checkin-entry-add form, .timing-correction form { margin-top: 12px; }

.field-stage { display: grid; grid-template-columns: 280px minmax(420px, 1fr) 300px; gap: 16px; align-items: stretch; }
.queue-card { min-height: 470px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; }
.queue-card > header { min-height: 62px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.queue-card > header span { color: var(--muted); font-size: 10px; font-weight: 800; }
.queue-card > header h2 { margin-top: 3px; font-size: 17px; }
.queue-person { padding: 20px 16px; text-align: center; }
.queue-person .bib { min-width: 0; font-size: 58px; color: var(--red); }
.queue-person h3 { margin-top: 8px; font-size: 18px; }
.queue-person p { margin-top: 3px; color: var(--muted); }
.queue-facts { margin-top: auto; border-top: 1px solid var(--line); }
.queue-facts div { min-height: 46px; padding: 9px 13px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.queue-facts div:last-child { border-bottom: 0; }
.queue-facts span { color: var(--muted); font-size: 11px; }
.current-card { color: #fff; background: var(--ink); border-color: var(--ink); }
.current-card > header { border-color: #3e4245; }
.current-card > header span { color: #abb0ab; }
.current-card .queue-person .bib { color: #fff; font-size: 82px; }
.current-card .queue-person p { color: #abb0ab; }
.flow-state { margin: 4px 18px 20px; display: grid; grid-template-columns: repeat(3, 1fr); }
.flow-state div { position: relative; padding-top: 24px; color: #7f8580; text-align: center; font-size: 10px; }
.flow-state div::before { position: absolute; top: 7px; left: 50%; width: 10px; height: 10px; border: 2px solid #646a65; border-radius: 50%; background: var(--ink); transform: translateX(-50%); content: ""; z-index: 2; }
.flow-state div + div::after { position: absolute; top: 12px; right: 50%; width: 100%; height: 1px; background: #555b56; content: ""; }
.flow-state div.done { color: #8ed1aa; }
.flow-state div.done::before { border-color: #4eaf77; background: #4eaf77; }
.control-actions { margin-top: auto; padding: 16px; border-top: 1px solid #3e4245; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.control-actions .btn { min-height: 54px; }
.control-actions .btn:first-child { grid-column: 1/-1; }
.gate-note { margin: 0 16px 14px; padding: 10px; color: #eed79f; background: #3a3427; border-left: 3px solid var(--gold); font-size: 11px; }
.on-deck-actions { padding: 14px; margin-top: auto; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.on-deck-actions .btn { width: 100%; }
.queue-card form { width: 100%; }
.current-card .field > span { color: #abb0ab; }
.current-card input { color: var(--ink); background: #fff; }
.field-verify-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.field-stop-control { margin: 10px 14px 14px; }
.field-stop-control summary { cursor: pointer; font-size: 11px; font-weight: 800; }
.field-stop-control form { margin-top: 10px; display: grid; gap: 8px; }
.field-empty { margin: auto; padding: 24px; color: var(--muted); text-align: center; }

.display-page { min-height: 100vh; color: #fff; background: #111416; display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.display-page .prototype-ribbon { background: #272b2d; }
.display-top { min-height: 116px; padding: 18px 34px; border-bottom: 3px solid var(--red); display: flex; align-items: center; gap: 22px; }
.display-top img { width: 68px; height: 68px; object-fit: contain; }
.display-event-title h1 { font-size: 29px; }
.display-event-title p { margin-top: 5px; color: #aeb4af; }
.display-venue { margin-left: auto; text-align: right; }
.display-venue strong { display: block; font: 800 30px var(--number); }
.display-venue span { color: #aeb4af; font-size: 11px; }
.display-clock { min-width: 104px; padding-left: 22px; border-left: 1px solid #43484b; font: 800 25px var(--number); text-align: right; }
.display-status-line { min-height: 38px; padding: 7px 34px; color: #aeb4af; background: #1e2224; display: flex; align-items: center; justify-content: space-between; font-size: 11px; }
.display-modes { display: flex; gap: 4px; }
.display-modes button, .display-modes a { min-height: 28px; padding: 4px 10px; border: 0; color: #9fa49f; background: transparent; display: grid; place-items: center; }
.display-modes button.on, .display-modes a.on { color: #fff; background: var(--red); }
.display-grid { min-height: 0; padding: 18px 28px 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.display-card { min-width: 0; min-height: 0; border: 1px solid #444a46; background: #f7f8f5; color: var(--ink); display: flex; flex-direction: column; overflow: hidden; }
.display-card > header { min-height: 96px; padding: 15px 17px; color: #fff; background: #292d30; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.display-card.current { border: 2px solid var(--red); }
.display-card.current > header { background: var(--red); }
.display-card > header span { display: block; color: #c9ceca; font-size: 11px; font-weight: 800; }
.display-card > header h2 { margin-top: 4px; font-size: 18px; }
.display-card > header time { font: 800 31px var(--number); }
.display-list { min-height: 0; overflow-y: auto; }
.display-row { min-height: 61px; padding: 10px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; }
.display-row:last-child { border-bottom: 0; }
.display-row b { font: 800 26px var(--number); }
.display-row strong { font: 800 21px var(--number); }
.display-row span { color: var(--muted); font-size: 11px; }
.display-row .result { color: var(--red); font: 800 25px var(--number); }

.admin-shell { min-height: calc(100vh - var(--shell-offset)); display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.admin-side { min-width: 0; max-width: 100%; color: #fff; background: var(--ink); }
.admin-side .registration-brand { min-height: 76px; }
.admin-nav { min-width: 0; max-width: 100%; padding: 12px 10px; display: grid; gap: 3px; }
.admin-nav a { min-height: 42px; padding: 9px 12px; border-left: 3px solid transparent; color: #afb4af; display: flex; align-items: center; justify-content: space-between; }
.admin-nav a:hover, .admin-nav a.on { color: #fff; background: #25292b; border-color: var(--red); }
.admin-nav small { color: #727872; }
.admin-main { width: 100%; min-width: 0; max-width: 100%; }
.admin-top { min-height: 62px; padding: 10px 24px; border-bottom: 1px solid var(--line); background: #fff; display: flex; align-items: center; gap: 12px; }
.admin-top .event-account { color: var(--muted); }
.admin-mobile-menu-button, .admin-mobile-menu-backdrop, .admin-mobile-menu { display: none; }
.admin-mobile-menu-button { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-dark); border-radius: 4px; color: var(--ink); background: #fff; place-items: center; cursor: pointer; }
.admin-mobile-menu-button .icon { width: 23px; height: 23px; }
.admin-mobile-menu-backdrop[hidden], .admin-mobile-menu[hidden] { display: none; }
.admin-content { width: min(100%, 1500px); margin: 0 auto; padding: 25px 28px 60px; }
.metric-row { margin-bottom: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: #fff; }
.metric { min-height: 94px; padding: 15px 17px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric span, .metric strong, .metric small { display: block; }
.metric span { color: var(--muted); font-size: 10px; }
.metric strong { margin-top: 5px; font: 800 30px var(--number); }
.metric small { color: var(--muted); }
.schedule-capacity-summary { margin: 0 0 18px; border: 1px solid var(--line); background: #fff; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(260px, 1.5fr); }
.schedule-capacity-metric { min-height: 82px; padding: 12px 15px; border-right: 1px solid var(--line); }
.schedule-capacity-metric span, .schedule-capacity-metric strong, .schedule-capacity-metric small { display: block; }
.schedule-capacity-metric span { color: var(--muted); font-size: 10px; }
.schedule-capacity-metric strong { margin-top: 4px; font: 800 24px var(--number); }
.schedule-capacity-metric small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.schedule-capacity-status { min-height: 82px; padding: 12px 15px; display: flex; flex-direction: column; justify-content: center; gap: 4px; border-left: 3px solid var(--green); background: var(--green-soft); }
.schedule-capacity-status.is-short { border-left-color: var(--danger); background: var(--red-soft); }
.schedule-capacity-status strong { font-size: 13px; }
.schedule-capacity-status small { color: var(--muted); line-height: 1.45; }
.venue-matrix { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; }
.venue-board { min-height: 280px; border: 1px solid var(--line); background: #fff; }
.venue-board > header { padding: 12px 14px; border-top: 4px solid var(--ink); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.venue-board.is-live > header { border-top-color: var(--red); }
.venue-board h2 { font-size: 16px; }
.venue-now { padding: 16px 14px; border-bottom: 1px solid var(--line); }
.venue-now .bib { min-width: 0; color: var(--red); font-size: 38px; }
.venue-now strong, .venue-now small { display: block; }
.venue-now small { margin-top: 3px; color: var(--muted); }
.venue-progress { padding: 12px 14px; }
.progress-line { height: 7px; margin: 7px 0 5px; background: var(--surface-2); overflow: hidden; }
.progress-line i { display: block; width: var(--progress, 50%); height: 100%; background: var(--green); }
.venue-flags { padding: 0 14px 14px; display: flex; gap: 5px; flex-wrap: wrap; }
.exceptions { margin-top: 22px; border: 1px solid var(--line); background: #fff; }
.exceptions > header { padding: 13px 15px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }

.process-bar { margin-bottom: 18px; border: 1px solid var(--line); background: #fff; display: grid; grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr)); }
.process-step { position: relative; min-height: 58px; padding: 10px 12px 10px 44px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.process-step:last-child { border-right: 0; }
.process-step::before { position: absolute; left: 12px; width: 23px; height: 23px; border: 1px solid var(--line-dark); border-radius: 50%; display: grid; place-items: center; color: var(--muted); content: attr(data-step); font: 800 11px var(--number); }
.process-step strong, .process-step small { display: block; }
.process-step strong { font-size: 12px; }
.process-step small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.process-step.done::before { border-color: var(--green); color: #fff; background: var(--green); content: "✓"; }
.process-step.current { box-shadow: inset 0 -3px var(--red); }
.process-step.current::before { border-color: var(--red); color: #fff; background: var(--red); }

.workflow-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.workflow-stack { display: grid; gap: 16px; }
.timing-workspace-clock { padding: 46px 20px; text-align: center; }
.timing-workspace-clock .number { display: block; font-size: 84px; line-height: 1; }
.timing-workspace-clock p { margin-top: 12px; }
.timing-primary-action { width: 100%; min-height: 64px; }
.panel-footer form { width: 100%; }
.panel { min-width: 0; border: 1px solid var(--line); background: #fff; }
.panel > header, .panel-head { min-height: 56px; padding: 11px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel > header.panel-filter { flex-wrap: wrap; }
.panel > header h2, .panel-head h2 { font-size: 16px; }
.panel > header p, .panel-head p { margin-top: 2px; color: var(--muted); font-size: 11px; }
.panel-body { padding: 16px; }
.panel-footer { padding: 13px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.panel-footer .footer-state { margin-right: auto; color: var(--muted); font-size: 11px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }
.field-note { color: var(--muted); font-size: 10px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { min-height: 78px; padding: 12px 14px; border: 1px solid var(--line); background: #fff; display: flex; align-items: flex-start; gap: 10px; text-align: left; }
.choice.on { border-color: var(--red); box-shadow: inset 4px 0 var(--red); }
.choice[hidden], .package-contact-notice[hidden] { display: none; }
.package-contact-notice { grid-column: 1 / -1; }
.choice input[type="checkbox"], .choice input[type="radio"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 0;
    margin: 3px 0 0;
    padding: 0;
    flex: 0 0 18px;
}
.choice strong, .choice small { display: block; }
.choice small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.member-role-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.member-role-choice { min-height: 54px; padding: 10px 12px; align-items: center; }
.member-role-choice input[type="checkbox"] { margin-top: 0; }
.member-role-choice strong { font-size: 13px; line-height: 1.35; }

.responsibility-consent-area { display: flex; justify-content: flex-start; padding: 20px; }
.responsibility-consent-option {
    width: min(100%, 780px);
    min-height: 72px;
    margin: 0;
    padding: 15px 18px;
    border: 1px solid var(--line);
    background: #faf9f6;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    text-align: left;
    cursor: pointer;
}
.responsibility-consent-option:hover { border-color: #a99c8a; background: #fff; }
.responsibility-consent-option:focus-within { outline: 2px solid rgba(123, 23, 34, .18); outline-offset: 2px; }
.responsibility-consent-option:has(input:checked) { border-color: var(--red); box-shadow: inset 4px 0 var(--red); background: #fff; }
.responsibility-consent-option input[type="checkbox"] {
    width: 20px;
    min-width: 20px;
    height: 20px;
    min-height: 0;
    margin: 0;
    padding: 0;
    accent-color: var(--red);
}
.responsibility-consent-option strong { min-width: 0; line-height: 1.6; font-size: 13px; font-weight: 700; }
.responsibility-statement-copy { max-width: 860px; line-height: 1.9; }
.responsibility-statement-copy p { margin: 0 0 14px; }
.responsibility-statement-copy p:last-child { margin-bottom: 0; }

.summary-list { display: grid; }
.summary-row { min-height: 50px; padding: 9px 13px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.summary-row:last-child { border-bottom: 0; }
.summary-row span, .summary-row small { display: block; }
.summary-row small { color: var(--muted); font-size: 10px; }
.summary-row strong { text-align: right; }

.task-list { display: grid; }
.draw-order-list { gap: var(--space-2); }
.draw-details { display: grid; gap: var(--space-4); margin-top: var(--space-5); }
.draw-result { margin: 0; padding: var(--space-3); border: 1px solid var(--line); background: var(--surface); }
.draw-result h3 { margin: 0 0 var(--space-3); }
.task-row { min-height: 68px; padding: 11px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.task-row:last-child { border-bottom: 0; }
.task-row .task-index { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font: 800 13px var(--number); }
.task-row strong, .task-row small { display: block; }
.task-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.task-actions { display: flex; align-items: center; gap: 6px; }
.result-version-tabs { flex-wrap: wrap; margin: 0 0 1rem; }

.notice { padding: 11px 13px; border-left: 4px solid var(--blue); background: var(--blue-soft); color: #244e68; }
.notice.warning { border-left-color: var(--amber); color: #72450f; background: var(--amber-soft); }
.notice.danger { border-left-color: var(--danger); color: #7b2424; background: var(--red-soft); }
.notice strong, .notice small { display: block; }
.notice small { margin-top: 3px; }

.routine-picker { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.routine-groups { display: grid; gap: 8px; }
.routine-group { border: 1px solid var(--line); background: #fff; }
.routine-group summary { min-height: 48px; padding: 10px 13px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-weight: 800; }
.routine-group summary::marker { content: ""; }
.routine-group summary span { color: var(--muted); font-size: 11px; font-weight: 600; }
.routine-category-body { border-top: 1px solid var(--line); }
.routine-search { min-height: 3.5rem; padding: var(--space-2) var(--space-3); background: var(--surface-2); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); }
.routine-search span, .routine-search b { color: var(--muted); font-size: var(--text-xs); }
.routine-search input { width: 100%; min-width: 0; min-height: 2.5rem; padding: .5rem .625rem; border: 1px solid var(--line-dark); background: #fff; }
.routine-options { max-height: 24rem; padding: 0; border-top: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; }
.routine-option { min-height: 56px; padding: 0; border-bottom: 1px solid var(--line); cursor: default; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 0; }
.routine-option[hidden] { display: none; }
.routine-option:last-child { border-bottom: 0; }
.routine-option strong, .routine-option small { display: block; }
.routine-option small { color: var(--muted); font-size: 10px; }
.routine-option.is-selected { background: var(--green-soft); box-shadow: inset 3px 0 var(--green); }
.routine-check { min-width: 0; min-height: 56px; margin: 0; padding: 9px 13px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.routine-check input[type="checkbox"] { width: 20px; min-width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; flex: 0 0 20px; accent-color: var(--green); }
.routine-check span { min-width: 0; display: flex; align-items: center; gap: 10px; line-height: 1.45; }
.routine-check b { min-width: 44px; color: var(--red); }
.routine-custom { width: min(30rem, 100%); min-width: 22rem; margin: 0; padding: 9px 13px 9px 0; align-self: center; display: grid; gap: 6px; }
.routine-custom-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.routine-custom-list { min-width: 0; display: grid; gap: 6px; }
.routine-custom-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px; }
.routine-custom-row input { width: 100%; min-width: 0; }
.routine-custom-row .btn-icon { flex: 0 0 44px; }
.routine-custom-row .btn[hidden] { display: none; }
.routine-custom-remove { color: var(--danger); }
.routine-code { display: inline-block; min-width: 42px; margin-right: 7px; color: var(--red); font: 800 11px var(--number); }
.selected-routines { position: sticky; top: 14px; border-top: 4px solid var(--ink); background: #fff; }
.athlete-picker { position: relative; width: min(100%, 34rem); margin-bottom: 16px; }
.athlete-picker .field { margin: 0; }
.athlete-picker-options { position: absolute; z-index: 20; top: calc(100% - 18px); left: 0; right: 0; max-height: 19rem; overflow-y: auto; border: 1px solid var(--line-dark); background: #fff; box-shadow: var(--shadow); }
.athlete-picker-options button { width: 100%; min-height: 58px; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; text-align: left; cursor: pointer; }
.athlete-picker-options button:hover, .athlete-picker-options button:focus { background: var(--surface-2); outline: 0; }
.athlete-picker-options button:last-of-type { border-bottom: 0; }
.athlete-picker-options span, .athlete-picker-options strong, .athlete-picker-options small { display: block; }
.athlete-picker-options small, .athlete-picker-status { color: var(--muted); font-size: 10px; }
.athlete-picker-options b { color: var(--red); font-size: 11px; white-space: nowrap; }
.athlete-picker-empty { padding: 18px 12px; color: var(--muted); text-align: center; }
.athlete-picker-status { display: block; margin-top: 5px; }
[data-team-region="local"] [data-overseas-only], [data-team-region="overseas"] [data-local-only] { display: none !important; }

.judge-workspace-main { padding: var(--space-4) var(--space-5) var(--space-5); }
.judge-page-title { min-height: 3rem; margin-bottom: var(--space-3); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.judge-page-title h1 { margin-top: .125rem; font-size: var(--text-xl); line-height: 1.2; }
.judge-workspace .competitor-strip { min-height: 4.5rem; margin-bottom: var(--space-3); padding: .625rem var(--space-4); grid-template-columns: auto minmax(0, 1fr) repeat(2, auto); gap: var(--space-4); }
.judge-workspace .competitor-strip .bib { min-width: 6rem; font-size: 2.5rem; }
.judge-workspace .competitor-strip h2 { font-size: var(--text-md); }
.judge-layout-primary { height: calc(100dvh - 17.5rem); min-height: 30rem; display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: var(--space-3); align-items: stretch; }
.judge-action-panel { min-height: 0; display: flex; flex-direction: column; }
.judge-action-panel .judge-panel-head { min-height: 3.25rem; padding: .5rem .75rem; }
.judge-action-panel .routine-list { min-height: 0; max-height: none; flex: 1; padding: var(--space-2); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.judge-action-panel .routine-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.judge-action-panel .routine-row { min-height: 7rem; grid-template-columns: 2.5rem minmax(0, 1fr); grid-template-rows: minmax(2.75rem, auto) auto; align-content: start; }
.judge-action-panel .routine-name { padding: .5rem .5rem .5rem .125rem; }
.judge-action-panel .routine-name strong { font-size: var(--text-sm); }
.judge-action-panel .routine-name small { display: block; margin-top: .125rem; color: var(--muted); font-size: var(--text-xs); }
.judge-action-panel .code-buttons { min-height: 3.75rem; padding: .375rem .5rem; gap: .375rem; }
.judge-action-panel .code-button { min-height: var(--control-min); font-size: var(--text-sm); }
.code-buttons label { min-width: 0; }
.code-buttons .code-mark { cursor: pointer; }
.code-buttons .code-occurrence { cursor: default; }
.code-buttons label input:checked + .code-button { border-color: var(--red); color: #fff; background: var(--red); }
.code-buttons label input:focus-visible + .code-button { outline: 2px solid var(--red); outline-offset: 2px; }
.code-button b, .code-button small { display: block; overflow-wrap: anywhere; }
.code-button small { margin-top: .125rem; font-size: var(--text-xs); font-weight: 500; }
.routine-row:has(.code-buttons input:checked) { border-color: var(--red); box-shadow: inset 0 3px var(--red); background: var(--red-soft); }
.routine-row:has(.code-buttons input:checked) .step-no { color: #fff; background: var(--red); }
.code-empty { grid-column: 1 / -1; min-height: var(--control-min); color: var(--muted); display: grid; place-items: center; font-size: var(--text-xs); }
.judge-action-footer { min-width: 0; position: static; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: var(--space-2); }
.selected-errors { min-width: 0; border: 1px solid var(--line); background: #fff; }
.selected-errors summary { min-height: 3.25rem; padding: .625rem .75rem; border-bottom: 1px solid var(--line); cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.selected-errors summary::-webkit-details-marker { display: none; }
.selected-errors summary span { color: var(--red); font-weight: 800; }
.selected-errors .error-list { min-height: 0; max-height: 18rem; padding: .25rem .75rem; overflow-y: auto; }
.judge-action-footer .submit-panel { padding: var(--space-2); }
.judge-action-footer .save-state { margin-bottom: var(--space-2); font-size: var(--text-xs); }
.judge-action-footer .btn { min-height: 3.25rem; }
.score-history-panel { margin-top: var(--space-3); }
.score-history-panel .data-table { min-width: 58rem; }
.judge-b-panel, .judge-head-panel { min-height: calc(100dvh - 16rem); }
.judge-b-panel .b-score-layout { min-height: calc(100dvh - 20rem); }
.judge-score-note { width: min(100%, 420px); margin: 0 auto 12px; text-align: left; }
.judge-score-note textarea, .judge-score-note input { width: 100%; }
.field-search-inline { display: flex; align-items: end; gap: var(--space-2); }
.field-search-inline .field { min-width: 16rem; }
.head-correction summary { list-style: none; cursor: pointer; }
.head-correction summary::-webkit-details-marker { display: none; }
.head-correction-form { margin-top: var(--space-2); display: grid; grid-template-columns: repeat(2, minmax(10rem, 1fr)) auto; align-items: end; gap: var(--space-2); }
.paper-recovery-control { margin: var(--space-3); padding: var(--space-3); border: 1px solid var(--line); background: var(--surface-2); }
.paper-recovery-control summary { cursor: pointer; font-weight: 800; }

.auth-shell { min-height: calc(100vh - var(--shell-offset)); padding: 42px 20px; background: var(--ink); display: grid; place-items: center; }
.auth-frame { width: min(100%, 940px); display: grid; grid-template-columns: minmax(0, 1fr) 390px; border: 1px solid #454a4c; background: #fff; box-shadow: var(--shadow); }
.auth-context { min-height: 520px; padding: 38px; color: #fff; background: #202426; display: flex; flex-direction: column; }
.auth-context img { width: 72px; height: 72px; }
.auth-context h1 { margin-top: 28px; font-size: 31px; }
.auth-context p { margin-top: 8px; color: #b1b6b1; }
.auth-context .context-status, .auth-context .auth-meta { margin-top: auto; padding-top: 24px; border-top: 1px solid #44494b; color: #b1b6b1; }
.auth-card { padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.auth-card h2 { font-size: 24px; }
.auth-card > p { margin-top: 5px; color: var(--muted); }
.auth-form { margin-top: 24px; display: grid; gap: 14px; }
.auth-form .btn { width: 100%; min-height: 50px; margin-top: 4px; }
.role-tabs { margin-bottom: 20px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-dark); }
.role-tabs-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.role-tabs button { min-height: 48px; border: 0; border-right: 1px solid var(--line); background: #fff; font-weight: 700; }
.role-tabs button:last-child { border-right: 0; }
.role-tabs button.on { color: #fff; background: var(--ink); }
.role-tabs a { min-height: 48px; border-right: 1px solid var(--line); background: #fff; font-weight: 700; display: grid; place-items: center; }
.role-tabs a:last-child { border-right: 0; }
.role-tabs a.on { color: #fff; background: var(--ink); }
.admin-registration-tabs { margin: 0; display: flex; overflow-x: auto; }
.admin-registration-tabs button { flex: 1 0 auto; min-width: 6rem; }

.venue-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.venue-choice { min-height: 150px; padding: 16px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; }
.venue-choice:hover, .venue-choice.on { border-color: var(--red); box-shadow: inset 0 4px var(--red); }
.venue-choice strong { font-size: 20px; }
.venue-choice span { margin-top: 4px; color: var(--muted); }
.venue-choice small { margin-top: auto; padding-top: 18px; color: var(--muted); }

.audit-timeline { display: grid; }
.audit-item { position: relative; min-height: 76px; margin-left: 18px; padding: 12px 14px 12px 28px; border-left: 1px solid var(--line-dark); }
.audit-item::before { position: absolute; top: 18px; left: -6px; width: 11px; height: 11px; border-radius: 50%; background: var(--green); content: ""; }
.audit-item.warning::before { background: var(--amber); }
.audit-item strong, .audit-item span, .audit-item small { display: block; }
.audit-item span { margin-top: 3px; }
.audit-item small { color: var(--muted); }

.launcher { min-height: 100vh; color: #fff; background: var(--ink); }
.launcher-main { width: min(100%, 1280px); margin: 0 auto; padding: 52px 28px 80px; }
.launcher-head { min-height: 180px; display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; border-bottom: 1px solid #3d4244; }
.launcher-head img { width: 92px; height: 92px; object-fit: contain; }
.launcher-head h1 { margin-top: 16px; font-size: 39px; }
.launcher-head p { margin-top: 9px; max-width: 620px; color: #aeb3ae; font-size: 15px; }
.launcher-version { padding: 8px 10px; border: 1px solid #525759; color: #b9beb9; font-size: 11px; }
.launcher-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.launcher-card { min-height: 188px; padding: 20px; border: 1px solid #424749; background: #222628; display: flex; flex-direction: column; }
.launcher-card:hover { border-color: var(--red); background: #292d30; }
.launcher-card span { color: #d09c4c; font: 800 13px var(--number); }
.launcher-card h2 { margin-top: 17px; font-size: 21px; }
.launcher-card p { margin-top: 7px; color: #9fa59f; font-size: 12px; }
.launcher-card strong { margin-top: auto; padding-top: 24px; color: #fff; }

.design-directory { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.directory-group { min-width: 0; border: 1px solid #424749; background: #222628; }
.directory-group.directory-wide { grid-column: 1 / -1; }
.directory-group > header { min-height: 82px; padding: 16px 18px; border-bottom: 1px solid #424749; display: flex; align-items: center; gap: 14px; }
.directory-group > header > span { width: 36px; height: 36px; border: 1px solid #6a5a3c; color: #d09c4c; display: grid; place-items: center; font: 800 13px var(--number); }
.directory-group h2 { font-size: 19px; }
.directory-group p { margin-top: 3px; color: #9fa59f; font-size: 11px; }
.directory-links { padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.directory-wide .directory-links { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.directory-links a { min-height: 40px; padding: 8px 10px; border: 1px solid #3a3f41; color: #d9ddd9; background: #292d30; display: flex; align-items: center; }
.directory-links a:hover { border-color: var(--red); color: #fff; background: #303537; }

[data-panel] { display: none; }
[data-panel].on { display: block; }

.admin-registration-review { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); }
.review-action-bar { flex-wrap: wrap; }
.review-action-bar form, .certificate-actions form { width: auto; }
.fee-review-table th:nth-child(n+2), .fee-review-table td:nth-child(n+2) { width: 8.5rem; text-align: right; }
.fee-member-review-table { min-width: 760px; }
.fee-member-review-table th:last-child, .fee-member-review-table td:last-child { width: 8.5rem; text-align: right; }
.money-input { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; border: 1px solid var(--line-dark); border-radius: 3px; overflow: hidden; background: #fff; }
.money-input b { padding: 0 11px; color: var(--muted); }
.money-input input { border: 0; border-left: 1px solid var(--line); border-radius: 0; }
.fee-adjustment-history { padding: 0 16px 14px; display: grid; gap: 8px; }
.fee-adjustment-history > strong { color: var(--muted); font-size: 11px; }
.fee-adjustment-history > div { padding-top: 8px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.fee-adjustment-history small { color: var(--muted); }

.app-dialog { width: min(720px, calc(100vw - 32px)); max-height: min(82vh, 760px); padding: 0; border: 1px solid var(--line-dark); border-radius: 4px; color: var(--ink); background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .25); }
.app-dialog::backdrop { background: rgba(18, 22, 20, .62); }
.app-dialog > form > header, .app-dialog > form > footer { min-height: 60px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
.app-dialog > form > header { border-bottom: 1px solid var(--line); justify-content: space-between; }
.app-dialog > form > header h2 { font-size: 17px; }
.app-dialog > form > footer { border-top: 1px solid var(--line); justify-content: flex-end; }
.dialog-body { max-height: calc(82vh - 122px); overflow-y: auto; padding: 14px; }
.review-field-list { display: grid; gap: 8px; }
.review-field-row { min-height: 58px; padding: 9px 10px; border: 1px solid var(--line); display: grid; grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.2fr); align-items: center; gap: 12px; }
.review-field-row > span { display: flex; align-items: center; gap: 8px; }
.review-field-row input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--red); }
.review-field-row > input { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line-dark); }

.venue-schedule-table { min-width: 1120px; table-layout: fixed; }
.venue-schedule-table th:nth-child(1) { width: 60px; }
.venue-schedule-table th:nth-child(2) { width: 96px; }
.venue-schedule-table th:nth-child(3) { width: 88px; }
.venue-schedule-table th:nth-child(4) { width: 130px; }
.venue-schedule-table th:nth-child(5) { width: 235px; }
.venue-schedule-table th:nth-child(6) { width: 92px; white-space: nowrap; }
.venue-schedule-table th:nth-child(7) { width: 125px; }
.venue-schedule-table th:nth-child(8) { width: 100px; }
.venue-schedule-table th:nth-child(9) { width: 194px; }
.venue-schedule-table .schedule-athlete-count strong { white-space: nowrap; }
.schedule-order-input { width: 54px; min-height: 38px; padding: 6px; border: 1px solid var(--line-dark); text-align: center; }
.schedule-duration { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.schedule-duration-input { width: 64px; min-height: 38px; padding: 6px; border: 1px solid var(--line-dark); text-align: right; }
.schedule-row-actions { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.schedule-row-actions select { min-width: 96px; min-height: 38px; padding: 6px 28px 6px 8px; border: 1px solid var(--line-dark); }

.settings-control-grid { padding: 16px; display: grid; gap: 14px 16px; align-items: end; }
.settings-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.settings-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.settings-control-grid .field > span { min-height: 2.1em; display: flex; align-items: flex-end; }
.settings-subsection { padding: 15px 16px; border-bottom: 1px solid var(--line); }
.settings-subsection:last-child { border-bottom: 0; }
.settings-subsection > h3 { margin-bottom: 11px; font-size: 13px; }
.settings-subsection .settings-control-grid { padding: 0; }

.routine-review-layout { display: grid; grid-template-columns: minmax(230px, 280px) minmax(0, 1fr); align-items: start; gap: 18px; }
.routine-review-side { position: sticky; top: 16px; }
.routine-progress-panel .summary-row { min-height: 44px; }
.routine-progress-panel .summary-row strong { font-size: 15px; }
.routine-missing-ranges { grid-template-columns: 1fr; align-items: start; }
.routine-missing-ranges strong { text-align: left; overflow-wrap: anywhere; }
.routine-information-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.routine-step-list { max-height: 720px; overflow-y: auto; }
.routine-step { border-bottom: 1px solid var(--line); }
.routine-step:last-child { border-bottom: 0; }
.routine-step > summary { min-height: 50px; padding: 9px 13px; cursor: pointer; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.routine-step > summary b { width: 30px; height: 30px; background: var(--surface-2); display: grid; place-items: center; }
.routine-step > summary small { color: var(--muted); }
.routine-step .form-card { padding: 14px; border-top: 1px solid var(--line); }

.certificate-scope-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.certificate-template-layout { grid-template-columns: 300px minmax(0, 1fr); }
.certificate-current-scope { align-self: start; }
.certificate-current-scope .panel-body { padding: 14px; }
.settings-publish-action { display: flex; justify-content: flex-end; }
.certificate-template-versions { margin-top: 18px; }
.certificate-template-versions .data-table { min-width: 820px; }
.certificate-actions { flex-wrap: wrap; }
.certificate-actions .btn { min-width: 108px; white-space: nowrap; }

@media (min-width: 701px) and (max-width: 1180px) {
    .prototype-ribbon { min-height: 40px; padding: 6px 14px; gap: 10px; }
    .prototype-ribbon a { padding: 5px 8px; }
    .btn { min-height: 44px; }
    .btn-small { min-height: 36px; }

    .event-bar { min-height: 66px; padding: 9px 18px; gap: 14px; }
    .event-brand { min-width: 190px; }
    .event-context { display: none; }
    .event-account { gap: 9px; white-space: nowrap; }
    .workspace-main { padding: 20px 20px 44px; }
    .workspace-title { margin-bottom: 16px; }
    .workspace-title h1 { font-size: 25px; }
    .assignment-banner { margin-bottom: 14px; }

    .registration-shell { min-height: calc(100vh - var(--shell-offset)); grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); align-content: start; }
    .registration-side { min-height: 74px; height: 74px; display: grid; grid-template-columns: 190px minmax(0, 1fr); align-self: start; border-right: 0; border-bottom: 1px solid #323638; }
    .registration-brand { min-height: 74px; padding: 12px 16px; border-bottom: 0; border-right: 1px solid #363a3d; }
    .registration-brand img { width: 40px; height: 40px; }
    .registration-steps { min-height: 74px; height: 74px; padding: 0; grid-template-columns: repeat(var(--registration-step-count, 4), minmax(0, 1fr)); grid-auto-rows: 74px; align-self: start; gap: 0; }
    .registration-steps a { min-height: 74px; height: 74px; padding: 10px 9px; border-left: 0; border-bottom: 3px solid transparent; grid-template-columns: 26px minmax(0, 1fr); gap: 5px; }
    .registration-steps a:hover, .registration-steps a.on { border-color: var(--red); }
    .registration-steps small { grid-column: 2; }
    .side-help { display: none; }
    .registration-top { min-height: 62px; padding: 9px 20px; }
    .registration-content { padding: 24px 22px 56px; }
    .page-title { margin-bottom: 20px; }
    .registration-grid { grid-template-columns: minmax(0, 1fr) 270px; gap: 20px; }
    .content-stack { gap: 22px; }
    .data-table th { padding: 8px; }
    .data-table td { padding: 9px 8px; }
    .fee-column { top: 14px; }
    .fee-side { box-shadow: 0 8px 24px rgba(18, 23, 20, .07); }

    .judge-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 14px; }
    .routine-list { max-height: calc(100vh - 330px); grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
    .routine-row { min-height: 96px; }
    .code-button { min-height: 40px; }
    .judge-side { top: 14px; gap: 10px; }
    .error-list { min-height: 120px; }
    .b-score-layout { min-height: 0; padding: 20px; grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.1fr); gap: 18px; }
    .level { min-height: 78px; padding: 11px 13px; grid-template-columns: 82px 1fr; gap: 12px; }
    .level strong { font-size: 21px; }
    .score-input-row { grid-template-columns: 56px minmax(180px, 260px) 56px; }
    .head-layout { padding: 14px; }

    .checkin-layout { grid-template-columns: 1fr; gap: 14px; }
    .group-rail { display: flex; overflow-x: auto; overscroll-behavior-inline: contain; }
    .group-rail header { min-width: 150px; }
    .group-link { min-width: 198px; min-height: 66px; border-right: 1px solid var(--line); border-bottom: 0; }
    .checkpoint { min-height: 58px; }
    .inspection button { min-height: 38px; }
    .attendance-switch button { min-height: 40px; }

    .field-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .queue-card { min-height: 340px; }
    .field-stage .current-card { min-height: 410px; grid-column: 1 / -1; grid-row: 1; }
    .field-stage .previous { grid-row: 2; }
    .field-stage .on-deck { grid-row: 2; }
    .current-card .queue-person { padding: 16px; }
    .current-card .queue-person .bib { font-size: 72px; }
    .flow-state { margin-bottom: 14px; }

    .display-page { height: 100vh; min-height: 640px; display: grid; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; }
    .display-top { min-height: 90px; padding: 13px 22px; gap: 16px; }
    .display-top img { width: 52px; height: 52px; }
    .display-event-title h1 { font-size: 23px; }
    .display-venue strong { font-size: 25px; }
    .display-clock { min-width: 92px; padding-left: 16px; font-size: 21px; }
    .display-status-line { min-height: 40px; padding: 6px 22px; }
    .display-grid { min-height: 0; padding: 14px 18px 18px; gap: 12px; }
    .display-card { min-height: 0; max-height: none; }
    .display-card > header { min-height: 74px; padding: 11px 13px; }
    .display-card > header h2 { font-size: 15px; }
    .display-card > header time { font-size: 25px; }
    .display-row { min-height: 52px; padding: 8px 12px; grid-template-columns: 36px 1fr auto; }
    .display-row b { font-size: 21px; }
    .display-row strong { font-size: 18px; }

    .admin-shell { width: 100%; min-height: calc(100vh - var(--shell-offset)); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
    .admin-side { display: block; border-bottom: 1px solid #323638; }
    .admin-side .registration-brand { display: none; }
    .admin-nav { width: 100%; min-width: 0; max-width: 100%; padding: 7px 9px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: stretch; gap: 3px; overflow: visible; }
    .admin-nav a { min-width: 0; min-height: 48px; padding: 8px 6px; border-left: 0; border-bottom: 3px solid transparent; justify-content: center; text-align: center; line-height: 1.25; white-space: normal; }
    .admin-nav a:hover, .admin-nav a.on { border-color: var(--red); }
    .admin-top { min-height: 60px; padding: 9px 20px; }
    .admin-content { padding: 22px 22px 50px; }
    .metric-row { margin-bottom: 16px; }
    .metric { min-height: 84px; padding: 12px 14px; }
    .metric strong { font-size: 27px; }
    .venue-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

    .workflow-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; }
    .certificate-template-layout { grid-template-columns: 270px minmax(0, 1fr); }
    .routine-picker { grid-template-columns: minmax(0, 1fr) 250px; gap: 14px; }
    .auth-shell { padding: 24px 20px; }
    .auth-frame { width: min(100%, 760px); grid-template-columns: 1fr; }
    .auth-context { min-height: 150px; padding: 22px 28px; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 18px; }
    .auth-context img { width: 58px; height: 58px; }
    .auth-context h1 { margin-top: 3px; font-size: 25px; }
    .auth-context p { margin-top: 4px; font-size: 12px; }
    .auth-context .context-status, .auth-context .auth-meta { margin-top: 0; padding: 0 0 0 22px; border-top: 0; border-left: 1px solid #44494b; text-align: right; }
    .auth-card { min-height: 360px; padding: 30px 48px; }
    .auth-form { width: 100%; max-width: 520px; }
    .auth-form .btn { min-height: 52px; }
    .role-tabs button { min-height: 48px; }

    .launcher-main { padding: 38px 22px 70px; }
    .launcher-head { min-height: 164px; }
    .launcher-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .launcher-card { min-height: 172px; }
    .directory-wide .directory-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 901px) and (max-width: 1180px) {
    .display-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); grid-template-rows: repeat(2, minmax(0, 1fr)); }
    .display-card.current { grid-row: 1 / -1; }
}

@media (min-width: 701px) and (max-width: 900px) {
    .registration-side { min-height: 66px; height: 66px; grid-template-columns: 1fr; }
    .registration-side .registration-brand { display: none; }
    .registration-steps { min-height: 66px; height: 66px; grid-auto-rows: 66px; }
    .registration-steps a { min-height: 66px; height: 66px; }
    .registration-steps small { display: none; }
    .registration-grid { grid-template-columns: 1fr; }
    .fee-column { position: static; }
    .team-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-facts div:nth-child(n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .team-facts div:nth-child(2n) { border-right: 0; }
    .team-facts div:nth-last-child(-n+2) { border-bottom: 0; }

    .event-brand { min-width: 175px; }
    .event-account > span:not(.online) { display: none; }
    .judge-layout { grid-template-columns: minmax(0, 1fr) 220px; }
    .routine-list { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
    .judge-panel-head { padding: 10px 12px; }
    .b-score-layout { padding: 16px; grid-template-columns: minmax(245px, .9fr) minmax(300px, 1.1fr); gap: 14px; }
    .submission-matrix { gap: 5px; }
    .submission { padding: 8px; }

    .metric-row { grid-template-columns: repeat(2, 1fr); }
    .metric:nth-child(2) { border-right: 0; }
    .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .admin-side { display: block; }
    .admin-side .registration-brand { display: none; }
    .admin-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .exceptions .data-table, .exceptions .data-table tbody, .exceptions .data-table tr, .exceptions .data-table td { display: block; width: 100%; }
    .exceptions .data-table thead { display: none; }
    .exceptions .data-table tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .exceptions .data-table tr { padding: 12px; border-right: 1px solid var(--line); }
    .exceptions .data-table tr:nth-child(2n) { border-right: 0; }
    .exceptions .data-table td { min-height: 0; padding: 4px 0; border: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; }
    .exceptions .data-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; }

    .workflow-layout { grid-template-columns: 1fr; }
    .routine-picker { grid-template-columns: minmax(0, 1fr) 230px; }
    .auth-frame { width: min(100%, 680px); }
    .auth-context { padding: 20px 24px; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 15px; }
    .auth-context img { width: 54px; height: 54px; }
    .auth-context .context-status, .auth-context .auth-meta { padding-left: 16px; }
    .auth-card { padding: 28px 42px; }

    .display-page { height: auto; min-height: 100vh; overflow: visible; display: block; }
    .display-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .display-card.current { grid-column: 1 / -1; }
    .display-card { max-height: 430px; }
}

@media (max-width: 700px) {
    body { font-size: 13px; }
    .prototype-ribbon { padding: 7px 10px; justify-content: flex-start; overflow: hidden; }
    .prototype-ribbon > strong { display: none; }
    .prototype-ribbon nav { overflow-x: auto; }
    .event-bar { min-height: 58px; padding: 8px 12px; }
    .event-brand { min-width: 0; flex: 1; }
    .event-brand img { width: 35px; height: 35px; }
    .event-brand strong { font-size: 12px; }
    .event-context { display: none; }
    .event-brand small, .event-account > span:not(.online), .event-account .language { display: none; }
    body.registration-menu-open { overflow: hidden; }
    .registration-shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); }
    .registration-side { display: none; }
    .registration-top { min-height: 58px; padding: 7px 12px; position: sticky; top: 0; z-index: 32; }
    .registration-top > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .registration-top .language { display: none; }
    .registration-top .registration-desktop-logout { display: none; }
    .registration-mobile-menu-button { margin-left: auto; flex: 0 0 44px; display: grid; }
    .registration-mobile-menu-backdrop { position: fixed; inset: 0; z-index: 48; display: block; background: rgba(18, 22, 20, .56); }
    .registration-mobile-menu { width: min(88vw, 340px); height: 100dvh; position: fixed; inset: 0 0 0 auto; z-index: 49; color: #fff; background: var(--ink); display: flex; flex-direction: column; box-shadow: -12px 0 32px rgba(0, 0, 0, .2); }
    .registration-mobile-menu > header { min-height: 64px; padding: 10px 12px 10px 18px; border-bottom: 1px solid #363a3d; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .registration-mobile-menu > header strong { font-size: 15px; }
    .registration-mobile-menu > header button { width: 44px; height: 44px; padding: 0; border: 0; color: #fff; background: transparent; display: grid; place-items: center; cursor: pointer; }
    .registration-mobile-menu > header .icon { width: 23px; height: 23px; }
    .registration-mobile-steps { padding: 10px; display: grid; gap: 4px; overflow-y: auto; }
    .registration-mobile-steps a { min-height: 60px; padding: 9px 11px; border-left: 3px solid transparent; color: #b8bdb8; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
    .registration-mobile-steps a.on { border-color: var(--red); color: #fff; background: #25292b; }
    .registration-mobile-steps b { width: 27px; height: 27px; border: 1px solid #5f6560; border-radius: 50%; display: grid; place-items: center; font-size: 11px; }
    .registration-mobile-steps a.done b { border-color: var(--green); color: #fff; background: var(--green); }
    .registration-mobile-steps small { color: #7e847f; font-size: 10px; white-space: nowrap; }
    .registration-mobile-menu > footer { margin-top: auto; padding: 14px; border-top: 1px solid #363a3d; }
    .registration-mobile-menu > footer .btn { width: 100%; color: #fff; border-color: #5f6560; background: #25292b; }
    .registration-content, .workspace-main, .admin-content { padding: 20px 12px 54px; }
    .registration-grid { grid-template-columns: 1fr; }
    .fee-column { position: static; }
    .page-title, .workspace-title { align-items: flex-start; flex-direction: column; }
    .page-title h1, .workspace-title h1 { font-size: 23px; }
    .page-title .btn, .workspace-title-actions { width: 100%; }
    .workspace-title-actions .btn { flex: 1; }
    .team-facts { grid-template-columns: 1fr 1fr; }
    .team-facts div:nth-child(n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .team-facts div:nth-child(2n) { border-right: 0; }
    .team-facts div:last-child { border-bottom: 0; }
    .team-facts div:nth-last-child(2) { border-bottom: 0; }
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
    .venue-schedule-table { min-width: 0; table-layout: auto; }
    .data-table thead { display: none; }
    .data-table tr { padding: 12px; border-bottom: 1px solid var(--line); }
    .data-table tr:last-child { border-bottom: 0; }
    .data-table td { min-height: 0; padding: 5px 0; border: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
    .data-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; }
    .data-table td:first-child { display: block; }
    .data-table td:first-child::before { display: none; }
    .fee-expression { justify-content: flex-end; }
    .competitor-strip { position: sticky; top: 0; z-index: 10; margin: 0 -12px 12px; padding: 10px 12px; grid-template-columns: auto 1fr auto; gap: 10px; }
    .competitor-strip .bib { min-width: 78px; font-size: 36px; }
    .competitor-strip h2 { font-size: 14px; }
    .strip-metric { display: none; }
    .competitor-strip .strip-metric:last-child { display: block; padding-left: 10px; }
    .assignment-banner { align-items: flex-start; flex-direction: column; }
    .assignment-banner .status { margin-left: 0; }
    .judge-layout { grid-template-columns: 1fr; }
    .judge-side { position: static; }
    .routine-list { max-height: none; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
    .judge-side { grid-template-columns: 1fr; }
    .judge-panel-head { align-items: flex-start; flex-direction: column; }
    .judge-panel-head .segment { width: 100%; }
    .judge-panel-head .segment button { flex: 1; }
    .b-score-layout { min-height: 0; padding: 14px; grid-template-columns: 1fr; gap: 20px; }
    .level { min-height: 66px; grid-template-columns: 76px 1fr; }
    .score-input-row { grid-template-columns: 48px minmax(150px, 1fr) 48px; }
    .score-input-row input { height: 70px; font-size: 40px; }
    .head-summary { grid-template-columns: 1fr 1fr; }
    .head-summary div:nth-child(2) { border-right: 0; }
    .head-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .submission-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .head-actions { flex-direction: column; }
    .head-actions .btn { width: 100%; }
    .checkin-layout { grid-template-columns: 1fr; }
    .group-rail { display: flex; overflow-x: auto; }
    .group-rail header { display: none; }
    .group-link { min-width: 185px; }
    .checkpoint-tabs { overflow-x: auto; grid-template-columns: repeat(3, minmax(140px, 1fr)); }
    .checkin-table td:first-child { width: auto; }
    .inspection { justify-content: flex-end; }
    .field-stage { grid-template-columns: 1fr; }
    .queue-card { min-height: 300px; }
    .current-card { grid-row: 1; }
    .field-stage .previous { grid-row: 2; }
    .field-stage .on-deck { grid-row: 3; }
    .control-actions { grid-template-columns: 1fr; }
    .control-actions .btn:first-child { grid-column: auto; }
    .display-page { min-height: 100vh; display: block; overflow: visible; }
    .display-top { min-height: 92px; padding: 12px; gap: 10px; }
    .display-top img { width: 46px; height: 46px; }
    .display-event-title h1 { font-size: 17px; }
    .display-event-title p { font-size: 10px; }
    .display-venue strong { font-size: 19px; }
    .display-clock { display: none; }
    .display-status-line { padding: 6px 12px; align-items: flex-start; flex-direction: column-reverse; gap: 5px; }
    .display-modes { width: 100%; }
    .display-modes button { flex: 1; }
    .display-grid { padding: 10px; grid-template-columns: 1fr; }
    .display-card { max-height: 520px; }
    .display-card > header { min-height: 80px; padding: 11px 12px; }
    .display-card > header h2 { font-size: 14px; }
    .display-card > header time { font-size: 24px; }
    .display-row { min-height: 55px; padding: 8px 12px; grid-template-columns: 34px 1fr auto; }
    .display-row b { font-size: 20px; }
    .display-row strong { font-size: 18px; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side { display: none; }
    .admin-top .event-account .online { display: none; }
    .metric-row { grid-template-columns: 1fr 1fr; }
    .metric { min-height: 78px; padding: 11px; }
    .metric:nth-child(2) { border-right: 0; }
    .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .metric strong { font-size: 24px; }
    .schedule-capacity-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .schedule-capacity-metric { min-height: 76px; padding: 10px 11px; }
    .schedule-capacity-metric:nth-child(2) { border-right: 0; }
    .schedule-capacity-metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .schedule-capacity-status { grid-column: 1 / -1; min-height: 86px; padding: 11px; }
    .venue-matrix { grid-template-columns: 1fr; }
    .launcher-main { padding: 26px 14px 60px; }
    .launcher-head { min-height: 220px; flex-direction: column; }
    .launcher-head img { width: 70px; height: 70px; }
    .launcher-head h1 { font-size: 29px; }
    .launcher-version { align-self: flex-start; }
    .launcher-grid { grid-template-columns: 1fr; }
    .design-directory { grid-template-columns: 1fr; }
    .directory-group.directory-wide { grid-column: auto; }
    .directory-links, .directory-wide .directory-links { grid-template-columns: 1fr; }

    .process-bar { display: flex; overflow-x: auto; }
    .process-step { min-width: 168px; border-bottom: 0; }
    .workflow-layout, .routine-picker { grid-template-columns: 1fr; }
    .form-grid, .form-grid.cols-3, .choice-grid, .choice-grid.cols-3, .venue-grid { grid-template-columns: 1fr; }
    .member-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .selected-routines { position: static; }
    .task-row { grid-template-columns: auto minmax(0, 1fr); }
    .task-actions { grid-column: 2; justify-content: flex-start; }
    .panel-footer { align-items: stretch; flex-direction: column; }
    .panel-footer .footer-state { margin-right: 0; }
    .panel-footer .btn { width: 100%; }
    .responsibility-consent-area { padding: 14px; }
    .responsibility-consent-option { min-height: 68px; padding: 13px 14px; gap: 11px; }
    .panel > header.panel-filter { align-items: stretch; flex-direction: column; }
    .panel-filter > .task-actions { width: 100%; flex-wrap: wrap; }
    .panel-filter > .field { width: 100%; min-width: 0 !important; }
    .auth-shell { min-height: calc(100vh - var(--shell-offset)); padding: 0; background: #fff; place-items: start center; }
    .auth-frame { width: 100%; min-height: calc(100vh - var(--shell-offset)); grid-template-columns: 1fr; border: 0; box-shadow: none; }
    .auth-context { min-height: 142px; padding: 20px; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 12px; }
    .auth-context img { width: 48px; height: 48px; }
    .auth-context h1 { margin-top: 2px; font-size: 22px; }
    .auth-context > div:not(.auth-meta) > p { display: none; }
    .auth-context .context-status, .auth-context .auth-meta { grid-column: 1 / -1; margin-top: 2px; padding-top: 11px; border-top: 1px solid #44494b; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
    .auth-context .auth-meta p { margin-top: 0; font-size: 10px; }
    .auth-card { min-height: 0; padding: 26px 20px 42px; justify-content: flex-start; }
    .auth-card h2 { font-size: 22px; }
    .auth-form { max-width: none; margin-top: 20px; gap: 13px; }
    .auth-form .btn { min-height: 52px; }
    .role-tabs { grid-template-columns: 1fr; }
    .role-tabs button { border-right: 0; border-bottom: 1px solid var(--line); }
    .role-tabs button:last-child { border-bottom: 0; }
    .role-tabs-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .role-tabs-two button { border-right: 1px solid var(--line); border-bottom: 0; }
    .role-tabs-two button:last-child { border-right: 0; }
    .checkin-confirm { align-items: stretch; flex-direction: column; }
    .checkin-confirm-actions .btn { flex: 1; }
}

.compact-field { min-width: 12rem; }
.field-entry-stage { grid-template-columns: minmax(20rem, 45rem); justify-content: center; }
.order-book-task-row { display: block; padding: 0; }
.order-book-task-row > summary { min-height: 4rem; padding: .75rem 1rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem; cursor: pointer; list-style: none; }
.order-book-task-row > summary::-webkit-details-marker { display: none; }
.order-book-task-row[data-disabled="1"] > summary { opacity: .7; }
.order-book-task-row .task-editor { padding: 1rem; border-top: 1px solid var(--line); background: var(--paper); }
.order-book-task-row .task-actions { margin-top: .75rem; }
.panel-summary { min-height: 4rem; padding: .875rem 1rem; cursor: pointer; list-style: none; }
.panel-summary::-webkit-details-marker { display: none; }
.panel-summary span { display: grid; gap: .2rem; }
.panel-summary small { color: var(--muted); font-weight: 400; }
.order-book-settings-panel { margin-top: 1.125rem; }
.admin-grid.two { margin-top: 1.125rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.125rem; align-items: start; }
.order-book-admin-preview { overflow: auto; padding: 1rem; border: 1px solid var(--line); background: #dfe1df; }
.order-book-admin-preview .order-book-document { margin-inline: auto; }

@media (min-width: 701px) and (max-width: 1180px) and (orientation: portrait) {
    .judge-workspace-main { padding: var(--space-3) var(--space-4) var(--space-4); }
    .judge-page-title { min-height: 2.75rem; margin-bottom: var(--space-2); }
    .judge-workspace .competitor-strip { min-height: 4rem; margin-bottom: var(--space-2); }
    .judge-layout-primary { height: calc(100dvh - 15.5rem); min-height: 34rem; grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: var(--space-2); }
    .judge-action-panel .routine-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .judge-action-footer { position: relative; top: auto; z-index: 20; grid-template-columns: minmax(0, 1fr) 13rem; grid-template-rows: auto; align-items: stretch; }
    .selected-errors { position: relative; }
    .selected-errors summary { height: 100%; border-bottom: 0; }
    .selected-errors[open] .error-list { position: absolute; right: 0; bottom: calc(100% + .375rem); left: 0; z-index: 30; max-height: 12rem; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
    .judge-action-footer .submit-panel { display: grid; place-items: stretch; }
    .judge-action-footer .save-state { display: none; }
    .judge-b-panel .b-score-layout { min-height: 0; padding: var(--space-4); grid-template-columns: 1fr; gap: var(--space-4); align-content: start; }
    .judge-b-panel .level-reference { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .judge-b-panel .level { min-height: 6.5rem; grid-template-columns: 1fr; gap: var(--space-2); }
}

@media (min-width: 701px) and (max-width: 980px) {
    .admin-registration-review, .certificate-template-layout { grid-template-columns: 1fr; }
    .settings-grid-3, .settings-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .routine-review-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 12px; }
    .routine-information-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .members-table, .members-table tbody { width: 100%; min-width: 0; display: block; }
    .members-table thead { display: none; }
    .members-table tr { padding: 10px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
    .members-table tr:last-child { border-bottom: 0; }
    .members-table td { width: auto; min-width: 0; padding: 7px 9px; border: 0; display: block; }
    .members-table td::before { content: attr(data-label); margin-bottom: 4px; display: block; color: var(--muted); font-size: 10px; font-weight: 700; }
    .members-table .member-name-cell { grid-column: span 2; }
    .members-table .member-role-cell { grid-column: span 1; }
    .members-table .member-entry-cell { grid-column: span 3; }
    .members-table .member-fee-cell { grid-column: span 3; }
    .members-table .member-actions { grid-column: span 1; align-self: end; display: flex; justify-content: flex-end; }
    .members-table .member-actions::before { display: none; }
}

@media (max-width: 700px) {
    body.admin-menu-open { overflow: hidden; }
    .admin-top { min-height: 58px; padding: 7px 12px; position: sticky; top: 0; z-index: 32; }
    .admin-top > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .admin-top .admin-desktop-account { display: none; }
    .admin-mobile-menu-button { flex: 0 0 44px; display: grid; }
    .admin-mobile-menu-backdrop { position: fixed; inset: 0; z-index: 48; display: block; background: rgba(18, 22, 20, .56); }
    .admin-mobile-menu { width: min(88vw, 340px); height: 100dvh; position: fixed; inset: 0 auto 0 0; z-index: 49; color: #fff; background: var(--ink); display: flex; flex-direction: column; box-shadow: 12px 0 32px rgba(0, 0, 0, .2); }
    .admin-mobile-menu > header { min-height: 64px; padding: 10px 12px 10px 18px; border-bottom: 1px solid #363a3d; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .admin-mobile-menu > header strong { font-size: 15px; }
    .admin-mobile-menu > header button { width: 44px; height: 44px; padding: 0; border: 0; color: #fff; background: transparent; display: grid; place-items: center; cursor: pointer; }
    .admin-mobile-menu > header .icon { width: 23px; height: 23px; }
    .admin-mobile-nav { padding: 10px; display: grid; gap: 4px; overflow-y: auto; }
    .admin-mobile-nav a { min-height: 52px; padding: 10px 12px; border-left: 3px solid transparent; color: #b8bdb8; display: flex; align-items: center; }
    .admin-mobile-nav a.on { border-color: var(--red); color: #fff; background: #25292b; }
    .admin-mobile-menu > footer { margin-top: auto; padding: 14px; border-top: 1px solid #363a3d; display: grid; gap: 10px; color: #b8bdb8; }
    .admin-mobile-menu > footer .btn { width: 100%; color: #fff; border-color: #5f6560; background: #25292b; }
    .admin-grid.two { grid-template-columns: 1fr; }
    .admin-registration-review, .certificate-template-layout, .routine-review-layout { grid-template-columns: 1fr; }
    .routine-review-side { position: static; }
    .routine-information-grid, .settings-grid-3, .settings-grid-4, .certificate-scope-filter { grid-template-columns: 1fr; }
    .review-action-bar form { width: 100%; }
    .review-field-row { grid-template-columns: 1fr; }
    .app-dialog { width: calc(100vw - 20px); max-height: 90vh; }
    .dialog-body { max-height: calc(90vh - 122px); }
    .app-dialog > form > footer .btn { flex: 1; }
    .certificate-actions form { width: 100%; }
    .certificate-actions a, .certificate-actions button { width: 100%; }
    .order-book-task-row > summary { grid-template-columns: auto minmax(0, 1fr); }
    .order-book-task-row > summary .status { grid-column: 2; justify-self: start; }
    .order-book-admin-preview { margin-inline: -12px; padding: .5rem; }
    .field-entry-stage { grid-template-columns: 1fr; }
    .routine-search { grid-template-columns: 1fr auto; }
    .routine-search span { display: none; }
    .routine-options { max-height: 22rem; }
    .routine-option { grid-template-columns: 1fr; }
    .routine-check span { align-items: flex-start; flex-direction: column; gap: 2px; }
    .routine-custom { width: 100%; min-width: 0; padding: 0 13px 9px 43px; }
    .judge-workspace-main { padding: var(--space-3) var(--space-2) var(--space-4); }
    .judge-page-title { min-height: 2.75rem; margin-bottom: var(--space-2); }
    .judge-page-title h1 { font-size: var(--text-lg); }
    .judge-workspace .competitor-strip { min-height: 4rem; margin: 0 0 var(--space-2); padding: .5rem var(--space-2); grid-template-columns: auto minmax(0, 1fr) auto; }
    .judge-workspace .competitor-strip .bib { min-width: 4.75rem; font-size: 2rem; }
    .judge-workspace .competitor-strip .strip-metric:last-child { display: block; }
    .judge-layout-primary { height: calc(100dvh - 14.75rem); min-height: 32rem; grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: var(--space-2); }
    .judge-action-panel .judge-panel-head { align-items: center; flex-direction: row; }
    .judge-action-panel .judge-panel-head > div small { display: none; }
    .judge-action-panel .judge-panel-head .segment { width: auto; }
    .judge-action-panel .routine-list { grid-template-columns: 1fr; }
    .judge-action-panel .routine-row { min-height: 7.5rem; }
    .judge-action-panel .code-button { min-height: 3rem; }
    .judge-action-footer { position: relative; top: auto; z-index: 20; grid-template-columns: minmax(0, 1fr) 9.5rem; grid-template-rows: auto; }
    .selected-errors { position: relative; }
    .selected-errors summary { height: 100%; border-bottom: 0; }
    .selected-errors[open] .error-list { position: absolute; right: 0; bottom: calc(100% + .375rem); left: 0; z-index: 30; max-height: 11rem; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
    .judge-action-footer .submit-panel { padding: .375rem; display: grid; }
    .judge-action-footer .save-state { display: none; }
    .judge-action-footer .btn { min-height: 3.25rem; padding-inline: .5rem; }
    .judge-b-panel, .judge-head-panel { min-height: 0; }
    .judge-b-panel .b-score-layout { min-height: 0; }
    .score-history-panel .data-table { min-width: 0; }
    .score-history-panel .data-table td:first-child,
    .judge-head-panel .table-wrap .data-table td:first-child { display: flex; }
    .score-history-panel .data-table td:first-child::before,
    .judge-head-panel .table-wrap .data-table td:first-child::before { display: block; }
    .head-correction-form { grid-template-columns: 1fr; align-items: stretch; }
    .paper-recovery-control { margin: var(--space-2); padding: var(--space-2); }
    .checkin-action-cell::before { display: none; }
    .checkin-inline-form { grid-template-columns: 1fr; }
    .checkin-inline-form .inspection { justify-content: flex-start; }
    .checkin-inline-form .attendance-switch { width: 100%; }
    .checkin-inline-form .attendance-switch button { flex: 1; }
    .checkin-metrics { width: 100%; }
    .field-verify-form { grid-template-columns: 1fr; }
    .timing-workspace-clock { padding: 36px 12px; }
    .timing-workspace-clock .number { font-size: 56px; }
    .members-table tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .members-table .member-name-cell,
    .members-table .member-role-cell,
    .members-table .member-entry-cell,
    .members-table .member-fee-cell { grid-column: 1 / -1; }
    .members-table .member-actions { grid-column: 2; align-self: end; }
}

@media (max-width: 1180px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { font-size: 16px; }
    .score-input-row input { font-size: 40px; }
    .btn-small,
    .language button, .language a,
    .segment button, .segment a,
    .code-button, .code-occurrence input,
    .score-input-row button, .score-scale button,
    .inspection button, .inspection label span, .inspection > span,
    .attendance-switch button,
    .display-modes button, .display-modes a,
    .field-stop-control summary, .paper-recovery-control summary,
    .checkin-entry-add summary, .timing-correction summary { min-height: 44px; }
    .code-mark, .code-occurrence { min-width: 44px; }
    .language button, .language a { min-width: 44px; }
    .field-stop-control summary, .paper-recovery-control summary,
    .checkin-entry-add summary, .timing-correction summary { display: flex; align-items: center; }
    .selected-errors[open] .error-list { position: static; right: auto; bottom: auto; left: auto; z-index: auto; max-height: 7rem; border: 0; box-shadow: none; }
    .checkin-confirm, .head-actions { position: sticky; bottom: 0; z-index: 18; box-shadow: 0 -8px 20px rgba(18, 23, 20, .08); }
    .head-actions { background: #fff; }
}

@media (orientation: landscape) and (max-height: 500px) and (max-width: 950px) {
    body { font-size: 13px; }
    body.registration-menu-open, body.admin-menu-open { overflow: hidden; }
    .event-bar { min-height: 54px; padding: 5px 10px; gap: 10px; }
    .event-brand { min-width: 0; flex: 1; }
    .event-brand img { width: 34px; height: 34px; }
    .event-brand strong { font-size: 12px; }
    .event-brand small, .event-context, .event-account > span:not(.online), .event-account .language { display: none; }
    .registration-content, .workspace-main, .admin-content { padding: 10px 12px 36px; }

    .registration-shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); }
    .registration-side { display: none; }
    .registration-top { min-height: 54px; padding: 5px 10px; position: sticky; top: 0; z-index: 32; }
    .registration-top > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .registration-top .language, .registration-top .registration-desktop-logout { display: none; }
    .registration-mobile-menu-button { margin-left: auto; flex: 0 0 44px; display: grid; }
    .registration-mobile-menu-backdrop, .admin-mobile-menu-backdrop { position: fixed; inset: 0; z-index: 48; display: block; background: rgba(18, 22, 20, .56); }
    .registration-mobile-menu, .admin-mobile-menu { width: min(74vw, 340px); height: 100dvh; position: fixed; inset: 0 0 0 auto; z-index: 49; color: #fff; background: var(--ink); display: flex; flex-direction: column; box-shadow: -12px 0 32px rgba(0, 0, 0, .2); }
    .registration-mobile-menu > header, .admin-mobile-menu > header { min-height: 54px; padding: 5px 10px 5px 16px; border-bottom: 1px solid #363a3d; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .registration-mobile-menu > header button, .admin-mobile-menu > header button { width: 44px; height: 44px; padding: 0; border: 0; color: #fff; background: transparent; display: grid; place-items: center; cursor: pointer; }
    .registration-mobile-steps, .admin-mobile-nav { padding: 8px; display: grid; gap: 3px; overflow-y: auto; }
    .registration-mobile-steps a, .admin-mobile-nav a { min-height: 48px; padding: 7px 10px; border-left: 3px solid transparent; color: #b8bdb8; display: flex; align-items: center; gap: 8px; }
    .registration-mobile-steps a.on, .admin-mobile-nav a.on { border-color: var(--red); color: #fff; background: #25292b; }
    .registration-mobile-steps b { width: 27px; height: 27px; flex: 0 0 27px; border: 1px solid #5f6560; border-radius: 50%; display: grid; place-items: center; font-size: 11px; }
    .registration-mobile-steps small { margin-left: auto; color: #7e847f; font-size: 10px; }
    .registration-mobile-menu > footer, .admin-mobile-menu > footer { margin-top: auto; padding: 8px; border-top: 1px solid #363a3d; }
    .registration-mobile-menu > footer .btn, .admin-mobile-menu > footer .btn { width: 100%; color: #fff; border-color: #5f6560; background: #25292b; }

    .admin-shell { min-height: calc(100vh - var(--shell-offset)); grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); overflow: visible; }
    .admin-side, .admin-top .admin-desktop-account { display: none; }
    .admin-top { min-height: 54px; padding: 5px 10px; position: sticky; top: 0; z-index: 32; }
    .admin-top > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .admin-mobile-menu-button { flex: 0 0 44px; display: grid; }
    .admin-mobile-menu { inset: 0 auto 0 0; box-shadow: 12px 0 32px rgba(0, 0, 0, .2); }
    .admin-mobile-nav a { justify-content: flex-start; }
    .admin-mobile-menu > footer { display: grid; gap: 6px; color: #b8bdb8; }

    .judge-workspace-main { padding: 8px 10px 16px; }
    .judge-page-title { min-height: 38px; margin-bottom: 6px; }
    .judge-page-title h1 { font-size: var(--text-md); }
    .judge-workspace .competitor-strip { min-height: 52px; margin: 0 0 6px; padding: 5px 8px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
    .judge-workspace .competitor-strip .bib { min-width: 66px; font-size: 28px; }
    .judge-workspace .competitor-strip h2 { font-size: 13px; }
    .judge-workspace .competitor-strip .strip-metric { display: none; }
    .judge-workspace .competitor-strip .strip-metric:last-child { display: block; padding-left: 8px; }
    .judge-layout-primary { height: calc(100dvh - 11.5rem); min-height: 18rem; grid-template-columns: minmax(0, 1fr) 11rem; grid-template-rows: minmax(0, 1fr); gap: 8px; }
    .judge-action-panel .judge-panel-head { min-height: 44px; padding: 4px 8px; align-items: center; flex-direction: row; }
    .judge-action-panel .judge-panel-head small { display: none; }
    .judge-action-panel .routine-list { min-height: 0; overflow-y: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 6px; }
    .judge-action-panel .routine-row { min-height: 7rem; }
    .judge-action-footer { min-height: 0; grid-template-columns: 1fr; grid-template-rows: minmax(44px, 1fr) auto; gap: 6px; }
    .selected-errors summary { min-height: 44px; padding: 5px 8px; }
    .selected-errors .error-list { max-height: 7rem; padding-inline: 8px; }
    .judge-action-footer .submit-panel { padding: 6px; }
    .judge-action-footer .submit-panel textarea { min-height: 44px; height: 44px; }
    .judge-action-footer .save-state { display: none; }
    .judge-action-footer .btn { min-height: 44px; padding: 6px; }

    .judge-b-panel, .judge-head-panel { min-height: 0; }
    .judge-b-panel .b-score-layout { min-height: 0; padding: 8px; grid-template-columns: minmax(12rem, .8fr) minmax(18rem, 1.2fr); gap: 10px; align-items: start; }
    .judge-b-panel .level-reference { gap: 5px; }
    .judge-b-panel .level { min-height: 58px; padding: 6px 8px; grid-template-columns: 68px 1fr; gap: 7px; }
    .judge-b-panel .level strong { font-size: 18px; }
    .judge-b-panel .score-input-row { margin: 6px 0; grid-template-columns: 44px minmax(150px, 230px) 44px; gap: 6px; }
    .judge-b-panel .score-input-row input { height: 58px; font-size: 34px; }
    .judge-b-panel .score-scale { margin-bottom: 8px; }
    .judge-score-note { margin-bottom: 6px; }
    .judge-score-note textarea { min-height: 44px; height: 44px; }

    .head-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .head-summary div { min-height: 62px; padding: 8px; }
    .head-summary div:nth-child(n) { border-bottom: 0; }
    .submission-matrix { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .score-history-panel .data-table, .score-history-panel .data-table tbody,
    .score-history-panel .data-table tr, .score-history-panel .data-table td,
    .judge-head-panel .table-wrap .data-table, .judge-head-panel .table-wrap .data-table tbody,
    .judge-head-panel .table-wrap .data-table tr, .judge-head-panel .table-wrap .data-table td { width: 100%; min-width: 0; display: block; }
    .score-history-panel .data-table thead, .judge-head-panel .table-wrap .data-table thead { display: none; }
    .score-history-panel .data-table tr, .judge-head-panel .table-wrap .data-table tr { padding: 8px; border-bottom: 1px solid var(--line); }
    .score-history-panel .data-table td, .judge-head-panel .table-wrap .data-table td { min-height: 0; padding: 4px 0; border: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .score-history-panel .data-table td::before, .judge-head-panel .table-wrap .data-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; }
    .head-correction-form { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; }

    .checkin-layout { grid-template-columns: 1fr; gap: 8px; }
    .group-rail { display: flex; overflow-x: auto; }
    .group-rail header { display: none; }
    .group-link { min-width: 168px; min-height: 52px; }
    .checkpoint-tabs { margin-bottom: 6px; overflow-x: auto; grid-template-columns: repeat(3, minmax(140px, 1fr)); }
    .checkpoint { min-height: 48px; }

    .field-stage { grid-template-columns: minmax(0, .72fr) minmax(0, 1.15fr) minmax(0, .72fr); gap: 8px; }
    .queue-card, .field-stage .current-card { min-height: 280px; }
    .field-stage .previous { grid-column: 1; grid-row: 1; }
    .field-stage .current-card { grid-column: 2; grid-row: 1; }
    .field-stage .on-deck { grid-column: 3; grid-row: 1; }
    .queue-card > header { min-height: 44px; padding: 6px 8px; }
    .queue-person { padding: 8px; }
    .current-card .queue-person { padding: 8px; }
    .current-card .queue-person .bib { font-size: 48px; }
    .control-actions { padding: 8px; grid-template-columns: 1fr 1fr; gap: 6px; }
    .control-actions .btn { min-height: 44px; padding: 6px; }
    .control-actions .btn:first-child { grid-column: 1 / -1; }
}

@media (orientation: landscape) and (max-height: 500px) and (max-width: 740px) {
    .judge-action-panel .code-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .judge-action-panel .code-option { grid-template-columns: minmax(44px, 1fr) 44px; gap: 4px; }
}

/* ==========================================================================
   四场地矩阵 · 秩序编排页（行=顺序位、列=场地，每场地带容量条）
   ========================================================================== */
.schedule-matrix { display: table; width: 100%; border-collapse: collapse; table-layout: fixed; }
.schedule-matrix th, .schedule-matrix td { border: 1px solid var(--line); padding: var(--space-2); vertical-align: top; text-align: left; }
.schedule-matrix thead th { background: var(--surface-2); }
.venue-head strong { display: block; font-size: var(--text-sm); }
.capacity-bar { height: 6px; border-radius: 3px; background: var(--line); margin: 6px 0 4px; overflow: hidden; }
.capacity-bar span { display: block; height: 100%; background: var(--green); }
.capacity-bar.over span { background: var(--danger); }
.capacity-meta { font-size: var(--text-xs); color: var(--muted); }
.capacity-meta.over { color: var(--danger); font-weight: 700; }
.matrix-cell strong { display: block; font-size: var(--text-sm); line-height: 1.35; }
.matrix-cell small { display: block; margin-top: 2px; font-size: var(--text-xs); color: var(--muted); }
.matrix-cell { display: block; min-height: 58px; padding: 7px; color: inherit; text-decoration: none; border: 1px solid transparent; }
.matrix-cell:hover { border-color: var(--line-dark); background: var(--surface-2); }
.matrix-cell.has-conflict { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, white); color: var(--danger); }
.matrix-cell.has-conflict .matrix-conflict { margin-top: 6px; color: var(--danger); font-weight: 700; }
.venue-schedule-table tr:target { outline: 2px solid var(--danger); outline-offset: -2px; background: color-mix(in srgb, var(--danger) 8%, white); }
.matrix-empty { color: var(--line-dark); }
@media (max-width: 760px) {
    .schedule-matrix, .schedule-matrix thead, .schedule-matrix tbody, .schedule-matrix th, .schedule-matrix td, .schedule-matrix tr { display: block; }
    .schedule-matrix thead { display: none; }
    .schedule-matrix td { border-top: 0; }
    .schedule-matrix tr { margin-bottom: var(--space-3); border: 1px solid var(--line); }
}

/* ==========================================================================
   全局兜底 · 中和 app.css 泄漏到 V1 页面的裸标签规则
   v1.css 在 app.css 之后加载，同特异性下这里胜出；
   app.css 中证书 / 秩序册 / 附录 / 打印底纸的高特异性 h1（font 简写）不受影响，保持其专用字体。
   ========================================================================== */
:root {
    --paper-deep: var(--surface-2);
    --ok: var(--green);
}

/* app.css:7 `h1{font-family:Georgia,serif}` 泄漏 → 全站主标题变衬线体（P0） */
h1 { font-family: var(--font); }

/* app.css:13 裸 input/select/textarea 的旧描边与硬编码旧红聚焦光（P1）。
   .field input 等更高特异性规则仍会覆盖此基线，蓝色聚焦不受影响。 */
input, select, textarea { font-family: var(--font); }

/* app.css 的 `input{width:100%}` 会把勾选框/单选框也拉成整行宽（如审核页的按字段退回）。 */
input[type="checkbox"], input[type="radio"] {
    width: auto;
    min-width: 0;
    min-height: 0;
    margin-right: 6px;
    vertical-align: middle;
    accent-color: var(--red);
}
input:focus, select:focus, textarea:focus {
    outline: 3px solid var(--red-soft);
    border-color: var(--red);
}

/* v1.css 原本无 .flash 定义，全站提示条只能吃 app.css 旧配色（P1） */
.flash {
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
    border: 1px solid var(--green);
    border-radius: 10px;
    background: var(--green-soft);
    color: var(--green);
    font-size: var(--text-sm);
}
.flash.error {
    border-color: var(--danger);
    background: var(--red-soft);
    color: var(--danger);
}

/* app.css:6 `a:hover{underline}` 泄漏（P2）——V1 链接悬停不加下划线 */
a:hover { text-decoration: none; }

/* app.css:13 `label>span` 旧棕标签色泄漏到 .field 之外的标签（P2） */
label > span { color: var(--ink-2); font-weight: 700; font-size: var(--text-xs); }
