/* Киоск «Шашлычок» — стоячий сенсорный экран 1080×1920.
   Цвета — фирменная палитра (логотип, мобилка «Шашлычок TEAM»): красный перец, зелёный хвостик,
   кремовый. Зал светлый — поэтому экраны заказа светлые; тёмный только экран-приветствие,
   на нём кремовый логотип читается так, как задуман. Иконки — один набор (Lucide, icons/sprite.svg). */

:root {
    --red: #cb261d;
    --red-press: #a91e16;
    --red-ink: #b0231a;
    --red-50: #fcefed;
    --red-100: #f7d9d5;
    /* ошибки и «время выходит» — всегда красные: --red и его оттенки меняются цветом кнопок из SmartResto */
    --danger: #cb261d;
    --danger-ink: #b0231a;
    --danger-50: #fcefed;
    --green: #3d662c;
    --green-50: #edf3e9;
    --cream: #fef8e1;
    --charcoal: #1c1713;
    --charcoal-2: #2a231d;

    --bg: #f7f2ea;
    --bg-2: #efe7db;
    --paper: #ffffff;
    --ink: #231d18;
    --ink-2: #5e554c;
    --ink-3: #8a8077;
    --line: #e7dfd3;
    --line-2: #d8cdbf;
    --amber-ink: #7a4f00;
    --amber-bg: #fff1d6;

    --shadow-1: 0 1px 2px rgba(35, 29, 24, 0.06), 0 6px 16px rgba(35, 29, 24, 0.06);
    --shadow-2: 0 12px 32px rgba(35, 29, 24, 0.14), 0 2px 8px rgba(35, 29, 24, 0.06);
    --shadow-up: 0 -10px 30px rgba(35, 29, 24, 0.1);

    --r-sm: 14px;
    --r-md: 20px;
    --r-lg: 28px;
    --r-xl: 40px;

    --ease: cubic-bezier(0.23, 1, 0.32, 1);
    --font: 'Rubik', 'Segoe UI', Roboto, Arial, sans-serif;
}

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

html,
body {
    height: 100%;
}

/* Шрифты из SmartResto («Оформление» → «Шрифты»): --font — весь текст, --font-display — заголовки
   (не задан — как текст). Знаки, которых в выбранном шрифте нет, берутся из Rubik. */
h1,
h2,
h3,
.welcome-slogan {
    font-family: var(--font-display, var(--font));
}

body {
    font-family: var(--font);
    font-size: 26px;
    line-height: 1.35;
    color: var(--ink);
    background: var(--bg);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    overscroll-behavior: none;
}

::selection {
    background: var(--red-100);
    color: var(--ink);
}

img {
    display: block;
    max-width: 100%;
    -webkit-user-drag: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

button:disabled {
    cursor: default;
}

:focus-visible {
    outline: 4px solid color-mix(in srgb, var(--red) 45%, transparent);
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

.num {
    font-variant-numeric: tabular-nums;
}

/* ---------- Иконки ---------- */
.ic {
    width: 1em;
    height: 1em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ic-sm {
    width: 0.8em;
    height: 0.8em;
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 72px;
    padding: 0 32px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 26px;
    letter-spacing: -0.01em;
    white-space: nowrap;
    transition:
        transform 120ms var(--ease),
        background-color 160ms var(--ease),
        color 160ms var(--ease),
        box-shadow 160ms var(--ease);
}

.btn:active:not(:disabled) {
    transform: scale(0.97);
}

.btn .ic {
    font-size: 1.15em;
}

.btn-lg {
    min-height: 88px;
    padding: 0 40px;
    font-size: 28px;
}

.btn-xl {
    min-height: 120px;
    padding: 0 56px;
    font-size: 34px;
    font-weight: 700;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--red);
    color: #fff;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--red) 28%, transparent);
}

.btn-primary:active:not(:disabled) {
    background: var(--red-press);
}

.btn-primary:disabled {
    background: var(--line-2);
    color: var(--ink-2);
    box-shadow: none;
}

.btn-secondary {
    background: var(--paper);
    color: var(--ink);
    box-shadow: inset 0 0 0 2px var(--line-2);
}

.btn-secondary:active:not(:disabled) {
    background: var(--bg-2);
}

.btn-ghost {
    color: var(--ink-2);
    padding: 0 24px;
}

.btn-ghost:active:not(:disabled) {
    background: var(--bg-2);
}

.btn-price {
    margin-left: auto;
    padding-left: 24px;
    border-left: 2px solid rgba(255, 255, 255, 0.35);
}

/* ---------- Экраны ---------- */
.screen {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    background: var(--bg);
}

.screen.active {
    display: flex;
    animation: screen-in 220ms var(--ease);
}

@keyframes screen-in {
    from {
        opacity: 0;
    }
}

/* ---------- Приветствие ---------- */
#welcomeScreen {
    background: var(--charcoal);
    color: var(--cream);
    cursor: pointer;
    overflow: hidden;
}

.welcome-top {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    padding: 120px 0 64px;
}

.welcome-logo {
    width: 560px;
    /* свой логотип из SmartResto может быть квадратным — не выше стандартного */
    max-height: 320px;
    object-fit: contain;
    filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.35));
}

/* фото или видео — на весь экран; сверху и снизу затемнение, чтобы логотип и кнопка читались */
.welcome-hero {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--red) 35%, transparent), transparent 60%),
        var(--charcoal-2);
}

.welcome-hero img,
.welcome-hero video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-hero img {
    opacity: 0;
    transform: scale(1.04);
    transition:
        opacity 1200ms var(--ease),
        transform 9000ms linear;
}

.welcome-hero img.is-shown {
    opacity: 1;
    transform: scale(1.12);
}

.welcome-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(28, 23, 19, 0.78) 0%,
        rgba(28, 23, 19, 0) 26%,
        rgba(28, 23, 19, 0) 50%,
        rgba(28, 23, 19, 0.82) 76%,
        #1c1713 100%
    );
    pointer-events: none;
}

.welcome-hero.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-hero.is-empty::before {
    content: '';
    width: 420px;
    height: 420px;
    background: url('../images/brand/pepper.png') center / contain no-repeat;
    opacity: 0.9;
}

/* эффект внизу (welcome-fx.js): над фото, под надписями */
.welcome-fx {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    height: 760px;
    pointer-events: none;
}

/* помидор показывает рукой на кнопку — его слой над надписями (нажатия проходят насквозь) */
#welcomeScreen.fx-tomato .welcome-fx {
    z-index: 4;
}

.welcome-bottom {
    position: relative;
    z-index: 3;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    padding: 72px 64px 96px;
    text-align: center;
}

.welcome-slogan {
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.welcome-cta {
    min-width: 640px;
    box-shadow: 0 16px 40px color-mix(in srgb, var(--red) 45%, transparent);
}

.welcome-hint {
    font-size: 26px;
    color: rgba(254, 248, 225, 0.72);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.welcome-slogan {
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

/* помидор зовёт сам, а под кнопкой у него облачко с фразой — подсказки там нет */
#welcomeScreen.fx-tomato .welcome-hint {
    visibility: hidden;
}

/* ---------- Где будете кушать ---------- */
#orderTypeScreen {
    justify-content: center;
}

.order-type-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 64px;
    text-align: center;
}

.order-type-logo {
    width: 360px;
    /* свой логотип из SmartResto может быть квадратным — не выше стандартного */
    max-height: 200px;
    object-fit: contain;
    margin-bottom: 120px;
}

.order-type-title {
    font-size: 76px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.order-type-subtitle {
    margin-top: 20px;
    font-size: 32px;
    color: var(--ink-2);
}

.order-type-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    width: 100%;
    margin-top: 96px;
}

.order-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 64px 32px 56px;
    border-radius: var(--r-xl);
    background: var(--paper);
    box-shadow: var(--shadow-1);
    transition:
        transform 140ms var(--ease),
        box-shadow 160ms var(--ease);
}

.order-type-card:active {
    transform: scale(0.97);
    box-shadow:
        var(--shadow-1),
        inset 0 0 0 4px var(--red);
}

/* приостановлен в SmartResto («в зале» / «с собой»): серая, не нажимается; значок и название бледные,
   а «Временно не принимаем» — чёткое, его гость должен прочитать */
.order-type-card.is-paused,
.order-type-card.is-paused:active {
    background: transparent;
    box-shadow: inset 0 0 0 2px rgba(35, 29, 24, 0.1);
    transform: none;
    cursor: default;
}

.order-type-card.is-paused .order-type-icon,
.order-type-card.is-paused .order-type-name {
    opacity: 0.35;
    filter: grayscale(1);
}

.order-type-card.is-paused .order-type-desc {
    color: var(--ink);
    font-weight: 600;
}

.order-type-icon {
    display: grid;
    place-items: center;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: var(--red-50);
    color: var(--red);
    font-size: 120px;
}

.order-type-icon .ic {
    stroke-width: 1.6;
}

/* своя картинка из SmartResto вместо значка: крупнее, без цветного круга */
.order-type-icon.is-image {
    width: 300px;
    height: 300px;
    border-radius: var(--r-lg);
    background: none;
    overflow: hidden;
}

.order-type-icon.is-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-type-name {
    margin-top: 44px;
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.order-type-desc {
    margin-top: 10px;
    font-size: 28px;
    color: var(--ink-2);
}

.order-type-back {
    position: absolute;
    left: 48px;
    bottom: 64px;
}

/* ---------- Шапка ---------- */
.topbar {
    flex: none;
    display: flex;
    align-items: center;
    gap: 28px;
    height: 132px;
    padding: 0 32px 0 40px;
    background: var(--paper);
    box-shadow: 0 1px 0 var(--line);
    position: relative;
    z-index: 3;
}

.topbar-logo {
    height: 64px;
    width: auto;
    max-width: 320px;
    object-fit: contain;
}

.order-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    height: 72px;
    padding: 0 28px;
    border-radius: 999px;
    background: var(--bg);
    font-size: 26px;
    font-weight: 600;
    transition: background-color 160ms var(--ease);
}

.order-type-pill .ic {
    font-size: 32px;
    color: var(--red);
}

.order-type-pill .ic-sm {
    font-size: 26px;
    color: var(--ink-2);
}

.order-type-pill:active {
    background: var(--bg-2);
}

.topbar-cancel {
    margin-left: auto;
}

.topbar-cart {
    justify-content: space-between;
}

.topbar-spacer {
    width: 180px;
}

/* ---------- Меню: категории ---------- */
.menu-layout {
    flex: 1;
    display: flex;
    min-height: 0;
}

.categories {
    flex: none;
    width: 236px;
    overflow-y: auto;
    padding: 20px 16px 200px;
    background: var(--bg-2);
    scrollbar-width: none;
}

.categories::-webkit-scrollbar,
.products::-webkit-scrollbar,
.cart-scroll::-webkit-scrollbar,
.upsell-track::-webkit-scrollbar,
.sheet-body::-webkit-scrollbar {
    display: none;
}

.category {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 18px 8px 20px;
    border-radius: var(--r-md);
    text-align: center;
    color: var(--ink-2);
    transition:
        background-color 180ms var(--ease),
        color 180ms var(--ease);
}

.category + .category {
    margin-top: 6px;
}

.category-thumb {
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--paper);
    color: var(--red);
    font-size: 48px;
    box-shadow: 0 0 0 4px transparent;
    transition: box-shadow 180ms var(--ease);
}

.category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-thumb .ic {
    stroke-width: 1.75;
}

.category-name {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.005em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category.active {
    background: var(--paper);
    color: var(--red-ink);
    box-shadow: var(--shadow-1);
}

.category.active .category-thumb {
    box-shadow: 0 0 0 4px var(--red);
}

/* ---------- Меню: товары ---------- */
.products {
    flex: 1;
    overflow-y: auto;
    padding: 32px 32px 220px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* пружину на краях рисуем сами (js/menu-scroll.js): прокрутка не уходит наружу и не тянет страницу */
    overscroll-behavior: contain;
}

.banners {
    position: relative;
    margin-bottom: 40px;
    border-radius: var(--r-lg);
    overflow: hidden;
    aspect-ratio: 16 / 7;
    background: var(--bg-2);
}

.banner {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 600ms var(--ease);
}

.banner.is-shown {
    opacity: 1;
}

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

.banner-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transition:
        width 240ms var(--ease),
        background-color 240ms var(--ease);
}

.banner-dot.is-active {
    width: 36px;
    border-radius: 6px;
    background: #fff;
}

.section + .section {
    margin-top: 56px;
}

.section-title {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 24px;
}

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

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: left;
    border-radius: var(--r-md);
    background: var(--paper);
    box-shadow: var(--shadow-1);
    overflow: hidden;
    transition: transform 140ms var(--ease);
}

.card:active:not(.is-out) {
    transform: scale(0.97);
}

/* нажатие на позицию открывает экран блюда, «+» в углу кладёт её в корзину сразу */
.card-open {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;
}

.card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #fff;
    overflow: hidden;
}

/* фото поверх квадрата, а не в потоке: высокая картинка (пакет сока, бутылка) иначе растягивала карточку вниз —
   у блока с aspect-ratio минимальная высота равна содержимому (жалоба владельца 2026-11-20, Piko 0.2 л) */
.card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 300ms var(--ease);
}

.card-media img.is-loaded {
    opacity: 1;
}

.card-media img.is-tall {
    object-fit: contain;
    padding: 12px;
}

/* Нет фото: кремовая плитка с иконкой категории, а не серая тарелка */
.placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--cream);
    color: var(--red);
}

.placeholder .ic {
    font-size: 96px;
    stroke-width: 1.5;
    opacity: 0.85;
}

/* своя картинка «блюдо без фото» из SmartResto: целиком, без обрезки (знак или рисунок на прозрачном фоне);
   видна сразу — фото блюд проявляются по загрузке (is-loaded) */
.placeholder.is-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 1;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 18px 18px 20px;
}

.card-name {
    font-size: 23px;
    font-weight: 500;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    margin-top: 6px;
    font-size: 20px;
    color: var(--ink-2);
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    /* место под «+»: он стоит в углу карточки поверх, отдельной кнопкой */
    min-height: 80px;
    padding-right: 76px;
}

.card-price {
    font-size: 29px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.card-add {
    position: absolute;
    right: 18px;
    bottom: 18px;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 34px;
    box-shadow: 0 6px 14px color-mix(in srgb, var(--red) 30%, transparent);
    transition:
        transform 160ms var(--ease),
        background-color 160ms var(--ease);
}

.card-add .ic {
    stroke-width: 2.5;
}

.card.is-added .card-add {
    background: var(--green);
    box-shadow: 0 6px 14px rgba(61, 102, 44, 0.3);
    transform: scale(1.08);
}

.card-qty {
    position: absolute;
    top: 14px;
    right: 14px;
    min-width: 48px;
    height: 48px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 10px rgba(35, 29, 24, 0.2);
}

.card.is-out .card-media img,
.card.is-out .placeholder {
    filter: grayscale(1);
    opacity: 0.45;
}

.card.is-out .card-name,
.card.is-out .card-price {
    color: var(--ink-3);
}

.card-out {
    position: absolute;
    left: 14px;
    top: 14px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

/* Загрузка меню */
.skeleton {
    border-radius: var(--r-md);
    background: linear-gradient(90deg, var(--bg-2) 0%, #f6efe4 50%, var(--bg-2) 100%) 0 0 / 200% 100%;
    animation: shimmer 1.4s linear infinite;
}

.skeleton-title {
    width: 360px;
    height: 48px;
    margin-bottom: 24px;
}

.skeleton-card {
    aspect-ratio: 3 / 4.2;
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

/* ---------- Плашка корзины в меню ---------- */
.cart-bar {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 28px;
    height: 148px;
    padding: 0 24px 0 36px;
    border-radius: var(--r-xl);
    background: var(--paper);
    box-shadow: var(--shadow-2);
    text-align: left;
    transform: translateY(calc(100% + 40px));
    transition: transform 320ms var(--ease);
}

.cart-bar.is-visible {
    transform: none;
}

.cart-bar-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--red-50);
    color: var(--red);
    font-size: 46px;
}

.cart-bar-count {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 42px;
    height: 42px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: grid;
    place-items: center;
    box-shadow: 0 0 0 4px var(--paper);
}

.cart-bar-count.is-bump {
    animation: bump 320ms var(--ease);
}

@keyframes bump {
    40% {
        transform: scale(1.25);
    }
}

.cart-bar-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-bar-label {
    font-size: 22px;
    color: var(--ink-2);
}

.cart-bar-total {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cart-bar-go {
    margin-left: auto;
    min-width: 340px;
}

/* ---------- Корзина ---------- */
.cart-title {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cart-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 32px 40px 40px;
    scrollbar-width: none;
}

.cart-lines {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.line {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 20px 24px 20px 20px;
    border-radius: var(--r-md);
    background: var(--paper);
    box-shadow: var(--shadow-1);
}

.line-media {
    position: relative;
    width: 132px;
    height: 132px;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: #fff;
}

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

.line-media img.is-tall {
    object-fit: contain;
    padding: 6px;
}

.line-media .placeholder .ic {
    font-size: 56px;
}

.line-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.line-name {
    font-size: 27px;
    font-weight: 600;
    line-height: 1.2;
}

.line-mods {
    margin-top: 6px;
    font-size: 21px;
    color: var(--ink-2);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-price {
    margin-top: 10px;
    font-size: 28px;
    font-weight: 700;
}

.line-unit {
    margin-left: 10px;
    font-size: 21px;
    font-weight: 400;
    color: var(--ink-2);
}

.stepper {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: var(--bg);
}

.stepper-btn {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink);
    font-size: 32px;
    box-shadow: var(--shadow-1);
    transition: transform 120ms var(--ease);
}

.stepper-btn:active:not(:disabled) {
    transform: scale(0.92);
}

.stepper-btn.is-plus {
    background: var(--red);
    color: #fff;
}

.stepper-btn:disabled {
    opacity: 0.4;
}

.stepper-btn .ic {
    stroke-width: 2.5;
}

.stepper-val {
    min-width: 56px;
    text-align: center;
    font-size: 30px;
    font-weight: 700;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 220px 40px;
    text-align: center;
}

.cart-empty-title {
    font-size: 44px;
    font-weight: 700;
}

.upsell {
    margin-top: 56px;
}

.upsell-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.upsell-track {
    /* сеткой по четыре в ряд, а не лентой с прокруткой вправо: под корзиной место есть, всё видно сразу
       (просьба владельца 2026-11-22) */
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 4px 0 16px;
}

.upsell-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-radius: var(--r-md);
    background: var(--paper);
    box-shadow: var(--shadow-1);
    overflow: hidden;
    text-align: left;
    transition: transform 140ms var(--ease);
}

.upsell-card:active {
    transform: scale(0.96);
}

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

.upsell-card .placeholder .ic {
    font-size: 64px;
}

.upsell-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 16px;
}

.upsell-name {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.upsell-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.upsell-price {
    font-size: 24px;
    font-weight: 700;
}

.upsell-add {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 28px;
}

/* карточка-группа («Соусы», «Напитки 0,5 л»): открывает выбор — стрелка вместо «+» */
.upsell-card.is-group .upsell-add {
    background: var(--ink);
}

.upsell-add .ic {
    stroke-width: 2.5;
}

.cart-summary {
    flex: none;
    padding: 28px 40px 40px;
    background: var(--paper);
    box-shadow: var(--shadow-up);
}

.cart-summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
}

.cart-summary-label {
    font-size: 32px;
    color: var(--ink-2);
}

.cart-summary-total {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* ---------- Куда принести заказ: столик, ФИО, телефон ---------- */
.details {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 28px 40px 8px;
}

.dfield-head {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 56px;
    margin-bottom: 10px;
}

.dfield-label {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.dfield-optional {
    font-size: 24px;
    color: var(--ink-2);
}

.dfield-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 104px;
    padding: 0 32px;
    border-radius: var(--r-md);
    background: var(--paper);
    box-shadow: inset 0 0 0 3px var(--line);
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: left;
    transition: box-shadow 160ms var(--ease);
}

.dfield-box.is-active {
    box-shadow: inset 0 0 0 4px var(--red);
}

.dfield-box.is-invalid {
    box-shadow: inset 0 0 0 4px var(--danger-ink);
    background: var(--danger-50);
}

.dfield-box .ph {
    color: var(--ink-3);
    font-weight: 400;
}

.dfield-box .ok {
    margin-left: auto;
    color: var(--green);
    font-size: 40px;
}

.dfield-box .ok .ic {
    stroke-width: 2.5;
}

.caret {
    display: inline-block;
    width: 3px;
    height: 46px;
    margin-left: 4px;
    background: var(--red);
    animation: caret 1s steps(1) infinite;
}

@keyframes caret {
    50% {
        opacity: 0;
    }
}

.dfield-error {
    min-height: 34px;
    padding: 6px 4px 0;
    font-size: 24px;
    color: var(--danger-ink);
}

.floor-seg {
    display: inline-flex;
    gap: 6px;
    margin-left: auto;
    padding: 6px;
    border-radius: 999px;
    background: var(--bg-2);
}

.floor-seg button {
    height: 60px;
    padding: 0 26px;
    border-radius: 999px;
    font-size: 24px;
    font-weight: 600;
    color: var(--ink-2);
    transition:
        background-color 160ms var(--ease),
        color 160ms var(--ease);
}

.floor-seg button[aria-checked='true'] {
    background: var(--paper);
    color: var(--red-ink);
    box-shadow: var(--shadow-1);
}

/* Выпадающий список столов (из iiko) */
.dfield-box .chev {
    display: inline-flex;
    margin-left: auto;
    color: var(--ink-2);
    font-size: 36px;
    transition: transform 200ms var(--ease);
}

.dfield-box .ok + .chev {
    margin-left: 18px;
}

.dfield-box .chev.is-open {
    transform: rotate(180deg);
}

.tpanel {
    position: fixed;
    left: 40px;
    right: 40px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    border-radius: var(--r-lg);
    background: var(--paper);
    box-shadow:
        var(--shadow-2),
        inset 0 0 0 2px var(--line);
    animation: panel-in 200ms var(--ease);
}

@keyframes panel-in {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
}

.tranges {
    flex: none;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tranges::-webkit-scrollbar,
.tgrid::-webkit-scrollbar {
    display: none;
}

.trange {
    flex: none;
    height: 64px;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--bg);
    font-size: 24px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink-2);
}

.trange:active {
    background: var(--bg-2);
}

.tgrid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    align-content: start;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.tbtn {
    height: 96px;
    border-radius: var(--r-sm);
    background: var(--bg);
    font-size: 34px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    transition:
        transform 100ms var(--ease),
        background-color 120ms var(--ease);
}

.tbtn:active {
    transform: scale(0.95);
}

.tbtn.is-on {
    background: var(--red);
    color: #fff;
}

.kb.is-covered {
    visibility: hidden;
}

/* Экранная клавиатура */
.kb {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 8px 40px 24px;
}

.kb-row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.kb-key {
    flex: 0 0 76px;
    height: 92px;
    border-radius: 16px;
    background: var(--paper);
    box-shadow:
        0 2px 0 var(--line-2),
        var(--shadow-1);
    font-size: 32px;
    font-weight: 500;
    color: var(--ink);
    transition:
        transform 90ms var(--ease),
        background-color 90ms var(--ease);
}

.kb-key:active {
    transform: translateY(2px);
    background: var(--bg-2);
    box-shadow: 0 0 0 var(--line-2);
}

.kb-key.is-kz {
    background: var(--cream);
}

.kb-key.is-wide {
    flex: 1 1 auto;
    max-width: 520px;
    font-size: 26px;
}

.kb-key.is-fn {
    flex: 0 0 auto;
    min-width: 132px;
    padding: 0 22px;
    background: var(--bg-2);
    font-size: 26px;
    font-weight: 600;
}

.kb-key.is-next {
    flex: 0 0 auto;
    min-width: 220px;
    padding: 0 26px;
    background: var(--red);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--red) 30%, transparent);
}

.kb-key.is-next:active {
    background: var(--red-press);
}

.kb-key .ic {
    font-size: 1.1em;
    vertical-align: -0.15em;
}

.kb-pad {
    display: grid;
    grid-template-columns: repeat(3, 220px);
    gap: 12px;
    justify-content: center;
}

.kb-pad .kb-key {
    flex: none;
    width: 220px;
    height: 104px;
    font-size: 44px;
    font-weight: 600;
}

.kb-pad .kb-key.is-fn {
    min-width: 0;
    font-size: 26px;
}

.kb-pad .kb-key.is-next {
    grid-column: 1 / -1;
    width: auto;
    height: 96px;
}

.success-for {
    margin-top: 28px;
    font-size: 30px;
    font-weight: 600;
    color: var(--ink);
}

/* ---------- Где вы сидите: схема зала ---------- */
.plan-tabs {
    flex: none;
    display: flex;
    gap: 12px;
    margin: 28px 40px 0;
    padding: 8px;
    border-radius: 999px;
    background: var(--bg-2);
}

.plan-tab {
    flex: 1;
    height: 88px;
    border-radius: 999px;
    font-size: 30px;
    font-weight: 700;
    color: var(--ink-2);
    transition:
        background-color 160ms var(--ease),
        color 160ms var(--ease);
}

.plan-tab[aria-selected='true'] {
    background: var(--paper);
    color: var(--red-ink);
    box-shadow: var(--shadow-1);
}

.plan-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 40px;
}

.plan-foot {
    flex: none;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px 40px 40px;
    background: var(--paper);
    box-shadow: var(--shadow-up);
}

.plan-pick {
    flex: 1;
    font-size: 30px;
    font-weight: 600;
    color: var(--ink-2);
}

.plan-pick.is-set {
    color: var(--ink);
}

.plan-foot .btn {
    min-width: 360px;
}

/* Выбранный стол — строкой над полями деталей */
.plan-choice {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    padding: 18px 18px 18px 24px;
    border-radius: var(--r-md);
    background: var(--paper);
    box-shadow: var(--shadow-1);
}

.plan-choice-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--red-50);
    color: var(--red);
    font-size: 34px;
}

.plan-choice-text {
    flex: 1;
    font-size: 32px;
    font-weight: 700;
}

/* ---------- Оплата Kaspi QR (размеры блоков — по требованиям Kaspi) ---------- */
#paymentScreen {
    background: #fff;
}

.pay {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
}

.pay-state {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pay-state.active {
    display: flex;
    animation: screen-in 220ms var(--ease);
}

.kaspi-title-kz {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.kaspi-title-ru {
    font-size: 30px;
    margin-bottom: 64px;
    color: var(--ink-2);
}

.kaspi-spinner {
    width: 120px;
    height: 120px;
    border: 8px solid #f0f0f0;
    border-top-color: #f14635;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.kaspi-logo {
    width: 400px;
    height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kaspi-logo img {
    height: 100%;
    width: auto;
}

.kaspi-amount {
    width: 640px;
    height: 132px;
    margin-top: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 96px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.kaspi-qr-box {
    width: 400px;
    height: 400px;
    margin-top: 32px;
}

.kaspi-qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.pay-timer {
    margin-top: 24px;
    min-height: 34px;
    font-size: 26px;
    color: var(--ink-2);
}

.pay-timer.is-low {
    color: var(--danger-ink);
    font-weight: 600;
}

.kaspi-badges {
    width: 256px;
    height: 88px;
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.kaspi-badges img {
    height: 100%;
    width: auto;
}

.kaspi-confirm-text {
    margin-top: 48px;
}

.kaspi-confirm-text-kz {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.kaspi-confirm-text-ru {
    font-size: 28px;
    color: var(--ink-2);
}

.pay-actions {
    display: flex;
    gap: 20px;
    margin-top: 56px;
}

.kaspi-success-title-kz,
.kaspi-cancel-title-kz {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 12px;
}

.kaspi-cancel-subtitle-kz {
    font-size: 26px;
    color: var(--ink-2);
}

.kaspi-success-icon,
.kaspi-cancel-icon {
    display: grid;
    place-items: center;
    width: 180px;
    height: 180px;
    margin: 48px 0;
    border-radius: 50%;
    color: #fff;
    font-size: 96px;
}

.kaspi-success-icon {
    background: #4caf50;
    box-shadow: 0 0 0 16px rgba(76, 175, 80, 0.18);
}

.kaspi-cancel-icon {
    background: #6b6b6b;
    box-shadow: 0 0 0 16px rgba(107, 107, 107, 0.16);
}

.kaspi-success-icon .ic,
.kaspi-cancel-icon .ic {
    stroke-width: 2.75;
}

.kaspi-success-amount {
    font-size: 72px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.kaspi-success-text,
.kaspi-cancel-text {
    margin-top: 8px;
    font-size: 28px;
    color: var(--ink-2);
}

.kaspi-cancel-text-title {
    font-size: 36px;
    font-weight: 700;
}

#payCancelled .btn {
    margin-top: 56px;
}

.pay-note {
    margin-top: 40px;
    font-size: 26px;
    color: var(--ink-2);
}

/* Ошибка оплаты / время вышло — свои состояния, не «Вы не подтвердили покупку» */
.problem-icon {
    display: grid;
    place-items: center;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--danger-50);
    color: var(--danger);
    font-size: 104px;
}

.problem-icon .ic {
    stroke-width: 1.75;
}

.problem-title {
    margin-top: 48px;
    max-width: 860px;
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.problem-text {
    margin-top: 20px;
    max-width: 800px;
    font-size: 30px;
    color: var(--ink-2);
}

/* ---------- Заказ принят ---------- */
#successScreen {
    justify-content: center;
}

.success {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 80px;
    text-align: center;
}

.success-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 168px;
    height: 168px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 96px;
    box-shadow: 0 0 0 18px var(--green-50);
    animation: mark-in 420ms var(--ease);
}

.success-mark .ic {
    stroke-width: 3;
}

@keyframes mark-in {
    from {
        transform: scale(0.85);
        opacity: 0;
    }
}

.success-title {
    margin-top: 64px;
    font-size: 88px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1;
}

.success-label {
    margin-top: 48px;
    font-size: 34px;
    color: var(--ink-2);
}

.success-number {
    margin-top: 20px;
    min-width: 560px;
    padding: 24px 64px 32px;
    border-radius: var(--r-xl);
    background: var(--paper);
    box-shadow: var(--shadow-1);
    font-size: 220px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--red);
}

.success-message {
    margin-top: 48px;
    max-width: 780px;
    font-size: 30px;
    color: var(--ink-2);
}

.notice {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    max-width: 860px;
    padding: 24px 32px;
    border-radius: var(--r-md);
    font-size: 28px;
    text-align: left;
}

.notice .ic {
    font-size: 44px;
}

.notice-warning {
    background: var(--amber-bg);
    color: var(--amber-ink);
}

.success .btn {
    margin-top: 72px;
}

.success-auto {
    margin-top: 28px;
    min-height: 34px;
    font-size: 24px;
    color: var(--ink-3);
}

/* ---------- «Спасибо за заказ!» по образцу владельца (2026-11-22) ----------
   Сверху галочка и «Спасибо за заказ!», ниже талон — белая карточка с зубчиками
   снизу: «Ваш номер заказа» между двумя линиями, номер, «Заказ отправлен на кухню» с горящим огоньком. Внизу — секунды
   до начала линией и белая полоса «Возьмите чек» со стрелкой вниз, к принтеру под экраном. */
#successScreen .success {
    margin: auto 0;
    padding-bottom: 150px;
}

#successScreen.has-receipt .success {
    padding-bottom: 330px;
}

#successScreen .success-mark {
    width: 140px;
    height: 140px;
    font-size: 80px;
    box-shadow: 0 0 0 14px var(--green-50);
}

#successScreen .success-title {
    margin-top: 48px;
    font-size: 84px;
    letter-spacing: -0.03em;
}

.success-ticket {
    position: relative;
    width: min(880px, 100%);
    margin-top: 48px;
    padding: 40px 56px 52px;
    border-radius: 40px 40px 0 0;
    background: var(--paper);
    filter: drop-shadow(0 14px 26px rgba(35, 29, 24, 0.09));
}

/* зубчики снизу, как у оторванного талона */
.success-ticket::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 20px;
    background: radial-gradient(circle at 50% 0, var(--paper) 19.5px, transparent 20px) 50% 0 / 56px 40px repeat-x;
}

.success-ticket .success-label {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 0;
    font-size: 40px;
    font-weight: 700;
    color: var(--ink);
}

.success-ticket .success-label::before,
.success-ticket .success-label::after {
    content: '';
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--green) 40%, transparent);
}

.success-ticket .success-number {
    min-width: 0;
    margin-top: 16px;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font-size: 250px;
}

/* «Заказ отправлен на кухню» — iiko принял заказ: зелёная плашка в талоне, огонёк горит */
.success-sent {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    padding: 18px 36px;
    border-radius: 999px;
    background: var(--green-50);
    color: var(--green);
    font-size: 34px;
    font-weight: 600;
}

.success-flame {
    width: 52px;
    height: 52px;
    flex: none;
    overflow: visible;
}

.success-flame path {
    transform-box: fill-box;
    transform-origin: 50% 100%;
}

#successScreen.active .success-flame .flame-outer {
    animation: flame-flicker 1.3s ease-in-out infinite;
}

#successScreen.active .success-flame .flame-inner {
    animation: flame-core 0.9s ease-in-out infinite;
}

@keyframes flame-flicker {
    0%,
    100% {
        transform: scale(1, 1) rotate(-2deg);
    }

    30% {
        transform: scale(1.05, 1.1) rotate(1.5deg);
    }

    55% {
        transform: scale(0.97, 0.94) rotate(2.5deg);
    }

    80% {
        transform: scale(1.03, 1.07) rotate(-1deg);
    }
}

@keyframes flame-core {
    0%,
    100% {
        transform: scale(1, 1);
        opacity: 0.95;
    }

    50% {
        transform: scale(0.88, 1.16);
        opacity: 1;
    }
}

#successScreen .success-for {
    margin-top: 44px;
}

#successScreen .success-message {
    margin-top: 40px;
    max-width: 860px;
    font-size: 34px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
    text-wrap: balance;
}

#successScreen .success-for + .success-message {
    margin-top: 20px;
}

/* «Новый заказ» — белая с красной рамкой */
.btn.success-again {
    margin-top: 56px;
    min-width: 560px;
    background: var(--paper);
    border: 4px solid var(--red);
    color: var(--ink);
}

.btn.success-again .ic {
    color: var(--red);
}

/* низ: секунды до начала линией, под ними белая полоса «Возьмите чек» со стрелкой вниз */
.success-foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.success-timer {
    width: 600px;
    margin-bottom: 40px;
}

.success-foot.no-receipt .success-timer {
    margin-bottom: 64px;
}

.success-timer-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.success-timer-label {
    font-size: 26px;
    color: var(--ink-2);
}

.success-timer-num {
    min-width: 2.6em;
    font-size: 46px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-align: right;
}

.success-timer-track {
    height: 14px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

.success-timer-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--green);
    transform-origin: left center;
    /* постоянное движение — линейно; шаг в секунду задаёт finish() в kiosk.js */
    transition: transform 1s linear;
}

.take-receipt {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 30px 0 18px;
    background: var(--paper);
    box-shadow: var(--shadow-up);
}

.take-receipt-text {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 40px;
    font-weight: 700;
    color: var(--ink);
}

.take-receipt-text .ic {
    font-size: 48px;
    color: var(--red);
}

.take-receipt-arrow {
    width: 88px;
    height: 88px;
    color: var(--red);
    stroke-width: 2.6;
}

/* стрелка смотрит прямо вниз, на принтер под экраном, и толкает туда, пока экран на виду */
#successScreen.active .take-receipt-arrow {
    animation: point-down 1.1s var(--ease-in-out) infinite;
}

@keyframes point-down {
    0%,
    100% {
        transform: translateY(-6px);
    }

    50% {
        transform: translateY(10px);
    }
}

#successScreen.active .success-sent {
    animation: number-in 420ms var(--ease) 420ms backwards;
}

#successScreen.active .success-foot {
    animation: number-in 420ms var(--ease) 600ms backwards;
}

/* ---------- Киоск не принимает заказы ---------- */
#offlineScreen {
    background: var(--charcoal);
    color: var(--cream);
    justify-content: center;
}

.offline {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 96px;
    text-align: center;
}

.offline-logo {
    width: 420px;
    max-height: 260px;
    object-fit: contain;
    margin-bottom: 160px;
}

.problem-icon-dark {
    background: rgba(254, 248, 225, 0.08);
    color: var(--cream);
}

.offline-title {
    margin-top: 56px;
    font-size: 60px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.offline-text {
    margin-top: 24px;
    font-size: 32px;
    color: rgba(254, 248, 225, 0.72);
}

/* ---------- Подключение к SmartResto (киоск ещё не подключён) ---------- */
#pairScreen {
    background: var(--charcoal);
    color: var(--cream);
    justify-content: center;
}

.pair {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 96px;
    text-align: center;
}

.pair [hidden] {
    display: none !important;
}

.pair-logo {
    width: 300px;
    margin-bottom: 88px;
}

.pair-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.pair-title {
    font-size: 60px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.pair-text {
    margin-top: 20px;
    max-width: 820px;
    font-size: 30px;
    line-height: 1.3;
    color: rgba(254, 248, 225, 0.72);
}

.pair-cells {
    display: flex;
    gap: 12px;
    margin-top: 72px;
}

.pair-cell {
    display: grid;
    place-items: center;
    width: 96px;
    height: 124px;
    border-radius: 20px;
    background: rgba(254, 248, 225, 0.06);
    box-shadow: inset 0 0 0 2px rgba(254, 248, 225, 0.14);
    font-size: 64px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition:
        background-color 160ms var(--ease),
        box-shadow 160ms var(--ease);
}

.pair-cell.is-gap {
    margin-right: 24px;
}

.pair-cell.is-filled {
    background: rgba(254, 248, 225, 0.12);
}

.pair-cell.is-current {
    box-shadow: inset 0 0 0 3px var(--cream);
}

/* две строки места под ошибку — клавиатура не прыгает, когда она появляется */
.pair-error {
    min-height: 74px;
    margin-top: 20px;
    max-width: 860px;
    font-size: 28px;
    line-height: 1.3;
    color: #ffb4ab;
}

.pair-pad {
    margin-top: 8px;
}

.pair-pad .kb-key .ic,
.pair-kb .kb-key .ic {
    font-size: 44px;
}

.pair-pad .kb-key,
.pair-kb .kb-key {
    background: rgba(254, 248, 225, 0.08);
    color: var(--cream);
    box-shadow: inset 0 0 0 2px rgba(254, 248, 225, 0.1);
}

.pair-pad .kb-key:active,
.pair-kb .kb-key:active {
    background: rgba(254, 248, 225, 0.18);
    box-shadow: inset 0 0 0 2px rgba(254, 248, 225, 0.1);
}

.pair-pad .kb-key.is-fn,
.pair-kb .kb-key.is-fn {
    background: transparent;
    color: rgba(254, 248, 225, 0.72);
}

/* вход логином SmartResto: два поля и экранная клавиатура (латиница, цифры, знаки) */
.pair-fields {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 820px;
    margin-top: 64px;
    text-align: left;
}

.pair-field {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 26px;
    color: rgba(254, 248, 225, 0.72);
}

.pair-input {
    height: 104px;
    padding: 0 32px;
    border: none;
    border-radius: 20px;
    background: rgba(254, 248, 225, 0.06);
    box-shadow: inset 0 0 0 2px rgba(254, 248, 225, 0.14);
    color: var(--cream);
    font: inherit;
    font-size: 40px;
    font-weight: 500;
    caret-color: var(--cream);
    outline: none;
    user-select: text;
    -webkit-user-select: text;
}

.pair-input.is-focused {
    box-shadow: inset 0 0 0 3px var(--cream);
}

.pair-kb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.pair-kb-row {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pair-kb .kb-key {
    flex: 0 0 82px;
    height: 88px;
    font-size: 34px;
}

.pair-kb .kb-key.is-mid {
    flex-basis: 200px;
    font-size: 28px;
}

.pair-kb .kb-key.is-wide {
    flex: 0 0 420px;
    max-width: none;
}

.pair-kb .kb-key.is-on {
    background: rgba(254, 248, 225, 0.2);
    color: var(--cream);
}

.pair-link {
    margin-top: 28px;
    padding: 16px 24px;
    font-size: 26px;
    color: rgba(254, 248, 225, 0.72);
    text-decoration: underline;
    text-underline-offset: 6px;
}

.pair-link:active {
    color: var(--cream);
}

/* выбор филиала: плитки двумя колонками, длинный список листается */
.pair-branches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 888px;
    max-height: 1040px;
    margin-top: 56px;
    overflow-y: auto;
    scrollbar-width: none;
    text-align: left;
}

.pair-branches::-webkit-scrollbar {
    display: none;
}

.pair-branch {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 136px;
    padding: 24px 28px;
    border-radius: 24px;
    background: rgba(254, 248, 225, 0.06);
    box-shadow: inset 0 0 0 2px rgba(254, 248, 225, 0.12);
    color: var(--cream);
    text-align: left;
    transition:
        background-color 140ms var(--ease),
        box-shadow 140ms var(--ease),
        transform 140ms var(--ease);
}

.pair-branch:active {
    transform: scale(0.98);
}

.pair-branch b {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.pair-branch span {
    font-size: 22px;
    line-height: 1.25;
    color: rgba(254, 248, 225, 0.6);
}

.pair-branch small {
    margin-top: auto;
    font-size: 20px;
    color: rgba(254, 248, 225, 0.5);
}

.pair-branch.is-on {
    background: var(--cream);
    box-shadow: inset 0 0 0 2px var(--cream);
    color: var(--charcoal);
}

.pair-branch.is-on span,
.pair-branch.is-on small {
    color: rgba(28, 23, 19, 0.65);
}

.pair-submit {
    width: 684px;
    margin-top: 32px;
}

.pair .btn-primary:disabled {
    background: rgba(254, 248, 225, 0.1);
    color: rgba(254, 248, 225, 0.45);
}

.pair-done-icon {
    margin-bottom: 56px;
    background: var(--green);
    color: var(--cream);
}

.pair-where {
    margin-top: 24px;
    font-size: 40px;
    font-weight: 600;
}

.pair-host {
    margin-top: 56px;
    font-size: 24px;
    color: rgba(254, 248, 225, 0.5);
}

/* ---------- Выбор модификаторов (лист снизу) ---------- */
.sheet-backdrop,
.dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    background: rgba(28, 23, 19, 0.55);
    animation: fade-in 200ms var(--ease);
}

.sheet-backdrop {
    align-items: flex-end;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

.sheet {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 90%;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    background: var(--paper);
    overflow: hidden;
    animation: sheet-up 320ms var(--ease);
}

@keyframes sheet-up {
    from {
        transform: translateY(40%);
        opacity: 0;
    }
}

.sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 40px 48px 24px;
    scrollbar-width: none;
}

.sheet-title {
    font-size: 46px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.sheet-desc {
    margin-top: 14px;
    font-size: 24px;
    color: var(--ink-2);
}

/* ---------- Экран блюда (образец владельца 2026-11-22) ----------
   Нажал на позицию — блюдо на весь экран: тёмно-красная шапка (название и описание слева, фото справа,
   ниже вес, цена и количество), под ней кремовая панель «Добавить к блюду?» и кнопка «Добавить».
   Цвета шапки считаются от --red: цвет кнопок из SmartResto перекрашивает и её. */
.sheet.dish {
    /* в широком окне (страницу смотрят на компьютере) экран не растягивается шире экрана киоска */
    max-width: 1080px;
    margin-inline: auto;
    --dish-dark: color-mix(in srgb, var(--red) 52%, #1a0504);
    --dish-deep: color-mix(in srgb, var(--red) 26%, #120302);
    --dish-panel: #fff7ec;
    --dish-card: #fbeedd;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    background: var(--dish-panel);
}

.dish-hero {
    position: relative;
    flex: none;
    display: flex;
    flex-direction: column;
    min-height: 716px;
    padding: 32px 48px 84px;
    color: #fff;
    background:
        radial-gradient(ellipse 80% 60% at 8% 0%, color-mix(in srgb, var(--red) 62%, transparent) 0%, transparent 70%),
        linear-gradient(168deg, var(--dish-dark) 0%, var(--dish-deep) 100%);
    overflow: hidden;
}

/* Фото блюда в шапке. Есть вырезка (public/cutouts, блюдо без фона) — блюдо стоит прямо на тёмной шапке,
   крупно, с тенью и уходит за правый край, как на образце владельца. Нет вырезки — фото целиком в рамке:
   так показываются сеты и блюда, обрезанные кадром (их не вырезаем — lib/cutouts.js), и новые фото. */
.dish-photo {
    position: absolute;
    /* ниже логотипа и выше кнопок количества: фото целиком, ничто его не закрывает */
    top: 128px;
    right: 44px;
    width: 404px;
    height: 404px;
    border-radius: 40px;
    background: #fff;
    /* светлая кайма и глубокая тень: фото лежит на шапке, как карточка; кнопки количества стоят ниже, еду не закрывают */
    box-shadow:
        0 0 0 8px rgba(255, 255, 255, 0.14),
        0 26px 50px rgba(18, 3, 2, 0.5);
    overflow: hidden;
}

.dish-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 320ms var(--ease);
}

.dish-photo img.is-loaded {
    opacity: 1;
}

.dish-photo img.is-tall {
    object-fit: contain;
    padding: 24px;
}

.dish-photo.has-cutout {
    top: 96px;
    right: -76px;
    width: 720px;
    height: 540px;
    border-radius: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
}

/* тёплый отсвет за блюдом — отделяет тёмное мясо от тёмной шапки */
.dish-photo.has-cutout::before {
    content: '';
    position: absolute;
    inset: 2% 4%;
    background: radial-gradient(
        closest-side,
        rgba(255, 176, 120, 0.3) 0%,
        rgba(255, 176, 120, 0.1) 55%,
        rgba(255, 176, 120, 0) 100%
    );
}

.dish-photo img.is-cutout {
    object-fit: contain;
    filter: drop-shadow(0 28px 26px rgba(10, 2, 1, 0.55));
}

/* блюдо без фото: значок категории без рамки */
.dish-photo:has(.placeholder) {
    background: none;
    box-shadow: none;
}

.dish-photo .placeholder {
    background: none;
    color: rgba(255, 255, 255, 0.5);
}

.dish-photo .placeholder .ic {
    font-size: 200px;
}

.dish-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 88px;
}

.dish-back {
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 40px;
    transition:
        transform 120ms var(--ease),
        background-color 160ms var(--ease);
}

.dish-back:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.26);
}

.dish-back .ic {
    stroke-width: 2.25;
}

.dish-logo {
    height: 84px;
}

.dish-info {
    position: relative;
    max-width: 520px;
    margin-top: 40px;
    /* высота блока учитывает место под фото (.dish-space) — кнопки количества встают ниже фото */
    display: flow-root;
}

/* Фото в рамке (сет, блюдо без вырезки) стоит справа сверху: под него в тексте оставлено место, название и
   описание его обтекают, а ниже фото описание идёт во всю ширину — длинный состав сета виден целиком.
   Размер места = фото (.dish-photo: top 128, right 44, 404 × 404) минус начало текста (32 + 88 + 40 = 160). */
.dish-space {
    display: none;
}

.dish-hero:not(:has(.dish-photo.has-cutout)) .dish-info {
    max-width: none;
}

.dish-hero:not(:has(.dish-photo.has-cutout)) .dish-space {
    display: block;
    float: right;
    width: 432px;
    height: 384px;
}

.sheet.dish .sheet-title {
    font-size: 62px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.04;
    text-wrap: balance;
    text-shadow: 0 2px 18px rgba(18, 3, 2, 0.45);
}

.sheet.dish .sheet-desc {
    margin-top: 20px;
    font-size: 24px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.9);
    /* описание не обрезаем: длинное — шапка становится выше */
    text-shadow: 0 1px 12px rgba(18, 3, 2, 0.5);
}

.dish-buy {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: auto;
    padding-top: 40px;
}

.dish-pill {
    display: inline-flex;
    align-items: center;
    height: 76px;
    padding: 0 32px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    font-size: 32px;
    font-weight: 500;
    background: rgba(18, 3, 2, 0.18);
}

.dish-price {
    border-color: transparent;
    background: color-mix(in srgb, var(--red) 90%, white);
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(18, 3, 2, 0.35);
}

.dish-qty {
    margin-left: auto;
    gap: 4px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 8px 22px rgba(18, 3, 2, 0.3);
}

.dish-qty .stepper-btn:not(.is-plus) {
    background: var(--dish-panel);
    box-shadow: none;
}

/* Нечего выбирать и нечего предложить (напиток, соус): не весь экран, а шапка с кнопкой у нижнего края */
.is-bare .sheet.dish {
    height: auto;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.is-bare .sheet.dish .sheet-body {
    display: none;
}

.is-bare .sheet.dish .sheet-footer {
    position: relative;
    margin-top: -48px;
    padding-top: 40px;
    border-radius: 44px 44px 0 0;
    box-shadow: none;
}

/* Кремовая панель наезжает на шапку скруглёнными углами */
.sheet.dish .sheet-body {
    position: relative;
    margin-top: -48px;
    padding: 40px 40px 24px;
    border-radius: 44px 44px 0 0;
    background: var(--dish-panel);
}

.sheet.dish .sheet-footer {
    padding: 16px 40px 36px;
    background: var(--dish-panel);
    box-shadow: 0 -14px 28px rgba(120, 70, 30, 0.1);
}

.sheet.dish .mod-group:first-child {
    margin-top: 8px;
}

.btn .btn-ic {
    margin-right: 12px;
    font-size: 1.75em;
    stroke-width: 2;
}

/* подсказка «Выберите: …» нужна только блюду с обязательным выбором — пустая место не занимает */
.sheet.dish .sheet-hint:empty {
    display: none;
}

/* Выбор из группы («Соусы», «Напитки 0,5 л» в корзине): экран блюда без блюда — ни веса, ни цены, ни количества,
   заголовок «Добавить к блюду?» не нужен: в шапке и так написано, что выбираем */
.is-group .dish-buy,
.is-group .addons-title {
    display: none;
}

.is-group .addons {
    margin-top: 8px;
}

/* шапка ниже: блюда нет, всё внимание — карточкам выбора */
.is-group .dish-hero {
    min-height: 440px;
}

.is-group .dish-photo.has-cutout {
    top: 64px;
    right: 24px;
    width: 470px;
    height: 330px;
}

.is-group .dish-photo:not(.has-cutout) {
    top: 64px;
    width: 300px;
    height: 300px;
}

/* Допы к блюду: слева название и цена, справа фото, в углу «+»; выбран — красная рамка и «− 2 +» */
.addons {
    margin-top: 44px;
}

#sheetGroups:empty + .addons {
    margin-top: 8px;
}

.addons-title {
    margin-bottom: 22px;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.addon-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.addon {
    position: relative;
    min-height: 256px;
    border-radius: var(--r-lg);
    background: var(--dish-card);
    box-shadow:
        0 1px 2px rgba(120, 70, 30, 0.08),
        0 10px 24px rgba(120, 70, 30, 0.08);
    overflow: hidden;
    /* фото смешивается с кремовой карточкой: белый фон студийного фото исчезает */
    isolation: isolate;
    transition: transform 140ms var(--ease);
}

.addon:active {
    transform: scale(0.98);
}

.addon.is-on::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 4px var(--red);
    pointer-events: none;
}

.addon-pick {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: inherit;
    text-align: left;
}

.addon-text {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 26px 0 26px 28px;
}

.addon-name {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    /* название целиком, без многоточия («Lipton ice tea со вкусом манго и маракуйя 0.5 л.»): карточка вырастет */
    overflow-wrap: anywhere;
}

.addon-price {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.addon-photo {
    position: relative;
    flex: 0 0 53%;
}

.addon-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
    /* светло-серый фон фото высветляем до белого, левый край фото растворяется в карточке */
    filter: brightness(1.07);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
    opacity: 0;
    transition: opacity 300ms var(--ease);
}

.addon-photo img.is-loaded {
    opacity: 1;
}

/* вырезанное блюдо: без смешения и растворения — само, с мягкой тенью */
.addon-photo.has-cutout img {
    padding: 18px 20px 18px 0;
    object-fit: contain;
    mix-blend-mode: normal;
    -webkit-mask-image: none;
    mask-image: none;
    filter: drop-shadow(0 10px 12px rgba(90, 45, 15, 0.28));
    opacity: 1;
}

.addon-photo img.is-tall {
    object-fit: contain;
    padding: 10px;
}

.addon-photo .placeholder {
    background: none;
}

.addon-photo .placeholder .ic {
    font-size: 88px;
}

.addon-ctl {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: flex;
    align-items: center;
    border-radius: 999px;
    transition:
        background-color 160ms var(--ease),
        box-shadow 160ms var(--ease);
}

.addon.is-on .addon-ctl {
    background: #fff;
    box-shadow: var(--shadow-1);
}

.addon-btn {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 32px;
    transition: transform 120ms var(--ease);
}

.addon-btn:active:not(:disabled) {
    transform: scale(0.9);
}

.addon-btn .ic {
    stroke-width: 2.5;
}

.addon-plus {
    background: var(--red);
    color: #fff;
    box-shadow: 0 6px 14px color-mix(in srgb, var(--red) 30%, transparent);
}

.addon-plus:disabled {
    opacity: 0.4;
}

.addon-minus {
    color: var(--ink);
}

.addon-count {
    min-width: 40px;
    font-size: 30px;
    font-weight: 700;
    text-align: center;
}

.mod-group {
    margin-top: 44px;
}

.mod-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.mod-name {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.mod-rule {
    font-size: 22px;
    color: var(--ink-2);
}

.tag {
    margin-left: auto;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.tag-required {
    background: var(--danger-50);
    color: var(--danger-ink);
}

.tag-done {
    background: var(--green-50);
    color: var(--green);
}

.tag-optional {
    background: var(--bg);
    color: var(--ink-2);
}

.mod-item {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    min-height: 96px;
    padding: 12px 20px;
    border-radius: var(--r-md);
    text-align: left;
    transition: background-color 140ms var(--ease);
}

.mod-item + .mod-item {
    margin-top: 6px;
}

.mod-item.is-on {
    background: var(--red-50);
}

.mod-check {
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 3px var(--line-2);
    color: #fff;
    font-size: 30px;
    transition:
        background-color 140ms var(--ease),
        box-shadow 140ms var(--ease);
}

.mod-check.is-box {
    border-radius: 14px;
}

.mod-item.is-on .mod-check {
    background: var(--red);
    box-shadow: none;
}

.mod-check .ic {
    stroke-width: 3;
    opacity: 0;
}

.mod-item.is-on .mod-check .ic {
    opacity: 1;
}

.mod-item-name {
    flex: 1;
    font-size: 26px;
    line-height: 1.2;
}

.mod-item-price {
    font-size: 24px;
    color: var(--ink-2);
    white-space: nowrap;
}

.mod-item .stepper {
    margin-left: 8px;
}

.mod-item .stepper-btn {
    width: 64px;
    height: 64px;
    font-size: 28px;
}

.fixed-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 32px;
    padding: 20px 24px;
    border-radius: var(--r-md);
    background: var(--bg);
}

.fixed-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 24px;
}

.fixed-list li span:last-child {
    color: var(--ink-2);
}

.sheet-footer {
    flex: none;
    padding: 20px 48px 40px;
    box-shadow: var(--shadow-up);
}

.sheet-hint {
    min-height: 32px;
    margin-bottom: 14px;
    font-size: 24px;
    color: var(--danger-ink);
    text-align: center;
}

/* ---------- Диалоги ---------- */
.dialog-backdrop {
    align-items: center;
    justify-content: center;
}

.dialog {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 820px;
    padding: 72px 64px 56px;
    border-radius: var(--r-xl);
    background: var(--paper);
    box-shadow: var(--shadow-2);
    text-align: center;
    animation: dialog-in 260ms var(--ease);
}

@keyframes dialog-in {
    from {
        transform: scale(0.94);
        opacity: 0;
    }
}

.dialog-icon {
    display: grid;
    place-items: center;
    width: 152px;
    height: 152px;
    border-radius: 50%;
    background: var(--red-50);
    color: var(--red);
    font-size: 76px;
}

.dialog-icon .ic {
    stroke-width: 1.75;
}

.dialog-title {
    margin-top: 40px;
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.dialog-text {
    margin-top: 16px;
    font-size: 28px;
    color: var(--ink-2);
}

.dialog-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin-top: 48px;
}

/* ---------- Демо ---------- */
.demo-only {
    display: none !important;
}

body.is-demo .demo-only {
    display: inline-flex !important;
}

.demo-ribbon {
    position: fixed;
    left: 50%;
    top: 0;
    z-index: 30;
    transform: translateX(-50%);
    padding: 8px 24px;
    border-radius: 0 0 16px 16px;
    background: #ffc93c;
    color: #3d2b00;
    font-size: 20px;
    font-weight: 600;
    pointer-events: none;
}

/* ---------- Движение ----------
   Главное — «в корзину»: фото блюда летит к значку корзины (flyToCart в kiosk.js), счётчик подпрыгивает.
   Остальное объясняет, что произошло: экраны въезжают по направлению шага (вперёд — справа, назад — слева),
   первые карточки меню и варианты «в зале / с собой» появляются друг за другом, кнопка на приветствии
   зовёт мягкой волной, после оплаты галочка прорисовывается, а номер заказа поднимается.
   Только transform и opacity. Выключатель — «Анимации» в SmartResto («Оформление» → body.motion-off). */
:root {
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

.screen.active[data-enter='fwd'] {
    animation: screen-fwd 280ms var(--ease);
}

.screen.active[data-enter='back'] {
    animation: screen-back 280ms var(--ease);
}

@keyframes screen-fwd {
    from {
        opacity: 0;
        transform: translateX(56px);
    }
}

@keyframes screen-back {
    from {
        opacity: 0;
        transform: translateX(-56px);
    }
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
}

#orderTypeScreen.active .order-type-card {
    animation: rise-in 360ms var(--ease) backwards;
}

#orderTypeScreen.active .order-type-card:nth-child(2) {
    animation-delay: 70ms;
}

/* меню после выбора «в зале / с собой»: первые карточки — друг за другом, всего не дольше 0,25 с задержки */
#products.is-entering .section:first-of-type .card:nth-child(-n + 9) {
    animation: rise-in 320ms var(--ease) backwards;
}

#products.is-entering .section:first-of-type .card:nth-child(2) {
    animation-delay: 30ms;
}

#products.is-entering .section:first-of-type .card:nth-child(3) {
    animation-delay: 60ms;
}

#products.is-entering .section:first-of-type .card:nth-child(4) {
    animation-delay: 90ms;
}

#products.is-entering .section:first-of-type .card:nth-child(5) {
    animation-delay: 120ms;
}

#products.is-entering .section:first-of-type .card:nth-child(6) {
    animation-delay: 150ms;
}

#products.is-entering .section:first-of-type .card:nth-child(7) {
    animation-delay: 180ms;
}

#products.is-entering .section:first-of-type .card:nth-child(8) {
    animation-delay: 210ms;
}

#products.is-entering .section:first-of-type .card:nth-child(9) {
    animation-delay: 240ms;
}

/* «в корзину»: копия фото над экраном, путь и масштаб — в flyToCart */
.fly {
    position: fixed;
    z-index: 30;
    border-radius: var(--r-md);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-2);
    pointer-events: none;
    will-change: transform, opacity;
}

.fly img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fly .placeholder {
    width: 100%;
    height: 100%;
}

/* количество в корзине: цифра уезжает в сторону изменения */
.stepper-val.roll-up {
    animation: roll-up 220ms var(--ease);
}

.stepper-val.roll-down {
    animation: roll-down 220ms var(--ease);
}

@keyframes roll-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
}

@keyframes roll-down {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
}

/* приветствие: от кнопки расходится мягкая волна — киоск зовёт подойти */
.welcome-cta {
    position: relative;
    isolation: isolate;
}

.welcome-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--red);
    opacity: 0;
    pointer-events: none;
}

#welcomeScreen.active .welcome-cta::before {
    animation: cta-wave 2.8s var(--ease) 1.4s infinite;
}

@keyframes cta-wave {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    60%,
    100% {
        opacity: 0;
        transform: scale(1.07, 1.4);
    }
}

/* после оплаты: галочка прорисовывается, от круга расходится кольцо, номер заказа поднимается */
.success-check {
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.success-check path {
    stroke-dasharray: 26;
}

#successScreen.active .success-check path {
    animation: check-draw 380ms var(--ease) 200ms backwards;
}

@keyframes check-draw {
    from {
        stroke-dashoffset: 26;
    }
}

.success-mark::after {
    content: '';
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    border: 6px solid var(--green);
    opacity: 0;
    pointer-events: none;
}

#successScreen.active .success-mark::after {
    animation: ring-out 900ms var(--ease) 260ms;
}

@keyframes ring-out {
    from {
        opacity: 0.5;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(1.5);
    }
}

#successScreen.active .success-number {
    animation: number-in 460ms var(--ease) 240ms backwards;
}

@keyframes number-in {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
}

/* схема зала: выбранный стол отмечается галочкой с лёгким «щелчком» */
.pl-spot.is-on .pl-check-bg,
.pl-spot.is-on .pl-check {
    transform-box: fill-box;
    transform-origin: center;
    animation: pop-in 260ms var(--ease) backwards;
}

@keyframes pop-in {
    from {
        opacity: 0;
        transform: scale(0.6);
    }
}

/* «в зале / с собой»: значки оживают — круг «щёлкает» с лёгким перелётом, вилка с ножом чокаются, пакет
   покачивается, у пакета прорисовывается ручка. Пока гость выбирает — повторяется раз в 5 с, спокойно.
   Выбранная карточка загорается цветом кнопок, вторая отступает (pickOrderType в kiosk.js). */
.order-type-icon {
    transition:
        background-color 200ms var(--ease),
        color 200ms var(--ease);
}

.order-type-icon .ic {
    overflow: visible;
}

.ot-fork,
.ot-knife {
    transform-box: fill-box;
    transform-origin: 50% 100%;
}

.ot-bag {
    transform-box: fill-box;
    transform-origin: 50% 0%;
}

.ot-handle {
    stroke-dasharray: 13;
}

#orderTypeScreen.active .order-type-icon {
    animation: icon-pop 520ms cubic-bezier(0.34, 1.56, 0.64, 1) 180ms backwards;
}

#orderTypeScreen.active .order-type-card:nth-child(2) .order-type-icon {
    animation-delay: 250ms;
}

@keyframes icon-pop {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
}

#orderTypeScreen.active .ot-fork {
    animation: fork-clink 5s var(--ease-in-out) 650ms infinite;
}

#orderTypeScreen.active .ot-knife {
    animation: knife-clink 5s var(--ease-in-out) 650ms infinite;
}

@keyframes fork-clink {
    0%,
    20%,
    100% {
        transform: rotate(0deg);
    }

    7% {
        transform: rotate(14deg);
    }

    12% {
        transform: rotate(8deg);
    }
}

@keyframes knife-clink {
    0%,
    20%,
    100% {
        transform: rotate(0deg);
    }

    7% {
        transform: rotate(-14deg);
    }

    12% {
        transform: rotate(-8deg);
    }
}

#orderTypeScreen.active .ot-bag {
    animation: bag-swing 5s var(--ease-in-out) 1.25s infinite;
}

@keyframes bag-swing {
    0%,
    22%,
    100% {
        transform: rotate(0deg);
    }

    5% {
        transform: rotate(-9deg);
    }

    11% {
        transform: rotate(7deg);
    }

    17% {
        transform: rotate(-3deg);
    }
}

#orderTypeScreen.active .ot-handle {
    animation: handle-draw 520ms var(--ease) 420ms backwards;
}

@keyframes handle-draw {
    from {
        stroke-dashoffset: 13;
    }
}

.order-type-card.is-picked {
    transform: scale(1.02);
    box-shadow:
        var(--shadow-2),
        inset 0 0 0 4px var(--red);
}

.order-type-card.is-picked .order-type-icon {
    background: var(--red);
    color: #fff;
}

.order-type-card.is-dimmed {
    opacity: 0.4;
    transform: scale(0.97);
    transition:
        opacity 220ms var(--ease),
        transform 220ms var(--ease);
}

#orderTypeScreen.active .order-type-card.is-picked .ot-fork {
    animation: fork-tap 280ms var(--ease);
}

#orderTypeScreen.active .order-type-card.is-picked .ot-knife {
    animation: knife-tap 280ms var(--ease);
}

#orderTypeScreen.active .order-type-card.is-picked .ot-bag {
    animation: bag-tap 280ms var(--ease);
}

@keyframes fork-tap {
    50% {
        transform: rotate(14deg);
    }
}

@keyframes knife-tap {
    50% {
        transform: rotate(-14deg);
    }
}

@keyframes bag-tap {
    50% {
        transform: rotate(-8deg);
    }
}

/* «Вы ещё здесь?»: кольцо отсчёта. Убывает непрерывно (переход 1 с на каждую секунду, setIdleRing),
   точка-«голова» идёт по концу кольца, цифра каждую секунду «щёлкает». Последние 5 с — красное и «стучит». */
.dialog-icon[hidden],
.idle-ring[hidden] {
    display: none;
}

.idle-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: 240px;
    height: 240px;
}

.idle-ring svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.idle-track {
    fill: none;
    stroke: var(--line);
    stroke-width: 14;
}

.idle-arc {
    fill: none;
    stroke: var(--green);
    stroke-width: 14;
    stroke-linecap: round;
    stroke-dasharray: 653.45;
    transform: rotate(-90deg);
    transform-box: view-box;
    transform-origin: 120px 120px;
}

.idle-head {
    fill: var(--green);
    stroke: var(--paper);
    stroke-width: 5;
    transform-box: view-box;
    transform-origin: 120px 120px;
}

.idle-num {
    font-size: 104px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--ink);
    transition: color 400ms ease;
}

.idle-num.is-tick {
    animation: num-tick 260ms var(--ease);
}

@keyframes num-tick {
    from {
        opacity: 0.35;
        transform: scale(1.14);
    }
}

.idle-ring.is-low .idle-arc {
    stroke: var(--danger);
}

.idle-ring.is-low .idle-head {
    fill: var(--danger);
}

.idle-ring.is-low .idle-num {
    color: var(--danger);
}

.idle-ring.is-beat {
    animation: ring-beat 340ms var(--ease);
}

@keyframes ring-beat {
    40% {
        transform: scale(1.06);
    }
}

/* окно закрывается быстрее, чем открылось */
.dialog-backdrop.is-closing {
    animation: fade-out 160ms var(--ease) forwards;
}

.dialog-backdrop.is-closing .dialog {
    animation: dialog-out 160ms var(--ease) forwards;
}

@keyframes fade-out {
    to {
        opacity: 0;
    }
}

@keyframes dialog-out {
    to {
        opacity: 0;
        transform: scale(0.97);
    }
}

/* «Төлем қабылданды» (оплата принята): круг выпрыгивает, светлое кольцо вокруг вырастает, галочка
   прорисовывается, от круга расходится волна, сумма и «Оплата принята» поднимаются следом.
   Экран виден около 1,5 с — всё укладывается в секунду. Вид — как требует Kaspi, движение его не меняет. */
.kaspi-success-icon {
    position: relative;
}

.kaspi-check path {
    stroke-dasharray: 26;
}

.kaspi-success-icon::after {
    content: '';
    position: absolute;
    inset: -16px;
    border-radius: 50%;
    border: 6px solid #4caf50;
    opacity: 0;
    pointer-events: none;
}

#payPaid.active .kaspi-success-icon {
    animation:
        paid-pop 480ms cubic-bezier(0.34, 1.56, 0.64, 1) backwards,
        paid-halo 420ms var(--ease) 160ms backwards;
}

@keyframes paid-pop {
    from {
        opacity: 0;
        transform: scale(0.6);
    }
}

@keyframes paid-halo {
    from {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.18);
    }
}

#payPaid.active .kaspi-check path {
    animation: check-draw 360ms var(--ease) 240ms backwards;
}

#payPaid.active .kaspi-success-icon::after {
    animation: ring-out 900ms var(--ease) 300ms;
}

#payPaid.active .kaspi-success-amount {
    animation: number-in 420ms var(--ease) 260ms backwards;
}

#payPaid.active .kaspi-success-text {
    animation: number-in 420ms var(--ease) 340ms backwards;
}

/* ---------- Новогоднее оформление (SmartResto «Оформление», 2026-11-22) ----------
   Снегопад на выборе заказа, в меню и на «Спасибо», снежные шапки на главных кнопках, на категориях снег
   скапливается (js/festive.js рисует, здесь — где и какого размера). Слой снегопада поверх экранов, но под
   шторками и окнами; нажатия проходят сквозь него. Гирлянды были и убраны владельцем — «они всё портят». */
.festive-layer {
    position: fixed;
    inset: 0;
    z-index: 8;
    pointer-events: none;
}

.festive-layer[hidden] {
    display: none;
}

.festive-snow {
    position: absolute;
    inset: 0;
    display: none;
}

body[data-screen='orderTypeScreen'] .festive-snow,
body[data-screen='menuScreen'] .festive-snow,
body[data-screen='successScreen'] .festive-snow {
    display: block;
}

/* сугроб на круглой картинке категории: круг 104 px, его верх — на 18 px от края кнопки */
body.festive .category {
    --fst-pile: 104px;
    --fst-pile-top: 18px;
}

/* шапка по размеру кнопки: сугроб поднимается над кнопкой на ~половину своей высоты */
body.festive {
    --fst-cap: 52px;
    --fst-cap-inset: 40px;
}

body.festive .cart-bar-go {
    --fst-cap: 40px;
    --fst-cap-inset: 30px;
}

body.festive .order-type-card {
    --fst-cap: 64px;
    --fst-cap-inset: 26px;
}

/* «Анимации» выключены в SmartResto: всё сразу, без движения */
body.motion-off *,
body.motion-off *::before,
body.motion-off *::after {
    animation: none !important;
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        transition-duration: 1ms !important;
    }

    .welcome-hero img.is-shown {
        transform: none;
    }

    /* волна у кнопки и кольцо после оплаты — украшения: при «меньше движения» их нет */
    .welcome-cta::before,
    .success-mark::after,
    .kaspi-success-icon::after {
        display: none;
    }

    /* повторяющиеся движения значков — тоже (при 1 мс они бы дёргались) */
    .ot-fork,
    .ot-knife,
    .ot-bag,
    .idle-ring,
    .success-flame path,
    .take-receipt-arrow {
        animation: none !important;
    }
}

/* Язык гостя (1.5.9): «Рус · Қаз · Eng» в правом верхнем углу приветствия (на фото — тёмная подложка)
   и выбора «в зале / с собой» (светлая) */
.lang-switch {
    position: absolute;
    top: 40px;
    right: 40px;
    z-index: 5;
    display: flex;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(28, 23, 19, 0.55);
}

.lang-btn {
    min-width: 104px;
    height: 68px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 26px;
    font-weight: 600;
    color: #fff;
}

.lang-btn.is-active {
    background: #fff;
    color: var(--ink);
}

.lang-switch-light {
    background: var(--bg-2);
}

.lang-switch-light .lang-btn {
    color: var(--ink-2);
}

.lang-switch-light .lang-btn.is-active {
    background: var(--ink);
    color: #fff;
}
