/* ==========================================================================
   GhostCloud — Design System v2 «Печатная сеть» (Ukiyo-e Network)
   Визуальный язык: японская печатная графика × сетевая инженерия.
   Подписи бренда:
   - ханко-штампы (квадратные печати) вместо бейджей-пилюль
   - вертикальные индексы секций (татэ) с кандзи
   - тарифы-билеты с перфорацией и срезанным углом
   - маршрутная линия с движущимся пакетом
   - пятилепестковая сакура как буллет/чекмарк/разделитель
   - офсетная «печатная» тень у главных кнопок
   Шрифты: Prata (дисплей) + Zen Kaku Gothic New (японские акценты)
           + IBM Plex Mono (технические подписи) + Manrope (UI)
   Единственный базовый слой для страниц бренда:
   - ghostcloud-index.html · ghostcloud-login.html · ghostcloud-security.html
   ========================================================================== */

/* --- Tokens: dark (default) --- */
:root {
    color-scheme: dark;

    /* Sakura accent family */
    --accent: #f0a4bc;          /* primary sakura — подписи, тонкие акценты */
    --accent-h: #f6bccc;
    --accent-deep: #c9335d;     /* deep rose — поверхности кнопок/штампов */
    --accent-deep-h: #cd3f6c;
    --accent-ink: #e25c86;      /* акцентный текст на тёмном (контраст ≥5:1) */
    --accent-soft: #ffd7e2;
    --stamp: #c23763;           /* киноварь печати */
    --gradient: linear-gradient(160deg, #d64672, #b52d57);
    --gradient-wide: linear-gradient(120deg, #f0a4bc, #d64672 55%, #a1234d);

    /* Sumi ink & washi */
    --bg: #141018;              /* сумеречная плам-тушь */
    --bg-2: #191420;
    --bg-card: #1c1624;
    --bg-card-h: #241c2e;
    --bg-elevated: #281f33;
    --icon-tile: #100c16;

    --text: #f7f2f5;
    --text-2: rgba(247, 240, 245, 0.76);
    --text-3: rgba(244, 236, 242, 0.52);

    --border: rgba(240, 214, 228, 0.13);
    --border-strong: rgba(240, 214, 228, 0.3);
    --border-accent: rgba(240, 164, 188, 0.5);

    --input-bg: rgba(255, 255, 255, 0.04);
    --input-border: rgba(240, 214, 228, 0.24);
    --header-bg: rgba(20, 16, 24, 0.9);
    --modal-bg: #1c1624;
    --overlay-bg: rgba(9, 6, 12, 0.74);

    --success: #7fd6a4;
    --success-bg: rgba(127, 214, 164, 0.08);
    --success-border: rgba(127, 214, 164, 0.3);
    --error: #ff8f8f;
    --error-bg: rgba(255, 143, 143, 0.08);
    --error-border: rgba(255, 143, 143, 0.3);
    --warning: #f0b860;

    --shadow: 0 24px 60px rgba(5, 2, 8, 0.5);
    --shadow-print: 5px 6px 0 rgba(214, 70, 114, 0.22);  /* офсетная печать */

    --radius: 2px;
    --radius-sm: 2px;
    --radius-xl: 4px;

    --font-display: 'Prata', 'Georgia', serif;
    --font-jp: 'Zen Kaku Gothic New', 'Hiragino Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', 'Consolas', monospace;
    --font-ui: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Пятилепестковая сакура (фирменный знак) */
    --petal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f0a4bc'%3E%3Cpath d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(72 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(144 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(216 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(288 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3C/svg%3E");
    --petal-deep: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d64672'%3E%3Cpath d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(72 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(144 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(216 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(288 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3C/svg%3E");

    /* Совместимость со старыми именами токенов */
    --orange: var(--accent-deep);
    --orange-dark: #b52d57;
    --orange-light: var(--accent-soft);
    --coral: #a1234d;
    --amber: var(--accent);
    --glass-border: var(--border);
    --glass-border-h: var(--border-accent);
    --glow: none;
}

/* --- Tokens: light (system) --- */
@media (prefers-color-scheme: light) {
    :root {
        color-scheme: light;
        --accent: #c9365f;
        --accent-h: #b32b52;
        --accent-deep: #c23763;
        --accent-deep-h: #a92b53;
        --accent-ink: #c23763;
        --accent-soft: #f6cdd8;
        --stamp: #c23763;

        --bg: #faf6f4;          /* тёплая бумага васи */
        --bg-2: #f4edec;
        --bg-card: #fffdfc;
        --bg-card-h: #fbf1f2;
        --bg-elevated: #f6e9ec;
        --icon-tile: #f3ecef;

        --text: #2a2028;
        --text-2: rgba(42, 32, 40, 0.72);
        --text-3: rgba(42, 32, 40, 0.5);

        --border: rgba(84, 45, 60, 0.15);
        --border-strong: rgba(84, 45, 60, 0.34);
        --border-accent: rgba(194, 55, 99, 0.45);

        --input-bg: #ffffff;
        --input-border: rgba(84, 45, 60, 0.3);
        --header-bg: rgba(250, 246, 244, 0.92);
        --modal-bg: #fffdfc;
        --overlay-bg: rgba(52, 26, 38, 0.45);

        --success: #0f7a4e;
        --success-bg: rgba(15, 122, 78, 0.08);
        --success-border: rgba(15, 122, 78, 0.3);
        --error: #c73030;
        --error-bg: rgba(199, 48, 48, 0.07);
        --error-border: rgba(199, 48, 48, 0.28);

        --shadow: 0 24px 55px rgba(84, 40, 56, 0.14);
        --shadow-print: 5px 6px 0 rgba(194, 55, 99, 0.16);

        --petal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c9365f'%3E%3Cpath d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(72 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(144 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(216 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(288 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3C/svg%3E");
        --petal-deep: var(--petal);
    }
}

/* --- Tokens: light (manual override) --- */
html.light-theme {
    color-scheme: light;
    --accent: #c9365f;
    --accent-h: #b32b52;
    --accent-deep: #c23763;
    --accent-deep-h: #a92b53;
    --accent-ink: #c23763;
    --accent-soft: #f6cdd8;
    --stamp: #c23763;

    --bg: #faf6f4;
    --bg-2: #f4edec;
    --bg-card: #fffdfc;
    --bg-card-h: #fbf1f2;
    --bg-elevated: #f6e9ec;
    --icon-tile: #f3ecef;

    --text: #2a2028;
    --text-2: rgba(42, 32, 40, 0.72);
    --text-3: rgba(42, 32, 40, 0.5);

    --border: rgba(84, 45, 60, 0.15);
    --border-strong: rgba(84, 45, 60, 0.34);
    --border-accent: rgba(194, 55, 99, 0.45);

    --input-bg: #ffffff;
    --input-border: rgba(84, 45, 60, 0.3);
    --header-bg: rgba(250, 246, 244, 0.92);
    --modal-bg: #fffdfc;
    --overlay-bg: rgba(52, 26, 38, 0.45);

    --success: #0f7a4e;
    --success-bg: rgba(15, 122, 78, 0.08);
    --success-border: rgba(15, 122, 78, 0.3);
    --error: #c73030;
    --error-bg: rgba(199, 48, 48, 0.07);
    --error-border: rgba(199, 48, 48, 0.28);

    --shadow: 0 24px 55px rgba(84, 40, 56, 0.14);
    --shadow-print: 5px 6px 0 rgba(194, 55, 99, 0.16);

    --petal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c9365f'%3E%3Cpath d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(72 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(144 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(216 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(288 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3C/svg%3E");
    --petal-deep: var(--petal);
}

/* --- Tokens: dark (manual override) --- */
html.dark-theme {
    color-scheme: dark;
    --accent: #f0a4bc;
    --accent-h: #f6bccc;
    --accent-deep: #c9335d;
    --accent-deep-h: #cd3f6c;
    --accent-ink: #e25c86;
    --accent-soft: #ffd7e2;
    --stamp: #c23763;

    --bg: #141018;
    --bg-2: #191420;
    --bg-card: #1c1624;
    --bg-card-h: #241c2e;
    --bg-elevated: #281f33;
    --icon-tile: #100c16;

    --text: #f7f2f5;
    --text-2: rgba(247, 240, 245, 0.76);
    --text-3: rgba(244, 236, 242, 0.52);

    --border: rgba(240, 214, 228, 0.13);
    --border-strong: rgba(240, 214, 228, 0.3);
    --border-accent: rgba(240, 164, 188, 0.5);

    --input-bg: rgba(255, 255, 255, 0.04);
    --input-border: rgba(240, 214, 228, 0.24);
    --header-bg: rgba(20, 16, 24, 0.9);
    --modal-bg: #1c1624;
    --overlay-bg: rgba(9, 6, 12, 0.74);

    --success: #7fd6a4;
    --success-bg: rgba(127, 214, 164, 0.08);
    --success-border: rgba(127, 214, 164, 0.3);
    --error: #ff8f8f;
    --error-bg: rgba(255, 143, 143, 0.08);
    --error-border: rgba(255, 143, 143, 0.3);
    --warning: #f0b860;

    --shadow: 0 24px 60px rgba(5, 2, 8, 0.5);
    --shadow-print: 5px 6px 0 rgba(214, 70, 114, 0.22);

    --petal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f0a4bc'%3E%3Cpath d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(72 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(144 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(216 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(288 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3C/svg%3E");
    --petal-deep: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d64672'%3E%3Cpath d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(72 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(144 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(216 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Cpath transform='rotate(288 12 12)' d='M12 2.6c1.9 2.2 2.3 4.9 0 7.3-2.3-2.4-1.9-5.1 0-7.3z'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3C/svg%3E");
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; caret-color: transparent; }
input, textarea, select, [contenteditable] { caret-color: auto; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; }
::selection { background: rgba(214, 70, 114, 0.4); color: #fff; }

a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent-deep);
    outline-offset: 2px;
}

/* --- Ambient: бумага + дуга солнца (без блобов) --- */
.ambient-bg {
    position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
    background: var(--bg);
}
.ambient-bg::before {
    /* одна большая дуга-солнце, тонкая линия */
    content: ''; position: absolute;
    width: min(86vw, 1100px); aspect-ratio: 1;
    right: -24vw; top: -34vw;
    border: 1px solid var(--border);
    border-radius: 50%;
    box-shadow: inset 0 0 0 60px rgba(214, 70, 114, 0.025);
}
.sakura-sun {
    position: absolute;
    width: min(30vw, 440px); aspect-ratio: 1;
    right: 6%; top: 9%;
    border-radius: 50%;
    border: 1px solid rgba(214, 70, 114, 0.16);
    background: radial-gradient(circle at 50% 50%, rgba(214, 70, 114, 0.055), transparent 66%);
}
html.light-theme .sakura-sun { border-color: rgba(194, 55, 99, 0.14); background: radial-gradient(circle at 50% 50%, rgba(194, 55, 99, 0.045), transparent 66%); }
@media (prefers-color-scheme: light) {
    html:not(.dark-theme) .sakura-sun { border-color: rgba(194, 55, 99, 0.14); background: radial-gradient(circle at 50% 50%, rgba(194, 55, 99, 0.045), transparent 66%); }
}
.noise-layer {
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    opacity: 0.5;
}
.blossom { fill: currentColor; flex-shrink: 0; }

/* --- Container --- */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* --- Вертикальный индекс секции (татэ) --- */
.tate-index {
    writing-mode: vertical-rl;
    font-family: var(--font-jp);
    font-size: 15px; letter-spacing: 0.5em;
    color: var(--text-3);
    border-left: 1px solid var(--border);
    padding-left: 14px;
    align-self: stretch;
    user-select: none;
}

/* --- Чип-номер (моно) --- */
.chip {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--accent-ink);
    border: 1px solid var(--border-accent);
    padding: 5px 10px 4px;
    margin-bottom: 18px;
    background: transparent;
}
html.light-theme .chip { color: var(--accent-ink); }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    background: var(--header-bg);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid var(--border);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 6px 28px rgba(0, 0, 0, 0.22); border-bottom-color: var(--border-strong); }
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 74px;
}

.logo { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--text); }
.logo-img { width: 34px; height: 34px; align-self: center; border: 1px solid var(--border-strong); }
.logo-text {
    font-size: 19px; font-weight: 800; letter-spacing: -0.4px;
    color: var(--text);
}
.logo-jp {
    font-family: var(--font-jp);
    font-size: 10px; letter-spacing: 0.3em;
    color: var(--accent-ink);
    position: relative; top: -1px;
}

.nav { display: flex; align-items: center; gap: 2px; }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--border); }

.nav-link {
    color: var(--text-2); text-decoration: none;
    font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em;
    padding: 8px 12px;
    position: relative; white-space: nowrap;
    transition: color 0.2s;
}
.nav-num {
    font-family: var(--font-mono);
    font-size: 9px; color: var(--text-3);
    margin-right: 6px; vertical-align: 2px;
    transition: color 0.2s;
}
.nav-link::after {
    content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px;
    height: 1px; background: var(--accent-deep);
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.25s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover .nav-num { color: var(--accent-ink); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-proxy {
    padding: 8px 12px;
    border: 1px solid var(--border);
    color: var(--text-2) !important; font-weight: 600; font-size: 12px;
    text-decoration: none; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 7px;
    transition: border-color 0.2s, color 0.2s;
}
.nav-proxy:hover { border-color: var(--border-accent); color: var(--text) !important; }
.tg-icon { width: 15px; height: 15px; flex-shrink: 0; }

.nav-login {
    padding: 9px 18px;
    border: 0; background: var(--accent-deep);
    color: #fff !important; font-weight: 700; font-size: 11.5px;
    text-transform: uppercase; letter-spacing: 0.08em;
    text-decoration: none; transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    display: inline-flex; align-items: center; justify-content: center;
    white-space: nowrap; line-height: 1;
    box-shadow: var(--shadow-print);
}
.nav-login:hover { background: var(--accent-deep-h); transform: translate(-1px, -1px); box-shadow: 6px 7px 0 rgba(214, 70, 114, 0.26); }

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border); color: var(--text-2);
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: border-color 0.2s, color 0.2s; font-size: 14px;
    flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--border-accent); color: var(--accent-ink); }
.theme-toggle .bi-sun-fill { display: none; }
.theme-toggle .bi-moon-fill { display: inline; }
html.light-theme .theme-toggle .bi-sun-fill { display: inline; }
html.light-theme .theme-toggle .bi-moon-fill { display: none; }
@media (prefers-color-scheme: light) {
    html:not(.dark-theme) .theme-toggle .bi-sun-fill { display: inline; }
    html:not(.dark-theme) .theme-toggle .bi-moon-fill { display: none; }
}

/* Burger */
.burger {
    display: none; flex-direction: column; gap: 5px; background: none; border: none;
    padding: 8px; cursor: pointer; z-index: 210;
}
.burger span {
    display: block; width: 22px; height: 2px; background: var(--text);
    transition: all 0.3s ease;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Account button in nav */
.nav-account-wrap { position: relative; }
.nav-account-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 14px 5px 5px;
    border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text);
    font-weight: 600; font-size: 12px;
    cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.nav-account-btn:hover { border-color: var(--border-accent); background: var(--bg-card-h); }
.nav-account-avatar {
    width: 28px; height: 28px; overflow: hidden;
    background: var(--accent-deep); color: #fff; font-weight: 700; font-size: 13px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-account-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   HERO — печатная пластина + маршрутные метрики
   ========================================================================== */
.hero {
    position: relative;
    padding: 138px 0 84px;
}
.hero-side-rail {
    position: absolute; left: max(12px, calc(50vw - 660px)); top: 200px; bottom: 140px;
    display: flex; align-items: center;
    pointer-events: none;
}
.hero-side-text {
    writing-mode: vertical-rl;
    font-family: var(--font-mono);
    font-size: 9px; letter-spacing: 0.4em; text-transform: uppercase;
    color: var(--text-3);
    border-left: 1px solid var(--border);
    padding-left: 10px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.95fr);
    gap: 4vw; align-items: center;
}

.hero-kicker {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 28px;
    font-family: var(--font-mono);
    color: var(--text-3);
    font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.hero-kicker-mark {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--accent-ink); font-weight: 600;
}
.hero-kicker-mark .blossom { color: var(--accent-ink); }

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(46px, 6vw, 80px);
    font-weight: 400; line-height: 1.04;
    letter-spacing: -0.04em; margin-bottom: 24px;
}
.hero-title-accent {
    color: var(--accent-ink);
    position: relative; white-space: nowrap;
}
.hero-title-accent::after {
    /* кисть под строкой — один росчерк */
    content: ''; position: absolute; left: 2%; right: 4%; bottom: 0.06em;
    height: 3px; background: var(--accent-deep); opacity: 0.35;
    transform: skewX(-18deg);
}

.hero-desc {
    font-size: 16.5px; color: var(--text-2);
    max-width: 520px; margin-bottom: 34px; line-height: 1.75;
}

.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 46px; }
.hero-inline-link {
    font-family: var(--font-mono);
    font-size: 12px; color: var(--text-3); text-decoration: none;
    padding: 6px 2px;
    border-bottom: 1px dashed var(--border-strong);
    transition: color 0.2s, border-color 0.2s;
}
.hero-inline-link:hover { color: var(--accent-ink); border-color: var(--accent-ink); }

.hero-metrics {
    display: flex; align-items: center;
    border-top: 1px solid var(--border); padding-top: 26px;
}
.metric { display: flex; flex-direction: column; padding: 0 26px; }
.metric:first-child { padding-left: 0; }
.metric-val { font-family: var(--font-display); font-size: 30px; color: var(--text); line-height: 1.2; }
.metric-unit { font-size: 17px; color: var(--accent-ink); }
.metric-lbl {
    font-family: var(--font-mono);
    font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.18em;
}
.metric-sep { color: var(--accent-ink); opacity: 0.7; display: flex; }

/* --- Печатная пластина с персонажем --- */
.hero-scene { position: relative; padding-bottom: 46px; }
.scene-frame {
    position: relative;
    border: 1px solid var(--border-strong);
    background: var(--bg-card);
    min-height: 540px;
    display: flex; align-items: flex-end; justify-content: center;
    overflow: visible;
}
.scene-frame::before {
    /* внутренняя волосная линия — двойная рамка печати */
    content: ''; position: absolute; inset: 14px;
    border: 1px solid var(--border);
    pointer-events: none;
}
.frame-tick {
    position: absolute; width: 15px; height: 15px; z-index: 6;
    border-color: var(--accent-ink); border-style: solid; border-width: 0;
}
.frame-tick-tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.frame-tick-tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.frame-tick-bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.frame-tick-br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

.scene-sun {
    position: absolute; top: 44px; right: 40px;
    width: 150px; height: 150px; border-radius: 50%;
    background: radial-gradient(circle at 50% 44%, rgba(214, 70, 114, 0.28), rgba(214, 70, 114, 0.05) 62%, transparent 72%);
}
html.light-theme .scene-sun { background: radial-gradient(circle at 50% 44%, rgba(194, 55, 99, 0.14), rgba(194, 55, 99, 0.04) 62%, transparent 72%); }
@media (prefers-color-scheme: light) {
    html:not(.dark-theme) .scene-sun { background: radial-gradient(circle at 50% 44%, rgba(194, 55, 99, 0.14), rgba(194, 55, 99, 0.04) 62%, transparent 72%); }
}

.scene-branch {
    position: absolute; z-index: 3;
    top: 24px; right: -34px; width: 300px;
    color: var(--accent-ink);
    opacity: 0.9;
}
.scene-jp {
    position: absolute; z-index: 4; left: 30px; top: 34px;
    writing-mode: vertical-rl;
    font-family: var(--font-jp);
    font-size: 13px; letter-spacing: 0.42em;
    color: var(--text-3);
    user-select: none;
}
.scene-character {
    position: relative; z-index: 2;
    width: min(78%, 360px); height: auto; max-height: 520px;
    object-fit: contain; object-position: bottom;
    filter: drop-shadow(0 16px 34px rgba(8, 4, 10, 0.4));
}
html.light-theme .scene-character { filter: drop-shadow(0 16px 30px rgba(84, 40, 56, 0.2)); }

.scene-status {
    position: absolute; z-index: 5; left: 30px; bottom: 26px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 12px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    font-family: var(--font-mono);
    font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text);
}
.scene-status span {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--success);
    animation: gc-pulse 2.4s ease-in-out infinite;
}
@keyframes gc-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(127, 214, 164, 0.45); }
    50% { box-shadow: 0 0 0 5px rgba(127, 214, 164, 0); }
}
.scene-index {
    position: absolute; z-index: 5; right: 30px; bottom: 28px;
    font-family: var(--font-mono);
    font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--text-3);
}

/* Билет соединения — выходит за край пластины */
.scene-ticket {
    position: absolute; z-index: 7;
    right: -18px; bottom: 8px;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px;
    background: var(--accent-deep);
    color: #fff;
    transform: rotate(-2deg);
    box-shadow: var(--shadow-print);
    font-family: var(--font-mono);
    max-width: 86%;
}
.scene-ticket-key { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; opacity: 0.9; }
.scene-ticket-val { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.scene-ticket-route {
    font-size: 10px; letter-spacing: 0.18em; opacity: 0.75;
    border-left: 1px solid rgba(255, 255, 255, 0.4); padding-left: 12px;
}

/* --- Бегущая строка --- */
.signal-marquee {
    overflow: hidden;
    background: var(--accent-deep); color: #fff;
    white-space: nowrap;
    transform: rotate(-1deg) scale(1.02);
    margin: 10px 0 70px; padding: 13px 0;
}
.signal-track {
    display: flex; align-items: center; width: max-content;
    animation: gc-marquee 36s linear infinite;
    font-family: var(--font-mono);
    font-size: 12.5px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
}
.signal-marquee:hover .signal-track { animation-play-state: paused; }
.signal-track span { padding: 0 30px; }
.signal-track i {
    width: 11px; height: 11px; flex: 0 0 auto;
    background: currentColor; opacity: 0.8;
    clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
@keyframes gc-marquee { to { transform: translateX(-25%); } }

/* ==========================================================================
   Buttons — офсетная печать
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 24px; border-radius: 0;
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em;
    text-decoration: none; border: none; cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    font-family: var(--font-ui);
}
.btn-lg { padding: 15px 22px; font-size: 12.5px; }
.btn-block { width: 100%; }

.btn-primary {
    background: var(--accent-deep); color: #fff;
    box-shadow: var(--shadow-print);
}
.btn-primary:hover { background: var(--accent-deep-h); transform: translate(-2px, -2px); box-shadow: 7px 8px 0 rgba(214, 70, 114, 0.28); }
.btn-primary:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 rgba(214, 70, 114, 0.2); }
html.light-theme .btn-primary:hover { box-shadow: 7px 8px 0 rgba(194, 55, 99, 0.2); }

.btn-outline {
    background: transparent; color: var(--text);
    border: 1px solid var(--border-strong);
}
.btn-outline:hover { border-color: var(--accent-ink); color: var(--accent-ink); background: transparent; }

.btn-ghost {
    background: transparent; color: var(--text-2);
    border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-strong); color: var(--text); background: var(--bg-card); }

.btn-pink { background: var(--stamp); color: #fff; box-shadow: var(--shadow-print); }
.btn-pink:hover { background: var(--accent-deep-h); transform: translate(-2px, -2px); }

/* Кнопка «Пополнить (+N₽)» на тарифах для авторизованных */
.pricing-action-btn.pricing-needs-topup {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-accent) !important;
    color: var(--accent-ink) !important;
    box-shadow: none !important;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 100px 0; position: relative; }
.section-pricing { background: var(--bg-2); border-block: 1px solid var(--border); }

.section-head { margin-bottom: 56px; }
.section-head-left {
    display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start;
}
.section-head-right {
    display: flex; justify-content: flex-end; text-align: right;
}
.section-head-right .chip { margin-left: auto; display: inline-block; }
.section-head-stamp { position: relative; max-width: 640px; }

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 4.4vw, 56px);
    font-weight: 400; letter-spacing: -0.035em; line-height: 1.12;
}
.section-title em {
    font-style: normal; color: var(--accent-ink);
}
.section-desc { font-size: 15.5px; color: var(--text-2); max-width: 540px; margin-top: 16px; line-height: 1.7; }

/* ==========================================================================
   Features — редакционные строки
   ========================================================================== */
.f-rows { border-top: 1px solid var(--border-strong); }
.f-row {
    display: grid;
    grid-template-columns: 92px minmax(200px, 1fr) minmax(220px, 1.2fr) auto;
    gap: 8px 32px; align-items: baseline;
    padding: 30px 6px;
    border-bottom: 1px solid var(--border);
    position: relative;
    transition: background 0.25s ease, padding-left 0.25s ease;
}
.f-row:hover { background: var(--bg-card); padding-left: 16px; }
.f-row:hover .f-kanji { color: var(--accent-ink); }

.f-row-num { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.f-kanji {
    font-family: var(--font-jp);
    font-size: 26px; line-height: 1; color: var(--text-3);
    transition: color 0.25s ease;
}
.f-index {
    font-family: var(--font-mono);
    font-size: 9.5px; letter-spacing: 0.18em; color: var(--text-3);
}
.f-row-title {
    font-family: var(--font-display); font-weight: 400;
    font-size: 21px; letter-spacing: -0.01em; line-height: 1.3;
}
.f-row-text { font-size: 14px; color: var(--text-2); line-height: 1.65; }
.f-row-spec {
    font-family: var(--font-mono);
    font-size: 10.5px; letter-spacing: 0.14em; color: var(--accent-ink);
    border: 1px solid var(--border-accent);
    padding: 5px 10px;
    white-space: nowrap;
    justify-self: end; align-self: center;
}
.f-row:hover .f-row-spec { background: var(--accent-deep); color: #fff; border-color: var(--accent-ink); }

/* ==========================================================================
   Route — горизонтальный маршрут
   ========================================================================== */
.route { position: relative; padding-top: 34px; }
.route-line {
    position: absolute; top: 40px; left: 12px; right: 12px; height: 1px;
    background: var(--border-strong);
    overflow: visible;
}
.route-packet {
    position: absolute; top: -3px; left: 0;
    width: 7px; height: 7px;
    background: var(--accent-deep);
    transform: rotate(45deg);
    animation: gc-packet 7s linear infinite;
}
@keyframes gc-packet {
    0% { left: 0; opacity: 0; }
    4% { opacity: 1; }
    92% { opacity: 1; }
    100% { left: calc(100% - 7px); opacity: 0; }
}

.route-steps {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
.route-step { position: relative; padding-top: 34px; }
.route-node {
    position: absolute; top: 0; left: 0;
    width: 13px; height: 13px;
    border: 2px solid var(--accent-deep);
    background: var(--bg);
    transform: rotate(45deg);
}
.route-node-end { background: var(--accent-deep); }
.route-station {
    display: block;
    font-family: var(--font-mono);
    font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--text-3); margin-bottom: 8px;
}
.route-step h3 {
    font-family: var(--font-display); font-weight: 400;
    font-size: 19px; margin-bottom: 8px;
}
.route-step p { font-size: 13.5px; color: var(--text-2); line-height: 1.65; max-width: 240px; }
.route-step-end h3 { color: var(--accent-ink); }

/* ==========================================================================
   Pricing — билеты
   ========================================================================== */
.pricing-row {
    display: grid;
    grid-template-columns: 0.92fr 1fr 1.08fr 1fr;
    gap: 14px;
    align-items: start;
}
.p-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 30px 24px 26px;
    position: relative;
    display: flex; flex-direction: column;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.p-card::before {
    /* срезанный угол — видимая грань */
    content: ''; position: absolute; top: 0; right: 0;
    width: 20px; height: 20px;
    background: linear-gradient(315deg, transparent 49%, var(--border-strong) 50%, var(--bg-2) 51%);
    pointer-events: none;
}
.p-card:hover { background: var(--bg-card-h); transform: translateY(-4px); }

.p-card-trial { border-style: dashed; }

.p-card-pop {
    border-color: var(--border-accent);
    background: var(--bg-card);
    margin-top: -14px;
    padding-top: 40px;
}
.p-card-best {
    border-color: var(--accent-ink);
    background: var(--bg-card);
}
.p-card-best::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: var(--accent-deep);
}

/* Ханко-штампы вместо бейджей */
.p-badge {
    position: absolute; top: 14px; right: 20px;
    padding: 6px 9px;
    background: var(--stamp); color: #fff;
    font-family: var(--font-mono);
    font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
    white-space: nowrap;
    transform: rotate(4deg);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.18);
}
.p-badge i.bi { font-size: 10px; }
.p-badge-best { background: var(--accent-deep); transform: rotate(-4deg); }
.p-badge-trial { background: transparent; color: var(--text-3); border: 1px dashed var(--border-strong); box-shadow: none; transform: rotate(-3deg); }
.p-card-pop .p-badge { background: var(--accent-deep); }

.p-header { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border); position: relative; }
.p-header::after {
    content: ''; position: absolute; left: 0; bottom: -1px;
    width: 34px; height: 1px; background: var(--accent-deep);
}
.p-header h3 {
    font-family: var(--font-jp);
    font-size: 14px; font-weight: 700; margin-bottom: 12px; letter-spacing: 0.06em;
    color: var(--text-2); text-transform: uppercase;
}
.p-price { display: flex; align-items: baseline; gap: 5px; }
.p-val {
    font-family: var(--font-display);
    font-size: 46px; color: var(--text); line-height: 1;
}
.p-cur { font-size: 20px; color: var(--accent-ink); font-weight: 600; }
.p-period {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px; color: var(--text-3); margin-top: 7px; letter-spacing: 0.08em;
}
.p-save {
    display: inline-block; padding: 3px 8px; margin-top: 9px;
    background: var(--success-bg); border: 1px solid var(--success-border);
    color: var(--success);
    font-family: var(--font-mono);
    font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
}

.p-list { list-style: none; margin-bottom: 20px; flex: 1; }
.p-list li {
    padding: 7px 0 7px 26px; font-size: 13.5px; color: var(--text-2);
    position: relative; line-height: 1.5;
}
.p-list li::before {
    /* чекмарк — пятилепестковая сакура */
    content: ''; position: absolute; left: 0; top: 9px;
    width: 15px; height: 15px;
    background: var(--petal-deep);
    background-size: contain; background-repeat: no-repeat;
    opacity: 0.9;
}

/* Перфорация перед кнопкой */
.p-card .btn-block { position: relative; margin-top: 18px; }
.p-card .btn-block::before {
    content: ''; position: absolute; top: -10px; left: -24px; right: -24px;
    border-top: 1px dashed var(--border-strong);
    pointer-events: none;
}

/* --- Sponsor block --- */
.sponsor-toggle-cb { display: none !important; }
.sp-block { margin-bottom: 4px; margin-top: 16px; }
.sp-block-shell {
    display: flex; align-items: flex-start; gap: 6px;
    padding: 10px 10px 10px 12px;
    border: 1px dashed var(--border-accent);
    background: rgba(214, 70, 114, 0.05);
    transition: border-color 0.2s, background 0.2s;
}
.sp-block-shell:hover { border-color: var(--accent-ink); background: rgba(214, 70, 114, 0.09); }
.sp-block.sp-on .sp-block-shell { border-style: solid; border-color: var(--accent-ink); background: rgba(214, 70, 114, 0.1); }
.sp-block-inner { display: block; flex: 1; cursor: pointer; }
.sp-top { display: flex; align-items: center; gap: 8px; }
.sp-icon {
    width: 18px; height: 18px;
    min-width: 18px; min-height: 18px; max-width: 18px; max-height: 18px;
    display: inline-block; vertical-align: middle;
    object-fit: contain; flex-shrink: 0;
    position: relative; top: -1px;
}
.sp-icon--lg {
    width: 32px; height: 32px;
    min-width: 32px; min-height: 32px; max-width: 32px; max-height: 32px;
    top: 0;
}
.sp-title { font-size: 12px; font-weight: 700; color: var(--text); flex: 1; }
.sp-sw {
    width: 34px; height: 18px; flex-shrink: 0;
    background: var(--border); position: relative; transition: background 0.25s;
}
.sp-sw::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 14px; height: 14px;
    background: var(--text-2); transition: transform 0.25s, background 0.25s;
}
.sp-block.sp-on .sp-sw { background: var(--accent-deep); }
.sp-block.sp-on .sp-sw::after { transform: translateX(16px); background: #fff; }
.sp-sub { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-left: 26px; flex-wrap: wrap; }
.sp-gift {
    font-family: var(--font-mono);
    font-size: 10.5px; font-weight: 600; color: var(--accent-ink);
    background: rgba(214, 70, 114, 0.1); border: 1px solid rgba(214, 70, 114, 0.3);
    padding: 2px 8px;
}
.sp-gift--dim { background: transparent; border-color: transparent; color: var(--text-3); padding-left: 0; }
.sp-price { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.sp-info-btn {
    width: 22px; height: 22px; flex-shrink: 0;
    border: 1px solid rgba(214, 70, 114, 0.35);
    background: rgba(214, 70, 114, 0.12); color: var(--accent-ink);
    font-size: 11px; font-weight: 800; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s; margin-top: 2px;
}
.sp-info-btn:hover { background: rgba(214, 70, 114, 0.3); }

/* Sponsor info list (modal) */
.sponsor-modal-head { text-align: center; margin-bottom: 22px; }
.sponsor-modal-icon { margin-bottom: 10px; }
.sponsor-modal-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 22px; margin-bottom: 6px; }
.sponsor-modal-head p { font-size: 13px; color: var(--text-3); }
.sponsor-modal-note { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 16px; line-height: 1.5; }
.sponsor-info-list { list-style: none; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.sponsor-info-list li { display: flex; gap: 12px; align-items: flex-start; }
.sponsor-info-list li div { display: flex; flex-direction: column; gap: 2px; }
.sponsor-info-icon { font-size: 18px; flex-shrink: 0; line-height: 1.3; }
.sponsor-info-list strong { font-size: 14px; color: var(--text); }
.sponsor-info-list span { font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* ==========================================================================
   Apps — редакционная таблица
   ========================================================================== */
.apps-rows { border-top: 1px solid var(--border-strong); }
.a-row {
    display: grid;
    grid-template-columns: 60px 56px 1fr auto auto;
    gap: 20px; align-items: center;
    padding: 18px 6px;
    border-bottom: 1px solid var(--border);
    background: transparent;
    transition: background 0.22s ease, padding-left 0.22s ease;
}
.a-row:hover { background: var(--bg-card); padding-left: 16px; }
.a-row-num {
    font-family: var(--font-mono);
    font-size: 9.5px; letter-spacing: 0.18em; color: var(--text-3);
}
.a-icon {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    background: var(--icon-tile); border: 1px solid var(--border);
    padding: 9px;
}
.a-icon img { width: 100%; height: 100%; object-fit: contain; }
.a-row-main h3 { font-size: 15px; font-weight: 700; margin-bottom: 2px; letter-spacing: 0.01em; }
.a-row-main p { font-size: 12.5px; color: var(--text-3); }
.a-row-tag {
    font-family: var(--font-mono);
    font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--text-3);
    border: 1px solid var(--border);
    padding: 4px 9px;
}
.a-row-stamp {
    font-family: var(--font-mono);
    font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent-ink);
    border: 1px solid var(--accent-deep);
    padding: 5px 9px;
    transform: rotate(-3deg);
    background: rgba(214, 70, 114, 0.06);
}

/* ==========================================================================
   FAQ — узкая колонка
   ========================================================================== */
.faq-container { max-width: 860px; margin: 0; }
.faq-list {
    display: flex; flex-direction: column;
    border-top: 1px solid var(--border-strong);
}
.faq-item { border-bottom: 1px solid var(--border); transition: background 0.25s; }
.faq-item:hover, .faq-item.active { background: var(--bg-card); }
.faq-q {
    width: 100%; display: flex; align-items: center; gap: 18px;
    padding: 23px 14px;
    background: none; border: none; cursor: pointer;
    color: var(--text); text-align: left;
    font-family: var(--font-display); font-weight: 400; font-size: 17px;
    transition: color 0.2s;
}
.faq-q::before {
    content: '+'; order: -1;
    color: var(--accent-ink); font-family: var(--font-mono); font-size: 20px; line-height: 1;
    flex-shrink: 0;
    width: 22px; text-align: center;
    transition: transform 0.3s ease;
}
.faq-item.active .faq-q::before { content: '−'; transform: rotate(180deg); }
.faq-item.active .faq-q { color: var(--accent-ink); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-a p { padding: 0 14px 24px 54px; font-size: 14px; color: var(--text-2); line-height: 1.7; max-width: 700px; }
.faq-item.active .faq-a { max-height: 280px; }

/* ==========================================================================
   CTA — финальная сцена
   ========================================================================== */
.cta-scene {
    position: relative; overflow: hidden;
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    padding: 96px 0 110px;
}
.cta-scene::before {
    content: ''; position: absolute;
    width: 460px; height: 460px; border-radius: 50%;
    border: 1px solid var(--border);
    left: -180px; bottom: -260px;
    pointer-events: none;
}
.cta-grid {
    display: grid; grid-template-columns: 1.15fr 0.85fr;
    gap: 4vw; align-items: center;
}
.cta-jp {
    display: block;
    font-family: var(--font-jp);
    font-size: 12px; letter-spacing: 0.4em;
    color: var(--accent-ink);
    margin-bottom: 18px;
}
.cta-title {
    font-family: var(--font-display);
    font-size: clamp(34px, 4.6vw, 58px);
    font-weight: 400; letter-spacing: -0.035em; line-height: 1.1;
    margin-bottom: 18px;
}
.cta-title em { font-style: normal; color: var(--accent-ink); }
.cta-desc { font-size: 15.5px; color: var(--text-2); max-width: 460px; margin-bottom: 32px; line-height: 1.7; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.cta-art {
    position: relative;
    display: flex; justify-content: center; align-items: flex-end;
    min-height: 380px;
}
.cta-branch {
    position: absolute; top: 6px; left: -10px; width: 240px;
    color: var(--accent-ink); opacity: 0.85; z-index: 1;
}
.cta-character {
    position: relative; z-index: 2;
    width: min(74%, 300px);
    filter: drop-shadow(0 14px 30px rgba(8, 4, 10, 0.4));
}
html.light-theme .cta-character { filter: drop-shadow(0 14px 26px rgba(84, 40, 56, 0.2)); }
.cta-stamp {
    position: absolute; z-index: 3; right: 8%; bottom: 20px;
    width: 58px; height: 58px;
    border: 2px solid var(--stamp); color: var(--stamp);
    display: grid; place-content: center;
    font-family: var(--font-display); font-size: 20px;
    transform: rotate(8deg);
    background: rgba(194, 55, 99, 0.05);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--bg); border-top: 1px solid var(--border); padding: 60px 0 34px; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; margin-bottom: 44px; }
.footer-brand p { color: var(--text-3); font-size: 14px; margin-top: 14px; max-width: 300px; }
.footer-jp {
    display: block; margin-top: 10px;
    font-family: var(--font-jp);
    font-size: 11px; letter-spacing: 0.3em; color: var(--text-3); opacity: 0.7;
}
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; max-width: 580px; justify-content: flex-end; }
.footer-nav a {
    color: var(--text-2); text-decoration: none; font-size: 13px; font-weight: 600;
    transition: color 0.2s;
    display: inline-flex; align-items: center; gap: 6px;
    border-bottom: 1px solid transparent; padding-bottom: 2px;
}
.footer-nav a:hover { color: var(--accent-ink); border-bottom-color: var(--accent-ink); }
.footer-nav .tg-icon { width: 14px; height: 14px; }
.footer-bottom { text-align: center; padding-top: 26px; border-top: 1px solid var(--border); }
.footer-bottom p { color: var(--text-3); font-size: 13px; }

/* ==========================================================================
   Modals & forms (payment, sponsor)
   ========================================================================== */
.modal {
    display: none; position: fixed; inset: 0; z-index: 1000;
    align-items: center; justify-content: center; padding: 20px;
}
.modal.active { display: flex; }
.modal .modal-overlay {
    position: absolute; inset: 0; background: var(--overlay-bg);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.modal-content {
    position: relative; background: var(--modal-bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl); padding: 36px;
    max-width: 440px; width: 100%;
    max-height: calc(100vh - 40px); overflow-y: auto;
    animation: modal-in 0.35s ease;
    box-shadow: var(--shadow);
}
.modal-content::before {
    content: ''; position: absolute; top: 0; left: 24px; right: 24px; height: 2px;
    background: var(--accent-deep);
}
@keyframes modal-in { from { opacity: 0; transform: scale(0.96) translateY(14px); } to { opacity: 1; transform: none; } }

.modal-close {
    position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
    background: var(--bg-card); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-2); cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.modal-close:hover { border-color: var(--border-accent); color: var(--accent-ink); }

.modal-head { text-align: center; margin-bottom: 26px; }
.modal-logo { width: 56px; height: 56px; margin: 0 auto 14px; border: 1px solid var(--border-strong); }
.modal-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 24px; margin-bottom: 8px; }
.modal-plan-info { color: var(--text-2); font-size: 15px; }
.modal-plan-info strong { color: var(--accent-ink); }
.modal-sponsor-badge {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 8px; padding: 5px 12px;
    background: rgba(214, 70, 114, 0.1);
    border: 1px solid rgba(214, 70, 114, 0.3);
    font-size: 13px; font-weight: 600; color: var(--accent-soft);
}
html.light-theme .modal-sponsor-badge { color: var(--accent-ink); }
@media (prefers-color-scheme: light) {
    html:not(.dark-theme) .modal-sponsor-badge { color: var(--accent-ink); }
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10.5px; font-weight: 500; color: var(--text-2);
    text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 8px;
}
.form-group input {
    width: 100%; padding: 13px 16px; background: var(--input-bg);
    border: 1px solid var(--input-border); border-radius: var(--radius-sm);
    color: var(--text); font-size: 15px; font-family: inherit;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.form-group input:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 3px rgba(214, 70, 114, 0.14); }
.form-group input::placeholder { color: var(--text-3); }
.form-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--text-3); }

/* Inline code-verify block (email confirmation) */
.verify-block {
    margin-top: 12px; padding: 14px;
    background: rgba(214, 70, 114, 0.07);
    border: 1px solid rgba(214, 70, 114, 0.22);
}
.verify-block p { font-size: 13px; margin: 0 0 10px; color: var(--text-2); line-height: 1.5; }
.verify-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.verify-input {
    flex: 1; min-width: 100px; padding: 10px 12px;
    border-radius: var(--radius-sm); border: 1px solid var(--input-border);
    background: var(--bg-elevated); color: var(--text); font-family: inherit; font-size: 15px;
    letter-spacing: 0.2em;
}
.verify-input:focus { outline: none; border-color: var(--accent-ink); }
.verify-confirm-btn {
    background: rgba(214, 70, 114, 0.16); color: var(--accent-ink);
    border: 1px solid rgba(214, 70, 114, 0.35); border-radius: var(--radius-sm);
    padding: 0 14px; font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center;
    white-space: nowrap; cursor: pointer; transition: background 0.2s;
}
.verify-confirm-btn:hover { background: rgba(214, 70, 114, 0.28); }
.verify-wrong-link {
    margin-top: 10px; background: none; border: none; color: var(--text-3);
    font-size: 12.5px; cursor: pointer; text-decoration: underline; padding: 0; font-family: inherit;
}
.verify-wrong-link:hover { color: var(--text-2); }
.verify-ok { display: none; margin-top: 8px; font-size: 13px; color: var(--success); }
.verify-ok button {
    background: none; border: none; color: var(--accent-ink); font-size: 12.5px;
    cursor: pointer; text-decoration: underline; padding: 0; margin-left: 6px; font-family: inherit;
}
.sent-hint { display: none; margin-top: 8px; font-size: 13px; color: var(--success); line-height: 1.5; }

/* Promo */
.promo-label { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.promo-label i { font-size: 14px; }
.promo-wrap { display: none; margin-top: 6px; }
.promo-row { display: flex; gap: 8px; align-items: stretch; }
.promo-input {
    flex: 1; padding: 10px 12px; text-transform: uppercase;
    border-radius: var(--radius-sm); border: 1px solid var(--input-border);
    background: var(--input-bg); color: var(--text); font-family: inherit; font-size: 14px;
}
.promo-input:focus { outline: none; border-color: var(--accent-ink); }
.promo-apply-btn {
    background: rgba(214, 70, 114, 0.13); color: var(--accent-ink);
    border: 1px solid rgba(214, 70, 114, 0.3); border-radius: var(--radius-sm);
    padding: 0 14px; font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center;
    white-space: nowrap; cursor: pointer; transition: background 0.2s;
}
.promo-apply-btn:hover { background: rgba(214, 70, 114, 0.25); }
.promo-result { margin-top: 6px; font-size: 13px; display: none; }

/* Email exists warning */
.email-exists-warn {
    display: flex; gap: 12px; padding: 16px;
    background: rgba(240, 184, 96, 0.07);
    border: 1px solid rgba(240, 184, 96, 0.28);
    border-radius: var(--radius-sm); margin-bottom: 18px;
    animation: modal-in 0.25s ease;
}
.email-exists-warn .warn-icon { color: var(--warning); flex-shrink: 0; margin-top: 2px; }
.email-exists-warn .warn-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.email-exists-warn .warn-text { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.email-exists-warn .warn-text strong { color: var(--accent-ink); }
.email-exists-warn .warn-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.warn-btn {
    padding: 8px 16px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 700;
    font-family: inherit; cursor: pointer; border: none; transition: all 0.2s;
}
.warn-btn-primary { background: var(--accent-deep); color: #fff; }
.warn-btn-primary:hover { background: var(--accent-deep-h); }
.warn-btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.warn-btn-ghost:hover { border-color: var(--border-strong); color: var(--text); }
.warn-reset-ok {
    display: flex; align-items: center; gap: 6px; margin-top: 10px;
    font-size: 13px; font-weight: 600; color: var(--success);
}

.extra-pay-wrap { display: none; margin-top: 8px; text-align: center; }
.extra-pay-btn {
    background: transparent; border: none; color: var(--text-3);
    font-size: 13px; cursor: pointer; text-decoration: underline;
    padding: 4px 0; font-family: inherit; transition: color 0.2s;
}
.extra-pay-btn:hover { color: var(--text-2); }

.pay-secure {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 18px; color: var(--text-3); font-size: 12px;
}
.pay-legal { margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--text-3); text-align: center; }
.pay-legal a { color: var(--accent-ink); }

.spinner { width: 20px; height: 20px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-loader { display: inline-flex; align-items: center; justify-content: center; }
.btn-text { display: inline-flex; align-items: center; gap: 8px; }

/* Баннер распродажи, инжектимый общим script.js инлайн-стилями, —
   перебиваем под брендовую палитру (только страницы этого файла) */
#pricing .container > div:not([class]) {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-accent) !important;
    border-radius: var(--radius-sm) !important;
}
#pricing .container > div:not([class]) i.bi,
#pricing .container > div:not([class]) span { color: var(--accent-ink) !important; }

/* ==========================================================================
   Account popup (main page)
   ========================================================================== */
.account-popup-overlay { display: none; position: fixed; inset: 0; z-index: 299; }
.account-popup-overlay.active { display: block; }

.account-popup {
    display: none; position: fixed; z-index: 300;
    width: 320px;
    background: var(--modal-bg); border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl); box-shadow: var(--shadow);
    overflow: hidden;
    animation: popupIn 0.2s ease;
}
.account-popup.active { display: block; }
@keyframes popupIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.account-popup-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    background: rgba(214, 70, 114, 0.05);
}
.account-popup-user { display: flex; align-items: center; gap: 12px; }
.account-popup-avatar {
    width: 40px; height: 40px; overflow: hidden;
    background: var(--accent-deep); color: #fff; font-weight: 700; font-size: 18px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.account-popup-login { font-weight: 700; font-size: 15px; color: var(--text); }
.account-popup-email { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.account-popup-body { padding: 12px 20px; }
.account-popup-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid var(--border);
}
.account-popup-row:last-of-type { border-bottom: none; }
.account-popup-label { font-size: 13px; color: var(--text-2); }
.account-popup-label i.bi { font-size: 16px; vertical-align: -2px; margin-right: 6px; color: var(--text-3); }
.account-popup-value { font-size: 14px; font-weight: 700; color: var(--text); }
.account-popup-balance { color: var(--accent-ink); }
.account-popup-topup { padding-top: 10px; }
.account-popup-topup-row { display: flex; gap: 8px; }
.account-popup-topup-input {
    flex: 1; padding: 9px 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--input-border); background: var(--input-bg);
    color: var(--text); font-size: 14px; outline: none; font-family: inherit;
}
.account-popup-topup-input:focus { border-color: var(--accent-ink); }
.account-popup-topup-input::placeholder { color: var(--text-3); }
.account-popup-topup-btn {
    padding: 9px 16px; border-radius: var(--radius-sm); border: none;
    background: var(--accent-deep); color: #fff; font-weight: 700; font-size: 12px;
    cursor: pointer; transition: background 0.2s; white-space: nowrap;
}
.account-popup-topup-btn:hover { background: var(--accent-deep-h); }
.account-popup-topup-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.account-popup-footer {
    padding: 10px 20px 14px; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between;
}
.account-popup-action {
    padding: 8px 0; font-size: 13px; font-weight: 600; color: var(--text-2); text-decoration: none;
    background: none; border: none; cursor: pointer; transition: color 0.2s;
    display: inline-flex; align-items: center; gap: 6px;
}
.account-popup-action:hover { color: var(--text); }
.account-popup-logout { color: var(--error); }
.account-popup-logout:hover { color: var(--error); opacity: 0.8; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1240px) {
    .hero-side-rail { display: none; }
}

@media (max-width: 1024px) {
    .pricing-row { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .p-card-pop { margin-top: 0; padding-top: 30px; }
    .route-steps { grid-template-columns: repeat(2, 1fr); gap: 34px; }
    .route-line { display: none; }
    .f-row { grid-template-columns: 70px 1fr auto; }
    .f-row-text { grid-column: 2 / 4; }
}

@media (max-width: 900px) {
    .hero { padding: 118px 0 60px; }
    .hero-grid { grid-template-columns: 1fr; gap: 44px; }
    .hero-scene { order: -1; padding-bottom: 40px; max-width: 560px; margin: 0 auto; width: 100%; }
    .scene-frame { min-height: 460px; }
    .scene-character { width: min(70%, 320px); }

    .section-head-left { grid-template-columns: 1fr; }
    .tate-index { writing-mode: horizontal-tb; border-left: 0; border-top: 1px solid var(--border); padding: 10px 0 0; letter-spacing: 0.6em; }

    .cta-grid { grid-template-columns: 1fr; }
    .cta-art { min-height: 320px; order: -1; }
}

@media (max-width: 768px) {
    /* Mobile nav drawer */
    .nav {
        position: fixed; top: 0; right: 0;
        width: min(340px, 100vw); height: 100vh;
        padding: 90px 22px 28px;
        border-left: 1px solid var(--border);
        flex-direction: column; align-items: stretch; gap: 4px;
        background: var(--bg-2);
        backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
        transform: translateX(100%); transition: transform 0.35s ease;
        box-shadow: -20px 0 50px rgba(0, 0, 0, 0.35); z-index: 205;
    }
    .nav.open { transform: translateX(0); }
    .nav-link { padding: 15px 16px; width: 100%; font-size: 13px; letter-spacing: 0.1em; }
    .nav-link::after { display: none; }
    .nav-actions {
        flex-direction: column; width: 100%; gap: 9px;
        margin: 20px 0 0; padding: 20px 0 0; border-top: 1px solid var(--border); border-left: 0;
    }
    .nav-proxy, .nav-login, .nav-account-btn { width: 100%; justify-content: center; padding: 13px 16px; }
    .theme-toggle { margin-top: 7px; align-self: center; }
    .burger { display: flex; }

    .apps-rows .a-row { grid-template-columns: 48px 1fr auto; gap: 14px; }
    .a-row-num, .a-row-stamp { display: none; }

    .footer-top { flex-direction: column; align-items: flex-start; }
    .footer-nav { justify-content: flex-start; max-width: none; }

    .account-popup { width: calc(100vw - 32px); left: 16px !important; right: 16px !important; top: 72px !important; }
    .nav-account-name { display: none; }
    .nav-account-btn { padding: 6px 12px 6px 6px; }

    .route-steps { grid-template-columns: 1fr; gap: 30px; }
    .route-step { padding-top: 0; padding-left: 34px; }
    .route-step::before {
        content: ''; position: absolute; left: 6px; top: 24px; bottom: -30px;
        width: 1px; background: var(--border-strong);
    }
    .route-step:last-child::before { display: none; }
    .route-node { top: 2px; }
}

@media (max-width: 600px) {
    .container { padding: 0 18px; }
    .hero { padding: 104px 0 46px; }
    .hero-title { font-size: clamp(38px, 10.5vw, 46px); }
    .hero-desc { font-size: 15px; }
    .scene-frame { min-height: 400px; }
    .scene-character { width: min(74%, 280px); max-height: 400px; }
    .scene-jp { left: 22px; top: 24px; }
    .scene-status { left: 22px; bottom: 20px; }
    .scene-index { right: 22px; bottom: 21px; }
    .scene-branch { width: 220px; right: -20px; }
    .scene-ticket { right: -8px; bottom: 4px; padding: 10px 14px; gap: 8px; }
    .scene-ticket-route { display: none; }

    .section { padding: 76px 0; }
    .section-title { font-size: clamp(28px, 8vw, 36px); }

    .f-row { grid-template-columns: 56px 1fr; gap: 6px 18px; padding: 24px 4px; }
    .f-row-spec { grid-column: 2; justify-self: start; margin-top: 4px; }
    .f-row-text { grid-column: 2; }

    .pricing-row { grid-template-columns: 1fr; max-width: 430px; margin: 0 auto; }

    .signal-marquee { margin: 6px 0 30px; transform: rotate(-1deg); }
    .logo-jp { display: none; }
    .faq-a p { padding-left: 54px; }
}

@media (max-width: 480px) {
    .hero-actions .btn { width: 100%; }
    .hero-inline-link { margin: 4px auto 0; width: 100%; text-align: center; }
    .hero-metrics { flex-wrap: wrap; gap: 14px; }
    .metric { padding: 0 18px; }
    .metric:first-child { padding-left: 0; }
    .metric-val { font-size: 24px; }
    .modal-content { padding: 28px 20px; }
    .cta-actions .btn { width: 100%; }
}

@media (max-width: 360px) {
    .hero-metrics { flex-direction: column; align-items: flex-start; gap: 12px; }
    .metric { padding: 0; }
    .metric-sep { display: none; }
    .nav { width: 100vw; }
}

@media (max-height: 520px) and (orientation: landscape) {
    .hero { padding: 100px 0 40px; }
    .hero-scene { display: none; }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.1s !important;
    }
    .signal-track { animation: none; }
    .route-packet { display: none; }
    .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}

@media print {
    .ambient-bg, .header, .modal, .signal-marquee, .cta-art { display: none; }
    body { background: #fff; color: #000; }
}
