:root {
  /* Стиль «тёмный модерн»: плоские тёмные поверхности, один золотой акцент */
  --bg: #0e0d0c;
  --card: #1a1816;
  --card-2: #23201d;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(217, 183, 121, .5);
  --gold: #d9b779;
  --gold-2: #ecd6a8;
  --gold-grad: #d9b779;
  --ivory: #f3eee6;
  --text: #f2eee8;
  --muted: #8c857b;
  --ink: #1a140b;

  --display: 'Unbounded', 'Manrope', -apple-system, sans-serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

  --safe-t: env(safe-area-inset-top, 0px);
  /* Telegram (Bot API 8.0+) отдаёт отступы через свои CSS-переменные */
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --tab-h: 64px;
  --tab-gap: max(12px, calc(var(--safe-b) - 6px));
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}
html.is-locked, html.is-locked body { overflow: hidden; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 45% at 50% -10%, rgba(217, 183, 121, .08), transparent 60%);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
svg { display: block; }

.statusbar-shade {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--safe-t);
  background: var(--bg);
  z-index: 30;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: calc(var(--tab-h) + var(--tab-gap) + 28px);
}

.view { display: none; }
.view.is-active { display: block; animation: viewIn .5s var(--ease); }
@keyframes viewIn { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }

/* ---------- Типографика ---------- */
.top { padding: calc(var(--safe-t) + 30px) 20px 8px; }
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold);
}
.title {
  margin-top: 6px;
  font: 500 30px/1.1 var(--display);
  letter-spacing: -.01em;
  color: var(--text);
}
@keyframes shine { from { background-position: 100% 0; } to { background-position: -160% 0; } }
.subtitle { margin-top: 8px; font-size: 13px; color: var(--muted); }

.brand {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.name { margin-top: 4px; font: 500 13.5px/1.3 var(--display); color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.section-title {
  margin: 30px 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Поиск и фильтры ---------- */
.search { position: relative; display: block; margin-top: 18px; }
.search svg {
  position: absolute; left: 15px; top: 50%;
  width: 18px; height: 18px;
  transform: translateY(-50%);
  fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round;
}
.search input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  font: 16px var(--sans); /* 16px — чтобы Safari не приближал страницу */
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .25s, background .25s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--line-strong); background: rgba(255, 255, 255, .06); }

.chips {
  position: sticky;
  top: var(--safe-t);
  z-index: 5;
  display: flex;
  gap: 8px;
  padding: 12px 20px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--card);
  color: #d8d2c8;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .3s, color .3s, border-color .3s, transform .15s;
}
.chip:active { transform: scale(.94); }
.chip.is-on { background: var(--gold-grad); border-color: transparent; color: var(--ink); font-weight: 600; }

/* ---------- Сетка карточек ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 2px 16px 0;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
  opacity: 0;
  animation: rise .7s var(--ease) forwards;
  animation-delay: calc(var(--i) * 65ms);
  transition: transform .25s var(--ease);
}
.card:active { transform: scale(.965); }
/* Окно фото у всех карточек одного размера, картинка вписывается внутрь */
.card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: radial-gradient(circle at 50% 62%, var(--tint), transparent 68%);
}
.card-media .bottle,
.card-media .photo {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}
.card-media .bottle { width: 56%; height: auto; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .5)); }
.card-media .photo { width: 78%; height: 84%; object-fit: contain; }

/* Плашки нот: главная — золотая со звездой, остальные — контурные */
.pills { display: flex; flex-wrap: wrap; gap: 5px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  color: #d8d2c8;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.pill.main { border-color: transparent; background: var(--gold); color: var(--ink); font-weight: 600; }
.pill .ico { width: 12px; height: 12px; }
.card-body .pills { margin-top: 10px; max-height: 53px; overflow: hidden; }
.sheet .pills { gap: 7px; }
.sheet .pill { height: 34px; padding: 0 14px; font-size: 14px; }
.sheet .pill.main { height: 40px; padding: 0 16px; font-size: 15px; }
.sheet .pill.main .ico { width: 15px; height: 15px; }
.sheet .pill { opacity: 0; }
.sheet.is-open .pill { animation: noteIn .5s var(--ease) forwards; animation-delay: calc(var(--n) * 50ms + 350ms); }
.notes-block { margin-top: 18px; }
.main-note-label { margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.card-body { flex: 1; padding: 12px 12px 14px; }

@keyframes rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }

.empty-line { padding: 40px 24px; text-align: center; color: var(--muted); font: 500 15px var(--sans); }

/* ---------- Сердечко ---------- */
/* Кружок 28px, но зона нажатия 40px — чтобы легко попадать пальцем */
.heart {
  position: absolute;
  top: 8px; right: 8px;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.heart::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: rgba(14, 13, 12, .38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.heart svg {
  position: relative;
  width: 15px; height: 15px;
  fill: transparent;
  stroke: var(--text);
  stroke-width: 1.6;
  transition: fill .3s, stroke .3s;
}
.heart.is-on svg { fill: var(--gold); stroke: var(--gold); }
.pop svg { animation: pop .5s var(--ease); }
@keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(1.4); } 100% { transform: scale(1); } }

.spark {
  position: fixed;
  z-index: 100;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 8px var(--gold);
  pointer-events: none;
  animation: spark .75s var(--ease) forwards;
}
@keyframes spark {
  from { transform: rotate(var(--a)) translateY(0) scale(1); opacity: 1; }
  to { transform: rotate(var(--a)) translateY(var(--r)) scale(0); opacity: 0; }
}

/* ---------- Нижнее меню ---------- */
.tabbar {
  position: fixed;
  left: 12px; right: 12px;
  bottom: var(--tab-gap);
  z-index: 30;
  max-width: 480px;
  height: var(--tab-h);
  margin: 0 auto;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(24, 20, 15, .78);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
}
.tab-indicator {
  position: absolute;
  top: 6px; bottom: 6px; left: 6px;
  width: calc((100% - 12px) / 3);
  border-radius: 18px;
  background: rgba(201, 169, 110, .14);
  transition: transform .5s var(--ease);
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  transition: color .3s;
}
.tab svg {
  width: 23px; height: 23px;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round;
  transition: transform .4s var(--ease);
}
.tab.is-active { color: var(--gold-2); }
.tab.is-active svg { transform: translateY(-1px) scale(1.06); }
.tab:active svg { transform: scale(.88); }
.badge {
  position: absolute;
  top: 4px; left: calc(50% + 6px);
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--gold-grad);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.badge.pop { animation: pop .5s var(--ease); }

/* ---------- Карточка аромата (шторка) ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s;
}
.backdrop.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  max-width: 640px;
  height: 92vh;
  height: calc(100dvh - var(--safe-t) - 22px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, #1b1712, #0d0c0a 45%);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
  transform: translateY(105%);
  transition: transform .55s var(--ease);
  will-change: transform;
  overflow: hidden;
}
.sheet.is-open { transform: translateY(0); }
.sheet.is-dragging { transition: none; }
.sheet-grip {
  position: absolute;
  top: 8px; left: 50%;
  z-index: 3;
  width: 40px; height: 5px;
  margin-left: -20px;
  border-radius: 3px;
  background: rgba(150, 140, 125, .55);
}
.sheet-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 3;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(11, 10, 9, .55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.sheet-close svg { width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; }
.sheet-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.sheet-hero {
  position: relative;
  height: 300px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 58%, var(--tint), transparent 66%);
}
.sheet-media { position: relative; width: 170px; }
.sheet-media .bottle { width: 100%; height: auto; filter: drop-shadow(0 22px 28px rgba(0, 0, 0, .6)); }
.sheet-media .photo { width: 210px; height: 250px; margin-left: -20px; object-fit: contain; filter: drop-shadow(0 22px 28px rgba(0, 0, 0, .6)); }
.sheet.is-open .sheet-media { animation: heroIn 1s var(--ease) both, float 5s ease-in-out 1s infinite; }
@keyframes heroIn { from { opacity: 0; transform: translateY(40px) scale(.85) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { transform: translateY(-9px); } }

.sheet-info { padding: 0 22px 8px; }
.sheet.is-open .sheet-info > *,
.sheet.is-open #sheetExtra > * { animation: rise .7s var(--ease) both; }
.sheet-info > :nth-child(1) { animation-delay: .15s !important; }
.sheet-info > :nth-child(2) { animation-delay: .2s !important; }
.sheet-info > :nth-child(3) { animation-delay: .25s !important; }
.sheet-info > :nth-child(4) { animation-delay: .3s !important; }
.sheet-info > :nth-child(5) { animation-delay: .35s !important; }
.sheet-info > :nth-child(n+6) { animation-delay: .4s !important; }

.sheet-name { margin-top: 6px; font: 500 23px/1.2 var(--display); }
.sheet-meta { margin-top: 8px; color: var(--muted); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(201, 169, 110, .12);
  color: var(--gold-2);
  font-size: 12px;
}
.tag.mood { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.desc { margin-top: 18px; font: 400 16px/1.55 var(--sans); color: #e6dccb; }

.pyramid { position: relative; }
.tier { position: relative; padding: 0 0 18px 26px; }
.tier::before {
  content: "";
  position: absolute;
  left: 4px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 169, 110, .15);
}
.tier::after {
  content: "";
  position: absolute;
  left: 8px; top: 20px; bottom: 2px;
  width: 1px;
  background: linear-gradient(var(--line-strong), transparent);
}
.tier:last-child::after { display: none; }
.tier-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.tier-label { font-weight: 600; font-size: 14px; }
.tier-hint { color: var(--muted); font-size: 12px; }
.note {
  display: inline-block;
  margin: 0 6px 7px 0;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
}
.sheet.is-open .note {
  animation: noteIn .55s var(--ease) forwards;
  animation-delay: calc(var(--d) * 220ms + var(--n) * 55ms + 450ms);
}
@keyframes noteIn { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }

.facts { display: grid; gap: 10px; margin-top: 10px; }
.fact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.fact b { color: var(--text); font-weight: 600; }
a.fact b { color: var(--gold-2); }

.wish-extra { padding: 0 22px 24px; }
.dream {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 15px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.dream input { position: absolute; opacity: 0; pointer-events: none; }
.dream-box {
  flex: none;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 15px;
  transition: background .3s, color .3s, transform .4s var(--ease);
}
.dream input:checked + .dream-box { background: var(--gold-grad); color: var(--ink); border-color: transparent; transform: rotate(72deg) scale(1.05); }
.wish-extra textarea {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font: 16px/1.4 var(--sans);
  resize: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.wish-extra textarea:focus { border-color: var(--line-strong); }
.wish-extra textarea::placeholder { color: var(--muted); }

.sheet-bar {
  padding: 12px 20px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: rgba(13, 12, 10, .94);
}

/* ---------- Кнопки ---------- */
.btn-gold, .btn-wish {
  position: relative;
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--gold-grad);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  transition: transform .2s var(--ease), background .3s, color .3s;
}
.btn-gold::after, .btn-wish::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  display: none;
}
@keyframes sweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn-gold:active, .btn-wish:active { transform: scale(.97); }
.btn-gold:disabled { opacity: .4; }
.btn-wish svg { width: 21px; height: 21px; fill: transparent; stroke: currentColor; stroke-width: 1.8; }
.btn-wish.is-on { background: transparent; color: var(--gold-2); box-shadow: inset 0 0 0 1px var(--gold); }
.btn-wish.is-on svg { fill: var(--gold); stroke: var(--gold); }
.btn-wish.is-on::after { display: none; }
.btn-ghost {
  display: block;
  width: 100%;
  height: 50px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}
.btn-ghost:active { background: rgba(255, 255, 255, .04); }

/* ---------- Подбор ---------- */
.quiz { padding: calc(var(--safe-t) + 30px) 20px 0; min-height: 70vh; }
.progress { display: flex; gap: 6px; margin-bottom: 28px; }
.progress i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.progress i.is-done { background: var(--gold); }
.progress i.is-now { background: linear-gradient(90deg, var(--gold) 50%, var(--line) 50%); background-size: 200% 100%; animation: fillBar .6s var(--ease) forwards; }
@keyframes fillBar { from { background-position: 100% 0; } to { background-position: 0 0; } }
.quiz-q { margin: 10px 0 6px; font: 500 23px/1.25 var(--display); }
.quiz-hint { color: var(--muted); font-size: 14px; }
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 24px 0 20px; }
.opt {
  height: 96px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .03);
  text-align: left;
  opacity: 0;
  animation: rise .6s var(--ease) forwards;
  animation-delay: calc(var(--i) * 60ms + 100ms);
  transition: transform .2s var(--ease), border-color .3s, background .3s;
}
.opt:active { transform: scale(.96); }
.opt-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(201, 169, 110, .1); color: var(--gold-2); }
.opt-icon .ico { width: 22px; height: 22px; }
.opt.is-on .opt-icon { background: var(--gold-grad); color: var(--ink); }
.opt .label { font-size: 15px; font-weight: 600; }
.opt.is-on { border-color: var(--gold); background: rgba(201, 169, 110, .14); transform: scale(1.02); }

.loader { display: grid; place-items: center; gap: 22px; padding-top: 18vh; text-align: center; }
.loader-ring {
  width: 70px; height: 70px;
  border: 1.5px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader p { font: 500 16px var(--sans); letter-spacing: .02em; color: var(--gold-2); }

.results { display: grid; gap: 12px; margin: 22px 0 6px; }
.result { animation: reveal .9s var(--ease) both !important; animation-delay: calc(var(--i) * 260ms + 100ms) !important; }
@keyframes reveal {
  from { opacity: 0; transform: translateY(26px) scale(.93); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
.result::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -50%;
  width: 35%;
  background: linear-gradient(100deg, transparent, rgba(234, 214, 166, .25), transparent);
  transform: skewX(-20deg);
  animation: once 1.4s ease-in-out forwards;
  animation-delay: calc(var(--i) * 260ms + 700ms);
  pointer-events: none;
}
@keyframes once { to { left: 130%; } }
.rank { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.rank .ico { width: 13px; height: 13px; }

/* ---------- Строки (Хочу, Подбор) ---------- */
.wish-list { padding: 10px 16px 0; }
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 60px 10px 10px;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
  opacity: 0;
  animation: rise .6s var(--ease) forwards;
  animation-delay: calc(var(--i) * 70ms);
}
.row + .row { margin-top: 10px; }
.results .row + .row { margin-top: 0; }
.static .row { animation: none; opacity: 1; }
.row:active { background: rgba(255, 255, 255, .06); }
.row-media {
  flex: none;
  width: 74px; height: 86px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 60%, var(--tint), transparent 72%);
}
.row-media .bottle { width: 50px; height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.row-media .photo { width: 66px; height: 80px; object-fit: contain; }
.row-text { min-width: 0; }
.row-note { margin-top: 6px; color: var(--muted); font: 400 13px/1.4 var(--sans); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .heart { top: 50%; right: 8px; margin-top: -20px; }
.row .heart::before { background: var(--card-2); }

.wish-actions { margin-top: 22px; }
.wish-hint { margin-top: 12px; text-align: center; color: var(--muted); font-size: 13px; }

.empty {
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 12vh 30px 0;
  text-align: center;
}
.empty svg { width: 64px; height: 64px; fill: none; stroke: var(--gold); stroke-width: 1.1; animation: beat 2.4s ease-in-out infinite; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(.98); } 45% { transform: scale(1.06); } }
.empty h3 { font: 500 19px var(--display); }
.empty p { color: var(--muted); font-size: 14px; max-width: 260px; }
.empty .btn-ghost { width: auto; padding: 0 22px; color: var(--gold-2); }

/* ---------- Тост ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-gap) + var(--tab-h) + 14px);
  z-index: 60;
  max-width: calc(100% - 40px);
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(30, 25, 18, .92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .35s, transform .45s var(--ease);
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
html.is-locked .toast { bottom: calc(var(--safe-b) + 96px); }

/* ---------- Заставка ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity .8s var(--ease), visibility .8s;
}
.splash.is-out { opacity: 0; visibility: hidden; }
.splash-art { position: relative; }
.splash-art svg { width: 104px; height: 147px; overflow: visible; }
.splash .draw {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
  stroke-opacity: .75;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.5s var(--ease) .1s forwards;
}
.splash .fill { opacity: 0; animation: fadeIn 1s ease .9s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
.splash-sub { margin-top: 12px; font: 500 17px var(--sans); color: var(--muted); opacity: 0; animation: rise .9s var(--ease) 1.3s forwards; }
.splash-name {
  margin-top: 34px;
  padding: 0 24px;
  text-align: center;
  font: 500 26px/1.25 var(--display);
  color: var(--gold);
  opacity: 0;
  animation: rise 1s var(--ease) 1s forwards;
}

.mist-box { position: absolute; inset: 0; pointer-events: none; }
.mist {
  position: absolute;
  left: 50%; top: 30%;
  width: var(--s); height: var(--s);
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 6px var(--gold);
  opacity: 0;
  animation: mist var(--dur) ease-out var(--d) infinite;
}
@keyframes mist {
  0% { opacity: 0; transform: translate(0, 0) scale(.5); }
  20% { opacity: .9; }
  100% { opacity: 0; transform: translate(var(--x), -150px) scale(1.2); }
}
.sheet-hero .mist { top: 45%; }

/* ---------- Фото на светлой «витрине» ---------- */
.is-photo { background: var(--ivory) !important; }
.is-photo .photo { mix-blend-mode: multiply; filter: none; }
.card-media.is-photo { margin: 8px 8px 0; border-radius: 13px; }
.row-media.is-photo .photo { width: 60px; height: 74px; }

.sheet-hero.is-photo { display: block; height: 360px; }
.gallery {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%;
  display: grid;
  place-items: center;
  padding: 34px 0 30px;
  scroll-snap-align: center;
}
.slide { min-height: 0; overflow: hidden; }
.slide .photo { width: 80%; height: 296px; object-fit: contain; }
.sheet.is-open .slide:first-child .photo { animation: heroIn 1s var(--ease) both; }
.dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(26, 20, 11, .22); transition: width .35s var(--ease), background .3s; }
.dots i.is-on { width: 18px; background: #8a6a36; }

.rating { margin-top: 8px; color: var(--muted); font-size: 13px; }
.rating span { display: inline-flex; align-items: center; gap: 4px; color: var(--gold-2); font-weight: 600; }
.rating .ico { width: 14px; height: 14px; margin-top: -1px; }

/* ---------- Иконки ---------- */
.ico {
  flex: none;
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico-fill { fill: currentColor; }
.chip, .tag { display: inline-flex; align-items: center; gap: 6px; }
.chip .ico { width: 16px; height: 16px; }
.tag .ico { width: 14px; height: 14px; }
.dream-box .ico { width: 15px; height: 15px; }
.btn-gold .ico { width: 19px; height: 19px; stroke-width: 1.8; }
.about { display: none; margin-top: 12px; color: #cfc6b8; font-size: 14.5px; line-height: 1.6; }
.about.is-open { display: block; animation: rise .5s var(--ease); }
.about p + p { margin-top: 10px; }
.more { margin-top: 8px; padding: 6px 0; color: var(--gold); font-size: 14px; font-weight: 600; }

.facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact-tile { padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; }
.fact-tile span { display: block; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.fact-tile b { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; line-height: 1.3; }

.offers { border-radius: 16px; overflow: hidden; background: var(--card); }
.offer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; font-size: 14px; }
.offer + .offer { border-top: 1px solid var(--line); }
.offer-l { min-width: 0; }
.offer-l span { display: block; font-weight: 500; }
.offer-l small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.offer-l small:empty { display: none; }
.offer-r { display: flex; align-items: center; gap: 8px; flex: none; text-align: right; }
.offer-r > span { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.offer-r i { padding: 2px 6px; border-radius: 6px; background: rgba(217, 183, 121, .14); color: var(--gold); font-size: 12px; font-style: normal; font-weight: 600; }
.offer-r s { color: var(--muted); font-size: 12px; }
.offer-r b { color: var(--text); font-size: 15px; white-space: nowrap; }
.offer.is-out { opacity: .45; }

.rating .hit { color: var(--gold); font-weight: 600; }

.grid-more { height: 1px; }

/* Подробности аромата догрузились — перерисовываем без повторной анимации */
#sheetContent.is-static *:not(.mist) { animation: none !important; }
#sheetContent.is-static .pill,
#sheetContent.is-static .note { opacity: 1; }

/* Цена в карточке */
.price { margin-top: 6px; color: var(--gold-2); font-size: 13px; font-weight: 600; }
.price span { color: var(--muted); font-weight: 500; }

/* Кнопка «Фильтры» в ряду быстрых фильтров */
.chip-filters { background: var(--card-2); }
.chip-filters b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ink); color: var(--gold); font-size: 11px; line-height: 18px; text-align: center; }

/* ---------- Шторка фильтров ---------- */
.fsheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  max-width: 640px;
  max-height: calc(100dvh - var(--safe-t) - 40px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-radius: 24px 24px 0 0;
  background: #141311;
  transform: translateY(105%);
  transition: transform .5s var(--ease);
}
.fsheet.is-open { transform: none; }
.fsheet-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 20px 20px 8px; }
.fsheet-head h3 { flex: 1; font: 500 20px var(--display); }
.fsheet-head .sheet-close { position: static; }
.fsheet-reset { color: var(--gold); font-size: 14px; font-weight: 600; padding: 8px 4px; }
.fsheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 16px; }
.fsec h4 { margin: 18px 0 10px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.fopts { display: flex; flex-wrap: wrap; gap: 8px; }
.fopt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--card);
  color: #d8d2c8;
  font-size: 14px;
  font-weight: 500;
  transition: background .25s, color .25s, transform .15s;
}
.fopt:active { transform: scale(.95); }
.fopt .ico { width: 16px; height: 16px; }
.fopt i { color: var(--muted); font-size: 12px; font-style: normal; }
.fopt.is-on { background: var(--gold); color: var(--ink); }
.fopt.is-on i { color: rgba(26, 20, 11, .6); }
.fopt.fmore { background: transparent; border: 1px dashed rgba(255, 255, 255, .18); color: var(--muted); }
.empty-line .btn-ghost { width: auto; margin: 14px auto 0; padding: 0 22px; color: var(--gold-2); }
.link-out {
  display: block;
  width: 100%;
  height: 50px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--gold-2);
  font-size: 15px;
  font-weight: 600;
}
.link-out:active { background: rgba(255, 255, 255, .04); }

/* ---------- Экран «только в Telegram» ---------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
  background: var(--bg);
}
.gate-icon { width: 64px; height: 64px; margin-bottom: 8px; fill: none; stroke: var(--gold); stroke-width: 1; }
.gate-text { max-width: 290px; color: var(--muted); }
.gate-actions { width: 100%; max-width: 300px; margin-top: 16px; }
a.btn-gold { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .mist { display: none; }
}

/* Пирамида нот рядами и дата цен в заголовке */
.tier-row + .tier-row { margin-top: 14px; }
.section-title small { color: var(--muted); font-weight: 500; letter-spacing: .08em; text-transform: none; font-size: 11px; }

/* Сердечки на заставке */
.hearts { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hearts i {
  position: absolute;
  left: var(--x); bottom: -40px;
  width: var(--s); height: var(--s);
  opacity: 0;
  animation: heartUp var(--dur) ease-in var(--d) infinite;
}
.hearts svg { width: 100%; height: 100%; stroke: none; }
.hearts .h-gold svg { fill: var(--gold); }
.hearts .h-pink svg { fill: #e58fa6; }
@keyframes heartUp {
  0% { opacity: 0; transform: translate(0, 0) scale(.6) rotate(-10deg); }
  15% { opacity: .85; }
  100% { opacity: 0; transform: translate(var(--sway), -105vh) scale(1.1) rotate(12deg); }
}
.splash-art, .splash-name, .splash-sub { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .hearts { display: none; } }
