:root {
  color-scheme: dark;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
  --bg:#101011;
  --panel:#171719;
  --border:#303033;
  --text:#f6f3ed;
  --muted:#a8a5a3;
  --gold:#f3ca70;
  --rose:#f3a5cc;
  --green:#a0e6b6;
}
* { box-sizing:border-box }
html { scroll-padding-top:1.25rem }
body { margin:0; background:var(--bg); color:var(--text) }
a { color:inherit; text-decoration:none }
button,input,textarea,select { font:inherit }
button { cursor:pointer }
button:disabled { cursor:default; opacity:.5 }
[hidden] { display:none !important }
:focus-visible { outline:2px solid var(--gold); outline-offset:4px }
h1,h2,h3,p { margin:0 }
h1,h2,h3 { line-height:1.1; letter-spacing:-.035em; overflow-wrap:anywhere }
h2 { font-size:clamp(1.5rem,3vw,2.4rem) }
h3 { font-size:1.35rem }
p { overflow-wrap:anywhere }
strong { font-weight:700 }
.shell,.top-inner { width:min(1112px,calc(100% - 64px)); margin-inline:auto }
.top { border-bottom:1px solid #272729 }
.top-inner { min-height:72px; display:flex; justify-content:space-between; align-items:center; gap:1rem }
.brand { display:inline-flex; align-items:center; gap:.38rem; font-size:1.05rem; font-weight:900; letter-spacing:-.035em; white-space:nowrap }
.brand-light { font-weight:500; color:#b0aaa2 }
.mark { display:inline-grid; place-items:center; color:var(--gold); font-size:1.55rem; line-height:1; padding-right:.2rem }
.top-link { font-size:.875rem; color:#d8d1c5 }
.top-link:hover,.back:hover { color:var(--gold) }
.hero { min-height:420px; isolation:isolate; position:relative; overflow:hidden; display:flex; align-items:center; margin-top:32px; border:1px solid #362d21; border-radius:24px; background:#15120f }
.hero-art { z-index:-1; position:absolute; inset:0 0 0 32%; background:linear-gradient(90deg,#15120f 1%,transparent 40%),url('/crown.png') 75% 51% / cover }
.hero::after { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(0deg,#120e0b60,transparent 35%); pointer-events:none }
.hero-copy { padding:36px 50px; width:100% }
.eyebrow { display:inline-flex; align-items:center; gap:.68rem; font-size:.78rem; font-weight:700; letter-spacing:.15em; color:var(--gold) }
.eyebrow i { width:22px; border-top:1px solid currentColor }
.hero h1 { margin:20px 0 18px; font-size:clamp(4.25rem,8.9vw,8.4rem); font-weight:900; letter-spacing:-.085em; line-height:.79 }
.hero h1 span,.hero h1 em { display:block }
.hero h1 em { color:var(--gold); font-style:normal }
.hero p { color:#e4d9ca; margin:0 0 22px; max-width:24rem }
.hero-status,.badge { width:max-content; max-width:100%; border-radius:999px; align-items:center; display:inline-flex; gap:.48rem; font-size:.81rem; font-weight:650; padding:.38rem .65rem; border:1px solid #464043; background:#232124; color:#ded6d8; white-space:nowrap }
.hero-status { background:#f3ca7014; color:#f8d491; border-color:#f3ca7054 }
.hero-status i,.badge.active::before { content:""; width:.43rem; height:.43rem; border-radius:50%; background:currentColor }
.hero-corner { color:#c8a56b; position:absolute; right:25px; bottom:19px; font-size:1.4rem }
.nominations { margin-top:42px }
.section-head { display:flex; justify-content:space-between; gap:1rem; align-items:center; margin-bottom:18px }
.section-head h2 { margin-top:6px }
.section-head .badge { margin-top:.5rem }
.tabs { width:max-content; max-width:100%; display:flex; flex-wrap:wrap; gap:.22rem; padding:4px; border:1px solid var(--border); background:#151516; border-radius:11px }
.tabs button { border:0; background:none; color:#c3c0ba; padding:.5rem .8rem; font-size:.875rem; font-weight:600; border-radius:7px }
.tabs button[aria-pressed="true"] { background:#2d2b28; color:#f9db97 }
.poll-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px }
.gold { --accent:var(--gold); --glow:#6e4a261f; --chip:#32271a }
.pink { --accent:var(--rose); --glow:#86255128; --chip:#352130 }
.poll-card { isolation:isolate; display:block; position:relative; overflow:hidden; border:1px solid #363032; transition:border-color .18s,transform .18s; border-radius:18px; background:radial-gradient(ellipse at 97% 0%,var(--glow),transparent 80%),var(--panel); padding:19px 22px 15px }
.poll-card:hover { border-color:var(--accent); transform:translateY(-2px) }
.card-cover { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-1; opacity:.23 }
.card-top,.card-bottom { display:flex; align-items:center; justify-content:space-between; gap:.5rem }
.category-icon { display:grid; place-items:center; width:47px; height:47px; border:1px solid color-mix(in srgb,var(--accent) 25%,transparent); border-radius:12px; color:var(--accent); background:var(--chip); font-size:1.6rem }
.badge.active { color:#b9e7bb; border-color:#42634b; background:#203428 }
.badge.scheduled { color:#ffe3a2; border-color:#775b31; background:#3b2e20 }
.card-body { margin:16px 0 14px }
.card-body h3 { color:var(--text); font-size:1.6rem; font-weight:850 }
.card-body p { color:#c0b9b7; margin-top:5px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden }
.card-bottom { padding-top:13px; border-top:1px solid #ffffff20; color:#ccc4be; font-size:.875rem }
.card-bottom strong { color:var(--accent) }
.card-bottom strong span { padding-left:.3rem }
.footer { margin-top:38px; color:var(--muted); font-size:.875rem }
.footer-inner { border-top:1px solid var(--border); padding:20px 0 24px; display:flex; align-items:center; justify-content:space-between }
.footer .brand { opacity:.68 }
.muted,.demo-note { color:var(--muted) }
.demo-note { font-size:.81rem; margin-top:.9rem }
.empty { padding:1.1rem; border:1px dashed #515054; color:#ccc7c1; border-radius:12px; grid-column:1/-1; margin-bottom:1rem }
.back { display:inline-flex; padding:.25rem 0; margin:1.25rem 0 .8rem; color:#d2c7b7; background:none; border:0 }
.detail-head { position:relative; overflow:hidden; isolation:isolate; border-radius:18px; padding:34px; background:radial-gradient(ellipse at right,var(--glow),transparent),#1b181b; border:1px solid #3a3433; display:flex; align-items:flex-start; justify-content:space-between; gap:1rem }
.detail-head h1 { font-size:clamp(2.4rem,6vw,5.1rem); color:var(--accent); font-weight:900; margin:.55rem 0 }
.detail-head p { color:#dcd3cc; white-space:pre-line }
.detail-grid { margin-top:1.8rem; display:grid; gap:20px; grid-template-columns:minmax(0,2fr) minmax(230px,1fr) }
.candidate-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px }
.candidate { background:var(--panel); border:1px solid var(--border); overflow:hidden; display:block; border-radius:13px }
.candidate:has(input):hover,.candidate:has(input:checked),.candidate.picked { border-color:var(--accent) }
.candidate:has(input) { cursor:pointer }
.candidate-photo { aspect-ratio:4/3; background:radial-gradient(ellipse at 52% 36%,var(--chip),#202024); display:grid; place-items:center; overflow:hidden }
.candidate-photo img { width:100%; height:100%; object-fit:cover }
.candidate-photo span { font-size:clamp(1.9rem,5vw,4.4rem); color:var(--accent); opacity:.78; font-weight:850 }
.candidate-name { min-width:0; font-size:.9rem; display:flex; gap:.4rem; align-items:center; justify-content:space-between; padding:.7rem }
.candidate-name strong { overflow-wrap:anywhere }
.candidate input { accent-color:var(--accent); min-width:17px; min-height:17px; margin:0 }
.panel { background:var(--panel); border:1px solid var(--border); border-radius:15px; padding:20px; min-width:0 }
.panel + .panel { margin-top:.85rem }
.panel h3,.panel h2 { margin-bottom:.5rem }
.panel p { color:#cbc5be }
.success { border-color:#365541 }
.success h3,.saved { color:var(--green) }
.vote-bar { position:sticky; z-index:1; bottom:0; display:flex; align-items:center; justify-content:space-between; gap:.75rem; margin-top:.85rem; padding:.75rem .8rem max(.75rem,env(safe-area-inset-bottom)); background:#211d18; border:1px solid #574637; border-radius:12px }
.vote-bar span { overflow-wrap:anywhere; font-size:.9rem }
.button { display:inline-flex; align-items:center; justify-content:center; border-radius:8px; border:1px solid transparent; padding:.63rem .93rem; font-size:.9rem; font-weight:750; line-height:1.35; min-height:39px; text-align:center }
.button.small { padding:.4rem .65rem; min-height:33px }
.primary { background:var(--gold); color:#20170c }
.primary:not(:disabled):hover { background:#ffe1a1 }
.secondary { border-color:#4b4746; background:#232325; color:var(--text) }
.secondary:not(:disabled):hover { border-color:#a19a90 }
.actions { display:flex; gap:.55rem; align-items:center; flex-wrap:wrap }
.feedback { margin:.75rem 0; color:#ffb7b5; min-height:1.5em }
.feedback:empty { display:none }
.feedback.saved { color:var(--green) }
dialog { background:#1c1a1b; color:var(--text); border:1px solid #605242; max-width:min(430px,calc(100% - 28px)); border-radius:15px; padding:24px }
dialog::backdrop { background:#000a }
dialog p { margin:13px 0 20px; color:#d6cec6 }
dialog .actions { justify-content:flex-end }
.result-list { display:grid; gap:.75rem; margin:1rem 0 }
.result div { display:flex; justify-content:space-between; align-items:center; gap:.5rem; font-size:.9rem }
.result strong { overflow-wrap:anywhere }
.result span { white-space:nowrap; color:#e4cf9e }
progress { width:100%; height:.45rem; display:block; margin-top:.34rem; border:0; border-radius:6px; overflow:hidden; background:#343132; accent-color:var(--gold) }
progress::-webkit-progress-bar { background:#343132 }
progress::-webkit-progress-value { background:var(--gold) }
progress::-moz-progress-bar { background:var(--gold) }
.admin-shell { padding:36px 0 }
.admin-head h1,.login h1 { font-size:clamp(2rem,5vw,3.25rem); margin:.45rem 0 }
.admin-tabs { margin:0 0 1.2rem }
.login { width:min(100%,430px); margin:64px auto }
.login form { margin-top:1.5rem }
.login .button { margin-top:1rem }
.admin-row { display:flex; justify-content:space-between; align-items:center; gap:1rem }
.admin-row h2,.admin-shell .panel h2 { font-size:1.45rem }
label:not(.candidate) { display:grid; gap:.38rem; font-weight:600; min-width:0 }
input:not([type=radio]),textarea,select { width:100%; color:var(--text); background:#101012; border:1px solid #4a4749; border-radius:7px; padding:.55rem .7rem; min-height:41px }
input[type=file] { font-size:.875rem }
textarea { resize:vertical }
fieldset { border:none; padding:0; margin:0; min-inline-size:0 }
.fields { margin-top:1rem; display:grid; grid-template-columns:1fr 1fr; gap:1rem }
.wide { grid-column:1/-1 }
.upload-control { display:flex; align-items:end; flex-wrap:wrap; gap:.5rem; min-width:0 }
.upload-control label { flex:1 1 13rem }
.image-preview { width:48px; height:48px; object-fit:cover; border-radius:6px }
.candidate-edit { display:grid; grid-template-columns:minmax(120px,1fr) minmax(160px,1.6fr) auto; align-items:end; gap:.75rem; padding:.8rem 0; border-top:1px solid var(--border) }
.candidate-edit .actions { padding-bottom:.18rem }
fieldset > .actions { margin-top:1rem }
.stats-pick { max-width:22rem; margin-bottom:1rem }
.metrics { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:1.2rem }
.metrics div { display:grid; padding:14px; background:#242122; border:1px solid var(--border); border-radius:9px }
.metrics strong { font-size:1.75rem; color:var(--gold) }
.table-wrap { overflow-x:auto }
table { width:100%; border-collapse:collapse; text-align:left }
th,td { padding:.7rem; border-bottom:1px solid var(--border); white-space:nowrap }
@media (max-width:800px) {
  .shell,.top-inner { width:calc(100% - 36px) }
  .hero-copy { padding:32px }
  .hero { min-height:360px }
  .hero-art { inset-inline-start:23%; background-position:63% center }
  .detail-grid { grid-template-columns:1fr }
  .detail-aside { grid-row:1 }
  .candidate-edit { grid-template-columns:1fr 1fr }
  .candidate-edit .actions { grid-column:1/-1 }
}
@media (max-width:540px) {
  .top-inner { min-height:58px }
  .top-link { font-size:.79rem }
  .hero { margin-top:18px; min-height:330px; border-radius:17px }
  .hero-art { inset-inline-start:0; background-image:linear-gradient(90deg,#15120ff2,#15120f70 60%,#15120f11),url('/crown.png'); background-position:57% center }
  .hero-copy { padding:20px }
  .hero h1 { font-size:clamp(3.65rem,15vw,5rem) }
  .hero p { max-width:14rem }
  .nominations { margin-top:27px }
  .nominations .section-head { align-items:flex-start; flex-direction:column; gap:.65rem }
  .poll-grid,.fields,.candidate-edit { grid-template-columns:1fr }
  .poll-card { padding:15px }
  .candidate-grid { grid-template-columns:repeat(2,minmax(0,1fr)) }
  .detail-head { padding:19px; flex-wrap:wrap }
  .detail-grid { margin-top:1rem }
  .detail-grid .section-head h2 { font-size:1.3rem }
  .detail-grid .section-head > span { white-space:nowrap; font-size:.82rem }
  .admin-row,.admin-head { align-items:flex-start; flex-direction:column }
  .panel { padding:15px }
  .vote-bar { align-items:stretch; flex-direction:column }
  .footer { margin-top:24px }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none !important } }
