/* =====================================================================
   ЧАЙНАЯ — минимализм · светлая/тёмная тема · каталог на одной странице
   ===================================================================== */

:root {
  /* Светлая тема — тонированная слоновая кость, приглушённая и тёплая */
  --bg:        #E8E1CF;
  --bg-soft:   #DFD7C2;
  --card:      #EFE8D7;
  --text:      #2A2720;
  --text-soft: #5A554A;
  --muted:     #948C7A;
  --line:      #D5CBB5;
  --accent:    #3E5544;   /* нефрит */
  --accent-2:  #2E4133;
  --on-accent: #F1EAD8;
  --clay:      #A8663E;
  --shadow:    28px 40px 80px -46px rgba(40,34,22,0.45);
  --motif:     #23211A;   /* цвет фоновых мазков */
  --motif-op:  0.09;

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --maxw: 1200px;
  --gutter: clamp(18px, 4.5vw, 56px);
  --radius: 14px;
  --ease: cubic-bezier(0.4, 0, 0.1, 1);
}

:root[data-theme='dark'] {
  /* Тёмная тема (тёплый графит; акцент — чайное золото, не зелень) */
  --bg:        #17150F;
  --bg-soft:   #1F1C15;
  --card:      #201D16;
  --text:      #E9E3D5;
  --text-soft: #ADA694;
  --muted:     #7E7768;
  --line:      #322D22;
  --accent:    #C7A97B;
  --accent-2:  #D8BE94;
  --on-accent: #171410;
  --clay:      #C98F63;
  --shadow:    28px 46px 90px -46px rgba(0,0,0,0.7);
  --motif:     #EDE7D9;   /* белые мазки в тёмной теме */
  --motif-op:  0.08;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); transition: background 0.5s var(--ease); }
body {
  font-family: var(--sans);
  background: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Фоновая «живопись» кистью ---------- */
.bg-art { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-motif { position: absolute; color: var(--motif); }
.bg-motif svg {
  width: 100%; height: auto;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  opacity: var(--motif-op); transition: opacity 0.5s var(--ease), color 0.5s var(--ease);
}
.bg-flow {
  position: absolute; inset: 0; width: 100%; height: 100%;
  color: var(--motif); fill: none; stroke: currentColor;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  opacity: var(--motif-op); transition: opacity 0.5s var(--ease), color 0.5s var(--ease);
}
.bg-sumi {
  position: absolute; inset: 0; width: 100%; height: 100%;
  color: var(--motif);
  opacity: calc(var(--motif-op) * 1.25);
  transition: opacity 0.5s var(--ease), color 0.5s var(--ease);
  font-family: 'Cormorant Garamond', 'Noto Serif SC', 'SimSun', serif;
}
/* Вариант E — те же мазки, но пастельный хаки (плотнее, мягкий цвет) */
.bg-sumi--khaki { color: var(--khaki); opacity: var(--khaki-op); }
:root { --khaki: #A0AC7B; --khaki-op: 0.38; }
:root[data-theme='dark'] { --khaki: #8F8266; --khaki-op: 0.3; }
@media (max-width: 560px) { .bg-motif { --motif-op: 0.075; } .bg-flow { stroke-width: 1.1; } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.95em 1.8em; border-radius: 40px;
  transition: all 0.35s var(--ease);
}
.btn--solid { background: var(--accent); color: var(--on-accent); }
.btn--solid:hover { background: var(--accent-2); transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); }
.btn--block { width: 100%; }

/* =====================================================================
   Хедер
   ===================================================================== */
.header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__inner {
  max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter);
  height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand__mark {
  display: block; color: var(--accent);
  font-family: var(--serif); font-size: 1.9rem; line-height: 1;
}
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; letter-spacing: 0.13em; line-height: 1; }
.brand__tag { font-family: var(--sans); font-size: 0.55rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-top: 5px; white-space: nowrap; }
.header__actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  border: 1px solid var(--line);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.icon-btn:hover { border-color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }
.cart-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding-inline: 4px;
  display: grid; place-items: center; border-radius: 20px;
  background: var(--clay); color: #fff; font-size: 0.62rem; font-weight: 600;
}
.cart-count[data-count='0'] { display: none; }

/* Переключатель темы: солнце/луна */
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
:root[data-theme='dark'] .theme-toggle .sun { display: block; }
:root[data-theme='dark'] .theme-toggle .moon { display: none; }

/* =====================================================================
   Цитата вместо громкого героя
   ===================================================================== */
.quote { padding-block: clamp(46px, 8vw, 100px) clamp(30px, 5vw, 60px); }
.quote__inner { max-width: 780px; }
.quote blockquote {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(0.82rem, 4.2vw, 2.3rem); line-height: 1.2; letter-spacing: -0.01em;
  white-space: nowrap;
}
.quote blockquote .q { color: var(--muted); }
.quote blockquote em { font-style: italic; color: var(--accent); }
.quote__author { margin-top: 20px; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* =====================================================================
   Категории — кисточные иконки-фильтры
   ===================================================================== */
.cats {
  position: sticky; top: 66px; z-index: 30;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  border-block: 1px solid var(--line);
}
.cats__track {
  max-width: var(--maxw); margin: 0 auto; padding: 14px var(--gutter);
  display: flex; gap: clamp(6px, 1.5vw, 20px);
  overflow-x: auto; scrollbar-width: none;
}
.cats__track::-webkit-scrollbar { display: none; }
.cat {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 10px 14px 8px; border-radius: 12px; min-width: 84px;
  color: var(--muted); position: relative;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.cat:hover { color: var(--text-soft); background: var(--bg-soft); }
.cat.is-active { color: var(--text); }
.cat__ink { width: 52px; height: 38px; display: grid; place-items: center; }
.cat__ink svg { width: 100%; height: 100%; overflow: visible; }
.cat__ink .stroke { fill: currentColor; opacity: 0.4; transition: opacity 0.4s var(--ease), fill 0.4s var(--ease); }
.cat:hover .cat__ink .stroke { opacity: 0.7; }
.cat.is-active .cat__ink .stroke { opacity: 1; fill: var(--accent); }
.cat__label { font-family: var(--sans); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.02em; white-space: nowrap; }
.cat__dot {
  position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%) scale(0);
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  transition: transform 0.35s var(--ease);
}
.cat.is-active .cat__dot { transform: translateX(-50%) scale(1); }

/* Подтипы (шу/шэн, ферментация улунов) — вторая строка под категориями */
.subcats { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 2px; padding-bottom: 13px; }
.subcat {
  font-size: 0.78rem; font-weight: 500; padding: 6px 15px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--text-soft);
  transition: all 0.3s var(--ease);
}
.subcat:hover { border-color: var(--text); color: var(--text); }
.subcat.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* =====================================================================
   Каталог
   ===================================================================== */
.catalog { padding-block: clamp(30px, 5vw, 60px) clamp(60px, 9vw, 120px); }
.catalog__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: clamp(22px, 3vw, 38px); }
.catalog__title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.catalog__count { font-size: 0.85rem; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(16px, 2.4vw, 30px);
}

.tea {
  display: flex; flex-direction: column; align-items: center;
  padding: 26px 20px 22px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  text-align: center; position: relative;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.tea:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }

/* Круглая заглушка под будущее видео «чай крутится по кругу» */
.disc { position: relative; width: 168px; max-width: 62vw; aspect-ratio: 1; margin-bottom: 20px; }
.disc__ring {
  position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 62%, color-mix(in srgb, var(--accent) 55%, transparent) 78%, transparent 92%);
  animation: spin 7s linear infinite; opacity: 0.55;
}
.disc__face {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  background:
    radial-gradient(120% 120% at 32% 26%, rgba(255,255,255,0.22), transparent 52%),
    radial-gradient(130% 130% at 72% 88%, rgba(0,0,0,0.34), transparent 60%),
    linear-gradient(150deg, var(--brew-a, #5a3a24), var(--brew-b, #8a5a34));
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
.disc__hanzi { font-family: var(--serif); font-size: 2.8rem; color: rgba(255,255,255,0.22); user-select: none; }
.disc__play {
  position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(20,17,12,0.42); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.4s var(--ease); z-index: 2;
}
.disc__play svg { width: 16px; height: 16px; fill: #fff; margin-left: 2px; }
.tea:hover .disc__play { opacity: 1; }
.tea:hover .disc__ring { animation-duration: 2.4s; opacity: 0.9; }
@keyframes spin { to { transform: rotate(360deg); } }

.tea__name { font-size: 1.4rem; line-height: 1.12; }
.tea__sub { font-size: 0.78rem; color: var(--muted); margin-top: 5px; letter-spacing: 0.02em; }
.tea__gram { display: inline-flex; margin-top: 14px; }
.tea__gram select {
  font-family: var(--sans); font-size: 0.82rem; font-weight: 500; color: var(--text);
  background-color: var(--bg-soft); border: 1px solid var(--line); border-radius: 30px;
  padding: 7px 32px 7px 16px; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%23948C7A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat; background-position: right 13px center;
  transition: border-color 0.3s var(--ease);
}
.tea__gram select:hover { border-color: var(--text); }
.tea__gram select:focus-visible { outline: none; border-color: var(--accent); }
.tea__foot { margin-top: 16px; display: flex; align-items: center; gap: 14px; }
.tea__price { font-family: var(--serif); font-size: 1.35rem; }
.tea__add {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.tea__add svg { width: 18px; height: 18px; }
.tea__add:hover { background: var(--accent-2); transform: scale(1.08); }
.tea__add.is-added { background: var(--clay); }

/* =====================================================================
   Плавающие контакты
   ===================================================================== */
.floating {
  position: fixed; right: clamp(14px, 3vw, 30px);
  bottom: calc(clamp(16px, 3vw, 32px) + env(safe-area-inset-bottom, 0px));
  z-index: 45; display: flex; flex-direction: column; gap: 12px; align-items: flex-end;
}
.fc {
  display: flex; flex-direction: row-reverse; align-items: center;
  height: 50px; border-radius: 30px; overflow: hidden;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line); box-shadow: 0 12px 28px -16px rgba(0,0,0,0.5);
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.fc:hover { transform: translateY(-2px); }
.fc__icon { width: 50px; height: 50px; display: grid; place-items: center; flex-shrink: 0; }
.fc__icon svg { width: 22px; height: 22px; fill: currentColor; }
.fc__label {
  max-width: 0; opacity: 0; white-space: nowrap; overflow: hidden;
  font-size: 0.82rem; font-weight: 500; letter-spacing: 0.03em;
  transition: max-width 0.4s var(--ease), opacity 0.35s var(--ease), padding 0.4s var(--ease);
}
.fc:hover .fc__label { max-width: 140px; opacity: 1; padding-left: 16px; }
.fc--tg:hover    { border-color: #2AABEE; color: #2AABEE; }
.fc--wa:hover    { border-color: #25D366; color: #25D366; }
.fc--ig:hover    { border-color: #E1306C; color: #E1306C; }

/* =====================================================================
   Корзина
   ===================================================================== */
.cart-page { padding-block: clamp(30px, 5vw, 60px) clamp(60px, 9vw, 120px); min-height: 62vh; }
.cart-page h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: clamp(24px, 4vw, 44px); }
.cart-layout { display: grid; grid-template-columns: 1.6fr 0.9fr; gap: clamp(24px, 4vw, 54px); align-items: start; }
.cart-item { display: grid; grid-template-columns: 78px 1fr auto; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item:first-child { border-top: 1px solid var(--line); }
.cart-item__media { width: 78px; height: 78px; border-radius: 50%; overflow: hidden; position: relative; }
.cart-item__media .disc__face { position: absolute; inset: 0; }
.cart-item__name { font-family: var(--serif); font-size: 1.3rem; }
.cart-item__sub { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.cart-item__ctrls { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.cart-item__remove { font-size: 0.76rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; transition: color 0.3s; }
.cart-item__remove:hover { color: var(--clay); }
.cart-item__price { font-family: var(--serif); font-size: 1.3rem; white-space: nowrap; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 30px; }
.qty button { width: 34px; height: 36px; font-size: 1.1rem; color: var(--text); }
.qty span { min-width: 26px; text-align: center; font-family: var(--serif); font-size: 1.05rem; }

.summary { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); position: sticky; top: 90px; }
.summary h3 { font-size: 1.5rem; margin-bottom: 18px; }
.summary__row { display: flex; justify-content: space-between; padding: 10px 0; color: var(--text-soft); font-size: 0.92rem; }
.summary__row--total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 18px; color: var(--text); }
.summary__row--total .v { font-family: var(--serif); font-size: 1.7rem; }
.summary .btn { margin-top: 20px; }
.summary__balance {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 12px 14px; margin: 10px 0 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  font-size: 0.85rem; line-height: 1.4; color: var(--text-soft);
  transition: border-color 0.3s var(--ease);
}
.summary__balance:hover { border-color: var(--accent); }
.summary__balance input { accent-color: var(--accent); width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; cursor: pointer; }
.summary__balance b { font-weight: 500; color: var(--text); }
.summary__row--discount { color: var(--clay); }

.empty { text-align: center; padding: clamp(50px, 9vw, 100px) 0; }
.empty__mark { font-family: var(--serif); font-size: 3.4rem; color: var(--line); }
.empty h2 { font-size: 1.7rem; margin: 14px 0 10px; }
.empty p { color: var(--text-soft); margin-bottom: 24px; }

/* =====================================================================
   Футер (минимальный)
   ===================================================================== */
.footer { border-top: 1px solid var(--line); padding-block: clamp(30px, 4vw, 48px); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer__note { font-size: 0.82rem; color: var(--muted); }

/* ---------- Избранное на карточке ---------- */
.tea__fav {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted);
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.tea__fav:hover { color: var(--clay); transform: scale(1.12); }
.tea__fav.is-active { color: var(--clay); }
.tea__fav svg { width: 19px; height: 19px; }
.fav-btn.is-active { border-color: var(--clay); color: var(--clay); }

/* ---------- Инструменты каталога ---------- */
.catalog__head { flex-wrap: wrap; row-gap: 12px; }
.catalog__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool-input {
  font-family: var(--sans); font-size: 0.85rem; color: var(--text);
  background-color: var(--card); border: 1px solid var(--line); border-radius: 30px;
  padding: 8px 16px; transition: border-color 0.3s var(--ease);
}
.tool-input:focus-visible { outline: none; border-color: var(--accent); }
.tool-input::placeholder { color: var(--muted); }
.tool-input--search { width: 170px; }
select.tool-input {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%23948C7A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
}
.grid-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 60px 0; font-size: 0.95rem; }
.grid-empty .btn { margin-top: 20px; }

/* Выход из «Избранного» */
.catalog__titlerow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fav-exit {
  font-size: 0.78rem; font-weight: 500; padding: 7px 15px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--text-soft);
  transition: all 0.3s var(--ease);
}
.fav-exit:hover { border-color: var(--text); color: var(--text); }

/* ---------- Форма заказа ---------- */
.summary form { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.field {
  font-family: var(--sans); font-size: 0.9rem; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; resize: none; transition: border-color 0.3s var(--ease);
}
.field:focus-visible { outline: none; border-color: var(--accent); }
.field::placeholder { color: var(--muted); }
.field.is-error { border-color: #B4533A; }
.summary form .btn { margin-top: 6px; }
.summary__note { font-size: 0.78rem; color: var(--muted); margin-top: 14px; text-align: center; }

/* ---------- Валюта ---------- */
.currency-toggle [data-currency-symbol] { font-family: var(--serif); font-size: 1.1rem; line-height: 1; }

/* ---------- Модальные окна ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(22, 18, 12, 0.45); backdrop-filter: blur(7px);
  display: grid; place-items: center; padding: 20px;
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.modal-backdrop.is-open { opacity: 1; }
.modal {
  position: relative; width: 100%; max-width: 420px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 32px 28px 26px; box-shadow: var(--shadow);
  max-height: 88vh; overflow: auto;
  transform: translateY(16px) scale(0.985);
  transition: transform 0.4s var(--ease);
}
.modal-backdrop.is-open .modal { transform: none; }
.modal__close {
  position: absolute; top: 12px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  font-family: var(--serif); font-size: 1.15rem; color: var(--muted);
  transition: color 0.3s var(--ease);
}
.modal__close:hover { color: var(--text); }

/* Промо рефералки */
.promo__hanzi { font-family: var(--serif); font-size: 2.6rem; color: var(--accent); line-height: 1; margin-bottom: 14px; }
.promo__eyebrow { font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.promo__title { font-size: 1.65rem; line-height: 1.15; margin-bottom: 8px; }
.promo__title em { font-style: italic; color: var(--accent); }
.promo__steps { display: flex; flex-direction: column; gap: 12px; margin: 20px 0 24px; }
.promo__step { display: flex; gap: 14px; align-items: baseline; font-size: 0.9rem; color: var(--text-soft); line-height: 1.45; }
.promo__step b { font-family: var(--serif); font-weight: 600; color: var(--clay); flex-shrink: 0; }
.promo__later { width: 100%; margin-top: 12px; padding: 8px; font-size: 0.8rem; color: var(--muted); transition: color 0.3s var(--ease); }
.promo__later:hover { color: var(--text); }

/* Вход / регистрация */
.auth__tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth__tab { flex: 1; font-size: 0.85rem; font-weight: 500; padding: 9px; border-radius: 30px; border: 1px solid var(--line); color: var(--text-soft); transition: all 0.3s var(--ease); }
.auth__tab.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.auth form { display: flex; flex-direction: column; gap: 10px; }
.auth__note { font-size: 0.76rem; color: var(--muted); margin-top: 16px; text-align: center; line-height: 1.5; }
.auth__google { display: flex; justify-content: center; min-height: 44px; margin-bottom: 4px; }
.auth__divider { display: flex; align-items: center; gap: 12px; margin: 12px 0; color: var(--muted); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; }
.auth__divider::before, .auth__divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Профиль */
.account__balance { display: flex; gap: 10px; margin: 18px 0 14px; }
.acc-metric { flex: 1; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; text-align: center; }
.acc-metric .v { font-family: var(--serif); font-size: 1.35rem; line-height: 1.1; }
.acc-metric .l { font-size: 0.64rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 4px; }
.account__how { font-size: 0.85rem; color: var(--text-soft); line-height: 1.5; margin-bottom: 14px; }
.ref-box { display: flex; gap: 8px; align-items: stretch; }
.ref-box .field { flex: 1; font-size: 0.82rem; color: var(--text-soft); }
.ref-box .icon-btn { width: 46px; height: auto; border-radius: 12px; flex-shrink: 0; }
.user-btn.is-auth { border-color: var(--accent); color: var(--accent); }

/* ---------- Плашка рефералки под шапкой ---------- */
.ref-banner {
  position: fixed; top: 66px; left: 0; right: 0; z-index: 35;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-110%);
  transition: transform 0.55s var(--ease);
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.4);
}
.ref-banner.is-open { transform: none; }
.ref-banner__inner { display: flex; align-items: center; gap: 16px; padding-block: 14px; }
.ref-banner__hanzi { font-family: var(--serif); font-size: 1.7rem; color: var(--accent); line-height: 1; flex-shrink: 0; }
.ref-banner__text { flex: 1; font-size: 0.88rem; line-height: 1.4; min-width: 0; }
.ref-banner__text b { font-weight: 500; }
.ref-banner__text span { color: var(--text-soft); display: block; font-size: 0.8rem; }
.ref-banner__cta { padding: 0.7em 1.4em; font-size: 0.74rem; flex-shrink: 0; }
.ref-banner__close {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  font-family: var(--serif); font-size: 1rem; color: var(--muted);
  transition: color 0.3s var(--ease);
}
.ref-banner__close:hover { color: var(--text); }
@media (max-width: 560px) {
  /* двухэтажная раскладка: текст целиком, ниже — кнопка и крестик */
  .ref-banner__inner { flex-wrap: wrap; gap: 8px 10px; padding-block: 12px; }
  .ref-banner__hanzi { display: none; }
  .ref-banner__text { flex: 1 1 100%; font-size: 0.84rem; }
  .ref-banner__text span { display: block; font-size: 0.76rem; margin-top: 2px; }
  .ref-banner__cta { flex: 0 0 auto; }
  .ref-banner__close { margin-left: auto; }
}

/* ---------- Тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(24px);
  background: var(--text); color: var(--bg); padding: 13px 24px; border-radius: 40px;
  font-size: 0.88rem; z-index: 100; opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px; box-shadow: 0 18px 36px -18px rgba(0,0,0,0.55);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* =====================================================================
   Адаптив
   ===================================================================== */
@media (max-width: 860px) {
  .cart-layout { grid-template-columns: 1fr; }
  .summary { position: relative; top: 0; }
}
@media (max-width: 560px) {
  /* крупное имя + микро-тэглайн одной строкой под ним
     (absolute — не распирает шапку по ширине) */
  .brand__mark { font-size: clamp(1.3rem, 5.5vw, 1.9rem); }
  .brand__name { font-size: clamp(0.98rem, 4.6vw, 1.35rem); letter-spacing: 0.08em; }
  .brand__text { position: relative; }
  .brand__tag {
    position: absolute; top: 100%; left: 1px; margin-top: 8px;
    font-size: 0.5rem; letter-spacing: 0.06em; white-space: nowrap;
  }
  .header__actions { gap: 5px; }
  .icon-btn { width: 37px; height: 37px; }
  .tool-input--search { width: 100%; }
  /* 16px в полях — iOS не зумит страницу при фокусе */
  .tool-input, .field, .tea__gram select { font-size: 16px; }
  /* иероглифы не упираются в края маленького кружка */
  .disc__hanzi { font-size: 2.1rem; }
  /* подпись цитаты мельче самой цитаты */
  .quote__author { font-size: 0.66rem; letter-spacing: 0.1em; margin-top: 12px; }
  /* плавающие контакты компактнее и деликатнее */
  .fc { height: 40px; opacity: 0.88; }
  .fc__icon { width: 40px; height: 40px; }
  .fc__icon svg { width: 19px; height: 19px; }
  .floating { gap: 9px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tea { padding: 18px 12px 16px; }
  .disc { width: 130px; }
  .tea__name { font-size: 1.2rem; }
  .cart-item { grid-template-columns: 60px 1fr; }
  .cart-item__price { grid-column: 2; text-align: left; }
  .cart-item__media { width: 60px; height: 60px; }
}
@media (max-width: 480px) {
  /* компактные кнопки; размеры лого задаёт clamp из блока 560px */
  .brand { gap: 8px; }
  .header__actions { gap: 3px; }
  .icon-btn { width: 34px; height: 34px; }
  .icon-btn svg { width: 17px; height: 17px; }
  .currency-toggle [data-currency-symbol] { font-size: 0.95rem; }
}
@media (max-width: 350px) {
  /* только на совсем крошечных экранах жертвуем названием */
  .brand__name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .disc__ring { display: none; }
}
