/* ════════════ ТОКЕНЫ ════════════ */
    :root {
      --paper: #f5efe3;
      --paper-2: #ede4d0;
      --paper-deep: #e4d9c2;
      --ink: #1d2542;
      --ink-soft: #49506f;
      --ink-faint: rgba(29, 37, 66, 0.45);
      --rule: rgba(29, 37, 66, 0.25);
      --rule-soft: rgba(29, 37, 66, 0.12);
      --verm: #b0421f;
      /* киноварь — акцент старых атласов */
      --verm-deep: #8c3014;
      --night: #0d1330;
      --night-2: #182048;
      --star: #ece7f6;
      --star-dim: rgba(236, 231, 246, 0.55);

      --f-serif: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
      --f-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

      --wrap: min(1140px, 92vw);
    }

    /* ════════════ БАЗА ════════════ */
    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    html,
    body {
      margin: 0;
      padding: 0;
    }

    body {
      background:
        radial-gradient(1100px 500px at 85% -5%, rgba(176, 66, 31, 0.05), transparent 60%),
        radial-gradient(900px 600px at 0% 30%, rgba(29, 37, 66, 0.05), transparent 55%),
        var(--paper);
      color: var(--ink);
      font-family: var(--f-serif);
      font-size: 18px;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
      overflow-x: hidden;
      font-variant-emoji: text;
      -webkit-font-variant-emoji: text;
    }

    svg text {
      font-variant-emoji: text;
      -webkit-font-variant-emoji: text;
    }

    a {
      color: inherit;
    }

    img,
    svg {
      max-width: 100%;
    }

    /* бумажное зерно */
    body::after {
      content: "";
      position: fixed;
      inset: 0;
      z-index: 1;
      pointer-events: none;
      opacity: 0.20;
      mix-blend-mode: multiply;
      background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.5 0 0 0 0 0.42 0 0 0 0.28 0'/></filter><rect width='180' height='180' filter='url(%23p)'/></svg>");
      background-size: 180px 180px;
    }

    ::selection {
      background: var(--verm);
      color: var(--paper);
    }

    :focus-visible {
      outline: 2px dashed var(--verm);
      outline-offset: 3px;
      border-radius: 2px;
    }

    .skip-link {
      position: absolute;
      left: 16px;
      top: -60px;
      z-index: 200;
      background: var(--ink);
      color: var(--paper);
      padding: 10px 18px;
      font-family: var(--f-mono);
      font-size: 13px;
      text-decoration: none;
      transition: top 0.2s ease;
    }

    .skip-link:focus {
      top: 12px;
    }

    .wrap {
      width: var(--wrap);
      margin: 0 auto;
      position: relative;
    }

    /* ════════════ ТИПОГРАФИКА ════════════ */
    h1,
    h2,
    h3 {
      margin: 0;
      font-weight: 500;
      letter-spacing: -0.01em;
      text-wrap: balance;
      line-height: 1.08;
    }

    h1 {
      font-size: clamp(40px, 5.6vw, 80px);
    }

    h2 {
      font-size: clamp(30px, 4vw, 54px);
    }

    h3 {
      font-size: clamp(20px, 2vw, 26px);
    }

    h1 em,
    h2 em {
      font-style: italic;
      color: var(--verm);
    }

    .kicker {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      font-family: var(--f-mono);
      font-size: 12px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--ink-soft);
      margin: 0 0 20px;
    }

    .kicker::before {
      content: "✶";
      color: var(--verm);
    }

    .kicker .idx {
      color: var(--verm);
    }

    .lede {
      font-size: clamp(18px, 1.4vw, 21px);
      color: var(--ink-soft);
      max-width: 56ch;
      text-wrap: pretty;
    }

    main {
      position: relative;
      z-index: 2;
      counter-reset: sec;
    }

    main>section {
      position: relative;
      padding: clamp(72px, 9vw, 130px) 0;
    }

    /* номер раздела на полях — как фолиация в атласе */
    main>section::before {
      counter-increment: sec;
      content: "лист 0" counter(sec);
      position: absolute;
      top: clamp(72px, 9vw, 130px);
      left: calc((100vw - var(--wrap)) / 2 - 70px);
      font-family: var(--f-mono);
      font-size: 11px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--ink-faint);
      writing-mode: vertical-rl;
      transform: rotate(180deg);
    }

    @media (max-width: 1320px) {
      main>section::before {
        display: none;
      }
    }

    .rule-h {
      border: none;
      height: 1px;
      margin: 0;
      background: linear-gradient(to right, transparent, var(--rule), transparent);
    }

    /* ════════════ КНОПКИ ════════════ */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      padding: 16px 34px;
      background: var(--ink);
      color: var(--paper);
      border: 1px solid var(--ink);
      font-family: var(--f-mono);
      font-size: 13px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      text-decoration: none;
      cursor: pointer;
      box-shadow: 4px 4px 0 var(--verm);
      transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

    .btn:hover {
      transform: translate(-2px, -2px);
      box-shadow: 7px 7px 0 var(--verm);
    }

    .btn:active {
      transform: translate(1px, 1px);
      box-shadow: 2px 2px 0 var(--verm);
    }

    .btn .arr {
      transition: transform 0.25s ease;
    }

    .btn:hover .arr {
      transform: translateX(4px);
    }

    .btn.light {
      background: var(--paper);
      color: var(--ink);
      border-color: var(--paper);
      box-shadow: 4px 4px 0 var(--verm);
    }

    .btn.ghost {
      background: transparent;
      color: var(--ink);
      border: 1px solid var(--ink);
      box-shadow: none;
    }

    .btn.ghost:hover {
      background: var(--ink);
      color: var(--paper);
    }

    /* ════════════ ШАПКА ════════════ */
    .top {
      position: sticky;
      top: 0;
      z-index: 100;
      background: color-mix(in srgb, var(--paper) 92%, transparent);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      border-bottom: 1px solid var(--rule-soft);
      transition: box-shadow 0.3s ease;
    }

    .top.scrolled {
      box-shadow: 0 8px 30px -18px rgba(29, 37, 66, 0.4);
    }

    .top-in {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 14px 0;
    }

    .brand {
      display: flex;
      align-items: baseline;
      gap: 12px;
      text-decoration: none;
    }

    .brand b {
      font-size: 19px;
      font-weight: 600;
      letter-spacing: 0.02em;
    }

    .brand .ed {
      font-family: var(--f-mono);
      font-size: 10px;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--verm);
    }

    .top-nav {
      display: flex;
      flex-wrap: wrap;
      gap: 4px 22px;
    }

    .top-nav a {
      font-family: var(--f-mono);
      font-size: 12px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      text-decoration: none;
      color: var(--ink-soft);
      padding: 6px 0;
      border-bottom: 1px solid transparent;
      transition: color 0.25s ease, border-color 0.25s ease;
    }

    .top-nav a:hover {
      color: var(--verm);
      border-color: var(--verm);
    }

    .top .btn {
      padding: 11px 20px;
      font-size: 11px;
    }

    @media (max-width: 880px) {
      .top-nav {
        display: none;
      }
    }

    /* ════════════ HERO ════════════ */
    .hero {
      overflow: clip;
    }

    .hero-grid {
      display: grid;
      grid-template-columns: 1.04fr 0.96fr;
      gap: clamp(36px, 5vw, 80px);
      align-items: center;
    }

    .hero h1 {
      margin: 0 0 24px;
    }

    .hero .lede {
      margin: 0 0 34px;
    }

    .hero-cta {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 18px;
      margin-bottom: 14px;
    }

    .hero-note {
      font-family: var(--f-mono);
      font-size: 12px;
      letter-spacing: 0.08em;
      color: var(--ink-faint);
    }

    /* мини-форма «покажите моё небо» */
    .sky-try {
      margin-top: 44px;
      padding: 22px 24px 24px;
      border: 1px solid var(--rule);
      background: color-mix(in srgb, var(--paper-2) 60%, transparent);
      position: relative;
    }

    .sky-try::before {
      content: "опыт № 1";
      position: absolute;
      top: -9px;
      left: 18px;
      background: var(--paper);
      padding: 0 10px;
      font-family: var(--f-mono);
      font-size: 10px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--verm);
    }

    .sky-try label {
      display: block;
      font-size: 17px;
      font-style: italic;
      margin-bottom: 12px;
    }

    .sky-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .sky-row input[type="date"] {
      flex: 1 1 180px;
      padding: 12px 14px;
      font-family: var(--f-mono);
      font-size: 15px;
      color: var(--ink);
      background: var(--paper);
      border: 1px solid var(--rule);
      border-radius: 0;
      color-scheme: light;
    }

    .sky-row input[type="date"]:focus-visible {
      outline-offset: 0;
    }

    .sky-row .btn {
      padding: 12px 22px;
      font-size: 11px;
    }

    .sky-result {
      margin: 18px 0 0;
      padding-top: 16px;
      border-top: 1px dashed var(--rule);
      font-size: 17px;
      line-height: 1.55;
    }

    .sky-result[hidden] {
      display: none;
    }

    .sky-result .sig {
      color: var(--verm);
      font-style: italic;
    }

    .sky-result .deg {
      font-family: var(--f-mono);
      font-size: 14px;
      color: var(--ink-soft);
      white-space: nowrap;
    }

    /* планисфера + видео-кругляш */
    .planisphere {
      position: relative;
      aspect-ratio: 1;
    }

    .planisphere svg {
      position: relative;
      z-index: 2;
      width: 100%;
      height: 100%;
      display: block;
      color: var(--ink);
      pointer-events: none;
    }

    .pl-video {
      position: absolute;
      inset: 16.5%;
      z-index: 1;
      border-radius: 50%;
      overflow: hidden;
      box-shadow: 0 30px 70px -28px rgba(29, 37, 66, 0.6),
        0 0 0 1px var(--rule);
    }

    .pl-video video {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .pl-video::after {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: 50%;
      box-shadow: inset 0 0 44px rgba(29, 37, 66, 0.4);
      pointer-events: none;
    }

    .planisphere .corner-note {
      position: absolute;
      right: 2%;
      bottom: 0;
      font-family: var(--f-mono);
      font-size: 10px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--ink-faint);
    }

    .pl-spin {
      animation: pl-rot 240s linear infinite;
    }

    @keyframes pl-rot {
      to {
        transform: rotate(360deg);
      }
    }

    .sun-pointer {
      opacity: 0;
      transition: opacity 0.6s ease, transform 1.4s cubic-bezier(.25, .8, .25, 1);
    }

    .sun-pointer.on {
      opacity: 1;
    }

    @media (max-width: 920px) {
      .hero-grid {
        grid-template-columns: 1fr;
      }

      .planisphere {
        max-width: 520px;
        margin: 0 auto;
        width: 100%;
        order: -1;
      }
    }

    /* ════════════ ФАКТЫ-КОЛОНТИТУЛ ════════════ */
    .facts {
      border-top: 1px solid var(--rule);
      border-bottom: 1px solid var(--rule);
      padding: 14px 0;
    }

    .facts ul {
      list-style: none;
      margin: 0 auto;
      padding: 0;
      width: var(--wrap);
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 6px 0;
      font-family: var(--f-mono);
      font-size: 12px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--ink-soft);
    }

    .facts li {
      display: inline-flex;
      align-items: center;
    }

    .facts li+li::before {
      content: "✶";
      color: var(--verm);
      margin: 0 16px;
      font-size: 10px;
    }

    /* ════════════ ТАБЛИЦЫ I–III (как составляется) ════════════ */
    .plates3 {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: clamp(20px, 3vw, 40px);
      margin-top: clamp(40px, 5vw, 64px);
    }

    .plate3 {
      border: 1px solid var(--rule);
      padding: 26px 24px 24px;
      background: color-mix(in srgb, var(--paper-2) 45%, transparent);
      position: relative;
    }

    .plate3 .tab {
      position: absolute;
      top: -9px;
      left: 18px;
      background: var(--paper);
      padding: 0 10px;
      font-family: var(--f-mono);
      font-size: 10px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--verm);
    }

    .plate3 .fig {
      display: grid;
      place-items: center;
      padding: 18px 0 22px;
      color: var(--ink);
    }

    .plate3 .fig svg {
      width: 120px;
      height: 120px;
    }

    .plate3 h3 {
      margin-bottom: 8px;
    }

    .plate3 p {
      margin: 0;
      color: var(--ink-soft);
      font-size: 16px;
    }

    @media (max-width: 880px) {
      .plates3 {
        grid-template-columns: 1fr;
      }
    }

    /* ════════════ НОЧЬ РОЖДЕНИЯ ════════════ */
    .night {
      background:
        radial-gradient(900px 500px at 20% 0%, rgba(90, 80, 190, 0.18), transparent 60%),
        radial-gradient(700px 460px at 85% 100%, rgba(176, 66, 31, 0.14), transparent 55%),
        var(--night);
      color: var(--star);
      border-top: 1px solid var(--ink);
      border-bottom: 1px solid var(--ink);
    }

    .night .kicker {
      color: var(--star-dim);
    }

    .night .lede {
      color: var(--star-dim);
    }

    .night h2 em {
      color: #f0b08e;
    }

    .night-head {
      max-width: 760px;
      margin-bottom: clamp(32px, 4vw, 52px);
    }

    .const-stage {
      position: relative;
    }

    .const-stage svg {
      width: 100%;
      height: auto;
      display: block;
    }

    .const {
      cursor: pointer;
    }

    /* убираем браузерную рамку фокуса — индикатор это само свечение созвездия */
    .const:focus,
    .const:focus-visible {
      outline: none;
    }

    .const .lines {
      stroke: var(--star-dim);
      stroke-width: 0.8;
      opacity: 0.35;
      transition: opacity 0.35s ease, stroke 0.35s ease, stroke-width 0.35s ease;
    }

    .const .dots circle {
      fill: var(--star);
      transition: filter 0.35s ease, r 0.35s ease;
    }

    .const .cname {
      fill: #f0b08e;
      font-family: var(--f-mono);
      font-size: 13px;
      letter-spacing: 0.2em;
      opacity: 0;
      transition: opacity 0.35s ease, transform 0.35s ease;
      transform: translateY(4px);
      text-transform: uppercase;
    }

    /* подсветка: и по наведению, и по клику/таб-фокусу (мышь, клавиатура, тач) */
    .const:hover .lines,
    .const:focus .lines {
      opacity: 1;
      stroke: #f0d9a4;
      stroke-width: 1.1;
    }

    .const:hover .cname,
    .const:focus .cname {
      opacity: 1;
      transform: none;
    }

    .const:hover .dots circle,
    .const:focus .dots circle {
      filter: drop-shadow(0 0 5px rgba(240, 200, 150, 0.95));
    }

    /* активная (выбранная) звезда созвездия чуть крупнее и ярче */
    .const:hover .dots circle:first-child,
    .const:focus .dots circle:first-child {
      filter: drop-shadow(0 0 7px rgba(244, 227, 178, 1));
    }

    .night-hint {
      margin-top: 18px;
      font-family: var(--f-mono);
      font-size: 12px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--star-dim);
    }

    .tw {
      animation: tw 3.4s ease-in-out infinite;
      animation-delay: var(--td, 0s);
    }

    @keyframes tw {

      0%,
      100% {
        opacity: 0.25;
      }

      50% {
        opacity: 1;
      }
    }

    /* ════════════ ЛИСТЫ АТЛАСА (галерея) ════════════ */
    .plates-scroller {
      display: flex;
      gap: clamp(18px, 2.6vw, 34px);
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      padding: 10px 4px 26px;
      scrollbar-width: thin;
      scrollbar-color: var(--verm) transparent;
    }

    .plates-scroller:focus-visible {
      outline-offset: 6px;
    }

    .plate-card {
      flex: 0 0 min(380px, 78vw);
      scroll-snap-align: center;
      margin: 0;
      background: var(--paper);
      border: 1px solid var(--rule);
      box-shadow: 0 24px 44px -30px rgba(29, 37, 66, 0.55);
      padding: 14px 14px 0;
      transition: transform 0.35s ease;
    }

    .plate-card:hover {
      transform: translateY(-6px) rotate(-0.4deg);
    }

    .plate-card svg {
      display: block;
      width: 100%;
      height: auto;
      border: 1px solid var(--rule-soft);
    }

    .plate-card figcaption {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 10px;
      padding: 12px 4px 14px;
      font-family: var(--f-mono);
      font-size: 12px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--ink-soft);
    }

    .plate-card figcaption .no {
      color: var(--verm);
    }

    .plates-nav {
      display: flex;
      gap: 10px;
      justify-content: flex-end;
      margin-top: 4px;
    }

    .plates-nav button {
      width: 46px;
      height: 46px;
      display: grid;
      place-items: center;
      background: transparent;
      border: 1px solid var(--ink);
      color: var(--ink);
      font-size: 18px;
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease;
    }

    .plates-nav button:hover {
      background: var(--ink);
      color: var(--paper);
    }

    /* ════════════ КАТАЛОГ ИЗДАНИЙ (цены) ════════════ */
    .catalog {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: clamp(20px, 3vw, 40px);
      max-width: 940px;
      margin: clamp(40px, 5vw, 64px) auto 0;
    }

    .cat-card {
      position: relative;
      background:
        repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule-soft) 31px 32px),
        var(--paper);
      border: 1px solid var(--rule);
      box-shadow: 0 26px 46px -32px rgba(29, 37, 66, 0.5);
      padding: 30px 30px 28px;
      transform: rotate(-0.5deg);
    }

    .cat-card+.cat-card {
      transform: rotate(0.6deg);
    }

    .cat-card .cat-no {
      font-family: var(--f-mono);
      font-size: 11px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--verm);
      margin-bottom: 8px;
    }

    .cat-card h3 {
      font-size: clamp(24px, 2.4vw, 32px);
      margin-bottom: 4px;
    }

    .cat-card .price {
      font-size: clamp(34px, 3.4vw, 46px);
      font-style: italic;
      line-height: 1.2;
      margin: 10px 0 18px;
    }

    .cat-card .price small {
      font-size: 0.45em;
      font-style: normal;
      color: var(--ink-soft);
    }

    .cat-card dl {
      margin: 0 0 24px;
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 6px 16px;
      font-size: 15.5px;
    }

    .cat-card dt {
      font-family: var(--f-mono);
      font-size: 11.5px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--ink-soft);
      align-self: baseline;
      padding-top: 3px;
    }

    .cat-card dd {
      margin: 0;
    }

    .stamp {
      position: absolute;
      top: 18px;
      right: 18px;
      width: 86px;
      height: 86px;
      display: grid;
      place-items: center;
      text-align: center;
      border: 2px solid var(--verm);
      border-radius: 50%;
      color: var(--verm);
      font-family: var(--f-mono);
      font-size: 10px;
      line-height: 1.3;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      transform: rotate(10deg);
      opacity: 0.85;
      mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='90' height='90'><filter id='r'><feTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.85 0'/><feComposite operator='in' in2='SourceGraphic'/></filter><rect width='90' height='90' fill='black' filter='url(%23r)'/></svg>");
      -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='90' height='90'><filter id='r'><feTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.85 0'/><feComposite operator='in' in2='SourceGraphic'/></filter><rect width='90' height='90' fill='black' filter='url(%23r)'/></svg>");
    }

    @media (max-width: 800px) {
      .catalog {
        grid-template-columns: 1fr;
      }
    }

    /* ════════════ СПРАВКА (FAQ) ════════════ */
    .faq {
      max-width: 860px;
      margin: clamp(36px, 4vw, 56px) auto 0;
    }

    .faq details {
      border-top: 1px solid var(--rule);
    }

    .faq details:last-child {
      border-bottom: 1px solid var(--rule);
    }

    .faq summary {
      list-style: none;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 18px;
      padding: 22px 4px;
      font-size: clamp(19px, 1.8vw, 24px);
      font-style: italic;
    }

    .faq summary::-webkit-details-marker {
      display: none;
    }

    .faq summary .m {
      font-family: var(--f-mono);
      font-style: normal;
      font-size: 18px;
      color: var(--verm);
      flex: none;
      transition: transform 0.3s ease;
    }

    .faq details[open] summary .m {
      transform: rotate(45deg);
    }

    .faq .a {
      padding: 0 4px 26px;
      color: var(--ink-soft);
      max-width: 62ch;
      font-size: 16.5px;
    }

    /* ════════════ ФИНАЛ ════════════ */
    .finale {
      background:
        radial-gradient(800px 420px at 50% 115%, rgba(176, 66, 31, 0.22), transparent 60%),
        radial-gradient(2px 2px at 18% 30%, var(--star-dim) 50%, transparent 51%),
        radial-gradient(2px 2px at 72% 18%, var(--star-dim) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 38% 64%, var(--star-dim) 50%, transparent 51%),
        radial-gradient(2px 2px at 88% 56%, var(--star-dim) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 8% 78%, var(--star-dim) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 55% 38%, var(--star-dim) 50%, transparent 51%),
        var(--night);
      color: var(--star);
      text-align: center;
      border-top: 1px solid var(--ink);
    }

    .finale h2 {
      max-width: 22ch;
      margin: 0 auto 18px;
    }

    .finale h2 em {
      color: #f0b08e;
    }

    .finale .lede {
      margin: 0 auto 40px;
      color: var(--star-dim);
    }

    .finale .glyph-row {
      font-size: 15px;
      letter-spacing: 0.6em;
      color: var(--star-dim);
      margin-bottom: 26px;
    }

    .finale-meta {
      margin-top: 30px;
      font-family: var(--f-mono);
      font-size: 12px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--star-dim);
    }

    .finale-meta .s {
      color: #f0b08e;
      margin: 0 12px;
    }

    /* ════════════ ПОДВАЛ ════════════ */
    .foot {
      padding: 56px 0 44px;
      font-size: 15px;
    }

    .foot-grid {
      display: grid;
      grid-template-columns: 1.2fr 1fr;
      gap: 44px;
    }

    .foot h4 {
      margin: 0 0 14px;
      font-family: var(--f-mono);
      font-size: 11px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--verm);
      font-weight: 500;
    }

    .foot ul {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .foot li {
      padding: 4px 0;
    }

    .foot a {
      text-decoration-color: var(--rule);
      text-underline-offset: 3px;
    }

    .foot a:hover {
      color: var(--verm);
    }

    .foot-brand {
      font-size: 20px;
      font-weight: 600;
      margin-bottom: 10px;
    }

    .foot-tag {
      font-style: italic;
      color: var(--ink-soft);
      max-width: 36ch;
    }

    .foot-req {
      margin-top: 40px;
      padding-top: 24px;
      border-top: 1px solid var(--rule-soft);
      font-size: 13.5px;
      color: var(--ink-soft);
      line-height: 1.7;
    }

    .foot-legal {
      margin-top: 26px;
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
      font-family: var(--f-mono);
      font-size: 11px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--ink-faint);
    }

    @media (max-width: 720px) {
      .foot-grid {
        grid-template-columns: 1fr;
        gap: 30px;
      }
    }

    /* ════════════ КВИЗ-МОДАЛ (бумажная тема) ════════════ */
    .quiz-overlay {
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: rgba(13, 19, 48, 0.78);
      backdrop-filter: blur(7px);
      -webkit-backdrop-filter: blur(7px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.4s ease;
      display: flex;
      justify-content: center;
      align-items: safe center;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      padding: 24px;
    }

    .quiz-overlay.open {
      opacity: 1;
      pointer-events: auto;
    }

    .quiz-modal {
      width: min(720px, 100%);
      flex-shrink: 0;
      background:
        radial-gradient(900px 400px at 80% -10%, rgba(176, 66, 31, 0.05), transparent 60%),
        var(--paper);
      border: 1px solid var(--ink);
      box-shadow: 8px 8px 0 var(--verm), 0 40px 90px rgba(7, 10, 28, 0.55);
      padding: 52px 54px 44px;
      position: relative;
      transform: scale(0.97) translateY(18px);
      opacity: 0;
      transition: transform 0.45s cubic-bezier(.2, .7, .2, 1), opacity 0.45s ease;
    }

    .quiz-overlay.open .quiz-modal {
      transform: none;
      opacity: 1;
    }

    .quiz-modal .corner {
      position: absolute;
      width: 18px;
      height: 18px;
      border: 1px solid var(--verm);
      pointer-events: none;
    }

    .quiz-modal .q-tl {
      top: 9px;
      left: 9px;
      border-right: none;
      border-bottom: none;
    }

    .quiz-modal .q-tr {
      top: 9px;
      right: 9px;
      border-left: none;
      border-bottom: none;
    }

    .quiz-modal .q-bl {
      bottom: 9px;
      left: 9px;
      border-right: none;
      border-top: none;
    }

    .quiz-modal .q-br {
      bottom: 9px;
      right: 9px;
      border-left: none;
      border-top: none;
    }

    .quiz-close {
      position: absolute;
      top: 14px;
      right: 14px;
      z-index: 2;
      background: transparent;
      border: none;
      cursor: pointer;
      color: var(--ink);
      font-size: 20px;
      width: 36px;
      height: 36px;
      display: grid;
      place-items: center;
      transition: transform 0.3s ease, color 0.3s ease;
    }

    .quiz-close:hover {
      transform: rotate(90deg);
      color: var(--verm);
    }

    .quiz-progress {
      display: flex;
      align-items: center;
      gap: 8px;
      justify-content: center;
      margin-bottom: 34px;
    }

    .quiz-progress .dot {
      width: 28px;
      height: 1px;
      background: var(--rule);
      transition: background 0.4s ease, height 0.4s ease;
    }

    .quiz-progress .dot.active {
      background: var(--verm);
      height: 3px;
    }

    .quiz-progress .dot.done {
      background: var(--ink);
    }

    .quiz-step {
      min-height: 270px;
    }

    .quiz-step.hidden {
      display: none;
    }

    .quiz-step h3,
    .quiz-result h3 {
      font-size: clamp(26px, 3vw, 36px);
      margin-bottom: 10px;
    }

    .quiz-step h3 em,
    .quiz-result h3 em {
      font-style: italic;
      color: var(--verm);
    }

    .q-lede {
      color: var(--ink-soft);
      font-size: 16.5px;
      margin: 0 0 26px;
      max-width: 56ch;
    }

    .quiz-input {
      width: 100%;
      min-width: 0;
      max-width: 100%;
      padding: 15px 16px;
      background: color-mix(in srgb, var(--paper-2) 55%, transparent);
      border: 1px solid var(--rule);
      border-bottom: 2px solid var(--ink);
      border-radius: 0;
      /* iOS Safari: у date/time свой intrinsic-размер — гасим, чтобы не вылезали */
      -webkit-appearance: none;
      appearance: none;
      font-family: var(--f-serif);
      font-size: 22px;
      color: var(--ink);
      outline: none;
      transition: border-color 0.3s ease, background 0.3s ease;
      color-scheme: light;
    }

    /* date/time на iOS: appearance:none нужен для ширины, но пустое поле
       схлопывается по высоте — задаём фикс. высоту и центрируем значение */
    .quiz-input[type="date"],
    .quiz-input[type="time"] {
      display: block;
      -webkit-appearance: none;
      appearance: none;
      height: 62px;
      padding-top: 0;
      padding-bottom: 0;
      line-height: 60px;
    }

    .quiz-input[type="date"]::-webkit-date-and-time-value,
    .quiz-input[type="time"]::-webkit-date-and-time-value {
      text-align: left;
      margin: 0;
    }

    /* поле даты/времени в WebKit: без лишних отступов, значение по центру */
    .quiz-input::-webkit-datetime-edit {
      padding: 0;
      line-height: normal;
    }

    .quiz-input:focus {
      border-color: var(--verm);
      background: rgba(176, 66, 31, 0.05);
    }

    .quiz-input::placeholder {
      color: var(--ink-faint);
      font-style: italic;
    }

    .quiz-toggle {
      margin-top: 18px;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      font-family: var(--f-mono);
      font-size: 12px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--ink-soft);
      cursor: pointer;
    }

    .quiz-toggle input {
      position: absolute;
      opacity: 0;
      width: 0;
      height: 0;
    }

    .quiz-toggle .box {
      width: 18px;
      height: 18px;
      border: 1px solid var(--ink);
      display: grid;
      place-items: center;
      color: var(--verm);
      flex: none;
    }

    .quiz-toggle input:checked+.box::after {
      content: "✕";
      font-size: 13px;
      line-height: 1;
    }

    .quiz-toggle input:focus-visible+.box {
      outline: 2px dashed var(--verm);
      outline-offset: 3px;
    }

    .quiz-foot {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
      margin-top: 36px;
    }

    .quiz-back {
      background: transparent;
      border: none;
      cursor: pointer;
      font-family: var(--f-mono);
      font-size: 12px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--ink-soft);
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 12px 4px;
      transition: color 0.3s ease, gap 0.3s ease;
    }

    .quiz-back:hover {
      color: var(--verm);
      gap: 13px;
    }

    .quiz-back.disabled {
      opacity: 0;
      pointer-events: none;
    }

    .quiz-next.disabled {
      opacity: 0.35;
      pointer-events: none;
    }

    .btn.is-loading {
      opacity: 0.6;
      pointer-events: none;
    }

    /* лоадер «звёзды считаются» */
    .quiz-loader {
      display: none;
      text-align: center;
      padding: 6px 0 0;
    }

    .quiz-loader.active {
      display: block;
    }

    .quiz-loader .loader-seal {
      width: 104px;
      height: 104px;
      margin: 0 auto 22px;
      display: grid;
      place-items: center;
      color: var(--ink);
    }

    .quiz-loader .loader-spin {
      transform-origin: 0 0;
      animation: q-spin 7s linear infinite;
    }

    @keyframes q-spin {
      to {
        transform: rotate(360deg);
      }
    }

    .loader-status {
      margin: 26px auto 16px;
      max-width: 52ch;
      font-family: var(--f-mono);
      font-size: 11.5px;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--verm);
      min-height: 18px;
      transition: opacity 0.25s ease;
    }

    .loader-bar {
      position: relative;
      width: min(440px, 100%);
      margin: 0 auto;
      height: 3px;
      background: var(--rule-soft);
      overflow: hidden;
    }

    .loader-bar-fill {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 0%;
      background: linear-gradient(90deg, var(--verm-deep), var(--verm));
      transition: width 0.22s cubic-bezier(.4, 0, .2, 1);
    }

    .loader-percent {
      margin-top: 14px;
      font-family: var(--f-mono);
      font-size: 13px;
      color: var(--ink-soft);
      letter-spacing: 0.1em;
      font-variant-numeric: tabular-nums;
    }

    /* результат */
    .quiz-result {
      text-align: center;
      padding: 4px 0 0;
    }

    .quiz-result.hidden {
      display: none;
    }

    .result-seal {
      width: 104px;
      height: 104px;
      margin: 0 auto 18px;
      display: grid;
      place-items: center;
      color: var(--ink);
      animation: seal-in 0.8s cubic-bezier(.2, .7, .2, 1);
    }

    @keyframes seal-in {
      from {
        opacity: 0;
        transform: scale(0.6) rotate(-30deg);
      }

      to {
        opacity: 1;
        transform: none;
      }
    }

    .center-k {
      justify-content: center;
    }

    .your-chart {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 16px 26px;
      text-align: left;
      margin: 32px auto 0;
      max-width: 440px;
      padding: 24px 0;
      border-top: 1px solid var(--rule);
      border-bottom: 1px solid var(--rule);
    }

    .your-chart dt {
      font-family: var(--f-mono);
      font-size: 10.5px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--verm);
      align-self: center;
    }

    .your-chart dd {
      margin: 0;
      font-size: 21px;
      font-style: italic;
    }

    .preview-spread {
      margin: 38px 0 0;
      text-align: center;
    }

    .spread-stage {
      max-width: 580px;
      margin: 0 auto;
    }

    .spread-stage svg {
      width: 100%;
      height: auto;
      display: block;
    }

    /* книга мягко «парит» над тенью — transform-only, дёшево для слабых устройств */
    .book-float {
      animation: book-float 7s ease-in-out infinite;
    }

    @keyframes book-float {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-8px); }
    }

    /* мерцание трёх искр на обложке */
    .cov-tw {
      animation: cov-tw 3.2s ease-in-out infinite;
    }

    @keyframes cov-tw {
      0%, 100% { opacity: 0.25; }
      50% { opacity: 0.95; }
    }

    /* ════ видео реальных книг на пейволе (прямоугольник, рамка-атлас) ════ */
    .pw-video {
      position: relative;
      max-width: 520px;
      margin: 34px auto 0;
      border: 1px solid var(--ink);
      border-radius: 14px;
      overflow: hidden;
      background: var(--night);
      box-shadow: 6px 6px 0 var(--verm), 0 26px 50px -34px rgba(13, 19, 48, 0.55);
    }

    .pw-video-el {
      display: block;
      width: 100%;
      height: auto;
      border-radius: 14px;
    }

    /* лёгкая виньетка — без фильтров, чистый градиент */
    .pw-video::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      border-radius: 14px;
      background: linear-gradient(180deg, rgba(13, 19, 48, 0.12), transparent 26%, transparent 68%, rgba(13, 19, 48, 0.42));
    }

    .pw-video-tag {
      position: absolute;
      left: 14px;
      bottom: 14px;
      z-index: 2;
      display: inline-flex;
      align-items: center;
      padding: 8px 13px;
      background: var(--paper);
      border: 1px solid var(--verm);
      font-family: var(--f-mono);
      font-size: 10px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--verm-deep);
    }

    .spread-caption {
      margin-top: 14px;
      font-family: var(--f-mono);
      font-size: 11px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--ink-faint);
    }

    /* ════ тизер «первые строки вашей книги» — крючок любопытства ════ */
    .teaser {
      margin: 34px 0 0;
    }

    .teaser-page {
      position: relative;
      background:
        radial-gradient(700px 300px at 80% -10%, rgba(176, 66, 31, 0.05), transparent 60%),
        var(--paper);
      border: 1px solid var(--rule);
      box-shadow: 6px 6px 0 var(--verm), 0 26px 50px -34px rgba(13, 19, 48, 0.5);
      padding: 30px 32px 0;
      max-height: 280px;
      overflow: hidden;
      text-align: left;
    }

    .teaser-text {
      margin: 0;
      font-family: var(--f-serif);
      font-size: 19px;
      line-height: 1.72;
      color: var(--ink);
    }

    .teaser-open b {
      color: var(--verm);
      font-weight: 600;
    }

    /* буквица — книжное ощущение */
    .teaser-text::first-letter {
      font-size: 3.2em;
      line-height: 0.8;
      float: left;
      margin: 6px 10px 0 0;
      color: var(--verm);
      font-weight: 600;
    }

    .teaser-fade {
      color: var(--ink-soft);
    }

    /* нижняя часть растворяется + замок поверх */
    .teaser-lock {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      padding: 46px 16px 18px;
      text-align: center;
      background: linear-gradient(transparent, var(--paper) 62%);
      font-family: var(--f-mono);
      font-size: 11px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--verm);
    }

    /* ════ строка доверия под кнопкой оплаты ════ */
    .pay-trust {
      margin: 18px 0 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 11px;
    }

    .pt-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
      gap: 7px;
    }

    .pt-sec,
    .pt-ship-label {
      font-family: var(--f-mono);
      font-size: 10.5px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--ink-soft);
    }

    .pt-sec::before {
      content: "✶ ";
      color: var(--verm);
    }

    /* бейджи карт и служб доставки */
    .pt-badge {
      display: inline-flex;
      align-items: center;
      padding: 4px 9px;
      border-radius: 5px;
      font-family: var(--f-mono);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.04em;
      white-space: nowrap;
      line-height: 1;
    }

    /* карты — нейтральные, чернильная рамка */
    .pt-card {
      color: var(--ink-soft);
      background: color-mix(in srgb, var(--paper-2) 55%, transparent);
      border: 1px solid var(--rule);
    }

    /* службы доставки — узнаваемые бренд-цвета (траст) */
    .pt-pochta { color: #fff; background: #1b54a8; }
    .pt-yandex { color: #1a1a1a; background: #ffce00; }
    .pt-cdek   { color: #fff; background: #16a34a; }

    .pt-guarline {
      font-family: var(--f-mono);
      font-size: 10.5px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--verm-deep);
    }

    /* нижняя кнопка «Оплатить» — проматывает к выбору тарифа */
    .pw-bottom-cta {
      margin: 40px 0 0;
      text-align: center;
    }

    /* подсветка тарифов после промотки снизу */
    .plans.pulse {
      animation: plans-pulse 1.4s ease;
    }

    @keyframes plans-pulse {
      0%, 100% { transform: none; }
      30% { transform: scale(1.012); }
    }

    /* тарифы внутри квиза */
    .plans {
      display: flex;
      flex-direction: column;
      gap: 14px;
      margin: 36px 0 0;
      text-align: left;
    }

    .plan {
      position: relative;
      display: grid;
      grid-template-columns: 22px 1fr auto;
      gap: 20px;
      align-items: start;
      width: 100%;
      padding: 22px 24px;
      background: color-mix(in srgb, var(--paper-2) 40%, transparent);
      border: 1px solid var(--rule);
      font-family: inherit;
      color: var(--ink);
      text-align: left;
      cursor: pointer;
      transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    }

    .plan:hover {
      border-color: var(--ink);
    }

    .plan.active {
      border-color: var(--ink);
      background: var(--paper);
      box-shadow: 4px 4px 0 var(--verm);
    }

    .plan-mark {
      width: 18px;
      height: 18px;
      border: 1px solid var(--ink);
      border-radius: 50%;
      display: grid;
      place-items: center;
      margin-top: 5px;
    }

    .plan-mark::after {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--verm);
      opacity: 0;
      transform: scale(0.4);
      transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .plan.active .plan-mark::after {
      opacity: 1;
      transform: none;
    }

    .plan-body {
      display: flex;
      flex-direction: column;
    }

    .plan-eyebrow {
      font-family: var(--f-mono);
      font-size: 10px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--verm);
      margin-bottom: 6px;
    }

    .plan-title {
      font-size: 22px;
      font-style: italic;
      line-height: 1.15;
    }

    .plan-desc {
      font-size: 14.5px;
      line-height: 1.5;
      color: var(--ink-soft);
      margin-top: 7px;
    }

    .plan-features {
      display: flex;
      flex-wrap: wrap;
      gap: 5px 16px;
      margin-top: 12px;
      font-family: var(--f-mono);
      font-size: 9.5px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--ink-faint);
    }

    .plan-features>span {
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }

    .plan-features>span::before {
      content: "✶";
      color: var(--verm);
    }

    .plan-price {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      text-align: right;
      padding-left: 10px;
    }

    .plan-price-amount {
      font-size: 26px;
      font-style: italic;
      line-height: 1;
      white-space: nowrap;
    }

    .plan-price-meta {
      margin-top: 7px;
      font-family: var(--f-mono);
      font-size: 9.5px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--ink-faint);
      white-space: nowrap;
    }

    @media (max-width: 560px) {
      .plan {
        grid-template-columns: 20px 1fr;
        padding: 18px;
        gap: 12px 14px;
      }

      .plan-price {
        grid-column: 2 / -1;
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        text-align: left;
        padding: 12px 0 0;
        margin-top: 2px;
        border-top: 1px solid var(--rule-soft);
        width: 100%;
      }
    }

    /* после оплаты */
    .after-pay {
      margin: 56px 0 0;
      padding-top: 36px;
      border-top: 1px solid var(--rule);
      text-align: center;
    }

    .after-pay h4 {
      font-size: clamp(22px, 2.6vw, 28px);
      margin: 8px 0 30px;
      font-weight: 500;
    }

    .after-steps {
      list-style: none;
      padding: 0;
      margin: 0 auto;
      max-width: 540px;
      display: flex;
      flex-direction: column;
      gap: 22px;
      text-align: left;
    }

    .after-steps li {
      display: grid;
      grid-template-columns: 48px 1fr;
      gap: 20px;
      align-items: start;
      position: relative;
    }

    .after-steps li:not(:last-child)::after {
      content: "";
      position: absolute;
      left: 24px;
      top: 52px;
      width: 1px;
      height: calc(100% - 28px);
      background: var(--rule);
    }

    .step-num {
      width: 48px;
      height: 48px;
      border: 1px solid var(--ink);
      border-radius: 50%;
      display: grid;
      place-items: center;
      font-style: italic;
      font-size: 20px;
      color: var(--verm);
      background: var(--paper);
      z-index: 1;
    }

    .step-text {
      font-size: 15px;
      line-height: 1.55;
      color: var(--ink-soft);
      padding-top: 9px;
    }

    .step-text strong {
      color: var(--ink);
      font-style: italic;
      font-weight: 500;
      font-size: 16.5px;
    }

    .quiz-result[data-active-plan="print"] [data-step-final="pdf"] {
      display: none;
    }

    .quiz-result[data-active-plan="pdf"] [data-step-final="print"] {
      display: none;
    }

    .guarantee {
      margin: 40px 0 0;
      display: grid;
      grid-template-columns: 58px 1fr;
      gap: 20px;
      align-items: center;
      padding: 22px 24px;
      background: color-mix(in srgb, var(--paper-2) 55%, transparent);
      border: 1px solid var(--rule);
      text-align: left;
    }

    .guarantee-seal {
      width: 58px;
      height: 58px;
      display: grid;
      place-items: center;
      color: var(--verm);
    }

    .guarantee-title {
      font-style: italic;
      font-size: 20px;
      margin-bottom: 5px;
    }

    .guarantee-text {
      margin: 0;
      font-size: 14.5px;
      line-height: 1.55;
      color: var(--ink-soft);
    }

    @media (max-width: 560px) {
      .guarantee {
        grid-template-columns: 1fr;
        text-align: center;
      }

      .guarantee-seal {
        margin: 0 auto;
      }
    }

    .fineprint {
      margin: 32px 0 0;
      padding-top: 24px;
      border-top: 1px solid var(--rule-soft);
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
      gap: 8px 14px;
      font-family: var(--f-mono);
      font-size: 10px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--ink-faint);
    }

    .fineprint a {
      color: var(--ink-soft);
    }

    .fineprint a:hover {
      color: var(--verm);
    }

    .fineprint .sep {
      color: var(--verm);
    }

    /* загрузка фото */
    .quiz-upload {
      width: 100%;
      margin-top: 6px;
    }

    .quiz-upload-zone {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 36px 24px;
      cursor: pointer;
      border: 1px dashed var(--verm);
      background: color-mix(in srgb, var(--paper-2) 40%, transparent);
      transition: background 0.25s ease, border-color 0.25s ease;
      text-align: center;
    }

    .quiz-upload-zone:hover,
    .quiz-upload-zone.is-dragover {
      border-color: var(--verm-deep);
      background: rgba(176, 66, 31, 0.06);
    }

    .quiz-upload-glyph {
      font-size: 28px;
      color: var(--verm);
      line-height: 1;
    }

    .quiz-upload-glyph.loader-spin {
      display: inline-block;
      animation: q-spin 1.6s linear infinite;
      transform-origin: center;
    }

    .quiz-upload-title {
      font-size: 16px;
    }

    .quiz-upload-hint {
      font-family: var(--f-mono);
      font-size: 11px;
      letter-spacing: 0.1em;
      color: var(--ink-faint);
    }

    .quiz-upload-loader {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      padding: 36px 24px;
      border: 1px solid var(--rule);
    }

    .quiz-upload-cancel,
    .quiz-upload-replace {
      background: none;
      border: none;
      cursor: pointer;
      color: var(--verm);
      font-family: var(--f-mono);
      font-size: 12px;
      text-decoration: underline;
      text-underline-offset: 3px;
      padding: 4px 8px;
    }

    .quiz-upload-cancel:hover,
    .quiz-upload-replace:hover {
      color: var(--verm-deep);
    }

    .quiz-upload-preview {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 14px;
      padding: 16px 0;
    }

    .quiz-upload-photo {
      width: 144px;
      height: 144px;
      border-radius: 50%;
      background-size: cover;
      background-position: center;
      border: 2px solid var(--ink);
      box-shadow: 4px 4px 0 var(--verm);
    }

    /* выпадающий список городов */
    .quiz-city {
      position: relative;
    }

    .quiz-city-list {
      display: none;
      position: absolute;
      left: 0;
      right: 0;
      top: calc(100% + 6px);
      z-index: 30;
      background: var(--paper);
      border: 1px solid var(--ink);
      box-shadow: 5px 5px 0 var(--verm);
      max-height: 260px;
      overflow-y: auto;
    }

    .quiz-city-list.open {
      display: block;
    }

    .quiz-city-opt {
      padding: 11px 16px;
      cursor: pointer;
      font-size: 16px;
      transition: background 0.15s ease, color 0.15s ease;
    }

    .quiz-city-opt:hover {
      background: var(--ink);
      color: var(--paper);
    }

    .quiz-city-opt+.quiz-city-opt {
      border-top: 1px solid var(--rule-soft);
    }

    /* тост */
    .nk-toast {
      position: fixed;
      left: 50%;
      bottom: 30px;
      transform: translateX(-50%) translateY(20px);
      max-width: 90vw;
      z-index: 9999;
      opacity: 0;
      pointer-events: none;
      background: var(--night);
      color: var(--star);
      border: 1px solid var(--verm);
      padding: 13px 20px;
      font-size: 14.5px;
      line-height: 1.45;
      box-shadow: 0 10px 40px rgba(7, 10, 28, 0.5);
      transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nk-toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    @media (max-width: 600px) {
      .quiz-modal {
        padding: 46px 24px 32px;
      }

      .quiz-step {
        min-height: 240px;
      }
    }

    /* ════════════ STICKY CTA (мобильные) ════════════ */
    .sticky-cta {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 90;
      display: none;
      padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
      background: color-mix(in srgb, var(--paper) 94%, transparent);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      border-top: 1px solid var(--rule);
      transform: translateY(110%);
      transition: transform 0.35s cubic-bezier(.2, .7, .2, 1);
    }

    .sticky-cta.show {
      transform: none;
    }

    .sticky-cta .btn {
      width: 100%;
      justify-content: center;
    }

    @media (max-width: 880px) {
      .sticky-cta {
        display: block;
      }
    }

    /* ════════════ «СЕБЕ / В ПОДАРОК» ════════════ */
    .gift-switch {
      display: inline-flex;
      margin: 0 0 22px;
      border: 1px solid var(--ink);
    }

    .gs-opt {
      padding: 10px 22px;
      background: transparent;
      border: none;
      cursor: pointer;
      font-family: var(--f-mono);
      font-size: 11px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--ink-soft);
      transition: background 0.25s ease, color 0.25s ease;
    }

    .gs-opt+.gs-opt {
      border-left: 1px solid var(--ink);
    }

    .gs-opt.active {
      background: var(--ink);
      color: var(--paper);
    }

    .gs-opt:not(.active):hover {
      color: var(--verm);
    }

    /* дублированные тексты: себе / в подарок */
    .quiz-modal .t-gift {
      display: none;
    }

    .quiz-modal.is-gift .t-gift {
      display: revert;
    }

    .quiz-modal.is-gift .t-self {
      display: none;
    }

    .gift-note {
      margin: 36px 0 0;
      display: grid;
      grid-template-columns: 44px 1fr;
      gap: 16px;
      align-items: center;
      padding: 20px 22px;
      border: 1px dashed var(--verm);
      background: rgba(176, 66, 31, 0.04);
      text-align: left;
    }

    .gift-note .gn-glyph {
      font-size: 24px;
      color: var(--verm);
      text-align: center;
    }

    .gift-note b {
      font-style: italic;
      font-weight: 500;
      font-size: 17px;
    }

    .gift-note p {
      margin: 3px 0 0;
      font-size: 14.5px;
      color: var(--ink-soft);
      line-height: 1.5;
    }

    /* ════════════ ВРЕМЯ СУТОК (не помню точно) ════════════ */
    .time-parts {
      display: none;
      margin-top: 18px;
    }

    .time-parts.show {
      display: block;
    }

    .time-parts .tp-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .tp {
      padding: 10px 20px;
      background: transparent;
      border: 1px solid var(--rule);
      cursor: pointer;
      font-family: var(--f-mono);
      font-size: 11px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--ink-soft);
      transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
    }

    .tp:hover {
      border-color: var(--ink);
      color: var(--ink);
    }

    .tp.active {
      border-color: var(--verm);
      background: rgba(176, 66, 31, 0.07);
      color: var(--verm-deep);
    }

    .tp-hint {
      margin: 10px 0 0;
      font-size: 13.5px;
      font-style: italic;
      color: var(--ink-faint);
    }

    /* ════════════ ВОПРОСЫ-ВЫБОР (тапы) ════════════ */
    .gift-switch--big {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0;
      width: 100%;
      margin-top: 10px;
    }

    .gift-switch--big .gs-opt {
      padding: 20px 10px;
      font-size: 12px;
    }

    .choices {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 6px;
    }

    .choice {
      padding: 13px 18px;
      background: color-mix(in srgb, var(--paper-2) 50%, transparent);
      border: 1px solid var(--rule);
      font-family: var(--f-serif);
      font-size: 17px;
      color: var(--ink);
      cursor: pointer;
      text-align: left;
      transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    }

    .choice:hover {
      border-color: var(--ink);
    }

    .choice.active {
      border-color: var(--ink);
      background: var(--paper);
      box-shadow: 3px 3px 0 var(--verm);
      transform: translate(-1px, -1px);
    }

    .choice.active::before {
      content: "✶ ";
      color: var(--verm);
    }

    .quiz-textarea {
      width: 100%;
      min-height: 96px;
      resize: vertical;
      padding: 13px 14px;
      background: color-mix(in srgb, var(--paper-2) 55%, transparent);
      border: 1px solid var(--rule);
      border-bottom: 2px solid var(--ink);
      border-radius: 0;
      font-family: var(--f-serif);
      font-size: 18px;
      line-height: 1.5;
      color: var(--ink);
      outline: none;
      transition: border-color 0.3s ease, background 0.3s ease;
    }

    .quiz-textarea:focus {
      border-color: var(--verm);
      background: rgba(176, 66, 31, 0.05);
    }

    .quiz-textarea::placeholder {
      color: var(--ink-faint);
      font-style: italic;
    }

    .skip-hint {
      margin: 16px 0 0;
      font-family: var(--f-mono);
      font-size: 11px;
      letter-spacing: 0.12em;
      color: var(--ink-faint);
    }

    /* ════════════ ГОРОД: СВОБОДНЫЙ ВВОД + КООРДИНАТЫ ════════════ */
    .quiz-city-hint {
      padding: 12px 16px;
      font-size: 14.5px;
      font-style: italic;
      color: var(--ink-soft);
      line-height: 1.45;
    }

    .coords-link {
      margin-top: 16px;
      background: none;
      border: none;
      cursor: pointer;
      padding: 4px 0;
      font-family: var(--f-mono);
      font-size: 11px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--verm);
      border-bottom: 1px dashed var(--verm);
      transition: color 0.25s ease;
    }

    .coords-link:hover {
      color: var(--verm-deep);
    }

    .coords-box {
      margin-top: 16px;
    }

    .coords-box[hidden] {
      display: none;
    }

    .coords-row {
      display: flex;
      gap: 12px;
    }

    .coords-field {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .coords-field>span {
      font-family: var(--f-mono);
      font-size: 10px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--ink-soft);
    }

    .coords-field .quiz-input {
      font-family: var(--f-mono);
      font-size: 17px;
    }

    /* проверка свободного города геокодером: лоадер → пруф с координатами */
    .geo-check {
      margin-top: 16px;
      padding: 16px 18px;
      border: 1px solid var(--rule);
      background: color-mix(in srgb, var(--paper-2) 50%, transparent);
      font-size: 15px;
    }

    .geo-check[hidden] {
      display: none;
    }

    .geo-check .geo-spin {
      display: inline-block;
      color: var(--verm);
      margin-right: 8px;
      animation: q-spin 1.4s linear infinite;
    }

    .geo-check .geo-status {
      font-style: italic;
      color: var(--ink-soft);
    }

    .geo-found-place {
      font-style: italic;
      font-size: 18px;
    }

    .geo-coords {
      display: block;
      margin-top: 5px;
      font-family: var(--f-mono);
      font-size: 12px;
      letter-spacing: 0.08em;
      color: var(--verm-deep);
    }

    .geo-actions {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-top: 14px;
      flex-wrap: wrap;
    }

    .geo-actions .btn {
      padding: 10px 20px;
      font-size: 11px;
    }

    .geo-edit {
      background: none;
      border: none;
      cursor: pointer;
      padding: 4px 0;
      font-family: var(--f-mono);
      font-size: 11px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--ink-soft);
      border-bottom: 1px dashed var(--rule);
      transition: color 0.25s ease;
    }

    .geo-edit:hover {
      color: var(--verm);
    }

    .geo-fail {
      font-style: italic;
      color: var(--verm-deep);
    }

    /* ════════════ ПОЯВЛЕНИЕ ПРИ СКРОЛЛЕ ════════════ */
    html.js .reveal {
      opacity: 0;
      transform: translateY(22px);
      transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2, .7, .2, 1);
    }

    html.js .reveal.in {
      opacity: 1;
      transform: none;
    }

    /* ════════════ ДВИЖЕНИЕ: УВАЖАЕМ НАСТРОЙКИ ════════════ */
    @media (prefers-reduced-motion: reduce) {
      html {
        scroll-behavior: auto;
      }

      *,
      *::before,
      *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
      }

      html.js .reveal {
        opacity: 1;
        transform: none;
      }
    }
