:root {
      --bg-deep: #05030d;
      --bg-card: rgba(18, 10, 36, 0.78);
      --border: rgba(209, 163, 255, 0.16);
      --text: #f8f7ff;
      --muted: #a89bc4;
      --accent: #d1a3ff;
      --accent-bright: #f0e4ff;
      --accent-dim: rgba(209, 163, 255, 0.14);
      --violet: #c084fc;
      --violet-deep: #5b21b6;
      --success: #34d399;
      --danger: #fb7185;
      --radius: 16px;
      --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    }

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

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: "DM Sans", system-ui, sans-serif;
      color: var(--text);
      min-height: 100vh;
      line-height: 1.5;
      background:
        radial-gradient(ellipse 130% 90% at 100% 100%, rgba(124, 58, 237, 0.42) 0%, transparent 52%),
        radial-gradient(ellipse 90% 70% at 0% 0%, rgba(30, 20, 60, 0.95) 0%, transparent 48%),
        linear-gradient(158deg, #020108 0%, #0a0618 36%, #120a28 68%, #1a0c38 100%);
    }

    /* Soft line-art ovals — theme accent, very low contrast */
    body::after {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 0;
      opacity: 0.055;
      background:
        radial-gradient(ellipse 42% 28% at 78% 42%, rgba(255, 255, 255, 0.5), transparent 62%),
        radial-gradient(ellipse 48% 32% at 82% 48%, rgba(255, 255, 255, 0.35), transparent 58%),
        radial-gradient(ellipse 38% 24% at 74% 52%, rgba(255, 255, 255, 0.28), transparent 55%);
    }

    .bg-grid {
      position: fixed;
      inset: 0;
      background-image:
        radial-gradient(circle at 1px 1px, rgba(209, 163, 255, 0.055) 1px, transparent 0),
        linear-gradient(rgba(209, 163, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(209, 163, 255, 0.028) 1px, transparent 1px);
      background-size: 20px 20px, 44px 44px, 44px 44px;
      pointer-events: none;
      z-index: 0;
    }

    .bg-glow {
      position: fixed;
      width: 620px;
      height: 620px;
      border-radius: 50%;
      filter: blur(128px);
      opacity: 0.42;
      pointer-events: none;
      z-index: 0;
    }

    .bg-glow.a {
      top: -220px;
      right: -120px;
      background: radial-gradient(circle, rgba(91, 33, 182, 0.75) 0%, transparent 72%);
    }

    .bg-glow.b {
      bottom: -180px;
      left: -80px;
      background: radial-gradient(circle, rgba(192, 132, 252, 0.55) 0%, rgba(124, 58, 237, 0.35) 45%, transparent 70%);
    }

    .wrap {
      position: relative;
      z-index: 1;
      max-width: 1120px;
      margin: 0 auto;
      padding: 2rem 1.25rem 4rem;
    }

    /* Only the top site chrome — not <header> inside cards (e.g. rank tiers). */
    .wrap > header {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      margin-bottom: 2.5rem;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .logo {
      width: 44px;
      height: 44px;
      flex-shrink: 0;
      border-radius: 999px;
      overflow: hidden;
      background: rgba(209, 163, 255, 0.12);
      border: 1px solid rgba(209, 163, 255, 0.28);
      box-shadow: 0 8px 28px rgba(124, 58, 237, 0.35);
    }

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

    .brand h1 {
      font-size: 1.35rem;
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    .brand span {
      display: block;
      font-size: 0.8rem;
      color: var(--muted);
      font-weight: 500;
    }

    .btn {
      font-family: inherit;
      border: none;
      cursor: pointer;
      border-radius: 12px;
      padding: 0.65rem 1.25rem;
      font-weight: 600;
      font-size: 0.9rem;
      transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    }

    .btn-sm {
      padding: 0.45rem 0.85rem;
      font-size: 0.82rem;
      border-radius: 10px;
    }

    .btn:active {
      transform: scale(0.98);
    }

    .btn-primary {
      background: linear-gradient(135deg, #ddd6fe 0%, #a78bfa 32%, #7c3aed 72%, #5b21b6 100%);
      color: #fafafa;
      font-weight: 700;
      text-shadow: 0 1px 2px rgba(15, 5, 24, 0.35);
      box-shadow: 0 10px 32px rgba(91, 33, 182, 0.5);
    }

    .btn-primary:hover:not(:disabled) {
      box-shadow: 0 14px 44px rgba(167, 139, 250, 0.45);
      filter: brightness(1.06);
    }

    .btn-ghost {
      background: rgba(18, 10, 36, 0.65);
      color: var(--text);
      border: 1px solid rgba(209, 163, 255, 0.2);
    }

    .btn-ghost:hover:not(:disabled) {
      border-color: rgba(209, 163, 255, 0.35);
      background: rgba(24, 14, 44, 0.75);
    }

    .btn:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }

    .pill {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.35rem 0.75rem;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 600;
      background: var(--accent-dim);
      color: var(--accent-bright);
      border: 1px solid rgba(209, 163, 255, 0.3);
    }

    .pill-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: currentColor;
      animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.35; }
    }

    .home-intro {
      margin-bottom: 2.25rem;
    }

    .home-hero-box {
      position: relative;
      width: fit-content;
      max-width: min(100%, 48rem);
      margin: 0 auto 2rem;
      padding: 1.25rem clamp(0.75rem, 3vw, 1.1rem);
      box-sizing: border-box;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.85rem 1rem;
      border-radius: 22px;
      background: linear-gradient(
        165deg,
        rgba(22, 12, 42, 0.94) 0%,
        rgba(8, 4, 18, 0.97) 48%,
        rgba(18, 8, 38, 0.95) 100%
      );
      border: 1px solid rgba(209, 163, 255, 0.22);
      box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 28px 64px rgba(0, 0, 0, 0.55),
        0 0 100px rgba(124, 58, 237, 0.12);
      overflow: hidden;
    }

    .home-hero-box::before {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: 22px;
      pointer-events: none;
      background:
        radial-gradient(ellipse 95% 60% at 50% -25%, rgba(209, 163, 255, 0.12), transparent 55%),
        radial-gradient(ellipse 75% 50% at 100% 100%, rgba(124, 58, 237, 0.18), transparent 52%),
        radial-gradient(ellipse 70% 45% at 0% 100%, rgba(192, 132, 252, 0.08), transparent 50%);
    }

    .home-hero-content {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.35rem;
      text-align: center;
    }

    .home-hero-title {
      margin: 0;
      font-family: "DM Sans", system-ui, sans-serif;
      font-size: clamp(1.15rem, 3.2vw, 1.85rem);
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #ffffff;
      line-height: 1.2;
      text-shadow: 0 2px 16px rgba(91, 33, 182, 0.45);
    }

    .home-hero-logo {
      position: relative;
      z-index: 1;
      width: clamp(90px, 14vw, 120px);
      height: clamp(90px, 14vw, 120px);
      object-fit: contain;
      flex-shrink: 0;
      border-radius: 999px;
      padding: 0.35rem;
      background: rgba(209, 163, 255, 0.1);
      border: 1px solid rgba(209, 163, 255, 0.28);
      box-shadow: 0 10px 36px rgba(91, 33, 182, 0.35);
    }

    .home-hero-tagline {
      margin: 0;
      font-family: "DM Sans", system-ui, sans-serif;
      font-size: clamp(1rem, 2.6vw, 1.38rem);
      font-weight: 600;
      letter-spacing: 0.04em;
      line-height: 1.35;
      color: #d8b4ff;
    }

    .home-hero-plan {
      z-index: 1;
      position: relative;
      margin: 0;
      padding-top: 0.15rem;
      font-size: 0.78rem;
      font-weight: 500;
      letter-spacing: 0.1em;
      color: rgba(232, 220, 255, 0.55);
      text-transform: uppercase;
      line-height: 1.45;
    }

    @media (max-width: 480px) {
      .home-hero-box {
        flex-direction: column;
        text-align: center;
        width: 100%;
        max-width: 100%;
        padding: 1.1rem 0.75rem;
      }

      .home-hero-content {
        text-align: center;
      }

      .home-hero-title {
        letter-spacing: 0.01em;
      }
    }

    .home-page-title {
      font-size: clamp(1.75rem, 4vw, 2.35rem);
      font-weight: 800;
      letter-spacing: -0.02em;
      margin-bottom: 0.5rem;
      background: linear-gradient(120deg, #ffffff 0%, #f0e4ff 55%, #c4b5fd 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .home-page-lead {
      color: var(--muted);
      font-size: 0.95rem;
      max-width: 36rem;
      margin: 0 auto;
      line-height: 1.55;
    }

    .home-join-top {
      max-width: min(20.5rem, calc(100% - 1.5rem));
      margin-left: auto;
      margin-right: auto;
      margin-bottom: 1.5rem;
      text-align: center;
      border-color: rgba(209, 163, 255, 0.28);
      background: linear-gradient(145deg, rgba(20, 12, 40, 0.92), rgba(124, 58, 237, 0.1));
    }

    .home-ref-banner {
      font-size: 0.82rem;
      color: var(--accent-bright);
      background: var(--accent-dim);
      border: 1px solid rgba(209, 163, 255, 0.28);
      border-radius: 12px;
      padding: 0.55rem 0.75rem;
      margin: 0 auto 0.85rem;
      max-width: 100%;
      line-height: 1.45;
      text-align: center;
    }

    .home-register-block {
      padding-top: 0.1rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;
    }

    .home-upline-field {
      width: 100%;
      max-width: 10.5rem;
      margin: 0 auto 0.9rem;
    }

    .home-upline-label {
      display: block;
      font-size: 0.72rem;
      color: var(--muted);
      margin-bottom: 0.35rem;
      font-weight: 600;
      text-align: center;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .home-upline-value {
      font-size: 1.15rem;
      font-weight: 600;
      color: var(--accent-bright);
      padding: 0.45rem 0.75rem;
      border-radius: 10px;
      border: 1px solid rgba(209, 163, 255, 0.32);
      background: rgba(0, 0, 0, 0.32);
      line-height: 1.2;
      text-align: center;
      width: 100%;
      box-sizing: border-box;
    }

    .home-upline-source {
      font-size: 0.72rem;
      color: var(--muted);
      margin-top: 0.4rem;
      line-height: 1.45;
      text-align: center;
    }

    .home-register-block .field {
      margin-bottom: 1rem;
    }

    .home-join-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: stretch;
      gap: 0.5rem;
      width: 100%;
      max-width: 19rem;
      margin: 0 auto;
    }

    .home-join-actions .btn {
      flex: 1 1 calc(50% - 0.35rem);
      min-width: min(8.5rem, 100%);
      text-align: center;
    }

    .home-cards {
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
      max-width: min(72rem, 100%);
      margin: 0 auto;
    }

    .home-card h3 {
      margin-bottom: 0.85rem;
    }

    .home-card-desc {
      font-size: 0.88rem;
      color: var(--muted);
      line-height: 1.5;
      margin-bottom: 1rem;
    }

    .home-card--ranks .home-card-desc {
      margin-top: -0.35rem;
    }

    .home-card--direct-ranks {
      text-align: center;
    }

    .home-card--direct-ranks .home-card-desc {
      margin-left: auto;
      margin-right: auto;
      max-width: 28rem;
    }

    .home-direct-rank-list {
      display: grid;
      gap: 0.5rem;
      width: 100%;
      max-width: 26rem;
      margin-left: auto;
      margin-right: auto;
    }

    .home-direct-rank-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 0.35rem 0.5rem;
      padding: 0.65rem 0.85rem;
      border-radius: 12px;
      border: 1px solid rgba(209, 163, 255, 0.18);
      background: rgba(12, 8, 24, 0.65);
      font-size: 0.92rem;
      text-align: center;
    }

    .home-direct-rank-row__req {
      font-weight: 600;
      color: var(--text);
      min-width: 0;
    }

    .home-direct-rank-row__sep {
      color: var(--muted);
      font-weight: 500;
    }

    .home-direct-rank-row__rank {
      font-weight: 600;
      color: #e9d5ff;
    }

    .home-direct-rank-row--tier-1 .home-direct-rank-row__rank {
      color: #c4b5fd;
    }
    .home-direct-rank-row--tier-2 .home-direct-rank-row__rank {
      color: #a78bfa;
    }
    .home-direct-rank-row--tier-3 .home-direct-rank-row__rank {
      color: #8b5cf6;
    }
    .home-direct-rank-row--tier-4 .home-direct-rank-row__rank {
      color: #7c3aed;
    }
    .home-direct-rank-row--tier-5 .home-direct-rank-row__rank {
      color: #6d28d9;
    }
    .home-direct-rank-row--tier-6 .home-direct-rank-row__rank {
      color: #5b21b6;
    }
    .home-direct-rank-row--tier-7 .home-direct-rank-row__rank {
      color: #fbbf24;
    }

    .home-rank-grid {
      display: grid;
      gap: 1.15rem;
      grid-template-columns: 1fr;
    }

    @media (min-width: 540px) {
      .home-rank-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (min-width: 960px) {
      .home-rank-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }

    @media (min-width: 1320px) {
      .home-rank-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }
    }

    .home-rank-loading {
      grid-column: 1 / -1;
      margin: 0;
      font-size: 0.88rem;
      color: var(--muted);
    }

    .home-rank-loading--err {
      color: var(--danger);
    }

    .home-rank-card {
      display: flex;
      flex-direction: column;
      gap: 0;
      padding: 0;
      border-radius: 16px;
      border: 1px solid rgba(209, 163, 255, 0.22);
      background: linear-gradient(
        165deg,
        rgba(20, 12, 38, 0.92) 0%,
        rgba(6, 4, 14, 0.96) 100%
      );
      box-shadow:
        0 0 0 1px rgba(124, 58, 237, 0.12),
        0 16px 40px rgba(0, 0, 0, 0.45);
      overflow: hidden;
    }

    /* Header: tier name only (colors match dashboard current-rank pills) */
    .home-rank-card__head {
      margin: 0;
      padding: 0.85rem 1.1rem 0.35rem;
      border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    }

    .home-rank-card__head-line {
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 0;
    }

    .home-rank-card__tier-title {
      font-size: 1.05rem;
      font-weight: 700;
      letter-spacing: 0.02em;
      line-height: 1.3;
      min-width: 0;
      text-align: center;
    }

    .home-rank-card__tier-title--1 {
      color: #94a3b8;
    }
    .home-rank-card__tier-title--2 {
      color: #7dd3fc;
    }
    .home-rank-card__tier-title--3 {
      color: #d4a574;
    }
    .home-rank-card__tier-title--4 {
      color: #e2e8f0;
      text-shadow: 0 1px 14px rgba(226, 232, 240, 0.14);
    }
    .home-rank-card__tier-title--5 {
      color: #fcd34d;
    }
    .home-rank-card__tier-title--6 {
      color: #f5f5f4;
    }
    .home-rank-card__tier-title--7 {
      color: #fde68a;
      text-shadow: 0 0 20px rgba(167, 139, 250, 0.2);
    }
    .home-rank-card__tier-title--x {
      color: #f8fafc;
    }

    /* Body: full-height rail + rows (aligned like reference box) */
    .home-rank-card__body {
      display: flex;
      flex-direction: row;
      align-items: flex-start;
      min-height: 0;
      padding: 0;
      background: rgba(0, 0, 0, 0.12);
    }

    .home-rank-card__rail {
      width: 4px;
      flex-shrink: 0;
      background: linear-gradient(
        180deg,
        #e9d4ff 0%,
        rgba(124, 58, 237, 0.55) 100%
      );
      border-radius: 0 2px 2px 0;
    }

    .home-rank-card__rows {
      flex: 1;
      min-width: 0;
      padding: 0.35rem 1rem 0.95rem 0.9rem;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
    }

    .home-rank-card__row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      column-gap: 1rem;
      padding: 0.55rem 0;
      border-bottom: 1px solid rgba(148, 163, 184, 0.07);
    }

    .home-rank-card__row:first-child {
      padding-top: 0.35rem;
    }

    .home-rank-card__row:last-child {
      border-bottom: none;
      padding-bottom: 0.25rem;
    }

    .home-rank-card__k {
      margin: 0;
      font-size: 0.7rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #94a3b8;
      line-height: 1.4;
      text-align: left;
    }

    .home-rank-card__v {
      margin: 0;
      font-size: 0.9rem;
      font-weight: 700;
      color: #ffffff;
      text-align: right;
      justify-self: end;
      white-space: nowrap;
      line-height: 1.3;
    }

    .home-rank-card__v--emph {
      color: #d8b4ff;
    }

    .home-rank-card--compact .home-rank-card__head {
      padding-bottom: 0.5rem;
    }

    .home-rank-card__body--compact {
      display: block;
      background: rgba(0, 0, 0, 0.12);
    }

    .home-rank-card__rows--compact {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.4rem;
      padding: 0.55rem 0.75rem 0.85rem;
      width: 100%;
    }

    .home-rank-compact-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 0.3rem 0.45rem;
      width: 100%;
      padding: 0.55rem 0.7rem;
      border-radius: 12px;
      border: 1px solid rgba(209, 163, 255, 0.18);
      background: rgba(12, 8, 24, 0.65);
      font-size: 0.84rem;
      line-height: 1.35;
      text-align: center;
    }

    .home-rank-compact-row__part {
      font-weight: 600;
      color: var(--text);
    }

    .home-rank-compact-row--earn .home-rank-compact-row__part {
      color: #d8b4ff;
    }

    .home-contract-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.65rem 1rem;
    }

    .contract-anchor--block {
      flex: 1;
      min-width: min(100%, 12rem);
      font-size: 0.8rem;
      line-height: 1.45;
      word-break: break-all;
    }

    .home-card-contract .home-contract-row {
      margin-top: 0.25rem;
    }

    .home-lower {
      max-width: 52rem;
      margin: 0 auto 2rem;
    }

    .home-stats-grid {
      margin-bottom: 1.25rem;
    }

    @media (max-width: 839px) {
      .home-intro .home-stats-grid .stat {
        text-align: center;
        align-items: center;
      }
    }

    .grid {
      display: grid;
      gap: 1.25rem;
    }

    @media (min-width: 840px) {
      .grid-2 {
        grid-template-columns: 1fr 1fr;
      }
      .grid-3 {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    .card {
      background: var(--bg-card);
      backdrop-filter: blur(16px);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.35rem 1.5rem;
      box-shadow: var(--shadow);
    }

    .card.home-join-top {
      padding: 1rem 1.2rem 1.2rem;
    }

    .card.home-join-top h3 {
      text-transform: none;
      letter-spacing: 0.02em;
      font-size: clamp(0.95rem, 3.2vw, 1.08rem);
      font-weight: 700;
      color: var(--text);
      text-align: center;
      margin-bottom: 0.65rem;
    }

    .card h3 {
      font-size: 0.85rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--muted);
      margin-bottom: 1rem;
    }

    .stat {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }

    .stat label {
      font-size: 0.75rem;
      color: var(--muted);
    }

    .stat strong {
      font-family: "JetBrains Mono", monospace;
      font-size: 1.15rem;
      font-weight: 600;
      color: var(--text);
    }

    .stat small {
      font-size: 0.75rem;
      color: var(--muted);
    }

    .field {
      margin-bottom: 1rem;
    }

    .field label {
      display: block;
      font-size: 0.8rem;
      color: var(--muted);
      margin-bottom: 0.35rem;
    }

    .field input {
      width: 100%;
      padding: 0.65rem 0.85rem;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: rgba(0, 0, 0, 0.35);
      color: var(--text);
      font-family: "JetBrains Mono", monospace;
      font-size: 0.85rem;
    }

    .field input:focus {
      outline: none;
      border-color: rgba(209, 163, 255, 0.5);
      box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
    }

    .actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.6rem;
      margin-top: 0.5rem;
    }

    .toast-area {
      position: fixed;
      bottom: 1.25rem;
      right: 1.25rem;
      z-index: 100;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      max-width: min(380px, calc(100vw - 2rem));
    }

    .toast {
      padding: 0.85rem 1rem;
      border-radius: 12px;
      font-size: 0.85rem;
      border: 1px solid var(--border);
      background: rgba(18, 10, 36, 0.96);
      backdrop-filter: blur(12px);
      animation: slideIn 0.35s ease;
    }

    .toast.ok {
      border-color: rgba(52, 211, 153, 0.35);
      color: var(--success);
    }

    .toast.err {
      border-color: rgba(251, 113, 133, 0.35);
      color: var(--danger);
    }

    @keyframes slideIn {
      from {
        opacity: 0;
        transform: translateY(12px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .visit-tracker {
      margin-top: 2rem;
      margin-bottom: 0.75rem;
      text-align: center;
    }
    .visit-tracker img {
      display: inline-block;
      vertical-align: middle;
      max-width: 100%;
      height: auto;
    }
    .visit-tracker + footer,
    .visit-tracker + .dash-footer {
      margin-top: 0.75rem;
    }

    footer {
      margin-top: 3rem;
      text-align: center;
      font-size: 0.8rem;
      color: var(--muted);
    }

    .badge-admin {
      font-size: 0.7rem;
      padding: 0.2rem 0.5rem;
      border-radius: 6px;
      background: rgba(167, 139, 250, 0.2);
      color: var(--violet);
      margin-left: 0.5rem;
    }
    .header-actions {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      flex-wrap: wrap;
    }
    .nav-link {
      color: var(--muted);
      text-decoration: none;
      font-size: 0.875rem;
      font-weight: 600;
      padding: 0.35rem 0.5rem;
    }
    .nav-link:hover { color: var(--accent-bright); }
    .wrap--wide { max-width: 1180px; }
    .dash-header { margin-bottom: 2rem; }
    .dash-header .logo {
      width: 48px;
      height: 48px;
    }
    .dash-header-tag { font-size: 0.82rem; font-weight: 600; color: var(--muted); }

    /* Site chrome header — readable hierarchy & 44px targets on phones */
    @media (max-width: 640px) {
      .wrap {
        padding-top: 1.1rem;
        padding-left: 1rem;
        padding-right: 1rem;
      }

      .wrap > header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin-bottom: 1.65rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border);
      }

      .wrap > header .brand {
        gap: 0.65rem;
        min-width: 0;
      }

      .wrap > header .brand > div:last-child {
        min-width: 0;
        flex: 1;
      }

      .wrap > header .brand h1 {
        font-size: clamp(0.98rem, 4.5vw, 1.22rem);
        line-height: 1.2;
        letter-spacing: -0.025em;
      }

      .wrap > header .brand span,
      .wrap > header .dash-header-tag {
        font-size: 0.72rem;
        margin-top: 0.08rem;
      }

      .wrap > header .logo {
        width: 42px;
        height: 42px;
      }

      .wrap > header.dash-header .logo {
        width: 44px;
        height: 44px;
      }

      .wrap > header .header-actions {
        width: 100%;
        justify-content: stretch;
        align-items: stretch;
        gap: 0.55rem;
      }

      .wrap > header .header-actions .nav-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0.5rem 0.9rem;
        border-radius: 12px;
        background: rgba(18, 10, 36, 0.82);
        border: 1px solid var(--border);
        color: var(--text);
        font-size: 0.82rem;
        font-weight: 600;
      }

      .wrap > header .header-actions .nav-link:hover {
        color: var(--accent-bright);
        border-color: rgba(209, 163, 255, 0.4);
      }

      .wrap > header .header-actions .btn-primary {
        flex: 1;
        min-width: 0;
        min-height: 44px;
        padding: 0.6rem 0.85rem;
        font-size: 0.8rem;
        border-radius: 12px;
        font-variant-numeric: tabular-nums;
      }
    }

    @media (max-width: 380px) {
      .wrap > header .header-actions {
        flex-direction: column;
      }

      .wrap > header .header-actions .nav-link {
        width: 100%;
      }

      .wrap > header .header-actions .btn-primary {
        flex: none;
        width: 100%;
      }
    }

    .dash-main { margin-top: 0.5rem; }
    .dash-intro { margin-bottom: 1.5rem; }
    .dash-page-heading { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.35rem; }
    .metrics-4 {
      display: grid;
      gap: 1rem;
      grid-template-columns: 1fr;
      margin-bottom: 2rem;
    }
    @media (min-width: 640px) {
      .metrics-4 { grid-template-columns: repeat(2, 1fr); }
    }
    @media (min-width: 960px) {
      .metrics-4 { grid-template-columns: repeat(4, 1fr); }
    }
    .metric-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.15rem 1.25rem;
      box-shadow: var(--shadow);
    }
    .metric-card--accent {
      border-color: rgba(209, 163, 255, 0.3);
      background: linear-gradient(145deg, rgba(22, 12, 42, 0.9), rgba(124, 58, 237, 0.12));
    }
    .metric-card-label {
      display: block;
      font-size: 0.72rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--muted);
      margin-bottom: 0.45rem;
    }
    .metric-card-value {
      font-family: "JetBrains Mono", monospace;
      font-size: 1.35rem;
      font-weight: 600;
      color: var(--text);
      line-height: 1.2;
    }
    .metric-card-id { font-size: 1.6rem; color: var(--accent); }
    .metric-card-unit, .metric-card-hint {
      display: block;
      font-size: 0.78rem;
      color: var(--muted);
      margin-top: 0.25rem;
    }
    .mono { font-family: "JetBrains Mono", monospace; }
    .dash-section { margin-bottom: 2rem; }
    .dash-section-title {
      font-size: 0.8rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--muted);
      margin-bottom: 0.75rem;
    }
    .dash-panel { padding: 1.35rem 1.5rem; }
    .panel-title {
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 1rem;
    }
    .panel-lead { font-size: 0.88rem; color: var(--muted); line-height: 1.55; margin-bottom: 1rem; }
    .panel-footnote { font-size: 0.78rem; color: var(--muted); margin-top: 0.85rem; line-height: 1.45; }
    .kv-grid { display: flex; flex-direction: column; gap: 0.65rem; }
    .kv-grid--loose { gap: 0.85rem; }
    .kv-row {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      justify-content: space-between;
      gap: 0.5rem 1rem;
      padding-bottom: 0.65rem;
      border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    }
    .kv-row:last-child { border-bottom: none; padding-bottom: 0; }
    .kv-k { font-size: 0.82rem; color: var(--muted); max-width: 55%; }
    .kv-v { font-size: 0.88rem; font-weight: 600; color: var(--text); text-align: right; }
    .rank-pill {
      display: inline-block;
      padding: 0.2rem 0.55rem;
      border-radius: 8px;
      background: rgba(148, 163, 184, 0.12);
      font-size: 0.82rem;
      font-weight: 600;
    }
    .rank-pill--earn {
      background: var(--accent-dim);
      color: var(--accent-bright);
      border: 1px solid rgba(209, 163, 255, 0.32);
    }

    /* Dashboard “Current rank”: name only + tier-colored pill */
    .rank-pill--tier-none {
      background: rgba(148, 163, 184, 0.1);
      color: var(--muted);
      border: 1px solid rgba(148, 163, 184, 0.22);
    }
    .rank-pill--tier-1 {
      color: #94a3b8;
      background: rgba(148, 163, 184, 0.12);
      border: 1px solid rgba(148, 163, 184, 0.28);
    }
    .rank-pill--tier-2 {
      color: #7dd3fc;
      background: rgba(56, 189, 248, 0.1);
      border: 1px solid rgba(56, 189, 248, 0.35);
    }
    .rank-pill--tier-3 {
      color: #d4a574;
      background: rgba(180, 83, 9, 0.15);
      border: 1px solid rgba(217, 119, 6, 0.35);
    }
    .rank-pill--tier-4 {
      color: #e2e8f0;
      background: rgba(226, 232, 240, 0.08);
      border: 1px solid rgba(203, 213, 225, 0.45);
      text-shadow: 0 1px 14px rgba(226, 232, 240, 0.14);
    }
    .rank-pill--tier-5 {
      color: #fcd34d;
      background: rgba(251, 191, 36, 0.12);
      border: 1px solid rgba(251, 191, 36, 0.4);
    }
    .rank-pill--tier-6 {
      color: #f5f5f4;
      background: rgba(231, 229, 228, 0.1);
      border: 1px solid rgba(214, 211, 209, 0.45);
    }
    .rank-pill--tier-7 {
      color: #fde68a;
      background: rgba(251, 191, 36, 0.14);
      border: 1px solid rgba(196, 181, 253, 0.45);
      box-shadow: 0 0 24px rgba(167, 139, 250, 0.15);
    }
    .roi-big {
      padding: 1rem 0;
      text-align: center;
      border-radius: 12px;
      background: rgba(0, 0, 0, 0.25);
      border: 1px solid var(--border);
    }
    .roi-big-label { display: block; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.35rem; }
    .roi-big-value { font-size: 2rem; font-weight: 700; color: var(--success); }
    .roi-big-unit { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; }
    .accrual-timer-block {
      margin-top: 1rem;
      padding: 0.85rem 1rem;
      border-radius: 12px;
      border: 1px solid rgba(209, 163, 255, 0.22);
      background: rgba(0, 0, 0, 0.28);
      text-align: center;
    }
    .accrual-timer-label {
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--muted);
      margin-bottom: 0.35rem;
    }
    .accrual-timer {
      font-size: 1.35rem;
      font-weight: 600;
      color: var(--accent);
      margin: 0;
    }
    .btn:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    .copy-field { display: flex; gap: 0.5rem; flex-wrap: wrap; }
    .copy-input {
      flex: 1;
      min-width: 200px;
      padding: 0.65rem 0.85rem;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: rgba(0, 0, 0, 0.35);
      color: var(--text);
      font-size: 0.78rem;
    }
    .inline-code {
      font-family: "JetBrains Mono", monospace;
      font-size: 0.8em;
      padding: 0.1em 0.35em;
      border-radius: 4px;
      background: rgba(0, 0, 0, 0.35);
      color: var(--accent);
    }
    .table-wrap { overflow-x: auto; margin: 0 -0.25rem; }
    .data-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.85rem;
    }
    .data-table th, .data-table td {
      padding: 0.65rem 0.75rem;
      text-align: left;
      border-bottom: 1px solid var(--border);
    }
    .data-table th {
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--muted);
      font-weight: 600;
    }
    .data-table tbody tr:hover { background: rgba(209, 163, 255, 0.06); }
    .contract-line { border-bottom: none; padding-bottom: 0; }
    .contract-anchor { color: #e9d4ff; text-decoration: none; word-break: break-all; font-size: 0.8rem; }
    .contract-anchor:hover { text-decoration: underline; }
    .admin-panel { border-color: rgba(167, 139, 250, 0.35); }
    .btn-lg { padding: 0.8rem 1.5rem; font-size: 1rem; }
    .dash-footer { margin-top: 2.5rem; text-align: center; }

    body[data-page="dashboard"] .wrap {
      padding: 1.25rem 0.85rem 2rem;
    }

    @media (min-width: 480px) {
      body[data-page="dashboard"] .wrap {
        padding: 1.5rem 1.15rem 2.5rem;
      }
    }

    /* Dashboard: single-column stack + tighter spacing (mobile-first) */
    .dash-stack {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

    .dash-main .dash-header {
      margin-bottom: 1.25rem;
    }

    .dash-main .dash-intro {
      margin-bottom: 0.85rem;
    }

    .dash-main .dash-page-heading {
      font-size: 1.1rem;
      margin-bottom: 0;
    }

    .dash-main .metrics-4 {
      gap: 0.65rem;
      margin-bottom: 1.15rem;
    }

    .dash-main .metric-card {
      padding: 0.75rem 0.85rem;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    }

    .dash-main .metric-card-label {
      font-size: 0.68rem;
      margin-bottom: 0.3rem;
    }

    .dash-main .metric-card-value {
      font-size: 1.05rem;
    }

    .dash-main .metric-card-id {
      font-size: 1.2rem;
    }

    .dash-main .metric-card-unit,
    .dash-main .metric-card-hint {
      font-size: 0.72rem;
    }

    .dash-main .dash-section {
      margin-bottom: 1.15rem;
    }

    .dash-main .dash-section-title {
      font-size: 0.74rem;
      margin-bottom: 0.45rem;
    }

    .dash-main .dash-panel {
      padding: 0.85rem 0.95rem;
    }

    .dash-main .panel-title {
      font-size: 0.85rem;
      margin-bottom: 0.55rem;
    }

    .dash-main .kv-grid--loose {
      gap: 0.45rem;
    }

    .dash-main .kv-row {
      padding-bottom: 0.4rem;
      gap: 0.3rem 0.6rem;
    }

    .dash-main .kv-k {
      font-size: 0.76rem;
      max-width: 60%;
    }

    .dash-main .kv-v {
      font-size: 0.8rem;
    }

    .dash-main .rank-pill {
      font-size: 0.75rem;
      padding: 0.15rem 0.45rem;
    }

    .dash-main .roi-big {
      padding: 0.6rem 0.45rem;
    }

    .dash-main .roi-big-label {
      font-size: 0.65rem;
      margin-bottom: 0.2rem;
    }

    .dash-main .roi-big-value {
      font-size: 1.35rem;
    }

    .dash-main .roi-big-unit {
      font-size: 0.72rem;
    }

    .dash-main .accrual-timer-block {
      margin-top: 0.55rem;
      padding: 0.5rem 0.6rem;
    }

    .dash-main .accrual-timer-label {
      font-size: 0.65rem;
      margin-bottom: 0.2rem;
    }

    .dash-main .accrual-timer {
      font-size: 1.05rem;
    }

    .dash-main .dash-roi-rates {
      margin-top: 0.55rem;
    }

    .dash-main .dash-claim-actions {
      margin-top: 0.65rem;
    }

    .dash-main .dash-claim-directs-note {
      margin-top: 0.5rem;
      font-size: 0.76rem;
      color: var(--muted);
      text-align: center;
      line-height: 1.45;
    }

    .dash-main .dash-claim-directs-label::after {
      content: ":";
      margin-right: 0.35rem;
    }

    .dash-main .dash-claim-directs-value {
      color: var(--text);
      font-weight: 600;
    }

    .dash-main .btn-claim-full {
      width: 100%;
      max-width: 100%;
      padding: 0.65rem 1rem;
      font-size: 0.9rem;
    }

    .dash-main .panel-footnote {
      margin-top: 0.5rem;
      font-size: 0.74rem;
    }

    .dash-main .dash-footer {
      margin-top: 1.5rem;
    }

    .dash-main .copy-field {
      flex-direction: column;
      align-items: stretch;
    }

    .dash-main .copy-input {
      min-width: 0;
      width: 100%;
    }

    @media (min-width: 720px) {
      .dash-main .metric-card-value {
        font-size: 1.15rem;
      }
      .dash-main .roi-big-value {
        font-size: 1.5rem;
      }
    }

    /* Dashboard: reference-style panels + 3-column stat grids */
    .dash-main .dash-section {
      margin-bottom: 0.75rem;
    }

    .dash-subnav {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      justify-content: center;
      align-items: center;
      margin-bottom: 1rem;
      padding: 0 0.25rem;
    }

    .dash-tab {
      font-family: "DM Sans", system-ui, sans-serif;
      font-size: 0.82rem;
      font-weight: 600;
      padding: 0.45rem 1rem;
      border-radius: 999px;
      border: 1px solid rgba(209, 163, 255, 0.28);
      background: rgba(15, 8, 32, 0.65);
      color: var(--muted);
      cursor: pointer;
      transition:
        color 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
    }

    .dash-tab:hover {
      color: var(--accent-bright);
      border-color: rgba(209, 163, 255, 0.45);
    }

    .dash-tab--active {
      background: rgba(167, 139, 250, 0.22);
      color: #f8fafc;
      border-color: rgba(209, 163, 255, 0.55);
    }

    .dash-frame {
      background: linear-gradient(
        165deg,
        rgba(22, 14, 42, 0.94) 0%,
        rgba(6, 4, 16, 0.98) 48%,
        rgba(14, 8, 32, 0.96) 100%
      );
      border: 1px solid rgba(209, 163, 255, 0.2);
      border-radius: 16px;
      box-shadow:
        0 0 0 1px rgba(124, 58, 237, 0.14),
        0 18px 48px rgba(0, 0, 0, 0.5);
      padding: 0.95rem 1rem 1.05rem;
    }

    .dash-frame--snapshot {
      border-color: rgba(209, 163, 255, 0.28);
    }

    .dash-roi-sponsor-row {
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
      align-items: stretch;
    }

    @media (min-width: 880px) {
      .dash-roi-sponsor-row {
        flex-direction: row;
        gap: 0.75rem;
      }

      .dash-roi-sponsor-row > .dash-frame {
        flex: 1;
        min-width: 0;
      }
    }

    .dash-frame--compact {
      padding: 0.65rem 0.75rem 0.75rem;
    }

    .dash-frame--compact .dash-frame__title {
      margin-bottom: 0.45rem;
      padding-bottom: 0.4rem;
    }

    .dash-frame--compact .dash-roi-pending-timer-row {
      margin-bottom: 0.45rem;
    }

    .dash-frame--compact .dash-roi-actions {
      margin-top: 0.45rem;
    }

    .dash-frame--overview,
    .dash-frame--roi,
    .dash-frame--sponsor,
    .dash-frame--repl,
    .dash-frame--referral {
      border-color: rgba(124, 92, 230, 0.22);
    }

    .dash-frame__title {
      margin: 0 0 0.75rem;
      padding-bottom: 0.55rem;
      border-bottom: 1px solid rgba(148, 163, 184, 0.14);
      font-weight: 700;
      color: #f8fafc;
    }

    /* Centered section titles — “MY OVERVIEW” style */
    .dash-frame__title--center {
      text-align: center;
      font-size: 0.65rem;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: rgba(248, 250, 252, 0.92);
    }

    /* Pool snapshot — left title row */
    .dash-frame__title--left {
      text-align: left;
      font-size: 0.98rem;
      letter-spacing: 0.02em;
      text-transform: none;
      font-weight: 700;
      padding-bottom: 0.65rem;
      margin-bottom: 0.85rem;
      border-bottom-color: rgba(148, 163, 184, 0.12);
    }

    .dash-frame__lead {
      font-size: 0.78rem;
      color: var(--muted);
      margin: 0 0 0.65rem;
      line-height: 1.45;
      text-align: center;
    }

    .dash-frame--referral .dash-frame__lead {
      max-width: 28rem;
      margin-left: auto;
      margin-right: auto;
    }

    .dash-frame__note {
      margin: 0.55rem 0 0;
      font-size: 0.74rem;
      color: var(--muted);
      text-align: center;
    }

    /* Strict 3-column grid (compact rows like reference “star” blocks) */
    .dash-box-grid--row3 {
      display: grid;
      gap: 0.65rem;
      grid-template-columns: 1fr;
    }

    @media (min-width: 560px) {
      .dash-box-grid--row3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }

    .dash-box-grid--row2 {
      display: grid;
      gap: 0.65rem;
      grid-template-columns: 1fr;
    }

    @media (min-width: 560px) {
      .dash-box-grid--row2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    /* Pending ROI + Timer: stacked mobile, side-by-side from small tablet */
    .dash-roi-pending-timer-row {
      display: grid;
      gap: 0.5rem;
      grid-template-columns: 1fr;
      margin-bottom: 0.65rem;
    }

    @media (min-width: 480px) {
      .dash-roi-pending-timer-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
      }
    }

    .dash-roi-pending-timer-row .dash-stat-box {
      min-height: auto;
      padding: 0.65rem 0.75rem;
    }

    /* ROI: row of 3 + full-width fourth tile */
    .dash-box-grid--roi-tail > .dash-stat-box:last-child {
      grid-column: 1 / -1;
    }

    .dash-box-grid--repl {
      display: grid;
      gap: 0.65rem;
      grid-template-columns: 1fr;
    }

    .dash-stat-box {
      background: rgba(12, 6, 28, 0.75);
      border: 1px solid rgba(209, 163, 255, 0.14);
      border-radius: 12px;
      padding: 0.72rem 0.6rem 0.78rem;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.32rem;
      min-height: 5.35rem;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    .dash-stat-box--stretch {
      min-height: auto;
    }

    .dash-stat-box__label {
      font-size: 0.58rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: rgba(148, 163, 184, 0.95);
      line-height: 1.3;
    }

    .dash-stat-box__value {
      font-size: 0.95rem;
      font-weight: 700;
      color: #f8fafc;
      line-height: 1.25;
      word-break: break-word;
    }

    .dash-stat-box__value--accent {
      font-family: "JetBrains Mono", monospace;
      font-size: 1.2rem;
      font-weight: 700;
      color: #e9d4ff;
    }

    .dash-stat-box__value--timer {
      font-family: "JetBrains Mono", monospace;
      font-size: 1.15rem;
      font-weight: 700;
      color: #d8b4ff;
    }

    .dash-stat-box__value--pill .rank-pill {
      font-size: clamp(0.84rem, 2.6vw, 0.98rem);
      font-weight: 800;
      padding: 0.32rem 0.85rem;
      max-width: 100%;
      display: inline-flex;
      justify-content: center;
      text-align: center;
      white-space: normal;
      line-height: 1.25;
      letter-spacing: 0.03em;
    }

    .dash-stat-box__hint {
      font-size: 0.62rem;
      color: rgba(148, 163, 184, 0.85);
    }

    .dash-roi-pending-strip {
      margin-bottom: 0.65rem;
    }

    .dash-roi-pending-strip .dash-stat-box {
      min-height: auto;
      padding: 0.65rem 0.75rem;
    }

    .dash-roi-pending-timer-row .dash-stat-box--stretch {
      min-width: 0;
    }

    .dash-roi-actions {
      margin-top: 0.85rem;
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
      align-items: stretch;
    }

    .dash-roi-actions .btn-claim-full {
      width: 100%;
      padding: 0.68rem 1rem;
      font-size: 0.9rem;
      border-radius: 11px;
    }

    .dash-roi-directs-wrap {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      margin-top: 0.35rem;
    }

    .dash-roi-directs {
      margin: 0;
      font-size: 0.7rem;
      color: var(--muted);
      text-align: center;
      line-height: 1.45;
    }

    .dash-roi-directs .dash-claim-directs-label::after {
      content: ":";
      margin-right: 0.35rem;
    }

    .dash-roi-directs--requirement .dash-claim-directs-label::after {
      content: none;
      margin-right: 0;
    }

    .dash-roi-directs--requirement .dash-claim-directs-label {
      color: var(--text);
      font-weight: 500;
    }

    .dash-roi-directs .dash-claim-directs-value {
      color: var(--text);
      font-weight: 600;
    }

    .dash-roi-directs--qual-hint {
      margin-top: -0.2rem;
    }

    .dash-roi-directs--qual-hint .dash-claim-directs-label::after {
      content: none;
    }

    .dash-roi-directs--qual-hint .dash-claim-directs-value {
      display: block;
      font-size: 0.68rem;
      font-weight: 500;
      color: var(--muted);
    }

    .dash-frame--directs {
      padding: 1.35rem 1.25rem 1.5rem;
    }

    .dash-directs-head {
      text-align: center;
      margin-bottom: 1rem;
    }

    .dash-directs-head .dash-frame__title {
      margin-bottom: 0.35rem;
    }

    .dash-directs-lead {
      margin: 0 auto;
      max-width: 28rem;
      font-size: 0.88rem;
      color: var(--muted);
      line-height: 1.5;
    }

    .dash-directs-count {
      margin: 0.5rem 0 0;
      font-size: 0.8rem;
      font-weight: 600;
      color: #d8b4ff;
    }

    .dash-directs-panel {
      width: 100%;
    }

    /* —— Desktop: data table —— */
    .dash-directs-table-wrap {
      width: 100%;
      max-height: min(22rem, 55vh);
      overflow: auto;
      border-radius: 14px;
      border: 1px solid rgba(209, 163, 255, 0.2);
      background: rgba(8, 5, 18, 0.65);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    .dash-directs-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.88rem;
      line-height: 1.4;
    }

    .dash-directs-table thead th {
      position: sticky;
      top: 0;
      z-index: 1;
      padding: 0.75rem 1rem;
      font-size: 0.68rem;
      font-weight: 600;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.07em;
      text-align: left;
      border-bottom: 1px solid rgba(209, 163, 255, 0.22);
      background: rgba(14, 8, 32, 0.98);
    }

    .dash-directs-table th:nth-child(1) {
      width: 3.5rem;
      text-align: center;
    }

    .dash-directs-table th:nth-child(2) {
      width: 7rem;
    }

    .dash-directs-table tbody tr {
      transition: background 0.15s ease;
    }

    .dash-directs-table tbody tr:nth-child(even) {
      background: rgba(255, 255, 255, 0.02);
    }

    .dash-directs-table tbody tr:hover {
      background: rgba(124, 58, 237, 0.12);
    }

    .dash-directs-table tbody td {
      padding: 0.65rem 1rem;
      vertical-align: middle;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .dash-directs-table tbody tr:last-child td {
      border-bottom: none;
    }

    .dash-directs-table__sno {
      text-align: center;
      color: var(--muted);
      font-weight: 600;
      font-size: 0.8rem;
    }

    .dash-directs-table__id {
      color: var(--text);
      font-weight: 600;
      font-size: 0.95rem;
    }

    .dash-directs-table__rank .rank-pill {
      font-size: 0.72rem;
    }

    .dash-directs-table__msg {
      text-align: center;
      color: var(--muted);
      padding: 1.25rem 1rem;
      font-size: 0.88rem;
    }

    /* —— Mobile: one compact row per direct —— */
    .dash-directs-grid {
      display: none;
      flex-direction: column;
      gap: 0.4rem;
      width: 100%;
    }

    .dash-directs-grid__msg {
      margin: 0;
      padding: 0.85rem 1rem;
      text-align: center;
      font-size: 0.86rem;
      color: var(--muted);
      line-height: 1.45;
      border-radius: 10px;
      border: 1px dashed rgba(209, 163, 255, 0.25);
      background: rgba(12, 8, 24, 0.5);
    }

    .dash-directs-card {
      display: flex;
      flex-direction: row;
      flex-wrap: nowrap;
      align-items: center;
      gap: 0.45rem 0.55rem;
      width: 100%;
      min-height: 2.5rem;
      padding: 0.45rem 0.65rem;
      border-radius: 10px;
      border: 1px solid rgba(209, 163, 255, 0.2);
      background: rgba(14, 9, 28, 0.88);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    }

    .dash-directs-card__index {
      flex: 0 0 auto;
      min-width: 1.75rem;
      font-size: 0.78rem;
      font-weight: 600;
      color: var(--muted);
    }

    .dash-directs-card__id-label {
      flex: 0 0 auto;
      font-size: 0.68rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--muted);
    }

    .dash-directs-card__id {
      flex: 0 0 auto;
      font-size: 0.9rem;
      font-weight: 700;
      color: var(--text);
      margin-right: 0.15rem;
    }

    .dash-directs-card .rank-pill {
      flex: 0 0 auto;
      margin-left: auto;
      font-size: 0.68rem;
      padding: 0.2rem 0.5rem;
      white-space: nowrap;
    }

    @media (max-width: 767px) {
      .dash-directs-table-wrap {
        display: none !important;
      }

      .dash-directs-grid:not([hidden]) {
        display: flex;
      }
    }

    @media (min-width: 768px) {
      .dash-directs-grid {
        display: none !important;
      }

      .dash-directs-table-wrap {
        display: block;
      }
    }

    .dash-repl-note {
      margin: 0.55rem 0 0;
      font-size: 0.72rem;
      color: var(--muted);
      line-height: 1.45;
      text-align: center;
    }

    .dash-repl-fine {
      margin: 0.35rem 0 0;
      font-size: 0.7rem;
      color: var(--muted);
      text-align: center;
    }

    .dash-repl-btns {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.5rem;
      margin-top: 0.65rem;
    }

    .copy-field--inline {
      flex-direction: row;
      align-items: stretch;
      max-width: 36rem;
      margin-left: auto;
      margin-right: auto;
    }

    .dash-main .copy-field--inline .copy-input {
      min-width: 0;
      flex: 1;
    }

    .dash-main .dash-header {
      margin-bottom: 1rem;
    }

    .dash-main {
      margin-top: 0.25rem;
    }