/* ==========================================================================
   Кемел адам · тест «Жүрек айнасы» (go.kemeladam.kz/test)

   Подключается после app.css: палитра, шрифты, шапка, переключатель языка, кнопки
   и кнопки магазинов — оттуда. Здесь только сам тест: вступление, вопросы, результат,
   книга и приложение. Вид переключает атрибут body[data-view] (intro | run | result).
   ========================================================================== */

.qz-page {
  background: var(--paper);
}
.qz {
  min-height: 100vh;
  min-height: 100svh;
}
.qz-view[hidden] {
  display: none;
}
.qz-col {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 32px);
}

/* Во время вопросов шапка сайта и подвал не нужны: на экране только утверждение и ответы. */
body[data-view='run'] .qz-hdr,
body[data-view='run'] .qz-foot {
  display: none;
}
.qz-hdr.is-light .brand {
  color: var(--ink);
}
.qz-hdr .hdr__cta {
  display: none;
}
@media (min-width: 560px) {
  .qz-hdr .hdr__cta {
    display: inline-flex;
  }
}

/* ---------------------------------------------------------------- тёмный верх */

.qz-hero {
  position: relative;
  padding: calc(96px + env(safe-area-inset-top)) clamp(16px, 5vw, 32px) 44px;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  background:
    radial-gradient(90% 70% at 85% -10%, rgba(226, 185, 138, 0.28), transparent 60%),
    linear-gradient(140deg, var(--navy-700), var(--navy) 45%, var(--navy-deep));
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.qz-hero__in {
  max-width: 620px;
  margin-inline: auto;
}
.qz-over {
  margin: 0;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.qz-hero h1,
.qz-hero h2 {
  margin-top: 6px;
  font: 700 clamp(34px, 8vw, 52px) / 1.12 var(--font-serif);
  letter-spacing: -0.02em;
}
.qz-hero--res h2 {
  font-size: clamp(28px, 6.4vw, 40px);
}
.qz-hero__sub {
  margin: 10px 0 0;
  font-size: clamp(16px, 3.6vw, 19px);
  color: var(--on-dark);
}
.qz-hero__src {
  margin: 8px 0 0;
  font-size: 14.5px;
  color: var(--on-dark-muted);
}

.qz-emblem {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
}
.qz-emblem span {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(180deg, #e0b685, var(--gold));
  color: var(--navy);
  box-shadow: 0 18px 34px -14px rgba(201, 157, 102, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.qz-emblem .ic {
  width: 38px;
  height: 38px;
}
.qz-emblem i {
  position: absolute;
  inset: 0;
  border: 2px solid var(--gold-light);
  border-radius: 50%;
  animation: qz-wave 2.6s var(--ease) infinite;
}
@keyframes qz-wave {
  from {
    opacity: 0.55;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.6);
  }
}

.qz-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.qz-facts li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--on-dark);
}
.qz-facts .ic {
  width: 16px;
  height: 16px;
  color: var(--gold-light);
}

/* ---------------------------------------------------------------- вступление */

.qz-intro__body {
  display: grid;
  gap: 18px;
  padding-block: 28px 56px;
}
.qz-lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
}
.qz-how,
.qz-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--sh-sm);
}
.qz-how h2 {
  font-size: 17px;
  line-height: 1.3;
}
.qz-how p {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 15px;
}
.qz-scale {
  display: flex;
  justify-content: space-between;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.qz-scale li {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e8edf6;
  color: var(--navy);
  font: 600 18px/1 var(--font-serif);
}
.qz-scale__ends {
  display: flex;
  justify-content: space-between;
  margin: 8px 0 0 !important;
  font-size: 13px !important;
  font-weight: 500;
}
.qz-notice {
  display: flex;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--gold-200);
  border-radius: var(--r-md);
  background: #faf5ec;
}
.qz-notice .ic {
  margin-top: 2px;
  color: var(--gold-dark);
}
.qz-notice h2 {
  font-size: 15px;
  line-height: 1.3;
}
.qz-notice p {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
}
.qz-fine {
  display: flex;
  gap: 8px;
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.45;
}
.qz-fine .ic {
  width: 15px;
  height: 15px;
  margin-top: 2px;
}
html[data-lang='kk'] .qz-langnote {
  display: none;
}

.qz-start {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 6px;
}
.qz-start__state {
  max-width: 34em;
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}
.qz-btn {
  justify-content: center;
  width: 100%;
  min-height: 58px;
  font-size: 17px;
  border-radius: 18px;
}
.qz-link {
  padding: 8px 12px;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: 600 14.5px/1.2 var(--font-sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.qz-link:hover {
  color: var(--navy);
}
.qz-nojs {
  display: none;
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--paper-deep);
  color: var(--ink-2);
  font-size: 14.5px;
}

/* ---------------------------------------------------------------- вопросы */

.qz-run {
  min-height: 100vh;
  min-height: 100svh;
}
.qz-run__in {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 640px;
  padding-top: calc(10px + env(safe-area-inset-top));
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}
.qz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}
.qz-ib {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.qz-ib:hover {
  transform: scale(1.06);
}
.qz-ib:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}
.qz-ib .ic {
  width: 20px;
  height: 20px;
}
.qz-pos {
  margin: 0;
  color: var(--ink-3);
  font: 600 15px/1 var(--font-serif);
  font-variant-numeric: tabular-nums;
}
.qz-pos b {
  color: var(--ink);
  font-size: 21px;
  font-weight: 700;
}

/* Полоса из частей — по одной на направление: короткие отрезки вместо одной длинной дороги. */
.qz-parts {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
  margin-top: 4px;
}
.qz-parts i {
  height: 4px;
  border-radius: 2px;
  background: var(--paper-deep);
  overflow: hidden;
}
.qz-parts b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: var(--navy);
  transition: width 0.3s var(--ease);
}
.qz-parts .is-now b {
  background: var(--gold);
}

.qz-stage {
  display: flex;
  flex: 1;
  align-items: center;
  padding-block: 22px;
}
.qz-st {
  width: 100%;
}
.qz-st.is-in {
  animation: qz-in 0.28s var(--ease) both;
}
.qz-st.is-in-back {
  animation: qz-in-back 0.28s var(--ease) both;
}
.qz-st.is-out {
  opacity: 0;
  transition: opacity 0.1s;
}
@keyframes qz-in {
  from {
    opacity: 0;
    transform: translateX(26px);
  }
}
@keyframes qz-in-back {
  from {
    opacity: 0;
    transform: translateX(-26px);
  }
}
.qz-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin: 0;
  padding: 4px 13px 4px 4px;
  border-radius: 99px;
  background: var(--gold-100);
  color: var(--gold-dark);
  font-size: 13.5px;
  font-weight: 600;
}
.qz-chip b {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-dark);
  color: #fff;
  font: 700 12px/1 var(--font-serif);
}
.qz-text {
  margin: 18px 0 0;
  font: 600 clamp(22px, 5.4vw, 30px) / 1.42 var(--font-serif);
  letter-spacing: -0.01em;
}

.qz-opts {
  display: grid;
  gap: 8px;
}
.qz-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 9px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink);
  font: 500 16px/1.3 var(--font-sans);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: transform 0.18s var(--ease), border-color 0.18s, background 0.18s, color 0.18s, box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.qz-opt b {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e8edf6;
  color: var(--navy);
  font: 600 16px/1 var(--font-serif);
  transition: background 0.18s, color 0.18s;
}
.qz-opt span {
  flex: 1;
}
.qz-opt .ic {
  width: 22px;
  height: 22px;
  color: var(--gold-light);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.18s, transform 0.25s var(--ease);
}
@media (hover: hover) {
  .qz-opt:hover {
    border-color: var(--navy-600);
    transform: translateY(-1px);
  }
}
.qz-opt:active {
  transform: scale(0.985);
}
.qz-opt[aria-checked='true'] {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
  box-shadow: var(--sh-navy);
}
.qz-opt[aria-checked='true'] b {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.qz-opt[aria-checked='true'] .ic {
  opacity: 1;
  transform: none;
}
.qz-keys {
  display: none;
  margin: 14px 0 0;
  color: var(--ink-3);
  font-size: 13px;
  text-align: center;
}
@media (hover: hover) and (pointer: fine) {
  .qz-keys {
    display: block;
  }
}

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

.qz-res__date {
  margin: 8px 0 0;
  color: var(--on-dark-muted);
  font-size: 13.5px;
}
.qz-chart {
  width: min(320px, 82vw);
  margin: 14px auto 0;
}
.qz-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.qz-chart .grid {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
}
.qz-chart .grid--edge {
  fill: rgba(255, 255, 255, 0.04);
}
.qz-chart .axis {
  stroke: rgba(255, 255, 255, 0.1);
}
.qz-chart text {
  fill: var(--on-dark-muted);
  font: 600 12px var(--font-serif);
  text-anchor: middle;
}
.qz-chart .shape {
  transform-box: fill-box;
  transform-origin: center;
}
.qz-chart .shape polygon {
  fill: rgba(226, 185, 138, 0.3);
  stroke: var(--gold-light);
  stroke-width: 2;
  stroke-linejoin: round;
}
.qz-chart .shape circle {
  fill: var(--gold-light);
  stroke: var(--navy);
  stroke-width: 1.5;
}
.qz-chart.is-on .shape {
  animation: qz-open 1s var(--ease) 0.15s both;
}
@keyframes qz-open {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
}
.qz-epi {
  margin: 14px 0 0;
  padding: 0 6px;
}
.qz-epi p {
  margin: 0;
  color: var(--on-dark);
  font: italic 600 16px/1.6 var(--font-serif);
}
.qz-epi cite {
  display: block;
  margin-top: 6px;
  color: var(--on-dark-muted);
  font-size: 13px;
  font-style: normal;
}

.qz-res__body {
  display: grid;
  gap: 14px;
  padding-block: 24px 8px;
}
.qz-note {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
  text-align: center;
}
.qz-strong {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--success-soft);
}
.qz-strong .ic {
  margin-top: 2px;
  color: var(--success-d);
}
.qz-strong h3 {
  color: var(--success-d);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.qz-strong p {
  margin: 3px 0 0;
  font-size: 15px;
  font-weight: 600;
}
.qz-h {
  margin-top: 10px;
  font-size: 20px;
  line-height: 1.3;
}
.qz-h--gap {
  margin-top: 22px;
}
.qz-sub {
  margin: -8px 0 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
}
.qz-small {
  margin: 0;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.5;
}

.qz-focus {
  display: grid;
  gap: 14px;
}
.qz-dir__head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qz-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e8edf6;
  color: var(--navy);
  font: 600 15px/1 var(--font-serif);
}
.qz-num--sm {
  width: 28px;
  height: 28px;
  font-size: 13px;
}
.qz-dir__title {
  margin: 0;
  font: 600 19px/1.3 var(--font-serif);
}
.qz-dir__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.qz-level {
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}
/* Уровни различаются тоном, а не тревогой: тест про привычки, а не про оценку человека. */
.qz-level--focus {
  background: var(--gold-100);
  color: var(--gold-dark);
}
.qz-level--growing {
  background: #e8edf6;
  color: var(--navy);
}
.qz-level--steady {
  background: var(--success-soft);
  color: var(--success-d);
}

.qz-detail {
  margin-top: 14px;
}
.qz-detail__level {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
}
/* Оговорка направления (страх, тревога, горе): само чувство — не недуг; когда идти к специалисту. */
.qz-detail__note {
  display: flex;
  gap: 10px;
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}
.qz-detail__note .ic {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: var(--navy-600);
}
.qz-step {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  background: #faf5ec;
}
.qz-step h4,
.qz-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--gold-dark);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.qz-step h4 .ic {
  width: 15px;
  height: 15px;
}
.qz-step p {
  margin: 5px 0 0;
  font-size: 15.5px;
  line-height: 1.5;
}
.qz-label {
  margin-top: 18px;
  color: var(--ink-3);
}
.qz-ch {
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
.qz-detail > .qz-ch:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.qz-ch__head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.qz-ch__chev {
  flex: none;
  color: var(--ink-3) !important;
  transition: transform 0.3s var(--ease);
}
.qz-ch.is-open .qz-ch__chev {
  transform: rotate(180deg);
}
.qz-ch__extra {
  display: none;
}
.qz-ch.is-open .qz-ch__extra {
  display: block;
  animation: qz-fade 0.3s var(--ease);
}
.qz-ch__head .ic {
  width: 17px;
  height: 17px;
  color: var(--navy);
}
.qz-ch__head b {
  flex: 1;
  font-size: 16px;
}
.qz-page-pill {
  padding: 3px 9px;
  border-radius: 99px;
  background: #e8edf6;
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.qz-ch__why {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
}
.qz-ch__in {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
  line-height: 1.5;
}
.qz-ch__in li {
  position: relative;
  padding-left: 14px;
}
.qz-ch__in li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.qz-quote {
  margin: 12px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--gold-200);
}
.qz-quote p {
  margin: 0;
  font: italic 600 15.5px/1.6 var(--font-serif);
}
.qz-quote cite {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-style: normal;
}
/* линию над блоком даёт последняя глава списка */
.qz-more {
  margin-top: 14px;
}
.qz-more .qz-label {
  margin-top: 0;
}
.qz-more__row {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
}
.qz-more__row b {
  font-weight: 600;
}
.qz-more__row small {
  margin-left: 6px;
  color: var(--ink-3);
  font-size: 12.5px;
}
.qz-more__row span {
  display: block;
  color: var(--ink-2);
}

/* Все направления списком; по нажатию строка раскрывает те же подробности. */
.qz-all {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--sh-sm);
  overflow: hidden;
}
.qz-row {
  border-bottom: 1px solid var(--line);
}
.qz-row:last-child {
  border-bottom: 0;
}
.qz-row__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
}
button.qz-row__btn {
  cursor: pointer;
}
@media (hover: hover) {
  button.qz-row__btn:hover {
    background: var(--surface-2);
  }
}
.qz-row__body {
  flex: 1;
  min-width: 0;
}
.qz-row__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.qz-row__top b {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.qz-row__score {
  flex: none;
  font: 600 16px/1.2 var(--font-serif);
  font-variant-numeric: tabular-nums;
}
.qz-row__score small {
  color: var(--ink-3);
  font: 500 12px var(--font-sans);
}
.qz-bar-track {
  height: 6px;
  margin-top: 7px;
  border-radius: 3px;
  background: var(--paper-deep);
  overflow: hidden;
}
.qz-bar-fill {
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--navy-600);
  transition: width 0.9s var(--ease);
}
.qz-bar-fill--focus {
  background: var(--gold);
}
.qz-bar-fill--steady {
  background: var(--success);
}
.qz-row__level {
  margin-top: 5px;
  font-size: 12.5px;
  font-weight: 500;
}
.qz-row__level--focus {
  color: var(--gold-dark);
}
.qz-row__level--growing {
  color: var(--navy);
}
.qz-row__level--steady {
  color: var(--success-d);
}
.qz-row__chev {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--ink-3);
  transition: transform 0.3s var(--ease);
}
.qz-row.is-open .qz-row__chev {
  transform: rotate(180deg);
}
.qz-row__chev--go {
  color: var(--gold-dark);
}
/* Три направления, с которых тест предлагает начать: номер залит золотом. */
.qz-row--focus .qz-num {
  background: linear-gradient(180deg, #e0b685, var(--gold));
  color: var(--navy);
}
.qz-dir {
  scroll-margin-top: 84px;
}
.qz-row__detail {
  display: none;
  padding: 0 16px 16px;
}
.qz-row.is-open .qz-row__detail {
  display: block;
  animation: qz-fade 0.3s var(--ease);
}
@keyframes qz-fade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ---------------------------------------------------------------- книга */

.qz-book {
  margin-top: 34px;
  padding-block: 56px;
  background:
    radial-gradient(70% 60% at 20% 0%, rgba(226, 185, 138, 0.22), transparent 62%),
    linear-gradient(150deg, var(--navy-700), var(--navy) 50%, var(--navy-900));
  color: #fff;
}
.qz-book__in {
  display: grid;
  justify-items: center;
  gap: 26px;
  max-width: 920px;
  text-align: center;
}
@media (min-width: 820px) {
  .qz-book__in {
    grid-template-columns: 300px 1fr;
    align-items: center;
    gap: 56px;
    text-align: left;
  }
}

/* Обложка как настоящая книга: корешок, толщина, тень. Она слегка «парит», по ней проходит
   блик, а на компьютере поворачивается за курсором (переменные --rx, --ry ставит quiz.js). */
.qz-cover {
  position: relative;
  width: min(230px, 58vw);
  perspective: 1100px;
}
.qz-cover__glow {
  position: absolute;
  inset: -16% -22% -10%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(226, 185, 138, 0.5), transparent 72%);
  animation: qz-glow 5.2s ease-in-out infinite;
}
.qz-cover__book {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(calc(-20deg + var(--ry, 0deg))) rotateX(calc(4deg + var(--rx, 0deg)));
  transition: transform 0.5s var(--ease);
  animation: qz-float 5.2s ease-in-out infinite;
}
.qz-cover__book img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 3px 8px 8px 3px;
  box-shadow: inset 6px 0 10px -6px rgba(0, 0, 0, 0.35);
  backface-visibility: hidden;
}
/* торец с листами (справа) и задняя стенка: у книги появляется толщина */
.qz-cover__book::before {
  content: '';
  position: absolute;
  top: 1.2%;
  right: 0;
  width: 26px;
  height: 97.6%;
  background: repeating-linear-gradient(90deg, #fff 0 2px, #e4dfd4 2px 3px);
  transform: translateX(13px) rotateY(90deg) translateX(13px);
  transform-origin: right center;
}
.qz-cover__book::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 3px 8px 8px 3px;
  background: #d9d3c5;
  transform: translateZ(-26px);
  box-shadow: 26px 34px 46px -10px rgba(0, 0, 0, 0.55);
}
/* блик */
.qz-cover__book i {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 3px 8px 8px 3px;
  overflow: hidden;
  pointer-events: none;
}
.qz-cover__book i::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -70%;
  width: 46%;
  height: 160%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: rotate(18deg);
  animation: qz-shine 4.6s var(--ease) 1.2s infinite;
}
@keyframes qz-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}
@keyframes qz-glow {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}
@keyframes qz-shine {
  0% {
    left: -70%;
  }
  30%,
  100% {
    left: 150%;
  }
}

.qz-book__copy h2 {
  margin-top: 6px;
  font: 700 clamp(28px, 6vw, 38px) / 1.15 var(--font-serif);
  letter-spacing: -0.02em;
}
.qz-book__copy h2 em {
  display: block;
  color: var(--gold-light);
  font-style: normal;
}
.qz-book__meta {
  margin: 8px 0 0;
  color: var(--on-dark-muted);
  font-size: 14px;
}
.qz-book__head {
  margin: 20px 0 0;
  color: var(--on-dark);
  font: 600 20px/1.4 var(--font-serif);
}
.qz-book__lead {
  margin: 8px 0 0;
  color: var(--on-dark-muted);
  font-size: 15px;
  line-height: 1.6;
}
.qz-book__list {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--on-dark);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}
.qz-book__list li {
  display: flex;
  gap: 10px;
}
.qz-book__list .ic {
  flex: none;
  width: 19px;
  height: 19px;
  margin-top: 2px;
  padding: 3px;
  border-radius: 50%;
  background: var(--gold-light);
  color: var(--navy);
  stroke-width: 3;
}
.qz-buy {
  margin-top: 24px;
}
@media (min-width: 820px) {
  .qz-buy {
    width: auto;
    min-width: 300px;
  }
}
.qz-book__hint {
  margin: 10px 0 0;
  color: var(--on-dark-muted);
  font-size: 13px;
}

/* ---------------------------------------------------------------- приложение */

.qz-app {
  padding-block: 48px 26px;
  text-align: center;
}
.qz-app__in {
  display: grid;
  justify-items: center;
}
.qz-app__mark {
  width: 64px;
  height: 64px;
  border-radius: 17px;
  box-shadow: var(--sh-md);
}
.qz-app h2 {
  margin-top: 16px;
  font: 700 clamp(24px, 5.4vw, 32px) / 1.2 var(--font-serif);
  letter-spacing: -0.015em;
}
.qz-app p {
  max-width: 520px;
  margin: 10px 0 22px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.6;
}
.qz-app .stores {
  justify-content: center;
}
.qz-app .store {
  border: 1px solid var(--line);
}

.qz-acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-block: 6px 96px;
}
.qz-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: none;
  color: var(--navy);
  font: 600 15px/1.2 var(--font-sans);
  cursor: pointer;
  transition: background 0.2s;
}
.qz-ghost:hover {
  background: #fff;
}
.qz-ghost .ic {
  width: 18px;
  height: 18px;
}

/* ---------------------------------------------------------------- плашка «Купить» и сообщение */

.qz-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 520px;
  margin-inline: auto;
  padding: 9px 9px 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(19, 32, 63, 0.92);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 22px 44px -12px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transform: translateY(140%);
  transition: transform 0.45s var(--ease), opacity 0.3s;
}
.qz-bar.is-on {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.qz-bar img {
  width: 34px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
}
.qz-bar__t {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.qz-bar__t b {
  font: 600 15.5px/1.1 var(--font-serif);
}
.qz-bar__t small {
  color: var(--on-dark-muted);
  font-size: 12px;
}
.qz-bar__btn {
  margin-left: auto;
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, #e0b685, var(--gold));
  color: var(--navy);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.qz-toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 70;
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s, transform 0.3s var(--ease);
}
.qz-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------------------------------------------------------- без анимаций */

@media (prefers-reduced-motion: reduce) {
  .qz-emblem i,
  .qz-cover__glow,
  .qz-cover__book,
  .qz-cover__book i::before {
    animation: none;
  }
  .qz-st.is-in,
  .qz-st.is-in-back,
  .qz-chart.is-on .shape,
  .qz-row.is-open .qz-row__detail,
  .qz-ch.is-open .qz-ch__extra {
    animation: none;
  }
  .qz-bar-fill,
  .qz-parts b {
    transition: none;
  }
}
