:root {
    --bg: #0a0c10;
    --surface: #12151c;
    --surface2: #181c26;
    --border: rgba(255, 255, 255, 0.07);
    --text: #e8ecf1;
    --muted: #8b949e;
    --bid: #3fb950;
    --bid-dim: rgba(63, 185, 80, 0.12);
    --ask: #f85149;
    --ask-dim: rgba(248, 81, 73, 0.12);
    --accent: #58a6ff;
    --gold: #e3b341;
    --radius: 14px;
    --font-sans: "Manrope", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    background-image:
        radial-gradient(ellipse 100% 60% at 50% -15%, rgba(88, 166, 255, 0.1), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(63, 185, 80, 0.03), transparent);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 18px 40px;
}

.header {
    margin-bottom: 20px;
}

.header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
}

.header-top .title {
    margin: 0 0 4px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.toolbar__tail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px 12px;
    margin-left: auto;
    flex: 1 1 auto;
    min-width: 0;
}

/* Аватар, план и меню — правый край */
.user-menu {
    position: relative;
    flex-shrink: 0;
    margin-left: 4px;
}

.user-menu__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 4px 4px 4px 4px;
    padding-right: 10px;
    font: inherit;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}
.user-menu__trigger:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(88, 166, 255, 0.2);
}
.user-menu__trigger:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.25);
}

.user-menu__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0a0c10;
    background: linear-gradient(145deg, #58a6ff, #23b08a);
    flex-shrink: 0;
}

.user-menu__plan.sub-badge {
    max-width: 200px;
    font-size: 0.75rem;
}

.user-menu__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1200;
    min-width: 220px;
    margin-top: 6px;
    padding: 6px 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}
.user-menu__dropdown[hidden] {
    display: none !important;
}
.user-menu__email {
    padding: 6px 14px 8px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--muted);
    word-break: break-all;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.user-menu__item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 9px 14px;
    text-align: left;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    background: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
}
.user-menu__item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.user-menu__item[data-user-action="logout"] {
    color: #f87171;
}
.user-menu__sep {
    height: 1px;
    margin: 4px 8px;
    background: var(--border);
}

.market-filters {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.exchange-filters {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(88, 166, 255, 0.06);
    border: 1px solid rgba(88, 166, 255, 0.12);
    border-radius: 12px;
}

.exchange-toggle-bar {
    gap: 6px;
}

.exchange-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 7px 12px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.exchange-toggle:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
}

.exchange-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.35);
}

.exchange-toggle-on {
    color: var(--text);
    background: rgba(88, 166, 255, 0.18);
    border-color: rgba(88, 166, 255, 0.35);
    box-shadow: 0 0 0 1px rgba(88, 166, 255, 0.12);
}

/* Binance — только с активной подпиской Pro */
.exchange-toggle.exchange-toggle-pro-locked:not(.exchange-toggle-on) {
    border-style: dashed;
    opacity: 0.65;
}

.exchange-toggle-on .exchange-icon-toolbar {
    opacity: 1;
}

.exchange-toggle:not(.exchange-toggle-on) .exchange-icon-toolbar {
    opacity: 0.55;
}

.exchange-toggle-label {
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .exchange-toggle-label {
        max-width: 4rem;
    }
}

.filter-chk {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

.filter-chk input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent, #6ee7b7);
    cursor: pointer;
}

.exchange-icon-toolbar {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 4px;
    opacity: 0.95;
    pointer-events: none;
}

.sound-controls {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.sound-select {
    min-width: 7.5rem;
    max-width: 11rem;
    padding: 6px 28px 6px 10px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M3 4.5L6 8l3-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.sound-preview-btn {
    min-width: 2rem;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.75rem;
}

.field.inline {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 600;
}

input[type="number"] {
    width: 140px;
    padding: 8px 10px;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

.btn {
    padding: 8px 14px;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.btn-sm {
    padding: 7px 12px;
    font-size: 0.78rem;
}

.status-bar {
    margin-top: 14px;
}

.status {
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
}

.board-section {
    margin-top: 8px;
}

.coin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    align-items: start;
}

.board-empty {
    order: 100;
    grid-column: 1 / -1;
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.coin-card {
    order: 0;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.coin-card.market-futures {
    border-color: rgba(227, 179, 65, 0.15);
}

.coin-card-exchange-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 6px 14px 5px;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.coin-card-exchange-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 4px;
}

.coin-card-exchange-name {
    min-width: 0;
}

.coin-card.exchange-kc .coin-card-exchange-banner {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.45), rgba(59, 130, 246, 0.15));
    color: #bfdbfe;
}

.coin-card.exchange-hl .coin-card-exchange-banner {
    background: linear-gradient(90deg, rgba(109, 40, 217, 0.55), rgba(168, 85, 247, 0.2));
    color: #e9d5ff;
}

.coin-card > .coin-card-head,
.coin-card > .coin-layers {
    padding-left: 14px;
    padding-right: 14px;
}

.coin-card > .coin-card-head {
    padding-top: 10px;
}

.coin-card > .coin-layers {
    padding-bottom: 12px;
}

.coin-card.exchange-kc {
    border: 1px solid rgba(59, 130, 246, 0.35);
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.12), 0 0 0 1px rgba(59, 130, 246, 0.08) inset;
    background: linear-gradient(165deg, rgba(37, 99, 235, 0.09) 0%, var(--surface) 42%);
}

.coin-card.exchange-hl {
    border: 1px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 4px 24px rgba(109, 40, 217, 0.14), 0 0 0 1px rgba(168, 85, 247, 0.1) inset;
    background: linear-gradient(165deg, rgba(109, 40, 217, 0.12) 0%, var(--surface) 42%);
}

.coin-card.exchange-ast .coin-card-exchange-banner {
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.5), rgba(20, 184, 166, 0.18));
    color: #99f6e4;
}

.coin-card.exchange-ast {
    border: 1px solid rgba(45, 212, 191, 0.38);
    box-shadow: 0 4px 24px rgba(13, 148, 136, 0.12), 0 0 0 1px rgba(45, 212, 191, 0.1) inset;
    background: linear-gradient(165deg, rgba(13, 148, 136, 0.1) 0%, var(--surface) 42%);
}

/* CEX: пять разнесённых по кругу цветов — золото / индиго / оранжевый / магента / лайм */
.coin-card.exchange-bn .coin-card-exchange-banner {
    background: linear-gradient(90deg, rgba(202, 138, 4, 0.58), rgba(234, 179, 8, 0.14));
    color: #fef9c3;
    border-bottom-color: rgba(250, 204, 21, 0.25);
}

.coin-card.exchange-bn {
    border: 1px solid rgba(234, 179, 8, 0.42);
    box-shadow: 0 4px 24px rgba(202, 138, 4, 0.14), 0 0 0 1px rgba(250, 204, 21, 0.1) inset;
    background: linear-gradient(165deg, rgba(202, 138, 4, 0.11) 0%, var(--surface) 42%);
}

.coin-card.exchange-bn .market-tag {
    background: rgba(234, 179, 8, 0.22);
    color: #fde047;
}

.coin-card.exchange-bn.market-futures .market-tag {
    background: rgba(245, 158, 11, 0.28);
    color: #fcd34d;
}

.coin-card.exchange-okx .coin-card-exchange-banner {
    background: linear-gradient(90deg, rgba(67, 56, 202, 0.62), rgba(129, 140, 248, 0.16));
    color: #e0e7ff;
    border-bottom-color: rgba(129, 140, 248, 0.28);
}

.coin-card.exchange-okx {
    border: 1px solid rgba(99, 102, 241, 0.45);
    box-shadow: 0 4px 24px rgba(67, 56, 202, 0.18), 0 0 0 1px rgba(129, 140, 248, 0.12) inset;
    background: linear-gradient(165deg, rgba(67, 56, 202, 0.12) 0%, var(--surface) 42%);
}

.coin-card.exchange-okx .market-tag {
    background: rgba(99, 102, 241, 0.28);
    color: #c7d2fe;
}

.coin-card.exchange-okx.market-futures .market-tag {
    background: rgba(79, 70, 229, 0.32);
    color: #a5b4fc;
}

.coin-card.exchange-by .coin-card-exchange-banner {
    background: linear-gradient(90deg, rgba(234, 88, 12, 0.58), rgba(251, 146, 60, 0.14));
    color: #ffedd5;
    border-bottom-color: rgba(251, 146, 60, 0.28);
}

.coin-card.exchange-by {
    border: 1px solid rgba(249, 115, 22, 0.45);
    box-shadow: 0 4px 24px rgba(234, 88, 12, 0.16), 0 0 0 1px rgba(251, 146, 60, 0.1) inset;
    background: linear-gradient(165deg, rgba(234, 88, 12, 0.1) 0%, var(--surface) 42%);
}

.coin-card.exchange-by .market-tag {
    background: rgba(249, 115, 22, 0.24);
    color: #fdba74;
}

.coin-card.exchange-by.market-futures .market-tag {
    background: rgba(234, 88, 12, 0.3);
    color: #fed7aa;
}

.coin-card.exchange-bg .coin-card-exchange-banner {
    background: linear-gradient(90deg, rgba(190, 24, 93, 0.55), rgba(236, 72, 153, 0.16));
    color: #fce7f3;
    border-bottom-color: rgba(244, 114, 182, 0.28);
}

.coin-card.exchange-bg {
    border: 1px solid rgba(219, 39, 119, 0.42);
    box-shadow: 0 4px 24px rgba(190, 24, 93, 0.14), 0 0 0 1px rgba(244, 114, 182, 0.1) inset;
    background: linear-gradient(165deg, rgba(190, 24, 93, 0.1) 0%, var(--surface) 42%);
}

.coin-card.exchange-bg .market-tag {
    background: rgba(236, 72, 153, 0.24);
    color: #f9a8d4;
}

.coin-card.exchange-bg.market-futures .market-tag {
    background: rgba(219, 39, 119, 0.3);
    color: #fbcfe8;
}

.coin-card.exchange-gt .coin-card-exchange-banner {
    background: linear-gradient(90deg, rgba(77, 124, 15, 0.55), rgba(132, 204, 22, 0.18));
    color: #ecfccb;
    border-bottom-color: rgba(163, 230, 53, 0.28);
}

.coin-card.exchange-gt {
    border: 1px solid rgba(132, 204, 22, 0.42);
    box-shadow: 0 4px 24px rgba(77, 124, 15, 0.14), 0 0 0 1px rgba(163, 230, 53, 0.1) inset;
    background: linear-gradient(165deg, rgba(101, 163, 13, 0.11) 0%, var(--surface) 42%);
}

.coin-card.exchange-gt .market-tag {
    background: rgba(132, 204, 22, 0.22);
    color: #bef264;
}

.coin-card.exchange-gt.market-futures .market-tag {
    background: rgba(101, 163, 13, 0.28);
    color: #d9f99d;
}

.coin-card.exchange-ast.market-futures {
    border-color: rgba(45, 212, 191, 0.35);
}

.coin-card.exchange-hl.market-futures {
    border-color: rgba(168, 85, 247, 0.38);
}

.coin-card.exchange-hl .market-tag {
    background: rgba(168, 85, 247, 0.22);
    color: #e9d5ff;
}

.coin-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.market-tag {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(88, 166, 255, 0.12);
    color: var(--accent);
}

.coin-card.market-futures .market-tag {
    background: rgba(227, 179, 65, 0.12);
    color: var(--gold);
}

.coin-symbol {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.coin-time {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--muted);
    font-family: var(--font-mono);
}

.btn-hide-coin {
    flex-shrink: 0;
    padding: 4px 8px;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-hide-coin:hover {
    color: var(--text);
    background: rgba(248, 81, 73, 0.1);
    border-color: rgba(248, 81, 73, 0.35);
}

.coin-layers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.layer {
    padding: 8px 10px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.layer.bid {
    background: var(--bid-dim);
    border-left: 2px solid var(--bid);
}

.layer.ask {
    background: var(--ask-dim);
    border-left: 2px solid var(--ask);
}

.layer-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    line-height: 1.45;
}

.layer-dot {
    color: var(--muted);
    opacity: 0.55;
    user-select: none;
}

.layer-side {
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.layer.bid .layer-side {
    color: var(--bid);
}

.layer.ask .layer-side {
    color: var(--ask);
}

.layer-pct {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.layer.bid .layer-pct {
    color: rgba(110, 231, 183, 0.95);
}

.layer.ask .layer-pct {
    color: rgba(248, 113, 113, 0.95);
}

.layer-usd {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.layer-price {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Модалка «Скрытые» */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal[hidden] {
    display: none !important;
}

/* Настройки, аккаунт, тарифы — по центру */
.modal--centered {
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#proModal .modal-panel {
    max-width: min(500px, 96vw);
    max-height: min(90vh, 640px);
}

.pro-modal-status {
    min-height: 1.25em;
    padding: 0 16px;
    margin: 0;
}

.modal-panel--account .account-modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.account-modal__section-title {
    margin: 4px 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.account-modal-hint {
    margin: -4px 0 0 !important;
}
.account-telegram-link-block {
    padding: 4px 0;
}
.account-telegram-link-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Сравнение Free / Pro в окне тарифов */
.pro-tiers-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.pro-tier-col {
    padding: 12px 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.82rem;
    line-height: 1.45;
}
.pro-tier-col h3 {
    margin: 0 0 8px;
    font-size: 0.88rem;
    font-weight: 700;
}
.pro-tier--free {
    border-color: rgba(255, 255, 255, 0.08);
}
.pro-tier--pro {
    border-color: rgba(35, 176, 138, 0.35);
    background: linear-gradient(165deg, rgba(35, 176, 138, 0.1), transparent);
}
.pro-tier-list {
    margin: 0;
    padding-left: 1.1em;
    color: var(--muted);
}
.pro-tier-list li {
    margin-bottom: 4px;
}
.pro-tier-list li:last-child {
    margin-bottom: 0;
}
.pro-plans-sep {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pro-plan-row {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}
.pro-plan-row p {
    margin: 0 0 8px;
    font-size: 0.88rem;
    font-weight: 600;
}
.pro-plan-row .settings-hint {
    margin: 0 0 8px;
}
@media (max-width: 480px) {
    .pro-tiers-compare {
        grid-template-columns: 1fr;
    }
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    max-height: min(80vh, 560px);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.modal-desc {
    margin: 0;
    padding: 10px 16px 0;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.45;
}

.hidden-modal-tools {
    padding: 12px 16px 0;
}

.hidden-search-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.hidden-search-input {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.hidden-search-input::placeholder {
    color: var(--muted);
    opacity: 0.85;
}

.hidden-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

.modal-body {
    padding: 12px 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
}

.modal-empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 24px 8px;
}

.hidden-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.hidden-row-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.hidden-row input[type="checkbox"] {
    flex-shrink: 0;
    accent-color: var(--accent);
}

.hidden-exchange-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 3px;
    opacity: 0.95;
}

.hidden-symbol {
    font-weight: 600;
    color: var(--text);
}

.hidden-market {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    flex-shrink: 0;
}

.notification-feed-panel {
    max-width: min(520px, 96vw);
}

.notification-feed-body {
    max-height: min(60vh, 520px);
    overflow-y: auto;
}

.notification-feed-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.notification-feed-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.notification-feed-time {
    font-size: 0.72rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.notification-feed-symbol {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.notification-feed-exchange-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.notification-feed-exchange-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 3px;
    opacity: 0.95;
}

.notification-feed-exchange {
    font-size: 0.78rem;
    color: var(--muted);
}

.notification-feed-density {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 2px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    line-height: 1.35;
}

.notification-feed-density-side {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 4px;
}

.notification-feed-density-label {
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.notification-feed-density-side.bid .notification-feed-density-label,
.notification-feed-density-side.bid .notification-feed-density-pct {
    color: var(--bid);
}

.notification-feed-density-side.ask .notification-feed-density-label,
.notification-feed-density-side.ask .notification-feed-density-pct {
    color: var(--ask);
}

.notification-feed-density-usdt {
    color: var(--text);
    font-weight: 600;
}

.notification-feed-density-sep,
.notification-feed-density-hint {
    color: var(--muted);
    font-size: 0.72rem;
}

.notification-feed-row .btn-hide-coin {
    flex-shrink: 0;
}

.notification-feed-hidden-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    padding: 6px 10px;
    flex-shrink: 0;
}

.settings-panel {
    max-width: min(520px, 96vw);
}

.settings-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-section {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.settings-section-global {
    background: rgba(255, 255, 255, 0.04);
}

.settings-hint {
    margin: 0 0 10px;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--muted);
}

.settings-field-full {
    max-width: none;
    flex: 1 1 100%;
}

.settings-field-full input[type="number"] {
    max-width: 100%;
}

.settings-section-kc {
    background: rgba(59, 130, 246, 0.07);
    border-color: rgba(59, 130, 246, 0.2);
}

.settings-section-hl {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.22);
}

.settings-section-aster {
    background: rgba(20, 184, 166, 0.09);
    border-color: rgba(45, 212, 191, 0.28);
}

.settings-section-bn {
    background: rgba(234, 179, 8, 0.08);
    border-color: rgba(234, 179, 8, 0.32);
}

.settings-section-okx {
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(129, 140, 248, 0.35);
}

.settings-section-by {
    background: rgba(234, 88, 12, 0.09);
    border-color: rgba(249, 115, 22, 0.32);
}

.settings-section-bg {
    background: rgba(219, 39, 119, 0.08);
    border-color: rgba(244, 114, 182, 0.32);
}

.settings-section-gt {
    background: rgba(101, 163, 13, 0.09);
    border-color: rgba(132, 204, 22, 0.32);
}

.settings-section-pro-only {
    opacity: 0.42;
    pointer-events: none;
    user-select: none;
}

.settings-exchange-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.settings-exchange-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 5px;
    opacity: 0.95;
}

.settings-row {
    display: flex;
    margin-top: 8px;
}

.settings-row:first-of-type {
    margin-top: 0;
}

.settings-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 12px;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1 1 140px;
}

.settings-field-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.settings-field input[type="number"] {
    width: 100%;
    max-width: 200px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.settings-sound-block {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.sound-row-chk {
    margin-top: 0;
}

.settings-sound-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.settings-modal-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.modal-foot {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
}

.modal-foot .btn-primary {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(165deg, #388bfd, #1f6feb);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.modal-foot .btn-primary:hover {
    filter: brightness(1.06);
}

/* Статус подписки в шапке */
.sub-badge {
    display: inline-flex;
    align-items: center;
    max-width: 200px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted, #8b949e);
}
.sub-badge--pro {
    border-color: rgba(35, 176, 138, 0.45);
    background: linear-gradient(135deg, rgba(35, 176, 138, 0.18), rgba(15, 80, 60, 0.25));
    color: #3dd4a8;
}
.sub-badge--expired {
    border-color: rgba(210, 153, 34, 0.5);
    color: #e3b341;
    background: rgba(210, 153, 34, 0.08);
}
.pro-sub-active-banner {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(35, 176, 138, 0.35);
    background: linear-gradient(160deg, rgba(35, 176, 138, 0.12), transparent);
    font-size: 0.9rem;
    line-height: 1.45;
}
.pro-sub-active-banner strong {
    color: #5ee9c0;
    font-weight: 600;
}

/* Всплывающие уведомления — правый нижний угол */
.toast-stack {
    position: fixed;
    right: 16px;
    left: auto;
    bottom: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 8px;
    max-width: min(360px, calc(100vw - 32px));
    max-height: min(70vh, calc(100vh - 32px));
    overflow: hidden;
    pointer-events: none;
}

.toast-stack .toast {
    pointer-events: auto;
}

.toast {
    position: relative;
    width: 100%;
    padding: 12px 36px 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    font-size: 0.88rem;
    line-height: 1.35;
    animation: toast-in 0.22s ease-out;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast.toast-density {
    border-right: 3px solid var(--accent);
    border-left: 1px solid var(--border);
    background: linear-gradient(225deg, var(--surface) 0%, rgba(88, 166, 255, 0.06) 100%);
}

.toast.toast-skrin {
    border-left: 3px solid #58a6ff;
    background: linear-gradient(200deg, var(--surface), rgba(88, 166, 255, 0.08));
}
.toast.toast-skrin.toast-skrin--ok {
    border-left-color: #3dd4a8;
    background: linear-gradient(200deg, var(--surface), rgba(35, 176, 138, 0.1));
}
.toast.toast-skrin.toast-skrin--wait {
    border-left-color: #d29922;
    background: linear-gradient(200deg, var(--surface), rgba(210, 153, 34, 0.08));
}
.toast-skrin .toast-line-title {
    font-weight: 600;
    color: var(--text);
}

.toast-line-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 0.92rem;
}

.toast-exchange-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 3px;
    opacity: 0.95;
}

.toast-exchange {
    font-weight: 600;
    color: var(--text);
}

.toast-sep {
    color: var(--muted);
    user-select: none;
}

.toast-line-title .toast-symbol {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.02em;
    margin-bottom: 0;
}

.toast-hint {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--muted);
}

.toast-close {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.toast-meta {
    font-size: 0.78rem;
    color: var(--muted);
}

.notification-feed-row-raskor .notification-feed-raskor-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
}

.notification-feed-row-raskor .notification-feed-raskor-msg {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.35;
}

/* Вкладки */
/* Pro: вкладка Расскор и кнопка ленты без подписки */
.app-tab-pro-locked {
    opacity: 0.6;
    cursor: not-allowed;
}
.toolbar-btn-locked {
    opacity: 0.55;
}

.app-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: fit-content;
    max-width: 100%;
}

.app-tab {
    padding: 10px 18px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.app-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.app-tab-active {
    color: var(--text);
    background: rgba(88, 166, 255, 0.14);
    box-shadow: 0 0 0 1px rgba(88, 166, 255, 0.2);
}

.view-panel[hidden] {
    display: none !important;
}

/* Расскор */
.raskor-section {
    margin-top: 8px;
}

.raskor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.raskor-poll-hint {
    font-size: 0.75rem;
    color: var(--muted);
    font-family: var(--font-mono);
}

.raskor-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.raskor-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.raskor-table th,
.raskor-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.raskor-table th {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 700;
}

.raskor-table tbody tr:last-child td {
    border-bottom: none;
}

.raskor-leg-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    padding: 8px 10px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
    color: var(--accent);
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.25);
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.35;
}

.raskor-leg-btn .raskor-ex-icon {
    flex-shrink: 0;
    pointer-events: none;
    object-fit: contain;
    border-radius: 4px;
    opacity: 0.95;
}

.raskor-leg-btn-text {
    min-width: 0;
    flex: 1;
}

.raskor-leg-btn:hover {
    background: rgba(88, 166, 255, 0.14);
}

.raskor-leg-btn.raskor-leg-empty {
    color: var(--muted);
    border-style: dashed;
    background: transparent;
}

.raskor-price-live {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
}

.raskor-threshold-input {
    width: 100px;
    padding: 8px 10px;
}

.raskor-spread-live {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--gold);
}

.raskor-sound-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.raskor-sound-block .sound-select {
    max-width: 100%;
}

.raskor-row-delete {
    margin-top: 8px;
    padding: 4px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}

.raskor-row-delete:hover {
    color: #f85149;
    border-color: rgba(248, 81, 73, 0.4);
}

.raskor-empty {
    margin: 0;
    padding: 24px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
}

.raskor-empty[hidden] {
    display: none !important;
}

/* Модалка выбора инструмента */
.raskor-picker-panel {
    max-width: min(920px, 96vw);
    max-height: min(85vh, 720px);
}

.raskor-picker-body {
    overflow: auto;
}

.raskor-search-label {
    display: block;
    margin-bottom: 12px;
}

.raskor-search-input {
    width: 100%;
    max-width: 320px;
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.raskor-picker-status {
    min-height: 1.25rem;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: var(--muted);
}

.raskor-base-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.raskor-base-chip {
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.raskor-base-chip:hover,
.raskor-base-chip.raskor-base-chip-active {
    border-color: var(--accent);
    background: rgba(88, 166, 255, 0.1);
}

.raskor-picker-grid-wrap {
    overflow: auto;
}

.raskor-picker-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.raskor-picker-grid th,
.raskor-picker-grid td {
    padding: 8px 10px;
    border: 1px solid var(--border);
    text-align: left;
}

.raskor-picker-grid th {
    background: var(--surface2);
    color: var(--muted);
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.raskor-picker-cell-btn {
    width: 100%;
    min-height: 36px;
    padding: 6px 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-align: center;
    color: var(--text);
    background: rgba(63, 185, 80, 0.08);
    border: 1px solid rgba(63, 185, 80, 0.25);
    border-radius: 6px;
    cursor: pointer;
}

.raskor-picker-cell-btn:hover:not(:disabled) {
    background: rgba(63, 185, 80, 0.16);
}

.raskor-picker-cell-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.raskor-ex-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.raskor-ex-name .raskor-ex-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
    opacity: 0.95;
}

.raskor-ex-name-text {
    min-width: 0;
}

.raskor-toast-legs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 8px;
    line-height: 1.45;
}

.raskor-toast-leg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

.raskor-toast-leg .raskor-ex-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 3px;
}

.raskor-toast-leg-text {
    min-width: 0;
    word-break: break-word;
}

.raskor-toast-sep {
    color: var(--muted);
    flex-shrink: 0;
}

.raskor-toast-pct {
    font-size: 0.88rem;
}

.toast.toast-raskor {
    border-right: 3px solid var(--gold);
    border-left: 1px solid var(--border);
    background: linear-gradient(225deg, var(--surface) 0%, rgba(227, 179, 65, 0.08) 100%);
}

.toast-raskor .toast-hint {
    color: var(--gold);
}

/* Разметка до входа: без токена на <html> класс .skrin-auth-locked (app.js) */
#authGate {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 100% 60% at 50% -15%, rgba(88, 166, 255, 0.12), transparent),
        radial-gradient(ellipse 50% 40% at 100% 30%, rgba(35, 176, 138, 0.06), transparent);
    overflow-y: auto;
}

html.skrin-auth-locked #appRoot {
    display: none !important;
}

html.skrin-auth-locked #authGate {
    display: flex;
}

.auth-gate__panel {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px 24px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.auth-gate__title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.auth-gate__subtitle {
    margin: 0 0 16px;
    font-size: 0.88rem;
    color: var(--muted);
    min-height: 1.2em;
}

.auth-gate__error[hidden] {
    display: none;
}

.auth-gate__error {
    margin: 0 0 16px;
    padding: 10px 12px;
    font-size: 0.86rem;
    color: #f85149;
    background: var(--ask-dim);
    border-radius: 10px;
    border: 1px solid rgba(248, 81, 73, 0.25);
}

.auth-gate__section form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
}

.auth-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-sans);
}

.auth-input:focus {
    outline: none;
    border-color: rgba(88, 166, 255, 0.45);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.12);
}

.auth-gate__switch {
    margin: 16px 0 0;
    font-size: 0.86rem;
    color: var(--muted);
}

.auth-gate__hint {
    margin: 12px 0 0;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.45;
}

.auth-gate__resend {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.86rem;
    color: var(--muted);
}

.auth-user-bar {
    font-size: 0.78rem;
    color: var(--muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    align-self: center;
}

@media (max-width: 480px) {
    .coin-grid {
        grid-template-columns: 1fr;
    }

    .toast-stack {
        right: 10px;
        left: auto;
        bottom: 10px;
        max-width: calc(100vw - 20px);
    }
}
