/* Жил-был ты — страница сервиса. Сетка и кегли по замерам docs/style/design-extended.md, палитра и рисунки свои. */

:root {
  --paper: #ffffff;
  --ink: #1d1a17;
  --graphite: #4d4741;
  --pebble: #8a847d;
  --fog: #aaa49c;
  --canvas: #faf7f2;
  --oat: #f4efe5;
  --line: #f0ebe2;
  --char: #343433;
  --night: #1c1e3f;
  --night-2: #262a57;

  --orange: #e8552d;
  --blue: #1f7fe6;
  --mint: #0fa56c;
  --honey: #c98500;
  --lilac: #7b5ad6;
  --butter: #ffcd6c;
  --acc: var(--orange);

  --display: 'Onest', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --tale: 'Literata', Georgia, 'Times New Roman', serif;

  --r-panel: 20px;
  --r-card: 16px;
  --r-pill: 32px;
  --glow: 0 1px 6px rgba(40, 30, 20, .05), 0 0 24px rgba(40, 30, 20, .06);
  --ring: inset 0 0 0 1px var(--line);
  --gap: 72px;
  --pad: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--paper); color: var(--graphite);
  font: 400 17px/1.53 var(--body); letter-spacing: -0.22px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.sprite { position: absolute; }

.wrap { width: 100%; max-width: 1072px; margin: 0 auto; padding: 0 var(--pad); }
.wrap--narrow { max-width: 780px; }

/* Наклейки */
.st { width: 64px; height: 64px; overflow: visible; filter: url(#stk) drop-shadow(0 2px 4px rgba(40, 30, 20, .16)); flex: none; }
.st .o { stroke: var(--char); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.st .l { fill: none; stroke: var(--char); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.st .l--soft { stroke-opacity: .32; }
.st .f { fill: var(--char); }
.ic { width: 20px; height: 20px; flex: none; }

@keyframes bob-a { 0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); } 50% { transform: translateY(-7px) rotate(calc(var(--rot, 0deg) + 3deg)); } }
@keyframes bob-b { 0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); } 50% { transform: translateY(6px) rotate(calc(var(--rot, 0deg) - 4deg)); } }
.fl { animation: bob-a 6s ease-in-out infinite; }
.fl--b { animation-name: bob-b; animation-duration: 7.5s; }
.fl--c { animation-duration: 5s; animation-delay: -2s; }

/* Кнопки-пилюли */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 26px; border-radius: var(--r-pill);
  font: 500 17px/1 var(--body); letter-spacing: -0.22px; white-space: nowrap;
  transition: transform .18s ease, background-color .18s ease;
}
.pill:active { transform: scale(.97); }
.pill--dark { background: var(--ink); color: #fff; }
.pill--dark:hover { background: #000; }
.pill--oat { background: var(--oat); color: var(--ink); }
.pill--oat:hover { background: #ece5d8; }
.pill--s { height: 36px; padding: 0 16px; font-size: 15px; letter-spacing: -0.13px; }
.pill--full { width: 100%; }

/* Шапка */
.top__in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font: 600 19px/1 var(--display); letter-spacing: -0.5px; color: var(--ink); }
.logo__mark { width: 30px; height: 30px; color: #ff8a5c; --rot: -8deg; transform: rotate(-8deg); }
.logo--s { font-size: 17px; }
.top__nav { display: none; }

/* Заголовки секций */
.sec { padding: var(--gap) 0 0; }
.head { text-align: center; max-width: 680px; margin: 0 auto 32px; }
.head--left { text-align: left; margin: 0; }
.eyebrow { font: 600 14px/1.43 var(--body); letter-spacing: -0.09px; color: var(--acc); margin-bottom: 10px; }
h2 { font: 500 32px/1.1 var(--display); letter-spacing: -1px; color: var(--ink); text-wrap: balance; }
.lead { font-size: 18px; line-height: 1.45; letter-spacing: -0.3px; margin-top: 14px; text-wrap: pretty; }
h3 { font: 500 21px/1.15 var(--body); letter-spacing: -0.44px; color: var(--ink); }

.ticks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 22px; text-align: left; }
.ticks li { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; font-size: 16px; line-height: 1.3; color: var(--acc); }
.ticks .ic { margin-top: 1px; }
.ticks--long { grid-template-columns: 1fr; }
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--acc); }
.link .ic { transition: transform .2s ease; }
.link:hover .ic { transform: translateX(4px); }

/* 1. Первый экран */
.hero { position: relative; padding: 28px var(--pad) 0; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: "text text text" "left arrow right"; align-items: center; column-gap: 4px; max-width: 520px; margin: 0 auto; }
.hero__text { grid-area: text; text-align: center; }
.hero__h { font: 500 39px/1.1 var(--display); letter-spacing: -1.2px; color: var(--ink); }
.name {
  display: inline-block; min-width: 1.2em; color: var(--orange); cursor: text; outline: none;
  background: linear-gradient(var(--orange), var(--orange)) 0 100% / 100% 0 no-repeat;
  border-bottom: 3px dotted currentColor; padding: 0 2px; margin: 0 -2px; border-radius: 6px 6px 0 0;
  transition: background-color .2s ease; caret-color: var(--ink);
}
.name:hover, .name:focus { background-color: #fff1ea; }
.hero__hint { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; line-height: 1.3; color: var(--pebble); letter-spacing: -0.09px; }
.hero__hint svg { width: 30px; height: 21px; transform: scaleX(-1) rotate(8deg); margin-top: -8px; }
.hero__lead { margin-top: 16px; text-wrap: pretty; }
.hero__cta { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.hero__note { margin-top: 14px; font-size: 14px; line-height: 1.4; color: var(--pebble); letter-spacing: -0.09px; }

.snap { background: #fff; padding: 7px 7px 0; border-radius: 12px; box-shadow: 0 2px 5px rgba(40, 30, 20, .14), 0 10px 26px rgba(40, 30, 20, .1); transform: rotate(-5deg); width: 100%; }
.snap img { border-radius: 7px; aspect-ratio: 4 / 4.6; object-fit: cover; object-position: 50% 20%; width: 100%; }
.snap figcaption { font: 500 13px/30px var(--body); letter-spacing: -0.1px; color: var(--pebble); text-align: center; }
.tag { position: absolute; background: #fff; border-radius: 20px; padding: 0 12px; font: 500 13px/28px var(--body); letter-spacing: -0.1px; color: var(--pebble); box-shadow: 0 2px 5px rgba(40, 30, 20, .14); white-space: nowrap; }

.hero__left, .hero__right { position: relative; margin-top: 40px; }
.hero__left { grid-area: left; justify-self: end; width: min(100%, 150px); }
.hero__right { grid-area: right; justify-self: start; width: min(100%, 150px); }
.hero__arrow { grid-area: arrow; width: 56px; color: var(--char); margin-top: 20px; }
.hero__kid { width: 100%; filter: drop-shadow(0 2px 4px rgba(40, 30, 20, .16)) drop-shadow(0 12px 22px rgba(40, 30, 20, .12)); transform: rotate(3deg); }
.tag--hero { left: 50%; bottom: -8px; transform: translateX(-50%) rotate(-3deg); }
.hero__left .st, .hero__right .st { position: absolute; }
main { overflow-x: clip; }
.hero__cloud { width: 54px; height: 54px; left: -12px; top: -26px; --rot: -8deg; }
.hero__star { width: 40px; height: 40px; right: -14px; bottom: 26px; --rot: 12deg; }
.hero__leaf { display: none; }
.hero__moon { width: 52px; height: 52px; right: -8px; top: -28px; --rot: 10deg; }
.hero__p1 { width: 34px; height: 34px; left: -6px; bottom: 4%; --rot: -14deg; }
.hero__p2 { display: none; }
.hero__sp { display: none; }

/* 2. Ситуации */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tiles__wide { grid-column: 1 / -1; }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; height: 100%;
  padding: 16px 14px 18px; text-align: left; background: var(--canvas); border-radius: var(--r-panel);
  transition: background-color .2s ease, transform .2s ease;
}
.tile .st { width: 60px; height: 60px; margin: 0 0 10px -4px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.tile b { font: 500 18px/1.15 var(--body); letter-spacing: -0.4px; color: var(--ink); }
.tile span { font-size: 14px; line-height: 1.35; letter-spacing: -0.09px; color: var(--pebble); }
.tile:hover { background: #f5f0e7; }
.tile:hover .st { transform: rotate(-8deg) scale(1.1); }
.tile--own { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; position: relative; padding-right: 48px; box-shadow: var(--ring); background: #fff; }
.tile--own .st { margin: 0; grid-row: span 2; }
.tile--own b { flex: 1 1 60%; }
.tile--own span { flex: 1 1 100%; margin-top: 6px; }
.tile__go { position: absolute; right: 18px; top: 34px; color: var(--acc); }

/* 3. Образец */
.tale { background: var(--canvas); border-radius: var(--r-panel); padding: 14px; display: grid; gap: 22px; }
.tale > * { min-width: 0; }
.tale__pic { position: relative; border-radius: 14px; aspect-ratio: 3 / 3.4; }
.tale__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 14px; opacity: 0; transition: opacity .7s ease; }
.tale__pic img.is-on { opacity: 1; }
.tale__st1 { position: absolute; width: 52px; height: 52px; right: -8px; bottom: 34px; --rot: 12deg; }
.tale__st2 { position: absolute; width: 40px; height: 40px; right: 30px; bottom: -14px; --rot: -10deg; }
.tale__body { padding: 0 6px 10px; }
.tale__over { font: 600 14px/1.43 var(--body); color: var(--acc); letter-spacing: -0.09px; }
.tale__title { font: 500 28px/1.12 var(--display); letter-spacing: -0.8px; margin-top: 4px; }

.player { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 17px; padding: 10px 14px 10px 10px; box-shadow: var(--glow); margin-top: 18px; }
.player__btn { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; transition: transform .18s ease; }
.player__btn:active { transform: scale(.94); }
.player__main { flex: 1; min-width: 0; }
.player__bar { height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.player__bar::before { content: ''; position: absolute; }
.player__bar { position: relative; }
.player__bar::after { content: ''; position: absolute; left: 0; right: 0; height: 5px; border-radius: 5px; background: var(--oat); }
.player__bar i { position: relative; z-index: 1; height: 5px; border-radius: 5px; background: var(--acc); width: 0; }
.player__meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 1.4; color: var(--pebble); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.player__meta span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tale__text { font: 400 18px/1.55 var(--tale); letter-spacing: 0; color: var(--ink); margin-top: 20px; }
.tale__text p + p { margin-top: 10px; }
.tale__text div + div { margin-top: 10px; }
.tale__text div { transition: opacity .4s ease; }
.tale.is-playing .tale__text div:not(.is-on) { opacity: .38; }
.tale__mom { margin: 20px 0 18px; padding: 14px 16px; background: #fff; border-radius: var(--r-card); box-shadow: var(--ring); }
.tale__mom b { font: 600 14px/1.43 var(--body); color: var(--ink); letter-spacing: -0.09px; }
.tale__mom p { font-size: 15px; line-height: 1.45; letter-spacing: -0.13px; margin-top: 4px; }

/* 4. Шаги */
.steps { display: grid; gap: 36px; }
.panel { position: relative; background: var(--canvas); border-radius: var(--r-panel); aspect-ratio: 1 / 1; overflow: hidden; display: grid; place-items: center; }
.step__n { width: 28px; height: 28px; border-radius: 50%; background: var(--oat); color: var(--acc); font: 600 14px/28px var(--body); text-align: center; margin: 16px 0 10px; letter-spacing: 0; }
.step p:last-child { margin-top: 6px; }
.snap--s { width: 46%; transform: rotate(-6deg) translate(-34%, -6%); }
.panel--photo .chips { position: absolute; right: 7%; top: 14%; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: 46%; }
.chips span { background: #fff; border-radius: 17px; padding: 0 12px; font: 500 14px/34px var(--body); letter-spacing: -0.09px; color: var(--ink); box-shadow: var(--glow); white-space: nowrap; }
.chips span:nth-child(2) { margin-right: 10%; }
.chips span:nth-child(4) { margin-right: 4%; }
.panel--sheet img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.float { position: absolute; background: #fff; border-radius: 17px; padding: 0 14px; font: 500 14px/38px var(--body); letter-spacing: -0.09px; color: var(--ink); box-shadow: var(--glow); display: inline-flex; align-items: center; gap: 6px; }
.float--ok { left: 7%; bottom: 8%; color: var(--mint); }
.float--re { right: 7%; top: 8%; color: var(--pebble); }
.panel--tale img { width: 62%; border-radius: 12px; box-shadow: 0 2px 5px rgba(40, 30, 20, .14), 0 10px 26px rgba(40, 30, 20, .12); transform: rotate(3deg) translateY(-7%); }
.float--play { left: 50%; bottom: 7%; transform: translateX(-50%); padding: 8px 16px 8px 8px; gap: 10px; line-height: 1.25; white-space: nowrap; }
.float--play b { display: block; font-weight: 500; }
.float--play small { color: var(--pebble); font-size: 12.5px; }
.float__dot { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.float__dot .ic { width: 15px; height: 15px; }

/* 5. Сериал — ночная полоса */
.night { position: relative; margin-top: var(--gap); padding: 64px 0 60px; background: radial-gradient(120% 90% at 80% 0%, var(--night-2), var(--night) 60%); color: #cfd0e6; overflow: hidden; }
.night h2 { color: #fff; }
.night .eyebrow, .night .ticks li { color: var(--butter); }
.night__in { position: relative; display: grid; gap: 34px; }
.night .head { margin-bottom: 0; }
.night__sky .st { position: absolute; }
.n1 { width: 78px; height: 78px; right: 6%; top: 22px; --rot: 8deg; }
.n2 { width: 38px; height: 38px; left: 6%; top: 18px; --rot: -10deg; }
.n3 { display: none; }
.n4, .n5 { display: none; }
.chat { background: rgba(255, 255, 255, .07); border-radius: var(--r-panel); padding: 18px 14px; display: grid; gap: 10px; max-width: 440px; width: 100%; margin: 0 auto; }
.chat__time { font-size: 12.5px; text-align: center; color: #9a9cc0; letter-spacing: 0; }
.chat__msg { justify-self: end; max-width: 84%; background: #fff; color: var(--ink); border-radius: 17px 17px 5px 17px; padding: 10px 14px; font-size: 15px; line-height: 1.4; letter-spacing: -0.13px; }
.chat__card { justify-self: start; display: flex; align-items: center; gap: 12px; background: #fff; color: var(--ink); border-radius: 17px 17px 17px 5px; padding: 8px 16px 8px 8px; max-width: 92%; }
.chat__card img { width: 56px; height: 56px; object-fit: cover; object-position: 78% 22%; border-radius: 11px; flex: none; }
.chat__card small { display: block; font-size: 12.5px; color: var(--pebble); letter-spacing: 0; }
.chat__card b { display: block; font-weight: 500; font-size: 15px; line-height: 1.25; letter-spacing: -0.13px; margin-top: 2px; }
.chat__card--old { opacity: .55; }

/* 6. Книга и 7. Фото */
.split { display: grid; gap: 36px; align-items: center; }
.bookshot { position: relative; background: var(--canvas); border-radius: var(--r-panel); padding: 44px 20px 48px; display: grid; place-items: center; }
.book { position: relative; width: min(74%, 330px); aspect-ratio: 1 / 1; transform: rotate(-4deg); }
.book__pages { position: absolute; inset: 3% -3% -3% 3%; background: repeating-linear-gradient(0deg, #fff 0 2px, #e9e3d8 2px 3px); border-radius: 4px 8px 8px 4px; box-shadow: 0 16px 34px rgba(40, 30, 20, .18); }
.book__cover { position: absolute; inset: 0; background: #f1ece3; border-radius: 4px 8px 8px 4px; overflow: hidden; box-shadow: inset 10px 0 12px -8px rgba(40, 30, 20, .28), inset 14px 0 0 -13px rgba(255, 255, 255, .7), 0 2px 5px rgba(40, 30, 20, .2); }
.book__cover img { position: absolute; right: 4%; bottom: -16%; width: 40%; filter: drop-shadow(0 4px 8px rgba(40, 30, 20, .18)); transform: rotate(4deg); }
.book__over { position: absolute; left: 10%; top: 10%; font: 600 11px/1.3 var(--body); letter-spacing: .6px; text-transform: uppercase; color: var(--orange); width: 44%; }
.book__title { position: absolute; left: 10%; top: 21%; width: 60%; font: 500 clamp(20px, 5.8vw, 30px)/1.08 var(--tale); letter-spacing: -0.4px; color: var(--ink); }
.book__st1 { position: absolute; width: 62px; height: 62px; left: 6%; bottom: 22px; --rot: -12deg; }
.book__st2 { position: absolute; width: 40px; height: 40px; right: 9%; top: 22px; --rot: 14deg; }
.ticks--col { margin-bottom: 26px; }

.vanish { position: relative; background: var(--canvas); border-radius: var(--r-panel); aspect-ratio: 1 / .92; overflow: hidden; }
.snap--ghost { position: absolute; left: 9%; top: 15%; width: 36%; transform: rotate(-7deg); box-shadow: none; background: transparent; outline: 2px dashed #d9d2c5; outline-offset: -1px; }
.snap--ghost img { opacity: .16; filter: grayscale(1); }
.snap--ghost figcaption { color: var(--fog); }
.vanish__kid { position: absolute; right: 13%; bottom: -14%; width: 37%; filter: drop-shadow(0 2px 4px rgba(40, 30, 20, .16)) drop-shadow(0 12px 22px rgba(40, 30, 20, .12)); transform: rotate(4deg); }
.vanish__st { position: absolute; width: 46px; height: 46px; left: 40%; bottom: 12%; --rot: -10deg; }

/* 8. Подруге */
.gift { background: var(--canvas); border-radius: var(--r-panel); padding: 40px 20px 34px; text-align: center; }
.gift .lead { max-width: 560px; margin-left: auto; margin-right: auto; }
.gift__pair { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin-bottom: 22px; position: relative; }
.gift__pair > .st { width: 66px; height: 66px; }
.gift__line { width: 96px; color: var(--char); margin-bottom: 26px; }
.gift__pair .gift__heart { position: absolute; width: 34px; height: 34px; left: 50%; margin-left: -17px; top: -16px; }
.gift__ways { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.gift__ways span { background: #fff; border-radius: 20px; padding: 8px 14px; font-size: 14px; line-height: 1.3; font-weight: 500; letter-spacing: -0.09px; color: var(--ink); box-shadow: var(--ring); }

/* 9. Цены — лестница */
.stairs { display: grid; gap: 10px; }
.stair { background: var(--canvas); border-radius: var(--r-panel); padding: 20px 20px 22px; position: relative; }
.stair .st { width: 54px; height: 54px; position: absolute; right: 16px; top: 14px; --rot: 8deg; transform: rotate(8deg); }
.stair .pill { position: relative; }
.stair__what { font: 500 16px/1.3 var(--body); color: var(--ink); letter-spacing: -0.2px; padding-right: 64px; }
.stair__price { font: 500 36px/1.1 var(--display); letter-spacing: -1.2px; color: var(--ink); margin-top: 6px; }
.stair__price small { font: 400 15px/1 var(--body); letter-spacing: -0.13px; color: var(--pebble); }
.stair__txt { font-size: 15px; line-height: 1.45; letter-spacing: -0.13px; margin-top: 10px; }
.stair .pill { margin-top: 16px; height: 46px; }
.stair--1 { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }

/* 10. Вопросы */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { display: flex; align-items: flex-start; gap: 12px; padding: 22px 0; font: 500 18px/1.35 var(--body); letter-spacing: -0.3px; color: var(--ink); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { color: var(--acc); margin-top: 2px; transition: transform .25s ease; }
.faq details[open] summary .ic { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px 32px; margin-top: -8px; max-width: 640px; }

/* Финал */
.final { margin-top: var(--gap); background: var(--canvas); padding: 56px 0 40px; overflow: hidden; }
.final__in { display: grid; gap: 30px; text-align: center; }
.final .lead { max-width: 480px; margin: 14px auto 24px; }
.final__row { display: flex; justify-content: center; align-items: flex-end; gap: 2px; }
.final__row .st { width: 58px; height: 58px; }
.final__row .st:nth-child(2) { --rot: 8deg; width: 50px; height: 50px; }
.final__row .st:nth-child(3) { --rot: -6deg; width: 64px; height: 64px; }
.final__row .st:nth-child(4) { --rot: 10deg; width: 54px; height: 54px; }
.final__row .final__tiny { width: 30px; height: 30px; }

/* Подвал */
.foot { padding: 36px 0 110px; }
.foot__in { display: grid; gap: 10px; }
.foot p { font-size: 13px; line-height: 1.38; letter-spacing: -0.13px; color: var(--fog); max-width: 520px; }
.foot .logo { margin-bottom: 6px; }

/* Кнопка внизу экрана на телефоне */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(255, 255, 255, 0), #fff 34%); transform: translateY(110%); transition: transform .3s ease; }
.dock.is-on { transform: none; }
.dock .pill { box-shadow: 0 8px 24px rgba(29, 26, 23, .22); }

/* Окно записи */
.dlg { border: 0; padding: 0; border-radius: 24px; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: #fff; color: var(--graphite); box-shadow: 0 30px 80px rgba(29, 26, 23, .3); overflow: auto; }
.dlg::backdrop { background: rgba(29, 26, 23, .5); backdrop-filter: blur(3px); }
.dlg[open] { animation: dlg-in .28s cubic-bezier(.2, 1.1, .4, 1); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.dlg [hidden] { display: none !important; }
.dlg__form, .dlg__done { position: relative; padding: 30px 22px 22px; display: grid; gap: 14px; }
.dlg h2:focus { outline: none; }
.dlg h2 { font-size: 27px; letter-spacing: -0.8px; padding-right: 56px; text-wrap: balance; }
.dlg__lead { font-size: 16px; line-height: 1.45; margin-top: -4px; }
.dlg__x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%; background: var(--oat); display: grid; place-items: center; color: var(--ink); z-index: 2; }
.dlg__st { position: absolute; right: 60px; top: 16px; width: 44px; height: 44px; transform: rotate(12deg); }
.dlg label { display: grid; gap: 6px; font: 500 14px/1.3 var(--body); letter-spacing: -0.09px; color: var(--ink); }
.dlg input, .dlg select {
  width: 100%; height: 50px; border: 0; border-radius: 14px; background: var(--canvas); box-shadow: var(--ring);
  padding: 0 16px; font: 400 17px/1 var(--body); letter-spacing: -0.22px; color: var(--ink); outline: none;
}
.dlg select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' fill='none' stroke='%231d1a17' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.dlg input:focus, .dlg select:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.dlg input::placeholder { color: var(--fog); }
.dlg__err { color: var(--orange); font-size: 14px; line-height: 1.3; margin-top: -6px; }
.dlg__fine { font-size: 13px; line-height: 1.38; color: var(--pebble); text-align: center; letter-spacing: -0.13px; }
.dlg__done { text-align: center; padding-top: 36px; justify-items: center; }
.dlg__done .st { width: 64px; height: 64px; }
.dlg__done h2 { padding: 0; }

/* Появление при прокрутке */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .3, 1); }
.rv.is-in, .no-rv .rv { opacity: 1; transform: none; }
.no-rv .dock { display: none; }

/* Планшет */
@media (min-width: 700px) {
  :root { --gap: 104px; --pad: 24px; }
  h2 { font-size: 44px; line-height: 1.09; letter-spacing: -1.35px; }
  .lead { font-size: 19px; line-height: 1.42; }
  .head { margin-bottom: 44px; }
  .hero { max-width: 760px; padding-top: 40px; }
  .hero__h { font-size: 60px; letter-spacing: -1.36px; }
  .hero__lead { max-width: 560px; margin-left: auto; margin-right: auto; }
  .hero__cta { flex-direction: row; justify-content: center; gap: 16px; }
  .hero__left, .hero__right { width: 190px; }
  .hero__arrow { width: 96px; margin: 20px 20px 0; }
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .tile { padding: 22px 22px 24px; }
  .tile .st { width: 72px; height: 72px; }
  .tile b { font-size: 21px; }
  .tile span { font-size: 15px; }
  .tile--own { padding: 20px 60px 20px 22px; flex-wrap: nowrap; }
  .tile--own b { flex: none; }
  .tile--own span { flex: 1; margin: 0 0 0 8px; }
  .tile__go { top: 50%; margin-top: -10px; right: 24px; }
  .tale { grid-template-columns: 5fr 6fr; gap: 36px; padding: 24px; align-items: start; }
  .tale__pic { aspect-ratio: 3 / 4; position: sticky; top: 24px; }
  .tale__body { padding: 8px 12px 8px 0; }
  .tale__title { font-size: 34px; letter-spacing: -1px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .chips span { font-size: 13px; line-height: 30px; padding: 0 10px; }
  .float { font-size: 13px; line-height: 34px; padding: 0 12px; }
  .stairs { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .gift { padding: 60px 40px 52px; }
  .faq summary { font-size: 19px; padding: 28px 0; }
  .faq details p { padding-bottom: 28px; }
  .dock { display: none; }
  .foot { padding-bottom: 72px; }
  .dlg__form, .dlg__done { padding: 36px 32px 28px; }
  .night { padding: 104px 0; }
  .n1 { width: 110px; height: 110px; right: 8%; top: 48px; }
  .n2 { width: 52px; height: 52px; top: 70px; }
  .n3 { width: 36px; height: 36px; top: 30px; left: 34%; }
  .n3 { display: block; }
  .n4 { display: block; width: 64px; height: 64px; left: 5%; bottom: 44px; --rot: -8deg; }
  .n5 { display: block; width: 80px; height: 80px; right: 4%; bottom: 30px; opacity: .9; }
}

/* Десктоп */
@media (min-width: 1000px) {
  .top__in { height: 94px; }
  .top__nav { display: flex; gap: 6px; margin: 0 auto 0 36px; }
  .top__nav a { padding: 8px 12px; border-radius: 8px; font: 500 15px/1.47 var(--body); letter-spacing: -0.09px; color: var(--ink); transition: background-color .15s ease; }
  .top__nav a:hover { background: var(--oat); }
  .top { border-bottom: 1px solid var(--line); }
  .night__in { grid-template-columns: 1fr 440px; gap: 64px; align-items: center; }
  .night .head { text-align: left; margin: 0; }
  .split { grid-template-columns: 1fr 1fr; gap: 72px; }
  .split--rev > :first-child { order: 2; }
  .stairs { grid-template-columns: repeat(4, 1fr); align-items: start; padding-top: 8px; }
  .stair { padding: 96px 22px 26px; min-height: 290px; }
  .stair--1 { margin-top: 96px; }
  .stair--2 { margin-top: 64px; }
  .stair--3 { margin-top: 32px; }
  .stair .st { width: 68px; height: 68px; top: 18px; left: 16px; right: auto; --rot: -6deg; transform: rotate(-6deg); }
  .stair__what { padding-right: 0; }
  .stair--1 .pill { margin-top: 18px; }
  .final__in { grid-template-columns: 1.2fr 1fr; text-align: left; align-items: center; }
  .final .lead { margin-left: 0; }
  .final { padding: 88px 0; }
  .final__row .st { width: 84px; height: 84px; }
  .final__row .st:nth-child(2) { width: 70px; height: 70px; }
  .final__row .st:nth-child(3) { width: 94px; height: 94px; }
  .final__row .st:nth-child(4) { width: 76px; height: 76px; }
  .final__row .final__tiny { width: 40px; height: 40px; }
  .foot__in { grid-template-columns: auto 1fr 1fr; gap: 40px; align-items: start; }
}

/* Широкий экран: наклейки по краям первого экрана */
@media (min-width: 1180px) {
  .hero { display: block; max-width: none; padding: 72px 0 0; min-height: 540px; }
  .hero__text { max-width: 700px; margin: 0 auto; position: relative; z-index: 2; }
  .hero__h { font-size: 68px; line-height: 1.1; }
  .hero__lead { max-width: 540px; }
  .hero__left, .hero__right { position: absolute; margin: 0; top: 96px; }
  .hero__left { left: max(28px, calc(50% - 640px)); width: 230px; }
  .hero__right { right: max(28px, calc(50% - 610px)); width: 196px; top: 70px; }
  .hero__arrow { display: none; }
  .hero__cloud { width: 84px; height: 84px; left: -30px; top: -52px; }
  .hero__star { width: 54px; height: 54px; right: -34px; bottom: -6px; }
  .hero__leaf { display: block; width: 58px; height: 58px; left: 34px; bottom: -84px; --rot: 16deg; }
  .hero__moon { width: 84px; height: 84px; right: -40px; top: -30px; }
  .hero__p1 { width: 56px; height: 56px; left: -56px; top: 40%; }
  .hero__p2 { display: block; width: 46px; height: 46px; right: -34px; bottom: 60px; --rot: 12deg; }
  .hero__sp { display: block; width: 64px; height: 64px; left: -66px; bottom: -6px; --rot: -4deg; }
  .tag--hero { bottom: -14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fl { animation: none; transform: rotate(var(--rot, 0deg)); }
  .rv { opacity: 1; transform: none; transition: none; }
  .dlg[open] { animation: none; }
}
