/* ==========================================================================
   1. ПРЕМИАЛЬНЫЕ ПЕРЕМЕННЫЕ, ШРИФТЫ И СИСТЕМНЫЕ СВОЙСТВА
   ========================================================================== */
:root {
    --bg-main: #060001;
    --bg-card: #0e0b1c;
    --shield-bg: rgba(10, 8, 19, 0.96);
    --font-poetry: 'Times New Roman', Times, serif;
    --font-ui: Arial, Helvetica, sans-serif;
    --color-silver: #dfb76c;
    --color-muted: #caa460;
    --color-gold: #dfb76c;
    --poem-fs: 16px;
}

html.is-viewer-mode #appHeader,
html.is-viewer-mode #tabsContainer,
html.is-viewer-mode #poemNavigationBar,
html.is-viewer-mode #editorInterface,
html.is-viewer-mode #appFooter {
    display: none !important;
}

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

body {
    background-color: var(--bg-main);
    font-family: var(--font-ui);
    color: var(--color-silver);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 1.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.app-container {
    width: 100%;
    max-width: 440px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 14px 16px env(safe-area-inset-bottom) 16px;
    position: relative;
    z-index: 5;
    transition: background-color 1.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================================
   2. БРЕНД-ШАПКА КОНСТРУКТОРА И НАВИГАЦИОННЫЕ ТАБЫ
   ========================================================================== */
.app-header {
    text-align: center;
    margin-bottom: 10px; 
    width: 100%;
}

.brand-title {
    font-family: var(--font-poetry) !important; 
    font-style: italic !important; 
    font-size: 1.9rem; 
    font-weight: 530; 
    letter-spacing: 2px; 
    color: #ffffff !important;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.brand-subtitle {
    font-family: var(--font-poetry) !important; 
    font-style: italic !important;
    font-size: 0.8rem;
    font-weight: 530;
    letter-spacing: 1px;
    color: var(--color-muted);
    text-transform: uppercase;
}

.tabs-container {
    width: 100%;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0 0 0;
    margin-bottom: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

    .tabs-container::-webkit-scrollbar {
        display: none;
    }

.tab-btn {
    flex: 0 0 auto;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-muted);
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer !important;
    transition: all 0.3s ease;
}

    .tab-btn.active {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #ffffff !important; 
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

/* ==========================================================================
   3. КИНЕМАТОГРАФИЧЕСКИЙ ХОЛСТ И ГЕОМЕТРИЯ СЦЕНЫ
   ========================================================================== */
.book-viewport {
    width: 100%;
    margin-bottom: 12px; 
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
    transition: background-color 1.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

    .book-viewport.book-opened-viewport {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 9999 !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        overflow: hidden !important;
        transition: background-color 1.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
    }

.book-perspective-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: transform 2.6s cubic-bezier(0.25, 1, 0.2, 1) !important;
    will-change: transform;
}

.book-viewport.book-opened-viewport .book-perspective-wrapper {
    transform: scale(0.90) !important;
}

.card-canvas-main {
    width: 64%;
    height: 100%;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    overflow: visible !important;
    background-color: var(--bg-card);
    transition: transform 2.6s cubic-bezier(0.25, 1, 0.2, 1), width 2.6s cubic-bezier(0.25, 1, 0.2, 1) !important;
    will-change: transform, width;
}

.book-opened .card-canvas-main {
    width: 96% !important;
    transform: scale3d(1.0, 1.0, 1.0) !important;
}

/* ==========================================================================
   4. ЛОГИКА РАЗДВИГАЮЩИХСЯ СТВОРОК И ЦЕНТРАЛЬНЫЙ ТЕКСТ ОБЛОЖКИ
   ========================================================================== */
.card-cover-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 5;
    overflow: visible !important; 
    perspective: 1400px;
}

.cover-door {
    position: absolute;
    top: -1px;
    width: 50.5%;
    height: calc(100% + 2px);
    background-size: auto 100% !important;
    background-repeat: no-repeat !important;
    transition: transform 0s ease-in-out, filter 0s ease-in-out !important;
    will-change: transform, filter;
    z-index: 2;
    filter: none;
}

.door-left {
    left: -1px;
    background-position: 12.5% center !important;
    transform-origin: left center;
    box-shadow: inset 8px 12px 18px rgba(0, 0, 0, 0.22), inset -5px -12px 16px rgba(0, 0, 0, 0.18);
}

.door-right {
    right: -1px;
    background-position: 87.5% center !important;
    transform-origin: right center;
    box-shadow: inset -8px 12px 18px rgba(0, 0, 0, 0.22), inset 5px -12px 16px rgba(0, 0, 0, 0.18);
}

.book-opened .door-left {
    transform: rotateY(-115deg) translate3d(-6%, 0, 15px) !important;
    filter: brightness(0.35) contrast(0.95) blur(0.5px) !important;
    background-size: auto 64% !important;
    background-position: 16% 53% !important;
}

.book-opened .door-right {
    transform: rotateY(115deg) translate3d(6%, 0, 15px) !important;
    filter: brightness(0.35) contrast(0.95) blur(0.5px) !important;
    background-size: auto 64% !important;
    background-position: 84% 53% !important;
}

.cover-front-side {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    pointer-events: none;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.book-opened .cover-front-side {
    opacity: 0 !important;
    visibility: hidden !important;
}

.cover-shield {
    padding: 14px 28px;
    background: var(--shield-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.8s cubic-bezier(0.25, 1, 0.5, 1) !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    opacity: 0.82 !important;
}

.cover-hint {
    font-family: var(--font-poetry) !important;
    font-style: italic !important;
    font-size: 0.82rem !important;
    font-weight: 530; 
    line-height: 1.4 !important;
    text-align: center;
    width: 100%;
    letter-spacing: 0.5px;
    animation: pulseHint 2.5s infinite ease-in-out !important;
}

/* ==========================================================================
   5. ВНУТРЕННЯЯ СТРАНИЦА КОНТЕНТА (ФИНАЛЬНАЯ ЛЮКС-ГЕОМЕТРИЯ)
   ========================================================================== */
.card-inside-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; 
    z-index: 1;
    background-color: var(--shield-bg) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 44px 40px 24px 40px !important;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5) !important;
    transition: background-color 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.book-opened .card-inside-page {
    z-index: 10 !important;
}

.poem-animated-container {
    width: 100%;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    position: relative !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.book-opened .poem-animated-container {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease 1.2s, visibility 0s linear 1.2s;
}

.poem-scroll-rail {
    width: 100% !important;
    height: max-content !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: translate3d(0, 0, 0) !important;
    will-change: transform;
}

.poem-line {
    font-family: var(--font-poetry) !important;
    font-style: italic !important;
    font-weight: 530;
    line-height: 1.6 !important;
    color: inherit !important;
    text-align: center;
    width: 100% !important;
    opacity: 0 !important;
    visibility: hidden !important;
    white-space: normal !important;
    display: block !important;
    transform: translateY(14px);
    filter: blur(5px);
    transition: opacity 1.2s ease-in-out, transform 1.2s cubic-bezier(0.25, 1, 0.3, 1), filter 1.2s ease-in-out, color 0.3s ease !important;
    will-change: opacity, transform, filter;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

    .poem-line.fade-in-up {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        filter: blur(0) !important;
    }

    .poem-line.rec-line {
        font-size: calc(var(--poem-fs) + 2px) !important;
        font-weight: 530;
        margin-bottom: 20px !important;
    }

    .poem-line.text-line {
        font-size: var(--poem-fs, 16px);
    }

    .poem-line.snd-line {
        font-size: calc(var(--poem-fs) - 2px) !important;
        font-weight: 530;
        margin-top: 20px !important;
        margin-bottom: 12px !important;
    }

    .poem-line.sig-line {
        font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif !important;
        font-style: normal !important;
        font-size: calc(var(--poem-fs, 17px) * 0.54) !important;
        font-weight: 400 !important;
        letter-spacing: 5px !important;
        word-spacing: -1px !important;
        text-transform: uppercase;
    }

        .poem-line.sig-line.fade-in-up {
            opacity: 0.22 !important;
        }

    .poem-line.line-melted {
        opacity: 0.12 !important;
        filter: blur(2.5px) !important;
        transform: scale(0.96) !important;
        transition: all 1.8s ease-in-out !important;
    }

.style-signature-link {
    cursor: pointer !important;
    pointer-events: auto !important; 
    user-select: none !important;
    -webkit-user-select: none !important;
    margin-top: 36px !important;
}

    .style-signature-link:active {
        transform: scale(0.98) !important;
        opacity: 0.5 !important;
        transition: transform 0.1s ease, opacity 0.1s ease !important;
    }

/* ==========================================================================
   6. ИНТЕРФЕЙС УПРАВЛЕНИЯ, КНОПКИ И ГАЛЕРЕИ (ОПТИМИЗИРОВАНО)
   ========================================================================== */

.poem-navigation-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px; 
    padding: 0 8px;
}

.nav-arrow-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    width: 44px;
    height: 36px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

    .nav-arrow-btn:disabled {
        opacity: 0.2 !important;
        cursor: not-allowed;
    }

.pages-label {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--color-muted);
    text-align: center; 
    flex-grow: 1; 
    padding: 0 8px; 
}

.editor-interface {
    width: 100%;
    max-width: 100%; 
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .editor-interface.viewer-hidden {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

.editor-card-block {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(223, 183, 108, 0.15); 
    border-radius: 12px;
    padding: 12px;
}

.editor-block-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-gold); 
    margin-bottom: 12px;
}

.range-control-group {
    width: 100%;
    margin-bottom: 10px;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    outline: none;
}

    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--color-gold); 
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0,0,0,0.6);
        border: 1px solid #000000; 
    }

.alignment-toggle-group, .text-control-inputs {
    display: flex;
    gap: 6px;
    width: 100%;
}

.align-btn {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--color-muted);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .align-btn.active {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.15);
        color: #ffffff !important; 
    }

.input-field-lux {
    width: 50%;
    padding: 10px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: #ffffff !important; 
    font-family: var(--font-ui);
    font-size: 0.78rem;
    outline: none;
    transition: all 0.3s ease;
}

    .input-field-lux::placeholder {
        color: rgba(223, 183, 108, 0.45) !important;
        opacity: 1 !important; 
    }

    .input-field-lux::-webkit-input-placeholder {
        color: rgba(223, 183, 108, 0.45) !important;
    }

    .input-field-lux:focus {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(223, 183, 108, 0.4) !important; 
        box-shadow: 0 0 8px rgba(223, 183, 108, 0.1);
    }

.gallery-scroll-rail {
    width: 100%;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

    .gallery-scroll-rail::-webkit-scrollbar {
        display: none;
    }

.thumb {
    flex: 0 0 auto;
    width: 54px;
    aspect-ratio: 3 / 4;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

    .thumb.active {
        border-color: #ffffff;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    }

.color-thumb {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    transform: scale(1); 
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.4s ease;
}

    .color-thumb.active {
        border-color: #ffffff !important;
        transform: scale(1.22) !important; 
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2);
        z-index: 10; 
    }

.audio-btn {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--color-muted);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .audio-btn.active {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.15);
        color: #ffffff;
    }

.editor-row {
    width: 100%;
    max-width: 100%;
    display: flex;
    gap: 10px;
    box-sizing: border-box;
}

    .editor-row .editor-card-block {
        width: calc(50% - 5px) !important;
        max-width: calc(50% - 5px) !important;
        flex: 0 0 calc(50% - 5px) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important; 
        box-sizing: border-box !important;
    }

.font-size-hint {
    display: block;
    font-size: 0.72rem !important;
    font-family: var(--font-poetry) !important;
    font-style: italic !important;
    color: rgba(223, 183, 108, 0.45) !important;
    margin-top: 8px;
    text-align: left;
    line-height: 1.1 !important;
}

.editor-card-block > .font-size-hint:last-child {
    margin-top: 5px;
    margin-bottom: -4px;
}

.range-scale-container {
    width: 100%;
    position: relative;
}

.range-ticks {
    display: flex;
    justify-content: space-between; 
    width: 100%;
    margin-top: 4px; 
    padding: 0 4px; 
    box-sizing: border-box;
}

    .range-ticks span {
        font-family: var(--font-ui) !important;
        font-size: 0.68rem !important; 
        font-weight: 500; 
        color: rgba(223, 183, 108, 0.45) !important;
    }

    .range-ticks .active-tick {
        font-weight: 500 !important;
        color: rgba(223, 183, 108, 0.45) !important;
    }

.footer-legal-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

    .footer-legal-links a {
        font-family: var(--font-ui) !important;
        font-size: 0.72rem !important;
        color: rgba(223, 183, 108, 0.55) !important;
        text-decoration: none !important;
        border-bottom: 1px solid rgba(223, 183, 108, 0.25);
        transition: color 0.3s ease, border-color 0.3s ease;
        user-select: none !important;
        -webkit-user-select: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }

        .footer-legal-links a:hover {
            color: rgba(223, 183, 108, 0.9) !important;
            border-bottom-color: rgba(223, 183, 108, 0.7);
        }

/* ==========================================================================
   7. МОДЕРНИЗАЦИЯ ФИНАЛЬНЫХ КНОПОК И ХУДОЖЕСТВЕННАЯ ПОДСВЕТКА
   ========================================================================== */

.editor-action-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0 !important; 
}

.generate-link-btn {
    width: 100%;
    padding: 16px;
    border-radius: 8px;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.03);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    -webkit-font-smoothing: antialiased;
}

.passport-download-btn {
    width: 100%;
    padding: 16px;
    border-radius: 8px;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important; 
    color: #ffffff !important; 
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.03);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    -webkit-font-smoothing: antialiased;
}

.app-footer {
    width: 100%;
    text-align: center;
    padding: 10px 0 16px 0 !important;
}


.footer-copy {
    font-size: 0.6rem;
    letter-spacing: 1px;
    color: var(--color-muted);
}

.download-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(6, 0, 1, 0.94) !important;
    z-index: -100;
    opacity: 0;
    visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

    .download-modal-overlay.active {
        z-index: 100005 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

.modal-window {
    width: 100%;
    max-width: 340px;
    background: radial-gradient(circle at 50% 30%, var(--modal-gradient-start, #300104) 0%, var(--modal-gradient-end, #120001) 70%, #060001 100%) !important;
    border: 1px solid var(--modal-border-color, rgba(223, 183, 108, 0.18)) !important;
    border-radius: 12px;
    padding: 16px 16px 14px 16px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    gap: 0;
    box-sizing: border-box;
    transition: background 0.8s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.8s ease;
}

.modal-title {
    font-family: var(--font-poetry) !important;
    font-style: italic !important;
    font-size: clamp(0.95rem, 4.5vw, 1.1rem) !important;
    font-weight: 530 !important;
    letter-spacing: 0.5px !important;
    line-height: 1.1 !important;
    margin: 4px 0 6px 0 !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #dfb76c !important;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.6);
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-subtitle {
    font-family: var(--font-poetry) !important;
    font-style: italic !important;
    font-size: 0.8rem !important;
    font-weight: 530 !important;
    letter-spacing: 0.5px !important;
    line-height: 1.3;
    margin: 0 0 14px 0 !important;
    text-transform: none !important; 
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #dfb76c !important;
    text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.4);
}

.modal-image-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
    overflow: hidden;
    background: #040001 !important;
    border: 1px solid rgba(223, 183, 108, 0.12) !important;
    padding: 0;
    margin: 0 0 14px 0 !important;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.9);
}

    .modal-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: contain !important;
    }

.modal-close-btn {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.38) !important;
    border: 1px solid rgba(223, 183, 108, 0.15) !important;
    color: #ffffff !important;
    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
}

    .modal-close-btn:hover {
        background: rgba(0, 0, 0, 0.6) !important;
        border-color: rgba(223, 183, 108, 0.35) !important;
    }


@keyframes pulseHint {
    0%, 100% {
        transform: scale(0.98);
        opacity: 0.25;
    }

    50% {
        transform: scale(1.02);
        opacity: 0.65;
    }
}

/* ==========================================================================
   8. ЦВЕТОВЫЕ КЛАССЫ ДЛЯ СИНХРОНИЗАЦИИ ОКРУЖЕНИЯ BODY, ОТКРЫТКИ И МЕНЮ
   ========================================================================== */

/* 1. Красный бархат */
body.bg-r-obsidian {
    --bg-main: #140103 !important;
    --shield-bg: radial-gradient(circle at 50% 30%, #300104 0%, #120001 70%, #060001 100%) !important;
}

.color-thumb.sh-1 {
    background: radial-gradient(circle at 50% 30%, #300104 0%, #120001 70%, #060001 100%) !important;
}

/* 2. Синий бархат */
body.bg-r-velvetblue {
    --bg-main: #020814 !important;
    --shield-bg: radial-gradient(circle at 50% 30%, #04122b 0%, #01050f 70%, #00030a 100%) !important;
}

.color-thumb.sh-2 {
    background: radial-gradient(circle at 50% 30%, #04122b 0%, #01050f 70%, #00030a 100%) !important;
}

/* 3. Черный шелк */
body.bg-r-emerald {
    --bg-main: #121217 !important;
    --shield-bg: linear-gradient(135deg, #111116 0%, #1a1a21 25%, #0b0b0e 45%, #14141a 70%, #050507 100%) !important;
}

.color-thumb.sh-3 {
    background: linear-gradient(135deg, #111116 0%, #1a1a21 25%, #0b0b0e 45%, #14141a 70%, #050507 100%) !important;
}

/* 4. Изумрудный шелк */
body.bg-r-burgundy {
    --bg-main: #03140f !important;
    --shield-bg: linear-gradient(135deg, #02140d 0%, #063321 30%, #010f0a 50%, #08402a 75%, #000503 100%) !important;
}

.color-thumb.sh-4 {
    background: linear-gradient(135deg, #02140d 0%, #063321 30%, #010f0a 50%, #08402a 75%, #000503 100%) !important;
}

/* 5. Пурпурный бархат */
body.bg-r-amethyst {
    --bg-main: #14021a !important;
    --shield-bg: radial-gradient(circle at 50% 30%, #1c0124 0%, #0a000d 70%, #040005 100%) !important;
}

.color-thumb.sh-5 {
    background: radial-gradient(circle at 50% 30%, #1c0124 0%, #0a000d 70%, #040005 100%) !important;
}

/* 6. Шоколадный атлас */
body.bg-r-chocolate {
    --bg-main: #1c1007 !important;
    --shield-bg: linear-gradient(135deg, #120a04 0%, #29180b 20%, #0f0804 40%, #331e0e 70%, #080402 100%) !important;
}

.color-thumb.sh-6 {
    background: linear-gradient(135deg, #120a04 0%, #29180b 20%, #0f0804 40%, #331e0e 70%, #080402 100%) !important;
}

/* 7. Графитовый матовый */
body.bg-r-graphite {
    --bg-main: #1d1e21 !important;
    --shield-bg: linear-gradient(180deg, #1d1e21 0%, #0f1012 100%) !important;
}

.color-thumb.sh-7 {
    background: linear-gradient(180deg, #1d1e21 0%, #0f1012 100%) !important;
}

/* 8. Бордовый бархат */
body.bg-r-indigo {
    --bg-main: #1c010a !important;
    --shield-bg: radial-gradient(circle at 50% 30%, #26010c 0%, #0f0004 70%, #050001 100%) !important;
}

.color-thumb.sh-8 {
    background: radial-gradient(circle at 50% 30%, #26010c 0%, #0f0004 70%, #050001 100%) !important;
}

/* 9. Изумрудный бархат */
body.bg-r-olive {
    --bg-main: #011c0d !important;
    --shield-bg: radial-gradient(circle at 50% 30%, #011c0d 0%, #000a04 70%, #000301 100%) !important;
}

.color-thumb.sh-9 {
    background: radial-gradient(circle at 50% 30%, #011c0d 0%, #000a04 70%, #000301 100%) !important;
}

/* 10. Черничный шелк */
body.bg-r-crimson {
    --bg-main: #080517 !important;
    --shield-bg: linear-gradient(135deg, #070414 0%, #110b30 25%, #03020d 50%, #150d3d 75%, #010004 100%) !important;
}

.color-thumb.sh-10 {
    background: linear-gradient(135deg, #070414 0%, #110b30 25%, #03020d 50%, #150d3d 75%, #010004 100%) !important;
}

/* 11. Пепел розы */
body.bg-r-alabaster {
    --bg-main: #4a2c35 !important;
    --shield-bg: radial-gradient(circle at 50% 30%, #ebd3d7 0%, #d6b2b7 70%, #c49fa5 100%) !important;
}

.color-thumb.sh-11 {
    background: radial-gradient(circle at 50% 30%, #ebd3d7 0%, #d6b2b7 70%, #c49fa5 100%) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

/* 12. Хлопковая бумага */
body.bg-r-cashmere {
    --bg-main: #423730 !important;
    --shield-bg: #fdfbf7 !important;
}

.color-thumb.sh-12 {
    background: #fdfbf7 !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

/* 13. Слоновая кость */
body.bg-r-quartz {
    --bg-main: #47392b !important;
    --shield-bg: linear-gradient(180deg, #fcf9f2 0%, #f5eedc 100%) !important;
}

.color-thumb.sh-13 {
    background: linear-gradient(180deg, #fcf9f2 0%, #f5eedc 100%) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

/* 14. Жемчужный перламутр */
body.bg-r-sagemist {
    --bg-main: #382e4d !important;
    --shield-bg: linear-gradient(135deg, #fffcf7 0%, #f3e6ff 30%, #e6f2ff 60%, #fff0f5 100%) !important;
}

.color-thumb.sh-14 {
    background: linear-gradient(135deg, #fffcf7 0%, #f3e6ff 30%, #e6f2ff 60%, #fff0f5 100%) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

/* 15. Натуральный жемчуг */
body.bg-r-cloudypearl {
    --bg-main: #45382e !important;
    --shield-bg: radial-gradient(circle at 30% 30%, #ffffff 0%, #f0eae1 60%, #e3dacb 100%) !important;
}

.color-thumb.sh-15 {
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #f0eae1 60%, #e3dacb 100%) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

/* 16. Белый бархат */
body.bg-r-milkyoats {
    --bg-main: #383942 !important;
    --shield-bg: radial-gradient(circle at 50% 30%, #ffffff 0%, #f7f6f2 60%, #ebeae4 100%) !important;
}

.color-thumb.sh-16 {
    background: radial-gradient(circle at 50% 30%, #ffffff 0%, #f7f6f2 60%, #ebeae4 100%) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

/* 17. Натуральный лен */
body.bg-r-fadedlavender {
    --bg-main: #453a2c !important;
    --shield-bg: #e1dacb !important;
}

.color-thumb.sh-17 {
    background: #e1dacb !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

/* 18. Французский серый */
body.bg-r-terracotta {
    --bg-main: #323c4a !important;
    --shield-bg: linear-gradient(180deg, #ced4da 0%, #b8c0c7 100%) !important;
}

.color-thumb.sh-18 {
    background: linear-gradient(180deg, #ced4da 0%, #b8c0c7 100%) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

/* 19. Пепел розы (Хлопок) */
body.bg-r-icecrystal {
    --bg-main: #4d2934 !important;
    --shield-bg: #e3cbcf !important;
}

.color-thumb.sh-19 {
    background: #e3cbcf !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

/* 20. Персиковый шелк */
body.bg-r-desertsand {
    --bg-main: #4d2e1f !important;
    --shield-bg: linear-gradient(135deg, #fcd9c4 0%, #f7be99 40%, #eba375 100%) !important;
}

.color-thumb.sh-20 {
    background: linear-gradient(135deg, #fcd9c4 0%, #f7be99 40%, #eba375 100%) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

body {
    background: var(--bg-main) !important;
    transition: background 1.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.card-canvas-main, .card-inside-page {
    background: var(--shield-bg) !important;
    transition: background 1.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.cover-door {
    background: var(--shield-bg);
}

.poem-line, .cover-hint {
    background-size: 200% auto;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    background-color: transparent !important;
}

.tx-gold-effect {
    background: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.25);
}

.tx-silver-effect {
    background: linear-gradient(135deg, #959aa3 0%, #ffffff 25%, #7a828c 50%, #f0f2f5 75%, #59616a 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2);
}

.tx-diamond-effect {
    background: linear-gradient(135deg, #ffffff 0%, #e2f1ff 35%, #ffffff 70%, #ccdfff 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.6), 0px 1px 2px rgba(0, 0, 0, 0.15);
}

.tx-matte-gold-effect {
    background: linear-gradient(180deg, #caa460 0%, #a37f3d 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

.tx-white-gold-effect {
    background: linear-gradient(135deg, #eadecc 0%, #ffffff 40%, #d2c2ad 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

.tx-copper-effect {
    background: linear-gradient(135deg, #b8532b 0%, #f7a278 30%, #913812 70%, #d66838 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

.tx-platinum-effect {
    background: linear-gradient(135deg, #d3d9e0 0%, #ffffff 50%, #a1aab3 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

.tx-champagne-effect {
    background: linear-gradient(135deg, #eddcc4 0%, #fff6e8 50%, #dbcaaf 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

.tx-diamond-pure-effect {
    background: linear-gradient(90deg, #ffffff 0%, #f0f7ff 50%, #ffffff 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    text-shadow: 0 0 2px rgba(255,255,255,0.4);
}

.tx-powder-effect {
    background: linear-gradient(180deg, #f7ccd4 0%, #cca1a8 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

.tx-burgundy-ink {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #580c1f !important;
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.15);
}

.tx-sapphire-ink {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #0f2537 !important;
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.15);
}

.tx-chocolate-ink {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #2b1810 !important;
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.12);
}

.tx-graphite-ink {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #1c1d1f !important;
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.1);
}

.tx-black-ink {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #0a0a0d !important;
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.08);
}

.tx-liquid-gold {
    background: linear-gradient(180deg, #e6c687 0%, #b0893c 60%, #735418 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.4);
}

.tx-emerald-ink {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #0b2b1d !important;
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.15);
}

.tx-anthracite-ink {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #242526 !important;
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.1);
}

.tx-obsidian-ink {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #0d0814 !important;
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.08);
}

.tx-purple-ink {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #1e0b29 !important;
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.15);
}

.color-thumb.tx-1 {
    background: #dfb76c;
}

.color-thumb.tx-2 {
    background: #e2e2e7;
}

.color-thumb.tx-3 {
    background: #ffffff;
}

.color-thumb.tx-4 {
    background: #caa460;
}

.color-thumb.tx-5 {
    background: #f3e5ca;
}

.color-thumb.tx-6 {
    background: #d66838;
}

.color-thumb.tx-7 {
    background: #cbd5e1;
}

.color-thumb.tx-8 {
    background: #f7ebd3;
}

.color-thumb.tx-9 {
    background: #ffffff;
}

.color-thumb.tx-10 {
    background: #e0b0b8;
}

.color-thumb.tx-11 {
    background: #580c1f;
}

.color-thumb.tx-12 {
    background: #0f2537;
}

.color-thumb.tx-13 {
    background: #2b1810;
}

.color-thumb.tx-14 {
    background: #1c1d1f;
}

.color-thumb.tx-15 {
    background: #0a0a0d;
}

.color-thumb.tx-16 {
    background: #b89146;
}

.color-thumb.tx-17 {
    background: #0b2b1d;
}

.color-thumb.tx-18 {
    background: #242526;
}

.color-thumb.tx-19 {
    background: #0d0814;
}

.color-thumb.tx-20 {
    background: #1e0b29;
}

body.bg-r-alabaster .book-opened .door-left, body.bg-r-alabaster .book-opened .door-right,
body.bg-r-cashmere .book-opened .door-left, body.bg-r-cashmere .book-opened .door-right,
body.bg-r-quartz .book-opened .door-left, body.bg-r-quartz .book-opened .door-right,
body.bg-r-sagemist .book-opened .door-left, body.bg-r-sagemist .book-opened .door-right,
body.bg-r-cloudypearl .book-opened .door-left, body.bg-r-cloudypearl .book-opened .door-right,
body.bg-r-milkyoats .book-opened .door-left, body.bg-r-milkyoats .book-opened .door-right,
body.bg-r-fadedlavender .book-opened .door-left, body.bg-r-fadedlavender .book-opened .door-right,
body.bg-r-terracotta .book-opened .door-left, body.bg-r-terracotta .book-opened .door-right,
body.bg-r-icecrystal .book-opened .door-left, body.bg-r-icecrystal .book-opened .door-right,
body.bg-r-desertsand .book-opened .door-left, body.bg-r-desertsand .book-opened .door-right {
    filter: brightness(0.74) blur(0.5px) !important;
}

.app-header,
.app-header *,
#poemPagesLabel,
footer,
footer * {
    user-select: none !important;
    -webkit-user-select: none !important;
    cursor: default !important;
}

.editor-block-title,
.editor-card-block h3 {
    user-select: none !important;
    -webkit-user-select: none !important;
    cursor: default !important;
}

/* ==========================================================================
   9. КАСТОМНЫЕ СТИЛИ ДЛЯ ЛЮКС-ОКНА ГЕНЕРАЦИИ ССЫЛКИ
   ========================================================================== */
#shareLinkInput {
    user-select: all !important;
    -webkit-user-select: all !important;
    font-family: var(--font-ui) !important;
    font-size: 0.72rem !important;
    color: #dfb76c !important;
    border-color: rgba(223, 183, 108, 0.25) !important;
    background: rgba(6, 0, 1, 0.6) !important;
    cursor: pointer !important;
}

    #shareLinkInput::selection {
        background: rgba(223, 183, 108, 0.3) !important;
        color: #ffffff !important;
    }

    #shareLinkInput::-moz-selection {
        background: rgba(223, 183, 108, 0.3) !important;
        color: #ffffff !important;
    }

/* ==========================================================================
   10. ТОТАЛЬНАЯ БЛОКИРОВКА СИСТЕМНОГО ВЫДЕЛЕНИЯ И ПОДСВЕТОК UI БРАУЗЕРА
   ========================================================================== */

.tab-btn,
.nav-arrow-btn,
.pages-label,
.align-btn,
.audio-btn,
.thumb,
.thumb *,
.color-thumb,
.generate-link-btn,
.passport-download-btn,
.modal-close-btn,
#copyShareLinkBtn,
#closeShareModalBtn,
#modalCloseBtn,
.modal-title,
.modal-subtitle,
.font-size-hint,
.range-scale-container,
.range-ticks,
.range-ticks span,
.modal-offer-note,
.modal-offer-note a {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

.input-field-lux:focus,
#shareLinkInput:focus {
    outline: none !important;
    box-shadow: 0 0 8px rgba(223, 183, 108, 0.15) !important;
}

/* ==========================================================================
   11. СТИЛЬ ВИРУСНОЙ ЛЮКС-ССЫЛКИ В ОКНЕ ШЕРИНГА
   ========================================================================== */
.modal-viral-link {
    display: block !important;
    font-family: var(--font-poetry) !important;
    font-style: italic !important;
    font-size: 0.72rem !important; 
    font-weight: 530 !important;
    line-height: 1.4 !important;
    color: #dfb76c !important; 
    text-align: center !important;
    text-decoration: none !important; 
    margin-top: 14px !important; 
    opacity: 0.65 !important; 
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

    .modal-viral-link:hover,
    .modal-viral-link:active {
        opacity: 1 !important; 
        transform: scale(1.01) !important;
    }

/* ==========================================================================
   12. ТОТАЛЬНЫЙ БЕСШОВНЫЙ ПОЛНОЭКРАННЫЙ РЕЖИМ ДЛЯ СМАРТФОНОВ И ПЛАНШЕТОВ 
   ========================================================================== */
@media (orientation: portrait), (hover: none) and (pointer: coarse) {
    .book-viewport,
    .book-perspective-wrapper,
    .card-canvas-main,
    .card-cover-overlay {
        transform-style: flat !important;
        -webkit-transform-style: flat !important;
    }

    body.book-is-open-now .app-header,
    body.book-is-open-now .tabs-container,
    body.book-is-open-now .poem-navigation-bar,
    body.book-is-open-now .editor-interface,
    body.book-is-open-now #editorInterface .editor-action-group,
    body.book-is-open-now .app-footer {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    body.book-is-open-now .app-container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100vw !important;
        width: 100vw !important;
        overflow: hidden !important;
    }

    body.book-is-open-now .book-viewport {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-width: 100vw !important;
        z-index: 99999 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: var(--bg-main, #060001) !important;
        transform: none !important;
    }

    body.book-is-open-now .book-perspective-wrapper {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        aspect-ratio: auto !important;
        transform: none !important;
        margin: 0 !important;
        left: 0 !important;
    }

    body.book-is-open-now .card-canvas-main {
        position: fixed !important;
        top: -8px !important;
        left: 0 !important;
        right: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100vw !important;
        max-width: 680px !important;
        height: 102vh !important;
        max-height: 102vh !important;
        border-radius: 0 !important;
        box-shadow: 0 0 90px rgba(0, 0, 0, 0.85) !important;
        transform: none !important;
    }

    body.book-is-open-now .door-left,
    body.book-is-open-now .door-right {
        display: block !important;
        z-index: 20 !important;
        pointer-events: none !important;
        filter: brightness(0.6) !important;
        background-size: cover !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.85s ease 0.1s, filter 0.85s ease, visibility 0s linear 0.95s !important;
    }

    body.book-is-open-now .door-left {
        transform: translate3d(-105%, 0, 0) !important;
        background-position: left center !important;
    }

    body.book-is-open-now .door-right {
        transform: translate3d(105%, 0, 0) !important;
        background-position: right center !important;
    }

    body.book-is-open-now .card-inside-page {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        padding: 40px 24px !important;
        box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.9) !important;
        box-sizing: border-box !important;
    }

    body.book-is-open-now .poem-scroll-rail {
        width: 100% !important;
        max-width: 650px !important;
        margin: 0 auto !important;
    }
}

/* ==========================================================================
   13. БЛОК ПРОВЕРКИ ДЕТАЛЕЙ ПЕРЕД ВЫПУСКОМ ОТКРЫТКИ
   ========================================================================== */
.order-summary-box {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(223, 183, 108, 0.18);
    border-radius: 8px;
    padding: 10px 12px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 0.74rem;
    line-height: 1.35;
    border-bottom: 1px dashed rgba(223, 183, 108, 0.1);
    padding-bottom: 5px;
}

    .order-summary-row:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

.order-summary-label {
    color: rgba(223, 183, 108, 0.65);
    flex-shrink: 0;
}

.order-summary-val {
    color: #ffffff;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

.modal-offer-note {
    margin: 12px 0 0 0 !important;
    font-family: var(--font-ui);
    font-size: 0.64rem;
    line-height: 1.35;
    color: rgba(223, 183, 108, 0.48);
    text-align: center;
}

    .modal-offer-note a {
        color: rgba(223, 183, 108, 0.78);
        text-decoration: none;
        border-bottom: 1px solid rgba(223, 183, 108, 0.3);
    }

/* Угловые штампы ПРЕВЬЮ на неоплаченных премиум-обложках */
#bookCanvas.cover-watermarked .door-left,
#bookCanvas.cover-watermarked .door-right {
    overflow: visible !important;
}

.preview-stamp {
    display: none;
    position: absolute;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    padding: 5px 10px 5px 12px;
    border-radius: 4px;
    background: rgba(10, 7, 15, 0.88);
    border: 1px solid rgba(223, 183, 108, 0.85);
    color: #f5d68e;
    font-family: var(--font-ui);
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    z-index: 30 !important;
}

#bookCanvas.cover-watermarked:not(.book-opened) .preview-stamp {
    display: inline-flex !important;
}

.stamp-top-left {
    top: 24%;
    left: 14px;
}

.stamp-bottom-right {
    bottom: 24%;
    right: 14px;
}

/* Фоновый холст живой атмосферы */
#atmosphereCanvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.6s ease;
}

.app-container {
    position: relative;
    z-index: 1;
    background: transparent !important;
}

@media (max-width: 480px) {
    body.book-is-open-now #atmosphereCanvas {
        opacity: 0;
    }
}

/* Защита от автозума Safari на iPhone с сохранением изящного масштаба полей */
@media (hover: none) and (pointer: coarse) {
    .text-control-inputs .input-field-lux {
        font-size: 16px !important;
        padding: 13px 15px;
        border-radius: 8px;
        transform: scale(0.78);
        transform-origin: left top;
        width: calc((50% - 3px) / 0.78);
        margin-right: calc((50% - 3px) * (1 - 1 / 0.78));
        margin-bottom: -10px;
    }
}

.footer-req {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 6px;
    font-size: 0.54rem;
    line-height: 1.25;
    letter-spacing: 0.5px;
    color: rgba(202, 164, 96, 0.28);
}
