/* ==============================================================================
   BROKER TRADE CENTER STYLING SYSTEM
   Directly ported from https://brokertradecenter.tech/
   - Warm Paper (#f5f2ea) / Dark Obsidian (#0e0f12)
   - Pixelify Sans / IBM Plex Sans / JetBrains Mono typography
   - Signature pop card-in-card pattern
   - Seamless Light / Dark theme support
   - Precision pill badges and tape mask marquee
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Pixelify+Sans:wght@400;500;700&display=swap');

:root, :host {
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --font-display: 'Pixelify Sans', 'Segoe UI', sans-serif;

  /* Light Theme (Default brokertradecenter.tech) */
  --paper: #f5f2ea;
  --paper-2: #eae6dc;
  --ink: #18191c;
  --muted: #737680;
  --frame: #dcd7cc;
  --line: rgba(0, 0, 0, 0.08);
  --well: #eae6dc;
  --well-2: #dfdbd0;
  --head: #0b0b0c;
  --head-lit: #222326;
  --phos: #22c55e;
  --gold: #f5c542;
  --alert: #ff3b4e;
  --brand: #3ea6ff;
  --cyan: #22d3ee;
}

[data-theme="dark"] {
  --paper: #0e0f12;
  --paper-2: #15171d;
  --ink: #ededed;
  --muted: #8b949e;
  --frame: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.06);
  --well: #090a0d;
  --well-2: #121419;
  --head: #ffffff;
  --head-lit: #e0e0e0;
  --phos: #22c55e;
  --gold: #f5c542;
  --alert: #ff3b4e;
  --brand: #3ea6ff;
  --cyan: #22d3ee;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body {
  background-image: radial-gradient(rgba(26, 18, 24, 0.05) 0.55px, transparent 0.7px);
  background-size: 3px 3px;
}

[data-theme="dark"] body {
  background-image: radial-gradient(rgba(255, 78, 200, 0.05) 0.7px, transparent 0.8px),
                    radial-gradient(rgba(62, 231, 255, 0.03) 0.7px, transparent 0.8px);
  background-position: 0 0, 2px 2px;
  background-size: 4px 4px, 7px 7px;
}

/* Master Container */
.app-container {
  position: relative;
  z-index: 10;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 1080px;
  flex-direction: column;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-bottom: 7rem;
}

@media (min-width: 640px) {
  .app-container {
    padding-bottom: 2.5rem;
  }
}

/* Header */
header.btc-header {
  display: flex;
  height: 68px;
  flex-shrink: 0;
  align-items: center;
  gap: 0.75rem;
}

.logo-wrap {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  transition: opacity 0.15s;
  text-decoration: none;
  gap: 0.5rem;
}

.logo-wrap:hover {
  opacity: 0.8;
}

.logo-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--head);
  color: var(--paper);
  display: grid;
  place-items: center;
}

.nav-links-row {
  margin-left: auto;
  display: none;
  min-width: 0;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 1024px) {
  .nav-links-row {
    display: flex;
  }
}

.nav-btn {
  display: inline-flex;
  height: 32px;
  flex-shrink: 0;
  align-items: center;
  border-radius: 9999px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.15s;
  color: var(--muted);
}

.nav-btn:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-btn.active {
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 600;
}

.nav-btn.gold-outline {
  border: 1px solid rgba(245, 197, 66, 0.6);
  color: var(--gold);
}

.nav-btn.gold-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Header Meta & Contract Pill */
.header-right-meta {
  margin-left: auto;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.4rem;
}

@media (min-width: 1024px) {
  .header-right-meta {
    margin-left: 0.5rem;
  }
}

.contract-pill {
  display: inline-flex;
  height: 32px;
  flex-shrink: 0;
  align-items: center;
  gap: 0.4rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding-left: 0.65rem;
  padding-right: 0.4rem;
  font-size: 11px;
}

.contract-pill a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}

.contract-pill .tnum {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--muted);
}

.icon-btn {
  display: grid;
  height: 32px;
  width: 32px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--head);
}

.pill-connect {
  display: inline-flex;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.pill-connect:hover {
  background: var(--paper);
  border-color: var(--head);
}

/* Tape Mask (Running Marquee Bar) */
.tape-mask {
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(234, 230, 220, 0.4);
  padding-top: 7px;
  padding-bottom: 7px;
  white-space: nowrap;
  position: relative;
}

[data-theme="dark"] .tape-mask {
  background: rgba(9, 10, 13, 0.4);
}

.tape-marquee-inner {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  animation: tapeScroll 38s linear infinite;
}

.tape-mask:hover .tape-marquee-inner {
  animation-play-state: paused;
}

@keyframes tapeScroll {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.tape-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 11px;
  color: var(--muted);
}

.tape-cell .tape-badge {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.tape-cell .tape-badge.live {
  background: rgba(34, 197, 94, 0.15);
  color: var(--phos);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.tape-cell .tape-badge.swap {
  background: rgba(62, 166, 255, 0.15);
  color: var(--brand);
  border: 1px solid rgba(62, 166, 255, 0.3);
}

.tape-cell .tape-badge.gold {
  background: rgba(245, 197, 66, 0.15);
  color: var(--gold);
  border: 1px solid rgba(245, 197, 66, 0.3);
}

.tape-cell .tape-bold {
  font-weight: 700;
  color: var(--ink);
}

.tape-cell .tape-tx {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

/* ==============================================================================
   SIGNATURE POP CARD PATTERNS
   ============================================================================== */
.pop {
  border-radius: 14px;
  border: 1px solid var(--frame);
  background: var(--paper-2);
  padding: 5px;
  margin-bottom: 1.25rem;
}

.pop-inner {
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 1rem 1.25rem;
}

/* Hero Section (Dark Obsidian Banner like brokertradecenter) */
.hero-pop-dark {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #0b0b0c;
  color: #fff;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  transition: background-color 0.25s ease, color 0.25s ease;
}

@media (min-width: 640px) {
  .hero-pop-dark {
    padding: 1.5rem;
  }
}

/* In Dark Theme: The hero box inverts to crisp white with dark typography */
[data-theme="dark"] .hero-pop-dark {
  background-color: #ffffff !important;
  color: #0b0b0c !important;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .hero-pop-dark .hero-token-name {
  color: #0b0b0c !important;
}

[data-theme="dark"] .hero-pop-dark .hero-subtitle {
  color: #3b3d44 !important;
}

[data-theme="dark"] .hero-pop-dark .logo-plate {
  background: #f4f0e6 !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}

[data-theme="dark"] .hero-pop-dark .hero-pill {
  border-color: rgba(0, 0, 0, 0.15) !important;
  background: rgba(0, 0, 0, 0.05) !important;
  color: #1a1b1e !important;
}

[data-theme="dark"] .hero-pop-dark .hero-pillar-box {
  background: #f5f2ea !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="dark"] .hero-pop-dark .hero-pillar-box strong {
  color: var(--ink) !important;
}

[data-theme="dark"] .hero-pop-dark .hero-pillar-box p {
  color: #4a4d56 !important;
}

[data-theme="dark"] .hero-pop-dark .hero-fee-strip {
  background: rgba(245, 197, 66, 0.18) !important;
  border-color: rgba(217, 163, 23, 0.45) !important;
  color: #1a1b1e !important;
}

.hero-pop-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.logo-plate {
  display: grid;
  height: 52px;
  width: 52px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 12px;
  background: #14151a;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

@media (min-width: 640px) {
  .logo-plate {
    height: 58px;
    width: 58px;
  }
}

.hero-title-group {
  min-width: 0;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-token-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1;
}

@media (min-width: 640px) {
  .hero-token-name {
    font-size: 32px;
  }
}

.badge-check-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #3ea6ff;
}

.hero-subtitle {
  margin-top: 0.35rem;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.35;
}

.hero-status-pills {
  margin-left: auto;
  display: none;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .hero-status-pills {
    display: flex;
  }
}

.hero-pill {
  display: inline-flex;
  height: 32px;
  flex-shrink: 0;
  align-items: center;
  gap: 0.4rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
}

.hero-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f5c542;
}

.hero-desc {
  margin-top: 0.85rem;
  max-width: 58ch;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
}

/* ==============================================================================
   LAUNCH / TREASURY PROGRESS SEQUENCE
   ============================================================================== */
.sequence-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.sequence-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.025em;
  color: var(--ink);
}

.sequence-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.sequence-desc {
  margin-top: 0.4rem;
  max-width: 72ch;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* Protocol Progress Bar */
.treasury-bar-box {
  margin-top: 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(234, 230, 220, 0.4);
  padding: 0.85rem 1rem;
}

[data-theme="dark"] .treasury-bar-box {
  background: rgba(9, 10, 13, 0.4);
}

.progress-track {
  position: relative;
  margin-top: 0.5rem;
  height: 10px;
  overflow: hidden;
  border-radius: 9999px;
  background: rgba(24, 25, 28, 0.1);
}

[data-theme="dark"] .progress-track {
  background: rgba(255, 255, 255, 0.1);
}

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: var(--head);
  transition: width 0.7s ease;
}

.milestones-row {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 10.5px;
  color: var(--muted);
}

.milestone-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.milestone-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* 4 Sequence Step Cards */
.sequence-steps-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .sequence-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .sequence-steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step-seq-card {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 0.75rem 0.85rem;
}

.step-seq-card.active {
  border-color: var(--head);
  background: rgba(24, 25, 28, 0.04);
}

[data-theme="dark"] .step-seq-card.active {
  background: rgba(255, 255, 255, 0.06);
}

.step-tag-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.step-status-tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.step-status-tag.done { color: var(--phos); }
.step-status-tag.now { color: var(--head); }
.step-status-tag.next { color: var(--muted); }

.step-seq-title {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.step-seq-desc {
  margin-top: 0.35rem;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

/* ==============================================================================
   4 PILLARS GRID (PORTED DIRECTLY FROM BROKER TRADE CENTER)
   ============================================================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .pillars-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pillar-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  transition: all 0.2s ease-out;
  text-decoration: none;
  color: inherit;
}

.pillar-card:hover {
  transform: translateY(-2px);
  border-color: var(--head);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.25);
}

.pillar-img-wrap {
  position: relative;
  display: block;
  height: 96px;
  width: 100%;
  overflow: hidden;
  background: var(--well-2);
}

.pillar-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s ease-out;
}

.pillar-card:hover .pillar-img {
  transform: scale(1.06);
}

.pillar-icon-badge {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  display: grid;
  height: 24px;
  width: 24px;
  place-items: center;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  color: #fff;
}

.pillar-body {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  padding: 0.65rem 0.75rem 0.75rem;
}

.pillar-name {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.025em;
  color: var(--ink);
}

.pillar-text {
  margin-top: 0.35rem;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

/* ==============================================================================
   ROTATION BADGES & HOLDINGS CARDS ("WALK THE ROTATION")
   ============================================================================== */
.rotation-badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.rot-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  padding: 0.2rem 0.6rem;
  font-size: 10.5px;
  color: var(--muted);
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-weight: 600;
}

.rot-badge .token-sym {
  font-weight: 700;
  color: var(--ink);
}

.rot-badge .pct {
  font-size: 9px;
  color: var(--gold);
}

/* 10 Desks / Holdings Grid (2 columns on mobile, 5 on desktop like brokertradecenter) */
.desks-grid-btc {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .desks-grid-btc {
    grid-template-columns: repeat(5, 1fr);
  }
}

.desk-btn-card {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: left;
  transition: all 0.2s ease-out;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.desk-btn-card:hover {
  transform: translateY(-2px);
  border-color: var(--head);
}

.desk-preview-box {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  width: 100%;
  background: var(--well-2);
  overflow: hidden;
}

.desk-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease-out;
}

.desk-btn-card:hover .desk-preview-img {
  transform: scale(1.05);
}

.desk-num-tag {
  position: absolute;
  left: 0.4rem;
  top: 0.4rem;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 8.5px;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}

.desk-card-info {
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
}

.desk-card-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.025em;
  color: var(--ink);
  line-height: 1.25;
}

.desk-card-sub {
  margin-top: 0.2rem;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.desk-card-portion {
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--phos);
}

.desk-card-owner {
  margin-top: 0.3rem;
  font-size: 9.5px;
  color: var(--gold);
  font-weight: 600;
  line-height: 1.3;
  display: block;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desk-card-liquidity {
  margin-top: 0.25rem;
  font-size: 8.5px;
  font-family: var(--font-mono);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.desk-card-liquidity .dot-green {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--phos);
  display: inline-block;
}

/* ==============================================================================
   60%+ ACTIVE HOLDER TIER MATRIX
   ============================================================================== */
.tier-matrix-boxes {
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .tier-matrix-boxes {
    grid-template-columns: repeat(5, 1fr);
  }
}

.tier-single-box {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tier-single-box.highlight {
  border-color: var(--gold);
}

.tier-single-box .t-num {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
}

.tier-single-box .t-name {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.tier-single-box .t-min {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.tier-single-box .t-mult {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--phos);
  margin-top: 0.2rem;
}

.tier-single-box .t-mult.dust {
  font-size: 10px;
  color: var(--brand);
}

/* ==============================================================================
   INTERACTIVE WALLET CLAIM & CHECKER
   ============================================================================== */
.claim-container-box {
  margin-top: 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--well);
  padding: 1rem 1.25rem;
}

.persona-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.persona-btn {
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.25rem 0.65rem;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.persona-btn:hover {
  border-color: var(--head);
  color: var(--ink);
}

.wallet-input-row {
  display: flex;
  gap: 0.5rem;
}

.wallet-input-row input {
  flex: 1;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
}

.wallet-input-row input:focus {
  outline: none;
  border-color: var(--head);
}

.btn-primary-action {
  display: inline-flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--head);
  background: var(--head);
  color: var(--paper);
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  text-decoration: none;
}

.btn-primary-action:hover {
  opacity: 0.9;
}

.stats-grid-result {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.75rem;
}

@media (min-width: 640px) {
  .stats-grid-result {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item-cell .lbl {
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.stat-item-cell .val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 0.2rem;
}

.stat-item-cell .val.green { color: var(--phos); }
.stat-item-cell .val.gold { color: var(--gold); }

/* ==============================================================================
   INSPECTION DRAWER
   ============================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: -520px;
  bottom: 0;
  width: 100%;
  max-width: 460px;
  background: var(--paper);
  border-left: 1px solid var(--line);
  z-index: 101;
  padding: 1.5rem;
  overflow-y: auto;
  transition: right 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.drawer-panel.active {
  right: 0;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
}

.d-spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.d-spec-row span {
  color: var(--muted);
}

.d-spec-row strong, .d-spec-row code {
  font-family: var(--font-mono);
  color: var(--ink);
}

/* Footer */
footer.btc-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.footer-desc {
  margin-top: 0.75rem;
  max-width: 280px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* ==============================================================================
   PROMINENT DAY / NIGHT MODE SWITCH
   ============================================================================== */
.day-night-switch-pill {
  display: inline-flex;
  height: 32px;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 2px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.day-night-switch-pill:hover {
  border-color: var(--head);
}

.theme-pill-opt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 9999px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.15s ease;
}

.theme-pill-opt.active {
  background: var(--head);
  color: var(--paper);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ==============================================================================
   15-MINUTE RAPID DISTRIBUTION EPOCH CARD
   ============================================================================== */
.epoch-countdown-card {
  margin-top: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(62, 166, 255, 0.3);
  background: linear-gradient(135deg, rgba(62, 166, 255, 0.07), rgba(34, 197, 94, 0.05));
  padding: 1rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.epoch-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.epoch-badge-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
}

.epoch-badge-pulse .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--phos);
  box-shadow: 0 0 8px var(--phos);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.epoch-timer-display {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.epoch-progress-bar {
  margin-top: 0.75rem;
  height: 6px;
  width: 100%;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
}

[data-theme="dark"] .epoch-progress-bar {
  background: rgba(255, 255, 255, 0.08);
}

.epoch-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--phos));
  border-radius: 9999px;
  transition: width 1s linear;
}

.epoch-dual-modes {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .epoch-dual-modes {
    grid-template-columns: 1fr 1fr;
  }
}

.epoch-mode-item {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 0.6rem 0.75rem;
  font-size: 11px;
}

.epoch-mode-item strong {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-size: 11.5px;
  margin-bottom: 2px;
}

/* ==============================================================================
   INTERACTIVE MARKET CAP ADAPTIVE TIER CONTROLLER
   ============================================================================== */
.mc-controller-box {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--well);
  padding: 1rem 1.15rem;
}

.mc-controller-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.mc-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.mc-preset-btn {
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mc-preset-btn:hover {
  border-color: var(--head);
  color: var(--ink);
}

.mc-preset-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.mc-slider-wrap {
  margin-top: 0.85rem;
}

.mc-range-input {
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: var(--paper-2);
  outline: none;
  cursor: pointer;
  accent-color: var(--brand);
}

.mc-feedback-strip {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

.mc-feedback-strip .highlight-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink);
}

.mc-explainer-callout {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: rgba(245, 197, 66, 0.08);
  border: 1px solid rgba(245, 197, 66, 0.25);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink);
}

/* ==============================================================================
   15-MINUTE ROTATING ASSET STREAMER & DESK HIGHLIGHTS
   ============================================================================== */
.epoch-rotation-cards-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 680px) {
  .epoch-rotation-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.epoch-rot-box {
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  transition: all 0.25s ease;
}

.epoch-rot-box.active-rot {
  border: 1px solid rgba(34, 197, 94, 0.45);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(245, 197, 66, 0.05));
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.1);
}

.epoch-rot-box.next-rot {
  border: 1px solid rgba(62, 166, 255, 0.35);
  background: linear-gradient(135deg, rgba(62, 166, 255, 0.07), rgba(168, 85, 247, 0.04));
}

.rot-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 9999px;
  width: fit-content;
}

.rot-pill-active {
  background: rgba(34, 197, 94, 0.18);
  color: var(--phos);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.rot-pill-next {
  background: rgba(62, 166, 255, 0.15);
  color: var(--brand);
  border: 1px solid rgba(62, 166, 255, 0.35);
}

.rot-asset-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.rot-asset-owner {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rot-asset-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.rot-asset-metrics strong.green {
  color: var(--phos);
  font-family: var(--font-mono);
}

.rot-asset-metrics strong.gold {
  color: var(--gold);
  font-family: var(--font-mono);
}

.rot-asset-metrics strong.brand {
  color: var(--brand);
  font-family: var(--font-mono);
}

/* Desk Card Active/Next Rotation Highlights */
.desk-btn-card.active-buy-card {
  border-color: var(--phos) !important;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.25) !important;
  position: relative;
}

.desk-btn-card.active-buy-card::after {
  content: '🔥 ACTIVE BUY';
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--phos);
  color: #000;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

.desk-btn-card.next-buy-card {
  border-color: var(--brand) !important;
  box-shadow: 0 0 10px rgba(62, 166, 255, 0.2) !important;
  position: relative;
}

.desk-btn-card.next-buy-card::after {
  content: '⏳ NEXT ROTATION';
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--brand);
  color: #000;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

/* ==============================================================================
   RAINBOW WALLET MODAL & INTEGRATION STYLING
   ============================================================================== */
.rainbow-connect-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, rgba(255, 60, 60, 0.08), rgba(255, 170, 0, 0.08), rgba(40, 200, 100, 0.08), rgba(60, 150, 255, 0.08));
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}

.rainbow-connect-btn:hover {
  border-color: rgba(255, 170, 0, 0.6);
  box-shadow: 0 0 12px rgba(255, 100, 50, 0.18);
  transform: translateY(-1px);
}

.rainbow-connect-btn.connected {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.08);
  color: var(--ink);
}

.rainbow-connect-btn.connected:hover {
  border-color: var(--phos);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.25);
}

.rainbow-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--phos);
  box-shadow: 0 0 6px var(--phos);
  display: inline-block;
}

/* Modal Backdrop */
.rainbow-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 9998;
}

.rainbow-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Window */
.rainbow-modal-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.96);
  width: 92%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

.rainbow-modal-window.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.rainbow-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
}

.rainbow-modal-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.rainbow-modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.rainbow-modal-close:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.rainbow-options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rainbow-card-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  width: 100%;
}

.rainbow-card-opt:hover {
  border-color: var(--gold);
  background: var(--paper);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.rainbow-card-opt.rainbow-primary {
  border-color: rgba(255, 170, 0, 0.4);
  background: rgba(255, 170, 0, 0.06);
}

.rainbow-card-opt.rainbow-primary:hover {
  border-color: #ff9900;
  box-shadow: 0 0 16px rgba(255, 153, 0, 0.22);
}

.rainbow-opt-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.rainbow-opt-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.rainbow-opt-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.rainbow-opt-desc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 0.15rem;
}

.rainbow-badge-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rainbow-badge-tag.rec {
  background: linear-gradient(135deg, #ff5050, #ff9900, #10a37f);
  color: #ffffff;
}

.rainbow-badge-tag.detected {
  background: rgba(34, 197, 94, 0.15);
  color: var(--phos);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.rainbow-badge-tag.mobile {
  background: rgba(59, 130, 246, 0.15);
  color: var(--brand);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Rainbow QR Box */
.rainbow-qr-panel {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 0.75rem;
  text-align: center;
}

.rainbow-qr-panel.active {
  display: flex;
}

.rainbow-qr-box {
  width: 170px;
  height: 170px;
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.75rem 0;
  position: relative;
}

/* Account Details Popover */
.rainbow-account-popover {
  position: fixed;
  width: 310px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  padding: 1.15rem;
  display: none;
  z-index: 10000;
}

.rainbow-account-popover.active {
  display: block;
}



.brand-vault-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.logo-wrap:hover .brand-vault-logo {
  transform: scale(1.08) rotate(-3deg);
}
