:root {
    --accent: #f5b700;
    --accent-strong: #e0a400;
    --accent-strong: color-mix(in srgb, var(--accent) 82%, #6b4d00);
    --accent-deep: #8a6400;
    --accent-deep: color-mix(in srgb, var(--accent) 52%, #3d2b00);
    --ink: #15120c;
    --ink-soft: #6a6255;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-soft: #fffcf4;
    --line: #ece4d4;
    --line-strong: #e0d5be;
    --tile-1: #241c10;
    --tile-2: #100d08;
    --radius: clamp(14px, 1.2vw, 26px);
    --pad: clamp(16px, 2vw, 40px);
    --card-w: clamp(200px, 23vw, 430px);
    --shadow-card: 0 10px 30px rgba(30, 22, 5, 0.07), 0 2px 6px rgba(30, 22, 5, 0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body.display {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% -8%, rgba(245, 183, 0, 0.18), transparent 36%),
        radial-gradient(circle at 102% 108%, rgba(245, 183, 0, 0.1), transparent 40%),
        var(--bg);
    font-family: "Manrope", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

body.display::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(21, 18, 12, 0.05) 1px, transparent 1px);
    background-size: 5px 5px;
    opacity: 0.5;
    z-index: 0;
}

body.hide-cursor {
    cursor: none;
}

.topbar {
    position: relative;
    z-index: 2;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 32px);
    padding: clamp(10px, 1.2vw, 22px) var(--pad);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(30, 22, 5, 0.04);
}

.brand {
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.8vw, 16px);
    flex: 0 0 auto;
}

.brand-mark {
    width: clamp(42px, 3.6vw, 74px);
    height: clamp(42px, 3.6vw, 74px);
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffd968, var(--accent) 48%, #c58f00);
    color: #221a00;
    font-family: "Anton", "Arial Black", sans-serif;
    font-size: clamp(16px, 1.35vw, 28px);
    letter-spacing: 0.04em;
    box-shadow: 0 8px 22px rgba(245, 183, 0, 0.38), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.brand-logo {
    height: clamp(42px, 3.6vw, 74px);
    width: auto;
    max-width: clamp(90px, 9vw, 190px);
    object-fit: contain;
}

.brand-text h1 {
    font-family: "Anton", "Arial Black", sans-serif;
    font-weight: 400;
    font-size: clamp(18px, 1.65vw, 34px);
    line-height: 1;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.brand-text p {
    margin-top: 0.45em;
    color: var(--accent-deep);
    font-size: clamp(8px, 0.6vw, 13px);
    font-weight: 700;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 0.45vw, 10px);
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.tab {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink-soft);
    font-family: inherit;
    font-size: clamp(10px, 0.82vw, 17px);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.6em 0.95em;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.tab:hover {
    color: var(--ink);
    background: #fff6dc;
}

.tab.is-active {
    background: var(--accent);
    color: #221a00;
    box-shadow: 0 8px 20px rgba(245, 183, 0, 0.3);
}

.clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1;
    flex: 0 0 auto;
}

#clock-time {
    font-size: clamp(20px, 1.85vw, 38px);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

#clock-date {
    margin-top: 0.55em;
    color: var(--ink-soft);
    font-size: clamp(8px, 0.6vw, 13px);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.stage {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    padding: clamp(12px, 1.5vw, 28px) var(--pad);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.992);
    transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s;
    pointer-events: none;
}

.slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}

.slide-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1vw;
    flex: 0 0 auto;
    margin-bottom: clamp(10px, 1.1vw, 22px);
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.65em;
    color: var(--accent-deep);
    font-size: clamp(9px, 0.72vw, 15px);
    font-weight: 800;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.kicker::before {
    content: "";
    width: clamp(18px, 1.6vw, 34px);
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

.slide-title {
    margin-top: 0.18em;
    font-family: "Anton", "Arial Black", sans-serif;
    font-weight: 400;
    font-size: clamp(26px, 3.5vw, 72px);
    line-height: 0.95;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    background: linear-gradient(180deg, #1b1711 10%, #554b39 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.slide-count {
    color: var(--ink-soft);
    font-size: clamp(9px, 0.68vw, 14px);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    margin-bottom: 0.35em;
    padding: 0.5em 0.9em;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.grid {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), var(--card-w));
    grid-auto-rows: max-content;
    align-content: center;
    justify-content: center;
    gap: clamp(8px, 1vw, 20px);
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(30, 22, 5, 0.12);
}

.slide.is-active .card {
    animation: card-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 45ms);
}

.card--featured {
    border-color: rgba(245, 183, 0, 0.7);
    box-shadow: 0 0 0 1px rgba(245, 183, 0, 0.35), 0 14px 38px rgba(245, 183, 0, 0.16);
}

.card--featured .card-media {
    background:
        radial-gradient(circle at 32% 18%, rgba(245, 183, 0, 0.28), transparent 58%),
        linear-gradient(158deg, #2b2213, var(--tile-2));
}

.card-media {
    position: relative;
    flex: 0 0 auto;
    aspect-ratio: 4 / 5;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 32% 18%, rgba(245, 183, 0, 0.18), transparent 58%),
        linear-gradient(158deg, var(--tile-1), var(--tile-2));
}

.card-media:not(.has-photo)::before {
    content: "";
    position: absolute;
    height: 76%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 26%, rgba(245, 183, 0, 0.16), rgba(255, 255, 255, 0.02) 62%);
    border: 1px solid rgba(245, 183, 0, 0.16);
}

.card-media img {
    position: relative;
    z-index: 1;
    height: 58%;
    width: auto;
    max-width: 64%;
    object-fit: contain;
    filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.4));
    transition: transform 0.6s ease;
}

.card:hover .card-media img {
    transform: scale(1.04);
}

.card-media.has-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    filter: none;
}

.card-media.has-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 56%, rgba(0, 0, 0, 0.3));
}

.badge {
    position: absolute;
    top: clamp(8px, 0.8vw, 16px);
    left: clamp(8px, 0.8vw, 16px);
    z-index: 2;
    padding: 0.5em 0.85em;
    border-radius: 999px;
    background: var(--accent);
    color: #221a00;
    font-size: clamp(7px, 0.58vw, 12px);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    padding: clamp(10px, 0.95vw, 19px) clamp(12px, 1.05vw, 21px) clamp(12px, 1.05vw, 21px);
    background: var(--surface);
}

.card-name {
    min-height: 1.2em;
    font-size: clamp(13px, 1vw, 22px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc {
    min-height: 1.35em;
    color: var(--ink-soft);
    font-size: clamp(9px, 0.62vw, 12.5px);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-price {
    margin-top: auto;
    padding-top: 0.1em;
    color: var(--accent-deep);
    font-size: clamp(16px, 1.35vw, 29px);
    font-weight: 900;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.grid--dense .card-media {
    aspect-ratio: 16 / 9;
}

.grid--dense .card-body {
    gap: 0.15em;
    padding: clamp(9px, 0.8vw, 15px) clamp(11px, 0.9vw, 18px) clamp(10px, 0.9vw, 18px);
}

.grid--dense .card-name {
    font-size: clamp(12px, 0.9vw, 19px);
}

.grid--dense .card-desc {
    font-size: clamp(8px, 0.55vw, 11px);
}

.grid--dense .card-price {
    font-size: clamp(14px, 1.1vw, 23px);
}

/* ===== Full menu board (printed menu style, no photos) ===== */
.menu-board {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: clamp(16px, 1.7vw, 36px) clamp(18px, 1.9vw, 42px);
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background:
        radial-gradient(circle at 10% -4%, rgba(245, 183, 0, 0.12), transparent 42%),
        radial-gradient(circle at 96% 108%, rgba(245, 183, 0, 0.08), transparent 46%),
        linear-gradient(180deg, #fffefb, #fff9ee);
    box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(224, 213, 190, 0.55);
    scrollbar-width: none;
}

.menu-board::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.menu-board-inner {
    position: relative;
    z-index: 1;
    columns: var(--menu-cols, 3);
    column-gap: clamp(22px, 2.4vw, 60px);
    column-rule: 1px dashed var(--line-strong);
}

.menu-board--single .menu-board-inner {
    max-width: min(900px, 100%);
    margin-inline: auto;
}

.menu-section {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin: 0 0 clamp(16px, 1.5vw, 30px);
}

.menu-section:last-child {
    margin-bottom: 0;
}

.menu-section-title {
    display: flex;
    align-items: center;
    gap: 0.55em;
    margin-bottom: 0.55em;
    padding-bottom: 0.35em;
    border-bottom: 2px solid var(--accent);
    font-family: "Anton", "Arial Black", sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.15vw, 23px);
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
}

.menu-section-mark {
    flex: 0 0 auto;
    width: 0.52em;
    height: 0.52em;
    background: linear-gradient(145deg, #ffd968, var(--accent) 60%, #c58f00);
    transform: rotate(45deg);
    box-shadow: 0 0 0 3px rgba(245, 183, 0, 0.16);
}

.menu-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.62vw, 13px);
}

.menu-item {
    min-width: 0;
}

.menu-item-head {
    display: flex;
    align-items: baseline;
    gap: 0.55em;
}

.menu-item-name {
    flex: 0 1 auto;
    min-width: 0;
    font-size: clamp(11px, 0.84vw, 17px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.menu-item-badge {
    display: inline-block;
    margin-left: 0.4em;
    padding: 0.14em 0.5em;
    border-radius: 999px;
    background: rgba(245, 183, 0, 0.18);
    color: var(--accent-deep);
    font-size: clamp(6.5px, 0.48vw, 9.5px);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

.menu-item-leader {
    flex: 1 1 auto;
    min-width: 14px;
    transform: translateY(-0.2em);
    border-bottom: 1px dotted var(--line-strong);
}

.menu-item-price {
    flex: 0 0 auto;
    color: var(--accent-deep);
    font-size: clamp(11px, 0.92vw, 18px);
    font-weight: 900;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.menu-item-desc {
    margin-top: 0.12em;
    color: var(--ink-soft);
    font-size: clamp(8px, 0.6vw, 11.5px);
    line-height: 1.32;
}

.menu-board--dense .menu-section {
    margin-bottom: clamp(10px, 1vw, 18px);
}

.menu-board--dense .menu-items {
    gap: clamp(4px, 0.45vw, 8px);
}

.menu-board--dense .menu-item-name {
    font-size: clamp(10px, 0.72vw, 14px);
}

.menu-board--dense .menu-item-price {
    font-size: clamp(10px, 0.78vw, 15px);
}

.menu-board--dense .menu-item-desc {
    display: none;
}

.slide--menu .slide-head {
    margin-bottom: clamp(8px, 0.9vw, 18px);
}

.empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 0.6em;
    text-align: center;
}

.empty strong {
    font-family: "Anton", "Arial Black", sans-serif;
    font-weight: 400;
    font-size: clamp(26px, 3vw, 58px);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.empty span {
    color: var(--ink-soft);
    font-size: clamp(12px, 1vw, 20px);
}

.progress {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    height: 4px;
    background: #f1e8d5;
}

.progress-fill {
    height: 100%;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, var(--accent), #ffe08a);
    box-shadow: 0 0 12px rgba(245, 183, 0, 0.55);
}

.paused-badge {
    position: fixed;
    top: calc(clamp(10px, 1.2vw, 22px) * 2 + clamp(42px, 3.6vw, 74px) + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    z-index: 60;
    padding: 0.55em 1.1em;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.96);
    color: var(--accent-deep);
    font-size: clamp(9px, 0.7vw, 13px);
    font-weight: 800;
    letter-spacing: 0.24em;
    box-shadow: 0 10px 26px rgba(30, 22, 5, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

body.is-paused .paused-badge {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

body.is-paused .progress-fill {
    opacity: 0.35;
}

@keyframes card-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 1100px) {
    .tabs {
        display: none;
    }
}

@media (max-width: 900px) {
    .brand-text h1 {
        font-size: 16px;
    }

    .brand-text p {
        font-size: 8px;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: max-content;
        align-content: start;
        overflow: auto;
    }

    .grid--dense .card-media {
        aspect-ratio: 4 / 3;
    }

    .card-desc {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .slide,
    .card,
    .card-media img {
        animation: none !important;
        transition: none !important;
    }
}
