:root { font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; --header: 65px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, summary { cursor: pointer; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
h2 { font-size: clamp(2rem, 4vw, 3.65rem); line-height: 1.05; letter-spacing: -.05em; font-weight: 650; }
h3 { font-size: 1.2rem; line-height: 1.25; font-weight: 620; }
h4 { font-size: .99rem; font-weight: 640; }
code, textarea { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
p code, dd code { color: var(--accent-ink); font-size: .9em; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.inner { max-width: 1220px; margin-inline: auto; padding-inline: clamp(20px, 5vw, 68px); }
.skip { position: fixed; top: 8px; left: 16px; z-index: 8; translate: 0 -160%; background: var(--raised); padding: 8px 16px; }
.skip:focus { translate: 0; }

.topbar {
  position: sticky; top: 0; z-index: 4; height: var(--header);
  margin-block-end: calc(-1 * var(--header)); background: transparent; pointer-events: none;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 100%;
  padding-left: max(clamp(12px, 1.35vw, 22px), env(safe-area-inset-left));
  padding-right: max(clamp(12px, 1.35vw, 22px), env(safe-area-inset-right));
}
.topbar .brand { display: grid; place-items: center; width: 44px; height: 44px; pointer-events: auto; }
.brand-mark { width: 23px; height: 23px; display: inline-grid; place-items: center; color: var(--accent); border: 1px solid currentColor; border-radius: 7px; rotate: -13deg; }
.brand-mark::after { content: ""; width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; rotate: 13deg; }
.topbar .theme-toggle { pointer-events: auto; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at center, var(--page) 7%, transparent 50%, var(--page) 96%),
    repeating-radial-gradient(ellipse at center, transparent 0 28px, var(--hero-orbit) 29px, transparent 31px 41px),
    var(--hero-core);
}
.hero-shader { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; visibility: hidden; pointer-events: none; }
.hero.shader-ready .hero-shader { visibility: visible; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 52% 38% at center, var(--page), color-mix(in srgb, var(--page) 68%, transparent) 57%, transparent 100%);
}
.hero-inner {
  display: grid; place-items: center; min-height: calc(100vh - 1px); min-height: calc(100svh - 1px);
  padding-block: calc(var(--header) + max(24px, 5svh)) max(24px, 5svh);
}
.hero-entry { display: grid; justify-items: center; gap: clamp(10px, 2svh, 18px); padding: 8px; border-radius: 14px; text-align: center; animation: enter .55s var(--ease) both; }
.hero h1 {
  font-size: clamp(3rem, 11vw, 10.25rem); font-weight: 740; line-height: .96; letter-spacing: -.07em;
  transition: color .18s var(--ease);
}
.hero-entry:hover h1, .hero-entry:focus-visible h1 { color: var(--accent-ink); }
.hero-lead { color: var(--muted); font-size: clamp(.9rem, 1.6vw, 1.25rem); line-height: 1.35; font-weight: 540; }
.hero-guide { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-ink); font-size: .88rem; font-weight: 640; }
.hero-guide span { display: inline-block; transition: transform .18s var(--ease); }
.hero-entry:hover .hero-guide span, .hero-entry:focus-visible .hero-guide span { transform: translateY(3px); }
.hero button.hero-motion {
  position: absolute; right: clamp(14px, 4vw, 54px); bottom: clamp(14px, 3vw, 32px); width: 36px; height: 36px; min-height: 36px;
  padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface);
}
.hero button.hero-motion:hover:not(:disabled) { color: var(--text); background: var(--raised); }
.hero-motion .hero-resume, .hero-motion[data-paused="true"] .hero-pause { display: none; }
.hero-motion[data-paused="true"] .hero-resume { display: inline-block; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #fff;
  background: var(--action);
  font-size: .88rem;
  font-weight: 660;
  transition: background .16s var(--ease), border-color .16s var(--ease);
}
.button:hover, button:hover:not(:disabled) { background: var(--action-hover); }
button.secondary { background: var(--surface); color: var(--accent); border-color: var(--line); }
button.secondary:hover:not(:disabled) { background: var(--raised); }
button:disabled { opacity: .63; cursor: wait; }
.section { padding-block: clamp(42px, 6vw, 80px); }
.section-intro p { margin-top: 12px; color: var(--muted); }
.connect { padding-top: max(calc(var(--header) + 12px), clamp(42px, 6vw, 80px)); background: var(--section); }
.connect:has(+ section[hidden]) { min-height: 100vh; min-height: 100dvh; }
.connect-top, .account { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.connect:has(#activation-stage:not([hidden])) .connect-top { justify-content: center; text-align: center; }
.workspace { min-width: 0; margin-top: 26px; }
.activation-stage { max-width: 560px; margin-inline: auto; }
.activation-scene { display: grid; place-items: center; min-height: 164px; }
.activation-pill, .activation-orb { grid-area: 1 / 1; }
.activation-pill {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center;
  gap: clamp(4px, 1.5vw, 11px); width: 100%; min-height: 60px; padding: 6px 7px 6px clamp(9px, 2.4vw, 18px);
  border: 1px solid transparent; border-radius: 999px;
  background:
    linear-gradient(110deg, var(--raised), var(--surface) 58%) padding-box,
    conic-gradient(from 220deg, var(--field-line), var(--accent), var(--line) 38%, var(--selected-line) 72%, var(--field-line)) border-box;
  box-shadow: 0 12px 34px color-mix(in srgb, var(--action) 18%, transparent);
  transition: box-shadow .22s var(--ease);
}
.activation-pill:focus-within { box-shadow: 0 10px 38px color-mix(in srgb, var(--action) 30%, transparent); }
.activation-pill > * { transition: opacity .16s ease; }
.activation-stage[data-revealing] .activation-pill > * { opacity: 0; }
.activation-pill .activation-spark { width: clamp(17px, 4vw, 22px); height: clamp(17px, 4vw, 22px); color: var(--accent); }
.activation-pill input {
  width: 100%; min-width: 0; min-height: 42px; padding: 0;
  border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1rem;
}
.activation-pill input::placeholder { color: var(--placeholder); opacity: 1; }
.activation-pill input:focus-visible { outline: none; }
.activation-pill button { width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 50%; }
.activation-pill #show-key { color: var(--muted); background: transparent; }
.activation-pill #show-key:hover:not(:disabled) { color: var(--text); background: var(--selected); }
.activation-pill #activate-key .icon { width: 20px; height: 20px; }
.activation-orb {
  display: grid; place-items: center; width: 164px; height: 164px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--action) 22%, transparent), transparent 68%);
}
.activation-orb canvas { display: block; width: 160px; height: 160px; }
.activation-links { grid-area: 1 / 1; align-self: end; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.activation-stage[data-revealing] .activation-links { visibility: hidden; }
.activation-links a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 13px;
  border: 1px solid var(--chip-line); border-radius: 999px; background: var(--chip); color: var(--accent-ink);
  font-size: .84rem; font-weight: 580; transition: background .15s ease, border-color .15s ease;
}
.activation-links a:hover { background: var(--selected); border-color: var(--selected-line); }
.activation-links a span { color: var(--accent); }
.activation-stage .status { display: block; min-height: 1.5em; margin: 0; text-align: center; overflow-wrap: anywhere; }
.status { margin-top: 9px; font-size: .86rem; color: var(--muted); }
.status:empty { display: none; }
.status.error { color: var(--danger); }
.success { color: var(--positive); font-size: .88rem; font-weight: 620; }
.success::before { content: ""; display: inline-block; vertical-align: middle; margin-right: 7px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

#setup { display: grid; gap: 16px; animation: enter .3s var(--ease) both; }
.wizard-reveal:not([hidden]) { animation: enter .32s var(--ease); }
.wallet-launch {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 5;
  gap: 10px; min-height: 54px; padding-inline: clamp(18px, 3vw, 26px);
  border-radius: 999px; font-size: 1rem;
  box-shadow: 0 6px 24px color-mix(in srgb, var(--action) 36%, transparent);
  animation: wallet-launch-in .42s var(--ease) both;
}
.wallet-launch .icon { width: 20px; height: 20px; }
.wallet-launch::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; pointer-events: none; opacity: .46;
  box-shadow: 0 0 27px 7px color-mix(in srgb, var(--action) 60%, transparent);
  animation: wallet-launch-glow 2.2s ease-in-out infinite alternate;
}
@keyframes wallet-launch-in {
  from { opacity: 0; transform: translate(40%, 55%); }
  to { opacity: 1; transform: translate(0); }
}
@keyframes wallet-launch-glow {
  from { opacity: .3; }
  to { opacity: .8; }
}
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.option-stage { padding-left: 12px; border-left: 1px solid var(--line); }
.option-stage legend { margin-bottom: 8px; padding: 0 0 0 12px; font-weight: 610; }
.stage-number {
  display: inline-grid; place-items: center; width: 25px; height: 25px; margin-right: 6px; vertical-align: middle;
  border: 1px solid var(--field-line); border-radius: 7px; color: var(--accent-ink); background: var(--chip);
  font: .76rem ui-monospace, SFMono-Regular, monospace;
}
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 9px; }
.choice {
  position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 63px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.choice:hover { background: var(--raised); border-color: var(--field-line); }
.choice:has(input:checked) { background: var(--selected); border-color: var(--selected-line); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice input { flex: 0 0 auto; margin: 0 0 0 auto; width: 15px; height: 15px; accent-color: var(--accent); }
.choice input:focus-visible { outline: none; }
.choice-mark {
  display: grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--chip-line); border-radius: 8px; background: var(--chip); color: var(--accent-ink);
  font: 600 .68rem ui-monospace, SFMono-Regular, monospace;
}
.choice-mark[data-icon="codex"] { background: var(--action); color: white; border-color: transparent; }
.choice-mark[data-icon="opencode"] { background: var(--text); color: var(--surface); border-color: transparent; }
.choice-mark[data-icon="cursor"] { color: var(--text); }
.choice-copy { min-width: 0; }
.choice-copy strong, .choice-copy small { display: block; }
.choice-copy strong { font-size: .9rem; font-weight: 630; overflow-wrap: anywhere; }
.choice-copy small { margin-top: 2px; font-size: .79rem; color: var(--muted); }
.instruction { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.instruction-head {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(210px, 27%, 305px); align-items: start; gap: 12px 20px;
  padding: clamp(15px, 2.4vw, 23px);
}
.instruction-heading { min-width: 0; }
.instruction-head h3 { font-size: clamp(1.2rem, 3vw, 1.65rem); }
.instruction-heading p { margin-top: 6px; color: var(--muted); font-size: .88rem; }
.instruction-head .guide-address { color: var(--accent-ink); }
.guide-address .icon { width: 15px; height: 15px; margin-right: 5px; }
.model-picker { position: relative; min-width: 0; }
.model-trigger, .model-menu-row {
  display: flex; align-items: center; justify-content: flex-start; gap: 9px; width: 100%; min-width: 0;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}
.model-trigger {
  min-height: 49px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--section);
}
.model-trigger:hover:not(:disabled), .model-trigger[aria-expanded="true"] { background: var(--raised); border-color: var(--selected-line); }
.model-trigger:disabled { cursor: default; }
.model-trigger > .icon { width: 17px; height: 17px; color: var(--accent-ink); }
.model-trigger-copy { display: grid; flex: 1; min-width: 0; }
.model-caption { color: var(--muted); font-size: .71rem; }
.model-trigger strong, .model-menu-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.model-trigger strong { font-size: .86rem; font-weight: 630; }
.model-trigger .model-caret { color: var(--muted); transition: transform .18s var(--ease); }
.model-trigger[aria-expanded="true"] .model-caret { transform: rotate(180deg); }
.model-trigger:disabled .model-caret { visibility: hidden; }
.model-picker > .model-options {
  position: absolute; z-index: 4; inset: calc(100% + 6px) 0 auto; max-height: min(315px, 46vh); min-width: 0;
  overflow: auto; overscroll-behavior: contain; scrollbar-width: thin;
  padding: 5px; border: 1px solid var(--field-line); border-radius: 11px; background: var(--surface);
  box-shadow: 0 10px 24px color-mix(in srgb, black 23%, transparent);
  animation: enter .18s var(--ease);
}
.model-menu-row {
  min-height: 36px; border: 0; border-radius: 6px; padding: 6px 9px;
  background: transparent; font-size: .84rem;
}
.model-menu-row .icon { width: 15px; height: 15px; color: var(--accent-ink); }
.model-menu-row > .icon:last-child { margin-left: auto; }
.model-menu-row:hover:not(:disabled), .model-menu-row:focus-visible { background: var(--raised); }
.model-menu-row:focus-visible { outline-offset: -2px; }
.model-menu-row[aria-pressed] { padding-left: 19px; }
.model-menu-row[aria-pressed="true"] { background: var(--selected); color: var(--accent-ink); }
.model-menu-row.model-crumb { color: var(--muted); margin-block-end: 4px; }
.model-feedback { grid-column: 1 / -1; }
#reload-models { margin-top: 9px; min-height: 35px; }
.guide-modes {
  display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px;
  margin: 0 clamp(15px, 3vw, 26px) 13px;
  background: var(--section); border: 1px solid var(--line); border-radius: 10px;
}
.guide-modes button {
  min-height: 35px; border: 0; border-radius: 7px; padding: 4px 11px;
  background: transparent; color: var(--muted); font: inherit; font-size: .86rem; cursor: pointer;
}
.guide-modes button[aria-pressed="true"] { background: var(--selected); color: var(--accent-ink); }
.guide-modes button:hover { color: var(--text); }
.guide { padding: 0; margin: 0; list-style: none; counter-reset: guide; }
.guide > li {
  position: relative; counter-increment: guide;
  padding: 12px clamp(15px, 3vw, 26px) 12px clamp(43px, 5vw, 55px);
  border-top: 1px solid var(--line); min-width: 0;
}
.guide > li::before {
  content: counter(guide); position: absolute; display: grid; place-items: center;
  inset: 12px auto auto clamp(12px, 2.3vw, 24px); width: 21px; height: 21px;
  border-radius: 6px; background: var(--chip); color: var(--accent-ink);
  font: .75rem ui-monospace, SFMono-Regular, monospace;
}
.guide > li p { color: var(--muted); max-width: 90ch; font-size: .9rem; margin-top: 3px; }
.guide-alternative { margin-top: 10px; }
.code-box { max-width: 100%; min-width: 0; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--section); overflow: clip; }
.code-bar { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 8px 10px; }
.code-bar strong { overflow-wrap: anywhere; font-size: .81rem; font-weight: 580; }
.code-bar button { min-height: 34px; padding: 4px 10px; }
.code-content {
  margin: 0; white-space: pre-wrap; overflow-wrap: anywhere;
  border: 0; border-top: 1px solid var(--line); background: var(--field); color: var(--text); padding: 12px; font-size: .79rem; line-height: 1.5;
}
.code-content:focus-visible { outline-offset: -3px; }
.code-feedback:not(:empty) { padding: 0 10px 8px; }
.diagnostics { padding: 12px clamp(15px, 3vw, 26px); border-top: 1px solid var(--line); border-radius: 0 0 15px 15px; background: var(--section); }
.diagnostics summary { cursor: pointer; color: var(--accent-ink); font-size: .88rem; font-weight: 600; }
.diagnostics dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px 18px; margin-top: 10px; font-size: .84rem; }
.diagnostics dt { font-weight: 630; }
.diagnostics dd { margin-top: 3px; color: var(--muted); }

.workflow, .faq { border-top: 1px solid var(--line); }
.reviews-marquee { display: grid; gap: 12px; min-width: 0; margin-top: clamp(24px, 3.2vw, 42px); }
.reviews-strip { min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.reviews-strip:focus-visible { outline-offset: -2px; }
.reviews-track, .reviews-list { display: flex; width: max-content; }
.reviews-list { flex: none; list-style: none; gap: 12px; margin: 0; padding: 0 12px 0 0; }
.reviews-list-copy { display: none; }
.review-card {
  display: grid; align-content: start; gap: 8px; width: clamp(236px, 30vw, 370px); padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.review-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .85rem; }
.review-meta strong { font-weight: 630; }
.review-rating { color: var(--accent); letter-spacing: .06em; white-space: nowrap; }
.review-card p { color: var(--muted); font-size: .9rem; }
@media (prefers-reduced-motion: no-preference) {
  .reviews-marquee[data-animated] .reviews-strip {
    overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  }
  .reviews-marquee[data-animated] .reviews-list-copy { display: flex; }
  .reviews-marquee[data-animated] .reviews-track { animation: reviews-marquee 60s linear infinite; }
  .reviews-marquee[data-animated] .reviews-strip-reverse .reviews-track { animation-direction: reverse; }
  .reviews-marquee[data-animated] .reviews-strip:is(:hover, :focus-within) .reviews-track { animation-play-state: paused; }
}
@keyframes reviews-marquee { to { transform: translateX(-50%); } }
.split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(24px, 6vw, 90px); }
.steps-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; list-style: none; margin: 24px 0 0; padding: 0; }
.steps-overview li { border-top: 1px solid var(--line); padding-top: 12px; }
.step-number { display: block; margin-bottom: 8px; color: var(--accent); font: .78rem ui-monospace, monospace; }
.steps-overview p, .client-row p, .faq-list p { color: var(--muted); margin-top: 5px; font-size: .9rem; }
.clients { background: var(--section); }
.client-list, .faq-list { border-top: 1px solid var(--line); }
.client-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.client-row a { display: grid; flex: 0 0 42px; height: 42px; place-items: center; color: var(--accent); border: 1px solid var(--line); border-radius: 9px; }
.client-row a:hover { background: var(--raised); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; font-weight: 590; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--accent); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin-top: 0; padding-bottom: 14px; animation: enter .2s var(--ease); }
@media (max-width: 700px) {
  :root { --header: 57px; }
  .hero h1 { font-size: clamp(3rem, 15vw, 6rem); }
  .hero::after { background: radial-gradient(ellipse 75% 28% at center, var(--page), color-mix(in srgb, var(--page) 74%, transparent) 63%, transparent 100%); }
  .split { grid-template-columns: 1fr; }
  .steps-overview { gap: 14px; }
  .diagnostics dl { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar .theme-toggle { flex-basis: 40px; width: 40px; height: 40px; min-height: 40px; }
  .instruction-head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 460px) {
  .activation-pill button { width: 38px; }
  .options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .options .choice { min-height: 56px; padding: 6px 8px; gap: 6px; }
  .options .choice-mark { display: none; }
  .options .choice strong { font-size: .85rem; }
  .options .choice small { font-size: .73rem; }
  .steps-overview { grid-template-columns: 1fr; }
  .option-stage { padding-left: 10px; }
  .option-stage legend { padding-left: 10px; }
  .guide > li { padding-right: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  display: inline-block; flex: 0 0 auto; vertical-align: middle; width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round;
}
.option-stage legend > .icon, .instruction-head h3 > .icon {
  margin-right: 3px; color: var(--accent);
}
.guide h4 .icon, .diagnostics dt .icon { color: var(--accent); margin-right: 6px; }
.code-bar button .icon { width: 15px; height: 15px; }
@media (max-width: 460px) {
  .options .choice-mark { display: grid; width: 21px; height: 21px; border-radius: 6px; }
  .options .choice-mark .icon { width: 14px; height: 14px; }
}

.wallet-page {
  --wallet-header-height: 64px;
  position: relative; isolation: isolate;
  display: grid; grid-template: "wallet" 1fr / minmax(0, 1fr); min-height: 100vh; min-height: 100dvh;
  background:
    radial-gradient(ellipse at 63% 55%, color-mix(in srgb, var(--action) 17%, transparent), transparent 58%) 0 0 / 100% 100svh no-repeat,
    radial-gradient(ellipse at 28% 42%, var(--hero-core), transparent 62%) 0 0 / 100% 100svh no-repeat,
    var(--page);
}
.wallet-page > main { grid-area: wallet; position: relative; z-index: 1; display: grid; min-width: 0; }
.wallet-header {
  grid-area: wallet; align-self: start; z-index: 12;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px;
  min-height: var(--wallet-header-height); background: transparent;
  padding-inline: max(clamp(10px, 1.5vw, 24px), env(safe-area-inset-left), env(safe-area-inset-right));
}
.wallet-brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; font-size: 1.03rem; line-height: 1.2; }
.wallet-brand-sign { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 10px; }
.wallet-brand-sign { background: var(--action); color: #fff; }
.wallet-brand-sign .brand-mark { width: 20px; height: 20px; color: inherit; }
.wallet-brand strong, .wallet-brand small { display: block; }
.wallet-brand strong { letter-spacing: -.025em; }
.wallet-brand small { margin-top: 3px; color: var(--muted); font-size: .73rem; white-space: nowrap; }
.wallet-tabs-wrap { display: flex; justify-self: center; align-items: center; gap: 6px; }
.wallet-tabs-wrap .theme-toggle { flex-basis: 38px; width: 38px; height: 38px; min-height: 38px; }
.wallet-tabs { display: flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 40px; background: var(--field); }
.wallet-tabs button {
  min-height: 32px; border-radius: 40px; border: 0; background: transparent; color: var(--muted);
  padding: 4px 12px; font-size: .83rem; font-weight: 640;
}
.wallet-tabs button[aria-selected="false"]:hover:not(:disabled) { background: var(--card-chip); }
.wallet-tabs button[aria-selected="true"] { color: var(--accent-ink); background: var(--selected); }
.wallet-tabs button:focus-visible { outline-color: var(--accent); outline-offset: -2px; }
.wallet-tabs .icon { width: 16px; height: 16px; }
.wallet-link { display: inline-flex; justify-self: end; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 20px; color: var(--text); font-size: .84rem; font-weight: 620; white-space: nowrap; }
.wallet-link:hover { background: var(--raised); }
.wallet-link .icon { width: 15px; height: 15px; }
.wallet-link .wallet-link-book { display: none; }
.wallet-view {
  position: relative; min-width: 0; overflow: clip;
}
.wallet-mist {
  position: absolute; inset: 0 0 auto; width: 100%; height: min(100%, 100svh); pointer-events: none; visibility: hidden;
  mask-image: linear-gradient(transparent, #000 18%, #000 85%, transparent); opacity: .9;
}
.wallet-page[data-background="mist"].mist-ready .wallet-mist { visibility: visible; }
.wallet-page[data-background="neon"] { background: var(--page); }
.wallet-neon {
  position: fixed; inset: 0; width: 100%; height: 100dvh; visibility: hidden; pointer-events: none;
}
.wallet-page[data-background="neon"] .wallet-neon { visibility: visible; }
[data-theme="light"] .wallet-neon { filter: invert(1) hue-rotate(180deg); opacity: .73; }
.wallet-page[data-background="prism"] {
  --prism-mid: #34365e;
  --prism-highlight: #72688f;
  background: linear-gradient(128deg, var(--page) 17%, var(--prism-mid) 65%, var(--prism-highlight)) fixed;
}
[data-theme="light"] .wallet-page[data-background="prism"] {
  --prism-mid: #d7dff5;
  --prism-highlight: #c1b2dd;
}
.wallet-prism {
  visibility: hidden; position: fixed; inset: 0; z-index: 0; width: 100%; height: 100vh; height: 100lvh;
  contain: paint; pointer-events: none;
}
.wallet-page[data-background="prism"].prism-ready .wallet-prism { visibility: visible; }

.wallet-background-picker {
  --background-index: 0;
  --background-step: 26px;
  position: fixed; z-index: 13; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 3px; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--accent-ink); background: var(--field);
  box-shadow: 0 5px 22px color-mix(in srgb, var(--page) 62%, transparent);
  touch-action: manipulation;
}
[data-background="neon"] .wallet-background-picker { --background-index: 1; }
[data-background="prism"] .wallet-background-picker { --background-index: 2; }
.wallet-background-filter { position: absolute; pointer-events: none; }
.wallet-background-picker button {
  min-height: 36px; border: 0; padding: 0; border-radius: 18px; color: inherit; background: transparent;
}
.wallet-background-picker button:hover:not([aria-disabled="true"]) { background: var(--selected); }
.wallet-background-picker button:focus-visible { outline-offset: -2px; }
.wallet-background-picker .background-arrow { width: 36px; }
.wallet-background-picker .background-arrow[aria-disabled="true"] { opacity: .38; cursor: default; background: transparent; }
.background-arrow[data-background-step="-1"] .icon { rotate: 180deg; }
.background-choices { position: relative; display: flex; isolation: isolate; }
.background-choices button { width: var(--background-step); position: relative; }
.background-dots {
  position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr);
  place-items: center; z-index: 1; pointer-events: none; filter: url(#wallet-background-goo);
}
.background-dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.background-dots::after {
  content: ""; position: absolute; left: calc((var(--background-step) - 15px) / 2); top: calc((100% - 15px) / 2);
  width: 15px; height: 15px; border-radius: 50%; background: currentColor;
  transform: translateX(calc(var(--background-index) * var(--background-step))); transition: transform .42s var(--ease);
}
.topup-view {
  --arc-space: clamp(151px, 19vw, 275px);
  --deck-center: calc((100% + var(--arc-space)) / 2);
  position: relative; display: grid; min-width: 0; padding-top: var(--wallet-header-height);
}
.topup-stage {
  --deck-gap: clamp(42px, 8cqw, 135px);
  --arc-inset: clamp(10px, 2.3cqw, 35px);
  --deck-width: min(calc(100cqw - var(--arc-space) - 5cqw), 126cqh, 1360px);
  --deck-bottom: 32%;
  --card-ratio: 2.08;
  position: relative; container-type: size; overflow: clip;
  touch-action: pan-y pinch-zoom; user-select: none;
}
.topup-stage:focus-visible { outline-offset: -3px; }
.topup-picker {
  position: absolute; z-index: 9; inset-inline-start: var(--arc-inset);
  top: calc(100% - var(--deck-bottom) - var(--deck-width) / var(--card-ratio) / 2);
  width: calc(var(--arc-space) - var(--arc-inset)); height: clamp(200px, 70cqh, 430px);
  transform: translateY(-50%); overflow: clip; cursor: grab; touch-action: pan-x pinch-zoom;
  mask-image: linear-gradient(transparent, #000 10%, #000 90%, transparent);
}
.topup-picker:active { cursor: grabbing; }
.topup-picker button {
  position: absolute; top: 50%; left: 62%; min-height: 34px; padding: 3px 4px; white-space: nowrap;
  font-size: clamp(.85rem, 1.62cqw, 1.3rem); font-variant-numeric: tabular-nums; font-weight: 520;
  letter-spacing: -.025em; cursor: inherit; background: transparent; border: 0; color: var(--muted);
}
.topup-picker button:hover { color: var(--text); background: transparent; }
.topup-picker button[aria-checked="true"] { color: var(--accent-ink); font-weight: 700; }
.topup-picker button[aria-checked="true"]::before,
.topup-picker button[aria-checked="true"]::after {
  position: absolute; top: 50%; transform: translateY(-52%); color: var(--accent); font-weight: 430;
}
.topup-picker button[aria-checked="true"]::before { content: "["; right: 100%; }
.topup-picker button[aria-checked="true"]::after { content: "]"; left: 100%; }
.topup-picker button:focus-visible { outline-offset: 3px; }
.topup-stack {
  position: absolute; inset: 0; margin: 0; padding: 0; list-style: none;
  perspective: clamp(440px, 108cqw, 1500px); perspective-origin: var(--deck-center) -8%;
  mask-image: linear-gradient(black calc(100% - 80px), transparent calc(100% - 40px));
}
.topup-card {
  --tone: #af91ff;
  --foil-shadow: color-mix(in srgb, var(--tone) 45%, #27203b);
  --foil-tone: var(--tone);
  --foil-highlight: color-mix(in srgb, var(--tone) 38%, #fff);
  --card-base: color-mix(in srgb, var(--tone) 8%, #171322);
  --card-edge: color-mix(in srgb, var(--tone) 30%, #20192e);
  --card-face-ink: #faf6ff;
  --card-secondary: color-mix(in srgb, var(--tone) 54%, #faf6ff);
  --inset-x: clamp(18px, min(5.2cqw, 9cqh), 80px);
  --inset-y: clamp(17px, min(3.4cqw, 6cqh), 55px);
  position: absolute; bottom: var(--deck-bottom); left: var(--deck-center); width: var(--deck-width); aspect-ratio: var(--card-ratio);
  translate: -50% 0; transform-origin: center bottom; border-radius: clamp(14px, 2cqw, 30px);
  display: flex; align-items: flex-end; justify-content: flex-start; padding: var(--inset-y) var(--inset-x);
  overflow: hidden; isolation: isolate; color: var(--card-face-ink);
  border: 1px solid color-mix(in srgb, var(--tone) 52%, var(--card-base));
  background:
    radial-gradient(ellipse at 87% 14%, var(--card-edge), transparent 68%),
    var(--card-base);
  box-shadow: inset 0 1px color-mix(in srgb, var(--tone) 22%, transparent), 0 14px 32px #110c2540;
}
.topup-card::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--tone) 36%, transparent) 1px, transparent 1.3px) 50% / 13px 13px;
  mask-image: radial-gradient(ellipse at 85% 50%, #000 4%, transparent 66%);
}
:root[data-theme="light"] .topup-card {
  --foil-shadow: color-mix(in srgb, var(--tone) 62%, #39304f);
  --foil-tone: color-mix(in srgb, var(--tone) 51%, #38215d);
  --foil-highlight: color-mix(in srgb, var(--tone) 33%, #49356d);
  --card-base: color-mix(in srgb, var(--tone) 12%, #f9f7fe);
  --card-edge: color-mix(in srgb, var(--tone) 36%, #f7f2ff);
  --card-face-ink: #261b3b;
  --card-secondary: color-mix(in srgb, var(--tone) 23%, #3c2c55);
}
.topup-card:nth-child(2) { --tone: #8da7ff; }
.topup-card:nth-child(3) { --tone: #71d5ed; }
.topup-card:nth-child(4) { --tone: #75e1ba; }
.topup-card:nth-child(5) { --tone: #edbd76; }
.topup-card:nth-child(6) { --tone: #ff9a85; }
.topup-card:nth-child(7) { --tone: #f394c4; }
.topup-card:nth-child(8) { --tone: #cf9af5; }
.topup-card:nth-child(9) { --tone: #9a8bff; }
.topup-art {
  position: absolute; inset-block: 0; right: 0; z-index: -1; width: 65%; height: 100%; pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 25%);
}
.topup-imprint, .topup-position { position: absolute; top: var(--inset-y); }
.topup-imprint {
  left: var(--inset-x); display: inline-flex; align-items: center; gap: 9px;
  font-size: clamp(.83rem, min(2.15cqw, 4.7cqh), 1.65rem); line-height: 1; font-weight: 705; letter-spacing: -.045em;
}
.topup-imprint .brand-mark {
  width: 1.05em; height: 1.05em; border-radius: .31em; color: var(--card-secondary);
}
.topup-imprint .brand-mark::after { width: .34em; height: .34em; border-width: 1.5px; }
.topup-position {
  right: var(--inset-x); color: var(--card-secondary); line-height: 1.1; font-size: clamp(.65rem, 1.25cqw, 1rem);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 4px var(--card-edge), 0 0 10px var(--card-edge);
}
.topup-card-label {
  display: flex; align-items: flex-end; gap: clamp(7px, 1.4cqw, 22px); font-variant-numeric: lining-nums; white-space: nowrap;
}
.topup-card-label strong {
  font-size: clamp(2.6rem, min(14.8cqw, 27cqh), 13rem); font-weight: 730; line-height: .81; letter-spacing: -.083em;
}
.topup-card-label span {
  display: grid; gap: .21em; margin-bottom: .02em; color: var(--card-secondary);
  font-size: clamp(1rem, min(3.55cqw, 6.9cqh), 3.25rem); font-weight: 615; line-height: .95; letter-spacing: -.058em;
}
.topup-card-label small { font-size: .56em; font-weight: 550; letter-spacing: -.02em; }
.topup-card-label[href] { pointer-events: none; }
.topup-card[data-floor] :is(.topup-card-label, .topup-imprint, .topup-position) { opacity: .12; }
.topup-card[data-floor] .topup-art { opacity: .24; }
.topup-card[data-front] .topup-card-label[href] { pointer-events: auto; }
.topup-card[data-front] .topup-card-label[href]::after { position: absolute; inset: 0; content: ""; }
.topup-card:focus-within { outline: 2px solid var(--accent); outline-offset: -4px; }
.topup-scroll-hint {
  position: absolute; z-index: 9; left: var(--deck-center); bottom: max(14px, env(safe-area-inset-bottom)); width: max-content;
  display: flex; align-items: center; gap: 7px; translate: -50% 0; color: var(--muted); font-size: .8rem; pointer-events: none;
}
.topup-scroll-hint .icon { width: 15px; height: 15px; color: var(--accent); }
.topup-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 700px) {
  .wallet-brand small, .wallet-tabs .icon { display: none; }
}

@media (max-width: 570px) {
  .wallet-page { --wallet-header-height: 56px; }
  .wallet-header { gap: 4px; }
  .wallet-tabs-wrap { gap: 4px; }
  .wallet-tabs button { padding-inline: 8px; font-size: .79rem; white-space: nowrap; }
  .wallet-brand-name, .wallet-link span, .wallet-link .wallet-link-arrow { display: none; }
  .wallet-link { justify-content: center; width: 38px; height: 38px; padding: 0; }
  .wallet-link .wallet-link-book { display: block; width: 20px; height: 20px; }
}
@media (max-width: 820px) {
  .topup-scroll-hint { bottom: max(66px, calc(env(safe-area-inset-bottom) + 52px)); }
}

@media (max-width: 360px) {
  .wallet-tabs button { padding-inline: 6px; font-size: .75rem; }
}

@media (max-width: 620px) {
  .topup-view { --arc-space: clamp(95px, 27vw, 135px); }
  .topup-stage { --arc-inset: 5px; --deck-bottom: 43%; --card-ratio: 1.57; }
  .topup-picker button { left: 58%; font-size: clamp(.76rem, 3.65cqw, 1rem); }
  .topup-card { --inset-x: clamp(11px, 3.15cqw, 18px); --inset-y: clamp(12px, 3.2cqw, 17px); }
  .topup-card-label strong { font-size: clamp(1.95rem, 12.5cqw, 4.7rem); }
  .topup-card-label span { font-size: clamp(.84rem, 3.55cqw, 1.35rem); }
  .topup-art { width: 61%; mask-image: linear-gradient(90deg, transparent 7%, #000 29%); }
}
