:root {
    color-scheme: dark;
    --bg: #080a12;
    --panel: rgba(255, 255, 255, 0.075);
    --panel-strong: rgba(255, 255, 255, 0.12);
    --text: #f7f7fb;
    --muted: #a6adc8;
    --line: rgba(255, 255, 255, 0.14);
    --accent: #ffcc66;
    --accent-2: #ff6b6b;
    --good: #72e6a6;
    --bad: #ff8a8a;
    --shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 204, 102, 0.18), transparent 34rem),
        radial-gradient(circle at top right, rgba(255, 107, 107, 0.16), transparent 38rem),
        linear-gradient(135deg, #080a12 0%, #111423 100%);
    color: var(--text);
}

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.shell {
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 40px 0 60px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    font-weight: 800;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 14px;
    font-size: clamp(2.4rem, 7vw, 5.4rem);
    line-height: 0.9;
    letter-spacing: -0.08em;
}

h2 {
    margin-bottom: 0;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
}

.hero-copy {
    width: min(680px, 100%);
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

.hero-card,
.panel {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.hero-card {
    border-radius: 28px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 220px;
}

.hero-card-label {
    color: var(--muted);
    font-weight: 700;
}

.hero-card strong {
    display: block;
    margin: 12px 0;
    font-size: 2.8rem;
    line-height: 1;
    color: var(--accent);
}

.hero-card small {
    color: var(--muted);
    line-height: 1.5;
}

.panel {
    border-radius: 28px;
    padding: 22px;
}

.controls {
    margin-bottom: 24px;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

label {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

input,
select {
    width: 100%;
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    outline: none;
    color: var(--text);
    background: rgba(3, 5, 12, 0.64);
}

input:focus,
select:focus {
    border-color: rgba(255, 204, 102, 0.68);
}

.price-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 18px 0;
}

.price-filter span {
    color: var(--muted);
    font-weight: 800;
    margin-right: 4px;
}

.price-filter label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.price-filter input {
    width: auto;
    margin: 0;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary,
.secondary {
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 900;
}

.primary {
    background: linear-gradient(135deg, var(--accent), #ffe3a0);
    color: #19120a;
}

.secondary {
    background: linear-gradient(135deg, var(--accent-2), #ffb36b);
    color: #1f0b0b;
}

.status {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.layout {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 24px;
    align-items: start;
}

.wheel-panel {
    position: sticky;
    top: 24px;
}

.wheel-wrap {
    position: relative;
    width: min(100%, 520px);
    margin: 0 auto;
    aspect-ratio: 1;
}

#wheelCanvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.32));
}

.pointer {
    position: absolute;
    left: 50%;
    top: -4px;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 36px solid var(--accent);
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}

.winner-card {
    margin-top: 18px;
    border: 1px solid rgba(255, 204, 102, 0.38);
    border-radius: 22px;
    padding: 18px;
    background: rgba(255, 204, 102, 0.10);
}

.winner-card h3 {
    margin: 0 0 8px;
    font-size: 1.4rem;
}

.winner-card p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.55;
}

.hidden {
    display: none;
}

.results-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.badge {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.restaurant-list {
    display: grid;
    gap: 12px;
}

.restaurant-list.empty {
    color: var(--muted);
}

.restaurant-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.055);
}

.restaurant-card h3 {
    margin: 0 0 8px;
    font-size: 1.06rem;
    line-height: 1.25;
}

.restaurant-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.91rem;
    line-height: 1.45;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.meta span,
.map-link {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.075);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.map-link {
    color: #121212;
    background: var(--accent);
}

.price-pill {
    justify-self: end;
    align-self: start;
    min-width: 64px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 204, 102, 0.12);
    color: var(--accent);
    text-align: center;
    font-weight: 1000;
}

@media (max-width: 900px) {
    .hero,
    .layout,
    .control-grid {
        grid-template-columns: 1fr;
    }

    .wheel-panel {
        position: static;
    }
}

@media (max-width: 560px) {
    .shell {
        width: min(100% - 20px, 1180px);
        padding-top: 20px;
    }

    .panel,
    .hero-card {
        border-radius: 22px;
        padding: 16px;
    }

    .restaurant-card {
        grid-template-columns: 1fr;
    }

    .price-pill {
        justify-self: start;
    }
}
