:root {
  --bg: #14151A;
  --card: #1C1E25;
  --card-2: #24262F;
  --line: #30333E;
  --ink: #F4F5F8;
  --ink-2: #A4A8B5;
  --fire-a: #FF3D54;
  --fire-b: #FF9A3D;
  --mint: #19D38C;
  --mint-ink: #04241A;
  --gold: #FFC94D;
  --ice: #6FB6FF;
  --fire: linear-gradient(120deg, var(--fire-b), var(--fire-a) 55%, #E0338F);
  --font: 'Rubik', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r: clamp(20px, 2.2vw, 30px);
  --soft: 14px 18px 40px -18px #000, -6px -6px 20px -14px rgba(255, 255, 255, .09);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #3A3D49 var(--bg); overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.5 var(--font); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, fieldset { margin: 0; padding: 0; }
h1, h2, h3 { text-wrap: balance; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--fire-a); color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 84px; }
em { font-style: normal; background: var(--fire); -webkit-background-clip: text; background-clip: text; color: var(--fire-b); -webkit-text-fill-color: transparent; }

.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 16px; top: -80px; z-index: 50; padding: 12px 18px; border-radius: 14px; background: var(--gold); color: #1A1200; font-weight: 700; }
.skip:focus { top: 16px; }
.snow { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; opacity: .55; }
header, main, footer { position: relative; z-index: 1; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 24px; border-radius: 18px; font-weight: 600; font-size: 1rem; line-height: 1.2; text-align: center; transition: translate .4s var(--ease), filter .25s, box-shadow .4s var(--ease), background-color .25s, color .25s; }
.btn svg { width: 20px; height: 20px; transition: translate .4s var(--ease); }
.btn:hover { translate: 0 -3px; }
.btn:hover svg { translate: 3px 0; }
.btn:active { translate: 0; }
.btn--fire { background: var(--fire); color: #fff; box-shadow: 0 18px 40px -16px var(--fire-a); }
.btn--fire:hover { filter: brightness(1.1); box-shadow: 0 24px 50px -14px var(--fire-a); }
.btn--mint { background: var(--mint); color: var(--mint-ink); box-shadow: 0 18px 40px -18px var(--mint); }
.btn--mint:hover { filter: brightness(1.08); }
.btn--soft { background: var(--card-2); box-shadow: var(--soft); }
.btn--soft:hover { background: #2C2F3A; }
.btn--ghost { color: var(--ink-2); }
.btn--ghost:hover { color: var(--ink); translate: none; }
.btn--dark { background: #14151A; color: #fff; }
.btn--l { min-height: 64px; padding: 0 30px; font-size: 1.0625rem; border-radius: 22px; }
.btn:disabled { opacity: .45; cursor: not-allowed; translate: none; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 20; background: rgba(20, 21, 26, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand__ic { width: 42px; height: 42px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--mint); color: var(--mint-ink); box-shadow: 0 10px 24px -10px var(--mint); }
.brand__ic svg { width: 24px; height: 24px; }
.top__nav { display: flex; gap: 4px; padding: 6px; border-radius: 18px; background: var(--card); box-shadow: var(--soft); }
.top__nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 12px; font-weight: 500; font-size: .9375rem; color: var(--ink-2); transition: background-color .2s, color .2s; }
.top__nav a:hover { background: var(--card-2); color: var(--ink); }
.list-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 16px; background: var(--card); box-shadow: var(--soft); font-variant-numeric: tabular-nums; transition: color .2s; }
.list-btn svg { width: 20px; height: 20px; color: var(--fire-a); }
.list-btn:hover { color: var(--gold); }
.list-btn.is-bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { scale: 1.14; } }

/* Первый экран */
.hero { padding-block: clamp(28px, 4vw, 56px) clamp(48px, 7vw, 104px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 56px); }
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(18px, 2.2vw, 28px); }
.count { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--card); box-shadow: var(--soft); font-size: .9375rem; color: var(--ink-2); }
.count i { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }
.count b { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
h1 { font-weight: 800; font-size: clamp(2rem, 4.4vw, 3.75rem); line-height: 1.05; letter-spacing: -.035em; }
.hero__sub { max-width: 46ch; font-size: clamp(1.0625rem, 1.35vw, 1.1875rem); color: var(--ink-2); }
.hero__row { display: flex; flex-wrap: wrap; gap: 12px; }
.usp { display: flex; flex-wrap: wrap; gap: 12px; }
.usp li { display: flex; flex-direction: column; min-width: 130px; padding: 14px 18px; border-radius: 18px; background: var(--card); box-shadow: var(--soft); font-size: .875rem; color: var(--ink-2); }
.usp b { font-weight: 700; font-size: 1.125rem; color: var(--ink); }

/* Колода карточек */
.deck { position: relative; height: clamp(420px, 44vw, 600px); }
.deck__in { position: absolute; left: 50%; top: 50%; width: 620px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; translate: -50% -50%; rotate: -14deg; scale: var(--deck, 1); }
.d { position: relative; padding: 16px 18px; border-radius: 24px; background: var(--card); box-shadow: var(--soft); display: flex; flex-direction: column; gap: 4px; animation: float 7s ease-in-out infinite alternate; }
.d:nth-child(even) { animation-duration: 9s; animation-direction: alternate-reverse; }
@keyframes float { from { translate: 0 -5px; } to { translate: 0 6px; } }
.d small { font-size: .75rem; color: var(--ink-2); }
.d b { font-weight: 700; font-size: 1.125rem; letter-spacing: -.01em; }
.d--chips { grid-column: span 6; flex-direction: row; gap: 8px; padding: 10px; border-radius: 999px; }
.d--chips span { padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--fire-a); font-size: .8125rem; font-weight: 600; }
.d--chips span:nth-child(2) { border-color: var(--gold); }
.d--chips span:nth-child(3) { border-color: var(--mint); }
.d--chips span:nth-child(4) { border-color: var(--ice); }
.d--chips .is-on { background: var(--fire); border-color: transparent; }
.d--budget { grid-column: span 4; }
.bar { height: 8px; margin-top: 8px; border-radius: 8px; background: var(--card-2); }
.bar i { display: block; width: 46%; height: 100%; border-radius: 8px; background: var(--fire); }
.d--hot { grid-column: span 2; background: var(--fire); box-shadow: 0 20px 40px -16px var(--fire-a); }
.d--hot small { color: rgba(255, 255, 255, .85); }
.d--hot b { font-size: 2rem; line-height: 1; }
.d--hot svg, .d--santa svg, .d--ok svg { width: 22px; height: 22px; margin-bottom: 6px; }
.d--gift { grid-column: span 3; grid-row: span 2; padding: 12px 12px 16px; }
.d__pic { display: flex; align-items: center; justify-content: center; height: 150px; margin-bottom: 8px; border-radius: 16px; background: radial-gradient(circle at 30% 20%, #2B6B55, #123328); color: var(--gold); }
.d__pic svg { width: 72px; height: 72px; stroke-width: 1.2; }
.pill { align-self: flex-start; margin-top: 6px; padding: 4px 12px; border-radius: 999px; background: var(--mint); color: var(--mint-ink); font-size: .8125rem; font-weight: 700; }
.d--msg { grid-column: span 3; gap: 8px; }
.d--msg p { align-self: flex-start; padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: var(--card-2); font-size: .8125rem; line-height: 1.3; }
.d--msg .me { align-self: flex-end; border-radius: 14px 4px 14px 14px; background: var(--fire); }
.d--list { grid-column: span 3; }
.d--list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: .8125rem; }
.d--list li:first-child { border-top: 0; }
.d--list i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.d--list li:nth-child(2) i { background: var(--gold); }
.d--list li:nth-child(3) i { background: var(--fire-a); }
.d--list li b { margin-left: auto; font-size: .8125rem; color: var(--mint); font-variant-numeric: tabular-nums; }
.d--santa { grid-column: span 3; background: linear-gradient(120deg, #2F7BFF, var(--ice)); }
.d--santa small { color: rgba(255, 255, 255, .85); }
.d--ok { grid-column: span 3; align-items: flex-start; }
.d--ok svg { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: rgba(25, 211, 140, .14); color: var(--mint); }

/* Секции */
.sec { padding-block: clamp(48px, 7vw, 96px); }
.sec--tight { padding-block: clamp(24px, 3vw, 40px); }
h2 { max-width: 20em; margin-bottom: clamp(24px, 3.4vw, 44px); font-weight: 800; font-size: clamp(1.5rem, 3.1vw, 2.5rem); line-height: 1.1; letter-spacing: -.03em; }

/* Подбор */
.picker { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.picker__q { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 26px; padding: clamp(18px, 2.4vw, 28px); border-radius: var(--r); background: var(--card); box-shadow: var(--soft); }
legend { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-weight: 700; font-size: 1.125rem; }
legend span { width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--card-2); font-size: .875rem; color: var(--gold); }
legend small { font-weight: 400; font-size: .8125rem; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--card-2); border: 1.5px solid transparent; font-size: .9375rem; font-weight: 500; transition: background-color .2s, border-color .2s, color .2s, translate .3s var(--ease); }
.chips label:hover span { border-color: #4A4E5C; translate: 0 -2px; }
.chips input:checked + span { background: var(--fire); color: #fff; box-shadow: 0 10px 24px -12px var(--fire-a); }
.chips input[type=checkbox]:checked + span { background: var(--mint); color: var(--mint-ink); box-shadow: 0 10px 24px -12px var(--mint); }
.chips input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.res__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 14px; padding-inline: 6px; }
.res__head p { font-size: 1.125rem; font-weight: 500; }
.res__head b { font-weight: 800; font-size: 1.5rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.res__head small { font-size: .8125rem; color: var(--ink-2); }
.gifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.gift { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 16px; border-radius: 24px; background: var(--card); box-shadow: var(--soft); animation: pop .5s var(--ease) backwards; transition: translate .4s var(--ease); }
.gift:hover { translate: 0 -5px; }
@keyframes pop { from { opacity: 0; scale: .94; translate: 0 12px; } }
.gift__pic { display: flex; align-items: center; justify-content: center; height: 118px; border-radius: 16px; color: #fff; }
.gift__pic svg { width: 56px; height: 56px; stroke-width: 1.3; }
.c-home { background: radial-gradient(circle at 30% 20%, #2B6B55, #123328); color: var(--gold); }
.c-tech { background: radial-gradient(circle at 30% 20%, #3B63C9, #18254F); }
.c-sport { background: radial-gradient(circle at 30% 20%, #19D38C, #0B5F41); color: var(--mint-ink); }
.c-beauty { background: radial-gradient(circle at 30% 20%, #FF6FA8, #7A1B46); }
.c-food { background: radial-gradient(circle at 30% 20%, #FFB04D, #9A4A0C); }
.c-art { background: radial-gradient(circle at 30% 20%, #A46BFF, #3A1C7A); }
.c-travel { background: radial-gradient(circle at 30% 20%, #6FB6FF, #1C4F8A); }
.c-game { background: radial-gradient(circle at 30% 20%, #FF5A5A, #7A1420); }
.gift h3 { padding-inline: 6px; font-weight: 700; font-size: 1.0625rem; line-height: 1.2; letter-spacing: -.01em; }
.gift p { flex-grow: 1; padding-inline: 6px; font-size: .875rem; line-height: 1.4; color: var(--ink-2); }
.gift__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 0; }
.gift__price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gift__match { font-size: .75rem; font-weight: 600; color: var(--mint); }
.like { position: absolute; right: 20px; top: 20px; width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: rgba(20, 21, 26, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background-color .2s, color .2s, scale .3s var(--ease); }
.like svg { width: 22px; height: 22px; }
.like:hover { scale: 1.08; }
.like[aria-pressed="true"] { background: var(--fire-a); }
.like[aria-pressed="true"] svg { fill: currentColor; }
.empty { padding: 28px; border-radius: 24px; border: 1.5px dashed var(--line); color: var(--ink-2); }

/* Список */
.list { padding: clamp(20px, 3vw, 36px); border-radius: var(--r); background: var(--card); box-shadow: var(--soft); }
.list__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.list h2 { margin: 0; }
.list__sum { display: flex; flex-direction: column; align-items: flex-end; }
.list__sum small { font-size: .8125rem; color: var(--ink-2); }
.list__sum b { font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1; color: var(--mint); font-variant-numeric: tabular-nums; }
.list__items li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); animation: pop .4s var(--ease) backwards; }
.list__items i { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; }
.list__items i svg { width: 22px; height: 22px; }
.list__items span { font-weight: 500; }
.list__items span small { display: block; font-size: .8125rem; font-weight: 400; color: var(--ink-2); }
.list__items b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.list__items button { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--ink-2); transition: background-color .2s, color .2s; }
.list__items button:hover { background: var(--card-2); color: var(--fire-a); }
.list__items button svg { width: 18px; height: 18px; }
.list__row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

/* Подборки */
.sets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.set { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; height: 100%; min-height: 190px; padding: 22px; border-radius: var(--r); text-align: left; color: #fff; transition: translate .5s var(--ease), rotate .5s var(--ease), box-shadow .5s var(--ease); }
.set svg { width: 36px; height: 36px; margin-bottom: auto; stroke-width: 1.5; }
.set b { font-weight: 700; font-size: 1.25rem; line-height: 1.15; letter-spacing: -.02em; }
.set span { font-size: .9375rem; opacity: .85; }
.set:hover { translate: 0 -8px; rotate: -1.5deg; }
.set--fire { background: var(--fire); box-shadow: 0 24px 44px -24px var(--fire-a); }
.set--mint { background: linear-gradient(130deg, #19D38C, #0C8F6B); color: var(--mint-ink); box-shadow: 0 24px 44px -24px var(--mint); }
.set--gold { background: linear-gradient(130deg, #FFD86B, #FF9A3D); color: #2A1600; box-shadow: 0 24px 44px -24px var(--gold); }
.set--ice { background: linear-gradient(130deg, #6FB6FF, #2F6BFF); box-shadow: 0 24px 44px -24px var(--ice); }
.set:focus-visible { outline-color: #fff; }

/* Тайный Санта */
.santa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.santa__copy p { max-width: 46ch; color: var(--ink-2); }
.steps { margin-top: 24px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--card); box-shadow: var(--soft); font-weight: 700; color: var(--gold); }
.santa__card { display: flex; flex-direction: column; gap: 12px; padding: clamp(18px, 2.6vw, 30px); border-radius: var(--r); background: var(--card); box-shadow: var(--soft); }
.santa__card label { font-weight: 700; }
.santa__card textarea { width: 100%; padding: 14px 16px; border-radius: 16px; background: var(--bg); border: 1.5px solid var(--line); resize: vertical; caret-color: var(--mint); transition: border-color .2s; }
.santa__card textarea::placeholder { color: #6C7080; }
.santa__card textarea:focus { outline: none; border-color: var(--mint); }
.err { font-size: .875rem; font-weight: 500; color: #FF9C8E; }
.pairs { display: flex; flex-direction: column; gap: 6px; }
.pairs li { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--card-2); animation: pop .45s var(--ease) backwards; }
.pairs svg { width: 18px; height: 18px; color: var(--mint); }
.pairs b { font-weight: 600; text-align: right; color: var(--gold); overflow-wrap: anywhere; }
.pairs span { overflow-wrap: anywhere; }
.note { font-size: .8125rem; color: var(--ink-2); }

/* Вопросы */
.faq { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(20px, 5vw, 72px); align-items: start; }
.faq__list { display: flex; flex-direction: column; gap: 10px; }
.faq details { border-radius: 20px; background: var(--card); box-shadow: var(--soft); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none; font-weight: 600; font-size: 1.0625rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; rotate: 45deg; color: var(--ink-2); transition: rotate .4s var(--ease), color .2s; }
.faq details[open] summary svg { rotate: 0deg; color: var(--fire-a); }
.faq details p { padding: 0 22px 20px; max-width: 64ch; color: var(--ink-2); }

.final { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; padding: clamp(24px, 4vw, 52px); border-radius: var(--r); background: var(--fire); box-shadow: 0 40px 80px -40px var(--fire-a); }
.final h2 { margin: 0; max-width: 16em; color: #fff; }
.final :focus-visible { outline-color: #fff; }

.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding-block: 28px 36px; font-size: .8125rem; color: var(--ink-2); }

@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * { animation: rise .9s var(--ease) backwards; }
  .hero__copy > :nth-child(2) { animation-delay: .07s; }
  .hero__copy > :nth-child(3) { animation-delay: .14s; }
  .hero__copy > :nth-child(4) { animation-delay: .21s; }
  .hero__copy > :nth-child(5) { animation-delay: .28s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

@media (max-width: 1080px) {
  .deck { --deck: .82; }
  .sets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .top__nav { display: none; }
  .hero__grid, .picker, .santa, .faq { grid-template-columns: 1fr; }
  .deck { height: 400px; --deck: .68; margin-inline: calc(var(--gutter) * -1); }
  .picker__q { position: static; }
}
@media (max-width: 560px) {
  .btn--l { width: 100%; }
  .hero__row .btn { flex: 1 1 100%; }
  .usp li { flex: 1 1 100px; min-width: 0; padding: 12px 14px; }
  .deck { height: 350px; --deck: .6; }
  .sets { grid-template-columns: 1fr; }
  .set { min-height: 150px; }
  .gifts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gift__pic { height: 92px; }
  .like { right: 16px; top: 16px; }
  .list__items li { grid-template-columns: auto 1fr auto; }
  .list__items b { grid-column: 2; grid-row: 2; margin-top: -10px; color: var(--mint); }
  .list__items button { grid-column: 3; grid-row: 1 / 3; }
  .list__row .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .snow { display: none; }
}

/* Финальные доработки */
.share { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 14px; background: var(--card); box-shadow: var(--soft); font-size: .875rem; font-weight: 500; color: var(--ink-2); transition: color .2s; }
.share svg { width: 18px; height: 18px; }
.share:hover { color: var(--gold); }
.res__head { align-items: center; }
.res__note { margin-top: 14px; padding-inline: 6px; font-size: .8125rem; color: var(--ink-2); }
.pairs li { grid-template-columns: minmax(0, 1fr) auto; }
.pairs li b { grid-column: 1 / -1; text-align: left; padding-top: 4px; }
.pairs button { min-height: 40px; padding: 0 14px; border-radius: 12px; background: var(--card); font-size: .875rem; font-weight: 600; color: var(--mint); transition: background-color .2s; }
.pairs button:hover { background: #30333E; }
.pairs button[aria-expanded="true"] { color: var(--ink-2); }

/* Где купить */
.buy { padding-inline: 6px; }
.buy summary { display: inline-flex; align-items: center; min-height: 40px; cursor: pointer; list-style: none; font-size: .875rem; font-weight: 600; color: var(--gold); }
.buy summary::-webkit-details-marker { display: none; }
.buy summary::after { content: '+'; margin-left: 8px; font-weight: 500; transition: rotate .3s var(--ease); }
.buy[open] summary::after { rotate: 45deg; }
.buy summary:hover { color: #FFDB85; }
.shops { display: flex; flex-wrap: wrap; gap: 6px; }
.shops a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 10px; background: var(--card-2); font-size: .8125rem; font-weight: 600; color: var(--ink); transition: background-color .2s, color .2s; }
.shops a:hover { background: var(--mint); color: var(--mint-ink); }
.buy .shops { padding-bottom: 4px; }
.list__items li { grid-template-columns: auto minmax(0, 1fr) auto auto auto; }
.list__items .shops a { background: none; border: 1px solid var(--line); color: var(--ink-2); min-height: 32px; padding: 0 10px; }
.list__items .shops a:hover { background: var(--mint); border-color: var(--mint); color: var(--mint-ink); }
@media (max-width: 760px) {
  .list__items li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .list__items b { grid-column: 2; grid-row: 2; margin-top: -10px; color: var(--mint); }
  .list__items .shops { grid-column: 1 / -1; grid-row: 3; }
  .list__items button { grid-column: 3; grid-row: 1 / 3; }
}

/* ---------- Версия 2: фото, план с бюджетом, вишлист, личные ссылки ---------- */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
input[type=text], input[type=url], input[type=number], input[type=date] { width: 100%; min-height: 50px; padding: 0 16px; border-radius: 16px; background: var(--bg); border: 1.5px solid var(--line); caret-color: var(--mint); transition: border-color .2s; }
input::placeholder { color: #7F8493; }
input[type=text]:focus, input[type=url]:focus, input[type=number]:focus, input[type=date]:focus { outline: none; border-color: var(--mint); }
label small { font-weight: 400; font-size: .8125rem; color: var(--ink-2); }

.gift__pic { position: relative; overflow: hidden; height: 150px; }
.gift__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale .8s var(--ease); }
.gift:hover .gift__pic img { scale: 1.06; }
.badge { position: absolute; left: 20px; top: 20px; padding: 5px 10px; border-radius: 10px; background: rgba(20, 21, 26, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-size: .75rem; font-weight: 600; color: var(--mint); }
.badge--exp { color: var(--ice); }
.badge--food { color: var(--gold); }
.gift.is-pick { outline: 2px solid var(--gold); outline-offset: 3px; animation: wink 1.2s var(--ease); }
@keyframes wink { 30% { scale: 1.04; } }
.credit { display: inline-flex; align-items: center; min-height: 36px; font-size: .75rem; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.shops a.credit { padding: 0 4px; background: none; font-weight: 400; color: var(--ink-2); }
.shops a.credit:hover { background: none; color: var(--ink); }
.res__tools { display: flex; flex-wrap: wrap; gap: 8px; }
.share:disabled { opacity: .45; cursor: not-allowed; }

.meter { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 14px 24px; align-items: end; margin-bottom: 20px; padding: 16px; border-radius: 20px; background: var(--card-2); }
.meter__in { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; font-weight: 600; }
.meter__bar { height: 10px; border-radius: 10px; background: var(--bg); overflow: hidden; }
.meter__bar i { display: block; height: 100%; width: 0; border-radius: 10px; background: var(--mint); transition: width .6s var(--ease), background-color .3s; }
.meter__bar i.is-over { background: var(--fire-a); }
.meter__body p { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 10px; font-size: .875rem; color: var(--ink-2); }
.meter__body .is-over { color: #FF9C8E; font-weight: 600; }
.list__lead { max-width: 60ch; margin: -6px 0 18px; color: var(--ink-2); }
.tick { position: relative; display: flex; cursor: pointer; }
.tick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.list__items .tick i { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid #4A4E5C; color: transparent; transition: background-color .2s, border-color .2s, color .2s; }
.tick:hover i { border-color: var(--mint); }
.tick input:checked ~ i { background: var(--mint); border-color: var(--mint); color: var(--mint-ink); }
.tick input:focus-visible ~ i { outline: 2px solid var(--gold); outline-offset: 2px; }
.is-bought .list__name { text-decoration: line-through; color: var(--ink-2); }
.is-bought .list__name small { text-decoration: none; }
.list__name { min-width: 0; overflow-wrap: anywhere; }
.list__name a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.list__items--wish li { grid-template-columns: minmax(0, 1fr) auto; }
.list__items--wish li:first-child { border-top: 0; }

.tips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: tip; }
.tips li { counter-increment: tip; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px; border-radius: var(--r); background: var(--card); box-shadow: var(--soft); }
.tips li::before { content: counter(tip); width: 38px; height: 38px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--card-2); font-weight: 800; color: var(--gold); }
.tips h3 { font-weight: 700; font-size: 1.125rem; line-height: 1.2; letter-spacing: -.01em; }
.tips p { flex-grow: 1; font-size: .9375rem; color: var(--ink-2); }
.tips a, .tips button { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: .9375rem; color: var(--mint); text-decoration: underline; text-underline-offset: 4px; }
.tips a:hover, .tips button:hover { color: var(--gold); }
.tips__src { max-width: 96ch; margin-top: 18px; font-size: .8125rem; color: var(--ink-2); }
.tips__src a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.santa__card input { margin-bottom: 2px; }
.santa__two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.santa__two div, .wish__add div { display: flex; flex-direction: column; gap: 8px; }
.wish__add { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.wish__add .btn { min-height: 50px; border-radius: 16px; }
.note--ok { padding: 12px 14px; border-radius: 14px; background: rgba(25, 211, 140, .1); color: var(--ink); }
.pairs li { grid-template-columns: minmax(0, 1fr) auto; }
.pairs button { display: inline-flex; align-items: center; gap: 8px; }
.pairs button svg { width: 16px; height: 16px; }

.from-link { padding-top: 12px; padding-bottom: 12px; }
.reveal { display: flex; gap: clamp(16px, 3vw, 32px); align-items: flex-start; padding: clamp(22px, 4vw, 44px); border-radius: var(--r); background: var(--fire); box-shadow: 0 40px 80px -40px var(--fire-a); color: #fff; }
.reveal > svg { width: clamp(44px, 6vw, 72px); height: clamp(44px, 6vw, 72px); stroke-width: 1.3; }
.reveal__body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.reveal h2 { margin: 0; }
.reveal__meta:empty { display: none; }
.reveal__meta { font-weight: 600; }
.reveal [data-reveal-closed], .reveal [data-reveal-open] { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.reveal__name { font-weight: 800; font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1; letter-spacing: -.03em; overflow-wrap: anywhere; }
.reveal__name:focus { outline: none; }
.reveal__row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn--line { border: 1.5px solid rgba(255, 255, 255, .7); color: #fff; }
.reveal :focus-visible { outline-color: #fff; }

@media (max-width: 1080px) { .tips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .meter, .wish__add { grid-template-columns: 1fr; }
  .list__items--wish li { grid-template-columns: minmax(0, 1fr) auto; }
  .list__items--wish .shops { grid-column: 1 / -1; grid-row: 2; }
  .reveal { flex-direction: column; }
}
@media (max-width: 560px) {
  .tips { grid-template-columns: 1fr; }
  .gift__pic { height: 112px; }
  .badge { left: 16px; top: 16px; font-size: .6875rem; padding: 4px 8px; }
  .res__tools { width: 100%; }
  .res__tools .share { flex: 1 1 0; justify-content: center; padding: 0 10px; }
  .santa__two { grid-template-columns: 1fr; }
}
.is-bought .list__name small { display: inline-block; width: 100%; }

/* Якоря: заголовок раздела встаёт сразу под шапкой, без лишнего отступа сверху */
section.sec[id]:not(.sec--tight) { scroll-margin-top: calc(76px + 24px - clamp(48px, 7vw, 96px)); }

/* План по людям */
.ready { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ready p { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.ready b { font-weight: 700; font-size: 1.0625rem; }
.ready span { font-size: .875rem; color: var(--ink-2); }
.ready .meter__bar i { background: var(--mint); }
.person-add { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .7fr) auto; align-items: end; gap: 10px; margin-block: 20px 6px; padding: 16px; border-radius: 20px; background: var(--card-2); }
.person-add label { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: .8125rem; color: var(--ink-2); }
.person-add small { opacity: .8; }
.person-add input, .person-add select { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem; }
.person-add input:focus, .person-add select:focus { outline: none; border-color: var(--mint); }
.person-add .btn { min-height: 50px; }
.person-add .err { grid-column: 1 / -1; }
.people { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.person { padding: 14px 16px; border-radius: 20px; border: 1.5px solid var(--line); animation: pop .4s var(--ease) backwards; }
.person.is-done { border-color: var(--mint); }
.person.is-target { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 201, 77, .18); }
.person__head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 4px 12px; }
.person__name input { width: 100%; min-height: 40px; padding: 0 8px; margin-left: -8px; border-radius: 10px; border: 1.5px solid transparent; background: transparent; color: var(--ink); font: inherit; font-weight: 700; font-size: 1.125rem; }
.person__name input:hover { border-color: var(--line); }
.person__name input:focus { outline: none; border-color: var(--mint); background: var(--bg); }
.person__st { grid-column: 1; grid-row: 2; font-size: .8125rem; color: var(--ink-2); }
.person.is-none .person__st { color: var(--gold); }
.person.is-done .person__st { color: var(--mint); }
.person__sum { grid-row: 1 / span 2; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.person__sum small { display: block; font-weight: 400; font-size: .75rem; color: var(--ink-2); }
.person__sum.is-over { color: var(--fire-a); }
.person__find { grid-row: 1 / span 2; min-height: 44px; padding: 0 14px; border-radius: 14px; background: var(--card-2); font-weight: 600; font-size: .875rem; transition: background-color .2s, color .2s; }
.person__find:hover { background: var(--mint); color: var(--mint-ink); }
.person.is-target .person__find { background: var(--gold); color: #2A1E00; }
.person__del { grid-row: 1 / span 2; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--ink-2); }
.person__del:hover { background: var(--card-2); color: var(--fire-a); }
.person__del svg { width: 18px; height: 18px; }
.person .list__items { margin-top: 8px; }
.person .list__items li { grid-template-columns: auto minmax(0, 1fr) auto auto auto; }
.price { position: relative; display: inline-flex; align-items: center; }
.price input { width: 104px; min-height: 40px; padding: 0 26px 0 10px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.price input:focus { outline: none; border-color: var(--mint); }
.price i { position: absolute; right: 10px; width: auto !important; height: auto !important; font-style: normal; font-size: .875rem; color: var(--ink-2) !important; pointer-events: none; }
.person__own { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.person__own input { min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: .9375rem; }
.person__own input:focus { outline: none; border-color: var(--mint); }
.target { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; width: 100%; padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--gold); font-size: .9375rem; }
.target b { color: var(--gold); }
.target button { margin-left: auto; min-height: 36px; padding: 0 10px; font-size: .875rem; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.nope { align-self: flex-start; min-height: 32px; font-size: .8125rem; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.nope:hover { color: var(--fire-a); }
.pairs .send { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 12px; background: var(--card-2); font-size: .8125rem; font-weight: 600; }
.pairs .send:hover { color: var(--mint); }
@media (max-width: 860px) {
  .person-add { grid-template-columns: 1fr 1fr; }
  .person-add label:first-child, .person-add .btn { grid-column: 1 / -1; }
  .person__head { grid-template-columns: minmax(0, 1fr) auto auto; }
  .person__find { grid-column: 1 / -1; grid-row: 3; margin-top: 6px; }
  .person .list__items li { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .person .list__items .shops { grid-column: 2 / -1; }
  .person__own { grid-template-columns: minmax(0, 1fr) 96px; }
  .person__own button { grid-column: 1 / -1; }
}
.pairs li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pairs li > span:first-child { flex: 1 1 120px; font-weight: 600; }
