:root {
    --bg: #070910;
    --panel: rgba(17, 21, 33, .86);
    --panel-2: #111625;
    --line: rgba(255,255,255,.10);
    --text: #f6f7fb;
    --muted: #9299aa;
    --gold: #d8b35b;
    --gold-2: #f1d990;
    --danger: #ff6f7d;
    --success: #71e0ad;
    --shadow: 0 24px 80px rgba(0,0,0,.38);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -20%, rgba(216,179,91,.18), transparent 34rem),
        radial-gradient(circle at 0% 40%, rgba(72,83,132,.16), transparent 30rem),
        var(--bg);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
}

button, input { font: inherit; }
button { touch-action: manipulation; }

.page-shell { min-height: 100vh; }
.hero {
    text-align: center;
    padding: 72px 20px 44px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 0;
    width: min(900px, 90vw); height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(216,179,91,.65), transparent);
}
.hero__eyebrow, .section-kicker {
    display: block;
    color: var(--gold);
    font-size: 11px;
    letter-spacing: .22em;
    font-weight: 800;
}
.hero h1 {
    margin: 12px 0 8px;
    font-size: clamp(34px, 7vw, 66px);
    letter-spacing: .045em;
    line-height: 1;
    font-weight: 900;
}
.hero > p { margin: 0; color: var(--muted); }
.hero__stats {
    margin: 28px auto 0;
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.025);
    overflow: hidden;
}
.hero__stats div { padding: 13px 22px; }
.hero__stats div + div { border-left: 1px solid var(--line); }
.hero__stats strong { display:block; font-size: 23px; }
.hero__stats span { display:block; margin-top:2px; color:var(--muted); font-size:11px; }

.content {
    width: min(980px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0 72px;
}
.panel {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(24,29,45,.88), rgba(13,16,27,.94));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}
.panel + .panel { margin-top: 18px; }
.panel--compact { padding-bottom: 22px; }
.section-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    margin-bottom:22px;
}
.section-head h2, .dialog h2 { margin: 5px 0 0; font-size: 24px; }

.button {
    border: 1px solid rgba(216,179,91,.4);
    border-radius: 12px;
    padding: 11px 15px;
    color: #15120a;
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(216,179,91,.12);
}
.button:hover { filter: brightness(1.06); }
.button--ghost { color: var(--gold-2); background: rgba(216,179,91,.06); box-shadow: none; }
.button--wide { width:100%; padding: 14px 18px; }
.button--primary { font-size: 15px; }

.notice {
    margin-bottom: 16px;
    padding: 13px 15px;
    border-radius: 12px;
    border:1px solid var(--line);
    background: rgba(255,255,255,.04);
}
.notice--success { border-color: rgba(113,224,173,.34); color: #b9f3d5; background: rgba(113,224,173,.08); }
.notice--error { border-color: rgba(255,111,125,.35); color: #ffc4ca; background: rgba(255,111,125,.08); }

.candidate-list { display:grid; gap:10px; }
.candidate-card {
    position:relative;
    display:grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap:14px;
    align-items:center;
    min-height:86px;
    padding:14px 18px;
    border:1px solid var(--line);
    border-radius:16px;
    background: rgba(255,255,255,.025);
    cursor:pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
    overflow:hidden;
}
.candidate-card:hover { transform: translateY(-1px); border-color: rgba(216,179,91,.35); }
.candidate-card:has(input:checked) {
    border-color: rgba(216,179,91,.8);
    background: rgba(216,179,91,.08);
    box-shadow: inset 0 0 0 1px rgba(216,179,91,.12);
}
.candidate-card input { position:absolute; opacity:0; pointer-events:none; }
.candidate-card__rank { color:var(--gold); font-size:12px; font-weight:900; letter-spacing:.08em; }
.candidate-card__main { min-width:0; }
.candidate-card__name { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:18px; font-weight:850; }
.candidate-card__bar { display:block; margin-top:10px; height:4px; border-radius:999px; background:rgba(255,255,255,.07); overflow:hidden; }
.candidate-card__bar i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--gold),var(--gold-2)); }
.candidate-card__score { text-align:right; min-width:64px; }
.candidate-card__score strong { display:block; font-size:24px; line-height:1; }
.candidate-card__score small { display:block; margin-top:5px; color:var(--muted); font-size:10px; }
.candidate-card__check {
    position:absolute; right:10px; top:8px;
    width:20px; height:20px; border-radius:50%;
    display:grid; place-items:center;
    opacity:0; transform:scale(.75);
    color:#171208; background:var(--gold-2); font-size:12px; font-weight:900;
    transition:.18s ease;
}
.candidate-card:has(input:checked) .candidate-card__check { opacity:1; transform:scale(1); }

.vote-box {
    margin-top:18px;
    padding:18px;
    border-radius:18px;
    border:1px solid var(--line);
    background:rgba(4,6,11,.38);
}
.field-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:12px; }
.field { display:block; margin: 12px 0; }
.field-grid .field { margin:0; }
.field span { display:block; margin:0 0 7px; color:#d7dae4; font-size:12px; font-weight:750; }
.field input {
    width:100%;
    border:1px solid rgba(255,255,255,.11);
    border-radius:11px;
    padding:13px 14px;
    color:var(--text);
    background:#090c14;
    outline:none;
}
.field input:focus { border-color:rgba(216,179,91,.72); box-shadow:0 0 0 3px rgba(216,179,91,.08); }
.form-note, .muted, .privacy-note { color:var(--muted); }
.form-note { margin:10px 2px 0; text-align:center; font-size:11px; line-height:1.6; }

.status-count { padding:7px 10px; border-radius:999px; color:var(--gold-2); background:rgba(216,179,91,.08); font-size:12px; font-weight:800; }
.voter-chips { display:flex; flex-wrap:wrap; gap:8px; }
.voter-chip { display:inline-flex; align-items:center; gap:7px; padding:8px 10px; border:1px solid var(--line); border-radius:999px; color:#d9dde8; background:rgba(255,255,255,.025); font-size:12px; }
.voter-chip i { width:7px; height:7px; border-radius:50%; background:var(--success); box-shadow:0 0 12px rgba(113,224,173,.5); }
.privacy-note { max-width:700px; margin:18px auto 0; text-align:center; font-size:10px; line-height:1.7; }

.empty-state { padding:52px 20px; text-align:center; border:1px dashed rgba(255,255,255,.13); border-radius:18px; background:rgba(255,255,255,.015); }
.empty-state__icon { margin-bottom:8px; color:var(--gold); font-size:34px; }
.empty-state h3 { margin:0 0 7px; }
.empty-state p { margin:0 0 20px; color:var(--muted); }

.dialog {
    width:min(500px, calc(100% - 26px));
    padding:0;
    border:0;
    border-radius:22px;
    color:var(--text);
    background:transparent;
}
.dialog::backdrop { background:rgba(0,0,0,.72); backdrop-filter:blur(8px); }
.dialog__card { position:relative; padding:26px; border:1px solid var(--line); border-radius:22px; background:#111521; box-shadow:var(--shadow); }
.dialog__close { position:absolute; top:13px; right:13px; width:34px; height:34px; border:1px solid var(--line); border-radius:50%; color:var(--muted); background:rgba(255,255,255,.03); cursor:pointer; }
.dialog .muted { margin:8px 0 20px; font-size:13px; line-height:1.6; }

@media (max-width: 680px) {
    .hero { padding:52px 18px 34px; }
    .content { width:min(100% - 18px, 980px); padding-top:18px; }
    .panel { padding:18px 14px; border-radius:19px; }
    .section-head { align-items:flex-start; }
    .section-head h2 { font-size:21px; }
    .button--ghost { padding:9px 10px; font-size:12px; white-space:nowrap; }
    .candidate-card { grid-template-columns:38px minmax(0, 1fr) 58px; min-height:78px; padding:12px 13px; gap:9px; }
    .candidate-card__name { font-size:16px; }
    .candidate-card__score strong { font-size:21px; }
    .field-grid { grid-template-columns:1fr; }
    .vote-box { padding:14px 12px; }
}


.voter-locked { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.voter-locked p { margin:0; }
.voter-hide-form { margin-top:16px; text-align:right; }

@media (max-width: 680px) {
    .voter-locked { align-items:stretch; flex-direction:column; }
}
