        :root {
            /* ===== Claude-like warm system (docs/DESIGN.md) ===== */
            --c-bg: #f5f4ed;          /* Parchment */
            --c-surface: #faf9f5;     /* Ivory */
            --c-white: #ffffff;
            --c-text: #141413;        /* Anthropic Near Black */
            --c-text-2: #5e5d59;      /* Olive Gray */
            --c-text-3: #87867f;      /* Stone Gray */
            --c-border: #f0eee6;      /* Border Cream */
            --c-border-strong: #e8e6dc; /* Border Warm / Warm Sand */
            --c-dark: #30302e;        /* Dark Surface */
            --c-brand: #c96442;       /* Terracotta Brand */
            --c-brand-2: #d97757;     /* Coral Accent */
            --c-error: #b53333;       /* Error Crimson */
            --c-focus: #3898ec;       /* Focus Blue */

            --r-8: 8px;
            --r-12: 12px;
            --r-16: 16px;
            --r-24: 24px;

            /* Ring-based shadow system */
            --shadow-ring: 0 0 0 1px rgba(209, 207, 197, 1); /* Ring Warm (#d1cfc5) */
            --shadow-whisper: rgba(0, 0, 0, 0.05) 0px 4px 24px;

            --font-serif: Georgia, "Times New Roman", Times, serif;
            --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
            --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        }

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

        body {
            font-family: var(--font-sans);
            background: var(--c-bg);
            color: var(--c-text);
            min-height: 100vh;
            padding-bottom: 70px;
            line-height: 1.6;
        }

        .container {
            max-width: 680px;
            margin: 0 auto;
            padding: 16px;
        }

        /* Верхний хедер */
        .header {
            position: sticky;
            top: 0;
            z-index: 900;
            background: rgba(245, 244, 237, 0.9);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--c-border);
            padding: 14px 16px;
            text-align: center;
            margin-bottom: 18px;
        }

        .header h1 {
            font-family: var(--font-serif);
            font-size: 20px;
            font-weight: 500;
            line-height: 1.2;
            color: var(--c-text);
        }

        /* Нижняя навигация - теперь 3 вкладки */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(250, 249, 245, 0.92);
            display: flex;
            justify-content: space-around;
            padding: 8px 0;
            border-top: 1px solid var(--c-border);
            box-shadow: none;
            z-index: 1000;
            backdrop-filter: blur(12px);
        }

        .nav-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 8px;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
            background: transparent;
            color: var(--c-text-2);
        }

        .nav-item.active {
            color: var(--c-text);
        }

        .nav-item-icon {
            font-size: 24px;
            margin-bottom: 4px;
        }

        .nav-item-label {
            font-size: 11px;
            font-weight: 500;
            letter-spacing: 0.12px;
        }

        /* Вкладки */
        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        /* Onboarding */
        .onboarding {
            text-align: center;
            padding: 40px 20px;
        }

        .onboarding-icon {
            font-size: 80px;
            margin-bottom: 20px;
        }

        .onboarding-title {
            font-family: var(--font-serif);
            font-size: 25px;
            font-weight: 500;
            margin-bottom: 12px;
            line-height: 1.2;
        }

        .onboarding-subtitle {
            font-size: 16px;
            color: var(--c-text-2);
            margin-bottom: 32px;
            line-height: 1.6;
        }

        .progress-bar {
            width: 100%;
            height: 4px;
            background: var(--c-border-strong);
            border-radius: 2px;
            margin-bottom: 24px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: var(--c-brand);
            transition: width 0.3s ease;
        }

        .progress-text {
            font-size: 12px;
            color: var(--c-text-3);
            margin-bottom: 24px;
        }

        /* Карточки */
        .card {
            background: var(--c-surface);
            border-radius: var(--r-16);
            padding: 20px;
            margin-bottom: 12px;
            border: 1px solid var(--c-border);
            box-shadow: var(--shadow-whisper);
        }

        .card-title {
            font-family: var(--font-serif);
            font-size: 20px;
            font-weight: 500;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
            line-height: 1.2;
        }

        .card-subtitle {
            font-size: 14px;
            color: var(--c-text-2);
            margin-top: -12px;
            margin-bottom: 16px;
        }

        /* Компактная карточка профиля на главной */
        .profile-card-compact {
            background: var(--c-text);
            border-radius: var(--r-16);
            padding: 20px;
            margin-bottom: 16px;
            color: var(--c-surface);
            display: flex;
            align-items: center;
            gap: 16px;
            position: relative;
            border: 1px solid var(--c-dark);
        }

        .profile-avatar-compact {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: rgba(250, 249, 245, 0.12);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 30px;
            flex-shrink: 0;
        }

        .profile-info-compact {
            flex: 1;
        }

        .profile-name-compact {
            font-family: var(--font-serif);
            font-size: 20px;
            font-weight: 500;
            margin-bottom: 6px;
            line-height: 1.2;
        }

        .profile-stats-compact {
            font-size: 13px;
            opacity: 0.9;
            line-height: 1.6;
        }

        .profile-edit-btn {
            position: absolute;
            top: 16px;
            right: 16px;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(250, 249, 245, 0.12);
            border: none;
            color: var(--c-surface);
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .profile-edit-btn:active {
            background: rgba(255,255,255,0.3);
        }


        /* Формы */
        .form-group {
            margin-bottom: 16px;
        }

        .form-group-label-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 8px;
        }

        .form-group-label-row label {
            margin-bottom: 0;
            flex: 1;
        }

        a.diet-info-link {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            min-width: 40px;
            border-radius: var(--r-12);
            border: 1px solid var(--c-border);
            background: var(--c-white);
            color: var(--c-text);
            text-decoration: none;
            font-size: 18px;
            line-height: 1;
            box-shadow: 0 0 0 1px rgba(209, 207, 197, 0);
            transition: box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
        }

        a.diet-info-link:active {
            transform: scale(0.98);
        }

        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            font-size: 14px;
            color: var(--c-text);
        }

        input, select {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--c-border-strong);
            border-radius: var(--r-12);
            font-size: 16px;
            background: var(--c-white);
            color: var(--c-text);
            transition: border-color 0.15s, box-shadow 0.15s;
        }

        input:focus, select:focus {
            outline: none;
            border-color: var(--c-focus);
            box-shadow: 0 0 0 3px rgba(56, 152, 236, 0.18);
        }

        /* Радио кнопки (чипы) */
        .chip-group {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .chip {
            flex: 1;
            min-width: 100px;
        }

        .chip input[type="radio"] {
            display: none;
        }

        .chip label {
            display: block;
            padding: 10px 12px;
            border: 1px solid var(--c-border-strong);
            border-radius: var(--r-12);
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 500;
            margin-bottom: 0;
            background: var(--c-white);
            color: var(--c-text);
            box-shadow: 0 0 0 1px rgba(209, 207, 197, 0);
        }

        .chip input[type="radio"]:checked + label {
            border-color: var(--c-brand);
            background: var(--c-brand);
            color: var(--c-surface);
            box-shadow: 0 0 0 1px rgba(201, 100, 66, 0.6);
        }

        /* Специальная сетка для выбора цели: 3 равные кнопки */
        .goal-chip-group {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
        }

        .goal-chip-group .chip {
            min-width: 0;
        }

        .goal-chip-group .chip label {
            width: 100%;
            min-height: 52px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            padding: 8px 4px;
            font-size: 12px;
            line-height: 1.2;
            white-space: normal;
            text-align: center;
            overflow-wrap: anywhere;
        }

        /* Кнопки */
        .btn {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid transparent;
            border-radius: var(--r-12);
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, opacity 0.12s ease;
            margin-bottom: 12px;
            -webkit-tap-highlight-color: transparent;
        }

        .btn:active {
            transform: scale(0.98);
            opacity: 0.92;
        }

        .btn-primary {
            background: var(--c-brand);
            color: var(--c-surface);
            box-shadow: 0 0 0 1px rgba(201, 100, 66, 0.65);
        }

        .btn-secondary {
            background: var(--c-border-strong);
            color: #4d4c48; /* Charcoal Warm */
            box-shadow: var(--shadow-ring);
            border-color: transparent;
        }

        .btn-large {
            padding: 18px 24px;
            font-size: 18px;
        }

        .btn-small {
            padding: 8px 16px;
            font-size: 14px;
            width: auto;
            display: inline-block;
            margin-bottom: 0;
        }

        .btn-replace {
            background: transparent;
            border: 1px solid var(--c-border-strong);
            color: var(--c-text);
            padding: 6px 12px;
            font-size: 13px;
            border-radius: 8px;
            box-shadow: 0 0 0 1px rgba(209, 207, 197, 0);
        }

        .btn-replace:active {
            background: var(--c-border-strong);
            color: var(--c-text);
        }

        .btn-blacklist {
            background: transparent;
            border: 1px solid rgba(181, 51, 51, 0.5);
            color: var(--c-error);
            padding: 6px 12px;
            font-size: 13px;
            border-radius: 8px;
        }

        .btn-blacklist:active {
            background: #ff6b6b;
            color: white;
        }

        /* Блюда */
        .day-header {
            margin: 24px 0 16px 0;
            padding: 12px 0;
            border-bottom: 1px solid var(--c-border-strong);
        }

        .day-header h2 {
            font-family: var(--font-serif);
            font-size: 25px;
            font-weight: 500;
            color: var(--c-text);
            margin: 0;
            line-height: 1.2;
        }

        .day-header:first-child {
            margin-top: 0;
        }

        .meal-card {
            background: var(--c-surface);
            border-radius: var(--r-16);
            padding: 20px;
            margin-bottom: 12px;
            color: var(--c-text);
            border: 1px solid var(--c-border);
            box-shadow: var(--shadow-whisper);
        }

        .meal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .meal-title {
            font-family: var(--font-serif);
            font-size: 20px;
            font-weight: 500;
            line-height: 1.2;
        }

        .meal-time {
            font-size: 14px;
            color: var(--c-text-3);
        }

        .dishes-list {
            background: var(--c-white);
            border-radius: var(--r-12);
            padding: 0;
            border: 1px solid var(--c-border);
            overflow: hidden;
        }

        .dish-item {
            padding: 12px 12px;
            background: transparent;
            margin-bottom: 0;
            color: var(--c-text);
            border-bottom: 1px solid var(--c-border);
        }

        .dish-item:last-child {
            border-bottom: none;
        }

        .dish-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 8px;
        }

        .dish-name {
            font-weight: 600;
            font-size: 15px;
            flex: 1;
            color: var(--c-text);
            line-height: 1.25;
        }

        .dish-weight {
            font-size: 14px;
            color: var(--c-text-3);
            margin-left: 8px;
            white-space: nowrap;
        }

        .dish-details {
            font-size: 13px;
            color: var(--c-text-2);
            margin-bottom: 8px;
        }

        .dish-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
        }

        .dish-actions-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .meal-summary {
            margin-top: 12px;
            padding: 12px;
            background: var(--c-white);
            border-radius: var(--r-12);
            font-weight: 600;
            font-size: 14px;
            border: 1px solid var(--c-border);
        }

        /* Итоговая статистика */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-top: 12px;
        }

        .stat-card {
            background: var(--c-surface);
            border-radius: var(--r-12);
            padding: 16px;
            text-align: center;
            border: 1px solid var(--c-border);
            box-shadow: none;
        }

        .stat-card-total {
            background: var(--c-text);
            color: var(--c-surface);
            border-color: var(--c-dark);
        }

        .stat-card-total .stat-label {
            color: rgba(255, 255, 255, 0.9);
        }

        .day-stats-container {
            margin: 24px 0;
            padding: 16px;
            background: transparent;
            border-radius: var(--r-12);
            border: 1px solid var(--c-border);
        }

        .day-stats-title {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 12px;
            color: var(--c-text);
        }

        .day-stats-grid {
            margin-top: 0;
        }

        .total-stats-container {
            margin: 24px 0;
            padding: 20px;
            background: var(--c-surface);
            border-radius: var(--r-16);
            border: 1px solid var(--c-border-strong);
            box-shadow: var(--shadow-whisper);
        }

        .total-stats-title {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 16px;
            color: var(--c-text);
        }

        .total-stats-grid {
            margin-top: 0;
        }

        .unique-dishes-stat {
            margin-top: 16px;
            padding: 16px;
            background: var(--c-white);
            border-radius: var(--r-12);
            text-align: center;
            border: 1px solid var(--c-border);
            box-shadow: none;
        }

        .stat-icon {
            font-size: 28px;
            margin-bottom: 8px;
        }

        .stat-value {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .stat-label {
            font-size: 12px;
            color: var(--c-text-3);
        }

        /* Загрузка и ошибки */
        .loading {
            text-align: center;
            padding: 40px 20px;
            display: none;
        }

        .loading.active {
            display: block;
        }

        .loading-spinner {
            font-size: 48px;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .loading-text {
            margin-top: 16px;
            font-size: 16px;
            color: var(--c-text-2);
        }

        /*
         * Отступ сверху: safeAreaInset (вырез/status bar) + contentSafeAreaInset (кнопки Telegram).
         * См. core.telegram.org/bots/webapps — поля safeAreaInset, contentSafeAreaInset и CSS-переменные --tg-*-safe-area-inset-*.
         */
        .error {
            position: fixed;
            top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
            left: 12px;
            right: 12px;
            z-index: 10050;
            width: auto;
            max-width: min(420px, calc(100vw - 24px));
            margin-left: auto;
            margin-right: auto;
            background: var(--c-error);
            color: var(--c-surface);
            padding: 0;
            border-radius: 12px;
            overflow: hidden;
            display: none;
            box-shadow: rgba(181, 51, 51, 0.28) 0px 8px 24px;
        }

        .error.active {
            display: block;
        }

        .error-body {
            padding: 10px 12px 10px 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .error-progress-track {
            height: 3px;
            margin: 0 2px;
            border-radius: 2px;
            background: rgba(255, 255, 255, 0.22);
            overflow: hidden;
            flex-shrink: 0;
        }

        .error-progress-fill {
            height: 100%;
            width: 100%;
            border-radius: 2px;
            background: rgba(255, 255, 255, 0.9);
            transform-origin: left center;
            transform: scaleX(1);
        }

        .error.active .error-progress-fill {
            animation: errorProgressShrink 10s linear forwards;
        }

        @keyframes errorProgressShrink {
            from {
                transform: scaleX(1);
            }
            to {
                transform: scaleX(0);
            }
        }

        .error-close {
            flex-shrink: 0;
            align-self: flex-start;
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            padding: 0 6px;
            border-radius: 6px;
            margin-left: 10px;
            line-height: 1.15;
            transition: background 0.2s;
        }

        .error-close:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .error-close:active {
            background: rgba(255, 255, 255, 0.4);
        }

        .error-content {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 8px;
        }

        .error-text {
            flex: 1;
            font-size: 13px;
            line-height: 1.4;
        }

        /* Профиль (настройки) */
        .profile-header {
            text-align: center;
            margin-bottom: 24px;
        }

        .profile-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: var(--c-text);
            margin: 0 auto 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 36px;
            color: var(--c-surface);
        }

        .profile-name {
            font-family: var(--font-serif);
            font-size: 25px;
            font-weight: 500;
            margin-bottom: 4px;
            line-height: 1.2;
        }

        .profile-info {
            font-size: 14px;
            color: var(--c-text-2);
        }

        /* Целевые калории — слайдер в профиле */
        .calorie-target-display {
            display: flex;
            align-items: baseline;
            gap: 6px;
            margin: 6px 0 14px;
        }

        .calorie-target-value {
            font-size: 30px;
            font-weight: 700;
            color: var(--c-brand);
        }

        .calorie-target-unit {
            font-size: 14px;
            color: var(--tg-theme-hint-color, #999);
        }

        .calorie-range-input {
            width: 100%;
            -webkit-appearance: none;
            appearance: none;
            height: 6px;
            border-radius: 3px;
            background: var(--c-border-strong);
            outline: none;
            cursor: pointer;
        }

        .calorie-range-input::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: var(--c-brand);
            cursor: pointer;
            box-shadow: var(--shadow-whisper);
        }

        .calorie-range-input::-moz-range-thumb {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: var(--c-brand);
            cursor: pointer;
            border: none;
            box-shadow: var(--shadow-whisper);
        }

        .calorie-range-labels {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            color: var(--tg-theme-hint-color, #999);
            margin-top: 6px;
        }

        /* Dual range slider (PP level) */
        .dual-range {
            position: relative;
            height: 36px;
            margin-top: 10px;
        }
        .dual-range input[type="range"] {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            margin: 0;
            pointer-events: none;
            background: transparent;
        }
        .dual-range input[type="range"]::-webkit-slider-thumb {
            pointer-events: auto;
        }
        .dual-range input[type="range"]::-moz-range-thumb {
            pointer-events: auto;
        }
        .pp-range-labels {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            color: var(--tg-theme-hint-color, #999);
            margin-top: 6px;
        }
        .pp-current {
            font-weight: 700;
        }

        /* Черный список */
        .blacklist-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            background: var(--c-white);
            border-radius: var(--r-12);
            margin-bottom: 8px;
            border: 1px solid var(--c-border);
        }

        .blacklist-item-name {
            font-size: 14px;
            flex: 1;
        }

        .blacklist-remove-btn {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: none;
            background: var(--c-error);
            color: var(--c-surface);
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .blacklist-remove-btn:active {
            opacity: 0.7;
        }

        .blacklist-empty {
            text-align: center;
            padding: 40px 20px;
            color: var(--c-text-2);
        }

        .blacklist-count {
            font-size: 12px;
            color: var(--tg-theme-hint-color, #999999);
            margin-bottom: 12px;
        }

        /* Главный экран без меню */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
        }

        .empty-icon {
            font-size: 64px;
            margin-bottom: 16px;
            opacity: 0.5;
        }

        .empty-title {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .empty-text {
            font-size: 14px;
            color: var(--c-text-2);
            margin-bottom: 24px;
        }

        /* Скрыть элементы */
        .hidden {
            display: none !important;
        }

        /* Анимации */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .fade-in {
            animation: fadeIn 0.3s ease-out;
        }

        /* Страница рецепта */
        .recipe-page {
            padding-bottom: 20px;
        }

        .recipe-hero {
            margin-bottom: 16px;
            border-radius: 16px;
            overflow: hidden;
            background: var(--c-surface);
            border: 1px solid var(--c-border);
            box-shadow: var(--shadow-whisper);
        }

        .recipe-hero-img {
            width: 100%;
            height: auto;
            max-height: min(52vh, 320px);
            object-fit: cover;
            display: block;
            vertical-align: middle;
        }

        .recipe-hero-caption {
            font-size: 13px;
            line-height: 1.45;
            color: var(--c-text-2);
            padding: 10px 14px 12px;
            background: var(--c-white);
        }

        .recipe-header {
            background: var(--c-text);
            color: var(--c-surface);
            padding: 20px;
            border-radius: 16px;
            margin-bottom: 16px;
            border: 1px solid var(--c-dark);
        }

        .recipe-title {
            font-family: var(--font-serif);
            font-size: 25px;
            font-weight: 500;
            margin-bottom: 12px;
            line-height: 1.2;
        }

        .recipe-description {
            font-size: 15px;
            line-height: 1.6;
            opacity: 0.95;
            margin-bottom: 16px;
        }

        .recipe-info-grid {
            display: flex;
            flex-wrap: nowrap;
            gap: 8px;
            margin-top: 16px;
        }

        .recipe-info-item {
            flex: 1 1 0;
            min-width: 0;
            background: rgba(255,255,255,0.2);
            padding: 10px 6px;
            border-radius: 10px;
            text-align: center;
        }

        .recipe-info-label {
            font-size: 11px;
            line-height: 1.25;
            opacity: 0.9;
            margin-bottom: 4px;
        }

        .recipe-info-value {
            font-size: 18px;
            font-weight: 700;
        }

        .recipe-menu-context {
            background: var(--tg-theme-secondary-bg-color, #e8f5e9);
            border-radius: 12px;
            padding: 14px 16px;
            margin: 16px 0 0;
            border-left: 4px solid #4caf50;
        }

        .recipe-menu-context-title {
            font-size: 13px;
            font-weight: 600;
            color: var(--tg-theme-text-color, #333);
            margin-bottom: 4px;
        }

        .recipe-menu-context-weight {
            font-size: 18px;
            font-weight: 700;
            color: var(--tg-theme-text-color, #000);
            margin-bottom: 8px;
        }

        .recipe-menu-context-macros {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            font-size: 13px;
            color: var(--tg-theme-hint-color, #999);
        }

        .recipe-menu-context-macros span {
            white-space: nowrap;
        }

        .recipe-macros {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
            margin-top: 16px;
        }

        .recipe-macro-note {
            margin-top: 12px;
            font-size: 12px;
            line-height: 1.35;
            color: var(--tg-theme-hint-color, #999);
        }

        .recipe-macro-item {
            background: rgba(255,255,255,0.2);
            padding: 10px;
            border-radius: 8px;
            text-align: center;
        }

        .recipe-macro-label {
            font-size: 11px;
            opacity: 0.9;
            margin-bottom: 4px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            line-height: 1.25;
        }

        .recipe-macro-icon {
            display: block;
            line-height: 1;
        }

        .recipe-macro-value {
            font-size: 16px;
            font-weight: 700;
        }

        .recipe-section {
            background: var(--c-surface);
            border-radius: var(--r-16);
            padding: 20px;
            margin-bottom: 12px;
            border: 1px solid var(--c-border);
            box-shadow: var(--shadow-whisper);
        }

        .recipe-section-title {
            font-family: var(--font-serif);
            font-size: 20px;
            font-weight: 500;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
            line-height: 1.2;
        }

        .recipe-products-list {
            list-style: none;
            padding: 0;
        }

        .recipe-ingredient-group-title {
            list-style: none;
            font-size: 14px;
            font-weight: 600;
            color: var(--tg-theme-hint-color, #666666);
            margin: 14px 0 8px 0;
            padding: 0 2px;
        }

        .recipe-ingredient-group-title:first-child {
            margin-top: 0;
        }

        .recipe-product-item {
            padding: 12px;
            background: var(--c-white);
            border-radius: var(--r-12);
            margin-bottom: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border: 1px solid var(--c-border);
        }

        .recipe-product-item:last-child {
            margin-bottom: 0;
        }

        .recipe-product-name {
            font-size: 15px;
            font-weight: 500;
            flex: 1;
        }

        .recipe-product-original {
            font-size: 12px;
            color: var(--tg-theme-hint-color, #999);
            margin-left: 4px;
        }

        .recipe-product-amount {
            font-size: 14px;
            color: var(--tg-theme-hint-color, #666666);
            margin-left: 12px;
        }

        .recipe-product-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .recipe-product-actions .recipe-product-amount {
            margin-left: 0;
        }

        /* Пошаговый план — тот же визуальный язык, что у списка продуктов */
        .recipe-steps-phase {
            margin-bottom: 20px;
        }

        .recipe-steps-phase:last-child {
            margin-bottom: 0;
        }

        .recipe-steps-phase-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--c-brand);
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--c-border);
        }

        .recipe-steps-list {
            list-style: none;
            counter-reset: recipe-step;
            padding: 0;
            margin: 0;
        }

        .recipe-step-item {
            counter-increment: recipe-step;
            position: relative;
            padding: 12px 12px 12px 44px;
            background: var(--c-white);
            border-radius: var(--r-12);
            margin-bottom: 8px;
            border: 1px solid var(--c-border);
        }

        .recipe-step-item:last-child {
            margin-bottom: 0;
        }

        .recipe-step-item::before {
            content: counter(recipe-step);
            position: absolute;
            left: 12px;
            top: 12px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: var(--c-brand);
            color: var(--c-surface);
            font-size: 13px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

        .recipe-step-title {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 6px;
            color: var(--c-text);
        }

        .recipe-step-text {
            font-size: 15px;
            line-height: 1.55;
            font-weight: 400;
            color: var(--c-text);
        }

        .recipe-step-advice {
            margin-top: 10px;
            padding: 10px 12px;
            font-size: 13px;
            line-height: 1.45;
            background: rgba(201, 100, 66, 0.10);
            border-radius: 8px;
            color: var(--c-text-2);
            border-left: 3px solid var(--c-brand);
        }

        .recipe-step-item--with-image {
            padding-top: 40px;
        }

        .recipe-step-item--with-image .recipe-step-media {
            margin: 0 -12px 12px -44px;
            width: calc(100% + 56px);
            border-radius: 10px;
            overflow: hidden;
            background: var(--tg-theme-secondary-bg-color, #eeeeee);
        }

        .recipe-step-img {
            width: 100%;
            height: auto;
            max-height: 220px;
            object-fit: cover;
            display: block;
            vertical-align: middle;
        }

        .recipe-step-caption {
            font-size: 12px;
            line-height: 1.4;
            color: var(--tg-theme-hint-color, #666666);
            padding: 8px 12px 10px;
        }

        /* Попап подтверждения */
        .popup-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            padding: 20px;
        }

        .popup-overlay.active {
            display: flex;
        }

        .popup {
            background: var(--tg-theme-bg-color, #ffffff);
            border-radius: 16px;
            padding: 24px;
            max-width: 400px;
            width: 100%;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        .popup-title {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 16px;
            text-align: center;
        }

        .popup-text {
            font-size: 16px;
            color: var(--c-text);
            margin-bottom: 24px;
            text-align: center;
            line-height: 1.5;
        }

        .popup-buttons {
            display: flex;
            gap: 12px;
        }

        .popup-btn {
            flex: 1;
            padding: 12px 24px;
            border: 1px solid transparent;
            border-radius: var(--r-12);
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, opacity 0.12s ease;
        }

        .popup-btn:active {
            transform: scale(0.98);
            opacity: 0.92;
        }

        .popup-btn-primary {
            background: var(--c-brand);
            color: var(--c-surface);
            box-shadow: 0 0 0 1px rgba(201, 100, 66, 0.65);
        }

        /* Полноэкранный просмотр PDF (Telegram Mini App, PDF.js) */
        .pdf-viewer-overlay {
            position: fixed;
            inset: 0;
            z-index: 10001;
            display: none;
            flex-direction: column;
            background: #2e2e2e;
            box-sizing: border-box;
        }

        .pdf-viewer-overlay.active {
            display: flex;
        }

        .pdf-viewer-scroll {
            flex: 1;
            min-height: 0;
            overflow-x: hidden;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 8px 0 16px;
        }

        .pdf-viewer-pages {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            padding: 0 12px;
            box-sizing: border-box;
        }

        .pdf-viewer-page {
            max-width: 100%;
            background: #ffffff;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
            line-height: 0;
        }

        .pdf-viewer-canvas {
            display: block;
            max-width: 100%;
            height: auto;
        }

        .pdf-viewer-status {
            padding: 24px 16px;
            text-align: center;
            font-size: 15px;
            color: #f0f0f0;
        }

        .popup-btn-secondary {
            background: var(--c-border-strong);
            color: #4d4c48;
            box-shadow: var(--shadow-ring);
        }

        .replace-dish-screen-title {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 8px;
            padding: 8px 4px 0;
        }

        .replace-dish-screen-sub {
            font-size: 14px;
            color: var(--c-text-2);
            margin-bottom: 16px;
            padding: 0 4px;
            line-height: 1.4;
        }

        .replace-dish-choice-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding-bottom: 24px;
        }

        .replace-dish-option {
            text-align: left;
            border: 1px solid var(--c-border);
            border-radius: var(--r-12);
            padding: 12px 14px;
            background: var(--c-white);
            color: var(--c-text);
            cursor: pointer;
            font: inherit;
            width: 100%;
            transition: opacity 0.15s;
        }

        .replace-dish-option:active {
            opacity: 0.85;
        }

        /* Текущее блюдо в плане (не кнопка): другой фон, без описания и времени */
        .replace-dish-option.replace-dish-option--original {
            cursor: default;
            background: rgba(201, 100, 66, 0.10);
            border-color: rgba(201, 100, 66, 0.35);
        }

        .replace-dish-option.replace-dish-option--original:active {
            opacity: 1;
        }

        .replace-dish-variants-heading {
            font-size: 16px;
            font-weight: 600;
            margin: 18px 0 10px;
            padding: 0 4px;
            color: var(--c-text);
        }

        .replace-dish-option-name {
            font-weight: 600;
            font-size: 16px;
            margin-bottom: 6px;
            line-height: 1.3;
        }

        .replace-dish-option-desc {
            font-size: 13px;
            line-height: 1.4;
            color: var(--c-text-2);
            margin-bottom: 8px;
        }

        .replace-dish-option-meta {
            font-size: 12px;
            line-height: 1.35;
            color: var(--c-text-2);
            opacity: 0.95;
        }

        .replace-dish-option-times {
            font-size: 13px;
            line-height: 1.45;
            color: var(--c-text-2);
            margin-bottom: 8px;
        }

        .menu-actions-row {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 12px;
        }

        .shopping-cart-list {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .shopping-cart-list li {
            font-size: 15px;
            line-height: 1.45;
            padding: 10px 0;
            border-bottom: 1px solid var(--c-border);
            color: var(--c-text);
        }

        .shopping-cart-list li:last-child {
            border-bottom: none;
        }

        .shopping-cart-empty {
            font-size: 15px;
            color: var(--c-text-2);
            text-align: center;
            padding: 16px 8px;
        }

        .shopping-cart-error {
            font-size: 15px;
            color: var(--c-error);
            text-align: center;
            padding: 12px 8px;
        }

        /* ===== Корзина ВкусВилл — компактный мобильный дизайн ===== */

        #vkusVillPageContent {
            width: 100%;
            max-width: 100%;
            overflow-x: hidden;
            box-sizing: border-box;
        }

        #vkusVillPageContent .vv-wrap {
            width: 100%;
            max-width: 600px;
            margin: 0 auto;
            padding: 0 12px;
            box-sizing: border-box;
        }

        .vv-page-hdr {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 14px 12px 4px;
            max-width: 600px;
            margin: 0 auto;
        }

        .vv-page-hdr-title {
            font-size: 20px;
            font-weight: 700;
            color: var(--c-text);
        }

        .vv-page-hdr-badge {
            font-size: 11px;
            font-weight: 600;
            color: var(--c-surface);
            background: var(--c-brand);
            padding: 2px 8px;
            border-radius: 10px;
            margin-left: auto;
        }

        .vv-page-sub {
            font-size: 12px;
            line-height: 1.35;
            color: var(--c-text-2);
            padding: 2px 12px 0;
            max-width: 600px;
            margin: 0 auto;
        }

        .vv-cart-hint {
            font-size: 13px;
            line-height: 1.4;
            color: var(--tg-theme-hint-color, #666666);
            margin: 4px 0 6px;
        }

        .vv-store-groups {
            width: 100%;
        }

        .vv-store-group {
            margin-bottom: 14px;
        }

        .vv-store-group:last-child {
            margin-bottom: 4px;
        }

        .vv-store-group-title {
            font-size: 14px;
            font-weight: 700;
            color: var(--c-text);
            margin-bottom: 6px;
            padding-bottom: 2px;
            border-bottom: 1px solid var(--c-border);
        }

        .vv-store-group-list {
            margin-top: 2px;
        }

        .vv-sort-row {
            display: flex;
            justify-content: flex-start;
            margin-bottom: 10px;
        }

        .vv-sort-btn {
            display: inline-flex;
            align-items: center;
            padding: 6px 12px;
            border-radius: 8px;
            border: 1px solid var(--c-border-strong);
            background: var(--c-border-strong);
            font-size: 13px;
            font-weight: 500;
            color: var(--c-text);
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: opacity 0.15s;
        }

        .vv-sort-btn:active {
            opacity: 0.65;
        }

        /* --- Карточка ингредиента --- */

        .vv-item {
            margin-bottom: 6px;
            border-radius: 12px;
            background: var(--c-white);
            overflow: hidden;
            transition: opacity 0.2s;
            border: 1px solid var(--c-border);
        }

        .vv-item.vv-skipped {
            opacity: 0.4;
        }

        .vv-addr-missing {
            color: var(--c-danger, #c62828);
            font-weight: 600;
        }

        .vv-item.vv-skipped .vv-item-opts {
            pointer-events: none;
        }

        .vv-item-head {
            display: flex;
            align-items: center;
            padding: 10px 12px;
            gap: 8px;
            min-height: 38px;
        }

        .vv-item-info {
            flex: 1;
            min-width: 0;
        }

        .vv-item-name {
            font-size: 14px;
            font-weight: 600;
            line-height: 1.3;
            color: var(--c-text);
            overflow-wrap: anywhere;
        }

        .vv-item-qty {
            font-size: 11px;
            line-height: 1.3;
            color: var(--c-text-2);
            margin-top: 1px;
        }

        .vv-skip-btn {
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            border-radius: 8px;
            border: 1.5px solid var(--c-border-strong);
            background: transparent;
            font-size: 12px;
            font-weight: 500;
            color: var(--c-text-2);
            cursor: pointer;
            transition: all 0.15s;
            white-space: nowrap;
            -webkit-tap-highlight-color: transparent;
        }

        .vv-skip-btn[aria-pressed="true"] {
            border-color: var(--c-brand);
            background: var(--c-brand);
            color: var(--c-surface);
        }

        .vv-retry-btn {
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 34px;
            height: 34px;
            padding: 0;
            border-radius: 8px;
            border: 1.5px solid var(--c-border-strong);
            background: transparent;
            font-size: 16px;
            line-height: 1;
            cursor: pointer;
            transition: all 0.15s;
            -webkit-tap-highlight-color: transparent;
        }

        .vv-retry-btn:disabled {
            opacity: 0.6;
            cursor: default;
        }

        .vv-retry-btn.vv-retry-spin {
            animation: vv-retry-rotate 0.8s linear infinite;
        }

        @keyframes vv-retry-rotate {
            to {
                transform: rotate(360deg);
            }
        }

        /* --- Варианты товаров --- */

        .vv-item-opts {
            padding: 0 6px 6px;
        }

        .vv-opt {
            display: flex;
            align-items: flex-start;
            padding: 6px 8px;
            border-radius: 10px;
            cursor: pointer;
            gap: 10px;
            transition: background 0.15s;
            -webkit-tap-highlight-color: transparent;
        }

        /* iOS-style radio: кольцо + центральная точка акцента */
        .vv-opt input[type="radio"] {
            appearance: none;
            -webkit-appearance: none;
            display: block;
            width: 22px;
            height: 22px;
            min-width: 22px;
            min-height: 22px;
            max-width: 22px;
            max-height: 22px;
            aspect-ratio: 1 / 1;
            padding: 0;
            margin: 2px 0 0;
            border-radius: 50%;
            box-sizing: border-box;
            border: 1.67px solid var(--c-border-strong);
            flex: 0 0 22px;
            align-self: flex-start;
            position: relative;
            transition: border-color 0.15s;
            cursor: pointer;
            background: var(--c-white);
        }

        .vv-opt input[type="radio"]:checked {
            border-color: var(--c-focus);
            background: var(--c-white);
        }

        .vv-opt input[type="radio"]:checked::after {
            content: '';
            position: absolute;
            box-sizing: border-box;
            width: 11px;
            height: 11px;
            min-width: 11px;
            min-height: 11px;
            aspect-ratio: 1 / 1;
            border-radius: 50%;
            background: var(--c-focus);
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .vv-opt input[type="radio"]:disabled {
            opacity: 0.35;
        }

        .vv-opt-content {
            flex: 1;
            min-width: 0;
        }

        .vv-opt-top {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 8px;
        }

        .vv-opt-name {
            font-size: 13px;
            line-height: 1.35;
            color: var(--c-text);
            flex: 1;
            min-width: 0;
            overflow-wrap: anywhere;
        }

        .vv-opt-price-col {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 2px;
            flex-shrink: 0;
            text-align: right;
        }

        .vv-opt-price {
            font-size: 13px;
            font-weight: 600;
            color: var(--c-text);
            white-space: nowrap;
        }

        .vv-opt-perkg {
            font-size: 11px;
            font-weight: 500;
            line-height: 1.2;
            color: var(--c-text-3);
            white-space: nowrap;
        }

        .vv-opt-sub {
            font-size: 11px;
            color: var(--tg-theme-hint-color, #666666);
            margin-top: 1px;
            line-height: 1.3;
        }

        .vv-item-empty {
            font-size: 12px;
            color: var(--tg-theme-hint-color, #666666);
            line-height: 1.4;
            padding: 0 12px 10px;
        }

        /* --- Sticky-панель внизу --- */

        .vv-sticky {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            z-index: 100;
            background: var(--tg-theme-bg-color, #ffffff);
            border-top: 1px solid var(--tg-theme-secondary-bg-color, #e0e0e0);
            padding: 10px 16px;
            padding-bottom: max(10px, env(safe-area-inset-bottom));
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 10px;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
            box-sizing: border-box;
            max-width: 100vw;
        }

        .vv-sticky-info {
            flex: none;
            width: 100%;
            min-width: 0;
        }

        .vv-sticky-count {
            font-size: 13px;
            font-weight: 600;
            color: var(--c-text);
            line-height: 1.35;
            word-break: normal;
            overflow-wrap: break-word;
        }

        .vv-sticky-hint {
            font-size: 11px;
            color: var(--c-text-2);
            margin-top: 1px;
        }

        .vv-sticky-btn {
            flex-shrink: 0;
            padding: 10px 18px;
            border-radius: 12px;
            border: 1px solid transparent;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            background: var(--c-brand);
            color: var(--c-surface);
            box-shadow: 0 0 0 1px rgba(201, 100, 66, 0.65);
            transition: all 0.15s;
            -webkit-tap-highlight-color: transparent;
        }

        .vv-sticky-btn:active {
            transform: scale(0.97);
            opacity: 0.85;
        }

        .vv-sticky-btn:disabled {
            opacity: 0.4;
            cursor: default;
            transform: none;
        }

        .vv-sticky-link {
            display: inline-block;
            padding: 10px 18px;
            border-radius: 12px;
            border: none;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            background: #43a047;
            color: #ffffff;
            flex-shrink: 0;
            transition: all 0.15s;
            -webkit-tap-highlight-color: transparent;
        }

        .vv-sticky-link:active {
            transform: scale(0.97);
            opacity: 0.85;
        }

        .vv-sticky-err {
            font-size: 12px;
            color: var(--c-error);
            line-height: 1.3;
        }

        .vv-sticky-muted {
            font-size: 11px;
            color: var(--c-text-2);
            margin-top: 2px;
            line-height: 1.35;
            word-break: normal;
            overflow-wrap: break-word;
        }

        .vv-trimmed-block {
            display: none;
            margin: 6px 0 10px;
            padding: 10px 12px;
            border-radius: 10px;
            border: 1px solid #f5c2c2;
            background: #fff4f4;
        }

        .vv-trimmed-title {
            font-size: 13px;
            font-weight: 700;
            color: #9f2b2b;
            margin-bottom: 6px;
        }

        .vv-trimmed-list {
            margin: 0;
            padding-left: 18px;
            color: var(--c-text);
            font-size: 13px;
            line-height: 1.4;
            max-height: 140px;
            overflow-y: auto;
        }

        .vv-trimmed-copy-btn {
            margin-top: 8px;
            border: 1px solid var(--c-border-strong);
            border-radius: 8px;
            background: var(--c-white);
            color: var(--c-text);
            font-size: 12px;
            font-weight: 600;
            padding: 6px 10px;
            cursor: pointer;
        }

        /* Отступ под sticky-панель (2 кнопки + текст + safe area) */
        #vkusVillPageContent.vv-has-sticky {
            padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px));
        }

        .vv-sticky-btns {
            display: flex;
            flex-direction: column;
            gap: 8px;
            width: 100%;
            flex-shrink: 0;
            align-items: stretch;
            box-sizing: border-box;
        }

        .vv-sticky-send,
        .vv-sticky-btn,
        .vv-sticky-link {
            width: 100%;
            box-sizing: border-box;
            text-align: center;
        }

        .vv-sticky-send {
            padding: 10px 14px;
            border-radius: 12px;
            border: 1px solid var(--c-border-strong);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            background: var(--c-white);
            color: var(--c-text);
            transition: all 0.15s;
            -webkit-tap-highlight-color: transparent;
        }

        .vv-sticky-send:disabled {
            opacity: 0.4;
            cursor: default;
        }

        .vv-sticky-send:active:not(:disabled) {
            transform: scale(0.98);
            opacity: 0.85;
        }

        /* Варианты калорий в онбординге (type="button" для стабильных тапов в Telegram WebView) */
        button.calories-option {
            display: block;
            width: 100%;
            margin: 0;
            font: inherit;
            color: inherit;
            text-align: left;
            -webkit-appearance: none;
            appearance: none;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        button.calories-option:focus {
            outline: none;
        }

        button.calories-option:focus-visible {
            outline: 2px solid var(--c-focus);
            outline-offset: 2px;
        }

        .calories-option {
            position: relative;
            background: var(--c-surface);
            border: 1px solid var(--c-border);
            border-radius: 16px;
            padding: 20px;
            padding-right: 48px;
            margin-bottom: 12px;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: var(--shadow-whisper);
        }

        .calories-option:hover {
            border-color: var(--c-border-strong);
        }

        .calories-option:active {
            opacity: 0.92;
            transform: scale(0.995);
        }

        .calories-option.selected {
            border-color: rgba(201, 100, 66, 0.55);
            background: rgba(201, 100, 66, 0.08);
            box-shadow: 0 0 0 1px rgba(201, 100, 66, 0.35);
        }

        .calories-option.selected::after {
            content: '✓';
            position: absolute;
            top: 12px;
            right: 14px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: var(--c-brand);
            color: var(--c-surface);
            font-size: 14px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

        .calories-option:not(.selected)::after {
            content: '';
            position: absolute;
            top: 12px;
            right: 14px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: 2px solid var(--c-border-strong);
            box-sizing: border-box;
        }

        .calories-option.recommended {
            border-color: #4caf50;
            margin-top: 18px;
        }

        .calories-option.recommended.selected {
            border-color: rgba(201, 100, 66, 0.55);
            background: rgba(201, 100, 66, 0.08);
            box-shadow: 0 0 0 2px rgba(201, 100, 66, 0.30);
        }

        .calories-option.recommended::before {
            content: '⭐ Рекомендуется';
            position: absolute;
            top: -10px;
            left: 16px;
            background: #4caf50;
            color: white;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            pointer-events: none;
        }

        .calories-option-header {
            display: flex;
            flex-direction: column;
            gap: 2px;
            margin-bottom: 8px;
        }

        .calories-option-details,
        .calories-option-description,
        .calories-option-warning {
            display: block;
        }

        .calories-option-name {
            font-size: 15px;
            font-weight: 600;
            color: var(--c-text);
        }

        .calories-option-value {
            font-size: 22px;
            font-weight: 700;
            color: var(--c-brand);
        }

        .calories-option-details {
            font-size: 13px;
            color: var(--c-text-2);
            margin-bottom: 8px;
            line-height: 1.5;
        }

        .calories-option-description {
            font-size: 14px;
            color: var(--c-text);
            line-height: 1.5;
            margin-top: 8px;
        }

        .calories-option-warning {
            font-size: 12px;
            color: #ff9800;
            margin-top: 8px;
            font-weight: 500;
        }

        /* Отступ от списка вариантов (в т.ч. бейдж «Рекомендуется») до кнопки «Продолжить» */
        #caloriesOptionsContainer {
            padding-bottom: 8px;
        }

        #confirmCaloriesBtn {
            margin-top: 32px;
        }

        /* Кнопка «Назад» только в браузере (без Telegram BackButton) */
        .browser-webapp-back-bar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 2000;
            padding: 8px 12px;
            padding-top: max(8px, env(safe-area-inset-top));
            background: rgba(245, 244, 237, 0.9);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--c-border);
            box-shadow: none;
            display: flex;
            align-items: center;
        }

        .browser-webapp-back-bar.hidden {
            display: none !important;
        }

        .browser-webapp-back-btn {
            display: inline-flex;
            align-items: center;
            padding: 10px 14px;
            border-radius: 12px;
            border: 1px solid var(--c-border);
            background: var(--c-white);
            color: var(--c-text);
            font-size: 15px;
            font-weight: 500;
            cursor: pointer;
            font-family: inherit;
            box-shadow: var(--shadow-ring);
        }

        body.has-browser-back-bar {
            padding-top: calc(48px + env(safe-area-inset-top, 0px));
        }

        /* Справка по диетам (как отдельный экран, стили как на старой diet-info) */
        .diet-info-screen {
            padding-bottom: 24px;
            line-height: 1.55;
        }

        .diet-info-screen .diet-info-title {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .diet-info-screen .diet-info-intro {
            font-size: 14px;
            color: var(--c-text-2);
            margin-bottom: 24px;
        }

        .diet-info-screen article {
            margin-bottom: 28px;
            padding-bottom: 24px;
            border-bottom: 1px solid var(--c-border);
        }

        .diet-info-screen article:last-child {
            border-bottom: none;
        }

        .diet-info-screen article h2 {
            font-size: 17px;
            font-weight: 700;
            margin-bottom: 12px;
        }

        .diet-info-screen article h3 {
            font-size: 14px;
            font-weight: 600;
            margin: 14px 0 8px;
        }

        .diet-info-screen article p,
        .diet-info-screen article li {
            font-size: 15px;
        }

        .diet-info-screen article p {
            margin-bottom: 10px;
        }

        .diet-info-screen article ul {
            padding-left: 20px;
            margin: 8px 0 12px;
        }

        .diet-info-screen article li {
            margin-bottom: 6px;
        }

        /* Ожидание подтверждения владельца (whitelist) */
        .access-pending-screen {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 10000;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 24px;
            text-align: center;
            background: var(--tg-theme-bg-color, #f5f5f5);
            color: var(--tg-theme-text-color, #000);
        }
        .access-pending-screen.visible {
            display: flex;
        }
        body.access-pending .container,
        body.access-pending .header {
            visibility: hidden;
        }
        .access-pending-inner {
            max-width: 340px;
        }
        .access-pending-icon {
            font-size: 48px;
            margin-bottom: 16px;
        }
        .access-pending-text {
            font-size: 16px;
            line-height: 1.45;
            margin-bottom: 20px;
            color: var(--tg-theme-hint-color, #666);
        }
    

.max-weight-limit-banner {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--c-brand, #c45c26) 12%, var(--c-surface, #fff));
    border: 1px solid color-mix(in srgb, var(--c-brand, #c45c26) 28%, transparent);
    color: var(--c-text, #222);
    font-size: 14px;
    line-height: 1.45;
}

.max-weight-limit-banner strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.max-weight-limit-banner button {
    margin-top: 8px;
    padding: 0;
    border: none;
    background: none;
    color: var(--c-brand, #c45c26);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* ===== Taste swipe quiz (онбординг) ===== */
.onboarding-taste {
    padding-top: 24px;
}

.taste-quiz-status {
    font-size: 13px;
    color: var(--c-text-3);
    margin-bottom: 12px;
}

.taste-swipe-stage {
    position: relative;
    width: min(100%, 340px);
    height: 380px;
    margin: 0 auto 16px;
    touch-action: none;
    user-select: none;
}

.taste-card-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.taste-card {
    position: absolute;
    inset: 0;
    border-radius: var(--r-16, 16px);
    background: var(--c-surface, #fff);
    border: 1px solid var(--c-border, #e6e0d8);
    box-shadow: var(--shadow-whisper, 0 4px 18px rgba(0, 0, 0, 0.06));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, opacity 0.18s ease;
    will-change: transform;
}

.taste-card.is-top {
    z-index: 3;
    cursor: grab;
}

.taste-card.is-top:active {
    cursor: grabbing;
}

.taste-card.is-next {
    z-index: 2;
    transform: scale(0.96) translateY(10px);
    opacity: 0.85;
}

.taste-card.is-leaving-left {
    transform: translateX(-130%) rotate(-14deg);
    opacity: 0;
}

.taste-card.is-leaving-right {
    transform: translateX(130%) rotate(14deg);
    opacity: 0;
}

.taste-card-media {
    flex: 1 1 auto;
    min-height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.taste-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    line-height: 1;
}

.taste-placeholder[data-kind="soup"] {
    background: linear-gradient(145deg, #f3e7d3 0%, #e8c9a0 55%, #d9b48a 100%);
}

.taste-placeholder[data-kind="salad"] {
    background: linear-gradient(145deg, #e6f2df 0%, #c5dfb4 55%, #a8c994 100%);
}

.taste-placeholder[data-kind="breakfast"] {
    background: linear-gradient(145deg, #fff4d6 0%, #f6d99a 55%, #efc57a 100%);
}

.taste-placeholder[data-kind="snack"] {
    background: linear-gradient(145deg, #fde8ef 0%, #f3c1d3 55%, #e9a8c0 100%);
}

.taste-placeholder[data-kind="dinner"] {
    background: linear-gradient(145deg, #e8e4f5 0%, #c9c0e4 55%, #b0a4d4 100%);
}

.taste-placeholder[data-kind="lunch"] {
    background: linear-gradient(145deg, #e7f1f7 0%, #c5dceb 55%, #a9c8de 100%);
}

.taste-stamp {
    position: absolute;
    top: 18px;
    padding: 6px 12px;
    border: 3px solid;
    border-radius: 8px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0;
    pointer-events: none;
}

.taste-stamp-like {
    left: 16px;
    color: #2f9e5c;
    border-color: #2f9e5c;
    transform: rotate(-12deg);
}

.taste-stamp-nope {
    right: 16px;
    color: #c44b4b;
    border-color: #c44b4b;
    transform: rotate(12deg);
}

.taste-card-body {
    padding: 14px 16px 16px;
    text-align: left;
}

.taste-card-title {
    font-family: var(--font-serif, Georgia, serif);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.25;
    margin-bottom: 6px;
}

.taste-card-meta {
    font-size: 13px;
    color: var(--c-text-2, #666);
    line-height: 1.4;
}

.taste-swipe-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 16px;
}

.taste-btn {
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s ease, background 0.12s ease;
}

.taste-btn:active {
    transform: scale(0.96);
}

.taste-btn-no,
.taste-btn-yes {
    width: 58px;
    height: 58px;
    font-size: 24px;
    background: var(--c-surface, #fff);
    border: 1px solid var(--c-border, #e6e0d8);
    box-shadow: var(--shadow-whisper, 0 2px 10px rgba(0, 0, 0, 0.05));
}

.taste-btn-no {
    color: #c44b4b;
}

.taste-btn-yes {
    color: #2f9e5c;
}

.taste-btn-skip {
    min-width: 88px;
    height: 40px;
    padding: 0 14px;
    font-size: 13px;
    color: var(--c-text-2, #666);
    background: transparent;
    border: 1px dashed var(--c-border-strong, #d5cfc4);
}
