/* Updated: 2025-11-12 - v9 - Critical scroll fix: fixed .app-container positioning and height, added proper flex constraints */
:root {
    --color-bg-primary: #050301;
    --color-bg-secondary: #100703;
    --color-surface: rgba(26, 14, 7, 0.88);
    --color-surface-strong: rgba(34, 18, 9, 0.94);
    --color-border: rgba(255, 153, 40, 0.28);
    --color-border-strong: rgba(255, 180, 80, 0.45);
    --color-text-primary: #fff4e8;
    --color-text-secondary: rgba(255, 226, 198, 0.82);
    --color-muted: rgba(255, 217, 182, 0.62);
    --color-accent: #ff8a1d;
    --color-accent-strong: #ff6500;
    --color-success: #33eeb2;
    --color-danger: #ff6b6b;

    --gradient-card: linear-gradient(145deg, rgba(37, 19, 9, 0.92) 0%, rgba(18, 9, 5, 0.85) 100%);
    --gradient-hero: linear-gradient(135deg, rgba(255, 125, 0, 0.3) 0%, rgba(255, 95, 0, 0.45) 100%);
    --shadow-soft: 0 24px 48px rgba(0, 0, 0, 0.48);
    --shadow-strong: 0 34px 68px rgba(255, 110, 10, 0.28);

    --space-xxs: 4px;
    --space-xs: 6px;
    --space-sm: 10px;
    --space-md: 16px;
    --space-lg: 20px;
    --space-xl: 28px;
    --space-xxl: 42px;

    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;

    --layout-max: 560px;

    --duration-fast: 0.18s;
    --duration-medium: 0.28s;

    --setup-stack-gap: clamp(14px, 3.5vw, 18px);

    /* Aliases for compact UI variables (fix unresolved vars) */
    --text: var(--color-text-primary);
    --text-muted: var(--color-text-secondary);
    --accent: var(--color-accent);
    --accent-strong: var(--color-accent-strong);
    --primary: var(--accent);
    --bg-primary: var(--color-bg-primary);
    --bg-secondary: var(--color-bg-secondary);
    --card-bg: rgba(26, 14, 7, 0.88);
    --border-color: var(--color-border);
    --text-primary: var(--color-text-primary);
    --text-secondary: var(--color-text-secondary);
    --orange: var(--color-accent);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: hidden;          /* документ сам не скроллится */
    overscroll-behavior: none;   /* отключаем scroll chaining у корня */
}

body {
    margin: 0;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-text-primary);
    background:
        radial-gradient(circle at 20% 16%, rgba(255, 110, 26, 0.22), transparent 58%),
        radial-gradient(circle at 82% 76%, rgba(108, 28, 8, 0.24), transparent 62%),
        radial-gradient(circle at 52% 90%, rgba(30, 6, 18, 0.18), transparent 65%),
        linear-gradient(158deg, #04020a 0%, #0c0520 52%, #050109 100%);
    overflow: hidden;
    overscroll-behavior: none;    /* дубль на всякий случай для body */
    touch-action: pan-y;
}


/* Единая переменная высоты приложения: вычисляем один раз и используем в .app-container */
:root {
  --vh: 1vh;                               /* базовый фолбэк (JS обновляет через visualViewport) */
  --app-minh: calc(var(--vh) * 100);       /* единый источник истины для min-height */
}
@supports (height: 100dvh) {
  :root { --vh: 1dvh; --app-minh: 100dvh; }  /* приоритетный вариант для мобильных */
}
@supports (height: 100svh) {
  :root { --vh: 1svh; --app-minh: 100svh; }  /* если dvh недоступен — используем svh */
}

/* Фон-прослойка должна пропускать клики и жесты к интерфейсу */
.app-background { pointer-events: none; }

/* Ссылки без синих подсветок и без тач-хайлайта iOS */
a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
   color: inherit;
   -webkit-tap-highlight-color: transparent;  /* Убираем iOS highlight */
    -webkit-touch-callout: none;  /* Убираем callout на iOS */
    backface-visibility: hidden;  /* Предотвращаем flicker */
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);  /* Аппаратное ускорение */
    box-sizing: border-box;  /* Предотвращаем wiggle от border */
    background: none;
    border: none;
    cursor: pointer;
}

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

.app-container {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    width: 100%;
    min-height: 100vh;
    height: var(--app-minh, 100vh);

    padding-inline: clamp(16px, 4vw, 32px);
    padding-block: clamp(24px, 6vh, 56px);
    padding-block-start: calc(clamp(24px, 6vh, 56px) + env(safe-area-inset-top, 0px));
    /* уменьшаем глобальный запас снизу — визуальный баланс сверху/снизу */
    padding-block-end:   calc(clamp(24px, 6vh, 56px) + env(safe-area-inset-bottom, 0px) + 12px);

    /* держим небольшой «буфер» для фокуса/клавы, но без лишнего воздуха */
    scroll-padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);

    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.app-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
    background: rgba(5, 3, 2, 0.92);
    color: var(--text, #fff4e8);
    z-index: 5;
    transition: opacity 0.2s ease;
}

.app-fallback.hidden {
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.app-fallback-content {
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.app-fallback-content button {
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    background: var(--accent, #ff8a1d);
    color: #120903;
    font-weight: 700;
}

.view-unsupported {
    justify-content: center;
    align-items: center;
}

.unsupported-card {
    width: 100%;
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    background: rgba(20, 10, 6, 0.85);
    border: 1px solid rgba(255, 170, 110, 0.35);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.unsupported-card p {
    margin: 0;
    color: var(--text-muted, rgba(255, 226, 198, 0.82));
    line-height: 1.4;
}

/* Аккуратная вертикальная центровка для «коротких» экранов (не ломает скролл) */
.app-container.center-when-short > *:first-child {
    margin-top: auto;
    margin-bottom: auto;
}


.app-container--center {
    place-items: center;
}

.app-container--center .app-shell {
    margin-block: 0; /* избегаем паразитных отступов при центрировании */
}

@media (max-width: 520px) {
    .app-container {
        padding-inline: clamp(18px, 6vw, 26px);
    }
}

.app-shell {
    position: relative;
    width: min(var(--layout-max), 100%);
    max-height: none; /* <- больше не подрезаем контент внутри */
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-xl) var(--space-lg);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(255, 170, 110, 0.45) !important;
    background: linear-gradient(155deg, rgba(30, 12, 8, 0.88) 0%, rgba(24, 10, 28, 0.85) 50%, rgba(10, 4, 18, 0.85) 100%) !important;
    backdrop-filter: blur(42px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(42px) saturate(150%) !important;
    box-shadow:
        0 32px 78px rgba(0, 0, 0, 0.7),
        0 0 68px rgba(255, 120, 30, 0.32),
        inset 0 1px 2px rgba(255, 200, 150, 0.18) !important;
    overflow: visible;
}

.app-shell::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 188, 120, 0.55) 0%, rgba(255, 110, 20, 0.32) 55%, rgba(170, 70, 255, 0.25) 100%) !important;
    mix-blend-mode: screen;
    opacity: 0.65 !important;
    filter: blur(26px);
    pointer-events: none;
}

/* Error state - only red border, NO red glow */
.app-shell--error {
    border: 2px solid rgba(255, 100, 100, 0.5) !important;
    /* Background stays the same as normal app-shell */
    box-shadow:
        0 32px 78px rgba(0, 0, 0, 0.7),
        inset 0 1px 2px rgba(255, 200, 150, 0.18) !important;
}

.app-shell--error::before {
    /* Keep brand orange glow, NO red */
    background: linear-gradient(135deg, rgba(255, 188, 120, 0.55) 0%, rgba(255, 110, 20, 0.32) 55%, rgba(170, 70, 255, 0.25) 100%) !important;
    opacity: 0.65 !important;
    filter: blur(26px);
}

.view {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    flex: 1;
    min-height: 0;
    max-height: none;     /* даём контенту расти */
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;    /* не создаём второй скролл */
}

.view-root {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Soft content swap to mask repaints on Android */
.view-root{ will-change: opacity, transform; transition: opacity .16s linear, transform .16s linear; }
.view-root.is-updating{ opacity:.001; transform: translateZ(0) scale(0.999); }

.view-scroll {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    overflow: visible;   /* чтобы скролл был только у .app-container */
    padding-right: 4px;
}

.view-scroll::-webkit-scrollbar {
    width: 4px;
}

.view-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 160, 60, 0.25);
    border-radius: 999px;
}

.toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-md);
    margin-bottom: var(--space-md);
    background: rgba(12, 6, 18, 0.75);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(51, 238, 178, 0.1);
}

.toolbar::after {
    display: none;
}

.toolbar-back,
.toolbar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    height: auto;
    min-width: auto;
    border-radius: var(--radius-md);
    border: none;
    background: rgba(51, 238, 178, 0.08);
    color: var(--color-text-primary);
    font-size: 15px;
    font-weight: 500;
    transition: all var(--duration-fast);
}

.toolbar-placeholder {
    background: transparent;
    pointer-events: none;
    opacity: 0;
}

.toolbar-back svg {
    width: 20px;
    height: 20px;
}

.toolbar-back:hover {
    background: rgba(51, 238, 178, 0.14);
    transform: translateX(-2px);
}

.toolbar-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    text-align: center;
}

.toolbar-title {
    font-size: clamp(18px, 4.5vw, 22px);
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--color-text-primary);
}

.toolbar-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: var(--color-text-secondary);
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* View Page Title - Beautiful header without back button */
.view-page-title {
    margin: 0 0 var(--space-lg) 0;
    padding: var(--space-md) var(--space-lg);
    font-size: clamp(22px, 5.5vw, 26px);
    font-weight: 600;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--color-text-primary);
    background: rgba(51, 238, 178, 0.04);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(51, 238, 178, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
}

/* REMOVED .card::before - no more inner gradient overlay with sharp corners */

.status-card {
    background: linear-gradient(135deg, rgba(32, 18, 8, 0.92) 0%, rgba(45, 23, 10, 0.86) 100%);
}

.status-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.status-label {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 222, 190, 0.65);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 165, 60, 0.4);
    background: rgba(255, 120, 0, 0.18);
    color: #ffd6a8;
    font-size: 12px;
    font-weight: 600;
}

.status-pill--idle {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 232, 209, 0.74);
}

.status-value {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-value.is-active {
    color: #fff1dd;
}

.status-value.is-idle {
    color: rgba(255, 226, 198, 0.7);
}

.status-meta {
    font-size: 13px;
    color: var(--color-muted);
}

.hero-card {
    background: var(--gradient-hero);
    box-shadow: var(--shadow-strong);
    border-color: rgba(255, 150, 40, 0.4);
}

/* REMOVED .hero-card::before */

.hero-badge {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 230, 210, 0.78);
}

.hero-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.28;
}

.hero-subtitle {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

@media (min-width: 520px) {
    .hero-actions {
        flex-direction: row;
    }

    .hero-actions .btn {
        flex: 1;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    color: #fff6ec;
    transition: transform var(--duration-fast), box-shadow var(--duration-fast), background var(--duration-fast), border var(--duration-fast), opacity var(--duration-fast);
    text-align: center;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn.is-loading {
    opacity: 0.75;
    cursor: default;
    pointer-events: none;
}

/* Стили .btn-primary и .btn-secondary перенесены ниже в файл (строки ~1628) */

.btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--color-text-secondary);
}

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

.btn:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
}

@media (max-width: 520px) {
    .tile-grid {
        grid-template-columns: 1fr;
    }
}

.tile {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 155, 45, 0.22);
    background: rgba(28, 16, 9, 0.78);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
    transition: transform var(--duration-fast), border var(--duration-fast), box-shadow var(--duration-fast);
    text-align: left;
}

.tile:hover {
    transform: translateY(-2px);
    border-color: var(--color-border-strong);
    box-shadow: 0 18px 44px rgba(255, 120, 0, 0.24);
}

.tile-wide {
    grid-column: span 2;
}

@media (max-width: 520px) {
    .tile-wide {
        grid-column: span 1;
    }
}

.tile-icon svg {
    width: 18px;
    height: 18px;
    color: var(--color-accent);
}

.tile-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.tile-title {
    font-size: 14px;
    font-weight: 600;
}

.tile-subtitle {
    font-size: 12px;
    color: var(--color-muted);
    line-height: 1.45;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #ffd7a2;
}

.section-subtitle {
    font-size: 13px;
    color: var(--color-muted);
}

.body-text {
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.6;
}

.plan-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
}

@media (max-width: 460px) {
    .plan-chip-grid {
        grid-template-columns: 1fr;
    }
}

.plan-chip {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 150, 40, 0.22);
    background: rgba(27, 15, 9, 0.82);
    transition: all var(--duration-fast);
}

.plan-chip:hover {
    border-color: var(--color-border-strong);
}

.plan-chip.is-active {
    background: rgba(255, 120, 0, 0.2);
    border-color: rgba(255, 180, 70, 0.6);
    box-shadow: 0 0 24px rgba(255, 140, 0, 0.22);
}

.plan-chip-title {
    font-size: 15px;
    font-weight: 600;
}

.plan-chip-desc {
    font-size: 12px;
    color: var(--color-muted);
}

.plan-overview {
    background: rgba(26, 14, 8, 0.9);
}

.plan-overview-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.plan-overview-title {
    font-size: 15px;
    font-weight: 600;
}

.plan-overview-sub {
    font-size: 12px;
    color: var(--color-muted);
}

.plan-overview-price {
    font-size: 24px;
    font-weight: 700;
    color: #ffd9a7;
}

.plan-overview-note {
    font-size: 12px;
    color: var(--color-muted);
}

.payment-option-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.payment-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 150, 40, 0.22);
    background: rgba(24, 13, 7, 0.82);
    transition: transform var(--duration-fast), border var(--duration-fast);
}

.payment-option:hover {
    transform: translateY(-1px);
    border-color: var(--color-border-strong);
}

.payment-icon svg {
    width: 22px;
    height: 22px;
    color: var(--color-accent);
}

.payment-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.payment-title {
    font-size: 14px;
    font-weight: 600;
}

.payment-sub {
    font-size: 12px;
    color: var(--color-muted);
}

.payment-arrow svg {
    width: 16px;
    height: 16px;
    color: rgba(255, 230, 200, 0.7);
}

.payment-hint {
    font-size: 12px;
    color: var(--color-muted);
    margin-top: var(--space-sm);
}

.setup-intro {
    gap: var(--space-md);
}

.platform-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255, 165, 60, 0.16);
}

.platform-switch-label {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 220, 190, 0.72);
}

.platform-switch-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.platform-chip {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 155, 45, 0.3);
    background: rgba(26, 15, 9, 0.78);
    color: var(--color-text-primary);
    font-size: 13px;
    font-weight: 600;
    transition: all var(--duration-fast);
}

.platform-chip.is-active {
    background: rgba(255, 120, 0, 0.24);
    border-color: rgba(255, 170, 60, 0.6);
    cursor: default;
}

.platform-chip:not(.is-active):hover {
    transform: translateY(-1px);
    border-color: var(--color-border-strong);
}

.platform-chip:disabled {
    opacity: 0.75;
    cursor: default;
}

.setup-stages {
    gap: var(--space-md);
}

.setup-stage {
    display: flex;
    gap: var(--space-md);
}

@media (max-width: 520px) {
    .setup-stage {
        flex-direction: column;
    }
}

.stage-index {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 160, 60, 0.4);
    background: rgba(255, 120, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffd9a8;
}

.stage-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.stage-title {
    font-size: 15px;
    font-weight: 600;
}

.stage-text {
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.5;
}

.stage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

@media (max-width: 520px) {
    .stage-actions {
        flex-direction: column;
    }
}

.stage-note {
    font-size: 12px;
    color: var(--color-muted);
}

.store-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-sm);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 150, 40, 0.24);
    background: rgba(26, 15, 9, 0.8);
    color: var(--color-text-primary);
    transition: all var(--duration-fast);
    width: 100%;
}

.store-button svg {
    width: 18px;
    height: 18px;
    color: var(--color-accent);
}

.store-button span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    font-weight: 600;
}

.store-button span small {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-muted);
}

.store-button:hover {
    border-color: var(--color-border-strong);
    transform: translateY(-1px);
}

.account-state {
    font-size: 20px;
    font-weight: 600;
}

.account-state.is-active {
    color: #ffeede;
}

.account-state.is-idle {
    color: rgba(255, 226, 198, 0.7);
}

.account-meta {
    font-size: 13px;
    color: var(--color-muted);
}

.account-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255, 160, 60, 0.16);
}

.account-link-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.account-link-label {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 224, 195, 0.76);
}

.account-link-hint {
    font-size: 12px;
    color: var(--color-muted);
}

.chip-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 160, 60, 0.32);
    background: rgba(255, 120, 0, 0.12);
    color: var(--color-text-primary);
    transition: all var(--duration-fast);
}

.chip-button svg {
    width: 16px;
    height: 16px;
}

.chip-button:hover {
    border-color: var(--color-border-strong);
    background: rgba(255, 120, 0, 0.22);
}

.action-button-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-sm);
}

@media (max-width: 560px) {
    .action-button-grid {
        grid-template-columns: 1fr;
    }
}

.input-row {
    display: flex;
    gap: var(--space-sm);
}

@media (max-width: 520px) {
    .input-row {
        flex-direction: column;
    }
}

.input {
    flex: 1;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 150, 40, 0.28);
    background: rgba(26, 15, 9, 0.82);
    color: var(--color-text-primary);
    font-size: 14px;
}

.input::placeholder {
    color: rgba(255, 220, 190, 0.36);
}

.input:focus {
    outline: none;
    border-color: var(--color-border-strong);
    box-shadow: 0 0 22px rgba(255, 140, 0, 0.22);
}


.empty-card {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(255, 155, 45, 0.36);
    background: rgba(26, 15, 9, 0.78);
    color: var(--color-muted);
    text-align: center;
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.empty-subtitle {
    font-size: 13px;
    color: var(--color-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-sm);
}

@media (max-width: 520px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 155, 45, 0.22);
    background: rgba(26, 15, 9, 0.78);
}

.stat-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 224, 195, 0.68);
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #ffd9a7;
}

/* ===== REFERRAL PROGRAM STYLES ===== */

/* Referral Hero Section */
.referral-hero {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.referral-title {
    margin: 0;
    font-size: clamp(22px, 5.5vw, 28px);
    font-weight: 700;
    color: var(--color-text-primary);
    text-align: center;
    background: linear-gradient(135deg, #fff4e8 0%, #ffd9a7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.referral-promo-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255, 138, 29, 0.15) 0%, rgba(255, 101, 0, 0.08) 100%);
    border: 2px solid rgba(255, 138, 29, 0.35);
    box-shadow:
        0 12px 28px rgba(255, 110, 20, 0.25),
        inset 0 1px 2px rgba(255, 200, 150, 0.15);
    overflow: hidden;
}

.referral-promo-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, rgba(255, 200, 150, 0.12), rgba(255, 138, 29, 0.05) 50%, transparent);
    opacity: 0.8;
    pointer-events: none;
}

.referral-promo-icon {
    position: relative;
    width: clamp(56px, 14vw, 72px);
    height: clamp(56px, 14vw, 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
}

.referral-promo-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 6px 16px rgba(255, 138, 29, 0.5));
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 6px 16px rgba(255, 138, 29, 0.5));
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        filter: drop-shadow(0 8px 20px rgba(255, 138, 29, 0.7));
    }
}

.referral-promo-content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.referral-promo-bonus {
    font-size: clamp(26px, 6.5vw, 34px);
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(255, 138, 29, 0.4);
}

.referral-promo-text {
    font-size: clamp(13px, 3.2vw, 16px);
    font-weight: 500;
    color: var(--color-text-primary);
}

.referral-description {
    margin: 0;
    font-size: clamp(13px, 3.2vw, 15px);
    line-height: 1.5;
    color: var(--color-muted);
    text-align: center;
}

/* Main Invite Button */
.referral-main-btn {
    width: 100%;
    margin-top: 8px;
}

/* Invited By Section - Inline Transformation */
.referral-invited-by-section {
    margin-top: 5px;
}

.referral-invited-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(10, 5, 15, 0.4) 100%);
    border: 1px solid rgba(255, 170, 110, 0.15);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
}

.referral-invited-toggle:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(10, 5, 15, 0.5) 100%);
    border-color: rgba(255, 170, 110, 0.25);
}

.referral-invited-text {
    font-size: clamp(12px, 3vw, 13px);
    font-weight: 500;
    color: var(--color-muted);
}

.referral-invited-arrow {
    width: 18px;
    height: 18px;
    color: var(--color-muted);
    flex-shrink: 0;
}

/* Inline Input Group (like promo codes) */
.referral-invited-input-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.referral-invited-input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    font-size: clamp(13px, 3.2vw, 14px);
    font-family: 'Monaco', 'Menlo', monospace;
    color: var(--color-text-primary);
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px solid rgba(255, 170, 110, 0.25);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.25s ease;
}

.referral-invited-input::placeholder {
    color: var(--color-muted);
    opacity: 0.6;
}

.referral-invited-input:focus {
    border-color: var(--color-accent);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 138, 29, 0.15);
}

.referral-invited-submit-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent) 0%, #ff6500 100%);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    transition: all 0.25s ease;
}

.referral-invited-submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 138, 29, 0.4);
}

.referral-invited-submit-btn svg {
    width: 20px;
    height: 20px;
}

/* Collapsible Link Section */
.referral-link-accordion {
    margin-top: var(--space-md);
}

.referral-link-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(10, 5, 15, 0.4) 100%);
    border: 1px solid rgba(255, 170, 110, 0.15);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
}

.referral-link-toggle:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(10, 5, 15, 0.5) 100%);
    border-color: rgba(255, 170, 110, 0.25);
}

.referral-link-toggle-text {
    font-size: clamp(13px, 3.2vw, 14px);
    font-weight: 500;
    color: var(--color-muted);
}

.referral-link-toggle-chevron {
    width: 18px;
    height: 18px;
    color: var(--color-muted);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.referral-link-accordion.is-open .referral-link-toggle-chevron {
    transform: rotate(180deg);
}

.referral-link-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.referral-link-accordion.is-open .referral-link-content {
    max-height: 1000px;
}

.referral-link-item,
.referral-code-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
    margin-top: var(--space-md);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.05) 0%, rgba(10, 5, 15, 0.4) 100%);
    border: 1px solid rgba(255, 170, 110, 0.2);
    border-radius: var(--radius-md);
}

.referral-link-label,
.referral-code-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.referral-link-value,
.referral-code-value {
    font-size: clamp(11px, 2.8vw, 13px);
    font-family: 'Monaco', 'Menlo', monospace;
    color: var(--color-text-secondary);
    word-break: break-all;
    padding: var(--space-xs) var(--space-sm);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 160, 60, 0.15);
}

.referral-copy-btn {
    width: 100%;
}

.referral-link-skeleton {
    height: 80px;
    margin-top: var(--space-md);
    background: linear-gradient(90deg, rgba(255, 205, 150, 0.08) 0%, rgba(255, 205, 150, 0.18) 50%, rgba(255, 205, 150, 0.08) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.3s ease-in-out infinite;
    border-radius: var(--radius-md);
}

.referral-link-placeholder {
    margin-top: var(--space-md);
    padding: var(--space-lg);
    text-align: center;
    font-size: 13px;
    color: var(--color-muted);
}

/* Bottom Actions */
.referral-bottom-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    margin-top: 8px;
}

.referral-action-btn {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.referral-action-btn::before,
.referral-action-btn::after {
    border-radius: inherit;
}

.referral-action-btn svg {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0;
}

/* Help Accordion */
.referral-help-accordion {
    margin-top: var(--space-md);
}

.referral-help-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.referral-help-accordion.is-open .referral-help-content {
    max-height: 1200px;
}

.referral-help-text {
    padding: var(--space-lg);
    margin-top: var(--space-md);
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.06) 0%, rgba(10, 5, 15, 0.45) 100%);
    border: 1.5px solid rgba(51, 238, 178, 0.2);
    border-radius: var(--radius-md);
}

.referral-help-text p {
    margin: 0 0 var(--space-sm) 0;
    font-size: clamp(13px, 3.2vw, 14px);
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.referral-help-text p:last-child {
    margin-bottom: 0;
}

.referral-help-text strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

.referral-help-text ul {
    margin: var(--space-sm) 0;
    padding-left: var(--space-lg);
    list-style-type: disc;
}

.referral-help-text li {
    margin: var(--space-xs) 0;
    font-size: clamp(13px, 3.2vw, 14px);
    line-height: 1.5;
    color: var(--color-text-secondary);
}

/* Referral Stats Modal */
.referral-stats-modal .help-modal-content {
    max-width: clamp(340px, 90vw, 420px);
}

.referral-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

@media (max-width: 420px) {
    .referral-stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
}

.referral-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-md);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(10, 5, 15, 0.5) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.25);
    border-radius: var(--radius-md);
}

.referral-stat-icon {
    width: clamp(32px, 8vw, 40px);
    height: clamp(32px, 8vw, 40px);
    color: var(--color-accent);
    opacity: 0.8;
}

.referral-stat-icon svg {
    width: 100%;
    height: 100%;
}

.referral-stat-value {
    font-size: clamp(24px, 6vw, 32px);
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1;
}

.referral-stat-label {
    font-size: clamp(11px, 2.8vw, 13px);
    font-weight: 500;
    color: var(--color-muted);
    text-align: center;
}

/* Referral Help Modal */
/* Referral Help Page */
.referral-help-intro {
    margin: clamp(-10px, -2.5vw, -8px) 0 var(--space-sm) 0;
    font-size: clamp(14px, 3.5vw, 15px);
    color: var(--color-text-secondary);
    text-align: left;
}

.referral-help-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: 0;
}

.referral-help-option-btn {
    width: 100%;
    justify-content: flex-start;
}

.referral-help-option-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Referral Conditions Modal */
.referral-conditions-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.referral-condition-item {
    padding: var(--space-md);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.05) 0%, rgba(10, 5, 15, 0.4) 100%);
    border: 1px solid rgba(255, 170, 110, 0.2);
    border-radius: var(--radius-md);
}

.referral-condition-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 var(--space-xs) 0;
    font-size: clamp(14px, 3.5vw, 16px);
    font-weight: 600;
    color: var(--color-text-primary);
}

.referral-condition-icon-inline {
    display: inline-flex;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-accent);
}

.referral-condition-icon-inline svg {
    width: 100%;
    height: 100%;
}

.referral-condition-desc {
    margin: 0;
    font-size: clamp(13px, 3.2vw, 14px);
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.referral-condition-list {
    margin: var(--space-xs) 0 0 0;
    padding-left: var(--space-lg);
    list-style-type: disc;
}

.referral-condition-list li {
    margin: var(--space-xxs) 0;
    font-size: clamp(13px, 3.2vw, 14px);
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.referral-condition-list strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

/* Referral No Bonus Modal */
.referral-nobonus-content {
    margin-top: var(--space-lg);
}

.referral-nobonus-intro {
    margin: 0 0 var(--space-md) 0;
    font-size: clamp(13px, 3.2vw, 14px);
    font-weight: 500;
    color: var(--color-text-secondary);
}

.referral-checklist {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.referral-checklist-item {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.05) 0%, rgba(10, 5, 15, 0.4) 100%);
    border: 1px solid rgba(51, 238, 178, 0.2);
    border-radius: var(--radius-md);
}

.referral-checklist-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--color-success);
}

.referral-checklist-icon svg {
    width: 100%;
    height: 100%;
}

.referral-checklist-text strong {
    display: block;
    margin-bottom: var(--space-xxs);
    font-size: clamp(13px, 3.2vw, 14px);
    font-weight: 600;
    color: var(--color-text-primary);
}

.referral-checklist-text p {
    margin: 0;
    font-size: clamp(12px, 3vw, 13px);
    line-height: 1.4;
    color: var(--color-muted);
}

.referral-nobonus-desktop {
    padding: var(--space-md);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(10, 5, 15, 0.5) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.25);
    border-radius: var(--radius-md);
}

.referral-nobonus-desktop-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 var(--space-xs) 0;
    font-size: clamp(14px, 3.5vw, 16px);
    font-weight: 600;
    color: var(--color-text-primary);
}

.referral-nobonus-desktop-icon {
    display: inline-flex;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-accent);
}

.referral-nobonus-desktop-icon svg {
    width: 100%;
    height: 100%;
}

.referral-nobonus-desktop-text {
    margin: 0;
    font-size: clamp(13px, 3.2vw, 14px);
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.referral-nobonus-desktop-text strong {
    color: var(--color-accent);
    font-weight: 600;
}

.referral-code-copy-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    margin-top: var(--space-sm);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(10, 5, 15, 0.6) 100%);
    border: 1px solid rgba(255, 170, 110, 0.3);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: clamp(13px, 3.2vw, 14px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.referral-code-copy-btn:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.2) 0%, rgba(10, 5, 15, 0.7) 100%);
    border-color: rgba(255, 170, 110, 0.4);
    transform: translateY(-1px);
}

.referral-code-copy-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.referral-code-copy-btn code {
    font-family: 'Monaco', 'Menlo', monospace;
    color: var(--color-accent);
    font-weight: 600;
}

/* Referral Copy Link Modal */
.referral-copylink-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.skeleton-line {
    margin-top: var(--space-sm);
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, rgba(255, 205, 150, 0.08) 0%, rgba(255, 205, 150, 0.28) 50%, rgba(255, 205, 150, 0.08) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.3s ease-in-out infinite;
}

.list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 155, 45, 0.22);
    background: rgba(26, 15, 9, 0.82);
    transition: transform var(--duration-fast), border var(--duration-fast);
}

.list-item:hover {
    transform: translateY(-1px);
    border-color: var(--color-border-strong);
}

.list-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.list-title {
    font-size: 14px;
    font-weight: 600;
}

.list-subtitle {
    font-size: 12px;
    color: var(--color-muted);
}

.list-icon svg {
    width: 16px;
    height: 16px;
    color: rgba(255, 226, 198, 0.7);
}

.list-tight .list-item {
    padding: var(--space-sm) var(--space-md);
}

.pulse-highlight {
    animation: pulseOutline 0.85s ease-in-out 2;
}

.loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    background: rgba(5, 3, 2, 0.92);
    backdrop-filter: blur(16px);
    z-index: 999;
    transition: opacity var(--duration-fast), visibility var(--duration-fast);
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader svg {
    width: 58px;
    height: 58px;
    stroke: url(#gradient);
    animation: spin 1.2s linear infinite;
}

.loading-text {
    font-size: 15px;
    letter-spacing: 0.04em;
    color: var(--color-muted);
}

.logo-text {
    font-size: 18px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffdcb0;
}

button:focus-visible,
.input:focus-visible,
.chip-button:focus-visible {
    outline: 2px solid rgba(255, 160, 60, 0.65);
    outline-offset: 2px;
}

@keyframes twinkle {
    0% { opacity: 0.35; transform: scale(1); }
    100% { opacity: 0.6; transform: scale(1.04); }
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes beamTilt {
    0%, 100% { transform: rotate(-6deg) scale(1.05); }
    50% { transform: rotate(6deg) scale(1.12); }
}

@keyframes particleFloat {
    0% { transform: translate3d(0, 0, 0); opacity: 0.4; }
    50% { transform: translate3d(20px, -30px, 0); opacity: 0.7; }
    100% { transform: translate3d(-10px, -60px, 0); opacity: 0.4; }
}


@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes pulseOutline {
    0% { box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.45); }
    100% { box-shadow: 0 0 0 24px rgba(255, 140, 0, 0); }
}

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Liquid Glass Home Experience ===== */
.app-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: linear-gradient(156deg, #0a0515 0%, #160a28 48%, #08030f 100%);
}

.bg-canvas{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    pointer-events: none;
}

.app-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 800px 600px at 25% 30%, rgba(255, 140, 50, 0.14), transparent 70%),
        radial-gradient(ellipse 700px 500px at 75% 60%, rgba(255, 90, 30, 0.11), transparent 70%),
        radial-gradient(ellipse 600px 700px at 50% 80%, rgba(160, 70, 200, 0.09), transparent 70%),
        radial-gradient(ellipse 500px 500px at 80% 20%, rgba(255, 110, 70, 0.08), transparent 70%);
    pointer-events: none;
}

.app-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle 400px at 15% 40%, rgba(255, 180, 100, 0.06), transparent 65%),
        radial-gradient(circle 350px at 85% 70%, rgba(200, 100, 255, 0.04), transparent 65%),
        radial-gradient(circle 300px at 60% 15%, rgba(255, 150, 80, 0.05), transparent 65%);
    mix-blend-mode: overlay;
    opacity: 0.5;
    pointer-events: none;
}

@keyframes meshFlow {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    33% {
        transform: translate3d(15px, -20px, 0) scale(1.03);
    }
    66% {
        transform: translate3d(-18px, 15px, 0) scale(0.97);
    }
}

@keyframes meshPulse {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate3d(10px, -12px, 0) scale(1.02);
        opacity: 0.75;
    }
}

/* Flying Beams Layer */
.beams-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.beam {
    position: absolute;
    left: var(--start-x, 50%);
    top: -10%;
    width: 2px;
    height: var(--length, 150px);
    background: linear-gradient(180deg,
        rgba(255, 200, 140, 0) 0%,
        rgba(255, 160, 100, 0.4) 15%,
        rgba(255, 140, 80, 0.55) 50%,
        rgba(255, 120, 60, 0.4) 85%,
        rgba(255, 100, 40, 0) 100%
    );
    transform: rotate(25deg);
    transform-origin: top center;
    filter: blur(1.5px);
    opacity: 0;
    animation: beamFall var(--duration, 26s) linear infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes beamFall {
    0% {
        transform: translateY(0) rotate(25deg);
        opacity: 0;
    }
    8% {
        opacity: 0.65;
    }
    92% {
        opacity: 0.65;
    }
    100% {
        transform: translateY(110vh) rotate(25deg);
        opacity: 0;
    }
}

/* Lite background for Android / weak WebView */
html.bg-lite .app-background::before,
html.bg-lite .app-background::after {
    opacity: 0.4 !important;
}

/* Beams всегда видны на всех устройствах, включая Android */
html.bg-lite .beams-layer {
    display: block !important;
    opacity: 1 !important;
}

/* Performance optimizations for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .beams-layer {
        display: none;
    }
}

/* Legacy animation styles removed - now using pure CSS gradient-mesh background */

.app-shell--home {
    /* фон ближе к остальным экранам, чуть глубже и темнее */
    background:
      linear-gradient(155deg, rgba(20, 8, 6, .82) 0%,
                             rgba(16, 7, 22, .8) 48%,
                             rgba(6, 3, 14, .82) 100%) !important;
    border: 1px solid rgba(255,170,110,.3) !important;
    box-shadow:
      0 28px 68px rgba(4,0,0,.45),
      inset 0 1px 0 rgba(255,220,180,.06) !important;
    backdrop-filter: saturate(150%) blur(9px) !important;
    -webkit-backdrop-filter: saturate(150%) blur(9px) !important;
    padding: clamp(28px, 6vw, 40px);
}

.app-shell--home::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(140deg,
        rgba(255,188,120,.26),
        rgba(255,110,20,.14) 50%,
        rgba(170,70,255,.12) 100%);
    mix-blend-mode: screen;
    opacity: .28;
    filter: blur(18px);
    pointer-events: none;
    display: block !important;
}

@media (max-width: 520px) {
    .app-shell--home {
        padding: clamp(22px, 7vw, 30px);
    }
}

.view--single {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 4.5vw, 20px); /* ближе карточки, как «раньше» */
    max-width: 100%;
    overflow: visible;
}


.home-hero {
    position: relative;
    border-radius: 32px;
    padding: clamp(26px, 7vw, 36px);
    background: linear-gradient(155deg, rgba(30, 12, 8, 0.95) 0%, rgba(24, 10, 28, 0.9) 50%, rgba(10, 4, 18, 0.9) 100%);
    border: 1px solid rgba(255, 170, 110, 0.32);
    box-shadow:
        0 46px 110px rgba(4, 0, 0, 0.6),
        0 0 52px rgba(255, 96, 10, 0.24);
    backdrop-filter: blur(38px) saturate(140%);
    overflow: visible;
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(140deg, rgba(255, 188, 120, 0.5), rgba(255, 110, 20, 0.22) 50%, rgba(170, 70, 255, 0.2) 100%);
    mix-blend-mode: screen;
    opacity: 0.5;
    filter: blur(22px);
    pointer-events: none;
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 12% 14%;
    border-radius: calc(var(--radius-lg) * 1.6);
    background: radial-gradient(circle at 28% 24%, rgba(255, 220, 180, 0.2), rgba(255, 90, 10, 0.1) 58%, transparent 82%);
    opacity: 0.58;
    pointer-events: none;
}

.brand-header,
.home-status,
.home-hero .status-line,
.home-hero .subline {
    position: relative;
    z-index: 1;
}

.brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(18px, 5vw, 24px);
    margin-bottom: clamp(18px, 5vw, 26px);
    overflow: visible;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: clamp(12px, 4vw, 18px);
}

.brand-logo-img {
    position: relative;
    width: clamp(48px, 10vw, 60px);
    height: clamp(48px, 10vw, 60px);
    border-radius: 18px;
    background: center/cover no-repeat url("/miniapp/static/img/logo.svg"), radial-gradient(circle at 30% 30%, #ffe9cb 0%, #ffb568 42%, #ff6a00 100%);
    box-shadow: 0 16px 32px rgba(255, 120, 0, 0.38);
    overflow: hidden;
}

.brand-logo-img::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.22), rgba(255, 110, 0, 0.18) 55%, transparent 85%);
    mix-blend-mode: screen;
}

.brand-logo-img::after {
    content: "";
    position: absolute;
    inset: -20%;
    background: conic-gradient(from 0deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.18) 60%, rgba(255, 255, 255, 0) 90%, rgba(255, 255, 255, 0.18));
    filter: blur(10px);
    animation: rotateGlow 12s linear infinite;
}

.brand-name {
    font-size: clamp(20px, 5.8vw, 24px);
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff5e8;
    text-shadow: 0 6px 22px rgba(0, 0, 0, 0.6);
}

.info-fab-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-fab-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(35, 20, 11, 0.92);
    border: 1px solid rgba(255, 165, 60, 0.32);
    color: #fff5e6;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 4px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    z-index: 25;
}

.info-fab {
    /* Иконка информации не двигается; центр выравнивается через align-items в .brand-header */
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(255, 180, 110, 0.32);
    background: rgba(22, 10, 6, 0.68);
    display: grid;
    place-items: center;
    color: #fff3e0;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease, background 0.25s ease;
    overflow: visible;
    z-index: 2;
}

.info-fab:hover {
    /* без сдвига; только стиль */
    border-color: rgba(255, 200, 140, 0.55);
    background: rgba(32, 16, 12, 0.82);
    box-shadow: 0 20px 38px rgba(255, 110, 20, 0.32);
}

.home-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.status-line {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(18px, 4.8vw, 20px);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff7ec;
    text-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #33eeb2;
    box-shadow: 0 0 16px rgba(51, 238, 178, 0.75), 0 0 32px rgba(51, 238, 178, 0.45);
}

.dot--idle { background: #ff4d4f; box-shadow: 0 0 12px rgba(255,77,79,.6), 0 0 20px rgba(255,77,79,.3); }

.subline {
    font-size: clamp(13px, 4.2vw, 15px);
    color: rgba(255, 236, 222, 0.9);
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.home-cta-group {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 4.5vw, 22px);
}

.home-cta-group .btn {
    width: 100%;
}

.btn {
    --btn-gap: 10px;
    --badge-margin: clamp(6px, 2.2vw, 10px);
    --badge-scale: 1;
    --badge-shift: 10px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--btn-gap);
    height: clamp(58px, 13vw, 66px);
    border-radius: 18px;
    padding: 0 clamp(22px, 5vw, 28px);
    border: 1px solid rgba(255, 175, 115, 0.32);
    font-size: clamp(15px, 4vw, 17px);
    font-weight: 700;
    color: #fff5ec;
    background: rgba(18, 8, 6, 0.82);
    box-shadow: 0 26px 64px rgba(4, 0, 0, 0.42);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease, background 0.25s ease, opacity 0.25s ease;
    will-change: transform, box-shadow;
}

.btn-label {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.glass-button::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 45%);
    mix-blend-mode: screen;
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.glass-button::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 200, 150, 0.12);
    opacity: 0.7;
    pointer-events: none;
}

.btn-primary {
    /* Благородный оранжевый: янтарь → мандарин → кармель */
    background: linear-gradient(135deg, #ff9738 0%, #ff7a2e 48%, #ff5c24 100%) !important;
    border-color: rgba(255, 180, 110, 0.55) !important;
    box-shadow: 0 28px 62px rgba(255, 110, 40, 0.36) !important;
    color: #fff7ec !important;
}

.btn-primary:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 34px 72px rgba(255, 120, 50, 0.42) !important;
}

.btn-secondary {
    background: linear-gradient(125deg, rgba(255, 170, 90, 0.2) 0%, rgba(44, 18, 12, 0.78) 60%, rgba(24, 10, 12, 0.86) 100%);
    border-color: rgba(255, 170, 100, 0.36);
    color: rgba(255, 242, 230, 0.94);
}

.btn-secondary:hover {
    background: linear-gradient(125deg, rgba(255, 190, 120, 0.24) 0%, rgba(60, 24, 18, 0.84) 100%);
    border-color: rgba(255, 200, 130, 0.48);
    box-shadow: 0 30px 62px rgba(255, 120, 40, 0.3);
}

.home-setup-cta {
    box-shadow: 0 24px 52px rgba(255, 120, 40, 0.22);
}

.home-setup-cta:hover {
    background: linear-gradient(125deg, rgba(255, 170, 100, 0.22) 0%, rgba(48, 20, 13, 0.82) 100%);
    border-color: rgba(255, 195, 125, 0.46);
    box-shadow: 0 20px 44px rgba(255, 142, 70, 0.26);
}

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

.btn:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.btn .btn-badge {
    margin-left: auto;
    margin-right: var(--badge-margin);
    padding: 8px 12px;
    font-size: clamp(11px, 3vw, 12px);
    font-weight: 700;
    border-radius: 999px;
    background: rgba(255, 170, 90, 0.2);
    border: 1px solid rgba(255, 198, 130, 0.44);
    color: #fff4e4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform-origin: center right;
    transform: translateX(var(--badge-shift)) scale(var(--badge-scale));
}

@supports selector(:has(*)) {
  .btn:has(.btn-badge){ padding-right: clamp(10px, 3vw, 14px); }
}

.bottom-actions {
    margin-top: clamp(10px, 3vw, 18px);
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 4vw, 20px);
    align-items: start;
}

.action-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.action-circle-btn {
    position: relative;
    width: clamp(86px, 20vw, 104px);
    height: clamp(86px, 20vw, 104px);
    border-radius: 50%;
    border: 1px solid rgba(255, 170, 110, 0.38);
    background: rgba(26, 12, 9, 0.82);
    display: grid;
    place-items: center;
    color: #fff6ec;
    box-shadow: 0 26px 52px rgba(4, 0, 0, 0.46);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease, background 0.25s ease;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.action-circle-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 70%);
    opacity: 0.7;
    pointer-events: none;
}

.action-circle-btn::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 190, 130, 0.2);
    opacity: 0.6;
    pointer-events: none;
}

.action-circle-icon,
.action-circle-bonus {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

.action-circle-icon svg {
    width: clamp(28px, 6vw, 34px);
    height: clamp(28px, 6vw, 34px);
}

.action-circle-bonus {
    opacity: 0;
    transform: scale(0.84);
    min-width: 100%;
    padding: 0 4px;
    font-size: clamp(12px, 3.2vw, 14px);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff6eb;
    text-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
    text-align: center;
    line-height: 1.05;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.action-circle-bonus-line {
    display: block;
    letter-spacing: inherit;
}

.action-circle-bonus-line:first-child {
    font-size: clamp(18px, 4.8vw, 20px);
    letter-spacing: 0.12em;
}

.action-circle-bonus-line:last-child {
    font-size: clamp(11px, 2.6vw, 12px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
    .action-circle--ref:hover .action-circle-icon,
    .action-circle--ref:focus-within .action-circle-icon {
        opacity: 0;
        transform: scale(0.78);
    }

    .action-circle--ref:hover .action-circle-bonus,
    .action-circle--ref:focus-within .action-circle-bonus {
        opacity: 1;
        transform: scale(1);
    }
}

/* Fallback для устройств без hover — показываем бонус при активном состоянии */
.action-circle--ref:active .action-circle-icon {
    opacity: 0;
    transform: scale(0.78);
}

.action-circle--ref:active .action-circle-bonus {
    opacity: 1;
    transform: scale(1);
}

.action-circle--ref:focus-visible .action-circle-icon {
    opacity: 0;
    transform: scale(0.78);
}

.action-circle--ref:focus-visible .action-circle-bonus {
    opacity: 1;
    transform: scale(1);
}

.action-circle:hover .action-circle-btn {
    transform: translateY(-4px) scale(1.05);
    border-color: rgba(255, 205, 140, 0.68);
    background: rgba(42, 18, 12, 0.88);
    box-shadow: 0 30px 68px rgba(255, 110, 20, 0.35);
}

.action-label {
    font-size: clamp(12px, 3.2vw, 14px);
    font-weight: 700;
    color: #fff6eb;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

@media (max-width: 480px) {
    .bottom-actions {
        gap: clamp(12px, 4vw, 16px);
    }
    .action-circle-btn {
        width: clamp(76px, 22vw, 96px);
        height: clamp(76px, 22vw, 96px);
    }
}

@media (max-height: 720px) {
    .btn {
        height: 54px;
    }
    .action-circle-btn {
        width: 74px;
        height: 74px;
    }
}

@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
    .home-hero {
        backdrop-filter: none;
        background: linear-gradient(150deg, rgba(30, 12, 8, 0.95) 0%, rgba(26, 10, 22, 0.92) 48%, rgba(12, 6, 16, 0.94) 100%);
    }

    /* REMOVED .home-hero::before override */

    .glass-button::before,
    .glass-button::after,
    .action-circle-btn::before,
    .action-circle-btn::after {
        opacity: 0.4;
    }
}

@supports not (mix-blend-mode: overlay) {
    .app-background::after {
        mix-blend-mode: normal;
        opacity: 0.4;
    }
}


/* АДАПТИВ */
@media (max-height: 720px) {
    .btn {
        height: 52px;
        font-size: 15px;
    }
    .brand-logo-img {
        width: 40px;
        height: 40px;
    }
    .action-circle-btn {
        width: 76px;
        height: 76px;
    }
    .action-label {
        font-size: 12px;
    }
}

@media (max-height: 640px) {
    .btn {
        height: 50px;
        font-size: 14px;
    }
    .home-hero {
        padding: 16px;
    }
    .view.view-home.view--single {
        gap: 14px;
    }
    .action-circle-btn {
        width: 70px;
        height: 70px;
    }
    .action-circle-btn svg {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 360px) {
    .action-label {
        font-size: 11px;
    }
    .btn .btn-badge {
        font-size: 10px;
        padding: 6px 10px;
    }
}

/* ================================
   MODERN SETUP FLOW STYLES
   ================================ */

.view-setup-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 0;
}

.setup-modern-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    --setup-stack-gap: clamp(14px, 3.5vw, 18px);
    gap: var(--setup-stack-gap);
    width: 100%;
    max-width: 480px;
    text-align: center;
    padding: clamp(16px, 4vw, 24px);
}

/* Progress Bar */
.setup-progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.setup-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff5c24 0%, #ff7a2e 50%, #ff9738 100%);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 16px rgba(255, 120, 40, 0.5);
}

.setup-progress-label {
    font-size: clamp(0.75rem, 2.5vw, 0.85rem);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 8px;
}

/* Header Row - Иконка + Заголовок в одну строку */
.setup-header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 3vw, 16px);
    margin-top: clamp(8px, 2vw, 12px);
}

.setup-icon-circle {
    position: relative;
    flex-shrink: 0;
    width: clamp(56px, 12vw, 68px);
    height: clamp(56px, 12vw, 68px);
    border-radius: 50%;
    border: 2px solid rgba(255, 170, 110, 0.4);
    background: linear-gradient(155deg, rgba(255, 120, 40, 0.15) 0%, rgba(10, 4, 18, 0.7) 100%);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow:
        0 20px 42px rgba(4, 0, 0, 0.42),
        0 0 28px rgba(255, 120, 40, 0.22);
    animation: pulseIcon 3s ease-in-out infinite;
}

.setup-icon-circle svg {
    width: clamp(28px, 6vw, 36px);
    height: clamp(28px, 6vw, 36px);
    display: block;
    margin: auto;
}

.setup-icon-circle::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 188, 120, 0.45) 0%, rgba(255, 110, 20, 0.22) 55%, rgba(170, 70, 255, 0.18) 100%);
    mix-blend-mode: screen;
    opacity: 0.5;
    filter: blur(18px);
    pointer-events: none;
    animation: rotateGlow 10s linear infinite;
}

/* Success icon variant */
.setup-icon-success {
    background: linear-gradient(155deg, rgba(51, 238, 178, 0.18) 0%, rgba(10, 4, 18, 0.7) 100%);
    border-color: rgba(51, 238, 178, 0.5);
    color: var(--color-success);
}

.setup-icon-success svg {
    /* Идеальное центрирование галочки */
    position: relative;
    top: 1px;
}

.setup-icon-success::before {
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.45) 0%, rgba(51, 238, 178, 0.22) 55%, rgba(51, 238, 178, 0.18) 100%);
}

.setup-header-success {
    width: 100%;
    justify-content: center;
    flex-direction: row;
    text-align: left;
    gap: clamp(14px, 4vw, 18px);
}

.setup-header-success .setup-icon-circle {
    margin-right: clamp(10px, 3vw, 16px);
}

.setup-header-success .setup-modern-title {
    flex: initial;
}

.setup-header-final {
    width: 100%;
    justify-content: center;
    margin-top: clamp(12px, 3vw, 18px);
    margin-bottom: clamp(8px, 2vw, 12px);
}

@keyframes pulseIcon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Typography */
.setup-modern-title {
    font-size: clamp(1.35rem, 5vw, 1.75rem);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.1;
    flex: 1;
    text-align: left;
}

.view-setup-modern .setup-header-success + .setup-modern-title {
    width: auto;
    text-align: left;
    padding-left: 0;
}

.view-setup-modern .setup-header-success ~ .setup-modern-subtitle {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.setup-modern-subtitle {
    font-size: clamp(0.9rem, 3vw, 1rem);
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
    max-width: 380px;
}

/* Download Buttons */
.setup-download-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--setup-stack-gap);
    width: 100%;
}

.setup-download-btn {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 16px);
    padding: clamp(14px, 3.5vw, 18px) clamp(16px, 4vw, 20px);
    text-align: left;
    justify-content: flex-start;
    width: 100%;
}

.setup-download-btn svg {
    flex-shrink: 0;
    width: clamp(20px, 4.5vw, 24px);
    height: clamp(20px, 4.5vw, 24px);
}

/* Стили для кнопок загрузки - немного разные, но схожие */
.btn-download-primary {
    background: linear-gradient(135deg, #ff8a1d 0%, #ff7428 100%) !important;
    border-color: rgba(255, 180, 110, 0.6) !important;
    box-shadow: 0 20px 42px rgba(255, 110, 40, 0.32) !important;
}

.btn-download-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 24px 48px rgba(255, 120, 50, 0.38) !important;
}

.btn-download-secondary {
    background: linear-gradient(125deg, rgba(255, 170, 90, 0.22) 0%, rgba(44, 18, 12, 0.8) 100%) !important;
    border-color: rgba(255, 170, 100, 0.4) !important;
    box-shadow: 0 18px 38px rgba(255, 100, 30, 0.22) !important;
}

.btn-download-secondary:hover {
    background: linear-gradient(125deg, rgba(255, 190, 120, 0.28) 0%, rgba(60, 24, 18, 0.86) 100%) !important;
    border-color: rgba(255, 200, 130, 0.5) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 22px 44px rgba(255, 110, 35, 0.28) !important;
}

.setup-download-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.setup-download-name {
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
    font-weight: 700;
    color: var(--text);
    display: block;
}

.setup-download-hint {
    font-size: clamp(0.8rem, 2.6vw, 0.9rem);
    font-weight: 500;
    color: var(--text-muted);
    display: block;
}

/* Next Button - Hero style (яркая и крутая) */
.setup-next-btn {
    width: 100%;
    margin-top: var(--setup-stack-gap);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.setup-next-btn svg {
    width: 20px;
    height: 20px;
    margin-left: 4px;
}

.btn-hero-next {
    background: linear-gradient(135deg, #33eeb2 0%, #2dd4a0 100%) !important;
    border-color: rgba(51, 238, 178, 0.6) !important;
    color: #0a0515 !important;
    font-weight: 800 !important;
    box-shadow:
        0 24px 48px rgba(51, 238, 178, 0.35),
        0 0 32px rgba(51, 238, 178, 0.25) !important;
    animation: heroGlow 2s ease-in-out infinite;
}

.btn-hero-next::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: shine 3s ease-in-out infinite;
}

.btn-hero-next:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow:
        0 28px 56px rgba(51, 238, 178, 0.42),
        0 0 40px rgba(51, 238, 178, 0.35) !important;
}

@keyframes heroGlow {
    0%, 100% {
        box-shadow:
            0 24px 48px rgba(51, 238, 178, 0.35),
            0 0 32px rgba(51, 238, 178, 0.25);
    }
    50% {
        box-shadow:
            0 24px 48px rgba(51, 238, 178, 0.45),
            0 0 40px rgba(51, 238, 178, 0.35);
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }
    50%, 100% {
        transform: translateX(200%);
    }
}

/* Import Button */
.setup-import-btn {
    width: 100%;
    margin-top: clamp(10px, 2.5vw, 16px);
}

/* Manual Copy Button */
.setup-manual-copy-btn {
    width: 100%;
    margin-top: clamp(10px, 2.5vw, 12px);
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Show Manual Link */
.setup-show-manual {
    align-self: center;
    margin-top: clamp(4px, 1.6vw, 8px);
    margin-bottom: clamp(6px, 2vw, 10px);
    padding: 2px 8px;
    background: none;
    border: none;
    min-height: 0;
    font-size: clamp(0.72rem, 2.2vw, 0.82rem);
    color: rgba(255, 255, 255, 0.58);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    letter-spacing: 0.01em;
    transition: color 0.18s ease, text-decoration-color 0.18s ease, transform 0.18s ease;
}

.setup-show-manual:hover {
    color: rgba(255, 255, 255, 0.78);
    text-decoration-color: currentColor;
    transform: translateY(-1px);
}

/* Success Steps */
.setup-success-steps {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 2vw, 12px);
    width: 100%;
    margin-top: clamp(12px, 3vw, 18px);
    margin-bottom: clamp(12px, 3vw, 18px);
}

.setup-success-step {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 14px);
    padding: clamp(12px, 3vw, 14px);
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(30, 12, 8, 0.75) 0%, rgba(24, 10, 28, 0.7) 50%, rgba(10, 4, 18, 0.7) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.28);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    text-align: left;
}

.setup-success-number {
    flex-shrink: 0;
    width: clamp(30px, 6.5vw, 36px);
    height: clamp(30px, 6.5vw, 36px);
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8a1d 0%, #ff6500 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(255, 120, 40, 0.35);
}

.setup-success-text {
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

/* Final Actions - кнопки в одну строку */
.setup-final-actions {
    display: flex;
    gap: clamp(12px, 3vw, 16px);
    width: 100%;
    margin-top: var(--setup-stack-gap);
}

.setup-final-actions .btn {
    flex: 1;
    min-width: 0; /* Позволяет кнопкам сжиматься равномерно */
}

/* На очень узких экранах - в колонку */
@media (max-width: 380px) {
    .setup-final-actions {
        flex-direction: column;
    }

    .setup-final-actions .btn {
        width: 100%;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .setup-modern-container {
        padding: clamp(14px, 4vw, 20px);
        gap: clamp(10px, 2.5vw, 14px);
    }
}

@media (max-height: 720px) {
    .setup-modern-container {
        gap: clamp(8px, 2vw, 12px);
        padding: clamp(12px, 3vw, 18px);
    }

    .setup-header-row {
        margin-top: clamp(6px, 1.5vw, 10px);
        gap: clamp(10px, 2.5vw, 14px);
    }

    .setup-icon-circle {
        width: clamp(50px, 11vw, 62px);
        height: clamp(50px, 11vw, 62px);
    }

    .setup-icon-circle svg {
        width: clamp(24px, 5.5vw, 32px);
        height: clamp(24px, 5.5vw, 32px);
    }

    .setup-modern-title {
        font-size: clamp(1.2rem, 4.5vw, 1.5rem);
    }

    .setup-modern-subtitle {
        font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    }

    .setup-download-buttons {
        gap: clamp(12px, 3vw, 14px);
        margin-top: clamp(8px, 2vw, 12px);
    }

    .setup-download-btn {
        padding: clamp(12px, 3vw, 14px) clamp(14px, 3.5vw, 16px);
    }

    .setup-success-steps {
        gap: clamp(6px, 1.5vw, 10px);
        margin-top: clamp(10px, 2.5vw, 14px);
        margin-bottom: clamp(10px, 2.5vw, 14px);
    }

    .setup-success-step {
        padding: clamp(10px, 2.5vw, 12px);
    }
}

@media (max-height: 640px) {
    .setup-modern-container {
        gap: clamp(6px, 1.5vw, 10px);
        padding: clamp(10px, 2.5vw, 14px);
    }

    .setup-header-row {
        margin-top: clamp(4px, 1vw, 8px);
        gap: clamp(8px, 2vw, 12px);
    }

    .setup-icon-circle {
        width: clamp(46px, 10vw, 56px);
        height: clamp(46px, 10vw, 56px);
    }

    .setup-icon-circle svg {
        width: clamp(22px, 5vw, 28px);
        height: clamp(22px, 5vw, 28px);
    }

    .setup-modern-title {
        font-size: clamp(1.1rem, 4vw, 1.35rem);
    }

    .setup-progress-label {
        font-size: clamp(0.7rem, 2.2vw, 0.8rem);
        margin-top: 6px;
    }
}

/* ================================
   COMPACT SUBSCRIPTION UI (в стиле конкурента)
   ================================ */

.view--compact {
    overflow: visible;
    min-height: 0;
    width: 100%;
}

.view.view-plans.view--single.view--compact {
    width: 100%;
}

.plans-compact-container {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vw, 16px);
    height: 100%;
    overflow: visible;
}


/* Заголовки */
.plans-title {
    font-size: clamp(1.2rem, 4.5vw, 1.5rem);  /* Уменьшен размер */
    font-weight: 800;
    color: var(--text);
    text-align: center;
    margin: 0;
    letter-spacing: -0.01em;
}

.plans-subtitle {
    font-size: clamp(0.8rem, 2.8vw, 0.9rem);  /* Уменьшен размер */
    color: var(--text-muted);
    text-align: center;
    margin: 0;
    line-height: 1.3;
}

/* Empty state */
.plans-empty {
    text-align: center;
    padding: clamp(32px, 8vw, 48px);
}

.plans-empty h2 {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

.plans-empty p {
    font-size: clamp(0.9rem, 3vw, 1rem);
    color: var(--text-muted);
    line-height: 1.5;
}

/* Селектор устройств */
.device-selector {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px 11px;
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(30, 13, 8, 0.88) 0%, rgba(15, 7, 18, 0.8) 100%);
    border: 1.4px solid rgba(255, 170, 110, 0.42);
    backdrop-filter: blur(16px) saturate(135%);
    -webkit-backdrop-filter: blur(16px) saturate(135%);
    overflow: visible;
    align-items: center;
    isolation: isolate;
    position: relative;
    z-index: 1;
}

.device-selector-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 2px;
}

.device-selector-label {
    font-size: clamp(0.8rem, 2.6vw, 0.88rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.3;
}

.device-selector-text {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.device-selector-text strong {
    color: var(--accent);
    font-weight: 700;
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
}

.device-selector-icon-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.9;
}

.device-selector-icon-inline svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: rgba(255, 180, 100, 0.9);
    stroke: currentColor;
    filter: drop-shadow(0 1px 2px rgba(255, 140, 70, 0.3));
}

/* Убираем старый абсолютный icon */
.device-selector-icon {
    display: none;
}

.device-selector-icon svg {
    display: none;
}

/* Строка с цифрой и степперами */
.device-counter-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 2px;
}

/* Красивый badge с цифрой - более компактный */
.device-count-badge {
    position: relative;
    min-width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(255, 140, 60, 0.18) 0%, rgba(255, 170, 110, 0.12) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.5);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-shadow:
        0 0 12px rgba(255, 140, 60, 0.18),
        inset 0 1px 2px rgba(255, 255, 255, 0.08);
}

.device-count-badge:active {
    transform: scale(0.97);
    background: linear-gradient(145deg, rgba(255, 140, 60, 0.24) 0%, rgba(255, 170, 110, 0.16) 100%);
    border-color: rgba(255, 170, 110, 0.58);
    box-shadow:
        0 0 16px rgba(255, 140, 60, 0.24),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.device-count-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    text-shadow: 0 1px 6px rgba(255, 140, 60, 0.24);
}

.device-slider-wrapper {
    width: 100%;
    max-width: 100%;
}

.device-label {
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 600;
    color: var(--text);
    text-align: center;
    display: block;
    width: 100%;
}

.device-slider {
    position: relative;
    width: min(280px, 100%);
    margin-inline: auto;
    --device-dot-size: clamp(24px, 6vw, 28px);
    --device-dot-radius: calc(var(--device-dot-size) / 2);
}

.device-track {
    position: relative;
    width: calc(100% - var(--device-dot-size));
    margin: 0 calc(var(--device-dot-radius));
    height: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.14));
    border-radius: 2px;
    overflow: hidden;
}
/* Hover-анимация info только на десктопе */
.touch-device .info-fab-tooltip { display: none !important; }

@media (hover: hover) and (pointer: fine) {
  html:not(.touch-device) .info-fab:hover { transform: scale(1.04); }
  html:not(.touch-device) .info-fab-wrapper:hover .info-fab-tooltip,
  html:not(.touch-device) .info-fab-wrapper:focus-within .info-fab-tooltip {
      opacity: 1;
      transform: translate(-50%, 0);
  }
}

.device-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    /* width задается inline в HTML через style="width: ..." */
    background: linear-gradient(90deg, #ff5c24 0%, #ff7a2e 50%, #ff9738 100%);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.device-dots {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0 0;
    padding: 0 calc(var(--device-dot-radius));
    width: 100%;
    box-sizing: border-box;
}

.device-dot {
    width: var(--device-dot-size);
    height: var(--device-dot-size);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 140, 60, 0.35);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    contain: layout style paint;
}

.device-dot:hover {
    background: rgba(255, 140, 60, 0.25);
    border-color: rgba(255, 140, 60, 0.6);
    /* Убираем scale чтобы не было reflow */
}

.device-dot.is-active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 16px rgba(255, 140, 60, 0.5);
}

.device-dot.is-on {
    background: rgba(255, 140, 60, 0.45);
    border-color: rgba(255, 140, 60, 0.85);
    box-shadow: 0 0 12px rgba(255, 140, 60, 0.45);
}

/* Красивые кнопки степпера */
.device-stepper-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1.4px solid rgba(255, 170, 110, 0.4);
    background: rgba(255, 170, 110, 0.13);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.device-stepper-btn svg {
    width: 15px;
    height: 15px;
}

.device-stepper-btn:disabled {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.4);
    cursor: default;
    box-shadow: none;
    pointer-events: none;
}

.device-stepper-btn:active {
    background: rgba(255, 170, 110, 0.22);
    transform: scale(0.94);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

/* Интерактивный слайдер */
.device-slider-interactive {
    position: relative;
    width: 100%;
    padding: 8px 16px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.device-slider-interactive:active {
    cursor: grabbing;
}

.device-track {
    position: relative;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: visible;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
}

.device-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff6a00 0%, #ff8c3c 50%, #ffb468 100%);
    border-radius: 3px;
    transition: width 0.15s ease;
    pointer-events: none;
    box-shadow: 0 0 7px rgba(255, 140, 60, 0.24);
}

/* Красивый ползунок (thumb) */
.device-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    transition: left 0.15s ease;
    z-index: 2;
}

.device-thumb-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff8c3c 0%, var(--accent) 100%);
    border-radius: 50%;
    border: 2.4px solid rgba(255, 255, 255, 0.32);
    box-shadow:
        0 0 0 4px rgba(255, 140, 60, 0.18),
        0 3px 9px rgba(0, 0, 0, 0.26),
        0 0 16px rgba(255, 140, 60, 0.34),
        inset 0 1px 2px rgba(255, 255, 255, 0.26);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.device-slider-interactive:active .device-thumb-inner {
    transform: scale(1.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow:
        0 0 0 8px rgba(255, 140, 60, 0.3),
        0 4px 14px rgba(0, 0, 0, 0.4),
        0 0 28px rgba(255, 140, 60, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.device-slider-interactive.is-dragging .device-thumb,
.device-slider-interactive.is-dragging .device-fill {
    transition: none !important;
}

/* Убираем маркеры - они не нужны */
.device-markers {
    display: none;
}

/* Bottom Sheet пикер устройств */
.device-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.device-picker-sheet {
    width: 100%;
    max-width: 100%;
    background: linear-gradient(180deg, #1c0f1d 0%, #10070f 100%);
    border-radius: 20px 20px 0 0;
    padding: 18px 16px;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.device-picker-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 auto 12px;
}

.device-picker-title {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.device-picker-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.device-picker-btn {
    aspect-ratio: 1;
    border-radius: 10px;
    border: 1.4px solid rgba(255, 170, 110, 0.32);
    background: rgba(255, 170, 110, 0.1);
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-picker-btn.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    transform: scale(1.02);
    box-shadow: 0 0 14px rgba(255, 140, 60, 0.45);
}

.device-picker-btn:active {
    transform: scale(0.94);
}

/* Сетка тарифов 2x2 */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(10px, 2.5vw, 14px);
    width: 100%;
    margin-top: clamp(8px, 2vw, 12px);
    overflow: visible;
}

/* Карточка тарифа */
.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;  /* Уменьшен gap */
    padding: clamp(12px, 3vw, 16px);  /* Уменьшен padding */
    min-height: clamp(100px, 24vw, 120px);  /* Уменьшена высота */
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(30, 12, 8, 0.75) 0%, rgba(24, 10, 28, 0.7) 50%, rgba(10, 4, 18, 0.7) 100%);
    border: 2px solid rgba(255, 170, 110, 0.32);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    overflow: visible;
}

/* REMOVED .plan-card::before - no more inner gradient overlays */

.plan-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 170, 110, 0.55);
    box-shadow:
        0 12px 32px rgba(255, 96, 10, 0.25),
        0 6px 18px rgba(255, 96, 10, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.12);
}

.plan-card.is-selected {
    background: rgba(255, 120, 40, 0.15);
    border-color: rgba(255, 140, 60, 0.7);
    transform: scale(1.02);
    box-shadow:
        0 12px 32px rgba(255, 100, 20, 0.28),
        0 6px 18px rgba(255, 100, 20, 0.20),
        0 0 32px rgba(255, 120, 40, 0.22);
}

/* Бейдж "ПОПУЛЯРНЫЙ" */
.plan-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -60%);
    z-index: 5;
    padding: 4px 10px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff6500 0%, #ff8a1d 100%);
    font-size: clamp(0.65rem, 2vw, 0.75rem);
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(255, 100, 20, 0.35);
}
@supports selector(:has(*)) {
  .plan-card:has(.plan-badge) { padding-top: clamp(28px, 6vw, 32px); }
}
/* Fallback: если :has не поддерживается */
.plan-card.is-popular { padding-top: clamp(24px, 5vw, 28px); }

.plan-card-duration {
    font-size: clamp(0.95rem, 3.5vw, 1.1rem);
    font-weight: 700;
    color: var(--text);
    text-align: center;
    min-height: 1.3em;  /* Резервируем место */
}

.plan-card-price {
    font-size: clamp(1.35rem, 5vw, 1.65rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ff8a1d 0%, #ff6500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    min-height: 1.3em;  /* Резервируем место */
}

.plan-card-monthly {
    font-size: clamp(0.72rem, 2.3vw, 0.8rem);
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
    min-height: 1.3em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.plan-card-monthly svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: inline-flex;
    margin: 0;
    transform: translateY(0);
    stroke: var(--text-muted);
    opacity: 0.9;
}

.plan-card-monthly svg circle[fill="currentColor"] {
    fill: var(--text-muted);
}

.plan-card-monthly svg rect,
.plan-card-monthly svg line {
    stroke: var(--text-muted);
}

/* Кнопка оплаты */
.btn-pay {
    width: 100%;
    margin-top: auto;
    max-width: min(340px, 100%);
    align-self: center;
    font-size: clamp(0.95rem, 3.2vw, 1.1rem);  /* Уменьшен размер */
    font-weight: 700;
    padding: clamp(12px, 3vw, 16px);  /* Уменьшен padding */
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* Payment Page - Rebuilt from scratch */
.pay-page {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 3.2vw, 18px);
    width: 100%;
}

.pay-title {
    font-size: clamp(1.2rem, 4.5vw, 1.5rem);
    font-weight: 800;
    color: var(--text);
    text-align: center;
    margin: 0 0 clamp(4px, 1vw, 8px) 0;
}

.pay-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: clamp(14px, 3.5vw, 18px);
    border-radius: 16px;
    background: linear-gradient(155deg, rgba(30, 12, 8, 0.75) 0%, rgba(24, 10, 28, 0.7) 50%, rgba(10, 4, 18, 0.7) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.35);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
}

.pay-summary.is-loading {
    position: relative;
    opacity: 0.9;
}

.pay-upgrade-row {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 14px);
    padding: 6px 0;
}

.pay-upgrade-icon {
    flex-shrink: 0;
    width: clamp(34px, 7vw, 40px);
    height: clamp(34px, 7vw, 40px);
    border-radius: 12px;
    background: linear-gradient(140deg, rgba(255, 138, 29, 0.95), rgba(255, 101, 0, 0.95));
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px rgba(255, 138, 29, 0.32);
    color: #120705;
}

.pay-upgrade-icon svg {
    width: clamp(20px, 5.5vw, 24px);
    height: clamp(20px, 5.5vw, 24px);
}

.pay-upgrade-text {
    font-size: clamp(1rem, 3.2vw, 1.1rem);
    font-weight: 700;
    color: var(--text);
}

.device-upgrade-pill {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 138, 29, 0.35);
    color: var(--accent);
    background: rgba(255, 138, 29, 0.12);
    font-weight: 600;
    line-height: 1;
}

.device-upgrade-pill-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.pay-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: clamp(6px, 1.8vw, 12px);
    row-gap: 4px;
}

.pay-row-term {
    flex-wrap: nowrap;
    align-items: baseline;
}

.pay-row-term .pay-label {
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: clamp(6px, 1.4vw, 12px);
}

.pay-row-term .pay-value {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: clamp(4px, 1.4vw, 6px);
    min-width: 0;
    white-space: nowrap;
    flex: 1 1 auto;
}

.pay-row-term.is-tight .pay-value {
    gap: clamp(2px, 1vw, 4px);
}

.pay-row--total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 170, 110, 0.25);
}

.pay-label {
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    color: var(--text-muted);
    flex-shrink: 0;
}

.pay-value {
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 600;
    color: var(--text);
    margin-left: auto;
    text-align: right;
    min-width: 0;
    word-break: break-word;
}

.pay-term {
    display: inline-flex;
    align-items: center;
    gap: clamp(4px, 1.2vw, 6px);
    white-space: nowrap;
    flex-wrap: nowrap;
    max-width: 100%;
    min-width: 0;
    justify-content: flex-end;
    font-size: clamp(0.9rem, 3vw, 1rem); /* совпадает с pay-value */
}

.pay-row-term.is-tight .pay-term {
    gap: clamp(2px, 0.8vw, 4px);
}

.pay-term--loading {
    justify-content: flex-start;
    color: var(--text-muted);
    gap: 10px;
}

.pay-term-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: rgba(255, 255, 255, 0.75);
    animation: spin 0.9s linear infinite;
    flex-shrink: 0;
}

.pay-term-math {
    font-size: clamp(0.72rem, 2.1vw, 0.9rem);
    font-weight: 500;
    color: var(--text-muted);
}

.pay-term-arrow {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    opacity: 0.85;
}

.pay-term-arrow svg {
    width: clamp(10px, 2.4vw, 16px);
    height: clamp(8px, 2.2vw, 10px);
    display: block;
}

.pay-term-result {
    font-size: inherit;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.pay-loading-note {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    color: var(--text-muted);
    padding-top: 6px;
}

.pay-price {
    font-size: clamp(1.25rem, 4.5vw, 1.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ff8a1d 0%, #ff6500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: auto;
    text-align: right;
}

.pay-benefit {
    margin-top: 8px;
    padding: clamp(6px, 1.5vw, 8px) clamp(10px, 2.5vw, 12px);
    border-radius: 8px;
    background: rgba(76, 175, 80, 0.06);
    border: 1px solid rgba(76, 175, 80, 0.15);
    font-size: clamp(0.75rem, 2.3vw, 0.82rem);
    font-weight: 500;
    color: rgba(139, 195, 74, 0.85);
    text-align: center;
    line-height: 1.3;
}

.pay-back {
    align-self: flex-start;
    margin-top: -6px;
    min-height: 32px;
    padding: clamp(4px, 1.2vw, 6px) clamp(10px, 2.6vw, 12px);
    font-size: clamp(0.72rem, 2.3vw, 0.8rem);
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.pay-back:hover {
    opacity: 0.8;
    color: var(--accent);
}

.pay-back:active {
    opacity: 1;
}

.pay-methods {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2.5vw, 12px);
}

.pay-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: clamp(14px, 3.5vw, 18px);
    border-radius: 16px;
    background: linear-gradient(155deg, rgba(30, 12, 8, 0.75) 0%, rgba(24, 10, 28, 0.7) 50%, rgba(10, 4, 18, 0.7) 100%);
    border: 2px solid rgba(255, 170, 110, 0.32);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    text-align: left;
}

.pay-method.is-disabled {
    opacity: 0.55;
    pointer-events: none;
    cursor: default;
    transform: none !important;
    box-shadow: none !important;
}

.pay-method:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 170, 110, 0.55);
    box-shadow:
        0 12px 32px rgba(255, 96, 10, 0.25),
        0 6px 18px rgba(255, 96, 10, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.12);
}

.pay-method-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
}

.pay-method-icon svg {
    width: 100%;
    height: 100%;
}

.pay-method-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pay-method-name {
    font-size: clamp(1rem, 3.5vw, 1.15rem);
    font-weight: 700;
    color: var(--text);
}

.pay-method-desc {
    font-size: clamp(0.8rem, 2.8vw, 0.9rem);
    color: var(--text-muted);
}

/* Responsive для очень маленьких экранов */
@media (max-width: 360px) {
    .plans-grid {
        gap: 8px;
    }

    .plan-card {
        min-height: 100px;
        padding: 12px;
    }

    .device-selector {
        padding: 9px 11px 10px;
        gap: 5px;
    }

    .device-selector-label {
        font-size: 0.78rem;
    }

    .device-selector-icon-inline svg {
        width: 16px;
        height: 16px;
    }

    .payment-method-icon {
        width: 32px;
        height: 32px;
    }
}

/* ========================================
   ACCOUNT VIEW 2.0
   ======================================== */

.account-scroll {
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 5vw, 24px);
    padding-right: 4px;
}

.account-stack {
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 5vw, 24px);
}

.account-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: clamp(14px, 3.8vw, 18px);
    padding: clamp(18px, 4.5vw, 24px);
    border-radius: clamp(24px, 7vw, 32px);
    background: var(--gradient-card);
    border: 1.5px solid var(--color-border);
    box-shadow: var(--shadow-soft);
    color: var(--text);
}

.account-card::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 200, 150, 0.12);
    pointer-events: none;
}

.account-card--id {
    justify-content: flex-start;
}

.account-card-icon {
    flex-shrink: 0;
    width: clamp(50px, 12vw, 60px);
    height: clamp(50px, 12vw, 60px);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.2) 0%, rgba(20, 10, 30, 0.7) 100%);
    border: 2px solid rgba(255, 170, 110, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow: 0 10px 22px rgba(255, 120, 40, 0.24);
}

.account-card-icon svg {
    width: clamp(24px, 5.5vw, 28px);
    height: clamp(24px, 5.5vw, 28px);
}

.account-card-id {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
    font-weight: 600;
}

.account-card-id-label {
    color: var(--text-muted);
}

.account-card-id-value {
    color: var(--accent);
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.02em;
}

.account-card--subscription {
    flex-direction: column;
    align-items: stretch;
    gap: clamp(14px, 4vw, 18px);
}

.account-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.account-card-title {
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.account-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: clamp(0.75rem, 2.6vw, 0.85rem);
    font-weight: 700;
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.1) 0%, rgba(20, 10, 30, 0.55) 100%);
    color: var(--text);
}

.account-status.is-active {
    border-color: rgba(51, 238, 178, 0.45);
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.18) 0%, rgba(20, 10, 30, 0.6) 100%);
}

.account-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 90, 40, 0.95);
    box-shadow: 0 0 10px rgba(255, 90, 40, 0.55);
}

.account-status.is-active .account-status-dot {
    background: #33eeb2;
    box-shadow: 0 0 14px rgba(51, 238, 178, 0.72);
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 3vw, 14px);
}

.account-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(10px, 3vw, 16px);
    font-size: clamp(0.88rem, 3vw, 1rem);
    color: var(--text);
}

.account-info-label {
    color: var(--text);
    font-weight: 600;
}

.account-info-value {
    color: var(--text-muted);
    font-weight: 600;
}

.account-info-accent {
    color: var(--accent);
    font-weight: 700;
    font-size: clamp(0.95rem, 3.2vw, 1.1rem);
}

.account-empty {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vw, 16px);
}

.account-empty-title {
    margin: 0;
    font-size: clamp(1.05rem, 3.6vw, 1.2rem);
    font-weight: 700;
    color: var(--text);
}

.account-empty-text {
    margin: 0;
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    color: var(--text-muted);
}

.account-empty-btn {
    width: 100%;
    justify-content: center;
}

.account-card--promo {
    cursor: pointer;
    background: linear-gradient(135deg, rgba(32, 18, 9, 0.92) 0%, rgba(18, 9, 6, 0.88) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.account-card--promo:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 60px rgba(255, 120, 40, 0.22);
    border-color: rgba(255, 190, 130, 0.5);
}

.account-card--promo:active {
    transform: translateY(0);
}

.account-promo-icon {
    flex-shrink: 0;
    width: clamp(48px, 11vw, 56px);
    height: clamp(48px, 11vw, 56px);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.16) 0%, rgba(32, 16, 28, 0.72) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.account-promo-icon svg {
    width: clamp(22px, 5vw, 26px);
    height: clamp(22px, 5vw, 26px);
}

.account-promo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.account-promo-title {
    font-size: clamp(1rem, 3.4vw, 1.1rem);
    font-weight: 700;
    color: var(--text);
}

.account-promo-hint {
    font-size: clamp(0.8rem, 2.6vw, 0.9rem);
    color: var(--text-muted);
}

.account-promo-arrow {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.account-promo-arrow svg {
    width: 20px;
    height: 20px;
}

@media (max-height: 720px) {
    .account-card {
        padding: clamp(16px, 4vw, 20px);
    }
}

.home-hero {
    position: relative;
    border-radius: 32px;
    padding: clamp(26px, 7vw, 36px);
    background: linear-gradient(155deg, rgba(30, 12, 8, 0.95) 0%, rgba(24, 10, 28, 0.9) 50%, rgba(10, 4, 18, 0.9) 100%);
    border: 1px solid rgba(255, 170, 110, 0.32);
    box-shadow:
        0 46px 110px rgba(4, 0, 0, 0.6),
        0 0 52px rgba(255, 96, 10, 0.24);
    backdrop-filter: blur(38px) saturate(140%);
    overflow: visible;
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(140deg, rgba(255, 188, 120, 0.5), rgba(255, 110, 20, 0.22) 50%, rgba(170, 70, 255, 0.2) 100%);
    mix-blend-mode: screen;
    opacity: 0.5;
    filter: blur(22px);
    pointer-events: none;
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 12% 14%;
    border-radius: calc(var(--radius-lg) * 1.6);
    background: radial-gradient(circle at 28% 24%, rgba(255, 220, 180, 0.2), rgba(255, 90, 10, 0.1) 58%, transparent 82%);
    opacity: 0.58;
    pointer-events: none;
}

.brand-header,
.home-status,
.home-hero .status-line,
.home-hero .subline {
    position: relative;
    z-index: 1;
}

.brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(18px, 5vw, 24px);
    margin-bottom: clamp(18px, 5vw, 26px);
    overflow: visible;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: clamp(12px, 4vw, 18px);
}

.brand-logo-img {
    position: relative;
    width: clamp(48px, 10vw, 60px);
    height: clamp(48px, 10vw, 60px);
    border-radius: 18px;
    background: center/cover no-repeat url("/miniapp/static/img/logo.svg"), radial-gradient(circle at 30% 30%, #ffe9cb 0%, #ffb568 42%, #ff6a00 100%);
    box-shadow: 0 16px 32px rgba(255, 120, 0, 0.38);
    overflow: hidden;
}

.brand-logo-img::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.22), rgba(255, 110, 0, 0.18) 55%, transparent 85%);
    mix-blend-mode: screen;
}

.brand-logo-img::after {
    content: "";
    position: absolute;
    inset: -20%;
    background: conic-gradient(from 0deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.18) 60%, rgba(255, 255, 255, 0) 90%, rgba(255, 255, 255, 0.18));
    filter: blur(10px);
    animation: rotateGlow 12s linear infinite;
}

.brand-name {
    font-size: clamp(20px, 5.8vw, 24px);
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff5e8;
    text-shadow: 0 6px 22px rgba(0, 0, 0, 0.6);
}

.info-fab-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-fab-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(35, 20, 11, 0.92);
    border: 1px solid rgba(255, 165, 60, 0.32);
    color: #fff5e6;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 4px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    z-index: 25;
}

.info-fab {
    /* Иконка информации не двигается; центр выравнивается через align-items в .brand-header */
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(255, 180, 110, 0.32);
    background: rgba(22, 10, 6, 0.68);
    display: grid;
    place-items: center;
    color: #fff3e0;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease, background 0.25s ease;
    overflow: visible;
    z-index: 2;
}

.info-fab:hover {
    /* без сдвига; только стиль */
    border-color: rgba(255, 200, 140, 0.55);
    background: rgba(32, 16, 12, 0.82);
    box-shadow: 0 20px 38px rgba(255, 110, 20, 0.32);
}

.home-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.status-line {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(18px, 4.8vw, 20px);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff7ec;
    text-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #33eeb2;
    box-shadow: 0 0 16px rgba(51, 238, 178, 0.75), 0 0 32px rgba(51, 238, 178, 0.45);
}

.dot--idle { background: #ff4d4f; box-shadow: 0 0 12px rgba(255,77,79,.6), 0 0 20px rgba(255,77,79,.3); }

.subline {
    font-size: clamp(13px, 4.2vw, 15px);
    color: rgba(255, 236, 222, 0.9);
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.home-cta-group {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 4.5vw, 22px);
}

.home-cta-group .btn {
    width: 100%;
}

.btn {
    --btn-gap: 10px;
    --badge-margin: clamp(6px, 2.2vw, 10px);
    --badge-scale: 1;
    --badge-shift: 10px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--btn-gap);
    height: clamp(58px, 13vw, 66px);
    border-radius: 18px;
    padding: 0 clamp(22px, 5vw, 28px);
    border: 1px solid rgba(255, 175, 115, 0.32);
    font-size: clamp(15px, 4vw, 17px);
    font-weight: 700;
    color: #fff5ec;
    background: rgba(18, 8, 6, 0.82);
    box-shadow: 0 26px 64px rgba(4, 0, 0, 0.42);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease, background 0.25s ease, opacity 0.25s ease;
    will-change: transform, box-shadow;
}

.btn-label {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.glass-button::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 45%);
    mix-blend-mode: screen;
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.glass-button::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 200, 150, 0.12);
    opacity: 0.7;
    pointer-events: none;
}

.btn-primary {
    /* Благородный оранжевый: янтарь → мандарин → кармель */
    background: linear-gradient(135deg, #ff9738 0%, #ff7a2e 48%, #ff5c24 100%) !important;
    border-color: rgba(255, 180, 110, 0.55) !important;
    box-shadow: 0 28px 62px rgba(255, 110, 40, 0.36) !important;
    color: #fff7ec !important;
}

.btn-primary:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 34px 72px rgba(255, 120, 50, 0.42) !important;
}

.btn-secondary {
    background: linear-gradient(125deg, rgba(255, 170, 90, 0.2) 0%, rgba(44, 18, 12, 0.78) 60%, rgba(24, 10, 12, 0.86) 100%);
    border-color: rgba(255, 170, 100, 0.36);
    color: rgba(255, 242, 230, 0.94);
}

.btn-secondary:hover {
    background: linear-gradient(125deg, rgba(255, 190, 120, 0.24) 0%, rgba(60, 24, 18, 0.84) 100%);
    border-color: rgba(255, 200, 130, 0.48);
    box-shadow: 0 30px 62px rgba(255, 120, 40, 0.3);
}

.home-setup-cta {
    box-shadow: 0 24px 52px rgba(255, 120, 40, 0.22);
}

.home-setup-cta:hover {
    background: linear-gradient(125deg, rgba(255, 170, 100, 0.22) 0%, rgba(48, 20, 13, 0.82) 100%);
    border-color: rgba(255, 195, 125, 0.46);
    box-shadow: 0 20px 44px rgba(255, 142, 70, 0.26);
}

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

.btn:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.btn .btn-badge {
    margin-left: auto;
    margin-right: var(--badge-margin);
    padding: 8px 12px;
    font-size: clamp(11px, 3vw, 12px);
    font-weight: 700;
    border-radius: 999px;
    background: rgba(255, 170, 90, 0.2);
    border: 1px solid rgba(255, 198, 130, 0.44);
    color: #fff4e4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform-origin: center right;
    transform: translateX(var(--badge-shift)) scale(var(--badge-scale));
}

@supports selector(:has(*)) {
  .btn:has(.btn-badge){ padding-right: clamp(10px, 3vw, 14px); }
}

.bottom-actions {
    margin-top: clamp(10px, 3vw, 18px);
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 4vw, 20px);
    align-items: start;
}

.action-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.action-circle-btn {
    position: relative;
    width: clamp(86px, 20vw, 104px);
    height: clamp(86px, 20vw, 104px);
    border-radius: 50%;
    border: 1px solid rgba(255, 170, 110, 0.38);
    background: rgba(26, 12, 9, 0.82);
    display: grid;
    place-items: center;
    color: #fff6ec;
    box-shadow: 0 26px 52px rgba(4, 0, 0, 0.46);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease, background 0.25s ease;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.action-circle-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 70%);
    opacity: 0.7;
    pointer-events: none;
}

.action-circle-btn::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 190, 130, 0.2);
    opacity: 0.6;
    pointer-events: none;
}

.action-circle-icon,
.action-circle-bonus {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

.action-circle-icon svg {
    width: clamp(28px, 6vw, 34px);
    height: clamp(28px, 6vw, 34px);
}

.action-circle-bonus {
    opacity: 0;
    transform: scale(0.84);
    min-width: 100%;
    padding: 0 4px;
    font-size: clamp(12px, 3.2vw, 14px);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff6eb;
    text-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
    text-align: center;
    line-height: 1.05;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.action-circle-bonus-line {
    display: block;
    letter-spacing: inherit;
}

.action-circle-bonus-line:first-child {
    font-size: clamp(18px, 4.8vw, 20px);
    letter-spacing: 0.12em;
}

.action-circle-bonus-line:last-child {
    font-size: clamp(11px, 2.6vw, 12px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
    .action-circle--ref:hover .action-circle-icon,
    .action-circle--ref:focus-within .action-circle-icon {
        opacity: 0;
        transform: scale(0.78);
    }

    .action-circle--ref:hover .action-circle-bonus,
    .action-circle--ref:focus-within .action-circle-bonus {
        opacity: 1;
        transform: scale(1);
    }
}

/* Fallback для устройств без hover — показываем бонус при активном состоянии */
.action-circle--ref:active .action-circle-icon {
    opacity: 0;
    transform: scale(0.78);
}

.action-circle--ref:active .action-circle-bonus {
    opacity: 1;
    transform: scale(1);
}

.action-circle--ref:focus-visible .action-circle-icon {
    opacity: 0;
    transform: scale(0.78);
}

.action-circle--ref:focus-visible .action-circle-bonus {
    opacity: 1;
    transform: scale(1);
}

.action-circle:hover .action-circle-btn {
    transform: translateY(-4px) scale(1.05);
    border-color: rgba(255, 205, 140, 0.68);
    background: rgba(42, 18, 12, 0.88);
    box-shadow: 0 30px 68px rgba(255, 110, 20, 0.35);
}

.action-label {
    font-size: clamp(12px, 3.2vw, 14px);
    font-weight: 700;
    color: #fff6eb;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

@media (max-width: 480px) {
    .bottom-actions {
        gap: clamp(12px, 4vw, 16px);
    }
    .action-circle-btn {
        width: clamp(76px, 22vw, 96px);
        height: clamp(76px, 22vw, 96px);
    }
}

@media (max-height: 720px) {
    .btn {
        height: 54px;
    }
    .action-circle-btn {
        width: 74px;
        height: 74px;
    }
}

@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
    .home-hero {
        backdrop-filter: none;
        background: linear-gradient(150deg, rgba(30, 12, 8, 0.95) 0%, rgba(26, 10, 22, 0.92) 48%, rgba(12, 6, 16, 0.94) 100%);
    }

    /* REMOVED .home-hero::before override */

    .glass-button::before,
    .glass-button::after,
    .action-circle-btn::before,
    .action-circle-btn::after {
        opacity: 0.4;
    }
}

@supports not (mix-blend-mode: overlay) {
    .app-background::after {
        mix-blend-mode: normal;
        opacity: 0.4;
    }
}


/* АДАПТИВ */
@media (max-height: 720px) {
    .btn {
        height: 52px;
        font-size: 15px;
    }
    .brand-logo-img {
        width: 40px;
        height: 40px;
    }
    .action-circle-btn {
        width: 76px;
        height: 76px;
    }
    .action-label {
        font-size: 12px;
    }
}

@media (max-height: 640px) {
    .btn {
        height: 50px;
        font-size: 14px;
    }
    .home-hero {
        padding: 16px;
    }
    .view.view-home.view--single {
        gap: 14px;
    }
    .action-circle-btn {
        width: 70px;
        height: 70px;
    }
    .action-circle-btn svg {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 360px) {
    .action-label {
        font-size: 11px;
    }
    .btn .btn-badge {
        font-size: 10px;
        padding: 6px 10px;
    }
}

/* ================================
   MODERN SETUP FLOW STYLES
   ================================ */

.view-setup-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 0;
}

.setup-modern-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    --setup-stack-gap: clamp(14px, 3.5vw, 18px);
    gap: var(--setup-stack-gap);
    width: 100%;
    max-width: 480px;
    text-align: center;
    padding: clamp(16px, 4vw, 24px);
}

/* Progress Bar */
.setup-progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.setup-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff5c24 0%, #ff7a2e 50%, #ff9738 100%);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 16px rgba(255, 120, 40, 0.5);
}

.setup-progress-label {
    font-size: clamp(0.75rem, 2.5vw, 0.85rem);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 8px;
}

/* Header Row - Иконка + Заголовок в одну строку */
.setup-header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 3vw, 16px);
    margin-top: clamp(8px, 2vw, 12px);
}

.setup-icon-circle {
    position: relative;
    flex-shrink: 0;
    width: clamp(56px, 12vw, 68px);
    height: clamp(56px, 12vw, 68px);
    border-radius: 50%;
    border: 2px solid rgba(255, 170, 110, 0.4);
    background: linear-gradient(155deg, rgba(255, 120, 40, 0.15) 0%, rgba(10, 4, 18, 0.7) 100%);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow:
        0 20px 42px rgba(4, 0, 0, 0.42),
        0 0 28px rgba(255, 120, 40, 0.22);
    animation: pulseIcon 3s ease-in-out infinite;
}

.setup-icon-circle svg {
    width: clamp(28px, 6vw, 36px);
    height: clamp(28px, 6vw, 36px);
    display: block;
    margin: auto;
}

.setup-icon-circle::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 188, 120, 0.45) 0%, rgba(255, 110, 20, 0.22) 55%, rgba(170, 70, 255, 0.18) 100%);
    mix-blend-mode: screen;
    opacity: 0.5;
    filter: blur(18px);
    pointer-events: none;
    animation: rotateGlow 10s linear infinite;
}

/* Success icon variant */
.setup-icon-success {
    background: linear-gradient(155deg, rgba(51, 238, 178, 0.18) 0%, rgba(10, 4, 18, 0.7) 100%);
    border-color: rgba(51, 238, 178, 0.5);
    color: var(--color-success);
}

.setup-icon-success svg {
    /* Идеальное центрирование галочки */
    position: relative;
    top: 1px;
}

.setup-icon-success::before {
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.45) 0%, rgba(51, 238, 178, 0.22) 55%, rgba(51, 238, 178, 0.18) 100%);
}

.setup-header-success {
    width: 100%;
    justify-content: center;
}

.setup-header-final {
    width: 100%;
    justify-content: center;
    margin-top: clamp(12px, 3vw, 18px);
    margin-bottom: clamp(8px, 2vw, 12px);
}

@keyframes pulseIcon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Typography */
.setup-modern-title {
    font-size: clamp(1.35rem, 5vw, 1.75rem);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.1;
    flex: 1;
    text-align: left;
}

.setup-modern-subtitle {
    font-size: clamp(0.9rem, 3vw, 1rem);
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
    max-width: 380px;
}

/* Download Buttons */
.setup-download-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--setup-stack-gap);
    width: 100%;
}

.setup-download-btn {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 16px);
    padding: clamp(14px, 3.5vw, 18px) clamp(16px, 4vw, 20px);
    text-align: left;
    justify-content: flex-start;
    width: 100%;
}

.setup-download-btn svg {
    flex-shrink: 0;
    width: clamp(20px, 4.5vw, 24px);
    height: clamp(20px, 4.5vw, 24px);
}

/* Стили для кнопок загрузки - немного разные, но схожие */
.btn-download-primary {
    background: linear-gradient(135deg, #ff8a1d 0%, #ff7428 100%) !important;
    border-color: rgba(255, 180, 110, 0.6) !important;
    box-shadow: 0 20px 42px rgba(255, 110, 40, 0.32) !important;
}

.btn-download-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 24px 48px rgba(255, 120, 50, 0.38) !important;
}

.btn-download-secondary {
    background: linear-gradient(125deg, rgba(255, 170, 90, 0.22) 0%, rgba(44, 18, 12, 0.8) 100%) !important;
    border-color: rgba(255, 170, 100, 0.4) !important;
    box-shadow: 0 18px 38px rgba(255, 100, 30, 0.22) !important;
}

.btn-download-secondary:hover {
    background: linear-gradient(125deg, rgba(255, 190, 120, 0.28) 0%, rgba(60, 24, 18, 0.86) 100%) !important;
    border-color: rgba(255, 200, 130, 0.5) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 22px 44px rgba(255, 110, 35, 0.28) !important;
}

.setup-download-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.setup-download-name {
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
    font-weight: 700;
    color: var(--text);
    display: block;
}

.setup-download-hint {
    font-size: clamp(0.8rem, 2.6vw, 0.9rem);
    font-weight: 500;
    color: var(--text-muted);
    display: block;
}

/* Next Button - Hero style (яркая и крутая) */
.setup-next-btn {
    width: 100%;
    margin-top: var(--setup-stack-gap);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.setup-next-btn svg {
    width: 20px;
    height: 20px;
    margin-left: 4px;
}

.btn-hero-next {
    background: linear-gradient(135deg, #33eeb2 0%, #2dd4a0 100%) !important;
    border-color: rgba(51, 238, 178, 0.6) !important;
    color: #0a0515 !important;
    font-weight: 800 !important;
    box-shadow:
        0 24px 48px rgba(51, 238, 178, 0.35),
        0 0 32px rgba(51, 238, 178, 0.25) !important;
    animation: heroGlow 2s ease-in-out infinite;
}

.btn-hero-next::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: shine 3s ease-in-out infinite;
}

.btn-hero-next:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow:
        0 28px 56px rgba(51, 238, 178, 0.42),
        0 0 40px rgba(51, 238, 178, 0.35) !important;
}

@keyframes heroGlow {
    0%, 100% {
        box-shadow:
            0 24px 48px rgba(51, 238, 178, 0.35),
            0 0 32px rgba(51, 238, 178, 0.25);
    }
    50% {
        box-shadow:
            0 24px 48px rgba(51, 238, 178, 0.45),
            0 0 40px rgba(51, 238, 178, 0.35);
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }
    50%, 100% {
        transform: translateX(200%);
    }
}

/* Import Button */
.setup-import-btn {
    width: 100%;
    margin-top: clamp(10px, 2.5vw, 16px);
}

/* Manual Copy Button */
.setup-manual-copy-btn {
    width: 100%;
    margin-top: clamp(10px, 2.5vw, 12px);
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Show Manual Link */
.setup-show-manual {
    align-self: center;
    margin-top: clamp(4px, 1.6vw, 8px);
    margin-bottom: clamp(6px, 2vw, 10px);
    padding: 2px 8px;
    background: none;
    border: none;
    min-height: 0;
    font-size: clamp(0.72rem, 2.2vw, 0.82rem);
    color: rgba(255, 255, 255, 0.58);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    letter-spacing: 0.01em;
    transition: color 0.18s ease, text-decoration-color 0.18s ease, transform 0.18s ease;
}

.setup-show-manual:hover {
    color: rgba(255, 255, 255, 0.78);
    text-decoration-color: currentColor;
    transform: translateY(-1px);
}

/* Success Steps */
.setup-success-steps {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 2vw, 12px);
    width: 100%;
    margin-top: clamp(12px, 3vw, 18px);
    margin-bottom: clamp(12px, 3vw, 18px);
}

.setup-success-step {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 14px);
    padding: clamp(12px, 3vw, 14px);
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(30, 12, 8, 0.75) 0%, rgba(24, 10, 28, 0.7) 50%, rgba(10, 4, 18, 0.7) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.28);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    text-align: left;
}

.setup-success-number {
    flex-shrink: 0;
    width: clamp(30px, 6.5vw, 36px);
    height: clamp(30px, 6.5vw, 36px);
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8a1d 0%, #ff6500 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(255, 120, 40, 0.35);
}

.setup-success-text {
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

/* Final Actions - кнопки в одну строку */
.setup-final-actions {
    display: flex;
    gap: clamp(12px, 3vw, 16px);
    width: 100%;
    margin-top: var(--setup-stack-gap);
}

.setup-final-actions .btn {
    flex: 1;
    min-width: 0; /* Позволяет кнопкам сжиматься равномерно */
}

/* На очень узких экранах - в колонку */
@media (max-width: 380px) {
    .setup-final-actions {
        flex-direction: column;
    }

    .setup-final-actions .btn {
        width: 100%;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .setup-modern-container {
        padding: clamp(14px, 4vw, 20px);
        gap: clamp(10px, 2.5vw, 14px);
    }
}

@media (max-height: 720px) {
    .setup-modern-container {
        gap: clamp(8px, 2vw, 12px);
        padding: clamp(12px, 3vw, 18px);
    }

    .setup-header-row {
        margin-top: clamp(6px, 1.5vw, 10px);
        gap: clamp(10px, 2.5vw, 14px);
    }

    .setup-icon-circle {
        width: clamp(50px, 11vw, 62px);
        height: clamp(50px, 11vw, 62px);
    }

    .setup-icon-circle svg {
        width: clamp(24px, 5.5vw, 32px);
        height: clamp(24px, 5.5vw, 32px);
    }

    .setup-modern-title {
        font-size: clamp(1.2rem, 4.5vw, 1.5rem);
    }

    .setup-modern-subtitle {
        font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    }

    .setup-download-buttons {
        gap: clamp(12px, 3vw, 14px);
        margin-top: clamp(8px, 2vw, 12px);
    }

    .setup-download-btn {
        padding: clamp(12px, 3vw, 14px) clamp(14px, 3.5vw, 16px);
    }

    .setup-success-steps {
        gap: clamp(6px, 1.5vw, 10px);
        margin-top: clamp(10px, 2.5vw, 14px);
        margin-bottom: clamp(10px, 2.5vw, 14px);
    }

    .setup-success-step {
        padding: clamp(10px, 2.5vw, 12px);
    }
}

@media (max-height: 640px) {
    .setup-modern-container {
        gap: clamp(6px, 1.5vw, 10px);
        padding: clamp(10px, 2.5vw, 14px);
    }

    .setup-header-row {
        margin-top: clamp(4px, 1vw, 8px);
        gap: clamp(8px, 2vw, 12px);
    }

    .setup-icon-circle {
        width: clamp(46px, 10vw, 56px);
        height: clamp(46px, 10vw, 56px);
    }

    .setup-icon-circle svg {
        width: clamp(22px, 5vw, 28px);
        height: clamp(22px, 5vw, 28px);
    }

    .setup-modern-title {
        font-size: clamp(1.1rem, 4vw, 1.35rem);
    }

    .setup-progress-label {
        font-size: clamp(0.7rem, 2.2vw, 0.8rem);
        margin-top: 6px;
    }
}


/* ========================================
   REDESIGNED ACCOUNT VIEW
   ======================================== */

/* User ID Card - Compact */
.account-id-card {
    padding: 0;
    margin: 0 clamp(16px, 4vw, 20px);
}

.account-id-row {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 14px);
    padding: clamp(14px, 3.5vw, 16px) clamp(16px, 4vw, 18px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.04) 0%, rgba(10, 5, 15, 0.35) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 1.5px solid rgba(255, 170, 110, 0.15);
    border-radius: 14px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.account-id-icon {
    flex-shrink: 0;
    width: clamp(44px, 10vw, 52px);
    height: clamp(44px, 10vw, 52px);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(20, 10, 30, 0.7) 100%);
    border: 2px solid rgba(255, 170, 110, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow: 0 8px 20px rgba(255, 120, 40, 0.2);
}

.account-id-icon svg {
    width: clamp(22px, 5vw, 26px);
    height: clamp(22px, 5vw, 26px);
}

.account-id-text {
    flex: 1;
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
    font-weight: 600;
    color: var(--text-muted);
}

.account-id-value {
    color: var(--accent);
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

/* Subscription Card - Clean Design (no inner boxes) */
.account-sub-clean {
    padding: clamp(14px, 3.5vw, 16px) clamp(16px, 4vw, 18px);
    margin: 0 clamp(16px, 4vw, 20px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.04) 0%, rgba(10, 5, 15, 0.35) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 1.5px solid rgba(255, 170, 110, 0.15);
    border-radius: 14px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.account-sub-clean--empty {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vw, 16px);
}

.account-sub-clean-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(14px, 3.5vw, 18px);
    padding-bottom: clamp(10px, 2.5vw, 12px);
    border-bottom: 1px solid rgba(255, 170, 110, 0.15);
}

.account-sub-clean-title {
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.8px;
}

.account-sub-clean-indicator {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.5vw, 8px);
    padding: clamp(4px, 1vw, 6px) clamp(10px, 2.5vw, 12px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(20, 10, 30, 0.5) 100%);
    border-radius: 20px;
    border: 1.5px solid rgba(255, 170, 110, 0.2);
}

.account-sub-clean-indicator.active {
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.12) 0%, rgba(20, 10, 30, 0.5) 100%);
    border-color: rgba(51, 238, 178, 0.4);
}

.account-sub-clean-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 100, 80, 0.9);
    box-shadow: 0 0 8px rgba(255, 100, 80, 0.6);
}

.account-sub-clean-indicator.active .account-sub-clean-dot {
    background: #33eeb2;
    box-shadow: 0 0 12px rgba(51, 238, 178, 0.8);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.15);
    }
}

.account-sub-clean-status {
    font-size: clamp(0.8rem, 2.6vw, 0.9rem);
    font-weight: 700;
    color: var(--text);
}

.account-sub-clean-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(10px, 2.5vw, 12px);
    padding: clamp(7px, 1.75vw, 8px) clamp(4px, 1vw, 6px);
    border-bottom: 1px solid rgba(255, 170, 110, 0.08);
}

.account-sub-clean-row:last-child {
    border-bottom: none;
}

.account-device-card {
    margin-top: clamp(12px, 3vw, 16px);
    padding: clamp(14px, 3.5vw, 16px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(13, 6, 18, 0.5) 100%);
    border: 1px solid rgba(255, 170, 110, 0.18);
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2.5vw, 12px);
}

.account-device-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(12px, 3vw, 16px);
}

.account-device-caption {
    font-size: 14px;
    color: rgba(255, 244, 232, 0.82);
}

.account-device-count {
    font-size: 16px;
    font-weight: 600;
    color: #ffe6cc;
}

.account-device-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 170, 110, 0.35);
    background: rgba(255, 170, 110, 0.08);
    color: #fff4e8;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.account-device-inline svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.account-device-inline:hover:not(.is-disabled) {
    border-color: rgba(255, 196, 150, 0.6);
    background: rgba(255, 170, 110, 0.16);
    transform: translateY(-1px);
}

.account-device-inline.is-disabled,
.account-device-inline[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    background: rgba(255, 170, 110, 0.08);
    border-color: rgba(255, 170, 110, 0.2);
}

.account-device-progress {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
}

.account-device-progress-bar {
    width: 100%;
    height: 100%;
}

.account-device-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 138, 29, 0.9) 0%, rgba(255, 196, 120, 0.95) 100%);
    border-radius: inherit;
    transition: width 240ms ease;
}

.account-device-metrics {
    display: flex;
    justify-content: space-between;
    gap: clamp(12px, 3vw, 18px);
    flex-wrap: wrap;
}

.account-device-metric {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

.account-device-metric-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 226, 198, 0.6);
}

.account-device-metric-value {
    font-size: 14px;
    font-weight: 600;
    color: #fff4e8;
}

.account-device-manage {
    width: 100%;
    gap: 8px;
    padding-inline: clamp(14px, 3vw, 16px);
    font-size: 14px;
    justify-content: center;
}

.account-device-manage svg {
    width: 18px;
    height: 18px;
}

.account-device-manage[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.account-device-change {
    min-height: unset;
    height: auto;
    padding: 8px 14px;
    font-size: 13px;
    gap: 8px;
}

.account-sub-clean-label {
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 600;
    color: var(--text);
}

.account-sub-clean-value {
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    font-weight: 600;
    color: var(--text-muted);
}

.account-sub-clean-value-accent {
    font-size: clamp(1rem, 3.5vw, 1.15rem);
    font-weight: 800;
    color: var(--accent);
}

.account-sub-empty {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vw, 16px);
    text-align: left;
}

.account-sub-empty-title {
    font-size: clamp(1rem, 3.5vw, 1.2rem);
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.account-sub-empty-text {
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    color: var(--text-muted);
    margin: 0;
}

.account-sub-empty-btn {
    width: 100%;
    justify-content: center;
}

/* Promokod Navigation Button */
.account-promo-nav {
    padding: 0;
    margin: 0 clamp(16px, 4vw, 20px);
    overflow: visible;
}

.account-nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: clamp(14px, 3.5vw, 18px);
    padding: clamp(14px, 3.5vw, 16px) clamp(16px, 4vw, 18px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.04) 0%, rgba(10, 5, 15, 0.35) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 1.5px solid rgba(255, 170, 110, 0.15);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.account-nav-btn:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(10, 5, 15, 0.45) 100%);
    border-color: rgba(255, 170, 110, 0.3);
    transform: translateY(-2px);
    box-shadow:
        0 6px 18px rgba(255, 140, 60, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.account-nav-btn:active {
    transform: translateY(0) scale(0.98);
}

.account-nav-btn-icon {
    flex-shrink: 0;
    width: clamp(44px, 10vw, 52px);
    height: clamp(44px, 10vw, 52px);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(20, 10, 30, 0.6) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.account-nav-btn-icon svg {
    width: clamp(20px, 5vw, 26px);
    height: clamp(20px, 5vw, 26px);
}

.account-nav-btn-content {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.account-nav-btn-title {
    display: block;
    font-size: clamp(1rem, 3.5vw, 1.15rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: clamp(2px, 0.5vw, 4px);
}

.account-nav-btn-hint {
    display: block;
    font-size: clamp(0.8rem, 2.6vw, 0.9rem);
    color: var(--text-muted);
}

.account-nav-btn-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.account-nav-btn:hover .account-nav-btn-arrow {
    transform: translateX(4px);
}

.account-nav-btn-arrow svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   PROMOKOD VIEW - SIMPLE & CLEAN
   ======================================== */

.view-promokod .view-scroll {
    gap: clamp(16px, 4vw, 20px);
    overflow: visible;
}

/* Promo input section */
.promo-input-section {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2.5vw, 12px);
    overflow: visible;
}

.promo-input-group {
    display: flex;
    gap: clamp(8px, 2vw, 10px);
    align-items: stretch;
    overflow: visible;
}

.promo-input {
    flex: 1;
    min-width: 0;
    padding: clamp(14px, 3.5vw, 16px) clamp(16px, 4vw, 18px);
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
    font-weight: 600;
    color: var(--text);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.04) 0%, rgba(10, 5, 15, 0.35) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 1.5px solid rgba(255, 170, 110, 0.15);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.promo-input:focus {
    outline: none;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(10, 5, 15, 0.45) 100%);
    border-color: rgba(255, 170, 110, 0.3);
    box-shadow:
        0 6px 18px rgba(255, 140, 60, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.promo-input::placeholder {
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.6;
}

.promo-submit-btn {
    flex-shrink: 0;
    width: clamp(52px, 13vw, 58px);
    height: auto;
    border-radius: 14px;
    background: linear-gradient(135deg, #33eeb2 0%, #2dd4a0 100%);
    border: none;
    color: #0a0515;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 20px rgba(51, 238, 178, 0.3),
        0 2px 8px rgba(51, 238, 178, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.promo-submit-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 16px 42px rgba(51, 238, 178, 0.5),
        0 8px 24px rgba(51, 238, 178, 0.35),
        0 2px 12px rgba(51, 238, 178, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.promo-submit-btn:active {
    transform: translateY(0) scale(0.98);
}

.promo-submit-btn svg {
    width: clamp(20px, 5vw, 24px);
    height: clamp(20px, 5vw, 24px);
    stroke-width: 2.5;
}

.promo-hint {
    font-size: clamp(0.8rem, 2.5vw, 0.88rem);
    color: var(--text-muted);
    opacity: 0.75;
    line-height: 1.4;
}

/* Promo list section */
.promo-list-section {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 2vw, 10px);
    overflow: visible;
}

.promo-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(10px, 2.5vw, 12px);
}

.promo-list-title {
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.3px;
}

.promo-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: clamp(26px, 6.5vw, 30px);
    height: clamp(26px, 6.5vw, 30px);
    padding: 0 clamp(6px, 1.5vw, 8px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(10, 5, 15, 0.6) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    border-radius: 999px;
    font-size: clamp(0.75rem, 2.4vw, 0.85rem);
    font-weight: 700;
    color: var(--accent);
    box-shadow:
        0 2px 8px rgba(255, 140, 60, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.promo-subtitle {
    font-size: clamp(0.78rem, 2.4vw, 0.85rem);
    color: var(--text-muted);
    opacity: 0.75;
    line-height: 1.4;
}

.promo-codes-list {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 2vw, 10px);
}

/* Promo code item */
.promo-code-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(10px, 2.5vw, 12px);
    padding: clamp(12px, 3vw, 14px) clamp(14px, 3.5vw, 16px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.04) 0%, rgba(10, 5, 15, 0.35) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 1.5px solid rgba(255, 170, 110, 0.15);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.promo-code-item:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(10, 5, 15, 0.45) 100%);
    border-color: rgba(255, 170, 110, 0.3);
    transform: translateY(-3px);
    box-shadow:
        0 12px 32px rgba(255, 140, 60, 0.25),
        0 6px 18px rgba(255, 140, 60, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.promo-code-item:active {
    transform: translateY(0) scale(0.98);
}

.promo-code-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 10px);
    flex-wrap: wrap;
}

.promo-code-text {
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 700;
    color: var(--text);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.3px;
    word-break: break-word;
}

.promo-code-info {
    display: flex;
    align-items: center;
    gap: clamp(4px, 1vw, 6px);
}

.promo-code-bonus {
    font-size: clamp(0.78rem, 2.4vw, 0.85rem);
    font-weight: 600;
    color: var(--accent);
}

.promo-code-expires {
    font-size: clamp(0.72rem, 2.2vw, 0.78rem);
    color: var(--text-muted);
    opacity: 0.7;
}

.promo-code-arrow {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    opacity: 0.4;
    transition: all 0.3s ease;
}

.promo-code-item:hover .promo-code-arrow {
    opacity: 0.8;
    transform: translateX(2px);
}

.promo-code-arrow svg {
    width: 100%;
    height: 100%;
}

/* Show more button */
.promo-show-more {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 1.5vw, 8px);
    padding: clamp(10px, 2.5vw, 12px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.03) 0%, rgba(10, 5, 15, 0.25) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 170, 110, 0.12);
    border-radius: 12px;
    color: var(--accent);
    font-size: clamp(0.82rem, 2.6vw, 0.9rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.promo-show-more:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.06) 0%, rgba(10, 5, 15, 0.35) 100%);
    border-color: rgba(255, 170, 110, 0.2);
    transform: translateY(-1px);
}

.promo-show-more-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotate(90deg);
}

.promo-show-more-icon.expanded {
    transform: rotate(-90deg);
}

.promo-show-more-icon svg {
    width: 14px;
    height: 14px;
}

/* Empty state */
.promo-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 3vw, 14px);
    padding: clamp(24px, 6vw, 32px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.02) 0%, rgba(10, 5, 15, 0.25) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px dashed rgba(255, 170, 110, 0.15);
    border-radius: 16px;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.promo-empty-icon {
    width: clamp(54px, 13vw, 64px);
    height: clamp(54px, 13vw, 64px);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(10, 5, 15, 0.4) 100%);
    border: 2px solid rgba(255, 170, 110, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.6;
}

.promo-empty-icon svg {
    width: clamp(26px, 6.5vw, 32px);
    height: clamp(26px, 6.5vw, 32px);
}

.promo-empty-text {
    display: flex;
    flex-direction: column;
    gap: clamp(3px, 0.8vw, 4px);
}

.promo-empty-title {
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.promo-empty-subtitle {
    font-size: clamp(0.8rem, 2.5vw, 0.88rem);
    color: var(--text-muted);
    opacity: 0.75;
    margin: 0;
    line-height: 1.4;
}

/* ========================================
   ACCOUNT VIEW - CLEAN CARDS (NO BACKGROUND)
   ======================================== */

.view-account {
    background: none !important;
    box-shadow: none !important;
}

.view-account .view-scroll {
    background: none !important;
    box-shadow: none !important;
    padding-right: 4px;
    /* важное: больше не режем подсветку/тени/трансформации */
    overflow: visible;
}


/* Clean card without background/border (Liquid Glass style) */
.account-card-clean {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vw, 16px);
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    box-shadow: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ========================================
   HELP SECTION - LIQUID GLASS DESIGN
   ======================================== */

/* Help view container */
.view-help .view-scroll,
.view-help-setup .view-scroll,
.view-help-troubleshoot .view-scroll,
.view-referral-help .view-scroll {
    gap: clamp(16px, 4vw, 20px);
    overflow: visible;
    padding-bottom: clamp(20px, 5vw, 24px);
}

/* Более аккуратная подсветка на кнопках внутри "Справка".
   Делаем свечения короче и мягче, чтобы не тянулось сильно вниз. */
.view-referral-help .btn-secondary:hover {
    box-shadow: 0 18px 36px rgba(255, 120, 40, 0.22);
}


/* Help Section Header */
.help-section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(10px, 2.5vw, 12px);
    padding: clamp(20px, 5vw, 24px) clamp(16px, 4vw, 20px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.06) 0%, rgba(10, 5, 15, 0.4) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 1.5px solid rgba(255, 170, 110, 0.2);
    border-radius: 18px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-align: center;
}

.help-section-icon {
    width: clamp(48px, 11vw, 56px);
    height: clamp(48px, 11vw, 56px);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.2) 0%, rgba(20, 10, 30, 0.7) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.help-section-icon svg {
    width: clamp(24px, 6vw, 28px);
    height: clamp(24px, 6vw, 28px);
}

.help-section-title {
    font-size: clamp(1.15rem, 4vw, 1.35rem);
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.help-section-subtitle {
    font-size: clamp(0.85rem, 2.7vw, 0.94rem);
    color: var(--text-muted);
    opacity: 0.85;
    line-height: 1.5;
    margin: 0;
}

/* Help setup subtitle (deprecated, kept for compatibility) */
.help-setup-subtitle {
    font-size: clamp(0.85rem, 2.7vw, 0.94rem);
    color: var(--text-muted);
    opacity: 0.85;
    line-height: 1.4;
    margin: clamp(-10px, -2.5vw, -8px) 0 clamp(14px, 3.5vw, 18px);
    text-align: center;
}

/* Main Help Menu Buttons */
.help-menu-button {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: clamp(14px, 3.5vw, 18px);
    padding: clamp(16px, 4vw, 18px) clamp(16px, 4vw, 18px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.04) 0%, rgba(10, 5, 15, 0.35) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 1.5px solid rgba(255, 170, 110, 0.15);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: visible;
    box-sizing: border-box;
}

.help-menu-button:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(10, 5, 15, 0.45) 100%);
    border-color: rgba(255, 170, 110, 0.3);
    transform: translateY(-3px);
    box-shadow:
        0 12px 32px rgba(255, 140, 60, 0.25),
        0 6px 18px rgba(255, 140, 60, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.help-menu-button:active {
    transform: translateY(0) scale(0.98);
}

.help-menu-icon {
    flex-shrink: 0;
    width: clamp(48px, 11vw, 56px);
    height: clamp(48px, 11vw, 56px);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(20, 10, 30, 0.6) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-menu-button:hover .help-menu-icon {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.22) 0%, rgba(20, 10, 30, 0.7) 100%);
    border-color: rgba(255, 170, 110, 0.45);
    box-shadow: 0 4px 12px rgba(255, 140, 60, 0.2);
}

.help-menu-icon svg {
    width: clamp(22px, 5.5vw, 28px);
    height: clamp(22px, 5.5vw, 28px);
}

.help-menu-content {
    flex: 1;
    text-align: left;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(2px, 0.5vw, 4px);
}

.help-menu-title {
    font-size: clamp(1.05rem, 3.8vw, 1.2rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.help-menu-subtitle {
    font-size: clamp(0.82rem, 2.7vw, 0.92rem);
    color: var(--text-muted);
    opacity: 0.75;
    line-height: 1.4;
}

.help-menu-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.help-menu-button:hover .help-menu-arrow {
    opacity: 0.9;
    transform: translateX(4px);
}

.help-menu-arrow svg {
    width: 22px;
    height: 22px;
}

/* How-to-connect button (small) */
.help-how-to-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 10px);
    padding: clamp(12px, 3vw, 14px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.03) 0%, rgba(10, 5, 15, 0.25) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 170, 110, 0.12);
    border-radius: 14px;
    color: var(--accent);
    font-size: clamp(0.88rem, 2.9vw, 0.98rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    margin-top: clamp(8px, 2vw, 10px);
    overflow: visible;
}

.help-how-to-button:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.06) 0%, rgba(10, 5, 15, 0.35) 100%);
    border-color: rgba(255, 170, 110, 0.2);
    transform: translateY(-2px);
    box-shadow:
        0 6px 16px rgba(255, 140, 60, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.help-how-to-button:active {
    transform: translateY(0) scale(0.98);
}

.help-how-to-button svg {
    width: clamp(18px, 4.5vw, 22px);
    height: clamp(18px, 4.5vw, 22px);
}

/* Platform Selection Grid */
.help-platform-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(10px, 2.5vw, 12px);
    overflow: visible;
}

.help-platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 10px);
    padding: clamp(14px, 3.5vw, 16px) clamp(12px, 3vw, 14px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.04) 0%, rgba(10, 5, 15, 0.35) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 1.5px solid rgba(255, 170, 110, 0.15);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    text-align: center;
    overflow: visible;
}

.help-platform-card:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(10, 5, 15, 0.45) 100%);
    border-color: rgba(255, 170, 110, 0.3);
    transform: translateY(-3px);
    box-shadow:
        0 12px 32px rgba(255, 140, 60, 0.25),
        0 6px 18px rgba(255, 140, 60, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.help-platform-card:active {
    transform: translateY(0) scale(0.96);
}

.help-platform-icon {
    width: clamp(44px, 10vw, 52px);
    height: clamp(44px, 10vw, 52px);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(20, 10, 30, 0.6) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: all 0.28s ease;
}

.help-platform-card:hover .help-platform-icon {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.32) 0%, rgba(20, 10, 30, 0.8) 100%);
    border-color: rgba(255, 170, 110, 0.55);
    box-shadow: 0 4px 12px rgba(255, 140, 60, 0.2);
    transform: scale(1.1) rotate(5deg);
}

.help-platform-icon svg {
    width: clamp(22px, 5.5vw, 26px);
    height: clamp(22px, 5.5vw, 26px);
}

.help-platform-name {
    font-size: clamp(0.88rem, 2.9vw, 0.96rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

/* Troubleshoot Section */
.help-troubleshoot-cards {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 3.5vw, 16px);
    overflow: visible;
}

.help-troubleshoot-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(12px, 3vw, 14px);
    padding: clamp(16px, 4vw, 18px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.04) 0%, rgba(10, 5, 15, 0.35) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 1.5px solid rgba(255, 170, 110, 0.15);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: visible;
}

.help-troubleshoot-card:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(10, 5, 15, 0.45) 100%);
    border-color: rgba(255, 170, 110, 0.3);
    transform: translateY(-3px);
    box-shadow:
        0 12px 32px rgba(255, 140, 60, 0.25),
        0 6px 18px rgba(255, 140, 60, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.help-troubleshoot-card:active {
    transform: translateY(0) scale(0.98);
}

.help-troubleshoot-icon {
    flex-shrink: 0;
    width: clamp(42px, 10vw, 50px);
    height: clamp(42px, 10vw, 50px);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(20, 10, 30, 0.6) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-troubleshoot-card:hover .help-troubleshoot-icon {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.22) 0%, rgba(20, 10, 30, 0.7) 100%);
    border-color: rgba(255, 170, 110, 0.45);
    box-shadow: 0 4px 12px rgba(255, 140, 60, 0.2);
}

.help-troubleshoot-icon svg {
    width: clamp(20px, 5vw, 24px);
    height: clamp(20px, 5vw, 24px);
}

.help-troubleshoot-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.help-troubleshoot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(12px, 3vw, 14px);
}

.help-troubleshoot-title {
    font-size: clamp(0.98rem, 3.3vw, 1.05rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    text-align: left;
}

.help-troubleshoot-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.help-troubleshoot-card:hover .help-troubleshoot-arrow {
    opacity: 0.9;
    transform: translateX(4px);
}

.help-troubleshoot-arrow svg {
    width: 20px;
    height: 20px;
}

.help-troubleshoot-desc {
    font-size: clamp(0.8rem, 2.6vw, 0.88rem);
    color: var(--text-muted);
    opacity: 0.8;
    line-height: 1.5;
    text-align: left;
}

.help-troubleshoot-intro {
    font-size: clamp(0.88rem, 2.9vw, 0.98rem);
    color: var(--text-muted);
    opacity: 0.85;
    line-height: 1.5;
    margin: clamp(-10px, -2.5vw, -8px) 0 clamp(12px, 3vw, 16px);
    text-align: center;
}

/* Modal Window */
.help-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 5vw, 24px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-modal.show {
    opacity: 1;
    visibility: visible;
}

.help-modal-content {
    position: relative;
    width: 100%;
    max-width: clamp(340px, 90vw, 480px);
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: clamp(24px, 6vw, 32px);
    background: linear-gradient(155deg, rgba(30, 12, 8, 0.95) 0%, rgba(24, 10, 28, 0.92) 50%, rgba(10, 4, 18, 0.92) 100%);
    backdrop-filter: blur(38px) saturate(140%);
    -webkit-backdrop-filter: blur(38px) saturate(140%);
    border: 2px solid rgba(255, 170, 110, 0.35);
    border-radius: 20px;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.8),
        0 0 48px rgba(255, 140, 60, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-modal.show .help-modal-content {
    transform: scale(1);
}

.device-manager-modal .help-modal-content {
    max-width: clamp(360px, 88vw, 460px);
}

.device-manager-content {
    padding: clamp(22px, 6vw, 28px);
}

.device-manager-inner {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 4vw, 20px);
    margin-top: clamp(10px, 3vw, 14px);
    max-height: min(65vh, 520px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding-right: 6px;
    scrollbar-width: thin;
}

.device-manager-inner::-webkit-scrollbar {
    width: 6px;
}

.device-manager-inner::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 170, 110, 0.28);
}

.device-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.device-modal-header-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.device-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 160, 80, 0.35), rgba(35, 18, 44, 0.55));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffb464;
}

.device-modal-icon svg {
    width: 24px;
    height: 24px;
}

.device-modal-title {
    font-size: clamp(1.2rem, 3.4vw, 1.4rem);
    font-weight: 600;
    color: #fff4e8;
    margin: 0;
}

.device-modal-subtitle {
    margin: 2px 0 0;
    font-size: 14px;
    color: rgba(255, 226, 198, 0.72);
}

.device-modal-summary {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 170, 110, 0.15);
    border-radius: 12px;
    padding: clamp(12px, 3.5vw, 16px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.device-progress {
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.device-progress-bar {
    width: 100%;
    height: 100%;
}

.device-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 138, 29, 0.92) 0%, rgba(255, 204, 120, 0.95) 100%);
    border-radius: inherit;
    transition: width 240ms ease;
}

.device-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 2.5vw, 18px);
}

.device-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.device-metric-label {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 226, 198, 0.6);
}

.device-metric-value {
    font-size: 16px;
    font-weight: 600;
    color: #fff4e8;
}

.device-list {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vw, 16px);
}

.device-card {
    background: linear-gradient(135deg, rgba(255, 138, 29, 0.07) 0%, rgba(12, 6, 20, 0.55) 100%);
    border: 1px solid rgba(255, 170, 110, 0.16);
    border-radius: 14px;
    padding: clamp(10px, 3vw, 12px);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.device-card-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.device-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 160, 80, 0.28), rgba(32, 18, 40, 0.55));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffc17d;
    flex: 0 0 auto;
}

.device-card-icon svg {
    width: 20px;
    height: 20px;
}

.device-card-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.device-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff4e8;
    word-break: break-word;
    line-height: 1.3;
}

.device-card-meta {
    font-size: 13px;
    color: rgba(255, 226, 198, 0.68);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.device-card-platform {
    font-weight: 500;
}

.device-card-dot {
    opacity: 0.45;
}

.device-card-time {
    opacity: 0.85;
}

.device-card-hwid {
    font-size: 12px;
    color: rgba(255, 226, 198, 0.55);
    word-break: break-all;
}

.device-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.device-card-actions .btn {
    gap: 5px;
    padding: 7px 11px;
    font-size: 13px;
    min-height: unset;
    white-space: nowrap;
}

.device-card-remove-btn svg {
    width: 16px;
    height: 16px;
}

.device-card-confirm {
    width: 100%;
    padding: 0 10px;
    display: flex;
    justify-content: center;
}

.device-card-confirm-text {
    font-size: 13px;
    color: rgba(255, 244, 232, 0.78);
    font-style: italic;
}

.device-card-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.device-card-remove-btn[disabled] {
    opacity: 0.7;
    pointer-events: none;
}

.device-card-spinner svg {
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
}

.device-card-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.device-modal-empty {
    text-align: center;
    border: 1px dashed rgba(255, 170, 110, 0.25);
    border-radius: 12px;
    padding: clamp(18px, 5vw, 24px);
    color: rgba(255, 226, 198, 0.78);
}

.device-modal-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.device-modal-empty-icon svg {
    width: 36px;
    height: 36px;
    color: rgba(255, 170, 110, 0.65);
}

.device-modal-empty-text {
    font-size: 15px;
    font-weight: 600;
    color: #fff4e8;
}

.device-modal-empty-hint {
    margin-top: 6px;
    font-size: 13px;
}

.device-limit-content {
    text-align: center;
    width: min(360px, 88vw);
    padding: clamp(24px, 6vw, 28px);
}

.device-limit-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto clamp(16px, 4vw, 22px);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 138, 29, 0.28), rgba(33, 18, 40, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffb464;
}

.device-limit-icon svg {
    width: 28px;
    height: 28px;
}

.device-limit-title {
    font-size: clamp(1.2rem, 3.6vw, 1.4rem);
    font-weight: 600;
    color: #fff4e8;
    margin-bottom: 8px;
}

.device-limit-text {
    font-size: 14px;
    color: rgba(255, 226, 198, 0.78);
    margin-bottom: clamp(18px, 4vw, 24px);
}

.device-limit-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.device-limit-actions .btn {
    justify-content: center;
    width: 100%;
}

.device-modal-warning {
    margin-top: clamp(8px, 2.5vw, 12px);
    padding: clamp(10px, 3vw, 14px);
    border-radius: 12px;
    background: rgba(255, 170, 110, 0.12);
    border: 1px solid rgba(255, 170, 110, 0.25);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.device-modal-warning-icon svg {
    width: 20px;
    height: 20px;
    color: #ffb464;
}

.device-modal-warning-text {
    font-size: 13px;
    color: rgba(255, 230, 210, 0.9);
}


.help-modal-close {
    position: absolute;
    top: clamp(12px, 3vw, 16px);
    right: clamp(12px, 3vw, 16px);
    width: clamp(32px, 8vw, 40px);
    height: clamp(32px, 8vw, 40px);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.1) 0%, rgba(10, 5, 15, 0.5) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.2);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.help-modal-close:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(10, 5, 15, 0.6) 100%);
    border-color: rgba(255, 170, 110, 0.35);
    color: var(--text);
    transform: scale(1.05);
}

.help-modal-close:active {
    transform: scale(0.95);
}

.help-modal-close svg {
    width: clamp(16px, 4vw, 20px);
    height: clamp(16px, 4vw, 20px);
}

.help-modal-title {
    font-size: clamp(1.3rem, 4.5vw, 1.6rem);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 clamp(8px, 2vw, 12px);
    padding-right: clamp(40px, 10vw, 50px);
    line-height: 1.3;
}

.help-modal-intro {
    font-size: clamp(0.92rem, 3.1vw, 1.02rem);
    color: var(--text-muted);
    margin: 0 0 clamp(16px, 4vw, 20px);
    line-height: 1.5;
}

.help-modal-steps {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2.5vw, 12px);
    margin-bottom: clamp(16px, 4vw, 20px);
}

.help-modal-step {
    padding: clamp(12px, 3vw, 14px) clamp(14px, 3.5vw, 16px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.06) 0%, rgba(10, 5, 15, 0.4) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.18);
    border-radius: 12px;
    font-size: clamp(0.88rem, 2.9vw, 0.98rem);
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.help-modal-hint {
    display: block;
    margin-top: clamp(4px, 1vw, 6px);
    font-size: clamp(0.75rem, 2.4vw, 0.82rem);
    font-weight: 500;
    color: var(--text-muted);
    opacity: 0.7;
}

.help-modal-tips {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2.5vw, 12px);
    padding: clamp(14px, 3.5vw, 16px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.03) 0%, rgba(10, 5, 15, 0.3) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.12);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.help-modal-tip {
    font-size: clamp(0.82rem, 2.7vw, 0.92rem);
    color: var(--text-muted);
    line-height: 1.5;
}

.help-modal-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 140, 60, 0.3);
    transition: all 0.2s ease;
}

.help-modal-link:hover {
    color: #ffb070;
    border-bottom-color: rgba(255, 176, 112, 0.6);
}

/* Advice section */
.help-modal-advice {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2.5vw, 12px);
    padding: clamp(12px, 3vw, 14px) clamp(14px, 3.5vw, 16px);
    background: linear-gradient(135deg, rgba(255, 200, 100, 0.08) 0%, rgba(10, 5, 15, 0.4) 100%);
    border: 1.5px solid rgba(255, 200, 100, 0.25);
    border-radius: 12px;
    margin-bottom: clamp(12px, 3vw, 16px);
}

.help-modal-advice-icon {
    flex-shrink: 0;
    width: clamp(24px, 6vw, 28px);
    height: clamp(24px, 6vw, 28px);
    color: #ffc864;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-modal-advice-icon svg {
    width: 100%;
    height: 100%;
}

.help-modal-advice-text {
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
}

/* Troubleshooting collapsible section */
.help-modal-troubleshoot {
    display: flex;
    flex-direction: column;
}

.help-modal-troubleshoot-toggle {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 10px);
    padding: clamp(10px, 2.5vw, 12px) clamp(12px, 3vw, 14px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.05) 0%, rgba(10, 5, 15, 0.3) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.help-modal-troubleshoot-toggle:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(10, 5, 15, 0.4) 100%);
    border-color: rgba(255, 170, 110, 0.25);
}

.help-modal-troubleshoot-toggle:active {
    transform: scale(0.98);
}

.help-modal-troubleshoot-toggle-icon {
    flex-shrink: 0;
    width: clamp(18px, 4.5vw, 22px);
    height: clamp(18px, 4.5vw, 22px);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-modal-troubleshoot-toggle-icon svg {
    width: 100%;
    height: 100%;
}

.help-modal-troubleshoot-toggle-text {
    flex: 1;
    font-size: clamp(0.88rem, 2.9vw, 0.98rem);
    font-weight: 600;
    color: var(--text);
    text-align: left;
}

.help-modal-troubleshoot-content {
    display: none;
    flex-direction: column;
    gap: clamp(10px, 2.5vw, 12px);
}

.help-modal-troubleshoot-content.expanded {
    display: flex;
    padding: clamp(12px, 3vw, 16px) clamp(14px, 3.5vw, 16px) 0;
    margin-top: clamp(8px, 2vw, 10px);
}

/* Diagnostic Modal Specific Styles */
.help-diagnostic-content {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 3.5vw, 16px);
}

.help-diagnostic-section {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 2vw, 10px);
}

.help-diagnostic-section-title {
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.help-diagnostic-section-text {
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.help-diagnostic-list {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.5vw, 8px);
    padding-left: clamp(18px, 4.5vw, 22px);
    margin: 0;
}

.help-diagnostic-list li {
    font-size: clamp(0.82rem, 2.7vw, 0.92rem);
    color: var(--text-muted);
    line-height: 1.5;
}

.help-support-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 10px);
    padding: clamp(14px, 3.5vw, 16px);
    background: linear-gradient(135deg, #33eeb2 0%, #2dd4a0 100%);
    border: none;
    border-radius: 14px;
    color: #0a0515;
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 20px rgba(51, 238, 178, 0.3),
        0 2px 8px rgba(51, 238, 178, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin-top: clamp(8px, 2vw, 10px);
}

.help-support-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 16px 42px rgba(51, 238, 178, 0.5),
        0 8px 24px rgba(51, 238, 178, 0.35),
        0 2px 12px rgba(51, 238, 178, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.help-support-button:active {
    transform: translateY(0) scale(0.98);
}

.help-support-button svg {
    width: clamp(18px, 4.5vw, 22px);
    height: clamp(18px, 4.5vw, 22px);
}

/* Platform Setup Detail (Modal) */
.help-platform-detail {
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 4.5vw, 22px);
}

.help-platform-detail-header {
    display: flex;
    align-items: center;
    gap: clamp(14px, 3.5vw, 16px);
}

.help-platform-detail-icon {
    flex-shrink: 0;
    width: clamp(56px, 13vw, 68px);
    height: clamp(56px, 13vw, 68px);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(20, 10, 30, 0.6) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.help-platform-detail-icon svg {
    width: clamp(28px, 7vw, 36px);
    height: clamp(28px, 7vw, 36px);
}

.help-platform-detail-info {
    flex: 1;
    min-width: 0;
}

.help-platform-detail-name {
    font-size: clamp(1.15rem, 4vw, 1.3rem);
    font-weight: 700;
    color: var(--text);
    margin: 0 0 clamp(4px, 1vw, 6px);
    line-height: 1.3;
}

.help-platform-detail-app {
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    color: var(--text-muted);
    opacity: 0.75;
}

.help-platform-description {
    font-size: clamp(0.9rem, 3vw, 1rem);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: clamp(14px, 3.5vw, 16px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.06) 0%, rgba(10, 5, 15, 0.4) 100%);
    border: 1px solid rgba(255, 170, 110, 0.15);
    border-radius: 12px;
    opacity: 0.9;
}

.help-platform-download-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 10px);
    padding: clamp(12px, 3vw, 14px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(20, 10, 30, 0.6) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    border-radius: 12px;
    color: var(--accent);
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(255, 140, 60, 0.2);
}

.help-platform-download-button svg {
    width: clamp(18px, 4.5vw, 22px);
    height: clamp(18px, 4.5vw, 22px);
}

.help-platform-download-button:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 170, 110, 0.5);
    box-shadow: 0 8px 20px rgba(255, 140, 60, 0.3);
}

.help-platform-download-button:active {
    transform: translateY(0);
}

.help-platform-download-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(10px, 2.5vw, 12px);
}

.help-platform-alternative {
    font-size: clamp(0.82rem, 2.6vw, 0.9rem);
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    padding: clamp(10px, 2.5vw, 12px) clamp(14px, 3.5vw, 16px);
    background: rgba(255, 140, 60, 0.05);
    border-radius: 10px;
    border-left: 3px solid rgba(255, 140, 60, 0.4);
}

.help-platform-alt-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 1.8vw, 8px);
    margin-top: clamp(10px, 2.5vw, 12px);
    padding: clamp(10px, 2.8vw, 12px);
    background: rgba(255, 140, 60, 0.08);
    border: 1px solid rgba(255, 170, 110, 0.35);
    border-radius: 12px;
    color: var(--accent);
    font-size: clamp(0.88rem, 2.9vw, 0.96rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(255, 140, 60, 0.18);
}

.help-platform-alt-button svg {
    width: clamp(16px, 4vw, 20px);
    height: clamp(16px, 4vw, 20px);
}

.help-platform-alt-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 140, 60, 0.25);
}

.help-platform-alt-button:active {
    transform: translateY(0);
}

.help-platform-detail-steps {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2.5vw, 12px);
}

.help-platform-detail-step {
    display: flex;
    align-items: flex-start;
    gap: clamp(10px, 2.5vw, 12px);
    font-size: clamp(0.88rem, 2.9vw, 0.98rem);
    color: var(--text);
    line-height: 1.5;
}

.help-platform-detail-step-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(26px, 6.5vw, 30px);
    height: clamp(26px, 6.5vw, 30px);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.2) 0%, rgba(20, 10, 30, 0.7) 100%);
    border: 1px solid rgba(255, 170, 110, 0.35);
    font-size: clamp(0.78rem, 2.5vw, 0.88rem);
    font-weight: 700;
    color: var(--accent);
}

.help-platform-detail-step-text {
    flex: 1;
    min-width: 0;
}

.help-platform-detail-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 10px);
    padding: clamp(14px, 3.5vw, 16px);
    background: linear-gradient(135deg, #33eeb2 0%, #2dd4a0 100%);
    border: none;
    border-radius: 14px;
    color: #0a0515;
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 20px rgba(51, 238, 178, 0.3),
        0 2px 8px rgba(51, 238, 178, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.help-platform-detail-button svg {
    width: clamp(18px, 4.5vw, 22px);
    height: clamp(18px, 4.5vw, 22px);
}

.help-platform-detail-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 16px 42px rgba(51, 238, 178, 0.5),
        0 8px 24px rgba(51, 238, 178, 0.35),
        0 2px 12px rgba(51, 238, 178, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.help-platform-detail-button:active {
    transform: translateY(0) scale(0.98);
}

/* Platform Tutorials */
.help-platform-tutorial {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 3.5vw, 16px);
    padding: clamp(18px, 4.5vw, 22px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.04) 0%, rgba(10, 5, 15, 0.35) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 1.5px solid rgba(255, 170, 110, 0.15);
    border-radius: 16px;
    margin-bottom: clamp(14px, 3.5vw, 16px);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: visible;
}

.help-platform-tutorial-header {
    display: flex;
    align-items: center;
    gap: clamp(14px, 3.5vw, 16px);
}

.help-platform-tutorial-icon {
    flex-shrink: 0;
    width: clamp(52px, 12vw, 64px);
    height: clamp(52px, 12vw, 64px);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(20, 10, 30, 0.6) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.help-platform-tutorial-icon svg {
    width: clamp(26px, 6.5vw, 32px);
    height: clamp(26px, 6.5vw, 32px);
}

.help-platform-tutorial-info {
    flex: 1;
    min-width: 0;
}

.help-platform-tutorial-name {
    font-size: clamp(1.05rem, 3.8vw, 1.2rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: clamp(2px, 0.5vw, 4px);
}

.help-platform-tutorial-app {
    font-size: clamp(0.82rem, 2.7vw, 0.92rem);
    color: var(--text-muted);
    opacity: 0.75;
}

.help-platform-tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 2vw, 10px);
}

.help-platform-tutorial-step {
    display: flex;
    align-items: flex-start;
    gap: clamp(10px, 2.5vw, 12px);
    font-size: clamp(0.88rem, 2.9vw, 0.98rem);
    color: var(--text);
    line-height: 1.5;
}

.help-platform-tutorial-step-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(24px, 6vw, 28px);
    height: clamp(24px, 6vw, 28px);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.2) 0%, rgba(20, 10, 30, 0.7) 100%);
    border: 1px solid rgba(255, 170, 110, 0.35);
    font-size: clamp(0.75rem, 2.4vw, 0.85rem);
    font-weight: 700;
    color: var(--accent);
}

.help-platform-tutorial-step-text {
    flex: 1;
    min-width: 0;
}

.help-platform-tutorial-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 10px);
    padding: clamp(14px, 3.5vw, 16px);
    background: linear-gradient(135deg, #33eeb2 0%, #2dd4a0 100%);
    border: none;
    border-radius: 14px;
    color: #0a0515;
    font-size: clamp(0.95rem, 3.2vw, 1.05rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 20px rgba(51, 238, 178, 0.3),
        0 2px 8px rgba(51, 238, 178, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.help-platform-tutorial-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 16px 42px rgba(51, 238, 178, 0.5),
        0 8px 24px rgba(51, 238, 178, 0.35),
        0 2px 12px rgba(51, 238, 178, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.help-platform-tutorial-button:active {
    transform: translateY(0) scale(0.98);
}

/* Modal step numbers */
.help-modal-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(22px, 5.5vw, 26px);
    height: clamp(22px, 5.5vw, 26px);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.2) 0%, rgba(20, 10, 30, 0.7) 100%);
    border: 1px solid rgba(255, 170, 110, 0.35);
    font-size: clamp(0.72rem, 2.2vw, 0.8rem);
    font-weight: 700;
    color: var(--accent);
    margin-right: clamp(6px, 1.5vw, 8px);
}

/* Responsive adjustments for small screens */
@media (max-width: 360px) {
    .help-platform-grid {
        gap: 10px;
    }

    .help-platform-card {
        padding: 14px 10px;
    }

    .help-modal-content {
        padding: 20px;
    }
}

/* ================================
   INFO VIEW - Compact Redesign
   ================================ */

.view-info .view-scroll {
    gap: clamp(20px, 5vw, 26px);
    /* Разрешаем карточкам/подсветке/анимациям выходить за рамки,
       чтобы не было жёсткого «обрезания» прямоугольником */
    overflow: visible;
}

/* Page title ("Информация" / "Помощь") - компактнее к кнопкам */
.info-title {
    font-size: clamp(1.75rem, 5.5vw, 2.1rem);
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.015em;

    /* было clamp(20px, 5vw, 26px) — делаем меньше,
       чтобы карточки/список начинались ближе к заголовку */
    margin: 0 0 clamp(1px, 1vw, 1px) 0;

    background: linear-gradient(135deg, #ffa83c 0%, #ffcd96 50%, #ffa83c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* 2x2 Grid for navigation cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(12px, 3vw, 16px);

    /* Чтобы масштаб/свечение карточек не обрезалось родителем */
    overflow: visible;
}

.info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    /* чуть меньше вертикальный разрыв внутри карточки */
    gap: clamp(6px, 1.8vw, 9px);

    /* уменьшаем вертикальные паддинги → карточка ниже */
    padding: clamp(8px, 3vw, 12px) clamp(12px, 3vw, 14px);

    background: linear-gradient(135deg, rgba(255, 140, 60, 0.06) 0%, rgba(10, 5, 15, 0.45) 100%);
    backdrop-filter: blur(18px) saturate(115%);
    -webkit-backdrop-filter: blur(18px) saturate(115%);
    border: 1.5px solid rgba(255, 170, 110, 0.22);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);

    /* ключевой параметр — делаем плитку ниже при той же ширине */
    aspect-ratio: 0.78;

    /* страховка для совсем узких экранов — не даём карточке стать меньше нормы касания */
    min-height: clamp(112px, 24vw, 140px);
}


.info-card:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.12) 0%, rgba(10, 5, 15, 0.55) 100%);
    border-color: rgba(255, 170, 110, 0.4);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 28px rgba(255, 140, 60, 0.25);
}

.info-card:active {
    transform: translateY(-1px) scale(0.98);
}

.info-card-icon {
    width: clamp(36px, 9vw, 44px);
    height: clamp(36px, 9vw, 44px);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.2) 0%, rgba(20, 10, 30, 0.7) 100%);
    border: 1px solid rgba(255, 170, 110, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: all 0.28s ease;
}

.info-card:hover .info-card-icon {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.32) 0%, rgba(20, 10, 30, 0.8) 100%);
    border-color: rgba(255, 170, 110, 0.55);
    transform: scale(1.1) rotate(5deg);
}

.info-card-icon svg {
    width: clamp(18px, 4.5vw, 22px);
    height: clamp(18px, 4.5vw, 22px);
}

.info-card-label {
    font-size: clamp(0.95rem, 3.1vw, 1.12rem); /* крупнее текста */
    font-weight: 700;
    color: var(--text);
    text-align: center;
    line-height: 1.2;
    max-width: 18ch;    /* провоцируем перенос "Новостной канал" на 2 строки при нужной ширине */
    text-wrap: balance; /* более ровные переносы где поддерживается */
    white-space: normal;
}

/* Documents Accordion */
.info-docs-accordion {
    margin-top: clamp(8px, 2vw, 12px);
}

.info-docs-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 14px);
    padding: clamp(14px, 3.5vw, 17px) clamp(16px, 4vw, 19px);
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.08) 0%, rgba(10, 5, 15, 0.5) 100%);
    backdrop-filter: blur(16px) saturate(115%);
    -webkit-backdrop-filter: blur(16px) saturate(115%);
    border: 1.5px solid rgba(51, 238, 178, 0.25);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.info-docs-toggle:hover {
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.14) 0%, rgba(10, 5, 15, 0.6) 100%);
    border-color: rgba(51, 238, 178, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(51, 238, 178, 0.2);
}

.info-docs-toggle-icon {
    flex-shrink: 0;
    width: clamp(36px, 9vw, 44px);
    height: clamp(36px, 9vw, 44px);
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.2) 0%, rgba(20, 10, 30, 0.7) 100%);
    border: 1px solid rgba(51, 238, 178, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #33eeb2;
    transition: all 0.28s ease;
}

.info-docs-toggle:hover .info-docs-toggle-icon {
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.3) 0%, rgba(20, 10, 30, 0.8) 100%);
    border-color: rgba(51, 238, 178, 0.5);
    transform: scale(1.08);
}

.info-docs-toggle-icon svg {
    width: clamp(18px, 4.5vw, 22px);
    height: clamp(18px, 4.5vw, 22px);
}

.info-docs-toggle-label {
    flex: 1;
    font-size: clamp(0.95rem, 3.2vw, 1.1rem);
    font-weight: 700;
    color: var(--text);
    text-align: left;
}

.info-docs-toggle-chevron {
    flex-shrink: 0;
    color: #33eeb2;
    opacity: 0.7;
    transition: all 0.28s ease;
}

.info-docs-toggle-chevron svg {
    width: clamp(18px, 4.5vw, 22px);
    height: clamp(18px, 4.5vw, 22px);
}

.info-docs-accordion.is-open .info-docs-toggle-chevron {
    transform: rotate(180deg);
}

/* Documents content - collapsible */
.info-docs-content {
    display: none;
}

/* Когда блок "Документы" раскрыт:
   даём подсветке и сдвигу вправо выходить за края без жёсткого обрезания */
.info-docs-accordion.is-open .info-docs-content {
    display: block;
    overflow: visible;
}

.info-doc-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 14px);
    padding: clamp(14px, 3.5vw, 16px) clamp(16px, 4vw, 18px);
    margin-top: clamp(10px, 2.5vw, 12px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.04) 0%, rgba(10, 5, 15, 0.4) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 170, 110, 0.18);
    border-radius: 13px;
    cursor: pointer;
    transition: all 0.26s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.info-doc-item:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(10, 5, 15, 0.5) 100%);
    border-color: rgba(255, 170, 110, 0.32);
    transform: translateX(4px);
    box-shadow: 0 6px 18px rgba(255, 140, 60, 0.18);
}

.info-doc-item:active {
    transform: translateX(2px) scale(0.98);
}

.info-doc-item-icon {
    flex-shrink: 0;
    width: clamp(32px, 8vw, 38px);
    height: clamp(32px, 8vw, 38px);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.16) 0%, rgba(20, 10, 30, 0.65) 100%);
    border: 1px solid rgba(255, 170, 110, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: all 0.26s ease;
}

.info-doc-item:hover .info-doc-item-icon {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.26) 0%, rgba(20, 10, 30, 0.75) 100%);
    border-color: rgba(255, 170, 110, 0.45);
    transform: scale(1.08);
}

.info-doc-item-icon svg {
    width: clamp(16px, 4vw, 19px);
    height: clamp(16px, 4vw, 19px);
}

.info-doc-item-text {
    flex: 1;
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    font-weight: 600;
    color: var(--text);
    text-align: left;
    line-height: 1.35;
}

.info-doc-item-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    opacity: 0.5;
    transition: all 0.26s ease;
}

.info-doc-item:hover .info-doc-item-arrow {
    opacity: 1;
    transform: translateX(3px);
}

.info-doc-item-arrow svg {
    width: clamp(16px, 4vw, 19px);
    height: clamp(16px, 4vw, 19px);
}

/* ================================
   ABOUT VIEW
   ================================ */

.about-content {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 6vw, 32px);
}

/* Hero section */
.about-hero {
    display: flex;
    align-items: center;
    gap: clamp(16px, 4vw, 20px);
    padding: clamp(20px, 5vw, 24px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(10, 5, 15, 0.4) 100%);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border: 1.5px solid rgba(255, 170, 110, 0.2);
    border-radius: 20px;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.about-hero-icon {
    flex-shrink: 0;
    width: clamp(60px, 14vw, 72px);
    height: clamp(60px, 14vw, 72px);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.2) 0%, rgba(20, 10, 30, 0.7) 100%);
    border: 2px solid rgba(255, 170, 110, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow: 0 12px 32px rgba(255, 140, 60, 0.25);
}

.about-hero-icon svg {
    width: clamp(36px, 9vw, 48px);
    height: clamp(36px, 9vw, 48px);
}

.about-hero-text {
    flex: 1;
    text-align: left;
}

.about-hero-title {
    font-size: clamp(1.5rem, 5vw, 1.9rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffa83c 0%, #ffcd96 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 clamp(4px, 1vw, 6px);
    letter-spacing: -0.02em;
}

.about-hero-subtitle {
    font-size: clamp(0.92rem, 3.1vw, 1.08rem);
    color: var(--text-muted);
    opacity: 0.85;
    margin: 0;
    font-weight: 500;
}

/* Features */
.about-features {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vw, 14px);
}

.about-feature-collapsible {
    width: 100%;
    padding: clamp(14px, 3.5vw, 16px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.05) 0%, rgba(10, 5, 15, 0.35) 100%);
    backdrop-filter: blur(18px) saturate(110%);
    -webkit-backdrop-filter: blur(18px) saturate(110%);
    border: 1.5px solid rgba(255, 170, 110, 0.18);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.about-feature-collapsible:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(10, 5, 15, 0.4) 100%);
    border-color: rgba(255, 170, 110, 0.25);
}

.about-feature-collapsible:active {
    transform: scale(0.98);
}

.about-feature-header {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2.5vw, 12px);
}

.about-feature-icon {
    flex-shrink: 0;
    width: clamp(36px, 9vw, 44px);
    height: clamp(36px, 9vw, 44px);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(20, 10, 30, 0.6) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.about-feature-icon svg {
    width: clamp(18px, 4.5vw, 22px);
    height: clamp(18px, 4.5vw, 22px);
}

.about-feature-title {
    flex: 1;
    font-size: clamp(1rem, 3.5vw, 1.15rem);
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
    text-align: left;
}

.about-feature-chevron {
    flex-shrink: 0;
    width: clamp(20px, 5vw, 24px);
    height: clamp(20px, 5vw, 24px);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-feature-chevron svg {
    width: 100%;
    height: 100%;
}

.about-feature-content {
    display: none;
}

.about-feature-content.expanded {
    display: block;
    padding-top: clamp(10px, 2.5vw, 12px);
    margin-top: clamp(8px, 2vw, 10px);
}

.about-feature-text {
    font-size: clamp(0.88rem, 2.9vw, 0.98rem);
    color: var(--text-muted);
    opacity: 0.88;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}

/* Call to action */
.about-cta {
    width: 100%;
    padding: clamp(18px, 4.5vw, 22px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(255, 100, 30, 0.12) 100%);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    border: 2px solid rgba(255, 140, 60, 0.4);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: clamp(14px, 3.5vw, 16px);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 24px rgba(255, 140, 60, 0.25),
        0 4px 12px rgba(255, 140, 60, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.about-cta:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.2) 0%, rgba(255, 100, 30, 0.17) 100%);
    border-color: rgba(255, 140, 60, 0.6);
    transform: translateY(-2px);
    box-shadow:
        0 12px 32px rgba(255, 140, 60, 0.35),
        0 6px 16px rgba(255, 140, 60, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.about-cta:active {
    transform: translateY(0) scale(0.98);
}

.about-cta-icon {
    flex-shrink: 0;
    width: clamp(44px, 11vw, 54px);
    height: clamp(44px, 11vw, 54px);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.3) 0%, rgba(255, 100, 30, 0.25) 100%);
    border: 2px solid rgba(255, 140, 60, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffa83c;
}

.about-cta-icon svg {
    width: clamp(24px, 6vw, 30px);
    height: clamp(24px, 6vw, 30px);
}

.about-cta-text {
    flex: 1;
    font-size: clamp(1rem, 3.5vw, 1.12rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    margin: 0;
    text-align: left;
}

/* ================================
   GUIDES VIEW
   ================================ */

.guides-header {
    margin-bottom: clamp(20px, 5vw, 28px);
}

.guides-header-content {
    display: flex;
    align-items: center;
    gap: clamp(14px, 3.5vw, 18px);
    padding: clamp(16px, 4vw, 20px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.06) 0%, rgba(10, 5, 15, 0.3) 100%);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border: 1.5px solid rgba(255, 170, 110, 0.2);
    border-radius: 18px;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.guides-header-icon {
    flex-shrink: 0;
    width: clamp(52px, 12vw, 64px);
    height: clamp(52px, 12vw, 64px);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(20, 10, 30, 0.5) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(255, 140, 60, 0.15);
}

.guides-header-icon svg {
    width: clamp(24px, 6vw, 32px);
    height: clamp(24px, 6vw, 32px);
}

.guides-header-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(3px, 0.8vw, 5px);
}

.guides-header-title {
    font-size: clamp(1.3rem, 4.5vw, 1.6rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffa83c 0%, #ffcd96 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.guides-header-subtitle {
    font-size: clamp(0.82rem, 2.7vw, 0.93rem);
    color: var(--text-muted);
    opacity: 0.85;
    margin: 0;
    line-height: 1.4;
}

/* Guides list */
.guides-list {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 3.5vw, 18px);
}

.guide-card {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: clamp(12px, 3vw, 14px);
    padding: clamp(14px, 3.5vw, 16px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.04) 0%, rgba(10, 5, 15, 0.25) 100%);
    backdrop-filter: blur(18px) saturate(110%);
    -webkit-backdrop-filter: blur(18px) saturate(110%);
    border: 1.5px solid rgba(255, 170, 110, 0.15);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.guide-card:hover {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(10, 5, 15, 0.35) 100%);
    border-color: rgba(255, 170, 110, 0.3);
    transform: translateY(-2px);
    box-shadow:
        0 12px 32px rgba(255, 140, 60, 0.18),
        0 4px 14px rgba(255, 140, 60, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.guide-card:active {
    transform: translateY(0) scale(0.98);
}

.guide-card-icon {
    flex-shrink: 0;
    width: clamp(40px, 9vw, 46px);
    height: clamp(40px, 9vw, 46px);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.15) 0%, rgba(20, 10, 30, 0.5) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: all 0.3s ease;
}

.guide-card:hover .guide-card-icon {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.25) 0%, rgba(20, 10, 30, 0.6) 100%);
    border-color: rgba(255, 170, 110, 0.45);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 140, 60, 0.2);
}

.guide-card-icon svg {
    width: clamp(20px, 4.5vw, 24px);
    height: clamp(20px, 4.5vw, 24px);
}

.guide-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(3px, 0.8vw, 4px);
    text-align: left;
}

.guide-card-title {
    font-size: clamp(0.98rem, 3.3vw, 1.1rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    margin: 0;
}

.guide-card-description {
    font-size: clamp(0.82rem, 2.7vw, 0.92rem);
    color: var(--text-muted);
    opacity: 0.82;
    line-height: 1.45;
    margin: 0;
}

.guide-card-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    opacity: 0.4;
    transition: all 0.3s ease;
    margin-top: clamp(8px, 2vw, 10px);
}

.guide-card:hover .guide-card-arrow {
    opacity: 0.9;
    transform: translateX(3px);
}

.guide-card-arrow svg {
    width: clamp(18px, 4.5vw, 22px);
    height: clamp(18px, 4.5vw, 22px);
}

/* === Compact tiles: Информация ================================ */
/* Снижаем высоту карточек за счёт меньших паддингов и min-height.
   Ограничено только экраном 'Информация', чтобы не трогать другие места. */

.view-info .tile-grid {
    row-gap: var(--space-sm);
    /* оставляем текущие 2 колонки / 1 колонку на мобильном — сетку не трогаем */
}

/* НИЖЕ/КОРOЧЕ при той же ширине */
.view-info .tile {
    /* уменьшаем вертикальные отступы */
    padding: clamp(6px, 2.2vw, 10px) clamp(10px, 3vw, 14px);

    /* жёстко ограничиваем высоту вниз — радикально короче */
    min-height: clamp(76px, 18vw, 110px);

    /* плотнее расстояние внутри */
    gap: clamp(4px, 1.6vw, 8px);

    /* гарантируем, что ничего не тянет высоту */
    height: auto;

    /* если где-то раньше задана пропорция — снимаем её */
    aspect-ratio: auto !important;

    align-items: center;
    justify-content: center;
}

/* Иконка на плитке — самую малость компактнее */
.view-info .tile .tile-icon svg,
.view-info .info-card .info-card-icon svg {
    width: clamp(26px, 6.2vw, 32px);
    height: clamp(26px, 6.2vw, 32px);
}


/* Подпись — читаемо, допускаем 2 строки без увеличения высоты карточки */
.view-info .tile .tile-title {
    font-size: clamp(0.95rem, 3.2vw, 1.12rem);
    line-height: 1.2;
    text-align: center;
    max-width: 16ch;     /* «Новостной канал» → аккуратно переносится в 2 строки */
    white-space: normal;
    text-wrap: balance;
}

/* На очень низких экранах делаем ещё плотнее */
@media (max-height: 720px) {
  .view-info .tile {
    padding: clamp(6px, 2.2vw, 10px) clamp(10px, 3vw, 14px);
    min-height: clamp(88px, 21vw, 120px);
    gap: clamp(4px, 1.6vw, 8px);
  }
}
/* Back-compat: если в разметке карточки имеют класс .info-card */
.view-info .info-card {
    /* Чуть больше воздуха сверху/снизу */
    padding: clamp(10px, 2.5vw, 14px) clamp(10px, 3vw, 14px);

    /* Карточка стала буквально на ~8px выше, но не огромная */
    min-height: clamp(84px, 19vw, 118px);

    /* Чуть больше зазора между иконкой и текстом */
    gap: clamp(6px, 2vw, 8px);

    height: auto;
    aspect-ratio: auto !important;

    /* Центрируем по горизонтали, но по вертикали тянем всё к верху,
       чтобы иконки в карточках одной строки шли на одной высоте */
    align-items: center;
    justify-content: flex-start;
}

.view-info .info-card .info-card-icon svg {
    width: clamp(20px, 5vw, 24px);
    height: clamp(20px, 5vw, 24px);
}
.view-info .info-card .info-card-label {
    font-size: clamp(0.95rem, 3.2vw, 1.12rem);
    line-height: 1.2;
    text-align: center;
    max-width: 16ch;
    white-space: normal;
    text-wrap: balance;
}
/* Строки грида — не фиксируем высоту, даём авто */
.view-info .tile-grid {
    grid-auto-rows: auto !important;
}
/* Разрешаем свечению/анимациям выходить за границы карты/элемента */
.view-info .tile,
.view-info .info-card,
.view-info .doc-item,
.view-info .doc-row,
.view-info .docs-accordion,
.view-info .accordion-item {
    overflow: visible !important;
}

/* Если подсветка рисуется через псевдоэлементы — тоже не режем */
.view-info .tile::before,
.view-info .tile::after,
.view-info .doc-item::before,
.view-info .doc-item::after {
    overflow: visible;
}

/* На всякий случай — небольшой внутренний отступ слева,
   чтобы анимация иконки (translateX) не билась о границу */
.view-info .tile .tile-icon,
.view-info .info-card .info-card-icon {
    width: clamp(40px, 10vw, 48px);
    height: clamp(40px, 10vw, 48px);
    border-radius: 12px;
}

/* ================================
   ANDROID TV SETUP - Liquid Glass Style
   ================================ */

/* TV Info Card - Liquid Glass (новая структура: header + text) */
.tv-setup-info-card {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 2vw, 10px);
    padding: clamp(12px, 3vw, 16px);
    margin: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.06) 0%, rgba(10, 5, 15, 0.4) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 1.5px solid rgba(51, 238, 178, 0.15);
    border-radius: 14px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: visible;
}

/* Header: иконка + заголовок в одной строке */
.tv-setup-info-header {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2.5vw, 12px);
}

.tv-setup-info-icon {
    flex-shrink: 0;
    width: clamp(32px, 8vw, 38px);
    height: clamp(32px, 8vw, 38px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.15) 0%, rgba(20, 10, 30, 0.6) 100%);
    border: 1.5px solid rgba(51, 238, 178, 0.25);
    border-radius: 10px;
    color: var(--primary);
}

.tv-setup-info-icon svg {
    width: clamp(16px, 4vw, 20px);
    height: clamp(16px, 4vw, 20px);
}

.tv-setup-info-title {
    margin: 0;
    font-size: clamp(15px, 3.8vw, 17px);
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.3;
    flex: 1;
}

/* Text: во всю ширину под header */
.tv-setup-info-text {
    margin: 0;
    font-size: clamp(13px, 3.2vw, 14px);
    font-weight: 400;
    color: var(--color-text-secondary);
    line-height: 1.5;
    width: 100%;
    text-align: center;
}

.tv-setup-info-text strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

/* Left-aligned version for step 2 */
.tv-setup-info-text.text-left {
    text-align: left;
}

/* TV Step Cards - 3 numbered cards */
.tv-step-cards {
    display: flex;
    flex-direction: column;
    gap: var(--setup-stack-gap);
    margin-top: 0;
}

/* Reduced top margin for step 2 */
.tv-step-cards-reduced {
    margin-top: 0;
}

.tv-step-card {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 14px);
    padding: clamp(12px, 3vw, 14px);
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.05) 0%, rgba(10, 5, 15, 0.35) 100%);
    backdrop-filter: blur(14px) saturate(105%);
    -webkit-backdrop-filter: blur(14px) saturate(105%);
    border: 1.5px solid rgba(255, 170, 110, 0.12);
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    overflow: visible;
}

.tv-step-number {
    flex-shrink: 0;
    width: clamp(32px, 8vw, 38px);
    height: clamp(32px, 8vw, 38px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.2) 0%, rgba(20, 10, 30, 0.7) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    border-radius: 10px;
    font-size: clamp(16px, 4vw, 18px);
    font-weight: 700;
    color: var(--accent);
}

.tv-step-text {
    flex: 1;
    margin: 0;
    font-size: clamp(14px, 3.5vw, 15px);
    font-weight: 500;
    color: var(--color-text-primary);
    line-height: 1.4;
}

.tv-step-text strong {
    color: var(--primary);
    font-weight: 700;
}

/* TV Final Steps - Step 3 cards */
.tv-final-steps {
    display: flex;
    flex-direction: column;
    gap: var(--setup-stack-gap);
    margin-top: 0;
    margin-bottom: clamp(14px, 3.5vw, 20px);
}

.tv-final-step {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 2vw, 10px);
    padding: clamp(14px, 3.5vw, 18px);
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.06) 0%, rgba(10, 5, 15, 0.4) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 1.5px solid rgba(51, 238, 178, 0.15);
    border-radius: 16px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: visible;
}

.tv-final-header {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 16px);
}

.tv-final-icon {
    flex-shrink: 0;
    width: clamp(40px, 10vw, 46px);
    height: clamp(40px, 10vw, 46px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.18) 0%, rgba(20, 10, 30, 0.65) 100%);
    border: 1.5px solid rgba(51, 238, 178, 0.28);
    border-radius: 12px;
    color: var(--primary);
}

.tv-final-icon svg {
    width: clamp(20px, 5vw, 24px);
    height: clamp(20px, 5vw, 24px);
}

.tv-final-title {
    margin: 0;
    font-size: clamp(15px, 3.8vw, 17px);
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.3;
}

.tv-final-text {
    margin: 0;
    width: 100%;
    font-size: clamp(13px, 3.2vw, 14px);
    font-weight: 400;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.tv-final-text strong {
    color: var(--primary);
    font-weight: 600;
}

/* ==================================================
   TV PIN SECTION - PROFESSIONAL OVERFLOW CONTROL
   ================================================== */

/* TV Alternative Link - bottom link button */
.tv-alternative-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    background: transparent;
    border: 1.5px solid rgba(51, 238, 178, 0.12);
    border-radius: 12px;
    font-size: clamp(13px, 3.2vw, 14px);
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tv-alternative-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.tv-alternative-link:hover {
    background: rgba(51, 238, 178, 0.05);
    border-color: rgba(51, 238, 178, 0.22);
    color: var(--color-text-primary);
}

.tv-alternative-link:hover svg {
    opacity: 1;
}

.view-setup-tv .setup-next-btn {
    margin-top: clamp(8px, 2.5vw, 12px);
}

.view-setup-tv .setup-final-actions {
    margin-top: clamp(8px, 2.5vw, 12px);
}

.view-setup-tv .tv-alternative-link {
    margin-top: clamp(14px, 3.5vw, 18px);
}

/* TV PIN Container - redesigned with header */
.tv-pin-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: clamp(12px, 3vw, 16px);
    margin-top: clamp(14px, 3.5vw, 18px);
    margin-bottom: clamp(14px, 3.5vw, 18px);
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.1) 0%, rgba(10, 5, 15, 0.5) 100%);
    backdrop-filter: blur(18px) saturate(115%);
    -webkit-backdrop-filter: blur(18px) saturate(115%);
    border: 2px solid rgba(51, 238, 178, 0.3);
    border-radius: 16px;
    box-shadow:
        0 4px 20px rgba(51, 238, 178, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: pinGlow 3s ease-in-out infinite;
    overflow: visible;
}

@keyframes pinGlow {
    0%, 100% {
        box-shadow:
            0 4px 20px rgba(51, 238, 178, 0.2),
            0 2px 8px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
    50% {
        box-shadow:
            0 4px 24px rgba(51, 238, 178, 0.3),
            0 2px 10px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
}

.tv-pin-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 10px);
    margin-bottom: clamp(14px, 3.5vw, 18px);
}

.tv-pin-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(18px, 4.5vw, 22px);
    height: clamp(18px, 4.5vw, 22px);
    flex-shrink: 0;
    color: var(--primary);
}

.tv-pin-header-icon svg {
    width: 100%;
    height: 100%;
}

.tv-pin-title {
    margin: 0;
    font-size: clamp(16px, 4vw, 18px);
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

/* PIN Code Wrapper - contains code + regenerate button */
.tv-pin-code-wrapper {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.5vw, 8px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    padding: clamp(4px, 1vw, 6px) 0;
}

.tv-pin-code-wrapper .tv-pin-code {
    flex: 1;
    min-width: 0; /* Important for flex child overflow */
}

/* PIN Code Display */
.tv-pin-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 12px);
    padding: clamp(12px, 3vw, 16px);
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.15) 0%, rgba(20, 10, 30, 0.7) 100%);
    border: 2px solid rgba(51, 238, 178, 0.35);
    border-radius: 14px;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tv-pin-code:hover {
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.22) 0%, rgba(20, 10, 30, 0.8) 100%);
    border-color: rgba(51, 238, 178, 0.45);
    box-shadow: 0 4px 16px rgba(51, 238, 178, 0.25);
    transform: translateY(-2px);
}

.tv-pin-code:active {
    transform: translateY(0) scale(0.98);
}

.tv-pin-digits {
    font-size: clamp(26px, 6.5vw, 34px);
    font-weight: 800;
    font-family: 'Courier New', monospace;
    color: var(--primary);
    letter-spacing: 0.06em;
    text-shadow: 0 2px 8px rgba(51, 238, 178, 0.3);
}

.tv-pin-copy-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(32px, 8vw, 38px);
    height: clamp(32px, 8vw, 38px);
    flex-shrink: 0;
    background: rgba(51, 238, 178, 0.18);
    border: 1.5px solid rgba(51, 238, 178, 0.3);
    border-radius: 11px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.tv-pin-code:hover .tv-pin-copy-icon {
    background: rgba(51, 238, 178, 0.25);
    border-color: rgba(51, 238, 178, 0.4);
}

.tv-pin-copy-icon svg {
    width: clamp(20px, 5vw, 24px);
    height: clamp(20px, 5vw, 24px);
}

/* Mini Regenerate Button */
.btn-tv-regenerate-mini {
    flex-shrink: 0;
    width: clamp(32px, 8vw, 38px);
    height: clamp(32px, 8vw, 38px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.12) 0%, rgba(20, 10, 30, 0.45) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.3);
    border-radius: 10px;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-tv-regenerate-mini svg {
    width: clamp(16px, 4vw, 18px);
    height: clamp(16px, 4vw, 18px);
    opacity: 0.9;
}

.btn-tv-regenerate-mini:hover:not(:disabled),
.btn-tv-regenerate-mini:active:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.18) 0%, rgba(20, 10, 30, 0.55) 100%);
    border-color: rgba(255, 170, 110, 0.45);
    transform: scale(1.05);
}

.btn-tv-regenerate-mini.is-loading {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(20, 10, 30, 0.35) 100%);
    border-color: rgba(255, 170, 110, 0.2);
    opacity: 0.7;
}

.btn-tv-regenerate-mini:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.tv-pin-spinner--mini {
    display: inline-block;
    width: clamp(14px, 3.5vw, 16px);
    height: clamp(14px, 3.5vw, 16px);
    border: 2px solid rgba(255, 170, 110, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: tv-pin-spin 0.8s linear infinite;
}

@keyframes tv-pin-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Timer Display */
.tv-pin-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 1.5vw, 8px);
    margin-top: clamp(14px, 3.5vw, 16px);
    font-size: clamp(13px, 3.2vw, 14px);
    font-weight: 600;
    color: var(--color-text-secondary);
}

.tv-pin-timer svg {
    width: clamp(16px, 4vw, 18px);
    height: clamp(16px, 4vw, 18px);
    flex-shrink: 0;
    color: var(--accent);
}

/* TV Alternative URL Card - prominent website link */
.tv-alt-url-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 16px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: clamp(16px, 4vw, 20px);
    margin-top: clamp(14px, 3.5vw, 18px);
    margin-bottom: clamp(14px, 3.5vw, 18px);
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.12) 0%, rgba(10, 5, 15, 0.5) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 2px solid rgba(51, 238, 178, 0.3);
    border-radius: 16px;
    box-shadow:
        0 4px 16px rgba(51, 238, 178, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tv-alt-url-card:hover {
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.18) 0%, rgba(10, 5, 15, 0.6) 100%);
    border-color: rgba(51, 238, 178, 0.4);
    box-shadow:
        0 6px 20px rgba(51, 238, 178, 0.25),
        0 2px 10px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.tv-alt-url-card:active {
    transform: translateY(0) scale(0.98);
}

.tv-alt-url-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(44px, 11vw, 52px);
    height: clamp(44px, 11vw, 52px);
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.2) 0%, rgba(20, 10, 30, 0.7) 100%);
    border: 2px solid rgba(51, 238, 178, 0.35);
    border-radius: 13px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.tv-alt-url-card:hover .tv-alt-url-icon {
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.28) 0%, rgba(20, 10, 30, 0.8) 100%);
    border-color: rgba(51, 238, 178, 0.45);
    transform: scale(1.05);
}

.tv-alt-url-icon svg {
    width: clamp(24px, 6vw, 28px);
    height: clamp(24px, 6vw, 28px);
}

.tv-alt-url-content {
    flex: 1;
    min-width: 0;
}

.tv-alt-url-label {
    margin: 0 0 clamp(2px, 0.5vw, 4px) 0;
    font-size: clamp(12px, 3vw, 13px);
    font-weight: 500;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.tv-alt-url-link {
    margin: 0;
    font-size: clamp(18px, 4.5vw, 22px);
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.01em;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 6px rgba(51, 238, 178, 0.25);
    word-break: break-word;
    overflow-wrap: break-word;
}

.tv-alt-url-card > svg {
    flex-shrink: 0;
    width: clamp(20px, 5vw, 24px);
    height: clamp(20px, 5vw, 24px);
    color: var(--primary);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.tv-alt-url-card:hover > svg {
    opacity: 1;
    transform: translateX(3px);
}

/* Buttons for initial state (before PIN generated) */
.btn-tv-generate-top {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: clamp(10px, 2.5vw, 12px);
    margin-bottom: clamp(6px, 1.5vw, 8px);
}

.btn-tv-website-top {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: clamp(14px, 3.5vw, 16px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 10px);
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.12) 0%, rgba(20, 10, 30, 0.6) 100%);
    border: 1.5px solid rgba(51, 238, 178, 0.3);
}

.btn-tv-website-top:hover,
.btn-tv-website-top:active {
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.18) 0%, rgba(20, 10, 30, 0.7) 100%);
    border-color: rgba(51, 238, 178, 0.4);
    transform: translateY(-1px);
}

.btn-tv-website-top svg {
    width: clamp(18px, 4.5vw, 20px);
    height: clamp(18px, 4.5vw, 20px);
    flex-shrink: 0;
}

.btn-tv-website-top svg:first-child {
    margin-right: clamp(-4px, -1vw, -6px);
}

.btn-tv-website-top svg:last-child {
    margin-left: clamp(-4px, -1vw, -6px);
}

/* Timer hint under PIN button */
.tv-pin-timer-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 1.5vw, 7px);
    margin-bottom: clamp(12px, 3vw, 14px);
    font-size: clamp(11px, 2.8vw, 12px);
    font-weight: 600;
    color: var(--accent);
    opacity: 0.9;
}

.tv-pin-timer-hint svg {
    width: clamp(13px, 3.2vw, 15px);
    height: clamp(13px, 3.2vw, 15px);
    flex-shrink: 0;
}

/* Spinner Animation */
.tv-pin-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 170, 110, 0.35);
    border-top-color: var(--accent);
    animation: tv-pin-spin 0.8s linear infinite;
}

/* Collapsible "How it works" button */
.btn-tv-how-it-works {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 10px);
    padding: clamp(10px, 2.5vw, 12px) clamp(14px, 3.5vw, 16px);
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.08) 0%, rgba(10, 5, 15, 0.5) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 1.5px solid rgba(51, 238, 178, 0.2);
    border-radius: 12px;
    box-shadow:
        0 2px 8px rgba(51, 238, 178, 0.1),
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    font-size: clamp(13px, 3.2vw, 14px);
    font-weight: 600;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: clamp(10px, 2.5vw, 12px);
}

.btn-tv-how-it-works:hover,
.btn-tv-how-it-works:active {
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.12) 0%, rgba(10, 5, 15, 0.6) 100%);
    border-color: rgba(51, 238, 178, 0.3);
    transform: translateY(-1px);
}

.btn-tv-how-it-works svg:first-child {
    width: clamp(16px, 4vw, 18px);
    height: clamp(16px, 4vw, 18px);
    color: var(--primary);
    flex-shrink: 0;
}

.tv-info-chevron {
    width: clamp(16px, 4vw, 18px);
    height: clamp(16px, 4vw, 18px);
    color: var(--color-text-secondary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: auto;
}

.tv-info-chevron.expanded {
    transform: rotate(180deg);
}

/* Expandable info section */
.tv-info-expandable {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: clamp(14px, 3.5vw, 16px);
}

.tv-info-expandable.expanded {
    max-height: 1000px;
}

.tv-info-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: clamp(14px, 3.5vw, 16px);
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.06) 0%, rgba(10, 5, 15, 0.5) 100%);
    backdrop-filter: blur(16px) saturate(110%);
    -webkit-backdrop-filter: blur(16px) saturate(110%);
    border: 1.5px solid rgba(51, 238, 178, 0.18);
    border-radius: 14px;
    box-shadow:
        0 3px 12px rgba(51, 238, 178, 0.1),
        0 1px 6px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Info steps - vertical layout with inline icon+title */
.tv-info-step {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 2vw, 10px);
    padding: clamp(12px, 3vw, 14px) 0;
    border-bottom: 1px solid rgba(51, 238, 178, 0.08);
}

.tv-info-step:last-of-type {
    border-bottom: none;
}

.tv-info-step:first-of-type {
    padding-top: 0;
}

/* Title with inline icon */
.tv-info-step-title {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 10px);
    margin: 0;
}

.tv-info-step-title span {
    font-size: clamp(14px, 3.5vw, 15px);
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

/* Compact inline icons */
.tv-info-step-icon {
    flex-shrink: 0;
    width: clamp(28px, 7vw, 32px);
    height: clamp(28px, 7vw, 32px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid;
    border-radius: 9px;
    backdrop-filter: blur(6px) saturate(105%);
    -webkit-backdrop-filter: blur(6px) saturate(105%);
    box-shadow:
        0 1px 5px rgba(0, 0, 0, 0.12),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.04);
}

.tv-info-step-icon svg {
    width: clamp(15px, 3.8vw, 17px);
    height: clamp(15px, 3.8vw, 17px);
}

.tv-info-icon-green {
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.14) 0%, rgba(20, 10, 30, 0.5) 100%);
    border-color: rgba(51, 238, 178, 0.28);
    color: var(--primary);
}

.tv-info-icon-orange {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.14) 0%, rgba(20, 10, 30, 0.5) 100%);
    border-color: rgba(255, 170, 110, 0.28);
    color: var(--accent);
}

/* Text below title - full width */
.tv-info-step-text {
    margin: 0;
    width: 100%;
    font-size: clamp(12px, 3vw, 13px);
    font-weight: 500;
    color: var(--color-text-secondary);
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: break-word;
}

.tv-info-step-text strong {
    color: var(--primary);
    font-weight: 700;
}

/* Responsive adjustments for very small screens */
@media (max-width: 360px) {
    .tv-pin-digits {
        font-size: 24px;
    }
}

/* =====================================================
   PAYMENT STATUS VIEWS - ANIMATIONS & STYLES
   ===================================================== */

/* Payment Pending View */
.payment-pending-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 5vw, 32px);
    text-align: center;
    min-height: 60vh;
}

.payment-spinner-wrapper {
    position: relative;
    margin-bottom: clamp(24px, 6vw, 32px);
    animation: fadeInScale 0.4s ease-out;
}

.payment-spinner {
    width: clamp(80px, 20vw, 100px);
    height: clamp(80px, 20vw, 100px);
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.payment-spinner circle {
    stroke: url(#gradient);
    stroke-width: 4;
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 126;
    stroke-dashoffset: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    50% {
        stroke-dashoffset: 63;
        opacity: 0.6;
    }
}

.payment-pending-title {
    font-size: clamp(20px, 5vw, 24px);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: clamp(12px, 3vw, 16px);
    animation: fadeInUp 0.5s ease-out 0.1s both;
}

.payment-pending-subtitle {
    font-size: clamp(14px, 3.5vw, 16px);
    color: var(--color-text-secondary);
    margin-bottom: clamp(24px, 6vw, 32px);
    line-height: 1.5;
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

.payment-details {
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.08) 0%, rgba(20, 10, 30, 0.4) 100%);
    border: 1px solid rgba(255, 170, 110, 0.2);
    border-radius: clamp(12px, 3vw, 16px);
    padding: clamp(16px, 4vw, 20px);
    margin-bottom: clamp(24px, 6vw, 32px);
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

.payment-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(8px, 2vw, 10px) 0;
    font-size: clamp(13px, 3.2vw, 14px);
}

.payment-detail-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.payment-detail-label {
    color: var(--color-text-secondary);
}

.payment-detail-value {
    color: var(--color-text-primary);
    font-weight: 600;
}

/* Status views (payment success / error) */
.status-view {
    width: min(100%, 440px);
    align-self: center;
    padding: clamp(24px, 6vw, 32px);
    border-radius: clamp(22px, 6vw, 28px);
    background: var(--gradient-card);
    border: 1.5px solid var(--color-border-strong);
    box-shadow: var(--shadow-soft);
    gap: clamp(18px, 5vw, 24px);
}

.status-view--frameless {
    width: 100%;
    align-self: stretch;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.status-view--frameless .status-view__header,
.status-view--frameless .status-view__actions {
    padding: 0;
}

.status-view--success {
    border-color: rgba(51, 238, 178, 0.45);
    box-shadow: 0 34px 68px rgba(51, 238, 178, 0.18);
}

.status-view--error {
    border-color: rgba(255, 110, 90, 0.4);
    box-shadow: 0 32px 72px rgba(255, 94, 82, 0.16);
}

.status-view__header {
    display: flex;
    align-items: center;
    gap: clamp(16px, 4.5vw, 20px);
}

.status-view__icon {
    display: grid;
    place-items: center;
    width: clamp(62px, 18vw, 70px);
    height: clamp(62px, 18vw, 70px);
    border-radius: 24px;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 100%);
    position: relative;
    overflow: hidden;
}

.status-view--success .status-view__icon {
    color: var(--color-success);
    background: linear-gradient(145deg, rgba(51, 238, 178, 0.22) 0%, rgba(8, 56, 42, 0.18) 100%);
}

.status-view--error .status-view__icon {
    color: var(--color-danger);
    background: linear-gradient(145deg, rgba(255, 110, 90, 0.24) 0%, rgba(88, 16, 24, 0.18) 100%);
}

.status-view__icon-figure {
    width: 68%;
    height: 68%;
}

.status-view__icon-ring {
    fill: none;
    stroke: currentColor;
    stroke-width: 4;
    opacity: 0.35;
}

.status-view__icon-mark {
    fill: none;
    stroke: currentColor;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}

.status-view__titles {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 1.5vw, 6px);
}

.status-view__title {
    margin: 0;
    font-size: clamp(22px, 5.5vw, 26px);
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--color-text-primary);
}

.status-view--success .status-view__title {
    color: var(--color-success);
}

.status-view--error .status-view__title {
    color: var(--color-danger);
}

.status-view__subtitle {
    margin: 0;
    font-size: clamp(14px, 3.5vw, 16px);
    color: var(--color-text-secondary);
}

.status-view__subtitle--muted {
    color: rgba(255, 216, 192, 0.82);
}

.status-view__details {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vw, 14px);
    padding-top: clamp(12px, 3vw, 14px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.status-view__detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(8px, 2vw, 10px);
}

.status-view__detail:not(:last-child) {
    padding-bottom: clamp(12px, 3vw, 14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.status-view__detail-label {
    color: var(--color-text-secondary);
    font-size: clamp(13px, 3.2vw, 14px);
}

.status-view__detail-value {
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: clamp(14px, 3.4vw, 15px);
    text-align: right;
}

.status-view__hint {
    margin: -4px 0 0 0;
    font-size: clamp(12px, 3vw, 13px);
    color: rgba(255, 216, 188, 0.78);
    font-style: italic;
}

.status-view__actions {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 3.5vw, 16px);
}

.status-view__primary {
    width: 100%;
    justify-content: center;
    gap: clamp(6px, 2vw, 8px);
}

.status-view--success .status-view__primary {
    background: linear-gradient(132deg, rgba(51, 238, 178, 0.96) 0%, rgba(20, 164, 132, 0.94) 55%, rgba(12, 126, 112, 0.92) 100%) !important;
    border-color: rgba(51, 238, 178, 0.45) !important;
    box-shadow: 0 24px 52px rgba(51, 238, 178, 0.22) !important;
    color: #03231c !important;
}

.status-view--error .status-view__primary {
    background: linear-gradient(132deg, rgba(255, 116, 92, 0.95) 0%, rgba(255, 82, 74, 0.92) 100%) !important;
    border-color: rgba(255, 110, 90, 0.45) !important;
    box-shadow: 0 24px 52px rgba(255, 94, 82, 0.24) !important;
    color: #fff7f5 !important;
}

.status-view__secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 3vw, 14px);
}

.status-view__secondary-btn {
    width: 100%;
    justify-content: center;
    gap: clamp(6px, 2vw, 8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 220, 190, 0.16);
    color: rgba(255, 236, 220, 0.92);
}

.status-view__secondary-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 220, 190, 0.24);
}

@media (max-width: 420px) {
    .status-view__secondary {
        grid-template-columns: 1fr;
    }
}
/* Loading spinner in payment-pending view gets pulsating glow */
.payment-spinner-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 140, 60, 0.2) 0%, transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Кнопка отмены платежа - уменьшенная и приглушённая */
.payment-cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 1.5vw, 7px);
    padding: clamp(8px, 2vw, 10px) clamp(12px, 3vw, 14px);
    background: transparent;
    border: 1px solid rgba(255, 100, 100, 0.15);
    border-radius: clamp(8px, 2vw, 10px);
    color: rgba(255, 102, 102, 0.7);
    font-size: clamp(12px, 2.8vw, 13px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: clamp(12px, 3vw, 16px);
}

.payment-cancel-btn:hover {
    background: rgba(255, 70, 70, 0.06);
    border-color: rgba(255, 100, 100, 0.25);
    color: rgba(255, 102, 102, 0.9);
}

.payment-cancel-btn:active {
    transform: scale(0.98);
    background: rgba(255, 70, 70, 0.1);
}

.payment-cancel-btn svg {
    flex-shrink: 0;
    opacity: 0.7;
    width: clamp(14px, 3.5vw, 16px);
    height: clamp(14px, 3.5vw, 16px);
}

.payment-cancel-btn span {
    line-height: 1;
    opacity: 0.85;
}

.payment-pending-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* ============================================
   PAYMENT CANCELLED VIEW - Simplified Single Container
   ============================================ */
.payment-cancelled-view {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    text-align: left;
    gap: clamp(14px, 3.8vw, 22px);
    padding: clamp(22px, 6vw, 32px) clamp(20px, 5vw, 28px);
    min-height: 0;
    width: 100%;
    max-width: 460px;
    margin-inline: auto;
}

.payment-cancelled-head {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 14px);
}

.payment-cancelled-icon {
    width: clamp(58px, 15vw, 72px);
    height: clamp(58px, 15vw, 72px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    animation: fadeInScale 0.4s ease-out;
}

.payment-cancelled-icon svg {
    width: 100%;
    height: 100%;
}

.payment-cancelled-titles {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 1.5vw, 6px);
    min-width: 0;
}

.payment-cancelled-title {
    font-size: clamp(22px, 6vw, 28px);
    font-weight: 700;
    color: rgba(255, 100, 100, 1);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.3px;
    animation: fadeInUp 0.45s ease-out 0.06s both;
    word-break: break-word;
}

.payment-cancelled-subtitle {
    font-size: clamp(14px, 3.6vw, 16px);
    color: rgba(255, 220, 200, 0.95);
    margin: 0;
    line-height: 1.45;
    max-width: 100%;
    animation: fadeInUp 0.45s ease-out 0.12s both;
}

.payment-cancelled-actions {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 3vw, 14px);
    width: 100%;
    max-width: 360px;
    margin: clamp(8px, 2vw, 12px) auto 0;
    animation: fadeInUp 0.45s ease-out 0.18s both;
}

/* Primary button - Retry payment (orange) */
.payment-cancelled-btn-retry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(7px, 2vw, 9px);
    padding: clamp(12px, 3vw, 16px) clamp(18px, 4.5vw, 24px);
    background: linear-gradient(135deg, rgba(255, 160, 90, 0.95) 0%, rgba(255, 130, 70, 0.9) 100%);
    border: 1.5px solid rgba(255, 170, 110, 0.5);
    border-radius: clamp(11px, 2.8vw, 13px);
    color: #fff;
    font-size: clamp(14px, 3.6vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(255, 140, 80, 0.35);
}

.payment-cancelled-btn-retry:hover {
    background: linear-gradient(135deg, rgba(255, 170, 100, 1) 0%, rgba(255, 140, 80, 0.95) 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 140, 80, 0.45);
}

.payment-cancelled-btn-retry:active {
    transform: translateY(0);
}

.payment-cancelled-btn-retry svg {
    width: clamp(18px, 4.5vw, 22px);
    height: clamp(18px, 4.5vw, 22px);
}

/* Secondary button - Home (now secondary style) */
.payment-cancelled-btn-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(7px, 2vw, 9px);
    padding: clamp(11px, 2.8vw, 15px) clamp(16px, 4vw, 22px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 170, 130, 0.3);
    border-radius: clamp(11px, 2.8vw, 13px);
    color: rgba(255, 210, 190, 0.95);
    font-size: clamp(13.5px, 3.4vw, 15px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment-cancelled-btn-home:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 170, 130, 0.4);
    color: rgba(255, 220, 200, 1);
}

.payment-cancelled-btn-home:active {
    transform: scale(0.98);
}

.payment-cancelled-btn-home svg {
    width: clamp(16px, 4vw, 20px);
    height: clamp(16px, 4vw, 20px);
}

.payment-cancelled-btn-tariff {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(7px, 2vw, 9px);
    padding: clamp(11px, 2.8vw, 15px) clamp(16px, 4vw, 22px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 150, 130, 0.25);
    border-radius: clamp(11px, 2.8vw, 13px);
    color: rgba(255, 200, 180, 0.9);
    font-size: clamp(13.5px, 3.4vw, 15px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment-cancelled-btn-tariff:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 150, 130, 0.35);
    color: rgba(255, 210, 190, 1);
}

.payment-cancelled-btn-tariff:active {
    transform: scale(0.98);
}

.payment-cancelled-btn-tariff svg {
    width: clamp(16px, 4vw, 20px);
    height: clamp(16px, 4vw, 20px);
}

.payment-cancelled-btn-support {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(7px, 2vw, 9px);
    padding: clamp(11px, 2.8vw, 15px) clamp(16px, 4vw, 22px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 170, 130, 0.3);
    border-radius: clamp(11px, 2.8vw, 13px);
    color: rgba(255, 210, 190, 0.95);
    font-size: clamp(13.5px, 3.4vw, 15px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment-cancelled-btn-support:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 170, 130, 0.4);
    color: rgba(255, 220, 200, 1);
}

.payment-cancelled-btn-support:active {
    transform: scale(0.98);
}

.payment-cancelled-btn-support svg {
    width: clamp(15px, 3.8vw, 19px);
    height: clamp(15px, 3.8vw, 19px);
}

.payment-cancelled-timer {
    font-size: clamp(12px, 2.8vw, 13.2px);
    color: rgba(255, 180, 160, 0.72);
    margin-top: clamp(2px, 1vw, 6px);
    font-style: italic;
    animation: fadeIn 0.5s ease-out 0.4s both;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   PAYMENT SUCCESS VIEW - Compact Horizontal Layout
   ============================================ */
.payment-success-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: clamp(14px, 3.5vw, 18px);
    padding: clamp(24px, 6vw, 32px) clamp(20px, 5vw, 28px);
    min-height: 0;
    opacity: 1;
}

/* Header: Icon + Title on same line */
.payment-success-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 3vw, 16px);
}

.payment-success-icon {
    width: clamp(56px, 14vw, 72px);
    height: clamp(56px, 14vw, 72px);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-success-icon svg {
    width: 100%;
    height: 100%;
}

.payment-success-title {
    font-size: clamp(20px, 5vw, 24px);
    font-weight: 700;
    color: rgba(51, 238, 178, 1);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.payment-success-subtitle {
    font-size: clamp(14px, 3.5vw, 16px);
    color: rgba(255, 220, 200, 0.95);
    margin: 0;
    line-height: 1.4;
}

.payment-success-details {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 2vw, 10px);
    padding: clamp(14px, 3.5vw, 18px);
    background: rgba(51, 238, 178, 0.05);
    border: 1px solid rgba(51, 238, 178, 0.15);
    border-radius: clamp(12px, 3vw, 14px);
}

.payment-success-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(12px, 3vw, 16px);
    padding-bottom: clamp(8px, 2vw, 10px);
}

.payment-success-detail:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.payment-success-detail .detail-label {
    font-size: clamp(13px, 3.2vw, 14px);
    color: rgba(255, 200, 180, 0.8);
}

.payment-success-detail .detail-value {
    font-size: clamp(14px, 3.5vw, 15px);
    font-weight: 600;
    color: rgba(255, 220, 200, 1);
}

.payment-success-actions {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2.5vw, 12px);
    width: 100%;
    max-width: 520px;
    margin-top: clamp(2px, 0.5vw, 4px);
}

/* Primary button - Setup VPN (green) */
.payment-success-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 10px);
    padding: clamp(13px, 3.2vw, 16px) clamp(18px, 4.5vw, 24px);
    background: linear-gradient(135deg, rgba(51, 238, 178, 0.95) 0%, rgba(30, 200, 150, 0.9) 100%);
    border: 1.5px solid rgba(51, 238, 178, 0.5);
    border-radius: clamp(12px, 3vw, 14px);
    color: #0a1a15;
    font-size: clamp(15px, 3.8vw, 17px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(51, 238, 178, 0.3);
}

.payment-success-btn-primary:hover {
    background: linear-gradient(135deg, rgba(51, 238, 178, 1) 0%, rgba(30, 200, 150, 0.95) 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(51, 238, 178, 0.4);
}

.payment-success-btn-primary:active {
    transform: translateY(0);
}

.payment-success-btn-primary svg {
    width: clamp(18px, 4.5vw, 22px);
    height: clamp(18px, 4.5vw, 22px);
}

/* Button row for Profile + Home */
.payment-success-btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(10px, 2.5vw, 12px);
    width: 100%;
}

/* Secondary buttons */
.payment-success-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 1.5vw, 8px);
    padding: clamp(11px, 2.8vw, 14px) clamp(14px, 3.5vw, 18px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(51, 238, 178, 0.2);
    border-radius: clamp(12px, 3vw, 14px);
    color: rgba(255, 210, 190, 0.95);
    font-size: clamp(13px, 3.2vw, 15px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment-success-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(51, 238, 178, 0.3);
    color: rgba(255, 220, 200, 1);
}

.payment-success-btn-secondary:active {
    transform: scale(0.98);
}

.payment-success-btn-secondary svg {
    width: clamp(16px, 4vw, 20px);
    height: clamp(16px, 4vw, 20px);
}

/* ============================================
   BOTTOM SHEET для подтверждения отмены платежа
   ============================================ */

/* Backdrop (полупрозрачный фон) */
.bottom-sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.bottom-sheet-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

/* Контейнер bottom sheet */
.bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: var(--color-bg-primary);
    border-radius: clamp(20px, 5vw, 24px) clamp(20px, 5vw, 24px) 0 0;
    padding: clamp(20px, 5vw, 28px);
    box-shadow:
        0 -4px 20px rgba(0, 0, 0, 0.3),
        0 -2px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.bottom-sheet.active {
    transform: translateY(0);
}

/* Handle (полоска сверху для свайпа) */
.bottom-sheet-handle {
    width: clamp(36px, 10vw, 40px);
    height: clamp(4px, 1vw, 5px);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 0 auto clamp(16px, 4vw, 20px);
}

/* Заголовок */
.bottom-sheet-title {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2.5vw, 12px);
    font-size: clamp(18px, 4.5vw, 20px);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: clamp(12px, 3vw, 16px);
}

.bottom-sheet-title-icon {
    flex-shrink: 0;
    width: clamp(22px, 5.5vw, 24px);
    height: clamp(22px, 5.5vw, 24px);
}

/* Текст предупреждения */
.bottom-sheet-text {
    font-size: clamp(14px, 3.5vw, 15px);
    line-height: 1.5;
    color: var(--color-text-secondary);
    margin-bottom: clamp(20px, 5vw, 24px);
}

/* Кнопки */
.bottom-sheet-buttons {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2.5vw, 12px);
}

.bottom-sheet-btn {
    width: 100%;
    padding: clamp(14px, 3.5vw, 16px);
    border-radius: clamp(12px, 3vw, 14px);
    font-size: clamp(15px, 3.7vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-align: center;
}

/* Основная кнопка (Дождаться) */
.bottom-sheet-btn--primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-strong) 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 133, 29, 0.3);
}

.bottom-sheet-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 133, 29, 0.4);
}

.bottom-sheet-btn--primary:active {
    transform: translateY(0);
}

/* Второстепенная кнопка (Отменить) */
.bottom-sheet-btn--danger {
    background: transparent;
    border: 1.5px solid rgba(255, 100, 100, 0.3);
    color: rgba(255, 102, 102, 0.9);
}

.bottom-sheet-btn--danger:hover {
    background: rgba(255, 70, 70, 0.1);
    border-color: rgba(255, 100, 100, 0.4);
}

.bottom-sheet-btn--danger:active {
    transform: scale(0.98);
}


.device-summary-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 15px;
    margin-bottom: 20px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.device-summary-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.device-summary-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.device-summary-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.device-summary-label {
    font-size: 13px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.device-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    flex-shrink: 0;
}

.device-summary-icon svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: rgba(255, 180, 100, 0.85);
    stroke: currentColor;
    filter: drop-shadow(0 1px 2px rgba(255, 140, 70, 0.25));
}

.device-summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 26px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(255, 140, 60, 0.16) 0%, rgba(255, 170, 110, 0.12) 100%);
    border: 1.2px solid rgba(255, 170, 110, 0.45);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    box-shadow: 0 0 8px rgba(255, 140, 60, 0.15);
    flex-shrink: 0;
}

.device-summary-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--accent);
    margin-top: 4px;
}
.device-summary-change {
    font-size: 14px;                 /* было 13px */
    font-weight: 500;
    color: var(--accent);
    border: none;
    background: rgba(255, 138, 29, 0.15);
    border-radius: 999px;
    padding: 7px 16px;               /* было 6px 14px */
    white-space: nowrap;
    flex-shrink: 0;
}

.device-summary-dates {
    font-size: 13px;
    color: var(--text-muted);
}

.device-pending-badge {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 138, 29, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.device-pending-badge .btn-link {
    color: var(--accent);
    border: none;
    background: transparent;
    font-size: 13px;
    text-decoration: underline;
}

/* Адаптивность для device-summary */
@media (max-width: 400px) {
    .device-summary-card {
        padding: 13px 15px;
        gap: 10px;
    }

    .device-summary-content {
        gap: 5px;
    }

    .device-summary-main {
        gap: 6px;
    }

    .device-summary-label {
        font-size: 12px;
        gap: 4px;
    }

    .device-summary-badge {
        min-width: 30px;
        height: 24px;
        padding: 3px 9px;
        font-size: 15px;
    }

    .device-summary-change {
        font-size: 13.5px;
        padding: 11px 14px;
    }
}

@media (max-width: 360px) {
    .device-summary-card {
        padding: 13px 14px;
        gap: 8px;
    }

    .device-summary-content {
        gap: 5px;
    }

    .device-summary-main {
        gap: 5px;
    }

    .device-summary-label {
        font-size: 11.5px;
    }

    .device-summary-icon svg {
        width: 14px;
        height: 14px;
    }

    .device-summary-badge {
        min-width: 28px;
        height: 22px;
        padding: 2px 8px;
        font-size: 14px;
    }

    .device-summary-change {
        font-size: 12.5px;
        padding: 5px 11px;
    }
}

.plans-cta-note {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}


.change-devices-modal .help-modal-content {
    max-width: 420px;
}

.change-devices-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 16px 0;
}

.change-devices-status,
.change-devices-info {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin: 8px 0;
}

.change-devices-error {
    text-align: center;
    color: #ff6868;
    font-size: 14px;
    margin: 8px 0;
}

.change-devices-extension {
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.pill-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.pill {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    background: transparent;
    color: #fff;
    font-size: 13px;
}

.pill.active {
    background: rgba(255, 138, 29, 0.2);
    border-color: var(--accent);
}

.change-devices-note {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 12px;
}

/* ===================================
   DEVICE LIMIT MANAGEMENT STYLES
   =================================== */

/* Main Container */
.device-limit-container {
    max-width: 100%;
    padding: 10px 6px;
    box-sizing: border-box;
    overflow: visible;
}

/* ===================================
   TOP CARD: Header + Current Status
   =================================== */
.device-limit-header {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 18px 12px 14px;
    margin-bottom: 8px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    text-align: center;
}

.device-limit-header-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
    letter-spacing: -0.4px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.device-limit-header-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.device-limit-divider {
    display: none;
}

.device-limit-current-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    box-sizing: border-box;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.device-limit-current-label {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.device-limit-current-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.device-limit-current-icon svg {
    width: 20px;
    height: 20px;
}

/* ===================================
   BOTTOM CARD: Selector (Compact)
   =================================== */
.device-limit-selector-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 138, 29, 0.35);
    border-radius: 24px;
    padding: 14px 8px 12px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 138, 29, 0.1);
}

.device-limit-selector-label {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 138, 29, 0.95);
    letter-spacing: 0.3px;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(255, 138, 29, 0.3);
}

/* Controls: -/+/Display */
.device-limit-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.device-limit-btn-compact {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 138, 29, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 138, 29, 0.35);
    color: #ff8a1d;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 10px rgba(255, 138, 29, 0.15);
}

.device-limit-btn-compact:disabled {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.45);
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

.device-limit-btn-compact:active {
    transform: scale(0.94);
    background: rgba(255, 138, 29, 0.2);
    border-color: rgba(255, 138, 29, 0.5);
    box-shadow: 0 1px 5px rgba(255, 138, 29, 0.25);
}

.device-limit-display-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    height: 54px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    box-sizing: border-box;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.device-limit-display-compact:hover {
    background: rgba(255, 170, 110, 0.15);
    border-color: rgba(255, 170, 110, 0.4);
    transform: scale(1.05);
}

.device-limit-display-number {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -1px;
    line-height: 1;
    text-shadow: 0 2px 12px rgba(255, 138, 29, 0.5);
}

/* Slider Wrapper with Inline Labels */
.device-limit-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
}

.device-limit-slider {
    flex: 1;
    height: 5px;
    border-radius: 2.5px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    position: relative;
    border: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Slider Thumb */
.device-limit-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 11px;
    background: linear-gradient(135deg, #ff8a1d 0%, #ff6500 100%);
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(255, 138, 29, 0.6),
                0 1px 4px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.device-limit-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 11px;
    background: linear-gradient(135deg, #ff8a1d 0%, #ff6500 100%);
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(255, 138, 29, 0.6),
                0 1px 4px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.device-limit-slider:active::-webkit-slider-thumb {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(255, 138, 29, 0.8),
                0 2px 6px rgba(0, 0, 0, 0.5);
}

.device-limit-slider:active::-moz-range-thumb {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(255, 138, 29, 0.8),
                0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Slider Labels (Inline) */
.device-limit-slider-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* ===================================
   ACTION STATES
   =================================== */

/* No Change State */
.device-limit-no-change {
    margin-top: 12px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 138, 29, 0.15);
    border-radius: 12px;
    text-align: center;
    box-sizing: border-box;
}

.device-limit-no-change-text {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Upgrade/Downgrade States */
.device-limit-action-card {
    margin-top: 12px;
    padding: 13px 14px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 138, 29, 0.25);
    border-radius: 16px;
    box-sizing: border-box;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.12);
}

.device-limit-action-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.device-limit-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 138, 29, 0.15);
}

.device-limit-action-icon svg {
    width: 16px;
    height: 16px;
}

.device-limit-action-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.device-limit-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}

.device-limit-price-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.device-limit-price-value {
    font-size: 17px;
    font-weight: 700;
    color: #ff8a1d;
}

.device-limit-action-description {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin: 7px 0 0 0;
    line-height: 1.4;
}

.device-limit-price-info-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 138, 29, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.device-limit-price-info-toggle:active {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(0.98);
}

.device-limit-price-info-toggle-text {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 138, 29, 0.9);
}

.device-limit-price-info-toggle-icon {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.device-limit-price-info-toggle-icon.open {
    transform: rotate(180deg);
}

.device-limit-price-info-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.device-limit-price-info-content.open {
    max-height: 300px;
}

.device-limit-price-info-inner {
    padding: 10px 10px 0;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
}

/* Downgrade Warning */
.device-limit-warning {
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(255, 69, 0, 0.12);
    border: 1px solid rgba(255, 69, 0, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    box-sizing: border-box;
}

.device-limit-warning-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.device-limit-warning-icon svg {
    width: 16px;
    height: 16px;
    color: #ff6500;
}

.device-limit-warning-text {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    margin: 0;
}

/* Action Buttons */
.device-limit-button-group {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.device-limit-button {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.device-limit-button-primary {
    background: linear-gradient(135deg, #ff8a1d 0%, #ff6500 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 138, 29, 0.3);
}

.device-limit-button-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(255, 138, 29, 0.4);
}

.device-limit-button-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.device-limit-button-secondary:active {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(0.98);
}

.device-limit-downgrade-container {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.device-limit-change-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 138, 29, 0.3);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.device-limit-change-icon {
    width: 22px;
    height: 22px;
    color: #ff8a1d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-limit-change-icon svg {
    width: 100%;
    height: 100%;
}

.device-limit-change-text {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.device-limit-downgrade-meta-card {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.device-limit-downgrade-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

.device-limit-downgrade-meta-row span:last-child {
    white-space: nowrap;
}

.device-limit-downgrade-meta-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 201, 148, 0.9);
}

.device-limit-downgrade-meta-icon svg {
    width: 100%;
    height: 100%;
}

.device-limit-downgrade-warning {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1.5px solid rgba(255, 134, 84, 0.5);
    background: linear-gradient(150deg, rgba(255, 150, 102, 0.18), rgba(86, 10, 20, 0.72));
    box-shadow: 0 18px 28px rgba(11, 0, 4, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.device-limit-downgrade-warning-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.device-limit-downgrade-warning-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: rgba(255, 193, 140, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-limit-downgrade-warning-icon svg {
    width: 100%;
    height: 100%;
}

.device-limit-downgrade-warning-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff4eb;
    letter-spacing: -0.2px;
}

.device-limit-downgrade-warning-text {
    margin: 0;
    font-size: 13.2px;
    line-height: 1.45;
    color: rgba(255, 238, 227, 0.9);
}

.device-limit-downgrade-details-card {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.device-limit-downgrade-details-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding-right: 20px;
}

.device-limit-downgrade-details-label {
    flex: 1;
    white-space: nowrap;
}

.device-limit-downgrade-details-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 183, 103, 0.9);
}

.device-limit-downgrade-details-icon svg {
    width: 100%;
    height: 100%;
}

.device-limit-downgrade-details-chevron {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.device-limit-downgrade-details.is-open .device-limit-downgrade-details-chevron {
    transform: rotate(180deg);
}

.device-limit-downgrade-details-content {
    padding: 0 14px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.device-limit-downgrade-details.is-open .device-limit-downgrade-details-content {
    padding-top: 12px;
    padding-bottom: 14px;
}

.device-limit-downgrade-details-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 245, 236, 0.88);
}

.device-limit-downgrade-tip {
    margin-top: 2px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.device-limit-downgrade-tip-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: rgba(255, 207, 139, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.device-limit-downgrade-tip-icon svg {
    width: 100%;
    height: 100%;
}

.device-limit-downgrade-tip p {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.75);
}

/* Info Title with Icon */
.device-limit-info-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 10px;
}

.device-limit-info-title-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.device-limit-info-title-icon svg {
    width: 100%;
    height: 100%;
}

/* Price Detail Text */
.device-limit-price-detail {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
    line-height: 1.4;
}

/* Price Info Container */
.device-limit-price-info {
    margin-top: 10px;
}

.device-limit-price-info-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.device-limit-price-info-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.device-limit-price-info-icon svg {
    width: 100%;
    height: 100%;
}

.device-limit-price-info-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.device-limit-price-info-arrow svg {
    width: 100%;
    height: 100%;
}

.device-limit-price-info-text {
    margin: 0;
    line-height: 1.6;
}

/* Warning Icon (Large, centered) */
.device-limit-warning-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-limit-warning-icon svg {
    width: 100%;
    height: 100%;
    color: #ff8a1d;
    opacity: 0.9;
}

/* Warning Title */
.device-limit-warning-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
    text-align: center;
}

/* Warning Text */
.device-limit-warning-text {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 8px 0;
    line-height: 1.5;
    text-align: center;
}

.device-limit-warning-text:last-of-type {
    margin-bottom: 0;
}

/* Tip/Advice Block */
.device-limit-tip {
    margin-top: 12px;
    padding: 11px 13px;
    background: rgba(255, 138, 29, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 0.5px solid rgba(255, 138, 29, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-sizing: border-box;
    box-shadow: 0 4px 16px rgba(255, 138, 29, 0.15);
}

.device-limit-tip-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.device-limit-tip-icon svg {
    width: 100%;
    height: 100%;
    color: #ff8a1d;
    opacity: 0.9;
}

.device-limit-tip-text {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    line-height: 1.4;
    text-align: left;
}

.device-limit-tip-text strong {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

/* Action Button (Single) */
.device-limit-action-btn {
    width: 100%;
    padding: 13px 18px;
    margin-top: 12px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    background: linear-gradient(135deg, #ff8a1d 0%, #ff6500 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(255, 138, 29, 0.4),
                0 2px 8px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.device-limit-action-btn:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 3px 12px rgba(255, 138, 29, 0.5),
                0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ===================================
   UPGRADE STATE - NEW DESIGN
   =================================== */

.device-limit-upgrade-container {
    margin-top: 12px;
}

/* Device Increase Info */
.device-limit-upgrade-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 138, 29, 0.3);
    border-radius: 14px;
    margin-bottom: 10px;
}

.device-limit-upgrade-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #ff8a1d;
    flex-shrink: 0;
}

.device-limit-upgrade-icon svg {
    width: 100%;
    height: 100%;
}

.device-limit-upgrade-text {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
}

/* Price Display Row */
/* Micro Info Button */
.device-limit-price-calc-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 138, 29, 0.25);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 10.5px;
    font-weight: 500;
    color: rgba(255, 138, 29, 0.85);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.device-limit-price-calc-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 138, 29, 0.35);
}

.device-limit-price-calc-btn:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.1);
}

.device-limit-price-calc-icon {
    display: flex;
    align-items: center;
    width: 14px;
    height: 14px;
}

.device-limit-price-calc-icon svg {
    width: 100%;
    height: 100%;
}

.device-limit-price-calc-text {
    line-height: 1;
}

.device-limit-price-calc-footer {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.device-limit-action-btn:disabled {
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.4);
    box-shadow: none;
    text-shadow: none;
}

/* Extension Periods Selection */
.device-limit-extension-container {
    margin-bottom: 20px;
}

.device-limit-extension-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffe2c6;
    margin: 0 0 12px 0;
}

.device-limit-extension-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.device-limit-extension-btn {
    height: auto;
    padding: 14px;
    background: rgba(255, 138, 29, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 0.5px solid rgba(255, 138, 29, 0.25);
    border-radius: 14px;
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.device-limit-extension-btn.selected {
    opacity: 1;
    border: 1px solid #ff8c46;
    box-shadow: 0 4px 16px rgba(255, 138, 29, 0.4),
                inset 0 1px 0 rgba(255, 138, 29, 0.2);
    background: rgba(255, 138, 29, 0.2);
}

.device-limit-extension-btn:active {
    transform: scale(0.96);
}

.device-limit-extension-badge {
    font-size: 9px;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
    display: inline-block;
}

.device-limit-extension-label {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.device-limit-extension-price {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 2px;
}

.device-limit-extension-total {
    font-size: 11px;
    opacity: 0.6;
}

/* Auto min-payment card */
.device-limit-minpay-card {
    margin-top: 12px;
    padding: 14px;
    background: rgba(255, 138, 29, 0.08);
    border: 1px solid rgba(255, 138, 29, 0.25);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.device-limit-minpay-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.device-limit-minpay-badge {
    align-self: flex-start;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #ffe2c6;
    background: rgba(255, 226, 198, 0.08);
    border: 1px solid rgba(255, 226, 198, 0.25);
}

.device-limit-minpay-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.device-limit-minpay-subtitle {
    margin: 0;
    color: rgba(255, 226, 198, 0.7);
    font-size: 12px;
    line-height: 1.45;
}

.device-limit-minpay-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 10px;
    background: rgba(255, 138, 29, 0.15);
    border: 1px solid rgba(255, 138, 29, 0.35);
    color: #ffe2c6;
}

.device-limit-minpay-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.device-limit-minpay-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    color: #ffe2c6;
}

.device-limit-minpay-row-label {
    opacity: 0.9;
}

.device-limit-minpay-row-value {
    font-weight: 700;
    color: #ffffff;
}

.device-limit-minpay-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 226, 198, 0.15);
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.device-limit-minpay-note {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255, 226, 198, 0.8);
    line-height: 1.45;
}

.device-limit-minpay-note-icon {
    width: 16px;
    height: 16px;
    color: #ffb468;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-limit-alt-hint {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 138, 29, 0.35);
    background: rgba(255, 226, 198, 0.06);
    color: #ffe2c6;
    font-size: 12px;
    line-height: 1.45;
    display: flex;
    gap: 8px;
}

.device-limit-alt-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff8a1d;
    margin-top: 6px;
    flex-shrink: 0;
}

.device-limit-manual-block {
    margin-top: 12px;
}

.device-limit-manual-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #ffe2c6;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.device-limit-manual-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.device-limit-manual-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.device-limit-manual-toggle-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
}

.device-limit-manual-toggle-chevron {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.device-limit-manual-toggle-chevron.open {
    transform: rotate(180deg);
}

.device-limit-manual-content {
    display: none;
    margin-top: 10px;
}

.device-limit-manual-content.open {
    display: block;
}

.device-limit-manual-hint {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: rgba(255, 226, 198, 0.72);
    line-height: 1.45;
}

.device-limit-extension-grid--manual {
    margin-top: 4px;
}

.device-limit-auto-reset {
    margin-top: 10px;
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 180, 104, 0.4);
    background: rgba(255, 180, 104, 0.08);
    color: #ffb468;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.device-limit-auto-reset:active {
    transform: scale(0.98);
}

/* Error Block */
.device-limit-error {
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(244, 67, 54, 0.08);
    border: 1px solid rgba(244, 67, 54, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
}

.device-limit-error-icon {
    width: 20px;
    height: 20px;
    color: #f44336;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-limit-error-icon svg {
    width: 100%;
    height: 100%;
}

.device-limit-error-text {
    font-size: 13px;
    color: rgba(244, 67, 54, 0.9);
    margin: 0;
}

/* ===================================
   DEVICE DOWNGRADE CONFIRM MODAL
   =================================== */

#deviceDowngradeConfirmContainer {
    position: fixed;
    inset: 0;
    z-index: 18000;
}

.device-downgrade-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 3, 8, 0.7);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.25s ease;
}

.device-downgrade-modal {
    width: min(360px, 92vw);
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(255, 138, 29, 0.18), transparent 70%),
        rgba(20, 6, 18, 0.94);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 26px 24px 22px;
    box-shadow: 0 30px 75px rgba(5, 2, 9, 0.85);
    text-align: center;
}

.device-downgrade-modal-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: #ffae76;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

.device-downgrade-modal-icon svg {
    width: 100%;
    height: 100%;
}

.device-downgrade-modal-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff4e8;
}

.device-downgrade-modal-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.device-downgrade-modal-text strong {
    color: #fff;
}

.device-downgrade-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.device-downgrade-modal-btn {
    flex: 1;
    border: none;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.device-downgrade-modal-btn.primary {
    background: linear-gradient(135deg, #ff8a1d, #ff5f1f);
    color: #fff;
    box-shadow: 0 12px 30px rgba(255, 111, 58, 0.5);
}

.device-downgrade-modal-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.device-downgrade-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.device-downgrade-modal-btn:not(:disabled):active {
    transform: translateY(1px);
}

/* ===================================
   WELCOME BONUS TOAST
   =================================== */

/* Контейнер всплывающего окна — полноэкранный бэкдроп */
#welcomeBonusToastContainer {
    position: fixed;
    inset: 0;                 /* вместо left/right/bottom */
    display: flex;
    justify-content: center;
    align-items: flex-end;    /* карточка прижата к низу */
    z-index: 15000;
    padding: 0 16px 32px;     /* прежний bottom:32px → в отступ */
    pointer-events: none;
}
#welcomeBonusToastContainer.toast-visible {
    pointer-events: auto;
}

/* Основной блок всплывающего окна */
.welcome-bonus-toast {
    position: relative;
    width: min(620px, 95vw);
    border-radius: 30px;
    padding: 36px 38px 30px;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(255, 141, 78, 0.32), transparent 55%),
        radial-gradient(140% 140% at 100% 0%, rgba(164, 77, 255, 0.28), transparent 58%),
        linear-gradient(140deg, rgba(25, 8, 32, 0.98), rgba(5, 2, 11, 0.94));
    box-shadow: 0 48px 120px rgba(5, 2, 11, 0.82), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: none;
    backdrop-filter: blur(18px);
    transform: translateY(48px) scale(0.96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.21, 1, 0.24, 1), opacity 0.4s ease, visibility 0.4s ease;
    overflow: hidden;
}

.welcome-bonus-toast--visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Эффект свечения */
.welcome-bonus-glow {
    position: absolute;
    inset: -60% 0 0;
    background: radial-gradient(circle, rgba(255, 145, 73, 0.5), transparent 65%);
    filter: blur(40px);
    pointer-events: none;
    opacity: 0.9;
    animation: welcomeGlow 7s ease-in-out infinite alternate;
    z-index: 0; /* под всем */
}

/* Внутренний контейнер */
.welcome-bonus-inner {
    position: relative;
    z-index: 1; /* контент поверх свечения, но ниже крестика */
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* КРИТИЧНО: Блок с иконкой и текстом */
.welcome-bonus-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.welcome-bonus-head {
    display: grid;
    grid-template-columns: 72px 1fr; /* ширина столбца = ширине иконки */
    align-items: center;             /* вертикальные центры совпадают */
    column-gap: 18px;
    row-gap: 10px;
    width: 100%;
}

/* Иконка подарка */
.welcome-bonus-icon {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255, 200, 141, 0.9), rgba(255, 126, 78, 0.65));
    box-shadow: 0 20px 40px rgba(255, 137, 70, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 190, 130, 0.65);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff1d9;
}

.welcome-bonus-icon svg {
    width: 34px;
    height: 34px;
}

/* Контейнер для копира */
.welcome-bonus-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin: 0; /* принудительно убираем любые унаследованные отступы */
}

.welcome-bonus-pill {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-self: center;
    justify-self: start;      /* было flex-start (невалидно в grid) */
    gap: 4px;
    padding: 11px 24px;       /* симметрия по вертикали */
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.19em;
    text-transform: uppercase;
    color: #fffaf1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03));
    box-shadow: 0 16px 40px rgba(4, 0, 10, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    overflow: hidden;
    width: fit-content;
    max-width: 100%;
}

.welcome-bonus-pill::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), transparent 60%);
    opacity: 0.35;
}

.welcome-bonus-pill-line {
    position: relative;
    z-index: 1;
    line-height: 1.2;
    text-align: center;
}

.welcome-bonus-pill-line--accent {
    letter-spacing: 0.26em;
    font-weight: 600;
    color: #ffe7c5;
}

/* КРИТИЧНО: Заголовок - строго по левому краю */
.welcome-bonus-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff5e8;
    letter-spacing: -0.25px;
    line-height: 1.25;
    text-align: left;
    margin: 0;
}

/* КРИТИЧНО: Дата - строго по левому краю */
.welcome-bonus-text {
    font-size: 15px;
    color: rgba(255, 244, 232, 0.8);
    text-align: left;
    margin: 0;
}

/* Footer с надписью "ДЛЯ НОВЫХ ПОЛЬЗОВАТЕЛЕЙ" */
.welcome-bonus-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.welcome-bonus-label {
    font-size: 12px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

/* Кнопка закрытия */
.welcome-bonus-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(12, 6, 16, 0.6);
    color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    z-index: 3;                 /* всегда поверх контента */
    pointer-events: auto;       /* явное включение */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.welcome-bonus-close svg {
    width: 16px;
    height: 16px;
}

.welcome-bonus-close:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.16);
    color: #1b0f23;
}

/* Анимация свечения */
@keyframes welcomeGlow {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.1);
        opacity: 0.45;
    }
}

/* Адаптация для мобильных устройств */
@media (max-width: 600px) {
    .welcome-bonus-toast {
        padding: 26px 24px 24px;
        border-radius: 24px;
    }

    .welcome-bonus-body {
        gap: 16px;
    }

    .welcome-bonus-head {
        grid-template-columns: auto 1fr; /* всегда в одну линию */
        row-gap: 8px;
    }

    .welcome-bonus-icon {
        width: 62px;
        height: 62px;
    }

    .welcome-bonus-pill {
        align-self: center; /* точный вертикальный центр у плашки */
    }

    .welcome-bonus-icon svg {
        width: 30px;
        height: 30px;
    }

    .welcome-bonus-title {
        font-size: 21px;
    }

    .welcome-bonus-close {
        top: 14px;
        right: 14px;
    }

    .welcome-bonus-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===================================
   PRICE CALCULATION MODAL
   =================================== */

body.price-modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 3, 8, 0.78);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 32px);
    z-index: 10000;
    animation: modalOverlayFade 0.25s ease;
}

@keyframes modalOverlayFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.device-limit-price-modal {
    width: min(640px, calc(100vw - clamp(24px, 8vw, 120px)));
    max-width: 100%;
    background: linear-gradient(155deg, rgba(24, 16, 32, 0.96), rgba(10, 6, 16, 0.95));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 32px;
    box-shadow:
        0 40px 120px rgba(0, 0, 0, 0.65),
        0 0 40px rgba(255, 133, 39, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: popModal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popModal {
    from { transform: translateY(20px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.device-limit-price-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: clamp(20px, 4vw, 28px) clamp(22px, 5vw, 36px) 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.device-limit-price-modal-title {
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.3px;
}

.device-limit-price-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.device-limit-price-modal-close:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.12);
}

.device-limit-price-modal-close svg {
    width: 20px;
    height: 20px;
}

.device-limit-price-modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: clamp(18px, 4vw, 28px) clamp(22px, 5vw, 36px) clamp(24px, 5vw, 32px);
}

/* Calculation Row */
.device-limit-calc-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 10px;
}

.device-limit-calc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 138, 29, 0.12);
    color: #ff8a1d;
    flex-shrink: 0;
}

.device-limit-calc-icon svg {
    width: 18px;
    height: 18px;
}

.device-limit-calc-content {
    flex: 1;
}

.device-limit-calc-label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 3px;
}

.device-limit-calc-value {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

/* Divider */
.device-limit-calc-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 16px 0;
}

/* Explanation */
.device-limit-calc-explanation {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 138, 29, 0.08);
    border: 1px solid rgba(255, 138, 29, 0.2);
    border-radius: 12px;
    margin-bottom: 14px;
}

.device-limit-calc-explanation-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #ff8a1d;
    flex-shrink: 0;
    margin-top: 2px;
}

.device-limit-calc-explanation-icon svg {
    width: 100%;
    height: 100%;
}

.device-limit-calc-explanation-text {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin: 0;
}

.device-limit-calc-explanation-text strong {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.device-limit-calc-breakdown {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.device-limit-calc-row--muted {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 0;
}

/* Total */
.device-limit-calc-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255, 138, 29, 0.15) 0%, rgba(255, 101, 0, 0.12) 100%);
    border: 1px solid rgba(255, 138, 29, 0.35);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(255, 138, 29, 0.2);
}

.device-limit-calc-total-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.device-limit-calc-total-value {
    font-size: 24px;
    font-weight: 800;
    color: #ff8a1d;
    letter-spacing: -1px;
    text-shadow: 0 2px 12px rgba(255, 138, 29, 0.5);
}

.device-limit-price-modal-footer {
    padding: 16px clamp(20px, 4vw, 36px) 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.device-limit-price-modal-btn {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 12px 18px;
    background: linear-gradient(135deg, #ff8a1d 0%, #ff6500 100%);
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 12px rgba(255, 138, 29, 0.35);
}

.device-limit-price-modal-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 8px rgba(255, 138, 29, 0.5);
}
