:root {
    color-scheme: dark;
    --ink: #0c0b0b;
    --surface: #151311;
    --surface-2: #1d1916;
    --line: rgba(255, 255, 255, .11);
    --muted: #a9a29d;
    --text: #f7f2ed;
    --ember: #f2612d;
    --ember-bright: #ff8a3d;
    --gold: #f5b84b;
    --danger: #ff5e5e;
    --success: #6ed79d;
    --radius: 18px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--ink); }
body { margin: 0; min-height: 100vh; color: var(--text); background:
    radial-gradient(circle at 15% 10%, rgba(169, 45, 16, .25), transparent 34rem),
    linear-gradient(125deg, transparent 0 62%, rgba(242, 97, 45, .055) 62% 63%, transparent 63%),
    #0c0b0b; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom, black, transparent 70%); }
a { color: inherit; }
.site-header { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 4vw, 68px); border-bottom: 1px solid var(--line); background: rgba(12,11,11,.82); backdrop-filter: blur(16px); position: relative; z-index: 2; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; font-weight: 950; font-size: 24px; font-style: italic; color: white; background: linear-gradient(145deg, var(--ember-bright), #a91e10); clip-path: polygon(16% 0, 100% 0, 84% 100%, 0 100%); }
.brand strong { display: block; font-size: 16px; }
.brand small { display: block; color: var(--muted); font-size: 10px; font-weight: 700; margin-top: 2px; }
.button { border: 0; border-radius: 7px; min-height: 48px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; text-transform: uppercase; letter-spacing: .04em; }
.button-small { min-height: 39px; padding: 0 16px; font-size: 13px; }
.button-ghost { border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.public-actions { display: flex; align-items: center; gap: 16px; }
.admin-link { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; text-underline-offset: 4px; }
.button-primary { color: #180b06; background: linear-gradient(100deg, var(--ember), var(--gold)); box-shadow: 0 12px 36px rgba(242,97,45,.22); }
.public-shell { width: min(1360px, calc(100% - 40px)); margin: 0 auto; display: grid; grid-template-columns: minmax(280px, .72fr) minmax(600px, 1.28fr); gap: clamp(32px, 5vw, 84px); align-items: start; padding: clamp(52px, 8vh, 92px) 0 58px; }
.mission-intro { position: sticky; top: 120px; padding-top: 18px; }
.eyebrow, .step-label { color: var(--ember-bright); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 850; }
.eyebrow span { display: inline-block; width: 26px; height: 2px; background: var(--ember); vertical-align: middle; margin-right: 10px; }
h1 { font-size: clamp(42px, 5.4vw, 74px); line-height: .98; letter-spacing: -.055em; max-width: 720px; margin: 22px 0; text-transform: uppercase; }
h1 em { color: var(--ember-bright); font-style: normal; }
.lede { color: #c9c2bd; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.65; max-width: 570px; }
.mission-stats { margin-top: 38px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.mission-stats div { padding: 18px 14px; background: rgba(20,18,16,.88); }
.mission-stats strong, .mission-stats span { display: block; }
.mission-stats strong { font-size: 21px; color: var(--gold); }
.mission-stats span { color: var(--muted); font-size: 11px; margin-top: 4px; text-transform: uppercase; }
.form-card { background: linear-gradient(160deg, rgba(31,27,23,.98), rgba(17,16,15,.98)); border: 1px solid var(--line); border-top: 3px solid var(--ember); border-radius: 2px var(--radius) var(--radius) var(--radius); box-shadow: 0 35px 80px rgba(0,0,0,.35); overflow: hidden; }
.alert { margin: 24px 38px 0; padding: 15px 17px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.alert-success { color: #b8f4d2; border: 1px solid rgba(110,215,157,.3); background: rgba(110,215,157,.08); }
.alert-error { color: #ffd1cb; border: 1px solid rgba(255,94,94,.3); background: rgba(255,94,94,.08); }
.error-summary { margin: 9px 0 0; padding-left: 20px; }
.error-summary li + li { margin-top: 5px; }
.client-submit-alert small { display: block; margin-top: 7px; color: #ffaaa1; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.card-heading { padding: 28px clamp(22px, 4vw, 38px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.card-heading h2 { margin: 3px 0 0; font-size: 28px; text-transform: uppercase; letter-spacing: -.02em; }
.step-label { margin: 0; }
.secure-badge { color: var(--success); background: rgba(110,215,157,.08); border: 1px solid rgba(110,215,157,.25); padding: 8px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.migration-form { padding: 5px clamp(22px, 4vw, 38px) 34px; }
fieldset { border: 0; padding: 26px 0 30px; margin: 0; border-bottom: 1px solid var(--line); }
fieldset:disabled { opacity: .72; }
.fieldset-copy { color: var(--muted); font-size: 14px; line-height: 1.55; margin: -6px 0 20px; }
legend { width: 100%; padding: 0; margin-bottom: 20px; color: #ddd5ce; font-size: 13px; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; }
legend span { color: var(--ember-bright); margin-right: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span { color: #d9d2cc; font-size: 14px; font-weight: 700; }
.password-field > label { color: #d9d2cc; font-size: 14px; font-weight: 700; }
.field b { color: var(--ember-bright); }
.field small { color: var(--muted); font-size: 12px; font-weight: 500; }
.field .field-error { color: #ff9488; }
.password-requirements { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 2px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 12px; }
.password-requirements li::before { content: "○"; display: inline-block; width: 18px; color: #756e68; font-weight: 900; }
.password-requirements li.is-valid { color: var(--success); }
.password-requirements li.is-valid::before { content: "✓"; color: var(--success); }
.password-requirements li.is-invalid { color: #ff9488; }
.password-requirements li.is-invalid::before { content: "×"; color: var(--danger); }
.is-hidden, .honeypot { display: none !important; }
.was-validated :invalid { border-color: var(--danger); }
input, select { width: 100%; min-height: 50px; border: 1px solid rgba(255,255,255,.13); border-radius: 7px; color: var(--text); background: #11100f; padding: 0 14px; font: inherit; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
input:focus, select:focus { border-color: var(--ember); background: #171411; box-shadow: 0 0 0 3px rgba(242,97,45,.13); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.input-unit { position: relative; }
.input-unit input { padding-right: 46px; }
.input-unit i { position: absolute; right: 14px; top: 15px; color: var(--gold); font-style: normal; font-size: 13px; font-weight: 900; }
input[type=file] { padding: 10px; color: var(--muted); }
input[type=file]::file-selector-button { height: 30px; border: 0; border-radius: 4px; color: #211009; background: var(--gold); font-weight: 800; margin-right: 12px; }
.form-submit { padding-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.form-submit p { color: var(--muted); font-size: 13px; margin: 0; }
footer { width: min(1360px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 32px; border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; gap: 24px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.auth-page { display: flex; flex-direction: column; }
.auth-shell { flex: 1; width: min(520px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 72px; }
.auth-brand { width: max-content; margin: 0 auto 34px; }
.auth-card { background: linear-gradient(155deg, rgba(31,27,23,.98), rgba(17,16,15,.98)); border: 1px solid var(--line); border-top: 3px solid var(--ember); border-radius: 2px var(--radius) var(--radius) var(--radius); padding: clamp(26px, 5vw, 42px); box-shadow: 0 35px 80px rgba(0,0,0,.42); }
.auth-card h1 { font-size: clamp(34px, 8vw, 52px); margin: 18px 0; }
.auth-copy { color: var(--muted); line-height: 1.65; margin-bottom: 26px; }
.auth-card .alert { margin: 0 0 22px; }
.auth-card code { color: var(--gold); }
.auth-form, .panel-form { display: grid; gap: 18px; }
.auth-form .button { width: 100%; margin-top: 4px; }
.auth-links { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.text-link, .clear-filter { color: var(--ember-bright); font-size: 13px; font-weight: 750; text-underline-offset: 4px; }
.code-input { text-transform: uppercase; letter-spacing: .18em; font-weight: 850; }
.admin-page { background: #0c0b0b; }
.admin-topbar { min-height: 76px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 44px; padding: 0 clamp(20px, 4vw, 60px); border-bottom: 1px solid var(--line); background: rgba(12,11,11,.94); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(18px); }
.player-topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 clamp(20px, 4vw, 60px); border-bottom: 1px solid var(--line); background: rgba(12,11,11,.94); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(18px); }
.player-topbar nav, .player-identity { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 13px; }
.player-topbar form, .player-identity form { margin: 0; }
.player-topbar button, .player-identity button { border: 0; background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.player-topbar a { color: inherit; text-underline-offset: 4px; }
.admin-nav { display: flex; align-self: stretch; gap: 28px; }
.admin-nav a { display: flex; align-items: center; color: var(--muted); border-bottom: 2px solid transparent; text-decoration: none; font-size: 14px; font-weight: 750; }
.admin-nav a:hover, .admin-nav a.active { color: var(--text); border-bottom-color: var(--ember); }
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 5px; border-radius: 999px; color: #1b0d07; background: var(--gold); font-size: 10px; font-weight: 900; }
.admin-identity { display: flex; align-items: center; gap: 16px; color: #d8d1ca; font-size: 14px; }
.admin-identity form { margin: 0; }
.admin-identity button { border: 0; background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.nav-toggle { display: none; }
.dashboard-shell { width: min(1480px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0 64px; min-height: calc(100vh - 180px); }
.narrow-shell { max-width: 1120px; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 32px; }
.dashboard-heading h1 { font-size: clamp(38px, 5vw, 62px); margin: 12px 0 8px; }
.dashboard-heading p:last-child { color: var(--muted); margin: 0; }
.export-button { white-space: nowrap; }
.season-selector { display: flex; align-items: end; gap: 10px; margin: -12px 0 18px; }
.season-selector label { display: grid; gap: 6px; min-width: min(320px, 100%); }
.season-selector label > span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.season-selector select { min-height: 44px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-grid article { min-height: 142px; padding: 22px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(31,27,23,.95), rgba(17,16,15,.95)); position: relative; overflow: hidden; }
.stat-grid article::after { content: ""; width: 64px; height: 3px; position: absolute; right: -13px; top: 14px; background: var(--ember); transform: rotate(36deg); }
.stat-grid span, .stat-grid small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.stat-grid strong { display: block; margin: 12px 0 8px; font-size: 34px; color: var(--gold); }
.filter-bar { display: grid; grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(140px, 1fr)) auto auto; align-items: end; gap: 10px; padding: 16px; margin-bottom: 18px; border: 1px solid var(--line); background: rgba(22,20,18,.88); }
.filter-bar label { display: grid; gap: 6px; }
.filter-bar label > span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.filter-bar input, .filter-bar select { min-height: 42px; font-size: 14px; }
.button-secondary { min-height: 42px; padding: 0 16px; color: var(--text); background: #292420; border: 1px solid var(--line); font-size: 12px; }
.button-danger { min-height: 42px; padding: 0 16px; color: #ffd8d3; background: rgba(164, 32, 24, .18); border: 1px solid rgba(255,94,94,.38); font-size: 12px; }
.clear-filter { min-height: 42px; display: grid; place-items: center; padding: 0 8px; }
.data-card { border: 1px solid var(--line); background: rgba(20,18,16,.96); border-radius: 3px 12px 12px 12px; overflow: hidden; }
.data-card-heading { min-height: 66px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.data-card-heading h2 { margin: 0; font-size: 18px; text-transform: uppercase; letter-spacing: .03em; }
.data-card-heading > span { color: var(--muted); font-size: 13px; }
.table-scroll { overflow-x: auto; }
.roster-table { width: 100%; border-collapse: collapse; min-width: 1180px; }
.roster-table th { padding: 14px 15px; color: var(--muted); background: #11100f; font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .065em; white-space: nowrap; }
.roster-table td { padding: 16px 15px; border-top: 1px solid rgba(255,255,255,.07); color: #ded7d1; font-size: 14px; vertical-align: middle; }
.roster-table tbody tr:hover { background: rgba(242,97,45,.035); }
.roster-table td small { display: block; color: var(--muted); line-height: 1.6; }
.player-cell { display: flex; align-items: center; gap: 11px; min-width: 150px; }
.player-cell img, .avatar-fallback { width: 36px; height: 36px; border-radius: 7px; object-fit: cover; flex: 0 0 auto; }
.avatar-fallback { display: grid; place-items: center; color: #23120a; background: linear-gradient(135deg, var(--ember), var(--gold)); font-weight: 900; }
.status { display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; border: 1px solid; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-yes { color: var(--success); border-color: rgba(110,215,157,.28); background: rgba(110,215,157,.07); }
.status-no { color: #ff8b80; border-color: rgba(255,94,94,.28); background: rgba(255,94,94,.07); }
.status-progress { color: var(--gold); border-color: rgba(245,184,75,.28); background: rgba(245,184,75,.07); }
.empty-state { min-height: 240px; display: grid; place-content: center; text-align: center; gap: 8px; }
.empty-state span { color: var(--muted); }
.activation-banner { margin: 0 0 20px; padding: 24px; border: 1px solid rgba(245,184,75,.3); background: rgba(245,184,75,.07); }
.activation-banner div { display: grid; gap: 7px; }
.activation-banner span, .activation-banner small { color: var(--muted); }
.activation-banner strong { color: var(--gold); font-size: 28px; letter-spacing: .16em; }
.admin-management-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.compact-card { align-self: start; }
.admin-list article { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 17px 22px; border-top: 1px solid rgba(255,255,255,.07); }
.admin-list article:first-child { border-top: 0; }
.admin-list strong, .admin-list small { display: block; }
.admin-list small { color: var(--muted); margin-top: 4px; }
.admin-list form { margin: 0; }
.current-account-label { min-width: 92px; text-align: right; text-transform: uppercase; letter-spacing: .05em; }
.player-account-row { padding: 18px 22px; border-top: 1px solid rgba(255,255,255,.07); }
.player-account-row:first-child { border-top: 0; }
.player-account-summary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.player-account-summary strong, .player-account-summary small { display: block; }
.player-account-summary small { color: var(--muted); margin-top: 4px; }
.password-reset { margin: 14px 0 0 50px; }
.password-reset summary, .delete-player summary { width: max-content; color: var(--ember-bright); cursor: pointer; font-size: 13px; font-weight: 750; text-underline-offset: 4px; }
.reset-password-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; padding: 18px; border: 1px solid var(--line); background: #11100f; }
.reset-password-form > p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.reset-password-form .button { justify-self: start; }
.delete-player { margin: 10px 0 0 50px; }
.delete-player summary { color: #ff8b80; }
.delete-player-form { display: grid; gap: 16px; margin-top: 14px; padding: 18px; border: 1px solid rgba(255,94,94,.24); background: rgba(91,22,18,.12); }
.delete-player-form p { margin: 0; color: #d8b6b1; font-size: 13px; line-height: 1.55; }
.confirm-check { display: flex; align-items: flex-start; gap: 10px; color: #d9d2cc; font-size: 13px; line-height: 1.45; }
.confirm-check input { width: 18px; min-height: 18px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--ember); }
.remove-picture { align-self: end; min-height: 50px; align-items: center; }
.table-action { display: inline-flex; min-height: 34px; align-items: center; padding: 0 12px; border: 1px solid rgba(242,97,45,.32); border-radius: 5px; color: var(--ember-bright); text-decoration: none; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.table-action:hover { background: rgba(242,97,45,.08); }
.diagnostic-note { display: grid; gap: 6px; margin: 0 0 20px; padding: 18px 20px; border: 1px solid rgba(245,184,75,.28); background: rgba(245,184,75,.07); }
.diagnostic-note strong { color: var(--gold); }
.diagnostic-note span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.diagnostics-table { min-width: 1320px; }
.diagnostics-table td { vertical-align: top; }
.diagnostics-table td:nth-child(4) { min-width: 360px; }
.diagnostics-table td:nth-child(6) { max-width: 280px; }
.diagnostics-table code { color: var(--gold); font-size: 11px; overflow-wrap: anywhere; }
.diagnostics-table form { margin: 0; }
.muted-dash { color: var(--muted); }
.panel-form { padding: 24px; }
.panel-form > p { color: var(--muted); line-height: 1.55; font-size: 13px; }
.password-card { width: min(560px, 100%); padding: 10px; }
.password-card .alert { margin: 14px; }
.standalone-alert { margin: 0 0 20px; }
.player-shell { max-width: 1120px; }
.player-form-card { margin-bottom: 28px; }
.season-chip { display: inline-flex; align-items: center; width: max-content; min-height: 32px; padding: 0 11px; border: 1px solid; border-radius: 999px; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.season-open { color: var(--success); border-color: rgba(110,215,157,.28); background: rgba(110,215,157,.07); }
.season-locked { color: var(--gold); border-color: rgba(245,184,75,.28); background: rgba(245,184,75,.07); }
.locked-message { margin: 24px 38px 0; padding: 18px; display: grid; gap: 5px; color: #f3d49b; border: 1px solid rgba(245,184,75,.28); background: rgba(245,184,75,.07); }
.locked-message span { color: var(--muted); font-size: 13px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 0 0 16px; }
.section-heading h2 { margin: 5px 0 0; font-size: 24px; text-transform: uppercase; }
.section-heading > span { color: var(--muted); font-size: 13px; }
.season-history { padding: 26px; border: 1px solid var(--line); background: rgba(20,18,16,.82); }
.history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.history-card { padding: 20px; border: 1px solid var(--line); background: #11100f; }
.history-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.history-card > div:first-child > strong { font-size: 15px; }
.history-card dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 20px 0; }
.history-card dl div { border-left: 2px solid rgba(242,97,45,.4); padding-left: 10px; }
.history-card dt { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.history-card dd { margin: 5px 0 0; font-weight: 800; }
.history-card > small { color: var(--muted); }
.season-management-grid { grid-template-columns: 1.25fr .75fr; }
.season-list article { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; padding: 20px 22px; border-top: 1px solid rgba(255,255,255,.07); }
.season-list article:first-child { border-top: 0; }
.season-list article > div:first-child { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; }
.season-list article strong { font-size: 20px; }
.season-list article small { grid-column: 1 / -1; color: var(--muted); }
.season-actions { display: flex; gap: 8px; }
.season-actions form { margin: 0; }
.season-actions button { min-height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 5px; background: #28231f; color: var(--text); cursor: pointer; font-weight: 700; }
@media (max-width: 1100px) {
    .admin-topbar { gap: 20px; }
    .admin-nav { gap: 16px; }
    .admin-identity > span { display: none; }
}
@media (max-width: 980px) {
    .public-shell { grid-template-columns: 1fr; width: min(760px, calc(100% - 32px)); padding-top: 40px; }
    .mission-intro { position: static; padding-top: 0; }
    h1 { max-width: 760px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-management-grid { grid-template-columns: 1fr; }
    .season-management-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .site-header { height: 68px; padding: 0 16px; }
    .public-actions { gap: 10px; }
    .public-actions .button { padding: 0 10px; font-size: 11px; }
    .admin-link { display: none; }
    .brand small { display: none; }
    .public-shell { width: calc(100% - 24px); padding: 28px 0 42px; gap: 30px; }
    h1 { font-size: clamp(36px, 12vw, 52px); }
    .mission-stats { grid-template-columns: 1fr; }
    .mission-stats div { display: flex; align-items: center; justify-content: space-between; }
    .mission-stats span { margin: 0; }
    .card-heading { align-items: flex-start; }
    .secure-badge { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .form-submit { align-items: stretch; flex-direction: column; }
    .button-primary { width: 100%; }
    footer { width: calc(100% - 32px); flex-direction: column; }
    .alert { margin-left: 20px; margin-right: 20px; }
    .admin-topbar { min-height: 68px; grid-template-columns: 1fr auto; gap: 12px; padding: 0 16px; }
    .nav-toggle { display: inline-flex; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); padding: 9px 12px; border-radius: 6px; }
    .admin-nav { display: none; position: absolute; top: 67px; left: 0; right: 0; padding: 10px 16px 18px; background: #12100f; border-bottom: 1px solid var(--line); }
    .admin-nav.is-open { display: grid; }
    .admin-nav a { min-height: 44px; border-bottom: 0; border-left: 2px solid transparent; padding-left: 14px; }
    .admin-nav a.active { border-left-color: var(--ember); }
    .admin-identity { grid-column: 1 / -1; display: none; }
    .dashboard-shell { width: calc(100% - 24px); padding: 32px 0 46px; }
    .dashboard-heading { align-items: stretch; flex-direction: column; }
    .export-button { width: 100%; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-grid article { min-height: 120px; padding: 16px; }
    .stat-grid strong { font-size: 28px; }
    .filter-bar { grid-template-columns: 1fr; }
    .filter-bar label:first-child { grid-column: auto; }
    .auth-shell { padding-top: 34px; }
    .player-topbar { min-height: 68px; padding: 0 16px; }
    .player-topbar nav, .player-identity { gap: 10px; font-size: 11px; }
    .player-identity > span { display: none; }
    .player-form-card .card-heading { display: grid; gap: 14px; }
    .player-form-card .secure-badge { display: inline-flex; }
    .locked-message { margin-left: 20px; margin-right: 20px; }
    .history-grid { grid-template-columns: 1fr; }
    .history-card > div:first-child { align-items: flex-start; flex-direction: column; }
    .season-list article { grid-template-columns: 1fr; }
    .season-actions { flex-wrap: wrap; }
    .password-requirements { grid-template-columns: 1fr; }
    .player-account-summary { grid-template-columns: auto 1fr; }
    .player-account-summary .status { grid-column: 2; width: max-content; }
    .password-reset { margin-left: 0; }
    .delete-player { margin-left: 0; }
    .reset-password-form { grid-template-columns: 1fr; padding: 16px; }
    .admin-list article { grid-template-columns: auto 1fr; }
    .admin-list article > .status, .admin-list article > form, .current-account-label { grid-column: 2; justify-self: start; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

.ocr-review-table{width:100%;border-collapse:collapse}.ocr-review-table td{padding:8px;vertical-align:top}.ocr-review-table input{width:100%;max-width:240px}.ocr-review-table small{display:block}

.details-preview{max-width:100%;max-height:400px}

/* v8.1: shrink intrinsic fieldset/image widths and wrap OCR errors on phones. */
.form-card, .migration-form, .migration-form fieldset { min-width: 0; min-inline-size: 0; }
[data-details-import] { max-width: 100%; }
[data-details-import] p, [data-details-status], .ocr-review-table td { overflow-wrap: anywhere; }
[data-details-file] { display: block; width: 100%; max-width: 100%; min-width: 0; margin-bottom: 14px; }
.details-preview { display: block; width: min(100%, 480px); height: auto; max-width: 100%; max-height: 400px; object-fit: contain; margin: 16px 0; }
[data-details-review] { min-width: 0; max-width: 100%; }
.ocr-review-table { table-layout: fixed; }
.ocr-review-table td { width: 50%; min-width: 0; }
.ocr-review-table input { min-width: 0; max-width: 100%; }
[data-details-import] .button { max-width: 100%; white-space: normal; height: auto; min-height: 44px; }
@media (max-width: 620px) {
    .ocr-review-table tr, .ocr-review-table td { display: block; width: 100%; }
    .ocr-review-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
    .ocr-review-table input { max-width: 100%; }
}

/* v8.3: OCR results are text, not a second editable form. */
.ocr-text-summary { margin: 16px 0; }
.ocr-text-summary > div { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ocr-text-summary dt { color: var(--muted); flex: 1 1 190px; }
.ocr-text-summary dd { margin: 0; font-weight: 700; flex: 1 1 140px; overflow-wrap: anywhere; }
.ocr-review-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* Localized submission notices use the site's existing palette. */
body.notice-open { overflow: hidden; }
.notice-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.78); }
.notice-panel { width: min(600px,100%); min-width: 0; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: clamp(18px,4vw,32px); border: 1px solid var(--line); border-top: 3px solid var(--ember); border-radius: var(--radius); background: linear-gradient(160deg,var(--surface-2),var(--surface)); color: var(--text); box-shadow: 0 20px 80px #0008; overflow-wrap: anywhere; }
.notice-panel h2 { font-size: clamp(22px,5vw,30px); line-height: 1.2; margin: 22px 0 12px; }
.notice-panel p, .notice-panel li { line-height: 1.6; }
.notice-panel ul { padding-left: 22px; }
.notice-panel li + li { margin-top: 10px; }
.notice-panel > label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); }
.notice-panel select { width: auto; max-width: 100%; min-height: 44px; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.notice-actions .button { max-width: 100%; white-space: normal; text-align: center; padding: 12px 18px; }
