:root {
    --bg: #eef2f8;
    --text: #0f1218;
    --muted: #5b6472;
    --accent: #1c4eff;
    --accent-2: #01c9ff;
    --ok: #2fcf8a;
    --warn: #ffd166;
    --err: #ff5d5d;
    --radius: 22px;
    --radius-sm: 16px;

    --glass: rgba(255, 255, 255, 0.55);
    --glass-strong: rgba(255, 255, 255, 0.62);
    --glass-edge: rgba(255, 255, 255, 0.7);
    --glass-blur: blur(22px) saturate(180%);
    --glass-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 1px rgba(255, 255, 255, 0.25),
        0 1px 2px rgba(15, 18, 24, 0.04),
        0 8px 28px rgba(15, 18, 24, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, system-ui, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

/* Colored backdrop so the glass has something to refract */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(40vmax 40vmax at 0% 0%, rgba(1, 201, 255, 0.35), transparent 60%),
        radial-gradient(45vmax 45vmax at 100% 20%, rgba(28, 78, 255, 0.28), transparent 60%),
        radial-gradient(40vmax 40vmax at 30% 100%, rgba(160, 110, 255, 0.22), transparent 60%),
        var(--bg);
}

a { color: inherit; text-decoration: none; }

/* Older WebKit/Chromium draw focus outlines and tap highlights as rectangles, ignoring border-radius */
a, button, input, label, summary {
    -webkit-tap-highlight-color: transparent;
}
a:focus, button:focus, input:focus { outline: none; }
a:focus-visible, button:focus-visible {
    outline: 2px solid rgba(28, 78, 255, 0.55);
    outline-offset: 2px;
}
button {
    -webkit-appearance: none;
    appearance: none;
}

/* No backdrop-filter on in-flow rounded blocks: mobile WebKit/Chromium render it with square corners.
   The page backdrop is a soft gradient anyway, so a denser translucent fill looks the same. */
.glass,
.balance-bar,
.resource-card,
.card,
.sheet {
    background: var(--glass);
    border: 1px solid var(--glass-edge);
    box-shadow: var(--glass-shadow);
    background-clip: padding-box;
}
.sheet {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

/* Container */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 12px 14px 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-label,
.wd-step-title {
    align-self: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.1px;
    color: var(--text);
}
.section-label {
    margin-bottom: -2px;
}

/* Balance pill */
/* ширину ряда задаёт только баланс — он всегда по центру, кнопка статистики висит слева */
.balance-row {
    position: relative;
    align-self: center;
    margin-bottom: 14px;
}
.balance-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 24px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s;
}
.balance-bar:active { transform: scale(0.96); }
.balance-stat {
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--accent);
    background: var(--glass);
    border: 1px solid var(--glass-edge);
    box-shadow: var(--glass-shadow);
    background-clip: padding-box;
    transition: transform 0.2s;
}
.balance-stat:active { transform: translateY(-50%) scale(0.94); }
/* кнопка обновления — зеркально справа от баланса */
.balance-refresh {
    right: auto;
    left: calc(100% + 8px);
    padding: 0;
    font: inherit;
    cursor: pointer;
}
.balance-refresh svg { transition: transform 0.2s; }
.balance-refresh.loading svg { animation: balance-spin 0.6s linear infinite; }
@keyframes balance-spin { to { transform: rotate(360deg); } }
.stat-toast {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    z-index: 5;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(15, 18, 24, 0.5);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, -4px);
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}
.stat-toast.show { opacity: 1; transform: translate(-50%, 0); }
.balance-value {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.3px;
}
.balance-hold {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    opacity: 0.7;
}

/* Balance popup — attached to top edge */
.sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: rgba(12, 16, 24, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s, visibility 0s linear 0.4s;
}
.sheet-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.25s, visibility 0s;
}
.sheet {
    width: calc(100% - 20px);
    max-width: 460px;
    height: 33vh;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    padding: 18px 16px 10px;
    border-top: none;
    border-radius: 0 0 30px 30px;
    background: var(--glass-strong);
    transform: translateY(-105%);
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.25, 1.05);
}
.sheet-overlay.open .sheet { transform: translateY(0); }
.sheet { position: relative; }
.sheet-logout-form {
    position: absolute;
    top: 12px;
    right: 12px;
}
.sheet-logout {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--glass-edge);
    background: rgba(255, 93, 93, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 12px rgba(255, 93, 93, 0.15);
    color: var(--err);
    cursor: pointer;
    transition: transform 0.15s;
}
.sheet-logout:active { transform: scale(0.9); }
.sheet-user {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #000;
}
.sheet-balance {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.sheet-balance-value {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.6px;
}
/* копейки в балансе — меньше и прозрачнее */
.money-frac {
    font-size: 0.72em;
    opacity: 0.45;
}
/* удержание и так серое — копейки только меньше, без доп. прозрачности */
.balance-hold .money-frac,
.sheet-hold .money-frac { opacity: 1; }
.sheet-hold {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    opacity: 0.7;
}
.hold-more {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 600;
    font-style: italic;
    color: var(--accent);
}
.sheet-actions {
    display: flex;
    gap: 10px;
}
.sheet-handle {
    width: 38px;
    height: 5px;
    margin: 12px auto 0;
    border-radius: 3px;
    background: rgba(15, 18, 24, 0.15);
}
.btn-withdraw,
.btn-topup {
    flex: 1;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.15s;
}
.btn-withdraw:active,
.btn-topup:active { transform: scale(0.96); }
.btn-withdraw {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--glass-edge);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 12px rgba(15, 18, 24, 0.06);
    color: var(--text);
}
.btn-topup {
    background: linear-gradient(180deg, rgba(1, 201, 255, 0.92), rgba(1, 170, 240, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 6px 18px rgba(1, 201, 255, 0.35);
    color: #fff;
}

/* Resource card */
.resource-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: block;
    padding: 14px 16px;
    border-radius: var(--radius);
    transition: transform 0.2s;
}
.resource-card > *,
.rd-hero > * { position: relative; z-index: 1; }
/* Фильтры ресурсов */
.resource-card[hidden],
.rf[hidden],
.rf-chip[hidden],
.rf-empty[hidden],
.rf-ico[hidden] { display: none; }
.rf {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.rf-chips {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}
.rf-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 36px;
    padding: 0;
    border-radius: 11px;
    border: 1px solid var(--glass-edge);
    background: var(--glass);
    box-shadow: var(--glass-shadow);
    background-clip: padding-box;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.rf-chip:active { transform: scale(0.95); }
.rf-chip[aria-pressed="true"] {
    background: rgba(28, 78, 255, 0.12);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}
/* крестик висит справа от ряда и не сдвигает кнопки */
.rf-clear {
    position: absolute;
    left: calc(100% + 6px);
    top: 0;
    width: 36px;
    color: var(--err);
    opacity: 0.6;
}
.rf-clear:active { transform: scale(0.95); opacity: 0.8; }
.rf-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}
.rf-empty { padding: 28px 16px; }
.rf-ico { display: inline-flex; }
/* подсказка под кнопками поверх счётчика */
.rf-toast { top: calc(100% + 26px); }

/* обёртка списка — отступы как у .container, чтобы карточки стояли так же */
.resource-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Включён: пять гладких вертикальных волн на разных «линиях» от правого края.
   Полупрозрачные заливки накладываются и сами складываются в неровный градиент к краю;
   каждая качается вверх-вниз (и чуть вбок) в своём темпе. */
.resource-card.on::before,
.rd-hero.on::before,
.resource-card.on::after,
.rd-hero.on::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: -60px;
    bottom: -60px;
    right: -14px;
    width: 220px;
    pointer-events: none;
    background-repeat: repeat-y;
}
.resource-card.on::before,
.rd-hero.on::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='37' height='84' viewBox='0 0 37 84'%3E%3Cpath d='M9 0 C18 10.5,18 31.5,9 42 C0 52.5,0 73.5,9 84 L37 84 L37 0Z' fill='%232fcf8a' fill-opacity='0.13'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='106' height='150' viewBox='0 0 106 150'%3E%3Cpath d='M14 0 C28 18.75,28 56.25,14 75 C0 93.75,0 131.25,14 150 L106 150 L106 0Z' fill='%232fcf8a' fill-opacity='0.09'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='188' height='170' viewBox='0 0 188 170'%3E%3Cpath d='M16 0 C32 21.25,32 63.75,16 85 C0 106.25,0 148.75,16 170 L188 170 L188 0Z' fill='%232fcf8a' fill-opacity='0.06'/%3E%3C/svg%3E");
    background-size: 37px 84px, 106px 150px, 188px 170px;
    background-position: right 0 top 0, right 0 top 0, right 0 top 0;
    animation: rc-waves-a 6.5s ease-in-out infinite alternate;
}
.resource-card.on::after,
.rd-hero.on::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='118' viewBox='0 0 70 118'%3E%3Cpath d='M12 0 C24 14.75,24 44.25,12 59 C0 73.75,0 103.25,12 118 L70 118 L70 0Z' fill='%232fcf8a' fill-opacity='0.11'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='141' height='104' viewBox='0 0 141 104'%3E%3Cpath d='M11 0 C22 13,22 39,11 52 C0 65,0 91,11 104 L141 104 L141 0Z' fill='%232fcf8a' fill-opacity='0.075'/%3E%3C/svg%3E");
    background-size: 70px 118px, 141px 104px;
    background-position: right 0 top 0, right 0 top 0;
    animation: rc-waves-b 4.8s ease-in-out infinite alternate;
}
@keyframes rc-waves-a {
    0%   { background-position: right 0 top 0,      right 4px top -30px, right 0 top 12px; }
    50%  { background-position: right 6px top 26px, right 0 top 18px,    right 9px top -40px; }
    100% { background-position: right 2px top 48px, right 8px top -64px, right 3px top -90px; }
}
@keyframes rc-waves-b {
    0%   { background-position: right 3px top -12px, right 0 top 20px; }
    50%  { background-position: right 0 top -50px,   right 7px top -16px; }
    100% { background-position: right 6px top -78px, right 2px top 44px; }
}
/* разные начала у соседних карточек */
.resource-card.on:nth-of-type(3n+1)::after { animation-delay: -1.7s; }
.resource-card.on:nth-of-type(3n+2)::after { animation-delay: -3.3s; }
.resource-card.on:nth-of-type(2n)::before  { animation-delay: -2.6s; }
.resource-card.on:nth-of-type(3n)::before  { animation-delay: -4.1s; }
@media (prefers-reduced-motion: reduce) {
.resource-card.on::before,
.rd-hero.on::before,
.resource-card.on::after,
.rd-hero.on::after { animation: none; }
}
.resource-card:active { transform: scale(0.98); }
.resource-card.moderation,
.resource-card.ban {
    background:
        linear-gradient(to left, rgb(var(--tint) / 0.22), rgb(var(--tint) / 0) 60%),
        var(--glass);
}
.resource-card.on { --tint: 47 207 138; }
.resource-card.moderation { --tint: 28 78 255; }
.resource-card.ban { --tint: 255 93 93; }
.rc-warn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    border-radius: 50%;
    background: #f5a524;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    vertical-align: 2px;
}
.rc-flag {
    font-size: 12px;
    font-weight: 600;
}
.rc-flag.ban { color: var(--err); }
.rc-flag.moderation { color: var(--accent); }

.rc-top,
.rc-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.rc-top { margin-bottom: 10px; align-items: flex-start; }
.rc-top .rc-progress { line-height: 1.4; }
.rc-top .rc-type + .rc-title { margin-left: -2px; }
.rc-type {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--accent);
    background: rgba(28, 78, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
.rc-type.bot { color: #7a4dff; background: rgba(122, 77, 255, 0.1); }
.rc-type.link { color: var(--muted); background: rgba(15, 18, 24, 0.06); }
.rc-title {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}
.rc-title > span { display: block; max-width: 100%; }
.rc-link {
    margin-top: 1px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--muted);
    opacity: 0.75;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rc-link-param { font-weight: 700; }
.rc-name {
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rc-progress {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.rc-progress-limit {
    font-weight: 500;
    color: var(--muted);
}
.rc-mode {
    --kind: 28 78 255;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: rgb(var(--kind));
    background: rgb(var(--kind) / 0.1);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
.rc-mode.max { --kind: 138 92 255; }
.rc-mode.boost { --kind: 240 84 40; }
.rc-mode.views { --kind: 0 160 220; }
.rc-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.rc-price {
    position: relative;
    top: -3px;
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Section header (create/detail pages) */
.resources-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.resources-title {
    font-size: 18px;
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--glass-edge);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 8px rgba(15, 18, 24, 0.05);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s;
}
.btn:active { transform: scale(0.96); }
.btn-primary,
.btn-primary-action {
    background: linear-gradient(180deg, rgba(44, 98, 255, 0.95), rgba(28, 78, 255, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 18px rgba(28, 78, 255, 0.3);
    color: #fff;
}
.btn-primary-action {
    display: inline-flex;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}
.btn-danger { color: var(--err); }
.btn-ok { color: #13a463; }
.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}
.form-group .hint {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}
.form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 1px 2px rgba(15, 18, 24, 0.05);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}
.form-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.85);
}
select.form-input {
    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='%235b6472' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Resource detail */
.rd-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}
.rd-hero.moderation,
.rd-hero.ban {
    background:
        linear-gradient(to left, rgb(var(--tint) / 0.22), rgb(var(--tint) / 0) 60%),
        var(--glass);
}
.rd-hero.on { --tint: 47 207 138; }
.rd-hero.moderation { --tint: 28 78 255; }
.rd-hero.ban { --tint: 255 93 93; }
.rd-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rd-price {
    font-size: 17px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.rd-progress {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}
.rd-percent {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1;
}
.rd-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.rd-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(15, 18, 24, 0.07);
    overflow: hidden;
}
.rd-bar span {
    display: block;
    height: 100%;
    min-width: 6px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
}
.rd-hero.on .rd-bar span { background: linear-gradient(90deg, #3ee49a, var(--ok)); }
.rd-link {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--accent);
}
.rd-resource-id {
    margin-top: -6px;
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    user-select: all;
}
.rd-stat {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid var(--glass-edge);
    box-shadow: var(--glass-shadow);
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    transition: transform 0.15s;
}
.rd-stat:active { transform: scale(0.96); }
.rd-delete {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    border: 1px solid rgba(255, 93, 93, 0.3);
    border-radius: 999px;
    background: rgba(255, 93, 93, 0.08);
    color: var(--err);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

/* Settings list */
.card.set-list {
    padding: 4px 16px;
    margin-bottom: 8px;
}
.set-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border: none;
    border-bottom: 1px solid rgba(15, 18, 24, 0.06);
    background: none;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.set-row:last-child { border-bottom: none; }
.set-row:active { opacity: 0.6; }
.set-row b {
    min-width: 0;
    font-weight: 600;
    color: var(--muted);
}
.set-value-link {
    min-width: 0;
    font-weight: 600;
    color: var(--accent);
}
.modal-lead {
    margin: -6px 0 12px;
    text-align: center;
}
.set-ellipsis {
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Centered settings modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(12, 16, 24, 0.3);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s, visibility 0s linear 0.2s;
}
/* Blur only while open: hidden full-screen backdrop layers break rounded glass corners in WebKit */
.modal-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.2s, visibility 0s;
}
.modal {
    width: 100%;
    max-width: 400px;
    padding: 20px 18px 18px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-edge);
    box-shadow: var(--shadow-lg);
    transform: scale(0.94);
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-title {
    margin-bottom: 14px;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
}
.modal-save { margin-top: 14px; }
.mode-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mode-option {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--glass-edge);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.55);
    color: var(--text);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.mode-option.active {
    border-color: var(--accent);
    background: rgba(28, 78, 255, 0.08);
    box-shadow: inset 0 0 0 1px var(--accent);
}
.mode-option:active { transform: scale(0.98); }
.mode-name {
    font-size: 15px;
    font-weight: 700;
}
.mode-option.active .mode-name { color: var(--accent); }
.mode-desc {
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--muted);
}
.mode-req {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    opacity: 0.75;
}
.mode-req::before { content: "Нужно: "; font-weight: 500; }
.mode-more {
    margin: -4px 0 2px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}
.modal { max-height: calc(100vh - 32px); overflow-y: auto; }

/* Filters */
.set-switch { cursor: default; }
.set-switch:active { opacity: 1; }
.set-switch .switch { flex-shrink: 0; }
.set-note-out { margin: -2px 6px 6px; text-align: center; }
.price-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.price-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span {
    display: block;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid var(--glass-edge);
    background: rgba(255, 255, 255, 0.55);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.check-chip input:checked + span {
    border-color: var(--accent);
    background: rgba(28, 78, 255, 0.1);
    color: var(--accent);
}
.geo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 40vh;
    margin-top: 12px;
    overflow-y: auto;
}
.geo-list[hidden] { display: none; }

.cat-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 50vh;
    overflow-y: auto;
}
.cat-item input { position: absolute; opacity: 0; pointer-events: none; }
.cat-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px 10px 40px;
    position: relative;
    border-radius: 14px;
    border: 1px solid var(--glass-edge);
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
}
.cat-body::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 5px;
    border: 1.5px solid rgba(15, 18, 24, 0.25);
    background: #fff;
}
.cat-item input:checked + .cat-body {
    border-color: var(--accent);
    background: rgba(28, 78, 255, 0.07);
}
.cat-item input:checked + .cat-body::before {
    border-color: var(--accent);
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.cat-name {
    font-size: 14px;
    font-weight: 700;
}
.cat-group {
    margin: 6px 4px 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--muted);
}
.cat-group:first-child { margin-top: 0; }

/* Inline segmented buttons inside a settings row */
.set-inline-row { cursor: default; }
.set-inline-row:active { opacity: 1; }
.seg-inline {
    display: flex;
    flex-shrink: 0;
    gap: 2px;
    padding: 3px;
    border-radius: 12px;
    background: rgba(15, 18, 24, 0.06);
}
.seg-inline form { display: contents; }
.seg-btn {
    min-width: 44px;
    padding: 6px 10px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.seg-btn.active {
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 4px rgba(15, 18, 24, 0.12);
}
.cat-desc {
    font-size: 12px;
    color: var(--muted);
}

/* Toast */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 200;
    max-width: calc(100% - 32px);
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(20, 23, 28, 0.86);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 8px 24px rgba(15, 18, 24, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 12px);
    transition: opacity 0.2s, transform 0.25s, visibility 0s linear 0.25s;
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity 0.2s, transform 0.25s, visibility 0s;
}
.toast.error { background: rgba(225, 60, 60, 0.92); }
.toast-sub {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
}
.toast:has(.toast-sub) { border-radius: 18px; }

/* Confirm dialog */
.modal.confirm { max-width: 320px; text-align: center; }
.confirm-text {
    margin: -4px 0 18px;
    font-size: 14px;
    color: var(--muted);
}
.confirm-actions {
    display: flex;
    gap: 10px;
}
.confirm-cancel,
.confirm-danger {
    flex: 1;
    height: 48px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s;
}
.confirm-cancel:active,
.confirm-danger:active { transform: scale(0.96); }
.confirm-cancel {
    border: 1px solid var(--glass-edge);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text);
}
.confirm-danger {
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, #ff7a6b, var(--err));
    box-shadow: 0 6px 18px rgba(255, 93, 93, 0.3);
    color: #fff;
}
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chip {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--glass-edge);
    background: rgba(255, 255, 255, 0.55);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.chip.active {
    border-color: var(--accent);
    background: rgba(28, 78, 255, 0.1);
    color: var(--accent);
}
.set-note {
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}
.set-note-block:first-child { margin-top: 0; }
.set-sub {
    margin-left: 4px;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.7;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}
.price-grid .chip {
    padding: 8px 0;
    font-size: 13px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.segmented {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    padding: 3px;
    border-radius: 12px;
    background: rgba(15, 18, 24, 0.06);
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
    display: block;
    padding: 7px 0;
    border-radius: 9px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.segmented input:checked + span {
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 4px rgba(15, 18, 24, 0.12);
}
.limit-hint { margin: 8px 0 10px; }

.limit-range {
    --fill: 0%;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    margin: 18px 0 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent)) 0 / var(--fill) 100% no-repeat,
                rgba(15, 18, 24, 0.1);
    outline: none;
}
.limit-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(15, 18, 24, 0.08);
    box-shadow: 0 2px 8px rgba(15, 18, 24, 0.22);
    cursor: pointer;
}
.limit-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(15, 18, 24, 0.08);
    box-shadow: 0 2px 8px rgba(15, 18, 24, 0.22);
    cursor: pointer;
}
.limit-scale {
    position: relative;
    height: 14px;
    font-size: 11px;
    color: var(--muted);
}
.limit-scale span { position: absolute; top: 0; }
.limit-scale span:nth-child(1) { left: 0; }
.limit-scale span:nth-child(2) { left: 71.2%; transform: translateX(-50%); }
.limit-scale span:nth-child(3) { right: 0; }

/* Card */
.card {
    padding: 18px;
    border-radius: var(--radius);
}

/* Error */
.error-block {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 93, 93, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: var(--err);
    font-size: 14px;
    font-weight: 600;
}

/* Empty state */
.empty-state {
    padding: 48px 16px;
    text-align: center;
    color: var(--muted);
}
.empty-state p {
    margin-bottom: 14px;
    font-size: 15px;
}

/* Withdraw */
.wd-free {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 0 4px;
}
.wd-free-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    opacity: 0.7;
}
.wd-free-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.4px;
}
.wd-nets {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wd-net input { position: absolute; opacity: 0; pointer-events: none; }
.wd-net-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.wd-net input:checked + .wd-net-body {
    border-color: var(--accent);
    background: rgba(28, 78, 255, 0.08);
    box-shadow: inset 0 0 0 1px var(--accent);
}
.wd-net-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.wd-net-com {
    font-size: 12px;
    color: var(--muted);
}
.wd-amount {
    position: relative;
}
.wd-amount .form-input { padding-right: 76px; }
.wd-max {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    border: none;
    border-radius: 999px;
    background: rgba(28, 78, 255, 0.1);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}
.wd-steps {
    display: flex;
    flex-direction: column;
}
.wd-step {
    max-height: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.25s ease,
                margin-top 0.3s ease, padding 0.3s ease;
}
.card.wd-step { border-width: 0; }
.card.wd-step:not(.open) { box-shadow: none; }
.wd-step.open {
    max-height: 600px;
    margin-top: 10px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.card.wd-step.open {
    padding-top: 16px;
    padding-bottom: 16px;
    border-width: 1px;
}
.wd-step:first-child.open { margin-top: 0; }
#stepSubmit.open { overflow: visible; margin-top: 14px; }
.wd-submit {
    width: 100%;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 8px 22px rgba(28, 78, 255, 0.28);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}
.wd-submit:active { transform: scale(0.97); }
.wd-submit:disabled { opacity: 0.6; }
.wd-step-title {
    display: block;
    margin-bottom: 10px;
}
.wd-limits {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}
.wd-limit-min {
    color: var(--err);
    font-weight: 600;
}
.form-input.invalid,
.form-input.invalid:focus {
    border-color: var(--err);
    color: var(--err);
    background: rgba(255, 93, 93, 0.08);
}
.wd-address {
    padding: 12px 10px;
    font-size: 11px;
    letter-spacing: -0.1px;
}
.wd-amount-error {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--err);
}
.form-input::placeholder {
    color: var(--muted);
    opacity: 0.45;
}

/* Footer */
.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 7px 16px calc(7px + env(safe-area-inset-bottom));
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    background:
        linear-gradient(90deg,
            rgba(1, 201, 255, 0.14),
            rgba(28, 78, 255, 0.10) 50%,
            rgba(160, 110, 255, 0.14)),
        rgba(255, 255, 255, 0.5);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(1, 201, 255, 0),
        rgba(1, 201, 255, 0.7) 20%,
        rgba(28, 78, 255, 0.7) 50%,
        rgba(160, 110, 255, 0.7) 80%,
        rgba(160, 110, 255, 0));
}
body.has-footer {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
.site-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
/* Top bar (inner pages) */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(90deg,
            rgba(1, 201, 255, 0.14),
            rgba(28, 78, 255, 0.10) 50%,
            rgba(160, 110, 255, 0.14)),
        rgba(255, 255, 255, 0.5);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.8);
}
.topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(1, 201, 255, 0),
        rgba(1, 201, 255, 0.7) 20%,
        rgba(28, 78, 255, 0.7) 50%,
        rgba(160, 110, 255, 0.7) 80%,
        rgba(160, 110, 255, 0));
}
.topbar-back {
    position: absolute;
    left: 12px;
    bottom: 8px;
    width: 52px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid var(--glass-edge);
    box-shadow: var(--glass-shadow);
    color: var(--text);
    transition: transform 0.15s;
}
.topbar-back:active { transform: scale(0.94); }
.topbar-right {
    position: absolute;
    right: 12px;
    bottom: 8px;
    height: 40px;
    display: flex;
    align-items: center;
}
.topbar-flag {
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.topbar-flag.ban { color: var(--err); background: rgba(255, 93, 93, 0.12); }
.topbar-flag.moderation { color: var(--accent); background: rgba(28, 78, 255, 0.1); }

/* iOS-style switch */
.switch {
    position: relative;
    width: 52px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--glass-edge);
    border-radius: 999px;
    background: rgba(120, 128, 140, 0.28);
    box-shadow: inset 0 1px 3px rgba(15, 18, 24, 0.12);
    cursor: pointer;
    transition: background 0.25s;
}
.switch.on {
    background: linear-gradient(135deg, #3ee49a, var(--ok));
    box-shadow: inset 0 1px 2px rgba(15, 18, 24, 0.08), 0 4px 14px rgba(47, 207, 138, 0.35);
}
.switch-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 18, 24, 0.22);
    transition: transform 0.25s cubic-bezier(0.3, 1.3, 0.5, 1);
}
.switch.on .switch-knob { transform: translateX(20px); }
.switch:disabled { opacity: 0.6; }
.switch-sm { width: 42px; height: 26px; flex-shrink: 0; }
.switch-sm .switch-knob { width: 20px; height: 20px; }
.switch-sm.on .switch-knob { transform: translateX(16px); }
.rc-switch { display: inline-block; -webkit-tap-highlight-color: transparent; }
.rc-switch.busy { opacity: 0.7; pointer-events: none; }

.topbar-title {
    max-width: calc(100% - 150px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 700;
}
body.has-topbar { padding-top: calc(56px + env(safe-area-inset-top)); }
.site-footer a.footer-main {
    display: inline-block;
    padding: 7px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid var(--glass-edge);
    box-shadow: var(--glass-shadow);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    transition: transform 0.15s;
}
.site-footer a.footer-main b { color: var(--accent); }
.site-footer a.footer-main:active { transform: scale(0.96); }
.site-footer a.footer-sub {
    padding: 2px 10px;
    font-size: 10px;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.35;
}
.site-footer a.footer-sub b { color: var(--accent); font-weight: 600; }
.site-footer a {
    color: var(--accent);
    font-weight: 600;
}
.wd-full { width: 100%; height: 50px; font-size: 15px; }
.wd-secondary { margin-top: 8px; }
.wd-title {
    margin-bottom: 14px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}
.wd-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
}
.wd-summary > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 2px;
    border-bottom: 1px solid rgba(15, 18, 24, 0.06);
    font-size: 14px;
}
.wd-summary > div:last-child { border-bottom: none; }
.wd-summary span { color: var(--muted); }
.wd-summary b { text-align: right; }
.wd-addr b {
    min-width: 0;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
    word-break: break-all;
}
.wd-result { text-align: center; }
.wd-result-icon {
    width: 52px;
    height: 52px;
    margin: 4px auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(47, 207, 138, 0.18);
    color: #13a463;
    font-size: 24px;
    font-weight: 800;
}
.wd-result-title {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
}
.wd-result .wd-summary { text-align: left; }
.wd-note {
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--muted);
}


/* Login */
.login-page .container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login {
    width: 100%;
    max-width: 380px;
    padding: 28px 22px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: center;
}
.login-logo {
    display: block;
    width: 200px;
    max-width: 70%;
    height: auto;
    margin: 8px auto 12px;
}
.login-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.login-text { color: var(--muted); font-size: 15px; }
.login-btn { width: 100%; padding: 14px 18px; font-size: 16px; }
.login-hint { color: var(--muted); font-size: 13px; }


/* Deposit */
.dp-title {
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
}
.dp-note {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}
.dp-note b { color: var(--text); }
.dp-field { margin-top: 14px; }
.dp-field-label {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.dp-only {
    color: var(--err);
    font-weight: 800;
}
.dp-copy {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 10px 12px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.75);
    color: var(--text);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.dp-copy:active { transform: scale(0.98); }
.dp-copy.copied {
    border-color: var(--accent);
    background: rgba(28, 78, 255, 0.08);
}
.dp-copy-value {
    flex: 1;
    min-width: 0;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 600;
}
.dp-fit {
    white-space: nowrap;
    overflow: hidden;
    letter-spacing: -0.2px;
}
.dp-copy-value.dp-amount {
    font-size: 20px;
    font-weight: 800;
}
.dp-copy-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(28, 78, 255, 0.1) no-repeat center / 16px
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c4eff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1'/%3E%3C/svg%3E");
}
.dp-copy.copied .dp-copy-icon {
    background-color: rgba(47, 207, 138, 0.18);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2313a463' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
}
.dp-warn {
    margin: 12px 0 4px;
    font-size: 12px;
    color: var(--err);
    line-height: 1.4;
}
.dp-loading {
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}
#stepAddress.open { margin-top: 10px; overflow: visible; }
.dp-amount-changed { color: var(--err); }
.dp-aml {
    display: block;
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
}

/* Создание ресурса */
.rc-hint {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
    text-align: center;
}
.rc-hint[hidden],
.rc-wait[hidden],
#rcError[hidden] { display: none; }
#rcError { margin-bottom: 10px; }
.rc-wait {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
}
.rc-rules {
    margin-top: 16px;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}
.rc-rules summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    list-style: none;
}
.rc-rules summary::-webkit-details-marker { display: none; }
.rc-rules summary::after { content: '›'; display: inline-block; margin-left: 8px; transition: transform 0.2s; }
.rc-rules[open] summary::after { transform: rotate(90deg); }
.rc-rules p { margin-top: 10px; }
.rc-rules p b { color: var(--text); }
.rc-rules ul { margin: 4px 0 0 18px; }
.rc-rules { transition: border-color 0.2s, background 0.2s, box-shadow 0.2s; }
.rc-rules.need {
    border-color: var(--err);
    background: rgba(255, 93, 93, 0.1);
    box-shadow: inset 0 0 0 1px var(--err), var(--glass-shadow);
}
.rc-rules.need summary { color: var(--err); }
.rf-count[hidden],
.rf-add[hidden] { display: none; }
.rf-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--glass-edge);
    background: var(--glass);
    box-shadow: var(--glass-shadow);
    background-clip: padding-box;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s;
}
.rf-add:active { transform: scale(0.96); }

/* ---------------------------------------------------------------- Stats (/stats/) */
.stats-page .container { max-width: 960px; }

.st-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--glass-edge);
    box-shadow: var(--glass-shadow);
    overflow-x: auto;
    scrollbar-width: none;
}
.st-tabs::-webkit-scrollbar { display: none; }
.st-tab {
    flex: 1 0 auto;
    padding: 8px 12px;
    border-radius: 999px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}
.st-tab.active { background: var(--accent); color: #fff; }

.st-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.st-kpi {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.st-kpi span { font-size: 13px; color: var(--muted); }
.st-kpi b { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.2; }
.st-kpi em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--ok); }

.st-block { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.st-h { font-size: 15px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.st-h small { font-size: 12px; font-weight: 500; color: var(--muted); }
.st-empty { font-size: 14px; color: var(--muted); }
.st-note { font-size: 13px; color: var(--muted); }
.st-note b { color: var(--text); }
.st-foot { font-size: 12px; color: var(--muted); text-align: center; padding: 0 8px; }

.st-chart {
    height: 120px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
}
.st-bar {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
    border-radius: 4px;
    background: rgba(28, 78, 255, 0.06);
}
.st-bar i {
    display: block;
    width: 100%;
    min-height: 2px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
}
.st-chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }

.st-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }

.st-share { display: flex; flex-direction: column; gap: 4px; }
.st-share-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.st-share-top span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-share-top small { font-weight: 500; color: var(--muted); }
.st-meter { height: 6px; border-radius: 999px; background: rgba(28, 78, 255, 0.08); overflow: hidden; }
.st-meter i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }

.st-rows { display: flex; flex-direction: column; }
.st-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid rgba(15, 18, 24, 0.06);
    font-size: 14px;
}
.st-row:first-child { border-top: 0; padding-top: 0; }
.st-row-main { min-width: 0; display: flex; flex-direction: column; }
.st-row-main small, .st-row-num small { font-size: 12px; color: var(--muted); }
.st-row-num { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; text-align: right; flex-shrink: 0; }
.st-row-num em { font-style: normal; color: var(--err); }
.st-row-main:has(.st-kind) { flex-direction: row; align-items: center; gap: 8px; }

.st-kind {
    display: inline-block;
    flex-shrink: 0;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    background: rgba(15, 18, 24, 0.06);
}
.st-kind-action { color: var(--accent); background: rgba(28, 78, 255, 0.1); }
.st-kind-login, .st-kind-logout { color: #128a57; background: rgba(47, 207, 138, 0.16); }

.st-search input {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-edge);
    background: rgba(255, 255, 255, 0.7);
    font: inherit;
    font-size: 16px; /* меньше 16px — iOS зумит при фокусе */
    color: var(--text);
}
.st-search input:focus { outline: 2px solid rgba(28, 78, 255, 0.35); }
.st-sorts { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chip {
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    background: rgba(15, 18, 24, 0.05);
}
.st-chip.active { color: #fff; background: var(--accent); }

.st-users { display: flex; flex-direction: column; gap: 8px; }
.st-user {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--glass-edge);
}
.st-user:active { transform: scale(0.99); }
.st-user-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.st-user-top b { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-user-top span { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.st-user-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.st-user-platform { font-size: 12px; color: var(--muted); }

.st-log { display: flex; flex-direction: column; }
.st-log-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
}
.st-log-row time { color: var(--muted); font-variant-numeric: tabular-nums; }
.st-log-row em { display: block; font-style: normal; font-size: 12px; color: var(--err); }
.st-log-row.err > span { color: var(--err); }
.st-log-gap { height: 1px; margin: 6px 0; background: rgba(15, 18, 24, 0.08); }

@media (min-width: 720px) {
    .st-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .st-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 720px) {
    .st-kpis.st-kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
