/* Passmantle design system — cozy flat vector ----------------------------------------
   Warm paper palettes, rounded type, flat fills, and chunky offset "sticker" shadows instead of
   glows. App tokens live on :root; any element with .pass-theme re-maps them to the creator's
   palette, so every component inside a pass adopts its look while keeping one structure. */

:root {
  color-scheme: light;
  --bg: #fcfaf1;
  --bg-2: #f7f4e8;
  --surface: #ffffff;
  --surface-2: #f4f5fb;
  --surface-3: #e9eaf5;
  --line: #e0e2ee;
  --line-2: #cacdde;
  --edge: #d5d8e8;
  --text: #202343;
  --muted: #575b77;
  --faint: #6a6e88;
  --primary: #d44214;
  --primary-edge: #a8260a;
  --on-primary: #ffffff;
  --accent: #008466;
  --accent-edge: #03654e;
  --on-accent: #ffffff;
  --honey: #fec92f;
  --honey-edge: #dd9314;
  --on-honey: #202343;
  --gold: #9e6404;
  --good: #02853c;
  --warn: #ad5f00;
  --bad: #d02b31;
  --r-common: #8893a5;
  --r-rare: #0392c4;
  --r-epic: #9615b5;
  --r-legendary: #e79703;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 4px 0 var(--edge);
  --font-display: 'Fredoka', 'Noto Color Emoji', system-ui, sans-serif;
  --font-body: 'Nunito', 'Noto Color Emoji', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tabbar-h: 72px;
  --viz-1: #2a78d6;
  --viz-2: #eb6834;
  --pf: var(--font-display);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #101223;
    --bg-2: #15172c;
    --surface: #1d1f36;
    --surface-2: #262942;
    --surface-3: #32364f;
    --line: #30334c;
    --line-2: #444863;
    --edge: #050613;
    --text: #f6f3eb;
    --muted: #b9bcd1;
    --faint: #9397ae;
    --primary: #fa7959;
    --primary-edge: #c04732;
    --on-primary: #121428;
    --accent: #5dd0a9;
    --accent-edge: #269573;
    --on-accent: #121428;
    --honey-edge: #d38e22;
    --on-honey: #121428;
    --gold: #fbc959;
    --good: #67d283;
    --warn: #f5b75b;
    --bad: #fd736d;
    --r-common: #a0acbe;
    --r-rare: #55c6f4;
    --r-epic: #b655d2;
    --r-legendary: #fbc044;
    --viz-1: #3987e5;
    --viz-2: #d95926;
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #101223;
  --bg-2: #15172c;
  --surface: #1d1f36;
  --surface-2: #262942;
  --surface-3: #32364f;
  --line: #30334c;
  --line-2: #444863;
  --edge: #050613;
  --text: #f6f3eb;
  --muted: #b9bcd1;
  --faint: #9397ae;
  --primary: #fa7959;
  --primary-edge: #c04732;
  --on-primary: #121428;
  --accent: #5dd0a9;
  --accent-edge: #269573;
  --on-accent: #121428;
  --honey-edge: #d38e22;
  --on-honey: #121428;
  --gold: #fbc959;
  --good: #67d283;
  --warn: #f5b75b;
  --bad: #fd736d;
  --r-common: #a0acbe;
  --r-rare: #55c6f4;
  --r-epic: #b655d2;
  --r-legendary: #fbc044;
  --viz-1: #3987e5;
  --viz-2: #d95926;
}

/* Creator palettes --------------------------------------------------------------------- */
.pass-theme {
  --bg: var(--pb);
  --surface: var(--ps);
  --surface-2: color-mix(in srgb, var(--ps) 90%, var(--pt));
  --surface-3: color-mix(in srgb, var(--ps) 80%, var(--pt));
  --line: color-mix(in srgb, var(--pt) 13%, var(--ps));
  --line-2: color-mix(in srgb, var(--pt) 24%, var(--ps));
  --edge: color-mix(in srgb, var(--pt) 16%, var(--pb));
  --text: var(--pt);
  --muted: color-mix(in srgb, var(--pt) 72%, var(--pb));
  --faint: color-mix(in srgb, var(--pt) 55%, var(--pb));
  --primary: var(--p);
  --primary-edge: color-mix(in oklch, var(--p) 70%, #000);
  --on-primary: var(--on-p, #fffdf9);
  --accent: var(--a);
  --accent-edge: color-mix(in oklch, var(--a) 70%, #000);
  --on-accent: var(--on-a, #202343);
  color: var(--text);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 0.4em; }
p { margin: 0 0 0.6em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.center { text-align: center; justify-content: center; }
.strong { font-weight: 800; }
.good { color: var(--good); font-weight: 700; }
.lead { font-size: 1.08rem; color: var(--muted); }
code { font-family: ui-monospace, monospace; font-size: 0.85em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }

.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.center { justify-content: center; }
.gap-sm { gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.center { align-items: center; }

/* Shell ---------------------------------------------------------------------------- */
.shell { min-height: 100vh; }
#sidenav { display: none; }
#topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  /* Frosted paper: the background theme shows through softly as content scrolls under it. */
  background: color-mix(in srgb, var(--bg) 84%, transparent); border-bottom: 2px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.top-actions { display: flex; align-items: center; gap: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.06em; font-size: 1.12rem; }
.brand b { color: var(--primary); font-weight: 700; }
.brand-mark { width: 34px; height: 34px; flex: none; background: url('/favicon.svg') center / contain no-repeat; }
@media (max-width: 480px) {
  .brand-top { flex: none; }
  .brand-top .brand-text { display: none; }
  .top-actions { gap: 6px; }
}
#view { padding: 18px 16px calc(var(--tabbar-h) + 28px); max-width: 1180px; margin: 0 auto; outline: none; }
.page { animation: page-in 0.32s cubic-bezier(0.2, 1.2, 0.4, 1); }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page.narrow { max-width: 760px; margin: 0 auto; }
.page-title { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 6px; }
.section-title { font-size: 1.2rem; margin: 26px 0 12px; }

#tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 6px 8px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: var(--surface); border-top: 2px solid var(--line);
}
.tab-link { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 0.72rem; font-weight: 700; color: var(--muted); padding: 6px 0; border-radius: 14px; }
.tab-link .nav-icon { font-size: 1.35rem; transition: transform 0.25s cubic-bezier(0.2, 1.6, 0.4, 1); }
.tab-link.active { color: var(--text); }
.tab-link.active .nav-icon { transform: translateY(-2px) scale(1.12); }
.tab-link.nav-center .nav-icon {
  width: 54px; height: 54px; margin-top: -28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--primary); border: 4px solid var(--bg); box-shadow: 0 4px 0 var(--primary-edge);
}

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 240px 1fr; }
  #sidenav {
    display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; padding: 22px 14px;
    border-right: 2px solid var(--line); background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  }
  .side-links { display: flex; flex-direction: column; gap: 4px; }
  .side-link { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; color: var(--muted); font-weight: 700; }
  .side-link:hover { background: var(--surface); color: var(--text); }
  .side-link.active { background: var(--surface); color: var(--text); box-shadow: 0 3px 0 var(--edge); border: 2px solid var(--line); padding: 8px 12px; }
  .side-link.small { font-size: 0.9rem; font-weight: 600; }
  .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
  #tabbar { display: none; }
  .brand-top { visibility: hidden; }
  #view { padding: 26px 32px 60px; }
  .main-col { min-width: 0; }
}

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--surface); cursor: pointer; position: relative; font-size: 1rem; box-shadow: 0 3px 0 var(--edge);
}
.icon-btn:hover { border-color: var(--line-2); }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.icon-btn.danger:hover { border-color: var(--bad); }
.icon-btn.more { width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); box-shadow: none; }
.dot-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--primary); color: var(--on-primary); font-size: 0.68rem; font-weight: 800; display: grid; place-items: center;
  border: 2px solid var(--bg);
}
.dot-count.inline { position: static; display: inline-grid; margin-left: 6px; border: 0; }
.dot-count.inline.bad { background: var(--bad); color: #fff; }
.top-avatar { display: inline-flex; }
.dev-switch {
  position: fixed; left: 12px; bottom: calc(var(--tabbar-h) + 14px); z-index: 50; border: 2px dashed var(--line-2);
  background: var(--surface); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 0.8rem; font-weight: 700; cursor: pointer;
}
@media (min-width: 960px) { .dev-switch { bottom: 16px; left: auto; right: 16px; } }
.dev-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.dev-account { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2); cursor: pointer; }
.dev-account:hover { border-color: var(--primary); }
.dev-account > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.dev-account small { color: var(--muted); }

/* Buttons & chips: flat fills with a chunky bottom edge -------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 14px;
  border: 2px solid var(--line-2); background: var(--surface); color: var(--text); font: 600 1rem var(--font-display); cursor: pointer;
  box-shadow: 0 4px 0 var(--edge); transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s; white-space: nowrap; text-align: center;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary-edge); box-shadow: 0 4px 0 var(--primary-edge); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 90%, #fff); }
.btn-primary:active { box-shadow: 0 1px 0 var(--primary-edge); }
.btn-glow { background: var(--accent); color: var(--on-accent); border-color: var(--accent-edge); box-shadow: 0 4px 0 var(--accent-edge); }
.btn-glow:hover { background: color-mix(in srgb, var(--accent) 90%, #fff); }
.btn-glow:active { box-shadow: 0 1px 0 var(--accent-edge); }
.btn-premium { background: var(--honey); color: var(--on-honey); border-color: var(--honey-edge); box-shadow: 0 4px 0 var(--honey-edge); }
.btn-premium:active { box-shadow: 0 1px 0 var(--honey-edge); }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-ghost:active { box-shadow: none; transform: translateY(1px); }
.btn-danger { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); color: var(--bad); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 0.88rem; border-radius: 12px; box-shadow: 0 3px 0 var(--edge); }
.btn-sm.btn-primary { box-shadow: 0 3px 0 var(--primary-edge); }
.btn-sm.btn-glow { box-shadow: 0 3px 0 var(--accent-edge); }
.btn-sm.btn-ghost { box-shadow: none; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.1rem; border-radius: 16px; }
.btn-block { width: 100%; }
.link { color: var(--accent-edge); font-weight: 800; background: none; border: 0; padding: 0; cursor: pointer; }
:root[data-theme='dark'] .link { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .link { color: var(--accent); } }
.pass-theme .link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.link.back { display: inline-block; margin-bottom: 12px; }
.inline-link { color: var(--text); font-weight: 800; }
.inline-link:hover { color: var(--primary); }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
  background: var(--surface-2); border: 2px solid var(--line); color: var(--muted); white-space: nowrap;
}
.chip-good { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, var(--line)); background: color-mix(in srgb, var(--good) 10%, var(--surface)); }
.chip-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.chip-bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.chip-gold, .chip-premium { color: var(--on-honey); border-color: var(--honey-edge); background: var(--honey); }
.chip-event { color: var(--text); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.chip-sponsor { color: var(--text); border-style: dashed; }
.chip.cad-daily { color: var(--accent-edge); }
.chip.cad-weekly { color: #7446c9; }
.chip.cad-milestone { color: var(--primary-edge); }
.pass-theme .chip.cad-daily, .pass-theme .chip.cad-weekly, .pass-theme .chip.cad-milestone { color: var(--text); }
.ful-requested, .ful-disputed { color: var(--warn); }
.ful-shipped { color: var(--accent-edge); }
.ful-fulfilled, .ful-resolved { color: var(--good); }
.xp-pill {
  display: inline-flex; padding: 3px 10px; border-radius: 999px; font: 600 0.82rem var(--font-display); white-space: nowrap;
  color: var(--on-honey); background: var(--honey); border: 2px solid var(--honey-edge);
}
.price-chip {
  position: absolute; left: 10px; top: 10px; z-index: 2; padding: 3px 10px; border-radius: 999px; font: 600 0.74rem var(--font-display);
  letter-spacing: 0.04em; background: var(--surface); color: var(--text); border: 2px solid var(--line-2);
}
.pass-hero .price-chip, .pass-hero.mini .price-chip { position: static; }
.price-chip.free { color: var(--good); }
.price-chip.premium { color: var(--on-honey); background: var(--honey); border-color: var(--honey-edge); }
.price-chip.paid { color: var(--on-primary); background: var(--primary); border-color: var(--primary-edge); }
.featured-chip { position: absolute; right: 10px; top: 10px; z-index: 2; padding: 3px 9px; border-radius: 999px; font: 600 0.72rem var(--font-display);
  color: var(--on-honey); background: var(--honey); border: 2px solid var(--honey-edge); }
.title-tag { font-family: var(--font-display); font-weight: 600; font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.title-tag.big { font-size: 0.9rem; }
.verified {
  display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 4px; border-radius: 50%; font-size: 0.62rem; font-weight: 900;
  color: var(--on-accent); background: var(--accent); vertical-align: middle;
}

/* Forms ------------------------------------------------------------------------------ */
input, select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--surface);
  transition: border-color 0.15s;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
input[type='checkbox'] { width: 20px; height: 20px; min-height: 0; accent-color: var(--primary); flex: none; }
input[type='color'] { padding: 3px; height: 44px; cursor: pointer; }
input[type='file'] { min-height: 0; padding: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 0.85rem; font-weight: 800; color: var(--muted); }
.field-hint { font-size: 0.8rem; color: var(--faint); }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.form-grid.three { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.92rem; }
.check-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 2px solid var(--line); }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.segmented { display: inline-flex; flex-wrap: wrap; padding: 4px; gap: 4px; border-radius: 14px; background: var(--surface-2); border: 2px solid var(--line); }
.segmented button { border: 0; background: transparent; padding: 7px 13px; border-radius: 10px; font-weight: 700; font-size: 0.88rem; cursor: pointer; color: var(--muted); }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 0 var(--edge); }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px; margin: 20px 0 6px; scrollbar-width: none; border-bottom: 2px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font: 600 0.95rem var(--font-display); color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab.active { color: var(--on-primary); background: var(--primary); }
.subnav { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0 18px; padding-bottom: 4px; }
.subnav a { padding: 7px 13px; border-radius: 999px; color: var(--muted); font-weight: 700; white-space: nowrap; border: 2px solid var(--line); background: var(--surface); }
.subnav a.active { color: var(--on-primary); border-color: var(--primary-edge); background: var(--primary); }

/* Cards & lists ---------------------------------------------------------------------- */
.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
section.card { margin-bottom: 16px; }
.banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; padding: 12px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 2px solid color-mix(in srgb, var(--accent) 35%, var(--line)); margin: 12px 0; font-weight: 600;
}
.banner-warn { background: color-mix(in srgb, var(--honey) 22%, var(--surface)); border-color: color-mix(in srgb, var(--honey-edge) 55%, var(--line)); }
.banner-glow { font-weight: 800; background: var(--honey); color: var(--on-honey); border-color: var(--honey-edge); box-shadow: 0 4px 0 var(--honey-edge); }
.callout { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 2px solid var(--line); margin: 6px 0; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); }
.list-row > span:nth-child(2) { flex: 1; min-width: 160px; }
.empty { text-align: center; padding: 40px 16px; border-radius: var(--radius); background: var(--surface); border: 2px dashed var(--line-2); }
.empty-icon { font-size: 2.4rem; width: 76px; height: 76px; display: grid; place-items: center; margin: 0 auto 10px; border-radius: 50%; background: var(--surface-2); }
.skeleton-wrap { display: flex; flex-direction: column; gap: 12px; padding: 12px 0; }
.skeleton { height: 18px; border-radius: 9px; background: var(--surface-3); animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.5; } }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 2px solid var(--line); vertical-align: top; }
.table th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.muted td { opacity: 0.55; }
.card .table, .viz-card .table { display: block; overflow-x: auto; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); }
.stat-label { font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.stat-value { font: 600 1.6rem var(--font-display); }
.stat-sub { font-size: 0.78rem; color: var(--faint); }
.terms { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--honey); margin: 6px 0; }
.terms p { margin: 4px 0 0; font-size: 0.92rem; }

/* Avatars ---------------------------------------------------------------------------- */
.avatar {
  --size: 40px; width: var(--size); height: var(--size); flex: none; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: calc(var(--size) * 0.54); background: color-mix(in srgb, var(--c, #d44214) 55%, #ffffff);
  box-shadow: 0 0 0 2px var(--surface); position: relative;
}
.avatar.frame-common { box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px var(--r-common); }
.avatar.frame-rare { box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px var(--r-rare); }
.avatar.frame-epic { box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px var(--r-epic), 0 0 0 8px color-mix(in srgb, var(--r-epic) 35%, transparent); }
.avatar.frame-legendary { box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px var(--r-legendary), 0 0 0 9px color-mix(in srgb, var(--r-legendary) 35%, transparent); }
.user-chip { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.user-chip-text { display: flex; flex-direction: column; min-width: 0; }
.user-chip-name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-sub { font-size: 0.78rem; color: var(--muted); }
.badge-mini { margin-left: 4px; font-size: 0.85em; }

/* Covers: flat landscape scenes --------------------------------------------------------- */
.cover { position: relative; overflow: hidden; display: grid; place-items: center; isolation: isolate; background: var(--ps, var(--surface-2)); }
.cover .scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.cover-medallion {
  display: grid; place-items: center; width: 42%; aspect-ratio: 1; max-width: 120px; border-radius: 50%;
  background: var(--ps, var(--surface)); border: 4px solid var(--p, var(--primary));
  box-shadow: 0 5px 0 color-mix(in oklch, var(--p, #d44214) 65%, #000); transition: transform 0.35s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.cover-emoji { font-size: 2.4rem; line-height: 1; font-family: 'Noto Color Emoji', 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif; }
.cover-card { aspect-ratio: 16 / 10; }
.cover-card .cover-medallion { width: 30%; max-width: 92px; }
.cover-sm { width: 64px; height: 64px; border-radius: 16px; flex: none; border: 2px solid var(--line); }
.cover-sm .cover-medallion { width: 62%; border-width: 3px; box-shadow: 0 3px 0 color-mix(in oklch, var(--p, #d44214) 65%, #000); }
.cover-sm .cover-emoji { font-size: 1.3rem; }
.cover-hero { aspect-ratio: 1; border-radius: var(--radius-lg); border: 3px solid var(--line-2); box-shadow: 0 6px 0 var(--edge); }
.cover-hero .cover-medallion { width: 46%; max-width: 150px; border-width: 5px; animation: bob 4s ease-in-out infinite; }
.cover-hero .cover-emoji { font-size: clamp(3rem, 9vw, 4.4rem); }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-3deg); } }

.pass-card {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 2px solid var(--line);
  box-shadow: var(--shadow); transition: transform 0.2s cubic-bezier(0.2, 1.4, 0.4, 1), box-shadow 0.2s; min-width: 0;
}
.pass-card:hover { transform: translateY(-4px) rotate(-0.4deg); box-shadow: 0 8px 0 var(--edge); }
.pass-card:hover .cover-medallion { transform: scale(1.08) rotate(-6deg); }
.pass-card-cover { position: relative; border-bottom: 2px solid var(--line); }
.pass-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pass-card-title { font-size: 1.1rem; margin: 0; }
.pass-card-tagline { font-size: 0.86rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pass-card-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.pass-card-creator { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.pass-card-creator span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pass-card-stats { display: inline-flex; gap: 8px; white-space: nowrap; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.shelf { margin: 28px 0; }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.shelf-head h2 { font-size: 1.25rem; margin: 0; }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 250px); gap: 16px; overflow-x: auto; padding: 4px 2px 18px; scroll-snap-type: x mandatory; }
.shelf-row > * { scroll-snap-align: start; }
.shelf-row.events { grid-auto-columns: minmax(290px, 420px); }
.shelf-row.creators { grid-auto-columns: 180px; }
.creator-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 18px 12px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); }
.creator-card:hover { border-color: var(--line-2); }
.creator-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); font-weight: 700; white-space: nowrap; font-size: 0.9rem; box-shadow: 0 3px 0 var(--edge); }
.cat-chip:hover, .cat-chip.active { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.cat-chip small { color: var(--faint); }
.cta-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px; border-radius: var(--radius-lg); margin: 32px 0;
  background: color-mix(in srgb, var(--honey) 28%, var(--surface)); border: 2px solid color-mix(in srgb, var(--honey-edge) 45%, var(--line)); box-shadow: var(--shadow); }
.cta-card h2 { margin: 0 0 4px; }
.cta-card p { margin: 0; max-width: 560px; }

/* Discover hero & events ------------------------------------------------------------------ */
.hero { display: grid; gap: 16px; margin-bottom: 8px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.6fr 1fr; } }
.event-banner, .event-card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 20px;
  border-radius: var(--radius-lg); color: var(--pt, var(--text)); background: var(--pb, var(--surface)); isolation: isolate;
  border: 2px solid color-mix(in srgb, var(--pt, #202343) 14%, var(--pb, #fff)); box-shadow: 0 5px 0 color-mix(in srgb, var(--pt, #202343) 18%, var(--pb, #fff));
}
.event-banner .scene, .event-card .scene { position: absolute; right: 0; bottom: 0; width: 62%; height: 100%; z-index: -1;
  -webkit-mask: linear-gradient(90deg, transparent, #000 45%); mask: linear-gradient(90deg, transparent, #000 45%); }
.event-banner > .btn { grid-column: 1 / -1; justify-self: start; }
.event-banner h2, .event-card h3 { margin: 2px 0 4px; }
.event-banner p, .event-card p { margin: 0 0 6px; }
.event-banner-text, .event-card-body { background: color-mix(in srgb, var(--pb, #fffdf9) 82%, transparent); border-radius: 16px; padding: 4px 8px 6px; }
.event-banner-art, .event-card-art { font-size: 2.6rem; width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%;
  background: var(--ps, var(--surface)); border: 4px solid var(--p, var(--primary)); animation: bob 5s ease-in-out infinite; }
.kicker { font: 600 0.74rem var(--font-display); letter-spacing: 0.12em; color: var(--p, var(--primary)); margin: 0; }
.event-progress { height: 12px; border-radius: 999px; background: color-mix(in srgb, var(--pt, #202343) 12%, var(--pb, #fff)); overflow: hidden; margin: 8px 0; position: relative; }
.event-progress.big { height: 18px; overflow: visible; }
.event-progress-fill { height: 100%; border-radius: inherit; background: var(--p, var(--primary)); transition: width 1s cubic-bezier(0.2, 1, 0.4, 1); }
.goal-tick { position: absolute; top: -5px; width: 14px; height: 28px; margin-left: -7px; border-radius: 7px; background: var(--pb, var(--surface)); border: 3px solid color-mix(in srgb, var(--pt, #202343) 30%, var(--pb, #fff)); }
.goal-tick.reached { background: var(--honey); border-color: var(--honey-edge); }
.hero-featured { display: grid; gap: 10px; }
.hero-pass { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius); color: var(--pt);
  background: var(--pb); border: 2px solid color-mix(in srgb, var(--pt) 14%, var(--pb)); box-shadow: 0 4px 0 color-mix(in srgb, var(--pt) 18%, var(--pb)); transition: transform 0.2s cubic-bezier(0.2, 1.4, 0.4, 1); }
.hero-pass:hover { transform: translateX(4px); }
.hero-pass-emoji { font-size: 1.9rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--ps); border: 3px solid var(--p); }
.hero-pass-text { display: flex; flex-direction: column; }
.hero-pass-text small { opacity: 0.8; }
.grid-events { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.event-hero { position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 22px; align-items: center; padding: 24px; border-radius: var(--radius-lg);
  background: var(--pb); color: var(--pt); border: 2px solid color-mix(in srgb, var(--pt) 14%, var(--pb)); box-shadow: 0 5px 0 color-mix(in srgb, var(--pt) 18%, var(--pb)); }
.event-hero .scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.55; }
.event-hero-text { background: color-mix(in srgb, var(--pb) 86%, transparent); border-radius: 20px; padding: 14px 16px; }
.event-hero .muted, .event-hero .lead { color: color-mix(in srgb, var(--pt) 75%, var(--pb)); }
.event-hero .chip { color: var(--pt); background: var(--ps); }
.event-hero .user-chip-sub { color: color-mix(in srgb, var(--pt) 70%, var(--pb)); }
@media (min-width: 800px) { .event-hero { grid-template-columns: 170px 1fr; } }
.event-hero-art { font-size: 4.8rem; width: 150px; height: 150px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%;
  background: var(--ps); border: 6px solid var(--p); box-shadow: 0 6px 0 color-mix(in oklch, var(--p) 65%, #000); animation: bob 5s ease-in-out infinite; }
.community-goal { margin: 14px 0; }
.milestones { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.milestone { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 16px 10px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); opacity: 0.6; }
.milestone.reached { opacity: 1; border-color: var(--rc, var(--r-rare)); box-shadow: 0 4px 0 color-mix(in srgb, var(--rc, var(--r-rare)) 60%, var(--edge)); }
.milestone-icon { font-size: 2rem; }
.event-columns { display: grid; gap: 20px; }
@media (min-width: 900px) { .event-columns { grid-template-columns: 1fr 1.4fr; } }

/* Event quests & the Season Zero passport ---------------------------------------------- */
.event-quests { margin: 8px 0 10px; }
.quest-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); margin-top: 12px; }
.event-quest { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); }
.event-quest.done { background: color-mix(in srgb, var(--rc) 10%, var(--surface)); border-color: color-mix(in srgb, var(--rc) 60%, var(--line)); }
.event-quest h4 { margin: 0 0 2px; font-size: 1rem; }
.event-quest p { margin: 0 0 6px; }
.eq-badge { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; font-size: 1.7rem;
  background: color-mix(in srgb, var(--rc) 18%, var(--surface)); border: 3px solid var(--rc); }
.event-quest:not(.done) .eq-badge { filter: grayscale(0.7); opacity: 0.75; }
.eq-main { min-width: 0; }
.eq-meter { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 4px 0 6px; }
.eq-meter span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.6s cubic-bezier(0.2, 1, 0.4, 1); }
.event-quest.done .eq-meter span { background: var(--good); }
.eq-count { font-weight: 800; color: var(--muted); }
.passport { margin-top: 12px; padding: 18px; border-radius: var(--radius-lg); border: 2px dashed var(--line-2);
  background: repeating-linear-gradient(0deg, transparent 0 27px, color-mix(in srgb, var(--line) 70%, transparent) 27px 28px), var(--surface);
  display: flex; flex-direction: column; gap: 14px; }
.passport-head { display: flex; align-items: center; gap: 12px; }
.passport-head h3 { margin: 0; }
.passport-head p { margin: 0; }
.passport-seal { font-size: 1.8rem; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; background: var(--primary); border: 3px solid var(--primary-edge); }
.stamp-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.stamp { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 12px; border-radius: 50%; aspect-ratio: 1;
  justify-content: center; text-align: center; border: 3px dashed var(--line-2); color: var(--faint); background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.stamp-icon { font-size: 1.9rem; filter: grayscale(1); opacity: 0.55; }
.stamp-name { font: 600 0.78rem var(--font-display); }
.stamp-empty { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.stamp.stamped { border: 3px solid var(--primary); color: var(--text); background: color-mix(in srgb, var(--primary) 12%, var(--surface)); transform: rotate(-6deg);
  box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 6px color-mix(in srgb, var(--primary) 50%, transparent); }
.stamp.stamped:nth-child(even) { transform: rotate(5deg); }
.stamp.stamped .stamp-icon { filter: none; opacity: 1; }
.stamp-ink { font: 600 0.66rem var(--font-display); letter-spacing: 0.14em; color: var(--primary); border: 2px solid var(--primary); border-radius: 6px; padding: 0 5px; }
.series { margin-bottom: 8px; }
/* Rarity --------------------------------------------------------------------------- */
.r-common { --rc: var(--r-common); }
.r-rare { --rc: var(--r-rare); }
.r-epic { --rc: var(--r-epic); }
.r-legendary { --rc: var(--r-legendary); }

/* XP: a candy-striped fill on a soft track ---------------------------------------------- */
.xp { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.xp-label { display: flex; justify-content: space-between; font: 600 0.9rem var(--font-display); }
.xp-numbers { color: var(--muted); font-variant-numeric: tabular-nums; }
.xp-track { height: 16px; border-radius: 999px; background: var(--surface-3); overflow: hidden; border: 2px solid var(--line-2); }
.xp-sm .xp-track { height: 10px; border-width: 0; }
.xp-sm .xp-label { font-size: 0.78rem; }
.xp-fill {
  height: 100%; border-radius: inherit; transition: width 0.9s cubic-bezier(0.2, 1.1, 0.4, 1);
  background: repeating-linear-gradient(-45deg, var(--primary) 0 10px, color-mix(in srgb, var(--primary) 82%, #fff) 10px 20px);
  background-size: 28px 28px; animation: stripes 1.4s linear infinite;
}
@keyframes stripes { to { background-position: 28px 0; } }

/* Pass page -------------------------------------------------------------------------- */
.pass-page { border-radius: var(--radius-lg); padding: 18px; margin: -4px -4px 0; background: var(--pb); border: 2px solid var(--line); }
@media (max-width: 640px) { .pass-page { margin: -18px -16px 0; border-radius: 0; border: 0; padding: 16px; } }
.pass-theme h1, .pass-theme h2, .pass-theme h3, .pass-theme h4, .pass-theme .btn, .pass-theme .tab, .pass-theme .xp-label { font-family: var(--pf); }
.font-pixel h1, .font-pixel h2, .font-pixel h3 { line-height: 1.45; letter-spacing: 0; }
.font-pixel .pass-title { font-size: clamp(1.1rem, 3.6vw, 1.7rem); }
.font-pixel .btn, .font-pixel .tab, .font-pixel .xp-label { font-family: var(--font-display); }
.pass-hero { display: grid; gap: 22px; align-items: center; }
@media (min-width: 760px) { .pass-hero { grid-template-columns: minmax(220px, 300px) 1fr; } }
.pass-hero-cover { max-width: min(300px, 56vw); width: 100%; margin: 0 auto; }
.pass-hero-text { display: flex; flex-direction: column; gap: 10px; }
.pass-title { font-size: clamp(2rem, 5vw, 3rem); margin: 4px 0 0; }
.pass-tagline { font-size: 1.12rem; color: var(--muted); margin: 0; }
.pass-creator { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pass-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 0.92rem; font-weight: 600; }
.pass-stats strong { color: var(--text); }
.hud {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin: 18px 0 4px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 2px solid var(--line-2); position: sticky; top: 66px; z-index: 5; box-shadow: 0 4px 0 var(--edge);
}
@media (min-width: 640px) { .hud { grid-template-columns: auto 1fr auto; } }
.hud-level { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 70px; height: 70px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); border: 4px solid var(--surface); box-shadow: 0 0 0 3px var(--primary-edge); }
.hud-level small { font: 600 0.58rem var(--font-display); letter-spacing: 0.12em; opacity: 0.9; }
.hud-level strong { font: 600 1.8rem/1 var(--pf); }
.hud-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hud-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hud-claim { grid-column: 1 / -1; animation: wiggle 2.4s ease-in-out infinite; }
@media (min-width: 640px) { .hud-claim { grid-column: auto; } }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-4deg); } 88% { transform: rotate(4deg); } 92% { transform: rotate(-2deg); } }
.pass-panel { padding-top: 6px; }
.premium-offer { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 12px 6px; padding: 14px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--honey) 26%, var(--surface)); border: 2px solid var(--honey-edge); }
.about .facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.facts dt { color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; }
.order-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 2px solid var(--line); }

/* The Battle Pass track: a winding trail of stops ------------------------------------- */
.track { --row: 124px; --node: 70px; --col: 118px; position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr);
  padding: 14px 0 6px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); }
.track-labels { display: grid; grid-template-rows: var(--row) var(--node) var(--row); padding: 0 6px 0 10px; }
.track-label { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font: 600 0.66rem var(--font-display); letter-spacing: 0.16em; color: var(--muted); align-self: center; justify-self: center; }
.track-label.premium { color: var(--honey-edge); }
.track-label.node-label { opacity: 0.6; }
.track-scroll { overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; }
.track-grid { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: var(--col); width: max-content; padding-right: 12px; }
.tier { display: grid; grid-template-rows: var(--row) var(--node); justify-items: center; align-items: center; scroll-snap-align: center; position: relative; z-index: 1; }
.track-grid.has-premium .tier { grid-template-rows: var(--row) var(--node) var(--row); }
.tier-cell { display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; width: 100%; padding: 0 6px; }
.tier-premium { border-top: 2px dashed color-mix(in srgb, var(--honey-edge) 50%, var(--line)); height: 100%; background: color-mix(in srgb, var(--honey) 10%, transparent); }
.track-rail { position: absolute; left: 0; width: calc((var(--tiers) - 0.5) * var(--col)); top: calc(var(--row) + var(--node) / 2 - 6px); height: 12px; border-radius: 999px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 12px, transparent 12px 20px); z-index: 0; }
.track-rail-fill { height: 100%; width: calc(var(--fill) * var(--col)); border-radius: inherit; background: var(--accent); transition: width 1s cubic-bezier(0.2, 1, 0.4, 1); }
.tier-node { width: 54px; height: 54px; display: grid; transition: transform 0.3s cubic-bezier(0.2, 1.6, 0.4, 1); }
.tier-node > span { display: grid; place-items: center; width: 100%; height: 100%; font: 600 1.1rem var(--pf); background: var(--surface-3); color: var(--muted); }
.font-pixel .tier-node > span { font-size: 0.7rem; }
.tier-node.reached > span { background: var(--accent); color: var(--on-accent); }
.tier-node.current { transform: scale(1.15); animation: bob 2.4s ease-in-out infinite; }
.tier-node.current > span { background: var(--primary); color: var(--on-primary); }
.shape-hex > span { clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); }
.shape-circle > span { border-radius: 50%; }
.shape-shield > span { clip-path: polygon(50% 0, 100% 14%, 94% 66%, 50% 100%, 6% 66%, 0 14%); }
.shape-diamond > span { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.shape-square > span { border-radius: 14px; }
.reward-tile {
  position: relative; width: 98px; min-height: 94px; padding: 10px 6px 8px; border-radius: 16px; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 4px; text-align: center; background: color-mix(in srgb, var(--rc) 16%, var(--surface));
  border: 2px solid var(--rc); box-shadow: 0 3px 0 color-mix(in srgb, var(--rc) 70%, var(--edge)); transition: transform 0.2s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.reward-tile:hover { transform: translateY(-3px) rotate(-2deg); }
.reward-tile .reward-emoji { font-size: 1.9rem; line-height: 1.1; }
.reward-name { font-size: 0.7rem; font-weight: 800; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reward-state { position: absolute; top: -9px; right: -7px; font-size: 0.72rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line-2); }
.reward-tile.s-locked, .reward-tile.s-premium_locked { opacity: 0.62; }
.reward-tile.s-locked .reward-emoji { filter: grayscale(0.8); }
.reward-tile.s-claimed { opacity: 0.85; }
.reward-tile.s-claimed .reward-state { background: var(--good); color: #fff; border-color: transparent; }
.reward-tile.s-claimable { animation: wiggle 2s ease-in-out infinite; }
.reward-tile.s-claimable .reward-state { background: var(--primary); color: var(--on-primary); border-color: var(--primary-edge); padding: 2px 9px; }
.track-ladder .track-labels { display: none; }
.track-ladder { grid-template-columns: 1fr; }
.track-ladder .track-grid { grid-auto-flow: row; grid-auto-columns: auto; width: 100%; padding: 0 12px; }
.track-ladder .tier, .track-ladder .track-grid.has-premium .tier { grid-template-rows: auto; grid-template-columns: 64px 1fr 1fr; padding: 8px 0; border-bottom: 2px solid var(--line); }
.track-ladder .tier-node { grid-column: 1; grid-row: 1; }
.track-ladder .tier-free { grid-column: 2; grid-row: 1; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
.track-ladder .tier-premium { grid-column: 3; grid-row: 1; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; border: 0; background: none; }
.track-ladder .track-rail { display: none; }

/* Quests -------------------------------------------------------------------------- */
.quest-group { margin: 18px 0; }
.group-title { font-size: 1.05rem; display: flex; align-items: baseline; gap: 6px; }
.quest {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius); margin-bottom: 12px;
  background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); transition: transform 0.2s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@media (min-width: 560px) { .quest { grid-template-columns: auto 1fr auto; } }
.quest.s-available { border-color: var(--line-2); }
.quest.s-available:hover { transform: translateY(-2px); }
.quest.s-locked { opacity: 0.62; box-shadow: none; }
.quest.s-done, .quest.s-cooldown { opacity: 0.8; box-shadow: none; background: var(--surface-2); }
.quest-icon { width: 50px; height: 50px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 50%; background: color-mix(in srgb, var(--primary) 16%, var(--surface)); border: 2px solid color-mix(in srgb, var(--primary) 35%, var(--line)); }
.quest.s-done .quest-icon, .quest.s-cooldown .quest-icon { background: color-mix(in srgb, var(--good) 16%, var(--surface)); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.quest-main { min-width: 0; }
.quest-pass { font-size: 0.78rem; color: var(--muted); margin: 0 0 2px; font-weight: 700; }
.quest-title { font-size: 1.05rem; margin: 0 0 2px; }
.quest-desc { font-size: 0.88rem; color: var(--muted); margin: 0 0 6px; }
.quest-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.quest-side { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@media (min-width: 560px) { .quest-side { grid-column: auto; flex-direction: column; align-items: flex-end; } }
.quest-status { font-size: 0.86rem; font-weight: 800; color: var(--good); display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.quest-status small { color: var(--muted); font-weight: 600; }
.quest-status.pending { color: var(--warn); }
.quest-status.locked { color: var(--muted); font-weight: 700; max-width: 200px; }
.quest-compact { padding: 10px 12px; }
.quest-compact .quest-icon { width: 42px; height: 42px; font-size: 1.3rem; }
.quest-list { display: flex; flex-direction: column; }
.quest-modal-head { display: flex; gap: 12px; align-items: center; }
.photo-preview img { border-radius: 14px; max-height: 220px; object-fit: cover; }
.branches { margin: 10px 0 16px; }
.branch-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.branch-card { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 16px; border-radius: var(--radius); cursor: pointer;
  background: var(--surface); border: 2px solid var(--line-2); box-shadow: var(--shadow); transition: transform 0.2s cubic-bezier(0.2, 1.4, 0.4, 1); }
.branch-card:not(:disabled):hover { transform: translateY(-3px); border-color: var(--accent); }
.branch-card.chosen { border-color: var(--honey-edge); background: color-mix(in srgb, var(--honey) 18%, var(--surface)); }
.branch-card.dim { opacity: 0.45; }
.branch-card:disabled { cursor: default; }
.branch-icon { font-size: 1.8rem; }

/* Leaderboard, reviews, feed ---------------------------------------------------------- */
.leaderboard { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lb-row { display: grid; grid-template-columns: 48px 1fr auto auto auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); }
.lb-row.me { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.lb-rank { font: 600 1rem var(--font-display); text-align: center; }
.lb-rank.rank-1, .lb-rank.rank-2, .lb-rank.rank-3 { font-size: 1.4rem; }
.lb-level { font-size: 0.82rem; color: var(--muted); font-weight: 700; }
.lb-xp { font: 600 0.92rem var(--font-display); font-variant-numeric: tabular-nums; }
.lb-me { margin-top: 10px; font-weight: 800; }
.review-summary { display: flex; align-items: center; gap: 12px; }
.big { font: 600 2.2rem var(--font-display); }
.stars { color: var(--honey-edge); letter-spacing: 1px; }
.stars-off { color: color-mix(in srgb, var(--text) 18%, transparent); }
.star-input { display: flex; gap: 4px; }
.star-input button { font-size: 1.8rem; border: 0; background: none; color: color-mix(in srgb, var(--text) 20%, transparent); cursor: pointer; padding: 0; }
.star-input button.on { color: var(--honey-edge); }
.review { padding: 14px 0; border-bottom: 2px solid var(--line); }
.review p { margin: 6px 0; }
.feed { display: flex; flex-direction: column; gap: 14px; }
.feed-layout { display: grid; gap: 22px; }
@media (min-width: 1040px) { .feed-layout { grid-template-columns: minmax(0, 1fr) 300px; } .feed-side { position: sticky; top: 84px; align-self: start; } }
.side-person { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.feed-card { padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); }
.feed-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; }
.feed-headline { margin: 0; line-height: 1.4; }
.feed-sub { margin: 2px 0 0; font-size: 0.82rem; display: flex; gap: 8px; align-items: center; }
.event-avatar { --size: 40px; background: color-mix(in srgb, var(--honey) 60%, var(--surface)); }
.feed-media { margin: 12px 0 4px; border-radius: 16px; display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface-2); border: 2px solid var(--line); }
.level-media { color: var(--pt); background: var(--pb); border-color: color-mix(in srgb, var(--pt) 14%, var(--pb)); }
.level-media-emoji { font-size: 2rem; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--ps); border: 3px solid var(--p); }
.level-media-level { display: flex; flex-direction: column; font: 600 2.2rem/1 var(--pf); }
.level-media-level small { font: 600 0.62rem var(--font-display); letter-spacing: 0.16em; opacity: 0.75; }
.level-media-unlocks { margin-left: auto; font-size: 0.84rem; font-weight: 700; opacity: 0.9; text-align: right; max-width: 50%; }
.reward-media { border-color: var(--rc); background: color-mix(in srgb, var(--rc) 12%, var(--surface)); }
.complete-media { font-size: 1.1rem; color: var(--on-honey); background: var(--honey); border-color: var(--honey-edge); }
.complete-media span { font-size: 2.2rem; }
.pass-media { color: var(--pt); background: var(--pb); }
.event-media span:first-child { font-size: 2rem; }
.announcement { margin: 10px 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border-left: 4px solid var(--accent); white-space: pre-wrap; }
.feed-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.feed-foot-right { display: flex; align-items: center; gap: 10px; }
.reactions { display: flex; gap: 6px; }
.react { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface-2); cursor: pointer; font-size: 0.92rem; transition: transform 0.15s cubic-bezier(0.2, 1.8, 0.4, 1); }
.react:active { transform: scale(1.25); }
.react.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.react span { font-size: 0.8rem; font-weight: 800; }
.comment-link { color: var(--muted); font-weight: 700; }
.comments { display: flex; flex-direction: column; gap: 12px; margin: 10px 0; }
.comment { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; }
.comment-body p { margin: 0; }
.comment-meta { font-size: 0.86rem; }
.comment-form { display: flex; gap: 10px; align-items: flex-end; }
.comment-form textarea { min-height: 46px; }
blockquote { margin: 8px 0; padding: 10px 14px; border-left: 4px solid var(--line-2); background: var(--surface-2); border-radius: 0 12px 12px 0; }

/* Reward visuals ------------------------------------------------------------------------- */
.reward-art { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 2rem;
  background: color-mix(in srgb, var(--rc) 20%, var(--surface)); border: 3px solid var(--rc); box-shadow: 0 3px 0 color-mix(in srgb, var(--rc) 70%, var(--edge)); }
.reward-art.big { width: 112px; height: 112px; font-size: 3.4rem; margin: 0 auto; border-width: 5px; box-shadow: 0 5px 0 color-mix(in srgb, var(--rc) 70%, var(--edge)); }
.reward-detail { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.reveal-rarity { font: 600 0.74rem var(--font-display); letter-spacing: 0.16em; color: color-mix(in srgb, var(--rc, var(--accent)) 70%, var(--text)); margin: 0; }

/* Celebrations: a warm flat sunburst with a ribboned medallion -------------------------- */
.celebrate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; overflow: hidden;
  background: color-mix(in srgb, var(--bg) 94%, transparent); animation: fade-in 0.25s ease-out; }
.celebrate.out { animation: fade-out 0.25s ease-in forwards; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.celebrate-rays { position: absolute; width: 170vmax; height: 170vmax; left: 50%; top: 45%; translate: -50% -50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--honey) 30%, var(--bg)) 0 9deg, var(--bg) 9deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0 18%, transparent 52%); mask: radial-gradient(circle, #000 0 18%, transparent 52%); animation: spin 40s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.celebrate-card { position: relative; text-align: center; color: var(--text); max-width: 440px; width: 100%; animation: pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes pop { from { transform: scale(0.5); opacity: 0; } }
.celebrate-badge { position: relative; width: 196px; margin: 0 auto 6px; }
.celebrate-level { margin: 0 auto; width: 176px; height: 176px; display: grid; place-items: center; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); border: 8px solid var(--surface); box-shadow: 0 0 0 5px var(--primary-edge), 0 10px 0 5px var(--edge); }
.celebrate-level span { font: 600 5rem/1 var(--pf); animation: pop 0.7s 0.1s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.celebrate-ribbon { position: relative; margin: -26px auto 0; width: max-content; padding: 6px 26px; font: 600 1rem var(--font-display); letter-spacing: 0.14em;
  color: var(--on-honey); background: var(--honey); border: 3px solid var(--honey-edge); border-radius: 10px; box-shadow: 0 4px 0 var(--honey-edge); }
.celebrate-ribbon::before, .celebrate-ribbon::after { content: ''; position: absolute; top: 8px; width: 22px; height: 26px; background: var(--honey-edge); z-index: -1; }
.celebrate-ribbon::before { left: -16px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); }
.celebrate-ribbon::after { right: -16px; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); }
.celebrate-title { font: 600 1.3rem var(--pf); margin: 14px 0 16px; }
.celebrate-unlocks { margin: 0 0 18px; }
.celebrate-reward-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.mini-reward { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; font-size: 0.78rem; font-weight: 800; animation: pop 0.5s 0.35s both; }
.mini-reward .reward-art { width: 58px; height: 58px; font-size: 1.7rem; }
.reveal-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.reveal-card { width: 260px; height: 340px; position: relative; transform-style: preserve-3d; transition: transform 0.9s cubic-bezier(0.3, 1.4, 0.4, 1); }
.reveal-card.flipped { transform: rotateY(180deg); }
.reveal-face { position: absolute; inset: 0; border-radius: 26px; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; text-align: center; }
.reveal-back { color: var(--on-primary); border: 4px solid var(--primary-edge);
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 70%, #fff) 3px, transparent 4px) 0 0 / 22px 22px, var(--primary); }
.reveal-back span { font: 600 6rem var(--font-display); }
.reveal-front { transform: rotateY(180deg); background: var(--surface); color: var(--text); border: 4px solid var(--rc); box-shadow: 0 8px 0 color-mix(in srgb, var(--rc) 70%, var(--edge)); }
.reveal-front::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 46%; border-radius: 22px 22px 50% 50% / 22px 22px 18% 18%; background: color-mix(in srgb, var(--rc) 22%, var(--surface)); z-index: -1; }
.reveal-front .muted { color: var(--muted); }
.reveal-emoji { font-size: 5rem; width: 130px; height: 130px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 5px solid var(--rc); }
.reveal-front h3 { font-size: 1.4rem; margin: 4px 0; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 120; pointer-events: none; }
.float-xp { position: fixed; z-index: 130; transform: translate(-50%, -100%); padding: 2px 10px; border-radius: 999px; font: 600 1rem var(--font-display);
  color: var(--on-honey); background: var(--honey); border: 2px solid var(--honey-edge); pointer-events: none; animation: float-up 1.3s cubic-bezier(0.2, 1.2, 0.4, 1) forwards; }
@keyframes float-up { to { transform: translate(-50%, -280%); opacity: 0; } }

/* Dialogs & toasts --------------------------------------------------------------------- */
.overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: end center; background: color-mix(in srgb, #0d0f24 50%, transparent); animation: fade-in 0.2s; }
.overlay.out { animation: fade-out 0.2s forwards; }
@media (min-width: 640px) { .overlay { place-items: center; } }
.modal { width: min(560px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); border: 2px solid var(--line-2); border-radius: 26px 26px 0 0; box-shadow: 0 6px 0 var(--edge); animation: sheet-up 0.32s cubic-bezier(0.2, 1.3, 0.4, 1); outline: none; }
@media (min-width: 640px) { .modal { border-radius: 26px; } }
.modal-wide { width: min(860px, 100%); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 0; }
.modal-head h2 { margin: 0; font-size: 1.2rem; }
.modal-body { padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); }
.toasts { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px); translate: -50% 0; z-index: 140; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
@media (min-width: 960px) { .toasts { bottom: 24px; } }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line-2); box-shadow: 0 4px 0 var(--edge); animation: sheet-up 0.3s; font-weight: 700; pointer-events: auto; }
.toast.out { animation: fade-out 0.3s forwards; }
.toast-good { border-color: color-mix(in srgb, var(--good) 55%, var(--line)); }
.toast-bad { border-color: color-mix(in srgb, var(--bad) 60%, var(--line)); }
.toast-xp { border-color: var(--honey-edge); background: color-mix(in srgb, var(--honey) 25%, var(--surface)); }

/* Share sheet -------------------------------------------------------------------------- */
.share-sheet { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.share-sheet .segmented { align-self: center; }
.share-preview { display: grid; place-items: center; min-height: 160px; }
.share-img { border-radius: 16px; border: 2px solid var(--line); background: var(--surface-2); }
.share-img.fmt-square { width: min(320px, 100%); aspect-ratio: 1; }
.share-img.fmt-story { width: min(200px, 60%); aspect-ratio: 9 / 16; }
.share-img.fmt-wide { width: 100%; aspect-ratio: 1200 / 630; }
.share-actions { display: flex; flex-direction: column; gap: 12px; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.share-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2); cursor: pointer; font-size: 0.78rem; font-weight: 700; }
.share-btn span { font-size: 1.4rem; }
.share-btn:hover { border-color: var(--primary); }

/* Checkout --------------------------------------------------------------------------- */
.checkout { display: flex; flex-direction: column; gap: 14px; }
.checkout-item { display: flex; gap: 14px; align-items: center; }
.checkout-item p { margin: 0; }
.checkout-lines { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin: 0; padding: 12px 0; border-block: 2px solid var(--line); }
.checkout-lines dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.checkout-lines .total { font-weight: 800; font-size: 1.1rem; }
.test-mode { padding: 10px 12px; border-radius: 12px; font-size: 0.88rem; background: color-mix(in srgb, var(--honey) 18%, var(--surface)); border: 2px dashed var(--honey-edge); }

/* Play page -------------------------------------------------------------------------- */
.play-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.streak { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); }
.streak strong { font: 600 1.6rem var(--font-display); }
.streak small { color: var(--muted); font-weight: 700; }
.streak-flame { font-size: 1.7rem; filter: grayscale(1); opacity: 0.5; }
.streak-flame.lit { filter: none; opacity: 1; animation: flame 1.6s ease-in-out infinite; }
@keyframes flame { 50% { transform: scale(1.12) rotate(-5deg); } }
.quest-wrap .quest { border-left: 6px solid var(--p); }
.play-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.play-card .pass-card { flex: 1; }
.play-card-remove { align-self: flex-end; border: 0; background: none; color: var(--muted); font-size: 0.82rem; font-weight: 700; padding: 4px 8px; border-radius: 999px; cursor: pointer; }
.play-card-remove:hover { color: var(--text); background: var(--surface-2); }
.removed-passes .list-row { opacity: 0.88; }

/* Profile ---------------------------------------------------------------------------- */
.profile-head { display: grid; gap: 18px; align-items: center; padding: 22px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 2px solid var(--line); box-shadow: var(--shadow); }
@media (min-width: 680px) { .profile-head { grid-template-columns: auto 1fr; } }
.profile-avatar { position: relative; justify-self: center; }
.profile-badge { position: absolute; right: -6px; bottom: -4px; font-size: 1.6rem; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); }
.profile-text h1 { font-size: 1.9rem; margin: 0; }
.profile-counts { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0 12px; color: var(--muted); font-weight: 600; }
.profile-counts strong { color: var(--text); }
.showcase-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.showcase-item { flex: none; width: 114px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 12px 8px; border-radius: 18px; background: color-mix(in srgb, var(--rc) 12%, var(--surface)); border: 2px solid var(--rc); font-size: 0.8rem; font-weight: 800; box-shadow: 0 3px 0 color-mix(in srgb, var(--rc) 65%, var(--edge)); }
.showcase-item .reward-emoji { font-size: 2rem; }
.showcase-item small { color: color-mix(in srgb, var(--rc) 65%, var(--text)); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; }
.achievement-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.achievement { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 14px 10px; border-radius: 18px; cursor: pointer; background: color-mix(in srgb, var(--rc) 10%, var(--surface)); border: 2px solid color-mix(in srgb, var(--rc) 60%, var(--line)); box-shadow: 0 3px 0 var(--edge); transition: transform 0.2s cubic-bezier(0.2, 1.6, 0.4, 1); }
.achievement:hover { transform: translateY(-3px) rotate(-1deg); }
.achievement .reward-emoji { font-size: 2rem; }
.achievement strong { font-size: 0.88rem; }
.people { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.person { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); }
.person span { display: flex; flex-direction: column; }
.emoji-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-picker button { width: 42px; height: 42px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2); font-size: 1.3rem; cursor: pointer; }
.emoji-picker button.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.color-picker { display: flex; gap: 8px; }
.color-picker button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--surface); cursor: pointer; box-shadow: 0 0 0 2px var(--line-2); }
.invite-hero { text-align: center; padding: 28px 18px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--honey) 26%, var(--surface)); border: 2px solid color-mix(in srgb, var(--honey-edge) 45%, var(--line)); box-shadow: var(--shadow); }
.invite-code { display: inline-flex; flex-direction: column; gap: 2px; padding: 12px 18px; margin: 10px 0 14px; border-radius: 16px; background: var(--surface); border: 2px dashed var(--line-2); font-family: ui-monospace, monospace; word-break: break-all; }
.tier-list { display: flex; flex-direction: column; gap: 10px; }
.tier-goal { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); opacity: 0.72; }
.tier-goal.earned { opacity: 1; border-color: var(--rc); box-shadow: 0 3px 0 color-mix(in srgb, var(--rc) 65%, var(--edge)); }
.tier-goal .reward-emoji { font-size: 1.8rem; }
.tier-goal > div { flex: 1; display: flex; flex-direction: column; }
.notice { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); }
.notice.unread { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.notice-icon { font-size: 1.3rem; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); }
.notice-text { display: flex; flex-direction: column; }
.notice-text small { color: var(--muted); }
.settings section h2 { font-size: 1.1rem; margin: 0; }

/* Auth --------------------------------------------------------------------------------- */
.auth-page { display: grid; place-items: center; min-height: 70vh; }
.auth-card { width: min(420px, 100%); padding: 28px 22px; border-radius: var(--radius-lg); background: var(--surface); border: 2px solid var(--line-2); box-shadow: 0 6px 0 var(--edge); }
.auth-brand { display: flex; align-items: center; gap: 10px; font: 600 1.1rem var(--font-display); letter-spacing: 0.06em; margin-bottom: 16px; }
.auth-brand b { color: var(--primary); }
.auth-card h1 { font-size: 1.7rem; margin-bottom: 4px; }

/* Search --------------------------------------------------------------------------------- */
.search-bar { margin: 12px 0; }
.search-input { min-height: 54px; font-size: 1.05rem; border-radius: 16px; padding-left: 16px; box-shadow: 0 3px 0 var(--edge); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; }
.filters select { width: auto; min-width: 160px; }

/* Studio & editor ------------------------------------------------------------------------- */
.template-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.template { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 16px; border-radius: var(--radius); cursor: pointer;
  background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); transition: transform 0.2s cubic-bezier(0.2, 1.4, 0.4, 1); }
.template:hover { transform: translateY(-3px) rotate(-0.6deg); border-color: var(--line-2); }
.template-emoji { font-size: 1.9rem; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--honey) 30%, var(--surface)); }
.studio-list { display: flex; flex-direction: column; gap: 12px; }
.studio-row { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); }
@media (min-width: 720px) { .studio-row { grid-template-columns: auto 1fr auto; } }
.studio-row h3 { margin: 0 0 6px; font-size: 1.1rem; }
.studio-row p { margin: 6px 0 0; }
.studio-row-actions { display: flex; gap: 8px; flex-wrap: wrap; grid-column: 1 / -1; }
@media (min-width: 720px) { .studio-row-actions { grid-column: auto; } }
.review-item img.proof { max-height: 280px; border-radius: 14px; object-fit: cover; }
.review-item { display: flex; flex-direction: column; gap: 10px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 180px) 1fr auto; gap: 10px; align-items: center; font-size: 0.9rem; }
.bar-track { height: 18px; }
.bar { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--viz-1); min-width: 3px; transition: width 0.6s; }
.bar-value { font-variant-numeric: tabular-nums; font-weight: 800; }
.columns-chart { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 10px; border-bottom: 2px solid var(--line-2); overflow-x: auto; }
.col { flex: 1; min-width: 18px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.col-bar { width: min(24px, 80%); background: var(--viz-1); border-radius: 4px 4px 0 0; min-height: 2px; }
.col-label { font-size: 0.7rem; color: var(--muted); }
.editor-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.editor-head h1 { font-size: 1.35rem; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.editor-head .link.back { margin: 0; }
.save-state { font-size: 0.84rem; font-weight: 800; color: var(--muted); }
.save-state.saved { color: var(--good); }
.save-state.error { color: var(--bad); }
.editor-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; position: sticky; top: 60px; z-index: 6; background: var(--bg); padding-top: 6px; }
.editor-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 800; cursor: pointer; white-space: nowrap; }
.editor-tab.active { color: var(--on-primary); border-color: var(--primary-edge); background: var(--primary); }
.editor-mobile-toggle { margin: 8px 0; }
.editor-layout { display: grid; gap: 22px; align-items: start; }
.editor-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.editor-section-title { font-size: 1.35rem; margin: 6px 0 0; }
.editor-preview { padding: 16px; border-radius: var(--radius-lg); border: 2px solid var(--line); min-width: 0; display: none; flex-direction: column; gap: 14px; background: var(--pb); }
.editor-page.show-preview .editor-preview { display: flex; }
.editor-page.show-preview .editor-form { display: none; }
@media (min-width: 1100px) {
  .editor-mobile-toggle { display: none; }
  .editor-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); }
  .editor-preview, .editor-page.show-preview .editor-preview { display: flex; position: sticky; top: 114px; max-height: calc(100vh - 130px); overflow: auto; }
  .editor-page.show-preview .editor-form { display: flex; }
}
.preview-label { font: 600 0.74rem var(--font-display); letter-spacing: 0.14em; color: var(--muted); margin: 0; }
.pass-hero.mini { grid-template-columns: 130px 1fr; gap: 14px; }
.pass-hero.mini .pass-hero-cover { max-width: 130px; }
.pass-hero.mini .cover-hero .cover-emoji { font-size: 2.2rem; }
.pass-hero.mini .pass-title { font-size: 1.5rem; }
.pass-hero.mini .pass-tagline { font-size: 0.92rem; }
.issues { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.issue { padding: 8px 12px; border-radius: 12px; font-size: 0.9rem; font-weight: 600; }
.issue.error { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border: 2px solid color-mix(in srgb, var(--bad) 40%, var(--line)); }
.issue.warning { background: color-mix(in srgb, var(--honey) 16%, var(--surface)); border: 2px solid color-mix(in srgb, var(--honey-edge) 45%, var(--line)); }
.item-card { border-radius: 16px; border: 2px solid var(--line); background: var(--surface); padding: 10px 12px; display: flex; flex-direction: column; gap: 12px; }
.item-card.open { border-color: var(--line-2); padding: 12px 14px 14px; box-shadow: var(--shadow); }
.item-card:not(.open) { flex-direction: row; align-items: center; padding: 8px 10px; }
.item-card:not(.open) .item-head { flex: 1; min-width: 0; flex-wrap: nowrap; }
.item-card:not(.open) .item-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 520px) { .item-card:not(.open) .item-head .chip { display: none; } }
.item-card.compact { padding: 12px; }
.item-head { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer; padding: 2px 0; flex-wrap: wrap; }
.item-icon { font-size: 1.35rem; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); }
.item-icon.r-rare, .item-icon.r-epic, .item-icon.r-legendary { box-shadow: 0 0 0 3px var(--rc) inset; }
.item-title { flex: 1; font-weight: 800; min-width: 120px; }
.caret { color: var(--muted); }
.item-controls { display: flex; gap: 6px; justify-content: flex-end; }
.item-controls .icon-btn { width: 32px; height: 32px; font-size: 0.85rem; border-radius: 10px; box-shadow: 0 2px 0 var(--edge); }
.subsection { padding-top: 14px; border-top: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.preset-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.preset { position: relative; height: 72px; border-radius: 16px; border: 2px solid color-mix(in srgb, var(--sw-t) 18%, var(--sw-bg)); cursor: pointer; display: flex; flex-direction: column; justify-content: space-between;
  align-items: flex-start; padding: 8px 10px; background: var(--sw-bg); color: var(--sw-t); font: 600 0.82rem var(--font-display); box-shadow: 0 3px 0 color-mix(in srgb, var(--sw-t) 22%, var(--sw-bg)); }
.preset-dots { display: flex; gap: 4px; }
.preset-dots i { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--sw-p); }
.preset-dots i + i { background: var(--sw-a); }
.preset.active { outline: 3px solid var(--primary); outline-offset: 2px; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.color-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.shape-row { display: flex; gap: 6px; }
.shape-row button { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2); cursor: pointer; font-size: 1.1rem; }
.shape-row button.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.cost-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.cost { display: flex; flex-direction: column; gap: 2px; font-size: 0.74rem; color: var(--muted); font-weight: 700; }

/* Operator console (dataviz: one sans, thin marks, text in ink tokens) -------------------- */
.viz { font-family: var(--font-sans); display: flex; flex-direction: column; gap: 14px; }
.viz h2, .viz h3, .viz-card h3, .viz-card h4 { font-family: var(--font-sans); font-weight: 800; }
.viz-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.viz-section { font-size: 1.08rem; margin: 14px 0 0; }
.viz-sub { font-size: 0.84rem; color: var(--muted); margin: 0 0 10px; }
.viz-card { background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 16px; font-family: var(--font-sans); margin-bottom: 14px; }
.viz-card h3 { font-size: 1.02rem; margin: 0 0 4px; }
.viz-card h4 { font-size: 0.88rem; margin: 0 0 8px; color: var(--muted); }
.viz-hero-row { display: grid; gap: 14px; }
@media (min-width: 900px) { .viz-hero-row { grid-template-columns: 260px 1fr; } }
.viz-hero { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 20px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); }
.viz-hero-value { font-size: 3.6rem; font-weight: 700; line-height: 1; color: var(--text); }
.viz-grow { margin: 0; }
.viz-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.viz-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); }
.viz-tile-label { font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.viz-tile-value { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.viz-tile-sub { font-size: 0.76rem; color: var(--faint); }
.viz-bars { display: flex; flex-direction: column; gap: 8px; }
.viz-bar-row { display: grid; grid-template-columns: minmax(110px, 200px) 1fr; gap: 10px; align-items: center; font-size: 0.88rem; }
.viz-bar-label { color: var(--muted); font-weight: 600; }
.viz-bar-track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.viz-bar { display: block; height: 20px; max-width: calc(100% - 70px); background: var(--viz-1); border-radius: 0 4px 4px 0; cursor: default; flex: none; }
.viz-bar:focus-visible { outline-offset: 1px; }
.viz-bar-value { font-weight: 800; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.viz-bar-value small { color: var(--muted); font-weight: 600; }
.viz-tip { position: absolute; z-index: 150; width: 200px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 2px solid var(--line-2); font: 600 0.82rem var(--font-sans); color: var(--text); box-shadow: 0 3px 0 var(--edge); opacity: 0; pointer-events: none; transition: opacity 0.12s; text-align: center; }
.viz-tip.on { opacity: 1; }
.viz-two { display: grid; gap: 14px; }
@media (min-width: 900px) { .viz-two { grid-template-columns: 1fr 1fr; } }
.viz-big { font-size: 2rem; font-weight: 800; margin: 4px 0 10px; }
.viz-stack { display: flex; gap: 2px; height: 22px; margin: 6px 0 10px; }
.viz-seg { display: block; height: 100%; min-width: 4px; }
.viz-seg:first-child { border-radius: 4px 0 0 4px; }
.viz-seg:last-child { border-radius: 0 4px 4px 0; }
.viz-seg.s1, .key.s1 { background: var(--viz-1); }
.viz-seg.s2, .key.s2 { background: var(--viz-2); }
.viz-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.86rem; color: var(--text); font-weight: 600; }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.viz-ledger { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 12px 0; font-size: 0.88rem; }
.viz-ledger dt { color: var(--muted); }
.viz-ledger dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.viz-signals { display: flex; flex-direction: column; gap: 6px; }
.viz-signal { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 2px solid var(--line); font-size: 0.9rem; }
.viz-signal.bad { border-left: 6px solid #d03b3b; }
.viz-signal.warn { border-left: 6px solid #fab219; }
.viz-signal.good { border-left: 6px solid #0ca30c; }
.viz-table td, .viz-table th { font-family: var(--font-sans); }
.partner-grid { display: grid; gap: 16px; margin-top: 10px; }
@media (min-width: 1000px) { .partner-grid { grid-template-columns: 1fr 1.2fr 1fr; } }
.partner form input, .partner form select { width: auto; flex: 1; min-width: 90px; }
.commitment { padding: 8px 0; border-bottom: 2px solid var(--line); font-size: 0.88rem; }
.commitment input { width: 80px; min-height: 32px; padding: 4px 8px; }
.meter { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--viz-1) 22%, var(--surface-2)); margin: 6px 0; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--viz-1); border-radius: 0 4px 4px 0; }
.report blockquote { font-size: 0.94rem; }

/* Background picker (Settings) --------------------------------------------------------- */
.bg-section h3 { margin: 6px 0 0; font-size: 1.05rem; }
.bg-section p { margin: 0; }
.bg-picker { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.bg-option { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 8px 10px; border-radius: 18px;
  border: 2px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; text-align: left; font: inherit;
  box-shadow: 0 3px 0 var(--edge); transition: transform 0.15s cubic-bezier(0.2, 1.6, 0.4, 1), border-color 0.15s; }
.bg-option:hover { border-color: var(--line-2); transform: translateY(-2px); }
.bg-option.active { border-color: var(--primary); box-shadow: 0 3px 0 var(--primary-edge); }
.bg-swatch { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; margin-bottom: 6px; border-radius: 12px;
  border: 2px solid var(--line); overflow: hidden; }
.bg-option.active .bg-swatch::after { content: '✓'; position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; display: grid;
  place-items: center; border-radius: 50%; font-size: 0.8rem; font-weight: 900; color: var(--on-primary); background: var(--primary); }
.bg-name { font: 600 0.98rem var(--font-display); }
.bg-option small { color: var(--muted); font-size: 0.78rem; line-height: 1.3; }

/* Launch kit ------------------------------------------------------------------------- */
.chip-quiet { color: var(--muted); }
.danger-text { color: var(--bad); }
.kit-hero { display: grid; gap: 18px; align-items: center; padding: 18px; border-radius: var(--radius-lg); background: var(--ps, var(--surface));
  color: var(--pt, var(--text)); border: 2px solid var(--line); box-shadow: var(--shadow); margin-bottom: 8px; }
.kit-hero .muted { color: color-mix(in srgb, var(--pt, var(--text)) 72%, var(--ps, var(--surface))); }
.kit-hero .page-title { margin: 2px 0 6px; }
.kit-hero .btn { color: var(--pt, var(--text)); }
.kit-hero-cover { width: 160px; border-radius: 18px; overflow: hidden; border: 2px solid color-mix(in srgb, var(--pt, var(--text)) 18%, transparent); }
@media (min-width: 720px) { .kit-hero { grid-template-columns: 200px 1fr; } .kit-hero-cover { width: 200px; } }
.moment-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; }
.moment { flex: none; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; min-width: 170px;
  padding: 10px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--text); text-align: left; cursor: pointer;
  box-shadow: 0 3px 0 var(--edge); font: inherit; }
.moment:hover { border-color: var(--line-2); }
.moment.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.moment-icon { grid-row: span 2; font-size: 1.6rem; }
.moment strong { font: 600 0.95rem var(--font-display); }
.moment small { color: var(--muted); font-size: 0.78rem; }
.moment.upcoming { cursor: default; border-style: dashed; box-shadow: none; background: transparent; grid-template-rows: auto auto auto; }
.moment.upcoming .moment-icon { grid-row: span 3; filter: grayscale(0.8); opacity: 0.7; }
.moment-meter { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 4px; }
.moment-meter span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.kit-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.kit-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line);
  box-shadow: var(--shadow); min-width: 0; }
.kit-card-head { display: flex; align-items: center; gap: 8px; }
.kit-card-head strong { flex: 1; font: 600 1.05rem var(--font-display); }
.kit-icon { font-size: 1.3rem; }
.kit-art { display: grid; place-items: center; padding: 10px; border-radius: 14px; background: var(--surface-2); height: 260px; }
.kit-img { max-width: 100%; max-height: 240px; border-radius: 10px; box-shadow: 0 3px 0 var(--edge); }
.kit-caption { font-size: 0.88rem; line-height: 1.45; min-height: 0; }
.kit-tip { margin: 0; }
.kit-link { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kit-link code { overflow-wrap: anywhere; padding: 6px 8px; }
.kit-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.kit-stats { margin: 0; font-size: 0.8rem; font-weight: 700; color: var(--muted); padding-top: 8px; border-top: 2px dashed var(--line); }
.kit-discord { margin-top: 28px; }

/* Discord connections ---------------------------------------------------------------- */
.discord-panel { display: flex; flex-direction: column; gap: 14px; }
.hook-list { display: flex; flex-direction: column; gap: 10px; }
.hook { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line); }
.hook header strong { font-family: var(--font-display); font-weight: 600; }
.hook p { margin: 0; }
.hook-error { color: var(--bad); font-weight: 700; }
.hook form input { flex: 1; min-width: 200px; }
.check-list.check-inline { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; max-height: none; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 0.92rem; }
.discord-connect h3 { margin: 0; }
.dc-preview summary { cursor: pointer; font-weight: 800; color: var(--muted); padding: 6px 0; }
.dc-feed { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 14px; background: #313338; color: #dbdee1; margin-top: 8px;
  font-family: 'gg sans', 'Noto Sans', system-ui, sans-serif; }
.dc-msg { display: grid; grid-template-columns: 40px 1fr; gap: 12px; }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #d44214; font-size: 1.2rem; }
.dc-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.dc-head strong { color: #f2f3f5; }
.dc-app { font-size: 0.62rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: #5865f2; color: #fff; }
.dc-embed { max-width: 460px; padding: 10px 14px; border-radius: 4px; background: #2b2d31; border-left: 4px solid var(--dc); }
.dc-title { display: block; color: #00a8fc; font-weight: 700; margin-bottom: 4px; }
.dc-desc { margin: 0 0 6px; font-size: 0.9rem; line-height: 1.4; }
.dc-desc strong { color: #f2f3f5; }
.dc-foot { color: #949ba4; font-size: 0.74rem; }

/* Weekly recap ----------------------------------------------------------------------- */
.recap-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: 12px 0; border-radius: 18px; color: var(--text);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 2px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 45%, var(--edge)); }
.recap-banner:hover { border-color: var(--accent); }
.recap-banner > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.recap-banner strong { font: 600 1.05rem var(--font-display); }
.recap-banner small { color: var(--muted); }
.recap-banner-icon { font-size: 1.8rem; }
.recap-banner-go { font-weight: 800; color: var(--accent-edge); white-space: nowrap; }
.recap-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .recap-layout { grid-template-columns: minmax(280px, 400px) 1fr; } .recap-card-col { position: sticky; top: 84px; } }
.recap-card-col { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.recap-preview { width: 100%; display: grid; place-items: center; }
.recap-img { width: 100%; border-radius: 16px; box-shadow: 0 4px 0 var(--edge); }
.recap-img.fmt-story { max-width: 360px; }
.recap-img.fmt-square { max-width: 400px; }
.recap-info .page-title { margin: 4px 0 14px; }
.recap-facts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin-bottom: 8px; }
.recap-fact { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 10px 12px; border-radius: 14px;
  background: var(--surface); border: 2px solid var(--line); }
.recap-fact-icon { grid-row: span 2; font-size: 1.3rem; }
.recap-fact strong { font: 600 1.25rem var(--font-display); font-variant-numeric: tabular-nums; }
.recap-fact small { color: var(--muted); font-size: 0.78rem; }
.recap-share { margin: 20px 0; align-items: flex-start; }

/* Sign in with Google / Apple ---------------------------------------------------------------------- */
.social-auth { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 6px 0 4px; }
.social-slot { display: flex; justify-content: center; align-items: center; min-height: 44px; width: 100%; }
.social-note:empty { display: none; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 300px; max-width: 100%; height: 44px; padding: 0 16px;
  border-radius: 999px; border: 1px solid #747775; background: #fff; color: #1f1f1f; cursor: pointer;
  font: 500 14px/20px Roboto, 'Nunito', system-ui, sans-serif; letter-spacing: 0.25px; transition: box-shadow 0.15s, background-color 0.15s;
}
.social-btn:hover { box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3); background: #f8faff; }
.social-btn:active { background: #eef3fd; }
html[data-theme='dark'] .social-btn { background: #131314; color: #e3e3e3; border-color: #8e918f; }
html[data-theme='dark'] .social-btn:hover { background: #1b1b1d; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme='light']) .social-btn { background: #131314; color: #e3e3e3; border-color: #8e918f; }
  html:not([data-theme='light']) .social-btn:hover { background: #1b1b1d; }
}
.social-or { display: flex; align-items: center; gap: 12px; width: 100%; margin: 8px 0 0; color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.social-or::before, .social-or::after { content: ''; flex: 1; height: 2px; background: var(--line); border-radius: 2px; }

/* Sideways rows have no scrollbars: drag them (mouse/pen, see drag.js), swipe them, or use arrow keys ---- */
.track-scroll, .shelf-row, .moment-strip, .showcase-row, .chip-row, .subnav, .editor-nav, .tabs { scrollbar-width: none; -ms-overflow-style: none; }
:is(.track-scroll, .shelf-row, .moment-strip, .showcase-row, .chip-row, .subnav, .editor-nav, .tabs)::-webkit-scrollbar { display: none; }
@media (pointer: fine) {
  .track-scroll, .shelf-row, .moment-strip, .showcase-row { cursor: grab; }
}
.dragging { cursor: grabbing !important; user-select: none; scroll-snap-type: none !important; scroll-behavior: auto !important; }
.dragging * { cursor: grabbing !important; }

/* Focus mode: onboarding and the guided builder hide the nav so there's one thing to do ------- */
html[data-focus] #sidenav, html[data-focus] #tabbar { display: none; }
html[data-focus] #view { padding-bottom: 32px; }
@media (min-width: 960px) {
  html[data-focus] .shell { grid-template-columns: 1fr; }
  html[data-focus] .brand-top { visibility: visible; }
}

/* Onboarding: three questions with big, tappable answers ------------------------------------ */
.onboard { max-width: 760px; margin: 0 auto; }
.onboard.builder { max-width: 900px; }
.ob-dots { display: flex; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 4px 0 24px; }
.ob-dots li { width: 30px; height: 8px; border-radius: 999px; background: var(--surface-3); transition: background 0.3s, width 0.35s cubic-bezier(0.2, 1.4, 0.4, 1); }
.ob-dots li.done { background: var(--accent); }
.ob-dots li.now { background: var(--primary); width: 52px; }
.ob-step { display: flex; flex-direction: column; gap: 16px; animation: ob-in 0.42s cubic-bezier(0.2, 1.2, 0.4, 1); }
@keyframes ob-in { from { opacity: 0; transform: translateX(26px); } }
.ob-hello { margin: 0; text-align: center; color: var(--muted); font-weight: 600; }
.ob-hello strong { color: var(--text); }
.ob-handle { font-family: var(--font-display); color: var(--text); }
.ob-title { text-align: center; font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0; }
.ob-sub { text-align: center; color: var(--muted); margin: -6px 0 4px; font-size: 1.05rem; }
.ob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.ob-grid-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.ob-choice {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 116px; padding: 16px 12px;
  border-radius: 22px; border: 3px solid var(--line); background: color-mix(in oklch, var(--c, var(--primary)) 9%, var(--surface)); color: var(--text);
  font: 600 1.1rem var(--font-display); cursor: pointer; box-shadow: 0 4px 0 var(--edge);
  transition: transform 0.22s cubic-bezier(0.2, 1.6, 0.4, 1), border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.ob-choice:hover { transform: translateY(-3px); }
.ob-choice:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--edge); }
.ob-choice-icon { font-size: 2.4rem; line-height: 1; transition: transform 0.3s cubic-bezier(0.2, 1.8, 0.4, 1); }
.ob-choice[aria-pressed='true'] { border-color: var(--c, var(--primary)); background: color-mix(in oklch, var(--c, var(--primary)) 22%, var(--surface));
  box-shadow: 0 4px 0 color-mix(in oklch, var(--c, var(--primary)) 62%, #000); }
.ob-choice[aria-pressed='true'] .ob-choice-icon { transform: scale(1.18) rotate(-6deg); }
.ob-template { min-height: 160px; text-align: center; }
.ob-template .small { font: 600 0.88rem var(--font-body); color: var(--muted); }
.ob-check { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font: 700 0.85rem var(--font-body); transform: scale(0); transition: transform 0.32s cubic-bezier(0.2, 1.9, 0.4, 1); }
[aria-pressed='true'] .ob-check { transform: scale(1); }
.ob-actions { position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: center; margin-top: 6px;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.ob-actions > .btn-lg { min-width: min(100%, 280px); }
.ob-actions-split { justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ob-back { border: 0; background: none; color: var(--muted); font-weight: 700; cursor: pointer; padding: 8px 4px; font-size: 1rem; }
.ob-back:hover { color: var(--text); }
.ob-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.ob-path {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; min-height: 230px; padding: 26px 20px;
  border-radius: 26px; border: 3px solid var(--line); background: var(--surface); box-shadow: 0 6px 0 var(--edge); cursor: pointer; color: var(--text); font-size: 1rem;
  transition: transform 0.22s cubic-bezier(0.2, 1.6, 0.4, 1), border-color 0.2s;
}
.ob-path:hover { transform: translateY(-4px) rotate(-1deg); border-color: var(--primary); }
.ob-path:active { transform: translateY(2px); }
.ob-path strong { font: 600 1.6rem var(--font-display); }
.ob-path > span:last-child { color: var(--muted); max-width: 26ch; }
.ob-path-icon { font-size: 3.8rem; line-height: 1; animation: bob 3s ease-in-out infinite; }
.ob-path:nth-child(2) .ob-path-icon { animation-delay: -1.5s; }
.ob-path[aria-pressed='true'] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 11%, var(--surface)); box-shadow: 0 6px 0 var(--primary-edge); }
.ob-paths-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.ob-paths-3 .ob-path { min-height: 176px; padding: 20px 16px; }
.ob-paths-3 .ob-path-icon { font-size: 2.7rem; animation: none; }
.ob-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.ob-pick {
  position: relative; display: flex; flex-direction: column; padding: 0; text-align: left; border-radius: 22px; border: 3px solid var(--line); background: var(--surface);
  overflow: hidden; cursor: pointer; color: var(--text); box-shadow: 0 4px 0 var(--edge); transition: transform 0.22s cubic-bezier(0.2, 1.6, 0.4, 1), border-color 0.2s;
}
.ob-pick:hover { transform: translateY(-3px); }
.ob-pick[aria-pressed='true'] { border-color: var(--primary); box-shadow: 0 4px 0 var(--primary-edge); transform: translateY(-2px) scale(1.02); }
.ob-pick-cover { position: relative; }
.ob-pick-cover .price-chip { position: absolute; left: 10px; top: 10px; }
.ob-pick .ob-check { width: 34px; height: 34px; top: 10px; right: 10px; font-size: 1.1rem; }
.ob-pick-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.ob-pick-body strong { font: 600 1.08rem var(--font-display); }
.ob-pick-body .small { color: var(--muted); }
.ob-pick-meta { display: flex; align-items: center; gap: 6px; font-size: 0.84rem; color: var(--muted); font-weight: 700; }

/* Guided builder ----------------------------------------------------------------------------- */
.ob-field { display: flex; flex-direction: column; gap: 8px; }
.ob-field > span:first-child { font: 600 0.95rem var(--font-display); color: var(--muted); }
.ob-input { font-size: 1.3rem; padding: 14px 16px; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-chip { padding: 9px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700; cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 1.6, 0.4, 1); }
.ob-chip:active { transform: scale(0.94); }
.ob-chip[aria-pressed='true'] { border-color: var(--c, var(--primary)); background: color-mix(in oklch, var(--c, var(--primary)) 18%, var(--surface)); }
.ob-grid-swatches { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.ob-swatch { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border-radius: 18px; border: 3px solid var(--line);
  background: var(--sw-bg); color: var(--sw-t); font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 var(--edge); transition: transform 0.2s cubic-bezier(0.2, 1.6, 0.4, 1); }
.ob-swatch[aria-pressed='true'] { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 5px 0 var(--primary-edge); }
.ob-swatch-dots { display: flex; gap: 4px; }
.ob-swatch-dots i { width: 18px; height: 18px; border-radius: 50%; background: var(--sw-p); border: 2px solid color-mix(in oklch, var(--sw-t) 22%, transparent); }
.ob-swatch-dots i:nth-child(2) { background: var(--sw-a); }
.ob-swatch-dots i:nth-child(3) { background: var(--sw-t); }
.ob-emoji-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-emoji { width: 48px; height: 48px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-size: 1.5rem; cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 1.8, 0.4, 1); }
.ob-emoji[aria-pressed='true'] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface)); transform: scale(1.1); }
.builder-look { display: grid; gap: 18px; }
@media (min-width: 760px) { .builder-look { grid-template-columns: 280px 1fr; align-items: start; } }
.builder-cover { width: 100%; max-width: 280px; margin: 0 auto; }
.builder-rows { display: flex; flex-direction: column; gap: 10px; }
.builder-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px; border-radius: 18px; background: var(--surface);
  border: 2px solid var(--line); box-shadow: var(--shadow); animation: ob-in 0.3s cubic-bezier(0.2, 1.2, 0.4, 1); }
.builder-row-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.builder-row select { width: auto; }
.builder-icon { width: 52px; height: 52px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--surface-2); font-size: 1.6rem; cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.2, 1.8, 0.4, 1); }
.builder-icon:active { transform: scale(0.88) rotate(-10deg); }
.builder-icon[class*='r-'] { border-color: var(--rc); background: color-mix(in srgb, var(--rc) 16%, var(--surface)); }
.builder-pills { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.builder-pills button { border: 0; background: none; padding: 6px 11px; border-radius: 999px; font-weight: 700; font-size: 0.84rem; color: var(--muted); cursor: pointer; }
.builder-pills button[aria-pressed='true'] { background: var(--surface); color: var(--text); box-shadow: 0 2px 0 var(--edge); }
.builder-pills button[class*='r-'][aria-pressed='true'] { color: color-mix(in oklch, var(--rc) 72%, var(--text)); }
.builder-remove { border: 0; background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 8px; border-radius: 10px; }
.builder-remove:hover { background: var(--surface-2); color: var(--bad); }
.builder-launch { display: flex; flex-direction: column; gap: 16px; padding: 18px; border-radius: var(--radius-lg); background: var(--pb); color: var(--pt); border: 2px solid var(--line); }
.builder-launch .pass-title { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.builder-summary { display: grid; gap: 16px; align-items: center; }
@media (min-width: 640px) { .builder-summary { grid-template-columns: 240px 1fr; } }
.builder-done { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 10px; text-align: center; animation: pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1); }
.builder-done-icon { font-size: 4.6rem; line-height: 1; animation: bob 2.4s ease-in-out infinite; }
.guided-cta { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 12px; border-radius: var(--radius); color: var(--text);
  background: color-mix(in srgb, var(--primary) 11%, var(--surface)); border: 2px solid var(--primary); box-shadow: 0 4px 0 var(--primary-edge); transition: transform 0.2s; }
.guided-cta:hover { transform: translateY(-2px); }
.guided-cta-icon { font-size: 2.2rem; }
.guided-cta > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.guided-cta small { color: var(--muted); font-weight: 600; }
.guided-cta-go { font: 600 1rem var(--font-display); color: var(--primary); }
.handle-preview { font: 600 0.95rem var(--font-display); color: var(--text); }

/* Game feel: XP coins, stamps, the next-reward meter, rivals, streak pops ------------------------- */
.xp-coin { position: fixed; z-index: 131; width: 16px; height: 16px; border-radius: 50%; pointer-events: none;
  background: var(--coin, var(--honey)); border: 3px solid color-mix(in oklch, var(--coin, var(--honey)) 62%, #000); }
.xp-track.bump { animation: bump-bar 0.45s cubic-bezier(0.2, 1.8, 0.4, 1); }
@keyframes bump-bar { 40% { transform: scale(1.03, 1.35); } }
.goal-ring.bump { animation: bump-ring 0.45s cubic-bezier(0.2, 1.8, 0.4, 1); }
@keyframes bump-ring { 40% { transform: scale(1.18); } }
.quest { position: relative; }
.quest.stamped { animation: stamp-card 0.4s ease-out; }
.quest.stamped::after { content: '✓'; position: absolute; right: 16px; top: 50%; translate: 0 -50%; width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 50%; background: var(--good); color: #fff; font: 600 1.6rem var(--font-display); border: 3px solid color-mix(in oklch, var(--good) 62%, #000);
  animation: stamp-in 0.36s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
@keyframes stamp-in { from { transform: scale(2.6) rotate(-24deg); opacity: 0; } to { transform: scale(1) rotate(-8deg); opacity: 1; } }
@keyframes stamp-card { 30% { transform: scale(0.98); } }
.hud-level.leveled { animation: pop 0.6s 0.55s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.next-reward { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 14px; text-align: left; color: var(--text); font: inherit;
  background: var(--surface-2); border: 2px dashed var(--line-2); }
button.next-reward { cursor: pointer; }
button.next-reward:hover { border-color: var(--primary); }
.next-reward.close { border-style: solid; border-color: var(--honey-edge); background: color-mix(in srgb, var(--honey) 22%, var(--surface)); animation: nudge 2.8s ease-in-out infinite; }
@keyframes nudge { 0%, 86%, 100% { transform: none; } 90% { transform: translateX(-3px); } 95% { transform: translateX(3px); } }
.next-reward-art { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 1.25rem;
  background: color-mix(in srgb, var(--rc) 18%, var(--surface)); border: 3px solid var(--rc); }
.next-reward-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.next-reward-label { font: 600 0.64rem var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.next-reward-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-reward-text small { color: var(--muted); font-weight: 700; }
.next-reward-sm { padding: 6px 8px; gap: 8px; border: 0; }
.next-reward-sm .next-reward-art { width: 28px; height: 28px; font-size: 0.95rem; border-width: 2px; }
.next-reward-sm strong { font-size: 0.86rem; }
.next-reward-sm small { font-size: 0.74rem; }
.tier-node { position: relative; }
.tier-you { position: absolute; left: 50%; bottom: -17px; translate: -50% 0; padding: 1px 7px; border-radius: 999px; font: 600 0.6rem var(--font-display);
  letter-spacing: 0.1em; background: var(--text); color: var(--bg); }
.reward-tile.is-next { border-width: 3px; }
.reward-next-tag { position: absolute; top: -11px; left: 50%; translate: -50% 0; padding: 1px 8px; border-radius: 999px; font: 600 0.6rem var(--font-display);
  letter-spacing: 0.12em; background: var(--honey); color: var(--on-honey); border: 2px solid var(--honey-edge); animation: bob 2s ease-in-out infinite; }
.lb-rival { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px; border-radius: 16px; font-weight: 600;
  background: color-mix(in srgb, var(--primary) 9%, var(--surface)); border: 2px solid color-mix(in srgb, var(--primary) 40%, var(--line)); }
.lb-rival-icon { font-size: 1.3rem; }
.lb-rival .user-chip { display: inline-flex; vertical-align: middle; }
.lb-rival small { color: var(--muted); }
.pops { position: fixed; top: calc(72px + env(safe-area-inset-top)); left: 50%; translate: -50% 0; z-index: 135; display: flex; flex-direction: column; gap: 8px;
  width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.pop { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; background: color-mix(in srgb, var(--honey) 20%, var(--surface));
  border: 3px solid var(--honey-edge); box-shadow: 0 5px 0 var(--edge); animation: pop-drop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); pointer-events: auto; }
.pop.out { animation: fade-out 0.35s forwards; }
@keyframes pop-drop { from { transform: translateY(-34px) scale(0.9); opacity: 0; } }
.pop-icon { font-size: 2rem; line-height: 1; animation: flame 1.2s ease-in-out infinite; }
.pop-text { display: flex; flex-direction: column; line-height: 1.25; }
.pop-text strong { font: 600 1.08rem var(--font-display); }
.pop-text small { color: var(--muted); font-weight: 600; }
.pop-count { color: var(--primary); font-size: 1.3em; font-variant-numeric: tabular-nums; }
.pop-freeze { border-color: #2a9fd6; background: color-mix(in srgb, #55c6f4 16%, var(--surface)); }
.pop-goal { border-color: color-mix(in oklch, var(--good) 62%, #000); background: color-mix(in srgb, var(--good) 13%, var(--surface)); }
.pop-freeze .pop-icon, .pop-goal .pop-icon { animation: bob 1.6s ease-in-out infinite; }
.streak-medal { position: relative; width: 176px; height: 176px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--honey) 38%, var(--surface)); border: 8px solid var(--surface); box-shadow: 0 0 0 5px var(--honey-edge), 0 10px 0 5px var(--edge); }
.streak-medal-flame { font-size: 5.4rem; line-height: 1; animation: flame 1.2s ease-in-out infinite; }
.streak-medal-num { position: absolute; right: -8px; bottom: -4px; min-width: 66px; height: 66px; padding: 0 10px; display: grid; place-items: center; border-radius: 999px;
  background: var(--primary); color: var(--on-primary); font: 600 2rem var(--font-display); border: 5px solid var(--surface); animation: pop 0.6s 0.25s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.celebrate-streak .celebrate-ribbon { margin-top: 18px; }
.reveal-card.charging { animation: charge var(--charge, 0.35s) ease-in both; }
@keyframes charge { 20% { transform: rotate(-3deg) scale(1.02); } 40% { transform: rotate(4deg) scale(1.03); } 60% { transform: rotate(-5deg) scale(1.05); }
  80% { transform: rotate(6deg) scale(1.07); } 100% { transform: scale(1.08); } }
.celebrate.burst-epic .celebrate-rays { animation-duration: 14s;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--r-epic) 26%, var(--bg)) 0 9deg, var(--bg) 9deg 18deg); }
.celebrate.burst-legendary .celebrate-rays { animation-duration: 9s;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--r-legendary) 34%, var(--bg)) 0 9deg, var(--bg) 9deg 18deg); }

/* Play: the streak flame sits inside today's goal ring; freezes stand by --------------------------- */
.streak { gap: 12px; padding: 10px 14px; }
.goal-ring { position: relative; width: 62px; height: 62px; flex: none; display: grid; place-items: center; }
.goal-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.goal-ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 7; }
.goal-ring-fill { fill: none; stroke: var(--primary); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.9s cubic-bezier(0.2, 1.1, 0.4, 1); }
.goal-ring.full .goal-ring-fill { stroke: var(--good); }
.goal-ring .streak-flame { font-size: 1.6rem; }
.streak-text { display: flex; flex-direction: column; line-height: 1.15; }
.streak-days { display: flex; align-items: baseline; gap: 6px; }
.streak-sub { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.freezes { display: flex; flex-direction: column; gap: 2px; font-size: 0.95rem; }
.freeze { filter: grayscale(1); opacity: 0.35; }
.freeze.on { filter: none; opacity: 1; }

html[data-motion='reduced'] *, html[data-motion='reduced'] *::before, html[data-motion='reduced'] *::after {
  animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------------------------------------- Season 0 and verified quests */
.founder-mark { margin-left: 4px; font-size: 0.85em; }
.reward-exclusive { position: absolute; top: -9px; left: -7px; padding: 1px 6px; border-radius: 999px; font: 700 0.56rem var(--font-display);
  letter-spacing: 0.04em; background: var(--honey); color: var(--on-honey); border: 1.5px solid var(--honey-edge); }
.chip-exclusive { color: var(--on-honey); border-color: var(--honey-edge); background: var(--honey); font-weight: 800; }
.chip-season { font-weight: 800; }
.chip-go { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); font-weight: 800; text-decoration: none; }
.quest-auto { align-items: stretch; min-width: 92px; color: var(--text); gap: 4px; }
.quest-auto small { text-align: right; }
.auto-meter { display: block; height: 10px; border-radius: 999px; background: var(--surface-3); border: 2px solid var(--line-2); overflow: hidden; }
.auto-meter span { display: block; height: 100%; min-width: 4px; border-radius: 999px; background: var(--good); }

.season-strip { display: flex; align-items: center; gap: 14px; margin: 14px 0; padding: 14px 18px; border-radius: var(--radius);
  background: var(--pb, var(--surface)); color: var(--pt, var(--text)); border: 2px solid color-mix(in srgb, var(--p) 55%, transparent);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--p) 60%, #000); text-decoration: none; }
.season-strip:hover { transform: translateY(-1px); }
.season-strip-art { font-size: 2.2rem; line-height: 1; }
.season-strip-main { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.season-strip-kicker { font: 700 0.78rem var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--p); }
.season-strip-main small { opacity: 0.85; }
.season-strip-bar { display: block; height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--pt) 16%, transparent); overflow: hidden; }
.season-strip-bar span { display: block; height: 100%; border-radius: 999px; background: var(--p); }
.season-strip-go { font: 700 0.9rem var(--font-display); color: var(--p); white-space: nowrap; }

.season-panel { display: flex; gap: 18px; align-items: center; margin: 18px 0; padding: 18px 20px; border-radius: var(--radius-lg);
  background: var(--pb); color: var(--pt); border: 2px solid color-mix(in srgb, var(--p) 55%, transparent);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--p) 55%, #000); }
.season-panel .kicker { color: var(--p); }
.season-panel h2 { margin: 2px 0 6px; font-family: var(--font-display); }
.season-panel p { color: var(--pt); }
.season-panel .small.muted { color: color-mix(in srgb, var(--pt) 78%, transparent); }
.season-panel .btn-primary { background: var(--p); color: var(--on-p); border-color: color-mix(in srgb, var(--p) 70%, #000); }
.season-panel .btn-ghost { color: var(--pt); border-color: color-mix(in srgb, var(--pt) 40%, transparent); }
.season-panel-art { font-size: 3.4rem; line-height: 1; }
.founders-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.founder-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.founder-card .user-chip { min-width: 0; }
.founder-card .user-chip-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; display: block; }
.bg-option.locked { opacity: 0.62; }
.bg-option.locked .bg-swatch::after { content: '🔒'; position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; display: grid;
  place-items: center; border-radius: 999px; background: var(--surface); font-size: 0.8rem; }
@media (max-width: 560px) {
  .season-panel { flex-direction: column; align-items: flex-start; }
  .season-strip { gap: 10px; padding: 12px 14px; }
  .season-strip-art { font-size: 1.8rem; }
}

/* ---------------------------------------------------------------- Passmantle Pro
   One premium look everywhere Pro appears: a flat midnight-indigo band with founders' gold, a sticker badge,
   and the thing being unlocked drawn right there (pass covers, helper chips, a boosted XP bar). Flat fills and
   offset shadows only, like the rest of the app. */
:root { --pro: #5b4bdb; --pro-edge: #3a2ca6; --on-pro: #ffffff; --pro-gold: #f7c548; --pro-gold-edge: #b9841a;
  --pro-night: #221d63; --pro-night-2: #2e2880; --pro-cream: #fff8e7; --pro-coral: #ff7a6b; }
.btn-pro { background: var(--pro); color: var(--on-pro); border-color: var(--pro-edge); box-shadow: 0 4px 0 var(--pro-edge); }
.btn-pro:hover { filter: brightness(1.06); }
.btn-pro:active { box-shadow: 0 1px 0 var(--pro-edge); }
.chip-pro { color: var(--on-pro); background: var(--pro); border-color: var(--pro-edge); font-weight: 800; text-decoration: none; }
.side-link-pro .nav-icon { filter: saturate(1.4); }

/* The band: flat indigo, a few flat gold and coral shapes, cream type. */
.pro-hero-band { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 22px 20px 20px; background: var(--pro-night); color: var(--pro-cream); }
.pro-hero-band::before, .pro-hero-band::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.pro-hero-band::before { width: 180px; height: 180px; right: -60px; top: -70px; background: var(--pro-night-2); }
.pro-hero-band::after { width: 14px; height: 14px; right: 74px; top: 26px; background: var(--pro-gold);
  box-shadow: 34px 44px 0 -3px var(--pro-coral), 52px 8px 0 -4px var(--pro-cream); opacity: 0.85; }
.pro-hero-band > * { position: relative; z-index: 1; }
.pro-hero-band h1, .pro-hero-band h2 { margin: 2px 0 0; font-family: var(--font-display); font-size: clamp(1.45rem, 4.6vw, 1.85rem);
  line-height: 1.15; color: var(--pro-cream); }
.pro-hero-band p { margin: 0; color: color-mix(in srgb, var(--pro-cream) 84%, transparent); max-width: 46ch; }
.pro-page-hero { border-radius: var(--radius-lg); box-shadow: 0 5px 0 var(--pro-edge); margin-bottom: 14px; }
.pro-badge { display: inline-flex; padding: 4px 12px; border-radius: 999px; font: 700 0.86rem var(--font-display); letter-spacing: 0.08em;
  background: var(--pro-gold); color: #2a1d00; box-shadow: 0 3px 0 var(--pro-gold-edge); rotate: -3deg;
  animation: pro-pop 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.pro-badge.big { font-size: 1.15rem; padding: 6px 18px; }
.pro-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 2px solid color-mix(in srgb, var(--pro-cream) 35%, transparent); background: var(--pro-night); color: var(--pro-cream); font-weight: 800; }
.pro-close:hover { background: var(--pro-night-2); }

/* Pictures: what Pro unlocks, drawn in place. */
.pro-art { margin-top: 10px; width: 100%; }
.pro-art-passes { display: flex; align-items: center; padding-left: 6px; }
.pro-cover { position: relative; width: 78px; height: 78px; margin-left: -12px; border-radius: 16px; overflow: hidden; flex: none;
  border: 3px solid var(--pro-cream); box-shadow: 0 4px 0 #120f3a; rotate: calc((var(--i) - 1) * 4deg);
  animation: pro-deal 0.5s cubic-bezier(0.2, 1.3, 0.4, 1) both; animation-delay: calc(var(--i) * 90ms); }
.pro-cover:first-child { margin-left: 0; }
.pro-cover .cover { width: 100%; height: 100%; }
.pro-cover.is-new { border-color: var(--pro-gold); rotate: 6deg; box-shadow: 0 4px 0 var(--pro-gold-edge); }
.pro-cover-tag { position: absolute; right: 4px; bottom: 4px; padding: 0 7px; border-radius: 999px; font: 700 0.8rem var(--font-display);
  background: var(--pro-gold); color: #2a1d00; }
.pro-infinity { margin-left: 14px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font: 700 1.6rem var(--font-display);
  background: var(--pro-gold); color: #2a1d00; box-shadow: 0 3px 0 var(--pro-gold-edge);
  animation: pro-pop 0.55s 0.35s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.pro-art-helpers { display: flex; flex-wrap: wrap; gap: 8px; }
.pro-helper-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; border-radius: 999px; font-weight: 800;
  background: var(--pro-cream); color: var(--pro-night); box-shadow: 0 3px 0 #120f3a;
  animation: pro-deal 0.5s cubic-bezier(0.2, 1.3, 0.4, 1) both; animation-delay: calc(var(--i) * 90ms); }
.pro-helper-chip b { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; background: var(--pro-gold); color: #2a1d00; }
.pro-art-boost { display: grid; gap: 8px; max-width: 420px; }
.pro-bar { display: grid; grid-template-columns: 40px 1fr 62px 58px; align-items: center; gap: 10px; font-weight: 800; }
.pro-bar-label { font-size: 0.85rem; color: color-mix(in srgb, var(--pro-cream) 75%, transparent); }
.pro-bar-track { height: 14px; border-radius: 999px; background: color-mix(in srgb, var(--pro-cream) 16%, transparent); overflow: hidden; }
.pro-bar-track span { display: block; height: 100%; border-radius: 999px; background: color-mix(in srgb, var(--pro-cream) 55%, transparent);
  transform-origin: left; animation: pro-fill 0.8s 0.15s cubic-bezier(0.2, 1, 0.3, 1) both; }
.pro-bar.is-pro .pro-bar-track span { background: var(--pro-gold); animation-delay: 0.35s; }
.pro-bar.is-pro strong { color: var(--pro-gold); }
.pro-boost-sticker { justify-self: start; padding: 3px 10px; border-radius: 999px; font: 700 0.95rem var(--font-display);
  background: var(--pro-coral); color: #2b0d08; rotate: 8deg; box-shadow: 0 3px 0 #b8473a;
  animation: pro-pop 0.55s 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both; }

/* The sheet. */
.pro-sheet-modal { overflow: hidden auto; }
.pro-sheet-modal .modal-body { padding: 0; }
.pro-sheet-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); }
.pro-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pro-page .pro-perks { margin: 0 0 14px; }
.pro-perks li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface);
  border: 2px solid var(--line); box-shadow: var(--shadow); }
.pro-perks li.lead { border-color: color-mix(in srgb, var(--pro) 55%, var(--line)); background: color-mix(in srgb, var(--pro) 8%, var(--surface)); }
.pro-perks strong { display: block; }
.pro-perks small { color: var(--muted); }
.pro-perk-icon { font-size: 1.45rem; line-height: 1; }
.pro-perk-check { margin-left: auto; flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--good); color: #fff; font-weight: 800; font-size: 0.8rem; }
.pro-price-block { text-align: center; }
.pro-price { margin: 0; font-family: var(--font-display); }
.pro-price strong { font-size: 2rem; }
.pro-hero-band .pro-price-block { text-align: left; margin-top: 6px; }
.pro-hero-band .pro-price strong { color: var(--pro-cream); }
.pro-terms { margin: 2px 0 0; font-size: 0.85rem; color: var(--muted); }
.pro-hero-band .pro-terms { color: color-mix(in srgb, var(--pro-cream) 72%, transparent); }
.pro-cta { font-size: 1.08rem; animation: pro-pop 0.5s 0.2s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.pro-quiet { align-self: center; padding: 4px 8px; border: 0; background: none; color: var(--muted); font: 600 0.88rem var(--font-body);
  text-decoration: none; cursor: pointer; }
.pro-quiet:hover { color: var(--text); text-decoration: underline; }
.pro-testmode { margin: 0; text-align: center; font-size: 0.76rem; color: var(--faint); }
.pro-success { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 18px 20px; text-align: center; }
.pro-success h2 { margin: 4px 0 0; font-family: var(--font-display); }
.pro-success .pro-perks { width: 100%; text-align: left; }
.pro-status { color: var(--pro-cream); }

/* Free vs Pro, and the builder helpers. */
.pro-compare { width: 100%; border-collapse: collapse; }
.pro-compare th, .pro-compare td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.pro-compare thead th { font-family: var(--font-display); }
.pro-compare .pro-col { color: var(--pro); font-weight: 800; }
:root[data-theme='dark'] .pro-compare .pro-col { color: var(--pro-gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .pro-compare .pro-col { color: var(--pro-gold); } }
.helper-row { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 14px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--pro) 8%, var(--surface)); border: 2px dashed color-mix(in srgb, var(--pro) 40%, var(--line)); }
.btn-helper { background: var(--surface); color: var(--pro); border-color: color-mix(in srgb, var(--pro) 50%, var(--line)); font-weight: 800; }
:root[data-theme='dark'] .btn-helper { color: var(--pro-gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .btn-helper { color: var(--pro-gold); } }
.helper-note { margin: 0; }

@keyframes pro-pop { from { opacity: 0; scale: 0.6; } 60% { opacity: 1; scale: 1.1; } to { opacity: 1; scale: 1; } }
@keyframes pro-deal { from { opacity: 0; translate: -18px 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes pro-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .pro-badge, .pro-cover, .pro-infinity, .pro-helper-chip, .pro-bar-track span, .pro-boost-sticker, .pro-cta { animation: none; }
}
:root[data-motion='reduced'] :is(.pro-badge, .pro-cover, .pro-infinity, .pro-helper-chip, .pro-bar-track span, .pro-boost-sticker, .pro-cta) {
  animation: none;
}
@media (max-width: 560px) {
  .pro-cover { width: 64px; height: 64px; }
  .pro-hero-band { padding: 20px 16px 18px; }
}
/* In the sheet, keep the button above the fold: only the perk that matches the moment keeps its description. */
.pro-sheet .pro-hero-band { padding: 18px 20px 16px; }
.pro-sheet .pro-cover { width: 66px; height: 66px; }
.pro-sheet .pro-infinity { width: 40px; height: 40px; font-size: 1.35rem; }
.pro-sheet .pro-perks li { padding: 8px 12px; }
.pro-sheet .pro-perks li:not(.lead) small { display: none; }
.pro-sheet .pro-perks li:not(.lead) .pro-perk-icon { font-size: 1.15rem; }
.pro-sheet .pro-sheet-body { gap: 10px; padding-top: 14px; }
.pro-sheet .pro-price strong { font-size: 1.75rem; }
.pro-badge { align-items: center; gap: 6px; padding-left: 5px; }
.pro-badge b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--pro-night); font-size: 0.72rem; }
.pro-badge.big b { width: 26px; height: 26px; font-size: 0.9rem; }

/* ---------------------------------------------------------------- Cover scenes and mascots */
.cover-medallion .cover-mascot { width: 100%; height: 100%; display: block; }
.mascot { display: block; flex: none; overflow: visible; }
.mascot-slot:empty { display: none; }
.mascot-says { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 12px 0; border-radius: var(--radius);
  background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); }
.mascot-bubble { position: relative; padding: 8px 14px; border-radius: 16px; background: var(--surface-2); min-width: 0; }
.mascot-bubble::before { content: ''; position: absolute; left: -6px; top: 50%; width: 12px; height: 12px; border-radius: 3px;
  background: var(--surface-2); transform: translateY(-50%) rotate(45deg); }
.mascot-name { display: block; font: 700 0.74rem var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.mascot-bubble p { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.mascot-says.mood-idle .mascot { animation: mascot-bob 3.4s ease-in-out infinite; }
.mascot-says.mood-cheer .mascot { animation: mascot-hop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) 2; }
@keyframes mascot-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes mascot-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px) rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .mascot-says .mascot { animation: none !important; } }
:root[data-motion='reduced'] .mascot-says .mascot { animation: none !important; }
.celebrate-card .mascot-says { justify-content: center; margin: 4px 0 10px; background: transparent; border: 0; box-shadow: none; }

/* The composer: pick a setting, a time of day, props, and the parts of a mascot. */
.composer { display: grid; gap: 14px; }
.composer-row { display: grid; gap: 6px; }
.composer-label { font: 700 0.76rem var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pick-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pick { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--line-2); background: var(--surface); color: var(--text); font: 700 0.86rem var(--font-body); }
.pick:hover:not(:disabled) { border-color: var(--primary); }
.pick[aria-pressed='true'] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  box-shadow: 0 2px 0 var(--primary-edge); }
.pick:disabled { opacity: 0.45; cursor: not-allowed; }
.thumb { display: grid; justify-items: center; gap: 2px; padding: 4px 4px 3px; width: 64px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--line-2); background: var(--surface); color: var(--text); }
.thumb small { font-size: 0.68rem; font-weight: 700; color: var(--muted); }
.thumb:hover { border-color: var(--primary); }
.thumb[aria-pressed='true'] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface)); box-shadow: 0 2px 0 var(--primary-edge); }
.swatch { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; background: var(--c); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--line-2); }
.swatch[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--primary); }
.composer input[type='color'] { width: 36px; height: 30px; padding: 0; border: 2px solid var(--line-2); border-radius: 8px; background: none; cursor: pointer; }
.mascot-stage { display: grid; gap: 8px; padding: 6px 0 2px; }
.mascot-stage .mascot-says { margin: 0; }
.mascot-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.mascot-preset { display: grid; justify-items: center; align-content: start; gap: 3px; min-width: 0; padding: 10px 6px;
  border: 2px solid var(--line-2); border-radius: 12px; background: var(--mascot-preset-bg, var(--surface));
  color: var(--mascot-preset-ink, var(--text)); cursor: pointer; }
.mascot-preset svg { display: block; max-width: 100%; }
.mascot-preset strong { font: 800 0.85rem var(--font-body); }
.mascot-preset small { font: 600 0.7rem/1.35 var(--font-body); text-align: center; }
.mascot-preset:hover, .mascot-preset[aria-pressed='true'] { border-color: var(--primary); }
.mascot-preset[aria-pressed='true'] { outline: 2px solid var(--primary); outline-offset: 2px; }
.composer-lines { display: grid; gap: 8px; }
.composer-line { display: grid; gap: 2px; }
.builder-compose { margin-top: 18px; }

/* ---- custom badges ---------------------------------------------------- */
.badge-art { width: 1.1em; height: 1.1em; object-fit: contain; display: inline-block; vertical-align: -0.16em; }
.reward-tile .badge-art { width: 1.05em; height: 1.05em; }
.reward-art .badge-art, .next-reward-art .badge-art { width: 72%; height: 72%; vertical-align: middle; }
.reveal-emoji .badge-art { width: 78%; height: 78%; vertical-align: middle; }
.badge-mini .badge-art { width: 1.2em; height: 1.2em; vertical-align: -0.22em; }
.profile-badge .badge-art, .item-icon .badge-art, .builder-icon .badge-art { width: 70%; height: 70%; vertical-align: middle; }
.badge-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.badge-picker-art { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: 1.5rem; }
.badge-picker-art.r-rare, .badge-picker-art.r-epic, .badge-picker-art.r-legendary { box-shadow: 0 0 0 3px var(--rc) inset; }
.badge-upload { display: grid; gap: 10px; padding: 14px; border-radius: 18px; border: 2px dashed var(--line-2); background: var(--surface-2); }
.badge-upload-row { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 520px) { .badge-upload-row { grid-template-columns: 1fr; } }
.badge-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.badge-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 10px; text-align: center; border-radius: 18px; border: 2px solid var(--line-2); background: var(--surface); }
.badge-card.is-current { border-color: var(--primary, var(--accent)); }
.badge-card-art { border: 0; padding: 0; background: var(--surface-2); border-radius: 18px; width: 96px; height: 96px; display: grid; place-items: center; cursor: pointer; }
.badge-card-art:disabled { cursor: default; opacity: 0.85; }
.badge-card-name { font-size: 0.92rem; overflow-wrap: anywhere; }
.badge-card-reason { margin: 0; }
.badge-thumb { max-width: 100%; height: auto; border-radius: 12px; }
.badge-ops { display: flex; gap: 16px; align-items: flex-start; }
.badge-ops-art { flex: none; border-radius: 16px; background: var(--surface-2); padding: 4px; }
.badge-ops-main { flex: 1; min-width: 0; display: grid; gap: 8px; }
.badge-ops-main input { flex: 1; min-width: 180px; }
.badge-checks { margin: 0; padding-left: 18px; }
@media (max-width: 520px) { .badge-ops { flex-direction: column; } }

/* Closed test build: the welcome and Tester guide. */
.tester-guide { gap: 12px; }
.tester-guide .tg-title { margin: 0; }
.tester-guide .tg-label { margin: 0; }
.tester-guide .tg-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.tester-guide .tg-dots { display: flex; gap: 6px; justify-content: center; }
.tester-guide .tg-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.tester-guide .tg-dots span.on { background: var(--primary); }
.tester-guide-modal .modal-body { max-height: 80vh; overflow-y: auto; }
