/* ============================================================
   crypto_style.css — полная версия с добавленными недостающими
   стилями из main_style.css (валютная версия)
   ============================================================ */

:root {
  --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-index слои (как в валютном коде) */
  --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: #060912;
  /* для мета-тега theme-color */

  /* [ДОБАВЛЕНО] цветовая схема для браузера */
  color-scheme: light dark;
}

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

/* [ДОБАВЛЕНО] поддержка safe-area для старых браузеров */
@supports (padding: max(0px)) {
  :root {
    --safe-top: max(env(safe-area-inset-top), 0px);
    --safe-bottom: max(env(safe-area-inset-bottom), 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 {
  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 .3s, color .3s;
  -webkit-font-smoothing: antialiased;
  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;
}
@supports(padding:max(0px)) {
    :root {
        --safe-top: max(env(safe-area-inset-top), 0px);
        --safe-bottom: max(env(safe-area-inset-bottom), 0px);
    }
}


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

/* -------------------- анимированные блобы -------------------- */
.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);
  }
}

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

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--bd2);
  border-top-color: var(--ac);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

/* -------------------- ticker -------------------- */
.ticker-bar {
  position: relative;
  z-index: 10;
  background: var(--sf);
  border-bottom: 1px solid var(--bd);
  overflow: hidden;
}

.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;
  animation: tS 50s linear infinite;
  white-space: nowrap;
  cursor: pointer;
}

.ticker-track:hover {
  animation-play-state: paused;
}

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

.t-sym {
  font-weight: 700;
  color: var(--t1);
}

.t-price {
  color: var(--t2);
  font-size: 10px;
}

.t-chg.up {
  color: var(--ac3);
}

.t-chg.dn {
  color: var(--red);
}

/* -------------------- 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(--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;
}

/* [ДОБАВЛЕНО] стили для изображения и SVG внутри .logo-mark */
.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 .cr {
  color: var(--ac);
}

.logo-badge {
  font-size: 9px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--ac), var(--ac2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: .5px;
  margin-left: 2px;
}

.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 -------------------- */
.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;
  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-logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--t1);
}

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

.mob-logo-badge {
  font-size: 9px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--ac), var(--ac2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 2px;
}

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

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

.two-col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}

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

.side-col {
  position: sticky;
  top: 70px;
  min-width: 0;
}

/* -------------------- hero -------------------- */
.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 {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.hero-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.hero-tag {
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--sf2);
  border: 1px solid var(--bd2);
  color: var(--t2);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-tag:hover {
  border-color: var(--ac);
  color: var(--ac);
}

.hero-tag.active-tag {
  border-color: var(--ac);
  color: var(--ac);
  background: rgba(56, 189, 248, .08);
}

/* -------------------- market strip -------------------- */
.market-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.mcard {
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color .2s, box-shadow .2s;
}

.mcard:hover {
  border-color: var(--bd2);
  box-shadow: var(--sh);
}

.mcard-icon {
  font-size: 22px;
  flex-shrink: 0;
  color: var(--ac);
}

.mcard-lbl {
  font-size: 10px;
  color: var(--t3);
  margin-bottom: 2px;
}

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

.mcard-sub {
  font-size: 10px;
  font-weight: 600;
  margin-top: 2px;
}

.up {
  color: var(--ac3);
}

.dn {
  color: var(--red);
}

/* -------------------- top coins cards -------------------- */
.top-coins {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.cc-card {
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}

.cc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shlg);
  border-color: var(--bd2);
}

.cc-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.cc-card[data-sym="BTC"]::after {
  background: linear-gradient(90deg, #f7931a, transparent);
}
.cc-card[data-sym="ETH"]::after {
  background: linear-gradient(90deg, #627eea, transparent);
}
.cc-card[data-sym="BNB"]::after {
  background: linear-gradient(90deg, #f0b90b, transparent);
}
.cc-card[data-sym="SOL"]::after {
  background: linear-gradient(90deg, #9945ff, transparent);
}
.cc-card[data-sym="XRP"]::after {
  background: linear-gradient(90deg, #00aae4, transparent);
}
.cc-card[data-sym="ADA"]::after {
  background: linear-gradient(90deg, #0d1e30, transparent);
}

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

.cc-coin {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coin-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  overflow: hidden;
}

.coin-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cc-sym {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
}

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

.chg-badge {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

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

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

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

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

.cc-byn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--ac);
  font-weight: 600;
  margin-bottom: 6px;
}

.cc-spark {
  height: 36px;
  margin-top: 6px;
}

.cc-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--bd);
  font-size: 10px;
  color: var(--t3);
}

.cc-meta span {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--t2);
}

/* -------------------- section header -------------------- */
.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;
}

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

/* -------------------- table -------------------- */
.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: 220px;
  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);
}

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

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

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

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

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

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

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

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

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

.rank-n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--t3);
  font-weight: 600;
  width: 32px;
}

.coin-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.coin-ico-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
}

.coin-ico-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coin-nm {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
}

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

.price-usd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
}

.price-byn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ac);
  margin-top: 1px;
}

.chg-cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 700;
}

.mcap-cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--t2);
}

.spark-cell {
  width: 80px;
}

.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 -------------------- */
.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: flex-start;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 8px;
}

.chart-coin-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-coin-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
}

.chart-coin-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.chart-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  font-weight: 700;
  color: var(--t1);
  letter-spacing: -.5px;
}

.chart-price-byn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--ac);
  font-weight: 600;
}

.chart-chg {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  margin-top: 4px;
  display: inline-block;
}

.chart-chg.up {
  background: rgba(16, 185, 129, .1);
  color: var(--ac3);
}

.chart-chg.dn {
  background: rgba(244, 63, 94, .1);
  color: var(--red);
}

.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;
  margin-top: 14px;
}

.chart-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.cst {
  background: var(--bg2);
  border-radius: 9px;
  padding: 10px;
}

.cst-lbl {
  font-size: 9px;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 3px;
}

.cst-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
}

/* -------------------- converter -------------------- */
.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;
  gap: 6px;
}

/* [ДОБАВЛЕНО] переключатель внутри заголовка конвертера (как в main) */
.conv-header-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.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;
}

.conv-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ac3);
  box-shadow: 0 0 7px var(--ac3);
  animation: pulse 2s infinite;
  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;
}

.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: 18px;
  font-weight: 600;
  padding: 10px 12px;
  min-width: 0;
  border-radius: 8px 0 0 8px;
}

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

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

.curr-flag {
  width: 22px;
  height: 22px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.curr-flag img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.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);
  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-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 1rem;
}

.curr-opt-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.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-main {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--ac);
  margin-bottom: 3px;
  letter-spacing: -.3px;
}

/* [ДОБАВЛЕНО] дополнительные классы для результата конвертера (совместимость с main) */
.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.o {
  color: var(--ac);
}
.cm-val.r {
  color: var(--red);
}

.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 10px;
  border-radius: 8px;
  font-size: 11px;
  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);
}

/* -------------------- FNG / Dominance -------------------- */
.fng-card {
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 16px;
  margin-top: 12px;
}

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

.fng-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.fng-arc {
  width: 100%;
  height: 70px;
  position: relative;
}

.fng-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  line-height: 1;
}

.fng-label {
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.fng-desc {
  font-size: 10px;
  color: var(--t3);
  text-align: center;
  line-height: 1.5;
  margin-top: 4px;
}

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

.dom-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dom-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.dom-label {
  font-size: 11px;
  font-weight: 600;
  width: 40px;
  flex-shrink: 0;
}

.dom-bar-bg {
  flex: 1;
  background: var(--bg2);
  border-radius: 3px;
  height: 6px;
  overflow: hidden;
}

.dom-bar {
  height: 100%;
  border-radius: 3px;
  transition: width .8s var(--ease);
}

.dom-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  width: 42px;
  text-align: right;
  flex-shrink: 0;
}

/* -------------------- modal -------------------- */
.modal-ov {
  position: fixed;
  inset: 0;
  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;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(60px);
  transition: transform .34s var(--ease);
  overflow: hidden;
}

.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: 88vh;
  }
}

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

/* [ДОБАВЛЕНО] стили для серверной модалки (из main) */
.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 -------------------- */
.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 -------------------- */
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);
}

/* ========== ПЛАВАЮЩАЯ ПАНЕЛЬ СРАВНЕНИЯ ========== */
.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);
}

/* ========== НИЖНИЙ ТАБ-БАР ========== */
.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-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;
}

/* ========== MOBILE DRAWER MENU ========== */
.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-market-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

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

.drawer-market-lbl {
  font-size: 10px;
  color: var(--t3);
  margin-bottom: 3px;
}

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

.drawer-market-sub {
  font-size: 9px;
  font-weight: 600;
  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);
}

/* ========== MOBILE CONVERTER & CHART SHEETS ========== */
.mob-conv-sheet,
.mob-chart-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--mbg);
  flex-direction: column;
  overflow: hidden;
  animation: slideUp .3s var(--ease);
  padding-bottom: var(--safe-b);
}

.mob-conv-sheet.open,
.mob-chart-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-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;
}

/* ========== RESPONSIVE ========== */
@media (max-width:1100px) {
  .two-col {
    grid-template-columns: 1fr;
  }
  .side-col {
    position: static;
  }
}

@media (max-width:860px) {
  .top-coins {
    grid-template-columns: repeat(2, 1fr);
  }
  .market-strip {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .chart-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width:768px) {
  header {
    display: none;
  }
  .mobile-topbar {
    display: flex;
  }
  .bottom-nav {
    display: block;
  }
  .wrap {
    padding: 0 max(12px, var(--safe-left)) calc(var(--nav-h) + var(--safe-b) + 20px);
    padding-right: max(12px, var(--safe-right));
  }
  .mob-section-label {
    display: block;
  }
  .hero-stats {
    display: none;
  }
  .hero {
    padding: 14px 0 14px;
  }
  .h1 {
    font-size: 24px;
  }
  .hero-sub {
    font-size: 12.5px;
  }
  .hs-val {
    font-size: 13px;
  }
  .hs-lbl {
    font-size: 9px;
  }
  .hero-tags {
    gap: 5px;
  }
  .hero-tag {
    font-size: 10px;
    padding: 4px 9px;
  }
  .market-strip {
    gap: 6px;
    margin-bottom: 12px;
  }
  .mcard {
    padding: 10px 12px;
  }
  .mcard-val {
    font-size: 13px;
  }
  .top-coins {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }
  .cc-card {
    padding: 12px 10px;
  }
  .cc-sym {
    font-size: 13px;
  }
  .cc-usd {
    font-size: 17px;
  }
  .cc-byn {
    font-size: 12px;
  }
  .cc-spark {
    height: 28px;
  }
  .coin-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  .chart-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .chart-price {
    font-size: 20px;
  }
  .side-col {
    display: none;
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  footer {
    display: none;
  }
  .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(6),
  .table-wrap tbody td:nth-child(6) {
    display: none;
  }
  .table-wrap thead th,
  .table-wrap tbody td {
    padding: 6px 6px;
    font-size: 11px;
  }
  .coin-nm {
    font-size: 11px;
  }
  .price-usd {
    font-size: 11px;
  }
  .price-byn {
    font-size: 10px;
  }
  .coin-ico-sm {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }
  .spark-cell {
    display: none;
  }
  .table-wrap thead th:nth-child(7),
  .table-wrap tbody td:nth-child(7) {
    display: none;
  }

  /* [ДОБАВЛЕНО] no-scroll для блокировки прокрутки при открытых оверлеях */
  body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  /* [ДОБАВЛЕНО] адаптивные стили для плавающей панели сравнения */
  .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;
  }
}

@media (max-width:480px) {
  .top-coins {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
    margin-bottom: 12px;
  }
  .cc-card {
    flex: 0 0 auto;
    width: 240px;
    max-width: 80vw;
    scroll-snap-align: start;
  }
  .coin-nm {
    font-size: 10px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width:400px) {
  /* [ДОБАВЛЕНО] мелкие правки для cmp-float на узких экранах */
  .cmp-float-txt {
    font-size: 10px;
  }
  .cmp-go {
    font-size: 10px;
    padding: 4px 8px;
  }
  .cmp-chip span {
    font-size: 9px !important;
  }
}

@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;
  }
  .mob-time {
    font-size: 10px;
    padding: 2px 5px;
  }
  .bnav-item {
    min-width: 44px;
  }
  .bnav-label {
    font-size: 9px;
  }
  .cc-card {
    width: 200px;
  }
}

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