/* Личный кабинет LargoVPN (my.<домен>). Макет B «Карта»: тёмный фон, один зелёный акцент, крупные
   шрифты сайта, карта подписки — главный элемент. Сначала телефон, ниже — большие экраны. */

@font-face { font-family: "Onest"; font-weight: 400 600; font-display: swap; src: url("/fonts/onest-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 400 600; font-display: swap; src: url("/fonts/onest-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-weight: 400 600; font-display: swap; src: url("/fonts/onest-rub.woff2") format("woff2"); unicode-range: U+20BD; }
@font-face { font-family: "Unbounded"; font-weight: 500 700; font-display: swap; src: url("/fonts/unbounded-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 500 700; font-display: swap; src: url("/fonts/unbounded-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-weight: 500 700; font-display: swap; src: url("/fonts/unbounded-rub.woff2") format("woff2"); unicode-range: U+20BD; }

:root {
  --bg: #0b0f0c; --tile: #121813; --tile-2: #171f19; --line: rgba(241, 244, 239, .08); --line-2: rgba(241, 244, 239, .14);
  --text: #f1f4ef; --muted: #8d998f; --accent: #7deb9a; --accent-ink: #0b0f0c; --danger: #ff8f8f;
  --display: "Unbounded", system-ui, sans-serif;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --spring: cubic-bezier(.2, .9, .3, 1.06);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
::selection { background: rgba(125, 235, 154, .32); }

.logo { font: 700 18px/1 var(--display); letter-spacing: -.03em; text-decoration: none; }
.logo span { color: var(--accent); }
.lead { color: var(--muted); }

/* --- Кнопки и поля */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 26px;
  border: 0; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 16px; text-decoration: none;
  background: var(--accent); color: var(--accent-ink); transition: transform .3s var(--spring), opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn--ghost { background: rgba(241, 244, 239, .07); color: var(--text); }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.is-busy { color: transparent; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 20px; height: 20px; border: 2px solid var(--accent-ink); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.textbtn { padding: 6px 2px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; }
.textbtn:hover { color: var(--text); }
.textbtn[disabled] { cursor: default; opacity: .7; }
.textbtn[disabled]:hover { color: var(--muted); }

.input { display: flex; align-items: center; height: 56px; padding: 0 20px; border-radius: 18px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.input:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
.input.is-wrong { box-shadow: inset 0 0 0 1.5px var(--danger); }
.input input { flex: 1; width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 16px; font-weight: 500; }
.input input::placeholder { color: #66716a; }
.input__eye { flex: none; padding: 8px 0 8px 12px; border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--muted); }
.input--code input { text-align: center; font: 600 28px/1 var(--display); letter-spacing: .35em; padding-left: .35em; }
.input--code input::placeholder { color: #2c3530; }
.hint { margin: -2px 4px 0; font-size: 13px; color: var(--muted); }
.error { min-height: 0; color: var(--danger); font-size: 14px; }
.error:empty { display: none; }

/* --- Карта подписки: та же, что в мини-приложении. Зелёная матовая с кругами на воде, серебро и золото — металл */
.card {
  position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 1.586; border-radius: 22px; padding: 16px 18px; color: var(--text);
  background: url("/img/grain.webp") 0 0 / 128px, radial-gradient(120% 100% at 88% -8%, rgba(125, 235, 154, .2), transparent 60%), linear-gradient(155deg, #1d3528, #13241b 58%, #0f1c15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), 0 34px 70px -30px rgba(0, 0, 0, .9);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, rgba(190, 255, 215, .06) 25%, rgba(214, 255, 230, .32) 50%, rgba(190, 255, 215, .06) 75%) 40% 0 / 260% 100% no-repeat;
  -webkit-mask: url("/img/ripples.svg?v=2") 50% 50% / cover no-repeat; mask: url("/img/ripples.svg?v=2") 50% 50% / cover no-repeat;
}
.card .logo { font-size: 13px; }
.card__frog { position: absolute; right: -2%; bottom: -12%; width: 44%; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .45)); }
.card.is-silver { color: #20262b; background: url("/img/brushed.webp") 0 0 / 256px 128px, linear-gradient(135deg, #cdd3d8, #bcc3c9 50%, #aeb6bd); }
.card.is-gold { color: #2e230c; background: url("/img/brushed.webp") 0 0 / 256px 128px, linear-gradient(135deg, #e1c88e, #cfb174 50%, #bd9d5e); }
.card.is-silver::before, .card.is-gold::before {
  -webkit-mask: none; mask: none; inset: -40%; z-index: 0;
  background: linear-gradient(112deg, rgba(0, 0, 0, .14) 8%, transparent 20%, rgba(255, 255, 255, .7) 31%, transparent 43%, rgba(0, 0, 0, .12) 53%, transparent 63%, rgba(255, 255, 255, .6) 71%, transparent 83%);
}
.card.is-silver .logo, .card.is-gold .logo { position: relative; z-index: 1; }
.card.is-silver .logo span, .card.is-gold .logo span { color: inherit; }

/* --- Вход: веер карт, заголовок и форма по центру */
.boot { min-height: 100vh; }
.auth {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 22px 20px 48px;
  background: radial-gradient(60% 40% at 50% 16%, rgba(125, 235, 154, .1), transparent 70%);
}
.auth__logo { align-self: flex-start; }
.fan { position: relative; width: min(100%, 420px); height: 176px; margin: 26px 0 20px; }
.fan .card { position: absolute; left: 50%; top: 0; width: 232px; transform-origin: 50% 120%; }
.fan .card:nth-child(1) { transform: translateX(-50%) rotate(-12deg) translateX(-28px); }
.fan .card:nth-child(2) { transform: translateX(-50%) rotate(-2deg); }
.fan .card:nth-child(3) { transform: translateX(-50%) rotate(9deg) translateX(32px) translateY(6px); }
/* Веер раскрывается один раз, при открытии */
@media (prefers-reduced-motion: no-preference) {
  .fan .card { animation: deal .9s var(--spring) both; }
  .fan .card:nth-child(2) { animation-delay: .06s; }
  .fan .card:nth-child(3) { animation-delay: .12s; }
  @keyframes deal { from { transform: translateX(-50%) translateY(26px) rotate(0); opacity: 0; } }
}
.step { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: stretch; }
.step h1 { font: 600 clamp(28px, 7.4vw, 44px)/1.05 var(--display); letter-spacing: -.04em; text-align: center; text-wrap: balance; }
.step .lead { margin-top: 10px; text-align: center; text-wrap: balance; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; margin-top: 28px; padding: 4px; border-radius: 999px; background: var(--tile); }
.tabs button { height: 44px; border: 0; border-radius: 999px; background: none; cursor: pointer; font-weight: 600; color: var(--muted); transition: background-color .25s, color .25s; }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }
/* minmax(0, 1fr): поле кода с крупными цифрами не распирает форму шире экрана */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
.step > .lead + .form { margin-top: 28px; }
.row { display: flex; justify-content: flex-end; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; margin: 4px 4px 0; font-size: 14px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.consent a { color: var(--text); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.form .btn { margin-top: 6px; }
.or { margin: 18px 0; text-align: center; font-size: 13px; color: var(--muted); }
.links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 22px; margin-top: 18px; }
.step[data-step="telegram"] .btn { margin-top: 28px; }
.qr { margin-top: 22px; text-align: center; font-size: 14px; color: var(--muted); }
.qr__code { width: 200px; aspect-ratio: 1; margin: 0 auto 12px; overflow: hidden; border-radius: 20px; background: var(--text); }
.wait { margin-top: 16px; text-align: center; color: var(--muted); font-size: 14px; }
.tg { width: 20px; height: 20px; border-radius: 50%; background: #2aabee; display: grid; place-items: center; }
.tg i { width: 9px; height: 8px; margin-left: -1px; background: #fff; clip-path: polygon(0 45%, 100% 0, 78% 100%, 45% 70%, 30% 100%, 28% 62%); }
.tg--dark { background: var(--accent-ink); }
.tg--dark i { background: var(--accent); }

@media (min-width: 900px) {
  .auth { padding: 32px 48px 72px; }
  .fan { height: 250px; margin: 22px 0 14px; }
  .fan .card { width: 340px; border-radius: 26px; padding: 22px 24px; }
  .fan .card .logo { font-size: 16px; }
  /* Заголовок шире формы: «Вход в LargoVPN» в одну строку, как в макете */
  .step h1 { align-self: center; width: max-content; max-width: calc(100vw - 96px); }
}

/* --- Кабинет: шапка, страницы, меню снизу на телефоне */
.shell { min-height: 100vh; }
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px; height: 64px; padding: 0 20px;
  background: rgba(11, 15, 12, .84); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.top__nav { display: none; }
.top__right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.pill { text-decoration: none; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 14px; background: var(--tile); white-space: nowrap; }
.pill:empty { display: none; }
.me { position: relative; }
.avatar { width: 36px; height: 36px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; font: 600 14px/1 var(--display); background: var(--accent); color: var(--accent-ink); }
.me__menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; padding: 8px; border-radius: 18px;
  background: rgba(28, 36, 30, .96); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .12), 0 20px 50px -16px rgba(0, 0, 0, .9);
}
.me__who { padding: 10px 12px 12px; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.me__item { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border: 0; border-radius: 12px; background: none; cursor: pointer; text-align: left; font-weight: 500; }
.me__item:hover { background: rgba(241, 244, 239, .06); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 12px 20px 130px; }
.quiet { color: var(--muted); }
.page__title { font: 600 clamp(30px, 7.6vw, 52px)/1.05 var(--display); letter-spacing: -.045em; margin: 8px 0 24px; }

/* Главная: карта и рядом — что делать */
.hero { display: grid; gap: 28px; }
.card--hero { padding: 22px 24px; border-radius: 26px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 120px -30px rgba(125, 235, 154, .25); }
.card--hero .logo { font-size: 16px; position: relative; z-index: 1; }
.card__top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 500; background: rgba(0, 0, 0, .25); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.chip.is-warn::before { background: #ffc266; }
.chip.is-off::before { background: var(--muted); }
.card__days { position: absolute; z-index: 1; left: 24px; bottom: 58px; font: 600 clamp(58px, 17vw, 96px)/.9 var(--display); letter-spacing: -.06em; }
.card__days small { display: block; margin-top: 8px; font: 500 15px/1 var(--sans); letter-spacing: 0; opacity: .72; }
.card__days.is-text { font-size: clamp(30px, 8vw, 46px); line-height: 1; letter-spacing: -.045em; max-width: 60%; }
.card__till { position: absolute; z-index: 1; left: 24px; bottom: 22px; font-size: 14px; opacity: .72; }
.card--hero .card__frog { width: 50%; right: -4%; bottom: -10%; }
.card.is-off { background: url("/img/grain.webp") 0 0 / 128px, linear-gradient(150deg, #1e2320, #121513 72%); }
.card.is-off::before { display: none; }
.card.is-silver .chip, .card.is-gold .chip { background: rgba(40, 30, 10, .1); }
.hero__text h1 { font: 600 clamp(30px, 7.6vw, 60px)/1.02 var(--display); letter-spacing: -.045em; text-wrap: balance; }
.hero__text p { margin-top: 14px; font-size: 17px; color: var(--muted); max-width: 28em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* Плитки разного размера без теней */
.grid { display: grid; gap: 12px; margin-top: 44px; grid-template-columns: 1fr 1fr; }
.tile { position: relative; overflow: hidden; padding: 20px; border-radius: 24px; background: var(--tile); color: inherit; text-decoration: none; }
.tile h2 { font: 600 17px/1.2 var(--display); letter-spacing: -.02em; }
.tile .big { margin-top: 18px; font: 600 32px/1 var(--display); letter-spacing: -.05em; }
.tile .quiet { margin-top: 6px; font-size: 14px; }
.tile--wide { grid-column: 1 / -1; }
.tile--link { transition: background-color .2s; }
.tile--link:hover { background: var(--tile-2); }
.tile--accent { background: var(--accent); color: var(--accent-ink); }
.tile--accent .quiet { color: rgba(11, 15, 12, .66); }
.tile--gift { min-height: 150px; }
.gift { position: absolute; right: -18px; bottom: -26px; width: 132px; border-radius: 12px; transform: rotate(-10deg); box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .8); }
.dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.dots i { width: 28px; height: 8px; border-radius: 4px; background: var(--accent); }
.dots i.off { background: var(--line-2); }
.tile__connect { display: grid; gap: 18px; margin-top: 16px; }
.tile__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn--small { height: 44px; padding: 0 18px; font-size: 15px; }

.qr { margin-top: 18px; }
.qr .qr__code { width: 176px; margin: 0 0 10px; }
.steps .qr, .block .qr, .qr--tile { text-align: left; }
.qr--tile { margin-top: 0; }
.qr--tile .qr__code { margin: 0; }

/* Подключение */
.none { max-width: 34em; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { height: 40px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer; font-weight: 500; background: var(--tile); color: var(--muted); }
.seg button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.steps { counter-reset: step; list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.steps__item { counter-increment: step; position: relative; padding: 22px 22px 22px 66px; border-radius: 24px; background: var(--tile); }
.steps__item::before {
  content: counter(step); position: absolute; left: 20px; top: 20px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font: 600 14px/1 var(--display); background: var(--accent); color: var(--accent-ink);
}
.steps__item h2 { font: 600 19px/1.25 var(--display); letter-spacing: -.02em; }
.steps__item > .quiet { margin-top: 6px; max-width: 34em; }
.stores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 8px 18px; border-radius: 16px; text-decoration: none; background: var(--tile-2); box-shadow: inset 0 0 0 1px var(--line); }
.store b { font-weight: 600; }
.store span { font-size: 13px; color: var(--muted); }
.store.is-main { background: var(--text); color: var(--bg); box-shadow: none; }
.store.is-main span { color: rgba(11, 15, 12, .6); }
.inline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 16px; max-width: 420px; }
/* На телефоне поле и кнопка друг под другом: иначе кнопка сжимает поле до пары букв */
@media (max-width: 519px) {
  .inline { grid-template-columns: minmax(0, 1fr); }
  .inline .btn { justify-self: start; }
}
[data-tv-form] .input input { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.inline .input input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 500; }
.steps__item .error { margin-top: 10px; }

.devices { margin-top: 44px; }
.devices__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.devices__head h2 { font: 600 22px/1.2 var(--display); letter-spacing: -.03em; }
.devices__list { list-style: none; margin: 14px 0 0; padding: 0; border-radius: 24px; background: var(--tile); }
.devices__list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line); }
.devices__list li:first-child { border-top: 0; }
.devices__list small { display: block; color: var(--muted); font-size: 13px; }
.devices__list .empty { color: var(--muted); }
.unlink { flex: none; height: 38px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer; font-weight: 500; font-size: 14px; color: var(--danger); background: rgba(255, 143, 143, .08); }
.devices__note { margin-top: 12px; font-size: 14px; max-width: 40em; }

/* Оплата: сроки — маленькие карты тех же цветов, что карта подписки; итог — справа */
/* На телефоне итог сразу после сроков: блоки страницы встают в общую сетку вместе с ним */
.pay { display: grid; gap: 12px; }
.pay__main { display: contents; }
.pay__main > .block { order: 2; }
.pay__main > .block:first-child { order: 0; }
.checkout { order: 1; }
.block { padding: 22px; border-radius: 24px; background: var(--tile); }
.block h2 { font: 600 19px/1.25 var(--display); letter-spacing: -.02em; }
.block > .quiet { margin-top: 6px; max-width: 36em; }
.block > .btn { margin-top: 16px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.plan {
  position: relative; display: flex; flex-direction: column; aspect-ratio: 1.586; padding: 14px 16px; border: 0; border-radius: 18px; cursor: pointer; text-align: left;
  transition: transform .35s var(--spring), box-shadow .25s;
}
.plan.card { padding: 14px 16px; }
.plan__title { position: relative; z-index: 1; font-weight: 600; font-size: 15px; }
.plan__price { position: relative; z-index: 1; margin-top: auto; font: 600 clamp(22px, 6vw, 28px)/1 var(--display); letter-spacing: -.04em; }
.plan__foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; }
.plan__per { font-size: 13px; opacity: .72; white-space: nowrap; }
.plan__save { flex: none; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent); color: var(--accent-ink); }
.plan.is-silver .plan__save, .plan.is-gold .plan__save { background: rgba(40, 30, 10, .82); color: #fff; }
.plan[aria-checked="true"] { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent), 0 24px 40px -22px rgba(0, 0, 0, .9); }
.plan:not([aria-checked="true"]):hover { transform: translateY(-2px); }
/* Самые узкие телефоны (320 px): карта срока по высоте содержимого, иначе цена не помещается */
@media (max-width: 379px) {
  .plan { aspect-ratio: auto; min-height: 112px; }
  .plan__price { margin-top: 18px; font-size: 21px; }
  .plan__per { font-size: 12px; }
}
.amounts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.amounts button { height: 44px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer; font-weight: 600; background: var(--tile-2); box-shadow: inset 0 0 0 1px var(--line); }
.amounts button:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.block .error { margin-top: 10px; }
.history { list-style: none; margin: 14px 0 0; padding: 0; }
.history li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.history li:first-child { border-top: 0; }
.history small { display: block; color: var(--muted); font-size: 13px; }
.history b { flex: none; font-weight: 600; white-space: nowrap; }
.history .is-refunded b { color: var(--muted); text-decoration: line-through; }
.history .empty { color: var(--muted); border: 0; }
.checkout { padding: 24px; border-radius: 24px; background: var(--tile-2); box-shadow: inset 0 0 0 1px var(--line); align-self: start; }
.checkout__sum { margin-top: 6px; font: 600 44px/1 var(--display); letter-spacing: -.05em; }
.checkout__what { margin-top: 8px; font-weight: 500; }
.checkout__discount { margin-top: 6px; color: var(--accent); font-size: 14px; }
.checkout__btns { display: grid; gap: 8px; margin-top: 22px; }
.checkout .error { margin-top: 10px; }
.checkout__fine { margin-top: 16px; font-size: 13px; color: var(--muted); }
.checkout__fine a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--line-2); }

/* Друзья */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.stat { padding: 20px; border-radius: 24px; background: var(--tile); }
.stat__num { font: 600 32px/1 var(--display); letter-spacing: -.05em; margin-bottom: 8px; }
.stat .quiet, .stat p:last-child { font-size: 14px; }
.stat--accent { grid-column: 1 / -1; background: var(--accent); color: var(--accent-ink); }
.stat--accent p:last-child { color: rgba(11, 15, 12, .66); }
.linkbox { margin-top: 16px; padding: 14px 18px; border-radius: 16px; background: var(--tile-2); box-shadow: inset 0 0 0 1px var(--line); font: 500 15px/1.4 var(--sans); overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
.linkbox__alt { margin-top: 14px; font-size: 14px; }
.linkbox__alt .textbtn { padding: 0; font-size: 14px; color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }

/* Подарки */
.designs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.designs button { padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: pointer; background: none; transition: transform .35s var(--spring), box-shadow .25s; }
.designs img { width: 100%; aspect-ratio: 1280 / 840; object-fit: cover; }
.designs button[aria-checked="true"] { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.seg--terms { margin-top: 16px; }
.input--area { height: auto; margin-top: 16px; padding: 14px 20px; }
.input--area textarea { width: 100%; border: 0; outline: 0; resize: none; background: none; font: 500 16px/1.4 var(--sans); color: var(--text); }
.input--area textarea::placeholder { color: #66716a; }
.checkout__card { width: 100%; margin-bottom: 18px; border-radius: 16px; box-shadow: 0 20px 40px -22px rgba(0, 0, 0, .9); }
.gifts { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.gifts li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; align-items: center; }
.gifts img { border-radius: 10px; }
.gifts p { font-weight: 600; }
.gifts .tile__btns { margin-top: 8px; }
.giftopen { max-width: 520px; margin: 0 auto; text-align: center; }
.giftopen__card { width: 100%; margin: 12px 0 28px; border-radius: 22px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9); transform: rotate(-2deg); }
.giftopen .page__title { margin: 0 0 12px; }
.giftopen__msg { margin: 0 auto 12px; max-width: 26em; font-size: 18px; font-style: italic; }
.giftopen .hero__actions { justify-content: center; }
.giftopen .error { margin-top: 12px; }

/* Профиль */
.profile { display: grid; gap: 12px; max-width: 720px; }
.profile .block + .block { margin-top: 0; }
.form--narrow { max-width: 420px; margin-top: 16px; }
.form--narrow .btn { justify-self: start; }
.btn--danger { background: rgba(255, 143, 143, .1); color: var(--danger); }
a.me__item { color: inherit; text-decoration: none; }

.tabbar {
  position: fixed; z-index: 10; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; border-radius: 999px;
  background: rgba(28, 36, 30, .72); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .12), 0 16px 40px -14px rgba(0, 0, 0, .9);
}
.tabbar a { padding: 10px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
@media (max-width: 359px) { .tabbar a { padding: 9px 9px; font-size: 12px; } }
.tabbar a[aria-current] { background: var(--text); color: var(--bg); }
.toast {
  position: fixed; z-index: 20; left: 50%; top: 76px; transform: translateX(-50%); padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: rgba(28, 36, 30, .96); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .12), 0 16px 40px -14px rgba(0, 0, 0, .9);
}

@media (min-width: 900px) {
  .top { padding: 0 max(40px, calc(50% - 520px)); }
  .top__nav { display: flex; gap: 4px; }
  .top__nav a { padding: 9px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 500; }
  .top__nav a:hover { color: var(--text); }
  .top__nav a[aria-current] { background: var(--tile); color: var(--text); }
  .tabbar { display: none; }
  .wrap { padding: 40px 40px 80px; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
  .card--hero { transform: rotate(-3deg); }
  .grid { grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: minmax(150px, auto); margin-top: 72px; }
  .tile--wide { grid-column: span 1; grid-row: span 2; padding: 28px; }
  .tile__connect { grid-template-columns: auto 1fr; gap: 28px; align-items: end; margin-top: 24px; }
  .pay { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
  .pay__main { display: grid; gap: 12px; }
  .stats { grid-template-columns: 1fr 1fr 1.4fr; }
  .stat--accent { grid-column: auto; }
  .designs { grid-template-columns: repeat(4, 1fr); }
  .checkout { position: sticky; top: 88px; }
  .plans { gap: 14px; }
  .plan.card { padding: 18px 20px; border-radius: 22px; }
  .plan__title { font-size: 16px; }
  .plan__price { font-size: 34px; }
  .block { padding: 28px; }
  .steps__item { padding: 28px 28px 28px 80px; }
  .steps__item::before { left: 26px; top: 26px; }
}
