:root {
    --bg: #0f1419;
    --surface: #1a2332;
    --surface-2: #243044;
    --text: #f0f4f8;
    --muted: #94a3b8;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #fbbf24;
    --radius: 12px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: linear-gradient(180deg, #0f1419 0%, #162032 100%);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.5;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

a {
    color: var(--accent);
    text-decoration: none;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.site-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 20, 25, 0.96);
    position: sticky;
    top: 0;
    z-index: 100;
}

@media (hover: hover) and (pointer: fine) {
    .site-header {
        backdrop-filter: blur(8px);
        background: rgba(15, 20, 25, 0.9);
    }
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.site-header nav {
    display: flex;
    gap: 1rem;
}

.site-header nav a {
    color: var(--muted);
    font-weight: 500;
}

.site-header nav a:hover {
    color: var(--text);
}

main.container {
    padding: 1.5rem 0 calc(6.5rem + env(safe-area-inset-bottom, 0px));
}

body.has-compare-bar main.container {
    padding-bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px));
}

body.has-order-bar main.container {
    padding-bottom: calc(10rem + env(safe-area-inset-bottom, 0px));
}

body.has-order-bar.has-compare-bar main.container {
    padding-bottom: calc(12.5rem + env(safe-area-inset-bottom, 0px));
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.hero p {
    color: var(--muted);
    margin: 0;
}

.menu-section {
    margin-bottom: 2.5rem;
}

.menu-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.accordion-item {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.accordion-item:not(.is-open) .accordion-trigger {
    border-radius: calc(var(--radius) - 1px);
}

.accordion-item.is-open .accordion-trigger {
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}

.accordion-item.is-open .accordion-panel {
    border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px);
}

.accordion-trigger {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    min-height: 56px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background 0.2s;
}

.accordion-trigger:hover,
.accordion-trigger:focus-visible {
    background: rgba(255, 255, 255, 0.04);
    outline: none;
}

.accordion-item.is-open .accordion-trigger {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(245, 158, 11, 0.06);
}

.accordion-label {
    position: relative;
    padding-left: 0.85rem;
}

.accordion-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 3px;
    border-radius: 999px;
    background: var(--accent);
}

.accordion-meta {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.accordion-chevron {
    display: inline-flex;
    color: var(--muted);
    transition: transform 0.25s ease, color 0.2s;
}

.accordion-chevron .dish-icon-svg {
    width: 20px;
    height: 20px;
}

.accordion-item.is-open .accordion-chevron {
    transform: rotate(180deg);
    color: var(--accent);
}

.accordion-panel {
    padding: 0 1rem 1rem;
    overflow: visible;
}

.accordion-panel[hidden] {
    display: none;
}

.accordion-empty {
    margin: 0.75rem 0 0.25rem;
    padding: 1.25rem;
    text-align: center;
    color: var(--muted);
    background: var(--surface-2);
    border-radius: 10px;
    font-size: 0.92rem;
}

.menu-section h2 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.dish-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 1.25rem;
}

.dish-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.dish-preview {
    background: var(--surface-2);
    height: 220px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: stretch;
    overflow: hidden;
    position: relative;
}

.dish-preview-media {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-width: 0;
    cursor: zoom-in;
    touch-action: pan-y;
}

.dish-preview-media img,
.dish-preview-media model-viewer,
.dish-preview-media .dish-preview-placeholder {
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(1);
    transform-origin: center center;
}

@media (hover: hover) and (pointer: fine) {
    .dish-preview-media img,
    .dish-preview-media model-viewer,
    .dish-preview-media .dish-preview-placeholder {
        will-change: transform;
    }

    .dish-preview-media:hover img,
    .dish-preview-media:hover model-viewer,
    .dish-preview-media:hover .dish-preview-placeholder {
        transform: scale(1.14);
    }
}

.dish-preview-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    padding: 0.5rem;
    background: var(--surface-2);
}

.dish-preview-media model-viewer {
    width: 100%;
    height: 220px;
    --poster-color: transparent;
}

.dish-icon-rail {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.35rem 0.15rem;
    z-index: 2;
    flex-shrink: 0;
    background: linear-gradient(90deg, rgba(15, 20, 25, 0.82), rgba(15, 20, 25, 0.35));
}

.dish-icon-rail--right {
    background: linear-gradient(270deg, rgba(15, 20, 25, 0.82), rgba(15, 20, 25, 0.35));
}

.dish-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: rgba(15, 20, 25, 0.35);
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, transform 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.dish-icon-btn:hover,
.dish-icon-btn:focus-visible {
    color: #e2e8f0;
    background: rgba(15, 20, 25, 0.55);
    outline: none;
}

.dish-icon-btn.is-active:not(.dish-icon-btn--favorite) {
    color: #f59e0b;
}

.dish-icon-btn--favorite.is-active {
    color: #ef4444;
}

.dish-icon-btn--favorite.is-active .dish-icon-svg {
    fill: #ef4444;
    stroke: #ef4444;
}

.dish-icon-btn.is-popping {
    animation: icon-pop 0.35s ease;
}

.dish-icon-btn.is-flash {
    animation: icon-flash 0.3s ease;
}

@keyframes icon-pop {
    0% { transform: scale(1); }
    45% { transform: scale(1.22); }
    100% { transform: scale(1); }
}

@keyframes icon-flash {
    0%, 100% { color: #94a3b8; }
    50% { color: #e2e8f0; }
}

.dish-icon-svg {
    width: 24px;
    height: 24px;
    display: block;
    pointer-events: none;
}

.compare-bar {
    position: fixed;
    left: max(1rem, env(safe-area-inset-left, 0px));
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    z-index: 150;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.35rem;
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 999px;
    background: rgba(26, 35, 50, 0.98);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
}

.order-bar {
    position: fixed;
    left: max(1rem, env(safe-area-inset-left, 0px));
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 150;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.35rem;
    border: 1px solid rgba(34, 197, 94, 0.45);
    border-radius: 999px;
    background: rgba(26, 35, 50, 0.98);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
}

.order-bar-icon {
    font-size: 1.1rem;
}

body.has-order-bar .compare-bar {
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
}

body.has-order-bar:not(.has-compare-bar) .order-bar {
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
}

.compare-bar-icon {
    color: #ef4444;
}

body.menu-overlay-open {
    overflow: hidden;
}

html.menu-overlay-open {
    overflow: hidden;
    overscroll-behavior: none;
}

html.menu-overlay-open body {
    overflow: hidden;
    touch-action: none;
}

.menu-action-sheet,
.menu-sheet {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    touch-action: none;
}

.sheet-panel,
.compare-sheet-body {
    touch-action: pan-y;
}

.menu-action-sheet.is-open,
.menu-sheet.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    touch-action: none;
}

#nutrition-sheet.is-open,
#story-sheet.is-open,
#share-sheet.is-open {
    z-index: 260;
}

.sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.sheet-panel {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: min(85dvh, 85vh);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    padding: 1rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

#compare-sheet .sheet-panel {
    display: flex;
    flex-direction: column;
    max-height: min(92dvh, 92vh);
    overflow: hidden;
}

#compare-sheet .sheet-handle,
#compare-sheet h2,
#compare-sheet .sheet-subtitle,
#compare-sheet .sheet-close-btn {
    flex-shrink: 0;
}

.compare-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    margin: 0 -0.15rem;
    padding: 0 0.15rem;
}

#compare-sheet .sheet-close-btn {
    margin-top: 0.85rem;
}

.menu-action-sheet.is-open .sheet-panel,
.menu-sheet.is-open .sheet-panel {
    transform: translateY(0);
}

.sheet-handle {
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.45);
    margin: 0 auto 1rem;
}

.sheet-panel h2 {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
}

.sheet-subtitle {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.sheet-close-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
}

.sheet-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sheet-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    min-height: 44px;
}

.sheet-action-btn:hover {
    border-color: rgba(245, 158, 11, 0.45);
}

.sheet-action-icon {
    font-size: 1.25rem;
}

.allergen-popover {
    position: absolute;
    z-index: 260;
    width: min(280px, calc(100vw - 24px));
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    pointer-events: none;
}

.allergen-popover.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.popover-title {
    margin: 0 0 0.65rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.allergen-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.allergen-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
    font-size: 0.82rem;
    font-weight: 600;
}

.allergen-badge--safe {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
    color: #bbf7d0;
}

.nutrition-panel {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: center;
}

.nutrition-chart-wrap {
    position: relative;
    width: 120px;
    height: 120px;
}

.nutrition-chart {
    width: 100%;
    height: 100%;
}

.nutrition-calories {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    line-height: 1.2;
}

.nutrition-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.nutrition-legend strong {
    color: var(--text);
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.4rem;
}

.story-heading {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    color: var(--accent);
}

.story-text {
    margin: 0 0 1rem;
    color: var(--muted);
    line-height: 1.65;
    max-width: 52ch;
}

.story-audio-btn.is-playing {
    border-color: var(--accent);
    color: var(--accent);
}

.compare-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.compare-group {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(15, 20, 25, 0.35);
}

.compare-group:not(.is-open) .compare-group-trigger {
    border-radius: 11px;
}

.compare-group.is-open .compare-group-trigger {
    border-radius: 11px 11px 0 0;
}

.compare-group.is-open .compare-group-list {
    border-radius: 0 0 11px 11px;
}

.compare-group-trigger {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 0.9rem;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.compare-group-trigger:hover,
.compare-group-trigger:focus-visible {
    background: rgba(255, 255, 255, 0.04);
    outline: none;
}

.compare-group.is-open .compare-group-trigger {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(245, 158, 11, 0.08);
}

.compare-group-label {
    position: relative;
    padding-left: 0.75rem;
}

.compare-group-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.12em;
    bottom: 0.12em;
    width: 3px;
    border-radius: 999px;
    background: var(--accent);
}

.compare-group-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.compare-group-chevron-wrap {
    display: inline-flex;
    color: var(--muted);
    transition: transform 0.25s ease, color 0.2s;
}

.compare-group-chevron-wrap .compare-group-chevron,
.compare-group-chevron-wrap .dish-icon-svg {
    width: 18px;
    height: 18px;
}

.compare-group.is-open .compare-group-chevron-wrap {
    transform: rotate(180deg);
    color: var(--accent);
}

.compare-group-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.65rem;
}

.compare-group-list[hidden] {
    display: none;
}

.compare-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0.85rem;
    align-items: start;
    padding: 0.85rem;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.compare-item.is-ordered {
    border-color: rgba(34, 197, 94, 0.45);
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.15);
}

.compare-item-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.compare-item-header {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    justify-content: space-between;
}

.compare-item-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    justify-content: flex-end;
    max-width: 148px;
}

.compare-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 6px;
    border: none;
    border-radius: 8px;
    background: rgba(15, 20, 25, 0.45);
    color: #94a3b8;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.compare-icon-btn:hover,
.compare-icon-btn:focus-visible {
    color: #e2e8f0;
    background: rgba(15, 20, 25, 0.7);
    outline: none;
}

.compare-icon-btn.is-flash {
    animation: icon-flash 0.3s ease;
}

.compare-icon-svg {
    width: 20px;
    height: 20px;
}

.compare-item-footer {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.compare-order-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.55rem;
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #86efac;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: lowercase;
}

.compare-order-btn {
    flex: 1 1 auto;
    min-height: 40px;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.compare-order-btn.is-active {
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.12);
    color: var(--muted);
}

.order-summary {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.order-summary-title {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    color: #86efac;
}

.order-summary-groups {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.order-summary-group h4 {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #bbf7d0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.order-summary-group ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.55;
}

.order-summary-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.6;
}

.compare-item-media {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compare-item-placeholder {
    color: var(--accent);
    font-weight: 800;
    font-size: 0.85rem;
}

.compare-item-body h3 {
    margin: 0 0 0.2rem;
    font-size: 1rem;
}

.compare-item-price {
    margin: 0 0 0.55rem;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.05rem;
}

.compare-nutrition {
    margin: 0;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.compare-nutrition-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    font-size: 0.8rem;
    line-height: 1.35;
}

.compare-nutrition-row dt {
    margin: 0;
    color: var(--muted);
    font-weight: 500;
    flex-shrink: 0;
}

.compare-nutrition-row dd {
    margin: 0;
    color: var(--text);
    font-weight: 700;
    text-align: right;
}

.compare-item-meta {
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.sheet-empty {
    margin: 0;
    color: var(--muted);
    text-align: center;
    padding: 1rem 0;
}

.dish-preview-placeholder {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    color: var(--muted);
    background:
        radial-gradient(circle at 50% 35%, rgba(245, 158, 11, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
}

.dish-preview-icon {
    display: inline-flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.16);
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.06em;
}

.dish-preview-text {
    font-size: 0.85rem;
}

.dish-info {
    padding: 1rem 1.25rem 1.25rem;
}

.dish-info h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
}

.price {
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.dish-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dish-actions .btn {
    flex: 1 1 auto;
}

.change-image-form {
    margin: 0;
    flex: 1 1 auto;
    display: flex;
}

.change-image-form .btn {
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.1rem;
    min-height: 44px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: #111;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

.app-dialog {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.app-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.app-dialog-card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.app-dialog-card h2 {
    margin: 0 0 0.75rem;
}

.app-dialog-card p {
    margin: 0;
    color: var(--muted);
    white-space: pre-line;
}

.app-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.flash-messages {
    margin-bottom: 1rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.flash-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid var(--success);
}

.flash-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger);
}

.flash-warning {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid var(--warning);
}

.auth-card,
.admin-panel {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 1.5rem;
    max-width: 480px;
}

.admin-panel {
    max-width: none;
}

.form label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.form input,
.form select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 1rem;
}

.form input[type="file"] {
    padding: 0.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.form-actions {
    grid-column: 1 / -1;
}

.admin-header h1 {
    margin-top: 0;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.plato-row {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.plato-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    align-items: start;
}

.plato-edit-grid input,
.plato-edit-grid select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--text);
}

.file-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.file-inputs input {
    margin: 0;
}

.row-actions,
.row-actions-extra {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.row-actions-extra {
    margin-top: 0.75rem;
}

.inline-form {
    display: inline;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-active {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.badge-hidden {
    background: rgba(148, 163, 184, 0.2);
    color: var(--muted);
}

.nav-admin {
    color: var(--accent) !important;
    font-weight: 700;
}

.empty-state-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    max-width: 560px;
    margin: 2rem auto;
    box-shadow: var(--shadow);
}

.empty-state-card h2 {
    margin-top: 0;
}

.empty-state-card p {
    color: var(--muted);
}

.setup-steps {
    text-align: left;
    margin: 1.5rem auto;
    max-width: 420px;
    color: var(--muted);
    line-height: 1.7;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 2rem;
}

.ar-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ar-modal.hidden {
    display: none;
}

.ar-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.ar-modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    width: min(520px, 92vw);
    z-index: 1;
    box-shadow: var(--shadow);
}

.ar-loading {
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent);
    font-size: 0.9rem;
}

.ar-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
}

.ar-hint {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0.75rem 0 0;
}

@media (max-width: 900px) {
    .container {
        width: min(1100px, 94%);
    }

    .plato-edit-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
}

@media (max-width: 720px) {
    main.container {
        padding: 1rem 0 calc(7rem + env(safe-area-inset-bottom, 0px));
    }

    body.has-compare-bar main.container {
        padding-bottom: calc(8.5rem + env(safe-area-inset-bottom, 0px));
    }

    body.has-order-bar main.container {
        padding-bottom: calc(11rem + env(safe-area-inset-bottom, 0px));
    }

    body.has-order-bar.has-compare-bar main.container {
        padding-bottom: calc(13.5rem + env(safe-area-inset-bottom, 0px));
    }

    .admin-panel,
    .auth-card {
        padding: 1.15rem;
    }

    .plato-edit-grid {
        grid-template-columns: 1fr;
    }

    .plato-edit-grid > * {
        width: 100%;
    }

    .row-actions .btn,
    .row-actions-extra .btn {
        flex: 1 1 auto;
    }

    .row-actions-extra .inline-form {
        display: flex;
        flex: 1 1 auto;
    }

    .row-actions-extra .inline-form .btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        text-align: center;
    }

    .site-header nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .dish-grid {
        grid-template-columns: 1fr;
    }

    .dish-preview,
    .dish-preview-media model-viewer {
        height: 200px;
    }

    .dish-icon-btn {
        width: 40px;
        height: 40px;
        padding: 8px;
    }

    .dish-icon-svg {
        width: 22px;
        height: 22px;
    }

    .compare-item-header {
        flex-direction: column;
    }

    .compare-item-icons {
        max-width: none;
        justify-content: flex-start;
    }

    .order-bar,
    .compare-bar {
        width: min(92vw, 420px);
        justify-content: center;
        font-size: 0.88rem;
        padding-inline: 1rem;
    }

    .app-dialog-actions {
        flex-direction: column-reverse;
    }

    .app-dialog-actions .btn {
        width: 100%;
    }

    .auth-card {
        max-width: none;
    }
}

@media (max-width: 380px) {
    .dish-actions {
        flex-direction: column;
    }

    .dish-actions .btn,
    .change-image-form .btn {
        width: 100%;
    }
}

/* ── Acceso comensal (Instagram / WhatsApp) ── */
.guest-access {
    max-width: 480px;
    margin: 1rem auto 2rem;
}

.guest-auth-card h1 {
    margin-top: 0;
}

.guest-auth-lead {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 48px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    width: 100%;
}

.btn-social-icon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.18);
}

.btn-instagram {
    background: linear-gradient(135deg, #f58529 0%, #dd2a7b 45%, #8134af 100%);
    color: #fff;
}

.btn-whatsapp,
.btn-whatsapp-link {
    background: #25d366;
    color: #fff;
}

.whatsapp-login-form label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.whatsapp-login-form input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 1rem;
}

.whatsapp-verify-card {
    padding: 1rem;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.whatsapp-verify-card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.demo-code-hint {
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: var(--accent);
    font-size: 0.9rem;
}

.guest-auth-note {
    margin: 1.25rem 0 0;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--muted);
    font-size: 0.85rem;
}

.guest-auth-footer {
    margin: 1.25rem 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.nav-guest {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.9rem;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-guest-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* Rendimiento móvil: scroll contenido como en Comparar seleccionados */
@media (max-width: 768px), (hover: none) {
    .site-header {
        position: relative;
        top: auto;
    }

    .dish-preview-3d {
        display: none !important;
    }

    .dish-preview-media {
        cursor: default;
    }

    .dish-preview-media img,
    .dish-preview-media model-viewer,
    .dish-preview-media .dish-preview-placeholder {
        transition: none;
        transform: none;
        will-change: auto;
    }

    .menu-accordion.has-open-panel {
        max-height: min(72dvh, calc(100dvh - 11rem));
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        overflow-anchor: none;
    }

    .compare-sheet-body {
        overflow-anchor: none;
    }

    .accordion-item {
        contain: paint;
        overflow: hidden;
        box-shadow: none;
    }

    .accordion-label::before {
        top: 50%;
        bottom: auto;
        height: 1.1em;
        transform: translateY(-50%);
    }

    .dish-card {
        box-shadow: none;
    }

    .dish-icon-rail,
    .dish-icon-rail--right {
        background: var(--surface-2);
    }

    .order-bar,
    .compare-bar {
        font-size: 0.88rem;
        padding-inline: 1rem;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
    }

    .menu-action-sheet.is-open .sheet-panel,
    .menu-sheet.is-open .sheet-panel {
        transition: transform 0.2s ease;
    }
}

@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
    .dish-preview-media:has(.dish-preview-3d) .dish-preview-photo--fallback {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dish-preview-media img,
    .dish-preview-media model-viewer,
    .dish-preview-media .dish-preview-placeholder {
        transition: none;
        transform: none;
    }
}
