/* Хроника · общая дизайн-система клиентских страниц. Механики — по разбору maryrose.by, палитра своя:
   тёплая бумага, чернила, терракота. Один изинг на всё, стекло через blur. */

@font-face { font-family: "Playfair"; src: url(/assets/fonts/playfair-display-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Playfair"; src: url(/assets/fonts/playfair-display-400italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Playfair"; src: url(/assets/fonts/playfair-display-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/assets/fonts/inter-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/assets/fonts/inter-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/assets/fonts/inter-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #F6F1E8;
  --bg-2: #EEE6D8;
  --card: #FBF8F2;
  --ink: #1F1A15;
  --ink-2: #4B4238;
  --mute: #8D806D;
  --pale: #CFC3B0;
  --line: rgba(31,26,21,.09);
  --line-2: rgba(31,26,21,.16);
  --accent: #A8522E;
  --accent-2: #D08A5E;
  --peach: #F1C7A4;
  --rose: #E7B3A0;
  --sand: #E8D8BA;
  --glass: rgba(251,248,242,.58);
  --glass-dark: rgba(60,48,38,.22);
  --e: cubic-bezier(.32,.72,.3,1);
  --serif: "Playfair", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --r-s: 10px; --r-m: 14px; --r-l: 18px; --r-xl: 28px; --r-xxl: 40px; --pill: 999px;
  --gut: clamp(16px, 3.5vw, 50px);
  --topbar: 30px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; padding-top: var(--topbar);
  background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 var(--sans); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
h1, h2, h3, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; margin: 0; }
canvas { display: block; }
::selection { background: rgba(208,138,94,.32); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
em, .em { font-family: var(--serif); font-style: italic; color: var(--accent); font-weight: 400; }

/* ---------- кастомный курсор (только мышь) ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; display: none; }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
  html.has-cursor input, html.has-cursor textarea, html.has-cursor [contenteditable] { cursor: text !important; }
  html.has-cursor .cursor { display: block; }
}
.cursor__ring {
  position: absolute; left: 0; top: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; background: var(--ink);
  display: grid; place-items: center; overflow: hidden;
  transition: width .38s var(--e), height .38s var(--e), margin .38s var(--e), background .3s, opacity .2s, box-shadow .3s;
}
.cursor__label {
  font: 600 10px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
  opacity: 0; transform: scale(.6); transition: opacity .25s, transform .38s var(--e); white-space: nowrap;
}
.cursor.is-hover .cursor__ring { width: 34px; height: 34px; margin: -17px 0 0 -17px; background: rgba(168,82,46,.14); box-shadow: inset 0 0 0 1px rgba(168,82,46,.35); }
.cursor.is-label .cursor__ring {
  width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 10px 30px -12px rgba(60,40,20,.35);
}
.cursor.is-label.is-wide .cursor__ring { width: 104px; height: 104px; margin: -52px 0 0 -52px; }
.cursor.is-label .cursor__label { opacity: 1; transform: none; }
.cursor.is-text .cursor__ring, .cursor.is-hidden .cursor__ring { opacity: 0; }
.cursor.is-down .cursor__ring { transform: scale(.82); }

/* ---------- бегущая строка сверху ---------- */
.ticker {
  position: fixed; inset: 0 0 auto 0; height: var(--topbar); z-index: 70;
  background: var(--ink); color: rgba(246,241,232,.82); overflow: hidden;
  font: 500 12px/var(--topbar) var(--sans); letter-spacing: .01em;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track { display: flex; width: max-content; animation: tick 46s linear infinite; }
.ticker__track span { padding-right: 56px; white-space: nowrap; }
.ticker__track span::before { content: "✶"; color: var(--accent-2); margin-right: 14px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: var(--topbar); z-index: 60;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px var(--gut); transition: background .4s, box-shadow .4s, -webkit-backdrop-filter .4s, backdrop-filter .4s;
}
.top.is-stuck { background: rgba(246,241,232,.72); -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5); box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 600 17px/1 var(--sans); letter-spacing: -.03em; justify-self: start; }
.brand__mark { width: 22px; height: 22px; }
.top__order { font: 500 13px/1 var(--sans); color: var(--mute); letter-spacing: -.01em; text-align: center; }
.top__order b { color: var(--ink); font-weight: 500; }
.save {
  justify-self: end; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px;
  border-radius: var(--pill); background: var(--glass); font: 500 12.5px/1 var(--sans); color: var(--ink-2);
  -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: inset 0 0 0 1px var(--line);
}
.save i { width: 7px; height: 7px; border-radius: 50%; background: #7A9A6A; transition: transform .45s var(--e), background .3s; }
.save.is-pulse i { animation: pulse .9s var(--e); }
.save.is-off i { background: var(--accent-2); }
@keyframes pulse { 0% { transform: scale(1); } 40% { transform: scale(1.9); } 100% { transform: scale(1); } }
@media (max-width: 720px) {
  .top { grid-template-columns: 1fr auto; }
  .top__order { display: none; }
  .save span { display: none; }
  .save { padding: 0 11px; }
}

/* ---------- кнопки ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px;
  border-radius: var(--pill); font: 500 15px/1 var(--sans); letter-spacing: -.015em; white-space: nowrap;
  transition: background .18s, color .18s, box-shadow .18s, transform .18s var(--e);
}
.btn:active { transform: scale(.97); }
.btn--ink { background: var(--ink); color: var(--bg); }
.btn--ink:hover { background: #000; }
.btn--ink .btn__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); transition: transform .38s var(--e); }
.btn--ink:hover .btn__dot { transform: scale(1.5); }
.btn--glass { background: var(--glass); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.btn--glass:hover { background: rgba(251,248,242,.9); }
.btn--ghost { color: var(--ink-2); padding: 0 14px; }
.btn--ghost:hover { color: var(--ink); }
.btn--sm { height: 36px; padding: 0 16px; font-size: 13.5px; }

/* перекат букв при наведении */
.roll { --rh: 1.3em; display: inline-block; height: var(--rh); overflow: hidden; vertical-align: middle; position: relative; z-index: 1; }
.roll > span { display: flex; height: var(--rh); align-items: center; }
.roll b { display: inline-block; font-weight: inherit; white-space: pre; transition: transform .38s var(--e); transition-delay: calc(var(--i) * 22ms); }
:is(a, button, .rollhost):hover > .roll b, :is(a, button):focus-visible > .roll b { transform: translateY(calc(var(--rh) * -1)); }

/* ---------- появление при прокрутке ---------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .55s var(--e), transform .55s var(--e); transition-delay: var(--d, 0s); }
[data-reveal].is-in { opacity: 1; transform: none; }
.sec-mark { display: flex; align-items: center; gap: 10px; font: 500 14px/1 var(--sans); color: var(--ink-2); margin-bottom: clamp(18px, 3vh, 34px); }
.sec-mark i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; transform: scale(0); transition: transform .45s var(--e); }
.sec-mark em { font: inherit; color: inherit; opacity: 0; transform: translateX(-14px); transition: opacity .5s .12s, transform .5s var(--e) .12s; display: inline-block; }
.sec-mark.is-in i { transform: scale(1); }
.sec-mark.is-in em { opacity: 1; transform: none; }
.sec-mark .n { color: var(--mute); margin-left: 4px; }

/* слова заголовка — построчно снизу */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform .7s var(--e); transition-delay: calc(var(--i) * 40ms + var(--d, 0s)); }
.split.is-in .w > span { transform: none; }

/* ---------- смена слова ---------- */
.swap { display: inline-grid; justify-items: start; vertical-align: top; overflow: hidden; margin: -.12em 0 -.18em; padding: .12em 0 .18em; transition: width .42s var(--e); }
.swap__word { grid-area: 1 / 1; white-space: pre; width: max-content; }
.swap__word b { display: inline-block; font-weight: inherit; }
.swap__word:not(.is-in):not(.is-out) { visibility: hidden; }
.swap__word.is-in b { animation: swap-in .5s var(--e) both; animation-delay: calc(var(--i) * 14ms); }
.swap__word.is-out b { animation: swap-out .36s var(--e) both; animation-delay: calc(var(--i) * 10ms); }
@keyframes swap-in { from { transform: translateY(125%); } to { transform: none; } }
@keyframes swap-out { from { transform: none; } to { transform: translateY(-125%); } }

/* ============ ВСТУПЛЕНИЕ ============ */
.hero { position: relative; min-height: calc(100svh - var(--topbar) - 60px); display: flex; flex-direction: column; justify-content: center; padding-block: 40px 120px; overflow: hidden; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__glow { position: absolute; z-index: 0; width: 70vmax; height: 70vmax; left: 50%; top: 58%; transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(241,199,164,.55), rgba(231,179,160,.18) 55%, transparent 75%); filter: blur(10px); pointer-events: none; }
.hero__in { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; align-items: center; }
.pill-badge { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 13px 0 9px; border-radius: var(--pill); background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6); box-shadow: inset 0 0 0 1px var(--line); font: 500 12.5px/1 var(--sans); color: var(--ink-2); }
.pill-badge i { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: #fff; font: 600 9px/1 var(--sans); font-style: normal; }
.hero h1 { margin-top: 26px; font: 400 clamp(40px, 7.4vw, 104px)/1.02 var(--serif); letter-spacing: -.025em; max-width: 13ch; }
.hero h1 .swap { color: var(--accent); font-style: italic; }
.hero__lede { margin-top: 26px; max-width: 520px; font: 400 clamp(16px, 1.4vw, 18px)/1.55 var(--sans); color: var(--ink-2); }
.hero__cta { margin-top: 34px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero__foot { position: absolute; z-index: 1; left: var(--gut); right: var(--gut); bottom: 24px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.hero__foot p { max-width: 300px; font: 500 13.5px/1.45 var(--sans); color: var(--ink-2); text-align: left; }
.hero__card { display: flex; gap: 14px; align-items: center; padding: 10px 12px 10px 10px; border-radius: var(--r-l); max-width: 340px; background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 14px 40px -20px rgba(60,40,20,.35); text-align: left; }
.hero__card .ph { flex: none; width: 54px; height: 54px; border-radius: 12px; background: linear-gradient(140deg, var(--peach), var(--rose) 50%, var(--accent-2)); display: grid; place-items: center; color: #fff; font: 400 26px/1 var(--serif); font-style: italic; }
.hero__card .k { font: 500 11px/1 var(--sans); color: var(--mute); display: flex; align-items: center; gap: 6px; }
.hero__card .k::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.hero__card .t { margin-top: 6px; font: 500 13.5px/1.35 var(--sans); }
.scroll-cue { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--sans); color: var(--mute); }
.scroll-cue i { width: 1px; height: 26px; background: linear-gradient(var(--mute), transparent); animation: cue 2.2s var(--e) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 720px) {
  .hero { padding-bottom: 170px; }
  .hero__foot { flex-direction: column; align-items: stretch; }
  .hero__foot p { display: none; }
  .hero__card { max-width: none; }
}

/* заголовок секции */
.sec { padding-block: clamp(80px, 14vh, 160px); position: relative; }
.sec__head { text-align: center; max-width: 820px; margin: 0 auto clamp(40px, 7vh, 80px); }
.sec__head h2 { font: 400 clamp(32px, 4.4vw, 60px)/1.06 var(--serif); letter-spacing: -.02em; }
.sec__head h2 .soft { color: var(--mute); }
.sec__head p { margin-top: 18px; font: 400 17px/1.55 var(--sans); color: var(--ink-2); }

/* ---------- финальный призыв + подвал ---------- */
.final { text-align: center; padding-block: clamp(90px, 16vh, 180px) 60px; }
.final h2 { font: 400 clamp(38px, 6vw, 84px)/1.02 var(--serif); letter-spacing: -.025em; }
.final p { margin: 20px auto 0; max-width: 480px; font: 400 17px/1.55 var(--sans); color: var(--ink-2); }
.final .btn { margin-top: 34px; height: 54px; padding: 0 28px; font-size: 16px; }
.foot { position: relative; padding: 0 var(--gut) 120px; overflow: hidden; }
.foot__canvas { width: 100%; height: 220px; }
.foot__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-top: -40px; position: relative; }
.foot__sign { font: 400 clamp(22px, 2.4vw, 30px)/1.2 var(--serif); font-style: italic; }
.foot__links { display: flex; gap: 18px; flex-wrap: wrap; font: 500 13px/1 var(--sans); color: var(--mute); }
.foot__links a:hover { color: var(--ink); }

/* ---------- плавающая стеклянная панель ---------- */
.fbar { position: fixed; z-index: 65; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translate(-50%, 24px); opacity: 0; visibility: hidden; transition: opacity .3s, transform .45s var(--e), visibility .3s; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fbar.is-shown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
/* скрытое меню занимает место над панелью — пропускаем клики сквозь него */
.fbar { pointer-events: none; }
.fbar__row, .fmenu.is-open { pointer-events: auto; }
.fbar__row {
  display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--pill); max-width: calc(100vw - 24px);
  background: rgba(120,98,78,.2); -webkit-backdrop-filter: blur(40px) saturate(1.6); backdrop-filter: blur(40px) saturate(1.6);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 0 12px 36px -16px rgba(60,40,20,.4);
}
.fbar__pill { height: 36px; padding: 0 14px; border-radius: var(--pill); display: inline-flex; align-items: center; gap: 8px; font: 500 13.5px/1 var(--sans); letter-spacing: -.015em; color: var(--ink); background: rgba(255,252,246,.42); white-space: nowrap; transition: background .2s, color .2s, opacity .2s; }
.fbar__pill:hover { background: rgba(255,252,246,.8); }
.fbar__pill.is-ink { background: var(--ink); color: var(--bg); }
.fbar__pill.is-ink:hover { background: #000; }
.fbar__pill[disabled] { opacity: .35; pointer-events: none; }
.fbar__step { min-width: 0; }
.fbar__step .no { font: 400 15px/1 var(--serif); font-style: italic; color: var(--accent); }
.fbar__step .nm { overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }
.fbar__ring { width: 18px; height: 18px; transform: rotate(-90deg); flex: none; }
.fbar__ring circle { fill: none; stroke-width: 2.4; }
.fbar__ring .bg { stroke: rgba(31,26,21,.14); }
.fbar__ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .6s var(--e); }
.fmenu { order: -1; width: min(360px, calc(100vw - 24px)); padding: 8px; border-radius: 24px; background: rgba(251,248,242,.72); -webkit-backdrop-filter: blur(40px) saturate(1.6); backdrop-filter: blur(40px) saturate(1.6); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 24px 60px -24px rgba(60,40,20,.45);
  transform-origin: 50% 100%; transform: translateY(10px) scale(.96); opacity: 0; visibility: hidden; transition: opacity .25s, transform .4s var(--e), visibility .25s; }
.fmenu.is-open { opacity: 1; visibility: visible; transform: none; }
.fmenu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; text-align: left; font: 500 14.5px/1.2 var(--sans); transition: background .18s; }
.fmenu button:hover { background: rgba(31,26,21,.06); }
.fmenu button.is-on { background: var(--ink); color: var(--bg); }
.fmenu button .no { width: 26px; font: 400 15px/1 var(--serif); font-style: italic; color: var(--accent); }
.fmenu button.is-on .no { color: var(--accent-2); }
.fmenu button .st { margin-left: auto; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); flex: none; }
.fmenu button .st.done { background: var(--accent); box-shadow: none; }
@media (max-width: 520px) {
  .fbar__pill { padding: 0 12px; }
  .fbar__pill .lbl { display: none; }
  .fbar__step .nm { max-width: 42vw; }
}

/* ---------- стеклянная записка от редактора ---------- */
.note { position: fixed; z-index: 66; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); width: min(620px, calc(100vw - 24px)); transform: translate(-50%, 40px); opacity: 0; visibility: hidden;
  display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 18px; border-radius: 22px; background: rgba(251,248,242,.74); -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 20px 50px -24px rgba(60,40,20,.45); transition: opacity .4s, transform .55s var(--e), visibility .4s; }
.note.is-shown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.note .ic { flex: none; font: 400 24px/1 var(--serif); font-style: italic; color: var(--accent); }
.note p { flex: 1; font: 500 13.5px/1.45 var(--sans); color: var(--ink-2); }
.note p b { color: var(--ink); font-weight: 500; }
body.note-up .fbar { bottom: calc(max(16px, env(safe-area-inset-bottom)) + var(--note-h, 80px) + 10px); }

/* ============ АНКЕТА ============ */
#flow, #flow2 { padding-bottom: 160px; }
body.note-up #flow, body.note-up #flow2 { padding-bottom: calc(var(--note-h, 80px) + 190px); }
.view-enter { animation: viewin .7s var(--e) both; }
@keyframes viewin { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.step { display: none; padding-top: clamp(30px, 7vh, 80px); }
.step.is-active { display: block; }
.step.is-leaving { display: block; animation: stepout .32s var(--e) both; }
@keyframes stepout { to { opacity: 0; transform: translateY(-16px); } }
.step__head { max-width: 860px; }
.step__head h1, .step__head h2 { font: 400 clamp(36px, 5.4vw, 72px)/1.04 var(--serif); letter-spacing: -.025em; }
.step__lede { margin-top: 20px; max-width: 640px; font: 400 clamp(16px, 1.3vw, 18px)/1.6 var(--sans); color: var(--ink-2); }
.hint { margin-top: 12px; max-width: 640px; font: 400 14.5px/1.55 var(--sans); color: var(--mute); }
.hint i { font-family: var(--serif); color: var(--ink-2); }
.narrow { max-width: 820px; }

/* поля */
.q { display: block; margin-top: 18px; padding: clamp(20px, 2.4vw, 30px); border-radius: var(--r-xl); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .3s var(--e), transform .45s var(--e); }
.q:focus-within { box-shadow: inset 0 0 0 1px rgba(168,82,46,.45), 0 24px 50px -36px rgba(120,60,20,.45); }
.q__lab { display: block; font: 500 clamp(18px, 1.6vw, 21px)/1.3 var(--sans); letter-spacing: -.02em; }
.q__sub { display: block; margin-top: 6px; font: 400 14.5px/1.5 var(--sans); color: var(--mute); }
.q__key { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; height: 24px; padding: 0 10px; border-radius: var(--pill); background: rgba(168,82,46,.1); color: var(--accent); font: 500 12px/1 var(--sans); }
.ta, .in {
  width: 100%; display: block; margin-top: 14px; border: 0; outline: 0; border-radius: var(--r-m); background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line); padding: 14px 16px; font: 400 17px/1.6 var(--sans); color: var(--ink);
  transition: box-shadow .2s, background .2s; -webkit-appearance: none; appearance: none;
}
.ta { min-height: 128px; resize: vertical; }
.ta.tall { min-height: 220px; }
.ta:focus, .in:focus { background: #FFFDF8; box-shadow: inset 0 0 0 1.5px var(--accent); }
.ta::placeholder, .in::placeholder { color: #B5A894; }
.q--stop { background: var(--ink); color: var(--bg); box-shadow: none; }
.q--stop .q__sub { color: rgba(246,241,232,.62); }
.q--stop .q__key { background: rgba(208,138,94,.18); color: var(--accent-2); }
.q--stop .ta { background: rgba(246,241,232,.07); color: var(--bg); box-shadow: inset 0 0 0 1px rgba(246,241,232,.14); }
.q--stop .ta:focus { box-shadow: inset 0 0 0 1.5px var(--accent-2); background: rgba(246,241,232,.1); }
.q--stop .rec-start, .q--stop .rec-btn { color: rgba(246,241,232,.8); box-shadow: inset 0 0 0 1px rgba(246,241,232,.2); }

/* голосовые */
.rec { margin-top: 10px; }
.rec-start, .rec-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: var(--pill); box-shadow: inset 0 0 0 1px var(--line-2); font: 500 13px/1 var(--sans); color: var(--ink-2); transition: background .18s, color .18s, box-shadow .18s; }
.rec-start:hover, .rec-btn:hover { background: rgba(168,82,46,.08); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(168,82,46,.35); }
.rec-start .mic { width: 8px; height: 8px; border-radius: 50%; background: #C8462D; }
.rec-live, .rec-done { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #C8462D; animation: pulse 1.4s infinite; }
.rec-dot.paused { animation: none; opacity: .4; }
.rec-time { font: 500 14px/1 var(--sans); font-variant-numeric: tabular-nums; min-width: 46px; }
.rec-meter { width: 80px; height: 4px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rec-meter i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .08s; }
.rec-note { font: 500 13px/1.3 var(--sans); color: var(--mute); }
.rec-err { font: 500 13px/1.4 var(--sans); color: var(--accent); }
.rec audio { width: 100%; max-width: 360px; height: 36px; }

/* ---------- шаг «Рассказы»: закреплённое оглавление + карточки ---------- */
.stories > * { min-width: 0; }
.stories { margin-top: clamp(30px, 5vh, 56px); display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: clamp(20px, 4vw, 60px); align-items: start; }
.toc { position: sticky; top: calc(var(--topbar) + 84px); }
.toc__t { font: 500 12px/1 var(--sans); color: var(--mute); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.toc li { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; font: 400 19px/1.25 var(--serif); color: var(--pale); transition: color .35s var(--e), transform .35s var(--e); transform-origin: 0 50%; cursor: pointer; }
.toc li .no { font-style: italic; width: 28px; flex: none; font-size: 15px; }
.toc li.is-on { color: var(--ink); transform: scale(1.04); }
.toc li.is-on .no { color: var(--accent); }
.toc li.is-done .tt::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.story { scroll-margin-top: calc(var(--topbar) + 90px); margin-bottom: 18px; }
.story__head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.story__no { font: 400 30px/1 var(--serif); font-style: italic; color: var(--accent); }
.story__t { font: 400 clamp(22px, 2.2vw, 30px)/1.2 var(--serif); letter-spacing: -.015em; flex: 1; min-width: 200px; }
.story__w { font: 500 13px/1 var(--sans); color: var(--mute); }
.ment { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
.ment__t { font: 500 13px/1.3 var(--sans); color: var(--ink-2); }
.ment__t span { color: var(--mute); font-weight: 400; }
.ment__groups { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tags { min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; border-radius: var(--r-m); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.tags:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
.tags .k { font: 500 11px/1 var(--sans); color: var(--mute); padding: 0 4px 0 6px; text-transform: uppercase; letter-spacing: .06em; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 11px; border-radius: var(--pill); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font: 500 13px/1 var(--sans); animation: tagin .4s var(--e) both; }
.tag button { width: 18px; height: 18px; border-radius: 50%; color: var(--mute); font-size: 13px; display: grid; place-items: center; }
.tag button:hover { background: rgba(168,82,46,.12); color: var(--accent); }
@keyframes tagin { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.tags input { flex: 1; min-width: 90px; border: 0; outline: 0; background: transparent; font: 400 14.5px/1 var(--sans); padding: 6px 4px; }
@media (max-width: 900px) {
  .stories { grid-template-columns: 1fr; }
  .toc { top: calc(var(--topbar) + 62px); z-index: 5; margin-inline: calc(var(--gut) * -1); padding: 8px var(--gut); background: rgba(246,241,232,.8); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
  .toc__t { display: none; }
  .toc ul { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .toc ul::-webkit-scrollbar { display: none; }
  .toc li { flex: none; padding: 7px 12px; border-radius: var(--pill); font: 500 13px/1 var(--sans); box-shadow: inset 0 0 0 1px var(--line); color: var(--mute); transform: none !important; max-width: 200px; }
  .toc li .no { width: auto; font: 400 14px/1 var(--serif); font-style: italic; }
  .toc li .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .toc li.is-on { background: var(--ink); color: var(--bg); box-shadow: none; }
  .ment__groups { grid-template-columns: 1fr; }
}

/* ---------- финальный шаг ---------- */
.sum { margin-top: clamp(30px, 5vh, 52px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sum__c { padding: 22px; border-radius: var(--r-xl); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.sum__c b { display: block; font: 400 clamp(38px, 4vw, 56px)/1 var(--serif); letter-spacing: -.02em; }
.sum__c span { display: block; margin-top: 8px; font: 500 13.5px/1.3 var(--sans); color: var(--mute); }
.checklist { margin-top: 18px; display: grid; gap: 8px; }
.checklist button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: var(--r-l); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-align: left; font: 500 15px/1.3 var(--sans); transition: box-shadow .2s, transform .3s var(--e); }
.checklist button:hover { box-shadow: inset 0 0 0 1px rgba(168,82,46,.45); transform: translateX(4px); }
.checklist .st { width: 20px; height: 20px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px var(--line-2); display: grid; place-items: center; font-size: 11px; color: #fff; }
.checklist .st.ok { background: var(--accent); box-shadow: none; }
.checklist .go { margin-left: auto; color: var(--mute); font-size: 13px; }
.send-row { margin-top: 28px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.send-row .btn--ink { height: 54px; padding: 0 28px; font-size: 16px; }
@media (max-width: 720px) { .sum { grid-template-columns: 1fr 1fr; } }

.letter { position: relative; max-width: 680px; margin-top: 30px; padding: clamp(26px, 4vw, 48px); border-radius: var(--r-xxl); background: #FFFCF6; box-shadow: 0 40px 80px -50px rgba(80,40,10,.5), inset 0 0 0 1px var(--line); }
.letter p { font: 400 clamp(17px, 1.5vw, 19px)/1.65 var(--serif); color: var(--ink); }
.letter p + p { margin-top: 14px; }
.letter .sign { margin-top: 26px; font-style: italic; color: var(--accent); }
.check-draw { width: 74px; height: 74px; }
.check-draw circle { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 1s var(--e) .1s forwards; }
.check-draw path { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .6s var(--e) .8s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- анкета №2 ---------- */
.a2q { margin-top: 12px; }
.a2q .q__key { margin-bottom: 8px; }
.a2-ch { scroll-margin-top: calc(var(--topbar) + 90px); margin-bottom: 40px; }
.a2-ch__h { display: flex; align-items: baseline; gap: 14px; padding-bottom: 6px; }
.a2-ch__h .no { font: 400 34px/1 var(--serif); font-style: italic; color: var(--accent); }
.a2-ch__h h3 { font: 400 clamp(24px, 2.6vw, 34px)/1.15 var(--serif); letter-spacing: -.02em; }

/* тост */
.toast { position: fixed; z-index: 90; left: 50%; top: calc(var(--topbar) + 74px); transform: translate(-50%, -14px); opacity: 0; pointer-events: none; height: 40px; padding: 0 16px; border-radius: var(--pill); display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--bg); font: 500 13.5px/1 var(--sans); transition: opacity .25s, transform .45s var(--e); box-shadow: 0 16px 40px -20px rgba(0,0,0,.5); }
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.toast::before { content: "✶"; color: var(--accent-2); }

/* ---------- меньше движения ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-reveal], .split .w > span { opacity: 1 !important; transform: none !important; }
  .sec-mark i, .sec-mark em { opacity: 1; transform: none; }
  .ticker__track { animation: none; }
}
