/**
 * Стили концертного веб-приложения «МОЛОДОСТЬ ВНУТРИ» (V2 FINAL)
 * Видеофоны, рамки в режиме mix-blend-mode: screen, журнальные сторис и кинематографичные переходы.
 */

/* =========================================================================
   1. ЛОКАЛЬНЫЕ КИРИЛЛИЧЕСКИЕ И ЛАТИНСКИЕ ШРИФТЫ (.WOFF2)
   ========================================================================= */
@font-face {
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('./fonts/oswald-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('./fonts/oswald-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('./fonts/cormorant-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('./fonts/cormorant-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 400 600;
    font-display: swap;
    src: url('./fonts/cormorant-italic-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('./fonts/jbmono-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('./fonts/jbmono-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+2000-206F;
}

/* =========================================================================
   2. БАЗОВЫЙ СБРОС, КАРКАС И КИНЕМАТОГРАФИЧНЫЕ ПЕРЕХОДЫ СЦЕН
   ========================================================================= */
:root {
    --bg-deep: #040507;
    --ink-ivory: #f5f3ee;
    --ink-white: #ffffff;
    --ink-muted: rgba(232, 238, 246, 0.64);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background-color: var(--bg-deep);
    color: var(--ink-white);
    font-family: 'Oswald', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    user-select: none;
    -webkit-user-select: none;
}

input, textarea {
    user-select: text;
    -webkit-user-select: text;
}

#ios-haptic {
    position: fixed;
    top: -120px;
    left: -120px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.fx-layer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.fx-grain {
    z-index: 60;
    mix-blend-mode: screen;
    opacity: 0.45;
}

/* Единый верхний полноэкранный слой-вуаль бесшовных переходов */
#transition-veil,
.transition-veil {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    z-index: 999;
    background: #06090f;
    will-change: opacity;
}

/* Главный контейнер приложения (9:16 на десктопе, 100% на мобильных + container-type: inline-size для cqw) */
.app-root {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0 auto;
    overflow: hidden;
    container-type: inline-size;
    background: var(--bg-deep);
    z-index: 10;
}

@media (max-width: 540px) {
    .app-root {
        width: 100%;
        height: 100vh;
        height: 100dvh;
    }
}

@media (min-width: 541px) {
    body {
        background: radial-gradient(circle at 50% 45%, #0c1018 0%, #030305 100%);
    }
    .app-root {
        width: min(100vw, calc(100dvh * 9 / 16));
        max-width: 460px;
        height: 100vh;
        height: 100dvh;
        margin: 0 auto;
        position: relative;
        overflow: hidden;
        container-type: inline-size;
        box-shadow: 0 0 80px rgba(0, 0, 0, 0.92), 0 0 0 1px rgba(255, 255, 255, 0.08);
    }
}

/* Глобальные сцены: строго position: absolute; inset: 0; БЕЗ display:none, БЕЗ filter/blur/transform! */
.screen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.screen.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Фоновые видео и экранные рамки (bgmainframe / frame2 в mix-blend-mode: screen) */
.bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    z-index: 0;
}

.thaw-video-sat {
    filter: saturate(10%);
    transition: filter 0.35s linear;
}

.overlay-frame-screen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 3;
}

/* Подфазы сцен: строго position: absolute; inset: 0; БЕЗ display:none, БЕЗ filter/transform, z-index: auto */
.subphase {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.subphase.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.is-hidden {
    display: none !important;
}

/* =========================================================================
   3. ЭКРАН 1: IDLE — СТРОГАЯ ЦЕНТРОВКА И РАМКА FRAME В РЕЖИМЕ SCREEN
   ВАЖНО: Никаких isolation / filter / backdrop-filter / opacity < 1 на предках!
   ========================================================================= */
.idle-stage {
    position: relative;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bottom) + 24px);
    background: transparent;
}

.idle-logo-top {
    position: absolute;
    top: calc(var(--safe-top) + 30px);
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
}

.brand-logo-main {
    width: min(45cqw, 180px);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.24));
}

/* Центральный блок входа и приветствия */
.idle-center-card {
    width: 100%;
    max-width: 318px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: transparent;
    margin-top: 28px;
}
.idle-center-card.is-inactive {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.idle-heading {
    position: relative;
    z-index: 5;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(25px, 7.5cqw, 34px);
    line-height: 1.08;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink-ivory);
    text-align: center;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.85);
}

/* Обёртка инпута без изоляции контекста наложения, чтобы frame.* растворил черный фон в screen */
.ice-input-box {
    position: relative;
    width: 100%;
    height: 53px;
    background: transparent;
}

.input-ice-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    mix-blend-mode: screen;
    /* Слегка поджимаем точку черного самого <img> (до смешивания screen!), чтобы #010101..#040404 стали #000000 */
    filter: brightness(0.95) contrast(1.12);
    pointer-events: none;
    z-index: 4;
}

.ice-input-field {
    position: relative;
    z-index: 6;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 0 24px;
    text-align: center;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
}

.ice-input-field::placeholder {
    color: rgba(226, 234, 245, 0.5);
}

/* Компактная ледяная кнопка «НАЧАТЬ» */
.ice-start-btn {
    position: relative;
    z-index: 6;
    min-width: 196px;
    min-height: 48px;
    padding: 11px 32px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow:
        0 0 22px rgba(215, 234, 255, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.14s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.ice-start-btn:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.24);
}

/* Стадия 1Б: Приветствие по центру */
#idle-waiting {
    position: relative;
    z-index: 6;
    text-align: center;
    gap: 11px;
}

.idle-greeting {
    word-break: break-word;
}

.star-serial-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    letter-spacing: 0.14em;
    color: rgba(235, 243, 255, 0.9);
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid rgba(225, 236, 252, 0.32);
    background: rgba(8, 11, 18, 0.48);
}

.pulse-wait-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.09em;
    color: var(--ink-muted);
    text-transform: uppercase;
    animation: softPulse 2.5s infinite ease-in-out;
    margin-top: 4px;
}

@keyframes softPulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 0.95; }
}

.tiny-link-btn {
    margin-top: 6px;
    background: none;
    border: none;
    color: rgba(210, 220, 236, 0.48);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 5px 10px;
}
.tiny-link-btn:hover {
    color: rgba(245, 248, 255, 0.85);
}

/* =========================================================================
   4. ЭКРАН 2: STAR — «ПУТЕВОДНАЯ»
   ========================================================================= */
#star-phase-intro {
    z-index: 6;
    align-items: center;
    justify-content: space-between;
    padding: calc(var(--safe-top) + 20px) 24px calc(var(--safe-bottom) + 24px);
    box-sizing: border-box;
}

.star-intro-header {
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.star-intro-logo {
    width: min(38cqw, 152px);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.24));
}

.stencil-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(30px, 9.6cqw, 44px);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    background: linear-gradient(180deg, #f1f5fb 0%, #b4becd 52%, #e2e8f2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.frozen-glass-card {
    position: relative;
    width: 100%;
    max-width: 350px;
    padding: 24px 20px 18px;
    border-radius: 18px;
    background: linear-gradient(165deg, rgba(22, 27, 36, 0.78) 0%, rgba(8, 10, 15, 0.88) 100%);
    border: 1px solid rgba(220, 232, 248, 0.44);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.72), inset 0 0 24px rgba(205, 225, 250, 0.09);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.frozen-card-text {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: clamp(19px, 5.4cqw, 24px);
    line-height: 1.24;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--ink-ivory);
    text-transform: uppercase;
}

.swipe-hand-illustration {
    animation: handSwipeBob 1.9s infinite ease-in-out;
}
@keyframes handSwipeBob {
    0%, 100% { transform: translateY(4px); }
    50% { transform: translateY(-6px); }
}

.intro-bar-wrap { width: 100%; }
.intro-bar-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    overflow: hidden;
}
.intro-bar-fill {
    height: 100%;
    width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(200, 218, 240, 0.72), #ffffff);
    transition: width 0.15s linear;
}
.intro-bar-caption {
    margin-top: 6px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    color: rgba(215, 224, 238, 0.68);
}

.circle-countdown {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.circle-countdown svg { transform: rotate(-90deg); }
.ring-bg {
    fill: rgba(10, 13, 20, 0.65);
    stroke: rgba(255, 255, 255, 0.16);
    stroke-width: 4;
}
.ring-fg {
    fill: none;
    stroke: #f8fafc;
    stroke-width: 4.2;
    stroke-linecap: round;
    stroke-dasharray: 232.48;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.15s linear;
}
.circle-countdown-text {
    position: absolute;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: var(--ink-white);
}

/* Фаза 2.2: Интерактивный канвас звезды и графический логотип */
.interactive-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
    z-index: 2;
}

.star-preswipe-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: calc(var(--safe-top) + 32px) 24px calc(var(--safe-bottom) + 16%);
    box-sizing: border-box;
    transition: opacity 0.38s ease;
}

.preswipe-top-logo {
    width: min(44cqw, 174px);
    height: auto;
    object-fit: contain;
    opacity: 0.92;
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.28));
}

.preswipe-cta {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(26px, 8.2cqw, 36px);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f1efe8;
    text-align: center;
    text-shadow: 0 4px 22px rgba(0, 0, 0, 0.95);
    animation: ctaPulse 1.9s infinite ease-in-out;
}

@keyframes ctaPulse {
    0%, 100% { transform: translateY(0); opacity: 0.9; }
    50% { transform: translateY(-4px); opacity: 1; }
}

.star-burning-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: calc(var(--safe-top) + 32px) 24px calc(var(--safe-bottom) + 56px);
    box-sizing: border-box;
}

/* Полный вертикальный логотип во время горения звезды */
.burning-top-logo {
    width: min(44cqw, 174px);
    height: auto;
    object-fit: contain;
    opacity: 0.94;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.65)) drop-shadow(0 2px 14px rgba(0, 0, 0, 0.45));
    transition: filter 0.35s ease, opacity 0.35s ease;
}

.burning-stage-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #0b0d12;
    background: rgba(255, 255, 255, 0.88);
    padding: 9px 18px;
    border-radius: 999px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.88);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.burning-stage-hint.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================================
   5. ЕДИНАЯ ЖУРНАЛЬНАЯ ВЕРСТКА СТОРИС (Фаза 2.3, Фаза 3.2, Слайды 2 и 4)
   ========================================================================= */
.story-edge-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    background: linear-gradient(
        180deg,
        rgba(4, 6, 10, 0.54) 0%,
        rgba(4, 6, 10, 0.06) 15%,
        rgba(4, 6, 10, 0) 42%,
        rgba(4, 6, 10, 0.48) 57%,
        rgba(4, 6, 10, 0.76) 78%,
        rgba(4, 6, 10, 0.88) 100%
    );
}

.story-edge-vignette-warm {
    background: linear-gradient(
        180deg,
        rgba(6, 12, 12, 0.46) 0%,
        rgba(6, 12, 12, 0.03) 15%,
        rgba(6, 12, 12, 0) 42%,
        rgba(8, 15, 15, 0.50) 57%,
        rgba(7, 13, 14, 0.76) 78%,
        rgba(7, 13, 14, 0.88) 100%
    );
}

.story-editorial-wrap {
    position: relative;
    z-index: 14;
    width: 100%;
    max-width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding-top: max(22px, calc(12px + env(safe-area-inset-top)));
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: max(26px, calc(18px + env(safe-area-inset-bottom)));
}

.story-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.story-serial {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 1.25;
    letter-spacing: 0.04em;
    color: rgba(244, 247, 252, 0.92);
    text-transform: uppercase;
    min-width: 0;
    flex: 1 1 auto;
}

.story-logo-h {
    height: 24px;
    max-width: 44%;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

/* Верхнее открытое окно — выводит текстовый блок на уровень 50%–54% высоты экрана сверху */
.story-open-air {
    flex: 1 1 24px;
    min-height: 16px;
}

/* Изолированный типографический блок в зоне золотого сечения / нижней оптической трети */
.story-quote-block {
    width: 100%;
    text-align: left;
    margin: 0;
    flex-shrink: 0;
}

/* Щедрое чистое пространство между строкой «Береги себя...» и нижней кнопкой шеринга */
.story-bottom-air {
    flex: 0.36 1 clamp(56px, 11dvh, 105px);
    min-height: clamp(56px, 11dvh, 105px);
}

.story-overline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(235, 240, 246, 0.76);
    margin-bottom: 9px;
}

.story-serif-quote {
    width: 100%;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    font-size: clamp(20px, 5.5cqw, 26px);
    line-height: 1.22;
    letter-spacing: -0.005em;
    color: #ffffff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.52);
}

.story-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
    margin: 14px 0 11px;
}

.story-footer-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.story-footer-left {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 11.5px;
    color: rgba(246, 248, 250, 0.9);
    white-space: nowrap;
    flex-shrink: 0;
}

.story-footer-stamp {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.03em;
    color: rgba(235, 240, 246, 0.84);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    min-width: 0;
}

.story-share-actions {
    width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

/* Изящная компактная овальная кнопка-капсула по центру (не растянутая на 100%) */
.oval-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 225px;
    max-width: 76%;
    min-height: 46px;
    padding: 13px 30px;
    margin: 0 auto;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
    transition: transform 0.12s ease, background 0.18s ease, border-color 0.18s ease;
}

.oval-share-btn:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.22);
}

.subtle-dl-link {
    background: none;
    border: none;
    color: rgba(226, 232, 242, 0.54);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.04em;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 2px 8px;
}
.subtle-dl-link:hover {
    color: rgba(255, 255, 255, 0.88);
}

/* =========================================================================
   6. ЭКРАН 3: THAW — ИГРОВОЙ HUD ОТОГРЕВАНИЯ 4 СЛОЕВ ЛЬДА
   ========================================================================= */
.thaw-hud-top {
    position: relative;
    z-index: 16;
    width: 100%;
    box-sizing: border-box;
    padding: calc(var(--safe-top) + 16px) 24px 0;
    pointer-events: none;
}

.thaw-meter-glass {
    background: rgba(8, 12, 16, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 13px;
    padding: 9px 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.thaw-meter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.thaw-meter-stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
}

.thaw-meter-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: rgba(248, 250, 252, 0.92);
}

.thaw-meter-pct {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 19px;
    line-height: 1;
    color: #fde68a;
}

.thaw-hud-logo-h {
    height: 20px;
    max-width: 42%;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.thaw-meter-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
}

.thaw-meter-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 52%, #10b981 100%);
    transition: width 0.25s linear;
}

.thaw-bottom-hint {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: calc(var(--safe-bottom) + 32px);
    z-index: 16;
    pointer-events: none;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    letter-spacing: 0.12em;
    color: rgba(248, 250, 252, 0.92);
    background: rgba(8, 11, 16, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 10px 14px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: softPulse 2.2s infinite ease-in-out;
}

/* =========================================================================
   7. ЭКРАН 4: WRAPPED — 5 СЛАЙДОВ ИТОГОВ КОНЦЕРТА
   ========================================================================= */
#screen-wrapped > .bg-video,
#screen-wrapped > .overlay-frame-screen,
#screen-wrapped > .story-edge-vignette {
    z-index: auto;
}

.w-bg-layer, .w-frame-layer {
    opacity: 0;
    transition: opacity 0.25s ease;
}
.w-bg-layer.is-visible, .w-frame-layer.is-visible {
    opacity: 1;
}

.wrapped-shell {
    position: relative;
    z-index: auto;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: max(18px, calc(10px + env(safe-area-inset-top))) 0 max(16px, calc(10px + env(safe-area-inset-bottom)));
}

.wrapped-top-chrome {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 24px;
    flex-shrink: 0;
}

.wrapped-bars {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.wrapped-bar {
    height: 3.5px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.24);
    cursor: pointer;
    padding: 0;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}
.wrapped-bar.is-active {
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.72);
}
.wrapped-bar.is-done {
    background: rgba(255, 255, 255, 0.64);
}

.wrapped-slides-stage {
    position: relative;
    z-index: auto;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

.wrapped-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 10px 24px calc(10px + 6dvh);
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(14px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    overflow: hidden;
}
.wrapped-slide.wrapped-slide-story {
    padding: 12px 24px 12px;
}
.wrapped-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0s;
}
.wrapped-slide.is-prev {
    transform: translateX(-14px);
}

.w-story-inner {
    width: 100%;
    max-width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.wrapped-slide-story .story-bottom-air {
    flex: 0.34 1 clamp(48px, 9.5dvh, 94px);
    min-height: clamp(46px, 8.8dvh, 88px);
}

@media (max-height: 620px) {
    .story-bottom-air,
    .wrapped-slide-story .story-bottom-air {
        min-height: 28px;
        flex-basis: 32px;
    }
    .wrapped-slide[data-slide-panel="4"] {
        padding-bottom: calc(8px + 3dvh);
    }
}

.w-center-slide {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.w-slide1-logo {
    width: min(40cqw, 150px);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.22));
}

.w-kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    color: rgba(235, 242, 252, 0.78);
    text-transform: uppercase;
}

.w-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(22px, 6.4cqw, 30px);
    line-height: 1.1;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    color: var(--ink-ivory);
}
.w-title-sm {
    font-size: clamp(19px, 5.4cqw, 25px);
}

/* Слайд 1: Атмосферный контейнер-заглушка под статистику */
.w-stats-placeholder-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 2px;
    padding: 16px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(10, 14, 22, 0.56);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.w-placeholder-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.13em;
    color: #fde68a;
}

.w-placeholder-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

.w-placeholder-cell {
    min-width: 0;
    padding: 10px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.w-ph-val {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    white-space: nowrap;
    font-size: clamp(19px, 5.4cqw, 26px);
    line-height: 1.1;
    color: #ffffff;
}

.w-ph-lbl {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    line-height: 1.2;
    color: var(--ink-muted);
}

.w-placeholder-serial {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: rgba(238, 243, 252, 0.88);
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Слайд 3: Купон на мерч */
.merch-coupon {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 18px 14px;
    border-radius: 16px;
    border: 1.5px dashed rgba(253, 230, 138, 0.68);
    background: rgba(14, 17, 25, 0.68);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.12s ease;
}
.merch-coupon:active { transform: scale(0.98); }

.coupon-discount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    letter-spacing: 0.11em;
    color: #fde68a;
}

.coupon-code {
    max-width: 100%;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 6.8cqw, 32px);
    line-height: 1.15;
    letter-spacing: 0.06em;
    word-break: break-all;
    color: #ffffff;
}

.coupon-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--ink-muted);
}

.w-winter-note {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13.5px;
    line-height: 1.4;
    color: rgba(235, 240, 248, 0.84);
}

.w-tickets-cta {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.72);
}

/* Слайд 5: Обращение группы, кастомная роспись (normal/screen/invert-screen) или SVG-заглушка, и форма отзыва */
.w-slide5-inner {
    gap: 8px;
}

.w-band-letter {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(16.5px, 4.6cqw, 20px);
    line-height: 1.22;
    color: rgba(246, 247, 250, 0.92);
}

.signature-box {
    width: 100%;
    min-height: 46px;
    max-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.signature-img {
    max-width: min(72cqw, 240px);
    max-height: 58px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.signature-img.blend-normal {
    mix-blend-mode: normal;
    filter: drop-shadow(0 2px 12px rgba(255, 255, 255, 0.25));
}

.signature-img.blend-screen {
    mix-blend-mode: screen;
    filter: contrast(1.12) brightness(1.04);
}

.signature-img.blend-invert-screen {
    filter: invert(1) contrast(1.18) brightness(1.05);
    mix-blend-mode: screen;
}

.signature-svg {
    width: min(64cqw, 204px);
    height: 46px;
    overflow: visible;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.28));
}

.sig-stroke {
    stroke-dasharray: 620;
    stroke-dashoffset: 620;
}
.wrapped-slide.is-active .sig-stroke-1 {
    animation: drawSignature 1.5s cubic-bezier(0.25, 1, 0.5, 1) 0.15s forwards;
}
.wrapped-slide.is-active .sig-stroke-2 {
    animation: drawSignature 1.1s ease-out 0.95s forwards;
}

@keyframes drawSignature {
    to { stroke-dashoffset: 0; }
}

.review-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.review-textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(10, 14, 22, 0.72);
    border: 1px solid rgba(225, 235, 250, 0.34);
    border-radius: 13px;
    padding: 9px 13px;
    color: var(--ink-white);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.35;
    resize: none;
    outline: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.review-textarea:focus {
    border-color: rgba(255, 255, 255, 0.72);
}

.review-form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--ink-muted);
}

.review-status {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-counter {
    white-space: nowrap;
    flex-shrink: 0;
}

.review-submit-btn {
    min-height: 44px;
    padding: 10px 18px;
}

.review-sent-box {
    width: 100%;
    box-sizing: border-box;
    background: rgba(16, 30, 26, 0.72);
    border: 1px solid rgba(52, 211, 153, 0.45);
    border-radius: 14px;
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.review-sent-check {
    font-family: 'Oswald', sans-serif;
    font-size: 17px;
    letter-spacing: 0.04em;
    color: #a7f3d0;
}

.review-sent-quote {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 17px;
    line-height: 1.22;
    max-height: 64px;
    overflow: hidden;
    color: #f3f4f6;
    word-break: break-word;
}

.wrapped-nav {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 24px 0;
    flex-shrink: 0;
}

.w-nav-btn {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: var(--ink-white);
    padding: 7px 14px;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}
.w-nav-btn:disabled {
    opacity: 0.28;
    pointer-events: none;
}
.w-nav-btn-accent {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.48);
}

.w-step-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: var(--ink-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Всплывающий тост */
.app-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--safe-bottom) + 88px);
    transform: translate(-50%, 12px);
    background: rgba(12, 16, 24, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.34);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    white-space: nowrap;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 90;
}
.app-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
