:root {
    --bg: #0f1115;
    --surface: #181b22;
    --text: #f2f0ea;
    --accent: #d9a441;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 24px;
}

.topbar {
    padding: 20px 16px 12px;
    text-align: center;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
}

.venue-header-logo-tile {
    display: inline-block;
    padding: 0;
    margin: 0 0 8px;
    border: none;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.venue-header-logo {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.brand {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
}

.subtitle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: color-mix(in srgb, var(--text) 65%, transparent);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
}

.subtitle--link {
    cursor: pointer;
}

.subtitle--link:hover {
    color: var(--accent);
}

.pin-icon {
    flex: 0 0 auto;
}

.banner-carousel {
    padding: 14px 16px 6px;
}

.banner-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    border-radius: var(--radius-md);
}

.banner-track::-webkit-scrollbar {
    display: none;
}

.banner-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    aspect-ratio: 2.2 / 1;
    display: block;
    background: var(--surface);
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    padding-bottom: 2px;
}

.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--text) 25%, transparent);
    transition: background 0.2s ease, transform 0.2s ease;
}

.banner-dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

.tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 16px;
    scrollbar-width: none;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
    flex: 0 0 auto;
    background: var(--surface);
    color: color-mix(in srgb, var(--text) 65%, transparent);
    border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

.tab.active {
    background: var(--accent);
    color: color-mix(in srgb, var(--accent) 60%, black 75%);
    border-color: var(--accent);
    font-weight: 600;
}

.content {
    padding: 12px 16px 0;
}

.category-title {
    font-size: 16px;
    margin: 28px 0 12px;
    color: color-mix(in srgb, var(--text) 65%, transparent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category:first-of-type .category-title {
    margin-top: 12px;
}

.items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.item-tile {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
    border-radius: var(--radius-md);
    padding: 0;
    background: var(--surface);
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.item-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: color-mix(in srgb, var(--surface) 80%, var(--text) 6%);
}

.item-photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.item-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 20px 10px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}

.item-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-align: left;
    line-height: 1.25;
}

.item-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    text-align: left;
}

.empty {
    text-align: center;
    color: color-mix(in srgb, var(--text) 65%, transparent);
    padding: 40px 16px;
}

.venue-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
}

.venue-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--v-bg, var(--surface));
    border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
    border-radius: var(--radius-md);
    padding: 12px;
    text-decoration: none;
    color: var(--text);
}

.venue-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex: 0 0 auto;
}

.venue-logo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #1a1305;
}

.venue-name {
    font-size: 15px;
    font-weight: 700;
}

.venue-tagline {
    font-size: 12px;
    color: color-mix(in srgb, var(--text) 65%, transparent);
    margin-top: 2px;
}

body.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    visibility: hidden;
    pointer-events: none;
}

.modal.open {
    visibility: visible;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.19s ease;
}

.modal.open .modal-backdrop {
    opacity: 1;
}

.modal-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    z-index: 1;
    transform: translateY(24px) scale(0.96);
    opacity: 0;
    transition: transform 0.23s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.19s ease;
}

.modal.open .modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.modal-photo-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    background: color-mix(in srgb, var(--surface) 80%, var(--text) 6%);
}

.modal-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[hidden] { display: none !important; }

.modal-photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.modal-body {
    padding: 16px;
}

.modal-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.modal-name {
    font-size: 18px;
    font-weight: 700;
}

.modal-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

.modal-desc {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: color-mix(in srgb, var(--text) 80%, transparent);
}

.modal-desc p {
    margin: 0 0 8px;
}

.modal-desc p:last-child {
    margin-bottom: 0;
}

/* Phone mockup for standalone browser visits (not Telegram, not the admin's
   own iframe preview — see the detection script in menu.html). Inert by
   default so Telegram/iframe rendering is unaffected. */

.phone-mock {
    background: none;
}

.app-shell {
    background: var(--bg);
}

.phone-notch {
    display: none;
}

html.standalone-preview body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: radial-gradient(circle at 50% 0%, #23262f, #08090b 72%);
}

html.standalone-preview .phone-mock {
    position: relative;
    width: min(390px, 92vw);
    height: min(844px, 92vh);
    border-radius: 46px;
    border: 10px solid #111318;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    background: var(--bg);
}

html.standalone-preview .phone-notch {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 24px;
    background: #111318;
    border-radius: 0 0 16px 16px;
    z-index: 30;
}

html.standalone-preview .app-shell {
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
}

html.standalone-preview .app-shell::-webkit-scrollbar {
    display: none;
}

html.standalone-preview .modal {
    position: absolute;
}
