/* ═══════════════════════════════════════════════════
   Платформа — Вариант 4: Апельсин (NYT Cooking style)
   Белый фон · Чёрный текст · Оранжево-красный акцент
   ═══════════════════════════════════════════════════ */
:root {
    --bg:         #ffffff;
    --bg-alt:     #faf8f5;
    --card:       #ffffff;
    --border:     #e5e5e5;

    --accent:     #e8400a;
    --accent-d:   #c73208;
    --accent-l:   #fff2ed;

    --text:       #111111;
    --text-2:     #444444;
    --text-3:     #777777;
    --white:      #ffffff;

    --font:       'Montserrat', system-ui, sans-serif;
    --serif:      'Playfair Display', Georgia, serif;

    --r-s: 6px;  --r-m: 10px;  --r-l: 14px;  --r-xl: 20px;  --r-f: 100px;
    --sh-s: 0 1px 4px rgba(0,0,0,.08);
    --sh-m: 0 4px 16px rgba(0,0,0,.12);
    --sh-l: 0 8px 32px rgba(0,0,0,.16);
    --tr: .18s ease;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg);
       line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100dvh; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }

/* ── LAYOUT ─────────────────────────────────────────── */
.v-page { display: flex; flex-direction: column; min-height: 100dvh; }
.v-wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 20px; }
.v-wrap-sm { max-width: 680px; }

/* ── HEADER ─────────────────────────────────────────── */
.v-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    transition: box-shadow var(--tr);
}
.v-header.scrolled { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.v-header-inner {
    height: 60px; display: flex; align-items: center;
    justify-content: space-between; gap: 16px;
}

/* Logo block */
.v-logo-block {
    display: flex; align-items: center; gap: 14px;
    text-decoration: none; flex-shrink: 0;
}
.v-logo-img {
    height: 52px; width: auto; flex-shrink: 0;
    object-fit: contain;
}
.v-logo-title {
    font-family: var(--serif); font-size: 17px; font-weight: 700;
    color: var(--text); line-height: 1.25; letter-spacing: -.2px;
}
.v-logo-name { font-size: 12px; font-weight: 600; color: var(--text-2); line-height: 1.4; margin-top: 3px; }
.v-logo-prof { font-size: 10px; color: var(--text-3); line-height: 1.4; margin-top: 1px; }

/* Legacy logo (back button pages) */
.v-logo {
    font-family: var(--serif); font-size: 21px; font-weight: 700;
    color: var(--text); white-space: nowrap; letter-spacing: -.3px;
}
.v-logo span { color: var(--accent); }

.v-header-right { display: flex; align-items: center; gap: 12px; }

/* User badge */
.v-user-badge { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.v-user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--accent-l); color: var(--accent);
    font-size: 13px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    border: 2px solid var(--accent); overflow: hidden;
}
.v-user-name { font-size: 13px; font-weight: 600; color: var(--text-2);
               max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* User dropdown */
.v-user-wrap { position: relative; }
.user-dropdown {
    position: absolute; top: calc(100% + 10px); right: 0;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r-l); box-shadow: var(--sh-l);
    min-width: 200px; z-index: 300;
    opacity: 0; pointer-events: none;
    transform: translateY(-6px) scale(.97);
    transition: opacity .18s ease, transform .18s ease;
    overflow: hidden;
}
.user-dropdown.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.user-dd-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 12px 16px;
    font-size: 14px; font-weight: 500; color: var(--text);
    cursor: pointer; border: none; background: none; font-family: inherit;
    text-decoration: none;
    transition: background var(--tr);
}
.user-dd-item:hover { background: var(--bg-alt); }
.user-dd-sep { height: 1px; background: var(--border); margin: 4px 0; }
.user-dd-logout { color: #c0392b; }

/* Farewell overlay */
.farewell-overlay {
    position: fixed; inset: 0;
    background: rgba(255,255,255,.96);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 9999;
    opacity: 0; pointer-events: none;
    transition: opacity .3s ease;
}
.farewell-overlay.show { opacity: 1; pointer-events: auto; }
.farewell-emoji { font-size: 56px; margin-bottom: 16px; }
.farewell-text { font-family: var(--serif); font-size: clamp(28px,5vw,42px); font-weight: 700; color: var(--text); }
.farewell-sub { margin-top: 8px; font-size: 15px; color: var(--text-2); }

/* Plate button */
.v-plate-btn {
    position: relative; display: flex; align-items: center; gap: 7px;
    padding: 9px 18px; border-radius: var(--r-f);
    background: var(--accent); color: var(--white);
    font-size: 13px; font-weight: 700; cursor: pointer;
    transition: var(--tr); border: none; letter-spacing: .2px;
}
.v-plate-btn:hover { background: var(--accent-d); }
.v-plate-btn svg { width: 17px; height: 17px; fill: currentColor; }
.plate-count {
    position: absolute; top: -6px; right: -6px;
    min-width: 20px; height: 20px; border-radius: 10px;
    background: var(--text); color: var(--white);
    font-size: 11px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    padding: 0 5px; border: 2px solid var(--white);
}

/* Back button */
.v-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 700; color: var(--text-2);
    padding: 8px 0; cursor: pointer; transition: color var(--tr);
}
.v-back:hover { color: var(--accent); }
.v-back svg { width: 18px; height: 18px; fill: currentColor; }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center;
       gap: 7px; padding: 12px 22px; border-radius: var(--r-f);
       font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer;
       border: none; font-family: inherit; transition: var(--tr); letter-spacing: .2px; }
.btn:active { transform: scale(.97); }
.btn-orange  { background: var(--accent); color: var(--white); }
.btn-orange:hover  { background: var(--accent-d); }
.btn-green   { background: var(--accent); color: var(--white); }
.btn-green:hover   { background: var(--accent-d); }
.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--text); }
.btn-ghost   { background: var(--bg-alt); color: var(--text-2); }
.btn-ghost:hover   { background: var(--border); color: var(--text); }
.btn-full    { width: 100%; }
.btn-lg      { padding: 15px 30px; font-size: 15px; }
.btn-sm      { padding: 8px 14px; font-size: 12px; }

/* ── CARDS ───────────────────────────────────────────── */
.v-card { background: var(--card); border-radius: var(--r-l); padding: 20px;
          border: 1px solid var(--border); }

/* ── SECTION HEADER ──────────────────────────────────── */
.v-sec-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 2px solid var(--text);
}
.v-sec-title {
    font-family: var(--serif); font-size: 20px; font-weight: 700;
    color: var(--text); letter-spacing: -.2px;
}

/* ── FILTERS ─────────────────────────────────────────── */
/* ── FILTER BAR ──────────────────────────────────────── */
/* Filter outer — always-visible clear button + scrollable chips */
.filter-outer {
    display: flex; align-items: center;
    border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.filter-scroll-wrap {
    flex: 1; overflow-x: auto; overflow-y: visible;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.filter-scroll-wrap::-webkit-scrollbar { display: none; }
.filter-bar {
    display: flex; flex-wrap: nowrap; align-items: center;
    gap: 4px; min-width: max-content;
    overflow: visible;
}


/* plain tag chips */
.filter-chip {
    padding: 9px 14px; border-radius: var(--r-s);
    font-size: 13px; font-weight: 600;
    background: transparent; color: var(--text-2);
    border: none; cursor: pointer;
    transition: var(--tr); white-space: nowrap; flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.filter-chip:hover { background: #fde68a; color: #92400e; transform: translateY(-1px); }
.filter-chip.on { background: #f5e9a8; color: var(--text); }
.filter-clear {
    flex-shrink: 0; border: none; background: none; cursor: pointer;
    padding: 8px 10px 8px 12px; border-left: 1px solid var(--border);
    font-size: 12px; font-weight: 700; color: var(--accent);
    white-space: nowrap; -webkit-tap-highlight-color: transparent;
    font-family: var(--sans);
}

/* separator between groups and tags */
.filter-sep {
    width: 1px; height: 20px; background: var(--border);
    flex-shrink: 0; margin: 0 4px;
}

/* dropdown group button — standalone, no wrapper needed */
.fgroup-btn {
    display: flex; align-items: center; gap: 5px; flex-shrink: 0;
    padding: 9px 12px; border-radius: var(--r-s);
    font-size: 13px; font-weight: 600; color: var(--text-2);
    background: transparent; border: none; cursor: pointer;
    white-space: nowrap; transition: var(--tr);
    -webkit-tap-highlight-color: transparent;
}
.fgroup-btn:hover { background: #fde68a; color: #92400e; transform: translateY(-1px); }
.fgroup-btn.has-value { background: #f5e9a8; color: var(--text); }
.fg-arrow {
    width: 10px; height: 6px; flex-shrink: 0;
    transition: transform 0.2s;
}
.fgroup-btn.open .fg-arrow { transform: rotate(180deg); }

/* dropdown panel — appended to <body>, position:absolute avoids transform/overflow issues */
.fgroup-drop {
    display: none; position: absolute;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r-s); box-shadow: 0 8px 24px rgba(0,0,0,.13);
    padding: 6px; z-index: 400; min-width: 150px;
    flex-direction: column; gap: 2px;
}
.fgroup-drop .filter-chip {
    padding: 9px 14px; border-radius: 6px; text-align: left;
    width: 100%;
}
.fgroup-drop .filter-chip:hover { background: #fde68a; color: #92400e; }
.fgroup-drop .filter-chip.on { background: transparent; color: var(--accent); font-weight: 700; }

/* ── FAVORITE BUTTON on recipe cards ─────────────────── */
.card-fav-btn {
    position: absolute; top: 8px; right: 8px;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,.88); border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 2; padding: 0;
    pointer-events: all;
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s;
}
.card-fav-btn:active { transform: scale(.88); }
.card-fav-btn svg { width: 16px; height: 16px; }
.card-fav-btn.active svg { fill: var(--accent); stroke: var(--accent); }
.card-fav-btn:not(.active) svg { fill: none; stroke: #888; stroke-width: 2; }

/* ── LK ICON BUTTON ──────────────────────────────────── */
.v-icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    color: var(--text-2); background: transparent; border: none;
    cursor: pointer; text-decoration: none; transition: var(--tr);
    -webkit-tap-highlight-color: transparent; flex-shrink: 0;
}
.v-icon-btn:hover { background: var(--bg-alt); color: var(--text); }
.v-icon-btn svg { width: 22px; height: 22px; fill: currentColor; }

/* ── FEATURED RECIPE CARD ────────────────────────────── */
.featured-card {
    display: flex; width: 100%; cursor: pointer; text-align: left;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r-m); overflow: hidden;
    border: none; padding: 0; transition: var(--tr);
}
.featured-card:hover .featured-card-photo img { transform: scale(1.04); }
.featured-card-photo {
    width: 42%; flex-shrink: 0; position: relative; overflow: hidden;
    background: var(--bg-alt);
}
.featured-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.featured-card-body {
    flex: 1; padding: clamp(16px,3vw,36px) clamp(16px,3vw,40px);
    display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.featured-card-label {
    font-size: 11px; font-weight: 800; color: var(--accent);
    text-transform: uppercase; letter-spacing: 1px;
}
.featured-card-name {
    font-family: var(--serif); font-size: clamp(18px,2.5vw,28px);
    font-weight: 700; color: var(--text); line-height: 1.2;
}
.featured-card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.featured-card-kcal { font-size: 13px; font-weight: 700; color: var(--accent); }
.card-new-badge {
    position: absolute; top: 12px; left: 12px;
    background: #e84a3a; color: #fff;
    font-size: 10px; font-weight: 800;
    padding: 4px 10px; border-radius: 20px;
    letter-spacing: .8px; text-transform: uppercase; z-index: 3;
}
@media (max-width: 600px) {
    .featured-card { flex-direction: column; }
    .featured-card-photo { width: 100%; height: 220px; }
}

/* ── WEIGHT INPUT ────────────────────────────────────── */
.cab-weight-row {
    display: flex; align-items: center; gap: 8px; margin-top: 8px;
}
.cab-weight-input {
    width: 64px; padding: 5px 8px; font-size: 15px; font-weight: 700;
    font-family: var(--sans); color: var(--text); text-align: center;
    background: transparent; border: none; border-bottom: 1.5px solid var(--border);
    outline: none; transition: border-color .2s;
}
.cab-weight-input:focus { border-bottom-color: var(--accent); }
.cab-weight-unit { font-size: 13px; color: var(--text-3); font-weight: 500; }
.cab-weight-label { font-size: 13px; color: var(--text-3); font-weight: 500; }

/* ── CATEGORY GRID ───────────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.cat-card {
    display: flex; flex-direction: column;
    border-radius: 0;
    background: var(--card); border: none;
    cursor: pointer; transition: var(--tr);
    text-align: left; overflow: hidden; padding: 0;
}
.cat-card:hover .cat-icon-wrap img { transform: scale(1.04); }
.cat-card:active { transform: scale(.99); }

/* Square photo block */
.cat-icon-wrap {
    aspect-ratio: 1/1; width: 100%;
    background: var(--bg-alt);
    overflow: hidden;
}
.cat-icon-wrap img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .4s ease;
}

/* Text below photo — NYT Cooking style */
.cat-body { padding: 10px 0 0; display: flex; flex-direction: column; flex: 1; }
.cat-name {
    font-size: 15px; font-weight: 700; color: var(--text);
    line-height: 1.25; margin-bottom: 4px;
}
.cat-desc { font-size: 12px; color: var(--text-2); line-height: 1.4; flex: 1; }
.cat-count { font-size: 13px; font-weight: 700; color: var(--accent); margin-top: 6px; }

/* ── RECIPE CARD GRID (category page) ───────────────── */
.recipe-card-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.recipe-card {
    display: flex; flex-direction: column; width: 100%;
    background: transparent; border: none;
    cursor: pointer; text-align: left; padding: 0;
    transition: var(--tr);
}
.recipe-card:active { transform: scale(.99); }
.recipe-card-photo {
    width: 100%; aspect-ratio: 3/4;
    background: var(--bg-alt); overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 44px;
}
.recipe-card-photo img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .4s ease;
}
.recipe-card:hover .recipe-card-photo img { transform: scale(1.04); }
.recipe-card-body {
    padding: 12px 0 4px; display: flex; flex-direction: column; flex: 1;
}
.recipe-card-name {
    font-size: 14px; font-weight: 800; color: var(--text);
    line-height: 1.35; margin-bottom: 7px; flex: 1;
}
.recipe-card-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.recipe-card-meta .pill { font-size: 10px; padding: 2px 7px; }

/* Locked recipe cards (trial) */
.recipe-card.locked, .featured-card.locked { opacity: .55; }
.recipe-card.locked .recipe-card-photo img,
.featured-card.locked .featured-card-photo img { filter: grayscale(.4); }
.recipe-card.locked:hover, .featured-card.locked:hover { opacity: .7; }
.locked-badge {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    background: rgba(0,0,0,.55); color: #fff; border-radius: 6px;
    padding: 3px 8px; font-size: 11px; font-weight: 600;
    display: flex; align-items: center; gap: 4px;
    backdrop-filter: blur(4px);
}
.locked-badge svg { width: 12px; height: 12px; fill: #fff; }

/* Bottom row: kcal + rating */
.recipe-card-bottom {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.recipe-card-kcal { font-size: 12px; font-weight: 700; color: var(--accent); }
.recipe-card-quote {
    font-size: 11px; color: var(--text-3); font-style: italic;
    line-height: 1.45; margin-top: 8px;
    border-left: 2px solid var(--accent-l); padding-left: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── PHOTO OVERLAY (rating + comments) ──────────────── */
.recipe-card-photo { position: relative; }
.photo-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    display: flex; align-items: flex-end; justify-content: space-between;
    padding: 7px 8px;
    background: linear-gradient(to top, rgba(0,0,0,.52) 0%, transparent 100%);
    pointer-events: none;
}
.photo-rating-pill {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(0,0,0,.48); border-radius: 20px;
    padding: 5px 10px; pointer-events: all; cursor: pointer;
    border: none; -webkit-tap-highlight-color: transparent;
}
.photo-rating-pill .pr-star { color: #f5c542; font-size: 16px; line-height: 1; }
.photo-rating-pill .pr-val  { color: #fff; font-size: 13px; font-weight: 700; }

/* Stars popup */
.rating-popup {
    position: absolute; bottom: 48px; left: 0;
    background: white; border-radius: 10px;
    padding: 8px 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.22);
    display: none; gap: 2px; align-items: center;
    z-index: 30; pointer-events: all;
}
.rating-popup.open { display: flex; }
.rating-popup .rp-star {
    font-size: 24px; color: #ddd; cursor: pointer; line-height: 1;
    transition: color .1s;
}
.rating-popup .rp-star.filled { color: #f5a624; }

/* Comment button */
.photo-comment-btn {
    display: flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,.9);
    border: none; border-radius: 100px;
    padding: 5px 9px;
    font-size: 11px; font-weight: 700; color: var(--text-2);
    pointer-events: all; cursor: pointer; flex-shrink: 0;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s;
}
.photo-comment-btn svg { width: 12px; height: 12px; fill: var(--text-3); flex-shrink: 0; }
.photo-comment-badge {
    background: var(--accent); color: white;
    border-radius: 100px; min-width: 15px; height: 15px;
    font-size: 9px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* ── COMMENTS MODAL ──────────────────────────────────── */
.comments-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.comment-item {
    padding: 11px 14px; background: var(--bg-alt);
    border-radius: var(--r-m); border: 1px solid var(--border);
}
.comment-meta { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.comment-author { font-size: 12px; font-weight: 700; color: var(--text); }
.comment-date { font-size: 10px; color: var(--text-3); }
.comment-text { font-size: 13px; color: var(--text-2); line-height: 1.55; }
.comments-empty { text-align: center; padding: 30px 10px; color: var(--text-3); font-size: 13px; }
.comments-form { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.c-input {
    width: 100%; padding: 10px 13px; border: 1.5px solid var(--border);
    border-radius: var(--r-s); font-family: inherit; font-size: 13px;
    background: var(--bg); color: var(--text); resize: none;
    transition: border-color var(--tr);
}
.c-input:focus { outline: none; border-color: var(--accent); }

/* ── VIDEO SOURCE CHOICE ─────────────────────────────── */
.video-sources {
    display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap;
}
.video-source-btn {
    padding: 8px 16px; border-radius: var(--r-f);
    font-size: 12px; font-weight: 700;
    border: 1.5px solid var(--border); background: var(--bg-alt);
    color: var(--text-2); cursor: pointer; transition: var(--tr);
}
.video-source-btn.active { background: var(--text); color: white; border-color: var(--text); }
.video-source-btn:hover:not(.active) { border-color: var(--text); color: var(--text); }

/* ── DISH CARD ───────────────────────────────────────── */
.dish-card {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; background: var(--card);
    border-radius: var(--r-m); border: 1px solid var(--border);
    cursor: pointer; transition: var(--tr); text-align: left; width: 100%;
}
.dish-card:hover { border-color: var(--accent); box-shadow: var(--sh-s); }
.dish-card:active { transform: scale(.99); }
.dish-emoji-box {
    width: 52px; height: 52px; border-radius: var(--r-s);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; flex-shrink: 0; background: var(--bg-alt);
}
.dish-info { flex: 1; min-width: 0; }
.dish-name { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 4px; }
.dish-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 3px 9px; border-radius: var(--r-f); font-size: 11px;
        font-weight: 600; background: var(--bg-alt); color: var(--text-2); }
.dish-kcal { font-size: 14px; font-weight: 800; color: var(--accent); flex-shrink: 0; text-align: right; }
.dish-kcal span { display: block; font-size: 10px; font-weight: 500; color: var(--text-3); }
.dish-arrow { color: var(--text-3); font-size: 18px; flex-shrink: 0; }
.dish-sublist-badge {
    font-size: 10px; font-weight: 700; color: var(--accent);
    background: var(--accent-l); padding: 2px 8px; border-radius: var(--r-f);
}

/* ── RECIPE PAGE ─────────────────────────────────────── */
.recipe-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.recipe-sidebar { position: sticky; top: 76px; max-height: calc(100dvh - 90px); overflow-y: auto; }

.recipe-hero-img {
    width: 100%; aspect-ratio: 4/3; border-radius: var(--r-l);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px; position: relative; overflow: hidden;
    background: var(--bg-alt);
}
.recipe-hero-img-label {
    position: absolute; bottom: 12px; right: 12px;
    background: rgba(255,255,255,.92); border-radius: var(--r-s);
    padding: 5px 10px; font-size: 11px; font-weight: 700; color: var(--text);
    border: 1px solid var(--border);
}
.recipe-title { font-family: var(--serif); font-size: clamp(24px,3vw,34px);
                font-weight: 700; color: var(--text); line-height: 1.15; margin-bottom: 14px; }
.recipe-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.recipe-badge { padding: 6px 14px; border-radius: var(--r-f); font-size: 12px; font-weight: 600;
                background: #fff8f4; color: var(--text-2); border: 1px solid #f0e4dc; }
.recipe-badge.green { background: var(--accent-l); color: var(--accent); border-color: var(--accent); }

/* КБЖУ */
.kbzhu { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px,1fr));
         gap: 8px; margin: 18px 0; }
.kbzhu-cell { text-align: center; padding: 14px 6px; background: var(--bg-alt);
               border-radius: var(--r-m); border: 1px solid var(--border); min-width: 0; }
.kbzhu-val { font-family: var(--serif); font-size: 20px; font-weight: 700;
             color: var(--text); line-height: 1; white-space: nowrap; }
.kbzhu-lbl { font-size: 9px; font-weight: 700; color: var(--text-3);
              text-transform: uppercase; letter-spacing: .3px; margin-top: 4px;
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbzhu-cell.main .kbzhu-val { color: var(--accent); }

/* Ingredients */
.v-section-title { font-size: 11px; font-weight: 800; text-transform: uppercase;
                   letter-spacing: .7px; color: var(--text-3); margin-bottom: 12px; }
.ing-list { display: flex; flex-direction: column; gap: 6px; }
.ing-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px;
             background: #fff8f4; border-radius: var(--r-s);
             font-size: 13.5px; border: 1px solid #f0e4dc; }
.ing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.ing-name { flex: 1; color: var(--text); }
.ing-swap-btn {
    font-size: 10px; font-weight: 700; padding: 3px 9px;
    border-radius: var(--r-f); background: var(--accent-l);
    color: var(--accent); border: 1px solid var(--accent);
    cursor: pointer; white-space: nowrap; transition: var(--tr); flex-shrink: 0;
}
.ing-swap-btn:hover { background: var(--accent); color: white; }
.ing-swap-tip {
    margin-top: 5px; padding: 8px 12px; background: var(--accent-l);
    border-radius: var(--r-s); border-left: 3px solid var(--accent);
    font-size: 12px; color: var(--text-2); display: none;
}
.ing-swap-tip.open { display: block; }

/* Steps */
.steps-list { display: flex; flex-direction: column; }
.step-item { display: flex; gap: 14px; padding: 14px 0;
              border-bottom: 1px solid var(--border);
              font-size: 14px; color: var(--text); line-height: 1.65; }
.step-item:last-child { border-bottom: none; }
.step-num { width: 26px; height: 26px; border-radius: 50%;
             background: var(--accent); color: white;
             font-size: 11px; font-weight: 800;
             display: flex; align-items: center; justify-content: center;
             flex-shrink: 0; margin-top: 1px; }

/* VK Video */
.vk-embed { border-radius: var(--r-m); overflow: hidden; aspect-ratio: 16/9;
              background: #111; display: flex; align-items: center;
              justify-content: center; margin-top: 20px; position: relative; cursor: pointer; }
.vk-embed-inner { position: absolute; inset: 0; display: flex; align-items: center;
                   justify-content: center; flex-direction: column; gap: 8px;
                   color: rgba(255,255,255,.7); font-size: 13px; }
.vk-play { width: 58px; height: 58px; border-radius: 50%; background: var(--accent);
            display: flex; align-items: center; justify-content: center; font-size: 22px; color: white; }
.vk-badge-label { position: absolute; top: 10px; right: 10px; background: #0077ff;
                   color: white; border-radius: 4px; padding: 2px 8px; font-size: 11px; font-weight: 800; }

/* Julia tip — speech bubble with avatar on top */
.julia-tip { margin-top: 32px; display: flex; flex-direction: column; align-items: center; }
.julia-tip-ava {
    width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: top;
    border: 3px solid #fff; box-shadow: 0 3px 14px rgba(0,0,0,.12);
    margin-bottom: -18px; position: relative; z-index: 2; flex-shrink: 0;
}
.julia-tip-bubble {
    position: relative;
    background: #f9f4f0; border-radius: 16px;
    padding: 30px 20px 18px; width: 100%;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.julia-tip-bubble::before {
    content: '';
    position: absolute; top: -7px; left: 50%;
    width: 14px; height: 14px; background: #f9f4f0;
    border-radius: 3px;
    transform: translateX(-50%) rotate(45deg);
}
.julia-tip-head { display: flex; align-items: center; gap: 8px; font-size: 11px;
                   font-weight: 800; color: var(--accent); text-transform: uppercase;
                   letter-spacing: .6px; margin-bottom: 6px; }
.julia-tip-text { font-size: 14px; color: var(--text); line-height: 1.65;
                  font-style: italic; font-family: var(--serif); text-align: center; }
.julia-tip-name { font-size: 11px; color: var(--text-3); margin-top: 8px;
                  text-align: right; font-weight: 600; }

/* ── SIDEBAR (add items) ─────────────────────────────── */
.add-sidebar { background: var(--card); border-radius: var(--r-l);
               border: 1px solid var(--border); overflow: hidden; }
.add-sidebar-head { padding: 16px 18px; border-bottom: 1px solid var(--border);
                    background: var(--bg-alt); }
.add-sidebar-head-title { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--text); }
.add-sidebar-head-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; font-weight: 500; }
.add-group { border-bottom: 1px solid var(--border); }
.add-group:last-child { border-bottom: none; }
.add-group-title {
    padding: 12px 18px 8px; font-size: 12px; font-weight: 800;
    color: var(--text-2); letter-spacing: .2px;
}

/* Цветные секции добавок */
.add-group.group-protein { background: #edf5ff; }
.add-group.group-protein .add-group-title { color: #1a5fa8; }
.add-group.group-protein .add-item { background: rgba(255,255,255,.7); }
.add-group.group-protein .add-item:hover { background: #fff; border-color: #90bef0; }
.add-group.group-protein .add-item.checked { background: #dbeeff; border-color: #1a5fa8; }
.add-group.group-protein .add-item.checked .add-item-check { background: #1a5fa8; border-color: #1a5fa8; }
.add-group.group-protein .add-item-kcal { color: #1a5fa8; }

.add-group.group-fat { background: #eef8ee; }
.add-group.group-fat .add-group-title { color: #2d7a2d; }
.add-group.group-fat .add-item { background: rgba(255,255,255,.7); }
.add-group.group-fat .add-item:hover { background: #fff; border-color: #90d090; }
.add-group.group-fat .add-item.checked { background: #d8f0d8; border-color: #2d7a2d; }
.add-group.group-fat .add-item.checked .add-item-check { background: #2d7a2d; border-color: #2d7a2d; }
.add-group.group-fat .add-item-kcal { color: #2d7a2d; }

.add-group.group-carbs { background: #fff7ec; }
.add-group.group-carbs .add-group-title { color: #b85e00; }
.add-group.group-carbs .add-item { background: rgba(255,255,255,.7); }
.add-group.group-carbs .add-item:hover { background: #fff; border-color: #f0b870; }
.add-group.group-carbs .add-item.checked { background: #fde8cc; border-color: #b85e00; }
.add-group.group-carbs .add-item.checked .add-item-check { background: #b85e00; border-color: #b85e00; }
.add-group.group-carbs .add-item-kcal { color: #b85e00; }

.add-group.group-fiber { background: #f5f0ff; }
.add-group.group-fiber .add-group-title { color: #6a3db8; }
.add-group.group-fiber .add-item { background: rgba(255,255,255,.7); }
.add-group.group-fiber .add-item:hover { background: #fff; border-color: #c0a0f0; }
.add-group.group-fiber .add-item.checked { background: #e8ddff; border-color: #6a3db8; }
.add-group.group-fiber .add-item.checked .add-item-check { background: #6a3db8; border-color: #6a3db8; }
.add-group.group-fiber .add-item-kcal { color: #6a3db8; }
.add-group-items { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.add-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; background: var(--bg-alt);
    border-radius: var(--r-s); cursor: pointer; transition: var(--tr);
    border: 1px solid transparent; text-align: left; width: 100%;
}
.add-item:hover { border-color: var(--border); background: white; }
.add-item.checked { border-color: var(--accent); background: var(--accent-l); }
.add-item-check {
    width: 20px; height: 20px; border-radius: 4px; border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: var(--tr);
}
.add-item.checked .add-item-check { background: var(--accent); border-color: var(--accent); }
.add-item.checked .add-item-check::after { content: '✓'; color: white; font-size: 11px; font-weight: 800; }
.add-item-text { flex: 1; font-size: 13px; color: var(--text); line-height: 1.3; }
.add-item-kcal { font-size: 11px; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.add-item-recipe-link { font-size: 10px; color: var(--accent); font-weight: 700; margin-top: 2px; display: block; }
.add-total {
    padding: 14px 18px; background: var(--accent);
    display: flex; align-items: center; justify-content: space-between;
}
.add-total-label { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.8); }
.add-total-val { font-family: var(--serif); font-size: 22px; font-weight: 700; color: white; }
.add-total-macro { font-size: 13px; color: rgba(255,255,255,.9); margin-top: 3px; font-weight: 500; }

/* ── MODAL ───────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15,15,15,.55);
    z-index: 400; opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: flex-end; justify-content: center;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

/* Mobile: bottom sheet */
.modal-box {
    position: relative;
    width: 100%;
    background: var(--card); border-radius: 20px 20px 0 0;
    max-height: 92dvh; display: flex; flex-direction: column;
    transform: translateY(100%);
    transition: transform .38s cubic-bezier(.32,.72,0,1),
                opacity .22s ease;
    opacity: 0;
    overflow: hidden;
    box-shadow: 0 -8px 40px rgba(0,0,0,.12);
}
.modal-overlay.open .modal-box {
    transform: translateY(0);
    opacity: 1;
}

/* Desktop / tablet: centered card */
@media (min-width: 768px) {
    .modal-overlay { align-items: center; }
    .modal-box {
        width: 480px;
        max-width: 92vw;
        border-radius: 20px;
        max-height: 80vh;
        transform: scale(.88) translateY(20px);
        box-shadow: 0 24px 80px rgba(0,0,0,.22), 0 4px 16px rgba(0,0,0,.1);
        transition: transform .35s cubic-bezier(.34,1.15,.64,1),
                    opacity .22s ease;
    }
    .modal-overlay.open .modal-box {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    .modal-handle { display: none; }
    .modal-header { padding: 20px 24px 16px; }
    .modal-body   { padding: 16px 24px 24px; }
    .modal-footer { padding: 14px 24px 24px; }
}

.modal-handle { width: 36px; height: 4px; background: var(--border);
                border-radius: 2px; margin: 12px auto 4px; flex-shrink: 0; }
.modal-header { padding: 8px 20px 14px; border-bottom: 1px solid var(--border);
                flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 16px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 8px; }
.modal-plate-icon {
    position: relative; width: 22px; height: 22px; display: inline-block;
    overflow: hidden; border-radius: 50%; flex-shrink: 0;
}
.modal-close {
    width: 32px; height: 32px; border-radius: 50%; background: var(--bg-alt);
    font-size: 16px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-2); transition: var(--tr);
    border: none; flex-shrink: 0;
}
.modal-close:hover { background: var(--border); }
.modal-body { overflow-y: auto; flex: 1; padding: 16px 20px 20px; -webkit-overflow-scrolling: touch; }
.modal-footer { padding: 14px 20px 20px; border-top: 1px solid var(--border); flex-shrink: 0; }

/* Plate items */
.plate-items { display: flex; flex-direction: column; gap: 10px; }
.plate-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px;
               background: var(--bg-alt); border-radius: var(--r-s); border: 1px solid var(--border); }
.plate-item-emoji { font-size: 24px; }
.plate-item-photo { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.plate-item-info { flex: 1; }
.plate-item-name { font-size: 13px; font-weight: 700; color: var(--text); }
.plate-item-kcal { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.plate-item-del { width: 28px; height: 28px; border-radius: 50%; background: var(--border);
                  display: flex; align-items: center; justify-content: center;
                  color: var(--text-3); font-size: 14px; cursor: pointer;
                  transition: var(--tr); flex-shrink: 0; }
.plate-item-del:hover { background: #fde8e8; color: #c04040; }
.plate-total-block { margin-top: 14px; padding: 14px 16px;
                     background: var(--bg-alt); border-radius: var(--r-s);
                     border: 1px solid var(--border); }
.plate-total-title { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase;
                     letter-spacing: .5px; margin-bottom: 6px; }
.plate-total-val { font-size: 15px; font-weight: 700; color: var(--text); }

/* Water */
.water-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.water-label { font-size: 13px; color: var(--text-2); }
.water-inp { width: 64px; padding: 8px 10px; border: 1.5px solid var(--border);
              border-radius: var(--r-s); font-size: 14px; text-align: center;
              font-family: inherit; font-weight: 700; }
.water-inp:focus { outline: none; border-color: var(--accent); }
.water-result { font-weight: 800; color: var(--accent); font-size: 14px; }

/* Shopping */
.shop-ask { margin-top: 14px; padding: 14px 16px; background: var(--bg-alt);
             border-radius: var(--r-m); border: 1px solid var(--border); }
.shop-ask-text { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.shop-ask-btns { display: flex; gap: 8px; }

/* Empty plate */
.plate-empty { text-align: center; padding: 48px 20px; }
.plate-empty-icon { font-size: 52px; margin-bottom: 14px; }
.plate-empty-text { font-size: 16px; font-weight: 700; color: var(--text); }
.plate-empty-sub { font-size: 13px; color: var(--text-3); margin-top: 6px; }

/* ── STICKY ADD BTN ──────────────────────────────────── */
.sticky-add {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 12px 20px 20px;
    box-shadow: 0 -1px 0 var(--border), 0 -8px 24px rgba(0,0,0,.06);
    z-index: 50;
}
.sticky-add-inner { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* ── CHAT FAB ────────────────────────────────────────── */
/* .chat-fab — defined below with icon support */

/* ── TOAST ───────────────────────────────────────────── */
#v2-toast {
    position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--text); color: white; padding: 11px 20px;
    border-radius: var(--r-f); font-size: 13px; font-weight: 700;
    z-index: 9999; opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s; white-space: nowrap;
    box-shadow: var(--sh-l);
}
#v2-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── JULIA STRIP ─────────────────────────────────────── */
.julia-strip {
    display: flex; align-items: flex-start; gap: 20px;
    padding: 24px 28px; background: var(--bg-alt);
    border-radius: var(--r-m); border: 1px solid var(--border);
    margin-bottom: 24px;
}
.julia-ava { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-l);
              display: flex; align-items: center; justify-content: center;
              font-size: 28px; flex-shrink: 0; overflow: hidden; }
.julia-info { flex: 1; }
.julia-name { font-size: 11px; font-weight: 800; color: var(--accent);
               text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.julia-text { font-size: clamp(13px,1.4vw,16px); color: var(--text-2); line-height: 1.75; }

/* ── HISTORY ─────────────────────────────────────────── */
.hist-item { display: flex; align-items: center; gap: 12px; padding: 12px 0;
              border-bottom: 1px solid var(--border); }
.hist-item:last-child { border-bottom: none; }
.hist-dot { width: 38px; height: 38px; border-radius: 50%; background: var(--bg-alt);
             display: flex; align-items: center; justify-content: center;
             font-size: 18px; flex-shrink: 0; border: 1px solid var(--border); }
.hist-info { flex: 1; min-width: 0; }
.hist-date { font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.hist-label { font-size: 13px; font-weight: 700; color: var(--text); }
.hist-dishes { font-size: 12px; color: var(--text-2); margin-top: 2px;
               white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-kcal { font-size: 14px; font-weight: 800; color: var(--accent); flex-shrink: 0; }

/* ── SUBLIST ─────────────────────────────────────────── */
.sublist-note { padding: 14px 16px; background: var(--accent-l);
                border-radius: var(--r-m); font-size: 13px; color: var(--accent);
                font-weight: 600; border-left: 3px solid var(--accent); margin-bottom: 16px; }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 1024px) {
    .recipe-card-grid { grid-template-columns: repeat(3,1fr); gap: 16px; }
}
@media (max-width: 767px) {
    .recipe-layout { grid-template-columns: 1fr; }
    .recipe-sidebar { position: static; }
    .cat-grid { grid-template-columns: repeat(2,1fr); gap: 16px; }
    .recipe-card-grid { grid-template-columns: repeat(2,1fr); gap: 14px; }
    .v-user-name { display: none; }
    .chat-fab { bottom: 80px; }
    .chat-fab.above-sticky { bottom: 110px; }
    #v2-toast { bottom: 80px; }
    .sticky-add { padding-bottom: 28px; }
    .v-logo-prof { display: none; }
    .filter-outer { flex-wrap: wrap; align-items: flex-start; }
    .filter-scroll-wrap { overflow: visible; }
    .filter-clear { border-left: none; border-top: 1px solid var(--border); width: 100%; padding: 6px 8px 2px; }
    .filter-bar { flex-wrap: wrap; min-width: 0; }
    .filter-sep { display: none; }
    .v-header-logo-compact-text { display: none; }
    .v-header-logo-text { font-size: 18px; }
    /* LK icon to the left on mobile */
    .v-header-inner { position: relative; }
    .v-user-wrap,
    a.v-icon-btn#lk-btn {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
    }
}
@media (max-width: 460px) {
    .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .recipe-card-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .kbzhu { grid-template-columns: repeat(auto-fit, minmax(56px,1fr)); gap: 6px; }
    .kbzhu-val { font-size: 18px; }
    .kbzhu-lbl { font-size: 8px; letter-spacing: .2px; }
    .v-logo-name { display: none; }
}

/* ── ANIMATIONS ──────────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform: translateY(14px); } to { opacity:1; transform: translateY(0); } }
@keyframes starWiggle {
    0%   { transform: scale(1) rotate(0deg); }
    25%  { transform: scale(1.35) rotate(-8deg); }
    50%  { transform: scale(1.35) rotate(8deg); }
    75%  { transform: scale(1.1) rotate(-4deg); }
    100% { transform: scale(1) rotate(0deg); }
}
.stars-animate .r-star { animation: starWiggle .5s ease both; display: inline-block; }
.stars-animate .r-star:nth-child(1) { animation-delay: 0s; }
.stars-animate .r-star:nth-child(2) { animation-delay: .08s; }
.stars-animate .r-star:nth-child(3) { animation-delay: .16s; }
.stars-animate .r-star:nth-child(4) { animation-delay: .24s; }
.stars-animate .r-star:nth-child(5) { animation-delay: .32s; }
.anim { animation: fadeUp .35s ease both; }
.anim-d1 { animation-delay: .07s; }
.anim-d2 { animation-delay: .14s; }
.anim-d3 { animation-delay: .21s; }

/* ── STEP PHOTOS ─────────────────────────────────────── */
.step-photo-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; margin-top: 10px; height: 130px; border-radius: var(--r-m);
    background: var(--bg-alt); border: 2px dashed var(--border);
    color: var(--text-3); font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .4px;
}
.step-photo-placeholder span:first-child { font-size: 26px; }
.step-photo-img {
    width: 100%; max-width: 340px;
    height: auto; display: block;
    border-radius: var(--r-m); margin-top: 10px;
    object-fit: contain;
}

/* ── LOGIN PAGE ──────────────────────────────────────── */
.login-page {
    min-height: 100dvh; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 24px 20px; background: var(--bg-alt);
}
.login-logo-wrap { text-align: center; margin-bottom: 28px; }
.login-logo-name { font-family: var(--serif); font-size: 22px; font-weight: 700;
                   color: var(--text); margin-top: 12px; }
.login-logo-tag  { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.animate-in { animation: fadeUp .4s ease both; }
.login-card {
    background: var(--card); border-radius: var(--r-xl);
    box-shadow: var(--sh-l); padding: 32px;
    width: 100%; max-width: 400px;
}
.login-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.login-tab {
    flex: 1; padding: 10px; font-size: 14px; font-weight: 600;
    color: var(--text-2); border: none; background: none;
    cursor: pointer; transition: color var(--tr);
    border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.login-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.login-form { display: none; }
.login-form.active { display: block; }
.hp-form-group { margin-bottom: 16px; }
.hp-label { display: block; font-size: 13px; font-weight: 600;
            color: var(--text-2); margin-bottom: 6px; }
.hp-input {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--border); border-radius: var(--r-m);
    font-size: 15px; font-family: inherit; color: var(--text);
    background: var(--bg); transition: border-color var(--tr), box-shadow var(--tr);
    outline: none;
}
.hp-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,64,10,.1); }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-d); }
.login-divider { text-align: center; color: var(--text-3); font-size: 13px; margin: 16px 0; }
.login-demo { text-align: center; font-size: 13px; color: var(--text-3); margin-top: 20px; }
.login-demo a { color: var(--accent); cursor: pointer; text-decoration: underline; }

/* ── PLATFORM FOOTER ───────────────────────────────── */
.v-footer {
    background: var(--text);
    color: var(--white);
    padding: 28px 20px 24px;
    margin-top: auto;
    flex-shrink: 0;
}
.v-footer-inner {
    max-width: 980px; margin: 0 auto;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.v-footer-brand {
    display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
}
.v-footer-brand span { color: var(--accent); }
.v-footer-links {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.v-footer-links a {
    font-size: 13px; font-weight: 500; color: rgba(255,255,255,.6);
    text-decoration: none; padding: 4px 10px;
    border-radius: 100px; transition: color var(--tr), background var(--tr);
}
.v-footer-links a:hover { color: var(--white); background: rgba(255,255,255,.1); }
.v-footer-sep { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.2); flex-shrink: 0; }
.v-footer-copy {
    font-size: 11px; color: rgba(255,255,255,.3); text-align: center;
}

/* ── RECIPE META ROW (below title) ─────────────────── */
.recipe-meta-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: 6px 0 14px; font-size: 13px; color: var(--text-2);
}
.recipe-meta-dot {
    width: 3px; height: 3px; border-radius: 50%; background: var(--border); flex-shrink: 0;
}
.recipe-meta-stars {
    display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: var(--text-3);
}
.recipe-meta-stars .star { font-size: 14px; }
.recipe-meta-stars .star.filled { color: #f5a623; }
.recipe-meta-stars .r-star {
    font-size: 20px; cursor: pointer; transition: color .15s, transform .15s; color: #ddd;
    display: inline-block;
}
.recipe-meta-stars .r-star.filled { color: #f5a623; }
.recipe-meta-stars .r-star:hover { transform: scale(1.3); color: #f5a623; }

/* Gentle hint animation — stars glow sequentially until user rates */
.recipe-meta-stars:not(.user-rated) .r-star {
    animation: starHint 3s ease-in-out infinite;
}
.recipe-meta-stars:not(.user-rated) .r-star:nth-child(1) { animation-delay: 0s; }
.recipe-meta-stars:not(.user-rated) .r-star:nth-child(2) { animation-delay: .15s; }
.recipe-meta-stars:not(.user-rated) .r-star:nth-child(3) { animation-delay: .3s; }
.recipe-meta-stars:not(.user-rated) .r-star:nth-child(4) { animation-delay: .45s; }
.recipe-meta-stars:not(.user-rated) .r-star:nth-child(5) { animation-delay: .6s; }
@keyframes starHint {
    0%, 100% { color: #ddd; transform: scale(1); }
    30% { color: #f5c542; transform: scale(1.15); }
    60% { color: #ddd; transform: scale(1); }
}
.recipe-meta-date { font-size: 12px; color: var(--text-3); }

/* ── COMMENTS BUTTON (see base definition above) ───── */

/* ── COMMENTS MODAL: star input ─────────────────────── */
.c-star-row { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.c-star-row label { font-size: 12px; font-weight: 600; color: var(--text-2); margin-right: 6px; }
.c-star-row .cstar {
    font-size: 22px; cursor: pointer; color: #ddd; transition: color .12s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.c-star-row .cstar.on { color: #f5a623; }

/* ── COMMENT ITEM ───────────────────────────────────── */
.comment-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
.comment-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.comment-item-author { font-size: 13px; font-weight: 700; color: var(--text); }
.comment-item-stars { font-size: 13px; color: #f5a623; letter-spacing: 1px; }
.comment-item-stars .empty-star { color: #ddd; }
.comment-item-text { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.comment-item-date { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.comment-item-delete {
    font-size: 11px; color: var(--text-3); background: none; border: none;
    cursor: pointer; padding: 2px 0; text-decoration: underline; margin-top: 3px; display: block;
    transition: color var(--tr);
}
.comment-item-delete:hover { color: var(--accent); }

/* ── FOOTER SOCIAL ICONS ────────────────────────────── */
.v-footer-social { display: flex; align-items: center; gap: 12px; }
.v-footer-social a {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.7); transition: background var(--tr), color var(--tr);
    flex-shrink: 0;
}
.v-footer-social a:hover { background: var(--accent); color: #fff; }
.v-footer-social svg { width: 16px; height: 16px; fill: currentColor; }

/* ── CHAT FAB (redesigned) ───────────────────────────── */
.chat-fab {
    position: fixed; bottom: 24px; right: 20px; z-index: 200;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--text); color: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,.28);
    cursor: pointer; border: none;
    transition: background var(--tr), transform .2s;
    font-size: 10px; gap: 3px;
    animation: fabPulse 3s ease-in-out infinite;
}
.chat-fab:hover { background: var(--accent); transform: scale(1.07); animation: none; }
.chat-fab-icon { width: 22px; height: 22px; fill: currentColor; }
.chat-fab-tip { display: none; }
@keyframes fabPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,.28); }
    50% { box-shadow: 0 4px 20px rgba(0,0,0,.28), 0 0 0 8px rgba(232,64,10,.12); }
}

/* ── COMPACT LOGO IN INNER-PAGE HEADERS ─────────────── */
.v-header-logo-compact {
    display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0;
}
.v-header-logo-text {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; line-height: 1.25; gap: 1px;
}
.v-logo-name {
    font-family: var(--serif); font-size: 13px; font-weight: 600;
    color: var(--text-2); letter-spacing: .2px;
}
.v-logo-brand {
    font-family: var(--serif); font-size: 19px; font-weight: 700;
    color: var(--text); letter-spacing: -.2px;
}
.v-logo-brand span { color: var(--accent); }
.v-logo-role {
    font-family: var(--sans); font-size: 9px; font-weight: 600;
    color: var(--text-3); text-transform: uppercase; letter-spacing: .8px;
}
@media (max-width: 767px) {
    .v-logo-brand { font-size: 16px; }
    .v-logo-name { font-size: 11px; }
}

/* ── NEWS FEED ───────────────────────────────────────── */
.news-feed { display: flex; flex-direction: column; gap: 0; margin-bottom: 36px; }
.news-divider { height: 1px; background: var(--border); margin: 16px 0; opacity: 0.6; }
.news-text-card {
    background: var(--bg-alt); border-radius: var(--r);
    padding: 18px 20px; display: flex; flex-direction: column; gap: 10px;
}
.news-text-card-date { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.03em; }
.news-text-card-top { display: flex; align-items: center; gap: 10px; }
.news-text-card-ava {
    width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
}
.news-text-card-ava img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.news-text-card-author { font-size: 13px; font-weight: 700; color: var(--text); }
.news-text-card-body { font-size: 14px; color: var(--text); line-height: 1.6; }
.news-item-date { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.03em; margin-bottom: 4px; }

/* ═══════════════════════════════════════════════════
   NEW HEADER (vh-*)
   ═══════════════════════════════════════════════════ */

/* Background */
.v-header {
    background: linear-gradient(180deg, #fff7f3 0%, #fde8db 100%);
    border-bottom: 1px solid #f5c9b3;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

/* Inner flex container */
.vh-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 82px;
}

/* Julia avatar (index only) */
.vh-julia-ava {
    order: 1;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-l) url('https://voronova.online/images/YV-small.webp') center/cover no-repeat;
    border: 2px solid var(--accent);
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(232,64,10,.18);
}

/* Back button (inner pages) */
.vh-back-btn {
    order: 1;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.8);
    border: 1.5px solid #d4b0a0;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    color: var(--text-2);
}
.vh-back-btn:hover { background: #fff; border-color: var(--accent); color: var(--accent); }
.vh-back-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* Brand */
.vh-brand {
    order: 2;
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: inherit;
    flex: 1;
}
.vh-brand-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.vh-brand-name {
    font-family: var(--serif);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}
.vh-brand-role {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .1em;
}
.vh-brand-title {
    font-family: var(--serif);
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 700;
    line-height: 1;
    color: var(--text);
}
.vh-accent { color: var(--accent); }

/* Slogan */
.vh-slogan-wrap {
    order: 3;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.vh-slogan-wrap::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 110px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(232,64,10,.14) 0%, rgba(232,64,10,.07) 40%, rgba(232,64,10,0) 78%);
    pointer-events: none;
    z-index: 0;
}
.vh-slogan {
    font-family: 'DM Serif Text', var(--serif);
    font-size: 14px;
    line-height: 1.22;
    color: #9a4f2d;
    text-align: center;
    max-width: 22ch;
    position: relative;
    z-index: 1;
}

/* Profile pill */
.vh-inner > .v-user-wrap {
    order: 4;
    flex-shrink: 0;
    position: relative;
    margin-left: 24px;
}
.vh-profile-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 5px 14px 5px 5px;
    /* Вариант 1 — тёплый кремовый, акцентный бордер */
    background: #fff7f3;
    border: 1.5px solid rgba(232,64,10,.28);
    /* Вариант 2 — белый с тенью:
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(232,64,10,.1); */
    /* Вариант 3 — accent-l заливка, без бордера:
    background: var(--accent-l);
    border: none; */
    border-radius: 999px;
    color: var(--text-2);
    cursor: pointer;
    font: inherit;
}
.vh-profile-pill:hover { background: #ffe8de; }
.vh-profile-name { font-size: 13px; font-weight: 600; }

/* Plate button */
.vh-plate-btn {
    order: 5;
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-l);
    border: 1px solid rgba(232,64,10,.2);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}
.vh-plate-btn:hover { background: #fde5da; }
.vh-plate-icon {
    position: relative;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d0d0d0;
}
.vh-slice { position: absolute; }
.vh-slice-g { inset: 0 50% 0 0; background: #6aaa6a; }
.vh-slice-y { inset: 0 0 50% 50%; background: #f0b840; }
.vh-slice-r { inset: 50% 0 0 50%; background: #e07070; }
.vh-plate-btn .plate-count {
    position: absolute;
    top: -3px; right: -3px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: var(--text);
    color: #fff;
    box-shadow: 0 0 0 2px #fff;
    font-size: 10px; font-weight: 700;
}

/* ── MOBILE ─────────────────────────── */
@media (max-width: 767px) {
    .vh-inner { gap: 8px; height: 68px; }
    .vh-julia-ava { display: none; }
    .vh-slogan-wrap { display: none; }
    .vh-inner > .v-user-wrap {
        order: 1;
        position: static;
        transform: none;
        left: auto; top: auto;
        margin-left: 0;
    }
    .vh-profile-pill {
        width: 42px; min-height: 42px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    .vh-profile-name { display: none; }
    .vh-brand { order: 2; flex: 1; align-items: center; text-align: center; }
    .vh-brand-meta { justify-content: center; }
    .vh-brand-title { font-size: 21px; }
    .vh-plate-btn { order: 3; }
    .vh-back-btn { order: 1; }
    /* Inner pages: hide profile pill when back button is present */
    .vh-back-btn ~ .v-user-wrap { display: none; }
}

/* FOUC prevention: make body visible once CSS is loaded */
body { visibility: visible !important; }
