/* ---------- tokens ---------- */
:root {
  /* Starr palette: pulled from the pixel star (gold + its brown outline) and a game-sky blue */
  --fog: #FFF7EA;          /* page cream */
  --paper: #FFFFFF;
  --ink: #3A1F14;          /* star outline brown */
  --ink-2: #6B4A3A;
  --ink-3: #9A7F70;
  --line: #E6D7C3;
  --line-2: #F0E4D3;
  --gold: #F7C531;
  --gold-deep: #E2A512;
  --sky: #7CC6EE;
  --sky-2: #BFE6F7;
  --tomato: #E8552F;
  --grass: #79C36A;
  --lilac: #B8A4F0;
  --blue: #D9482B;         /* links + accents (kept var name for existing pages) */
  --blue-press: #B8381E;
  --blue-soft: #FDE6DC;
  --pink: #FF4F9A;
  --pink-soft: #FFE1EE;
  --ok: #2F8A4E;
  --ok-soft: #E1F3E2;
  --warn: #A1600B;
  --warn-soft: #FFF0D6;
  --bad: #C8303A;
  --bad-soft: #FDE3E5;

  --seg-platform: #3A1F14;
  --seg-treasury: #F7C531;
  --seg-creator: #E8552F;

  --display: 'Big Shoulders Display', 'Arial Narrow', 'DejaVu Sans Condensed', sans-serif;
  --body: 'Hanken Grotesk', system-ui, sans-serif;
  --pixel: 'Silkscreen', ui-monospace, monospace;

  --r-card: 14px;
  --r-ctl: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1220px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-press); }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0 0 0.8em; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--paper); padding: 8px 12px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.tiny { font-size: 13px; color: var(--ink-3); }

/* ---------- display type: the condensed "talent name" ---------- */
.talent {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.86;
  text-transform: uppercase;
}
.h-section {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(34px, 4.6vw, 54px);
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.h-sub { font-size: 20px; font-weight: 700; }
.ticker { font-weight: 700; color: var(--blue); }

/* ---------- layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
main { min-height: 70vh; outline: none; }
.section { padding: clamp(40px, 7vw, 88px) 0; }
.section + .section { padding-top: 0; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1 1 auto; }

/* ---------- header: floating pill nav ---------- */
.site-header { position: fixed; top: 12px; left: 0; right: 0; z-index: 30; display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
.pillnav {
  pointer-events: auto; display: flex; align-items: center; gap: 8px;
  background: rgba(255, 247, 234, 0.94); backdrop-filter: blur(10px);
  border: 2px solid var(--ink); border-radius: 18px; padding: 7px 8px 7px 10px;
  box-shadow: 0 4px 0 var(--ink);
  animation: nav-drop 700ms var(--ease) both;
}
@keyframes nav-drop { from { transform: translateY(-120%); } to { transform: none; } }
.brand { display: flex; align-items: center; gap: 7px; text-decoration: none; color: var(--ink); margin-right: 6px; }
.brand img { image-rendering: auto; transition: transform 300ms var(--ease); }
.brand:hover img { transform: rotate(-12deg) scale(1.08); }
.brand-name { font-family: var(--display); font-weight: 900; font-size: 26px; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1; }
.pill-links { display: flex; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  font: 700 14px/1 var(--body); color: var(--ink); text-decoration: none; cursor: pointer;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 11px; padding: 8px 12px;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background-color 160ms;
}
.pill:hover { transform: translateY(-2px); box-shadow: 0 3px 0 var(--ink); color: var(--ink); }
.pill[aria-current] { background: var(--sky-2); }
.pill-gold { background: var(--gold); }
.pill-ink { background: var(--ink); color: var(--fog); }
.pill-ink:hover { color: var(--fog); }
.pill-light { background: transparent; color: var(--fog); border-color: rgba(255,247,234,.5); }
.pill-light:hover { color: var(--fog); box-shadow: none; }
.pill-sep { width: 2px; height: 26px; background: var(--line); border-radius: 2px; }
.page { position: relative; z-index: 2; background: var(--fog); padding-top: 84px; border-radius: 0 0 28px 28px; box-shadow: 0 30px 40px -30px rgba(58,31,20,.45); }
body[data-route='home'] .page { padding-top: 0; }
.mock-banner { position: relative; z-index: 3; background: var(--warn-soft); color: var(--warn); text-align: center; font-size: 13px; padding: 6px var(--gutter); font-weight: 700; margin-top: 76px; }
.mock-banner + .page { padding-top: 12px; }
body[data-route='home'] .mock-banner { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 40; }
@media (max-width: 900px) {
  .pill-links { display: none; }
  .pill-sep { display: none; }
  .brand-name { font-size: 22px; }
  .pill { padding: 7px 10px; font-size: 13px; }
}

/* ---------- footer: revealed from underneath, tiles grow as it comes into view ---------- */
.site-footer {
  position: sticky; bottom: 0; z-index: 1;
  background: #2B1B14; color: var(--fog);
  padding: 170px var(--gutter) 30px; margin-top: -40px;
}
.foot-top { display: grid; justify-items: center; gap: 4px; text-align: center; margin-bottom: 56px; }
.foot-badge { width: 118px; height: 118px; border-radius: 50%; background: var(--sky); display: grid; place-items: center; margin-bottom: 14px; box-shadow: inset 0 -6px 0 rgba(0,0,0,.12); }
.foot-star { animation: bob 3.2s ease-in-out infinite; }
.foot-name { font-family: var(--body); font-weight: 800; font-size: clamp(34px, 3.4vw, 44px); letter-spacing: -0.045em; line-height: 1; }
.foot-tag { font-size: 17px; color: #9C8579; letter-spacing: -0.01em; }
.foot-social { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.foot-pill { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border: 1.5px solid rgba(255,247,234,.75); border-radius: 18px;
  color: var(--fog); text-decoration: none; font-weight: 800; letter-spacing: -0.03em; font-size: 17px; transition: background-color 200ms, color 200ms, transform 200ms var(--ease); }
.foot-pill .handle { font-weight: 500; opacity: .7; }
.foot-pill:hover { background: var(--fog); color: #2B1B14; transform: translateY(-2px); }
.foot-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: end; height: 400px; max-width: 1200px; margin: 0 auto; }
.tile {
  display: flex; align-items: flex-end; padding: 18px; border-radius: 22px; text-decoration: none; color: #2B1B14;
  height: calc(150px + 250px * var(--grow, 1)); transition: height 120ms linear, transform 260ms var(--ease), filter 200ms;
  font-family: var(--body); font-weight: 500; font-size: clamp(34px, 4.6vw, 64px); letter-spacing: -0.055em; line-height: .95;
}
.tile:hover { transform: translateY(-8px); color: #2B1B14; filter: brightness(1.06); }
.t-sky { background: #8FB9D4; } .t-tomato { background: #C9683B; } .t-pink { background: #E2A79B; } .t-grass { background: #A9BC85; }
.foot-legal { max-width: 70ch; margin: 34px auto 0; text-align: center; font-size: 13px; color: #9C8579; }
.foot-legal a { color: var(--gold); }
@media (max-width: 700px) { .foot-tiles { grid-template-columns: 1fr 1fr; height: auto; gap: 10px; } .tile { height: 170px; font-size: 34px; } .site-footer { padding-top: 100px; } }

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-ctl);
  padding: 12px 20px; font-weight: 700; font-size: 16px; line-height: 1.1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 120ms, transform 80ms;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--gold); color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.btn-primary:hover { background: #FFD24A; color: var(--ink); transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn-ink { background: var(--ink); color: var(--fog); border: 2px solid var(--ink); }
.btn-ink:hover { background: #55311F; color: var(--fog); }
.btn-ghost { background: var(--paper); color: var(--ink); border: 2px solid var(--ink); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-xs { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 16px 26px; font-size: 18px; }

.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 600; font-size: 14px; color: var(--ink); }
.input, .textarea, select.input {
  width: 100%; border: 1px solid var(--line); background: var(--paper);
  border-radius: 10px; padding: 11px 13px; font-size: 16px;
}
.input:focus, .textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.textarea { min-height: 96px; resize: vertical; }
.hint { font-size: 13px; color: var(--ink-3); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 6px 12px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.chip[aria-pressed='true'] { background: var(--ink); color: #fff; border-color: var(--ink); }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 700; }
.badge-live { background: var(--pink-soft); color: #b0005a; }
.badge-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-plain { background: var(--line-2); color: var(--ink-2); }

.panel { background: var(--paper); border: 1px solid var(--line-2); border-radius: 14px; padding: clamp(16px, 2.5vw, 28px); }
.notice { border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.notice-warn { background: var(--warn-soft); color: #6d3800; }
.notice-bad { background: var(--bad-soft); color: #7a0f22; }
.notice-ok { background: var(--ok-soft); color: #075239; }
.notice-info { background: var(--blue-soft); color: #22188f; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(32px, 6vw, 80px) 0 clamp(24px, 5vw, 56px); }
.hero h1 { font-size: clamp(52px, 8.4vw, 118px); }
.hero-lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 46ch; margin: 22px 0 28px; }
.hero-note { margin-top: 18px; font-size: 15px; color: var(--ink-2); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }

/* the fan of comp cards in the hero */
.fan { position: relative; height: clamp(380px, 46vw, 560px); }
.fan .comp { position: absolute; width: 58%; top: 6%; transition: transform 500ms cubic-bezier(.2,.8,.2,1); }
.fan .comp:nth-child(1) { left: 0; transform: rotate(-7deg) translateY(18px); }
.fan .comp:nth-child(2) { left: 21%; transform: rotate(0.5deg); z-index: 2; }
.fan .comp:nth-child(3) { left: 42%; transform: rotate(7deg) translateY(26px); }
.fan.ready .comp:nth-child(1) { transform: rotate(-9deg) translate(-8px, 22px); }
.fan.ready .comp:nth-child(3) { transform: rotate(9deg) translate(8px, 30px); }
@media (prefers-reduced-motion: reduce) { .fan .comp { transition: none; } }

/* ---------- comp card (an AI as signed talent) ---------- */
.comp {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--paper); border-radius: var(--r-card);
  border: 1px solid var(--line-2); overflow: hidden;
  box-shadow: 0 1px 0 rgba(20, 26, 46, 0.06), 0 18px 40px -24px rgba(20, 26, 46, 0.35);
}
.comp-photo { aspect-ratio: 4 / 5; background: var(--line-2); position: relative; overflow: hidden; }
.comp-photo img { width: 100%; height: 100%; object-fit: cover; }
.comp-photo .badge { position: absolute; left: 10px; top: 10px; }
.comp-body { padding: 12px 14px 14px; }
.comp-name { font-size: clamp(34px, 3.6vw, 46px); }
.comp-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.comp-meta .ticker { color: var(--blue); }
.comp-placeholder .comp-photo { display: grid; place-items: center; background: repeating-linear-gradient(135deg, #dfe3eb 0 12px, #e7eaf0 12px 24px); color: var(--ink-3); font-weight: 600; }
a.comp:hover { border-color: var(--line); }
a.comp:hover .comp-name { color: var(--blue); }

.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }

/* ---------- steps (a real sequence) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.step { border-top: 2px solid var(--ink); padding-top: 14px; }
.step::before { counter-increment: step; content: counter(step); font-family: var(--display); font-variation-settings: 'wdth' 60; font-weight: 860; font-size: 44px; line-height: 1; color: var(--blue); display: block; margin-bottom: 8px; }
.step h3 { font-size: 20px; margin-bottom: 6px; }
.step p { color: var(--ink-2); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- fee split bar ---------- */
.split { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--line-2); }
.split span { display: block; height: 100%; }
.split .s-platform { background: var(--seg-platform); }
.split .s-treasury { background: var(--seg-treasury); }
.split .s-creator { background: var(--seg-creator); }
.split-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.split-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.split-legend b { color: var(--ink); }

.explain { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .explain { grid-template-columns: 1fr; } }

/* ---------- wizard ---------- */
.wizard { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); padding: clamp(28px, 5vw, 56px) 0; }
.wizard-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; align-content: start; position: sticky; top: 90px; }
.wizard-steps li { padding: 10px 12px; border-radius: 10px; color: var(--ink-3); font-weight: 600; }
.wizard-steps li[aria-current='step'] { background: var(--paper); color: var(--ink); }
.wizard-steps li.done { color: var(--ink-2); }
.wizard-steps li.done::after { content: ' ✓'; color: var(--ok); }
@media (max-width: 860px) {
  .wizard { grid-template-columns: 1fr; }
  .wizard-steps { position: static; grid-auto-flow: column; overflow-x: auto; }
}
.examples { display: flex; flex-wrap: wrap; gap: 8px; }
.persona-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .persona-grid { grid-template-columns: 1fr; } }
.look { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 560px; align-items: start; }
.look figure { margin: 0; }
.look img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-card); background: var(--line-2); }
.look figure:nth-child(2) img { aspect-ratio: 9/16; object-fit: contain; background: #1b120d; }
.look figcaption { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.shimmer { aspect-ratio: 4/5; border-radius: var(--r-card); background: linear-gradient(100deg, #dfe3eb 30%, #eef0f5 50%, #dfe3eb 70%); background-size: 300% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .shimmer { animation: none; } }
.cost-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cost-table td { padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.cost-table td:last-child { text-align: right; font-weight: 600; }
.cost-table tr.total td { border-bottom: 0; font-size: 17px; font-weight: 800; }
.range { width: 100%; accent-color: var(--blue); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.checklist .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); margin-top: 1px; }
.checklist li.active .dot { border-color: var(--blue); border-top-color: transparent; animation: spin 0.9s linear infinite; }
.checklist li.done .dot { background: var(--ok); border-color: var(--ok); }
.checklist li.fail .dot { background: var(--bad); border-color: var(--bad); }
.checklist li.done .dot::after { content: ''; display: block; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: translate(6px, 2px) rotate(45deg); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- AI profile page ---------- */
.profile { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(20px, 4vw, 56px); padding: clamp(24px, 4vw, 48px) 0; align-items: start; }
.profile-photo { border-radius: var(--r-card); overflow: hidden; background: var(--line-2); aspect-ratio: 4/5; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: clamp(64px, 11vw, 150px); }
.profile-sub { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 14px 0 18px; font-size: 18px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border-top: 1px solid var(--line); margin-top: 22px; }
.fact { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.fact dt { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.fact dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; }
@media (max-width: 820px) { .profile { grid-template-columns: 1fr; } .profile-photo { max-width: 420px; } }

.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.post { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.post-media { aspect-ratio: 9/16; background: var(--ink); position: relative; }
.post-media video, .post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-media .badge { position: absolute; left: 8px; top: 8px; }
.post-text { padding: 16px; font-size: 16px; min-height: 120px; }
.post-body { padding: 10px 12px 12px; font-size: 14px; display: grid; gap: 6px; }
.post-body .caption { color: var(--ink); }
.post-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.manage { margin: 8px 0 40px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--blue); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.toggle:last-child { border-bottom: 0; }
.switch { position: relative; width: 50px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background 120ms; }
.switch span::after { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 160ms; }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.switch.danger input:checked + span { background: var(--bad); }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger td, .ledger th { padding: 8px 6px; border-bottom: 1px solid var(--line-2); text-align: left; }
.ledger td.num, .ledger th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--ok); }
.neg { color: var(--ink-2); }
.activity { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.activity li { padding: 8px 0; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 12px; }
.activity time { color: var(--ink-3); white-space: nowrap; }

/* ---------- admin ---------- */
.admin-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; justify-content: space-between; padding: 32px 0 8px; }
.queue { display: grid; gap: 10px; }
.qrow { background: var(--paper); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.qrow img { width: 64px; height: 80px; object-fit: cover; border-radius: 4px; background: var(--line-2); }
.qrow .handles { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.qrow .handles .old { color: var(--ink-3); text-decoration: line-through; font-weight: 600; }
.qrow .input { max-width: 200px; padding: 7px 10px; font-size: 15px; }
.qrow .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.qrow.done { opacity: 0.55; }
.profile-task { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); display: grid; gap: 6px; font-size: 14px; }
@media (max-width: 760px) { .qrow { grid-template-columns: 56px minmax(0, 1fr); } .qrow .acts { grid-column: 1 / -1; justify-content: flex-start; } }
.table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--paper); border-radius: 12px; overflow: hidden; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.table th { font-size: 13px; color: var(--ink-3); background: #f6f7fa; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 12px; }
.addr { font-variant-numeric: tabular-nums; }

/* ---------- toasts + modal ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 60; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 12px; font-size: 15px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); }
.toast.bad { background: var(--bad); }
.toast.ok { background: var(--ok); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 26, 46, 0.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--paper); border-radius: 16px; padding: 22px; width: min(440px, 100%); max-height: 90vh; overflow: auto; }
.modal h2 { font-size: 22px; margin-bottom: 12px; }
.wallet-list { display: grid; gap: 8px; margin: 12px 0; }
.wallet-list button, .wallet-list a { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-weight: 700; text-decoration: none; color: var(--ink); }
.wallet-list button:hover { border-color: var(--blue); }
.empty { padding: 32px; text-align: center; color: var(--ink-2); border: 1px dashed var(--line); border-radius: 14px; }
.loading { padding: 48px 0; color: var(--ink-3); }

/* =====================================================================
   HOME (Starr) — pinned sky hero, cloud curtain, scroll-paced sections
   ===================================================================== */
.px { display: inline-block; vertical-align: middle; image-rendering: pixelated; }

/* letters: shared split-text animation */
.ch { display: inline-block; transform: translateY(105%) rotate(6deg); opacity: 0; transition: transform 700ms var(--ease), opacity 400ms ease; transition-delay: var(--d, 0s); }
.w { display: inline-block; white-space: nowrap; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; vertical-align: top; }
.go .ch, .in .ch, [data-reveal].in .ch { transform: none; opacity: 1; }

/* hero */
.s-hero { position: sticky; top: 0; height: 100vh; min-height: 620px; z-index: 0; overflow: hidden; display: grid; place-items: center; }
.sky { position: absolute; inset: 0; background: linear-gradient(180deg, #6DBDEB 0%, #9FD6F2 55%, #CDEBF8 100%); overflow: hidden; }
.cloud { position: absolute; left: -200px; animation: drift linear infinite; opacity: .95; }
.cloud.c1 { top: 14%; animation-duration: 58s; animation-delay: -12s; }
.cloud.c2 { top: 30%; animation-duration: 82s; animation-delay: -40s; }
.cloud.c3 { top: 64%; animation-duration: 70s; animation-delay: -5s; }
.cloud.c4 { top: 78%; animation-duration: 95s; animation-delay: -60s; }
.cloud.c5 { top: 8%; animation-duration: 120s; animation-delay: -90s; opacity: .7; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 400px)); } }
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 90px var(--gutter) 40px; will-change: transform, opacity; }
.hero-title { font-family: var(--display); font-weight: 900; text-transform: uppercase; color: var(--ink); line-height: .84; font-size: clamp(62px, 11.5vw, 168px); letter-spacing: .005em; display: grid; justify-items: center; }
.hero-title .ln { position: relative; display: inline-block; }
.hero-title .l3 { color: var(--gold); -webkit-text-stroke: clamp(2px, .35vw, 5px) var(--ink); paint-order: stroke fill; text-shadow: 0 .06em 0 var(--ink); }
.stk { position: absolute; transform: scale(0) rotate(-30deg); transition: transform 600ms cubic-bezier(.3, 1.6, .5, 1); }
.go .stk { transform: scale(1) rotate(0); }
.stk-a { left: -0.55em; top: 0.08em; transition-delay: .9s; }
.stk-b { right: -0.5em; top: 0.05em; transition-delay: 1.05s; }
.stk-c { right: -0.62em; top: -0.1em; transition-delay: 1.2s; width: .62em; height: auto; }
.go .stk-c { animation: bob 3.2s ease-in-out 2s infinite; }
.hero-sub { font-size: clamp(16px, 1.5vw, 20px); font-weight: 600; color: var(--ink); margin: 26px auto 18px; max-width: 40ch; opacity: 0; transform: translateY(14px); transition: all 600ms var(--ease) 1.1s; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; opacity: 0; transform: translateY(18px); transition: all 600ms var(--ease) 1.3s; }
.go .hero-sub, .go .hero-cta { opacity: 1; transform: none; }

/* curtain that slides over the pinned hero, with a stepped pixel-cloud edge */
.curtain { position: relative; z-index: 1; background: var(--fog); margin-top: -2px; }
.curtain::before { content: ''; position: absolute; left: 0; right: 0; top: -56px; height: 58px; background: var(--edge) repeat-x bottom left / 190px 57px; image-rendering: pixelated; }

/* section rhythm */
.curtain > section { padding: clamp(70px, 10vw, 130px) 0 0; }
.curtain > section:last-child { padding-bottom: clamp(80px, 10vw, 140px); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }
.sec-title { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(54px, 8vw, 116px); line-height: .86; color: var(--ink); }
.sec-title.center { text-align: center; margin-bottom: 40px; }
.px-label { font-family: var(--pixel); font-size: 15px; text-transform: lowercase; color: var(--tomato); text-align: center; letter-spacing: .02em; }

/* generic reveal */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease), transform 800ms var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal].in { opacity: 1; transform: none; }
[data-split-reveal][data-reveal] { opacity: 1; transform: none; }

/* intro */
.s-intro { text-align: center; }
.intro-text { font-size: clamp(26px, 3.4vw, 46px); font-weight: 700; line-height: 1.18; letter-spacing: -0.01em; max-width: 24ch; margin: 18px auto 26px; color: var(--ink); }
.iw { opacity: .16; transition: opacity 300ms ease; }
.iw.lit { opacity: 1; }
.iw.icon .px { width: 1.05em; height: auto; vertical-align: -0.12em; }
.intro-cta { display: flex; justify-content: center; }
.cast { position: relative; margin: 56px auto 0; }
.cast-frame { --grow: 0; position: relative; overflow: hidden; height: clamp(320px, 46vw, 560px); border-radius: calc(48px - 30px * var(--grow)); border: 3px solid var(--ink); transform: scale(calc(.78 + .22 * var(--grow))); transform-origin: 50% 0; transition: transform 80ms linear; box-shadow: 0 8px 0 var(--ink); }
.cast-sky { position: absolute; inset: 0; background: linear-gradient(180deg, #8FD0F0, #D7F0FA); }
.cast-sky::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: repeating-linear-gradient(90deg, #79C36A 0 24px, #6BB45D 24px 48px); border-top: 4px solid var(--ink); }
.cast-row { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-end; padding: 0 4%; }
.cast-row img { height: 92%; width: auto; max-width: 30%; object-fit: cover; object-position: top; border-radius: 16px 16px 0 0; border: 3px solid var(--ink); border-bottom: 0; margin: 0 -1.5%; position: relative; z-index: calc(10 - var(--i)); transform: translateY(calc((1 - var(--grow, 0)) * 40px)); }
.cast-frame .cast-row img:nth-child(odd) { height: 84%; }
.cast-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.cast-star { width: clamp(120px, 16vw, 200px); animation: bob 3.2s ease-in-out infinite; }
.tag { position: absolute; font-family: var(--pixel); font-size: clamp(12px, 1.2vw, 16px); background: var(--fog); color: var(--ink); border: 2px solid var(--ink); padding: 6px 10px; border-radius: 8px; box-shadow: 0 3px 0 var(--ink); z-index: 3; }
.tag-a { left: 4%; top: 10%; transform: rotate(-8deg); }
.tag-b { right: 4%; top: 30%; transform: rotate(7deg); background: var(--gold); }

/* trending */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.tcard { display: grid; grid-template-columns: 120px 1fr; gap: 14px; text-decoration: none; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; padding: 12px; box-shadow: 0 4px 0 var(--ink); transition: transform 200ms var(--ease), box-shadow 200ms var(--ease); }
.tcard:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 8px 0 var(--ink); color: var(--ink); }
.tcard-img { position: relative; aspect-ratio: 4/5; border-radius: 12px; overflow: hidden; background: var(--sky-2); display: grid; place-items: center; }
.tcard-img img { width: 100%; height: 100%; object-fit: cover; }
.rank { position: absolute; left: 6px; top: 6px; font-family: var(--pixel); font-size: 12px; background: var(--gold); border: 2px solid var(--ink); border-radius: 6px; padding: 1px 6px; }
.niche { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 800; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 1px 8px; }
.tname { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 34px; line-height: .9; }
.view { font-size: 12px; font-weight: 800; border: 2px solid var(--ink); border-radius: 8px; padding: 3px 7px; }
.tmeta { font-size: 14px; color: var(--ink-2); margin: 6px 0 10px; }
.tmeta b { color: var(--tomato); }
.tstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }
.tstats div { background: var(--fog); border-radius: 10px; padding: 6px 8px; }
.tstats dt { font-size: 11px; color: var(--ink-3); font-weight: 700; }
.tstats dd { margin: 0; font-weight: 800; font-size: 14px; }
.tcard-empty .tcard-img { background: var(--fog); }

/* platform: sticky stacking cards */
.pstack { position: relative; }
.pcard {
  --tilt: 0deg; --under: 0;
  position: sticky; top: calc(96px + var(--i) * 22px);
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: stretch;
  min-height: min(470px, 72vh); margin-bottom: 36px; padding: clamp(20px, 3vw, 36px);
  border: 3px solid var(--ink); border-radius: 26px; box-shadow: 0 8px 0 var(--ink);
  transform: rotate(var(--tilt)) scale(calc(1 - var(--under) * .05)); transform-origin: 50% 0;
  filter: brightness(calc(1 - var(--under) * .12));
}
.pcard:last-child { margin-bottom: 0; }
.pcard h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(40px, 5vw, 72px); line-height: .9; margin-bottom: 12px; }
.pcard p { font-size: 17px; max-width: 42ch; font-weight: 500; }
.pcard ol { list-style: none; padding: 0; margin: 22px 0 0; max-width: 360px; }
.pcard li { display: flex; gap: 14px; padding: 9px 0; border-top: 2px solid rgba(58, 31, 20, .25); font-weight: 700; }
.pcard li span { font-family: var(--pixel); font-size: 12px; padding-top: 3px; }
.pcard-art { display: grid; place-items: center; background: rgba(255, 255, 255, .55); border: 3px solid var(--ink); border-radius: 18px; }
.pcard-art .px { width: min(60%, 180px); height: auto; animation: bob 3.4s ease-in-out infinite; }
.c-sky { background: var(--sky); } .c-gold { background: var(--gold); } .c-grass { background: var(--grass); } .c-tomato { background: var(--tomato); } .c-lilac { background: var(--lilac); }
@media (max-width: 760px) { .pcard { grid-template-columns: 1fr; } .pcard-art { min-height: 160px; } }

/* niche: blob + marquee */
.blob { position: relative; width: min(760px, 88vw); height: clamp(260px, 36vw, 420px); margin: 0 auto 36px; border: 3px solid var(--ink); border-radius: 46% 54% 50% 50% / 58% 52% 48% 42%; overflow: hidden; box-shadow: 0 8px 0 var(--ink); }
.blob-sky { position: absolute; inset: 0; background: linear-gradient(180deg, #7CC6EE, #D3EEF9); }
.blob-star { position: absolute; left: 50%; top: 50%; width: clamp(140px, 20vw, 230px); transform: translate(-50%, -50%); animation: spinbob 6s ease-in-out infinite; }
@keyframes spinbob { 0%, 100% { transform: translate(-50%, -50%) rotate(-6deg); } 50% { transform: translate(-50%, -58%) rotate(6deg); } }
.bstk { position: absolute; }
.bstk-a { left: 16%; top: 26%; transform: rotate(-10deg); }
.bstk-b { right: 18%; top: 20%; }
.marquee { display: grid; gap: 10px; overflow: hidden; padding: 6px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mrow { overflow: hidden; }
.mtrack { display: flex; gap: 10px; width: max-content; animation: marquee 34s linear infinite; }
.mrow.rev .mtrack { animation-direction: reverse; animation-duration: 40s; }
@keyframes marquee { to { transform: translateX(-50%); } }
.chip-n { font-weight: 800; font-size: 16px; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 999px; box-shadow: 0 3px 0 var(--ink); white-space: nowrap; }

/* loop + stats */
.loop { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lcard { position: relative; border: 3px solid var(--ink); border-radius: 22px; padding: 22px; text-align: center; box-shadow: 0 6px 0 var(--ink); display: grid; justify-items: center; gap: 8px; min-height: 300px; align-content: center; }
.lcard[data-reveal] { transform: translateY(60px) rotate(calc((var(--i) - 1) * 4deg)); }
.lcard[data-reveal].in { transform: none; }
.lnum { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-family: var(--pixel); font-size: 13px; }
.lcard h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 46px; line-height: .9; }
.lcard p { font-weight: 600; max-width: 26ch; margin: 0; }
.lcard .px { width: 96px; height: auto; transition: transform 300ms var(--ease); }
.lcard:hover .px { transform: rotate(-8deg) scale(1.08); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.stat { border: 3px solid var(--ink); border-radius: 22px; padding: 22px; text-align: center; box-shadow: 0 6px 0 var(--ink); display: grid; gap: 4px; }
.stat b { font-family: var(--display); font-weight: 900; font-size: clamp(72px, 9vw, 120px); line-height: .85; }
.stat > span { font-weight: 700; }
@media (max-width: 760px) { .loop, .stats { grid-template-columns: 1fr; } }

/* live feed: chat bubbles */
.bubbles { display: grid; gap: 22px; max-width: 860px; margin: 0 auto; }
.bubble-row { display: grid; gap: 8px; max-width: 70%; }
.bubble-row.left { justify-self: start; }
.bubble-row.right { justify-self: end; justify-items: end; }
.bubble-row.left[data-reveal] { transform: translateX(-60px); }
.bubble-row.right[data-reveal] { transform: translateX(60px); }
.bubble-row[data-reveal].in { transform: none; }
.bubble { display: block; text-decoration: none; color: var(--ink); font-size: clamp(18px, 2vw, 24px); font-weight: 700; line-height: 1.25; padding: 16px 20px; border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 5px 0 var(--ink); }
.bubble-row.left .bubble { border-bottom-left-radius: 6px; }
.bubble-row.right .bubble { border-bottom-right-radius: 6px; }
.bubble:hover { color: var(--ink); transform: translateY(-2px); }
.who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.who img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ink); }
@media (max-width: 640px) { .bubble-row { max-width: 92%; } }

/* closing panel */
.cta-panel { --grow: 0; position: relative; overflow: hidden; border: 3px solid var(--ink); border-radius: 32px; box-shadow: 0 8px 0 var(--ink); min-height: clamp(420px, 52vw, 620px); display: grid; place-content: center; justify-items: center; text-align: center; gap: 18px; padding: 40px 20px; transform: scale(calc(.86 + .14 * var(--grow))); transform-origin: 50% 100%; }
.cta-panel .sky { z-index: 0; }
.cta-panel > *:not(.sky) { position: relative; z-index: 1; }
.cta-star { width: clamp(90px, 11vw, 140px); animation: bob 3.2s ease-in-out infinite; }
.cta-title { display: grid; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(54px, 9vw, 132px); line-height: .86; color: var(--paper); -webkit-text-stroke: clamp(2px, .3vw, 4px) var(--ink); paint-order: stroke fill; text-shadow: 0 .05em 0 var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .ch, .stk, .hero-sub, .hero-cta, [data-reveal] { transition: none !important; transform: none !important; opacity: 1 !important; }
  .cloud, .mtrack, .cast-star, .blob-star, .cta-star, .foot-star, .pcard-art .px, .stk-c { animation: none !important; }
  .iw { opacity: 1; }
}
@media (max-width: 640px) {
  .stk-a, .stk-b { display: none; }
  .stk-c { right: -0.15em; top: -0.62em; width: .42em; }
  .hero-inner { padding-top: 70px; }
  .tag-b { top: auto; bottom: 8%; }
}

/* ================= feel: transitions, idle motion ================= */
html { scroll-behavior: smooth; }

/* page transitions */
#main.page-out { animation: page-out 190ms var(--ease) both; pointer-events: none; }
@keyframes page-out { to { opacity: 0; transform: translateY(-10px) scale(.992); filter: blur(3px); } }
#main.page-in > * > *:not([data-reveal]) { animation: page-in 620ms var(--ease) both; animation-delay: calc(var(--enter-i, 0) * 55ms); }
@keyframes page-in { from { opacity: 0; transform: translateY(22px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

/* thin gold bar along the top while a page loads */
.route-bar { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 200; pointer-events: none;
  background: linear-gradient(90deg, var(--gold), #FFD24A, var(--gold)); transform-origin: 0 50%; transform: scaleX(0); opacity: 0; }
.route-bar.go { opacity: 1; animation: route-go 1.6s cubic-bezier(.1,.7,.2,1) forwards; }
.route-bar.done { transform: scaleX(1); animation: route-done 420ms ease forwards; }
@keyframes route-go { from { transform: scaleX(0); } to { transform: scaleX(.85); } }
@keyframes route-done { 0% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }

/* loading dots (pages + portrait) */
.loading { min-height: 50vh; display: grid; place-items: center; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); border: 2px solid var(--ink); animation: dot 900ms ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 120ms; }
.dots i:nth-child(3) { animation-delay: 240ms; }
@keyframes dot { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-8px); } }

/* buttons: squish on press, little wiggle on hover */
.btn, .chip, .pill, .tile { -webkit-tap-highlight-color: transparent; }
.btn:active:not([disabled]), .chip:active, .pill:active { transform: scale(.95); transition-duration: 60ms; }
.btn-primary:hover:not([disabled]) { animation: nudge 520ms var(--ease); }
.pill-gold:hover { animation: nudge 520ms var(--ease); }
.chip { transition: transform 160ms var(--ease), background-color 160ms, border-color 160ms; }
.chip:hover { transform: translateY(-2px) rotate(-1.5deg); }
@keyframes nudge { 0% { rotate: 0deg; } 25% { rotate: -2.5deg; } 55% { rotate: 2deg; } 80% { rotate: -.8deg; } 100% { rotate: 0deg; } }

/* idle movement */
.brand img { animation: brand-wobble 5s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes brand-wobble { 0%, 84%, 100% { rotate: 0deg; } 88% { rotate: -14deg; } 92% { rotate: 10deg; } 96% { rotate: -5deg; } }
.pill-gold { animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,196,0,0); } 50% { box-shadow: 0 0 0 6px rgba(255,196,0,.28); } }
.go .stk-a > *, .go .stk-b > * { display: block; animation: wiggle 3.8s ease-in-out 2s infinite; }
.go .stk-b > * { animation-duration: 4.4s; animation-delay: 2.6s; }
@keyframes wiggle { 0%, 100% { transform: rotate(-6deg) translateY(0); } 50% { transform: rotate(7deg) translateY(-5px); } }
.badge-live::before { animation: live 1.6s ease-in-out infinite; }
@keyframes live { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,79,163,.55); } 60% { box-shadow: 0 0 0 6px rgba(255,79,163,0); } }
.stat:hover { transform: translateY(-6px) rotate(-1deg); }
.stats .stat.in:nth-child(1) b { animation: float 4.2s ease-in-out infinite; }
.stats .stat.in:nth-child(2) b { animation: float 4.8s ease-in-out .5s infinite; }
.stats .stat.in:nth-child(3) b { animation: float 5.2s ease-in-out 1s infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.comp { transition: transform 260ms var(--ease), box-shadow 260ms var(--ease), border-color 160ms; }
a.comp:hover { transform: translateY(-6px) rotate(-.6deg); }
a.comp:hover .comp-photo img { transform: scale(1.04); }
.comp-photo img { transition: transform 600ms var(--ease); }
.tile:hover span { display: inline-block; animation: nudge 520ms var(--ease); }
.wizard-steps li[aria-current] { animation: pop-in 420ms cubic-bezier(.3,1.6,.5,1); }
@keyframes pop-in { from { transform: scale(.85); } to { transform: scale(1); } }
.toast { animation: toast-in 380ms cubic-bezier(.3,1.5,.5,1) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.modal { animation: modal-in 320ms cubic-bezier(.3,1.4,.5,1) both; }
.modal-backdrop { animation: fade-in 200ms ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } }

/* preview portrait on the launch page */
.persona-wrap { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 720px); gap: 22px; align-items: start; }
.portrait-slot { position: sticky; top: 96px; }
.portrait { margin: 0; display: grid; gap: 10px; }
.portrait-frame { aspect-ratio: 1; border-radius: var(--r-card); border: 2px solid var(--ink); box-shadow: 0 5px 0 var(--ink); overflow: hidden; background: var(--paper); display: grid; place-items: center; rotate: -1.5deg; transition: rotate 400ms var(--ease); }
.portrait:hover .portrait-frame { rotate: 1deg; }
.portrait.is-ready .portrait-frame { animation: portrait-pop 600ms cubic-bezier(.3,1.5,.5,1) both, bob 5s ease-in-out .8s infinite; }
@keyframes portrait-pop { from { transform: scale(.88); opacity: .3; } to { transform: scale(1); opacity: 1; } }
.portrait-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait-empty, .portrait-loading { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 20px; font-weight: 600; color: var(--ink-3); font-size: 14px; }
.portrait-loading { width: 100%; height: 100%; align-content: center; background: linear-gradient(100deg, #f3ead9 30%, #fbf5ea 50%, #f3ead9 70%); background-size: 300% 100%; animation: shimmer 1.4s infinite linear; color: var(--ink); }
.sparkle { font-size: 34px; color: var(--gold); -webkit-text-stroke: 1px var(--ink); animation: wiggle 3s ease-in-out infinite; }
.portrait figcaption { gap: 8px; }
@media (max-width: 760px) {
  .persona-wrap { grid-template-columns: 1fr; }
  .portrait-slot { position: static; max-width: 280px; margin: 0 auto; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #main.page-out, #main.page-in > * > *, .route-bar.go, .brand img, .pill-gold, .go .stk-a > *, .go .stk-b > *, .badge-live::before,
  .stats .stat b, .btn-primary:hover, .pill-gold:hover, .tile:hover span, .wizard-steps li, .toast, .modal, .modal-backdrop,
  .portrait-frame, .sparkle, .dots i { animation: none !important; }
  .sr { opacity: 1 !important; translate: none !important; scale: none !important; transition: none !important; }
  .chip:hover, a.comp:hover, .stat:hover { transform: none; }
}
@media (max-width: 480px) {
  .pillnav { max-width: calc(100vw - 16px); gap: 6px; }
  .brand-name { display: none; }
  .pill { padding: 7px 9px; font-size: 12.5px; }
}

/* scroll-in animations: slide in from the direction you are scrolling */
.sr { --sr-d: calc(var(--sr-i, 0) * 70ms); opacity: 0; translate: 0 48px; scale: .97;
  transition: opacity 650ms var(--ease) var(--sr-d), translate 800ms var(--ease) var(--sr-d), scale 800ms var(--ease) var(--sr-d), transform 260ms var(--ease), box-shadow 260ms var(--ease), border-color 160ms; }
html[data-scroll-dir='up'] .sr:not(.sr-in) { translate: 0 -48px; }
.sr.sr-in { opacity: 1; translate: 0 0; scale: 1; }
html[data-scroll-dir='up'] [data-reveal]:not(.in):not(.lcard):not(.bubble-row) { transform: translateY(-26px); }
html[data-scroll-dir='up'] .lcard[data-reveal]:not(.in) { transform: translateY(-60px) rotate(calc((var(--i) - 1) * -4deg)); }

/* momentum scroll handles easing itself */
html.momentum { scroll-behavior: auto; }

/* pixel arrow cursor */
@media (any-pointer: fine) {
  html, body, a, button, .btn, .pill, .chip, .tile, .comp, summary, label, [role='tab'], [data-link], select, .switch, .toggle { cursor: url('/cursor-arrow.png') 1 1, auto; }
  input, textarea, [contenteditable] { cursor: text; }
  [disabled], .btn[disabled] { cursor: not-allowed; }
}


/* ---------- treasury card on a Star's page ---------- */
.treasury {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px 34px; align-items: start;
  margin: 34px 0 10px; padding: clamp(22px, 3vw, 36px);
  background: var(--gold); color: var(--ink); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 0 7px 0 var(--ink);
}
.tr-label { display: flex; align-items: center; gap: 10px; }
.tr-label h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; margin: 0; }
.tr-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px rgba(58,31,20,.15); animation: live 1.8s ease-in-out infinite; }
.tr-amount { font-family: var(--display); font-weight: 900; font-size: clamp(72px, 10vw, 132px); line-height: .86; margin: 10px 0 6px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.tr-status { font-size: 19px; margin: 6px 0 4px; }
.tr-when { font-size: 14px; color: rgba(58,31,20,.75); margin: 0 0 14px; }
.tr-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.tr-stats div { background: rgba(255,247,234,.72); border: 2px solid var(--ink); border-radius: 16px; padding: 12px 14px; }
.tr-stats dt { font-size: 13px; font-weight: 700; color: rgba(58,31,20,.75); }
.tr-stats dd { margin: 4px 0 0; font-family: var(--display); font-weight: 900; font-size: 32px; line-height: 1; }
.tr-explain { grid-column: 1 / -1; background: var(--fog); border: 2px solid var(--ink); border-radius: 18px; overflow: hidden; }
.tr-explain summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; font-weight: 800; font-size: 17px; }
.tr-explain summary::-webkit-details-marker { display: none; }
.tr-chev { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font-size: 20px; line-height: 1; transition: transform 300ms var(--ease), background-color 200ms; }
.tr-explain[open] .tr-chev { transform: rotate(45deg); background: var(--gold); }
.tr-explain summary:hover .tr-chev { background: var(--gold); }
.tr-body { padding: 0 18px 18px; animation: fade-in 300ms ease; }
.tr-body > p { max-width: 70ch; }
.tr-flow { list-style: none; counter-reset: tr; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tr-flow li { counter-increment: tr; position: relative; background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 14px 14px 14px 52px; display: grid; gap: 4px; }
.tr-flow li::before { content: counter(tr); position: absolute; left: 12px; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 900; font-size: 14px; }
.tr-flow li span { font-size: 14px; color: var(--ink-2); }
@media (max-width: 820px) {
  .treasury { grid-template-columns: 1fr; }
  .tr-flow { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .tr-dot, .tr-body { animation: none; } }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); cursor: pointer; transition: border-color 160ms, background-color 160ms; }
.choice:has(input:checked) { border-color: var(--ink); background: #FFF3CF; }
.choice input { margin-top: 4px; accent-color: var(--ink); }
.choice > span { display: grid; gap: 2px; }
