/* Главный экран - гость, онбординг, прогресс (только внутри .app) */

/* До bootstrap: не показывать тренажёр (избежать моргания «Загрузка…») */
html.app-boot-pending #app {
  visibility: hidden;
  opacity: 0;
}

html.guest-intro-pending .guest-intro-backdrop {
  opacity: 1;
}

html.guest-intro-pending .phone-shell {
  opacity: 0;
  transform: scale(0.94);
}

/* ── Intro для новых гостей ── */
.guest-intro-backdrop {
  position: absolute;
  inset: 0;
  z-index: 40;
  border-radius: inherit;
  background: var(--bg-base);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.guest-intro-backdrop--visible {
  opacity: 1;
}

body.guest-intro-active .phone-shell {
  z-index: 50;
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity 1s ease,
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

body.guest-intro-active .phone-shell.phone-shell--intro-in {
  opacity: 1;
  transform: scale(1);
}

body.guest-intro-active #app {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.guest-intro {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 28px var(--app-pad-x);
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.guest-intro--hidden {
  opacity: 0;
  visibility: hidden;
}

.guest-intro--typing {
  opacity: 1;
  visibility: visible;
}

.guest-intro--exit {
  opacity: 0;
}

.guest-intro__slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 320px;
}

.guest-intro__emoji {
  display: block;
  font-size: clamp(2.4rem, 10vw, 3rem);
  line-height: 1;
  opacity: 0;
  transform: scale(0.72) translateY(8px);
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.guest-intro__emoji--in {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.guest-intro__emoji--out {
  opacity: 0;
  transform: scale(0.88) translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.guest-intro__line {
  margin: 0;
  max-width: 28ch;
  font-size: clamp(1rem, 3.8vw, 1.28rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-align: center;
  min-height: 2.7em;
}

.guest-intro__line--welcome {
  color: var(--accent-primary);
}

.guest-intro__line--math {
  color: var(--btn-bg);
}

.guest-intro__line--child {
  color: var(--accent-secondary);
}

.guest-intro__line--forest {
  color: var(--tree-2);
}

html[data-ui-theme='dark'] .guest-intro__line--welcome {
  text-shadow: 0 0 18px rgb(255 107 157 / 0.4);
}

html[data-ui-theme='dark'] .guest-intro__line--math {
  text-shadow: 0 0 18px rgb(123 97 255 / 0.35);
}

html[data-ui-theme='dark'] .guest-intro__line--child {
  text-shadow: 0 0 16px rgb(255 217 61 / 0.35);
}

html[data-ui-theme='dark'] .guest-intro__line--forest {
  text-shadow: 0 0 16px rgb(77 255 125 / 0.32);
}

.guest-intro__line--in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.guest-intro__line--out {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.guest-intro__line::after {
  content: '|';
  display: inline-block;
  margin-left: 2px;
  color: currentColor;
  opacity: 0.85;
  animation: guest-intro-caret 0.85s step-end infinite;
}

.guest-intro--exit .guest-intro__line::after {
  display: none;
}

@keyframes guest-intro-caret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── guest-intro v2 · world dramaturgy (feat/guest-intro-v2) ── */
.guest-intro-backdrop--v2 {
  background:
    radial-gradient(ellipse 120% 80% at 50% 100%, rgb(45 212 191 / 0.12), transparent 55%),
    radial-gradient(ellipse 90% 60% at 20% 20%, rgb(139 92 246 / 0.18), transparent 50%),
    linear-gradient(165deg, #0f1428 0%, #1a1f4a 42%, #12152e 100%);
}

.guest-intro-backdrop--classic {
  background: var(--bg-base);
}

.guest-intro--world .guest-intro__slide {
  position: relative;
  z-index: 4;
}

.guest-intro__world {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.92);
  transition:
    opacity 0.65s ease,
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.guest-intro__world--in {
  opacity: 1;
  transform: scale(1);
}

.guest-intro__world--wide {
  transform: scale(1.04);
}

.guest-intro__sky {
  position: absolute;
  inset: 0 0 42%;
  background: linear-gradient(180deg, rgb(88 28 135 / 0.35) 0%, transparent 100%);
}

.guest-intro__ground {
  position: absolute;
  left: 50%;
  bottom: 16%;
  width: 88%;
  height: 46%;
  transform: translateX(-50%);
}

.guest-intro__path {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 18%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(45 212 191 / 0.15), rgb(56 189 248 / 0.45), rgb(45 212 191 / 0.15));
  box-shadow: 0 0 18px rgb(56 189 248 / 0.25);
}

.guest-intro__tree {
  position: absolute;
  font-size: clamp(1.4rem, 6vw, 2rem);
  filter: drop-shadow(0 4px 10px rgb(0 0 0 / 0.35));
  opacity: 0.85;
}

.guest-intro__tree--a { left: 8%; bottom: 28%; }
.guest-intro__tree--b { right: 10%; bottom: 34%; font-size: clamp(1.2rem, 5vw, 1.7rem); }

.guest-intro__stone,
.guest-intro__rock {
  position: absolute;
  bottom: 10%;
  transition: filter 0.45s ease, transform 0.45s ease;
}

.guest-intro__stone {
  font-size: clamp(1.5rem, 6.5vw, 2.2rem);
  filter: drop-shadow(0 0 12px rgb(56 189 248 / 0.2));
}

.guest-intro__stone--left { left: 26%; }
.guest-intro__stone--right { right: 24%; opacity: 0.55; transform: scale(0.88); }

/* CSS-камни (без emoji - на Windows  = пустые рамки) */
.guest-intro__rock {
  width: 26px;
  height: 20px;
  border-radius: 42% 42% 36% 36%;
  background: linear-gradient(160deg, #94a3b8 0%, #475569 55%, #334155 100%);
  box-shadow:
    0 3px 10px rgb(0 0 0 / 0.35),
    inset 0 1px 0 rgb(255 255 255 / 0.15);
}

.guest-intro__rock--left { left: 30%; }
.guest-intro__rock--right {
  right: 28%;
  opacity: 0.55;
  transform: scale(0.82);
}

.guest-intro__world--in .guest-intro__rock--left {
  animation: guest-intro-stone-glow 1.1s ease-in-out infinite alternate;
}

.guest-intro__world--in .guest-intro__stone--left {
  animation: guest-intro-stone-glow 1.1s ease-in-out infinite alternate;
}

.guest-intro__glow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 120px;
  height: 120px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(45 212 191 / 0.28), transparent 68%);
  opacity: 0.7;
}

@keyframes guest-intro-stone-glow {
  from { filter: drop-shadow(0 0 8px rgb(56 189 248 / 0.25)); transform: scale(1); }
  to { filter: drop-shadow(0 0 18px rgb(250 204 21 / 0.55)); transform: scale(1.06); }
}

.guest-intro__math {
  position: absolute;
  left: 50%;
  top: 58%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgb(15 20 40 / 0.72);
  border: 1px solid rgb(56 189 248 / 0.35);
  box-shadow: 0 8px 28px rgb(0 0 0 / 0.35);
  font-weight: 800;
  font-size: clamp(1rem, 4.2vw, 1.25rem);
  color: #e2e8f0;
  opacity: 0;
  transform: translate(-50%, 12px) scale(0.94);
  transition:
    opacity 0.35s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.guest-intro__math--in {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.guest-intro__math-expr { color: #94a3b8; }

.guest-intro__math-answer {
  min-width: 1.2em;
  text-align: center;
  color: #fbbf24;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.28s ease, transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.guest-intro__math--solved .guest-intro__math-expr { opacity: 0.45; }
.guest-intro__math--solved .guest-intro__math-answer {
  opacity: 1;
  transform: scale(1);
}

.guest-intro__reward {
  position: absolute;
  left: 50%;
  top: 48%;
  z-index: 3;
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  opacity: 0;
  transform: translate(-50%, 16px) scale(0.5);
  transition:
    opacity 0.35s ease,
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 16px rgb(74 222 128 / 0.55));
  pointer-events: none;
}

.guest-intro__reward--in {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.guest-intro__steps {
  position: absolute;
  left: 50%;
  top: 54%;
  z-index: 3;
  display: none;
  gap: 8px;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.35s ease, transform 0.4s ease;
  pointer-events: none;
}

.guest-intro__steps--in {
  display: flex;
  opacity: 1;
  transform: translate(-50%, 0);
}

.guest-intro__step {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  color: rgb(148 163 184 / 0.7);
  background: rgb(15 20 40 / 0.65);
  border: 1px solid rgb(100 116 139 / 0.35);
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.guest-intro__step--lit {
  color: #0f172a;
  background: linear-gradient(145deg, #fde047, #fbbf24);
  border-color: rgb(250 204 21 / 0.8);
  box-shadow: 0 0 14px rgb(250 204 21 / 0.45);
  transform: scale(1.08);
}

.guest-intro__step--pulse {
  animation: guest-intro-step-pulse 0.55s ease-in-out 2;
}

@keyframes guest-intro-step-pulse {
  0%, 100% { transform: scale(1.08); }
  50% { transform: scale(1.18); box-shadow: 0 0 22px rgb(250 204 21 / 0.65); }
}

.guest-intro--world .guest-intro__line {
  text-shadow: 0 2px 16px rgb(0 0 0 / 0.55);
}

.guest-intro--world .guest-intro__line--welcome {
  color: #f8fafc;
}

.guest-intro--world .guest-intro__line--child {
  color: #7dd3fc;
}

.guest-intro--world .guest-intro__line--forest {
  color: #86efac;
}

.guest-intro--world .guest-intro__line--math {
  color: #c4b5fd;
}

/* ── guest-intro · stacked layouts (challenge variants) ── */
.guest-intro--world {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  place-items: stretch;
}

.guest-intro__content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 0 0 auto;
  pointer-events: none;
}

.guest-intro__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  flex: 0 0 auto;
}

.guest-intro--world .guest-intro__world {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  height: 34%;
  inset: auto 0 0;
  transform-origin: 50% 100%;
}

.guest-intro--world .guest-intro__world--wide {
  transform: scale(1.03);
}

.guest-intro--world .guest-intro__ground {
  bottom: 10%;
  height: 78%;
  width: 92%;
}

.guest-intro--world .guest-intro__slide {
  width: 100%;
  max-width: 300px;
  padding: 0 8px;
  flex-shrink: 0;
}

.guest-intro--world .guest-intro__line {
  min-height: 2.4em;
  max-width: 22ch;
}

.guest-intro--world .guest-intro__steps {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  margin-top: 0;
}

.guest-intro--world .guest-intro__steps--in {
  transform: none;
}

.guest-intro--world .guest-intro__math,
.guest-intro--world .guest-intro__reward {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  margin-top: 8px;
}

.guest-intro--world .guest-intro__math--in {
  transform: none;
}

.guest-intro--world .guest-intro__reward--in {
  transform: none;
}

.guest-intro--world:not([class*='layout-challenge']) {
  padding: 48px 20px 0;
}

.guest-intro--world:not([class*='layout-challenge']) .guest-intro__content {
  gap: 14px;
  padding-bottom: 38%;
}

/* A · текст сверху, точки как Welcome, лес внизу */
.guest-intro--layout-challenge-a {
  padding: 48px 20px 0;
}

.guest-intro--layout-challenge-a .guest-intro__content {
  gap: 14px;
  padding-bottom: 38%;
}

.guest-intro--layout-challenge-a .guest-intro__world {
  height: 30%;
}

/* B · плашка стабильно по центру; pill 1-5 absolute (без прыжка) */
.guest-intro--layout-challenge-b {
  display: flex;
  flex-direction: column;
  padding: 0;
  place-items: stretch;
}

.guest-intro--layout-challenge-b.guest-intro--world {
  display: flex;
}

.guest-intro--layout-challenge-b #guest-intro-steps {
  position: absolute;
  top: 3.25rem;
  left: 0;
  right: 0;
  z-index: 8;
  transform: none;
  display: none;
  justify-content: center;
  gap: 10px;
  padding: 0 12px;
  margin: 0;
}

.guest-intro--layout-challenge-b #guest-intro-steps.guest-intro__steps--in {
  display: flex;
  opacity: 1;
}

.guest-intro--layout-challenge-b .guest-intro__content {
  order: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 0 20px;
  box-sizing: border-box;
  transform: translateY(-3%);
}

.guest-intro--layout-challenge-b .guest-intro__slide {
  box-sizing: border-box;
  width: 100%;
  max-width: 292px;
  height: 9.25rem;
  min-height: 9.25rem;
  max-height: 9.25rem;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgb(15 20 40 / 0.62);
  border: 1px solid rgb(56 189 248 / 0.14);
  box-shadow: 0 10px 32px rgb(0 0 0 / 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}

.guest-intro--layout-challenge-b .guest-intro__line {
  min-height: 1.35em;
  max-width: 22ch;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-wrap: wrap;
  gap: 8px;
}

.guest-intro--layout-challenge-b .guest-intro__line--finale {
  max-width: none;
  width: 100%;
}

.guest-intro__finale-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  width: 100%;
}

.guest-intro__finale-piece {
  display: inline-flex;
  align-items: center;
  opacity: 0;
  transform: scale(0.82) translateY(6px);
}

.guest-intro__finale-piece--in {
  animation: guest-intro-word-in 0.32s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.guest-intro__finale-chunk {
  font-size: clamp(0.68rem, 3vw, 0.88rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #86efac;
  line-height: 1.2;
}

.guest-intro__finale-digit {
  font-size: clamp(1.35rem, 5.5vw, 1.75rem);
  letter-spacing: 0.04em;
  padding: 0 0.12em;
}

.guest-intro__arena-digit.trial-duel-card--answer {
  --trial-duel-card-size: 3.15rem;
  background: linear-gradient(165deg, #1c1c1e 0%, #16213e 48%, #0f3460 100%);
  border: 3px solid #533483;
  border-bottom: 5px solid #31255a;
  box-shadow:
    0 6px 18px rgb(0 0 0 / 0.42),
    inset 0 1px 0 rgb(255 255 255 / 0.08),
    0 0 14px rgb(83 52 131 / 0.35);
  border-radius: var(--radius-sm, 8px);
}

.guest-intro__arena-digit .trial-duel-card__label {
  color: #cfd8dc;
  font-size: 0.48rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.guest-intro__arena-digit .trial-duel-card__value {
  color: #f5f7fa;
  font-size: 1.42rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.35);
}

.guest-intro--layout-challenge-b .guest-intro__line--cta {
  max-width: none;
  font-size: clamp(1.05rem, 4.8vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fde047;
  text-shadow: 0 0 20px rgb(250 204 21 / 0.35);
  line-height: 1.25;
}

.guest-intro--layout-challenge-b .guest-intro__stage {
  display: none;
}

.guest-intro__line--word-pop {
  animation: guest-intro-word-in 0.32s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.guest-intro__line--word-out {
  animation: guest-intro-word-out 0.2s ease both;
}

@keyframes guest-intro-word-in {
  from { opacity: 0; transform: scale(0.82) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes guest-intro-word-out {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.92) translateY(-4px); }
}

.guest-intro--layout-challenge-b .guest-intro__line--emph {
  font-size: clamp(1.05rem, 4.2vw, 1.3rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.guest-intro--layout-challenge-b .guest-intro__world {
  order: 2;
  flex: 0 0 26%;
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
  height: auto;
  min-height: 118px;
  max-height: 26%;
  inset: auto;
  opacity: 0;
  transform: none;
  transform-origin: 50% 100%;
}

.guest-intro--layout-challenge-b .guest-intro__world--in {
  opacity: 1;
  transform: scale(1);
}

.guest-intro--layout-challenge-b.guest-intro--world .guest-intro__world {
  position: relative;
  flex: 0 0 26%;
  height: auto;
  top: auto;
  bottom: auto;
  inset: auto;
}

.guest-intro--layout-challenge-b.guest-intro--world #guest-intro-steps {
  position: absolute;
  top: 3.25rem;
}

.guest-intro--layout-challenge-b .guest-intro__ground {
  bottom: 8%;
  height: 85%;
}

.guest-intro--layout-challenge-b .guest-intro__rock--left { left: 22%; }
.guest-intro--layout-challenge-b .guest-intro__rock--right { right: 20%; }

.guest-intro--layout-challenge-b .guest-intro__steps--pills .guest-intro__step {
  width: 3rem;
  height: 3rem;
  font-size: 1.2rem;
}

/* slide crossfade: плашка не «сжимается» между кадрами */
.guest-intro--layout-challenge-b .guest-intro__emoji--out,
.guest-intro--layout-challenge-b .guest-intro__line--out {
  opacity: 1;
  transform: none;
  transition: opacity 0.15s ease;
}

.guest-intro--layout-challenge-b .guest-intro__line::after {
  display: none;
}

/* C · максимальные отступы, компактный лес */
.guest-intro--layout-challenge-c {
  padding: 56px 24px 0;
}

.guest-intro--layout-challenge-c .guest-intro__content {
  gap: 20px;
  padding-bottom: 42%;
}

.guest-intro--layout-challenge-c .guest-intro__world {
  height: 24%;
}

.guest-intro--layout-challenge-c .guest-intro__tree {
  font-size: clamp(1.1rem, 4.5vw, 1.5rem);
}

.guest-intro--layout-challenge-c .guest-intro__stone {
  font-size: clamp(1.2rem, 5vw, 1.6rem);
}

/* D · три явные зоны: верх / середина / низ */
.guest-intro--layout-challenge-d {
  padding: 0;
  display: grid;
  grid-template-rows: 38% 22% 40%;
  grid-template-areas:
    'hero'
    'stage'
    'world';
}

.guest-intro--layout-challenge-d .guest-intro__content {
  display: contents;
}

.guest-intro--layout-challenge-d .guest-intro__slide {
  grid-area: hero;
  align-self: center;
  justify-self: center;
  max-width: 280px;
}

.guest-intro--layout-challenge-d .guest-intro__stage {
  grid-area: stage;
}

.guest-intro--layout-challenge-d .guest-intro__world {
  position: relative;
  grid-area: world;
  height: 100%;
  inset: auto;
  bottom: auto;
  left: auto;
  right: auto;
}

/* Счётчик · точки (без «пустых карточек») */
.guest-intro__steps--dots .guest-intro__step {
  width: 11px;
  height: 11px;
  padding: 0;
  border: none;
  border-radius: 999px;
  font-size: 0;
  line-height: 0;
  color: transparent;
  background: rgb(148 163 184 / 0.35);
  box-shadow: none;
}

.guest-intro__steps--dots .guest-intro__step--lit {
  background: #fbbf24;
  box-shadow: 0 0 10px rgb(250 204 21 / 0.55);
  transform: scale(1.25);
}

.guest-intro__steps--dots .guest-intro__step--pulse {
  animation: guest-intro-dot-pulse 0.55s ease-in-out 2;
}

@keyframes guest-intro-dot-pulse {
  0%, 100% { transform: scale(1.25); }
  50% { transform: scale(1.45); box-shadow: 0 0 16px rgb(250 204 21 / 0.7); }
}

/* Счётчик · мягкие pill (цифры без тёмной рамки) */
.guest-intro__steps--pills .guest-intro__step {
  width: 1.85rem;
  height: 1.85rem;
  border: none;
  background: rgb(255 255 255 / 0.08);
  color: rgb(226 232 240 / 0.75);
  box-shadow: none;
}

.guest-intro__steps--pills .guest-intro__step--lit {
  color: #0f172a;
  background: linear-gradient(145deg, #fde047, #fbbf24);
  box-shadow: 0 0 12px rgb(250 204 21 / 0.4);
}

.guest-intro--stage-hidden .guest-intro__stage {
  display: none !important;
}

.session-strip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 1.1rem;
}

.session-strip__text {
  margin: 0;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.session-strip__track {
  flex: 1;
  min-width: 0;
  height: 5px;
  border-radius: 999px;
  background: rgb(18 24 38 / 0.08);
  overflow: hidden;
}

html[data-ui-theme='dark'] .session-strip__track {
  background: rgb(255 255 255 / 0.1);
}

.session-strip__fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--btn-bg),
    color-mix(in srgb, var(--accent-primary) 70%, var(--btn-bg))
  );
  transition: width 0.35s ease;
}

.guest-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-secondary) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-secondary) 45%, transparent);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-secondary);
}

.task-hint {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent-primary) 12%, var(--surface-panel));
  border: 1px dashed color-mix(in srgb, var(--accent-primary) 45%, transparent);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-primary);
  animation: task-hint-pulse 2.4s ease-in-out infinite;
}

.task-hint__arrow {
  font-size: 0.85rem;
  line-height: 1;
}

@keyframes task-hint-pulse {
  0%, 100% { opacity: 0.85; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

.save-banner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  margin: 0 6px;
  padding: 10px 10px 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-panel);
  border: 2px solid color-mix(in srgb, var(--btn-bg) 50%, transparent);
  box-shadow: 0 8px 24px rgb(18 24 38 / 0.18);
  animation: save-banner-in 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

html[data-ui-theme='dark'] .save-banner {
  box-shadow: 0 8px 28px rgb(0 0 0 / 0.45);
}

.save-banner__body {
  min-width: 0;
  text-align: left;
}

.save-banner__title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-main);
}

.save-banner__text {
  margin: 2px 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.save-banner__cta {
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: #fc3f1d;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 0 10px rgb(252 63 29 / 0.35);
}

.save-banner__close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--btn-zero-bg);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.stones-section {
  position: relative;
}

@keyframes save-banner-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.overlay__card--welcome {
  max-width: 340px;
  text-align: center;
}

.welcome-kicker {
  margin: 0 0 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-secondary);
}

.welcome-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 4px 0 16px;
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
}

.welcome-demo__stones {
  font-size: 1.35rem;
  letter-spacing: 0.15em;
  color: var(--stone-color);
}

.welcome-demo__arrow {
  font-size: 1.25rem;
  color: var(--accent-primary);
}

.welcome-demo__digit {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  border-bottom: 4px solid var(--btn-border);
  color: var(--btn-text);
  font-size: 1.5rem;
  font-weight: 800;
}

.welcome-perks {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.welcome-perks li {
  margin: 0 0 8px;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text-main);
}

.welcome-perks li:last-child {
  margin-bottom: 0;
}

.overlay__perks {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.overlay__perks li {
  margin: 0 0 8px;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text-main);
}

.overlay__note {
  margin: -8px 0 16px;
  font-size: 0.72rem;
  color: var(--text-subtle);
}

.welcome-demo--hero {
  margin: 8px 0 14px;
  padding: 18px 16px;
  gap: 14px;
  background: linear-gradient(180deg, var(--bg-base) 0%, color-mix(in srgb, var(--btn-bg) 8%, var(--bg-base)) 100%);
  border: 2px solid color-mix(in srgb, var(--accent-primary) 22%, transparent);
}

.welcome-demo--hero .welcome-demo__stones {
  font-size: 1.65rem;
  letter-spacing: 0.22em;
}

.welcome-demo--hero .welcome-demo__arrow {
  font-size: 1.5rem;
  font-weight: 800;
}

.welcome-demo--hero .welcome-demo__digit {
  width: 52px;
  height: 52px;
  font-size: 1.75rem;
}

.overlay__text--compact {
  margin-bottom: 12px;
  font-size: 0.86rem;
  line-height: 1.35;
}

.welcome-perks--compact {
  margin: 0 0 14px;
  text-align: center;
}

.welcome-perks--compact li {
  font-size: 0.8rem;
}

.trial-progress-dots {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.trial-progress-dots.hidden {
  display: none;
}

.trial-progress-dots__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text-muted) 35%, transparent);
  border: 2px solid color-mix(in srgb, var(--text-muted) 50%, transparent);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.trial-progress-dots__dot--done {
  background: var(--accent-secondary);
  border-color: color-mix(in srgb, var(--accent-secondary) 70%, transparent);
}

.trial-progress-dots__dot--current {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: scale(1.12);
  box-shadow: 0 0 6px color-mix(in srgb, var(--accent-primary) 40%, transparent);
}

body.guest-trial-active .session-strip__track {
  display: none;
}

.yandex-login-btn--pulse {
  animation: yandex-btn-pulse 2.8s ease-in-out infinite;
}

@keyframes yandex-btn-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-primary) 0%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--accent-primary) 18%, transparent),
      0 0 16px color-mix(in srgb, var(--accent-secondary) 28%, transparent);
  }
}

.welcome-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
}

.welcome-cta-row__btn {
  width: 100%;
  margin-top: 0;
}

.welcome-cta-divider {
  margin: 10px 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: lowercase;
}

.welcome-cta-note {
  margin: 8px 0 0;
  font-size: 0.68rem;
  color: var(--text-subtle);
}

/* ── Welcome variants (Owner preview) ── */
.welcome-layout--panel .welcome-kicker {
  letter-spacing: 0.12em;
  color: var(--tree-2, #4ade80);
}

.welcome-layout--panel .overlay__title {
  font-size: clamp(1.35rem, 5.2vw, 1.65rem);
}

.welcome-layout--panel #overlay-welcome-start {
  letter-spacing: 0.04em;
  font-weight: 800;
}

.welcome-layout--adventure {
  background: rgb(15 20 40 / 0.72);
  border: 1px solid rgb(56 189 248 / 0.18);
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.35);
}

#overlay-welcome.overlay[data-welcome-variant='adventure']:not(.overlay--hidden):not(.overlay--closing) {
  background: rgb(8 12 28 / 0.35);
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
}

/* Bridge: лес intro под Welcome (continuity challenge-b) */
.guest-intro--welcome-bridge {
  pointer-events: none;
  z-index: 42;
  opacity: 1;
  visibility: visible;
}

.guest-intro--welcome-bridge .guest-intro__content,
.guest-intro--welcome-bridge #guest-intro-steps,
.guest-intro--welcome-bridge .guest-intro__stage {
  display: none !important;
}

.guest-intro--welcome-bridge .guest-intro__world {
  opacity: 1;
}

/* Shared: challenge-b plate language + readable light text */
.welcome-layout--adv-plate,
.welcome-layout--adv-night,
.welcome-layout--adv-arena {
  max-width: 300px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  background: rgb(15 20 40 / 0.82);
  border: 1px solid rgb(56 189 248 / 0.16);
  box-shadow: 0 12px 36px rgb(0 0 0 / 0.38);
  color: #f1f5f9;
}

.welcome-layout--adv-plate .welcome-kicker,
.welcome-layout--adv-night .welcome-kicker,
.welcome-layout--adv-arena .welcome-kicker {
  letter-spacing: 0.12em;
  color: #86efac;
  text-shadow: 0 0 12px rgb(134 239 172 / 0.25);
}

.welcome-layout--adv-plate .overlay__title,
.welcome-layout--adv-night .overlay__title,
.welcome-layout--adv-arena .overlay__title {
  color: #f8fafc;
  font-size: clamp(1.28rem, 5vw, 1.55rem);
  text-shadow: 0 1px 10px rgb(0 0 0 / 0.45);
}

.welcome-layout--adv-plate .overlay__text--compact,
.welcome-layout--adv-night .overlay__text--compact,
.welcome-layout--adv-arena .overlay__text--compact {
  color: #c4b5fd;
  font-weight: 600;
}

.welcome-layout--adv-plate .welcome-cta-divider,
.welcome-layout--adv-night .welcome-cta-divider,
.welcome-layout--adv-arena .welcome-cta-divider {
  color: rgb(226 232 240 / 0.55);
}

.welcome-layout--adv-plate .welcome-demo,
.welcome-layout--adv-night .welcome-demo,
.welcome-layout--adv-arena .welcome-demo {
  background: rgb(8 12 28 / 0.55);
  border: 1px solid rgb(56 189 248 / 0.2);
}

.welcome-layout--adv-plate .welcome-demo__stones,
.welcome-layout--adv-night .welcome-demo__stones,
.welcome-layout--adv-arena .welcome-demo__stones {
  color: #94a3b8;
}

.welcome-layout--adv-plate .welcome-demo__arrow,
.welcome-layout--adv-night .welcome-demo__arrow,
.welcome-layout--adv-arena .welcome-demo__arrow {
  color: #38bdf8;
}

.welcome-layout--adv-plate #overlay-welcome-start,
.welcome-layout--adv-night #overlay-welcome-start,
.welcome-layout--adv-arena #overlay-welcome-start {
  letter-spacing: 0.04em;
  font-weight: 800;
}

#overlay-welcome.overlay[data-welcome-variant='adv-plate']:not(.overlay--hidden):not(.overlay--closing),
#overlay-welcome.overlay[data-welcome-variant='adv-arena']:not(.overlay--hidden):not(.overlay--closing) {
  background: linear-gradient(180deg, rgb(15 20 48 / 0.28) 0%, rgb(8 12 28 / 0.42) 100%);
  backdrop-filter: blur(4px) saturate(1.12);
  -webkit-backdrop-filter: blur(4px) saturate(1.12);
}

#overlay-welcome.overlay[data-welcome-variant='adv-night']:not(.overlay--hidden):not(.overlay--closing) {
  background:
    radial-gradient(ellipse 80% 50% at 50% 18%, rgb(88 28 135 / 0.35), transparent 70%),
    linear-gradient(180deg, #0f1428 0%, #1a1f4a 55%, #0b1020 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.welcome-layout--adv-night {
  background: rgb(15 20 40 / 0.88);
  border-color: rgb(167 139 250 / 0.28);
}

.welcome-demo__digit--arena {
  width: auto;
  height: auto;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.welcome-demo__arena-card {
  --trial-duel-card-size: 2.75rem;
}

.welcome-demo__arena-card .trial-duel-card__value {
  font-size: 1.35rem;
}

.welcome-demo--loop .welcome-demo__stones,
.welcome-demo--loop .welcome-demo__arrow,
.welcome-demo--loop .welcome-demo__digit {
  animation: welcome-demo-step 2.8s ease-in-out infinite;
}

.welcome-demo--loop .welcome-demo__stones { animation-delay: 0s; }
.welcome-demo--loop .welcome-demo__arrow { animation-delay: 0.35s; }
.welcome-demo--loop .welcome-demo__digit { animation-delay: 0.7s; }

@keyframes welcome-demo-step {
  0%, 12% { opacity: 0.35; transform: scale(0.92); }
  28%, 55% { opacity: 1; transform: scale(1); }
  70%, 100% { opacity: 0.55; transform: scale(0.96); }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-demo--loop .welcome-demo__stones,
  .welcome-demo--loop .welcome-demo__arrow,
  .welcome-demo--loop .welcome-demo__digit {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.trial-tap-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 16px;
  background: color-mix(in srgb, var(--bg-base) 72%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.trial-tap-start.hidden {
  display: none;
}

body.trial-tap-active .stone-box,
body.trial-tap-active #digit-grid {
  pointer-events: none;
}

.trial-tap-start__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 28px;
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  background: var(--surface-panel);
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent-primary) 28%, transparent);
  animation: trial-tap-pulse 1.4s ease-in-out infinite;
}

.trial-tap-start__emoji {
  font-size: 2rem;
  line-height: 1;
}

.trial-tap-start__text {
  line-height: 1.25;
}

@keyframes trial-tap-pulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.04); opacity: 1; }
}

#overlay-guest .overlay__card {
  --guest-complete-ring: #43a047;
  border-color: var(--guest-complete-ring);
  box-shadow: 0 0 24px color-mix(in srgb, var(--guest-complete-ring) 30%, transparent);
}

html[data-ui-theme='dark'] #overlay-guest .overlay__card {
  --guest-complete-ring: #72d492;
}

.auth-btn--guest {
  animation: auth-guest-glow 2.8s ease-in-out infinite;
}

@keyframes auth-guest-glow {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 10px color-mix(in srgb, var(--accent-primary) 35%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .task-hint,
  .auth-btn--guest,
  .save-banner,
  .guest-intro-backdrop,
  body.guest-intro-active .phone-shell,
  .guest-intro,
  .guest-intro__line,
  .guest-intro__emoji,
  .trial-tap-start__btn {
    animation: none;
    transition: none;
  }

  .yandex-login-btn--pulse {
    animation: none;
  }

  .guest-intro__line::after {
    display: none;
  }
}

/* G0 - guest captcha (нажми 1…5) */
.guest-captcha-prompt {
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-primary, #e94560);
  line-height: 1.3;
}

.digit-btn--captcha-target {
  --trial-digit-ring: #43a047;
  --trial-digit-glow: rgb(67 160 71 / 0.38);
  transform: scale(1.06);
  animation: guest-trial-digit-pulse 1.1s ease-in-out infinite;
}

body.guest-trial-active[data-category="A"] .digit-btn.digit-btn--busy:disabled,
body.guest-trial-active .digit-btn--busy:disabled {
  opacity: 1;
  cursor: wait;
  animation: none;
  transform: none;
  box-shadow: none;
  text-shadow: none;
  filter: saturate(0.5);
  background: color-mix(in srgb, var(--btn-bg) 24%, var(--bg-base));
  color: color-mix(in srgb, var(--btn-text) 48%, var(--bg-base));
  border-bottom-color: color-mix(in srgb, var(--btn-border) 28%, var(--bg-base));
  border-bottom-width: 4px;
  transition:
    background 0.24s ease,
    color 0.24s ease,
    border-color 0.24s ease,
    filter 0.24s ease,
    transform 0.1s ease,
    box-shadow 0.24s ease;
}

html[data-ui-theme='dark'] body.guest-trial-active[data-category="A"] .digit-btn.digit-btn--busy:disabled,
html[data-ui-theme='dark'] body.guest-trial-active .digit-btn--busy:disabled {
  filter: saturate(0.55);
  background: color-mix(in srgb, var(--btn-bg) 30%, var(--bg-base));
  color: color-mix(in srgb, var(--btn-text) 52%, var(--bg-base));
  border-bottom-color: color-mix(in srgb, var(--btn-border) 34%, var(--bg-base));
}

html[data-ui-theme='dark'] .digit-btn--captcha-target {
  --trial-digit-ring: #72d492;
  --trial-digit-glow: rgb(114 212 146 / 0.42);
}

@keyframes guest-trial-digit-pulse {
  0%, 100% {
    box-shadow: 0 0 0 3px var(--trial-digit-ring), 0 0 18px var(--trial-digit-glow);
  }
  50% {
    box-shadow: 0 0 0 4px var(--trial-digit-ring), 0 0 30px color-mix(in srgb, var(--trial-digit-ring) 55%, transparent);
  }
}

body.guest-trial-active .app-logo,
body.guest-trial-active #mute-btn,
body.guest-trial-active #guest-captcha-prompt,
body.guest-trial-active .auth-island {
  visibility: hidden;
  pointer-events: none;
}

body.guest-trial-active #guest-badge,
body.guest-trial-active #level-badge {
  display: none !important;
}

body.guest-trial-active .session-strip {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

body.guest-trial-active .session-strip__text {
  display: none;
}

body.guest-trial-active .trial-progress-dots {
  flex: 0 0 auto;
  margin: 0;
  gap: 6px;
  justify-content: center;
}

body.guest-trial-active .session-strip__track {
  display: none;
}

body.auth-guest .app-legal__link {
  font-size: clamp(0.48rem, 2.2vw, 0.58rem);
  font-weight: 400;
  color: var(--text-muted, #6b7280);
  text-shadow: none;
  animation: none;
  transform: none;
}

body.auth-guest .app-legal__link:hover {
  color: var(--text-muted, #6b7280);
  text-shadow: none;
  transform: none;
}

html[data-ui-theme='dark'] body.auth-guest .app-legal__link,
html[data-ui-theme='dark'] body.auth-guest .app-legal__link:hover {
  color: var(--text-subtle, #9ca3af);
}

body.guest-trial-active .app-legal__link {
  display: none !important;
}

.digit-btn--wrong {
  animation: captcha-shake 0.32s ease;
}

body.guest-captcha-active .stone-box--captcha-hidden .stones-wrapper {
  visibility: hidden;
}

body.guest-captcha-active .task-hint,
body.guest-captcha-active #task-hint {
  display: none !important;
}

@keyframes captcha-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Гость исчерпал пробу - UI пробника виден, но цифры заблокированы до цикла (~30 мин) */
body.guest-limit-reached #guest-badge,
body.guest-limit-reached #level-badge,
body.guest-limit-reached #task-hint {
  display: none !important;
}

body.guest-limit-reached .digit-btn {
  visibility: visible !important;
  pointer-events: none !important;
  cursor: default;
  opacity: 1 !important;
}

body.guest-limit-reached.trial-intro-world .digit-btn,
body.guest-limit-reached.trial-night-session .digit-btn {
  background: #3a3f4d !important;
  border: 3px solid #4b5160 !important;
  border-bottom: 5px solid #2f3440 !important;
  color: #9aa3b5 !important;
  box-shadow: none !important;
  filter: none !important;
  animation: none !important;
  transform: none !important;
  text-shadow: none !important;
}

body.guest-limit-reached #trial-progress-dots {
  display: flex !important;
}

body.guest-limit-reached #trial-tap-start {
  display: none !important;
}

body.guest-limit-reached .trial-save-banner {
  display: flex;
}

body.guest-limit-reached .trial-save-banner.hidden {
  display: flex !important;
}

/* После «Завтра ещё 5»: светлый текст на ночном фоне */
body.guest-limit-reached.trial-intro-world .session-strip__text,
body.guest-limit-reached.trial-night-session .session-strip__text {
  display: block !important;
  color: #e2e8f0 !important;
  font-weight: 700;
}

body.guest-limit-reached.trial-intro-world .forest-placeholder,
body.guest-limit-reached.trial-night-session .forest-placeholder {
  color: #cbd5e1 !important;
}

body.guest-limit-reached.trial-intro-world .forest-count,
body.guest-limit-reached.trial-night-session .forest-count {
  color: #86efac !important;
}

body.guest-limit-reached.trial-intro-world .trial-save-banner,
body.guest-limit-reached.trial-night-session .trial-save-banner {
  background: rgb(15 20 40 / 0.88) !important;
  border-color: rgb(56 189 248 / 0.32) !important;
}

body.guest-limit-reached.trial-intro-world .trial-save-banner__text,
body.guest-limit-reached.trial-night-session .trial-save-banner__text {
  color: #f1f5f9 !important;
}

body.guest-limit-reached.trial-intro-world .trial-save-banner__arrow,
body.guest-limit-reached.trial-night-session .trial-save-banner__arrow {
  color: #86efac !important;
  filter: drop-shadow(0 0 4px rgb(134 239 172 / 0.4));
}

body.guest-limit-reached.trial-intro-world #forest-card,
body.guest-limit-reached.trial-night-session #forest-card {
  background: rgb(15 20 40 / 0.55);
  border-color: rgb(56 189 248 / 0.22);
}

body.guest-limit-reached.trial-intro-world .stone-box,
body.guest-limit-reached.trial-night-session .stone-box {
  background: rgb(15 20 40 / 0.72);
  border-color: rgb(56 189 248 / 0.28);
  color: #e2e8f0;
}

body.guest-limit-reached.trial-intro-world .app-legal__link,
body.guest-limit-reached.trial-night-session .app-legal__link,
body.guest-limit-reached.trial-intro-world .app-legal__link:hover,
body.guest-limit-reached.trial-night-session .app-legal__link:hover {
  color: rgb(226 232 240 / 0.72) !important;
}

body.guest-limit-reached.trial-intro-world .app-logo,
body.guest-limit-reached.trial-night-session .app-logo {
  color: #f8fafc !important;
}

body.guest-limit-reached.trial-intro-world .mute-btn,
body.guest-limit-reached.trial-night-session .mute-btn {
  color: #e2e8f0;
  filter: none;
}

.welcome-demo--cards {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 0.75rem 0;
}

.welcome-digit-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 3rem;
  border-radius: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(145deg, #4e4187, #7b61ff);
  color: #fff;
  box-shadow: 0 4px 12px rgb(78 65 135 / 0.45);
}

/* ── СПРИНТ: баннер «сохрани лес» во время пробы (s1, s3) ── */
.trial-parent-tip {
  margin: 4px 0 0;
  padding: 0 4px;
  font-size: 0.78rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  text-align: center;
}

.trial-parent-tip.hidden {
  display: none;
}

body.guest-trial-active.trial-intro-world .trial-parent-tip,
body.guest-trial-active.trial-night-session .trial-parent-tip {
  color: #cbd5e1;
}

.trial-save-banner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin: 6px 0 4px;
  padding: 6px 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgb(78 65 135 / 0.1), rgb(123 97 255 / 0.14));
  border: 1px solid rgb(123 97 255 / 0.28);
  animation: trial-banner-in 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
  min-width: 0;
  overflow: hidden;
}

.trial-save-banner.hidden {
  display: none;
}

.trial-save-banner__text {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  font-size: clamp(0.62rem, 2.6vw, 0.72rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trial-save-banner__arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: rgb(123 97 255 / 0.9);
  filter: drop-shadow(0 0 4px rgb(123 97 255 / 0.35));
  animation: trial-save-arrow-nudge 1.35s ease-in-out infinite;
}

.trial-save-banner__arrow svg {
  width: 100%;
  height: 100%;
}

html[data-ui-theme='dark'] .trial-save-banner__arrow {
  color: rgb(167 149 255 / 0.95);
  filter: drop-shadow(0 0 5px rgb(167 149 255 / 0.4));
}

@keyframes trial-save-arrow-nudge {
  0%, 100% {
    opacity: 0.72;
    transform: translateX(0);
  }

  50% {
    opacity: 1;
    transform: translateX(3px);
  }
}

.trial-save-banner__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  max-width: 52%;
}

.trial-save-banner__btn.yandex-login-btn--compact {
  padding: 5px 7px;
  font-size: clamp(0.58rem, 2.4vw, 0.68rem);
  line-height: 1.1;
}

.trial-save-banner__btn .yandex-login-btn__label {
  white-space: nowrap;
}

.trial-save-banner__btn:active {
  transform: scale(0.96);
}

@keyframes trial-banner-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── СПРИНТ: арена дуэли вместо сетки цифр (s2, s3) ── */
.button-section {
  position: relative;
}

.trial-duel-arena {
  display: none;
  flex: 1;
  min-height: 0;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  padding: 4px 0;
  border-radius: 14px;
  background: linear-gradient(180deg, rgb(78 65 135 / 0.06), rgb(123 97 255 / 0.1));
  border: 1px solid rgb(123 97 255 / 0.22);
  box-sizing: border-box;
}

body.trial-duel-active {
  /* Гость = светлая тема UI; противник = тёмная (карточки летят в #trial-duel-flight вне .trial-duel-arena) */
  --duel-pick-bg: #eef1f7;
  --duel-pick-border: #7e6bb8;
  --duel-pick-border-deep: #6a5a9e;
  --duel-pick-text: #121826;
  --duel-pick-label: #525d73;
  --duel-opp-bg: linear-gradient(165deg, #1c1c1e 0%, #16213e 48%, #0f3460 100%);
  --duel-opp-border: #533483;
  --duel-opp-border-deep: #31255a;
  --duel-opp-label: #cfd8dc;
  --duel-opp-value: #f5f7fa;
}

body.trial-duel-active .trial-duel-arena {
  display: flex;
}

body.trial-duel-active #digit-grid {
  display: none;
}

.trial-duel-arena__slot {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 2px 8px;
}

.trial-duel-arena__vs {
  flex-shrink: 0;
  align-self: center;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.34, 1.5, 0.64, 1);
}

.trial-duel-arena--reveal .trial-duel-arena__vs {
  opacity: 1;
  transform: scale(1);
}

.trial-duel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: var(--trial-duel-card-size, 3.25rem);
  height: var(--trial-duel-card-size, 3.25rem);
  aspect-ratio: 1;
  flex-shrink: 0;
  padding: 0;
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  overflow: hidden;
  will-change: transform, opacity;
}

.trial-duel-card--pick {
  background: var(--duel-pick-bg);
  border: 3px solid var(--duel-pick-border);
  border-bottom: 5px solid var(--duel-pick-border-deep);
  box-shadow: 0 3px 12px rgb(18 24 38 / 0.14);
}

.trial-duel-card--pick .trial-duel-card__label {
  color: var(--duel-pick-label);
}

.trial-duel-card--pick .trial-duel-card__value {
  color: var(--duel-pick-text);
  text-shadow: none;
}

.trial-duel-card--answer {
  background: var(--duel-opp-bg);
  border: 3px solid var(--duel-opp-border);
  border-bottom: 5px solid var(--duel-opp-border-deep);
  box-shadow:
    0 6px 18px rgb(0 0 0 / 0.42),
    inset 0 1px 0 rgb(255 255 255 / 0.08);
}

.trial-duel-card--answer .trial-duel-card__label {
  color: var(--duel-opp-label);
}

.trial-duel-card--answer .trial-duel-card__value {
  color: var(--duel-opp-value);
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.35);
}

.trial-duel-card--flying {
  pointer-events: none;
  filter: drop-shadow(0 calc(2px + var(--duel-shadow-y, 2px)) calc(6px + var(--duel-shadow-blur, 4px)) rgb(0 0 0 / 0.18));
}

.trial-duel-flight {
  position: absolute;
  inset: 0;
  z-index: 44;
  pointer-events: none;
  overflow: visible;
}

.trial-duel-card__label {
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.trial-duel-card__value {
  font-size: var(--font-size-digit, 1.6rem);
  font-weight: 700;
  line-height: 1;
}

.trial-duel-shard {
  border-radius: 3px;
  box-sizing: border-box;
  pointer-events: none;
}

.trial-duel-shard--pick {
  background: var(--duel-pick-bg);
  border: 1px solid var(--duel-pick-border-deep);
}

.trial-duel-shard--answer {
  background: #16213e;
  background: var(--duel-opp-bg, #16213e);
  border: 1px solid var(--duel-opp-border);
}

.trial-duel-arena--result .trial-duel-card--win {
  border-color: #4ade80;
  box-shadow: 0 0 22px rgb(74 222 128 / 0.5);
  animation: trial-duel-card-pulse 0.42s ease;
}

.trial-duel-card--lose-shake {
  animation: trial-duel-card-shake-hard 0.42s ease-in-out;
  border-color: #f87171 !important;
}

.trial-duel-card--absorbing {
  z-index: 47;
  box-shadow:
    0 0 28px rgb(74 222 128 / 0.65),
    0 8px 20px rgb(0 0 0 / 0.35);
}

@keyframes trial-duel-card-shake-hard {
  0%, 100% { transform: translate(var(--duel-tx, 0), var(--duel-ty, 0)) rotate(0deg); }
  12% { transform: translate(calc(var(--duel-tx, 0px) - 9px), var(--duel-ty, 0)) rotate(-5deg); }
  24% { transform: translate(calc(var(--duel-tx, 0px) + 9px), var(--duel-ty, 0)) rotate(5deg); }
  36% { transform: translate(calc(var(--duel-tx, 0px) - 7px), calc(var(--duel-ty, 0px) + 2px)) rotate(-4deg); }
  48% { transform: translate(calc(var(--duel-tx, 0px) + 7px), calc(var(--duel-ty, 0px) - 2px)) rotate(4deg); }
  60% { transform: translate(calc(var(--duel-tx, 0px) - 4px), var(--duel-ty, 0)) rotate(-2deg); }
  72% { transform: translate(calc(var(--duel-tx, 0px) + 4px), var(--duel-ty, 0)) rotate(2deg); }
}

@keyframes trial-duel-card-pulse {
  0%, 100% { transform: translate(var(--duel-tx, 0), var(--duel-ty, 0)) scale(1); }
  50% { transform: translate(var(--duel-tx, 0), var(--duel-ty, 0)) scale(1.05); }
}

/* Дополнительная битва (Малыши L5+) */
.stones-wrapper--bonus {
  --stone-color: #0f766e;
}

html[data-ui-theme='dark'] .stones-wrapper--bonus {
  --stone-color: #5eead4;
}

.stones-wrapper--bonus .stone {
  filter: drop-shadow(0 1px 2px rgb(15 118 110 / 0.35));
}

body.trial-bonus-battle .trial-duel-arena {
  border-color: rgb(13 148 136 / 0.45);
  background: linear-gradient(180deg, rgb(13 148 136 / 0.08), rgb(123 97 255 / 0.08));
}

.trial-duel-card--bonus {
  outline: 2px solid rgb(13 148 136 / 0.55);
}

.trial-bonus-choices {
  position: absolute;
  z-index: 52;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  pointer-events: auto;
  padding: 0;
}

.trial-bonus-choices__timer {
  height: 3px;
  width: 100%;
  border-radius: 2px;
  background: #14b8a6;
  transform-origin: left center;
  animation: trial-bonus-timer-drain var(--bonus-time, 5s) linear forwards;
}

.trial-bonus-choices__btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--bonus-btn-gap, 4px);
}

.trial-bonus-choices__btn {
  width: var(--bonus-btn-size, 2rem);
  height: var(--bonus-btn-size, 2rem);
  margin: 0;
  padding: 0;
  border-radius: 8px;
  border: 2px solid #0f766e;
  border-bottom-width: 3px;
  background: #ecfdf5;
  color: #134e4a;
  font-size: calc(var(--bonus-btn-size, 2rem) * 0.45);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgb(15 118 110 / 0.2);
  transition: transform 0.12s ease, background 0.12s ease;
}

@keyframes trial-bonus-timer-drain {
  from { transform: scaleX(1); opacity: 1; }
  to { transform: scaleX(0); opacity: 0.65; }
}

.trial-bonus-choices__btn:hover {
  background: #ccfbf1;
  transform: scale(1.04);
}

.trial-bonus-choices__btn:active,
.trial-bonus-choices__btn--picked {
  background: #99f6e4;
  transform: scale(0.96);
}

html[data-ui-theme='dark'] .trial-bonus-choices__btn {
  background: #134e4a;
  color: #ecfdf5;
  border-color: #2dd4bf;
}

html[data-ui-theme='dark'] .trial-bonus-choices__btn:hover {
  background: #115e59;
}

@media (prefers-reduced-motion: reduce) {
  .trial-duel-card,
  .trial-duel-arena__vs,
  .trial-save-banner,
  .trial-save-banner__btn,
  .trial-save-banner__arrow,
  .trial-bonus-choices__timer {
    animation: none;
    transition: none;
  }
}

/* ── Пробник v2 · Owner preview variants ── */
.digit-btn--busy-ack {
  animation: trial-busy-ack 0.28s ease;
}

/* Malishi · target hint на ур. 0-2 (H) */
body.malishi-xp-active .digit-btn--captcha-target:not(.digit-btn--locked):not(.digit-btn--busy) {
  box-shadow: 0 0 0 2px rgb(134 239 172 / 0.45);
  transform: scale(1.04);
  animation: none;
}

body.malishi-xp-active .digit-btn--busy:not(.digit-btn--locked) {
  cursor: wait;
  filter: saturate(0.75);
}

body.malishi-preview .auth-island {
  opacity: 0.55;
  pointer-events: none;
}

@keyframes trial-busy-ack {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px) scale(0.97); }
  75% { transform: translateX(4px) scale(0.97); }
}

body.trial-hint-stones .stone {
  animation: trial-stone-hint 0.9s ease-in-out infinite;
}

body.trial-hint-stones .stone:nth-child(2) { animation-delay: 0.12s; }
body.trial-hint-stones .stone:nth-child(3) { animation-delay: 0.24s; }
body.trial-hint-stones .stone:nth-child(4) { animation-delay: 0.36s; }
body.trial-hint-stones .stone:nth-child(5) { animation-delay: 0.48s; }

@keyframes trial-stone-hint {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.digit-btn--hint-glow,
body.trial-hint-target .digit-btn--captcha-target {
  box-shadow: 0 0 0 3px rgb(134 239 172 / 0.55), 0 0 18px rgb(74 222 128 / 0.45);
  animation: trial-target-glow 1.1s ease-in-out infinite;
}

@keyframes trial-target-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}

body.trial-v2-forest[data-trial-forest='1'] #forest-card {
  border-color: rgb(134 239 172 / 0.35);
}
body.trial-v2-forest[data-trial-forest='2'] #forest-card {
  border-color: rgb(134 239 172 / 0.5);
}
body.trial-v2-forest[data-trial-forest='3'] #forest-card {
  border-color: rgb(125 211 252 / 0.55);
}
body.trial-v2-forest[data-trial-forest='4'] #forest-card {
  border-color: rgb(196 181 253 / 0.55);
}
body.trial-v2-forest[data-trial-forest='5'] #forest-card {
  border-color: rgb(253 224 71 / 0.55);
}

body.trial-v2-forest[data-trial-forest] .tree--tiny {
  font-size: calc(1em + (var(--trial-forest-boost, 0) * 0.08em));
}
body.trial-v2-forest[data-trial-forest='3'] { --trial-forest-boost: 1; }
body.trial-v2-forest[data-trial-forest='4'] { --trial-forest-boost: 2; }
body.trial-v2-forest[data-trial-forest='5'] { --trial-forest-boost: 3; }

body.trial-arena-beat #trial-duel-arena {
  filter: saturate(1.2) contrast(1.05);
}
body.trial-arena-beat .trial-duel-card {
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.35), 0 0 20px rgb(56 189 248 / 0.25);
}

body.trial-finale-celebrate .forest-section {
  animation: trial-finale-pulse 0.9s ease;
}
@keyframes trial-finale-pulse {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.2) saturate(1.15); }
  100% { filter: brightness(1); }
}

#overlay-guest .overlay__card--trial-soft {
  max-width: 300px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  background: rgb(15 20 40 / 0.88);
  border: 1px solid rgb(56 189 248 / 0.2);
  box-shadow: 0 12px 36px rgb(0 0 0 / 0.38);
  color: #f1f5f9;
}
#overlay-guest .overlay__card--trial-soft .overlay__title {
  color: #f8fafc;
  text-shadow: 0 1px 10px rgb(0 0 0 / 0.4);
}
#overlay-guest .overlay__card--trial-soft .overlay__text {
  color: #c4b5fd;
  font-weight: 600;
}
#overlay-guest .overlay__card--trial-soft .overlay__perks li {
  color: #e2e8f0;
}
#overlay-guest .overlay__card--trial-soft .overlay__note {
  color: rgb(226 232 240 / 0.65);
}

#overlay-guest .overlay__card--trial-hero {
  max-width: 320px;
  padding: 22px 18px 18px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgb(74 222 128 / 0.22), transparent 70%),
    rgb(12 18 36 / 0.92);
  border: 1px solid rgb(134 239 172 / 0.35);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.45);
  color: #f8fafc;
}
#overlay-guest .overlay__card--trial-hero .overlay__title {
  font-size: clamp(1.35rem, 5.5vw, 1.65rem);
  color: #86efac;
  text-shadow: 0 0 16px rgb(134 239 172 / 0.35);
}
#overlay-guest .overlay__card--trial-hero .overlay__text {
  color: #e2e8f0;
}
#overlay-guest .overlay__card--trial-hero .overlay__perks {
  display: none;
}

/* ── Пробник finale round-2: contrast, intro world, glow modes ── */
body.trial-forest-glow-off .forest-card--glow {
  border-color: var(--border-forest);
  box-shadow: none;
}
body.trial-forest-glow-off .forest-card--glow::after {
  display: none !important;
}

body.trial-forest-glow-rounded .forest-card {
  border-radius: 14px;
  transform: none !important;
}
body.trial-forest-glow-rounded .forest-card--glow {
  border-color: #86efac;
  box-shadow: none;
}
body.trial-forest-glow-rounded .forest-card--glow::after {
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 2px rgb(134 239 172 / 0.85),
    inset 0 0 18px 4px rgb(134 239 172 / 0.35);
  /* no outer shadow - avoids rectangular halo past radius */
  filter: none;
}

/* Intro-world immersion (challenge-b palette) */
body.guest-trial-active.trial-intro-world .phone-shell,
body.guest-trial-active.trial-intro-world #app,
body.trial-night-session .phone-shell,
body.trial-night-session #app {
  background: linear-gradient(165deg, #0f1428 0%, #1a1f4a 45%, #12152e 100%);
}
body.guest-trial-active.trial-intro-world .session-strip__text {
  color: #86efac;
  font-weight: 700;
  letter-spacing: 0.02em;
}
body.guest-trial-active.trial-intro-world .trial-progress-dots__dot {
  background: rgb(148 163 184 / 0.28);
  border: 2px solid rgb(148 163 184 / 0.4);
  box-shadow: none;
  filter: none;
  transform: none;
  animation: none;
}
body.guest-trial-active.trial-intro-world .trial-progress-dots__dot--done {
  background: #86efac;
  border-color: color-mix(in srgb, #86efac 70%, transparent);
  box-shadow: none;
  filter: none;
}
body.guest-trial-active.trial-intro-world .trial-progress-dots__dot--current {
  background: #facc15;
  border-color: #eab308;
  box-shadow: none;
  filter: none;
  transform: scale(1.12);
  animation: none;
}
body.guest-trial-active.trial-intro-world .stone-box {
  position: relative;
  background: rgb(15 20 40 / 0.72);
  border-color: rgb(56 189 248 / 0.28);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.28);
}
body.trial-night-session .stone-box {
  position: relative;
}
/*  на Полянке - только пока идёт озвучка */
body.guest-trial-active .stone-box.stone-box--voice-on::before,
body.trial-night-session .stone-box.stone-box--voice-on::before {
  content: '';
  position: absolute;
  right: 10px;
  top: 8px;
  font-size: 1rem;
  color: #86efac;
  opacity: 0.95;
  text-shadow: 0 0 10px rgb(134 239 172 / 0.45);
  pointer-events: none;
  z-index: 3;
  user-select: none;
  animation: trial-voice-note-in 0.25s ease;
}

/* цифра = карточка Арены (pick), без «Ты»; locked/busy - серые, но видимые */
body.guest-trial-active.trial-intro-world .digit-btn {
  visibility: visible !important;
  opacity: 1 !important;
  background: #eef1f7;
  border: 3px solid #7e6bb8;
  border-bottom: 5px solid #6a5a9e;
  color: #121826;
  text-shadow: none;
  filter: none;
  font-weight: 800;
  box-shadow: none;
  animation: none;
  transform: none;
}
body.guest-trial-active.trial-intro-world .digit-btn:not(.digit-btn--locked):not(.digit-btn--busy) {
  background: #eef1f7;
  border-color: #7e6bb8;
  border-bottom-color: #6a5a9e;
  color: #121826;
}
body.guest-trial-active.trial-intro-world .digit-btn--captcha-target:not(.digit-btn--busy) {
  border-color: #7e6bb8;
  border-bottom-color: #6a5a9e;
  box-shadow: 0 0 0 2px rgb(126 107 184 / 0.35);
  transform: scale(1.04);
  animation: none;
}
body.guest-trial-active.trial-intro-world .digit-btn--locked,
body.guest-trial-active.trial-intro-world .digit-btn--zero,
body.guest-trial-active.trial-intro-world .digit-btn.digit-btn--busy:disabled,
body.guest-trial-active.trial-v2-busy .digit-btn.digit-btn--busy:disabled {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: none !important;
  cursor: default;
  background: #3a3f4d;
  border: 3px solid #4b5160;
  border-bottom: 5px solid #2f3440;
  color: #9aa3b5;
  filter: none;
  box-shadow: none;
  animation: none;
  transform: none;
  text-shadow: none;
}
/* вне intro-world: 0 скрыт как раньше; locked в intro видны серыми */
body.guest-trial-active:not(.trial-intro-world) .digit-btn--locked,
body.guest-trial-active:not(.trial-intro-world) .digit-btn--zero {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body.guest-trial-active.trial-intro-world .trial-save-banner {
  background: rgb(15 20 40 / 0.82);
  border-color: rgb(56 189 248 / 0.28);
}
body.guest-trial-active.trial-intro-world .trial-save-banner__text {
  color: #e2e8f0;
}
body.guest-trial-active.trial-intro-world #forest-card {
  background: rgb(15 20 40 / 0.55);
  border-color: rgb(56 189 248 / 0.22);
  transform: none !important;
}

body.guest-trial-active.trial-intro-night .phone-shell,
body.guest-trial-active.trial-intro-night #app,
body.trial-night-session.trial-intro-night .phone-shell,
body.trial-night-session.trial-intro-night #app {
  background:
    radial-gradient(ellipse 80% 50% at 50% 12%, rgb(88 28 135 / 0.4), transparent 70%),
    linear-gradient(180deg, #0f1428 0%, #1a1f4a 55%, #0b1020 100%);
}

/* Night tap-to-start - без белой плашки */
body.guest-trial-active.trial-intro-world .trial-tap-start {
  background: rgb(8 12 28 / 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.guest-trial-active.trial-intro-world .trial-tap-start__btn {
  background: rgb(15 20 40 / 0.92);
  border: 1px solid rgb(134 239 172 / 0.45);
  color: #e2e8f0;
  box-shadow:
    0 0 0 1px rgb(56 189 248 / 0.12),
    0 12px 32px rgb(0 0 0 / 0.45),
    inset 0 0 24px rgb(134 239 172 / 0.08);
}
body.guest-trial-active.trial-intro-world .trial-tap-start__emoji {
  filter: drop-shadow(0 0 8px rgb(250 204 21 / 0.55));
}

/* user-select off on trial chrome */
body.guest-trial-active,
body.guest-trial-active *,
body.trial-night-session,
body.trial-night-session * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none;
}

/* Night stay under finish overlay */
body.trial-night-session #overlay-guest:not(.overlay--hidden) {
  background: rgb(8 12 28 / 0.72);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

/* Night: dim forest/stones only while finish overlay is open */
body.trial-night-session:has(#overlay-guest:not(.overlay--hidden)) .forest-section,
body.trial-night-session:has(#overlay-guest:not(.overlay--hidden)) .stones-section,
body.trial-night-session:has(#overlay-guest:not(.overlay--hidden)) .digit-pad,
body.trial-night-session:has(#overlay-guest:not(.overlay--hidden)) #digit-grid {
  filter: brightness(0.55);
}

/* Night play: яркие камни и деревья на тёмном фоне */
body.guest-trial-active.trial-intro-world,
body.guest-trial-active.trial-intro-night,
body.trial-night-session.guest-trial-active {
  --stone-color: #f8fafc;
  --tree-1: #86efac;
  --tree-2: #4ade80;
  --tree-3: #22c55e;
  --tree-4: #bbf7d0;
}
body.guest-trial-active.trial-intro-world .stone,
body.guest-trial-active.trial-intro-night .stone,
body.trial-night-session.guest-trial-active .stone {
  color: #f8fafc !important;
  filter: drop-shadow(0 0 5px rgb(255 255 255 / 0.7)) drop-shadow(0 0 12px rgb(134 239 172 / 0.35)) !important;
  opacity: 1 !important;
}
body.guest-trial-active.trial-intro-world .tree,
body.guest-trial-active.trial-intro-night .tree,
body.trial-night-session.guest-trial-active .tree {
  filter: drop-shadow(0 0 4px rgb(74 222 128 / 0.65));
  text-shadow: 0 0 10px rgb(134 239 172 / 0.55);
  opacity: 1 !important;
}
body.guest-trial-active.trial-intro-world .tree--tiny { color: #86efac !important; }
body.guest-trial-active.trial-intro-world .tree--medium { color: #4ade80 !important; }
body.guest-trial-active.trial-intro-world .tree--big { color: #22c55e !important; }
body.guest-trial-active.trial-intro-world .tree--ancient { color: #bbf7d0 !important; }

/* Readable finish card - force light text (was --text-subtle dark on dark) */
#overlay-guest .overlay__card--trial-soft,
#overlay-guest .overlay__card--trial-hero {
  color: #f8fafc;
}
#overlay-guest .overlay__card--trial-soft .overlay__title,
#overlay-guest .overlay__card--trial-hero .overlay__title {
  color: #86efac;
}
#overlay-guest .overlay__card--trial-soft .overlay__text,
#overlay-guest .overlay__card--trial-hero .overlay__text {
  color: #e2e8f0 !important;
}
#overlay-guest .overlay__card--trial-soft .overlay__perks li,
#overlay-guest .overlay__card--trial-hero .overlay__perks li {
  color: #f1f5f9 !important;
}
#overlay-guest .overlay__card--trial-soft .overlay__note,
#overlay-guest .overlay__card--trial-hero .overlay__note {
  color: rgb(226 232 240 / 0.78) !important;
}
#overlay-guest .overlay__card--trial-soft .overlay__btn:not(.yandex-login-btn),
#overlay-guest .overlay__card--trial-hero .overlay__btn:not(.yandex-login-btn) {
  background: rgb(30 41 59 / 0.9);
  color: #f8fafc !important;
  border: 1px solid rgb(148 163 184 / 0.35);
}
#overlay-guest .overlay__card--trial-hero .overlay__perks {
  display: block;
}
#overlay-guest .overlay__card--trial-hero .overlay__perks li {
  font-size: 0.8rem;
}

@keyframes trial-voice-note-in {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 0.95; transform: scale(1); }
}
