:root {
  --app-bg: #f4f5f7;
  --surface: #ffffff;
  --surface-subtle: #eef1f5;
  --text: #172033;
  --text-secondary: #697386;
  --border: #dde1e7;
  --accent: #2457d6;
  --accent-rgb: 36, 87, 214;
  --photo-bg: #081426;
  --photo-rgb: 8, 20, 38;
  --success: #48735d;
  --success-rgb: 72, 115, 93;
  --success-bg: #eaf1ed;
  --danger: #a34f49;
  --on-color: #ffffff;
  --text-rgb: 23, 32, 51;
  --shadow: 0 20px 54px rgba(var(--text-rgb), .11);
  --route-dock-height: 85px;
  --display: 'Avenir Next Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Avenir Next', Avenir, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; color-scheme: light; background: var(--app-bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--app-bg); font: 16px/1.5 var(--body); font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid rgba(var(--accent-rgb), .36); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; line-height: .98; }
p { margin-top: 0; }

.app-shell { min-height: 100vh; }
.app-shell:not([hidden]) .topbar { animation: quiet-arrival .48s cubic-bezier(.22, .7, .2, 1) both; }
.app-shell:not([hidden]) .nomination-route { animation: quiet-arrival .48s .06s cubic-bezier(.22, .7, .2, 1) both; }
.app-shell:not([hidden]) .voting-layout { animation: quiet-arrival .55s .12s cubic-bezier(.22, .7, .2, 1) both; }
@keyframes quiet-arrival { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 32px; min-height: 104px; padding: 18px clamp(20px, 4vw, 58px) 16px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 12px 34px rgba(var(--text-rgb), .07); }
.brand-lockup { min-width: 260px; }
.eyebrow, .panel-kicker { margin: 0 0 7px; color: var(--text-secondary); font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.topbar h1 { font-size: clamp(31px, 3.4vw, 49px); font-weight: 500; letter-spacing: .055em; text-transform: uppercase; }
.session-meta { display: flex; align-items: center; gap: 13px; }
.overall-progress { display: grid; min-width: 108px; text-align: right; }
.overall-progress span { color: var(--text-secondary); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.overall-progress strong { font: 600 21px var(--display); letter-spacing: .08em; }
.juror-badge { padding: 10px 13px; color: var(--accent); background: var(--surface-subtle); border: 1px solid var(--border); font-weight: 800; letter-spacing: .12em; box-shadow: none; }
.save-state { display: inline-flex; align-items: center; gap: 7px; color: var(--success); font-size: 12px; font-weight: 700; white-space: nowrap; }
.save-state::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(var(--success-rgb), .09); content: ''; }
.save-state.is-saving { color: var(--text-secondary); }
.save-state.is-saving::before { animation: save-pulse .8s ease-in-out infinite alternate; }
.save-state.is-error { color: var(--danger); }
@keyframes save-pulse { to { opacity: .25; transform: scale(.75); } }

.route-dock { position: sticky; top: 0; z-index: 30; height: var(--route-dock-height); background: var(--surface); box-shadow: 0 12px 30px rgba(var(--text-rgb), .08); }
.nomination-route { display: grid; height: calc(var(--route-dock-height) - 3px); grid-template-columns: repeat(7, minmax(0, 1fr)); overflow-x: auto; scrollbar-width: thin; background: var(--surface); border-bottom: 1px solid var(--border); }
.nomination-route-button { position: relative; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: 1fr auto; gap: 5px 9px; min-width: 0; min-height: 82px; padding: 12px 13px 10px; border: 0; border-right: 1px solid var(--border); border-bottom: 2px solid transparent; color: var(--text); background: var(--surface); text-align: left; cursor: pointer; transition: background .22s ease, box-shadow .22s ease; }
.nomination-route-button:hover { background: var(--surface-subtle); }
.nomination-route-button.is-current { z-index: 1; border-bottom-color: var(--accent); background: var(--surface); box-shadow: inset 0 -10px 20px -18px rgba(var(--accent-rgb), .34); }
.route-code { grid-row: 1 / 3; align-self: start; color: var(--text-secondary); font: 600 22px var(--display); letter-spacing: .04em; }
.nomination-route-button.is-current .route-code { color: var(--accent); }
.route-name { align-self: center; min-width: 0; font-size: clamp(10px, .9vw, 13px); font-weight: 800; line-height: 1.16; overflow-wrap: anywhere; }
.route-progress { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 10px; }
.route-progress i { display: block; width: 0; height: 2px; background: var(--accent); box-shadow: none; transition: width .25s ease; }
.route-progress b { font-weight: 800; }
.nomination-route-button.is-complete .route-code { color: var(--text-secondary); }
.nomination-route-button.is-complete .route-progress b { color: var(--success); }
.nomination-route-button.is-complete .route-progress i { background: var(--success); }
.nomination-route-button.is-current .route-code { color: var(--accent); }
.progress-line { height: 3px; background: var(--surface-subtle); }
.progress-line span { display: block; width: 0; height: 100%; background: var(--accent); box-shadow: none; transition: width .3s ease; }

.voting-layout { display: grid; grid-template-columns: 224px minmax(490px, 1fr) minmax(310px, 340px); grid-template-areas: 'contact photo score'; align-items: start; min-height: calc(100vh - 189px); }
.contact-sheet { position: sticky; top: calc(var(--route-dock-height) + 14px); z-index: 20; grid-area: contact; max-height: calc(100vh - var(--route-dock-height) - 28px); padding: 24px 16px 20px; overflow-y: auto; color: var(--text); background: var(--surface); border-right: 1px solid var(--border); box-shadow: 0 16px 36px rgba(var(--text-rgb), .07); }
.contact-heading { display: flex; justify-content: space-between; margin-bottom: 16px; color: var(--text-secondary); font-size: 10px; text-transform: uppercase; letter-spacing: .16em; }
.contact-heading strong { color: var(--text); }
.photo-index { display: grid; grid-template-columns: repeat(5, minmax(30px, 1fr)); gap: 6px; }
.index-button { min-width: 0; min-height: 35px; padding: 0; border: 1px solid var(--border); color: var(--text); background: var(--surface); font-size: 10px; font-weight: 800; cursor: pointer; transition: color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.index-button:hover { border-color: var(--border); color: var(--text); background: var(--surface-subtle); box-shadow: none; }
.index-button.is-scored { color: var(--success); background: var(--success-bg); border-color: var(--border); }
.index-button.is-current { color: var(--on-color); background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px rgba(var(--accent-rgb), .32); }
.contact-legend { display: flex; flex-wrap: wrap; gap: 9px 14px; margin-top: 16px; color: var(--text-secondary); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.contact-legend span { display: inline-flex; align-items: center; gap: 5px; }
.contact-legend i { width: 8px; height: 8px; border: 1px solid currentColor; }
.contact-legend .legend-current { background: var(--accent); border-color: var(--accent); }
.contact-legend .legend-scored { background: var(--success-bg); border-color: var(--success); }

.photo-workspace { grid-area: photo; display: flex; min-width: 0; flex-direction: column; padding: 22px clamp(18px, 2.5vw, 38px) 28px; background: var(--app-bg); }
.nomination-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 22px; margin-bottom: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.nomination-title-block > span { color: var(--text-secondary); font-size: 9px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.nomination-heading h2 { margin-top: 5px; font-size: clamp(25px, 2.25vw, 35px); font-weight: 500; letter-spacing: .02em; }
.photo-identity { display: grid; min-width: 102px; justify-items: end; padding-bottom: 2px; }
.photo-identity span { color: var(--text-secondary); font-size: 8px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.photo-identity strong { color: var(--accent); font: 600 18px var(--display); letter-spacing: .075em; }
.photo-stage { position: relative; display: grid; width: 100%; height: auto; min-height: 0; place-items: center; padding: 0; border: 0; background: transparent; box-shadow: var(--shadow); cursor: zoom-in; overflow: hidden; transition: box-shadow .3s ease; }
.photo-stage::after { position: absolute; inset: 0; border: 0; box-shadow: none; pointer-events: none; content: ''; }
.photo-stage:hover { box-shadow: 0 24px 58px rgba(var(--text-rgb), .14); }
.photo-stage img { display: block; width: 100%; max-width: 100%; height: auto; max-height: none; object-fit: contain; }
.photo-stage img.is-portrait { width: auto; max-width: 100%; max-height: min(72vh, 900px); }
.photo-stage img.is-entering { animation: photo-reveal .38s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes photo-reveal { from { opacity: 0; transform: scale(.994); filter: brightness(.94); } to { opacity: 1; transform: scale(1); filter: brightness(1); } }
.photo-navigation { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 14px; color: var(--text-secondary); font-size: 12px; }
.photo-navigation .nav-button { min-width: 126px; text-align: center; }
.photo-navigation .nav-button:first-child { justify-self: start; }
.photo-navigation .nav-button:last-child { justify-self: end; }
.position-block { display: grid; gap: 1px; text-align: center; }
.position-block strong { color: var(--text); font-size: 13px; }
.position-block span { font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.nav-button, .button-secondary { min-height: 42px; border: 1px solid var(--border); padding: 9px 14px; color: var(--text); background: var(--surface); text-decoration: none; cursor: pointer; transition: border-color .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease; }
.nav-button:hover:not(:disabled), .button-secondary:hover { border-color: var(--border); color: var(--accent); background: var(--surface-subtle); box-shadow: none; }
.nav-button:disabled { opacity: .42; cursor: not-allowed; }

.score-panel { grid-area: score; position: sticky; top: calc(var(--route-dock-height) + 14px); min-height: 560px; max-height: calc(100vh - var(--route-dock-height) - 28px); padding: 30px 24px; overflow-y: auto; background: var(--surface); border-left: 1px solid var(--border); box-shadow: 0 18px 38px rgba(var(--text-rgb), .07); }
.score-panel h2 { max-width: 260px; font-size: 31px; font-weight: 500; letter-spacing: .035em; }
.score-help { margin: 12px 0 0; color: var(--text-secondary); font-size: 13px; }
.score-feedback { margin-top: 22px; padding: 11px 12px; color: var(--text-secondary); background: var(--surface-subtle); border-left: 2px solid var(--border); font-size: 12px; font-weight: 800; letter-spacing: .025em; transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.score-feedback.has-score { color: var(--accent); background: var(--surface-subtle); border-left-color: var(--accent); box-shadow: none; }
.score-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 15px; }
.score-button { position: relative; min-width: 44px; aspect-ratio: 1.15; border: 1px solid var(--border); border-radius: 0; color: var(--text); background: var(--surface); font-weight: 800; cursor: pointer; transition: transform .15s ease, color .15s ease, background .15s ease, box-shadow .18s ease, border-color .15s ease, opacity .15s ease; }
.score-button:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--accent); background: var(--surface-subtle); box-shadow: 0 7px 16px rgba(var(--text-rgb), .08); }
.score-button:active:not(:disabled) { transform: translateY(2px) scale(.985); color: var(--on-color); background: var(--accent); box-shadow: inset 0 4px 10px rgba(var(--photo-rgb), .26); }
.score-button.is-selected { color: var(--on-color); background: var(--accent); border-color: var(--accent); transform: translateY(2px); box-shadow: inset 0 4px 9px rgba(var(--photo-rgb), .26), 0 0 0 2px rgba(var(--accent-rgb), .1); }
.score-button.is-selected::after { position: absolute; right: 5px; bottom: 4px; width: 9px; height: 2px; background: var(--on-color); box-shadow: none; content: ''; }
.score-button.is-confirming { animation: score-set .32s cubic-bezier(.2, .75, .2, 1); }
@keyframes score-set { 0% { transform: translateY(0) scale(.97); } 55% { transform: translateY(3px) scale(1.025); } 100% { transform: translateY(2px) scale(1); } }
.score-button:disabled { cursor: not-allowed; }
.score-button:disabled:not(.is-selected) { opacity: .56; }
.score-button.is-selected:disabled { opacity: 1; }
.score-legend { display: flex; justify-content: space-between; margin: 7px 0 0; color: var(--text-secondary); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.keyboard-hint { margin: 15px 0 0; color: var(--text-secondary); font-size: 10px; text-align: center; }
kbd { min-width: 20px; padding: 2px 5px; border: 1px solid var(--border); border-bottom-width: 2px; background: var(--surface-subtle); font: 700 10px var(--body); }
.finish-action { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.finish-button, .button-primary { display: inline-flex; width: 100%; min-height: 46px; align-items: center; justify-content: center; border: 1px solid var(--accent); padding: 12px 17px; color: var(--on-color); background: var(--accent); font-weight: 800; letter-spacing: .025em; text-align: center; text-decoration: none; cursor: pointer; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.finish-button:hover:not(:disabled), .button-primary:hover { background: var(--accent); border-color: var(--accent); box-shadow: 0 12px 28px rgba(var(--text-rgb), .13); transform: translateY(-1px); filter: brightness(.93); }
.finish-button:disabled { color: var(--text-secondary); background: var(--surface-subtle); border-color: var(--border); box-shadow: none; cursor: not-allowed; transform: none; }
.button-primary.is-disabled { color: var(--text-secondary); background: var(--surface-subtle); border-color: var(--border); box-shadow: none; cursor: not-allowed; pointer-events: auto; transform: none; filter: none; }
.finish-note { margin: 10px 0 0; color: var(--text-secondary); font-size: 11px; text-align: center; }
.nomination-complete { display: grid; gap: 5px; margin: 20px 0 0; padding: 13px; color: var(--success); background: var(--success-bg); border-left: 2px solid var(--success); box-shadow: none; animation: quiet-arrival .34s ease both; }
.nomination-complete strong { font-family: var(--display); font-size: 19px; }
.nomination-complete span { color: var(--success); font-size: 11px; }
.route-next-button { margin-top: 4px; border: 0; padding: 10px 12px; color: var(--on-color); background: var(--accent); font-weight: 800; text-align: left; cursor: pointer; }
.route-next-button:hover { background: var(--accent); filter: brightness(.93); }

.finalized-card { padding-top: 4px; animation: quiet-arrival .5s cubic-bezier(.22, .7, .2, 1) both; }
.finalized-mark { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 24px; border-radius: 0; color: var(--success); background: var(--success-bg); box-shadow: 0 0 0 1px rgba(var(--success-rgb), .14); font-size: 25px; }
.finalized-card h2 { max-width: none; font-size: 31px; }
.finalized-card > p:not(.panel-kicker):not(.finalized-note) { margin-top: 16px; color: var(--text-secondary); font-size: 14px; }
.finalized-score { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-top: 28px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.finalized-score span { color: var(--text-secondary); font-size: 12px; }
.finalized-score strong { color: var(--success); font: 700 36px var(--display); }
.finalized-note { margin-top: 18px; color: var(--text-secondary); font-size: 12px; }
.is-finalized .score-panel { background: var(--surface); }
.access-screen { max-width: 680px; margin: 15vh auto; padding: 48px; background: var(--surface); box-shadow: var(--shadow); }
.access-screen h1 { margin-bottom: 20px; font-size: 40px; }

dialog { border: 0; padding: 0; box-shadow: 0 34px 100px rgba(var(--photo-rgb), .3); }
dialog::backdrop { background: rgba(var(--photo-rgb), .82); backdrop-filter: blur(2px); }
.zoom-dialog { width: min(94vw, 1400px); height: 92vh; background: var(--photo-bg); }
.zoom-dialog[open] { animation: dialog-arrival .3s cubic-bezier(.2, .7, .2, 1); }
@keyframes dialog-arrival { from { opacity: 0; transform: scale(.985); } }
.zoom-dialog img { width: 100%; height: 100%; object-fit: contain; }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; color: var(--on-color); background: rgba(var(--photo-rgb), .72); font-size: 28px; cursor: pointer; }
.finish-dialog { width: min(92vw, 560px); padding: 34px; color: var(--text); background: var(--surface); border: 1px solid var(--border); }
.finish-dialog[open] { animation: dialog-arrival .3s cubic-bezier(.2, .7, .2, 1); }
.finish-dialog h2 { margin-bottom: 16px; font-size: 34px; }
.finish-summary { margin-top: 18px; padding: 12px 14px; background: var(--surface-subtle); }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: 380px; padding: 14px 18px; color: var(--on-color); background: var(--accent); box-shadow: var(--shadow); animation: toast-arrival .3s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes toast-arrival { from { opacity: 0; transform: translateY(8px); } }

/* Панель организатора */
.admin { max-width: 1380px; margin: 0 auto; padding: 34px 24px 80px; }
.admin-header { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 26px; }
.admin h1 { font-size: clamp(36px, 4.8vw, 62px); font-weight: 500; letter-spacing: .045em; text-transform: uppercase; }
.admin-actions { display: flex; gap: 10px; }
.admin-actions .finish-button, .admin-actions .button-primary { width: auto; }
.admin-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0 0 28px; background: var(--border); border: 1px solid var(--border); box-shadow: var(--shadow); }
.metric-card { min-height: 104px; padding: 18px 20px; background: var(--surface); }
.metric-card span { display: block; color: var(--text-secondary); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.metric-card strong { display: block; margin-top: 5px; font: 600 31px var(--display); letter-spacing: .055em; }
.metric-card small { color: var(--text-secondary); font-size: 11px; }
.admin-tabs { display: flex; gap: 4px; margin-bottom: 26px; border-bottom: 1px solid var(--border); }
.admin-tab { border: 0; border-bottom: 3px solid transparent; padding: 12px 17px; color: var(--text-secondary); background: transparent; font-weight: 800; cursor: pointer; }
.admin-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); box-shadow: none; }
.admin-tab:disabled { opacity: .55; cursor: not-allowed; }
.tab-status { margin-left: 6px; padding: 3px 6px; color: var(--text-secondary); background: var(--surface-subtle); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.admin-tab.is-active .tab-status { color: var(--accent); background: var(--surface-subtle); }
.admin-section { margin-top: 32px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 12px; }
.section-heading h2 { font-size: clamp(26px, 3vw, 38px); }
.section-note { max-width: 570px; margin: 8px 0 0; color: var(--text-secondary); font-size: 13px; }
.table-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: var(--text-secondary); background: var(--surface-subtle); font-size: 9px; letter-spacing: .11em; text-transform: uppercase; }
tbody tr { transition: background .16s ease; }
tbody tr:hover { background: var(--surface-subtle); }
.juror-code { color: var(--accent); font-weight: 800; }
.progress-cell { min-width: 150px; }
.progress-cell strong { display: block; font-size: 12px; }
.mini-progress { display: block; width: 100%; height: 3px; margin-top: 7px; background: var(--surface-subtle); }
.mini-progress i { display: block; height: 100%; background: var(--accent); box-shadow: none; }
.matrix-cell { min-width: 58px; text-align: center; }
.matrix-pill { display: inline-grid; min-width: 42px; min-height: 30px; place-items: center; border: 1px solid var(--border); font-size: 10px; font-weight: 800; }
.matrix-pill.is-empty { color: var(--text-secondary); background: var(--surface-subtle); }
.matrix-pill.is-progress { color: var(--accent); background: var(--surface); border-color: var(--accent); box-shadow: none; }
.matrix-pill.is-complete { color: var(--success); background: var(--success-bg); border-color: var(--border); box-shadow: none; }
.status-complete { color: var(--success); font-weight: 800; }
.status-progress { color: var(--accent); font-weight: 800; }
.status-idle { color: var(--text-secondary); font-weight: 700; }
.last-seen { color: var(--text-secondary); font-size: 11px; }
.rank { font: 700 22px var(--display); }
.admin-error { padding: 20px; color: var(--on-color); background: var(--danger); }
.nomination-select { min-width: min(100%, 370px); min-height: 44px; padding: 10px 13px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 700 13px var(--body); }
.results-lock { display: grid; min-height: 300px; place-items: center; padding: 36px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); text-align: center; }
.results-lock-content { max-width: 520px; }
.lock-mark { display: grid; width: 50px; height: 50px; place-items: center; margin: 0 auto 20px; color: var(--on-color); background: var(--accent); box-shadow: none; font-size: 22px; }
.results-lock h2 { font-size: 32px; }
.results-lock p { margin: 14px 0 0; color: var(--text-secondary); }
.results-preview-note { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 13px 15px; color: var(--text); background: var(--surface-subtle); border-left: 2px solid var(--accent); box-shadow: none; }
.results-preview-note strong { white-space: nowrap; }
.results-preview-note span { color: var(--text-secondary); font-size: 12px; }

/* Управление доступами */
.setup-shell { max-width: 1180px; margin: 0 auto; padding: 34px 24px 80px; }
.setup-header { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.setup-header h1 { font-size: clamp(36px, 5.2vw, 62px); font-weight: 500; letter-spacing: .045em; text-transform: uppercase; }
.setup-header .button-primary { width: auto; }
.setup-alert { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 28px; padding: 15px 17px; color: var(--text); background: var(--surface-subtle); border-left: 2px solid var(--accent); box-shadow: none; }
.setup-alert strong { white-space: nowrap; }
.access-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.access-toolbar h2 { font-size: 30px; }
.access-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.access-card { display: grid; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 10px 28px rgba(var(--text-rgb), .06); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.access-card:hover { border-color: var(--border); box-shadow: 0 14px 34px rgba(var(--text-rgb), .1); transform: translateY(-1px); }
.access-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.access-code { color: var(--accent); font: 600 25px var(--display); letter-spacing: .06em; }
.access-status { padding: 4px 7px; color: var(--text-secondary); background: var(--surface-subtle); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.access-status.is-progress { color: var(--accent); background: var(--surface-subtle); }
.access-status.is-complete { color: var(--success); background: var(--success-bg); }
.access-link-preview { min-width: 0; overflow: hidden; color: var(--text-secondary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.access-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.access-actions .button-primary, .access-actions .button-secondary { min-height: 40px; padding: 8px 10px; font-size: 11px; }
.regenerate-button { grid-column: 1 / -1; border: 0; padding: 5px; color: var(--text-secondary); background: transparent; font-size: 10px; text-decoration: underline; cursor: pointer; }
.regenerate-button:hover { color: var(--danger); }
.organizer-access { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; margin-bottom: 30px; padding: 21px; color: var(--text); background: var(--surface); border-left: 3px solid var(--accent); box-shadow: var(--shadow); }
.organizer-access h2 { margin-bottom: 5px; font-size: 28px; }
.organizer-access p { margin: 0; color: var(--text-secondary); font-size: 12px; }
.organizer-actions { display: flex; gap: 8px; }
.organizer-actions .button-primary { width: auto; color: var(--on-color); background: var(--accent); }
.organizer-actions .button-secondary { color: var(--text); background: var(--surface); border-color: var(--border); }
.setup-toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; padding: 13px 17px; color: var(--on-color); background: var(--success); box-shadow: var(--shadow); animation: toast-arrival .3s ease both; }

@media (max-width: 1179px) {
  .voting-layout { grid-template-columns: minmax(0, 1fr) 310px; grid-template-areas: 'contact contact' 'photo score'; }
  .contact-sheet { padding: 13px 20px 14px; border-right: 0; border-bottom: 1px solid var(--border); }
  .contact-heading { margin-bottom: 9px; }
  .photo-index { display: flex; overflow-x: auto; padding: 2px 1px 5px; scrollbar-width: thin; }
  .index-button { min-width: 38px; min-height: 36px; }
  .contact-legend { margin-top: 9px; }
  .score-panel { top: calc(var(--route-dock-height) + 122px); max-height: calc(100vh - var(--route-dock-height) - 136px); }
}

@media (max-width: 900px) {
  .topbar { align-items: flex-start; }
  .session-meta { flex-wrap: wrap; justify-content: flex-end; }
  .save-state { flex-basis: 100%; justify-content: flex-end; }
  .route-name { font-size: 9px; }
  .voting-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .score-panel { padding: 24px 18px; }
  .score-button { min-width: 40px; }
  .admin-summary { grid-template-columns: repeat(2, 1fr); }
  .access-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 779px) {
  :root { --route-dock-height: 73px; }
  .topbar { align-items: stretch; flex-direction: column; gap: 13px; }
  .session-meta { justify-content: space-between; }
  .overall-progress { text-align: left; }
  .save-state { display: none; }
  .nomination-route { grid-template-columns: repeat(7, 168px); }
  .nomination-route-button { min-height: 70px; padding: 10px 11px 8px; }
  .route-name { font-size: 10px; }
  .voting-layout { display: block; }
  .contact-sheet { top: calc(var(--route-dock-height) + 8px); padding: 12px 14px; }
  .photo-index { display: flex; overflow-x: auto; padding: 3px; }
  .index-button { min-width: 42px; min-height: 34px; }
  .contact-legend { display: none; }
  .photo-workspace { padding: 18px 14px 24px; }
  .nomination-heading { grid-template-columns: 1fr; gap: 8px; }
  .photo-identity { grid-template-columns: auto auto; justify-content: start; justify-items: start; align-items: baseline; gap: 8px; }
  .photo-stage { height: auto; min-height: 0; padding: 0; }
  .score-panel { position: static; min-height: 0; padding: 26px 18px 34px; border-top: 1px solid var(--border); border-left: 0; }
  .score-panel h2 { max-width: none; }
  .score-strip { grid-template-columns: repeat(5, minmax(44px, 1fr)); }
  .score-button { width: min(100%, 58px); justify-self: center; }
  .dialog-actions { grid-template-columns: 1fr; }
  .admin-header, .section-heading, .setup-header { align-items: stretch; flex-direction: column; }
  .admin-actions { flex-direction: column; }
  .admin-actions .finish-button, .admin-actions .button-primary { width: 100%; }
  .organizer-access { grid-template-columns: 1fr; }
  .organizer-actions { flex-direction: column; }
  .organizer-actions .button-primary { width: 100%; }
  .setup-header .button-primary { width: 100%; }
}

@media (max-width: 560px) {
  .topbar { min-height: 0; padding: 16px; }
  .topbar h1 { font-size: 31px; }
  .overall-progress strong { font-size: 18px; }
  .photo-navigation { gap: 8px; }
  .nav-button { padding: 8px 10px; font-size: 12px; }
  .photo-navigation .nav-button { min-width: 0; }
  .position-block span { display: none; }
  .admin, .setup-shell { padding: 24px 14px 60px; }
  .admin-summary { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 92px; padding: 14px; }
  .metric-card strong { font-size: 25px; }
  .access-grid { grid-template-columns: 1fr; }
  .organizer-actions { width: 100%; }
  .setup-alert { display: block; }
  .setup-alert strong { display: block; margin-bottom: 5px; }
  .access-screen { margin: 8vh 14px; padding: 30px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
