:root {
  --ink: #07142d;
  --ink-2: #102244;
  --paper: #f3f6fb;
  --surface: #ffffff;
  --muted: #58667e;
  --line: #d9e1ec;
  --accent: #155eef;
  --accent-dark: #0e48bd;
  --danger: #b42318;
  --success: #067647;
  --radius-card: 16px;
  --radius-control: 9px;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
  --font: "Pretendard Variable", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
::selection { color: #fff; background: var(--accent); }
:focus-visible { outline: 3px solid rgba(21, 94, 239, .34); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.brand.inverse { color: #fff; }
.brand-mark { position: relative; display: inline-grid; width: 28px; height: 28px; place-items: center; border: 2px solid currentColor; border-radius: 50%; }
.brand-mark::before, .brand-mark::after, .brand-mark span { content: ""; position: absolute; width: 4px; border-radius: 3px; background: currentColor; bottom: 6px; }
.brand-mark::before { height: 7px; left: 6px; }
.brand-mark span { height: 13px; left: 11px; }
.brand-mark::after { height: 10px; right: 5px; }
.context-label { margin: 0 0 12px; color: var(--accent); font-size: .82rem; font-weight: 800; letter-spacing: .02em; }
.lead { max-width: 42ch; margin: 12px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }

.button { min-height: 46px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius-control); font-weight: 780; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.button:active { transform: translateY(1px) scale(.99); }
.button.primary { color: #fff; background: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.button.secondary:hover { border-color: #9eabc0; }
.button.danger { color: var(--danger); background: #fff; border-color: #f0b7b2; }
.button.ink { color: #fff; background: var(--ink); }
.button.ink.is-active { background: var(--accent); }
.button.full { width: 100%; }
.text-button { padding: 7px 0; border: 0; color: var(--accent); background: transparent; font-weight: 750; }

label { display: block; margin-bottom: 8px; color: var(--ink-2); font-size: .88rem; font-weight: 730; }
input[type="text"], input[type="password"], input[type="number"], input[type="datetime-local"], input:not([type]) {
  width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #b8c3d3; border-radius: var(--radius-control); color: var(--ink); background: #fff;
}
input::placeholder { color: #7c8799; }
input:focus { border-color: var(--accent); outline: 3px solid rgba(21, 94, 239, .13); }
.helper { margin: 8px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.field-error { min-height: 21px; margin: 7px 0; color: var(--danger); font-size: .84rem; font-weight: 700; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translate(-50%, 16px); padding: 12px 18px; border-radius: 10px; color: #fff; background: var(--ink); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* Participant */
.participant-page { min-height: 100vh; background: linear-gradient(180deg, #eaf0f9 0, var(--paper) 45%); }
.participant-shell { width: min(100%, 520px); min-height: 100vh; margin: 0 auto; padding: 22px 18px calc(110px + env(safe-area-inset-bottom)); }
.participant-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 44px; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; color: #526077; background: #e1e7f0; font-size: .77rem; font-weight: 800; }
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-chip[data-state="live"] { color: var(--success); background: #d9f3e8; }
.status-chip[data-state="paused"] { color: #a15c00; background: #fff0d5; }
.status-chip[data-state="closed"] { color: #6e7789; }
.access-panel, .vote-panel, .complete-panel, .waiting-panel { animation: panel-in .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes panel-in { from { opacity: .001; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.access-panel h1, .vote-panel h1, .complete-panel h1, .waiting-panel h1 { max-width: 13ch; margin: 0; font-size: clamp(2rem, 8.5vw, 3rem); line-height: 1.1; letter-spacing: -.035em; word-break: keep-all; }
.access-form { margin-top: 36px; padding: 22px; border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.access-form input { height: 60px; font-size: 1.65rem; font-weight: 820; letter-spacing: .28em; text-align: center; font-variant-numeric: tabular-nums; }
.access-form .button { margin-top: 12px; }
.cue-rail { display: flex; gap: 6px; margin-bottom: 34px; }
.cue-rail span { width: 36px; height: 4px; border-radius: 4px; background: #cbd5e4; }
.cue-rail .is-active { width: 72px; background: var(--accent); }
.vote-intro { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 28px; }
.time-card { flex: 0 0 auto; padding: 10px 12px; border-top: 2px solid var(--accent); text-align: right; }
.time-card span { display: block; color: var(--muted); font-size: .72rem; }
.time-card strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
fieldset { margin: 0; padding: 0; border: 0; }
.candidate-list { display: grid; gap: 11px; }
.candidate-option { display: grid; grid-template-columns: 46px 1fr 30px; gap: 14px; align-items: center; min-height: 92px; margin: 0; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-card); background: #fff; cursor: pointer; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.candidate-option:hover { transform: translateY(-1px); border-color: #a9b6c8; }
.candidate-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(21,94,239,.11); }
.candidate-option:has(input:focus-visible), .toggle-row:has(input:focus-visible) { outline: 3px solid rgba(21,94,239,.4); outline-offset: 3px; }
.candidate-option input { position: absolute; opacity: 0; pointer-events: none; }
.candidate-number { color: var(--accent); font-size: .86rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.candidate-copy strong { display: block; margin-bottom: 5px; font-size: 1.03rem; }
.candidate-copy small { display: block; color: var(--muted); font-size: .78rem; font-weight: 500; line-height: 1.45; }
.choice-indicator { display: grid; width: 26px; height: 26px; place-items: center; border: 2px solid #b7c2d1; border-radius: 50%; }
.candidate-option input:checked ~ .choice-indicator { border-color: var(--accent); background: var(--accent); }
.choice-indicator i { width: 8px; height: 4px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.mobile-action-bar { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; max-width: 520px; margin: auto; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(243,246,251,.96); backdrop-filter: blur(14px); }
.mobile-action-bar p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.mobile-action-bar .button { flex: 0 0 auto; }
.complete-panel, .waiting-panel { padding-top: 8vh; text-align: left; }
.success-mark { position: relative; width: 72px; height: 72px; margin-bottom: 30px; border-radius: 50%; background: var(--accent); }
.success-mark span { position: absolute; top: 26px; left: 21px; width: 31px; height: 16px; border: solid #fff; border-width: 0 0 5px 5px; transform: rotate(-45deg); }
.receipt { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 30px 0 16px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.receipt span { color: var(--muted); font-size: .85rem; }
.receipt strong { font-size: 1.1rem; }
.cue-clock { position: relative; width: 72px; height: 72px; margin-bottom: 30px; border: 2px solid var(--ink); border-radius: 50%; }
.cue-clock::before, .cue-clock span { content: ""; position: absolute; top: 34px; left: 34px; width: 21px; height: 2px; transform-origin: 0 50%; background: var(--accent); }
.cue-clock span { width: 16px; transform: rotate(-90deg); }
.schedule-note { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-2); font-weight: 750; }
.offline-banner { position: fixed; z-index: 80; top: 0; right: 0; left: 0; padding: 9px; color: #fff; background: var(--danger); text-align: center; font-size: .8rem; transform: translateY(-100%); transition: transform .2s ease; }
.offline-banner.is-visible { transform: none; }

/* Admin */
.admin-page { min-height: 100vh; background: #eef2f7; }
.admin-nav { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; display: flex; width: 230px; flex-direction: column; padding: 27px 22px; color: #cbd5e1; background: var(--ink); }
.admin-nav nav { display: grid; gap: 7px; margin-top: 56px; }
.admin-nav nav a, .nav-link-bottom { padding: 11px 12px; border-radius: 8px; color: #aebad0; text-decoration: none; font-size: .9rem; font-weight: 680; }
.admin-nav nav a:hover, .admin-nav nav a.is-active { color: #fff; background: rgba(255,255,255,.08); }
.nav-link-bottom { margin-top: auto; border: 1px solid rgba(255,255,255,.14); color: #fff; }
.admin-main { margin-left: 230px; padding: 34px clamp(24px, 4vw, 64px) 80px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.admin-topbar h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -.03em; }
.live-indicator { display: flex; align-items: center; gap: 9px; }
.live-indicator span { width: 10px; height: 10px; border-radius: 50%; background: #8b96a8; }
.live-indicator[data-state="live"] span { background: #0b8657; outline: 5px solid rgba(11,134,87,.12); }
.live-indicator strong { font-size: .88rem; }
.admin-login { max-width: 520px; padding: 28px; border-radius: var(--radius-card); background: #fff; box-shadow: var(--shadow); }
.admin-login h2 { margin: 0 0 8px; }
.admin-login > p { color: var(--muted); line-height: 1.6; }
.inline-form { display: flex; gap: 10px; }
.inline-form input { flex: 1; }
.control-strip { display: grid; gap: 24px; padding: 24px; border-radius: var(--radius-card); background: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.07); }
.cue-track { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cue-track::before { content: ""; position: absolute; top: 10px; right: 10%; left: 10%; height: 1px; background: var(--line); }
.cue-track span { position: relative; padding-top: 26px; color: var(--muted); text-align: center; font-size: .76rem; font-weight: 700; }
.cue-track span::before { content: ""; position: absolute; z-index: 1; top: 5px; left: 50%; width: 11px; height: 11px; border: 3px solid #fff; border-radius: 50%; background: #c6d0de; transform: translateX(-50%); box-shadow: 0 0 0 1px #c6d0de; }
.cue-track span.is-current { color: var(--accent); }
.cue-track span.is-current::before { background: var(--accent); box-shadow: 0 0 0 1px var(--accent); outline: 6px solid rgba(21,94,239,.12); }
.control-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.control-actions .is-selected { outline: 3px solid rgba(21,94,239,.24); outline-offset: 2px; }
.control-actions .button.primary.is-selected, .control-actions .button.ink.is-selected { color: #fff; }
.metrics-band { display: grid; grid-template-columns: repeat(4, 1fr); margin: 28px 0; border-top: 1px solid #c8d1df; border-bottom: 1px solid #c8d1df; }
.metrics-band > div { padding: 24px 18px; border-right: 1px solid #c8d1df; }
.metrics-band > div:last-child { border-right: 0; }
.metrics-band span { display: block; margin-bottom: 12px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.metrics-band strong { font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metrics-band small { margin-left: 5px; color: var(--muted); }
.metrics-band .metric-word { font-size: clamp(1.6rem, 3vw, 2.7rem); }
#metricTime { font-size: clamp(1.55rem, 3.1vw, 3rem); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
.results-section, .event-card, .settings-section, .audit-section { padding: 26px; border-radius: var(--radius-card); background: #fff; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin: 0 0 6px; font-size: 1.22rem; }
.section-heading p { margin: 0; color: var(--muted); font-size: .82rem; }
.results-list { display: grid; gap: 18px; }
.result-row { display: grid; grid-template-columns: 34px 1fr 70px; gap: 14px; align-items: center; }
.result-rank { color: var(--muted); font-size: .8rem; font-weight: 800; }
.result-main > div:first-child { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.result-main span { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.result-bar { height: 9px; overflow: hidden; border-radius: 9px; background: #e7ecf3; }
.result-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.result-count { text-align: right; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.result-count small { margin-left: 3px; color: var(--muted); font-size: .68rem; }
.event-card { display: flex; min-height: 260px; flex-direction: column; color: #fff; background: var(--ink); }
.event-card-label { color: #aebad0; font-size: .78rem; }
.event-card > strong { margin-top: 14px; font-size: 2.4rem; letter-spacing: .16em; font-variant-numeric: tabular-nums; }
.event-card p { color: #aebad0; font-size: .84rem; line-height: 1.55; }
.event-card a { margin-top: auto; color: #fff; font-weight: 750; text-underline-offset: 4px; }
.settings-section, .audit-section { margin-top: 24px; }
.settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { min-width: 0; }
.field.span-2 { grid-column: span 2; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; margin: 0; padding: 15px 0; border-top: 1px solid var(--line); cursor: pointer; }
.toggle-row span { display: grid; gap: 5px; }
.toggle-row small { color: var(--muted); font-weight: 500; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-row i { position: relative; flex: 0 0 auto; width: 46px; height: 26px; border-radius: 99px; background: #cbd4e0; transition: background .2s ease; }
.toggle-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.toggle-row input:checked + i { background: var(--accent); }
.toggle-row input:checked + i::after { transform: translateX(20px); }
.settings-footer { grid-column: span 2; display: flex; align-items: center; justify-content: flex-end; gap: 20px; padding-top: 8px; }
.settings-footer p { margin: 0; color: var(--success); font-size: .84rem; }
.audit-list { display: grid; }
.audit-list > div { display: flex; justify-content: space-between; gap: 24px; padding: 13px 0; border-top: 1px solid var(--line); font-size: .86rem; }
.audit-list time { color: var(--muted); font-variant-numeric: tabular-nums; }
.empty-state { color: var(--muted); }

/* Presentation */
.presentation-page { width: 100vw; height: 100vh; overflow: hidden; color: #fff; background: var(--ink); }
.presentation-stage { position: relative; width: 100vw; height: 100vh; min-height: 56.25vw; overflow: hidden; background: #07142d; }
.presentation-stage::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4.6vw; width: 1px; background: rgba(255,255,255,.16); }
.stage-brand, .stage-number { position: absolute; z-index: 4; top: 4vh; display: flex; align-items: center; gap: 10px; color: #bdc8da; font-size: clamp(.65rem, 1vw, 1rem); font-weight: 800; letter-spacing: .14em; }
.stage-brand { left: 6.4vw; }
.stage-number { right: 5.5vw; font-variant-numeric: tabular-nums; }
.stage-live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); outline: 7px solid rgba(21,94,239,.16); }
.stage-slide { position: absolute; inset: 0; display: grid; visibility: hidden; opacity: 0; transform: translateY(2vh); transition: opacity .45s ease, transform .45s ease, visibility .45s; }
.stage-slide.is-active { visibility: visible; opacity: 1; transform: none; }
.stage-slide[data-slide="join"] { grid-template-columns: 1.3fr .7fr; align-items: center; gap: 5vw; padding: 10vh 8vw 9vh 8.5vw; }
.join-copy > p, .vote-stage-copy > p, .results-title > p, .hold-slide > p:first-child { margin: 0 0 2.2vh; color: #aebbd0; font-size: clamp(1rem, 1.65vw, 2rem); }
.join-copy h1, .vote-stage-copy h1 { margin: 0; font-size: clamp(4rem, 7.2vw, 8.3rem); line-height: .96; letter-spacing: -.04em; }
.stage-code { display: flex; align-items: center; gap: 2vw; margin-top: 6vh; }
.stage-code span { color: #aebbd0; font-size: clamp(.9rem, 1.3vw, 1.5rem); }
.stage-code strong { color: #fff; font-size: clamp(2rem, 4.1vw, 5.1rem); letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.qr-frame { justify-self: end; padding: 28px; border-radius: 18px; color: var(--ink); background: #fff; }
.qr-frame img { display: block; width: min(28vw, 390px); aspect-ratio: 1; }
.qr-frame p { margin: 1.2vh 0 0; font-size: clamp(.8rem, 1vw, 1.1rem); font-weight: 750; text-align: center; }
.qr-frame small { display: block; max-width: min(28vw, 390px); margin-top: 6px; overflow: hidden; color: var(--muted); font-size: clamp(.58rem, .72vw, .8rem); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.stage-slide[data-slide="vote"] { grid-template-columns: 1fr .72fr; align-items: center; gap: 7vw; padding: 11vh 7vw 11vh 8.5vw; }
.vote-stage-copy h1 span { color: #73a0ff; font-variant-numeric: tabular-nums; }
.stage-progress { width: 100%; height: 12px; margin-top: 5vh; overflow: hidden; border-radius: 12px; background: rgba(255,255,255,.14); }
.stage-progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.stage-note { margin: 2vh 0 0; color: #92a2bd; font-size: clamp(.8rem, 1.2vw, 1.35rem); }
.candidate-ticker { display: grid; gap: 1.4vh; }
.candidate-ticker > div { display: grid; grid-template-columns: 50px 1fr; align-items: center; min-height: 9vh; padding: 1.6vh 1.8vw; border-top: 1px solid rgba(255,255,255,.18); }
.candidate-ticker span { color: #73a0ff; font-weight: 800; }
.candidate-ticker strong { font-size: clamp(1rem, 1.75vw, 2rem); }
.hold-slide { place-content: center; padding: 8vw; text-align: center; }
.hold-slide h1 { margin: 0; font-size: clamp(3.4rem, 7vw, 8rem); letter-spacing: -.04em; }
.hold-lines { display: flex; justify-content: center; gap: 10px; margin-top: 6vh; }
.hold-lines span { width: 4vw; height: 8px; border-radius: 8px; background: rgba(255,255,255,.2); animation: hold-pulse 1.1s ease-in-out infinite alternate; }
.hold-lines span:nth-child(2) { animation-delay: .15s; }
.hold-lines span:nth-child(3) { animation-delay: .3s; }
.hold-lines span:nth-child(4) { animation-delay: .45s; }
@keyframes hold-pulse { to { background: var(--accent); transform: scaleX(1.2); } }
.results-slide { grid-template-columns: .58fr 1fr; align-items: center; gap: 5vw; padding: 10vh 7vw 10vh 8.5vw; }
.results-title h1 { max-width: 9ch; margin: 0; font-size: clamp(3rem, 5.7vw, 7rem); line-height: 1; letter-spacing: -.04em; }
.stage-results { display: grid; gap: 2.2vh; }
.stage-result-row { display: grid; grid-template-columns: 45px minmax(120px, .55fr) 1fr 70px; gap: 1.2vw; align-items: center; }
.stage-result-row > span { color: #73a0ff; font-weight: 800; }
.stage-result-row > strong { font-size: clamp(.95rem, 1.4vw, 1.7rem); }
.stage-result-row > div { height: clamp(16px, 2vh, 24px); overflow: hidden; border-radius: 14px; background: rgba(255,255,255,.12); }
.stage-result-row i { display: block; width: var(--result-width); height: 100%; border-radius: inherit; background: var(--accent); }
.stage-result-row b { text-align: right; font-size: clamp(1rem, 1.8vw, 2rem); font-variant-numeric: tabular-nums; }
.results-lock { position: absolute; right: 8vw; bottom: 14vh; color: #92a2bd; }
.stage-footer { position: absolute; z-index: 4; right: 5.5vw; bottom: 3.2vh; left: 6.4vw; display: flex; justify-content: space-between; padding-top: 1.6vh; border-top: 1px solid rgba(255,255,255,.16); color: #92a2bd; font-size: clamp(.65rem, .9vw, 1rem); font-weight: 700; }
.stage-clock { font-variant-numeric: tabular-nums; }
.presentation-controls { position: fixed; z-index: 30; right: 20px; bottom: 20px; display: flex; gap: 8px; padding: 8px; border-radius: 11px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: .2s ease; }
.presentation-controls.is-visible { opacity: 1; transform: none; }
.presentation-controls button { min-width: 42px; height: 40px; padding: 0 12px; border: 1px solid #c8d1df; border-radius: 7px; color: var(--ink); background: #fff; font-weight: 750; }
.presentation-gate { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(7,20,45,.96); }
.presentation-gate form { width: min(100%, 420px); padding: 32px; color: var(--ink); background: #fff; }
.presentation-gate form > p:first-child { margin: 0 0 10px; color: var(--accent); font-size: .76rem; font-weight: 850; letter-spacing: .12em; }
.presentation-gate h1 { margin: 0 0 28px; font-size: 2rem; }

@media (max-width: 960px) {
  .admin-nav { position: static; width: auto; height: auto; padding: 18px; }
  .admin-nav nav { display: none; }
  .nav-link-bottom { position: absolute; top: 9px; right: 12px; margin: 0; }
  .admin-main { margin: 0; padding: 24px 18px 60px; }
  .admin-grid { grid-template-columns: 1fr; }
  .event-card { min-height: 230px; }
  .metrics-band { grid-template-columns: repeat(2, 1fr); }
  .metrics-band > div:nth-child(2) { border-right: 0; }
  .metrics-band > div:nth-child(-n+2) { border-bottom: 1px solid #c8d1df; }
}

@media (max-width: 640px) {
  .participant-header { margin-bottom: 34px; }
  .vote-intro { align-items: flex-start; }
  .mobile-action-bar p { max-width: 22ch; }
  .admin-topbar { align-items: flex-start; gap: 14px; }
  .control-actions { display: grid; grid-template-columns: repeat(2, 1fr); }
  .control-actions .button { width: 100%; }
  .settings-form { grid-template-columns: 1fr; }
  .field.span-2, .settings-footer { grid-column: span 1; }
  .settings-footer { align-items: stretch; flex-direction: column; }
  .settings-footer .button { width: 100%; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .result-row { grid-template-columns: 25px 1fr 56px; gap: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
