/* ---------- Шрифты (файлы кладёт команда в /public/assets/fonts) ---------- */
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url('/assets/fonts/InterTight-Bold.woff2') format('woff2'); font-weight: 700 800; font-display: swap; }
@font-face { font-family: 'Advent Script'; src: url('/assets/fonts/Script.woff2') format('woff2'); font-display: swap; }
/* Prata — цифры с засечками (Google Fonts, лицензия OFL), файлы лежат у нас: сайт не ходит к Google. */
@font-face { font-family: 'Prata'; src: url('/assets/fonts/Prata-latin.woff2') format('woff2'); font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+2116; }
@font-face { font-family: 'Prata'; src: url('/assets/fonts/Prata-cyrillic.woff2') format('woff2'); font-display: swap; unicode-range: U+0400-045F, U+0490-0491; }

:root {
  --ink: #2A2C4A;
  --ink-soft: #5B5E7A;
  --red: #8B161C;
  --red-dark: #6E1015;
  --white: #FFFFFF;
  --bg: #FAF8F5;
  --bg2: #F0ECE6;
  --burg: #5A1220;
  --burg-dark: #45101A;
  --ivory: #FBF5EA;
  --line: #EADFCB;
  --gold: #C9A24A;
  --gold-light: #E7C979;
  --burned: #F1EFEC;
  --burned-ink: #9A97A3;
  --radius: 14px;
  --f-text: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --f-head: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --f-num: 'Prata', Georgia, 'Times New Roman', serif;
  --f-script: 'Advent Script', 'Segoe Script', 'Brush Script MT', 'Snell Roundhand', cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-text);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background-color: var(--bg2);
  overflow-x: hidden;
}
/* Фон отдельным слоем: «background-attachment: fixed» заставляет телефон перерисовывать страницу при прокрутке. */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%); pointer-events: none; }
a { color: var(--red); }
button { font: inherit; color: inherit; }
img, video { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

#snow, #confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#snow { z-index: 0; }
#confetti { z-index: 1000; }

.wrap { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 0 16px 40px; }
.narrow { max-width: 460px; margin: 0 auto; }

.loading { display: flex; gap: 10px; align-items: center; justify-content: center; min-height: 60vh; color: var(--ink-soft); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--bg2); border-top-color: var(--red); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Шапка: бордовая плашка ---------- */
.board {
  position: relative;
  margin: 28px 0 18px;
  padding: 24px 16px 20px;
  border-radius: 20px;
  background: var(--burg);
  box-shadow: 0 12px 30px rgba(90,18,32,.18);
  color: #FFF8EC;
  text-align: center;
}
.board .script { font-family: var(--f-script); font-size: clamp(30px, 8.4vw, 42px); line-height: 1.05; margin: 0 0 10px; color: var(--gold-light); letter-spacing: .01em; }
.board h1 { font-family: var(--f-head); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: clamp(20px, 6vw, 30px); line-height: 1.1; margin: 0; }
.board .sub { font-family: var(--f-head); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: 12px; opacity: .75; margin-top: 6px; }
.counter { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(231,201,121,.3); display: flex; align-items: baseline; justify-content: center; gap: 8px; flex-wrap: wrap; }
.counter .lbl { font-size: 15px; opacity: .9; }
.counter .n { font-family: var(--f-num); font-weight: 400; font-size: 40px; line-height: 1; color: #fff; }
.counter .ny { font-family: var(--f-script); font-size: 44px; color: var(--gold-light); }

.today-note {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 auto 16px; padding: 10px 18px; width: fit-content; max-width: 100%;
  background: var(--red); color: #fff; border-radius: 999px; font-weight: 600; font-size: 15px;
  box-shadow: 0 4px 12px rgba(139,22,28,.18);
}
.today-note svg { width: 20px; height: 20px; flex: none; }
.preview-bar { background: #FFF6E2; border: 1px solid var(--gold); border-radius: 12px; padding: 10px 14px; margin: 16px 0 0; font-size: 14px; }

/* ---------- Сетка окошек ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; } }

.tile {
  position: relative; overflow: hidden;
  aspect-ratio: 3 / 4; min-height: 44px; width: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 4px 6px;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 1px 2px rgba(42,44,74,.05);
  cursor: pointer; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.tile:active { transform: scale(.97); }
@media (hover: hover) { .tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(90,18,32,.10); } }
.tile .date { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; line-height: 1; padding: 3px 6px 4px; border-radius: 8px; }
.tile .num { font-family: var(--f-num); font-weight: 400; font-size: clamp(22px, 6.8vw, 32px); }
.tile .mon { font-family: var(--f-head); font-weight: 800; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; color: #8A8DA3; }
.tile .foot { position: relative; z-index: 2; margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; }
.tile .ico { width: 22px; height: 22px; }
.tile .ttl { font-size: 9.5px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding: 0 2px; overflow-wrap: normal; word-break: normal; hyphens: manual; }
@media (min-width: 700px) { .tile .ttl { font-size: 11px; } .tile .ico { width: 26px; height: 26px; } }
/* Узкая плитка: ярлык «сегодня» закрыл бы число — вместо него золотой уголок (плитку и так выделяет золотая рамка). */
@media (max-width: 419px) {
  .tile.is-today .today-chip { font-size: 0; color: transparent; overflow: hidden; padding: 0; width: 14px; height: 14px; border-bottom-left-radius: 12px; }
}
/* Телефоны: плитка компактнее, чтобы 3 строки названия влезали целиком. */
@media (max-width: 699px) {
  .tile { padding: 5px 3px 5px; }
  .tile .date { padding: 2px 6px 2px; }
  .tile .foot { gap: 1px; }
  .tile .ico { width: 17px; height: 17px; }
  .tile .tag { font-size: 8px; padding: 0 4px; }
}
/* Очень узкие экраны (старые iPhone SE, крупный текст в Safari): иконка типа уступает место 4-й строке названия. */
@media (max-width: 350px) {
  .tile { padding-left: 2px; padding-right: 2px; }
  .tile.is-opened .foot .ico { display: none; }
  .tile.is-burned .ttl { -webkit-line-clamp: 3; }
  .tile { padding-bottom: 4px; }
  .tile .tag { font-size: 7px; line-height: 1.3; padding: 0 3px; }
  .tile .ttl { -webkit-line-clamp: 4; font-size: 8.5px; line-height: 1.12; padding: 0 1px; }
}

/* ещё не наступило: замок */
.tile.is-future { background: #F6F5F2; border-color: #ECE9E3; color: #A6A8B6; box-shadow: none; }
.tile.is-future .mon { color: #B4B6C2; }

/* можно открыть / демо: матовая лента с бантом */
.tile.is-available, .tile.is-demo { background: var(--white); }
.tile.is-available::before, .tile.is-demo::before { /* вертикальная лента */
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 6.5%; transform: translateX(-50%); background: var(--red);
}
.tile.is-available::after, .tile.is-demo::after { /* горизонтальная лента */
  content: ''; position: absolute; left: 0; right: 0; top: 57%; height: 5%; transform: translateY(-50%); background: var(--red);
}
.tile.is-available .date, .tile.is-demo .date { background: var(--white); }
.tile .bow { position: absolute; z-index: 3; left: 50%; top: 57%; width: 60%; transform: translate(-50%, -52%); pointer-events: none; }
.tile.is-available .bow { animation: wiggle 3.2s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes wiggle { 0%, 86%, 100% { transform: translate(-50%, -52%) rotate(0); } 90% { transform: translate(-50%, -52%) rotate(-6deg); } 95% { transform: translate(-50%, -52%) rotate(5deg); } }
.tile.is-demo .foot, .tile.is-available .foot { z-index: 4; }
.tile.is-demo .ttl { background: rgba(255,255,255,.95); border-radius: 6px; padding: 2px 4px; }

/* открыто: слоновая кость с иконкой типа */
.tile.is-opened { background: var(--ivory); border-color: var(--line); }
.tile.is-opened .ico { color: var(--red); }

/* сгорело */
.tile.is-burned { background: var(--burned); color: var(--burned-ink); border: 1px dashed #D6D1C8; box-shadow: none; }
.tile.is-burned .mon { color: #ABA8B2; }
.tile.is-burned .tag { font-family: var(--f-head); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; background: #fff; color: var(--burned-ink); border-radius: 4px; padding: 1px 5px; }

/* сегодня */
.tile.is-today { border: 1.5px solid var(--gold); box-shadow: 0 0 0 3px rgba(201,162,74,.20), 0 6px 16px rgba(90,18,32,.10); }
.tile .today-chip { position: absolute; z-index: 5; top: 0; right: 0; background: var(--gold); color: #fff; font-family: var(--f-head); font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 5px; border-bottom-left-radius: 8px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin: 18px 0 0; font-size: 12px; color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend svg { width: 14px; height: 14px; }

.footer { margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; font-size: 14px; color: var(--ink-soft); }
.footer a, .linkbtn { color: var(--ink-soft); background: none; border: 0; padding: 10px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }

/* ---------- Кнопки, поля, карточки ---------- */
.card { background: var(--white); border-radius: 20px; padding: 20px 16px; border: 1px solid #F0EAE0; box-shadow: 0 10px 28px rgba(90,18,32,.07); }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; padding: 12px 18px; margin: 10px 0 0;
  border-radius: 999px; border: 0; cursor: pointer;
  background: var(--burg); color: #fff; font-family: var(--f-head); font-weight: 800; font-size: 16px; letter-spacing: .01em; text-align: center; text-decoration: none;
  box-shadow: 0 4px 12px rgba(90,18,32,.18);
  transition: background .15s;
}
.btn:hover { background: var(--burg-dark); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn.secondary { background: #fff; color: var(--burg); border: 1.5px solid var(--burg); box-shadow: none; }
.btn.secondary:hover { background: #FBF4F2; }
.btn svg { width: 20px; height: 20px; }
.btn-row { display: flex; gap: 10px; }
/* второстепенная ссылка-кнопка: тонкий контур, без заливки, меньше основной */
.btn-quiet {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; max-width: 100%;
  min-height: 40px; margin: 10px auto 0; padding: 7px 16px; border-radius: 999px;
  border: 1px solid #DCD5CA; background: transparent; color: var(--burg);
  font-size: 14px; font-weight: 600; text-decoration: none; text-align: center;
}
.btn-quiet:hover { border-color: var(--burg); background: #FBF7F2; }
.btn-quiet svg { width: 17px; height: 17px; flex: none; }
.btn-row .btn { flex: 1; }
label.field { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input[type=email], input[type=text], input[type=password], input[type=datetime-local] {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--ink);
  border: 1.5px solid #DCD5CA; border-radius: 12px; background: #fff;
}
input:focus { border-color: var(--burg); outline: none; box-shadow: 0 0 0 3px rgba(90,18,32,.12); }
input[aria-invalid=true] { border-color: var(--red); }
.err { color: var(--red); font-size: 14px; margin: 8px 0 0; font-weight: 600; }
.hint { color: var(--ink-soft); font-size: 14px; margin: 8px 0 0; }
.center { text-align: center; }
.small { font-size: 13px; color: var(--ink-soft); }

/* ---------- Окошко (лист поверх календаря) ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(42,44,74,.5); opacity: 0; transition: opacity .2s; }
.backdrop.show { opacity: 1; }
.sheet {
  position: fixed; z-index: 51; left: 0; right: 0; bottom: 0;
  max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--white); border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 -10px 30px rgba(42,44,74,.2);
}
.sheet.show { transform: none; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: #DDD6CC; margin: 0 auto 8px; }
@media (min-width: 640px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, calc(100vw - 32px)); border-radius: 22px; transform: translate(-50%, -46%); opacity: 0; transition: transform .25s, opacity .25s; padding: 20px 24px 24px; }
  .sheet.show { transform: translate(-50%, -50%); opacity: 1; }
  .sheet .grab { display: none; }
}
.sheet-head { display: flex; align-items: flex-start; gap: 10px; }
.sheet-head .t { flex: 1; min-width: 0; }
.sheet-date { font-family: var(--f-head); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--red); font-size: 13px; }
.sheet h2 { font-family: var(--f-head); font-weight: 800; text-transform: uppercase; font-size: 22px; line-height: 1.15; margin: 4px 0 0; letter-spacing: .02em; }
.x { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #F4F0EA; display: grid; place-items: center; cursor: pointer; }
.x svg { width: 20px; height: 20px; }
.notice { text-align: center; padding: 26px 8px 8px; }
.notice svg { width: 44px; height: 44px; color: var(--burned-ink); }
.notice p { font-size: 17px; margin: 10px 0 0; }

.block { margin: 18px 0 0; }
.block h3 { font-family: var(--f-head); font-weight: 700; font-size: 17px; margin: 0 0 6px; text-transform: uppercase; letter-spacing: .03em; }
.block p { margin: 6px 0 0; }
.block .media { border-radius: 14px; overflow: hidden; background: #0E0F1A; margin-top: 10px; }
.block video { width: 100%; max-height: 70vh; background: #000; }
.block .pic { border-radius: 14px; margin-top: 10px; width: 100%; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.soon { background: #F6F3EE; border-radius: 12px; padding: 14px; color: var(--ink-soft); text-align: center; font-size: 15px; }

/* карточки-листалка */
.cards { position: relative; margin-top: 10px; }
.cards-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: 14px; }
.cards-track::-webkit-scrollbar { display: none; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #DCD5CA; transition: background .2s, width .2s; }
.dots i.on { background: var(--red); width: 18px; border-radius: 4px; }
.cards .nav { display: none; }
@media (hover: hover) {
  .cards .nav { display: grid; place-items: center; position: absolute; top: 50%; transform: translateY(-70%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.15); cursor: pointer; }
  .cards .nav.prev { left: 8px; } .cards .nav.next { right: 8px; }
  .cards .nav svg { width: 20px; height: 20px; }
}

/* блок «Партнёр»: логотип → бренд → о бренде → промокод → товары → кнопка в магазин */
.pb-draft { background: #FFF6E2; border: 1px dashed var(--gold); border-radius: 10px; padding: 8px 12px; font-size: 13px; color: #7A5A12; margin-bottom: 12px; text-align: center; }
.pb-logo { display: flex; justify-content: center; }
.pb-logo img { max-width: min(220px, 70%); max-height: 84px; width: auto; height: auto; object-fit: contain; background: #fff; padding: 12px 18px; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(90,18,32,.06); box-sizing: content-box; }
.pb-brand { font-family: var(--f-head); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 20px; text-align: center; margin-top: 12px; }
.pb-about { color: var(--ink); font-size: 15px; line-height: 1.5; margin-top: 4px; }
.pb-about p { margin: 8px 0 0; }
.pb-promo { margin-top: 16px; padding: 14px; border-radius: 16px; background: var(--ivory); border: 1px solid var(--line); }
.pb-label { font-family: var(--f-head); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--red); text-align: center; }
.pb-promo .code { background: #fff; margin-top: 8px; }
.pb-promo .valid { margin-top: 8px; }
.pb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
@media (min-width: 640px) { .pb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
.pb-item { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pb-photo { position: relative; aspect-ratio: 1; background: #fff; border-bottom: 1px solid #F3EEE6; display: grid; place-items: center; }
.pb-photo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.pb-noimg svg { width: 34px; height: 34px; color: #D9CDB8; }
.pb-badge { position: absolute; top: 6px; left: 6px; font-family: var(--f-head); font-weight: 800; font-size: 10px; letter-spacing: .04em; color: #fff; background: var(--ink-soft); border-radius: 6px; padding: 2px 6px; }
.pb-ozon { background: #005BFF; }
.pb-wb { background: #A1128F; }
.pb-site { background: var(--ink); }
.pb-meta { padding: 8px 10px 0; flex: 1; }
.pb-title { font-weight: 600; font-size: 14px; line-height: 1.25; }
.pb-desc { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-price { font-family: var(--f-head); font-weight: 800; font-size: 15px; margin-top: 4px; color: var(--burg); }
.btn.pb-buy { width: auto; margin: 8px 10px 10px; min-height: 40px; padding: 6px 10px; font-size: 14px; display: flex; }
.pb > .btn:last-child { margin-top: 16px; }

/* промокод */
.code { margin-top: 10px; padding: 16px 10px; text-align: center; border: 2px dashed var(--gold); border-radius: 14px; background: #FFFBF0; font-family: var(--f-head); font-weight: 800; font-size: clamp(24px, 8vw, 34px); letter-spacing: .08em; word-break: break-all; user-select: all; }
.valid { text-align: center; font-size: 14px; color: var(--ink-soft); margin-top: 6px; }

/* лотерея */
.prize { font-family: var(--f-head); font-weight: 800; font-size: 20px; margin: 8px 0 0; }
.badge-ok { display: flex; align-items: center; gap: 10px; padding: 14px; margin-top: 12px; border-radius: 14px; background: #EEF7F1; color: #1F5B3A; font-weight: 600; }
.badge-ok svg { width: 22px; height: 22px; flex: none; }
.winners { list-style: none; padding: 0; margin: 10px 0 0; }
.winners li { padding: 10px 12px; border-radius: 10px; background: #FFFBF0; border: 1px solid var(--gold-light); margin-top: 6px; font-weight: 600; }

/* предсказание */
.prophecy {
  position: relative; margin-top: 12px; padding: 40px 26px 30px; border-radius: 18px; text-align: center;
  color: var(--ink); font-family: var(--f-head); font-weight: 700; font-size: clamp(19px, 5.2vw, 23px); line-height: 1.35;
  background: radial-gradient(ellipse at 50% 0%, #FFFFFF 0%, #FFFBF1 55%, #FBF3E1 100%);
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 6px #FFFBF1, inset 0 0 0 7px rgba(201,162,74,.55), 0 10px 24px rgba(139,22,28,.10);
}
.prophecy::before { /* звёздочка с золотыми линиями */
  content: '✦'; position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  width: 120px; font-size: 15px; line-height: 1; color: var(--gold);
  background: linear-gradient(90deg, transparent, var(--gold) 30%, transparent 30%, transparent 70%, var(--gold) 70%, transparent) center/100% 1px no-repeat;
}
.story-img { width: 100%; max-width: 280px; margin: 12px auto 0; border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }

/* ---------- интерактивные подарки ---------- */
.block h4 { font-family: var(--f-head); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; margin: 18px 0 8px; color: var(--red); }
.progress { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.progress .bar { flex: 1; height: 8px; border-radius: 4px; background: #EEE8DF; overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--red)); border-radius: 4px; transition: width .3s; }
.save-row { min-height: 22px; margin-top: 10px; text-align: center; }
.save-status { font-size: 13px; color: var(--ink-soft); }
.save-status.ok::before { content: '✓ '; color: #1F6B45; }
.save-status.bad { color: var(--red); font-weight: 600; }

/* вопросы с полями */
.questions .q { margin: 0 0 14px; }
.questions .qt { font-weight: 600; margin: 0 0 6px; }
.questions .qn { color: var(--red); margin-right: 6px; font-family: var(--f-head); }
.questions textarea {
  display: block; width: 100%; min-height: 64px; padding: 12px 14px; resize: vertical; overflow: hidden;
  font: inherit; font-size: 16px; line-height: 1.45; color: var(--ink);
  border: 1.5px solid #DCD5CA; border-radius: 12px; background: #FDFBF8;
}
.questions textarea:focus { border-color: var(--burg); outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(90,18,32,.12); }
.questions .letter textarea { min-height: 240px; background: #FFFBF0; border-color: var(--gold-light); }

/* подборка */
.collection .tracks { margin: 12px 0 4px; padding-left: 26px; font-size: 15px; }
.collection .tracks li { padding: 4px 0; }
.coll-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid #F0EAE0; }
.coll-item:last-of-type { border-bottom: 0; }
.coll-item .cover { flex: none; width: 84px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; background: #EEF1F5; box-shadow: 0 3px 10px rgba(42,44,74,.14); }
.kind-playlist .coll-item .cover { aspect-ratio: 1; }
.coll-item .cover.ph { display: grid; place-items: center; color: var(--ink-soft); }
.coll-item .cover.ph svg { width: 30px; height: 30px; }
.coll-item .meta { min-width: 0; flex: 1; }
.coll-item .ct { font-family: var(--f-head); font-weight: 700; font-size: 17px; line-height: 1.2; }
.coll-item .ca { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.coll-item .why { font-size: 15px; margin: 6px 0 0; }
.coll-item .why span { color: var(--red); font-weight: 600; }
.btn.small { min-height: 44px; padding: 8px 14px; font-size: 15px; width: auto; display: inline-flex; margin-top: 8px; }

/* готовые обои 9:16 — высота картинки ограничена, чтобы кнопка «Скачать» была видна без прокрутки */
.wp-card { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; }
.wp-card img {
  display: block; background: #F4F6F9; width: auto; height: min(50vh, 520px); max-width: 100%; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: 16px; box-shadow: 0 4px 14px rgba(42,44,74,.16); margin: 4px 0 2px;
}
.wp-card .btn { width: min(100%, 320px); }

/* анимация открытия */
.unwrap { display: grid; place-items: center; padding: 24px 0 10px; }
.gift { position: relative; width: 168px; height: 168px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 26px rgba(42,44,74,.18); transition: transform .4s ease .8s, opacity .4s ease .85s; }
.gift .rv, .gift .rh { position: absolute; background: var(--red); transition: transform .5s ease .3s; }
.gift .rv { top: 0; bottom: 0; left: 50%; width: 12px; margin-left: -6px; transform-origin: 50% 0; }
.gift .rh { left: 0; right: 0; top: 50%; height: 10px; margin-top: -5px; transform-origin: 0 50%; }
.gift .bow { position: absolute; left: 50%; top: 50%; width: 112px; transform: translate(-50%, -52%); transition: transform .55s ease, opacity .45s ease .15s; }
.unwrap.go .gift .bow { transform: translate(-50%, -150%) rotate(-25deg) scale(1.25); opacity: 0; }
.unwrap.go .gift .rv { transform: scaleY(0); }
.unwrap.go .gift .rh { transform: scaleX(0); }
.unwrap.go .gift { transform: scale(1.08); opacity: 0; }
.fade-in { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* демо */
.demo-cta { position: sticky; bottom: 0; z-index: 10; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(240,236,230,0), var(--bg2) 35%); margin-top: 18px; }
.demo-cta .btn { max-width: 460px; margin: 0 auto; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2000; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 15px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
