/* ============================================================
   Лендинг — бумажная лента чека.
   Узкая колонка здесь не ограничение, а форма: чек по природе узок.
   Рваные края и точечные выноски сделаны чистым CSS, без внешних ресурсов.
   ============================================================ */

body.landing { background: var(--ground); padding: 0 0 96px; }

.receipt {
  position: relative;
  width: 100%; max-width: 452px;
  margin: 22px auto;
  padding: 34px 26px 30px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(23,28,18,.07), 0 22px 48px rgba(23,28,18,.10);
  /* рваный зигзаг сверху и снизу */
  --zig: 11px;
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg)
      bottom / var(--zig) var(--zig) repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg)
      top / var(--zig) var(--zig) repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - var(--zig) * 2) no-repeat;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg)
      bottom / var(--zig) var(--zig) repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg)
      top / var(--zig) var(--zig) repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - var(--zig) * 2) no-repeat;
}
@media (max-width: 468px) { .receipt { margin: 14px auto; padding: 30px 20px 26px; } }

/* ---------- Шапка чека ---------- */
.r-head { text-align: center; padding-bottom: 4px; }
.r-logo {
  font-size: 30px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; line-height: 1; margin-bottom: 12px;
}
.r-meta {
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  letter-spacing: .04em; line-height: 1.7;
  font-variant-numeric: tabular-nums;
}

/* ---------- Разделители ---------- */
.r-rule { border: 0; height: 0; border-top: 1.5px dashed var(--line-strong); margin: 22px 0; }
.r-rule--bold { border-top: 2px solid var(--ink); }

/* ---------- Заголовок ---------- */
.r-hero { padding: 2px 0 4px; }
.r-h1 {
  font-size: clamp(28px, 8.2vw, 34px); font-weight: 800;
  line-height: 1.14; letter-spacing: -0.03em;
}
.r-lead { font-size: 15.5px; line-height: 1.62; color: var(--ink-2); margin-top: 14px; }

/* ---------- Подписи разделов ---------- */
.r-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 14px;
}
.r-label .ico { width: 16px; height: 16px; fill: var(--m1-ink); }
.r-label-hint { margin-left: auto; letter-spacing: 0; text-transform: none; font-weight: 600; }

/* ---------- Живая карточка дня ---------- */
.r-demo { padding: 24px 0 2px; }
.demo-stack { position: relative; height: 392px; }
.demo-card {
  position: absolute; inset: 0;
  background: var(--ground); border-radius: 18px;
  padding: 12px; display: flex; flex-direction: column; gap: 7px;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  box-shadow: 0 1px 2px rgba(23,28,18,.05), 0 8px 20px rgba(23,28,18,.08);
}
.demo-card.behind { transform: scale(.965) translateY(9px); opacity: .55; pointer-events: none; }
.demo-card.leaving { transition: transform .34s cubic-bezier(.4,0,.6,1), opacity .34s linear; opacity: 0; }
.demo-card.snap { transition: transform .32s cubic-bezier(.22,1,.36,1); }

.demo-panel { flex: 1; min-height: 0; border-radius: 13px; padding: 11px 12px 12px; display: flex; flex-direction: column; }
.demo-panel--m1 { background: var(--m1-soft); }
.demo-panel--snack { background: var(--snack-soft); }
.demo-panel--m2 { background: var(--m2-soft); }
.demo-top { display: flex; align-items: center; gap: 9px; flex: none; }
.demo-time {
  font-size: 13.5px; font-weight: 800; line-height: 1;
  padding: 5px 10px; border-radius: 999px; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.demo-panel--m1 .demo-time { background: var(--m1); }
.demo-panel--snack .demo-time { background: var(--snack); }
.demo-panel--m2 .demo-time { background: var(--m2); }
.demo-slot { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.demo-panel--m1 .demo-slot { color: var(--m1-ink); }
.demo-panel--snack .demo-slot { color: var(--snack-ink); }
.demo-panel--m2 .demo-slot { color: var(--m2-ink); }
.demo-name {
  font-size: 16px; font-weight: 700; line-height: 1.28;
  letter-spacing: -0.015em; margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.demo-meta { flex: none; margin-top: auto; padding-top: 7px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.demo-dots { display: flex; justify-content: center; gap: 7px; margin-top: 14px; }
.demo-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); display: block; transition: background .2s ease; }
.demo-dots i.on { background: var(--m1-ink); }

/* ---------- Строки чека с выносками ---------- */
.r-lines { padding: 2px 0; }
.rline { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; font-size: 15px; line-height: 1.5; }
.rline .k { color: var(--ink-2); }
.rline .dots {
  flex: 1; min-width: 18px; height: 0;
  border-bottom: 1.5px dotted var(--line-strong);
  transform: translateY(-4px);
}
.rline .v { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rline--step { gap: 12px; align-items: center; padding: 12px 0 3px; }
.rline--step .n {
  flex: none; width: 30px; height: 30px; border-radius: 10px;
  background: var(--m1-soft); color: var(--m1-ink);
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.rline--step .k { color: var(--ink); font-weight: 700; font-size: 16.5px; letter-spacing: -0.015em; }
.r-sub { font-size: 14px; line-height: 1.55; color: var(--ink-2); padding: 0 0 8px 42px; }

/* ---------- Текстовые блоки ---------- */
.r-block { padding: 20px 0 2px; }
.r-block + .r-block { border-top: 1.5px dashed var(--line-strong); }
.r-text { font-size: 15px; line-height: 1.62; color: var(--ink-2); }

/* ---------- Гравюры ----------
   Штриховая гравюра — единственный уместный на чеке вид изображения: она
   читается как оттиск краской на бумаге, а не как вклеенная фотография.
   Файлы с прозрачным фоном, штрих окрашен в цвет чернил интерфейса. */
.r-cut { margin: 24px 0 2px; text-align: center; }
.r-cut img {
  display: block; margin: 0 auto;
  width: 100%; max-width: 344px; height: auto;
}
.r-cut figcaption {
  margin-top: 10px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
/* Разделы: гравюра на поле, текст обтекает — как в печатном объявлении. */
.r-block { display: flow-root; }
.r-mark {
  float: right; width: 108px; height: auto;
  margin: 0 0 6px 14px;
  /* текст огибает сам штрих, а не прямоугольник картинки — как в печатном наборе */
  shape-margin: 12px;
}
.r-mark[src*="mark-season"] { shape-outside: url(../img/mark-season.webp?v=28); }
.r-mark[src*="mark-scales"] { shape-outside: url(../img/mark-scales.webp?v=28); }
.r-mark[src*="mark-bag"]    { shape-outside: url(../img/mark-bag.webp?v=28); }
.r-mark--tall { width: 88px; }
@media (max-width: 380px) { .r-mark { width: 92px; } .r-mark--tall { width: 76px; } }

/* ---------- Итого ---------- */
.r-total { padding: 6px 0 2px; }
.r-total-line { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.r-total-k { font-size: 15px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.r-total-v { font-size: 62px; font-weight: 800; line-height: .9; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.r-total-cap { text-align: right; font-size: 14px; color: var(--ink-2); margin-top: 6px; }

/* ---------- Действия ---------- */
.r-cta { display: flex; flex-direction: column; gap: 10px; padding: 6px 0 4px; }
.l-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 24px; border-radius: 15px;
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  text-decoration: none; transition: transform .14s cubic-bezier(.22,1,.36,1);
}
.l-btn:active { transform: scale(.98); }
.l-btn--primary { background: var(--m1); color: var(--ink); box-shadow: var(--lift); }
.l-btn--ghost { background: var(--ground); color: var(--ink); }
.r-note { font-size: 13.5px; color: var(--ink-3); line-height: 1.55; text-align: center; margin-top: 4px; }

/* ---------- Подвал ---------- */
.r-barcode { display: block; width: 100%; height: 44px; margin: 26px 0 14px; color: var(--ink); }
.r-foot { font-size: 12.5px; line-height: 1.6; color: var(--ink-3); text-align: center; margin-top: 8px; }
.r-foot a { color: var(--m1-ink); }

/* ---------- Плавающая кнопка входа ---------- */
.r-sticky {
  /* Прижимаем не к краю экрана, а к правому краю колонки чека:
     иначе на широком мониторе кнопка улетает от содержимого. */
  position: fixed; top: max(12px, env(safe-area-inset-top)); z-index: 40;
  right: max(12px, calc(50% - 214px));
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(23,28,18,.10), 0 10px 24px rgba(23,28,18,.10);
}
.l-resume {
  position: fixed; bottom: 14px; z-index: 45;
  left: max(14px, calc(50% - 226px)); right: max(14px, calc(50% - 226px));
  display: flex; align-items: center; justify-content: center; min-height: 54px;
  background: var(--m1); color: var(--ink); border-radius: 15px;
  font-size: 15px; font-weight: 700; text-decoration: none;
  box-shadow: var(--lift-2);
}

/* ---------- Правовой документ ---------- */
.doc { max-width: 452px; margin: 0 auto; padding: 22px 22px 44px; }
.doc-meta { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin: 10px 0 28px; }
.doc section { margin-bottom: 30px; }
.doc h2 { font-size: 19px; font-weight: 800; line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 12px; }
.doc p { font-size: 15px; line-height: 1.65; color: var(--ink-2); margin-bottom: 13px; }
.doc ul { margin: 0 0 13px 0; padding-left: 20px; }
.doc li { font-size: 15px; line-height: 1.65; color: var(--ink-2); margin-bottom: 8px; }
.doc b { color: var(--ink); font-weight: 700; }
.doc a { color: var(--m1-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px;
  background: var(--surface-2); border-radius: 6px; padding: 2px 6px; color: var(--ink);
}
.l-top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 452px; margin: 0 auto; padding: 16px 22px;
}
a.l-logo { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
a.l-signin {
  display: inline-flex; align-items: center; text-decoration: none;
  font-size: 14px; font-weight: 700; padding: 10px 18px;
  border-radius: 999px; min-height: 44px;
  background: var(--surface); color: var(--ink); box-shadow: var(--lift);
}
.l-foot { border-top: 1px solid var(--line); padding: 22px; max-width: 452px; margin: 0 auto; }
.l-foot p { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; text-align: center; }
.l-foot a { color: var(--m1-ink); }
.l-h2 { font-size: clamp(25px, 6.6vw, 32px); font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; }

/* ---------- Вход ---------- */
.auth-veil {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(23, 28, 18, .38);
  display: flex; flex-direction: column; align-items: center;
  padding: 16px; overflow-y: auto; overscroll-behavior: contain;
}
.auth-box {
  width: 100%; max-width: 420px; margin-top: auto;
  background: var(--ground); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--lift-2);
  animation: rise .26s cubic-bezier(.22,1,.36,1);
}
@media (min-width: 600px) { .auth-box { margin-bottom: auto; } }
.auth-head { display: flex; align-items: center; justify-content: space-between; }
.auth-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.025em; }
.auth-close {
  position: relative;
  width: 40px; height: 40px; border-radius: 12px; font-size: 26px; line-height: 1;
  color: var(--ink-2); background: var(--surface); box-shadow: var(--lift);
}
.auth-close::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); width: 44px; height: 44px;
}
.auth-tabs { display: flex; gap: 3px; background: var(--surface-2); padding: 3px; border-radius: 12px; margin: 18px 0 20px; }
.auth-tab { flex: 1; padding: 11px 8px; border-radius: 10px; min-height: 44px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.auth-tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--lift); }
.auth-submit { width: 100%; }
.auth-submit:disabled { opacity: .6; }
.auth-note { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; margin-top: 16px; }
