: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;
}

[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;
}

*,
*::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 {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--t1);
    font-family: 'Manrope', sans-serif;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    position: relative;
    transition: background .35s, color .35s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    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);
}

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

* {
    -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
}

.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(-8px)
    }

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

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

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

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

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

@keyframes ldot {

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

    50% {
        opacity: .3;
        transform: scale(.5)
    }
}

@keyframes tS {
    0% {
        transform: translateX(0)
    }

    100% {
        transform: translateX(-50%)
    }
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

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

    60% {
        transform: scale(1.12)
    }

    100% {
        transform: scale(1)
    }
}

.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
}

.ticker-bar {
    min-height: 38px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 2;
}

@supports(height:100dvh) {
    .page-grid {
        min-height: calc(100dvh - var(--nav-h));
    }
}

@media (max-width:980px) {
    .page-grid {
        display: block;
    }

    .side-col {
        width: 100%;
        margin-top: 24px;
        position: static;
    }
}

section,
article,
aside {
    min-width: 0;
}

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

.ticker-inner {
    display: flex;
    align-items: center;
    height: 36px
}

.ticker-label {
    background: linear-gradient(90deg, var(--ac), var(--ac2));
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    padding: 0 11px;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    letter-spacing: .9px;
    flex-shrink: 0;
    gap: 4px
}

.live-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    animation: ldot 1.4s ease-in-out infinite
}

.ticker-scroll {
    flex: 1;
    overflow: hidden;
    min-width: 0
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: tS 40s linear infinite;
  white-space: nowrap;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}
@keyframes tS {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.t-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    border-right: 1px solid var(--bd);
    flex-shrink: 0
}

.t-c {
    color: var(--t3);
    font-size: 9px
}

.t-p {
    color: var(--t1);
    font-weight: 600
}

.t-u {
    color: var(--ac3)
}

.t-d {
    color: var(--red)
}

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(--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 {
    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: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
}

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

.mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    padding:
        10px
        max(16px, var(--safe-right))
        10px
        max(16px, var(--safe-left));
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}

header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
    z-index: -1;
}

@supports(backdrop-filter:blur(1px)) {
    header {
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
    }
}

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

.mobile-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 52px;
}

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

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

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

.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)
}

.wrap {
    width: min(1400px, 100%);
    margin: 0 auto;
    padding-left: max(20px, var(--safe-left));
    padding-right: max(20px, var(--safe-right));
    box-sizing: border-box;
}

.page-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        330px;
    gap: 26px;
    align-items: start;
    width: 100%;
    min-height: 100%;
}

.main-col {
    min-width: 0;
    width: 100%;
}

.side-col {
    width: 330px;
    position: relative;
    align-self: start;
}

.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
}

.hero-stats {
    display: flex;
    gap: 20px;
    margin-top: 14px;
    flex-wrap: wrap
}

.hs-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--ac);
    display: block
}

.hs-lbl {
    font-size: 10px;
    color: var(--t3);
    margin-top: 1px
}

.rate-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
    perspective: 900px
}

.rc {
    background: linear-gradient(160deg, var(--sf) 0%, var(--sf) 60%, var(--sf2) 140%);
    border: 1px solid var(--bd);
    border-radius: calc(var(--r) - 2px);
    padding: 12px 13px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    isolation: isolate;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
    transition: transform .3s var(--spring), box-shadow .3s var(--ease), border-color .3s var(--ease)
}

.rc::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    filter: blur(22px);
    opacity: .5;
    z-index: -1;
    transition: opacity .3s var(--ease), transform .3s var(--ease)
}

.rc.usd::before {
    background: radial-gradient(circle, #38bdf8, transparent 70%)
}

.rc.eur::before {
    background: radial-gradient(circle, #818cf8, transparent 70%)
}

.rc.rub::before {
    background: radial-gradient(circle, #10b981, transparent 70%)
}

.rc::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .06) 45%, transparent 60%);
    background-size: 250% 250%;
    background-position: 130% 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s var(--ease), background-position .6s var(--ease)
}

.rc:hover {
    transform: translateY(-4px) rotateX(2deg) scale(1.015);
    box-shadow: var(--shlg);
    border-color: var(--bd2)
}

.rc:hover::before {
    opacity: .85;
    transform: scale(1.15)
}

.rc:hover::after {
    opacity: 1;
    background-position: -30% 0
}

.rc.active-rc {
    border-color: var(--ac);
    background: linear-gradient(160deg, rgba(56, 189, 248, .07) 0%, var(--sf) 60%, var(--sf2) 140%)
}

.rc-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px
}

.rc-fw {
    display: flex;
    align-items: center;
    gap: 7px
}

.rc-flag {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
    transition: transform .3s var(--spring)
}

.rc:hover .rc-flag {
    transform: scale(1.08) rotate(-4deg)
}

.rc.usd .rc-flag {
    background: rgba(56, 189, 248, .1)
}

.rc.eur .rc-flag {
    background: rgba(129, 140, 248, .1)
}

.rc.rub .rc-flag {
    background: rgba(16, 185, 129, .1)
}

.rc-nm {
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.15
}

.rc-fl {
    font-size: 9px;
    color: var(--t3);
    margin-top: 1px
}

.rc-badge {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2.5px 6px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace
}

.rc-badge.up {
    background: rgba(16, 185, 129, .1);
    color: var(--ac3);
    border: 1px solid rgba(16, 185, 129, .2)
}

.rc-badge.dn {
    background: rgba(244, 63, 94, .1);
    color: var(--red);
    border: 1px solid rgba(244, 63, 94, .2)
}

.rc-nbrb-lbl {
    font-size: 8.5px;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 1px
}

.rc-nbrb-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 600;
    color: var(--ac2);
    margin-bottom: 4px
}

.rc-lbl {
    font-size: 8.5px;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .5px
}

.rc-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.5px;
    line-height: 1.1;
    color: var(--t1);
    margin: 2px 0 3px
}

.rc-spark {
    height: 28px;
    margin: 3px 0
}

.rc-bs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--bd)
}

.bs-c {
    text-align: center;
    padding: 6px;
    border-radius: 7px;
    background: var(--bg2)
}

.bs-l {
    font-size: 9px;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .4px
}

.bs-v {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px
}

.bs-c.buy .bs-v {
    color: var(--ac3)
}

.bs-c.sell .bs-v {
    color: var(--red)
}

.sec-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 11px;
    flex-wrap: wrap;
    gap: 7px
}

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

.sec-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ac);
    box-shadow: 0 0 9px var(--ac);
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0
}

.sec-act {
    color: var(--ac);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(56, 189, 248, .07);
    border: 1px solid rgba(56, 189, 248, .18);
    border-radius: 20px;
    padding: 5px 12px;
    cursor: pointer;
    transition: all .2s;
    font-family: 'Manrope', sans-serif;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0
}

.sec-act:hover {
    background: rgba(56, 189, 248, .15)
}

.nbrb-section {
    margin-bottom: 18px
}

.nbrb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 7px
}

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

.nbrb-badge {
    background: rgba(129, 140, 248, .1);
    border: 1px solid rgba(129, 140, 248, .25);
    color: var(--ac2);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: .4px
}

.nbrb-date-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--t3);
    background: var(--sf2);
    padding: 3px 8px;
    border-radius: 6px
}

.type-toggle {
    display: flex;
    background: var(--sf2);
    border: 1.5px solid var(--bd2);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
    margin-bottom: 12px
}

.type-btn {
    flex: 1;
    padding: 8px 10px;
    border-radius: 7px;
    border: none;
    background: none;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--t3);
    cursor: pointer;
    transition: all .22s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px
}

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

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

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

.type-badge {
    font-size: 10px;
    background: var(--sf3);
    padding: 1px 6px;
    border-radius: 20px;
    color: var(--t3);
    font-family: 'JetBrains Mono', monospace
}

.type-btn.active .type-badge {
    background: rgba(56, 189, 248, .15);
    color: var(--ac)
}

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

.tbl-ctrl {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--bd);
    flex-wrap: wrap
}

.sbox {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg2);
    border: 1.5px solid var(--bd);
    border-radius: 8px;
    padding: 7px 10px;
    flex: 1;
    min-width: 100px;
    max-width: 200px;
    transition: border-color .2s
}

.sbox:focus-within {
    border-color: var(--ac)
}

.sbox svg {
    width: 13px;
    height: 13px;
    stroke: var(--t3);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    flex-shrink: 0
}

.sbox input {
    background: none;
    border: none;
    outline: none;
    color: var(--t1);
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    width: 100%
}

.sbox input::placeholder {
    color: var(--t3)
}

.ftabs {
    display: flex;
    gap: 2px;
    background: var(--bg2);
    padding: 2px;
    border-radius: 8px;
    border: 1px solid var(--bd);
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0
}

.ftabs::-webkit-scrollbar {
    display: none
}

.ftab {
    padding: 5px 9px;
    border-radius: 6px;
    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
}

.ftab.active {
    background: var(--sf2);
    color: var(--t1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18)
}

.sort-sel {
    background: var(--bg2);
    border: 1.5px solid var(--bd);
    border-radius: 8px;
    color: var(--t2);
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    padding: 7px 9px;
    cursor: pointer;
    outline: none;
    flex-shrink: 0;
    transition: border-color .2s
}

.sort-sel:focus {
    border-color: var(--ac)
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 460px
}

thead th {
    background: var(--bg2);
    padding: 9px 12px;
    text-align: left;
    font-size: 9px;
    font-weight: 700;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .7px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color .2s, background .2s
}

thead th:hover {
    color: var(--t2);
    background: var(--sf3)
}

thead th.srt {
    color: var(--ac)
}

.tha {
    display: inline-block;
    margin-left: 3px;
    font-size: 8px;
    opacity: .7
}

tbody tr {
    border-top: 1px solid var(--bd);
    transition: background .15s
}

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

[data-theme="light"] tbody tr:hover {
    background: rgba(8, 145, 178, .04)
}

tbody tr.cmp-sel {
    background: rgba(56, 189, 248, .06);
    border-left: 3px solid var(--ac)
}

tbody td {
    padding: 9px 12px;
    vertical-align: middle
}

.b-info {
    display: flex;
    align-items: center;
    gap: 8px
}

.b-nm {
    font-weight: 700;
    font-size: 12.5px;
    line-height: 1.3
}

.b-tp {
    font-size: 9.5px;
    color: var(--t3);
    margin-top: 1px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap
}

.rv {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600
}

.rv.buy {
    color: var(--ac3)
}

.rv.sell {
    color: var(--red)
}

.spr-b {
    display: inline-flex;
    padding: 2px 6px;
    border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    font-weight: 600;
    background: rgba(245, 158, 11, .1);
    color: var(--yel);
    border: 1px solid rgba(245, 158, 11, .18)
}

.best-b {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 700;
    background: rgba(16, 185, 129, .1);
    color: var(--ac3);
    border: 1px solid rgba(16, 185, 129, .2)
}

.src-cash {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, .1);
    color: var(--ac3);
    border: 1px solid rgba(16, 185, 129, .18)
}

.src-card {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(129, 140, 248, .1);
    color: var(--ac2);
    border: 1px solid rgba(129, 140, 248, .18)
}

.cmp-chk {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid var(--bd2);
    background: var(--bg2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .18s;
    flex-shrink: 0;
    margin: 0 auto
}

.cmp-chk.on {
    background: var(--ac);
    border-color: var(--ac)
}

.cmp-chk::after {
    content: '';
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) scale(0);
    transition: transform .16s var(--spring);
    display: block;
    margin-top: -1px
}

.cmp-chk.on::after {
    transform: rotate(45deg) scale(1)
}

.tbl-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-top: 1px solid var(--bd);
    font-size: 11px;
    color: var(--t3)
}

.show-more {
    color: var(--ac);
    font-weight: 700;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 12px;
    font-family: 'Manrope', sans-serif
}

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

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

.chart-title {
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700
}

.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: 200px
}

.conv-card {
    background: var(--sf);
    border: 1px solid var(--bd);
    border-radius: var(--r);
    padding: 18px;
    position: relative;
    overflow: visible;
    box-shadow: var(--sh)
}

.conv-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ac), var(--ac2), var(--ac3));
    border-radius: var(--r) var(--r) 0 0
}

.conv-ttl {
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.cpulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ac3);
    box-shadow: 0 0 7px var(--ac3);
    animation: pulse 2s infinite;
    flex-shrink: 0
}

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

.bsel-box {
    background: var(--bg2);
    border: 1.5px solid var(--bd);
    border-radius: 8px;
    overflow: visible;
    transition: border-color .2s;
    cursor: pointer;
    margin-bottom: 12px;
    position: relative
}

.bsel-box.open {
    border-color: var(--ac);
    box-shadow: 0 0 0 3px var(--glow)
}

.bsel-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px
}

.bsel-ico-fb {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 800;
    font-family: 'Syne', sans-serif;
    color: #fff;
    flex-shrink: 0
}

.bsel-nm {
    flex: 1;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0
}

.bsel-rt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--t3);
    white-space: nowrap;
    flex-shrink: 0
}

.bsel-arr {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: var(--t3);
    stroke-width: 2;
    stroke-linecap: round;
    transition: transform .2s;
    flex-shrink: 0
}

.bsel-box.open .bsel-arr {
    transform: rotate(180deg)
}

.bsel-drop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--mbg);
    border: 1.5px solid var(--bd2);
    border-radius: 10px;
    box-shadow: var(--shlg);
    /* [ИСПРАВЛЕНО] раньше было 9500 — ниже нижнего таб-бара (9999),
       из-за чего список валют мог "прятаться" под таб-баром на мобильном.
       Поднимаем в общий слой оверлеев. */
    z-index: var(--z-overlay);
    display: none;
    overflow: hidden;
    animation: dropIn .18s var(--ease)
}

.bsel-box.open .bsel-drop {
    display: block
}

.bsel-scroll {
    overflow-y: auto;
    max-height: 200px;
    padding: 4px
}

.bopt {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    border-radius: 7px;
    cursor: pointer;
    transition: background .15s
}

.bopt:hover {
    background: var(--sf2)
}

.bopt.active {
    background: rgba(56, 189, 248, .09)
}

.bopt-ico-fb {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7.5px;
    font-weight: 800;
    font-family: 'Syne', sans-serif;
    color: #fff;
    flex-shrink: 0
}

.bopt-nm {
    flex: 1;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0
}

.bopt-rt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    color: var(--t3);
    white-space: nowrap;
    flex-shrink: 0
}

.conv-fld {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px
}

.conv-lbl {
    font-size: 10px;
    color: var(--t3);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: 4px
}

.conv-iw {
    display: flex;
    align-items: stretch;
    background: var(--bg2);
    border: 1.5px solid var(--bd);
    border-radius: 10px;
    transition: border-color .2s;
    overflow: hidden
}

.conv-iw:focus-within {
    border-color: var(--ac);
    box-shadow: 0 0 0 3px var(--glow)
}

.conv-iw input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--t1);
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 600;
    padding: 11px 12px;
    min-width: 0;
    width: 100%
}

.currency-icon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 1px;
  width: 0.7em;
  height: 0.7em;
  object-fit: contain;
}

[data-theme="dark"] .currency-icon {

  filter: invert(1);
}
[data-theme="light"] .currency-icon {
  filter: none;
}

.rc-nbrb-val .currency-icon,
.rc-val .currency-icon,
.rc-bs .currency-icon {
  width: 1em;
  height: 1em;
  margin-left: 1px;
  vertical-align: middle;
}

.rv .currency-icon {
  width: 0.8em;
  height: 0.8em;
  margin-left: 1px;
  vertical-align: middle;
}

.curr-box {
    border: none;
    border-left: 1.5px solid var(--bd2);
    min-width: 80px;
    background: var(--sf3);
    flex-shrink: 0;
    cursor: pointer;
    position: relative
}

.curr-head {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    height: 100%;
    min-height: 44px;
    user-select: none
}

.curr-flag {
    font-size: 17px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0
}

.curr-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--t1);
    white-space: nowrap
}

.curr-chev {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: var(--t3);
    stroke-width: 2;
    stroke-linecap: round;
    transition: transform .2s;
    flex-shrink: 0
}

.curr-box.open .curr-chev {
    transform: rotate(180deg)
}

.curr-drop {
    position: fixed;
    min-width: 240px;
    background: var(--mbg);
    border: 1.5px solid var(--bd2);
    border-radius: 11px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .8);
    /* [ИСПРАВЛЕНО] curr-drop может открываться как из основной страницы, так и
       из модалки/шторки — поднимаем выше слоя самих оверлеев, чтобы не прятался. */
    z-index: var(--z-dropdown-in-overlay);
    display: none;
    overflow: hidden;
    animation: dropIn .18s var(--ease)
}

.curr-drop.open {
    display: block
}

.curr-drop-inner {
    overflow-y: auto;
    max-height: 260px;
    padding: 4px
}

.curr-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 7px;
    cursor: pointer;
    transition: background .15s
}

.curr-opt:hover {
    background: var(--sf2)
}

.curr-opt.active {
    background: rgba(56, 189, 248, .1)
}

.curr-opt-flag {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center
}

.curr-opt-name {
    flex: 1;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--t2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0
}

.curr-opt.active .curr-opt-name {
    color: var(--t1)
}

.curr-opt-rate {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--t3);
    flex-shrink: 0
}

.swap-row {
    display: flex;
    justify-content: center;
    margin: 5px 0
}

.swap-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--bd2);
    background: var(--sf2);
    color: var(--ac);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s var(--spring)
}

.swap-btn:hover {
    background: var(--ac);
    color: #fff;
    transform: rotate(180deg)
}

.swap-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round
}

.conv-result {
    background: linear-gradient(135deg, var(--bg2), var(--bg3));
    border: 1px solid var(--bd2);
    border-radius: 10px;
    padding: 13px;
    margin-top: 10px
}

.conv-res-big {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--ac);
    margin-bottom: 3px;
    letter-spacing: -.5px
}

.conv-res-lbl {
    font-size: 10px;
    color: var(--t3)
}

.conv-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 10px
}

.cm {
    background: var(--bg3);
    border-radius: 8px;
    padding: 8px 10px;
    border: 1px solid var(--bd)
}

.cm-lbl {
    font-size: 9px;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 700
}

.cm-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    margin-top: 3px
}

.cm-val.g {
    color: var(--ac3)
}

.cm-val.r {
    color: var(--red)
}

.cm-val.b {
    color: var(--ac2)
}

.qwrap {
    margin-top: 10px
}

.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: 44px
}

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

.nbrb-info-card {
    background: var(--sf);
    border: 1px solid var(--bd);
    border-radius: var(--r);
    padding: 14px;
    margin-top: 12px
}

.ni-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--ac2);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px
}

.ni-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 11.5px
}

.ni-curr {
    color: var(--t2);
    display: flex;
    align-items: center;
    gap: 5px
}

.ni-val {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--ac2)
}

.cmp-float {
    position: fixed;
    bottom: max(calc(var(--nav-h) + 16px), calc(var(--nav-h) + var(--safe-b) + 16px));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    /* [ИСПРАВЛЕНО] используем именованную переменную вместо магического числа,
       чтобы порядок слоёв был предсказуемым и явным. */
    z-index: var(--z-cmp-float);
    background: var(--sf);
    border: 1.5px solid var(--bd2);
    border-radius: 50px;
    padding: 9px 12px 9px 16px;
    display: flex;
    align-items: center;
    gap: 9px;
    box-shadow: var(--shlg);
    transition: transform .36s var(--spring), opacity .3s;
    opacity: 0;
    pointer-events: none;
    max-width: calc(100vw - 32px);
}

.cmp-float.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: all
}

.cmp-float-txt {
    font-size: 12px;
    font-weight: 600;
    color: var(--t2);
    white-space: nowrap
}

.cmp-cnt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--ac);
    background: rgba(56, 189, 248, .1);
    border: 1px solid rgba(56, 189, 248, .2);
    border-radius: 20px;
    padding: 2px 9px
}

.cmp-chips {
    display: flex;
    gap: 4px;
    align-items: center
}

.cmp-chip {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 7px;
    background: var(--sf2);
    border: 1px solid var(--bd2);
    font-size: 11px;
    font-weight: 600;
    color: var(--t1)
}

.cmp-chip-logo {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6px;
    font-weight: 800;
    font-family: 'Syne', sans-serif;
    color: #fff;
    flex-shrink: 0
}

.cmp-chip-del {
    background: none;
    border: none;
    color: var(--t3);
    cursor: pointer;
    font-size: 10px;
    padding: 0 0 0 2px;
    transition: color .15s
}

.cmp-chip-del:hover {
    color: var(--red)
}

.cmp-float-acts {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-left: 4px
}

.cmp-go {
    background: linear-gradient(135deg, var(--ac), var(--ac2));
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 7px 15px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
    transition: all .2s;
    white-space: nowrap
}

.cmp-go:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 16px var(--glow)
}

.cmp-clear {
    background: none;
    border: 1px solid var(--bd2);
    color: var(--t3);
    border-radius: 20px;
    padding: 7px 11px;
    font-size: 11px;
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
    transition: all .2s
}

.cmp-clear:hover {
    border-color: var(--red);
    color: var(--red)
}

.rc-flag .fi,
.curr-opt-flag .fi,
.curr-flag .fi,
.ni-curr .fi {
    border-radius: 50%;
    background-size: cover !important;
    display: inline-block;
    transition: box-shadow .2s ease, transform .2s ease
}

.rc-flag {
    overflow: hidden;
    border-radius: 50%
}

.rc-flag .fi {
    width: 100%;
    height: 100%;
    display: block;
    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)
}

.curr-opt-flag .fi,
.curr-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)
}

.ni-curr .fi {
    width: 1em;
    height: 1em;
    margin-right: 2px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .15), 0 0 0 1px rgba(255, 255, 255, .12), 0 2px 4px rgba(0, 0, 0, .2)
}

[data-theme="light"] .rc-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)
}

[data-theme="light"] .curr-opt-flag .fi,
[data-theme="light"] .curr-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)
}

.modal-ov {
    position: fixed;
    inset: 0;
    /* [ИСПРАВЛЕНО] модалка должна перекрывать нижний таб-бар (был 7000 < 9999) */
    z-index: var(--z-overlay);
    background: rgba(0, 0, 0, .8);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
    display: flex;
    align-items: flex-end;
    justify-content: center
}

.modal-ov.open {
    opacity: 1;
    visibility: visible
}

.modal-box {
    background: var(--mbg);
    border: 1.5px solid var(--bd2);
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    width: 100%;
    max-width: 960px;
    /* [НОВОЕ] используем --real-vh для корректной высоты в Safari */
    max-height: calc(var(--real-vh, 1vh) * 90);
    display: flex;
    flex-direction: column;
    transform: translateY(60px);
    transition: transform .34s var(--ease);
    overflow: hidden;
    /* [НОВОЕ] модалка сама лежит поверх таб-бара — резервируем безопасную зону снизу
       под собственным контентом, а не под чужим таб-баром */
    padding-bottom: var(--safe-bottom);
}

.modal-ov.open .modal-box {
    transform: translateY(0)
}

@media (min-width: 860px) {
    .modal-ov {
        align-items: center
    }

    .modal-box {
        border-radius: 18px;
        border: 1.5px solid var(--bd2);
        max-height: calc(var(--real-vh, 1vh) * 88);
        /* [НОВОЕ] real-vh */
    }
}

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

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

.modal-head {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 18px 12px;
    border-bottom: 1px solid var(--bd);
    flex-shrink: 0
}

.modal-head h2 {
    font-family: 'Syne', sans-serif;
    font-size: 17px;
    font-weight: 800;
    flex: 1
}

.modal-cnt {
    font-size: 12px;
    color: var(--t3);
    font-weight: 600
}

.modal-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--sf2);
    border: 1px solid var(--bd);
    color: var(--t2);
    font-size: 13px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all .2s
}

.modal-close:hover {
    background: var(--red);
    color: #fff;
    transform: rotate(90deg)
}

.modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 12px 18px
}

.modal-ctrl {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 11px;
    align-items: center
}

.server-modal-box {
    max-width: 420px;
    border-radius: 20px;
    padding: 0;
    overflow: visible;
    position: relative;
}

.server-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
}

.server-modal-body {
    text-align: center;
    padding: 32px 24px 28px;
}

.server-modal-icon {
    font-size: 48px;
    color: var(--ac2);
    margin-bottom: 16px;
    animation: pulse 2s ease-in-out infinite;
}

.server-modal-title {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--t1);
}

.server-modal-text {
    font-size: 13px;
    color: var(--t2);
    line-height: 1.5;
    margin-bottom: 24px;
}

.server-modal-btn {
    padding: 10px 24px;
    font-size: 14px;
}

.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
}

.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 {
    position: relative;
    background: var(--bg);
    border-top: 1px solid var(--line);
    padding: 32px 20px;
    padding-bottom: calc(32px + var(--safe-bottom));
    overflow: hidden;
}

.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)
}

.fi {
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .05)
}

.conv-header-switch {
    display: flex;
    align-items: center;
    gap: 8px
}

.conv-header-switch .type-toggle {
    margin-bottom: 0;
    border-radius: 8px;
    padding: 2px
}

.conv-header-switch .type-btn {
    padding: 4px 10px;
    font-size: 11px;
    min-height: 30px;
    gap: 4px;
    font-weight: 600
}

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    /* [ИСПРАВЛЕНО] используем именованную переменную; сам таб-бар остаётся
       базовым слоем постоянного UI — все полноэкранные оверлеи (меню/модалки/
       шторки) теперь лежат строго выше него (--z-overlay = 20000). */
    z-index: var(--z-bottom-nav);
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--bg);
    border-top: 1px solid var(--line);
    padding-top: 8px;
    padding-bottom: max(8px, var(--safe-bottom));
    min-height: 64px;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

.mobile-bottom-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
    z-index: -1;
}

@supports(padding:max(0px)) {
    .mobile-bottom-nav {
        padding-left: max(16px, var(--safe-left));
        padding-right: max(16px, var(--safe-right));
    }
}

@supports(backdrop-filter:blur(1px)) {
    .mobile-bottom-nav {
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
    }
}

.bottom-nav::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(-1 * var(--safe-bottom));
    height: var(--safe-bottom);
    background: inherit;
}

.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-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 16px;
    height: 16px;
    background: var(--red);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    border-radius: 8px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg);
    opacity: 0;
    transform: scale(0);
    transition: all .2s var(--spring);
}

.bnav-badge.show {
    opacity: 1;
    transform: scale(1)
}

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

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    /* [ИСПРАВЛЕНО] был 9000 — ниже таб-бара (9999). Теперь строго выше. */
    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;
    /* [ИСПРАВЛЕНО] был 9100 — ниже таб-бара (9999), поэтому таб-бар "просвечивал"
       поверх открытой шторки. Теперь шторка полностью перекрывает нижний таб-бар. */
    z-index: var(--z-overlay-content);
    background: var(--drawer-bg);
    border-radius: 24px 24px 0 0;
    border: 1px solid var(--bd2);
    border-bottom: none;
    /* [НОВОЕ] используем real-vh для корректной высоты в Safari */
    max-height: calc(var(--real-vh, 1vh) * 88);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform .38s var(--spring);
    /* [ИСПРАВЛЕНО] раньше резервировалось место под нижний таб-бар (var(--nav-h)),
       хотя шторка теперь полностью его перекрывает — оставляем только safe-area,
       чтобы контент шторки не терял впустую высоту экрана */
    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 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-nbrb-sub {
    font-size: 9px;
    color: var(--t3);
    margin-top: 2px
}

.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;
}

@media (max-width: 1100px) {
    .page-grid {
        grid-template-columns: 1fr
    }

    .side-col {
        position: static
    }
}

@media (max-width: 768px) {
    header {
        display: none
    }

    body::after {
        content: '';
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
        background: var(--nav-bg);
        z-index: 5999;
        pointer-events: none;
    }

    .mobile-topbar {
        display: flex
    }

    .bottom-nav {
        display: block
    }

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

    .mob-section-label {
        display: block
    }

    .hero {
        padding: 14px 0 14px
    }

    .h1 {
        font-size: 24px
    }

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

    .hs-val {
        font-size: 15px
    }

    .hs-lbl {
        font-size: 9px
    }

    .hero-stats {
        display: none;
    }

    .rate-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 14px;
    }

    .rc {
        padding: 10px 9px
    }

    .rc-nm {
        font-size: 12px
    }

    .rc-fl {
        font-size: 8.5px
    }

    .rc-nbrb-val {
        font-size: 13px
    }

    .rc-val {
        font-size: 16px
    }

    .rc-spark {
        height: 24px
    }

    .rc-flag {
        width: 24px;
        height: 24px;
        font-size: 12px
    }

    .rc-badge {
        font-size: 9px;
        padding: 2px 6px
    }

    .rc-bs {
        gap: 4px
    }

    .bs-v {
        font-size: 11px
    }

    .tbl-ctrl {
        flex-wrap: wrap;
        gap: 6px
    }

    .sbox {
        max-width: none;
        flex: 1 1 100%
    }

    .sort-sel {
        flex: 1
    }

    .cmp-float {
        flex-wrap: wrap;
        border-radius: 16px;
        padding: 10px 12px;
        bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
    }

    .cmp-float-acts {
        width: 100%;
        justify-content: flex-end
    }

    .side-col {
        display: none
    }

    .page-grid {
        grid-template-columns: 1fr;
        gap: 14px
    }


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

    .ticker-bar {
        font-size: 10px
    }

    .t-item {
        font-size: 10px;
        padding: 0 10px
    }

    .table-wrap table {
        min-width: 100%;
        width: 100%;
    }

    .table-wrap thead th:nth-child(4),
    .table-wrap tbody td:nth-child(4) {
        display: none;
    }

    .table-wrap thead th:nth-child(5),
    .table-wrap tbody td:nth-child(5) {
        padding: 4px;
        text-align: center;
    }

    .table-wrap thead th:nth-child(5) {
        font-size: 0;
    }

    .table-wrap thead th:nth-child(5)::after {
        content: "⚖️";
        font-size: 12px;
        display: inline-block;
    }

    .table-wrap thead th,
    .table-wrap tbody td {
        padding: 6px 6px;
        font-size: 11px;
    }

    .table-wrap .b-nm {
        font-size: 11px;
    }

    .table-wrap .rv {
        font-size: 12px;
    }

    .table-wrap .b-info {
        gap: 5px;
    }

    .cmp-chk {
        width: 16px;
        height: 16px;
        border-radius: 4px;
    }

}

@media (max-width: 480px) {
    .rate-cards {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 4px;
        margin-bottom: 14px;
    }

    .rc {
        flex: 0 0 auto;
        width: 200px;
        max-width: 68vw;
        scroll-snap-align: start;
    }

    .rc-spark {
        display: none;
    }

    .rc-val {
        font-size: 18px
    }

    .rc-nbrb-val {
        font-size: 14px
    }

    .rc-flag {
        width: 28px;
        height: 28px
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr)
    }

    .table-wrap thead th,
    .table-wrap tbody td {
        padding: 5px 4px;
    }

    .table-wrap .b-nm {
        font-size: 10px;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .table-wrap .rv {
        font-size: 11px;
    }

    .cmp-chk {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 360px) {
    .rc {
        width: 200px;
    }

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

    .mobile-topbar {
        padding: 0 12px
    }

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

    .mob-time {
        font-size: 10px;
        padding: 2px 5px
    }

    .rate-cards {
        gap: 6px
    }

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

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

    .table-wrap .b-nm {
        font-size: 9px;
        max-width: 65px;
    }

    .table-wrap .rv {
        font-size: 10px;
    }

    .table-wrap thead th,
    .table-wrap tbody td {
        padding: 4px 2px;
    }

    .cmp-chk {
        width: 14px;
        height: 14px;
        margin: 0;
    }
}

@media (max-width: 600px) {
    .modal-box table {
        min-width: 100%;
        width: 100%;
    }

    #mTbody td:nth-child(4),
    #mTbody td:nth-child(5),
    #mTbody th:nth-child(4),
    #mTbody th:nth-child(5) {
        display: none;
    }

    .modal-ctrl {
        flex-wrap: wrap;
    }
}

.mob-conv-sheet {
    display: none;
    position: fixed;
    inset: 0;
    /* [ИСПРАВЛЕНО] был 7500 — ниже таб-бара (9999). Теперь строго выше него. */
    z-index: var(--z-overlay);
    background: var(--mbg);
    flex-direction: column;
    overflow: hidden;
    animation: slideUp .3s var(--ease);
    /* [ИСПРАВЛЕНО] шторка сама полностью перекрывает таб-бар — больше не нужно
       резервировать под него место, оставляем только safe-area снизу */
    padding-bottom: var(--safe-b);
}

.mob-conv-sheet.open {
    display: flex
}

.mob-sheet-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--bd);
    background: var(--hbg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-shrink: 0;
}

.mob-sheet-back {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--sf2);
    border: 1px solid var(--bd);
    color: var(--t2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
}

.mob-sheet-title {
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 800;
    flex: 1
}

.mob-sheet-body {
    overflow-y: auto;
    flex: 1;
    padding: 16px;
    -webkit-overflow-scrolling: touch
}

.mob-chart-sheet {
    display: none;
    position: fixed;
    inset: 0;
    /* [ИСПРАВЛЕНО] был 7500 — ниже таб-бара (9999). Теперь строго выше него. */
    z-index: var(--z-overlay);
    background: var(--mbg);
    flex-direction: column;
    overflow: hidden;
    animation: slideUp .3s var(--ease);
    /* [ИСПРАВЛЕНО] см. .mob-conv-sheet — резерв под таб-бар больше не нужен */
    padding-bottom: var(--safe-b);
}

.mob-logo-mark {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--ac), var(--ac2));
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 9px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 0 12px var(--glow);
}

.mob-chart-sheet.open {
    display: flex
}

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

@media (min-width: 769px) {

    .mob-conv-sheet,
    .mob-chart-sheet {
        display: none !important
    }

    .bottom-nav {
        display: none !important
    }

    .drawer-overlay {
        display: none !important
    }

    .mobile-topbar {
        display: none !important
    }
}

@media (max-width: 600px) {
    .cmp-float {
        padding: 8px 10px;
        border-radius: 16px;
        flex-wrap: wrap;
        gap: 6px;
        max-width: calc(100vw - 20px);
    }

    .cmp-chips {
        flex: 1 1 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .cmp-chips::-webkit-scrollbar {
        display: none;
    }

    .cmp-chip {
        padding: 3px 6px;
        font-size: 10px;
        gap: 2px;
        flex-shrink: 0;
    }

    .cmp-chip-logo {
        width: 12px;
        height: 12px;
        font-size: 6px;
    }

    .cmp-chip span {
        font-size: 10px !important;
        margin-left: 1px;
    }

    .cmp-chip-del {
        padding: 0 0 0 1px;
        font-size: 9px;
    }

    .cmp-float-acts {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .cmp-go {
        padding: 5px 10px;
        font-size: 11px;
    }

    .cmp-clear {
        padding: 5px 8px;
        font-size: 10px;
    }
}

@media (max-width: 400px) {
    .cmp-float-txt {
        font-size: 10px;
    }

    .cmp-go {
        font-size: 10px;
        padding: 4px 8px;
    }

    .cmp-chip span {
        font-size: 9px !important;
    }
}

@media (max-width: 768px) {

    .drawer-overlay,
    .modal-ov,
    .mob-conv-sheet,
    .mob-chart-sheet {
        inset: 0;
    }

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