:root {
    --bg: #040b1b;
    --bg-soft: #0d1f43;
    --panel: rgba(12, 28, 58, 0.74);
    --line: rgba(91, 178, 255, 0.35);
    --text: #f5f9ff;
    --muted: #afc6e5;
    --accent: #5bb2ff;
    --accent2: #bf7dff;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(91, 178, 255, 0.12);
}

body {
    margin: 0;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    position: relative;
    overflow-x: hidden;
}

/* Фон: мягкие движущиеся градиенты */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.ambient-bg__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(76px);
    opacity: 0.38;
    animation: ambient-drift 24s ease-in-out infinite;
}

.ambient-bg__orb--a {
    width: min(520px, 58vw);
    height: min(520px, 58vw);
    background: radial-gradient(circle, rgba(91, 178, 255, 0.55) 0%, transparent 70%);
    top: -12%;
    left: -14%;
}

.ambient-bg__orb--b {
    animation-delay: -12s;
    width: min(440px, 52vw);
    height: min(440px, 52vw);
    background: radial-gradient(circle, rgba(191, 125, 255, 0.42) 0%, transparent 70%);
    bottom: -8%;
    right: -10%;
}

@keyframes ambient-drift {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(4vw, 3vh) scale(1.06);
    }
    66% {
        transform: translate(-3vw, 2vh) scale(0.98);
    }
}

/* Футер не должен иметь тот же z-index, что и main: иначе он рисуется поверх
   fixed-модалок из кабинета (они внутри .content). */
.site-header,
.content {
    position: relative;
    z-index: 1;
}

.site-header {
    width: min(1100px, 100%);
    margin: 14px auto 0;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    animation: lx-fade-down 0.55s ease-out both;
}

.header-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--line);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

@media (hover: hover) and (pointer: fine) {
    .brand:hover .brand-logo {
        transform: scale(1.06) rotate(-2deg);
        box-shadow: 0 10px 34px rgba(91, 178, 255, 0.28);
    }
}

.site-nav {
    display: flex;
    gap: 10px;
    align-items: center;
    overflow: visible;
}

.nav-icon {
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    margin-right: 6px;
    opacity: 0.9;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(7, 19, 39, 0.78);
    padding: 10px 9px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: #e7f2ff;
    margin: 5px 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.content {
    flex: 1 0 auto;
    width: min(1100px, 100%);
    margin: 14px auto 34px;
    padding: 0 16px;
}

.site-footer {
    position: relative;
    z-index: 0;
    flex-shrink: 0;
    width: min(1100px, 100%);
    margin: 0 auto;
    padding: 20px 16px 28px;
    border-top: 1px solid rgba(91, 178, 255, 0.2);
}

.site-footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 20px;
    margin-bottom: 14px;
}

.site-footer-brand {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    letter-spacing: 0.04em;
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 4px;
    font-size: 13px;
}

.site-footer-nav a {
    color: var(--accent);
    text-decoration: none;
}

.site-footer-nav a:hover {
    text-decoration: underline;
}

.site-footer-sep {
    color: var(--muted);
    user-select: none;
    padding: 0 2px;
}

.site-footer-contacts {
    text-align: center;
    margin-bottom: 16px;
    padding-top: 4px;
}

.site-footer-contacts-label {
    margin: 0 0 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    font-weight: 600;
}

.site-footer-tg {
    display: inline-block;
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.site-footer-tg:hover {
    text-decoration: underline;
}

.site-footer-copy {
    margin: 0;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.02em;
}

/* Юридические страницы */
.legal-doc {
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 36px);
}

.legal-doc-title {
    margin: 0 0 8px;
    font-size: clamp(22px, 3vw, 28px);
    line-height: 1.2;
}

.legal-doc-meta {
    margin: 0 0 24px;
    font-size: 13px;
}

.legal-doc-section {
    margin-bottom: 22px;
}

.legal-doc-section:last-child {
    margin-bottom: 0;
}

.legal-doc-section h2 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.legal-doc-section p,
.legal-doc-section li {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
}

.legal-doc-section ul {
    margin: 0 0 10px;
    padding-left: 1.25em;
}

.legal-doc-section li {
    margin-bottom: 6px;
}

.legal-doc-section strong {
    color: var(--text);
}

.hero-card,
.panel,
.card {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(17, 41, 78, 0.9), var(--panel));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.hero-card {
    padding: clamp(28px, 5vw, 70px);
    min-height: min(54vh, 520px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: pulse-border 6s ease-in-out infinite;
}

.hero-card > .eyebrow {
    animation: lx-fade-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-card > .big-title {
    animation: lx-fade-up 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hero-card > .lead {
    animation: lx-fade-up 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.hero-card > .hero-actions {
    animation: lx-fade-up 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.36s both;
}

@keyframes lx-fade-up {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lx-fade-down {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    }
    50% {
        box-shadow: 0 18px 55px rgba(91, 178, 255, 0.32);
    }
}

.panel {
    padding: 18px;
    margin-bottom: 10px;
}

.compact-panel {
    max-width: 860px;
}

.cabinet-shell {
    display: grid;
    gap: 8px;
}

.compact-head {
    max-width: 100%;
    padding: 12px 14px;
}

.head-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px 16px;
    width: 100%;
}

.head-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.head-user-email {
    flex-shrink: 0;
    font-size: clamp(14px, 1.9vw, 17px);
    font-weight: 500;
    color: var(--muted);
    text-align: right;
    max-width: min(100%, 320px);
    word-break: break-all;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-weight: 700;
    font-size: 16px;
    color: #eaf5ff;
    border: 1px solid var(--line);
    background: linear-gradient(140deg, #62b6ff, #bf7dff);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.cabinet-actions {
    margin-top: 8px;
}

.cabinet-overview {
    max-width: none;
    width: 100%;
    padding: 12px;
}

.cabinet-overview-head {
    margin-bottom: 8px;
}

.cabinet-overview-head .eyebrow {
    margin-bottom: 4px;
}

.cabinet-section-title {
    margin: 0;
    font-size: clamp(16px, 1.9vw, 22px);
    line-height: 1.2;
}

.cabinet-kpi-grid {
    gap: 8px;
}

.cabinet-workflow-grid {
    margin-top: 2px;
}

.cabinet-workflow-card {
    padding: 12px;
}

.cabinet-workflow-card .card-title {
    margin-bottom: 6px;
    font-size: clamp(16px, 1.8vw, 20px);
}

.cabinet-workflow-card .muted + .muted {
    margin-top: 6px;
}

/* Кабинет: партнёрская / реферальная программа + SVG-схема */
.referral-program.compact-panel {
    max-width: none;
    width: 100%;
}

.referral-program {
    padding: 8px 10px 10px;
    overflow: hidden;
}

.referral-program .eyebrow {
    font-size: 10px;
    margin-bottom: 6px;
}

.referral-program-intro {
    margin-bottom: 6px;
}

.referral-program-heading {
    margin: 0 0 4px;
    font-size: clamp(14px, 1.65vw, 17px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

.referral-program-lead {
    margin: 0;
    max-width: none;
    line-height: 1.45;
    font-size: 12px;
}

.referral-program-lead strong {
    color: #d7e8ff;
    font-weight: 700;
}

.referral-program-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}

.referral-metric {
    padding: 6px 6px;
    border-radius: 10px;
    border: 1px solid rgba(91, 178, 255, 0.25);
    background: rgba(4, 14, 33, 0.55);
    text-align: center;
}

.referral-metric--accent {
    border-color: rgba(191, 125, 255, 0.45);
    background: linear-gradient(155deg, rgba(40, 18, 62, 0.35), rgba(8, 22, 48, 0.65));
}

.referral-metric-label {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 3px;
}

.referral-metric-value {
    font-size: clamp(12px, 2vw, 15px);
    font-weight: 700;
    color: #eaf4ff;
    word-break: break-all;
}

.referral-metric--accent .referral-metric-value {
    background: linear-gradient(95deg, #8bd6ff, #c996ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.referral-program-link-row {
    margin-top: 0;
}

.referral-program .deposit-address-row code {
    font-size: 11px;
}

.referral-program .referral-program-link-row .button {
    padding: 6px 10px;
    font-size: 12px;
    min-height: auto;
}

.referral-program-footnote {
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.45;
    max-width: none;
}

@media (max-width: 620px) {
    .referral-program-metrics {
        grid-template-columns: 1fr;
    }

    .referral-program-heading {
        font-size: 0.95rem;
    }

    .referral-program-lead {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .cabinet-overview {
        padding: 10px 9px;
    }

    .cabinet-section-title {
        font-size: 1.05rem;
    }

    .referral-program {
        padding: 8px 6px 10px;
    }

    .referral-metric-value {
        font-size: 13px;
    }

    .referral-program-footnote {
        font-size: 10px;
    }
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

h1 {
    margin: 0;
    font-size: clamp(34px, 8vw, 78px);
    line-height: 1.05;
}

.page-title {
    font-size: clamp(24px, 3.2vw, 34px);
    line-height: 1.15;
}

.big-title {
    background: linear-gradient(95deg, #f0f8ff, #8bd6ff, #c996ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: clamp(13px, 1vw, 15px);
    max-width: 680px;
}

.hero-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Главная: блок о команде и технологии */
.home-mission {
    margin-top: 14px;
    margin-bottom: 8px;
    scroll-margin-top: 88px;
}

.home-mission-inner {
    padding: clamp(22px, 4vw, 44px);
    border-radius: 20px;
    background: linear-gradient(
        155deg,
        rgba(17, 41, 78, 0.92) 0%,
        rgba(8, 22, 48, 0.88) 45%,
        rgba(12, 28, 58, 0.9) 100%
    );
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.home-mission-heading {
    max-width: 22ch;
    line-height: 1.15;
    background: linear-gradient(95deg, #f0f8ff, #8bd6ff, #c996ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-mission-columns {
    display: grid;
    gap: clamp(18px, 3vw, 28px);
    margin-top: 8px;
    align-items: start;
}

@media (min-width: 880px) {
    .home-mission-columns {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr);
        gap: 28px 32px;
    }
}

.home-mission-text {
    margin: 0 0 1rem;
    font-size: clamp(14px, 1.35vw, 16px);
    line-height: 1.68;
    color: #c8daf5;
}

.home-mission-text:last-child {
    margin-bottom: 0;
}

.home-mission-text--tight {
    margin-bottom: 0;
    padding-top: 4px;
    border-top: 1px solid rgba(91, 178, 255, 0.22);
}

.home-mission-aside {
    margin: 0;
    padding: clamp(16px, 2.5vw, 22px);
    border-radius: 16px;
    border: 1px solid rgba(191, 125, 255, 0.35);
    background: linear-gradient(
        160deg,
        rgba(40, 18, 62, 0.55) 0%,
        rgba(12, 28, 58, 0.75) 100%
    );
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

.home-mission-aside-label {
    margin: 0 0 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #e0c4ff;
}

.home-mission-text--aside {
    margin: 0;
    color: #dce9fb;
}

.home-mission-cta {
    margin: clamp(20px, 3vw, 28px) 0 0;
    padding: clamp(14px, 2vw, 18px) clamp(16px, 2.5vw, 24px);
    text-align: center;
    font-size: clamp(15px, 1.5vw, 18px);
    font-weight: 600;
    line-height: 1.45;
    color: #eaf4ff;
    border-radius: 14px;
    border: 1px solid rgba(91, 178, 255, 0.4);
    background: rgba(4, 14, 33, 0.65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Главная: активы и сети депозита */
.home-crypto {
    margin-top: 14px;
    margin-bottom: 10px;
    scroll-margin-top: 88px;
}

/* Главная: режимы участия и реферальный заработок */
.home-modes {
    margin-top: 12px;
    margin-bottom: 10px;
    scroll-margin-top: 88px;
}

.home-modes-lead {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    max-width: 760px;
}

.home-modes-grid {
    gap: 12px;
}

.home-mode-card {
    background: linear-gradient(160deg, rgba(17, 41, 78, 0.62), rgba(8, 20, 44, 0.82));
}

.home-mode-title {
    margin: 0 0 8px;
    font-size: 18px;
}

.home-mode-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.home-mode-list li + li {
    margin-top: 6px;
}

.home-crypto-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.home-crypto-card {
    display: grid;
    justify-items: center;
    align-content: start;
    text-align: center;
    gap: 10px;
    padding: 20px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(17, 41, 78, 0.55), rgba(8, 20, 44, 0.78));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

@media (hover: hover) and (pointer: fine) {
    .home-crypto-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
        border-color: rgba(91, 178, 255, 0.42);
    }
}

.home-crypto-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: contain;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.home-crypto-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.06em;
}

.home-crypto-nets {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    padding: 11px 18px;
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
    .button:hover {
        transform: translateY(-2px);
    }
}

.button-primary {
    background: linear-gradient(120deg, var(--accent), #8ad7ff);
    color: #031327;
    box-shadow: 0 8px 25px rgba(91, 178, 255, 0.4);
}

.button-ghost {
    background: rgba(7, 19, 39, 0.72);
    color: var(--text);
    border: 1px solid var(--line);
}

/* Уведомления в шапке */
.notify-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notify-btn {
    position: relative;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    border-radius: 12px;
}

.notify-icon {
    font-size: 18px;
    line-height: 1;
}

.notify-dot {
    position: absolute;
    top: 5px;
    right: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff4d67;
    box-shadow: 0 0 0 2px rgba(7, 19, 39, 0.92);
}

.notify-popover {
    position: fixed;
    top: 0;
    left: 0;
    width: min(340px, calc(100vw - 24px));
    max-height: min(62vh, 420px);
    overflow: auto;
    border-radius: 14px;
    border: 1px solid rgba(91, 178, 255, 0.35);
    background: rgba(7, 19, 40, 0.99);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    padding: 12px;
    z-index: 400;
}

.notify-popover-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: #e8f4ff;
}

.notify-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.notify-item {
    margin: 0;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid rgba(91, 178, 255, 0.25);
    background: rgba(4, 14, 33, 0.8);
    color: #e2efff;
    font-size: 12px;
    line-height: 1.4;
}

.notify-empty {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.dashboard-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.compact-grid {
    gap: 8px;
}

.info-grid {
    margin-top: 12px;
    margin-bottom: 12px;
}

.card {
    padding: 14px 15px;
    border-radius: 14px;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

@media (hover: hover) and (pointer: fine) {
    .info-grid .card:hover,
    .panel:not(.compact-panel) .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
        border-color: rgba(91, 178, 255, 0.42);
    }
}

.compact-card {
    padding: 10px 12px;
    min-height: 118px;
    position: relative;
}

.card-info-btn {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(151, 196, 255, 0.6);
    background: rgba(7, 19, 40, 0.92);
    color: #dff0ff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.card-info-popover {
    position: absolute;
    top: 34px;
    right: 8px;
    width: min(240px, calc(100% - 16px));
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(126, 184, 255, 0.35);
    background: rgba(4, 14, 33, 0.98);
    color: #d6e8ff;
    font-size: 12px;
    line-height: 1.35;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 3;
}

.compact-card.info-open .card-info-popover {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.section-title {
    margin: 0 0 12px;
    font-size: clamp(22px, 3vw, 34px);
}

.card-title {
    margin: 0 0 8px;
    font-size: 20px;
}

.stat-label {
    margin: 0;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    padding-right: 30px;
}

.stat-value {
    margin: 4px 0 4px;
    font-size: clamp(17px, 1.5vw, 22px);
    color: #fff;
    font-weight: 700;
}

.stat-value--dim {
    color: var(--muted);
    font-weight: 600;
    font-size: clamp(15px, 1.8vw, 19px);
}

.accent {
    color: #79c5ff;
}

.muted {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.compact-rules {
    padding: 10px 12px;
}

.steps {
    display: grid;
    gap: 10px;
}

.step-item {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(8, 21, 43, 0.65);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
    .step-item:hover {
        transform: translateX(4px);
        border-color: rgba(91, 178, 255, 0.45);
    }
}

.step-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #041527;
    background: linear-gradient(120deg, var(--accent), #a2ddff);
    box-shadow: 0 6px 18px rgba(91, 178, 255, 0.32);
    animation: step-dot-pulse 3.2s ease-in-out infinite;
}

@keyframes step-dot-pulse {
    0%,
    100% {
        box-shadow: 0 6px 18px rgba(91, 178, 255, 0.32);
    }
    50% {
        box-shadow: 0 6px 22px rgba(91, 178, 255, 0.55);
    }
}

.step-item h3 {
    margin: 0 0 4px;
    font-size: 17px;
}

.step-item p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.form-wrap {
    display: flex;
    justify-content: center;
}

/* Вход / регистрация: сплошной фон и контур, иначе блок сливается с body */
.card.auth-card {
    width: min(420px, 100%);
    background: linear-gradient(165deg, #142d52 0%, #0c1a32 45%, #070f1c 100%);
    border-color: rgba(91, 178, 255, 0.48);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card.auth-card .field {
    background: #040f20;
}

.card.auth-card .errorlist {
    padding: 10px 12px 10px 32px;
    border-radius: 10px;
    border: 1px solid rgba(255, 150, 170, 0.38);
    background: #140a10;
}

.auth-form {
    display: grid;
    gap: 12px;
}

.auth-form label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.field {
    width: 100%;
    background: rgba(4, 15, 32, 0.9);
    border: 1px solid var(--line);
    color: #fff;
    border-radius: 10px;
    padding: 11px 12px;
    outline: none;
}

.field:focus {
    border-color: #8ad7ff;
}

.full {
    width: 100%;
}

.text-link {
    color: #8ad7ff;
}

.flash-list {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.flash {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid var(--line);
    background: rgba(11, 26, 49, 0.82);
}

.flash.success {
    border-color: rgba(87, 220, 162, 0.5);
}

.flash.error {
    border-color: rgba(255, 134, 161, 0.6);
}

.wallet-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.mini-form {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.field-help {
    display: grid;
    gap: 4px;
}

.field-note {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
    text-transform: none;
}

.deposit-min-line {
    margin: 0 0 6px;
    color: #c8d9f5;
    font-size: 11px;
    font-weight: 600;
}

.withdraw-min-alert {
    margin: 0 0 4px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 170, 78, 0.45);
    background: rgba(255, 145, 43, 0.14);
    color: #ffd8a8;
    font-size: 12px;
    font-weight: 700;
}

.mini-form .field {
    padding: 9px 10px;
    font-size: 13px;
}

.tx-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px;
}

.tx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.tx-table th,
.tx-table td {
    text-align: left;
    padding: 7px 8px;
    border-bottom: 1px solid rgba(118, 156, 205, 0.2);
    color: var(--muted);
    white-space: nowrap;
}

.tx-table th {
    color: #d7e8ff;
    font-weight: 600;
}

.tx-status {
    font-weight: 600;
}

.tx-status--completed {
    color: #4ade80;
}

.tx-status--pending {
    color: #fbbf24;
}

.tx-status--rejected {
    color: #f87171;
}

.tiny-btn {
    padding: 6px 10px;
    font-size: 11px;
}

.wallet-modal {
    position: fixed;
    inset: 0;
    /* Выше шапки (моб. меню), см. .site-header в max-width 740px */
    z-index: 300;
    display: grid;
    place-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.wallet-modal[hidden] {
    display: none !important;
}

.wallet-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(2, 6, 14, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.wallet-panel {
    position: relative;
    z-index: 1;
    width: min(430px, calc(100% - 24px));
    border: 1px solid var(--line);
    border-radius: 16px;
    /* Непрозрачный фон — контент страницы не просвечивает сквозь окно */
    background: linear-gradient(165deg, #142d52 0%, #0c1a32 45%, #070f1c 100%);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    padding: 12px;
}

.wallet-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.wallet-close {
    padding: 7px 10px;
    font-size: 12px;
}

.wallet-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.wallet-tab {
    border: 1px solid var(--line);
    background: #0d2138;
    color: var(--muted);
    border-radius: 10px;
    padding: 9px;
    cursor: pointer;
    font-weight: 600;
}

.wallet-tab.is-active {
    color: #021224;
    background: linear-gradient(120deg, var(--accent), #93dcff);
    border-color: transparent;
}

.wallet-content {
    display: none;
}

.wallet-content.is-active {
    display: block;
}

.wallet-panel .field {
    background: #040f20;
}

.deposit-address-box {
    border: 1px solid var(--line);
    background: #0a1526;
    border-radius: 12px;
    padding: 8px 10px 10px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "title qr"
        "network qr"
        "address qr";
    gap: 6px 10px;
    align-items: start;
}

.deposit-wallet-title {
    grid-area: title;
    padding-right: 8px;
}

.deposit-network {
    grid-area: network;
    margin: 4px 0 8px;
    color: var(--muted);
    font-size: 12px;
}

.deposit-address-row {
    grid-area: address;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.deposit-address-row code {
    display: block;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid rgba(123, 165, 216, 0.3);
    background: rgba(3, 12, 27, 0.78);
    color: #dcecff;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn {
    padding: 9px 11px;
    font-size: 12px;
}

.deposit-qr-wrap {
    grid-area: qr;
    display: grid;
    place-items: center;
    align-self: start;
    margin-top: 0;
}

.deposit-qr-wrap img {
    width: 96px;
    height: 96px;
    border-radius: 10px;
    border: 1px solid rgba(126, 174, 232, 0.35);
    background: #ffffff;
    object-fit: contain;
}

@media (max-width: 620px) {
    .deposit-address-box {
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "network"
            "address"
            "qr";
    }

    .deposit-address-row {
        grid-template-columns: 1fr;
    }

    .wallet-panel {
        width: calc(100% - 20px);
        max-height: min(92dvh, 640px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.errorlist {
    margin: 0;
    padding-left: 18px;
    color: #ffc7d6;
    font-size: 13px;
}

@media (max-width: 740px) {
    /* Шапка выше .content (тот же z-index:1, но main ниже в DOM — перекрывал меню) */
    .site-header {
        flex-wrap: wrap;
        margin-top: 10px;
        position: relative;
        z-index: 200;
    }

    .menu-toggle {
        display: block;
        margin-left: 0;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 16px;
        right: 16px;
        z-index: 1;
        display: grid;
        gap: 0;
        padding: 4px 0;
        border-radius: 14px;
        border: 1px solid rgba(91, 178, 255, 0.4);
        background: #070f1c;
        box-shadow:
            0 16px 35px rgba(0, 0, 0, 0.45),
            inset 0 1px 0 rgba(255, 255, 255, 0.04);
        isolation: isolate;
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .site-nav > * + * {
        border-top: 1px solid rgba(91, 178, 255, 0.12);
    }

    .site-header.menu-open .site-nav {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* Пункты меню — как ссылки на тёмной подложке */
    .site-nav .button {
        width: 100%;
        min-height: 44px;
        justify-content: flex-start;
        padding: 12px 14px;
        border-radius: 0;
        border: none;
        background: transparent !important;
        box-shadow: none !important;
        color: var(--accent);
        font-weight: 600;
    }

    .site-nav .button-primary {
        color: #e8f4ff;
    }

    .site-nav a.button-ghost {
        color: var(--muted);
    }

    .site-nav form {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .site-nav form .button {
        width: 100%;
    }

    .notify-wrap {
        width: auto;
    }

    .notify-wrap .notify-btn {
        width: 44px;
        justify-content: center;
    }

    .notify-popover {
        max-height: min(56vh, 340px);
        border-radius: 14px;
    }

    .notify-popover-title {
        font-size: 15px;
    }

    .notify-item,
    .notify-empty {
        font-size: 14px;
        line-height: 1.45;
    }

    .site-header.menu-open .menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .site-header.menu-open .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .site-header.menu-open .menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .head-top {
        flex-direction: column;
        align-items: stretch;
    }

    .head-user {
        width: 100%;
    }

    .head-user-email {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .content {
        margin-bottom: 24px;
        padding: 0 12px;
    }

    .site-header {
        padding: 0 12px;
        gap: 8px;
    }

    .brand {
        font-size: 18px;
    }

    .brand-logo {
        width: 40px;
        height: 40px;
    }

    .site-nav {
        left: 12px;
        right: 12px;
    }

    .site-nav .button {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 13px;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
    }

    .hero-card {
        padding: 22px 18px;
        min-height: auto;
        border-radius: 16px;
    }

    .hero-actions {
        flex-direction: column;
        margin-top: 18px;
    }

    .hero-actions .button {
        width: 100%;
        min-height: 46px;
    }

    .lead {
        font-size: 14px;
        line-height: 1.45;
    }

    .info-grid {
        margin-top: 10px;
    }

    .compact-card {
        min-height: auto;
    }

    .panel,
    .compact-panel {
        border-radius: 14px;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .step-item {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: left;
    }

    .step-item .step-dot {
        width: 36px;
        height: 36px;
    }

    .form-wrap {
        align-items: flex-start;
    }

    .card.auth-card {
        width: 100%;
        max-width: none;
        padding: 14px 12px 12px;
        border-radius: 16px;
    }

    .card.auth-card .eyebrow {
        margin-bottom: 6px;
        font-size: 11px;
    }

    .card.auth-card .page-title {
        margin-bottom: 10px;
        font-size: 1.8rem;
        line-height: 1.15;
    }

    .card.auth-card .auth-form {
        gap: 10px;
    }

    .card.auth-card .auth-form label {
        gap: 7px;
        font-size: 14px;
        font-weight: 600;
        color: #d2e4ff;
    }

    .card.auth-card .field {
        min-height: 50px;
        padding: 12px 14px;
        border-radius: 12px;
    }

    .card.auth-card .button.full {
        min-height: 50px;
        font-size: 16px;
    }

    .card.auth-card .muted {
        margin-top: 10px;
        font-size: 14px;
        line-height: 1.4;
    }

    .card.auth-card .text-link {
        font-weight: 600;
    }

    .tx-table {
        font-size: 11px;
    }

    .tx-table th,
    .tx-table td {
        padding: 6px 5px;
    }

    .wallet-modal {
        place-items: end center;
        align-content: end;
    }

    .wallet-panel {
        width: 100% !important;
        max-width: none;
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 88dvh;
    }

    .deposit-qr-wrap img {
        width: min(200px, 72vw);
        height: auto;
        aspect-ratio: 1;
    }

    /* Телефоны: подвал, отступы, фон */
    .site-footer {
        padding: 18px 12px calc(24px + env(safe-area-inset-bottom, 0));
    }

    .site-footer-top {
        flex-direction: column;
        gap: 14px;
        text-align: center;
    }

    .site-footer-nav {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        align-items: center;
    }

    .site-footer-sep {
        display: none;
    }

    /* Обычные текстовые ссылки, без «кнопок» */
    .site-footer-nav a {
        display: block;
        padding: 4px 0;
        border: none;
        background: none;
        border-radius: 0;
        text-align: center;
        font-size: 14px;
        line-height: 1.45;
        font-weight: 500;
    }

    .site-footer-tg {
        display: inline-block;
        padding: 4px 0 0;
        border: none;
        background: none;
        border-radius: 0;
        max-width: 100%;
    }

    .ambient-bg__orb {
        filter: blur(52px);
        opacity: 0.26;
    }

    .home-mission-inner {
        padding: 18px 16px 22px;
    }

    .home-crypto-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .home-mode-title {
        font-size: 16px;
    }

    .home-mode-list {
        font-size: 13px;
    }

    .home-crypto-card {
        padding: 16px 10px;
    }

    .home-crypto-icon {
        width: 48px;
        height: 48px;
    }

    .home-mission-cta {
        font-size: 14px;
        padding: 14px 14px;
    }

    .big-title {
        font-size: clamp(28px, 12vw, 52px);
        line-height: 1.08;
    }

    .reveal {
        transform: translateY(18px);
    }

    .legal-doc {
        padding: 16px 14px 24px;
    }

    .field {
        min-height: 48px;
        font-size: 16px;
    }
}

/* Появление секций при прокрутке */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .ambient-bg {
        display: none;
    }

    .site-header {
        animation: none;
    }

    .hero-card > .eyebrow,
    .hero-card > .big-title,
    .hero-card > .lead,
    .hero-card > .hero-actions {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .step-dot {
        animation: none !important;
    }

    .hero-card {
        animation: none;
    }
}
