:root {
    --bg: #070809;
    --bg-glow: #0d3d38;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-2: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --border-active: rgba(0, 229, 193, 0.55);
    --accent: #00E5C1;
    --accent-dim: #00b89a;
    --accent-soft: rgba(0, 229, 193, 0.14);
    --accent-ink: #041612;
    --text: #F5F7F6;
    --muted: rgba(245, 247, 246, 0.58);
    --dim: rgba(245, 247, 246, 0.38);
    --danger: #FF6B6B;
    --radius: 18px;
    --radius-lg: 24px;
    --nav-h: 78px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg);
    position: relative;
    overflow-x: hidden;
}
body::before{
    content:"";
    position:fixed;
    inset:-28% -22% -22% -22%;
    z-index:-1;
    pointer-events:none;
    background:
        radial-gradient(980px 520px at 14% 14%, rgba(0,229,193,0.26), transparent 60%),
        radial-gradient(1100px 640px at 50% 52%, rgba(0,229,193,0.07), transparent 72%),
        radial-gradient(860px 420px at 82% 78%, rgba(56,189,248,0.13), transparent 64%),
        radial-gradient(1000px 520px at 50% 102%, rgba(0,229,193,0.15), transparent 72%),
        linear-gradient(112deg, transparent 30%, rgba(255,255,255,0.035) 48%, transparent 66%);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 160% 100%;
    animation: auroraShift 13s ease-in-out infinite alternate, shimmerMove 8s linear infinite;
    opacity:.96;
    filter: blur(0.5px) saturate(1.08);
}
body::after{
    content:"";
    position:fixed;
    left:-18%; right:-18%; bottom:-14%; height:34%;
    z-index:-1;
    pointer-events:none;
    background:
        radial-gradient(900px 220px at 22% 100%, rgba(0,229,193,0.20), transparent 66%),
        radial-gradient(700px 180px at 78% 100%, rgba(56,189,248,0.13), transparent 70%),
        linear-gradient(0deg, rgba(0,229,193,0.06), transparent 74%);
    filter: blur(10px) saturate(1.08);
    opacity:.9;
    animation: bottomGlow 12s ease-in-out infinite alternate;
}
@keyframes bottomGlow{
    0%{ transform: translateY(0) scaleX(1); opacity:.85; }
    100%{ transform: translateY(-6px) scaleX(1.04); opacity:1; }
}
@keyframes auroraShift{
    0%{ transform: translate3d(0,0,0) scale(1) rotate(0deg); filter: hue-rotate(0deg) brightness(1); }
    50%{ transform: translate3d(-2.6%, 1.4%, 0) scale(1.06) rotate(0.5deg); filter: hue-rotate(8deg) brightness(1.06); }
    100%{ transform: translate3d(2.4%, -1%, 0) scale(1.02) rotate(-0.4deg); filter: hue-rotate(-4deg) brightness(1.02); }
}
@keyframes shimmerMove{
    0%{ background-position: 0 0, 0 0, 0 0, 0 0, -160% 0; }
    100%{ background-position: 0 0, 0 0, 0 0, 0 0, 160% 0; }
}
.stars-layer{
    position:fixed; inset:0; z-index:-1; pointer-events:none; opacity:.55;
    background-image:
        radial-gradient(1px 1px at 7% 12%, #fff 0%, transparent 100%),
        radial-gradient(1.2px 1.2px at 14% 28%, rgba(255,255,255,0.9) 0%, transparent 100%),
        radial-gradient(1px 1px at 23% 18%, #fff 0%, transparent 100%),
        radial-gradient(1.4px 1.4px at 31% 42%, rgba(255,255,255,0.85) 0%, transparent 100%),
        radial-gradient(1px 1px at 38% 9%, #fff 0%, transparent 100%),
        radial-gradient(1.1px 1.1px at 44% 33%, rgba(255,255,255,0.8) 0%, transparent 100%),
        radial-gradient(1px 1px at 52% 21%, #fff 0%, transparent 100%),
        radial-gradient(1.3px 1.3px at 61% 14%, rgba(255,255,255,0.9) 0%, transparent 100%),
        radial-gradient(1px 1px at 68% 36%, #fff 0%, transparent 100%),
        radial-gradient(1.2px 1.2px at 74% 8%, rgba(255,255,255,0.85) 0%, transparent 100%),
        radial-gradient(1px 1px at 81% 27%, #fff 0%, transparent 100%),
        radial-gradient(1.1px 1.1px at 88% 44%, rgba(255,255,255,0.8) 0%, transparent 100%),
        radial-gradient(1px 1px at 93% 18%, #fff 0%, transparent 100%),
        radial-gradient(1.2px 1.2px at 12% 62%, rgba(255,255,255,0.75) 0%, transparent 100%),
        radial-gradient(1px 1px at 26% 74%, #fff 0%, transparent 100%),
        radial-gradient(1.3px 1.3px at 34% 88%, rgba(255,255,255,0.9) 0%, transparent 100%),
        radial-gradient(1px 1px at 46% 66%, #fff 0%, transparent 100%),
        radial-gradient(1.1px 1.1px at 54% 82%, rgba(255,255,255,0.8) 0%, transparent 100%),
        radial-gradient(1px 1px at 63% 58%, #fff 0%, transparent 100%),
        radial-gradient(1.2px 1.2px at 71% 71%, rgba(255,255,255,0.85) 0%, transparent 100%),
        radial-gradient(1px 1px at 79% 62%, #fff 0%, transparent 100%),
        radial-gradient(1.1px 1.1px at 86% 88%, rgba(255,255,255,0.8) 0%, transparent 100%),
        radial-gradient(1px 1px at 92% 54%, #fff 0%, transparent 100%),
        radial-gradient(1.2px 1.2px at 18% 92%, rgba(255,255,255,0.9) 0%, transparent 100%),
        radial-gradient(1px 1px at 28% 98%, #fff 0%, transparent 100%),
        radial-gradient(1.3px 1.3px at 48% 94%, rgba(255,255,255,0.85) 0%, transparent 100%),
        radial-gradient(1px 1px at 66% 96%, #fff 0%, transparent 100%),
        radial-gradient(1.1px 1.1px at 77% 92%, rgba(255,255,255,0.8) 0%, transparent 100%);
    background-repeat:no-repeat;
    animation: twinkle 7s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.6));
}
@keyframes twinkle{
    0%{ opacity:.42; transform: translateY(0); }
    50%{ opacity:.78; }
    100%{ opacity:.52; transform: translateY(-1px); }
}
@media (prefers-reduced-motion: reduce){
    body::before, .stars-layer{ animation:none; }
}

.app {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100dvh;
    padding: 0 16px calc(var(--nav-h) + env(safe-area-inset-bottom));
    position: relative;
}

.screen { display: none; animation: fadeIn .22s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.topbar {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 0 8px; min-height: 52px;
}
.back-btn {
    width: 40px; height: 40px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.06); color: var(--text);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0;
}
.back-btn svg { width: 20px; height: 20px; }

.brand-center { text-align: center; padding: 36px 0 20px; padding-top: calc(32px + env(safe-area-inset-top, 0px)); }
.brand-logo {
    width: 56px; height: 56px; margin: 0 auto 14px;
    border-radius: 16px; background: linear-gradient(135deg, #fff 0%, #d8fff7 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 40px rgba(0, 229, 193, 0.22);
}
.brand-logo svg { width: 32px; height: 32px; color: var(--accent-ink); }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }

.balance-block { text-align: center; margin-bottom: 18px; }
.balance-label { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.balance-value { font-size: 42px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }

.sub-status {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--muted); margin: 14px auto 12px;
    padding: 8px 14px; border-radius: 999px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
}
.sub-status .warn { color: #ffb347; }

.pills { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.pill {
    font-size: 12px; padding: 7px 14px; border-radius: 999px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--muted);
}

.btn-main {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; border: none; border-radius: 999px;
    padding: 16px 20px; font-family: inherit; font-size: 16px; font-weight: 700;
    cursor: pointer; transition: transform .12s, filter .12s;
}
.btn-main:active { transform: scale(.98); }
.btn-main.primary {
    background: var(--accent); color: var(--accent-ink);
    box-shadow: 0 10px 32px rgba(0, 229, 193, 0.28);
    margin-bottom: 12px;
}
.btn-main.secondary {
    background: transparent; color: var(--accent);
    border: 1.5px solid var(--border-active);
}
.btn-main.primary{ position:relative; overflow:hidden; }
.btn-main.primary::after{
    content:""; position:absolute; inset:0; border-radius:inherit;
    background: linear-gradient(108deg, transparent 22%, rgba(255,255,255,0.14) 46%, transparent 64%);
    background-size:140% 100%; animation: shimmerMove 3.6s linear infinite; pointer-events:none; opacity:.72;
}
.balance-value{
    background: linear-gradient(90deg, #F5F7F6 20%, #bffcf2 45%, #F5F7F6 70%);
    -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color: transparent;
    background-size:200% 100%; animation: shimmerMove 3.2s ease-in-out infinite;
}
.feature-card::before{
    content:""; position:absolute; inset:-1px; border-radius:inherit; padding:1px;
    background: linear-gradient(120deg, transparent, rgba(0,229,193,0.22), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; opacity:.0; transition:opacity .25s;
}
.feature-card:hover::before{ opacity:1; }

.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.feature-card {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,229,193,0.04) 100%), var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 18px 14px 16px; min-height: 148px;
    cursor: pointer; transition: border-color .15s;
}
.feature-card:hover { border-color: var(--border-active); }
.feature-card h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; padding-right: 52px; }
.feature-card p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.45; padding-right: 52px; }
.feature-card .card-arrow {
    position: absolute; left: 14px; bottom: 14px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center;
    color: var(--muted);
}
.feature-card .card-arrow svg { width: 16px; height: 16px; }
.feature-card .illus { display: none; }

.section-title { font-size: 26px; font-weight: 800; text-align: center; margin: 8px 0 6px; letter-spacing: -0.02em; }
.section-sub { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 24px; line-height: 1.5; }

.choice-card {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 16px; margin-bottom: 12px;
    background: var(--surface); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.choice-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(0,229,193,.15), 0 8px 28px rgba(0,229,193,.12);
}
.choice-card .label { font-size: 16px; font-weight: 600; }
.choice-card .thumb {
    width: 56px; height: 56px; flex-shrink: 0;
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.choice-card .thumb svg { width: 40px; height: 40px; }

.key-icon-wrap {
    width: 72px; height: 72px; margin: 0 auto 18px;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.key-icon-wrap svg { width: 32px; height: 32px; }

.key-field {
    display: flex; align-items: center; gap: 10px;
    background: rgba(0,0,0,.35); border: 1px solid var(--border);
    border-radius: 14px; padding: 14px 12px; margin: 16px 0 8px;
}
.key-field .url {
    flex: 1; font-size: 13px; color: var(--accent); word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.key-field .copy-btn {
    width: 36px; height: 36px; border: none; border-radius: 10px;
    background: var(--accent-soft); color: var(--accent); cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.key-field .copy-btn svg { width: 18px; height: 18px; }

.btn-white {
    width: 100%; border: none; border-radius: 999px;
    background: #fff; color: #111; font-family: inherit;
    font-size: 16px; font-weight: 700; padding: 16px;
    cursor: pointer; margin-top: 8px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-dark {
    width: 100%; border: 1px solid var(--border); border-radius: 999px;
    background: rgba(255,255,255,0.04); color: var(--text); font-family: inherit;
    font-size: 16px; font-weight: 600; padding: 16px; cursor: pointer; margin-top: 10px;
}

.ref-pill {
    display: inline-block; margin: 0 auto 20px; padding: 8px 18px;
    border-radius: 999px; background: rgba(255,255,255,0.06);
    border: 1px solid var(--border); font-size: 13px; font-weight: 600;
}
.ref-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 12px; margin-bottom: 16px; }
.ref-stat {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px 14px;
}
.ref-stat .lbl { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ref-stat .val { font-size: 22px; font-weight: 800; }
.ref-big {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 18px; text-align: center;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ref-ring {
    width: 88px; height: 88px; border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.08);
    border-top-color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: var(--muted); text-align: center; line-height: 1.3;
    margin-bottom: 12px;
}
.tabs {
    display: flex; gap: 6px; padding: 4px; border-radius: 999px;
    background: rgba(255,255,255,0.05); margin: 12px 0;
}
.tab {
    flex: 1; text-align: center; padding: 8px 10px; border-radius: 999px;
    font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border: none;
    background: transparent; font-family: inherit;
}
.tab.active { background: rgba(255,255,255,0.1); color: var(--text); }

.faq-item {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 14px; margin-bottom: 10px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer;
}
.faq-num {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    background: var(--accent-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
}
.faq-item .txt { flex: 1; font-size: 14px; font-weight: 500; }
.faq-item .arr { color: var(--muted); display: flex; }
.faq-item .arr svg { width: 16px; height: 16px; }

.support-banner {
    margin-top: 16px; padding: 20px 16px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); display: flex; gap: 12px; align-items: center;
}
.support-banner .info { flex: 1; }
.support-banner h3 { margin: 0 0 6px; font-size: 16px; }
.support-banner p { margin: 0 0 10px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.support-banner a { color: var(--accent); font-weight: 600; text-decoration: none; }
.support-ico { width: 56px; height: 56px; color: var(--accent); flex-shrink: 0; }
.support-ico svg { width: 100%; height: 100%; }

.set-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 6px 16px; margin-bottom: 14px;
}
.set-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 0; border-top: 1px solid var(--border); font-size: 14px;
}
.set-row:first-child { border-top: none; }
.set-row .chev { color: var(--muted); }
.set-row a { color: inherit; text-decoration: none; }
.row-left { display: inline-flex; align-items: center; gap: 10px; }
.row-left .row-ico { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.set-pro {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 0;
}
.set-pro .meta b { display: block; font-size: 15px; margin-bottom: 4px; }
.set-pro .meta span { font-size: 12px; color: var(--muted); }
.set-pro .link { color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; }

.bottom-nav {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: calc(100% - 28px); max-width: 402px;
    display: flex; align-items: center; justify-content: space-around;
    padding: 8px 10px; border-radius: 999px;
    background: rgba(12, 14, 13, 0.92); border: 1px solid var(--border);
    backdrop-filter: blur(16px); z-index: 40;
}
.nav-btn {
    flex: 1; border: none; background: transparent; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    font-family: inherit; font-size: 10px; padding: 8px 4px; cursor: pointer;
    border-radius: 999px; transition: color .15s, background .15s;
}
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn.active {
    color: var(--accent-ink); background: var(--accent);
}

.toast {
    position: fixed; left: 50%; bottom: calc(var(--nav-h) + 12px);
    transform: translateX(-50%); z-index: 50;
    background: rgba(12, 20, 17, 0.96); border: 1px solid var(--border-active);
    color: var(--accent); padding: 10px 18px; border-radius: 999px;
    font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s;
}
.toast.show { opacity: 1; }

.empty-state { text-align: center; padding: 32px 16px; color: var(--muted); font-size: 14px; line-height: 1.55; }

.promo-offer {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 18px 16px; margin-bottom: 14px;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, rgba(0,229,193,0.14), rgba(0,229,193,0.04));
    border: 1.5px solid rgba(0,229,193,0.35);
    cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .12s;
    position: relative; overflow: hidden;
}
.promo-offer::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 100% 0%, rgba(0,229,193,0.12), transparent 55%);
    pointer-events: none;
}
.promo-offer.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(0,229,193,0.2), 0 12px 36px rgba(0,229,193,0.18);
}
.promo-offer .promo-text { position: relative; z-index: 1; }
.promo-offer .promo-text b { display: block; font-size: 16px; margin-bottom: 4px; }
.promo-offer .promo-text span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.promo-offer .promo-price {
    position: relative; z-index: 1;
    font-size: 28px; font-weight: 800; color: var(--accent); white-space: nowrap;
}
.promo-offer .promo-mark {
    position: absolute; top: 14px; right: 14px;
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--border); background: transparent;
}
.promo-offer.active .promo-mark {
    border-color: var(--accent); background: var(--accent);
    box-shadow: inset 0 0 0 3px #0e1110;
}

.cabinet-promo {
    margin: 0 0 12px; padding: 16px 14px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(0,229,193,0.16) 0%, rgba(0,229,193,0.04) 100%);
    border: 1px solid rgba(0,229,193,0.35);
    cursor: pointer; text-align: left;
    box-shadow: 0 8px 28px rgba(0,229,193,0.12);
    transition: transform .12s;
}
.cabinet-promo:active { transform: scale(.98); }

.link-unify {
    margin: 0 0 16px; padding: 18px 16px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(0, 120, 255, 0.12) 0%, rgba(0, 229, 193, 0.08) 100%);
    border: 1px solid rgba(0, 229, 193, 0.28);
}
.link-unify.done {
    background: linear-gradient(135deg, rgba(0,229,193,0.12), rgba(0,229,193,0.04));
    border-color: rgba(0,229,193,0.35);
}
.link-unify .top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.link-unify .top .ico {
    width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.link-unify h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.link-unify p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.link-unify .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.link-unify .chip {
    display: inline-flex; align-items: center; gap: 6px;
}
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; padding: 6px 12px; border-radius: 999px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--muted);
}
.link-unify .chip.on { color: var(--accent); border-color: rgba(0,229,193,0.35); background: rgba(0,229,193,0.1); }
.link-unify .chip.off { opacity: .75; }

.account-unify { padding: 6px 16px; margin-bottom: 14px; }
.account-unify .au-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0 10px; border-bottom: 1px solid var(--border);
}
.account-unify .au-head b { font-size: 15px; }
.account-unify .au-badge {
    font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
    background: rgba(0,229,193,0.14); color: var(--accent);
}
.account-unify .au-head { flex-wrap: wrap; gap: 8px; }
.au-badge.owner-badge {
    background: rgba(255, 196, 86, 0.16); color: #ffc456;
}
.owner-admin-card {
    border-color: rgba(255, 196, 86, 0.28);
    background: linear-gradient(135deg, rgba(255,196,86,0.08), rgba(255,255,255,0.03));
}
.account-unify .au-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.account-unify .au-row:last-child { border-bottom: none; }
.account-unify .au-status { font-size: 12px; color: var(--muted); }
.account-unify .au-status.ok { color: var(--accent); }
.account-unify .au-btn { margin: 12px 0 6px; width: 100%; }
.cabinet-promo .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cabinet-promo .tag {
    display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--accent-ink); background: var(--accent);
    padding: 3px 8px; border-radius: 6px; margin-bottom: 8px;
}
.cabinet-promo h3 { margin: 0; font-size: 16px; font-weight: 700; }
.cabinet-promo p { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.cabinet-promo .price-pill {
    flex-shrink: 0; font-size: 22px; font-weight: 800; color: var(--accent);
    padding: 8px 12px; border-radius: 14px; background: rgba(0,0,0,0.25);
}

/* Auth screen (cabinet) */
.auth-screen { max-width: 420px; margin: 0 auto; padding: clamp(32px, 8vw, 48px) 16px 24px; }
.auth-screen h1 { font-size: clamp(22px, 5vw, 26px); text-align: center; margin: 0 0 8px; }
.auth-screen p.lead { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tabs button {
    flex: 1; border: none; border-radius: 999px; padding: 12px 10px;
    font-family: inherit; font-weight: 600; cursor: pointer; min-height: 44px;
    background: rgba(255,255,255,0.06); color: var(--muted); touch-action: manipulation;
}
.auth-tabs button.active { background: var(--accent); color: var(--accent-ink); }
.auth-form input {
    width: 100%; box-sizing: border-box; margin-bottom: 10px; padding: 14px 12px;
    border-radius: 12px; border: 1px solid var(--border); background: rgba(0,0,0,0.25);
    color: var(--text); font-family: inherit; font-size: 16px;
}
.auth-form .hint { font-size: 12px; color: var(--dim); margin: 8px 0 16px; line-height: 1.45; }
.auth-bot { text-align: center; margin-top: 22px; font-size: 13px; color: var(--muted); }
.auth-bot a { color: var(--accent); }
.email-modal {
    position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.72);
    display: none; align-items: center; justify-content: center; padding: 16px;
    overscroll-behavior: contain;
}
.email-modal.open { display: flex; }
.email-card {
    width: 100%; max-width: 400px; max-height: 90dvh; overflow-y: auto;
    background: #0e1110; border: 1px solid var(--border); border-radius: 22px; padding: 22px 18px;
}
.email-card h2 { margin: 0 0 8px; font-size: 20px; }
.email-card p { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.email-card input {
    width: 100%; box-sizing: border-box; margin-bottom: 10px; padding: 13px 12px;
    border-radius: 12px; border: 1px solid var(--border); background: rgba(0,0,0,0.25);
    color: var(--text); font-family: inherit; font-size: 16px;
}
.pwd-dots { letter-spacing: 2px; font-size: 16px; }
.set-change-pwd { width: 100%; margin: -4px 0 14px; }

input, select, textarea, button { font-family: inherit; touch-action: manipulation; }
input, select, textarea { font-size: 16px; }

@media (max-width: 430px) {
    .app { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
    .balance-value { font-size: 34px; }
    .brand-center { padding-top: calc(24px + env(safe-area-inset-top, 0px)); }
    .cards-2 { gap: 10px; }
    .feature-card { min-height: 132px; padding: 14px 12px 16px; }
    .feature-card h3 { font-size: 14px; padding-right: 46px; }
    .feature-card p { font-size: 11px; padding-right: 46px; }
    .feature-card .illus { width: 42px; height: 42px; font-size: 22px; }
    .bottom-nav { width: calc(100% - 20px); padding: 6px 8px; }
    .nav-btn { font-size: 9px; padding: 6px 2px; min-height: 44px; }
    .section-title { font-size: 22px; }
    .promo-offer .promo-price { font-size: 24px; }
    .ref-grid { grid-template-columns: 1fr; }
    .ref-stat .val { font-size: 20px; }
    .support-banner { flex-direction: column; text-align: center; }
    .support-banner .info { width: 100%; }
    .choice-card .thumb { width: 56px; height: 56px; }
    .key-field .url { font-size: 12px; }
    .toast { max-width: calc(100% - 32px); text-align: center; font-size: 12px; }
}

@media (max-width: 360px) {
    .cards-2 { grid-template-columns: 1fr; }
    .feature-card { min-height: auto; }
    .btn-main { font-size: 15px; padding: 14px 16px; }
}

@media (hover: none) {
    .feature-card:hover { border-color: var(--border); }
    .btn-main.primary { box-shadow: 0 6px 20px rgba(0, 229, 193, 0.2); }
}

@media (prefers-reduced-motion: reduce) {
    .screen { animation: none; }
    .btn-main, .cabinet-promo, .promo-offer { transition: none; }
}

@supports (padding: max(0px)) {
    body { padding-bottom: env(safe-area-inset-bottom); }
}

/* === редизайн кабинета по макетам === */
.brand-logo-img { width: 64px; height: auto; border-radius: 14px; display: inline-block; }

/* сайдбар (десктоп) */
.side-nav { display: none; }
@media (min-width: 1024px) {
    .side-nav {
        display: flex; flex-direction: column; align-items: center; gap: 10px;
        position: fixed; left: 0; top: 0; bottom: 0; width: 76px; z-index: 45;
        padding: 18px 0; background: rgba(8, 10, 9, 0.92);
        border-right: 1px solid var(--border); backdrop-filter: blur(16px);
    }
    .side-nav .side-logo img { width: 40px; height: auto; border-radius: 10px; }
    .side-btn {
        width: 46px; height: 46px; border-radius: 14px; border: none;
        background: transparent; color: var(--muted); cursor: pointer;
        display: flex; align-items: center; justify-content: center;
    }
    .side-btn svg { width: 22px; height: 22px; }
    .side-btn.active { background: var(--accent); color: var(--accent-ink); }
    .side-spacer { flex: 1; }
    #bottom-nav { display: none !important; }
    #app-shell { padding-left: 76px; }
    #app-shell .app { max-width: 600px; }
}

/* модалка выхода */
.logout-card { text-align: center; padding: 28px 22px; }
.logout-card h2 { font-size: 22px; margin-bottom: 10px; }
.logout-btns { display: flex; gap: 12px; margin-top: 20px; }
.btn-logout-cancel {
    flex: 1; border: none; border-radius: 999px; padding: 15px;
    background: rgba(255,255,255,0.08); color: var(--text);
    font-size: 16px; font-weight: 700; cursor: pointer;
}
.btn-logout-go {
    flex: 1; border: none; border-radius: 999px; padding: 15px;
    background: #e0574f; color: #fff;
    font-size: 16px; font-weight: 700; cursor: pointer;
}

/* рефералка: кольцо */
.ref-ring { width: 110px; height: 110px; margin-bottom: 8px; }
.ref-ring-label { font-size: 12px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.ref-ring-label b { color: var(--text); font-size: 18px; }

/* настройки */
.set-title { font-size: 15px; font-weight: 800; padding: 12px 0 4px; }
.set-sub { display: flex; align-items: center; gap: 14px; padding: 14px 0; cursor: pointer; }
.set-sub .meta { flex: 1; }
.set-sub .meta b { display: block; font-size: 15px; margin-bottom: 4px; }
.set-sub .meta span { font-size: 12px; color: var(--muted); display: block; margin-bottom: 6px; }
.set-sub-img { width: 84px; height: auto; border-radius: 14px; flex-shrink: 0; }
.login-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--border); }
.login-row .row-ico { width: 34px; height: 34px; color: var(--muted); flex-shrink: 0; }
.login-meta { flex: 1; min-width: 0; }
.login-meta .lbl { display: block; font-size: 11px; color: var(--dim); }
.login-meta .val { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-ok {
    width: 26px; height: 26px; border-radius: 50%; background: #35c759; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.btn-logout {
    width: 100%; border: none; border-radius: 16px; padding: 16px; margin-top: 4px;
    background: rgba(224, 87, 79, 0.1); color: #e0574f;
    font-size: 16px; font-weight: 700; cursor: pointer;
}

/* устройства */
.topbar-title { justify-content: space-between; }
.danger-link { color: #e0574f; font-size: 14px; font-weight: 700; text-decoration: none; display: inline-block; margin-top: 8px; }
.dev-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; padding: 16px; margin-bottom: 12px;
}
.dev-card.deleted { opacity: 0.75; }
.dev-top { display: flex; align-items: center; gap: 12px; }
.dev-ico {
    width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
    background: rgba(0,229,193,0.14); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.dev-ico.dim { background: rgba(255,255,255,0.06); color: var(--muted); }
.dev-ico svg { width: 22px; height: 22px; }
.dev-meta { flex: 1; min-width: 0; }
.dev-name { font-size: 16px; font-weight: 700; }
.dev-sub { font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-menu-wrap { position: relative; flex-shrink: 0; }
.dev-dots { border: none; background: transparent; color: var(--muted); font-size: 18px; letter-spacing: 2px; cursor: pointer; padding: 6px; }
.dev-menu {
    display: none; position: absolute; right: 0; top: 30px; z-index: 20;
    background: #141817; border: 1px solid var(--border); border-radius: 12px;
    min-width: 150px; overflow: hidden; box-shadow: 0 12px 32px rgba(0,0,0,.5);
}
.dev-menu button {
    display: block; width: 100%; text-align: left; border: none; background: transparent;
    color: var(--text); font-size: 14px; padding: 11px 14px; cursor: pointer;
}
.dev-menu button:active { background: rgba(255,255,255,0.06); }
.dev-menu button.danger { color: #e0574f; }
.restore-link { color: var(--accent); font-size: 14px; font-weight: 700; text-decoration: none; display: inline-block; margin-top: 12px; background: none; border: none; cursor: pointer; padding: 0; }

/* компактные карточки на телефоне */
@media (max-width: 430px) {
    .feature-card h3 { font-size: 14px; }
    .feature-card p { font-size: 11px; }
    .balance-value { font-size: 36px; }
}

/* дата подписки простым текстом без пилюли */
.sub-date { text-align: center; font-size: 15px; color: var(--muted); margin: 12px 0 14px; }

/* пропорции главной как в макете */
@media (min-width: 1024px) {
    #app-shell .app { max-width: 460px; }
    .brand-center { padding: 28px 0 14px; }
    .brand-logo-img { width: 52px; }
    .brand-name { font-size: 15px; }
    .balance-value { font-size: 38px; }
    .sub-date { font-size: 14px; margin: 10px 0 12px; }
    .pill { font-size: 11px; padding: 6px 12px; }
    .pills { margin-bottom: 18px; }
    .btn-main { font-size: 15px; padding: 14px 18px; }
    .btn-main.secondary { margin-top: 10px; }
    .cards-2 { gap: 10px; margin-top: 16px; }
    .feature-card h3 { font-size: 14px; }
    .feature-card p { font-size: 11px; }
}

/* минималистичный экран входа */
.auth-min { text-align: center; padding-top: clamp(56px, 14vh, 110px); }
.auth-logo { width: 76px; height: auto; border-radius: 18px; box-shadow: 0 14px 44px rgba(0, 229, 193, 0.25); }
.auth-min h1 { font-size: clamp(24px, 6vw, 30px); margin: 22px 0 8px; }
.auth-sub { color: var(--muted); font-size: 14px; margin: 0 0 26px; }
.auth-card {
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    border-radius: 28px; padding: 26px 20px; text-align: left;
}
.auth-email {
    display: flex; align-items: center; gap: 10px;
    background: rgba(0,0,0,0.3); border: 1px solid var(--border);
    border-radius: 16px; padding: 6px 6px 6px 18px;
}
.auth-email input {
    flex: 1; min-width: 0; border: none; background: transparent;
    color: var(--text); font-size: 16px; outline: none; padding: 12px 0;
}
.auth-email input::placeholder { color: var(--dim); }
.auth-email button {
    width: 48px; height: 48px; border: none; border-radius: 14px; flex-shrink: 0;
    background: var(--accent); color: var(--accent-ink);
    font-size: 20px; font-weight: 700; cursor: pointer;
}
.auth-or { display: flex; align-items: center; gap: 14px; color: var(--dim); font-size: 12px; margin: 18px 2px; }
.auth-or span { flex: 1; height: 1px; background: var(--border); }
.auth-tg {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border);
    border-radius: 16px; padding: 16px 18px; color: var(--text);
    font-size: 16px; font-weight: 600; text-decoration: none;
}
.auth-tg .ico { width: 26px; height: 26px; }
.auth-tg .arr { margin-left: auto; color: var(--muted); }

/* карточка подписки в настройках */
.set-sub .link { color: var(--accent); font-size: 13px; font-weight: 700; text-decoration: none; display: inline-block; margin-top: 6px; }
.set-sub .link:active { opacity: 0.7; }
.set-sub .meta span { display: block; }

/* карточка подписки в настройках: зелёный градиент + воздух */
.set-sub {
    background: linear-gradient(135deg, rgba(0,229,193,0.16), rgba(0,229,193,0.03));
    border: 1px solid rgba(0,229,193,0.28);
    border-radius: 18px;
    padding: 20px 18px;
    gap: 16px;
}
.set-sub .meta { padding: 4px 0 4px 2px; }
.set-sub .meta b { font-size: 17px; }
.set-sub .meta span { margin: 6px 0 10px; line-height: 1.55; }
.set-sub-img { width: 92px; box-shadow: 0 10px 28px rgba(0,229,193,0.22); }
