  :root {
      --bg: #0b0b0c;
      /* dark default */
      --fg: #f3f4f6;
      --muted: #a1a1aa;
      --card: #111113;
      --ring: #2a2a2e;
      --accent: 139, 92, 246;
      /* violet */
  }

  [data-theme="light"] {
      --bg: #f7f7fb;
      --fg: #0a0a0b;
      --muted: #55585e;
      --card: #ffffff;
      --ring: #e6e7ec;
  }

  /* Accent presets */
  [data-accent="violet"] {
      --accent: 139, 92, 246;
  }

  [data-accent="emerald"] {
      --accent: 16, 185, 129;
  }

  [data-accent="sky"] {
      --accent: 14, 165, 233;
  }

  [data-accent="rose"] {
      --accent: 244, 63, 94;
  }

  * {
      box-sizing: border-box;
  }

  body {
      margin: 0;
      font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial;
      background: var(--bg);
      color: var(--fg);
      transition: background-color 0.6s ease, color 0.6s ease;
      padding-bottom: 76px;
      /* room for bottom nav */
  }

  a {
      text-decoration: none;
  }

  a:hover {
      text-decoration: none;
  }

  .container {
      max-width: 1120px;
      margin: 0 auto;
      padding: 24px;
  }

  header {
      position: sticky;
      top: 0;
      z-index: 10;
      backdrop-filter: saturate(1.1) blur(10px);
      background: color-mix(in oklab, var(--bg) 85%, transparent);
      border-bottom: 1px solid var(--ring);
      transition: background-color 0.6s ease, border-color 0.6s ease;
  }

  .row {
      display: grid;
      gap: 24px;
  }

  @media (min-width: 1024px) {
      .row {
          grid-template-columns: 1.6fr 1fr;
      }
  }

  .card {
      background: var(--card);
      border: 1px solid var(--ring);
      border-radius: 20px;
      padding: 18px;
      transition: background-color 0.6s ease, border-color 0.6s ease;
  }

  .wallet {
      position: relative;
      overflow: hidden;
      box-shadow: 0 0 40px rgba(var(--accent), 0.18);
      transition: box-shadow 0.6s ease;
  }

  .wallet::after {
      content: "";
      position: absolute;
      right: -80px;
      top: -120px;
      width: 420px;
      height: 420px;
      border-radius: 50%;
      background: radial-gradient(circle at 30% 30%,
              rgba(var(--accent), 0.5),
              transparent 60%);
      filter: blur(30px);
      opacity: 0.45;
      pointer-events: none;
  }


  .partial-neon {
      position: relative;
      overflow: hidden;
      box-shadow: 0 0 40px rgba(var(--accent), 0.18);
      transition: box-shadow 0.6s ease;
  }

  .partial-neon::after {
      content: "";
      position: absolute;
      right: -80px;
      top: -120px;
      width: 420px;
      height: 420px;
      border-radius: 50%;
      background: radial-gradient(circle at 30% 30%,
              rgba(var(--accent), 0.5),
              transparent 60%);
      filter: blur(30px);
      opacity: 0.45;
      pointer-events: none;
  }

  .btn {
      cursor: pointer;
      user-select: none;
      border: 1px solid var(--ring);
      border-radius: 12px;
      padding: 8px 12px;
      background: transparent;
      color: var(--fg);
      transition: background-color 0.4s ease, color 0.4s ease,
          border-color 0.4s ease;
  }

  .btn:hover {
      background: color-mix(in oklab, var(--card) 70%, white 6%);
  }

  .btn[disabled] {
      opacity: 0.6;
      cursor: not-allowed;
  }

  .brand {
      display: flex;
      align-items: center;
      gap: 10px;
  }



  .logo {
      width: 32px;
      height: 32px;
      display: grid;
      place-items: center;
      border-radius: 12px;
      border: 1px solid color-mix(in oklab, rgb(var(--accent)) 40%, var(--ring));
      box-shadow: 0 0 36px rgba(var(--accent), 0.22);
      transition: border-color 0.6s ease, box-shadow 0.6s ease;
  }

  .chip {
      display: inline-block;
      font-size: 12px;
      padding: 2px 8px;
      border-radius: 999px;
      opacity: 0.9;
  }

  .grid {
      display: grid;
      gap: 16px;
  }

  @media (min-width: 768px) {
      .grid.tasks {
          grid-template-columns: 1fr 1fr;
      }
  }

  .task {
      display: flex;
      gap: 14px;
      align-items: start;
  }

  .task h3 {
      margin: 2px 0 6px;
      font-size: 15px;
  }

  .task .meta {
      color: var(--muted);
      font-size: 13px;
  }

  .task .start {
      margin-left: auto;
  }

  .accent-dots {
      display: flex;
      gap: 6px;
  }

  .accent-dots button {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      border: 2px solid white;
      outline: 2px solid rgba(var(--accent), 0.2);
      transition: transform 0.3s ease;
  }

  .accent-dots button:hover {
      transform: scale(1.1);
  }

  [data-theme="dark"] .accent-dots button {
      border-color: #0b0b0c;
  }

  .dot-violet {
      background: linear-gradient(135deg, #8b5cf6, #a78bfa 60%, #6366f1);
  }

  .dot-emerald {
      background: linear-gradient(135deg, #10b981, #34d399 60%, #84cc16);
  }

  .dot-sky {
      background: linear-gradient(135deg, #0ea5e9, #22d3ee 60%, #3b82f6);
  }

  .dot-rose {
      background: linear-gradient(135deg, #f43f5e, #ec4899 60%, #a21caf);
  }

  .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      display: grid;
      place-items: center;
      z-index: 70;
  }

  .modal {
      width: min(720px, 96vw);
      background: var(--card);
      border: 1px solid var(--ring);
      border-radius: 20px;
      padding: 16px;
      transition: background-color 0.6s ease, border-color 0.6s ease;
  }

  .muted {
      color: var(--muted);
  }

  .title {
      font-weight: 700;
      letter-spacing: -0.01em;
  }

  .subtle {
      background: color-mix(in oklab, var(--card) 86%, white 6%);
      border: 1px solid var(--ring);
      border-radius: 16px;
      padding: 14px;
      transition: background-color 0.6s ease, border-color 0.6s ease;
  }

  .pill {
      font-size: 12px;
      padding: 2px 8px;
      border-radius: 999px;
  }

  .y-chip {
      background: rgba(239, 68, 68, 0.12);
      color: #ef4444;
  }

  .f-chip {
      background: rgba(16, 185, 129, 0.12);
      color: #10b981;
  }

  .l-chip {
      background: rgba(236, 72, 153, 0.12);
      color: #ec4899;
  }

  .v-chip {
      background: rgba(14, 165, 233, 0.12);
      color: #0ea5e9;
  }

  /* Bottom fixed nav */
  .bottom-nav {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 60;
      backdrop-filter: blur(10px) saturate(1.1);
      background: color-mix(in oklab, var(--bg) 82%, transparent);
      border-top: 1px solid var(--ring);
      padding: 8px 12px;
  }

  .bottom-nav .tabs {
      max-width: 680px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
  }

  .tab-btn {
      border: 0;
      background: transparent;
      color: var(--muted);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      padding: 8px 10px;
      border-radius: 14px;
      min-width: 60px;
      transition: background-color 0.4s ease, color 0.4s ease,
          transform 0.1s ease;
  }

  .tab-btn:active {
      transform: translateY(1px);
  }

  .tab-btn.active {
      color: rgb(var(--accent));
      background: color-mix(in oklab, var(--card) 80%, white 6%);
  }

  .tab-btn svg {
      width: 22px;
      height: 22px;
      stroke: currentColor;
  }

  .tab-label {
      font-size: 11px;
      letter-spacing: 0.2px;
  }

  /* Check-in card */
  .checkin-week {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 8px;
      margin-top: 10px;
  }

  .check-day {
      aspect-ratio: 1 / 1;
      border: 1px solid var(--ring);
      border-radius: 12px;
      display: grid;
      place-items: center;
      font-size: 12px;
      color: var(--muted);
      transition: background-color 0.3s ease, border-color 0.3s ease,
          color 0.3s ease;
  }

  .check-day .d {
      font-weight: 600;
  }

  .check-day.done {
      background: rgba(var(--accent), 0.16);
      color: rgb(var(--accent));
      border-color: color-mix(in oklab, rgb(var(--accent)) 50%, var(--ring));
  }

  /* ---------- Preloader ---------- */
  .preloader {
      position: fixed;
      inset: 0;
      z-index: 80;
      display: grid;
      place-items: center;
      background: color-mix(in oklab, var(--bg) 92%, black 8%);
      transition: opacity 0.55s ease, visibility 0.55s ease;
  }

  .preloader.hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
  }

  .preloader .box {
      width: min(360px, 92vw);
      background: var(--card);
      border: 1px solid var(--ring);
      border-radius: 22px;
      padding: 22px;
      display: grid;
      gap: 14px;
      place-items: center;
      box-shadow: 0 0 40px rgba(var(--accent), 0.22);
      position: relative;
      overflow: hidden;
  }

  .preloader .box::after {
      content: "";
      position: absolute;
      right: -100px;
      top: -100px;
      width: 420px;
      height: 420px;
      border-radius: 50%;
      background: radial-gradient(circle at 30% 30%,
              rgba(var(--accent), 0.5),
              transparent 60%);
      filter: blur(32px);
      opacity: 0.4;
      pointer-events: none;
  }

  .preloader .logo-lg {
      width: 46px;
      height: 46px;
      display: grid;
      place-items: center;
      border-radius: 14px;
      border: 1px solid color-mix(in oklab, rgb(var(--accent)) 40%, var(--ring));
      box-shadow: 0 0 36px rgba(var(--accent), 0.26);
      background: color-mix(in oklab, var(--card) 80%, white 6%);
  }

  .ring {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      border: 3px solid color-mix(in oklab, var(--ring) 75%, transparent);
      border-top-color: rgb(var(--accent));
      animation: spin 1s linear infinite;
  }

  .progress {
      width: 100%;
      height: 6px;
      border-radius: 999px;
      border: 1px solid var(--ring);
      background: color-mix(in oklab, var(--card) 80%, white 6%);
      overflow: hidden;
  }

  .progress i {
      display: block;
      height: 100%;
      width: 40%;
      background: linear-gradient(90deg,
              rgba(var(--accent), 0.35),
              rgba(var(--accent), 0.9));
      border-radius: 999px;
      animation: slide 1.6s ease-in-out infinite;
  }

  .preloader .muted {
      font-size: 12px;
  }

  @keyframes spin {
      to {
          transform: rotate(360deg);
      }
  }

  @keyframes slide {
      0% {
          transform: translateX(-60%);
      }

      50% {
          transform: translateX(20%);
      }

      100% {
          transform: translateX(120%);
      }
  }

  @media (prefers-reduced-motion: reduce) {
      .ring {
          animation: none;
      }

      .progress i {
          animation: none;
          width: 55%;
      }
  }

  /* --- Swap (Coming Soon) --- */
  .swap-card {
      position: relative;
      overflow: hidden;
      box-shadow: 0 0 40px rgba(var(--accent), 0.12);
  }

  .swap-card::after {
      content: "";
      position: absolute;
      right: -90px;
      top: -120px;
      width: 420px;
      height: 420px;
      border-radius: 50%;
      background: radial-gradient(circle at 30% 30%,
              rgba(var(--accent), 0.45),
              transparent 60%);
      filter: blur(32px);
      opacity: 0.35;
      pointer-events: none;
  }

  .soon-ribbon {
      position: absolute;
      top: 12px;
      right: 12px;
      font-size: 11px;
      padding: 4px 10px;
      border-radius: 999px;
      background: rgba(var(--accent), 0.16);
      color: rgb(var(--accent));
      border: 1px solid color-mix(in oklab, rgb(var(--accent)) 55%, var(--ring));
      letter-spacing: 0.2px;
      font-weight: 600;
  }

  .swap-grid {
      display: grid;
      gap: 12px;
  }

  .swap-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: center;
  }

  .swap-field {
      display: flex;
      gap: 10px;
      align-items: center;
      background: color-mix(in oklab, var(--card) 86%, white 6%);
      border: 1px solid var(--ring);
      border-radius: 14px;
      padding: 10px;
  }

  .token-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border-radius: 12px;
      border: 1px solid var(--ring);
      background: transparent;
      color: var(--fg);
      font-weight: 600;
      user-select: none;
  }

  .token-pill .logo {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      font-size: 11px;
      font-weight: 800;
      background: rgba(var(--accent), 0.18);
      color: rgb(var(--accent));
      border: 1px solid color-mix(in oklab, rgb(var(--accent)) 50%, var(--ring));
  }

  .swap-amount {
      flex: 1;
      min-width: 0;
      background: transparent;
      border: 0;
      outline: 0;
      color: var(--fg);
      font-size: 16px;
      opacity: 0.7;
  }

  .swap-amount[disabled] {
      opacity: 0.5;
  }

  .swap-mid {
      display: grid;
      place-items: center;
  }

  .swap-mid .cycle {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: 1px solid var(--ring);
      display: grid;
      place-items: center;
      background: color-mix(in oklab, var(--card) 90%, white 5%);
  }

  .swap-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      color: var(--muted);
      font-size: 12px;
  }

  .swap-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
  }

  .btn-soft {
      border-color: color-mix(in oklab,
              var(--ring) 80%,
              rgb(var(--accent)) 20%);
      background: color-mix(in oklab, var(--card) 85%, white 6%);
  }

  /* Swap header layout */
  .swap-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
  }

  .swap-titlewrap {
      display: flex;
      flex-direction: column;
      gap: 2px;
  }

  /* Turn the ribbon into a right-aligned badge (no absolute overlap) */
  .swap-card .soon-ribbon {
      position: static;
      /* override absolute */
      margin-left: auto;
      /* push to the right */
      flex-shrink: 0;
      font-size: 11px;
      padding: 4px 10px;
      border-radius: 999px;
      background: rgba(var(--accent), .16);
      color: rgb(var(--accent));
      border: 1px solid color-mix(in oklab, rgb(var(--accent)) 55%, var(--ring));
      letter-spacing: .2px;
      font-weight: 600;
  }

  /* Optional: add a bit of room below header before fields */
  .swap-grid {
      margin-top: 6px;
  }



  /* === SWAP: mobile-first stack & centered icon (append at end) === */

  /* 1) Stack token above amount on small screens */
  .swap-card .swap-field {
      flex-direction: column;
      align-items: stretch;
      gap: 8px;
  }

  .swap-card .swap-amount {
      width: 100%;
      text-align: left;
      font-size: 18px;
      opacity: .85;
  }

  /* 2) Center the swap icon column in the grid */
  .swap-card .swap-mid {
      justify-self: center;
      display: grid;
      place-items: center;
  }

  .swap-card .swap-mid .cycle {
      width: 40px;
      height: 40px;
  }

  /* 3) ≥640px: 3 columns [FROM] [ICON] [TO]; amount right-aligned */
  @media (min-width: 640px) {
      .swap-card .swap-grid {
          grid-template-columns: 1fr 48px 1fr;
          align-items: center;
      }

      .swap-card .swap-panel.from {
          grid-column: 1;
      }

      .swap-card .swap-mid {
          grid-column: 2;
      }

      .swap-card .swap-panel.to {
          grid-column: 3;
      }

      .swap-card .swap-meta,
      .swap-card .swap-actions {
          grid-column: 1 / -1;
          /* span all three columns */
      }

      /* On larger screens, put token + amount back on one line */
      .swap-card .swap-field {
          flex-direction: row;
          align-items: center;
      }

      .swap-card .swap-amount {
          margin-left: auto;
          text-align: right;
          font-size: 16px;
      }

      .swap-card .swap-mid .cycle {
          width: 44px;
          height: 44px;
      }
  }



  .form-field {
      display: flex;
      flex-direction: column;
      gap: 6px;
  }

  .form-label {
      font-size: 12px;
      color: var(--muted);
  }

  .form-input {
      background: color-mix(in oklab, var(--card) 86%, white 6%);
      border: 1px solid var(--ring);
      border-radius: 12px;
      color: var(--fg);
      padding: 10px 12px;
      font: inherit;
  }

  .form-input:focus {
      outline: none;
      border-color: rgb(var(--accent));
      box-shadow: 0 0 0 3px rgba(var(--accent), .15);
  }


  /* Sidebar */
  .sidebar {
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      width: 260px;
      background: var(--card);
      border-right: 1px solid var(--ring);
      z-index: 75;
      transform: translateX(-100%);
      transition: transform .35s ease, background-color .6s ease, border-color .6s ease;
  }

  .sidebar.open {
      transform: translateX(0);
  }

  @media (min-width: 1100px) {
      .sidebar {
          transform: none;
      }

      .sidebar.open {
          transform: none;
      }
  }

  .sidebar-inner {
      height: 100%;
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 16px;
  }

  .sidebar-brand {
      display: flex;
      align-items: center;
      gap: 10px;
  }

  .sidebar .logo {
      width: 32px;
      height: 32px;
      display: grid;
      place-items: center;
      border-radius: 12px;
      border: 1px solid color-mix(in oklab, rgb(var(--accent)) 40%, var(--ring));
      box-shadow: 0 0 36px rgba(var(--accent), 0.22);
  }

  .sidebar-nav {
      display: grid;
      gap: 6px;
      margin-top: 6px;
  }

  .side-link {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid var(--ring);
      background: transparent;
      color: var(--fg);
      cursor: pointer;
  }

  .side-link:hover {
      background: color-mix(in oklab, var(--card) 80%, white 6%);
  }

  .side-link svg {
      width: 20px;
      height: 20px;
      stroke: currentColor;
  }

  .sidebar-sep {
      height: 1px;
      background: var(--ring);
      margin: 8px 0;
  }

  /* Scrim for mobile */
  .sidebar-scrim {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .5);
      z-index: 70;
      opacity: 0;
      visibility: hidden;
      transition: opacity .25s ease, visibility .25s ease;
  }

  .sidebar-scrim.show {
      opacity: 1;
      visibility: visible;
  }

  /* Layout shift to make room for fixed sidebar on desktop */
  @media (min-width: 1100px) {
      .with-sidebar {
          padding-left: 280px;
      }

      /* content shifts to the right */
  }

  /* Small helper */
  .only-mobile {
      display: inline-flex;
  }

  @media (min-width: 1100px) {
      .only-mobile {
          display: none;
      }

      header .logo {
          margin-left: 45px;
      }
  }

  /* Active state */
  .side-link.active {
      color: rgb(var(--accent));
      background: color-mix(in oklab, var(--card) 80%, white 6%);
      border-color: color-mix(in oklab, rgb(var(--accent)) 55%, var(--ring));
      box-shadow: 0 0 0 2px rgba(var(--accent), .10) inset;
  }

  /* Optional: slim left accent bar */
  .side-link.active::before {
      content: "";
      width: 3px;
      height: 60%;
      border-radius: 999px;
      background: rgb(var(--accent));
      margin-right: 8px;
  }

  .side-link.active svg {
      stroke: currentColor;
  }

  /* Stop the affiliate claim bar from animating */
  #claimProgress {
      animation: none !important;
      transition: width .4s ease;
  }




  .my-10 {
    margin: 10px 0 10px 0;
  }

  