/* ==========================================================================
   «Книжная лавка писателей» — открытие 29.09.2026
   Общие стили для index.html и quiz.html
   Палитра и типографика продолжают язык печатных приглашений.
   ========================================================================== */

:root {
  --ivory:        #FBF8F2;  /* тёплый молочный фон */
  --ivory-deep:   #F4EFE4;  /* второй фон, теплее */
  --paper:        #FFFDF8;
  --ink:          #161311;  /* основной чёрный */
  --ink-soft:     #3B352E;
  --warm:         #776D60;  /* тёплый серо-бежевый для мелкого текста */
  --warm-line:    #8B8175;  /* тот же тон для линий и крупных цифр */
  --warm-light:   #ABA294;
  --stone:        #DED6C7;
  --gold:         #A9884F;  /* деликатный коричнево-золотистый (линии, штрихи) */
  --gold-text:    #7E6234;  /* тот же оттенок, но читаемый в мелком кегле */
  --gold-line:    rgba(169, 136, 79, .42);
  --gold-faint:   rgba(169, 136, 79, .18);
  --hair:         rgba(22, 19, 17, .13);

  --serif:  "Prata", "Times New Roman", Georgia, serif;
  --italic: "Cormorant Garamond", "Prata", Georgia, serif;
  --sans:   "Golos Text", "Helvetica Neue", Helvetica, sans-serif;

  --pad: clamp(20px, 5.5vw, 88px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --- reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  font-weight: 400;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, dl, dd, dt, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: var(--ink); text-decoration: none; transition: color .3s var(--ease); }
a:hover { color: var(--gold); }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--stone); color: var(--ink); }

:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

/* --- сетка и служебные --------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* тонкая горизонтальная линия */
.rule {
  width: 64px; height: 0;
  margin: 0;
  border: 0; border-top: 1px solid var(--gold-line);
}
.rule--wide { width: 100%; border-top-color: var(--hair); }

/* служебная надпись: мелкий разряженный sans */
.label {
  font-family: var(--sans);
  font-size: clamp(11px, 1.05vw, 12.5px);
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--warm);
}
.label--gold { color: var(--gold-text); }

.italic {
  font-family: var(--italic);
  font-style: italic;
  font-weight: 400;
}

/* --- арки ---------------------------------------------------------------- */
/* Арка = блок с огромным радиусом верхних углов и волосяной обводкой.
   Двойная линия, как на приглашении, — через ::before. */

.arch {
  position: absolute;
  bottom: 0;
  border: 1px solid var(--gold-line);
  border-bottom: 0;
  border-radius: 1000px 1000px 0 0;
  pointer-events: none;
}
.arch::before {
  content: "";
  position: absolute;
  inset: 14px 14px 0 14px;
  border: 1px solid var(--gold-faint);
  border-bottom: 0;
  border-radius: 1000px 1000px 0 0;
}
.arch--plain::before { display: none; }

/* арка-окно с фотографией */
.arch-photo {
  position: relative;
  overflow: hidden;
  border-radius: 1000px 1000px 0 0;
  background: var(--ivory-deep);
}
.arch-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* вертикальные волосяные линии на всю высоту секции */
.verticals {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.verticals span {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--hair);
}

/* --- появление при скролле ---------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 248, 242, .82);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--hair); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding-block: 14px;
}

.lockup {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 20px);
}
.lockup img { width: auto; }
.lockup__spr { height: 40px; }
.lockup__dost { height: 15px; }
.lockup__x {
  width: 1px; height: 26px;
  background: var(--gold-line);
}

.site-nav ul {
  display: flex;
  gap: clamp(18px, 2.6vw, 40px);
}
.site-nav a {
  font-size: 13.5px;
  letter-spacing: .06em;
  color: var(--ink-soft);
  padding-block: 6px;
}
.site-nav a:hover { color: var(--gold); }

@media (max-width: 640px) {
  .site-header__inner { min-height: 66px; }
  .lockup__spr { height: 32px; }
  .lockup__dost { height: 12px; }
  .site-nav { display: none; }
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  min-height: min(100svh, 980px);
  display: flex;
  align-items: center;
  padding-block: clamp(64px, 11vh, 140px) clamp(96px, 16vh, 180px);
  overflow: hidden;
}

.hero__decor { position: absolute; inset: 0; pointer-events: none; }

.hero__arch-main {
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 62vw);
  height: min(94%, 900px);
}
.hero__arch-wide {
  left: 50%;
  transform: translateX(-50%);
  width: min(940px, 92vw);
  height: min(70%, 660px);
  border-color: var(--gold-faint);
}

.hero__photo {
  position: absolute;
  bottom: 0;
  width: clamp(96px, 10.5vw, 148px);
  height: clamp(210px, 32vh, 352px);
}
.hero__photo--spines { left: clamp(4px, 4vw, 86px); }
.hero__photo--shelf  { right: clamp(4px, 4vw, 76px); width: clamp(116px, 13.5vw, 194px); height: clamp(250px, 40vh, 424px); }

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.hero__eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(28px, 5vh, 54px);
}
.hero__eyebrow i { font-style: normal; color: var(--gold); }

.hero__title { margin: 0; font-weight: 400; }

.hero__kicker {
  display: block;
  font-family: var(--serif);
  font-size: clamp(22px, 3.4vw, 40px);
  letter-spacing: .3em;
  text-indent: .3em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink);
}

.hero__main {
  display: block;
  margin-top: clamp(14px, 2.4vh, 26px);
  font-family: var(--serif);
  font-size: clamp(34px, 7.1vw, 92px);
  line-height: 1.02;
  letter-spacing: .005em;
  text-transform: uppercase;
}

.hero__sub {
  display: block;
  margin-top: clamp(16px, 2.6vh, 30px);
  font-family: var(--italic);
  font-style: italic;
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1.2;
  color: var(--ink-soft);
}

.hero__rule {
  margin: clamp(30px, 5.2vh, 58px) auto clamp(26px, 4.4vh, 48px);
  width: 120px;
  border-top: 1px solid var(--gold-line);
}

.hero__date {
  font-family: var(--serif);
  font-size: clamp(24px, 3.6vw, 44px);
  line-height: 1.1;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(12px, 2.4vw, 30px);
  margin-top: clamp(20px, 3.4vh, 34px);
  font-size: 15px;
  color: var(--ink-soft);
}
.hero__meta span[aria-hidden] { color: var(--stone); }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 4vh, 40px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 3;
}
.hero__scroll-line {
  width: 1px; height: 54px;
  background: linear-gradient(to bottom, transparent, var(--gold-line) 55%, transparent);
  animation: scroll-breathe 3.4s var(--ease) infinite;
}
@keyframes scroll-breathe {
  0%, 100% { transform: scaleY(.55); opacity: .5; transform-origin: top; }
  50%      { transform: scaleY(1);   opacity: 1;  transform-origin: top; }
}
@media (prefers-reduced-motion: reduce) { .hero__scroll-line { animation: none; } }

@media (max-width: 860px) {
  .hero__photo--spines { display: none; }
  .hero__photo--shelf { right: -24px; opacity: .9; }
  .hero__arch-wide { display: none; }
}
@media (max-width: 560px) {
  .hero { min-height: auto; padding-block: 52px 108px; }
  .hero__photo--shelf { width: 96px; height: 200px; right: -20px; opacity: .55; }
  .hero__arch-main { width: 78vw; height: 96%; }
}

/* ==========================================================================
   Секции
   ========================================================================== */

.section {
  position: relative;
  padding-block: clamp(76px, 13vh, 168px);
  scroll-margin-top: 80px;
}
.section--tint { background: var(--ivory-deep); }
.section--line { border-top: 1px solid var(--hair); }

.section__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: clamp(40px, 7vh, 80px);
}
.section__head .rule { flex: 1 1 auto; width: auto; align-self: center; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(27px, 4.4vw, 58px);
  line-height: 1.14;
  letter-spacing: -.005em;
}
.display em {
  font-family: var(--italic);
  font-style: italic;
  font-weight: 400;
}
.display--sm { font-size: clamp(23px, 3.3vw, 42px); }

.lede {
  max-width: 46ch;
  font-size: clamp(16px, 1.25vw, 18.5px);
  line-height: 1.68;
  color: var(--ink-soft);
}

/* --- история ------------------------------------------------------------- */

.history__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}

.year {
  position: relative;
  padding-top: 8px;
  border-top: 1px solid var(--gold-line);
}
.year__num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(76px, 13.5vw, 184px);
  line-height: .9;
  letter-spacing: -.02em;
  color: var(--ink);
}
.year__cap {
  display: block;
  margin-top: 14px;
  max-width: 26ch;
}

.history__text { margin-top: clamp(28px, 4vh, 44px); }

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

/* --- обновлённое пространство ------------------------------------------- */

.space__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .58fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}
.space__figure {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 470px;
}
.space__figure .arch-photo { width: 100%; height: 100%; }
.space__figure figcaption {
  margin-top: 16px;
}
.space__quote {
  margin-top: clamp(28px, 4vh, 42px);
  font-family: var(--italic);
  font-style: italic;
  font-size: clamp(19px, 2.1vw, 27px);
  line-height: 1.42;
  color: var(--ink-soft);
  max-width: 30ch;
}

@media (max-width: 820px) {
  .space__grid { grid-template-columns: 1fr; align-items: start; }
  .space__figure { max-width: 340px; }
}

/* --- программа ----------------------------------------------------------- */

.timeline { border-top: 1px solid var(--hair); }

.timeline > li {
  display: grid;
  grid-template-columns: clamp(96px, 14vw, 190px) minmax(0, 1fr);
  gap: clamp(16px, 4vw, 56px);
  padding-block: clamp(26px, 4.4vh, 46px);
  border-bottom: 1px solid var(--hair);
  transition: background .5s var(--ease);
}
.timeline > li:hover { background: rgba(169, 136, 79, .045); }

.timeline time {
  font-family: var(--serif);
  font-size: clamp(22px, 2.9vw, 38px);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: lining-nums;
}
.timeline h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(19px, 2.1vw, 27px);
  line-height: 1.2;
}
.timeline p {
  margin-top: 12px;
  max-width: 48ch;
  color: var(--ink-soft);
  font-size: 16px;
}

.press {
  margin-top: clamp(44px, 7vh, 84px);
  padding: clamp(24px, 3.4vw, 40px);
  border: 1px solid var(--gold-faint);
  background: rgba(255, 253, 248, .6);
  display: grid;
  grid-template-columns: minmax(0, .5fr) minmax(0, 1fr);
  gap: clamp(20px, 3.4vw, 48px);
  align-items: start;
}
.press h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 28px);
}
.press__note { margin-top: 10px; font-size: 14.5px; color: var(--warm); max-width: 28ch; }
.press dl { display: grid; gap: 14px; }
.press__row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gold-faint);
}
.press__row:last-child { border-bottom: 0; padding-bottom: 0; }
.press dt { font-family: var(--serif); font-size: 19px; }
.press dd { font-size: 15.5px; color: var(--ink-soft); }

@media (max-width: 700px) {
  .timeline > li { grid-template-columns: 1fr; gap: 8px; }
  .press { grid-template-columns: 1fr; }
}

/* --- финальный блок: дата и место --------------------------------------- */

.finale {
  position: relative;
  overflow: hidden;
  text-align: center;
  scroll-margin-top: 80px;
  padding-block: clamp(90px, 17vh, 210px);
  background: var(--ivory-deep);
  border-top: 1px solid var(--hair);
}
.finale__arch {
  left: 50%;
  transform: translateX(-50%);
  width: min(540px, 78vw);
  height: min(92%, 780px);
}
.finale__inner { position: relative; z-index: 2; }

.finale__date {
  font-family: var(--serif);
  font-size: clamp(38px, 8.4vw, 116px);
  line-height: .98;
  letter-spacing: -.01em;
}
.finale__date span { display: block; }
.finale__year { color: var(--warm-line); }

.finale__addr {
  margin-top: clamp(26px, 4.4vh, 48px);
  font-family: var(--italic);
  font-style: italic;
  font-size: clamp(19px, 2.4vw, 30px);
  line-height: 1.4;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 14px clamp(26px, 3.4vw, 44px);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.btn--solid { background: var(--ink); color: var(--ivory); }
.btn--solid:hover { background: var(--gold); border-color: var(--gold); color: var(--paper); }
.btn--ghost { border-color: var(--gold-line); color: var(--ink-soft); }
.btn--ghost:hover { background: transparent; border-color: var(--gold); color: var(--gold); }
.btn[disabled] { opacity: .32; pointer-events: none; }

.finale__cta { margin-top: clamp(38px, 6vh, 64px); }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  padding-block: clamp(46px, 7vh, 82px);
  border-top: 1px solid var(--hair);
  background: var(--ivory);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 48px);
}
.site-footer .lockup__spr { height: 46px; }
.site-footer .lockup__dost { height: 17px; }
.site-footer__x { font-family: var(--italic); font-style: italic; color: var(--gold); font-size: 18px; }
.site-footer__addr { text-align: right; }
.site-footer__addr p:first-child { font-family: var(--serif); font-size: clamp(17px, 1.6vw, 21px); }
.site-footer__addr p:last-child { margin-top: 8px; font-size: 14.5px; color: var(--warm); }

@media (max-width: 700px) {
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
  .site-footer__addr { text-align: left; }
}

/* ==========================================================================
   QUIZ — quiz.html
   ========================================================================== */

.quiz-body { background: var(--ivory); }

.quiz-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.quiz-top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 248, 242, .9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair);
}
.quiz-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding-block: 10px;
}
.quiz-top .lockup__spr { height: 30px; }
.quiz-top .lockup__dost { height: 11px; }
.quiz-top__count {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
.quiz-top__count b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0;
  color: var(--ink);
}
.quiz-top__progress {
  height: 1px;
  background: var(--stone);
}
.quiz-top__bar {
  height: 1px;
  width: 0;
  background: var(--gold);
  transition: width .5s var(--ease);
}

.screen { display: none; flex: 1 1 auto; }
.screen.is-active { display: flex; flex-direction: column; }

/* --- экран 1: интро ----------------------------------------------------- */

.intro {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-block: clamp(48px, 9vh, 120px);
  text-align: center;
}
.intro__arch {
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 86vw);
  height: min(88%, 660px);
}
.intro__inner { position: relative; z-index: 2; max-width: 600px; }

.intro__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: clamp(22px, 4vh, 40px);
}
.intro__logos img { width: auto; }
.intro__logos .lockup__spr { height: 52px; }
.intro__logos .lockup__dost { height: 18px; }

.intro__title {
  margin-top: clamp(18px, 3vh, 30px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(31px, 8.6vw, 62px);
  line-height: 1.04;
  text-transform: uppercase;
}
.intro__lede {
  margin-top: clamp(18px, 3vh, 28px);
  font-family: var(--italic);
  font-style: italic;
  font-size: clamp(18px, 4.6vw, 24px);
  line-height: 1.42;
  color: var(--ink-soft);
}
.intro__cta { margin-top: clamp(32px, 5.4vh, 54px); }
.intro__hint { margin-top: 18px; font-size: 13.5px; color: var(--warm); }

/* --- экран 2: книги ----------------------------------------------------- */

.books {
  padding-block: clamp(32px, 5vh, 64px) 120px;
}
.books__head { margin-bottom: clamp(26px, 4vh, 44px); }
.books__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 5.6vw, 40px);
  line-height: 1.1;
}
.books__note { margin-top: 12px; font-size: 15px; color: var(--warm); max-width: 40ch; }

.books__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 0 clamp(24px, 4vw, 64px);
  border-top: 1px solid var(--hair);
}

.book {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 62px;
  padding: 14px 4px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: transparent;
  transition: background .35s var(--ease), padding-left .35s var(--ease);
}
.book:hover { background: rgba(169, 136, 79, .05); }

.book__mark {
  position: relative;
  flex: 0 0 auto;
  width: 22px; height: 30px;
  border: 1px solid var(--gold-line);
  border-radius: 2px 1000px 1000px 2px / 2px 60px 60px 2px;
  background: transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease);
}
.book__mark::after {
  content: "";
  position: absolute;
  inset: 4px 3px;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  transition: border-color .35s var(--ease);
}

.book__text { min-width: 0; }
.book__author {
  display: block;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--warm);
  transition: color .35s var(--ease);
}
.book__name {
  display: block;
  margin-top: 3px;
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.24;
  color: var(--ink);
}

.book.is-read { background: rgba(169, 136, 79, .07); }
.book.is-read .book__mark { background: var(--gold); border-color: var(--gold); }
.book.is-read .book__mark::after { border-left-color: rgba(255, 253, 248, .55); border-right-color: rgba(255, 253, 248, .55); }
.book.is-read .book__author { color: var(--gold-text); }
.book.is-read .book__name { font-style: normal; }

.books__foot {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 25;
  padding: 14px var(--pad) calc(14px + env(safe-area-inset-bottom));
  background: rgba(251, 248, 242, .94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--hair);
  display: flex;
  justify-content: center;
}
.books__foot .btn { width: min(460px, 100%); }

/* --- результат ---------------------------------------------------------- */

.result {
  position: relative;
  overflow: hidden;
  padding-block: clamp(36px, 6vh, 88px) clamp(56px, 9vh, 110px);
}
.result__arch {
  left: 50%;
  transform: translateX(-50%);
  width: min(620px, 92vw);
  height: min(82%, 720px);
}
.result__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
  gap: clamp(36px, 5vw, 76px);
  align-items: start;
}
@media (max-width: 880px) {
  .result__inner { grid-template-columns: 1fr; }
}

.result__count {
  font-family: var(--italic);
  font-style: italic;
  font-size: clamp(18px, 4.4vw, 24px);
  color: var(--ink-soft);
}
.result__num {
  display: block;
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(64px, 17vw, 140px);
  line-height: .92;
  letter-spacing: -.02em;
}
.result__num small {
  font-size: .3em;
  letter-spacing: .04em;
  color: var(--warm-line);
}
.result__level {
  margin-top: clamp(22px, 3.6vh, 36px);
  padding-top: clamp(20px, 3vh, 30px);
  border-top: 1px solid var(--gold-line);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 6vw, 44px);
  line-height: 1.08;
  text-transform: uppercase;
}
.result__phrase {
  margin-top: 18px;
  font-family: var(--italic);
  font-style: italic;
  font-size: clamp(18px, 4.2vw, 24px);
  line-height: 1.44;
  color: var(--ink-soft);
  max-width: 34ch;
}
.result__ask {
  margin-top: clamp(26px, 4vh, 40px);
  font-family: var(--serif);
  font-size: clamp(18px, 3.4vw, 24px);
}
.result__tag {
  margin-top: 10px;
  font-size: 14px;
  color: var(--warm);
  max-width: 38ch;
}

.share {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.share__canvas-hold {
  border: 1px solid var(--gold-faint);
  padding: 10px;
  background: var(--paper);
}
.share canvas {
  display: block;
  width: 100%;
  height: auto;
}
.share__actions {
  display: grid;
  gap: 12px;
}
.share__actions .btn { width: 100%; }
.share__status {
  min-height: 20px;
  font-size: 13.5px;
  color: var(--warm);
  text-align: center;
}
.share__again { margin-top: 6px; text-align: center; }

.quiz-footer {
  padding-block: 30px 40px;
  border-top: 1px solid var(--hair);
  text-align: center;
}
.quiz-footer p { font-size: 13px; color: var(--warm); }
.quiz-footer p + p { margin-top: 6px; }

/* --- мелкие экраны: викторина открывается в основном с телефона -------- */

@media (max-width: 480px) {
  .quiz-top__inner { min-height: 56px; }
  .quiz-top .lockup { gap: 10px; }
  .quiz-top .lockup__x { height: 20px; }
  .quiz-top .lockup__spr { height: 26px; }
  .quiz-top .lockup__dost { height: 9px; }
  .quiz-top__count { font-size: 11px; letter-spacing: .08em; }
  .quiz-top__count b { font-size: 15px; }

  .intro { padding-block: 40px 56px; }
  .intro__logos { gap: 16px; margin-bottom: 26px; }
  .intro__logos .lockup__spr { height: 44px; }
  .intro__logos .lockup__dost { height: 15px; }

  .book { min-height: 64px; gap: 14px; }

  .result { padding-block: 28px 48px; }
  .result__inner { gap: 30px; }
  .share__canvas-hold { padding: 8px; }
  .share__actions { gap: 10px; }
}
