:root {
    color-scheme: light dark;

    --r: 14px;
    --ease: cubic-bezier(.4, 0, .2, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);
    --safe-top: max(env(safe-area-inset-top), 0px);
    --safe-bottom: max(env(safe-area-inset-bottom), 0px);
    --safe-left: max(env(safe-area-inset-left), 0px);
    --safe-right: max(env(safe-area-inset-right), 0px);
    --safe-b: var(--safe-bottom);
    --nav-h: 64px;
    --z-header: 1000;
    --z-cmp-float: 8000;
    --z-bottom-nav: 9999;
    --z-overlay: 20000;
    --z-overlay-content: 20001;
    --z-dropdown-in-overlay: 30000;
    --z-toast: 40000;
    --ios-theme-color: #e8f4f8;
}

[data-theme="dark"] {
    --bg: #060912;
    --bg2: #0b1120;
    --bg3: #0f1828;
    --sf: #121c2e;
    --sf2: #172437;
    --sf3: #1d2e44;
    --bd: rgba(255, 255, 255, .07);
    --bd2: rgba(255, 255, 255, .13);
    --t1: #e8f0fe;
    --t2: #7a96b8;
    --t3: #3d5470;
    --ac: #38bdf8;
    --ac2: #818cf8;
    --ac3: #10b981;
    --red: #f43f5e;
    --yel: #f59e0b;
    --glow: rgba(56, 189, 248, .16);
    --sh: 0 4px 24px rgba(0, 0, 0, .5);
    --shlg: 0 20px 60px rgba(0, 0, 0, .7);
    --hbg: rgba(6, 9, 18, .92);
    --mbg: #0b1120;
    --noise: .04;
    --nav-bg: rgba(6, 9, 18, .96);
    --drawer-bg: #0b1120;
    --ios-theme-color: #060912;
}

[data-theme="light"] {
    --bg: #e8f4f8;
    --bg2: #d4ecf4;
    --bg3: #eaf8fb;
    --sf: #fff;
    --sf2: #d4eef5;
    --sf3: #bde5ef;
    --bd: rgba(8, 145, 178, .11);
    --bd2: rgba(8, 145, 178, .24);
    --t1: #042030;
    --t2: #1a6070;
    --t3: #5aacbf;
    --ac: #0891b2;
    --ac2: #6366f1;
    --ac3: #059669;
    --red: #e11d48;
    --yel: #d97706;
    --glow: rgba(8, 145, 178, .16);
    --sh: 0 4px 24px rgba(8, 145, 178, .1);
    --shlg: 0 20px 60px rgba(8, 145, 178, .2);
    --hbg: rgba(232, 244, 248, .95);
    --mbg: #eaf8fb;
    --noise: .015;
    --nav-bg: rgba(232, 244, 248, .97);
    --drawer-bg: #eaf8fb;
    --ios-theme-color: #e8f4f8;
}

@supports (padding: max(0px)) {
    :root {
        --safe-top: max(env(safe-area-inset-top), 0px);
        --safe-bottom: max(env(safe-area-inset-bottom), 0px);
        --safe-left: max(env(safe-area-inset-left), 0px);
        --safe-right: max(env(safe-area-inset-right), 0px);
    }
}

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

html {
    height: 100%;
    background: var(--bg);
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-text-size-adjust: 100%;
    -webkit-overflow-scrolling: touch;
}

@media (pointer: coarse) {
    html {
        overscroll-behavior-y: none;
    }
}

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg);
    color: var(--t1);
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background .35s, color .35s;
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9990;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: var(--noise);
}

* {
    -webkit-tap-highlight-color: transparent;
}

a,
button,
input,
select,
textarea {
    touch-action: manipulation;
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--sf3);
    border-radius: 4px;
}

::selection {
    background: rgba(56, 189, 248, .2);
    color: var(--t1);
}

img,
svg,
canvas {
    max-width: 100%;
    display: block;
}

body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* -------------------- блобы -------------------- */
.bg-blobs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    animation: bF 22s ease-in-out infinite;
}

[data-theme="dark"] .b1 {
    width: 650px;
    height: 650px;
    background: #0ea5e9;
    top: -180px;
    left: -130px;
    opacity: .07;
}

[data-theme="dark"] .b2 {
    width: 480px;
    height: 480px;
    background: #6366f1;
    top: 44%;
    right: -110px;
    opacity: .06;
    animation-delay: -8s;
}

[data-theme="dark"] .b3 {
    width: 400px;
    height: 400px;
    background: #10b981;
    bottom: -90px;
    left: 33%;
    opacity: .05;
    animation-delay: -16s;
}

[data-theme="light"] .b1 {
    width: 650px;
    height: 650px;
    background: #67e8f9;
    top: -180px;
    left: -130px;
    opacity: .45;
}

[data-theme="light"] .b2 {
    width: 480px;
    height: 480px;
    background: #a5f3fc;
    top: 44%;
    right: -110px;
    opacity: .3;
    animation-delay: -8s;
}

[data-theme="light"] .b3 {
    width: 400px;
    height: 400px;
    background: #6ee7b7;
    bottom: -90px;
    left: 33%;
    opacity: .22;
    animation-delay: -16s;
}

@keyframes bF {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(26px, -34px) scale(1.05);
    }

    66% {
        transform: translate(-16px, 18px) scale(.95);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .35;
        transform: scale(.6);
    }
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes navItemPop {
    0% {
        transform: scale(.85);
    }

    60% {
        transform: scale(1.12);
    }

    100% {
        transform: scale(1);
    }
}

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

    100% {
        background-position: -200% 0;
    }
}

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

.sk {
    background: linear-gradient(90deg, var(--sf) 0%, var(--sf2) 50%, var(--sf) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* -------------------- header -------------------- */
header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    display: flex;
    flex-direction: column;
    background: var(--bg);
    padding-top: var(--safe-top);
    transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
    border-bottom: 1px solid var(--bd);
    /* исправлено: было --line */
    isolation: isolate;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

header.header-hidden {
    transform: translateY(-100%);
}

.hdr {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s var(--spring);
    flex-shrink: 0;
    overflow: hidden;
    background: none;
    box-shadow: none;
}

.logo-mark img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.logo-mark svg {
    width: 30px;
    height: 30px;
    display: block;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

.logo:hover .logo-mark {
    transform: rotate(-6deg) scale(1.1);
}

.logo-text {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 15px;
    color: var(--t1);
    letter-spacing: -.3px;
    white-space: nowrap;
}

.logo-text span {
    color: var(--ac);
}

.hdr-nav {
    display: flex;
    gap: 1px;
    flex-shrink: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.hdr-nav::-webkit-scrollbar {
    display: none;
}

.hdr-nav a {
    color: var(--t2);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 7px;
    transition: all .2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.hdr-nav a:hover {
    color: var(--t1);
    background: var(--sf2);
}

.hdr-nav a.active {
    color: var(--ac);
    background: rgba(56, 189, 248, .09);
}

.hdr-r {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    flex-shrink: 0;
}

.time-b {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--ac);
    background: rgba(56, 189, 248, .08);
    border: 1px solid rgba(56, 189, 248, .2);
    padding: 4px 8px;
    border-radius: 7px;
    white-space: nowrap;
}

.th-tog {
    display: flex;
    align-items: center;
    background: var(--sf2);
    border: 1.5px solid var(--bd2);
    border-radius: 50px;
    padding: 2px;
    gap: 1px;
}

.tt {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    color: var(--t3);
    cursor: pointer;
    transition: all .2s;
    background: none;
    border: none;
}

.tt.on {
    background: linear-gradient(135deg, var(--ac), var(--ac2));
    color: #fff;
    box-shadow: 0 2px 8px var(--glow);
}

.btn-p {
    background: linear-gradient(135deg, var(--ac), var(--ac2));
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    font-family: 'Manrope', sans-serif;
    text-decoration: none;
}

.btn-p:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--glow);
}

/* -------------------- mobile topbar -------------------- */
.mobile-topbar {
    display: none;
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--hbg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--bd);
    padding: 0 16px;
    height: 52px;
    align-items: center;
    justify-content: space-between;
}

.mob-logo {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
}

.mob-logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: none;
    box-shadow: none;
}

.mob-logo-mark img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

.mob-logo-mark svg {
    width: 28px;
    height: 28px;
    display: block;
}

.mob-logo-text {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: var(--t1);
}

.mob-logo-text span {
    color: var(--ac);
}

.mob-topbar-r {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mob-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--ac);
    background: rgba(56, 189, 248, .08);
    border: 1px solid rgba(56, 189, 248, .2);
    padding: 3px 7px;
    border-radius: 6px;
}

.mob-refresh-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--sf2);
    border: 1px solid var(--bd);
    color: var(--t2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}

.mob-refresh-btn:active {
    transform: scale(.9);
    color: var(--ac);
}

/* -------------------- layout -------------------- */
.wrap {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.hero {
    padding: 32px 0 20px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(56, 189, 248, .08);
    border: 1px solid rgba(56, 189, 248, .2);
    border-radius: 50px;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    color: var(--ac);
    letter-spacing: .6px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.h1 {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(22px, 3.5vw, 46px);
    line-height: 1.08;
    letter-spacing: -1px;
}

.h1 .gr {
    background: linear-gradient(135deg, var(--ac), var(--ac2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    margin-top: 8px;
    color: var(--t2);
    font-size: 13.5px;
    max-width: 480px;
    line-height: 1.6;
}

/* -------------------- bank picker -------------------- */
.curr-bar {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.curr-bar-lbl {
    font-size: 11px;
    color: var(--t3);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    flex-shrink: 0;
}

.curr-tabs {
    display: flex;
    gap: 2px;
    background: var(--sf2);
    border: 1.5px solid var(--bd2);
    border-radius: 10px;
    padding: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.curr-tabs::-webkit-scrollbar {
    display: none;
}

.curr-tab {
    padding: 6px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--t3);
    transition: all .2s;
    font-family: 'Manrope', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.curr-tab.active {
    background: var(--sf);
    color: var(--t1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

.bank-picker {
    background: var(--sf);
    border: 1px solid var(--bd);
    border-radius: var(--r);
    padding: 16px;
    margin-bottom: 18px;
    position: relative;
}

.picker-title {
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.picker-title i {
    color: var(--ac);
}

.slots-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.pick-slot {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 1.5px dashed var(--bd2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all .22s;
    color: var(--t3);
    font-size: 18px;
}

.pick-slot:hover {
    border-color: var(--ac);
    background: rgba(56, 189, 248, .06);
    color: var(--ac);
    transform: scale(1.04);
}

.pick-slot.filled {
    border-style: solid;
    border-color: var(--bd2);
    padding: 0;
    overflow: hidden;
}

.pick-slot.filled:hover {
    border-color: var(--red);
}

.slot-rm {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s;
    border: 2px solid var(--bg);
    z-index: 2;
}

.pick-slot:hover .slot-rm {
    opacity: 1;
}

.add-hint {
    font-size: 11px;
    color: var(--t3);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--sf2);
    border: 1px solid var(--bd);
}

/* -------------------- calculator fab + sheet -------------------- */
.calc-fab {
    position: fixed;
    right: 20px;
    bottom: calc(24px + var(--safe-b));
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 8500;
    background: linear-gradient(135deg, var(--ac), var(--ac2));
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px -6px var(--ac), 0 4px 14px rgba(0, 0, 0, .35);
    transition: transform .25s var(--spring), box-shadow .25s var(--ease);
}

.calc-fab:hover {
    transform: translateY(-3px) scale(1.05);
}

.calc-fab:active {
    transform: scale(.94);
}

.calc-fab-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--ac);
    opacity: .55;
    animation: calcPulse 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes calcPulse {
    0% {
        transform: scale(.85);
        opacity: .55;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

@media (max-width: 980px) {
    .calc-fab {
        bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
        right: 16px;
        width: 52px;
        height: 52px;
        font-size: 18px;
    }
}

.calc-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s var(--ease), visibility .3s var(--ease);
}

.calc-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.calc-sheet {
    width: 100%;
    max-width: 460px;
    background: var(--drawer-bg);
    border-radius: 24px 24px 0 0;
    border: 1px solid var(--bd2);
    border-bottom: none;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    transform: translateY(60px);
    transition: transform .34s var(--spring);
    overflow: hidden;
    padding-bottom: var(--safe-b);
}

.calc-overlay.open .calc-sheet {
    transform: translateY(0);
}

@media (min-width: 700px) {
    .calc-overlay {
        align-items: center;
    }

    .calc-sheet {
        border-radius: 18px;
        max-height: 82vh;
        border: 1.5px solid var(--bd2);
    }
}

.calc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px 14px;
    border-bottom: 1px solid var(--bd);
    flex-shrink: 0;
    position: relative;
}

.calc-close {
    position: static;
    transform: none;
    flex-shrink: 0;
}

.calc-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.calc-mode-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: var(--bg2);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--bd);
}

.calc-mode-btn {
    border: none;
    background: none;
    color: var(--t3);
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 6px;
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all .2s;
}

.calc-mode-btn i {
    font-size: 10px;
}

.calc-mode-btn.active {
    background: var(--sf);
    color: var(--ac);
    box-shadow: var(--sh);
}

.calc-amount-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--sf2);
    border: 1.5px solid var(--bd2);
    border-radius: 14px;
    padding: 12px 16px;
}

.calc-amount-curr {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 13px;
    color: var(--ac);
    background: var(--glow);
    padding: 5px 9px;
    border-radius: 8px;
    flex-shrink: 0;
}

.calc-amount-inp {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    color: var(--t1);
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    text-align: right;
}

.calc-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-result-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 13px;
    background: var(--sf2);
    border: 1px solid var(--bd);
    position: relative;
    overflow: hidden;
}

.calc-result-row.best {
    border-color: var(--ac3);
    background: rgba(16, 185, 129, .07);
}

.calc-result-rank {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg2);
    color: var(--t3);
    font-size: 10px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.calc-result-row.best .calc-result-rank {
    background: var(--ac3);
    color: #fff;
}

.calc-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calc-result-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--t1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calc-result-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--t1);
    flex-shrink: 0;
}

.calc-result-row.best .calc-result-val {
    color: var(--ac3);
}

.calc-empty {
    text-align: center;
    padding: 30px 10px;
    color: var(--t3);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.calc-empty i {
    font-size: 26px;
    opacity: .5;
}

.qwrap {
    margin-top: 0
}

.qlbl {
    font-size: 9.5px;
    color: var(--t3);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .4px;
    margin-bottom: 6px;
    display: block
}

.qbtns {
    display: flex;
    gap: 5px;
    flex-wrap: wrap
}

.qbtn {
    padding: 6px 11px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    background: var(--sf2);
    border: 1.5px solid var(--bd);
    color: var(--t2);
    cursor: pointer;
    transition: all .2s;
    font-family: 'Manrope', sans-serif;
    min-height: 40px
}

.qbtn:hover {
    border-color: var(--ac);
    color: var(--ac);
    background: rgba(56, 189, 248, .06)
}

/* -------------------- search overlay -------------------- */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s var(--ease), visibility .3s var(--ease);
}

.search-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.search-sheet {
    width: 100%;
    max-width: 640px;
    background: var(--drawer-bg);
    border-radius: 24px 24px 0 0;
    border: 1px solid var(--bd2);
    border-bottom: none;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    transform: translateY(60px);
    transition: transform .34s var(--spring);
    overflow: hidden;
    padding-bottom: var(--safe-b);
}

.search-overlay.open .search-sheet {
    transform: translateY(0);
}

@media (min-width:700px) {
    .search-overlay {
        align-items: center;
    }

    .search-sheet {
        border-radius: 18px;
        max-height: 80vh;
        border: 1.5px solid var(--bd2);
    }
}

.search-handle {
    display: flex;
    justify-content: center;
    padding: 10px 0 4px;
    flex-shrink: 0;
}

.search-handle-bar {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--sf3);
}

.search-head {
    padding: 0 18px 14px;
    border-bottom: 1px solid var(--bd);
    flex-shrink: 0;
}

.search-head-title {
    font-family: 'Syne', sans-serif;
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 10px;
}

.search-inp-wrap {
    position: relative;
}

.search-inp-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--t3);
    font-size: 14px;
    pointer-events: none;
}

.search-inp {
    width: 100%;
    background: var(--sf2);
    border: 1.5px solid var(--bd2);
    border-radius: 12px;
    padding: 11px 12px 11px 36px;
    color: var(--t1);
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}

.search-inp:focus {
    border-color: var(--ac);
    box-shadow: 0 0 0 3px var(--glow);
}

.search-inp::placeholder {
    color: var(--t3);
}

.search-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--sf3);
    border: none;
    color: var(--t2);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.search-close:hover {
    background: var(--red);
    color: #fff;
}

.search-results {
    overflow-y: auto;
    flex: 1;
    padding: 8px 12px 12px;
    -webkit-overflow-scrolling: touch;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: 'Manrope', sans-serif;
    color: var(--t1);
    margin-bottom: 2px;
}

.search-result-item:hover,
.search-result-item:active {
    background: var(--sf2);
}

.search-result-item.already-selected {
    opacity: .4;
    pointer-events: none;
}

.sri-logo {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sf2);
}

.sri-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sri-info {
    flex: 1;
    min-width: 0;
}

.sri-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.sri-sub {
    font-size: 10.5px;
    color: var(--t3);
    margin-top: 2px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.sri-rate-buy {
    color: var(--ac3);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 11px;
}

.sri-rate-sell {
    color: var(--red);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 11px;
}

.sri-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--bd2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--ac);
    flex-shrink: 0;
}

.search-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--t3);
    font-size: 13px;
}

.search-empty i {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
    opacity: .5;
}

.search-group-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .7px;
    padding: 10px 10px 4px;
    margin-top: 4px;
}

/* -------------------- comparison cards -------------------- */
.cmp-cards {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}

.cmp-card {
    background: var(--sf);
    border: 1.5px solid var(--bd);
    border-radius: var(--r);
    padding: 16px;
    min-width: 220px;
    max-width: 280px;
    flex-shrink: 0;
    scroll-snap-align: start;
    position: relative;
    animation: slideUp .35s var(--ease);
    transition: box-shadow .2s, border-color .2s;
}

.cmp-card:hover {
    box-shadow: var(--sh);
}

.cmp-card.winner {
    border-color: rgba(16, 185, 129, .35);
    background: rgba(16, 185, 129, .03);
}

.win-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(16, 185, 129, .12);
    border: 1px solid rgba(16, 185, 129, .28);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    color: var(--ac3);
    margin-bottom: 8px;
}

.cmp-card-rm {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--sf2);
    border: 1px solid var(--bd);
    color: var(--t3);
    font-size: 10px;
    cursor: pointer;
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity .2s, background .2s;
}

.cmp-card:hover .cmp-card-rm {
    opacity: 1;
}

.cmp-card-rm:hover {
    background: var(--red);
    color: #fff;
}

.cmp-bank-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-right: 24px;
}

.cmp-bank-logo-wrap {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--sf2);
}

.cmp-bank-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cmp-bank-name {
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--t1);
}

.cmp-rates {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 8px;
}

.rate-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 9px;
    background: var(--bg2);
    border-radius: 8px;
    font-size: 12px;
}

.rate-row-lbl {
    color: var(--t3);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rate-row-val {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 13px;
}

.rate-row-val.buy {
    color: var(--ac3);
}

.rate-row-val.sell {
    color: var(--red);
}

.rate-row-val.spread {
    color: var(--yel);
}

.cmp-card-empty {
    text-align: center;
    padding: 10px 0;
    font-size: 11px;
    color: var(--t3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.empty-state {
    background: var(--sf);
    border: 1px solid var(--bd);
    border-radius: var(--r);
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 18px;
}

.empty-state-icon {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: .4;
}

.empty-state-title {
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.empty-state-sub {
    font-size: 12.5px;
    color: var(--t3);
    max-width: 280px;
    margin: 0 auto 16px;
    line-height: 1.6;
}

.empty-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--ac), var(--ac2));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
    transition: all .2s;
}

.empty-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--glow);
}

/* -------------------- comparison table -------------------- */
.cmp-table-wrap {
    background: var(--sf);
    border: 1px solid var(--bd);
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 18px;
}

.cmp-table-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--bd);
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.cmp-table-header i {
    color: var(--ac);
}

.cmp-type-toggle {
    display: flex;
    background: var(--sf2);
    border: 1.5px solid var(--bd2);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.cmp-type-btn {
    padding: 5px 10px;
    border-radius: 6px;
    border: none;
    background: none;
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--t3);
    cursor: pointer;
    transition: all .2s;
}

.cmp-type-btn.active {
    background: var(--sf);
    color: var(--t1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.cmp-type-btn.active.cash {
    color: var(--ac3);
}

.cmp-type-btn.active.card {
    color: var(--ac2);
}

.cmp-tbl {
    width: 100%;
    border-collapse: collapse;
    min-width: 320px;
}

.cmp-tbl th {
    background: var(--bg2);
    padding: 8px 12px;
    text-align: left;
    font-size: 9px;
    font-weight: 700;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .6px;
    border-bottom: 1px solid var(--bd);
    white-space: nowrap;
}

.cmp-tbl td {
    padding: 9px 12px;
    font-size: 12px;
    border-bottom: 1px solid var(--bd);
    color: var(--t2);
    vertical-align: middle;
}

.cmp-tbl tbody tr:hover {
    background: rgba(56, 189, 248, .025);
}

.cmp-tbl .best-cell {
    color: var(--ac3);
    font-weight: 700;
}

.cmp-tbl .curr-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--t1);
}

.buy-val {
    font-family: 'JetBrains Mono', monospace;
    color: var(--ac3);
    font-weight: 700;
    font-size: 12px;
}

.sell-val {
    font-family: 'JetBrains Mono', monospace;
    color: var(--red);
    font-weight: 700;
    font-size: 12px;
}

.spread-val {
    font-family: 'JetBrains Mono', monospace;
    color: var(--yel);
    font-size: 11px;
    background: rgba(245, 158, 11, .08);
    border: 1px solid rgba(245, 158, 11, .18);
    border-radius: 5px;
    padding: 2px 5px;
}

.no-data {
    color: var(--t3);
    font-size: 11px;
}

/* -------------------- chart -------------------- */
.chart-card {
    background: var(--sf);
    border: 1px solid var(--bd);
    border-radius: var(--r);
    padding: 18px;
    margin-bottom: 18px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.chart-title {
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
}

.chart-title i {
    color: var(--ac2);
}

.ptabs {
    display: flex;
    gap: 2px;
    background: var(--bg2);
    padding: 2px;
    border-radius: 7px;
    border: 1px solid var(--bd);
}

.ptab {
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--t3);
    font-family: 'JetBrains Mono', monospace;
    transition: all .2s;
}

.ptab.active {
    background: var(--sf2);
    color: var(--ac);
}

.chart-wrap {
    position: relative;
    height: 220px;
}

.chart-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    color: var(--t2);
    font-weight: 600;
}

.chart-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Chart */
.chart-wrap {
    height: 190px
}

/* Curr bar scroll */
.curr-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px
}

.curr-tabs {
    flex-shrink: 0
}
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--t2);
    margin-bottom: 6px;
}

.chart-legend-logo,
.chart-tooltip-logo {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: contain;
    background: var(--sf2);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.chart-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* -------------------- toast -------------------- */
.toast {
    position: fixed;
    bottom: calc(var(--nav-h) + 16px + var(--safe-b));
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    z-index: var(--z-toast);
    background: var(--sf2);
    border: 1px solid var(--bd2);
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--t1);
    box-shadow: var(--shlg);
    white-space: nowrap;
    opacity: 0;
    transition: all .3s var(--ease);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.ok {
    border-color: rgba(16, 185, 129, .35);
    color: var(--ac3);
}

.toast.err {
    border-color: rgba(244, 63, 94, .35);
    color: var(--red);
}

/* -------------------- footer -------------------- */
footer {
    position: relative;
    z-index: 1;
    background: var(--sf);
    border-top: 1px solid var(--bd);
    padding: 24px 0 14px;
}

.ft-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

.ft-bot {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    color: var(--t3);
    flex-wrap: wrap;
    gap: 6px;
}

.fu {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .55s var(--ease), transform .55s var(--ease);
}

.fu.vis {
    opacity: 1;
    transform: translateY(0);
}

/* -------------------- mobile bottom nav -------------------- */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-bottom-nav);
    background: var(--nav-bg);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-top: 1px solid var(--bd);
    padding: 8px 0;
    padding-bottom: calc(8px + var(--safe-b));
}

.bottom-nav-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 4px;
}

.bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 6px;
    border-radius: 14px;
    color: var(--t3);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    font-family: 'Manrope', sans-serif;
    transition: color .2s;
    min-width: 52px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.bnav-item.active {
    color: var(--ac);
}

.bnav-item.active .bnav-icon-wrap {
    background: rgba(56, 189, 248, .12);
}

[data-theme="light"] .bnav-item.active .bnav-icon-wrap {
    background: rgba(8, 145, 178, .1);
}

.bnav-icon-wrap {
    width: 44px;
    height: 30px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background .2s, transform .2s;
    position: relative;
}

.bnav-item:active .bnav-icon-wrap {
    transform: scale(.88);
}

.bnav-item.active .bnav-icon-wrap {
    animation: navItemPop .35s var(--spring);
}

.bnav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: linear-gradient(90deg, var(--ac), var(--ac2));
    border-radius: 0 0 3px 3px;
}

.bnav-label {
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

/* -------------------- drawer -------------------- */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: var(--z-overlay);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s var(--ease), visibility .3s var(--ease);
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-overlay-content);
    background: var(--drawer-bg);
    border-radius: 24px 24px 0 0;
    border: 1px solid var(--bd2);
    border-bottom: none;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform .38s var(--spring);
    padding-bottom: var(--safe-b);
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
}

.drawer.open {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.drawer-handle {
    display: flex;
    justify-content: center;
    padding: 12px 0 4px;
    flex-shrink: 0;
    cursor: pointer;
}

.drawer-handle-bar {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--sf3);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px 16px;
    border-bottom: 1px solid var(--bd);
    flex-shrink: 0;
}

.drawer-title {
    font-family: 'Syne', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--t1);
}

.drawer-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sf2);
    border: 1px solid var(--bd);
    color: var(--t2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
}

.drawer-close-btn:hover {
    background: var(--red);
    color: #fff;
}

.drawer-body {
    overflow-y: auto;
    flex: 1;
    padding: 16px;
}

.drawer-section {
    margin-bottom: 20px;
}

.drawer-sec-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 8px;
    padding: 0 4px;
}

.drawer-theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--sf);
    border: 1px solid var(--bd);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.drawer-theme-lbl {
    font-size: 13px;
    font-weight: 700;
    color: var(--t1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-th-tog {
    display: flex;
    align-items: center;
    background: var(--bg2);
    border: 1.5px solid var(--bd2);
    border-radius: 50px;
    padding: 3px;
    gap: 2px;
}

.drawer-tt {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 14px;
    color: var(--t3);
    cursor: pointer;
    transition: all .2s;
    background: none;
    border: none;
}

.drawer-tt.on {
    background: linear-gradient(135deg, var(--ac), var(--ac2));
    color: #fff;
    box-shadow: 0 2px 8px var(--glow);
}

.drawer-clock {
    background: var(--sf);
    border: 1px solid var(--bd);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-clock-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--ac);
    letter-spacing: -1px;
}

.drawer-clock-lbl {
    font-size: 10px;
    color: var(--t3);
    margin-top: 2px;
}

.drawer-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.drawer-nav-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: var(--sf);
    border: 1px solid var(--bd);
    border-radius: 14px;
    padding: 14px;
    text-decoration: none;
    color: var(--t1);
    transition: all .2s;
    cursor: pointer;
}

.drawer-nav-item:hover,
.drawer-nav-item:active {
    background: var(--sf2);
    border-color: var(--bd2);
}

.drawer-nav-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--ac);
}

.drawer-nav-item-name {
    font-size: 13px;
    font-weight: 700;
}

.drawer-nav-item-desc {
    font-size: 10px;
    color: var(--t3);
}

.drawer-nbrb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.drawer-nbrb-card {
    background: var(--sf);
    border: 1px solid var(--bd);
    border-radius: 12px;
    padding: 10px 12px;
}

.drawer-nbrb-curr {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--t2);
    margin-bottom: 4px;
}

.drawer-nbrb-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--t1);
}

.drawer-refresh-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ac), var(--ac2));
    color: #fff;
    border: none;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .2s;
    margin-top: 4px;
}

.drawer-refresh-btn:active {
    transform: scale(.97);
}

/* -------------------- мобильные подписи -------------------- */
.mob-section-label {
    display: none;
    font-family: 'Syne', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 14px 0 8px;
}

/* ===================== ДОБАВЛЕННЫЕ СТИЛИ ДЛЯ ФЛАГОВ ===================== */
.currency-flag .fi {
    border-radius: 50%;
    background-size: cover !important;
    display: inline-block;
    transition: box-shadow .2s ease, transform .2s ease;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, .25), 0 0 0 1.5px rgba(255, 255, 255, .15), 0 4px 12px rgba(0, 0, 0, .35);
}

[data-theme="light"] .currency-flag .fi {
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, .12), 0 0 0 1.5px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .1);
}

.drawer-nbrb-curr .currency-flag .fi {
    width: 1em;
    height: 1em;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .2), 0 0 0 1.2px rgba(255, 255, 255, .18), 0 2px 6px rgba(0, 0, 0, .25);
}

[data-theme="light"] .drawer-nbrb-curr .currency-flag .fi {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .1), 0 0 0 1.2px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .1);
}

/* ==================================================================== */

/* ========== АДАПТИВ ========== */
@media (max-width:768px) {
    header {
        display: none;
    }

    .mobile-topbar {
        display: flex;
    }

    .bottom-nav {
        display: block;
    }

    .wrap {
        padding: 0 12px calc(var(--nav-h) + var(--safe-b) + 20px);
    }

    footer {
        display: none;
    }

    .toast {
        bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
    }

    .mob-section-label {
        display: block;
    }

    .hero {
        padding: 14px 0 14px;
    }

    .h1 {
        font-size: 24px;
    }

    .hero-sub {
        font-size: 12.5px;
    }

    .slots-row {
        gap: 6px;
    }

    .pick-slot {
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }

    .cmp-cards {
        gap: 8px;
    }

    .cmp-card {
        min-width: 200px;
    }

    .cmp-tbl {
        min-width: 280px;
    }

    .cmp-tbl th,
    .cmp-tbl td {
        padding: 7px 8px;
        font-size: 11px;
    }

    .buy-val,
    .sell-val {
        font-size: 11px;
    }

    .chart-wrap {
        height: 190px;
    }

    .curr-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .curr-tabs {
        flex-shrink: 0;
    }
}

@media (max-width:480px) {
    .cmp-card {
        min-width: 180px;
        padding: 12px;
    }

    .cmp-bank-name {
        font-size: 12px;
    }

    .rate-row {
        padding: 6px 8px;
    }

    .rate-row-val {
        font-size: 12px;
    }

    .slots-row {
        gap: 5px;
    }

    .pick-slot {
        width: 44px;
        height: 44px;
    }
}

@media (max-width:360px) {
    .wrap {
        padding: 0 10px calc(var(--nav-h) + var(--safe-b) + 20px);
    }

    .mobile-topbar {
        padding: 0 12px;
    }

    .mob-logo-text {
        font-size: 12px;
    }

    .bnav-item {
        min-width: 44px;
    }

    .bnav-label {
        font-size: 9px;
    }
}

@media (min-width:769px) {

    .bottom-nav,
    .drawer-overlay,
    .mobile-topbar {
        display: none !important;
    }

    .search-overlay.open .search-sheet {
        border-radius: 18px;
    }
}

