/* Прототип 3 — «Ритуал»: полный экран, один вопрос, звёздное небо */
html[data-variant="new"] [data-v="old"], html[data-variant="old"] [data-v="new"] { display: none; }
/* Под телефон: без background-attachment:fixed, backdrop-filter и filter на больших слоях — они дёргают прокрутку и масштаб.
   Высота — svh (не меняется, когда прячется адресная строка), свечение — отдельный неподвижный слой. */
body { min-height: 100svh; background: var(--bg); overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(70% 55% at 50% 110%, #2a2116 0%, rgba(11, 10, 9, 0) 70%); }
button, a, .v-opt, .v-chip, .v-channel { touch-action: manipulation; }
.p3-muted { color: var(--muted); font-size: 14px; }
.p3-sky { position: fixed; top: 0; left: 0; z-index: 0; pointer-events: none; }
.p3-bigstar { position: fixed; left: 50%; bottom: -34vh; width: 70vh; height: 70vh; transform: translateX(-50%); z-index: 0; opacity: .5; pointer-events: none;
 transition: opacity .6s; }
body[data-kind="quiz"] .p3-bigstar, body[data-kind="date"] .p3-bigstar { opacity: .28; }

/* ---------- шапка ---------- */
.p3-top { position: fixed; inset: 0 0 auto; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 16px clamp(16px, 4vw, 40px); padding-top: max(16px, env(safe-area-inset-top));
  background: rgba(11, 10, 9, .94); border-bottom: 1px solid var(--line-2); }
@media (hover: hover) and (pointer: fine) {
  .p3-top { background: rgba(11, 10, 9, .8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); } }
.p3-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; }
@media (max-width: 760px) { .p3-brand .v-caps { display: none; } }
.p3-rune { width: 16px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linejoin: round; filter: drop-shadow(0 0 8px rgba(228, 199, 146, .6)); }
.p3-prog { display: grid; gap: 6px; justify-items: center; font: italic 500 17px var(--serif); color: var(--gold-2); width: min(40vw, 260px); }
.p3-prog div { width: 100%; height: 1px; background: var(--line-2); }
.p3-prog i { display: block; height: 100%; width: 0; background: var(--gold-2); box-shadow: 0 0 10px var(--gold-2); transition: width .5s; }
.p3-prog { grid-column: 2; }
.p3-menu { grid-column: 3; justify-self: end; background: none; border: 1px solid var(--line); color: var(--gold-2); border-radius: 99px; padding: 8px 16px; cursor: pointer; font-size: 14px; }
.p3-menu:hover { background: rgba(201, 164, 106, .1); }

/* ---------- сцена ---------- */
.p3-main { position: relative; z-index: 1; min-height: 100svh; display: grid; place-items: center; padding: 96px 16px 64px; }
.p3-intro { text-align: center; max-width: 640px; display: grid; justify-items: center; animation: p3in 1s ease both; }
.p3-intro h1 { font-size: clamp(52px, 10vw, 104px); line-height: .95; margin: 20px 0 0; font-weight: 500; letter-spacing: -.01em;
  background: linear-gradient(180deg, #fff6e6 30%, #cdb58a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.p3-intro p { color: #d6cdbf; font-size: clamp(16px, 1.8vw, 19px); max-width: 520px; margin: 0 0 32px; }
.p3-go { min-width: 240px; min-height: 58px; font-size: 17px; letter-spacing: .02em; }
.p3-sign { display: flex; align-items: center; gap: 12px; margin-top: 44px; text-align: left; font-size: 13px; color: var(--muted); }
.p3-sign img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 1px solid var(--line); }
.p3-sign i { display: block; font: italic 500 20px var(--serif); color: var(--text); }
@keyframes p3in { from { opacity: 0; transform: translate3d(0, 14px, 0); } }

.p3-stage { width: 100%; max-width: 640px; display: grid; gap: 20px; transition: opacity .18s ease, transform .18s ease; }
.p3-stage.is-out { opacity: 0; transform: translate3d(0, -8px, 0); }
.st-item { animation: p3in .45s cubic-bezier(.2, .7, .2, 1) both; }
.st-say { color: #ddd4c6; font-size: 17px; }
.st-say.is-question { font: 500 clamp(30px, 5.2vw, 48px)/1.08 var(--serif); color: #fff6e8; text-align: center; margin-bottom: 14px; text-wrap: balance; }
.st-say.is-reading p { margin: 0 0 14px; }
.st-say.is-reading, .st-say.is-score, .st-say.is-price, .st-say.is-done {
  background: rgba(22, 19, 15, .92); border: 1px solid var(--line-2); border-radius: 20px; padding: 22px 24px; }
.st-say.is-score, .st-say.is-done { border-color: var(--line); }
.st-say ul { padding-left: 20px; }

/* варианты — тонкие строки с римскими номерами */
.p3-stage .v-opts { counter-reset: o; gap: 0; border-top: 1px solid var(--line-2); }
.p3-stage .v-opt { counter-increment: o; background: transparent; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; padding: 18px 8px; font-size: 17px; }
.p3-stage .v-opt::before { content: counter(o, upper-roman); font: italic 500 18px var(--serif); color: var(--gold); width: 34px; flex: none; }
.p3-stage .v-opt:hover { background: linear-gradient(90deg, rgba(201, 164, 106, .12), transparent); }
.p3-stage .v-opt.is-picked { background: linear-gradient(90deg, rgba(201, 164, 106, .22), transparent); }
.p3-stage .v-opt--primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-radius: 99px; border: 0; margin: 14px 0 4px; justify-content: center; }
.p3-stage .v-opt--primary::before { content: none; }
.p3-stage .v-opts:has(.v-opt--primary) { border-top: 0; }
.p3-stage .v-opt--card { padding: 12px 8px; }
.p3-stage .v-opt--card::before { content: none; }
.p3-stage .v-opts--row { display: flex; flex-wrap: wrap; gap: 10px; border: 0; }
.p3-stage .v-opts--row .v-opt { flex: 1; border: 1px solid var(--line); border-radius: 99px; }
.p3-stage .v-opts--row .v-opt::before { content: none; }
.p3-stage .v-opts-aux { padding-top: 8px; }
.p3-stage .v-form { background: rgba(22, 19, 15, .92); border: 1px solid var(--line-2); border-radius: 20px; padding: 22px; }
.p3-stage .v-minimap .minimap { width: min(100%, 400px); }

/* ---------- панель разборов ---------- */
.p3-drawer { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .72); display: flex; justify-content: flex-end; }
.p3-drawer-b { position: relative; width: min(100%, 440px); height: 100%; overflow: auto; overscroll-behavior: contain; background: var(--bg-2); border-left: 1px solid var(--line); padding: 28px 22px;
  animation: p3slide .35s ease both; }
@keyframes p3slide { from { transform: translateX(40px); opacity: 0; } }
.p3-drawer h2 { font-size: 34px; margin: 10px 0 18px; font-weight: 500; }
.p3-x { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; background: none; border: 1px solid var(--line-2); color: var(--muted); font-size: 22px; cursor: pointer; }
.p3-svc { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); text-decoration: none; color: inherit; }
.p3-svc img { width: 64px; height: 80px; object-fit: cover; object-position: left; border-radius: 10px; flex: none; }
.p3-svc span { display: grid; gap: 2px; flex: 1; }
.p3-svc b { font: 500 21px/1.1 var(--serif); }
.p3-svc small { color: var(--muted); font-size: 13px; }
.p3-svc em { font-style: normal; font-size: 12.5px; color: var(--gold); }
.p3-svc strong { font: 500 21px var(--serif); color: var(--gold-2); white-space: nowrap; font-weight: 500; }

.p3-foot { position: relative; z-index: 1; padding: 20px 16px 32px; text-align: center; font-size: 12.5px; color: var(--dim); border-top: 1px solid var(--line-2);
  background: rgba(11, 10, 9, .7); }
.p3-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 10px; }
.p3-foot nav a, .p3-foot nav button { color: var(--muted); font-size: 13px; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.p3-foot p { margin: 6px 0; }
.p3-foot a { color: var(--muted); }
.p3-legal { font-size: 12.5px; color: var(--dim); margin-top: 28px; }
.p3-legal a { color: var(--muted); }

@media (max-width: 600px) {
  .p3-top { grid-template-columns: auto 1fr auto; }
  .p3-brand .v-caps { display: none; }
  .p3-prog { width: 100%; }
  .p3-main { padding-top: 84px; place-items: start center; }
  .p3-intro { padding-top: 6vh; }
}
