:root {
  --bg: #0b0910;
  --panel: #141119;
  --card: #1c1822;
  --card-2: #27212f;
  --edge: rgba(255, 240, 225, 0.08);
  --ink: #f7f1ea;
  --ink-2: rgba(247, 241, 234, 0.66);
  --ink-3: rgba(247, 241, 234, 0.42);
  --pumpkin: #ff7a1a;
  --pumpkin-ink: #1a0b00;
  --pumpkin-deep: #b8500a;
  --purple: #9b6bff;
  --red: #ff6b7a;
  --display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --spooky: 'Creepster', 'Inter Tight', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(155, 107, 255, 0.12), transparent 60%), var(--bg);
  color: var(--ink);
  font: 15px/1.45 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--pumpkin); outline-offset: 2px; }
img, video { display: block; max-width: 100%; }

.shell { display: grid; grid-template-columns: 372px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 10px; height: 100dvh; padding: 10px; }

/* ---- left panel ---- */
.panel { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--edge); border-radius: 22px; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; }
.brand img { width: 44px; height: 44px; border-radius: 12px; }
.brand small { display: block; color: var(--ink-3); font-size: 12px; }
.brand strong { font: 400 30px/1 var(--spooky); letter-spacing: 0.02em; color: var(--pumpkin); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 12px 10px; padding: 4px; background: #0c0a10; border-radius: 14px; }
.seg button { height: 38px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--card-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--edge); }
.seg.small { margin: 0; }

.scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; scrollbar-color: var(--card-2) transparent; }
.group { background: var(--card); border: 1px solid var(--edge); border-radius: 16px; }
.group.pad { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.group-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 13px 14px; color: var(--ink-2); font-weight: 500; text-align: left; }
.group-head span { flex: 1; }
.group-head em { font-style: normal; color: var(--ink-3); }
.group-head .dot { width: 8px; height: 8px; border-radius: 8px; background: var(--pumpkin); }
.group label { color: var(--ink-3); font-size: 12px; font-weight: 500; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 8px 8px; }
.group.pad .tiles { padding: 0; }
.tiles.four { grid-template-columns: repeat(4, 1fr); }
.tile { min-height: 44px; padding: 8px 6px; border-radius: 12px; background: #0f0c14; border: 1.5px solid var(--edge); color: var(--ink-2); font-size: 13px; font-weight: 500; line-height: 1.2; transition: border-color 0.12s, color 0.12s; }
.tile:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.2); }
.tile.on { border-color: var(--pumpkin); color: var(--ink); box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.18); }
.tiles-pic .tile { padding: 0 0 7px; overflow: hidden; display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.tiles-pic .tile img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 25%; }
.tiles-pic .tile span { padding: 0 4px; }
.check { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-2) !important; font-size: 13px !important; cursor: pointer; }
.check input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; padding: 0; accent-color: var(--pumpkin); }

.models { display: grid; gap: 6px; }
.models .tile { display: flex; align-items: center; gap: 10px; padding: 9px 12px; text-align: left; }
.models .tile span { flex: 1; min-width: 0; display: grid; gap: 2px; }
.models .tile strong { font-weight: 600; color: var(--ink); }
.models .tile small { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.models .tile b { font-weight: 600; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.models .tile.on b { color: var(--pumpkin); }

input, textarea { width: 100%; padding: 10px 12px; border-radius: 12px; background: #0f0c14; border: 1.5px solid var(--edge); resize: none; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, textarea:focus { outline: none; border-color: var(--pumpkin); }
.empty, .hint { margin: 0; color: var(--ink-3); font-size: 13px; }

.sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.source { position: relative; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: var(--card-2); aspect-ratio: 3 / 4; }
.source img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.source span { position: absolute; inset: auto 0 0; padding: 14px 6px 5px; font-size: 11px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source.on { border-color: var(--pumpkin); }
.source.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #0f0c14; border: 1.5px dashed rgba(255, 122, 26, 0.5); color: var(--pumpkin); font-size: 13px; font-weight: 600; }
.source.add span { position: static; padding: 0; background: none; color: inherit; font-size: 13px; }
.source.add:hover:not(:disabled) { border-style: solid; }

.foot { padding: 12px 14px 14px; border-top: 1px solid var(--edge); display: flex; flex-direction: column; gap: 10px; }
.picked-head { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 12px; font-weight: 500; }
.picked-head button { color: var(--ink-2); font-size: 12px; }
.picked-head button:disabled { color: var(--ink-3); }
.picked { display: flex; flex-wrap: wrap; gap: 6px; max-height: 68px; overflow-y: auto; }
.chip { padding: 4px 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--edge); color: var(--ink-2); font-size: 12px; font-weight: 500; }
.chip.ghost { background: none; color: var(--ink-3); }
.note { margin: 0; padding: 9px 12px; border-radius: 12px; background: var(--card); color: var(--ink-2); font-size: 13px; }
.note.error { color: var(--red); }
.go { display: flex; gap: 8px; }
.shuffle { flex: none; width: 56px; height: 56px; border-radius: 16px; background: var(--purple); color: #fff; display: grid; place-items: center; }
.generate { flex: 1; height: 56px; padding: 0 18px; border-radius: 16px; background: var(--pumpkin); color: var(--pumpkin-ink); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 0 var(--pumpkin-deep); transition: transform 0.08s, box-shadow 0.08s, opacity 0.12s; text-decoration: none; }
.generate b { font-weight: 600; opacity: 0.72; font-size: 15px; }
.generate:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--pumpkin-deep); }
.generate:disabled { opacity: 0.45; }
.generate.inline { flex: none; height: 46px; font-size: 15px; border-radius: 14px; }
.fine { margin: 0; color: var(--ink-3); font-size: 12px; text-align: center; }

/* ---- right stage ---- */
.stage { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #0f0c14; border: 1px solid var(--edge); border-radius: 22px; overflow: hidden; }
.top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 12px; padding: 12px 14px; }
.tabs { display: flex; gap: 4px; }
.top-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.token { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 5px; border-radius: 12px; background: var(--card); border: 1px solid var(--edge); color: var(--ink-2); transition: border-color 0.12s, color 0.12s; }
.token b { height: 30px; padding: 0 9px; border-radius: 8px; background: var(--pumpkin); color: var(--pumpkin-ink); font: 800 14px/30px var(--display); letter-spacing: -0.01em; }
.token code { min-width: 92px; font: 500 13px/1 ui-monospace, 'SF Mono', Menlo, monospace; text-align: left; }
.token.tba { padding-right: 14px; cursor: default; }
.token.tba code { min-width: 0; }
.token.tba:hover { border-color: var(--edge); color: var(--ink-2); }
.token:hover { border-color: rgba(255, 240, 225, 0.22); color: var(--ink); }
.token.copied { border-color: var(--pumpkin); color: var(--pumpkin); }
.tabs button { height: 38px; padding: 0 14px; border-radius: 12px; color: var(--ink-2); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.tabs button.on { background: var(--card-2); color: var(--ink); }
.tabs em { font-style: normal; font-size: 12px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.content { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 14px 24px; scrollbar-width: thin; scrollbar-color: var(--card-2) transparent; }

.hero { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 16px 34px; overflow: hidden; border-radius: 18px; }
.hero::after { content: ''; position: absolute; inset: auto -10% 0; height: 120px; background: radial-gradient(60% 100% at 50% 100%, rgba(247, 241, 234, 0.07), transparent 70%); pointer-events: none; animation: fog 9s ease-in-out infinite alternate; }
.moon { position: absolute; top: 18px; right: 8%; width: 86px; height: 86px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6df, #f3d9a4 60%, #d9b878); box-shadow: 0 0 60px 12px rgba(243, 217, 164, 0.18); opacity: 0.85; }
.fan { position: relative; display: flex; align-items: center; justify-content: center; height: 250px; margin-bottom: 22px; }
.fan-card { width: 150px; height: 200px; margin: 0 -14px; border-radius: 18px; overflow: hidden; background: var(--card-2); box-shadow: 0 24px 44px -18px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 240, 225, 0.1); transition: transform 0.18s; }
.fan-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.fan-card:hover { transform: translateY(-6px); z-index: 3; }
.fan-card.f0 { transform: rotate(-8deg) translateY(16px); }
.fan-card.f1 { transform: rotate(-4deg) translateY(4px); z-index: 1; height: 216px; }
.fan-card.f2 { z-index: 2; width: 176px; height: 236px; box-shadow: 0 0 70px -6px rgba(255, 122, 26, 0.55), 0 24px 44px -18px rgba(0, 0, 0, 0.9), 0 0 0 2px var(--pumpkin); }
.fan-card.f3 { transform: rotate(4deg) translateY(4px); z-index: 1; height: 216px; }
.fan-card.f4 { transform: rotate(8deg) translateY(16px); }
.hero h1 { position: relative; z-index: 1; margin: 0; font: 800 clamp(30px, 4vw, 50px) / 1.02 var(--display); letter-spacing: -0.035em; text-transform: uppercase; }
.rotator { display: inline-block; margin-top: 6px; font: 400 clamp(46px, 6.4vw, 84px) / 1 var(--spooky); letter-spacing: 0.02em; text-transform: none; color: var(--pumpkin); text-shadow: 0 0 30px rgba(255, 122, 26, 0.4); animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.hero p { position: relative; z-index: 1; max-width: 600px; margin: 18px 0 0; color: var(--ink-2); font-size: 16px; }
.steps { position: relative; z-index: 1; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 0; padding: 0; }
.steps li { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--edge); font-size: 14px; font-weight: 500; }
.steps b { width: 26px; height: 26px; border-radius: 26px; background: var(--pumpkin); color: var(--pumpkin-ink); display: grid; place-items: center; font-size: 13px; }
.steps i { font-style: normal; color: var(--ink-3); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fog { to { transform: translateX(6%); } }

.costumes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.costume-card { position: relative; display: block; border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--edge); aspect-ratio: 3 / 4; transition: border-color 0.15s, transform 0.15s; }
.costume-card > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.costume-card .before { position: absolute; top: 10px; left: 10px; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 2px solid rgba(247, 241, 234, 0.85); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); }
.costume-card .before img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.costume-card .label { position: absolute; inset: auto 0 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 34px 12px 11px; background: linear-gradient(transparent, rgba(8, 6, 12, 0.88)); text-align: left; }
.costume-card strong { font-weight: 600; color: var(--ink); }
.costume-card em { font-style: normal; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.costume-card:hover { border-color: var(--pumpkin); transform: translateY(-3px); }
.costume-card:hover em { color: var(--pumpkin); }

.masonry { columns: 4 240px; column-gap: 12px; }
.card { position: relative; display: block; width: 100%; margin: 0 0 12px; break-inside: avoid; border-radius: 16px; overflow: hidden; background: var(--card-2); }
.card img, .card video { width: 100%; }
.card .tag { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 4px 10px; border-radius: 999px; background: rgba(13, 14, 16, 0.78); color: var(--ink); font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity 0.12s; }
.card:hover .tag, .card:focus-visible .tag, .card.queued .tag, .card.running .tag, .card.failed .tag { opacity: 1; }
.card.queued, .card.running, .card.failed { background: var(--card); border: 1px solid var(--edge); }
.wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; color: var(--ink-2); font-size: 14px; text-align: center; }
.cauldron { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 122, 26, 0.2); border-top-color: var(--pumpkin); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card.queued .wait, .card.running .wait { background: linear-gradient(100deg, transparent 30%, rgba(255, 122, 26, 0.14) 50%, transparent 70%) 0 0 / 220% 100%; animation: sheen 1.6s linear infinite; }
.card.failed .wait { color: var(--red); }
@keyframes sheen { to { background-position: -220% 0; } }

.filters { display: flex; gap: 6px; margin: 4px 0 14px; }
.filters button { height: 34px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--edge); color: var(--ink-2); font-size: 14px; font-weight: 500; }
.filters button.on { background: var(--pumpkin); color: var(--pumpkin-ink); border-color: var(--pumpkin); }

.blank { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 90px 20px; text-align: center; }
.blank h2 { margin: 0; font: 800 30px/1 var(--display); letter-spacing: -0.03em; text-transform: uppercase; }
.blank p { margin: 0 0 8px; max-width: 380px; color: var(--ink-2); }

/* ---- lightbox ---- */
.lb { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(5, 6, 7, 0.78); backdrop-filter: blur(8px); }
.lb-box { position: relative; display: grid; grid-template-columns: minmax(0, auto) 300px; max-width: min(1000px, 100%); max-height: calc(100vh - 40px); background: var(--panel); border: 1px solid var(--edge); border-radius: 22px; overflow: hidden; outline: none; }
.lb-media { position: relative; min-width: 280px; min-height: 320px; background: #0f0c14; display: grid; place-items: center; }
.lb-media img, .lb-media video { max-height: calc(100vh - 42px); width: auto; }
.lb-media .wait { position: static; }
.lb-side { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 22px 18px; overflow-y: auto; }
.lb-side small { color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.lb-side h3 { margin: 0; font: 800 26px/1.05 var(--display); letter-spacing: -0.03em; }
.lb-side p { margin: 0; color: var(--ink-2); }
.lb-side .picked { max-height: none; margin-bottom: 6px; }
.plain { height: 42px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--edge); color: var(--ink); font-weight: 500; font-size: 14px; display: grid; place-items: center; text-decoration: none; }
.plain.danger { background: none; color: var(--red); }
.lb-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 34px; background: rgba(13, 14, 16, 0.7); color: var(--ink); font-size: 20px; line-height: 1; }

.mbrand, .sheet-close, .scrim, .tabbar, .install { display: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }

@media (max-width: 900px) {
  html, body, #root { height: auto; }
  html.sheet-open, html.sheet-open body { overflow: hidden; }
  .shell { display: block; height: auto; padding: 0 0 calc(84px + env(safe-area-inset-bottom)); }
  /* The page is the examples and the library; the studio is a sheet opened from the button at the bottom. */
  .stage { min-height: 100dvh; border: 0; border-radius: 0; overflow: visible; background: var(--bg); }
  .top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto; padding: max(10px, env(safe-area-inset-top)) 14px 10px; background: rgba(11, 9, 16, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--edge); }
  .mbrand { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .mbrand img { width: 32px; height: 32px; }
  .mbrand strong { font: 400 22px/1 var(--spooky); letter-spacing: 0.02em; color: var(--pumpkin); white-space: nowrap; }
  .top-right { flex-wrap: nowrap; gap: 6px; }
  .top .tabs { display: none; }
  .token { height: 36px; gap: 6px; padding-right: 10px; }
  .token b { height: 26px; line-height: 26px; padding: 0 7px; font-size: 13px; }
  .token code { min-width: 0; font-size: 12px; }
  .token code i { font-style: normal; }
  .content { overflow: visible; padding: 6px 12px 24px; }
  .hero { padding: 18px 8px 26px; }
  .hero h1 { font-size: clamp(28px, 8.4vw, 40px); }
  .rotator { font-size: clamp(42px, 13vw, 60px); }
  .hero p { font-size: 15px; }
  .panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: min(92dvh, 860px); border-radius: 24px 24px 0 0; border-bottom: 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6); transform: translateY(105%); visibility: hidden; transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s 0.32s; }
  .panel.open { transform: none; visibility: visible; transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1); }
  .panel::before { content: ''; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(247, 241, 234, 0.22); }
  .brand { padding: 20px 14px 10px 18px; touch-action: none; }
  .brand img { width: 36px; height: 36px; }
  .brand strong { font-size: 26px; }
  .sheet-close { display: grid; place-items: center; width: 38px; height: 38px; margin-left: auto; border-radius: 12px; background: var(--card); border: 1px solid var(--edge); color: var(--ink-2); }
  .foot { padding-bottom: max(14px, env(safe-area-inset-bottom)); }

  /* Feels like an app, not a page: no tap flash, no rubber-banding past the ends, no zoom on focus. */
  html { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
  body { touch-action: manipulation; }
  button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  img { -webkit-touch-callout: none; }
  input, textarea, select { font-size: 16px; }
  .tile, .costume-card, .card, .fan-card, .source, .tabbar button, .generate, .shuffle { transition: transform 0.12s ease; }
  .tile:active, .costume-card:active, .card:active, .source:active, .shuffle:active { transform: scale(0.97); }

  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; padding: 6px 10px max(8px, env(safe-area-inset-bottom)); background: rgba(14, 11, 19, 0.9); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-top: 1px solid var(--edge); }
  .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 54px; justify-content: center; color: var(--ink-3); font-size: 11px; font-weight: 600; }
  .tabbar button.on { color: var(--pumpkin); }
  .tabbar em { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pumpkin); color: var(--pumpkin-ink); font: 700 11px/18px var(--display); font-style: normal; }
  .tabbar .create { color: var(--ink); }
  .tabbar .create i { display: grid; place-items: center; width: 58px; height: 58px; margin-top: -30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffa04d, var(--pumpkin) 55%, var(--pumpkin-deep)); color: var(--pumpkin-ink); box-shadow: 0 0 0 5px var(--bg), 0 10px 26px rgba(255, 122, 26, 0.45); }
  .tabbar .create i svg { width: 24px; height: 24px; }
  .tabbar .create:active i { transform: scale(0.92); }

  .install { display: flex; align-items: center; gap: 12px; margin: 6px 0 4px; padding: 10px 10px 10px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--edge); }
  .install img { width: 42px; height: 42px; border-radius: 11px; }
  .install p { flex: 1; margin: 0; min-width: 0; }
  .install strong { display: block; font-size: 15px; }
  .install small { color: var(--ink-2); font-size: 13px; }
  .install-go { height: 34px; padding: 0 14px; border-radius: 10px; background: var(--pumpkin); color: var(--pumpkin-ink); font-weight: 600; }
  .install-x { width: 30px; height: 30px; color: var(--ink-3); font-size: 22px; }

  /* The lightbox is a full-screen page that slides up and drags down. */
  .lb { padding: 0; place-items: end stretch; }
  .lb-box { width: 100%; max-width: none; height: 100dvh; max-height: none; border: 0; border-radius: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; animation: up 0.3s cubic-bezier(0.32, 0.72, 0, 1); }
  .lb-media { flex: none; min-width: 0; min-height: 50dvh; padding-top: env(safe-area-inset-top); touch-action: none; }
  .lb-media img, .lb-media video { width: 100%; max-height: 72dvh; object-fit: contain; }
  .lb-side { flex: none; overflow: visible; padding: 20px 16px max(24px, env(safe-area-inset-bottom)); }
  .lb-close { top: max(12px, env(safe-area-inset-top)); right: 12px; width: 40px; height: 40px; font-size: 24px; backdrop-filter: blur(8px); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(5, 4, 8, 0.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade 0.2s ease; }
  .fan { height: 170px; }
  .fan-card { width: 74px; height: 104px; margin: 0 -10px; }
  .fan-card.f1, .fan-card.f3 { height: 116px; }
  .fan-card.f2 { width: 98px; height: 136px; }
  .costumes { grid-template-columns: repeat(2, 1fr); }
  .moon { width: 54px; height: 54px; }
  .lb-media img, .lb-media video { max-height: 56vh; }
}
@media (max-width: 420px) {
  .mbrand strong { font-size: 19px; }
  .token code i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Installed as an app, the page runs edge to edge: keep clear of the notch and the home bar. */
@media (min-width: 901px) { .shell { padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); } }
