/* YESME Shop — витрина-миры. Идентичность посадочной go.x4publishing.com/uhod:
   Unbounded + Onest, тёмные миры (ночь / вода / сияние), флаконы на прозрачном фоне. */

:root {
  --ink: #FFFFFF;
  --ink-soft: rgba(255, 255, 255, 0.78);
  --ink-faint: rgba(255, 255, 255, 0.52);
  --night-1: #060714;
  --night-2: #101636;
  --water-1: #03191F;
  --water-2: #0A4A52;
  --glow-1: #16060F;
  --glow-2: #58122E;
  --wine: #4E1421;
  --accent-night: #7FA3FF;
  --accent-water: #4FD6C4;
  --accent-glow: #FF8FB4;
  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Onest", -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 58px;
  --z-header: 30;
  --z-cartbar: 40;
  --z-toast: 50;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--night-1);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; }

/* ── Шапка ─────────────────────────────────────────── */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  padding-top: var(--tg-content-safe-area-inset-top, 0px);
  box-sizing: content-box;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 18px 0 20px;
  background: linear-gradient(180deg, rgba(4, 4, 12, 0.72), rgba(4, 4, 12, 0));
  pointer-events: none;
}

.site-header > * { pointer-events: auto; }

.brand-button {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 0;
  background: none;
  padding: 6px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(10, 10, 20, 0.35);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.cart-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(10, 10, 20, 0.35);
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--ink);
  color: #16060F;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* ── Витрина: миры ─────────────────────────────────── */

.worlds {
  height: 100vh;
  height: 100svh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.world {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + var(--tg-content-safe-area-inset-top, 0px) + 6px) 22px max(30px, env(safe-area-inset-bottom, 0px) + 18px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  text-align: center;
}

/* фоны-миры */
.world--night {
  background:
    radial-gradient(120% 60% at 78% 6%, rgba(214, 224, 255, 0.30), transparent 46%),
    radial-gradient(90% 70% at 50% 110%, #23306B 0%, transparent 60%),
    linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 100%);
}
.world--night::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 700' width='400' height='700'%3E%3Cg fill='white'%3E%3Ccircle cx='30' cy='48' r='1.1' opacity='.9'/%3E%3Ccircle cx='125' cy='118' r='.8' opacity='.6'/%3E%3Ccircle cx='215' cy='60' r='1.3' opacity='.95'/%3E%3Ccircle cx='330' cy='150' r='.9' opacity='.7'/%3E%3Ccircle cx='68' cy='226' r='.8' opacity='.55'/%3E%3Ccircle cx='293' cy='262' r='1.2' opacity='.85'/%3E%3Ccircle cx='168' cy='320' r='.7' opacity='.5'/%3E%3Ccircle cx='372' cy='368' r='1' opacity='.75'/%3E%3Ccircle cx='40' cy='420' r='1.2' opacity='.85'/%3E%3Ccircle cx='232' cy='458' r='.8' opacity='.6'/%3E%3Ccircle cx='118' cy='540' r='1' opacity='.8'/%3E%3Ccircle cx='318' cy='584' r='.7' opacity='.5'/%3E%3Ccircle cx='200' cy='648' r='1.1' opacity='.9'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 400px 700px;
  background-repeat: repeat;
  opacity: 0.9;
}

.world--water {
  background:
    radial-gradient(110% 55% at 50% -8%, rgba(150, 235, 226, 0.28), transparent 55%),
    radial-gradient(100% 80% at 50% 118%, #063A40 0%, transparent 62%),
    linear-gradient(180deg, var(--water-1) 0%, var(--water-2) 100%);
}
.world--water::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(112deg, transparent 0 34px, rgba(159, 244, 232, 0.05) 34px 44px, transparent 44px 92px),
    repeating-linear-gradient(68deg, transparent 0 46px, rgba(159, 244, 232, 0.04) 46px 58px, transparent 58px 120px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.95), rgba(0,0,0,.25) 62%, transparent);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.95), rgba(0,0,0,.25) 62%, transparent);
}

.world--glow {
  background:
    radial-gradient(95% 52% at 50% -6%, rgba(255, 176, 205, 0.34), transparent 55%),
    radial-gradient(110% 85% at 50% 120%, #6E1837 0%, transparent 64%),
    linear-gradient(180deg, var(--glow-1) 0%, var(--glow-2) 100%);
}
.world--glow::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='138' height='120' viewBox='0 0 138 120'%3E%3Cg fill='none' stroke='%23FFB0CD' stroke-opacity='.10'%3E%3Cpath d='M34.5 0 69 20v40L34.5 80 0 60V20zM103.5 0 138 20v40l-34.5 20L69 60V20z'/%3E%3Cpath d='M34.5 80 69 100v40M69 100l34.5-20'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 138px 120px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, rgba(0,0,0,.9), transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 40%, rgba(0,0,0,.9), transparent 78%);
}

/* содержимое мира */
.world__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 420px;
  flex: 1;
  min-height: 0;
}

.world__media {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
}

/* объём флакона: ореол за спиной (::before) и тень-пьедестал под донышком (::after) */
.world__media::before,
.world__media::after {
  content: "";
  position: absolute;
  left: 50%;
  pointer-events: none;
}

.world__media::before {
  bottom: 2svh;
  width: clamp(220px, 36svh, 360px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.08), transparent 72%);
}

.world--night .world__media::before { background: radial-gradient(closest-side, rgba(127, 163, 255, 0.16), transparent 72%); }
.world--water .world__media::before { background: radial-gradient(closest-side, rgba(79, 214, 196, 0.15), transparent 72%); }
.world--glow .world__media::before { background: radial-gradient(closest-side, rgba(255, 143, 180, 0.17), transparent 72%); }

.world__media::after {
  bottom: -11px;
  width: clamp(96px, 15svh, 150px);
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 72%);
  animation: jar-pedestal-breath 7s ease-in-out infinite;
}

.world__jar {
  position: relative;
  z-index: 1;
  height: 100%;
  max-height: 44svh;
  width: auto;
  max-width: 62%;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)) drop-shadow(0 24px 32px rgba(0, 0, 0, 0.5));
  animation: jar-breath 7s ease-in-out infinite;
}

.world--night .world__jar { filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)) drop-shadow(0 24px 32px rgba(0,0,0,.55)) drop-shadow(0 0 46px rgba(127, 163, 255, .16)); }
.world--water .world__jar { filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)) drop-shadow(0 24px 32px rgba(0,0,0,.55)) drop-shadow(0 0 46px rgba(79, 214, 196, .16)); }
.world--glow .world__jar { filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)) drop-shadow(0 24px 32px rgba(0,0,0,.55)) drop-shadow(0 0 46px rgba(255, 143, 180, .2)); }

/* дыхание: анимируются только transform/opacity, filter статичен */
@keyframes jar-breath {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes jar-pedestal-breath {
  0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 1; }
  50% { transform: translateX(-50%) scaleX(0.93); opacity: 0.7; }
}

.world__badge {
  margin: 16px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}
.world--night .world__badge { color: var(--accent-night); }
.world--water .world__badge { color: var(--accent-water); }
.world--glow .world__badge { color: var(--accent-glow); }

.world__title {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 5.6vw, 24px);
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.world__benefit {
  margin: 10px 0 0;
  max-width: 34ch;
  font-size: 15px;
  font-weight: 300;
  color: var(--ink-soft);
}

.world__cta {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 18px;
}

.buy-button {
  flex: 1;
  min-height: 56px;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: #14060C;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.buy-button:active { transform: scale(0.97); }

.detail-link {
  border: 0;
  background: none;
  padding: 10px 2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  white-space: nowrap;
}

.world__hint {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--ink-faint);
  font-size: 12px;
  animation: hint-float 2.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.world__hint svg { display: block; }

@keyframes hint-float {
  0%, 100% { transform: translateY(0); opacity: 0.75; }
  50% { transform: translateY(5px); opacity: 1; }
}

/* точки-прогресс витрины */
.world-dots {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-header);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.world-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: background 0.3s, height 0.3s;
}
.world-dots span.is-active { background: var(--ink); height: 16px; border-radius: 3px; }

/* ── Экран «Скоро»: кремы вокруг глаз ──────────────── */

.world--soon {
  justify-content: center;
  background:
    radial-gradient(110% 60% at 50% -10%, rgba(160, 150, 255, 0.16), transparent 55%),
    linear-gradient(180deg, #0B0912 0%, #191227 100%);
}

.world__inner--soon { flex: none; justify-content: center; }

.soon-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-top: 24px;
}

.soon-card {
  padding: 18px 14px 16px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  text-align: center;
}

.soon-card__jar {
  width: 44px;
  height: 96px;
  margin: 0 auto 12px;
  border-radius: 10px 10px 12px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
}

.soon-card__photo {
  width: 100%;
  max-width: 128px;
  border-radius: 12px;
  margin: 0 auto 12px;
  display: block;
  /* фото 900×1200: резерв высоты до загрузки */
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.soon-card__name { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.soon-card__note { margin: 5px 0 0; font-size: 12px; color: var(--ink-faint); }

.soon-follow { margin-top: 20px; }

/* ── Меню-каталог ──────────────────────────────────── */

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-cartbar);
  overflow-y: auto;
  padding: calc(14px + var(--tg-content-safe-area-inset-top, 0px)) 18px max(24px, env(safe-area-inset-bottom, 0px));
  background: rgba(7, 6, 15, 0.99);
}

body.menu-open { overflow: hidden; }

.menu-overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.menu-overlay__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.08em;
}

.menu-overlay__close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: none;
  font-size: 16px;
  cursor: pointer;
}

.menu-cat {
  margin: 20px 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.menu-cat__soon {
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.menu-items { display: flex; flex-direction: column; gap: 8px; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  text-align: left;
  cursor: pointer;
}
.menu-item:active { background: rgba(255, 255, 255, 0.14); }

.menu-item__jar { width: 34px; height: 58px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
.menu-item__jar--empty {
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
}

/* span с display:block: внутри <button> блочные p/div недопустимы */
.menu-item__info { display: block; flex: 1; min-width: 0; }
.menu-item__name { display: block; margin: 0; font-size: 14.5px; font-weight: 600; }
.menu-item__price { display: block; margin: 3px 0 0; font-size: 13px; color: var(--ink-faint); }
.menu-item__go { font-size: 17px; color: var(--ink-faint); }

.menu-item--soon { opacity: 0.6; }

/* ── Скидка за подписку ────────────────────────────── */

.promo {
  margin: 0 0 20px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.promo__title { margin: 0; font-size: 15px; font-weight: 700; }
.promo__text { margin: 7px 0 12px; font-size: 13.5px; font-weight: 300; color: var(--ink-soft); }

.promo__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #14060C;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

/* ── Нижняя кнопка корзины (вне Telegram) ──────────── */

.cart-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: max(14px, env(safe-area-inset-bottom, 0px) + 8px);
  z-index: var(--z-cartbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: #14060C;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.cart-bar[hidden] { display: none; }
.tg-active .cart-bar { display: none; }

body.has-cart-bar .world { padding-bottom: calc(max(30px, env(safe-area-inset-bottom, 0px) + 18px) + 68px); }

/* ── Внутренние страницы (товар, оформление) ───────── */

.page {
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + var(--tg-content-safe-area-inset-top, 0px) + 10px) 20px 40px;
  background:
    radial-gradient(120% 50% at 50% -10%, rgba(122, 35, 64, 0.5), transparent 60%),
    linear-gradient(180deg, #14060C 0%, #22090F 100%);
}

.page--night { background: radial-gradient(120% 50% at 50% -10%, rgba(35, 48, 107, .55), transparent 60%), linear-gradient(180deg, var(--night-1), #0D1128); }
.page--water { background: radial-gradient(120% 50% at 50% -10%, rgba(10, 74, 82, .6), transparent 60%), linear-gradient(180deg, var(--water-1), #06272C); }
.page--glow { background: radial-gradient(120% 50% at 50% -10%, rgba(110, 24, 55, .6), transparent 60%), linear-gradient(180deg, var(--glow-1), #33091A); }

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 10px 0;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
}

.detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 440px;
  margin: 0 auto;
}

.detail__jar {
  height: 34svh;
  max-height: 300px;
  width: auto;
  max-width: 60%;
  object-fit: contain;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.5));
}

.detail__badge { margin: 18px 0 0; font-size: 11px; font-weight: 600; letter-spacing: .16em; color: var(--ink-faint); }
.detail__title {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 5.4vw, 23px);
  line-height: 1.24;
  text-wrap: balance;
}
.detail__price { margin: 12px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 21px; }
.detail__description { margin: 14px 0 0; max-width: 46ch; font-size: 15px; font-weight: 300; color: var(--ink-soft); }

.detail__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.detail__tags li {
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
}

.detail .buy-button { width: 100%; margin-top: 22px; flex: none; }

/* ── Оформление ────────────────────────────────────── */

.checkout { max-width: 460px; margin: 0 auto; }

.checkout h1 {
  margin: 4px 0 2px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
}
.checkout__sub { margin: 0 0 18px; font-size: 14px; font-weight: 300; color: var(--ink-faint); }

.order-list { display: flex; flex-direction: column; gap: 10px; }

.order-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.order-item__jar {
  width: 44px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
}

.order-item__info { flex: 1; min-width: 0; }
.order-item__name { margin: 0; font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.order-item__price { margin: 3px 0 0; font-size: 13px; color: var(--ink-faint); }

.quantity {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 3px;
}
.quantity button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: none;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.quantity button:active { background: rgba(255, 255, 255, 0.14); }
.quantity span { min-width: 20px; text-align: center; font-weight: 600; font-size: 14px; }

.checkout__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 18px 0 22px;
  padding: 0 4px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
}
.checkout__total strong { font-size: 20px; font-weight: 600; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}
.field input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  font: inherit;
}
.field input::placeholder { color: rgba(255, 255, 255, 0.45); }
.field input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-color: transparent; }
.field input[aria-invalid="true"] { border-color: #FF7E9C; }

.field-error { margin: 5px 2px 0; min-height: 1em; font-size: 12.5px; color: #FF9DB4; }

.delivery-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.radio-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.radio-card input { position: absolute; opacity: 0; }
.radio-card:has(input:checked) { background: var(--ink); color: #14060C; border-color: var(--ink); }
.radio-card:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

.test-note { margin: 16px 0 0; font-size: 12.5px; font-weight: 300; color: var(--ink-faint); }
.form-global-error { margin: 12px 0 0; font-size: 14px; color: #FF9DB4; }

.checkout .buy-button { width: 100%; margin-top: 16px; flex: none; }

/* пустая корзина */
.empty-state {
  min-height: 60svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.empty-state h1 { font-family: var(--font-display); font-weight: 500; font-size: 20px; margin: 0 0 8px; }
.empty-state p { margin: 0 0 20px; max-width: 32ch; color: var(--ink-soft); font-weight: 300; font-size: 15px; }
.empty-state .buy-button { flex: none; width: auto; padding: 0 28px; }

/* ── Служебное ─────────────────────────────────────── */

.loading {
  min-height: 70svh;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(84px, env(safe-area-inset-bottom, 0px) + 78px);
  transform: translateX(-50%);
  z-index: var(--z-toast);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #14060C;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4);
}

.main-button-spacer { height: 8px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.buy-button:focus-visible, .cart-bar:focus-visible { outline-color: var(--accent-night); }

@media (prefers-reduced-motion: reduce) {
  .worlds { scroll-behavior: auto; }
  .world__hint { animation: none; }
  .world__jar, .world__media::after { animation: none; }
  .buy-button, .world-dots span { transition: none; }
}

/* ── Продающие блоки карточки ──────────────────────── */

.world__rating {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #FFD98A;
}

.detail__rating {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #FFD98A;
}

.detail-section {
  width: 100%;
  margin-top: 30px;
  text-align: left;
  /* scrollIntoView из тизера витрины: фиксированная шапка не перекрывает блок */
  scroll-margin-top: calc(var(--header-h) + 10px);
}

.detail-section__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-align: center;
}

.detail-note {
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 300;
  color: var(--ink-faint);
  text-align: center;
}

/* до/после со шторкой */
.ba {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  /* все BA-кадры 720×894: резерв высоты до загрузки, лента не скачет */
  aspect-ratio: 120 / 149;
  /* pan-y: горизонтальный драг крутит шторку, вертикальный — скролл страницы.
     none заблокировал бы скролл касанием виджета, который занимает пол-экрана. */
  touch-action: pan-y;
}

.ba__after {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba__before-wrap {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
}

.ba__before { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.ba__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(-1px);
  pointer-events: none;
}
.ba__divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.ba__divider span::before {
  content: "↔";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #14060C;
  font-size: 16px;
  font-weight: 700;
}

.ba__tag {
  position: absolute;
  top: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(10, 8, 16, 0.65);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: none;
}
.ba__tag--before { left: 10px; }
.ba__tag--after { right: 10px; }

.ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
}

/* цифры результата */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stat {
  padding: 14px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
}
.stat span {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--ink-soft);
}

/* таймлайн эффекта */
.timeline { display: flex; flex-direction: column; gap: 8px; }
.timeline__row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}
.timeline__when {
  flex: none;
  min-width: 92px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
}
.timeline__what { font-size: 13.5px; color: var(--ink-soft); }

/* чек-лист эффекта */
.effects { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.effects li {
  position: relative;
  padding: 11px 14px 11px 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 13.5px;
}
.effects li::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: #9BE8C5;
}

/* активы */
.actives { display: flex; flex-direction: column; gap: 8px; }
.active-row {
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}
.active-row strong { display: block; font-size: 13.5px; }
.active-row span { display: block; margin-top: 3px; font-size: 12.5px; color: var(--ink-faint); }

.detail-howto { margin: 0; font-size: 14px; font-weight: 300; color: var(--ink-soft); }

/* галерея слайдов */
.gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 0 -20px;
  padding: 0 20px 6px;
}
.gallery__slide {
  flex: 0 0 78%;
  max-width: 300px;
  border-radius: 14px;
  scroll-snap-align: center;
  /* все слайды 720×960; без резерва высоты лента скачет при ленивой загрузке */
  aspect-ratio: 3 / 4;
  object-fit: cover;
}


/* В Telegram нижнюю кнопку рисует сам мессенджер (MainButton) — наш дубль прячем. */
.tg-active .fallback-action { display: none; }

/* ── Тизер до/после на витрине ─────────────────────── */

.ba-teaser {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(10, 8, 16, 0.35);
  cursor: pointer;
}
.ba-teaser:active { background: rgba(255, 255, 255, 0.12); }

.ba-teaser__thumb {
  position: relative;
  display: flex;
  flex: none;
  width: 76px;
  height: 44px;
  border-radius: 999px;
  overflow: hidden;
}
.ba-teaser__thumb img { width: 50%; height: 100%; object-fit: cover; display: block; }
.ba-teaser__thumb::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(-1px);
}

.ba-teaser__label {
  flex: 1;
  text-align: left;
  font-size: 13.5px;
  font-weight: 600;
}
.ba-teaser__go { color: var(--ink-faint); font-size: 16px; }

.menu-item--orders { margin-top: 18px; }
.menu-item__jar--icon { display: grid; place-items: center; font-size: 20px; }

/* ── Вход через Telegram ───────────────────────────── */

.telegram-auth {
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
}

.telegram-auth > strong { display: block; font-size: 16px; }
.telegram-auth p { margin: 6px auto 14px; max-width: 34ch; color: var(--ink-soft); font-size: 13.5px; }
.telegram-login { min-height: 42px; display: flex; justify-content: center; }

.telegram-auth--ready {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
}
.telegram-auth--ready strong,
.telegram-auth--ready span { display: block; }
.telegram-auth--ready span { margin-top: 2px; color: var(--ink-faint); font-size: 13px; }
.telegram-auth--ready button,
.refresh-button,
.orders-error button {
  flex: none;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.checkout-orders-link {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.buy-button:disabled { opacity: 0.55; cursor: wait; }

/* ── История заказов ───────────────────────────────── */

.orders-page { max-width: 560px; margin: 0 auto; }
.orders-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 4px 0 20px; }
.orders-title-row h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
}
.orders-title-row p { margin: 5px 0 0; color: var(--ink-faint); font-size: 13px; }
.orders-loading { padding: 40px 0; color: var(--ink-faint); text-align: center; }
.orders-auth-note { margin: 28px auto; max-width: 34ch; color: var(--ink-soft); text-align: center; }
.orders-list { display: flex; flex-direction: column; gap: 14px; }

.history-order {
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.065);
}
.history-order__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.history-order__head strong { display: block; font-size: 15px; }
.history-order__head time { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 12px; }
.status-badge {
  flex: none;
  max-width: 48%;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}
.status-badge--new { background: rgba(127, 163, 255, 0.18); color: #C9D7FF; }
.status-badge--assembling { background: rgba(79, 214, 196, 0.17); color: #9CF1E5; }
.history-order__items { margin: 15px 0 12px; padding: 13px 0; border-block: 1px solid rgba(255, 255, 255, 0.1); list-style: none; }
.history-order__items li { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; }
.history-order__items li + li { margin-top: 7px; }
.history-order__items span { min-width: 0; color: var(--ink-soft); }
.history-order__items strong { flex: none; font-weight: 500; }
.history-order__meta,
.history-order__total { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; }
.history-order__meta + .history-order__meta,
.history-order__meta + .history-order__total { margin-top: 6px; }
.history-order__meta span { color: var(--ink-faint); }
.history-order__meta strong { text-align: right; font-weight: 500; }
.history-order__discount strong { color: #9CF1E5; }
.history-order__total { padding-top: 6px; font-size: 14px; font-weight: 700; }

.orders-empty,
.orders-error { padding: 42px 8px; text-align: center; }
.orders-empty > span { font-size: 34px; }
.orders-empty h2 { margin: 10px 0 8px; font-family: var(--font-display); font-size: 16px; font-weight: 500; }
.orders-empty p,
.orders-error p { margin: 0 auto 18px; max-width: 34ch; color: var(--ink-soft); font-size: 14px; }
.orders-empty .buy-button { width: auto; padding: 0 24px; flex: none; }

/* ── Подтверждение браузерного заказа ──────────────── */

.order-accepted {
  min-height: 72svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}
.order-accepted__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: rgba(79, 214, 196, 0.2);
  color: #9CF1E5;
  font-size: 30px;
}
.order-accepted h1 { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.order-accepted p { margin: 14px 0 22px; color: var(--ink-soft); }
.order-accepted a { color: var(--ink); }
.order-accepted__discount { margin-top: -10px !important; color: #9CF1E5 !important; font-weight: 700; }
.order-accepted .buy-button { width: 100%; flex: none; }
.order-accepted .detail-link { margin-top: 8px; }

/* Низкие экраны (~640px): тизер и подписи отбирают место у медиаблока,
   и флакон становится визуально мелким. Уплотняем неблочный контент мира,
   подсказку «ниже» прячем — банка получает обратно ~90px высоты. */
@media (max-height: 700px) {
  .world {
    padding-top: calc(var(--header-h) + var(--tg-content-safe-area-inset-top, 0px) + 2px);
  }
  .world__hint { display: none; }
  .world__badge { margin-top: 10px; }
  .world__title { margin-top: 6px; }
  .world__benefit { margin-top: 6px; font-size: 14px; }
  .ba-teaser { margin-top: 8px; padding: 6px 12px 6px 6px; }
  .ba-teaser__thumb { width: 64px; height: 38px; }
  .ba-teaser__label { font-size: 13px; }
  .world__cta { margin-top: 12px; }
  .world__cta .buy-button { min-height: 50px; }
}

@media (max-width: 359px) {
  .orders-title-row { display: block; }
  .refresh-button { margin-top: 12px; }
  .history-order__head { display: block; }
  .status-badge { display: inline-block; max-width: none; margin-top: 9px; }
}
