/*
 * Веб-главная Hamkosa v2 — «Плакаты-вопросы». Эксперимент Slush
 * (miniapp/DESIGN.md → «Адаптация» → «Веб» и «Наклейки и движение»).
 * Цвета и форма — токены --lb-* из src/theme.css; здесь веб-шкала, раскладка,
 * макеты и тёмная тема. Движение — landing-v2.js (GSAP), начальные кадры
 * героя прячутся только под html.motion.
 */

/* ——— Основа ——— */
.w {
  --w-pad: clamp(16px, 4vw, 48px);
  --w-max: 1360px;
  --w-band: clamp(72px, 10vw, 144px);
  --w-q: clamp(44px, 11vw, 160px);
  --w-sky: #dceeff;
  --w-white: var(--lb-surface);
  --w-mint: var(--lb-sticker-mint);
  --w-lav: var(--lb-sticker-lavender);
  --w-gray: #cccccc;
  --w-blue: var(--lb-sticker-blue);
  --ribbon-fill: var(--lb-sticker-blue);
  --ribbon-edge: var(--lb-outline);
  min-height: 0;
  padding-bottom: 0;
  background: var(--w-sky);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.45;
  caret-color: var(--lb-sticker-blue);
}
html { scroll-padding-top: 100px; scrollbar-color: #000 var(--w-sky); }
.w ::selection { background: var(--lb-sticker-sun); color: #000; }
.w a { color: inherit; }
.w :focus-visible { outline: 2px solid var(--lb-outline); outline-offset: 3px; }
.qa summary:focus-visible { border-radius: 18px; }

.wrap { max-width: var(--w-max); margin: 0 auto; padding: 0 var(--w-pad); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 50;
  padding: 12px 20px;
  border: 1px solid var(--lb-outline);
  border-radius: var(--lb-radius-pill);
  background: var(--lb-surface);
  font-weight: 700;
}
.skip:focus { top: 16px; }

/* ——— Полосы ——— */
.band { --band: var(--w-white); position: relative; overflow: hidden; padding: var(--w-band) 0; background: var(--band); }
.band > .wrap { position: relative; z-index: 2; }
.band--sky { --band: var(--w-sky); }
.band--white { --band: var(--w-white); }
.band--mint { --band: var(--w-mint); }
.band--lav { --band: var(--w-lav); }
.band--gray { --band: var(--w-gray); }
.band--blue { --band: var(--w-blue); --ribbon-fill: #fff; }
.poster { padding-bottom: clamp(56px, 7vw, 104px); }

/* Лента пара: путь строит landing-v2.js по рамке заголовка полосы. */
.ribbon {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.ribbon__body {
  fill: var(--ribbon-fill);
  stroke: var(--ribbon-edge);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.ribbon__mask { fill: none; stroke: #fff; stroke-linecap: butt; }

/* ——— Типографика ——— */
.q {
  margin: 0 0 clamp(28px, 4vw, 56px);
  font-family: var(--lb-font-display);
  font-weight: 700;
  font-size: var(--w-q);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}
.q--end { text-align: right; }
.q--md { font-size: clamp(44px, 7.5vw, 112px); }
#debts .q,
.faq .q { line-height: 1.06; }
.q__line { display: block; white-space: nowrap; }

.tagline {
  margin: 0;
  max-width: 36ch;
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.lead { margin: 0; max-width: 40ch; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.35; font-weight: 600; }
.note { margin: 16px 0 0; font-size: 15px; color: var(--lb-text-2); }
.label { font-size: 12px; font-weight: 700; letter-spacing: 0.032em; text-transform: uppercase; }
.money { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; white-space: nowrap; }

/* ——— Кнопки (нажатие — пружина Kinetics «Squish Button») ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border: 1px solid var(--lb-outline);
  border-radius: var(--lb-radius-pill);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-align: center;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s, color 0.15s;
}
.btn:active { transform: scale(0.92); transition: transform 0.08s ease-out; }
.btn--primary { background: var(--lb-accent); color: var(--lb-on-accent) !important; }
.btn--ghost { background: var(--lb-surface); }
.btn--ghost:hover { background: var(--lb-sticker-lavender); color: #000; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 14px; }
.btn--lg { min-height: 64px; padding: 0 40px; font-size: 18px; }
.btn--inv { background: #fff; color: #000 !important; border-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--lb-radius-pill);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.032em;
  text-decoration: none;
}
.pill:hover { border-color: var(--lb-outline); background: var(--lb-sticker-lavender); color: #000; }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn:active { transition: none; transform: none; }
}

/* ——— Шапка: плавающая пилюля ——— */
.nav { position: sticky; top: 12px; z-index: 30; padding: 12px var(--w-pad) 0; }
.nav__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(var(--w-max) - 2 * 48px);
  min-height: 64px;
  margin: 0 auto;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--lb-outline);
  border-radius: var(--lb-radius-pill);
  background: var(--lb-surface);
}
.nav__links { display: flex; gap: 2px; margin: 0 auto; }
.nav__end { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.logo { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; }
.logo__mark { width: 40px; height: 38px; flex: none; }
.wordmark { font-weight: 800; font-size: 26px; line-height: 1; letter-spacing: -0.035em; color: var(--lb-text); }
.logo--inv .wordmark { color: #fff; font-size: 34px; }
.logo--inv .logo__mark { width: 52px; height: 48px; }

.lang { display: inline-flex; border: 1px solid var(--lb-outline); border-radius: var(--lb-radius-pill); }
.lang__opt {
  min-width: 44px;
  min-height: 42px;
  border: 0;
  border-radius: var(--lb-radius-pill);
  background: none;
  color: var(--lb-text);
  font: 700 13px/1.3 var(--lb-font-family);
  letter-spacing: 0.032em;
  cursor: pointer;
}
.lang__opt.is-on { background: var(--lb-sticker-lavender); color: #000; }
.lang__opt:disabled { color: var(--lb-text-2); cursor: not-allowed; }
.nav__cta.is-primary { background: var(--lb-accent); color: var(--lb-on-accent) !important; }

/* ——— Герой ——— */
.hero { padding-top: clamp(28px, 4vw, 56px); padding-bottom: clamp(56px, 7vw, 104px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}
.q--hero { font-size: clamp(52px, min(10.6vw, 17vh), 164px); margin-bottom: 28px; }
@media (max-height: 760px) and (min-width: 961px) {
  .q--hero { margin-bottom: 20px; }
  .hero .actions { margin-top: 24px; }
}
.mascot {
  display: inline-block;
  width: 0.86em;
  height: 0.8em;
  margin-left: 0.06em;
  vertical-align: -0.04em;
  overflow: visible;
}
.mascot .wisp-edge,
.mascot .wisp-fill { fill: none; stroke-linecap: round; }
.mascot .wisp-edge { stroke: var(--lb-outline); stroke-width: 9.5; }
.mascot .wisp-fill { stroke: var(--lb-sticker-blue); stroke-width: 7; }
.mascot__steam,
.mascot__eyes { transform-box: fill-box; transform-origin: 50% 100%; }
.mascot__eyes { transform-origin: 50% 50%; }

.hero__art { position: relative; display: flex; flex-direction: column; align-items: flex-end; }

/* Сцена: окно рабочей группы и телефон с меню. Макеты — «бумага». */
.scene { position: relative; width: min(100%, 540px); margin: 0; }
.scene__stage { position: relative; padding: 40px 0 0; height: 700px; }
.tg {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 80%;
  height: 420px;
  border: 1px solid var(--lb-outline);
  border-radius: 28px;
  background: var(--w-sky);
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
}
.tg__head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--lb-outline);
  background: var(--lb-surface);
}
.tg__ava {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--lb-outline);
  border-radius: 50%;
  background: var(--lb-sticker-sun);
  font-weight: 700;
}
.tg__title { display: flex; flex-direction: column; }
.tg__title small { color: var(--lb-text-2); font-size: 12px; }
.tg__pin {
  position: absolute;
  top: 61px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-bottom: 1px solid var(--lb-outline);
  background: var(--lb-surface);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}
.tg__pin-text { display: flex; flex-direction: column; min-width: 0; }
.tg__pin-line { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tg__pin small { color: #5c4ade; font-weight: 700; font-size: 11px; }
.tg__pin-ico { width: 16px; height: 16px; flex: none; color: #5c4ade; }
.tg__feed {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 12px 14px 16px;
  overflow: hidden;
}
.scene .tg__feed {
  -webkit-mask-image: linear-gradient(to bottom, transparent 44px, #000 124px);
  mask-image: linear-gradient(to bottom, transparent 44px, #000 124px);
}
.tg__feed > * { flex-shrink: 0; }
.msg {
  align-self: flex-start;
  max-width: 78%;
  padding: 6px 12px 7px;
  border: 1px solid var(--lb-outline);
  border-radius: 16px 16px 16px 4px;
  background: var(--lb-surface);
  opacity: 0.5;
}
.msg--me { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--lb-sticker-lavender); }
.msg__from { display: block; font-size: 12px; }
.msg__from--a { color: #5c4ade; }
.msg__from--b { color: #b83a00; }
.msg__from--c { color: #1660b8; }
.msg__from--d { color: #137a49; }
.typing {
  align-self: flex-start;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--lb-outline);
  border-radius: 16px 16px 16px 4px;
  background: var(--lb-surface);
  color: var(--lb-text-2);
  font-size: 13px;
}
.motion .typing { display: inline-flex; }
.card-wrap { padding-top: 4px; }
.motion .card-wrap { height: 0; overflow: hidden; }
.typing__dots { display: inline-flex; gap: 3px; }
.typing__dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--lb-text-2); }
.botmsg {
  align-self: flex-start;
  width: min(100%, 296px);
  padding: 10px 12px 12px;
  border: 1px solid var(--lb-outline);
  border-radius: 16px 16px 16px 4px;
  background: var(--lb-surface);
}
.botmsg__from { display: flex; align-items: center; gap: 6px; color: #5c4ade; font-weight: 700; font-size: 13px; }
.botmsg__ava { width: 20px; height: 19px; }
.botmsg p { margin: 4px 0 10px; }
.kb {
  display: block;
  border: 1px solid var(--lb-outline);
  border-radius: var(--lb-radius-pill);
  background: var(--lb-surface);
  font-weight: 700;
  font-size: 13px;
  line-height: 36px;
  text-align: center;
}
.kb + .kb { margin-top: 6px; }
.tg__down {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--lb-outline);
  border-radius: 50%;
  background: var(--lb-surface);
  opacity: 0;
}
.tg__down svg { width: 18px; height: 18px; }
.tg__down b {
  position: absolute;
  top: -10px;
  right: -6px;
  min-width: 24px;
  padding: 1px 6px;
  border: 1px solid var(--lb-outline);
  border-radius: var(--lb-radius-pill);
  background: var(--lb-sticker-blue);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.phone {
  position: relative;
  padding: 7px;
  border: 1px solid var(--lb-outline);
  border-radius: 38px;
  background: #000;
}
.phone__screen { border-radius: 31px; background: var(--w-sky); padding: 16px 12px 12px; font-size: 12px; overflow: hidden; }
.phone--menu { position: absolute; right: 0; top: 344px; width: 240px; }
.sheet-title { font-family: var(--lb-font-display); font-weight: 700; font-size: 26px; line-height: 1; text-transform: uppercase; }
.search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 8px;
  padding: 0 12px;
  border: 1px solid var(--lb-outline);
  border-radius: var(--lb-radius-pill);
  background: var(--lb-surface);
  color: var(--lb-text-2);
  line-height: 30px;
}
.search svg { width: 13px; height: 13px; }
.chips { display: flex; gap: 4px; margin-bottom: 10px; }
.chip { padding: 0 10px; border: 1px solid var(--lb-outline); border-radius: var(--lb-radius-pill); background: var(--lb-surface); font-weight: 700; line-height: 26px; }
.chip.is-on { background: var(--lb-sticker-lavender); }
.dish { display: grid; grid-template-columns: 46px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--lb-line); }
.dish__pic { display: flex; width: 46px; height: 46px; border: 1px solid var(--lb-outline); border-radius: 12px; background: var(--lb-surface); }
.dish__pic svg { width: 100%; height: 100%; }
.dish__body { display: flex; flex-direction: column; line-height: 1.3; }
.dish__qty,
.dish__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--lb-outline);
  border-radius: 50%;
  background: var(--lb-surface);
  font-weight: 700;
}
.dish__qty { background: var(--lb-sticker-lavender); }
.phone__cta {
  margin-top: 10px;
  padding: 10px 10px;
  border: 1px solid var(--lb-outline);
  border-radius: var(--lb-radius-pill);
  background: var(--lb-surface);
  font-weight: 700;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

.tag {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #000;
  border-radius: var(--lb-radius-pill);
  color: #000;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.tag--lav { background: var(--lb-sticker-lavender); }
.tag--mint { background: var(--lb-sticker-mint); }
.scene__tag { position: absolute; z-index: 3; }
.scene__tag--org { top: 6px; left: -14px; transform: rotate(-5deg); }
.scene__tag--par { left: 4px; top: 488px; transform: rotate(4deg); }

.replay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--lb-radius-pill);
  background: none;
  color: var(--lb-text);
  font: 700 14px/1.3 var(--lb-font-family);
  cursor: pointer;
}
.replay.is-off { visibility: hidden; }
.replay:hover { border-color: var(--lb-outline); background: var(--lb-surface); }
.replay svg { width: 18px; height: 18px; }

/* Начальные кадры сценария героя — только при разрешённом движении. */
.motion .scene [data-hero='msg'],
.motion .scene [data-hero='card'],
.motion .scene [data-hero='pin'],
.motion .scene [data-hero='phone'],
.motion .scene [data-hero='tag'] { opacity: 0; }

/* ——— Плакат: вопрос → боль → наклейка-ответ → макет ——— */
.poster__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
}
.poster--flip .poster__copy { order: 2; }
.poster__copy p { margin: 0 0 14px; max-width: 44ch; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.45; }
.poster__copy .fine { margin-top: 18px; font-size: 14px; color: var(--lb-text-2); }
.pain { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.pain li {
  max-width: 100%;
  padding: 9px 16px;
  border-radius: 18px 18px 18px 4px;
  background: var(--lb-surface-2);
  color: var(--lb-text-2);
  font-size: clamp(16px, 1.3vw, 19px);
}
.pain li:nth-child(even) { margin-left: 28px; }
.answer {
  display: inline-block;
  margin: 0 0 24px !important;
  padding: 10px 22px;
  border: 1px solid #000;
  border-radius: var(--lb-radius-pill);
  color: #000;
  font-weight: 700;
  font-size: clamp(15px, 1.2vw, 18px) !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(-4deg);
}
.answer--sun { background: var(--lb-sticker-sun); }
.answer--lav { background: var(--lb-sticker-lavender); transform: rotate(3deg); }
.answer--mint { background: var(--lb-sticker-mint); transform: rotate(-3deg); }
.poster__art { margin: 0; }
.poster--side .q { font-size: clamp(44px, 8.4vw, 128px); }
.poster--side .q--quiet { font-size: clamp(40px, 6.8vw, 104px); }
.poster--side .poster__grid { align-items: center; }
.poster--side .total { width: min(100%, 540px); }
.poster--side .line--total { flex-wrap: wrap; }
.poster--side .total__sum { margin-left: auto; }
.poster--side .odo { font-size: clamp(56px, 6.4vw, 96px); }

/* Карточка дня: состояния стопкой, высота — по самому длинному. */
.day { justify-self: end; width: min(100%, 470px); padding-top: 18px; }
.day__card {
  position: relative;
  padding: 18px 18px 18px;
  border: 1px solid var(--lb-outline);
  border-radius: 24px;
  background: var(--lb-surface);
  font-size: 16px;
  line-height: 1.4;
}
.day__clock {
  position: absolute;
  top: -22px;
  right: 18px;
  padding: 2px 16px;
  border: 1px solid #000;
  border-radius: var(--lb-radius-pill);
  background: var(--lb-sticker-sun);
  color: #000;
  font: 700 28px/1.2 var(--lb-font-display);
  font-variant-numeric: tabular-nums;
  transform: rotate(4deg);
}
.day__states { display: grid; overflow: hidden; }
.day__state { grid-area: 1 / 1; align-self: center; visibility: hidden; opacity: 0; }
.kb-row { display: flex; gap: 6px; }
.kb-row .kb { flex: 1; }
.kb-row .kb + .kb { margin-top: 0; }
.day__state.is-on { visibility: visible; opacity: 1; }
.day__state p { margin: 6px 0 12px; }
.day__state .kb { font-size: 14px; line-height: 40px; }
.rail { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.rail li {
  display: inline-flex;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--lb-outline);
  border-radius: var(--lb-radius-pill);
  background: var(--lb-surface);
  font-size: 13px;
  transition: background-color 0.2s;
}
.rail b { font-variant-numeric: tabular-nums; }
.rail li.is-on { background: var(--lb-sticker-lavender); color: #000; }

/* Меню и кто что выбрал. */
.pick__stage { position: relative; min-height: 480px; }
.phone--dish { width: 270px; margin: 0; transform: rotate(-2deg); }
.phone--dish .phone__screen { padding: 12px 12px 14px; font-size: 13px; }
.dish-hero { display: flex; justify-content: center; height: 150px; border: 1px solid var(--lb-outline); border-radius: 20px; background: var(--lb-surface); }
.dish-hero svg { width: 150px; height: 150px; }
.dish-name { display: block; margin-top: 12px; font-size: 19px; line-height: 1.2; }
.dish-price { display: block; margin-top: 2px; font-weight: 700; font-size: 16px; }
.opts { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 10px; border: 1px solid var(--lb-outline); border-radius: 18px; background: var(--lb-surface); }
.opts__label { font-weight: 700; font-size: 12px; letter-spacing: 0.032em; text-transform: uppercase; }
.opt { display: flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--lb-outline); border-radius: var(--lb-radius-pill); line-height: 32px; font-weight: 600; }
.opt svg { width: 14px; height: 14px; }
.opt.is-on { background: var(--lb-sticker-lavender); }
.choice {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 16px 5px 5px;
  border: 1px solid #000;
  border-radius: var(--lb-radius-pill);
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}
.choice__pic { display: flex; width: 48px; height: 48px; border: 1px solid #000; border-radius: 50%; background: var(--w-sky); }
.choice__pic svg { width: 100%; height: 100%; }
.choice--1 { top: 6%; left: 300px; transform: rotate(-6deg); }
.choice--2 { top: 28%; left: 340px; transform: rotate(5deg); }
.choice--3 { top: 50%; left: 296px; transform: rotate(4deg); }
.choice--3 .choice__pic { background: var(--lb-sticker-lavender); }
.choice--4 { top: 72%; left: 330px; transform: rotate(-5deg); }
.choice--4 .choice__pic { background: var(--lb-sticker-sun); }
.choice--2 .choice__pic { background: var(--lb-sticker-sun); }

/* «Мой итог». */
.total {
  position: relative;
  justify-self: end;
  width: min(100%, 500px);
  padding: clamp(22px, 2.6vw, 34px);
  border: 1px solid var(--lb-outline);
  border-radius: 32px;
  background: var(--lb-surface);
  font-size: 16px;
}
.total__head { margin-bottom: 14px; font-weight: 700; font-size: 26px; }
.line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; }
.line--muted { color: var(--lb-text-2); }
.line--muted .money { color: var(--lb-text); font-weight: 700; }
.total hr { margin: 10px 0 4px; border: 0; border-top: 1px solid var(--lb-outline); }
.line--total { font-weight: 700; font-size: 18px; }
.total__sum { font-weight: 700; font-size: 20px; }
.odo { font: 700 clamp(40px, 4.4vw, 60px)/1 var(--lb-font-display); }
.odo__d { display: inline-block; height: 1em; overflow: hidden; vertical-align: top; }
.odo__strip { display: flex; flex-direction: column; }
.odo__strip span { display: block; height: 1em; }
.odo__sp { display: inline-block; width: 0.22em; }
.payee {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 16px 0;
  padding: 16px 18px;
  border: 1px solid #000;
  border-radius: 20px;
  background: var(--lb-sticker-sun);
  color: #000;
}
.payee__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-no { font: 700 clamp(22px, 2vw, 28px) var(--lb-font-display); }
.copy { padding: 0 12px; border: 1px solid #000; border-radius: var(--lb-radius-pill); background: #fff; font-weight: 700; font-size: 13px; line-height: 30px; }
.total__foot { display: grid; justify-items: start; align-items: center; }
.total__foot > * { grid-area: 1 / 1; }
.total__foot [data-paid='btn'] { visibility: hidden; }
.btn-mock { padding: 0 22px; border: 1px solid var(--lb-outline); border-radius: var(--lb-radius-pill); background: var(--lb-surface); font-weight: 700; line-height: 46px; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1px solid #000;
  border-radius: var(--lb-radius-pill);
  color: #000;
  font-weight: 700;
  font-size: 17px;
  transform: rotate(-6deg);
}
.status svg { width: 18px; height: 18px; }
.status--done { background: var(--lb-status-done); }

/* Долги: личное напоминание поверх шапки чата. */
.debts { justify-self: end; width: min(100%, 470px); }
.debts__stage { position: relative; }
.push {
  position: relative;
  z-index: 4;
  margin: 0 6% -26px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--lb-outline);
  border-radius: 20px;
  background: var(--lb-surface);
  font-size: 14px;
  line-height: 1.35;
}
.push__ava { width: 36px; height: 34px; }
.push__body { display: flex; flex-direction: column; }
.push small { color: var(--lb-text-2); font-size: 12px; }
.tg.tg--quiet { width: 100%; height: auto; }
.tg--quiet .tg__head { padding-top: 38px; }
.tg--quiet .tg__feed { padding: 24px 14px 18px; }
.tg--quiet .botmsg { width: min(100%, 360px); font-size: 15px; }

/* ——— С чего начать ——— */
.start .lead { margin: -8px 0 32px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.steps li {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 26px 28px;
  border: 1px solid #000;
  border-radius: 24px;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.35;
}
.steps__n { font: 700 60px/0.9 var(--lb-font-display); }
.start .actions { margin-top: 40px; align-items: center; gap: 24px; }
.mascot--end { width: 112px; height: 104px; margin: 0 0 6px; }
.start .mascot .wisp-fill { stroke: #fff; }
.start .note { color: #000; }
.q__ch { display: inline-block; }
.q__clip { display: inline-block; overflow: hidden; padding-top: 0.12em; margin-top: -0.12em; vertical-align: top; }

/* ——— Вопросы ——— */
.faq { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 5vw, 96px); align-items: start; }
.faq__list { display: flex; flex-direction: column; gap: 10px; }
.qa { border: 1px solid var(--lb-outline); border-radius: 20px; background: var(--lb-surface); }
.qa summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 12px 16px 12px 24px;
  font-weight: 700;
  font-size: clamp(17px, 1.4vw, 20px);
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: '';
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--lb-outline);
  border-radius: 50%;
  background: var(--lb-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.qa[open] summary::after { transform: rotate(180deg); background-color: var(--lb-sticker-lavender); }
.qa p { margin: 0; padding: 0 24px 22px; max-width: 62ch; color: var(--lb-text-2); font-size: 17px; }

/* ——— Подвал ——— */
.foot { padding: 48px 0 28px; background: #000; color: #fff; }
.foot__row { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.foot__row p { flex: 1; min-width: 220px; margin: 0; color: #cfcfcf; }
.foot__fine { margin-top: 28px; margin-bottom: 0; color: #a8adb7; font-size: 13px; }
.foot :focus-visible { outline-color: #fff; }

/* ——— Липкая кнопка (телефон) ——— */
.sticky-cta { display: none; }

/* ——— Планшет ——— */
@media (max-width: 1100px) {
  .nav__links { display: none; }
  .steps { grid-template-columns: 1fr; }
  .steps li { flex-direction: row; align-items: center; }
  .steps__n { min-width: 44px; font-size: 48px; }
}
@media (min-width: 1200px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) 540px; }
}
/* Герой и «Что тебе взять?» — в одну колонку до 1199px: на 961–1199 сцена
 * и наклейки-выборы наезжали на текст. Остальные плакаты держат две колонки
 * до 960px, чтобы планшет не был наполовину пустым. */
@media (max-width: 1199px) {
  .hero__grid,
  .poster--flip .poster__grid { grid-template-columns: minmax(0, 1fr); }
  .poster--flip .poster__copy { order: 0; }
  .hero__art { align-items: stretch; }
  .scene { width: 100%; max-width: 540px; margin: 0 auto; }
  .q--end { text-align: left; }
}
@media (max-width: 960px) {
  .poster__grid,
  .faq { grid-template-columns: minmax(0, 1fr); }
  .day,
  .total,
  .debts { justify-self: start; }
  .nav { position: relative; top: 0; }
  html { scroll-padding-top: 16px; }
  .nav__cta { display: none; }
  .mascot--end { display: none; }
}

/* ——— Телефон ——— */
@media (max-width: 600px) {
  .w { --w-q: clamp(40px, 13.4vw, 64px); --w-band: 64px; }
  .nav { padding-top: 10px; }
  .nav__bar { min-height: 56px; padding-left: 12px; }
  .logo__mark { width: 34px; height: 32px; }
  .wordmark { font-size: 22px; }
  .q--hero { font-size: clamp(44px, 14.6vw, 66px); }
  .actions .btn { width: 100%; }
  .btn--lg { min-height: 56px; padding: 0 20px; font-size: 16px; }
  .scene__stage { height: 690px; padding-top: 40px; }
  .tg { width: 100%; height: 360px; }
  .tg.tg--quiet { height: auto; }
  .phone--menu { top: 376px; width: 58%; min-width: 200px; }
  .scene__tag--org { left: auto; right: 4px; top: 6px; }
  .scene__tag--par { left: 0; top: 440px; max-width: 38%; white-space: normal; line-height: 1.3; }
  .pick__stage { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .phone--dish { grid-column: 1 / -1; width: min(270px, 84%); margin: 0 auto 14px; }
  .choice { position: static; transform: none; padding-right: 10px; font-size: 13px; white-space: normal; }
  .choice__pic { width: 40px; height: 40px; flex: none; }
  .choice--1, .choice--2, .choice--3, .choice--4 { transform: none; }
  .line--total { flex-wrap: wrap; }
  .push { margin-left: 3%; margin-right: 3%; }
  html { scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .sticky-cta {
    display: flex;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 32px));
    transition: transform 0.5s cubic-bezier(0.18, 1.25, 0.4, 1), opacity 0.15s;
  }
  .sticky-cta.is-on { opacity: 1; pointer-events: auto; transform: none; }
  .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
  .sticky-cta { transition: none; }
}

/*
 * ——— Тёмная тема (вариант A «ночное небо», DESIGN.md «Веб») ———
 * Включается системной темой, пока на <html> нет data-theme="light", и
 * принудительно data-theme="dark". Макеты, наклейки и полоса «С чего начать?»
 * остаются «бумагой». Светлым заголовкам поверх синей ленты — обводка цвета
 * полосы под заливкой (paint-order), это не тень.
 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --lb-bg: #0b1220;
    --lb-surface: #111317;
    --lb-surface-2: #1c1f25;
    --lb-text: #f3f4f6;
    --lb-text-2: #a8adb7;
    --lb-line: #2a2e36;
    --lb-outline: #e6e8ec;
    --lb-accent: #ffffff;
    --lb-on-accent: #000000;
    --lb-card-border: 1px solid var(--lb-outline);
    scrollbar-color: #e6e8ec #0b1220;
  }
  :root:not([data-theme='light']) .w {
    --w-sky: #0e1a2f;
    --w-white: #111317;
    --w-mint: #0f241c;
    --w-lav: #1e1830;
    --w-gray: #22252b;
  }
  :root:not([data-theme='light']) .band:not(.band--blue) .q { -webkit-text-stroke: 0.07em var(--band); paint-order: stroke fill; }
  :root:not([data-theme='light']) .qa summary::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23f3f4f6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
  :root:not([data-theme='light']) .qa[open] summary::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
  :root:not([data-theme='light']) .foot { border-top: 1px solid var(--lb-outline); }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --lb-bg: #0b1220;
  --lb-surface: #111317;
  --lb-surface-2: #1c1f25;
  --lb-text: #f3f4f6;
  --lb-text-2: #a8adb7;
  --lb-line: #2a2e36;
  --lb-outline: #e6e8ec;
  --lb-accent: #ffffff;
  --lb-on-accent: #000000;
  --lb-card-border: 1px solid var(--lb-outline);
  scrollbar-color: #e6e8ec #0b1220;
}
:root[data-theme='dark'] .w {
  --w-sky: #0e1a2f;
  --w-white: #111317;
  --w-mint: #0f241c;
  --w-lav: #1e1830;
  --w-gray: #22252b;
}
:root[data-theme='dark'] .band:not(.band--blue) .q { -webkit-text-stroke: 0.07em var(--band); paint-order: stroke fill; }
:root[data-theme='dark'] .qa summary::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23f3f4f6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
:root[data-theme='dark'] .qa[open] summary::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
:root[data-theme='dark'] .foot { border-top: 1px solid var(--lb-outline); }
:root[data-theme='light'] { color-scheme: light; }

/* «Бумага»: макеты, наклейки и полоса «С чего начать?» в тёмной теме — светлые
 * токены. В светлой теме правило ничего не меняет. */
.scene,
.day__card,
.rail,
.pick__stage,
.total,
.debts__stage,
.band--blue {
  --lb-bg: #dceeff;
  --lb-surface: #ffffff;
  --lb-surface-2: #e9e9e9;
  --lb-text: #000000;
  --lb-text-2: #4a4a4a;
  --lb-line: #d9d9d9;
  --lb-outline: #000000;
  --lb-accent: #000000;
  --lb-on-accent: #ffffff;
  --lb-card-border: 1px solid #000000;
  --w-sky: #dceeff;
  color: var(--lb-text);
}
.band--blue { --band: #4da2ff; --ribbon-fill: #fff; --ribbon-edge: #000; }
.band--blue .q { -webkit-text-stroke: 0; }
