/* PRLM Mini App — dark "Lab" glass theme */
:root {
  --bg: #0A0E17;
  --text: #F0F4F8;
  --muted: #8B95A5;
  --accent: #00E676;
  --accent-2: #00E5FF;
  --pink: #FF4F8B;
  --gold: #FFC940;
  --danger: #FF5A5F;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --stroke: rgba(255, 255, 255, 0.10);
  --stroke-strong: rgba(255, 255, 255, 0.18);
  --radius: 18px;
  --radius-sm: 12px;
  --tabbar-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; color: var(--text); }
body { background: transparent; } /* a body background would cover the fixed .backdrop */
body {
  font: 15px/1.45 Manrope, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--tabbar-h) + 28px + var(--safe-b));
  overscroll-behavior-y: none;
}
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* Ambient neon blobs behind the glass */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, #121a2b 0%, var(--bg) 60%); }
.backdrop i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; }
.backdrop i:nth-child(1) { width: 320px; height: 320px; background: #00c865; top: -120px; left: -90px; }
.backdrop i:nth-child(2) { width: 280px; height: 280px; background: #00a3ff; top: 35%; right: -140px; opacity: .32; }
.backdrop i:nth-child(3) { width: 260px; height: 260px; background: #b000f0; bottom: -120px; left: 10%; opacity: .25; }

.glass {
  background: var(--glass);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* ── Top bar ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: minmax(84px, auto) 1fr minmax(84px, auto); align-items: center;
  min-height: 56px; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top, 0px));
  border-width: 0 0 1px; border-radius: 0;
}
.back { grid-column: 1; }
.title { grid-column: 2; text-align: center; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.back {
  justify-self: start; display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--stroke); background: var(--glass-strong); color: var(--text);
  padding: 7px 12px 7px 6px; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer;
}
.back:active { transform: scale(.96); }
.top-action { grid-column: 3; justify-self: end; display: flex; }

/* ── Tab bar ─────────────────────────────────────────────── */
.tabbar {
  position: fixed; z-index: 20; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b));
  height: var(--tabbar-h); border-radius: 24px; display: flex; padding: 6px;
  background: rgba(14, 20, 32, .62);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 18px; color: var(--muted); font-size: 11px; font-weight: 600; transition: color .2s, background .2s;
}
.tab .icon svg { width: 23px; height: 23px; }
.tab.active { color: var(--accent); background: rgba(0, 230, 118, .12); box-shadow: inset 0 0 0 1px rgba(0, 230, 118, .22); }

/* ── Layout ──────────────────────────────────────────────── */
.view { max-width: 640px; margin: 0 auto; padding: 14px 14px 0; }
.view.enter { animation: enter .22s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* Edge swipe: the screen covers the previous one, which lies under it (.under) */
.view.swiping { position: relative; z-index: 1; min-height: 100vh; background: var(--bg); box-shadow: -14px 0 28px rgba(0, 0, 0, .45); }
.under { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.under-page { position: absolute; left: 0; right: 0; }
.under-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); }
.view.back-in { animation: back-in .24s ease-out; }
@keyframes back-in { from { opacity: .5; transform: translateX(-25%); } to { opacity: 1; transform: none; } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.view > div > .card + .card, .view > div > * + .btn, .view > div > .btn + .card { margin-top: 12px; }

.card { border-radius: var(--radius); padding: 16px; }
.card h2 { margin: 0 0 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.hero h1 { margin: 2px 0 6px; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.uses { color: var(--accent); font-weight: 600; } /* «в N рецептах» on a market tile */
.filter-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 16px; }
.uses-chip { color: var(--accent); border-color: rgba(0, 230, 118, .35); text-decoration: none; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.desc { color: #c5cdd8; white-space: pre-line; margin: 12px 0 0; }
.hero > .btn { margin-top: 14px; }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.rate { display: flex; align-items: center; gap: 8px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.error { color: var(--danger); }
.pad { padding: 10px 12px; }
.inline { display: inline-flex; align-items: center; gap: 4px; }

.icon { display: inline-flex; line-height: 0; }
.icon.xs svg { width: 14px; height: 14px; }
.icon.gold { color: var(--gold); }
.icon.pink { color: var(--pink); }
.chevron { color: var(--muted); }

/* ── Chips, badges ───────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; background: var(--glass-strong); border: 1px solid var(--stroke); }
.badges { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.badge { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text); }
.badge.accent { color: var(--accent); font-weight: 700; }

/* ── Inputs ──────────────────────────────────────────────── */
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 14px; height: 46px; color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: var(--text); }
.search:focus-within { border-color: rgba(0, 230, 118, .5); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > span { color: var(--muted); font-size: 12.5px; }
.field input, .field textarea, .compose textarea, .pct-input input {
  width: 100%; padding: 11px 12px; border-radius: var(--radius-sm); border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, .22); outline: none; resize: vertical;
}
.field input:focus, .field textarea:focus, .compose textarea:focus, .pct-input input:focus { border-color: rgba(0, 230, 118, .55); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 .field { margin-bottom: 12px; }
.range-field { margin: 4px 0 14px; }
.range-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
input[type=range] { width: 100%; accent-color: var(--accent); }

.segmented { display: flex; padding: 4px; border-radius: 14px; gap: 4px; }
.segmented button { flex: 1; border: 0; background: none; color: var(--muted); padding: 8px 6px; border-radius: 10px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.segmented button.active { background: rgba(0, 230, 118, .16); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(0, 230, 118, .25); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border: 1px solid transparent; border-radius: 16px; padding: 14px; font-weight: 700; cursor: pointer;
  transition: transform .12s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #04110a; box-shadow: 0 8px 24px rgba(0, 230, 160, .25); }
.btn.ghost { background: var(--glass); border-color: var(--stroke); color: var(--text); margin-top: 10px; }
.btn.small { width: auto; padding: 10px 16px; border-radius: 12px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent-2); font-weight: 600; cursor: pointer; }
.link-btn:disabled { opacity: .5; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--stroke); background: var(--glass-strong); cursor: pointer; }
.icon-btn.accent { color: #04110a; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.icon-btn.danger { color: var(--danger); background: none; border-color: transparent; width: 32px; height: 32px; }

.like { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--glass-strong); cursor: pointer; font-weight: 700; }
.like.on { color: var(--pink); border-color: rgba(255, 79, 139, .35); background: rgba(255, 79, 139, .12); }

.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars > * { display: inline-flex; line-height: 0; border: 0; background: none; padding: 0; color: rgba(255, 201, 64, .35); }
.stars > .on { color: var(--gold); }
.stars svg { width: 18px; height: 18px; }
.stars.interactive svg { width: 26px; height: 26px; }
.stars.interactive > * { cursor: pointer; padding: 2px; }

/* ── Lists ───────────────────────────────────────────────── */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 13px 14px; border-radius: 16px; cursor: pointer; }
.item:active { background: var(--glass-strong); }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 650; overflow-wrap: anywhere; }
.item-meta { color: var(--muted); font-size: 13px; margin-top: 3px; }
.item-right { font-weight: 700; white-space: nowrap; }

.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--stroke); }
.row:last-child { border-bottom: 0; }
a.row:active { opacity: .7; }
.row .pct { font-weight: 700; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row.edit .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row.total { padding-top: 12px; }
.grow { flex: 1; min-width: 0; }
.pct-input { display: flex; align-items: center; gap: 4px; }
.pct-input input { width: 74px; padding: 8px; text-align: right; }

.picker { margin-top: 12px; }
.suggest { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.suggest-item { display: flex; justify-content: space-between; gap: 10px; text-align: left; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--stroke); background: rgba(0, 0, 0, .25); cursor: pointer; }

/* ── Comments ────────────────────────────────────────────── */
.comments { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.comment { display: flex; gap: 10px; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, rgba(0,230,118,.35), rgba(0,229,255,.35)); border: 1px solid var(--stroke); }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-text { margin-top: 2px; white-space: pre-line; overflow-wrap: anywhere; color: #d5dce6; }
.compose { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.compose .stars { align-self: flex-start; }

.notice { display: flex; gap: 12px; align-items: center; }
.notice-icon { color: var(--accent); }

/* ── Result table ────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.result { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.result th, .result td { padding: 9px 0 9px 8px; text-align: right; border-bottom: 1px solid var(--stroke); }
.result th:first-child, .result td:first-child { text-align: left; padding-left: 0; }
.result th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.result tfoot td { font-weight: 800; border-bottom: 0; color: var(--accent); }

/* ── States, toast ───────────────────────────────────────── */
.state { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); padding: 28px 12px; text-align: center; }
.state.error { color: var(--danger); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 26px + var(--safe-b)); z-index: 30;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 11px 16px; border-radius: 14px; font-weight: 600; width: max-content; max-width: calc(100% - 32px); text-align: center;
  background: rgba(20, 28, 42, .85); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[data-kind="error"] { color: #ffb3b5; border-color: rgba(255, 90, 95, .35); }

/* ── Profile ─────────────────────────────────────────────── */
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head h1 { margin: 0; font-size: 20px; }
.avatar.big { width: 58px; height: 58px; font-size: 22px; object-fit: cover; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; border-radius: 16px; text-align: center; }
.tile b { font-size: 20px; color: var(--accent); }
.tile span { font-size: 11px; color: var(--muted); line-height: 1.2; }
.item-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(0, 230, 118, .12); color: var(--accent); flex: none; }
.plain { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.hero > .btn.ghost { margin-top: 8px; }
.card > .btn.ghost { margin-top: 12px; }

/* ── Market ──────────────────────────────────────────────── */
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; scrollbar-width: none; }
.chip-scroll::-webkit-scrollbar { display: none; }
/* With a mouse the row needs a visible scrollbar to be discoverable (fingers swipe it anyway) */
@media (hover: hover) and (pointer: fine) {
  .chip-scroll { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
  .chip-scroll::-webkit-scrollbar { display: block; height: 6px; }
  .chip-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .25); border-radius: 3px; }
}
.chip-btn { flex: none; border: 1px solid var(--stroke); background: var(--glass); color: var(--muted); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.chip-btn.active { color: #04110a; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.select { border-radius: 12px; padding: 8px 10px; color: var(--text); font-size: 13.5px; outline: none; }
.select option { background: #111827; }
.filters-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filters-row .select { flex: 1 1 140px; min-width: 0; max-width: 100%; }  /* phone: brand + vendor, then sort */
.grid-products { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.state.wide { grid-column: 1 / -1; }
.product { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; }
.product-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.product-name { font-weight: 650; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { color: var(--accent); font-weight: 800; }
.price.big { font-size: 24px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.add-btn { width: 34px; height: 34px; border-radius: 11px; border: 0; display: grid; place-items: center; color: #04110a; background: linear-gradient(135deg, var(--accent), var(--accent-2)); cursor: pointer; }
.add-btn:disabled { opacity: .35; }
.add-btn svg { width: 18px; height: 18px; }
.thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: rgba(0,0,0,.2); }
.thumb.small { width: 48px; height: 48px; border-radius: 12px; flex: none; aspect-ratio: auto; }
.cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); display: block; }
.placeholder { display: grid; place-items: center; font-size: 34px; font-weight: 800; color: rgba(255,255,255,.55);
  background: radial-gradient(circle at 30% 20%, rgba(0,230,118,.35), transparent 60%), radial-gradient(circle at 80% 90%, rgba(0,229,255,.28), transparent 55%), rgba(255,255,255,.04); }
.thumb.small.placeholder { font-size: 18px; }
.cart-btn { position: relative; }
.cart-btn .count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.chip.ok { color: var(--accent); }
.chip.warn { color: var(--danger); }
.link { display: inline-block; margin-top: 12px; color: var(--accent-2); font-weight: 600; }
.qty { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 16px; }
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--stroke); background: var(--glass-strong); font-size: 20px; font-weight: 700; display: grid; place-items: center; cursor: pointer; }
.stepper.small { gap: 8px; }
.stepper.small button { width: 30px; height: 30px; font-size: 16px; }
.stepper.small svg { width: 15px; height: 15px; color: var(--danger); }
.cart-row { align-items: center; }
.cart-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.gap { height: 12px; }
.success-icon { width: 64px; height: 64px; margin: 4px auto 10px; border-radius: 50%; display: grid; place-items: center; color: #04110a; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 30px rgba(0,230,160,.35); }
.success-icon svg { width: 30px; height: 30px; }
a.btn { text-decoration: none; }
.order-head { display: flex; justify-content: space-between; align-items: center; }
.status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--stroke); }
.status.s-pending { color: var(--gold); }
.status.s-confirmed, .status.s-shipped { color: var(--accent-2); }
.status.s-delivered { color: var(--accent); }
.status.s-cancelled, .status.s-refunded { color: var(--danger); }
.tab span:last-child { font-size: 10.5px; }

.count-line { margin: -4px 2px 0; }

/* Bottom sheet (brand list) */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: min(560px, 100%); max-height: 80vh; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0; background: #0f1623; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.sheet-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); text-align: left; font-size: 15px; cursor: pointer; }
.sheet-row:hover, .sheet-row.active { background: rgba(0, 230, 118, .1); }
.sheet-row.active span:first-child { color: var(--accent); font-weight: 700; }

/* ── Flavor families, composition ───────────────────────── */
h1, .home-h2, .stat b, .brand, .family-tile b { font-family: Unbounded, Manrope, sans-serif; letter-spacing: -.01em; }
.dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; }
.inline .dot { margin-right: 4px; }
.chip-btn .dot { margin-right: 6px; }
.bar { display: flex; height: 7px; margin-top: 10px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .06); }
.bar span { box-shadow: inset -1px 0 0 rgba(10, 14, 23, .75); }
.bar.big { height: 14px; margin: 0 0 6px; }
.item-flavors { display: none; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.item-flavors span { padding: 3px 9px; border-radius: 999px; background: var(--glass-strong); color: #d5dce6; font-size: 12.5px; font-weight: 600; }
.row.ing { justify-content: flex-start; }
.ing-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.tag { padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.tag.stash { color: var(--accent); background: rgba(0, 230, 118, .14); }
.tag.market { color: #7CCBF2; background: rgba(34, 158, 217, .16); }
.have-all { color: var(--accent); margin-top: 8px; }
.mix .segmented { margin-bottom: 8px; }
.mix .btn { margin-top: 12px; }
.recipe-layout { display: flex; flex-direction: column; gap: 12px; }
/* One column: «Замешать» right after the composition, comments last */
.recipe-layout > .recipe-main { display: contents; }
.recipe-side { order: 2; }
.comments-card { order: 3; }
.web .hero > h1 { display: none; } /* the site shows the title above the page */

.family-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.family-tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  min-height: 116px; padding: 16px; border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--fam) 40%, transparent);
  background: linear-gradient(150deg, color-mix(in srgb, var(--fam) 24%, transparent), rgba(255, 255, 255, .03));
}
.family-tile b { position: relative; font-size: 19px; }
.family-count { position: relative; color: #c5cdd8; font-size: 13px; }
.family-dot { position: absolute; top: -34px; right: -34px; width: 120px; height: 120px; border-radius: 50%; background: var(--fam); opacity: .35; filter: blur(20px); }
.family-tiles.compact { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.family-tiles.compact::-webkit-scrollbar { display: none; }
.family-tiles.compact .family-tile { flex: 1 0 auto; flex-direction: row; align-items: center; justify-content: center; gap: 8px; min-height: 0; padding: 9px 14px; border-radius: 999px; }
.family-tiles.compact b { font: 700 13.5px Manrope, sans-serif; letter-spacing: 0; }
.family-tiles.compact .family-dot { position: static; width: 10px; height: 10px; border-radius: 3px; opacity: 1; filter: none; }
.family-tiles.compact .family-count { display: none; }
.family-tile.active { border-color: var(--fam); box-shadow: 0 0 0 1px var(--fam), 0 0 22px color-mix(in srgb, var(--fam) 35%, transparent); }

/* ── Site (a browser, not Telegram) ─────────────────────── */
.brand, .topnav, .account, .page-head { display: none; }
.web .topbar { display: flex; align-items: center; gap: 18px; padding: 12px max(16px, calc((100% - 1200px) / 2 + 16px)); }
.web .topbar > .back, .web .topbar > .title, .web .topbar > .top-action { display: none; }
.web .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), #00B8FF); color: #04120B; }
.web .topnav { display: flex; gap: 4px; flex: 1; }
.web .topnav a { padding: 9px 14px; border-radius: 999px; color: #B7C0D3; font-weight: 600; }
.web .topnav a:hover { color: var(--text); }
.web .topnav a.active { color: #5CF2C2; background: rgba(0, 230, 118, .14); }
.web .account { display: flex; margin-left: auto; }
.tg-login { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 14px; background: #229ED9; color: #fff; font-weight: 700; cursor: pointer; }
.account-link { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.account-link .avatar { width: 36px; height: 36px; object-fit: cover; }
.web .page-head { display: flex; align-items: center; gap: 12px; max-width: 1200px; margin: 20px auto 0; padding: 0 16px; }
.web .page-head .title { flex: 1; min-width: 0; padding: 0; text-align: left; font: 700 clamp(20px, 3vw, 28px)/1.2 Unbounded, Manrope, sans-serif; white-space: normal; }
.web.is-home .page-head { display: none; }
.web .view { max-width: 1200px; padding: 16px 16px 0; }
.web .view > :not(.wide):not(:has(> .wide)) { max-width: 760px; margin-inline: auto; }
@media (min-width: 900px) { .web .sheet-wrap { align-items: center; } .web .sheet { border-radius: 20px; } }

.home { display: flex; flex-direction: column; gap: 44px; padding-top: 28px; }
.home-hero h1 { max-width: 900px; margin: 0 0 14px; font-size: clamp(30px, 5vw, 60px); line-height: 1.06; }
.grad { background: linear-gradient(90deg, #00E676, #00D1FF 55%, #B06CFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 640px; margin: 0 0 22px; color: #B7C0D3; font-size: 18px; }
.home-search { display: flex; flex-wrap: wrap; gap: 10px; max-width: 780px; }
.home-search .search { flex: 1 1 320px; height: 58px; border-radius: 18px; font-size: 17px; }
.home-search .btn { width: auto; height: 58px; padding: 0 30px; }
.home-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.home-chips .chip { padding: 7px 12px; font-size: 13.5px; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.stat { flex: 1 1 200px; padding: 18px 20px; border-radius: 20px; }
.stat b { display: block; color: #5CF2C2; font-size: 28px; }
.stat + .stat b { color: #6FD8FF; }
.stat span { color: var(--muted); }
.home-h2 { margin: 0 0 16px; font-size: 24px; }
.home-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.home-head .link { margin: 0; }
.calc-teaser { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding: 28px; border-radius: 26px;
  background: linear-gradient(135deg, rgba(0, 230, 118, .12), rgba(0, 184, 255, .10) 50%, rgba(176, 108, 255, .12)); }
.calc-teaser > div { flex: 1 1 360px; }
.calc-teaser .home-h2 { margin-bottom: 8px; }
.calc-teaser p { margin: 0; color: #C6CEDD; }
.calc-teaser .btn { width: auto; padding: 14px 24px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.feature { padding: 22px; border-radius: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: #B7C0D3; }
.feature.tg { background: rgba(34, 158, 217, .12); border-color: rgba(34, 158, 217, .35); }
.home-footer { padding: 18px 0 8px; border-top: 1px solid var(--stroke); }

@media (min-width: 900px) {
  .web body { padding-bottom: 48px; }
  .web .tabbar { display: none; }
  .web .toast { bottom: 28px; }
  .web .wide .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
  .web .wide .recipe-item { align-items: flex-start; padding: 18px; border-radius: 20px; }
  .web .item-flavors { display: flex; }
  .web .family-tiles:not(.compact) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .web .family-tiles:not(.compact) .family-tile { min-height: 150px; padding: 20px; }
  .web .recipe-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
  .web .recipe-layout > .recipe-main { display: flex; }
  .web .recipe-side { position: sticky; top: 84px; }
  .web .grid-products { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}
@media (max-width: 899px) {
  .web .topnav, .web .account-name, .web .tg-login-text { display: none; }
  .web .page-head { margin-top: 12px; }
  .web .home { gap: 32px; padding-top: 12px; }
}
