:root {
    --bg: #111510;
    --panel: rgba(27, 35, 28, 0.92);
    --panel-soft: rgba(39, 49, 40, 0.85);
    --line: rgba(188, 162, 96, 0.22);
    --text: #edf0e6;
    --muted: #b7c0b0;
    --accent: #c7a45a;
    --accent-strong: #f1c979;
    --danger: #d46958;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Source Sans 3', sans-serif;
    background:
        radial-gradient(circle at top, rgba(199, 164, 90, 0.18), transparent 30%),
        linear-gradient(180deg, #1b211a 0%, #0f130f 100%);
    color: var(--text);
    min-height: 100vh;
}

img,
svg,
canvas {
    max-width: 100%;
    height: auto;
}

.container { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.hero { padding: 3rem 0 2rem; }
.hero__content, .panel__header, .wheel-layout, .grid-two, .zone-row, .timeline__item {
    display: flex;
    gap: 1.5rem;
}
.hero__content, .panel__header, .zone-row, .timeline__item {
    justify-content: space-between;
    align-items: center;
}
.hero h1, .panel h1, .panel h2, .panel h3 {
    font-family: 'Oswald', sans-serif;
    letter-spacing: .03em;
    margin: 0 0 .5rem;
}
.hero h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
.hero__lead, .muted, .zone-row p, .timeline p { color: var(--muted); }
.eyebrow, .section-tag {
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .82rem;
    color: var(--accent-strong);
}
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}
.panel--wheel { margin-bottom: 1.5rem; }
.panel--inner { background: var(--panel-soft); }
.panel--admin { margin: 2rem 0; }
.admin-link, .btn-primary, .btn-danger {
    border: 0;
    border-radius: 999px;
    padding: .9rem 1.2rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-weight: 700;
    cursor: pointer;
}
.admin-link, .btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #17130b;
}
.btn-danger {
    background: rgba(212, 105, 88, .16);
    color: #ffd8d0;
    border: 1px solid rgba(212, 105, 88, .4);
}
.wheel-layout, .grid-two { align-items: stretch; flex-wrap: wrap; }
.wheel-card, .result-card, .grid-two > * { flex: 1 1 320px; }
.wheel-card, .result-card, .auth-card {
    background: linear-gradient(180deg, rgba(31, 39, 32, .94) 0%, rgba(16, 20, 17, .96) 100%);
    border-radius: 24px;
    border: 1px solid var(--line);
    padding: 1.5rem;
    position: relative;
}
.wheel-card {
    min-height: 430px;
    display: grid;
    place-items: center;
    overflow: hidden;
    gap: 1rem;
}
.wheel-pointer {
    position: absolute;
    top: 1rem;
    z-index: 4;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent-strong);
    color: #251b09;
    font-size: 1.3rem;
}
.wheel {
    --rotation: 0deg;
    --spin-duration: 4200ms;
    width: min(78vw, 380px);
    aspect-ratio: 1;
    border-radius: 50%;
    position: relative;
    border: 12px solid rgba(255, 255, 255, .08);
    box-shadow: inset 0 0 0 10px rgba(0, 0, 0, .16), 0 20px 60px rgba(0, 0, 0, .32);
    transform: rotate(var(--rotation));
    transition: transform var(--spin-duration) cubic-bezier(.12,.8,.18,1);
    background: conic-gradient(from -90deg, #4a5d3e 0deg 45deg, #667d4b 45deg 90deg, #7f6a3f 90deg 135deg, #9d824e 135deg 180deg, #4a5d3e 180deg 225deg, #667d4b 225deg 270deg, #7f6a3f 270deg 315deg, #9d824e 315deg 360deg);
}
.wheel::after {
    content: "";
    position: absolute;
    inset: 50%;
    width: 24%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #f4d287, #8d7138 70%);
    box-shadow: 0 0 0 8px rgba(0, 0, 0, .14);
}
.wheel__segment { position: absolute; inset: 0; transform: rotate(calc(360deg / var(--count) * var(--i))); }
.wheel__segment span {
    position: absolute;
    left: 50%;
    top: 13%;
    transform: translateX(-50%) rotate(90deg);
    width: 110px;
    text-align: center;
    font-weight: 700;
    font-size: .9rem;
    color: #f7f3e9;
}
.wheel--spinning {
    filter: saturate(1.1) brightness(1.04);
}
.wheel-legend {
    width: 100%;
    display: none;
    gap: .5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.wheel-legend__item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .65rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .06);
    min-width: 0;
}
.wheel-legend__item span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wheel-legend__badge {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(199, 164, 90, .16);
    color: var(--accent-strong);
    font-weight: 700;
}
.result-card { display: flex; flex-direction: column; justify-content: center; }
.result-card__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(199, 164, 90, .14);
    color: var(--accent-strong);
    font-size: 1.9rem;
    margin-bottom: 1rem;
}
.result-card__status {
    min-height: 1.5rem;
    margin-bottom: .4rem;
    color: var(--accent-strong);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: .8rem;
}
.zone-list, .timeline, .stack { display: grid; gap: 1rem; }
.zone-row, .timeline__item {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 18px;
    padding: 1rem 1.1rem;
}
.zone-votes { text-align: center; min-width: 96px; }
.zone-votes span {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: var(--accent-strong);
}
.analytics-bar {
    width: 100%;
    height: 10px;
    margin-top: .7rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, .07);
}
.analytics-bar__fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8f7442 0%, #f1c979 100%);
}
.analytics-item {
    align-items: center;
}
.analytics-item__content {
    flex: 1 1 auto;
    min-width: 0;
}
.analytics-item__percent {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: var(--accent-strong);
    white-space: nowrap;
}
.alert { padding: .95rem 1rem; border-radius: 16px; margin-bottom: 1rem; }
.alert--success { background: rgba(126, 192, 139, .14); border: 1px solid rgba(126, 192, 139, .35); }
.alert--warning { background: rgba(241, 201, 121, .12); border: 1px solid rgba(241, 201, 121, .28); }
.alert--danger { background: rgba(212, 105, 88, .14); border: 1px solid rgba(212, 105, 88, .35); }
input, textarea {
    width: 100%;
    margin-top: .45rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(7, 10, 7, .35);
    color: var(--text);
    padding: .9rem 1rem;
    font: inherit;
}
.auth-page { display: grid; place-items: center; padding: 2rem; }
.auth-card { width: min(100%, 460px); }
.stat-badge {
    display: inline-flex;
    gap: .65rem;
    align-items: center;
    background: rgba(255, 255, 255, .05);
    padding: .8rem 1rem;
    border-radius: 999px;
}
small {
    color: var(--muted);
}
form {
    margin: 0;
}
button,
input,
textarea {
    -webkit-appearance: none;
    appearance: none;
}
@media (max-width: 768px) {
    .hero__content, .panel__header, .zone-row, .timeline__item {
        flex-direction: column;
        align-items: flex-start;
    }
    .container {
        width: min(100% - 1rem, calc(100% - 1rem));
    }
    .hero {
        padding: 1.5rem 0 1rem;
    }
    .hero h1 {
        font-size: clamp(2.2rem, 11vw, 3.4rem);
        line-height: .95;
    }
    .hero__lead {
        font-size: 1rem;
        max-width: 32rem;
    }
    .panel,
    .wheel-card,
    .result-card,
    .auth-card {
        padding: 1rem;
        border-radius: 20px;
    }
    .panel__header {
        gap: .85rem;
    }
    .stat-badge,
    .admin-link,
    .btn-primary,
    .btn-danger {
        width: 100%;
        justify-content: center;
    }
    .wheel-layout,
    .grid-two {
        gap: 1rem;
    }
    .wheel-card {
        min-height: auto;
        padding-top: 4.3rem;
    }
    .wheel {
        width: min(78vw, 320px);
    }
    .wheel__segment span {
        display: none;
    }
    .wheel-legend {
        display: grid;
    }
    .result-card {
        gap: .25rem;
    }
    .result-card p,
    .result-card h3 {
        max-width: 36rem;
    }
    .wheel::after {
        width: 20%;
    }
    .wheel-pointer {
        top: .55rem;
    }
    .wheel-card {
        place-items: center;
    }
    .wheel-legend__item {
        padding: .5rem .55rem;
    }
    .wheel-legend__item span:last-child {
        font-size: .82rem;
        line-height: 1.05;
    }
    .wheel-pointer {
        width: 48px;
        height: 48px;
        font-size: 1.05rem;
    }
    .result-card__icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    .zone-row,
    .timeline__item {
        padding: .9rem;
    }
    .analytics-item__percent {
        font-size: 1.5rem;
    }
    .zone-votes {
        min-width: 100%;
        text-align: left;
    }
    .zone-votes span {
        font-size: 1.6rem;
    }
    input,
    textarea {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    .container {
        width: calc(100% - .75rem);
    }
    .hero h1 {
        font-size: clamp(1.9rem, 12vw, 2.8rem);
    }
    .eyebrow,
    .section-tag {
        font-size: .68rem;
        letter-spacing: .12em;
    }
    .panel,
    .wheel-card,
    .result-card,
    .auth-card {
        padding: .9rem;
    }
    .wheel-card {
        min-height: auto;
        padding-top: 3.6rem;
    }
    .wheel {
        width: min(82vw, 270px);
        border-width: 8px;
    }
    .result-card h3,
    .panel h2 {
        font-size: 1.35rem;
    }
    .admin-shell.container {
        width: calc(100% - .75rem);
    }
    .panel h2,
    .panel h3 {
        line-height: 1.05;
    }
    .timeline__item i,
    .zone-row i {
        font-size: 1rem;
    }
    .analytics-item__percent {
        font-size: 1.3rem;
    }
    .wheel-legend {
        grid-template-columns: 1fr;
    }
}
