/* Локальные шрифты меню (Lora + Inter). Сгенерировано — не править вручную. */
@font-face{font-family:'Lora';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/lora-500-cyrillic-ext.woff2') format('woff2');unicode-range:U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;}
@font-face{font-family:'Lora';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/lora-500-cyrillic.woff2') format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Lora';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/lora-500-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Lora';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/lora-600-cyrillic-ext.woff2') format('woff2');unicode-range:U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;}
@font-face{font-family:'Lora';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/lora-600-cyrillic.woff2') format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Lora';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/lora-600-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Lora';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/lora-700-cyrillic-ext.woff2') format('woff2');unicode-range:U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;}
@font-face{font-family:'Lora';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/lora-700-cyrillic.woff2') format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Lora';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/lora-700-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/inter-400-cyrillic-ext.woff2') format('woff2');unicode-range:U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/inter-400-cyrillic.woff2') format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/inter-400-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/inter-500-cyrillic-ext.woff2') format('woff2');unicode-range:U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/inter-500-cyrillic.woff2') format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/inter-500-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/inter-600-cyrillic-ext.woff2') format('woff2');unicode-range:U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/inter-600-cyrillic.woff2') format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/inter-600-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/inter-700-cyrillic-ext.woff2') format('woff2');unicode-range:U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/inter-700-cyrillic.woff2') format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/inter-700-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
/* ===== Шали-Хали — гостевое меню ===== */

:root {
    /* Тёмная тема (по умолчанию) — палитра логотипа */
    --bg:         #1A3F36;
    --bg-soft:    #163730;
    --bg-card:    rgba(232, 223, 198, 0.04);

    --gold:       #C19649;
    --gold-warm:  #B88438;
    --gold-soft:  #D3B27B;

    --cream:      #E8DFC6;
    --cream-2:    #B8A982;
    --muted:      #8A7E63;

    --hairline:   rgba(193, 150, 73, 0.22);
    --hairline-2: rgba(193, 150, 73, 0.10);

    --overlay-bg: rgba(16, 38, 33, 0.97);

    --sale:       #E0885A;        /* акцент скидки (тёплый терракот) */

    /* Ресторанный сериф меню — Lora (свой woff2, см. @font-face в начале
       файла). Дальше — системные серифы как запасной вариант. */
    --serif:      'Lora', 'Iowan Old Style', 'EB Garamond',
                  'Times New Roman', Georgia, serif;
    /* Основной текст — Inter (свой woff2), затем системные без засечек */
    --sans:       'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI",
                  Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Светлая тема */
:root[data-theme="light"] {
    --bg:         #F5EFDF;
    --bg-soft:    #ECE4CE;
    --bg-card:    rgba(26, 63, 54, 0.04);

    --gold:       #96702A;
    --gold-warm:  #8A6526;
    --gold-soft:  #7E6633;

    --cream:      #2B2A22;
    --cream-2:    #5F5944;
    --muted:      #8B8268;

    --hairline:   rgba(138, 101, 38, 0.35);
    --hairline-2: rgba(138, 101, 38, 0.16);

    --overlay-bg: rgba(245, 239, 223, 0.98);

    --sale:       #B35A2E;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    height: 100dvh;       /* мобильный URL-бар учитывается сам */
    display: flex;
    flex-direction: column;
    overflow: hidden;     /* скроллятся только секции категорий */
    background: var(--bg);
    color: var(--cream);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
    /* Цвет фона переключается ВМЕСТЕ с CSS-переменными, без анимации:
       у tabs/tagbar/hdr transition'а нет, и любой плавный переход
       на body создаёт «полузелёное» рассогласованное состояние. */
}

a { color: var(--gold); text-decoration: none; }

/* ===== Header ===== */
.hdr {
    flex: none;
    position: relative;
    text-align: center;
    padding: 7px 16px 4px;
}

.hdr-logo {
    display: block;
    width: 100%;
    max-width: 84px;        /* компактный логотип — больше места меню */
    height: auto;
    margin: 0 auto;
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity .3s ease;
}

.hdr-divider {
    display: none;          /* убираем подпись «МЕНЮ» — её роль играют вкладки */
}

/* Кнопка темы */
.theme-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hairline);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--gold);
    cursor: pointer;
    transition: border-color .2s, transform .15s;
    z-index: 5;
}
.theme-btn:active { transform: scale(0.92); }
.theme-btn .ic-sun { display: none; }
:root[data-theme="light"] .theme-btn .ic-moon { display: none; }
:root[data-theme="light"] .theme-btn .ic-sun { display: block; }

/* ===== Splash при первом открытии =====
   Крупный логотип по центру, через ~1 секунду плавно исчезает,
   и обычная шапка занимает своё место. Не блокирует тапы и свайпы. */
.splash {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .45s ease;
}
.splash img {
    width: 70%;
    max-width: 280px;
    height: auto;
    transform: scale(0.9);
    opacity: 0;
    transition: transform .55s ease, opacity .45s ease;
}
:root.with-splash .splash { opacity: 1; }
:root.with-splash .splash img { transform: scale(1); opacity: 1; }
:root.with-splash.splash-done .splash { opacity: 0; }
:root.with-splash.splash-done .splash img { transform: scale(0.7); opacity: 0; }

/* ===== Tabs ===== */
.tabs {
    flex: none;
    display: flex;
    align-items: stretch;
    background: var(--bg);
    padding-top: 6px;
    border-bottom: 1px solid var(--hairline-2);
}

.tabs-inner {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 4px;
    padding: 0 4px 0 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;   /* iOS: не цеплять жест «назад» и не уводить полосу за край */
    touch-action: pan-x;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tabs-inner::-webkit-scrollbar { display: none; }

.tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px 12px;
    border: 0;
    background: transparent;
    color: var(--cream-2);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
    margin-bottom: -1px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.tab .tab-ic { width: 18px; height: 18px; opacity: 0.65; transition: opacity .2s; }
.tab:hover { color: var(--cream); }
.tab.is-active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}
.tab.is-active .tab-ic { opacity: 1; }

/* Кнопка поиска справа от вкладок */
.search-btn {
    flex: none;
    align-self: center;
    width: 38px;
    height: 38px;
    margin: 0 8px 4px 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hairline);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--gold);
    cursor: pointer;
    transition: border-color .2s, transform .15s;
}
.search-btn:active { transform: scale(0.92); }

/* ===== Фильтр по тегам ===== */
.tagbar {
    flex: none;
    background: var(--bg);
    border-bottom: 1px solid var(--hairline-2);
}
.tagbar-inner {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none;
}
.tagbar-inner::-webkit-scrollbar { display: none; }

.tagchip {
    --tc: var(--gold);
    flex: 0 0 auto;
    padding: 6px 14px;
    border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent);
    border-radius: 15px;
    background: transparent;
    color: var(--tc);
    font-family: inherit;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s, color .2s, border-color .2s;
}
.tagchip:active { transform: scale(0.96); }
.tagchip.is-active {
    background: var(--tc);
    border-color: var(--tc);
    color: var(--bg);
    font-weight: 700;
}

/* Сквозной список позиций по выбранному тегу (как результаты поиска) */
.tag-results {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 20px 60px;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}
.tag-results[hidden] { display: none; }
.tag-results .item { cursor: pointer; }

/* ===== Slider (carousel) ===== */
.slider {
    flex: 1 1 auto;
    min-height: 0;       /* критично: иначе flex не даст скроллиться детям */
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
}

.slides {
    display: flex;
    height: 100%;
    will-change: transform;
    transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}
.slides.no-anim { transition: none; }

.slide {
    flex: 0 0 100%;
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.slide-inner {
    padding: 12px 20px 42px;
    max-width: 720px;
    margin: 0 auto;
}

/* ===== Category header ===== */
.cat-title {
    font-family: var(--serif);
    color: var(--gold);
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 1px;
    margin: 0 0 6px;
    text-align: center;
    font-feature-settings: "lnum" 0, "onum" 1, "liga" 1; /* старостильные цифры, лигатуры */
}

.cat-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold) 50%, transparent);
    opacity: 0.45;
    margin: 0 auto 13px;
    max-width: 220px;
}

.cat-empty {
    color: var(--muted);
    font-size: 14px;
    text-align: center;
    padding: 30px 0;
    font-style: italic;
}

/* ===== Подкатегории (вкладки внутри категории) ===== */
.subtabs {
    position: sticky;
    top: -1px;            /* прилипают к верху секции при скролле */
    z-index: 5;
    margin: 0 -20px 14px;
    padding: 6px 0;
    background: var(--bg);
    box-shadow: 0 6px 12px -8px rgba(0, 0, 0, 0.35);
}

.subtabs-inner {
    display: flex;
    gap: 8px;
    padding: 2px 20px 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.subtabs-inner::-webkit-scrollbar { display: none; }

.subtab {
    flex: 0 0 auto;
    padding: 8px 16px;
    border: 1px solid var(--hairline);
    border-radius: 18px;
    background: transparent;
    color: var(--cream-2);
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 0.4px;
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s, border-color .2s, background-color .2s;
}
.subtab:active { transform: scale(0.97); }
.subtab.is-active {
    color: var(--bg);
    background: var(--gold);
    border-color: var(--gold);
    font-weight: 600;
}

/* Секция подкатегории */
.subsec { margin-bottom: 20px; }
.subsec:last-child { margin-bottom: 0; }
.subsec.is-hidden { display: none; }

.sub-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 11px;
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 400;
    letter-spacing: 0.8px;
    color: var(--gold-soft);
    font-feature-settings: "liga" 1;
}
.sub-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--hairline), transparent);
}
/* Когда выбрана конкретная подкатегория — заголовок лишний */
.subsec.is-solo .sub-title { display: none; }

/* ===== Items ===== */
.items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.item {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 16px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--hairline-2);
}
.item:last-child {
    border-bottom: 0;
    padding-bottom: 4px;
}
.item:not(:has(.item-photo)) {
    grid-template-columns: 1fr;
}
.item.is-off { opacity: 0.5; }

/* Подсветка позиции после перехода из поиска */
@keyframes item-flash {
    0%   { background: color-mix(in srgb, var(--gold) 22%, transparent); }
    100% { background: transparent; }
}
.item.is-flash {
    animation: item-flash 1.6s ease-out 1;
    border-radius: 8px;
}

.item-photo {
    width: 78px;
    height: 78px;
    border-radius: 6px;
    overflow: hidden;
    /* Без подложки: фото с прозрачным фоном (пиццы) сливаются со страницей,
       а непрозрачные фото и так заполняют квадрат целиком */
}
.item-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.item-body { min-width: 0; }

.item-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}
.item-name {
    margin: 0;
    font-family: var(--serif);
    color: var(--cream);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.2px;
    flex: 0 1 auto;
}
.item-dots {
    flex: 1;
    border-bottom: 1px dotted var(--hairline);
    transform: translateY(-3px);
    min-width: 12px;
}
.item-price {
    font-family: var(--serif);
    color: var(--gold);
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* Скидка: старая цена зачёркнута, новая — акцентом */
.item-price-old {
    color: var(--muted);
    font-size: 12.5px;
    white-space: nowrap;
    text-decoration-color: color-mix(in srgb, var(--sale) 70%, transparent);
    text-decoration-thickness: 1.5px;
}
.item-price.is-sale {
    color: var(--sale);
    font-weight: 600;
}
.tag-sale {
    --tc: var(--sale);
    background: color-mix(in srgb, var(--sale) 14%, transparent);
    font-weight: 600;
}

/* Порция — рядом с ценой, уточняет объём/вес перед ценником */
.item-portion {
    flex: none;
    color: var(--cream-2);
    font-size: 12px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.item-desc {
    margin: 0;
    color: var(--cream-2);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tag {
    --tc: var(--gold);
    font-size: 10.5px;
    padding: 3px 9px;
    border-radius: 3px;
    color: var(--tc);
    border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent);
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}
:root[data-theme="light"] .tag {
    background: color-mix(in srgb, var(--tc) 8%, transparent);
}
.tag-off {
    --tc: #C28A6E;
}

/* ===== Поиск ===== */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    background: var(--overlay-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.search-overlay[hidden] { display: none; }

.search-head {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--hairline-2);
    color: var(--gold);
}
.search-head input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--cream);
    font-family: inherit;
    font-size: 17px;
    padding: 8px 0;
    outline: none;
}
.search-head input::placeholder { color: var(--muted); }
.search-head input::-webkit-search-cancel-button { display: none; }

.search-close {
    flex: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--hairline);
    border-radius: 50%;
    background: transparent;
    color: var(--cream-2);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}
.search-close:hover { color: var(--cream); border-color: var(--gold); }

.search-results {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 20px 60px;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}

.search-hint, .search-none {
    color: var(--muted);
    font-size: 14px;
    text-align: center;
    padding: 36px 10px;
    font-style: italic;
}

.search-group {
    margin: 0 0 10px;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--gold-soft);
}
.search-group:not(:first-child) { margin-top: 26px; }

/* Результат поиска — кликабельная позиция */
.search-results .item { cursor: pointer; }

/* ===== Empty / Footer ===== */
.empty {
    padding: 80px 20px;
    text-align: center;
    color: var(--muted);
}

.ftr {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 16px 8px;
    text-align: center;
    border-top: 1px solid var(--hairline-2);
}

/* Ряд 1: телефон · соцсети */
.ftr-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ftr-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    font-family: var(--serif);
    font-size: 14px;
    letter-spacing: 0.8px;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 16px;
    transition: color .2s, background-color .2s;
}
.ftr-phone:hover { color: var(--gold-soft); background: var(--bg-card); }
.ftr-phone svg { opacity: 0.8; }
.ftr-sep { width: 1px; height: 16px; background: var(--hairline); }
.ftr-socials { display: inline-flex; align-items: center; gap: 4px; }
.ftr-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: var(--cream-2);
    border-radius: 50%;
    transition: color .2s, background-color .2s, transform .15s;
}
.ftr-socials a:hover { color: var(--gold); background: var(--bg-card); }
.ftr-socials a:active { transform: scale(0.92); }

/* Ряд 2: отзывы + ссылка разработчика — одной центрированной строкой,
   разделённые вертикальной палочкой. На узких экранах строка переносится. */
.ftr-review {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 7px;
    font-size: 11.5px;
    color: var(--muted);
}
.ftr-review svg { color: var(--gold); }
.ftr-review a { color: var(--gold); letter-spacing: 0.3px; }
.ftr-review a:hover { color: var(--gold-soft); }
.ftr-review-dot { opacity: 0.5; }

/* Вертикальная палочка-разделитель между отзывами и ссылкой разработчика */
.ftr-vbar {
    width: 1px;
    height: 12px;
    background: var(--hairline);
    margin: 0 1px;
}
@media (max-width: 344px) {
    .ftr-vbar { display: none; }   /* очень узкий экран: строка переносится — палочка не нужна */
}

/* Ссылка разработчика — в тон строки отзывов: приглушённый текст, золотой
   значок Telegram. Класс-в-классе, чтобы перебить общий стиль .ftr-review a. */
.ftr-review .ftr-dev {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    letter-spacing: 0.3px;
    transition: color .2s;
}
.ftr-review .ftr-dev svg { color: var(--gold); opacity: 0.85; flex: none; }
.ftr-review .ftr-dev:hover { color: var(--gold); }
.ftr-review .ftr-dev:hover svg { opacity: 1; }

/* Кнопка-триггер правил — слева в шапке (симметрично кнопке темы справа) */
.rules-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hairline);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--gold);
    cursor: pointer;
    transition: border-color .2s, transform .15s;
    z-index: 5;
}
.rules-btn:active { transform: scale(0.92); }
.rules-btn:hover { border-color: var(--gold); }

/* ===== Правила: оверлей в стиле поиска ===== */
.rules-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    background: var(--overlay-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.rules-overlay[hidden] { display: none; }

.rules-head {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--hairline-2);
    color: var(--gold);
}
.rules-title {
    flex: 1;
    margin: 0;
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
    padding-left: 38px;  /* визуально центрируем относительно кнопки закрытия справа */
}

/* Вкладки-сегменты внутри оверлея правил (в стиле подкатегорий меню) */
.rules-tabs {
    flex: none;
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 12px 16px 14px;
    border-bottom: 1px solid var(--hairline-2);
}
.rules-tab {
    flex: 0 1 auto;
    padding: 9px 22px;
    border: 1px solid var(--hairline);
    border-radius: 20px;
    background: transparent;
    color: var(--cream-2);
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: color .25s, border-color .25s, background-color .25s;
}
.rules-tab:active { transform: scale(0.96); }
.rules-tab.is-active {
    color: var(--bg);
    background: var(--gold);
    border-color: var(--gold);
    font-weight: 600;
    box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--gold) 60%, transparent);
}

/* Карусель панелей: горизонтальный трек, каждая панель скроллится сама */
.rules-viewport {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
}
.rules-track {
    display: flex;
    height: 100%;
    will-change: transform;
    transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}
.rules-track.no-anim { transition: none; }
.rules-panel {
    flex: 0 0 100%;
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.rules-panel-inner {
    padding: 22px 22px 60px;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}

.rules-lead {
    margin: 0 auto 22px;
    max-width: 460px;
    text-align: center;
    color: var(--cream-2);
    font-size: 14px;
    line-height: 1.55;
    font-style: italic;
}

.rules-sec { margin: 28px 0; }
.rules-sec-title {
    margin: 0 0 14px;
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
}
.rules-sec-title::after {
    content: '';
    display: block;
    width: 36px;
    height: 1px;
    margin: 8px auto 0;
    background: linear-gradient(to right, transparent, var(--gold) 50%, transparent);
    opacity: 0.6;
}

.rules-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.rules-list li {
    color: var(--cream);
    font-size: 14px;
    line-height: 1.6;
}
/* Только пункты С иконкой используют grid (двухколоночная раскладка).
   Без иконки — обычный блок, иначе <strong> в тексте превращался
   в отдельный grid-item и текст рвался по строкам. */
.rules-list li:has(.rules-ico) {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 14px;
    align-items: start;
}
.rules-list li:not(:has(.rules-ico)) {
    padding-left: 18px;
    position: relative;
}
.rules-list li:not(:has(.rules-ico))::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.7;
}
.rules-list strong { color: var(--gold-soft); font-weight: 600; }

.rules-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--hairline);
    color: var(--gold);
    flex-shrink: 0;
}
.rules-ico-text {
    font-family: var(--serif);
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* Запреты — каждое пунктирно зачёркнутое слово */
.rules-list-bans li::before {
    background: var(--sale, var(--gold));
}

.rules-sec-highlight {
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--hairline-2);
    border-radius: 10px;
}

.rules-note {
    margin: 18px 0 0;
    color: var(--cream-2);
    font-size: 13px;
    font-style: italic;
    text-align: center;
    line-height: 1.55;
}

.rules-disclaimer {
    margin: 30px auto 0;
    max-width: 520px;
    padding: 14px 18px;
    text-align: center;
    color: var(--cream-2);
    font-size: 12.5px;
    line-height: 1.6;
    border-top: 1px solid var(--hairline-2);
    border-bottom: 1px solid var(--hairline-2);
}

/* ===== Конфликт-меню (прайс возмещения) ===== */
.rules-sub {
    margin: -6px 0 14px;
    text-align: center;
    color: var(--cream-2);
    font-size: 13px;
    font-style: italic;
}
.conflict-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.conflict-list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    color: var(--cream);
}
.conflict-name { flex: 0 1 auto; }
.conflict-dots {
    flex: 1;
    border-bottom: 1px dotted var(--hairline);
    transform: translateY(-3px);
    min-width: 12px;
}
.conflict-price {
    flex: none;
    color: var(--gold);
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

@media (min-width: 720px) {
    .rules-title { font-size: 19px; letter-spacing: 5px; }
    .rules-sec-title { font-size: 17px; }
    .rules-list li { font-size: 15px; }
}

/* ===== Адаптив ===== */
@media (min-width: 720px) {
    .hdr { padding: 16px 16px 8px; }
    .hdr-logo { max-width: 170px; }
    .slide-inner { padding-top: 18px; }
    .cat-title { font-size: 32px; letter-spacing: 1.2px; }
    .item-name { font-size: 17px; }
    .items { gap: 18px; }
    .item { grid-template-columns: 88px 1fr; gap: 18px; }
    .item-photo { width: 88px; height: 88px; }
    .splash img { max-width: 360px; }
}

/* Невысокие экраны — ещё компактнее, больше места меню.
   Футер не прячем: телефон и соцсети нужны всегда. */
@media (max-height: 700px) {
    .hdr { padding-top: 6px; padding-bottom: 4px; }
    .hdr-logo { max-width: 82px; }
    .ftr { padding: 4px 12px 6px; gap: 2px; }
    .ftr-review { font-size: 11px; }
}

/* Очень узкие экраны */
@media (max-width: 380px) {
    .item { grid-template-columns: 64px 1fr; gap: 12px; }
    .item-photo { width: 64px; height: 64px; }
    .item-name { font-size: 15px; }
    .item-desc { font-size: 12.5px; }
    .hdr-logo { max-width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
    .slides { transition: none !important; }
    .tabs-inner, .subtabs-inner { scroll-behavior: auto; }
    .item.is-flash { animation: none; }
}

/* Блок отзывов в подвале */
/* Плашка happy hour на позиции (окно доступности) */
.tag-hh {
    --tc: var(--gold);
    border-color: color-mix(in srgb, var(--gold) 45%, transparent);
    background: color-mix(in srgb, var(--gold) 12%, transparent);
    color: var(--gold);
    text-transform: none;
    letter-spacing: 0.2px;
}

/* ===== Просмотр фото позиции ===== */
.photo-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--overlay-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: zoom-out;
}
.photo-overlay[hidden] { display: none; }
.photo-box {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 100%;
    animation: photo-in .22s ease-out;
}
@keyframes photo-in {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}
.photo-box img {
    max-width: min(88vw, 620px);
    max-height: 72vh;
    border-radius: 14px;
}
.photo-box figcaption {
    font-family: var(--serif);
    color: var(--gold-soft);
    font-size: 16.5px;
    letter-spacing: 0.5px;
    text-align: center;
}
.photo-close {
    position: absolute;
    top: 14px;
    right: 14px;
}
@media (prefers-reduced-motion: reduce) {
    .photo-box { animation: none; }
}

/* ===== Избранное (сердечки) ===== */
.fav-btn {
    flex: none;
    align-self: center;
    margin-left: 6px;
    padding: 4px;
    background: none;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    opacity: 0.5;
    line-height: 0;
    transition: opacity .15s, color .15s, transform .12s;
}
.fav-btn:hover { opacity: 1; }
.fav-btn.is-on { color: var(--gold); opacity: 1; }
.fav-btn.is-on svg { fill: var(--gold); }
.fav-btn:active { transform: scale(0.82); }

/* Кнопка-переключатель «Избранное» в строке вкладок (рядом с поиском) */
.fav-view-btn { position: relative; }
.fav-view-btn.is-active { color: var(--gold); }
.fav-view-btn.is-active svg { fill: var(--gold); }
.fav-count {
    position: absolute;
    top: 1px; right: 1px;
    min-width: 15px; height: 15px;
    padding: 0 3px;
    border-radius: 8px;
    background: var(--gold);
    color: #241A08;
    font-size: 10px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
}
