:root {
  --ido-ink: #102536;
  --ido-copy: #526c7d;
  --ido-muted: #7a94a3;
  --ido-line: #dbe8ee;
  --ido-line-strong: #c8dde5;
  --ido-surface: #ffffff;
  --ido-surface-2: #f4f8f9;
  --ido-surface-3: #f8fbfc;
  --ido-purple: #6d43ff;
  --ido-purple-light: #f3f0ff;
  --ido-green: #0ea77c;
  --ido-green-light: #e9f7f2;
  --ido-orange: #ff7b35;
  --ido-shadow: 0 18px 50px rgba(16, 37, 54, 0.09);
  --ido-radius: 22px;
  --ido-radius-sm: 14px;
}

/* Countdown must never wrap or overflow neighbors */
.ido-countdown {
  white-space: nowrap;
  min-width: 0;
}

/* =========================================================
   Global overrides for presale.css / reference-layout.css
   dark-theme residuals on the IDO page
   ========================================================= */

.presale-page {
  color-scheme: light;
  color: var(--ido-ink);
  background:
    radial-gradient(circle at 78% 6%, rgba(109, 67, 255, .07), transparent 26rem),
    radial-gradient(circle at 18% 30%, rgba(14, 167, 124, .08), transparent 28rem),
    #f4f8f9 !important;
}

.presale-page .presale-shell {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px) 60px;
  border-inline: 0;
  background: transparent;
}

.presale-page .presale-tabs {
  position: sticky;
  top: 72px;
  z-index: 9;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--ido-line);
}

.presale-page .presale-tab {
  min-height: 44px;
  border: 1px solid var(--ido-line);
  border-radius: 12px;
  color: var(--ido-copy);
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.presale-page .presale-tab:hover,
.presale-page .presale-tab.is-active {
  color: #fff;
  border-color: var(--ido-green);
  background: linear-gradient(135deg, var(--ido-green), #1cc9a3);
  box-shadow: 0 10px 28px rgba(14, 167, 124, .18);
}

.presale-page .wallet-button {
  border: 1px solid var(--ido-line);
  border-radius: 12px;
  color: var(--ido-ink);
  background: #fff;
  font-weight: 800;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.presale-page .wallet-button:hover {
  border-color: var(--ido-green);
  color: var(--ido-green);
  background: var(--ido-green-light);
}

.presale-page .notification-button {
  border: 1px solid var(--ido-line);
  border-radius: 12px;
  color: var(--ido-ink);
  background: #fff;
}

.presale-page .notification-button:hover {
  border-color: var(--ido-green);
  color: var(--ido-green);
}

.presale-page .notification-dot {
  background: #ef4444;
  box-shadow: none;
}

/* Neutralize residual dark .panel / .panel-heading rules from presale.css */
.presale-page .panel,
.presale-page .purchase-panel,
.presale-page .position-panel,
.presale-page .progress-panel,
.presale-page .reservation-form,
.presale-page .reservation-points,
.presale-page .nft-position-card,
.presale-page .release-card,
.presale-page .transfer-panel,
.presale-page .delivery-card,
.presale-page .schedule-panel,
.presale-page .record-lookup-panel,
.presale-page .invite-link-card,
.presale-page .invite-stats,
.presale-page .invite-mission-card,
.presale-page .invite-task-card,
.presale-page .invite-record-card,
.presale-page .invite-reward-card,
.presale-page .invite-how-card,
.presale-page .invite-share-card,
.presale-page .invite-funnel-card {
  border-color: var(--ido-line);
  background: var(--ido-surface);
  color: var(--ido-ink);
}

.presale-page .panel-heading h2,
.presale-page .panel-heading h3 {
  color: var(--ido-ink);
}

/* All tab panels inside the IDO page must stay in the light palette */
.presale-page .tab-panel {
  color: var(--ido-ink);
}

.presale-mobile-nav {
  display: none;
}

@media (max-width: 560px) {
  .presale-page .presale-tabs {
    position: sticky;
    top: 70px;
    right: auto;
    bottom: auto;
    left: auto;
    display: flex;
    gap: 6px;
    margin-inline: -2px;
    padding: 8px 0;
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--ido-line);
  }
  .presale-page .presale-tabs::-webkit-scrollbar {
    display: none;
  }
  .presale-page .presale-tab {
    flex: 1 0 78px;
    min-height: 46px;
  }
  .presale-mobile-nav {
    position: fixed;
    z-index: 90;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    min-height: 64px;
    padding: 6px;
    border: 1px solid var(--ido-line);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 46px rgba(16, 37, 54, .12);
    backdrop-filter: blur(18px);
  }
  .presale-mobile-nav a {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 11px;
    color: var(--ido-muted);
    font-size: 11px;
    text-decoration: none;
  }
  .presale-mobile-nav a > span {
    font-size: 20px;
    line-height: 1;
  }
  .presale-mobile-nav a > b {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .presale-mobile-nav a.active {
    color: #fff;
    background: var(--ido-green);
  }
}

/* =========================================================
   IDO page shell — unified light surface
   ========================================================= */

/* =========================================================
   IDO subscription panel — reference layout, light theme
   ========================================================= */

#presale-panel {
  color: var(--ido-ink);
}

/* Compact hero */
#presale-panel .ido-launch-hero--compact {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  min-height: 420px;
  margin-top: 18px;
  padding: clamp(32px, 4.5vw, 56px);
  overflow: hidden;
  border: 1px solid var(--ido-line);
  border-radius: var(--ido-radius);
  background:
    radial-gradient(circle at 78% 22%, rgba(109, 67, 255, 0.10), transparent 24rem),
    radial-gradient(circle at 12% 100%, rgba(14, 167, 124, 0.10), transparent 22rem),
    linear-gradient(135deg, #ffffff 0%, #f8fbfc 55%, #f1f7ff 100%);
  box-shadow: var(--ido-shadow);
}

#presale-panel .ido-launch-hero--compact:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(72, 103, 143, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72, 103, 143, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, #000, transparent 80%);
}

#presale-panel .ido-launch-hero--compact .ido-launch-copy,
#presale-panel .ido-launch-hero--compact .ido-launch-stage {
  position: relative;
  z-index: 1;
}

#presale-panel .ido-launch-hero--compact .ido-launch-copy {
  max-width: 680px;
}

#presale-panel .ido-launch-hero--compact .eyebrow {
  color: var(--ido-green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#presale-panel .ido-launch-hero--compact h1 {
  margin: 10px 0 0;
  color: var(--ido-ink);
  font-size: clamp(36px, 4.4vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

#presale-panel .ido-launch-hero--compact h1 em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ido-purple);
  font-style: normal;
}

#presale-panel .ido-launch-hero--compact h1 em svg {
  width: clamp(24px, 3vw, 34px);
  height: clamp(24px, 3vw, 34px);
  color: #ffbb1c;
  filter: drop-shadow(0 2px 6px rgba(255, 187, 28, .35));
}

#presale-panel .ido-launch-hero--compact .hero-lede {
  max-width: 580px;
  margin: 16px 0 18px;
  color: var(--ido-copy);
  font-size: 15px;
  line-height: 1.7;
}

#presale-panel .ido-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

#presale-panel .ido-trust-row span {
  position: relative;
  padding: 8px 13px 8px 30px;
  border: 1px solid var(--ido-line);
  border-radius: 999px;
  color: var(--ido-copy);
  background: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 800;
}

#presale-panel .ido-trust-row span:before {
  content: "✓";
  position: absolute;
  left: 11px;
  color: var(--ido-green);
  font-weight: 900;
}

#presale-panel .ido-launch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

#presale-panel .ido-launch-actions .primary-action,
#presale-panel .ido-launch-actions .secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

#presale-panel .ido-launch-actions .primary-action {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, #0ea77c, #1cc9a3);
  box-shadow: 0 12px 28px rgba(14, 167, 124, .22);
}

#presale-panel .ido-launch-actions .primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(14, 167, 124, .28);
}

#presale-panel .ido-launch-actions .secondary-action {
  color: var(--ido-ink);
  border: 1px solid var(--ido-line-strong);
  background: rgba(255, 255, 255, .9);
}

#presale-panel .ido-launch-actions .secondary-action:hover {
  border-color: var(--ido-green);
  color: var(--ido-green);
  background: #fff;
}

/* Hero stage */
#presale-panel .ido-launch-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 380px;
}

#presale-panel .ido-coin-stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 240px;
  isolation: isolate;
}

#presale-panel .ido-coin-stage:after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 260px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(106, 67, 255, .38), rgba(19, 220, 196, .16) 46%, transparent 72%);
  filter: blur(5px);
  transform: translateX(-50%);
}

#presale-panel .ido-main-coin {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 170px;
  height: 170px;
  border: 11px solid #813dff;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #927cff, #5629e9 58%, #241078);
  box-shadow: inset -18px -12px 28px rgba(16, 2, 70, .42), inset 12px 9px 20px rgba(255, 255, 255, .3), 0 0 0 4px #42d6ff, 0 0 48px rgba(102, 57, 255, .54);
  transform: translateY(-28px) rotate(-9deg);
}

#presale-panel .ido-main-coin:after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
}

#presale-panel .ido-main-coin img {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 6px #fff, 0 8px 22px rgba(16, 2, 70, .28);
}

#presale-panel .ido-stage-ring {
  position: absolute;
  left: 50%;
  bottom: 64px;
  border-radius: 50%;
  transform: translateX(-50%);
}

#presale-panel .ido-stage-ring.ring-back {
  width: 260px;
  height: 92px;
  border: 4px solid #7252ff;
  background: linear-gradient(180deg, #eefcff, #77e9f5 28%, #5a32dc 35%, #30178e 75%, #6f42ff);
  box-shadow: 0 11px 0 #251276, 0 18px 32px rgba(71, 44, 207, .32);
}

#presale-panel .ido-stage-ring.ring-front {
  z-index: 3;
  bottom: 78px;
  width: 210px;
  height: 58px;
  border: 3px solid #68efff;
  background: radial-gradient(ellipse, #fff 0 5%, #b86cff 24%, #5125dc 55%, #271078 76%);
  box-shadow: 0 0 24px #8f45ff;
}

#presale-panel .ido-mini-coin {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #6841ed;
  box-shadow: 0 10px 22px rgba(75, 43, 207, .25);
  font-style: normal;
  font-weight: 950;
}

#presale-panel .ido-mini-coin.coin-a { top: 58px; right: 24px; width: 42px; height: 42px; border: 3px solid #48dbff; transform: rotate(12deg); }
#presale-panel .ido-mini-coin.coin-b { left: 24px; top: 138px; width: 32px; height: 32px; border: 3px solid #ff9c3f; font-size: 10px; }
#presale-panel .ido-mini-coin.coin-c { right: 54px; bottom: 68px; width: 28px; height: 28px; border: 3px solid #37aee2; font-size: 9px; }

/* Hero stats card */
#presale-panel .ido-hero-stats-card {
  position: relative;
  z-index: 6;
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 280px;
  padding: 22px;
  border: 1px solid var(--ido-line);
  border-radius: var(--ido-radius-sm);
  color: var(--ido-ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(16, 37, 54, 0.12);
  backdrop-filter: blur(14px);
}

#presale-panel .ido-hero-stats-card small {
  color: var(--ido-green);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

#presale-panel .ido-hero-stats-card strong {
  color: var(--ido-ink);
  font-size: 28px;
  line-height: 1;
}

#presale-panel .ido-hero-stats-card > span {
  color: var(--ido-copy);
  font-size: 12px;
}

#presale-panel .ido-hero-stats-card .hero-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ido-line);
  min-width: 0;
}

#presale-panel .ido-hero-stats-card .hero-stat-row span {
  color: var(--ido-muted);
  font-size: 12px;
  flex: 0 0 auto;
}

#presale-panel .ido-hero-stats-card .hero-stat-row strong {
  font-size: 17px;
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}

#presale-panel .ido-hero-stats-card .hero-stat-row strong.ido-countdown {
  flex: 0 0 auto;
  color: var(--ido-orange);
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 950;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

#presale-panel .ido-hero-stats-card .hero-stat-row strong small {
  display: inline;
  color: var(--ido-muted);
  font-size: 10px;
  font-weight: 700;
}

#presale-panel .ido-hero-stats-card .progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf1f4;
}

#presale-panel .ido-hero-stats-card .progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ido-purple), var(--ido-green));
}

#presale-panel .ido-hero-stats-card .hero-progress > span {
  display: block;
  margin-top: 6px;
  color: var(--ido-muted);
  font-size: 9px;
}

/* Section headings */
#presale-panel .section-heading {
  margin-bottom: 18px;
}

#presale-panel .section-heading .eyebrow {
  color: var(--ido-green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#presale-panel .section-heading h2 {
  margin: 6px 0 0;
  color: var(--ido-ink);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 950;
}

#presale-panel .ido-certificate-section,
#presale-panel .ido-progress-section,
#presale-panel .ido-faq-section {
  margin-top: 40px;
}

#presale-panel .ido-faq-section {
  margin-bottom: 48px;
}

/* Subscription section */
#presale-panel .ido-subscription-section {
  margin-top: 22px;
}

#presale-panel .ido-subscription-card {
  padding: 0;
  border: 1px solid var(--ido-line);
  border-radius: var(--ido-radius);
  background: var(--ido-surface);
  box-shadow: var(--ido-shadow);
  overflow: hidden;
}

#presale-panel .subscription-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(22px, 3vw, 30px) clamp(24px, 3vw, 34px);
  border-bottom: 1px solid var(--ido-line);
  background: linear-gradient(135deg, #ffffff, #f8fbfc);
}

#presale-panel .subscription-card-head h2 {
  margin: 6px 0 0;
  color: var(--ido-ink);
  font-size: 26px;
}

#presale-panel .subscription-card-head small {
  display: block;
  margin-top: 7px;
  color: var(--ido-copy);
  font-size: 13px;
}

#presale-panel .subscription-card-head .draft-tag {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--ido-line);
  border-radius: 999px;
  color: var(--ido-orange);
  background: #fff8f0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

#presale-panel .subscription-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  margin-top: 0;
}

#presale-panel .subscription-main {
  padding: clamp(22px, 3vw, 34px);
  min-width: 0;
}

#presale-panel .subscription-side {
  padding: clamp(22px, 3vw, 34px) clamp(22px, 3vw, 34px) clamp(22px, 3vw, 34px) 0;
  min-width: 0;
}

/* Step label */
#presale-panel .ido-form-step {
  margin-bottom: 28px;
}

#presale-panel .step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

#presale-panel .step-label > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--ido-purple), #8b5cf6);
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}

#presale-panel .step-label > strong {
  color: var(--ido-ink);
  font-size: 15px;
  font-weight: 900;
}

/* Field label */
#presale-panel .field-label {
  display: block;
  margin: 0 0 9px;
  color: var(--ido-ink);
  font-size: 13px;
  font-weight: 800;
}

#presale-panel .field-label em {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ido-orange);
  background: #fff8f0;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

/* Asset select */
#presale-panel .asset-select {
  margin-bottom: 0;
}

#presale-panel .asset-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

#presale-panel .ido-payment-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid var(--ido-line);
  border-radius: 12px;
  color: var(--ido-ink);
  background: var(--ido-surface-3);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

#presale-panel .ido-payment-option .asset-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(16, 37, 54, 0.08);
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
}

#presale-panel .ido-payment-option .asset-icon img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

#presale-panel .ido-payment-option.is-selected .asset-icon img {
  transform: scale(1.08);
  transition: transform 180ms ease;
}

#presale-panel .ido-payment-option strong {
  font-size: 14px;
}

#presale-panel .ido-payment-option small {
  color: var(--ido-muted);
  font-size: 10px;
}

#presale-panel .ido-payment-option:hover {
  border-color: var(--ido-purple);
}

#presale-panel .ido-payment-option.is-selected {
  border-color: var(--ido-green);
  background: var(--ido-green-light);
  box-shadow: 0 0 0 1px rgba(14, 167, 124, 0.1) inset;
}

#presale-panel .ido-payment-option.is-selected .asset-icon {
  background: linear-gradient(135deg, var(--ido-green), #118bb3);
}

#presale-panel .ido-payment-option.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: saturate(0.55);
}

#presale-panel .is-hidden {
  display: none !important;
}

/* Amount grid */
#presale-panel .amount-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.55fr);
  gap: 18px;
  margin-bottom: 0;
}

#presale-panel .amount-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--ido-line);
  border-radius: 12px;
  background: var(--ido-surface-3);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

#presale-panel .amount-input:focus-within {
  border-color: var(--ido-green);
  box-shadow: 0 0 0 3px rgba(14, 167, 124, 0.1);
}

#presale-panel .amount-input input {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border: 0;
  outline: 0;
  color: var(--ido-ink);
  background: transparent;
  font-size: 26px;
  font-weight: 800;
}

#presale-panel .amount-input span {
  padding-right: 16px;
  color: var(--ido-green);
  font-weight: 900;
}

#presale-panel .amount-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

#presale-panel .amount-presets button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--ido-line);
  border-radius: 8px;
  color: var(--ido-copy);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

#presale-panel .amount-presets button:hover {
  border-color: var(--ido-green);
  color: var(--ido-green);
  background: var(--ido-green-light);
}

#presale-panel .amount-presets button[data-preset="custom"] {
  color: var(--ido-purple);
  background: var(--ido-purple-light);
  border-color: rgba(109, 67, 255, 0.18);
}

#presale-panel .amount-presets button[data-preset="custom"]:hover {
  border-color: var(--ido-purple);
}

#presale-panel .estimate-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 18px;
  border: 1px solid var(--ido-line);
  border-radius: 12px;
  background: linear-gradient(145deg, #f4fffb, #f8fbff);
}

#presale-panel .estimate-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

#presale-panel .estimate-display strong {
  color: var(--ido-green);
  font-size: 28px;
  font-weight: 900;
}

#presale-panel .estimate-display span {
  color: var(--ido-muted);
  font-size: 12px;
  font-weight: 800;
}

#presale-panel .estimate-field > small {
  display: block;
  margin-top: 6px;
  color: var(--ido-purple);
  font-size: 12px;
  font-weight: 800;
}

/* Payment methods */
#presale-panel .payment-methods {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

#presale-panel .payment-method {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--ido-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

#presale-panel .payment-method:hover {
  border-color: var(--ido-green);
}

#presale-panel .payment-method input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

#presale-panel .payment-method .method-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0f8f6, #e4f3ef);
  box-shadow: 0 4px 12px rgba(14, 167, 124, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-size: 22px;
  line-height: 1;
  flex: 0 0 auto;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

#presale-panel .payment-method:hover .method-icon {
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(14, 167, 124, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

#presale-panel .payment-method.is-selected .method-icon {
  background: linear-gradient(135deg, #0ea77c, #118bb3);
  box-shadow: 0 8px 20px rgba(14, 167, 124, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

#presale-panel .payment-method:first-child .method-icon {
  background: linear-gradient(135deg, #e8f6f2, #d8f0e9);
}
#presale-panel .payment-method:first-child:hover .method-icon {
  background: linear-gradient(135deg, #0ea77c, #118bb3);
}
#presale-panel .payment-method:last-child .method-icon {
  background: linear-gradient(135deg, #f3f0ff, #e8e3ff);
}
#presale-panel .payment-method:last-child:hover .method-icon {
  background: linear-gradient(135deg, #6d43ff, #8b5cf6);
}

#presale-panel .payment-method .method-body {
  display: grid;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

#presale-panel .payment-method .method-body strong {
  color: var(--ido-ink);
  font-size: 14px;
  font-weight: 900;
}

#presale-panel .payment-method .method-body small {
  color: var(--ido-copy);
  font-size: 12px;
  line-height: 1.5;
}

#presale-panel .payment-method .method-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 2px solid var(--ido-line);
  border-radius: 50%;
  flex: 0 0 auto;
  transition: border-color 180ms ease, background 180ms ease;
}

#presale-panel .payment-method .method-check:after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ido-green);
  transform: scale(0);
  transition: transform 180ms ease;
}

#presale-panel .payment-method.is-selected {
  border-color: var(--ido-green);
  background: var(--ido-green-light);
  box-shadow: 0 0 0 1px rgba(14, 167, 124, 0.1) inset;
}

#presale-panel .payment-method.is-selected .method-check {
  border-color: var(--ido-green);
}

#presale-panel .payment-method.is-selected .method-check:after {
  transform: scale(1);
}

/* Profile fields */
#presale-panel .profile-fields {
  display: grid;
  gap: 12px;
  margin-bottom: 0;
}

#presale-panel .text-input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--ido-line);
  border-radius: 11px;
  outline: 0;
  color: var(--ido-ink);
  background: var(--ido-surface-3);
  font-size: 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

#presale-panel .text-input:focus {
  border-color: var(--ido-green);
  box-shadow: 0 0 0 3px rgba(14, 167, 124, 0.1);
}

#presale-panel .text-input::placeholder {
  color: #8aa0ad;
}

#presale-panel .form-grid.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#presale-panel .wallet-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

#presale-panel .wallet-entry-row .secondary-action {
  white-space: nowrap;
  min-width: auto;
}

#presale-panel .secondary-action {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--ido-line);
  border-radius: 11px;
  color: var(--ido-ink);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

#presale-panel .secondary-action:hover {
  border-color: var(--ido-green);
  background: var(--ido-green-light);
}

#presale-panel .primary-action {
  width: 100%;
  min-height: 56px;
  padding: 14px 22px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--ido-green), #118bb3);
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

#presale-panel .primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(14, 167, 124, 0.24);
}

#presale-panel .primary-action:disabled {
  cursor: not-allowed;
  filter: saturate(0.55);
  opacity: 0.72;
}

#presale-panel .action-note {
  margin: 12px 0 0;
  color: var(--ido-muted);
  font-size: 12px;
  line-height: 1.6;
}

/* Order preview */
#presale-panel .ido-order-preview {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--ido-line);
  border-radius: 12px;
  background: var(--ido-surface-3);
}

#presale-panel .ido-order-preview .preview-title {
  margin-bottom: 12px;
  color: var(--ido-ink);
  font-size: 13px;
  font-weight: 900;
}

#presale-panel .ido-order-preview .preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--ido-line);
  font-size: 13px;
}

#presale-panel .ido-order-preview .preview-row:last-child {
  border-bottom: 0;
}

#presale-panel .ido-order-preview .preview-row span {
  color: var(--ido-muted);
  font-weight: 700;
}

#presale-panel .ido-order-preview .preview-row strong {
  color: var(--ido-ink);
  font-weight: 900;
}

/* Side estimate card */
#presale-panel .ido-estimate-card {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--ido-line);
  border-radius: var(--ido-radius-sm);
  background: linear-gradient(145deg, #ffffff, #f8fbfc);
  box-shadow: var(--ido-shadow);
}

#presale-panel .ido-estimate-card .estimate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#presale-panel .ido-estimate-card .estimate-head strong {
  color: var(--ido-ink);
  font-size: 15px;
  font-weight: 900;
}

#presale-panel .ido-estimate-card .estimate-head small {
  color: var(--ido-muted);
  font-size: 11px;
  font-weight: 700;
}

#presale-panel .ido-estimate-card .estimate-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  background: var(--ido-green-light);
}

#presale-panel .ido-estimate-card .estimate-value strong {
  color: var(--ido-green);
  font-size: 32px;
  font-weight: 950;
  line-height: 1;
}

#presale-panel .ido-estimate-card .estimate-value span {
  color: var(--ido-green);
  font-size: 14px;
  font-weight: 900;
}

#presale-panel .ido-estimate-card > small {
  color: var(--ido-muted);
  font-size: 11px;
}

#presale-panel .ido-estimate-card .estimate-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

#presale-panel .ido-estimate-card .estimate-perks > span {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 12px;
  border: 1px solid rgba(122, 162, 178, 0.26);
  border-radius: 14px;
  background: linear-gradient(160deg, #ffffff, #f8fbfd);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

/* 顶部主题色渐变条（每张卡片按权益分色） */
#presale-panel .ido-estimate-card .estimate-perks > span::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
  opacity: 0.9;
}
#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(1)::before { background: linear-gradient(90deg, #0ea77c, rgba(14, 167, 124, 0.12)); }
#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(2)::before { background: linear-gradient(90deg, #6d43ff, rgba(109, 67, 255, 0.12)); }
#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(3)::before { background: linear-gradient(90deg, #ff7b35, rgba(255, 123, 53, 0.12)); }
#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(4)::before { background: linear-gradient(90deg, #258fe5, rgba(37, 143, 229, 0.12)); }

#presale-panel .ido-estimate-card .estimate-perks > span:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(16, 37, 54, 0.08);
}
#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(1):hover { border-color: rgba(14, 167, 124, 0.4); }
#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(2):hover { border-color: rgba(109, 67, 255, 0.4); }
#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(3):hover { border-color: rgba(255, 123, 53, 0.4); }
#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(4):hover { border-color: rgba(37, 143, 229, 0.4); }

#presale-panel .ido-estimate-card .estimate-perks > span i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 19px;
  font-style: normal;
  flex: 0 0 auto;
  transition: transform 180ms ease;
}
#presale-panel .ido-estimate-card .estimate-perks > span:hover i { transform: scale(1.06); }

#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(1) i {
  background: linear-gradient(135deg, #e9f7f2, #d8f2e8);
  box-shadow: 0 4px 12px rgba(14, 167, 124, 0.14);
}

#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(2) i {
  background: linear-gradient(135deg, #f3f0ff, #e8e3ff);
  box-shadow: 0 4px 12px rgba(109, 67, 255, 0.14);
}

#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(3) i {
  background: linear-gradient(135deg, #fff4e6, #ffead1);
  box-shadow: 0 4px 12px rgba(255, 123, 53, 0.14);
}

#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(4) i {
  background: linear-gradient(135deg, #e6f4ff, #d5ecff);
  box-shadow: 0 4px 12px rgba(37, 143, 229, 0.14);
}

#presale-panel .ido-estimate-card .estimate-perks > span strong {
  display: block;
  color: var(--ido-ink);
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* 小字改为主题色 pill 标签 */
#presale-panel .ido-estimate-card .estimate-perks > span small {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}
#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(1) small { background: rgba(14, 167, 124, 0.12); color: #0d966f; }
#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(2) small { background: rgba(109, 67, 255, 0.12); color: #5c35e8; }
#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(3) small { background: rgba(255, 123, 53, 0.13); color: #e56f2e; }
#presale-panel .ido-estimate-card .estimate-perks > span:nth-child(4) small { background: rgba(37, 143, 229, 0.12); color: #1f7cc8; }

/* 移动端收紧 */
@media (max-width: 560px) {
  #presale-panel .ido-estimate-card .estimate-perks { gap: 8px; }
  #presale-panel .ido-estimate-card .estimate-perks > span { padding: 11px 10px; gap: 9px; }
  #presale-panel .ido-estimate-card .estimate-perks > span i { width: 40px; height: 40px; border-radius: 12px; font-size: 17px; }
  #presale-panel .ido-estimate-card .estimate-perks > span strong { font-size: 14px; }
  #presale-panel .ido-estimate-card .estimate-perks > span small { font-size: 10.5px; padding: 1px 7px; }
}

/* Wallet state */
#presale-panel .wallet-state {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 0;
  padding: 11px 13px;
  border: 1px solid var(--ido-line);
  border-radius: 11px;
  color: var(--ido-copy);
  background: var(--ido-surface-3);
  font-size: 12px;
  line-height: 1.5;
}

#presale-panel .wallet-state .state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ido-muted);
  flex: 0 0 auto;
}

#presale-panel .wallet-state.is-connected .state-dot {
  background: var(--ido-green);
  box-shadow: 0 0 12px rgba(14, 167, 124, 0.35);
}

#presale-panel .wallet-state.is-connected {
  color: #1a7a5e;
  background: var(--ido-green-light);
  border-color: rgba(14, 167, 124, 0.25);
}

/* IDO success panel */
#presale-panel .ido-success-card {
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid rgba(14, 167, 124, 0.35);
  border-radius: var(--ido-radius);
  background: linear-gradient(145deg, #ffffff, #f4fffb);
  box-shadow: var(--ido-shadow), 0 0 0 1px rgba(14, 167, 124, 0.08) inset;
  text-align: center;
}

#presale-panel .ido-success-card[hidden] {
  display: none !important;
}

#presale-panel .success-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

#presale-panel .success-coin {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 35% 25%, #927cff, #5629e9 58%, #241078);
  box-shadow: inset -12px -8px 20px rgba(16, 2, 70, .42), inset 8px 6px 14px rgba(255, 255, 255, .3), 0 0 0 3px #42d6ff, 0 0 36px rgba(102, 57, 255, .5);
  font-size: 46px;
  font-weight: 950;
  font-style: italic;
  overflow: hidden;
}

#presale-panel .success-coin img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

#presale-panel .success-copy > span {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--ido-green-light);
  color: var(--ido-green);
  font-size: 11px;
  font-weight: 900;
}

#presale-panel .success-copy h2 {
  margin: 10px 0 0;
  color: var(--ido-ink);
  font-size: clamp(26px, 3.2vw, 36px);
}

#presale-panel .success-copy p {
  max-width: 560px;
  margin: 10px auto 0;
  color: var(--ido-copy);
  font-size: 14px;
  line-height: 1.65;
}

#presale-panel .success-next-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 720px;
  margin: 0 auto 28px;
}

#presale-panel .next-step {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--ido-line);
  border-radius: var(--ido-radius-sm);
  background: #fff;
}

#presale-panel .next-step b {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ido-surface-3);
  color: var(--ido-muted);
  font-size: 11px;
}

#presale-panel .next-step.is-active {
  border-color: rgba(14, 167, 124, 0.45);
  background: var(--ido-green-light);
}

#presale-panel .next-step.is-active b {
  background: var(--ido-green);
  color: #fff;
}

#presale-panel .next-step-icon {
  font-size: 28px;
  line-height: 1;
}

#presale-panel .next-step strong {
  color: var(--ido-ink);
  font-size: 15px;
}

#presale-panel .next-step small {
  color: var(--ido-copy);
  font-size: 12px;
  line-height: 1.5;
}

#presale-panel .next-step button {
  width: 100%;
}

#presale-panel .success-order-summary {
  max-width: 520px;
  margin: 26px auto;
  padding: 18px;
  border: 1px solid var(--ido-line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
}

#presale-panel .success-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--ido-line);
}

#presale-panel .success-order-row:last-child {
  border-bottom: 0;
}

#presale-panel .success-order-row span {
  color: var(--ido-muted);
  font-size: 12px;
  font-weight: 700;
}

#presale-panel .success-order-row strong {
  color: var(--ido-ink);
  font-size: 14px;
  text-align: right;
  overflow-wrap: anywhere;
}

#presale-panel .success-order-row > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

#presale-panel .icon-copy {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--ido-line);
  border-radius: 8px;
  color: var(--ido-green);
  background: var(--ido-surface-3);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

#presale-panel .icon-copy:hover {
  border-color: var(--ido-green);
  background: var(--ido-green-light);
}

#presale-panel .success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

#presale-panel .success-actions .primary-action,
#presale-panel .success-actions .secondary-action {
  width: auto;
  min-width: 180px;
  margin: 0;
}

/* Certificate section */
#presale-panel .ido-certificate-section {
  margin-top: 34px;
}

#presale-panel .ido-certificate-card {
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--ido-line);
  border-radius: var(--ido-radius);
  background: linear-gradient(145deg, #ffffff, #f8fbfc);
  box-shadow: var(--ido-shadow);
}

#presale-panel .certificate-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ido-line);
}

#presale-panel .certificate-title strong {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 950;
  letter-spacing: -0.02em;
  color: var(--ido-ink);
}

#presale-panel .certificate-title span {
  padding: 6px 11px;
  border: 1px solid var(--ido-line);
  border-radius: 999px;
  color: var(--ido-orange);
  background: #fff8f0;
  font-size: 11px;
  font-weight: 900;
}

#presale-panel .certificate-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

#presale-panel .cert-step {
  position: relative;
  padding: 18px;
  border: 1px solid var(--ido-line);
  border-radius: var(--ido-radius-sm);
  background: #fff;
}

#presale-panel .cert-step b {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--ido-purple);
  font-size: 13px;
  font-weight: 900;
}

#presale-panel .cert-step strong {
  display: block;
  color: var(--ido-ink);
  font-size: 15px;
}

#presale-panel .cert-step small {
  display: block;
  margin-top: 5px;
  color: var(--ido-copy);
  font-size: 11px;
}

#presale-panel .cert-step.is-active {
  border-color: rgba(14, 167, 124, 0.45);
  background: var(--ido-green-light);
}

#presale-panel .cert-step.is-active b {
  color: var(--ido-green);
}

/* Order details inside certificate */
#presale-panel .certificate-order {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px dashed var(--ido-line-strong);
}

#presale-panel .certificate-order[hidden] {
  display: none !important;
}

#presale-panel .certificate-order .order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ido-line);
}

#presale-panel .certificate-order .order-row:last-child {
  border-bottom: 0;
}

#presale-panel .certificate-order .order-row span {
  color: var(--ido-muted);
  font-size: 12px;
  font-weight: 700;
}

#presale-panel .certificate-order .order-row strong {
  color: var(--ido-ink);
  font-size: 14px;
  text-align: right;
  overflow-wrap: anywhere;
}

#presale-panel .certificate-order .transfer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  margin-top: 10px;
}

#presale-panel .certificate-order .text-action {
  display: inline-block;
  margin-top: 14px;
  padding: 0;
  border: 0;
  color: var(--ido-purple);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

#presale-panel .certificate-order .text-action:hover {
  color: var(--ido-green);
}

/* Progress section */
#presale-panel .ido-progress-section {
  margin-top: 34px;
}

#presale-panel .ido-progress-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
  border: 1px solid var(--ido-line);
  border-radius: var(--ido-radius);
  background: #fff;
  box-shadow: var(--ido-shadow);
  overflow: hidden;
}

#presale-panel .ido-progress-strip > article {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 128px;
  min-width: 0;
  padding: 22px 24px;
  border-right: 1px solid var(--ido-line);
}

#presale-panel .ido-progress-strip > article:last-of-type {
  border-right: 0;
}

#presale-panel .ido-progress-strip > article > span,
#presale-panel .ido-progress-strip > article > strong,
#presale-panel .ido-progress-strip > article > small {
  display: block;
}

#presale-panel .ido-progress-strip > article > span {
  color: var(--ido-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

#presale-panel .ido-progress-strip > article > strong {
  color: var(--ido-ink);
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

#presale-panel .ido-progress-strip > article > strong.ido-countdown {
  color: var(--ido-orange);
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 950;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

#presale-panel .ido-progress-strip > article > strong small {
  color: var(--ido-muted);
  font-size: 11px;
  font-weight: 700;
}

#presale-panel .ido-progress-strip > article > small {
  color: var(--ido-muted);
  font-size: 10px;
}

#presale-panel .ido-progress-footer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid var(--ido-line);
  color: var(--ido-muted);
  font-size: 12px;
}

#presale-panel .ido-progress-footer .progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf1f4;
}

#presale-panel .ido-progress-footer .progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ido-purple), var(--ido-green));
}

#presale-panel .ido-progress-footer strong {
  color: var(--ido-ink);
  font-size: 14px;
}

#presale-panel .ido-progress-note {
  margin: 12px 0 0;
  color: var(--ido-muted);
  font-size: 12px;
  text-align: center;
}

/* Tiers & release rules */
#presale-panel .ido-rules-section {
  margin-top: 44px;
}

#presale-panel .ido-rules-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
}

#presale-panel .ido-tier-card,
#presale-panel .ido-release-card {
  padding: 22px 24px 20px;
  border: 1px solid var(--ido-line);
  border-radius: var(--ido-radius);
  background: #fff;
  box-shadow: var(--ido-shadow);
}

#presale-panel .ido-tier-card h3,
#presale-panel .ido-release-card h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--ido-ink);
  font-size: 16px;
}

#presale-panel .ido-tier-card h3 small,
#presale-panel .ido-release-card h3 small {
  color: var(--ido-muted);
  font-size: 12px;
  font-weight: 500;
}

#presale-panel .ido-tier-table {
  width: 100%;
  border-collapse: collapse;
}

#presale-panel .ido-tier-table th {
  padding: 8px 12px;
  color: var(--ido-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--ido-line);
}

#presale-panel .ido-tier-table td {
  padding: 11px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--ido-line);
}

#presale-panel .ido-tier-table tbody tr:last-child td {
  border-bottom: 0;
}

#presale-panel .ido-tier-table tr.is-active td {
  background: var(--ido-green-light);
  color: var(--ido-green);
  font-weight: 700;
}

#presale-panel .ido-tier-table tr.is-active td:first-child {
  border-radius: 10px 0 0 10px;
}

#presale-panel .ido-tier-table tr.is-active td:last-child {
  border-radius: 0 10px 10px 0;
}

/* 每档对应的 AI 数字人身份凭证 */
#presale-panel .tier-identity {
  display: grid;
  gap: 2px;
}

#presale-panel .tier-identity em {
  color: var(--ido-ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .01em;
}

#presale-panel .tier-identity small {
  color: var(--ido-muted);
  font-size: 11px;
}

#presale-panel .ido-tier-table tr.is-active .tier-identity em { color: var(--ido-green); }

#presale-panel .ido-release-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

#presale-panel .ido-release-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 11px 2px;
  font-size: 13px;
  border-bottom: 1px dashed var(--ido-line);
}

#presale-panel .ido-release-list li:last-child {
  border-bottom: 0;
}

#presale-panel .ido-release-list li span {
  color: var(--ido-muted);
}

#presale-panel .ido-release-list li strong {
  color: var(--ido-ink);
  font-weight: 700;
}

#presale-panel .ido-rules-note {
  margin: 14px 0 0;
  color: var(--ido-muted);
  font-size: 12px;
  line-height: 1.7;
}

#presale-panel .ido-progress-card {
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--ido-line);
  border-radius: var(--ido-radius);
  background: #fff;
  box-shadow: var(--ido-shadow);
}

#presale-panel .progress-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

#presale-panel .progress-ring-large {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--ido-green) calc(var(--progress, 0) * 1%), #eaf1f4 0);
}

#presale-panel .progress-ring-large:before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: #fff;
}

#presale-panel .progress-ring-large strong,
#presale-panel .progress-ring-large span {
  position: relative;
  z-index: 1;
}

#presale-panel .progress-ring-large strong {
  color: var(--ido-ink);
  font-size: 30px;
  font-weight: 950;
}

#presale-panel .progress-ring-large span {
  position: absolute;
  bottom: 48px;
  color: var(--ido-muted);
  font-size: 11px;
  font-weight: 800;
}

#presale-panel .progress-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#presale-panel .progress-info .overview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ido-line);
}

#presale-panel .progress-info .overview-item span {
  color: var(--ido-muted);
  font-size: 12px;
  font-weight: 700;
}

#presale-panel .progress-info .overview-item strong {
  color: var(--ido-ink);
  font-size: 15px;
  text-align: right;
}

#presale-panel .progress-info .overview-item strong.ido-countdown {
  color: var(--ido-orange);
  letter-spacing: 0.04em;
}

#presale-panel .overview-progress {
  margin-top: 22px;
}

#presale-panel .overview-progress .progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf1f4;
}

#presale-panel .overview-progress .progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ido-purple), var(--ido-green));
}

#presale-panel .overview-progress span {
  display: block;
  margin-top: 8px;
  color: var(--ido-muted);
  font-size: 11px;
}

#presale-panel .ido-progress-card > small {
  display: block;
  margin-top: 10px;
  color: var(--ido-muted);
  font-size: 11px;
}

#presale-panel .ido-progress-card > small + small {
  margin-top: 6px;
}

/* Invite panel — keep the same light palette as the IDO tab */
#invite-panel .invite-exchange-hero,
#invite-panel .invite-summary-strip article,
#invite-panel .invite-share-card,
#invite-panel .invite-funnel-card,
#invite-panel .invite-record-card,
#invite-panel .invite-reward-card,
#invite-panel .invite-how-card,
#invite-panel .invite-rules-panel {
  border-color: var(--ido-line);
  background: var(--ido-surface);
  color: var(--ido-ink);
}

#invite-panel .invite-activity-pill,
#invite-panel .invite-code-chip,
#invite-panel .invite-record-status,
#invite-panel .invite-section-copy,
#invite-panel .invite-trust-line,
#invite-panel .invite-overview-head span,
#invite-panel .invite-overview-stats span,
#invite-panel .invite-record-empty span,
#invite-panel .invite-funnel-list small,
#invite-panel .invite-how-grid small,
#invite-panel .invite-rules-panel p,
#invite-panel .action-note,
#invite-panel .field-label small {
  color: var(--ido-copy);
}

#invite-panel .invite-section-heading h2,
#invite-panel .invite-overview-head strong,
#invite-panel .invite-summary-strip strong,
#invite-panel .invite-funnel-list strong,
#invite-panel .invite-record-row strong,
#invite-panel .invite-reward-card strong,
#invite-panel .invite-how-grid strong,
#invite-panel .invite-rules-panel summary,
#invite-panel .field-label {
  color: var(--ido-ink);
}

#invite-panel .invite-record-empty strong,
#invite-panel .invite-funnel-list b,
#invite-panel .invite-summary-strip small,
#invite-panel .invite-record-head,
#invite-panel .invite-reward-empty span {
  color: var(--ido-muted);
}

#invite-panel .invite-filter-bar button {
  border: 1px solid var(--ido-line);
  color: var(--ido-copy);
  background: #fff;
}

#invite-panel .invite-filter-bar button.is-active {
  color: #fff;
  border-color: var(--ido-green);
  background: var(--ido-green);
}

#invite-panel .invite-channel-button {
  border: 1px solid var(--ido-line);
  color: var(--ido-ink);
  background: #fff;
}

#invite-panel .invite-channel-button:hover {
  border-color: var(--ido-green);
  color: var(--ido-green);
  background: var(--ido-green-light);
}

#invite-panel .invite-stage-badge {
  color: #fff;
  background: var(--ido-green);
}

#invite-panel .invite-stage-pending { background: var(--ido-orange); }
#invite-panel .invite-stage-effective { background: var(--ido-green); }
#invite-panel .invite-stage-invalid { background: #94a3b8; }

#invite-panel .invite-reward-badge {
  color: var(--ido-purple);
  background: var(--ido-purple-light);
}

#invite-panel .invite-record-row,
#invite-panel .invite-reward-row,
#invite-panel .invite-record-head {
  border-bottom-color: var(--ido-line);
}

#invite-panel .text-input {
  color: var(--ido-ink);
  background: var(--ido-surface-3);
  border-color: var(--ido-line);
}

#invite-panel .text-input::placeholder {
  color: #8aa0ad;
}

#invite-panel .text-input:focus {
  border-color: var(--ido-green);
  box-shadow: 0 0 0 3px rgba(14, 167, 124, 0.1);
}

/* Extended invite panel light-theme overrides */
#invite-panel .invite-hero-copy h1,
#invite-panel .invite-hero-copy h2,
#invite-panel .invite-reward-overview>b,
#invite-panel .invite-overview-stats strong,
#invite-panel .invite-goal-card strong {
  color: var(--ido-ink);
}

#invite-panel .invite-hero-copy>p:not(.eyebrow):not(.invite-trust-line),
#invite-panel .invite-trust-line,
#invite-panel .invite-hero-copy .eyebrow,
#invite-panel .invite-activity-pill,
#invite-panel .invite-goal-card small,
#invite-panel .invite-goal-card span,
#invite-panel .invite-boost-tag,
#invite-panel .invite-boost-tag strong {
  color: var(--ido-copy);
}

#invite-panel .invite-activity-pill {
  border-color: var(--ido-line);
  background: var(--ido-surface-2);
}

#invite-panel .invite-activity-pill i {
  background: var(--ido-green);
  box-shadow: 0 0 16px rgba(14, 167, 124, 0.45);
}

#invite-panel .invite-reward-overview {
  border-color: var(--ido-line);
  background: var(--ido-surface-2);
  box-shadow: 0 20px 60px rgba(16, 37, 54, 0.08);
}

#invite-panel .invite-overview-head>strong {
  color: var(--ido-copy);
  background: var(--ido-surface-3);
}

#invite-panel .invite-goal-card,
#invite-panel .invite-boost-tag {
  border-color: var(--ido-line);
  background: var(--ido-surface-2);
}

#invite-panel .invite-goal-card:before {
  color: rgba(16, 37, 54, 0.06);
}

#invite-panel .invite-summary-strip article {
  border-color: var(--ido-line);
  background: var(--ido-surface);
}

#invite-panel .invite-summary-strip article:after {
  background: rgba(14, 167, 124, 0.06);
}

#invite-panel .invite-summary-strip article:first-child strong {
  color: var(--ido-green);
}

#invite-panel .invite-summary-strip article:nth-child(4) strong {
  color: var(--ido-orange);
}

#invite-panel .invite-share-card:after {
  background: rgba(109, 67, 255, 0.06);
}

#invite-panel .invite-code-chip {
  border-color: var(--ido-line);
  background: var(--ido-surface-3);
  color: var(--ido-ink);
}

#invite-panel .invite-funnel-list li {
  border-top-color: var(--ido-line);
}

#invite-panel .invite-funnel-list>li>span {
  border-color: var(--ido-line);
  background: var(--ido-surface-2);
  color: var(--ido-green);
}

#invite-panel .invite-funnel-list b {
  color: var(--ido-ink);
}

#invite-panel .invite-funnel-list li:nth-child(4) b {
  color: var(--ido-green);
}

#invite-panel .invite-filter-bar button {
  background: var(--ido-surface-3);
}

#invite-panel .invite-record-row,
#invite-panel .invite-reward-row {
  border-color: var(--ido-line);
  background: var(--ido-surface-2);
}

#invite-panel .invite-record-row>span,
#invite-panel .invite-reward-row>span,
#invite-panel .invite-reward-row>b {
  color: var(--ido-copy);
}

#invite-panel .invite-record-row>span:first-child,
#invite-panel .invite-reward-row>span:first-child {
  color: var(--ido-ink);
}

#invite-panel .invite-record-row>span:nth-child(2) {
  color: var(--ido-green);
}

#invite-panel .invite-record-empty {
  border-color: var(--ido-line);
}

#invite-panel .invite-record-empty:before {
  border-color: var(--ido-line);
  background: var(--ido-surface-2);
  color: var(--ido-green);
}

#invite-panel .invite-record-empty strong {
  color: var(--ido-ink);
}

#invite-panel .invite-reward-row>strong {
  color: var(--ido-purple);
  background: var(--ido-purple-light);
}

#invite-panel .invite-how-grid article {
  border-color: var(--ido-line);
  background: var(--ido-surface-2);
}

#invite-panel .invite-how-grid article>span {
  color: var(--ido-green);
}

#invite-panel .invite-rules-panel summary {
  color: var(--ido-ink);
}

#invite-panel .invite-rules-panel summary span {
  color: var(--ido-green);
}

#invite-panel .invite-rules-panel[open] summary {
  border-bottom-color: var(--ido-line);
}

#invite-panel .invite-rules-panel p strong {
  color: var(--ido-ink);
}

#invite-panel .invite-qr-wrap canvas,
#invite-panel .invite-qr-placeholder {
  border-color: var(--ido-line);
  background: var(--ido-surface-3);
}

#invite-panel .invite-qr-placeholder {
  color: var(--ido-muted);
}

#invite-panel .invite-qr-wrap>small {
  color: var(--ido-muted);
}

#invite-panel .invite-section-copy,
#invite-panel .action-note,
#invite-panel .field-label small {
  color: var(--ido-copy);
}

/* FAQ section */
#presale-panel .ido-faq-section {
  margin-top: 34px;
  margin-bottom: 40px;
}

#presale-panel .ido-faq-list {
  display: grid;
  gap: 12px;
}

#presale-panel .ido-faq-list details {
  border: 1px solid var(--ido-line);
  border-radius: var(--ido-radius-sm);
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 37, 54, 0.04);
  overflow: hidden;
}

#presale-panel .ido-faq-list summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  color: var(--ido-ink);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

#presale-panel .ido-faq-list summary::-webkit-details-marker {
  display: none;
}

#presale-panel .ido-faq-list summary span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, var(--ido-green), #118bb3);
  font-size: 12px;
  font-weight: 900;
}

#presale-panel .ido-faq-list details p {
  margin: 0;
  padding: 0 20px 18px 66px;
  color: var(--ido-copy);
  font-size: 13px;
  line-height: 1.7;
}

/* Animations */
@keyframes idoFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

#presale-panel .certificate-order {
  animation: idoFadeIn 0.22s ease;
}

/* Responsive */
@media (max-width: 1200px) {
  #presale-panel .ido-launch-hero--compact {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: 28px;
  }
  #presale-panel .subscription-workbench {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
  }
  #presale-panel .ido-estimate-card .estimate-perks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1050px) {
  #presale-panel .ido-progress-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #presale-panel .ido-progress-strip > article {
    min-height: 110px;
    padding: 20px;
  }
  #presale-panel .ido-progress-strip > article:nth-child(even) {
    border-right: 0;
  }
  #presale-panel .ido-progress-strip > article:nth-child(-n+2) {
    border-bottom: 1px solid var(--ido-line);
  }
  #presale-panel .ido-progress-strip > article > strong.ido-countdown {
    font-size: 22px;
  }
}

@media (max-width: 1100px) {
  #presale-panel .ido-launch-hero--compact {
    grid-template-columns: 1fr;
    gap: 32px;
    min-height: 0;
  }
  #presale-panel .ido-launch-stage {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    min-height: 0;
    gap: 24px;
  }
  #presale-panel .ido-coin-stage {
    min-height: 220px;
    flex: 1 1 280px;
    max-width: 340px;
  }
  #presale-panel .ido-hero-stats-card {
    width: 100%;
    max-width: 320px;
    flex: 1 1 280px;
  }
  #presale-panel .subscription-workbench {
    grid-template-columns: 1fr;
  }
  #presale-panel .subscription-side {
    padding: 0 clamp(22px, 3vw, 34px) clamp(22px, 3vw, 34px);
  }
  #presale-panel .ido-estimate-card {
    position: static;
    max-width: 100%;
  }
  #presale-panel .ido-estimate-card .estimate-perks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #presale-panel .ido-launch-actions {
    width: 100%;
  }
  #presale-panel .ido-launch-actions .primary-action,
  #presale-panel .ido-launch-actions .secondary-action {
    flex: 1 1 140px;
    min-width: 140px;
  }
  #presale-panel .amount-grid {
    grid-template-columns: 1fr;
  }
  #presale-panel .success-actions {
    flex-direction: column;
    align-items: stretch;
  }
  #presale-panel .success-actions .primary-action,
  #presale-panel .success-actions .secondary-action {
    width: 100%;
    min-width: 0;
  }
  #presale-panel .certificate-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #presale-panel .progress-main {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  #presale-panel .progress-info {
    width: 100%;
  }
  #presale-panel .ido-rules-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #presale-panel .ido-launch-hero--compact {
    padding: 28px 22px 24px;
    overflow: visible;
  }
  #presale-panel .ido-launch-hero--compact h1 {
    font-size: 32px;
  }
  #presale-panel .ido-launch-stage {
    flex-direction: column;
    gap: 18px;
  }
  #presale-panel .ido-coin-stage {
    min-height: 190px;
    width: 100%;
  }
  #presale-panel .ido-main-coin {
    width: 150px;
    height: 150px;
    transform: translateY(-16px) rotate(-9deg);
  }
  #presale-panel .ido-main-coin span {
    font-size: 78px;
  }
  #presale-panel .ido-stage-ring.ring-back {
    width: 230px;
    height: 82px;
  }
  #presale-panel .ido-stage-ring.ring-front {
    width: 190px;
    height: 54px;
  }
  #presale-panel .ido-hero-stats-card {
    width: 100%;
    max-width: 100%;
  }
  #presale-panel .ido-hero-stats-card .hero-stat-row strong.ido-countdown {
    font-size: 22px;
  }
  #presale-panel .ido-launch-actions .primary-action,
  #presale-panel .ido-launch-actions .secondary-action {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }
  #presale-panel .subscription-card-head {
    flex-direction: column;
    gap: 12px;
  }
  #presale-panel .asset-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #presale-panel .amount-input input {
    font-size: 22px;
  }
  #presale-panel .form-grid.two-columns,
  #presale-panel .wallet-entry-row,
  #presale-panel .certificate-order .transfer-row {
    grid-template-columns: 1fr;
  }
  #presale-panel .wallet-entry-row .secondary-action {
    width: auto;
    min-width: 140px;
    justify-self: start;
  }
  #presale-panel .certificate-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  #presale-panel .certificate-steps {
    grid-template-columns: 1fr;
  }
  #presale-panel .progress-info {
    grid-template-columns: 1fr;
  }
  #presale-panel .ido-progress-strip > article {
    min-height: 100px;
    padding: 18px 16px;
  }
  #presale-panel .ido-progress-strip > article > strong {
    font-size: 18px;
  }
  #presale-panel .ido-progress-strip > article > strong.ido-countdown {
    font-size: 20px;
  }
  #presale-panel .ido-progress-footer {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }
  #presale-panel .ido-faq-list summary {
    padding: 16px;
    font-size: 14px;
  }
  #presale-panel .ido-faq-list details p {
    padding: 0 16px 16px 58px;
  }
  #presale-panel .success-next-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  #presale-panel .asset-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  #presale-panel .ido-payment-option {
    padding: 10px 8px;
    min-height: 58px;
  }
  #presale-panel .ido-payment-option .asset-icon {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
  #presale-panel .ido-payment-option strong {
    font-size: 12px;
  }
  #presale-panel .ido-payment-option small {
    font-size: 9px;
  }
  #presale-panel .ido-estimate-card .estimate-perks {
    grid-template-columns: 1fr;
  }
}
/* Genesis 创世计划阶段信息一览 */
.ido-genesis-section{margin-top:26px}
.ido-genesis-card{padding:24px 26px;overflow-x:auto}
.ido-genesis-table{width:100%;min-width:640px;border-collapse:collapse;font-size:13px}
.ido-genesis-table th{padding:10px 14px;border-bottom:1px solid #e7eef1;color:#7d8d99;font-size:11px;font-weight:800;letter-spacing:.04em;text-align:left;white-space:nowrap}
.ido-genesis-table td{padding:13px 14px;border-bottom:1px solid #f0f5f4;color:#33475a;white-space:nowrap}
.ido-genesis-table tbody tr:last-child td{border-bottom:0}
.ido-genesis-table td b{display:inline-block;min-width:50px;margin-right:6px;padding:3px 8px;border-radius:999px;color:#fff;background:linear-gradient(135deg,#12bd8e,#258fe5);font-size:10px;text-align:center}
.ido-genesis-table td em{font-style:normal;font-weight:800;color:#17364a}
.ido-genesis-note{margin:16px 0 0;padding:12px 16px;border:1px solid #e7f1ee;border-radius:12px;color:#5f7380;background:#f5fbf9;font-size:12px;line-height:1.7}
