:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef3ff;
  --ink: #101828;
  --muted: #667085;
  --line: #d9e0ea;
  --blue: #2458e6;
  --blue-dark: #173fb0;
  --green: #087443;
  --amber: #b54708;
  --red: #b42318;
  --shadow: 0 18px 44px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

i,
svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid rgba(217, 224, 234, 0.84);
  background: rgba(246, 247, 251, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(circle at center, #fff 0 4px, transparent 5px),
    conic-gradient(from -35deg, rgba(255, 255, 255, 0.96) 0 38deg, transparent 39deg 360deg),
    linear-gradient(135deg, #2458e6 0%, #0f8b8d 100%);
  box-shadow: 0 14px 30px rgba(36, 88, 230, 0.22);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.18);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 19px;
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  transform: rotate(-28deg);
  transform-origin: left center;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.nav a,
.nav-menu button {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover,
.nav-menu button:hover {
  background: var(--surface-2);
  color: var(--blue);
}

.nav-menu {
  position: relative;
}

.nav-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 12px;
}

.nav-menu button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #2458e6, #0f766e);
  color: #fff;
  box-shadow: 0 10px 24px rgba(36, 88, 230, 0.2);
  white-space: nowrap;
}

.nav-menu button svg {
  width: 15px;
  height: 15px;
}

.nav-menu button:hover {
  background: linear-gradient(135deg, #173fb0, #115e59);
  color: #fff;
}

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 240px;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.nav-menu:hover .nav-menu-panel,
.nav-menu:focus-within .nav-menu-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-menu-panel a {
  border-radius: 8px;
  padding: 10px 12px;
}

.global-wallet {
  position: relative;
  display: grid;
  justify-items: end;
  gap: 4px;
  margin-left: auto;
}

.global-wallet::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 18px;
}

.global-wallet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
  color: var(--ink);
  padding: 0 14px;
  font-weight: 900;
  white-space: nowrap;
}

.global-wallet-btn.connected {
  background: linear-gradient(180deg, #ffffff, #f6f8fc);
}

.global-wallet-btn span {
  color: var(--ink);
}

.global-wallet-btn strong {
  color: var(--ink);
}

.global-wallet-btn svg {
  width: 15px;
  height: 15px;
}

.global-wallet small {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 22;
  width: min(300px, 80vw);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 12px;
  text-align: left;
}

.global-wallet:not(.wallet-connected):focus-within small,
.global-wallet:not(.wallet-connected):hover small,
.global-wallet.wallet-connected:has(#globalXpValue:hover) small {
  display: block;
}

.global-wallet.wallet-menu-open small,
.global-wallet.wallet-connected:has(#globalWalletAddress:hover) small,
.global-wallet.wallet-connected:has(.global-wallet-menu:hover) small {
  display: none;
}

.global-wallet-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 24;
  display: grid;
  min-width: 220px;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.global-wallet.wallet-menu-open .global-wallet-menu,
.global-wallet.wallet-connected:hover:not(:has(#globalXpValue:hover)) .global-wallet-menu,
.global-wallet.wallet-connected:has(#globalWalletAddress:hover) .global-wallet-menu,
.global-wallet.wallet-connected:has(.global-wallet-menu:hover) .global-wallet-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.global-wallet-menu a,
.global-wallet-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 800;
  text-align: left;
}

.global-wallet-menu a:hover,
.global-wallet-menu button:hover {
  background: var(--surface-2);
  color: var(--blue);
}

main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 4vw, 42px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 520px);
  gap: clamp(28px, 6vw, 82px);
  align-items: center;
  min-height: calc(100vh - 104px);
}

.profile-main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 42px);
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.profile-hero h1 {
  max-width: 760px;
  margin: 18px 0 12px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: 0;
}

.profile-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
}

.profile-score-card,
.profile-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-score-card {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 28px;
}

.profile-score-card span,
.profile-score-card small {
  color: var(--muted);
  font-weight: 800;
}

.profile-score-card strong {
  color: var(--ink);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 22px;
}

.profile-panel {
  padding: 24px;
}

.badge-panel {
  margin-bottom: 22px;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.badge-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 14px;
}

.badge-card.locked {
  opacity: 0.62;
}

.badge-card.eligible {
  border-color: rgba(36, 88, 230, 0.24);
  background: linear-gradient(180deg, #ffffff, #eef3ff);
}

.badge-card.minted {
  border-color: rgba(8, 116, 67, 0.26);
  background: linear-gradient(180deg, #ffffff, #ecfdf3);
}

.badge-art {
  display: grid;
  place-items: center;
  min-height: 168px;
  border-radius: 8px;
  background: radial-gradient(circle at top, #2458e6 0 32%, #101828 33% 100%);
  color: #fff;
  text-align: center;
}

.badge-art span,
.badge-art strong {
  display: block;
}

.badge-art span {
  font-size: 30px;
  font-weight: 950;
}

.badge-art strong {
  max-width: 90%;
  font-size: 18px;
}

.badge-card h3 {
  margin: 0;
  font-size: 20px;
}

.badge-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.badge-mint-btn {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #2458e6, #0f766e);
  color: #fff;
  font-weight: 950;
}

.badge-mint-btn:disabled {
  cursor: not-allowed;
  background: #e4e7ec;
  color: var(--muted);
}

.profile-activity-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.profile-activity-item,
.profile-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 16px;
}

.profile-activity-item strong,
.profile-empty strong,
.profile-activity-item span,
.profile-empty span,
.profile-activity-item small {
  display: block;
}

.profile-activity-item span,
.profile-empty span,
.profile-activity-item small {
  color: var(--muted);
}

.profile-activity-item b {
  color: var(--green);
  font-size: 22px;
  white-space: nowrap;
}

.profile-empty {
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
}

.profile-note-panel {
  align-self: start;
}

.profile-note-panel svg {
  color: var(--blue);
}

.profile-note-panel h2 {
  margin: 14px 0 8px;
}

.profile-note-panel p {
  margin: 0;
  color: var(--muted);
}

.eyebrow,
.status-pill,
.tag,
.risk-pill,
.score-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(36, 88, 230, 0.18);
  border-radius: 999px;
  background: #eaf0ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.hero h1 {
  max-width: 720px;
  margin: 16px 0 0;
  font-size: clamp(36px, 4.9vw, 58px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.checker-card,
.score-panel,
.section-band,
.metric-grid article,
.breakdown,
.recommendation,
.module-card,
.tx-action-card,
.method-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.checker-card {
  padding: clamp(18px, 3vw, 28px);
}

.checker-card label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-weight: 800;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.input-row input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  outline: none;
}

.input-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 88, 230, 0.12);
}

.primary-btn,
.ghost-btn,
.quick-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 800;
}

.primary-btn {
  background: var(--blue);
  color: #fff;
}

.primary-btn:hover {
  background: var(--blue-dark);
}

.primary-btn:disabled {
  cursor: wait;
  opacity: 0.68;
}

.ghost-btn:disabled {
  cursor: wait;
  opacity: 0.62;
}

.ghost-btn,
.quick-row button {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.checker-card p,
.section-head p,
.recommendation p,
.module-card p,
.method-grid p,
.breakdown-row small {
  color: var(--muted);
}

.checker-card p {
  margin: 10px 0 0;
  font-size: 14px;
}

.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.quick-row button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.hidden {
  display: none;
}

.result-section {
  display: grid;
  gap: 14px;
  margin-top: -18px;
  scroll-margin-top: 92px;
}

.section-band {
  scroll-margin-top: 92px;
}

.result-section.hidden {
  display: none;
}

.score-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: clamp(22px, 4vw, 34px);
}

.score-ring {
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #fff 56%, transparent 58%),
    conic-gradient(var(--blue) var(--score-angle, 0deg), #e4e9f2 0);
}

.score-ring span {
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
}

.score-ring small {
  color: var(--muted);
  font-weight: 800;
}

.score-panel h2 {
  margin: 12px 0 0;
  font-size: clamp(32px, 5vw, 58px);
  letter-spacing: 0;
}

.score-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  margin-top: 18px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #2458e6 0%, #0f8b8d 100%);
  color: #fff;
  padding: 0 24px;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(36, 88, 230, 0.2);
}

.share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(36, 88, 230, 0.26);
}

.share-btn svg {
  width: 22px;
  height: 22px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-grid article {
  position: relative;
  min-height: 128px;
  padding: 18px;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.metric-grid article::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--line);
}

.metric-grid article.kpi-good {
  border-color: rgba(8, 116, 67, 0.28);
  background: linear-gradient(180deg, #ffffff, #f0fdf4);
}

.metric-grid article.kpi-good::after {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(8, 116, 67, 0.1);
}

.metric-grid article.kpi-good strong {
  color: var(--green);
}

.metric-grid article.kpi-warn {
  border-color: rgba(181, 71, 8, 0.25);
  background: linear-gradient(180deg, #ffffff, #fffbeb);
}

.metric-grid article.kpi-warn::after {
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(181, 71, 8, 0.1);
}

.metric-grid article.kpi-warn strong {
  color: var(--amber);
}

.metric-grid article.kpi-bad {
  border-color: rgba(180, 35, 24, 0.3);
  background: linear-gradient(180deg, #ffffff, #fff5f5);
}

.metric-grid article.kpi-bad::after {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(180, 35, 24, 0.1);
}

.metric-grid article.kpi-bad strong {
  color: var(--red);
}

.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
}

.metric-grid small {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.data-disclaimer {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

.breakdown {
  padding: 18px;
}

.section-band {
  margin-top: 18px;
  padding: clamp(18px, 3vw, 24px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.section-head p {
  margin: 5px 0 0;
}

.breakdown-list {
  display: grid;
  gap: 12px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.45fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.breakdown-title strong,
.breakdown-title small {
  display: block;
}

.breakdown-title strong {
  font-size: 17px;
}

.breakdown-title small {
  margin-top: 4px;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: #e5eaf3;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: var(--bar-width, 0%);
  border-radius: inherit;
  background: var(--blue);
}

.bar-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
}

.bar-line strong {
  text-align: right;
  font-size: 18px;
}

.breakdown-detail p {
  margin: 8px 0 0;
  color: var(--muted);
}

.breakdown-detail b {
  color: var(--ink);
}

.recommendation-grid,
.module-grid,
.tx-action-grid,
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.recommendation,
.module-card,
.tx-action-card,
.method-grid article {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.recommendation.rec-bad {
  border-color: rgba(180, 35, 24, 0.26);
  background: linear-gradient(180deg, #ffffff, #fff7f7);
}

.recommendation.rec-warn {
  border-color: rgba(181, 71, 8, 0.24);
  background: linear-gradient(180deg, #ffffff, #fffbeb);
}

.recommendation.rec-bad .score-chip {
  border-color: rgba(180, 35, 24, 0.2);
  background: #fef3f2;
  color: var(--red);
}

.recommendation.rec-warn .score-chip {
  border-color: rgba(181, 71, 8, 0.2);
  background: #fffaeb;
  color: var(--amber);
}

.recommendation h3,
.module-card h3,
.tx-action-card h3,
.method-grid h3 {
  margin: 12px 0 0;
  font-size: 19px;
}

.recommendation p,
.module-card p,
.tx-action-card p,
.method-grid p {
  margin: 8px 0 0;
}

.card-top,
.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.icon-box {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--blue);
}

.card-actions {
  margin-top: 18px;
}

.risk-pill.low {
  border-color: rgba(8, 116, 67, 0.18);
  background: #ecfdf3;
  color: var(--green);
}

.risk-pill.medium {
  border-color: rgba(181, 71, 8, 0.18);
  background: #fffaeb;
  color: var(--amber);
}

.risk-pill.high {
  border-color: rgba(180, 35, 24, 0.18);
  background: #fef3f2;
  color: var(--red);
}

.score-chip {
  margin-top: 8px;
  border-color: rgba(102, 112, 133, 0.2);
  background: #f2f4f7;
  color: var(--muted);
}

.txn-recommendation {
  border-color: rgba(36, 88, 230, 0.28);
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
}

.txn-recommendation .card-actions {
  display: block;
}

.txn-recommendation .tag {
  margin-bottom: 12px;
}

.deploy-recommendation .card-actions {
  display: block;
}

.deploy-recommendation .tag {
  margin-bottom: 12px;
}

.agent-recommendation .card-actions {
  display: block;
}

.agent-recommendation .tag {
  margin-bottom: 12px;
}

.x402-recommendation .card-actions {
  display: block;
}

.x402-recommendation .tag {
  margin-bottom: 12px;
}

.token-recommendation .card-actions {
  display: block;
}

.token-recommendation .tag {
  margin-bottom: 12px;
}

.booster-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #2458e6, #0f766e);
  box-shadow: 0 14px 30px rgba(36, 88, 230, 0.26);
  color: #fff;
  padding: 0 18px;
  text-align: center;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 950;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
  animation: cta-pulse 1.7s ease-in-out infinite;
}

.booster-cta:hover {
  background: linear-gradient(135deg, #173fb0, #115e59);
  transform: translateY(-2px);
}

.deploy-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #101828, #2458e6);
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.24);
  color: #fff;
  padding: 0 18px;
  text-align: center;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 950;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
  animation: cta-pulse 1.9s ease-in-out infinite;
}

.deploy-cta:hover {
  background: linear-gradient(135deg, #1d2939, #173fb0);
  transform: translateY(-2px);
}

.agent-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #2458e6, #7c3aed);
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.22);
  color: #fff;
  padding: 0 18px;
  text-align: center;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 950;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
  animation: cta-pulse 1.8s ease-in-out infinite;
}

.agent-cta:hover {
  background: linear-gradient(135deg, #173fb0, #6d28d9);
  transform: translateY(-2px);
}

.x402-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #2458e6, #0891b2);
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.22);
  color: #fff;
  padding: 0 18px;
  text-align: center;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 950;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
  animation: cta-pulse 1.8s ease-in-out infinite;
}

.x402-cta:hover {
  background: linear-gradient(135deg, #173fb0, #0e7490);
  transform: translateY(-2px);
}

.token-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #2458e6, #b54708);
  box-shadow: 0 14px 30px rgba(181, 71, 8, 0.2);
  color: #fff;
  padding: 0 18px;
  text-align: center;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 950;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
  animation: cta-pulse 1.8s ease-in-out infinite;
}

.token-cta:hover {
  background: linear-gradient(135deg, #173fb0, #92400e);
  transform: translateY(-2px);
}

@keyframes cta-pulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 14px 30px rgba(36, 88, 230, 0.22);
  }
  50% {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(36, 88, 230, 0.36);
  }
}

.wallet-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.tx-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.tx-stats article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 14px;
}

.tx-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.tx-stats strong {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  font-size: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tx-stats small {
  color: var(--muted);
}

.tx-action-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tx-action-card {
  min-height: 220px;
}

.dual-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.tx-action-card > .ghost-btn {
  margin-top: 18px;
}

.tx-module-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
}

.tx-module-status[data-tone="ok"] {
  color: var(--green);
}

.tx-module-status[data-tone="warn"] {
  color: var(--amber);
}

.admin-main {
  max-width: 1180px;
}

.admin-hero,
.admin-panel {
  display: grid;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-hero {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
}

.admin-locked .admin-owner-only,
.admin-locked #adminWalletStatus,
.admin-locked .admin-hero .booster-stat-row {
  display: none;
}

.admin-locked .admin-main {
  min-height: calc(100vh - 96px);
  display: grid;
  place-items: center;
}

.admin-locked .admin-hero {
  width: min(520px, 100%);
  grid-template-columns: 1fr;
  padding: 24px;
}

.admin-locked .booster-wallet {
  min-height: 0;
}

.admin-hero h1 {
  max-width: 820px;
  margin: 12px 0;
  font-size: clamp(42px, 6vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
}

.admin-hero p,
.admin-panel p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}

.secondary-btn:hover {
  border-color: #b8c6dc;
  background: #f8fbff;
}

.admin-contract-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-contract-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.admin-contract-card span,
.admin-contract-card small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.admin-contract-card strong {
  display: block;
  margin: 6px 0;
  font-size: 28px;
}

.admin-contract-card a {
  color: var(--blue);
  font-weight: 800;
}

.admin-withdraw-btn {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #122447 0%, #2458e6 100%);
  color: #fff;
  font-weight: 900;
}

.admin-withdraw-btn:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.xp-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 24, 40, 0.42);
  backdrop-filter: blur(10px);
}

.xp-modal.hidden {
  display: none;
}

.xp-modal-card {
  position: relative;
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid rgba(36, 88, 230, 0.18);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.24);
}

.xp-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.xp-modal-eyebrow {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eaf0ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.xp-modal-card h2 {
  margin: 14px 0 0;
  font-size: 28px;
}

.xp-modal-card strong {
  display: block;
  margin: 4px 0 10px;
  color: var(--green);
  font-size: 40px;
  line-height: 1;
}

.xp-modal-card p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 16px;
}

.xp-modal-tx {
  max-width: calc(100% - 54px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px !important;
}

.xp-modal-tx.hidden {
  display: none;
}

.xp-modal-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 10px;
  padding: 0 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2458e6 0%, #0f8b8d 100%);
  color: #fff;
  font-weight: 900;
}

.booster-page {
  background:
    linear-gradient(135deg, rgba(36, 88, 230, 0.08), transparent 34%),
    linear-gradient(225deg, rgba(8, 116, 67, 0.08), transparent 30%),
    var(--bg);
}

.deploy-page {
  background:
    linear-gradient(135deg, rgba(16, 24, 40, 0.08), transparent 30%),
    linear-gradient(225deg, rgba(36, 88, 230, 0.1), transparent 34%),
    var(--bg);
}

.agent-page {
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.08), transparent 30%),
    linear-gradient(225deg, rgba(36, 88, 230, 0.1), transparent 34%),
    var(--bg);
}

.x402-page {
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.08), transparent 30%),
    linear-gradient(225deg, rgba(36, 88, 230, 0.1), transparent 34%),
    var(--bg);
}

.token-page {
  background:
    linear-gradient(135deg, rgba(181, 71, 8, 0.08), transparent 30%),
    linear-gradient(225deg, rgba(36, 88, 230, 0.1), transparent 34%),
    var(--bg);
}

.booster-main {
  width: min(1240px, 100%);
}

.booster-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 24px;
  align-items: stretch;
  min-height: 300px;
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.booster-hero h1 {
  max-width: 760px;
  margin: 16px 0 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: 0;
}

.booster-hero p {
  max-width: 700px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.booster-wallet {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.booster-stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.booster-stat-row article {
  border-radius: 8px;
  background: #f6f8fc;
  padding: 14px;
}

.booster-stat-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.booster-stat-row strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.booster-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.boost-card {
  position: relative;
  display: grid;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: 8px;
  padding: 22px;
  color: #101828;
  box-shadow: var(--shadow);
}

.gm-card {
  background: linear-gradient(135deg, #eaf0ff, #fff7ed);
}

.dice-card {
  background: linear-gradient(135deg, #ecfdf3, #eef3ff);
}

.wheel-card {
  background: linear-gradient(135deg, #fff1f2, #eef3ff);
}

.streak-card {
  background: linear-gradient(135deg, #fffbeb, #ecfdf3);
}

.boost-visual {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 128px;
}

.boost-visual svg {
  width: 64px;
  height: 64px;
}

.boost-visual span {
  font-size: clamp(48px, 8vw, 92px);
  font-weight: 900;
  line-height: 1;
}

#dicePreview {
  display: inline-grid;
  place-items: center;
  min-width: 112px;
  min-height: 112px;
  border: 1px solid rgba(8, 116, 67, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--green);
  box-shadow: 0 14px 28px rgba(16, 24, 40, 0.08);
}

#dicePreview.dice-rolling {
  animation: dice-roll 0.42s ease-in-out infinite;
}

#dicePreview.dice-revealed {
  animation: dice-pop 0.48s ease-out;
  background: linear-gradient(135deg, #087443, #2458e6);
  color: #fff;
}

.boost-copy h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: 0;
}

.boost-copy p {
  max-width: 520px;
  margin: 10px 0 0;
  color: #475467;
  font-size: 17px;
}

.boost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border: 1px solid rgba(16, 24, 40, 0.14);
  border-radius: 8px;
  background: #101828;
  color: #fff;
  padding: 0 18px;
  font-weight: 900;
}

.boost-btn:hover {
  background: #2458e6;
}

.boost-btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.wheel-orbit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 144px;
  transition: transform 0.3s ease;
}

.wheel-orbit span {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
  font-size: 24px;
  font-weight: 900;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.wheel-orbit.wheel-spinning {
  animation: wheel-spin 0.8s linear infinite;
}

.wheel-orbit.wheel-revealed[data-picked="0"] span:nth-child(1),
.wheel-orbit.wheel-revealed[data-picked="1"] span:nth-child(2),
.wheel-orbit.wheel-revealed[data-picked="2"] span:nth-child(3),
.wheel-orbit.wheel-revealed[data-picked="3"] span:nth-child(4) {
  background: linear-gradient(135deg, #2458e6, #0f766e);
  color: #fff;
  box-shadow: 0 14px 30px rgba(36, 88, 230, 0.22);
  transform: scale(1.08);
}

.wheel-result-preview {
  position: absolute;
  top: 28px;
  right: 28px;
  display: grid;
  place-items: center;
  min-width: 94px;
  min-height: 94px;
  border: 1px solid rgba(36, 88, 230, 0.2);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 28px;
  font-weight: 950;
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.12);
}

@keyframes wheel-spin {
  from {
    transform: rotate(0deg) scale(0.98);
  }

  to {
    transform: rotate(360deg) scale(0.98);
  }
}

@keyframes dice-roll {
  0% {
    transform: rotate(-8deg) translateY(0) scale(0.96);
  }

  50% {
    transform: rotate(10deg) translateY(-8px) scale(1.04);
  }

  100% {
    transform: rotate(-8deg) translateY(0) scale(0.96);
  }
}

@keyframes dice-pop {
  0% {
    transform: scale(0.8);
  }

  65% {
    transform: scale(1.14);
  }

  100% {
    transform: scale(1);
  }
}

.booster-history {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 20px;
}

.booster-history h2 {
  margin: 0;
}

.booster-history p {
  margin: 6px 0 0;
  color: var(--muted);
}

.last-tx-box {
  border-radius: 8px;
  background: #f6f8fc;
  padding: 16px;
}

.last-tx-box strong,
.last-tx-box small {
  display: block;
}

.last-tx-box small {
  margin-top: 6px;
  color: var(--muted);
}

.last-tx-box a {
  color: var(--blue);
  font-weight: 800;
}

.deploy-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 24px;
  align-items: stretch;
  min-height: 330px;
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(234, 240, 255, 0.82)),
    #fff;
  box-shadow: var(--shadow);
}

.deploy-copy h1 {
  max-width: 780px;
  margin: 16px 0 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: 0;
}

.deploy-copy p {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.deploy-panel,
.contract-history {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 24px);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.template-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 168px;
  border: 1px solid rgba(36, 88, 230, 0.14);
  border-radius: 8px;
  background: #f6f8fc;
  color: var(--ink);
  padding: 18px;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.template-card:hover {
  border-color: rgba(36, 88, 230, 0.45);
  box-shadow: 0 14px 28px rgba(36, 88, 230, 0.08);
}

.template-card:nth-child(1) {
  background: linear-gradient(135deg, #eaf0ff, #ffffff);
}

.template-card:nth-child(2) {
  background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.template-card:nth-child(3) {
  background: linear-gradient(135deg, #ecfdf3, #ffffff);
}

.template-card svg {
  width: 34px;
  height: 34px;
  color: var(--blue);
}

.template-card strong {
  font-size: 22px;
}

.template-card span {
  color: var(--muted);
}

.template-card.selected {
  border: 3px solid var(--blue);
  box-shadow:
    0 0 0 4px rgba(36, 88, 230, 0.12),
    0 18px 36px rgba(36, 88, 230, 0.16);
  transform: translateY(-1px);
}

.template-card.selected::after {
  content: "✓";
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 0 0 5px rgba(8, 116, 67, 0.12);
}

.deploy-label {
  display: block;
  margin: 18px 0 8px;
  color: var(--ink);
  font-weight: 900;
}

.deploy-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 12px;
}

.deploy-input-row input {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  font-size: 18px;
  outline: none;
}

.deploy-input-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 88, 230, 0.12);
}

.deploy-main-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #101828, #2458e6);
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(36, 88, 230, 0.24);
}

.deploy-main-cta:hover {
  transform: translateY(-1px);
}

.deploy-main-cta:disabled {
  cursor: wait;
  opacity: 0.72;
}

.contract-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contract-card,
.empty-contract {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbff;
  padding: 18px;
}

.contract-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contract-card h3 {
  margin: 0;
  font-size: 22px;
}

.contract-card small {
  color: var(--muted);
}

.contract-card dl {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.contract-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.contract-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.contract-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
}

.contract-card a {
  color: var(--blue);
}

.contract-interact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  width: 100%;
  margin-top: 18px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-weight: 950;
}

.contract-interact-btn:hover {
  background: var(--blue);
  color: #fff;
}

.contract-interact-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.empty-contract {
  display: grid;
  place-items: center;
  min-height: 220px;
  grid-column: 1 / -1;
  color: var(--muted);
  text-align: center;
}

.empty-contract svg {
  width: 48px;
  height: 48px;
  color: var(--blue);
}

.empty-contract strong {
  color: var(--ink);
  font-size: 22px;
}

.agent-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 24px;
  align-items: stretch;
  min-height: 330px;
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(238, 243, 255, 0.84)),
    #fff;
  box-shadow: var(--shadow);
}

.agent-copy h1 {
  max-width: 800px;
  margin: 16px 0 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: 0;
}

.agent-copy p {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.agent-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 12px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 24px);
}

.agent-builder label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 900;
}

.agent-builder input,
.agent-builder select {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-size: 17px;
  outline: none;
}

.agent-builder input:focus,
.agent-builder select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 88, 230, 0.12);
}

.agent-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.agent-card {
  display: grid;
  min-height: 340px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.register-card {
  background: linear-gradient(135deg, #eaf0ff, #ffffff);
}

.reputation-card {
  background: linear-gradient(135deg, #f5f3ff, #ffffff);
}

.task-card {
  background: linear-gradient(135deg, #ecfdf3, #ffffff);
}

.agent-visual {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.agent-visual svg {
  width: 58px;
  height: 58px;
  color: var(--blue);
}

.agent-visual span {
  color: rgba(16, 24, 40, 0.12);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 950;
  line-height: 1;
}

.agent-card h2 {
  margin: 16px 0 0;
  font-size: clamp(28px, 3vw, 38px);
}

.agent-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.agent-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin-top: 20px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #2458e6, #7c3aed);
  color: #fff;
  font-weight: 950;
}

.agent-action-btn:hover {
  background: linear-gradient(135deg, #173fb0, #6d28d9);
}

.agent-action-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.x402-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 24px;
  align-items: stretch;
  min-height: 330px;
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid rgba(8, 145, 178, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 253, 243, 0.78)),
    #fff;
  box-shadow: var(--shadow);
}

.x402-copy h1 {
  max-width: 820px;
  margin: 16px 0 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: 0;
}

.x402-copy p {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.payment-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 12px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 24px);
}

.payment-builder label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 900;
}

.payment-builder input {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-size: 17px;
  outline: none;
}

.payment-builder input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 88, 230, 0.12);
}

.x402-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.x402-card {
  display: grid;
  min-height: 340px;
  border: 1px solid rgba(8, 145, 178, 0.16);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.memo-card {
  background: linear-gradient(135deg, #eaf0ff, #ffffff);
}

.usdc-card {
  background: linear-gradient(135deg, #ecfdf3, #ffffff);
}

.api-card {
  background: linear-gradient(135deg, #ecfeff, #ffffff);
}

.x402-visual {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.x402-visual svg {
  width: 58px;
  height: 58px;
  color: #0891b2;
}

.x402-visual span {
  color: rgba(8, 145, 178, 0.16);
  font-size: clamp(48px, 7vw, 84px);
  font-weight: 950;
  line-height: 1;
}

.x402-card h2 {
  margin: 16px 0 0;
  font-size: clamp(28px, 3vw, 38px);
}

.x402-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.x402-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin-top: 20px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #2458e6, #0891b2);
  color: #fff;
  font-weight: 950;
}

.x402-action-btn:hover {
  background: linear-gradient(135deg, #173fb0, #0e7490);
}

.x402-action-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.token-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 24px;
  align-items: stretch;
  min-height: 330px;
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid rgba(181, 71, 8, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 251, 235, 0.82)),
    #fff;
  box-shadow: var(--shadow);
}

.token-copy h1 {
  max-width: 820px;
  margin: 16px 0 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: 0;
}

.token-copy p {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.token-panel,
.token-history {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 24px);
}

.token-panel {
  display: grid;
  grid-template-columns: minmax(170px, 240px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.token-logo-box {
  display: grid;
  gap: 12px;
}

.token-logo-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(181, 71, 8, 0.16);
  border-radius: 8px;
  background: linear-gradient(135deg, #fffbeb, #eaf0ff);
}

.token-logo-preview svg {
  width: 56px;
  height: 56px;
  color: var(--amber);
}

.token-logo-preview img,
.token-mini-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.token-upload {
  display: grid;
}

.token-upload input {
  display: none;
}

.token-upload span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  font-weight: 900;
}

.token-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.token-form-grid label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 900;
}

.token-form-grid input {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 17px;
  outline: none;
}

.token-form-grid input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 88, 230, 0.12);
}

.token-main-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  align-self: end;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #2458e6, #b54708);
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(181, 71, 8, 0.2);
}

.token-main-cta:disabled {
  cursor: wait;
  opacity: 0.72;
}

.token-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.token-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffcf5;
  padding: 18px;
}

.token-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.token-mini-logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 8px;
  background: #eaf0ff;
  color: var(--blue);
  font-weight: 950;
}

.token-card h3 {
  margin: 0;
  font-size: 22px;
}

.token-card small {
  color: var(--muted);
}

.token-card dl {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.token-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.token-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.token-card dd {
  margin: 0;
  font-weight: 900;
}

.token-card a {
  color: var(--blue);
}

.method-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.method-grid article {
  min-height: 170px;
  justify-content: flex-start;
}

.footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 28px;
  color: var(--muted);
  font-size: 14px;
}

.footer a {
  color: var(--blue);
  font-weight: 800;
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .nav {
    max-width: 100%;
    overflow-x: auto;
  }

  .global-wallet {
    justify-items: start;
    margin-left: 0;
  }

  .global-wallet small {
    right: auto;
    left: 0;
  }

  .global-wallet-menu {
    right: auto;
    left: 0;
  }

  .nav-menu {
    position: static;
  }

  .nav-menu-panel {
    right: 16px;
    left: 16px;
    min-width: 0;
  }

  .hero,
  .booster-hero,
  .deploy-hero,
  .agent-hero,
  .x402-hero,
  .token-hero,
  .booster-actions,
  .booster-history,
  .deploy-input-row,
  .template-grid,
  .contract-grid,
  .agent-builder,
  .agent-action-grid,
  .payment-builder,
  .x402-action-grid,
  .token-panel,
  .token-form-grid,
  .token-grid,
  .admin-hero,
  .admin-contract-grid,
  .profile-hero,
  .profile-grid,
  .badge-grid,
  .metric-grid,
  .recommendation-grid,
  .module-grid,
  .tx-action-grid,
  .tx-stats,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 24px;
  }

  .result-section {
    margin-top: 18px;
  }
}

@media (max-width: 620px) {
  main {
    padding: 14px;
  }

  .input-row,
  .score-panel,
  .breakdown-row {
    grid-template-columns: 1fr;
  }

  .score-ring {
    width: 116px;
    height: 116px;
  }

  .score-ring span {
    font-size: 38px;
  }

  .footer,
  .wallet-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }
}
