/* Pifagor Trade — серьёзный стиль с фонами и чёткими кнопками */
/* Unbounded подключается через <link> в HTML для быстрой загрузки */

:root {
    --bg-overlay: rgba(12, 18, 28, 0.88);
    --text: #f0f2f5;
    --text-muted: #9ca3af;
    --border: rgba(255, 255, 255, 0.12);
    --btn-bg: rgba(255, 255, 255, 0.06);
    --btn-border: rgba(255, 255, 255, 0.2);
    --btn-hover: rgba(255, 255, 255, 0.12);
    --accent: #7c9ab8;
    --neon-green: rgba(57, 255, 20, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a, button, [role="button"], [type="button"], [type="submit"] {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Убирает 300ms задержку тапа на мобильных — кнопки реагируют мгновенно */
body {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    font-family: 'DM Sans', -apple-system, sans-serif;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    font-size: 16px;
    position: relative;
    overflow-x: hidden;
    background: #0f172a;
    padding-bottom: 4.5rem;
}

/* Аватар пользователя Telegram: в самом верхнем правом углу, ведёт в профиль */
.page-home .header {
    position: relative;
}
.tg-user-avatar {
    position: absolute;
    top: 6px;
    right: 8px;
    flex-shrink: 0;
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    transition: opacity 0.2s, box-shadow 0.2s;
}
.tg-user-avatar:hover {
    opacity: 0.9;
}

.tg-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ========== Страница ========== */
.page {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== Шапка ========== */
.header-line-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    margin-bottom: 0;
    padding-bottom: 1.5rem;
}

.back-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-shadow: 0 0 12px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.9);
    background: linear-gradient(135deg, rgba(30, 50, 70, 0.98) 0%, rgba(15, 25, 40, 0.98) 100%);
    border: 1px solid rgba(124, 154, 184, 0.3);
    transition: all 0.2s ease;
}

.back-link:hover {
    background-color: rgba(30, 45, 65, 0.95);
    border-color: rgba(124, 154, 184, 0.4);
    transform: scale(1.02);
}

.back-link:active {
    transform: scale(0.98);
}

.header-line {
    flex: 1;
    height: 1px;
    min-width: 0;
    background: var(--border);
}

.admin-page .header-line-row {
    margin-top: 0;
    margin-bottom: 1.5rem;
}


.header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-reset-btns {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.header-reset-btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.6rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    -webkit-tap-highlight-color: transparent;
}

.header-reset-btn:hover {
    color: var(--accent);
}

.header {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

/* Страницы с кнопкой «Назад»: одна линия справа от кнопки, без второй линии снизу */
.header:has(.header-line-row) {
    padding-bottom: 0;
    border-bottom: none;
}

.header:has(.header-line-row) .header-line-row {
    margin-top: 2.25rem;
    padding-bottom: 1.125rem;
}

/* Центрируем блок «Назад» между слоганом и заголовком */
.header:has(.header-line-row) + .main {
    padding-top: 1.125rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.9;
}

.logo:focus {
    outline: none;
}

.logo picture {
    display: block;
    line-height: 0;
}
.logo-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.logo-text {
    font-family: 'Unbounded', sans-serif;
    font-size: 2.25rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.02em;
}

.logo:hover .logo-text {
    color: var(--accent);
}

/* Главная: кнопка «Перейти на сайт» — на всю ширину сетки, по центру */
.page-home .btn-website-link {
    grid-column: 1 / -1;
    justify-self: center;
    align-self: start;
    width: auto;
    max-width: min(100%, 20rem);
}

.btn-website-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.btn-website-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.btn-website-link:active {
    background: rgba(255, 255, 255, 0.04);
}

.full-reset-btn {
    flex-shrink: 0;
    padding: 0.2rem 0.4rem;
    font-size: 0.6rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.full-reset-btn:hover {
    color: var(--accent);
}

.tagline {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
}

.home-banner {
    display: flex;
    align-items: flex-end;
    margin-top: 1.25rem;
    padding: 0;
    min-height: 0;
    aspect-ratio: 3 / 1;
    width: 100%;
    border-radius: 20px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 3px solid rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1e293b;
    position: relative;
    overflow: hidden;
}

.home-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    pointer-events: none;
}

.home-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, transparent 55%);
    pointer-events: none;
}

.home-banner:hover {
    transform: scale(1.01);
    border-color: rgba(251, 191, 36, 0.9);
    box-shadow: 0 0 32px rgba(251, 191, 36, 0.3), 0 4px 16px rgba(0, 0, 0, 0.4);
}

.home-banner:active {
    transform: scale(0.99);
}

.home-banner-text {
    position: relative;
    z-index: 1;
    padding: 1.25rem 1.5rem;
    margin-top: auto;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.02em;
    line-height: 1.4;
    text-shadow: 0 0 24px rgba(0, 0, 0, 1), 0 0 10px rgba(0, 0, 0, 0.95), 0 2px 6px rgba(0, 0, 0, 0.9);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.15) 70%, transparent 100%);
}

/* ========== Основной контент ========== */
.main {
    flex: 1;
    padding: 2.5rem 0;
}

/* ========== Главная: сетка карточек с картинками ========== */
/* Фиксированные размеры кнопок (не менять при работе с изображениями):
   - Сетка: 2 колонки, gap 0.75rem
   - Обычные карточки: aspect-ratio 1/1 (квадрат)
   - CTA «Бесплатный доступ»: aspect-ratio 2.2/1, grid-column 1/-1
   - border-radius: 24px */
.home-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.home-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: flex-end;
    padding: 0;
    border: none;
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.home-card-img {
    background-color: #1e293b;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    aspect-ratio: 1 / 1;
}

.home-card-img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 40%, transparent 100%);
    pointer-events: none;
}

.home-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--neon-green) 0%, transparent 60%);
    pointer-events: none;
}

/* Открытый конверт — картинка на всю кнопку */
.home-card-investors {
    background-size: cover;
    background-position: center;
}

.home-card-investors::before {
    display: block;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 55%);
}

.home-card-investors::after {
    display: none;
}

.home-card-text {
    position: relative;
    z-index: 1;
    padding: 1rem 1.25rem;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-shadow: 0 0 20px rgba(0, 0, 0, 1), 0 0 8px rgba(0, 0, 0, 0.95), 0 2px 4px rgba(0, 0, 0, 0.9);
    line-height: 1.3;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
    margin-top: auto;
}

.home-card:hover {
    transform: scale(1.02);
}

.home-card:active {
    transform: scale(0.98);
}

.home-card-cta {
    grid-column: 1 / -1;
    aspect-ratio: 2.2 / 1;
    border: 2px solid rgba(124, 154, 184, 0.5);
    box-shadow: 0 0 20px rgba(124, 154, 184, 0.15);
}

.home-card-cta:hover {
    border-color: var(--accent);
    box-shadow: 0 0 24px rgba(124, 154, 184, 0.25);
    transform: scale(1.02);
}

.home-card-cta .home-card-text {
    font-size: 1.15rem;
}

/* Главная: обрезка ~20% для компактного отображения всех кнопок */
.page-home .header {
    padding-bottom: 1.25rem;
}

.page-home .main {
    padding: 1.25rem 0 1.5rem;
}

.page-home .home-cards-grid {
    gap: 0.6rem;
    margin-top: 0.5rem;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.page-home .home-card {
    border-radius: 20px;
}

.page-home .home-card-text {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.page-home .home-card-cta .home-card-text {
    font-size: 1rem;
}

.page-home .home-card-cta {
    aspect-ratio: 2.4 / 1;
}

/* Мини-курс: жёлтое свечение за кнопкой, редкое мерцание */
@keyframes mini-course-card-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(251, 191, 36, 0.15), 0 0 20px rgba(124, 154, 184, 0.15);
    }
    50% {
        box-shadow: 0 0 25px rgba(251, 191, 36, 0.5), 0 0 35px rgba(251, 191, 36, 0.25), 0 0 20px rgba(124, 154, 184, 0.15);
    }
}

.home-card-mini-course {
    animation: mini-course-card-glow 3.6s ease-in-out infinite;
}

.home-card-mini-course:hover {
    animation: none;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.4), 0 0 24px rgba(124, 154, 184, 0.25);
}

/* Мини-курс скрыт. Чтобы вернуть: удалите класс home-card-hidden у карточки в index.html */
.home-card-hidden,
nav.home-cards-grid .home-card-hidden {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    pointer-events: none !important;
}

/* ========== Кнопки (для других страниц) ========== */
.btn {
    display: block;
    padding: 1rem 1.25rem;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
}

button.btn {
    -webkit-tap-highlight-color: transparent;
    width: 100%;
    max-width: 100%;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    touch-action: manipulation;
}

.btn:hover {
    background: var(--btn-hover);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-primary {
    margin-top: 0.5rem;
    background: rgba(124, 154, 184, 0.25);
    border-color: var(--accent);
    color: var(--text);
}

.btn-primary:hover {
    background: rgba(124, 154, 184, 0.35);
}

/* ========== Страница индикаторов ========== */
.page-indicators {
    max-width: 720px;
}

.page-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.disclaimer {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.indicators-video-section {
    margin-bottom: 2rem;
}

.indicators-video-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
    margin-bottom: 1rem;
}

.indicators-video-wrap {
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.indicators-video-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.indicators-video-inner iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.indicators-video-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.indicators-video-link:hover {
    opacity: 0.85;
    text-decoration: underline;
}

.indicators-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.indicators-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
    margin-bottom: 0.5rem;
}

.indicators-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(7, auto);
    grid-auto-flow: column;
    gap: 0.5rem;
}

.indicator-pill {
    padding: 0.6rem 0.75rem;
    min-height: 2.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--btn-border);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.indicator-pill:hover {
    background: var(--btn-hover);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-cta-large {
    display: block;
    width: 100%;
    padding: 1.1rem 1.5rem;
    background: rgba(124, 154, 184, 0.4);
    border: 2px solid var(--accent);
    border-radius: 24px;
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2.5rem;
    transition: all 0.2s;
}

.btn-cta-large:hover {
    background: rgba(124, 154, 184, 0.55);
}

.faq {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.faq-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.page-support .faq-question {
    padding: 0.65rem 0.8rem;
    font-size: 0.975rem;
}

.page-support .faq-question::after {
    font-size: 0.78rem;
}

.page-support .faq-answer {
    padding: 0 0.8rem 0.65rem;
}

.page-support .faq-answer p {
    font-size: 0.975rem;
    margin-bottom: 0.65rem;
}

.page-support .faq-answer h4 {
    font-size: 0.975rem;
}

.page-support .faq-answer ol {
    font-size: 1.05rem;
}

.support-contact {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.support-contact-text {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.btn-support-admin {
    display: inline-block;
    padding: 1rem 1.5rem;
    background: rgba(124, 154, 184, 0.4);
    border: 2px solid var(--accent);
    border-radius: 24px;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-support-admin:hover {
    background: rgba(124, 154, 184, 0.55);
}

.support-contact-link {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.support-contact-link a {
    color: var(--accent);
    text-decoration: none;
}

.support-contact-link a:hover {
    text-decoration: underline;
}

/* Голосовой ассистент ElevenLabs — страница поддержки (мини-приложение) */
.support-voice-section {
    margin: 0 0 1.5rem;
    padding: 0;
    border: 2px solid rgba(51, 144, 236, 0.35);
    border-radius: 14px;
    overflow: hidden;
    background: #0e1621;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
}

.support-voice-header {
    flex-shrink: 0;
    padding: 0.875rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.22);
    background: #212d3b;
}

.support-voice-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: #fff;
}

.support-voice-hint {
    margin: 0;
    font-size: 0.8125rem;
    color: #7d8b99;
    line-height: 1.45;
}

.support-voice-embed-wrap {
    position: relative;
    flex: 1 1 auto;
    /* Стабильно большая область белого чата (не зависит от compact/expanded внутри виджета) */
    min-height: min(580px, 70vh);
    max-height: min(94vh, 1000px);
    /* fixed внутри виджета привязывается к этому блоку; overflow обрезает лист, чтобы не перекрывать заголовок */
    transform: translateZ(0);
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0.65rem 0.65rem 0.75rem;
    background: #0e1621;
    overflow: hidden;
}

/* Аватар помощника до первого сообщения / аудио чата (поверх белой области виджета) */
.support-convai-assistant-placeholder {
    position: absolute;
    /* Выше листа виджета; узел идёт в DOM после elevenlabs-convai, чтобы не перекрывался соседом */
    z-index: 24;
    left: 0.65rem;
    right: 0.65rem;
    top: 0.65rem;
    bottom: 5.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.support-voice-embed-wrap.support-convai-conversation-started .support-convai-assistant-placeholder {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0s linear 0.22s;
}

.support-convai-assistant-placeholder__img {
    width: min(36vw, 140px);
    height: auto;
    max-height: min(22vh, 150px);
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

/* Пока открыта клавиатура и есть фокус в поле ввода — чуть выше запас по высоте */
.support-voice-embed-wrap.support-voice-embed-wrap--convai-input-focus {
    min-height: min(620px, 74vh);
    max-height: min(96vh, 1040px);
}

.support-voice-embed-wrap elevenlabs-convai {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    position: relative;
    z-index: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.support-convai-external-bar {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    padding: 0.55rem 0.25rem 0.15rem;
}

.support-convai-external-bar .support-convai-ext-btn--call:only-of-type {
    width: 100%;
    max-width: 22rem;
}

.support-convai-ext-btn {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 1.15rem;
    border-radius: 10px;
    border: 1px solid rgba(124, 154, 184, 0.45);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background 0.15s, border-color 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.support-convai-ext-btn__icon {
    display: inline-flex;
    flex-shrink: 0;
    line-height: 0;
}

.support-convai-ext-btn__icon svg {
    display: block;
}

.support-convai-ext-btn--call {
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(148, 163, 184, 0.5);
}

.support-convai-ext-btn--call:active {
    background: #334155;
}

.page-support .faq {
    border-top: none;
    padding-top: 0.5rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.faq-item-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s;
}

.faq-item-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.faq-item-link::after {
    content: '→';
    font-size: 0.6rem;
    color: var(--accent);
    flex-shrink: 0;
}

.faq-question {
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 0.6rem;
    color: var(--accent);
    flex-shrink: 0;
}

details[open] .faq-question::after {
    content: '−';
}

.faq-answer {
    padding: 0 0.625rem 0.5rem;
}

.faq-answer p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ol {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.faq-answer ol li {
    margin-bottom: 0.5rem;
}

.faq-link {
    color: var(--accent);
    text-decoration: underline;
}

.faq-link:hover {
    filter: brightness(1.2);
}

/* ========== Нижняя навигация (как в мобильном приложении) ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
    background: rgba(15, 23, 42, 0.98);
    border-top: 1px solid var(--border);
    z-index: 500;
    transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s ease;
}

/* Поле UID: убираем панель, пока открыта клавиатура (см. js/bottom-nav-hide-on-uid-focus.js) */
body.uid-input-focus-hide-bottom-nav .bottom-nav {
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    flex: 1;
    min-width: 0;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.bottom-nav-item:hover {
    color: var(--text);
}

.bottom-nav-active {
    color: var(--accent);
}

.bottom-nav-active:hover {
    color: var(--accent);
}

.bottom-nav-item.is-loading {
    pointer-events: none;
    opacity: 0.9;
}
.bottom-nav-item.is-loading .bottom-nav-icon {
    position: relative;
}
.bottom-nav-item.is-loading .bottom-nav-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid rgba(124, 154, 184, 0.4);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
}
.bottom-nav-item.is-loading .bottom-nav-icon svg {
    opacity: 0.4;
}

.bottom-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
}

.bottom-nav-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bottom-nav-divider {
    width: 1px;
    height: 1.5rem;
    background: var(--border);
    margin: 0 0.25rem;
    flex-shrink: 0;
}

.bottom-nav-back {
    flex: 0 0 auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    margin-left: 10%;
    margin-right: 0.5rem;
}

.bottom-nav-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ========== Страница торговых сигналов ========== */
.page-signals {
    max-width: 720px;
}

.signals-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.signals-intro {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.signals-intro .highlight {
    color: var(--accent);
}

.signals-video-section {
    margin-bottom: 2rem;
}

.signals-video-wrap {
    max-width: 560px;
    margin: 0 auto 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.signals-video-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.signals-video-inner iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.signals-video-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    padding: 0.7rem 1.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2ebf4;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid rgba(124, 154, 184, 0.55);
    background: rgba(124, 154, 184, 0.16);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition:
        border-color 0.2s,
        background 0.2s,
        color 0.2s,
        transform 0.15s ease,
        box-shadow 0.2s;
}

.signals-video-link:hover {
    color: #f5f8fc;
    border-color: rgba(124, 154, 184, 0.9);
    background: rgba(124, 154, 184, 0.28);
    box-shadow: 0 4px 24px rgba(124, 154, 184, 0.18);
    transform: translateY(-1px);
}

.signals-video-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.example-section {
    margin-bottom: 1.5rem;
}

.example-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.example-video-wrap,
.training-video-wrap {
    display: flex;
    flex-direction: column;
}

.example-video {
    position: relative;
    width: 280px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.example-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-fallback-link {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: underline;
}

.video-fallback-link:hover {
    filter: brightness(1.2);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.benefits-section {
    margin-bottom: 1.5rem;
}

.benefits-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
    margin-bottom: 1rem;
}

.benefits-list {
    list-style: none;
    padding: 0;
}

.benefits-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.benefits-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.benefits-list strong {
    color: inherit;
    font-weight: 700;
}

.signals-cta-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.signals-cta-row .btn-cta-large {
    margin-bottom: 0;
}

.btn-cta-secondary {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-muted);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 400;
    transition: all 0.2s;
}

.btn-cta-secondary:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.faq-item-rules {
    margin-top: 1rem;
}

/* ========== Страница писем инвесторам ========== */
.page-investors {
    max-width: 720px;
}

.investors-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.investors-intro {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.investors-features {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.investors-features .highlight {
    color: var(--accent);
}

.investors-format {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.example-video-single {
    width: 100%;
    max-width: 560px;
}

.investors-block .example-section {
    margin-bottom: 1.5rem;
}

.investors-block .btn-cta-large {
    margin-bottom: 0;
}

/* ========== Страница обучения торговле ========== */
.page-training {
    max-width: 800px;
}

.page-title-mono {
    font-family: 'JetBrains Mono', 'DM Sans', monospace;
    font-weight: 500;
}

.training-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.training-benefits {
    margin-bottom: 2.5rem;
}

.benefits-with-video {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: start;
}

.training-benefits-list {
    list-style: none;
    padding: 0;
}

.training-benefits-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.training-benefits-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 8px;
    height: 8px;
    background: var(--accent);
}

.training-video {
    position: relative;
    width: 280px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.training-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.program-section {
    margin-bottom: 2.5rem;
}

.program-blocks-flow {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.program-block {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.program-block-title {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(124, 154, 184, 0.2) 0%, rgba(124, 154, 184, 0.1) 100%);
    border-bottom: 1px solid var(--border);
}

.program-block-list {
    list-style: none;
    padding: 0.75rem 1rem;
}

.program-block-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.program-block-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.85rem;
}

.program-block-arrow {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
    color: var(--accent);
    font-size: 1.5rem;
    line-height: 1;
}

.pricing-section {
    margin-bottom: 2.5rem;
}

/* Обучение: жёлтая пульсирующая подсветка вокруг CTA */
.pricing-cta-highlight {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    border-radius: 20px;
    animation: training-cta-glow-pulse 2.2s ease-in-out infinite;
}

@keyframes training-cta-glow-pulse {
    0%,
    100% {
        box-shadow:
            0 0 0 0 rgba(255, 220, 50, 0),
            0 0 26px rgba(255, 210, 60, 0.22);
    }
    50% {
        box-shadow:
            0 0 0 12px rgba(255, 220, 80, 0.14),
            0 0 52px rgba(255, 215, 0, 0.62);
    }
}

.pricing-cta-highlight > .pricing-card-wrapper {
    position: relative;
    z-index: 1;
}

.pricing-content {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
}

.pricing-info {
    font-size: 0.9rem;
}

.pricing-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pricing-info > .pricing-title {
    color: var(--text);
    margin-bottom: 0;
    line-height: 1.35;
}

.pricing-info p {
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.pricing-price {
    text-align: center;
}

.price-old {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.price-current {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
}

.price-timer {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.btn-buy {
    background: rgba(124, 154, 184, 0.35) !important;
    border-color: var(--accent) !important;
    font-weight: 600;
}

.btn-buy:hover {
    background: rgba(124, 154, 184, 0.5) !important;
}

.pricing-card-wrapper {
    position: relative;
}

.pricing-card-disabled {
    position: relative;
}

/* Диагональное красное «зачёркивание» набора (курс закрыт) */
.pricing-card-disabled::before,
.pricing-card-disabled::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 12px;
}

.pricing-card-disabled::before {
    background: linear-gradient(
        135deg,
        transparent 47%,
        rgba(200, 70, 70, 0.75) 47.5%,
        rgba(200, 70, 70, 0.75) 52.5%,
        transparent 53%
    );
}

.pricing-card-disabled::after {
    background: linear-gradient(
        -45deg,
        transparent 47%,
        rgba(200, 70, 70, 0.75) 47.5%,
        rgba(200, 70, 70, 0.75) 52.5%,
        transparent 53%
    );
}

.price-current--single {
    margin-right: 0;
}

/* Старая цена по центру — зачёркивание красным (акция: фактическая цена на кнопке) */
.price-old-cross-red {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: rgba(200, 70, 70, 0.95);
    text-decoration-thickness: 2px;
}

.pricing-handwritten {
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 1rem;
    text-align: center;
}

/* Мини-ссылка «Отзывы» на линии-разделителе (справа). Без класса .btn — иначе block тянется на 100% ширины. */
.pricing-reviews-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0;
    width: 100%;
    box-sizing: border-box;
}

.pricing-reviews-row::before {
    content: '';
    flex: 1 1 auto;
    min-width: 0;
    height: 1px;
    background: var(--border);
    align-self: center;
}

.pricing-reviews-link {
    flex: 0 0 auto;
    width: max-content;
    max-width: 100%;
    box-sizing: border-box;
    display: inline-block;
    margin: 0;
    padding: 0.1rem 0.35rem;
    font-size: 0.62rem;
    font-weight: 500;
    line-height: 1.15;
    border-radius: 3px;
    border: 1px solid var(--btn-border);
    background: rgba(30, 41, 59, 0.5);
    color: var(--text);
    text-decoration: none;
    text-align: center;
    transition: background 0.15s, border-color 0.15s;
}

.pricing-reviews-link:hover {
    background: var(--btn-hover);
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--text);
}

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* ========== Страница профиля ========== */
.page-profile {
    max-width: 480px;
}

.header-profile {
    padding-bottom: 1rem;
}

.main-profile {
    padding-top: 0.5rem;
}

.profile-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
}

.profile-avatar-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-placeholder {
    font-size: 3rem;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.profile-checkmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: #22c55e;
    border-radius: 50%;
    color: #fff;
    flex-shrink: 0;
}

.profile-checkmark svg {
    width: 0.75rem;
    height: 0.75rem;
}

.profile-handle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.profile-status {
    margin-bottom: 1.5rem;
}

.profile-status-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.profile-status-hint {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 0;
}

.profile-load-error {
    margin: 0.75rem 0;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
}

.profile-load-error-text {
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text);
    margin: 0 0 0.65rem;
}

.btn-profile-retry {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 149, 0, 0.45);
    background: rgba(255, 149, 0, 0.15);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.profile-get-free-cta {
    margin: 1.25rem 0 1rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 149, 0, 0.3);
    background: rgba(255, 149, 0, 0.07);
}

.profile-get-free-cta-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 0.65rem;
    line-height: 1.45;
}

.profile-get-free-cta .btn-profile-get-free {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 149, 0, 0.2);
    border: 1px solid rgba(255, 149, 0, 0.45);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.profile-deposit-notice {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0.75rem 0 0;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(210, 153, 34, 0.35);
    background: rgba(210, 153, 34, 0.08);
}

.btn-profile-confirm {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(124, 154, 184, 0.45);
    border: 2px solid var(--accent);
    border-radius: 24px;
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.2s;
}

.btn-profile-confirm:hover {
    background: rgba(124, 154, 184, 0.6);
}

.btn-profile-confirm--disabled {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--border) !important;
    color: var(--text-muted) !important;
    cursor: default;
    pointer-events: none;
}

.btn-profile-confirm--disabled:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

.profile-data-block {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.profile-data-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.profile-data-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.profile-data-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 5.5em;
}

.profile-data-value {
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-data-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
    vertical-align: middle;
}

.btn-profile-change {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-profile-change:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.btn-profile-change-full {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: 0.6rem 1rem;
}

.profile-data-row-signal {
    align-items: center;
}

.btn-profile-lost-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-profile-lost-link:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.btn-profile-lost-link:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.profile-invite-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.profile-invite-hint[hidden] {
    display: none !important;
    margin: 0;
}

.profile-invite-link-block {
    word-break: break-all;
    margin-bottom: 1rem;
}

.profile-invite-link {
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
}

.profile-invite-link:hover {
    text-decoration: underline;
}

/* ========== Страница «Получить доступ» ========== */
.page-get-free {
    max-width: 720px;
}

.get-free-returning-banner {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(124, 154, 184, 0.35);
    background: rgba(124, 154, 184, 0.08);
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.get-free-returning-banner a {
    color: var(--accent);
    font-weight: 600;
}

.get-free-scenario-panel--wide {
    width: 100%;
    max-width: 100%;
}

.get-free-new-grid--expanded {
    gap: 1rem;
}

.get-free-new-grid--expanded .get-free-new-card {
    min-height: 12.5rem;
    padding: 1.15rem 1.2rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.get-free-hero {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.page-title-get-free {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.5;
    margin-top: 0;
    margin-bottom: 0;
}

.get-free-price {
    display: inline-block;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-top: 0.5rem;
}

.get-free-price u {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Пошаговый сценарий «Бесплатный доступ» (мини-приложение) */
.get-free-flow {
    margin-bottom: 1.5rem;
}

.get-free-landing-kicker {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 1.35rem;
    margin-bottom: 0.85rem;
}

#get-free-bybit-scenario {
    scroll-margin-top: calc(0.75rem + env(safe-area-inset-top, 0px));
}

.get-free-landing-question {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: clamp(1.35rem, 4.5vw, 1.65rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.28;
    letter-spacing: -0.01em;
    margin-bottom: 1.15rem;
}

.get-free-choice-stack {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
}

.get-free-choice-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.5rem;
    width: 100%;
    padding: 1.25rem 1.25rem;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 16px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.get-free-choice-card:hover {
    border-color: rgba(234, 179, 8, 0.45);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.12);
}

.get-free-choice-icon {
    color: #eab308;
    margin-bottom: 0.15rem;
}

.get-free-choice-icon svg {
    display: block;
    width: 36px;
    height: 36px;
}

.get-free-choice-title {
    font-weight: 700;
    font-size: clamp(1.12rem, 3.8vw, 1.38rem);
    line-height: 1.25;
    color: var(--text);
}

.get-free-choice-desc {
    font-size: 0.65rem;
    line-height: 1.35;
    color: var(--text-muted);
}

.get-free-why-callout {
    padding: 0;
    margin-bottom: 1.15rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
    border: none;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.get-free-why-callout p {
    margin: 0;
}

.get-free-why-callout-text {
    margin: 0;
}

.get-free-progress-card {
    padding: 1rem 1.1rem;
    margin-bottom: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.get-free-progress-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.get-free-progress-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0 0 0.2rem;
}

.get-free-progress-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.get-free-progress-badge {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(124, 154, 184, 0.22);
    border: 1px solid rgba(124, 154, 184, 0.4);
    color: var(--text);
}

.get-free-progress-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.get-free-progress-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), rgba(57, 255, 20, 0.75));
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.22);
    transition: width 0.35s ease;
}

.get-free-scenario-panel {
    padding: 1.1rem 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 1.25rem;
}

.get-free-scenario-h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.get-free-scenario-lead {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.get-free-new-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

@media (min-width: 480px) {
    .get-free-new-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.get-free-new-card {
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.get-free-new-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.get-free-new-card-desc {
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-muted);
    margin: 0;
    flex: 1;
}

.get-free-new-card .get-free-new-card-btn {
    margin-top: 0.35rem;
    width: 100%;
    flex-shrink: 0;
    text-align: center;
    font-weight: 600;
}

/* Яркие CTA в сценарии «Бесплатный доступ» */
.get-free-new-card .get-free-new-card-btn--register {
    background: linear-gradient(180deg, #ffd24a 0%, #f5a000 55%, #e89400 100%);
    border: 1px solid rgba(255, 210, 80, 0.95);
    color: #121212;
    border-radius: 999px;
    padding: 0.88rem 1.15rem;
    font-weight: 700;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2), 0 4px 18px rgba(245, 160, 0, 0.42);
}

.get-free-new-card .get-free-new-card-btn--register:hover {
    background: linear-gradient(180deg, #ffe078 0%, #ffb814 50%, #f5a000 100%);
    border-color: #fff2b8;
    color: #0a0a0a;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18), 0 6px 22px rgba(245, 160, 0, 0.55);
}

.get-free-new-card .get-free-new-card-btn--register:focus-visible {
    outline: 2px solid #fff6c2;
    outline-offset: 3px;
}

.get-free-new-card .get-free-new-card-btn--bind {
    background: linear-gradient(180deg, #4dc4ff 0%, #0ea5e9 45%, #0284c7 100%);
    border: 1px solid rgba(125, 211, 252, 0.9);
    color: #fff;
    border-radius: 999px;
    padding: 0.88rem 1.15rem;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18), 0 4px 18px rgba(14, 165, 233, 0.45);
}

.get-free-new-card .get-free-new-card-btn--bind:hover {
    background: linear-gradient(180deg, #7dd3fc 0%, #38bdf8 45%, #0ea5e9 100%);
    border-color: #e0f2fe;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15), 0 6px 22px rgba(14, 165, 233, 0.55);
}

.get-free-new-card .get-free-new-card-btn--bind:focus-visible {
    outline: 2px solid #bae6fd;
    outline-offset: 3px;
}

.get-free-scenario-panel .referral-result {
    margin-top: 1rem;
}

.access-card {
    margin-bottom: 1.5rem;
    text-align: left;
}

.access-price {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
}

.access-note {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.access-note-small {
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.access-note-highlight {
    font-weight: 500;
    color: var(--text);
}

.access-note-why {
    margin-top: 2rem;
    margin-bottom: 3.5rem;
}

.access-options {
    margin-top: 1rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.btn-option {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
}

.btn-option:last-child {
    margin-bottom: 0;
}

.btn-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-option-primary {
    background: rgba(124, 154, 184, 0.4);
    border: 2px solid var(--accent);
    font-weight: 600;
}

.btn-option-primary:hover {
    background: rgba(124, 154, 184, 0.55);
}

/* ========== Модальное окно регистрации ========== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal[hidden] {
    display: none !important;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.75);
}

.modal-content {
    position: relative;
    z-index: 1;
    isolation: isolate;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    max-height: min(90vh, 90dvh);
    overflow-y: auto;
    padding: 2.5rem 1.5rem 1.5rem;
    background: var(--bg-card, #161b22);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 3;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 10px;
    color: var(--text);
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.modal-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(148, 163, 184, 0.4);
}

.modal-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ========== Модальное окно индикатора ========== */
.indicator-modal-content {
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

.indicator-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-right: 2.5rem;
}

.indicator-modal-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.indicator-modal-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-style: italic;
}

.indicator-modal-chart {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.indicator-modal-chart img {
    display: block;
    width: 100%;
    height: auto;
}

.btn-indicator-get {
    display: block;
    width: 100%;
    padding: 0.9rem 1.25rem;
    background: var(--accent);
    border: none;
    border-radius: 24px;
    color: #fff;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    margin-top: 1rem;
    transition: filter 0.2s;
}

.btn-indicator-get:hover {
    filter: brightness(1.15);
}

.indicator-modal-video-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.indicator-modal-video-wrap {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.indicator-modal-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.indicator-modal-video-wrap .video-fallback-link {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--accent);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.modal-checklist {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.modal-checklist li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
}

.partner-code {
    font-size: 1.25rem;
    text-decoration: underline;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-buttons-with-timer {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.modal-buttons-with-timer .btn-modal {
    width: auto;
    flex: 1;
    min-width: 0;
}

.register-modal-link-row {
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.register-modal-link {
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
    word-break: break-all;
}

.register-modal-link:hover {
    filter: brightness(1.2);
}

.register-modal-timer {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-muted);
    min-width: 1.5ch;
    text-align: center;
}

.btn-modal {
    display: block;
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
}

.btn-modal:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-modal:first-child {
    background: rgba(124, 154, 184, 0.35);
    border: 2px solid var(--accent);
}

.btn-modal:first-child:hover {
    background: rgba(124, 154, 184, 0.5);
}

.btn-modal:disabled {
    cursor: default;
    opacity: 1;
}

.btn-modal-secondary {
    font-family: inherit;
    cursor: pointer;
    font-size: 0.88rem;
    padding: 0.5rem 0.75rem;
}

/* Модальное окно проверки реферала */
.modal-content-check .referral-check-form {
    margin: 1rem 0;
}

.check-modal-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.referral-access-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.referral-access-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.referral-telegram-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.check-modal-uid-help {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.check-modal-uid-help summary {
    padding: 0.9rem 1.25rem;
    cursor: pointer;
    list-style: none;
}

.check-modal-uid-help summary::-webkit-details-marker {
    display: none;
}

.uid-help-content {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    border-top: 1px solid var(--border);
}

.uid-help-content h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin: 1rem 0 0.5rem;
}

.uid-help-content h4:first-child {
    margin-top: 0;
}

.uid-help-content a {
    color: var(--accent);
    text-decoration: underline;
}

.uid-help-content a:hover {
    filter: brightness(1.2);
}

.uid-help-img {
    display: block;
    max-width: 100%;
    width: 100%;
    border-radius: 8px;
    margin: 0.75rem 0;
    border: 1px solid var(--border);
}

.faq-images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.faq-images-grid .uid-help-img {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.faq-images-grid .uid-help-img:only-child {
    grid-column: 1 / -1;
}

.referral-check-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.referral-check {
    margin-bottom: 2rem;
}

/* Главный блок — Один шаг (регистрация): без рамки/фона, только заголовок и кнопки */
.not-referral-block-visual {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

/* Только заголовок блока — по центру колонки; остальной текст не трогаем */
.not-referral-block-visual .section-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    width: 100%;
    text-align: center;
}

.not-referral-block-visual .btn-option {
    padding: 1rem 1.25rem;
    font-size: 1rem;
}

.not-referral-block-visual #open-account-referral-modal {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    line-height: 1.35;
    border-radius: 10px;
}

.referral-check-block--primary {
    border: 1px solid rgba(255, 149, 0, 0.35);
    background: rgba(255, 149, 0, 0.06);
}

.referral-check-block--primary .section-title {
    color: var(--text);
    font-weight: 600;
    font-size: 1.05rem;
}

.referral-uid-nudge {
    display: none;
    font-size: 0.8rem;
    color: var(--accent);
    margin: 0.5rem 0 0;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid rgba(255, 149, 0, 0.25);
}

.referral-uid-nudge.is-visible {
    display: block;
}

.referral-check-inline-help {
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

.referral-check-inline-help summary {
    cursor: pointer;
    color: var(--accent);
    list-style: none;
}

.referral-check-inline-help summary::-webkit-details-marker {
    display: none;
}

.referral-check-block {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border);
    border-radius: 12px;
}

.referral-check-block .section-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.referral-check-block .referral-check-hint {
    margin-top: 0.25rem;
}

.referral-check-block .referral-input,
.referral-check-block .btn-check {
    opacity: 0.9;
}

.referral-check-form .btn-check {
    flex-shrink: 0;
    min-width: 7rem;
}

.account-referral-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.account-referral-content {
    margin-top: 0.25rem;
}

.account-referral-content p {
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem;
}

.account-referral-content p.account-referral-hint-small {
    font-size: 0.75rem !important;
}

.account-referral-content .faq-link {
    font-size: 1.1rem !important;
}

.account-referral-arrow {
    font-size: 1.5rem;
    margin: 0.25rem 0;
}

.account-referral-link-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.link-copy-row {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    vertical-align: middle;
}

.btn-copy-link {
    flex-shrink: 0;
    padding: 0.35rem 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-copy-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-uid-help {
    display: inline;
    padding: 0.15rem 0.4rem;
    margin-left: 0.25rem;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--accent);
    font-size: 0.75rem;
    text-decoration: underline;
    cursor: pointer;
    vertical-align: baseline;
}

.btn-uid-help:hover {
    color: var(--text);
}

.uid-help-inline {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
}

.uid-help-inline p {
    margin: 0 0 0.5rem 0;
}

.uid-help-inline p:last-child {
    margin-bottom: 0;
}

.account-referral-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.account-referral-check {
    color: #22c55e;
    margin-right: 0.35rem;
}

.account-referral-num {
    font-size: 1.1rem;
    font-weight: 700;
}

.account-referral-step-row {
    margin-bottom: 0.5rem;
}

.account-referral-hint-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.account-referral-hint-small {
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.account-referral-hint-line2 {
    margin-bottom: 1rem;
}

.btn-copy-link-xs {
    padding: 0.15rem 0.3rem;
    font-size: 0.6rem;
}

.btn-copy-link-lg {
    padding: 0.4rem 0.5rem;
    font-size: 1.1rem;
}

.not-referral-block {
    margin-bottom: 2rem;
}

.not-referral-block .access-options {
    margin-top: 1rem;
}

.referral-check-form {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.referral-input {
    flex: 1;
    min-width: 0;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
}

.referral-input::placeholder {
    color: var(--text-muted);
}

.referral-input:focus {
    outline: none;
    border-color: var(--accent);
}

.referral-input[readonly] {
    background: rgba(255, 255, 255, 0.04);
    cursor: default;
}

.referral-access-form .referral-input {
    -webkit-user-select: text;
    user-select: text;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
}

.btn-check {
    padding: 0.9rem 1.5rem;
    background: rgba(124, 154, 184, 0.4) !important;
    border: 2px solid var(--accent) !important;
    font-weight: 600;
    white-space: nowrap;
}

.btn-check:hover {
    background: rgba(124, 154, 184, 0.55) !important;
}

.btn-check--disabled {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--border) !important;
    color: var(--text-muted) !important;
    cursor: default;
    pointer-events: none;
}

.btn-check--disabled:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    cursor: wait;
    min-width: 7rem;
}

.btn-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(124, 154, 184, 0.25);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.referral-result {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    display: none;
}

.referral-result:not(:empty) {
    display: block;
}

.referral-result-success {
    border-color: rgba(63, 185, 80, 0.5);
    background: rgba(63, 185, 80, 0.08);
}

.referral-result-success .referral-result-title {
    color: #3fb950;
}

.referral-result-error {
    border-color: rgba(248, 81, 73, 0.5);
    background: rgba(248, 81, 73, 0.08);
}

.referral-result-error .referral-result-title {
    color: #f85149;
}

.referral-result-neutral .referral-result-title {
    color: var(--text-muted);
}

.referral-result-warning {
    border-color: rgba(210, 153, 34, 0.45);
    background: rgba(210, 153, 34, 0.1);
}

.referral-result-warning .referral-result-title {
    color: #d29922;
}

.referral-result-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.referral-result-arrow {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 1.5rem;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.referral-result-arrow:hover {
    color: var(--text);
}

button.referral-result-arrow {
    width: 100%;
    text-align: center;
    border: none;
    background: rgba(124, 154, 184, 0.15);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

button.referral-result-arrow:hover {
    background: rgba(124, 154, 184, 0.28);
    color: var(--accent);
}

.referral-result-link {
  color: var(--accent);
    text-decoration: underline;
}

.referral-result-link:hover {
    filter: brightness(1.2);
}

.referral-result-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.referral-bind-existing-card {
    border-radius: 12px;
}

.referral-bind-existing-inner .referral-bind-existing-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.65rem;
}

/* Как .get-free-new-card-btn--register — яркий золотой CTA */
.referral-bind-existing-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.75rem;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    cursor: pointer;
    font: inherit;
    background: linear-gradient(180deg, #ffd24a 0%, #f5a000 55%, #e89400 100%);
    border: 1px solid rgba(255, 210, 80, 0.95);
    color: #121212;
    border-radius: 999px;
    padding: 0.88rem 1.15rem;
    font-weight: 700;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2), 0 4px 18px rgba(245, 160, 0, 0.42);
}

.referral-bind-existing-btn:hover {
    background: linear-gradient(180deg, #ffe078 0%, #ffb814 50%, #f5a000 100%);
    border-color: #fff2b8;
    color: #0a0a0a;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18), 0 6px 22px rgba(245, 160, 0, 0.55);
}

.referral-bind-existing-btn:focus-visible {
    outline: 2px solid #fff6c2;
    outline-offset: 3px;
}

.referral-invite-link {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(63, 185, 80, 0.3);
}

.referral-invite-missing .referral-result-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-invite {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    background: var(--accent);
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: filter 0.2s;
}

.btn-invite:hover {
    filter: brightness(1.15);
}

.referral-result-details {
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

.referral-result-details dt {
    font-weight: 500;
    color: var(--text);
    margin-top: 0.5rem;
}

.referral-result-details dd {
    margin: 0.25rem 0 0 0;
    color: var(--text-muted);
}

/* ========== Страница «Календарь событий» (Путешествия) ========== */
.page-travel {
    max-width: 800px;
}

.travel-reset-comma {
    cursor: text;
}

.travel-intro {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.events-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.events-cards-duo-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    min-width: 0;
}

.events-cards-duo-row .event-card {
    min-height: 188px;
}

.events-cards-duo-row .event-card-title {
    font-size: 1.05rem;
}

.events-cards-duo-row .event-card-top {
    padding: 0.75rem 0.7rem 0;
    gap: 0.35rem;
}

.events-cards-duo-row .event-card-footer {
    padding: 0.6rem 0.7rem 0.75rem;
}

.events-cards-duo-row .event-card-date {
    font-size: 0.72rem;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.events-cards-duo-row .event-card-link {
    font-size: 0.8rem;
}

.events-cards-duo-row .event-card-actions {
    gap: 0.4rem;
}

.events-cards-duo-row .event-card-badge {
    padding: 0.3rem 0.45rem;
    font-size: 0.58rem;
    max-width: 58%;
}

.events-cards-duo-row .event-card-badge--past {
    font-size: 0.56rem;
    letter-spacing: 0.05em;
}

.events-cards-duo-row .event-card-soon {
    min-height: 188px;
    padding: 0.55rem 0.45rem;
    box-sizing: border-box;
}

.events-cards-duo-row .event-card-soon .event-card-icon {
    font-size: 1.35rem;
    margin-bottom: 0.3rem;
}

.events-cards-duo-row .event-card-soon-title {
    font-size: 0.88rem;
    margin-bottom: 0.2rem;
    line-height: 1.25;
}

.events-cards-duo-row .event-card-soon-text {
    font-size: 0.68rem;
    line-height: 1.35;
    max-width: 11rem;
    margin: 0 auto;
}

.event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 272px;
    padding: 0;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.38);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.event-card:not(.event-card-soon):hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.48);
}

@media (prefers-reduced-motion: reduce) {
    .event-card:not(.event-card-soon):hover {
        transform: none;
    }
}

.event-card:not(.event-card-soon)::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(188deg, rgba(8, 12, 24, 0.78) 0%, rgba(8, 12, 24, 0.22) 42%, transparent 65%),
        linear-gradient(0deg, rgba(8, 12, 24, 0.97) 0%, rgba(8, 12, 24, 0.52) 36%, transparent 70%);
}

.event-card > * {
    position: relative;
    z-index: 1;
}

.event-card-title {
    display: block;
    padding: 1.15rem 1.15rem 0;
    margin: 0;
    font-size: 1.24rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.22;
    color: #f8fafc;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.event-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.15rem 1.15rem 0;
}

.event-card-top .event-card-title {
    padding: 0;
    flex: 1;
    min-width: 0;
}

.event-card-badge {
    flex-shrink: 0;
    align-self: flex-start;
    max-width: calc(50% - 0.5rem);
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.event-card-badge--open {
    border: 1px solid rgba(52, 211, 153, 0.55);
    background: rgba(16, 185, 129, 0.38);
    color: #ecfdf5;
}

.event-card-badge--open:hover {
    background: rgba(34, 197, 94, 0.52);
    border-color: rgba(167, 243, 208, 0.85);
}

.event-card-badge--past {
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(51, 65, 85, 0.65);
    color: rgba(226, 232, 240, 0.88);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.68rem;
    cursor: default;
    user-select: none;
    pointer-events: none;
}

.event-card-footer {
    margin-top: auto;
    padding: 1rem 1.15rem 1.15rem;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.event-card-date {
    display: block;
    margin: 0 0 0.7rem;
    font-size: 0.84rem;
    line-height: 1.45;
    font-weight: 500;
    color: rgba(226, 232, 240, 0.96);
}

.event-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #93c5fd;
    text-decoration: none;
    transition: color 0.15s ease;
}

.event-card-link:hover {
    color: #bfdbfe;
    text-decoration: underline;
}

.event-card.event-card--actions {
    cursor: default;
}

.event-card.event-card--actions .event-card-actions {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.event-card.event-card--actions .event-card-link {
    margin: 0;
    line-height: 1.4;
}

.event-card-soon {
    background: rgba(124, 154, 184, 0.15) !important;
    border: 2px dashed var(--accent);
    border-radius: 16px;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 200px;
    padding: 1.5rem 1rem;
    box-shadow: none;
}

.event-card-soon:hover {
    transform: none;
}

.event-card-soon::before {
    display: none;
}

.event-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.event-card-soon-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.event-card-soon-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.event-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
}

.event-list-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.event-list-name {
    font-weight: 500;
}

.event-list-date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.event-list-status {
    padding: 0.35rem 0.65rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.event-list-status.event-list-status--open {
    background: rgba(34, 197, 94, 0.28);
    border: 1px solid rgba(74, 222, 128, 0.45);
    color: #bbf7d0;
}

.event-list-item.event-list-item--split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.event-list-item.event-list-item--split:hover {
    background: rgba(255, 255, 255, 0.06);
}

.event-list-item-main {
    flex: 1;
    min-width: 12rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-decoration: none;
    color: inherit;
}

.event-list-item-main:hover .event-list-name {
    text-decoration: underline;
}

a.event-list-status {
    text-decoration: none;
    flex-shrink: 0;
}

a.event-list-status:hover {
    filter: brightness(1.08);
}

.subscribe-section {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

.subscribe-section .subscribe-text,
.subscribe-section .travel-subscribe-actions,
.subscribe-section .travel-telegram-message,
.subscribe-section .travel-email-panel,
.subscribe-section .travel-subscribe-success,
.subscribe-section .subscribe-form,
.subscribe-section .travel-email-panel .subscribe-message {
    grid-column: 1 / -1;
}

.subscribe-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.subscribe-highlight {
    color: var(--accent);
    text-decoration: underline;
}

.subscribe-form {
    display: flex;
    gap: 0.75rem;
}

.subscribe-input {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    min-width: 200px;
}

.subscribe-input::placeholder {
    color: var(--text-muted);
}

.subscribe-input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-subscribe {
    padding: 0.75rem 1.25rem;
    background: rgba(124, 154, 184, 0.4) !important;
    border-color: var(--accent) !important;
    white-space: nowrap;
}

.btn-subscribe:hover {
    background: rgba(124, 154, 184, 0.55) !important;
}

.subscribe-message {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.subscribe-message-loading {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
}

.subscribe-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(124, 154, 184, 0.3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.subscribe-message-success {
    color: var(--accent);
}

.subscribe-message-error {
    color: #f87171;
}

.travel-subscribe-actions {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.15rem;
}

.travel-telegram-btn,
.travel-email-reveal-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.55rem 0.65rem !important;
    font-size: 0.875rem !important;
    white-space: normal !important;
    text-align: center;
    line-height: 1.35;
    box-sizing: border-box;
}

.travel-email-panel {
    margin-top: 0.65rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.5);
}

.travel-email-panel .subscribe-form {
    margin-top: 0;
}

.travel-telegram-message {
    margin-top: 0.5rem;
}

.travel-subscribe-success {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #86efac;
    font-size: 0.95rem;
    font-weight: 500;
}

/* display:flex выше перебивает нативное скрытие по [hidden] — без этого блок успеха виден всегда */
.travel-subscribe-success[hidden] {
    display: none !important;
}

.travel-subscribe-check {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: #4ade80;
    line-height: 0;
}

.travel-subscribe-check svg {
    display: block;
    width: 0.95rem;
    height: 0.95rem;
}

.travel-subscribe-success-text {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}

/* ========== Адаптивность ========== */
@media (max-width: 600px) {
    .page {
        padding: 2rem 1.25rem;
    }

    .profile-data-block {
        overflow: visible;
    }

    .profile-data-row {
        flex-wrap: wrap;
    }

    .profile-data-label {
        min-width: 5.5em;
    }

    .indicators-grid {
        grid-template-columns: 1fr;
        grid-auto-flow: row;
    }

    .home-card-text {
        font-size: 0.95rem;
    }

    .home-card-cta .home-card-text {
        font-size: 1.05rem;
    }

    .example-video {
        width: 100%;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .benefits-with-video {
        grid-template-columns: 1fr;
    }

    .training-video {
        width: 100%;
    }

    .pricing-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .referral-check-form {
        flex-direction: column;
    }

    .events-cards-duo-row {
        gap: 0.55rem;
    }

    .events-cards-duo-row .event-card {
        min-height: 176px;
    }

    .events-cards-duo-row .event-card-soon {
        min-height: 176px;
    }

    .subscribe-section {
        grid-template-columns: 1fr;
    }

    .travel-subscribe-actions {
        flex-direction: column;
    }

    .travel-telegram-btn,
    .travel-email-reveal-btn {
        width: 100%;
        flex: none;
    }

    .subscribe-form {
        flex-direction: column;
    }

    .subscribe-input {
        min-width: 100%;
    }

    .event-list-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 340px) {
    .events-cards-duo-row {
        grid-template-columns: 1fr;
    }

    .events-cards-duo-row .event-card {
        min-height: 200px;
    }

    .events-cards-duo-row .event-card-soon {
        min-height: 200px;
    }
}

/* ========== Мини-курс ========== */
.page-mini-course .main {
    padding-top: 0.5rem;
}

.mini-course-intro {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.mini-course-progress-section {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.mini-course-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.mini-course-progress-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.mini-course-progress-count {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.mini-course-progress-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.mini-course-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), rgba(57, 255, 20, 0.6));
    border-radius: 4px;
    transition: width 0.4s ease;
}

.mini-course-progress-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.mini-course-reset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-top: 0.75rem;
}

.mini-course-reset-link {
    display: inline-block;
    padding: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    -webkit-tap-highlight-color: transparent;
}

.mini-course-reset-link:hover {
    color: var(--accent);
}

.mini-course-modules {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mini-course-module {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.mini-course-module-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    color: inherit;
    background: linear-gradient(135deg, rgba(124, 154, 184, 0.15) 0%, rgba(124, 154, 184, 0.05) 100%);
    border: none;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.mini-course-module-title:hover {
    background: linear-gradient(135deg, rgba(124, 154, 184, 0.22) 0%, rgba(124, 154, 184, 0.1) 100%);
}

.mini-course-module-title-text {
    flex: 1;
}

.mini-course-module-chevron {
    flex-shrink: 0;
    font-size: 0.7rem;
    opacity: 0.8;
    transition: transform 0.25s ease;
}

.mini-course-module-collapsed .mini-course-module-chevron {
    transform: rotate(-90deg);
}

.mini-course-module-collapsed .mini-course-lessons {
    display: none;
}

.mini-course-module-collapsed .mini-course-module-title {
    border-bottom: none;
}

.mini-course-lessons {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mini-course-lesson {
    border-bottom: 1px solid var(--border);
}

.mini-course-lesson:last-child {
    border-bottom: none;
}

.mini-course-lesson-btn,
.mini-course-lesson-placeholder {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.95rem;
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.mini-course-lesson-btn:hover {
    background: rgba(124, 154, 184, 0.12);
}

.mini-course-lesson-btn:active {
    background: rgba(124, 154, 184, 0.2);
}

.mini-course-lesson-placeholder {
    color: var(--text-muted);
    cursor: default;
    opacity: 0.7;
}

.mini-course-lesson-check {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(57, 255, 20, 0.25);
    color: #39ff14;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

.mini-course-lesson-num {
    flex-shrink: 0;
    width: 1.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.mini-course-lesson-current .mini-course-lesson-num {
    color: var(--accent);
}

.mini-course-lesson-label {
    flex: 1;
}

.mini-course-lesson-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    background: rgba(251, 191, 36, 0.25);
    color: #fbbf24;
    border-radius: 6px;
}

.mini-course-lesson-lock {
    flex-shrink: 0;
    font-size: 1rem;
}

.mini-course-lesson-watched .mini-course-lesson-label {
    color: var(--text-muted);
}

@keyframes mini-course-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4);
        background: rgba(124, 154, 184, 0.08);
    }
    50% {
        box-shadow: 0 0 20px 4px rgba(251, 191, 36, 0.25);
        background: rgba(251, 191, 36, 0.12);
    }
}

.mini-course-lesson-pulse {
    animation: mini-course-pulse 1.5s ease-in-out infinite;
}

.mini-course-video-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.mini-course-video-overlay[hidden] {
    display: none !important;
}

.mini-course-video-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.mini-course-video-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mini-course-video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mini-course-video-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.mini-course-video-close {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.mini-course-video-close:hover,
.mini-course-video-close:active {
    background: rgba(255, 255, 255, 0.25);
}

.mini-course-video-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.mini-course-video-inner {
    position: relative;
    width: 100%;
    min-height: 180px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
}

.mini-course-video-inner iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.mini-course-video-link {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--accent);
    text-decoration: underline;
}

.mini-course-video-link:hover {
    opacity: 0.9;
}

.btn-mark-watched {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-mark-watched:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
}

.btn-mark-watched:active {
    transform: scale(0.98);
}

.btn-mark-icon {
    font-size: 1.1rem;
}

.mini-course-video-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1rem;
}

.btn-next-lesson {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(124, 154, 184, 0.2);
    border: 1px solid rgba(124, 154, 184, 0.4);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.btn-next-lesson:hover {
    background: rgba(124, 154, 184, 0.3);
    transform: translateX(2px);
}

/* Оверлей загрузки при переходе по ссылке */
.page-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(4rem + env(safe-area-inset-bottom));
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(124, 154, 184, 0.25);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
}

/* Модалка: пароль перед переходом к торговому боту (как на сайте) */
.tb-telegram-gate-modal .modal-content {
    max-width: 28rem;
}
.tb-gate-notice {
    color: var(--r-text-dim, #8a9bb0);
    line-height: 1.55;
    margin: 0 0 1rem;
    font-size: 0.95rem;
}
.tb-gate-form .referral-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.5rem;
}
.tb-gate-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}
