/* Compact scrolling price strip — same outer box as legacy single-DT ticker */
.ticker.header-ticker {
  display: block;
  position: relative;
  width: 196px;
  max-width: 196px;
  min-width: 160px;
  height: 36px;
  padding: 0 12px;
  overflow: hidden;
  direction: ltr;
  unicode-bidi: isolate;
}

.header-ticker-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.header-ticker-track {
  display: flex;
  width: max-content;
  flex-shrink: 0;
  will-change: transform;
  backface-visibility: hidden;
}

.header-ticker-track.header-ticker-track--ready {
  /* Position driven by JS requestAnimationFrame — no CSS loop reset */
}

.header-ticker-segment {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}

.header-ticker-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  white-space: nowrap;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}

.header-ticker-coin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #0a0a0a;
  flex-shrink: 0;
}

.header-ticker-coin img {
  width: 14px;
  height: 14px;
  display: block;
}

.header-ticker-symbol {
  font-weight: 600;
  color: var(--text);
}

.header-ticker-price {
  color: var(--text);
  min-width: 8.5ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.header-ticker-change {
  font-weight: 500;
}

.header-ticker-change.pos {
  color: var(--mint);
}

.header-ticker-change.neg {
  color: #ff5c7c;
}

.header-ticker-divider {
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 2px;
}

@media (max-width: 1100px) {
  .ticker.header-ticker:not(.header-ticker--mobile) {
    width: 168px;
    max-width: 168px;
    min-width: 148px;
    padding: 0 10px;
  }

  .ticker.header-ticker:not(.header-ticker--mobile) .header-ticker-item {
    font-size: 11px;
    gap: 4px;
    padding: 0 10px;
  }

  .ticker.header-ticker:not(.header-ticker--mobile) .header-ticker-coin {
    width: 14px;
    height: 14px;
    font-size: 8px;
  }

  .ticker.header-ticker:not(.header-ticker--mobile) .header-ticker-coin img {
    width: 12px;
    height: 12px;
  }
}

/* Mobile header slot — compact ticker immediately left of hamburger (login/register) */
.header-leading {
  display: none;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 0;
}

.ticker.header-ticker--mobile {
  display: none;
}

@media (max-width: 900px) {
  .header-leading {
    display: flex;
  }

  .ticker.header-ticker--desktop {
    display: none !important;
  }

  .ticker.header-ticker--mobile {
    display: block;
    width: 86px;
    max-width: 86px;
    min-width: 86px;
    height: 24px;
    padding: 0 6px;
    border-radius: 6px;
    flex-shrink: 0;
  }

  .header-ticker--mobile .header-ticker-item {
    font-size: 9px;
    gap: 3px;
    padding: 0 6px;
  }

  .header-ticker--mobile .header-ticker-coin {
    width: 11px;
    height: 11px;
    font-size: 7px;
  }

  .header-ticker--mobile .header-ticker-price {
    min-width: 6.5ch;
    font-size: 9px;
  }

  .header-ticker--mobile .header-ticker-symbol {
    font-size: 9px;
  }

  .header-ticker--mobile .header-ticker-change {
    display: none;
  }

  .header-ticker--mobile .header-ticker-divider {
    height: 10px;
    margin: 0 1px;
  }

  header {
    padding-top: 8px;
    padding-bottom: 8px;
    min-height: 0;
  }

  header .header-brand {
    gap: 6px;
  }

  header .header-brand span {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
  }

  header .brand-logo--header {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    aspect-ratio: 1 / 1;
  }

  .header-leading .mobile-menu-btn {
    display: flex;
  }
}
