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

html, body {
    height: 100%;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0a0a0a;
    color: #f5f0e8;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(10, 10, 10, 0.75), rgba(10, 10, 10, 0.85)),
        url('../assets/images/background.jpg') center / cover no-repeat;
    z-index: -1;
}

.screen {
    display: none;
    min-height: 100vh;
    padding: 24px;
    align-items: flex-start;
    justify-content: center;
}

.screen.active {
    display: flex;
}

.page-wrap {
    max-width: 480px;
    width: 100%;
    padding-top: 12px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== WELCOME ===== */
.welcome-wrap {
    max-width: 480px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    animation: fadeIn 0.6s ease;
    padding-bottom: 20px;
    align-self: center;
}

.logo-wrap {
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoFloat 6s ease-in-out infinite;
    filter: drop-shadow(0 0 40px rgba(212, 165, 116, 0.3));
    margin-bottom: 12px;
    margin-top: -20px;
    flex-shrink: 0;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

@keyframes logoFloat {
    0%   { transform: rotate(0deg)   translateY(0); }
    25%  { transform: rotate(-4deg)  translateY(-6px); }
    50%  { transform: rotate(0deg)   translateY(0); }
    75%  { transform: rotate(4deg)   translateY(-6px); }
    100% { transform: rotate(0deg)   translateY(0); }
}

.welcome-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    background: linear-gradient(180deg, #f5e6c8 0%, #d4a574 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.welcome-subtitle {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(245, 240, 232, 0.7);
    max-width: 340px;
    margin-bottom: 32px;
}

.welcome-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 100%;
    align-items: end;
}

.shop-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #f5f0e8;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 16px;
}

.shop-card:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(212, 165, 116, 0.5);
    transform: translateY(-3px);
}

.shop-icon { font-size: 44px; line-height: 1; }

.shop-label {
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #f5e6c8;
    letter-spacing: 0.2px;
}

.chef-card {
    position: relative;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    font-family: inherit;
    transition: transform 0.25s ease;
    aspect-ratio: 1 / 1;
    overflow: visible;
}

.chef-card:hover { transform: translateY(-4px); }

.chef-bubble {
    position: absolute;
    top: -10px;
    left: 50%;
    background: linear-gradient(180deg, #fdf6e8, #f0dfbe);
    color: #3a2418;
    font-family: 'Unbounded', sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
    padding: 8px 10px;
    border-radius: 12px;
    text-align: center;
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(212, 165, 116, 0.2);
    animation: bubbleFloat 4s ease-in-out infinite;
    z-index: 2;
    width: 130px;
}

.chef-bubble::after {
    content: '';
    position: absolute;
    bottom: 12px;
    left: -7px;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 9px solid #f0dfbe;
}

@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

.chef-img-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.chef-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.5));
}

.chef-fallback {
    display: none;
    font-size: 100px;
    line-height: 1;
}

.chef-img-wrap.no-image .chef-fallback { display: block; }

/* ===== ОБЩИЕ ===== */
.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.page-header h2 {
    font-family: 'Unbounded', sans-serif;
    font-size: 20px;
    color: #f5e6c8;
    margin: 0;
    flex-grow: 1;
}

.back-btn {
    background: transparent;
    color: #d4a574;
    border: none;
    padding: 6px 0;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s;
}

.back-btn:hover { color: #f5e6c8; }

.cart-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f5e6c8;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cart-btn:hover {
    border-color: rgba(212, 165, 116, 0.5);
    background: rgba(255, 255, 255, 0.14);
}

.cart-count {
    background: #c0392b;
    color: white;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.empty-text {
    text-align: center;
    color: rgba(245, 240, 232, 0.5);
    padding: 40px 20px;
    font-size: 14px;
    grid-column: 1 / -1;
}

/* ===== КАТЕГОРИИ ===== */
.categories-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 16px;
    scrollbar-width: none;
}

.categories-nav::-webkit-scrollbar { display: none; }

.category-chip {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 9px 18px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    font-family: inherit;
    color: #f5f0e8;
}

.category-chip:hover {
    border-color: rgba(212, 165, 116, 0.5);
    background: rgba(255, 255, 255, 0.14);
}

.category-chip.active {
    background: linear-gradient(180deg, #f5e6c8 0%, #d4a574 100%);
    color: #3a2418;
    border-color: #d4a574;
    font-weight: 600;
}

/* ===== ТОВАРЫ ===== */
.products-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 165, 116, 0.5);
}

.product-card.out-of-stock { opacity: 0.5; }

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: rgba(0, 0, 0, 0.3);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: rgba(245, 240, 232, 0.3);
}

.product-info {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    color: #f5e6c8;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.product-price {
    font-size: 15px;
    font-weight: 700;
    color: #d4a574;
    line-height: 1.2;
}

.product-price small {
    font-size: 11px;
    font-weight: 400;
    color: rgba(245, 240, 232, 0.5);
}

.product-cart-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(180deg, #f5e6c8 0%, #d4a574 100%);
    border: none;
    color: #3a2418;
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s;
}

.product-cart-btn:hover { transform: scale(1.1); }

.badge-out {
    display: inline-block;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(245, 240, 232, 0.7);
    padding: 3px 8px;
    border-radius: 8px;
    margin-top: 6px;
    align-self: flex-start;
}

/* ===== ДЕТАЛЬНАЯ КАРТОЧКА ===== */
#product-detail {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    overflow: hidden;
}

.detail-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: rgba(0, 0, 0, 0.3);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: rgba(245, 240, 232, 0.25);
}

.detail-body { padding: 20px; }

.detail-category {
    font-size: 12px;
    color: #d4a574;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.detail-name {
    font-family: 'Unbounded', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #f5e6c8;
    line-height: 1.3;
}

.detail-desc {
    font-size: 14px;
    color: rgba(245, 240, 232, 0.75);
    margin-bottom: 20px;
    line-height: 1.55;
}

.detail-price {
    font-size: 28px;
    font-weight: 700;
    color: #d4a574;
    margin-bottom: 20px;
}

.detail-price small {
    font-size: 14px;
    font-weight: 400;
    color: rgba(245, 240, 232, 0.5);
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 20px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(180deg, #f5e6c8 0%, #d4a574 100%);
    color: #3a2418;
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 6px 18px rgba(212, 165, 116, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(212, 165, 116, 0.35);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(245, 240, 232, 0.5);
    box-shadow: none;
}

/* ===== КОРЗИНА ===== */
.cart-item {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
    align-items: center;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: rgba(245, 240, 232, 0.25);
}

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

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #f5e6c8;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-price { font-size: 13px; color: #d4a574; }

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f5e6c8;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.qty-btn:hover {
    background: rgba(212, 165, 116, 0.2);
    border-color: rgba(212, 165, 116, 0.5);
}

.qty-value {
    min-width: 22px;
    text-align: center;
    font-weight: 600;
    color: #f5e6c8;
}

.cart-total {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 18px;
    margin: 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Unbounded', sans-serif;
}

.cart-total-label { font-size: 14px; color: rgba(245, 240, 232, 0.7); }
.cart-total-value { font-size: 20px; font-weight: 700; color: #d4a574; }

/* ===== ВЫБОР СПОСОБА ПОЛУЧЕНИЯ ===== */
.checkout-options {
    margin-top: 18px;
}

.checkout-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #f5e6c8;
    margin-bottom: 12px;
}

.checkout-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #f5f0e8;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    margin-bottom: 10px;
    transition: all 0.15s;
}

.checkout-option:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(212, 165, 116, 0.5);
    transform: translateY(-2px);
}

.checkout-option:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.checkout-option-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.checkout-option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checkout-option-text strong {
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #f5e6c8;
}

.checkout-option-text small {
    font-size: 12px;
    color: rgba(245, 240, 232, 0.6);
}

/* ===== МОИ ЗАКАЗЫ ===== */
.my-order-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
}

.my-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
    flex-wrap: wrap;
}

.my-order-number {
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #d4a574;
}

.my-order-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
}

.my-order-status.status-new { background: #fff3cd; color: #856404; }
.my-order-status.status-accepted { background: #d1ecf1; color: #0c5460; }
.my-order-status.status-assembled { background: #d4edda; color: #1e7e34; }
.my-order-status.status-delivered { background: #e2e3e5; color: #383d41; }
.my-order-status.status-cancelled { background: #f8d7da; color: #721c24; }
.my-order-status.status-pending_weigh { background: #fff3cd; color: #856404; }
.my-order-status.status-awaiting_payment { background: #cce5ff; color: #004085; }
.my-order-status.status-paid { background: #d4edda; color: #1e7e34; }
.my-order-status.status-expired { background: #e2e3e5; color: #383d41; }

.my-order-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: rgba(245, 240, 232, 0.6);
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.my-order-summary {
    font-size: 14px;
    color: #f5e6c8;
    font-weight: 600;
    margin-bottom: 10px;
}

.my-order-items {
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.my-order-item {
    font-size: 13px;
    color: rgba(245, 240, 232, 0.75);
    padding: 3px 0;
}

.my-order-item-removed {
    color: rgba(245, 240, 232, 0.4) !important;
    text-decoration: line-through;
}

/* Изменения от мясника */
.my-order-changes {
    background: rgba(212, 165, 116, 0.08);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 10px;
}

.my-order-changes-title {
    font-size: 12px;
    font-weight: 600;
    color: #d4a574;
    margin-bottom: 6px;
    font-family: 'Unbounded', sans-serif;
}

.my-order-change-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: rgba(245, 240, 232, 0.8);
    padding: 3px 0;
    flex-wrap: wrap;
}

.my-order-change-row span:last-child {
    color: #d4a574;
    text-align: right;
    flex-shrink: 0;
}

/* Кнопка "Оплатить" */
.my-order-pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    padding: 16px 20px;
    background: linear-gradient(180deg, #f5e6c8 0%, #d4a574 100%);
    color: #3a2418;
    border: none;
    border-radius: 14px;
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 6px 18px rgba(212, 165, 116, 0.25);
    letter-spacing: 0.2px;
}

.my-order-pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(212, 165, 116, 0.4);
}

.my-order-pay-btn:active {
    transform: translateY(0);
}

/* Кнопка удаления */
.my-order-delete-btn {
    margin-top: 12px;
    padding: 8px 14px;
    background: transparent;
    border: 1.5px solid #d4a574;
    color: #d4a574;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.my-order-delete-btn:hover {
    background: rgba(212, 165, 116, 0.15);
    border-color: #f5e6c8;
    color: #f5e6c8;
}

/* ===== МОИ РЕЦЕПТЫ ===== */
.my-recipe-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.my-recipe-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(212, 165, 116, 0.5);
    transform: translateY(-2px);
}

.my-recipe-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #f5e6c8;
    margin-bottom: 6px;
    line-height: 1.3;
}

.my-recipe-desc {
    font-size: 13px;
    color: rgba(245, 240, 232, 0.7);
    line-height: 1.5;
    margin-bottom: 8px;
}

.my-recipe-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(245, 240, 232, 0.5);
    gap: 10px;
}

/* ===== ПРОСМОТР РЕЦЕПТА ===== */
.recipe-detail-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 16px;
    padding: 20px 18px;
    animation: fadeIn 0.3s ease;
}

.recipe-detail-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #f5e6c8;
    margin-bottom: 10px;
    line-height: 1.35;
}

.recipe-detail-desc {
    font-size: 13px;
    color: rgba(245, 240, 232, 0.75);
    line-height: 1.55;
    margin-bottom: 16px;
}

.recipe-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.btn-danger-outline {
    padding: 14px 20px;
    border-radius: 14px;
    border: 1.5px solid rgba(212, 165, 116, 0.5);
    background: transparent;
    color: #d4a574;
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
}

.btn-danger-outline:hover {
    background: rgba(212, 165, 116, 0.15);
    color: #f5e6c8;
    border-color: #f5e6c8;
}

/* ===== ЧАТ С ИИ-ПОВАРОМ ===== */
.chat-wrap {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.chat-header .back-btn {
    color: #d4a574;
    font-size: 18px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.15s;
}

.chat-header .back-btn:hover {
    background: rgba(212, 165, 116, 0.2);
    color: #f5e6c8;
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    border: 1.5px solid rgba(212, 165, 116, 0.4);
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.chat-header-info { flex-grow: 1; }

.chat-name {
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #f5e6c8;
    margin-bottom: 2px;
}

.chat-status {
    font-size: 11px;
    color: #4ade80;
    font-weight: 500;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.3);
    border-radius: 2px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    animation: messageIn 0.3s ease;
    word-wrap: break-word;
}

@keyframes messageIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.bot {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f5f0e8;
    align-self: flex-start;
    border-bottom-left-radius: 6px;
}

.message.user {
    background: linear-gradient(180deg, #f5e6c8 0%, #d4a574 100%);
    color: #3a2418;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
    font-weight: 500;
}

.message.typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 14px 18px;
}

.message.typing .dot {
    width: 6px;
    height: 6px;
    background: rgba(245, 240, 232, 0.5);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

.message.typing .dot:nth-child(2) { animation-delay: 0.2s; }
.message.typing .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30%           { transform: translateY(-5px); opacity: 1; }
}

/* Карточка рецепта */
.recipe-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 16px;
    overflow: hidden;
    max-width: 100%;
    align-self: flex-start;
    animation: messageIn 0.4s ease;
    margin-top: 4px;
    width: 100%;
    display: block;
    flex-shrink: 0;
}

.recipe-body {
    padding: 16px;
    display: block;
}

.recipe-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #f5e6c8;
    margin-bottom: 8px;
    line-height: 1.3;
}

.recipe-desc {
    font-size: 13px;
    color: rgba(245, 240, 232, 0.75);
    line-height: 1.55;
    margin-bottom: 14px;
}

.recipe-section-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #d4a574;
    margin-bottom: 8px;
    margin-top: 4px;
}

.recipe-ingredients {
    list-style: none;
    margin-bottom: 14px;
    padding-left: 0;
}

.recipe-ingredients li {
    font-size: 13px;
    color: rgba(245, 240, 232, 0.85);
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.recipe-ingredients li:last-child { border-bottom: none; }

.recipe-ingredients-shop li {
    border-left: 3px solid #4ade80;
    padding-left: 10px;
}

.recipe-ingredients-buy li {
    border-left: 3px solid #d4a574;
    padding-left: 10px;
    color: rgba(245, 240, 232, 0.65);
}

.recipe-section-title-buy {
    color: #d4a574;
    margin-top: 14px;
}

.recipe-steps {
    padding-left: 20px;
    margin-bottom: 14px;
}

.recipe-steps li {
    font-size: 13px;
    color: rgba(245, 240, 232, 0.85);
    padding: 3px 0;
    line-height: 1.5;
}

.recipe-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
    flex-wrap: wrap;
}

.recipe-btn {
    flex: 1 1 30%;
    min-width: 100px;
    padding: 11px 10px;
    border-radius: 10px;
    border: none;
    font-family: 'Unbounded', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.recipe-btn-primary {
    background: linear-gradient(180deg, #f5e6c8 0%, #d4a574 100%);
    color: #3a2418;
}

.recipe-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 165, 116, 0.3);
}

.recipe-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #f5e6c8;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.recipe-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

.recipe-btn-pdf {
    background: rgba(212, 165, 116, 0.15);
    color: #f5e6c8;
    border: 1px solid rgba(212, 165, 116, 0.4);
}

.recipe-btn-pdf:hover {
    background: rgba(212, 165, 116, 0.25);
}

#recipe-want-another {
    font-family: 'Unbounded', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 11px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

#recipe-want-another:hover {
    background: rgba(212, 165, 116, 0.3) !important;
    transform: translateY(-2px);
}

/* Поле ввода */
.chat-input-wrap {
    display: flex;
    gap: 10px;
    padding: 14px 18px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

#chat-input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 12px 18px;
    color: #f5f0e8;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.15s;
}

#chat-input::placeholder { color: rgba(245, 240, 232, 0.4); }

#chat-input:focus {
    border-color: rgba(212, 165, 116, 0.6);
    background: rgba(255, 255, 255, 0.12);
}

#chat-send {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(180deg, #f5e6c8 0%, #d4a574 100%);
    border: none;
    color: #3a2418;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
    flex-shrink: 0;
}

#chat-send:hover { transform: scale(1.08); }

/* ===== МОДАЛКА ВЫБОРА ПОЖЕЛАНИЯ ПО ВЕСУ ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

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

.modal-card {
    background: linear-gradient(180deg, #1a1a1a, #0f0f0f);
    border: 1px solid rgba(212, 165, 116, 0.3);
    border-radius: 20px;
    padding: 28px 22px;
    max-width: 420px;
    width: 100%;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(212, 165, 116, 0.15);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #f5e6c8;
    margin-bottom: 8px;
    line-height: 1.4;
    text-align: center;
}

.modal-subtitle {
    font-size: 13px;
    color: rgba(245, 240, 232, 0.6);
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

.modal-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #f5f0e8;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: all 0.15s;
    width: 100%;
    margin-bottom: 0;
}

.modal-option:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(212, 165, 116, 0.5);
    transform: translateY(-2px);
}

.modal-option:active {
    transform: translateY(0);
}

.modal-option-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.modal-option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.modal-option-text strong {
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #f5e6c8;
}

.modal-option-text small {
    font-size: 11px;
    color: rgba(245, 240, 232, 0.55);
    line-height: 1.3;
}

/* Подсказка под кнопками модалки */
.modal-note {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    line-height: 1.5;
    color: rgba(245, 240, 232, 0.55);
    text-align: center;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 420px) {
    .welcome-title { font-size: 22px; }
    .logo-wrap {
        width: 240px;
        height: 240px;
        margin-bottom: 8px;
        margin-top: -10px;
    }
    .welcome-subtitle { font-size: 14px; margin-bottom: 24px; }
    .shop-label { font-size: 13px; }
    .shop-icon { font-size: 36px; }
    .chef-bubble {
        font-size: 9px;
        padding: 6px 8px;
        width: 110px;
        left: 45%;
    }
    .chef-fallback { font-size: 80px; }
    .product-cart-btn { width: 32px; height: 32px; font-size: 15px; }
    .message { font-size: 13px; padding: 10px 14px; }
    .chat-header { padding: 12px 14px; }
    .chat-messages { padding: 16px 14px; }
    .chat-input-wrap { padding: 12px 14px; }
    .recipe-btn { font-size: 10px; padding: 10px 6px; }
    .page-header h2 { font-size: 18px; }
    .modal-card { padding: 22px 18px; }
    .modal-title { font-size: 14px; }
}
/* ===== Нижние информационные кнопки ===== */
.info-buttons {
    display: flex;
    gap: 8px;
    margin-top: 24px;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
}

.info-btn {
    flex: 1 1 auto;
    min-width: 100px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(245, 240, 232, 0.75);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.info-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(212, 165, 116, 0.5);
    color: #f5e6c8;
}

/* ===== Модалка политики ===== */
.policy-card {
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.policy-text {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 55vh;
    padding-right: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    line-height: 1.55;
    color: rgba(245, 240, 232, 0.75);
}

.policy-text p {
    margin-bottom: 10px;
}

.policy-text ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

.policy-text strong {
    color: #d4a574;
}

.policy-text::-webkit-scrollbar {
    width: 4px;
}

.policy-text::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.3);
    border-radius: 2px;
}

.policy-checkbox-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
}

.policy-checkbox-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #d4a574;
    cursor: pointer;
}

.policy-checkbox-row label {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(245, 240, 232, 0.8);
    cursor: pointer;
}

/* ===== Модалка информации ===== */
.info-text {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(245, 240, 232, 0.8);
    margin-bottom: 20px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 8px;
}

.info-text p {
    margin-bottom: 10px;
}

.info-text strong {
    color: #d4a574;
}

.info-text a {
    text-decoration: none;
}

.info-text a:hover {
    text-decoration: underline;
}

.info-text::-webkit-scrollbar {
    width: 4px;
}

.info-text::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.3);
    border-radius: 2px;
}

/* Кнопка "Закрыть" в информационных модалках */
.btn-secondary {
    padding: 14px 20px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #f5e6c8;
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.15s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(212, 165, 116, 0.5);
}