/* Paille World: the portal and the Lab. Brand tokens from tiktok/branding (night sky, paille d'or, cream), Rubik. */

@font-face {
  font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(fonts/Rubik-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(fonts/Rubik-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --night-0: #0a1230; --night-1: #15245a; --night-2: #27408f;
  --gold: #f8c845; --gold-light: #ffe792; --gold-deep: #e0961c; --cream: #fff6dc;

  /* the page's own palette: themes.css overrides these per prototype */
  --bg: var(--night-0);
  --bg-2: var(--night-1);
  --fg: var(--cream);
  --muted: rgba(255, 246, 220, .68);
  --accent: var(--gold);
  --accent-2: var(--gold-light);
  --accent-ink: #2a1a00;
  --surface: rgba(255, 246, 220, .07);
  --surface-2: rgba(255, 246, 220, .12);
  --line: rgba(255, 246, 220, .16);
  --shadow: 0 18px 50px rgba(2, 6, 24, .55);
  --focus: var(--gold-light);

  --font: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font);
  --radius: 22px;
  --wrap: min(1120px, calc(100% - 32px));
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--fg);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {  /* the sky behind everything */
  content: ""; position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 70% at 50% -10%, color-mix(in srgb, var(--bg-2) 85%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 62%);
}
body::after {  /* twinkling stars, only on dark pages */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--stars, 1);
  background-image:
    radial-gradient(1.4px 1.4px at 8% 12%, #fff9, transparent 60%), radial-gradient(1px 1px at 22% 38%, #fff8, transparent 60%),
    radial-gradient(1.6px 1.6px at 37% 8%, #fffb, transparent 60%), radial-gradient(1px 1px at 51% 27%, #fff8, transparent 60%),
    radial-gradient(1.4px 1.4px at 66% 14%, #fff9, transparent 60%), radial-gradient(1px 1px at 79% 33%, #fff8, transparent 60%),
    radial-gradient(1.6px 1.6px at 91% 9%, #fffb, transparent 60%), radial-gradient(1px 1px at 14% 61%, #fff7, transparent 60%),
    radial-gradient(1.2px 1.2px at 43% 72%, #fff8, transparent 60%), radial-gradient(1px 1px at 73% 66%, #fff7, transparent 60%),
    radial-gradient(1.4px 1.4px at 88% 81%, #fff8, transparent 60%), radial-gradient(1px 1px at 30% 91%, #fff6, transparent 60%);
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: calc(var(--stars, 1) * .55); } to { opacity: var(--stars, 1); } }

img, svg, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: var(--wrap); margin-inline: auto; }
.muted { color: var(--muted); }

/* ------------------------------------------------------------------ header / footer */
.site-header { position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: .01em; }
.lockup svg, .lockup img { width: 26px; height: auto; filter: var(--mark-filter, none); }
.lockup small { display: block; font-size: 10px; font-weight: 600; letter-spacing: .22em; color: var(--accent); text-transform: uppercase; margin-top: -2px; }
#account { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.chip b { font-variant-numeric: tabular-nums; }
.chip svg { flex-shrink: 0; }   /* a crowded phone header would otherwise squeeze the coin and gem to dots */
#account .btn.small { white-space: nowrap; }
button.chip { font: inherit; font-size: 13px; font-weight: 700; color: inherit; cursor: pointer; transition: border-color .2s, transform .1s; }
button.chip:hover { border-color: var(--gold); } button.chip:active { transform: scale(.95); }

.site-footer { margin-top: 96px; border-top: 1px solid var(--line); padding: 28px 0 44px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.site-footer a { text-underline-offset: 3px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  --_bg: linear-gradient(180deg, var(--accent-2), var(--accent));
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font: 800 16px/1 var(--font); letter-spacing: .01em;
  color: var(--accent-ink); background: var(--_bg);
  box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 55%, #000), 0 14px 28px rgba(0, 0, 0, .35);
  transition: transform .18s var(--ease-pop), box-shadow .18s, filter .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 55%, #000), 0 6px 14px rgba(0, 0, 0, .35); }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .55; filter: grayscale(.7); transform: none; box-shadow: 0 4px 0 rgba(0, 0, 0, .3); }
.btn.ghost { --_bg: transparent; color: var(--fg); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.btn.ghost:active { box-shadow: inset 0 0 0 2px var(--accent); transform: translateY(2px); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 14px; box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 55%, #000); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ------------------------------------------------------------------ type */
/* No kicker labels above titles (a small uppercase line over a big heading reads as a template): a fact about the page, when there
   is one, is a plain muted line. */
.meta-line { display: block; font-size: 15px; color: var(--muted); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; }
h1 { font-size: clamp(38px, 9vw, 76px); font-weight: 900; letter-spacing: -.02em; }
h2 { font-size: clamp(26px, 5vw, 38px); font-weight: 800; letter-spacing: -.01em; }
.lead { font-size: clamp(17px, 2.6vw, 21px); color: var(--muted); max-width: 36em; margin: 18px 0 0; }
.accent { color: var(--accent); }

/* ------------------------------------------------------------------ portal: the shared world */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.world { display: grid; gap: 28px; padding: 18px 0 0; justify-items: center; }
.reel { position: relative; margin: 0; width: min(100%, 440px); }
.reel canvas { display: block; width: 100%; height: auto; aspect-ratio: 360 / 460; border-radius: 26px; background: var(--night-0); box-shadow: var(--shadow); }
.reel-toggle { position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; color: var(--cream); background: rgba(10, 18, 48, .72); }
.reel-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.reel-toggle[data-state="playing"] .i-play, .reel-toggle[data-state="paused"] .i-pause { display: none; }
.world-side { display: grid; gap: 20px; width: min(100%, 440px); justify-items: stretch; }
.world-side .actions { justify-content: center; }
.world-side .actions .btn { flex: 1 1 auto; }
.how-world { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.how-world summary { cursor: pointer; list-style: none; padding: 14px 18px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.how-world summary::-webkit-details-marker { display: none; }
.how-world summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--gold); transition: transform .2s; }
.how-world[open] summary::after { transform: rotate(45deg); }
.how-world dl { margin: 0; padding: 0 18px 16px; display: grid; gap: 4px; }
.how-world dt { font-weight: 700; color: var(--cream); margin-top: 10px; }
.how-world dd { margin: 0; color: var(--muted); line-height: 1.5; }
.lab-line { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.lab-line a { color: inherit; text-underline-offset: 3px; }
@media (min-width: 900px) {
  .world { grid-template-columns: minmax(0, 460px) minmax(0, 380px); justify-content: center; align-items: center; gap: 56px; padding-top: 40px; }
  .reel { width: 100%; }
  .world-side .actions { justify-content: flex-start; }
  .lab-line { text-align: left; }
}

.section-title { margin-bottom: 22px; }
.empty {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 34px 24px; text-align: center; color: var(--muted);
  display: grid; justify-items: center; gap: 10px;
}
.empty svg { width: 44px; height: 44px; opacity: .9; }
.empty strong { color: var(--fg); font-size: 20px; }

@keyframes spin { to { rotate: 360deg; } }

/* ------------------------------------------------------------------ the Lab: the star */
.lab-hero { text-align: center; padding: 28px 0 4px; }
.lab-hero .lead { margin-inline: auto; }
.lab-hero h1 { margin-top: 10px; }
.star-section { margin-top: 30px; }
.star-stage { --charge: 0; display: grid; justify-items: center; gap: 22px; position: relative; }
.star-wrap { position: relative; perspective: 900px; }
.star-card {
  --rx: 0deg; --ry: 0deg; --sx: 0px; --sy: 0px;
  appearance: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; text-align: inherit;
  position: relative; display: block; width: min(340px, 82vw); aspect-ratio: 9 / 14; border-radius: 30px; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 50% 38%, var(--night-2), var(--night-1) 45%, var(--night-0));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 55%, transparent), 0 0 calc(30px + 70px * var(--charge)) color-mix(in srgb, var(--gold) calc(25% + 45% * var(--charge)), transparent), var(--shadow);
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translate(var(--sx), var(--sy)) scale(calc(1 - .03 * var(--press, 0)));
  transition: transform .25s var(--ease-out), box-shadow .3s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.star-card[data-state="charging"] { transition: transform .05s linear, box-shadow .1s; }
.star-card[data-state="revealed"] { cursor: default; }
.star-card .rays {
  position: absolute; inset: -40%; z-index: 0; opacity: calc(.5 + .5 * var(--charge));
  background: repeating-conic-gradient(from 0deg at 50% 44%, color-mix(in srgb, var(--gold) 28%, transparent) 0 5deg, transparent 5deg 18deg);
  mask: radial-gradient(circle at 50% 44%, #000 0 8%, transparent 60%); -webkit-mask: radial-gradient(circle at 50% 44%, #000 0 8%, transparent 60%);
  animation: spin calc(60s - 45s * var(--charge)) linear infinite;
}
.star-card .twinkles { position: absolute; inset: 0; z-index: 0; }
.star-card .twinkles i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 2px #fff8; animation: tw 2.6s ease-in-out infinite; }
@keyframes tw { 0%, 100% { opacity: .15; scale: .6; } 50% { opacity: 1; scale: 1.2; } }
.star-card .star {
  position: absolute; left: 50%; top: 44%; width: 62%; z-index: 2;
  translate: -50% -50%; scale: calc(1 + .55 * var(--charge));
  filter: drop-shadow(0 0 calc(14px + 30px * var(--charge)) color-mix(in srgb, var(--gold) 85%, transparent));
  animation: bob 3.2s ease-in-out infinite;
}
.star-card[data-state="charging"] .star { animation: none; }
@keyframes bob { 50% { translate: -50% -54%; } }
.star-card .star.gone { opacity: 0; scale: 3.4; transition: opacity .35s ease-out, scale .45s ease-out; animation: none; }
.star-card .ring { position: absolute; left: 50%; top: 44%; width: 78%; z-index: 1; translate: -50% -50%; rotate: -90deg; opacity: var(--charge); }
.star-card .ring circle { fill: none; stroke: var(--gold-light); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: calc(289 * (1 - var(--charge))); }
.star-card .fx-canvas { position: absolute; inset: 0; z-index: 3; pointer-events: none; width: 100%; height: 100%; }
.star-card .drop-chip { position: absolute; top: 16px; left: 16px; z-index: 4; }
.star-card .drop-chip .chip { background: color-mix(in srgb, var(--gold) 20%, transparent); border-color: color-mix(in srgb, var(--gold) 60%, transparent); color: var(--gold-light); letter-spacing: .16em; font-size: 11px; font-weight: 800; }
.star-card .cta {
  position: absolute; left: 0; right: 0; bottom: 22px; z-index: 4; text-align: center; font-weight: 900; letter-spacing: .14em; font-size: 15px;
  color: var(--cream); text-shadow: 0 2px 12px #000a; animation: nudge 1.6s ease-in-out infinite;
}
.star-card .cta small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--muted); margin-top: 4px; animation: none; }
@keyframes nudge { 50% { transform: translateY(-4px); } }
.star-card[data-state="charging"] .cta, .star-card[data-state="bursting"] .cta, .star-card[data-state="revealed"] .cta, .star-card[data-state="charging"] .drop-chip, .star-card[data-state="bursting"] .drop-chip, .star-card[data-state="revealed"] .drop-chip { opacity: 0; transition: opacity .2s; }
.star-card .flash { position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 44%, #fff 0, var(--gold-light) 30%, transparent 75%); }
.star-card[data-state="bursting"] .flash { animation: flash .75s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.star-card .cover { position: absolute; inset: 0; z-index: 5; clip-path: circle(0% at 50% 44%); background: var(--night-0); }
.star-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.star-card[data-state="bursting"] .cover { animation: iris .9s var(--ease-out) .06s forwards; }
.star-card[data-state="bursting"] .cover img { animation: settle .9s var(--ease-out) .06s both; }
.star-card[data-state="revealed"] .cover { clip-path: circle(150% at 50% 44%); }
.star-card[data-state="revealed"] .cover::after {  /* a slow shine across the cover, once in a while */
  content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, .28) 50%, transparent 60%);
  translate: -120% 0; animation: shine 5s ease-in-out 1.2s infinite;
}
@keyframes iris { from { clip-path: circle(0% at 50% 44%); } to { clip-path: circle(150% at 50% 44%); } }
@keyframes settle { from { scale: 1.35; filter: brightness(2) saturate(1.5); } to { scale: 1; filter: none; } }
@keyframes shine { 0%, 60% { translate: -120% 0; } 100% { translate: 120% 0; } }
.star-card.shake { animation: shake .45s linear; }
@keyframes shake { 10% { translate: -7px 3px; } 25% { translate: 6px -4px; } 40% { translate: -5px -3px; } 55% { translate: 4px 4px; } 70% { translate: -2px 2px; } 100% { translate: 0 0; } }

.star-tools { position: absolute; top: 12px; right: 12px; z-index: 8; display: flex; gap: 6px; }
.icon-btn {
  appearance: none; border: 1px solid var(--line); background: rgba(10, 18, 48, .55); backdrop-filter: blur(6px); color: var(--fg); width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; font-size: 17px; transition: background .2s, transform .15s;
}
.icon-btn:hover { background: var(--surface-2); } .icon-btn:active { transform: scale(.92); }

.star-after { display: grid; justify-items: center; gap: 12px; text-align: center; min-height: 0; max-width: 560px; }
.star-after[hidden] { display: none; }
.star-title { font-size: clamp(34px, 8vw, 56px); font-weight: 900; letter-spacing: -.02em; display: flex; flex-wrap: wrap; justify-content: center; column-gap: .28em; }
.star-title .w { display: inline-flex; }
.star-title .l { display: inline-block; animation: slam .55s var(--ease-pop) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes slam { from { opacity: 0; transform: translateY(40px) scale(1.7) rotate(-6deg); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
.star-tag { margin: 0; color: var(--muted); font-size: 18px; animation: rise .6s var(--ease-out) .5s both; }
.star-after .actions { justify-content: center; margin-top: 6px; animation: rise .6s var(--ease-out) .7s both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ the Lab: the grid */
.past { margin-top: 84px; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card {
  --acc: var(--accent); position: relative; display: grid; grid-template-rows: auto 1fr; text-decoration: none;
  border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  transition: transform .3s var(--ease-out), box-shadow .3s, border-color .3s, opacity .6s var(--ease-out);
}
.js .card:not(.in) { opacity: 0; transform: translateY(26px); }  /* hidden only when JS will bring them in */
.card.in { transition-delay: calc(var(--d, 0) * 60ms), calc(var(--d, 0) * 60ms), 0s, calc(var(--d, 0) * 60ms); }
.card.in:hover { transform: translateY(-6px) rotate(-.6deg); border-color: var(--acc); box-shadow: 0 16px 40px color-mix(in srgb, var(--acc) 35%, transparent); transition-delay: 0s; }
.card .pic { position: relative; aspect-ratio: 9 / 14; overflow: hidden; background: var(--night-0); }
.card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.card:hover .pic img { transform: scale(1.06); }
.card .num { position: absolute; left: 10px; top: 10px; padding: 3px 10px; border-radius: 999px; background: #000b; color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .06em; backdrop-filter: blur(6px); }
.card .meta { padding: 14px 14px 16px; display: grid; gap: 4px; align-content: start; }
.card h3 { font-size: 18px; font-weight: 800; line-height: 1.15; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .votes { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--acc); }
.card .votes[hidden] { display: none; }
.vote-note { margin: 22px auto 0; max-width: 640px; text-align: center; color: var(--muted); font-size: 15px; }
.vote-note b { color: var(--fg); }

/* ------------------------------------------------------------------ a prototype's page */
.proto { padding-top: 6px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; color: var(--muted); margin: 6px 0 18px; }
.crumbs a { text-decoration: none; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--surface); }
.crumbs a:hover { color: var(--fg); background: var(--surface-2); }
.proto-hero { display: grid; gap: 30px; align-items: start; }
@media (min-width: 820px) { .proto-hero { grid-template-columns: auto 1fr; gap: 56px; align-items: center; } }
.phone {
  justify-self: center; width: min(320px, 76vw); aspect-ratio: 9 / 16; border-radius: 34px; overflow: hidden; position: relative;
  background: #000; box-shadow: 0 0 0 3px var(--line), 0 0 0 4px color-mix(in srgb, var(--accent) 50%, transparent), 0 24px 70px color-mix(in srgb, var(--accent) 30%, rgba(0, 0, 0, .5));
  animation: floaty 6s ease-in-out infinite;
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
@keyframes floaty { 50% { transform: translateY(-8px) rotate(.4deg); } }
.proto-info { display: grid; gap: 14px; justify-items: start; }
.proto-info h1 { font-size: clamp(40px, 9vw, 84px); line-height: .95; text-wrap: balance; }
.proto-info .tag { font-size: clamp(18px, 3vw, 24px); color: var(--muted); margin: 0; max-width: 28em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags .chip { font-weight: 600; font-size: 12px; }
.proto-body { display: grid; gap: 26px; margin-top: 56px; }
@media (min-width: 820px) { .proto-body { grid-template-columns: 1.2fr .8fr; align-items: start; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { font-size: 22px; margin-bottom: 12px; }
.panel p { margin: 0 0 12px; } .panel p:last-child { margin-bottom: 0; }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: how; }
.how li { counter-increment: how; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.how li::before { content: counter(how); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 900; }
.credits { font-size: 13px; color: var(--muted); }

/* The vote is the studio's, not the prototype's: whatever the page's theme, this panel wears Paille's own colours (night, cream,
   paille d'or), flat, with no glow. Gold means value here (gems, a vote), so it is used once, like a coin: a solid fill with its
   deep edge, never a gradient or a halo. `:root` makes these rules outrank a theme's own (`[data-theme=…] .btn`, `.panel`), and the
   panel sits above a theme's screen effects (the CRT scanlines). The panel itself needs `.panel.vote-panel` to beat `[data-theme=…] .panel`. */
:root .panel.vote-panel {
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --font-display: var(--font); --radius: 22px;
  --accent: var(--gold); --accent-2: var(--gold); --accent-ink: #2a1a00;
  --fg: var(--cream); --muted: rgba(255, 246, 220, .66); --line: rgba(255, 246, 220, .14);
  --surface: rgba(255, 246, 220, .07); --surface-2: rgba(255, 246, 220, .1);
  color-scheme: dark; color: var(--fg); background: var(--night-0); font-family: var(--font);
  border: 1px solid rgba(248, 200, 69, .28); border-radius: var(--radius); box-shadow: none;
  position: relative; z-index: 51;
  text-align: center; display: grid; gap: 14px; justify-items: center;
}
:root .vote-panel .vote-mark { width: 22px; height: auto; opacity: .9; }
:root .vote-count { display: grid; justify-items: center; line-height: 1; }
:root .vote-count .num { font-size: 64px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--gold); }
:root .vote-count .lock { width: 54px; height: 54px; color: var(--gold); margin-bottom: 4px; }
:root .vote-count .lbl { font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
:root .vote-panel h2 { margin: 0; color: var(--cream); text-shadow: none; text-transform: none; }
:root .vote-panel .fine { font-size: 13px; color: var(--muted); }
:root .vote-panel .btn {
  --_bg: var(--gold); width: 100%; max-width: 320px; border: 0; border-radius: 999px;
  background: var(--_bg); color: var(--accent-ink); box-shadow: 0 5px 0 var(--gold-deep);
}
:root .vote-panel .btn:active { box-shadow: 0 1px 0 var(--gold-deep); transform: translateY(4px); }
:root .vote-panel .btn[disabled] { --_bg: var(--surface-2); color: var(--muted); filter: none; opacity: 1; transform: none; box-shadow: inset 0 0 0 1px var(--line); }
/* no cyan gem on gold: inside the panel the gem is drawn in the button's ink (its facets in the button's colour) */
:root .vote-panel .btn svg path:first-child { fill: currentColor; stroke: currentColor; }
:root .vote-panel .btn svg path + path { stroke: var(--_bg); opacity: .9; }
:root .vote-panel .btn[disabled] svg path + path { stroke: var(--night-0); }
.bump { animation: bump .5s var(--ease-pop); }
@keyframes bump { 40% { transform: scale(1.35); } }

.pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 56px; flex-wrap: wrap; }
.pager a { flex: 1 1 220px; text-decoration: none; padding: 16px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 2px; transition: border-color .2s, transform .2s; }
.pager a:hover { border-color: var(--accent); transform: translateY(-2px); }
.pager small { color: var(--muted); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; }
.pager a:last-child:not(:first-child) { text-align: right; }

/* ------------------------------------------------------------------ account dialog */
dialog { border: 1px solid var(--line); border-radius: 24px; background: var(--night-1); color: var(--fg); padding: 28px; width: min(420px, calc(100% - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(4, 8, 24, .7); backdrop-filter: blur(6px); }
dialog h2 { font-size: 26px; margin-bottom: 8px; }
dialog form { display: grid; gap: 14px; margin-top: 16px; }
dialog input[type="email"], dialog input[type="number"], dialog input[type="text"] { font: inherit; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--night-0); color: var(--fg); }
dialog input[autocomplete="one-time-code"] { font-size: 28px; font-weight: 700; letter-spacing: .4em; text-align: center; padding-left: calc(16px + .4em); font-variant-numeric: tabular-nums; }
dialog input:focus { outline: none; border-color: var(--gold); }
dialog .msg { min-height: 1.5em; font-size: 14px; color: var(--muted); }
dialog [data-body] { display: grid; gap: 14px; margin-bottom: 16px; }
dialog .fine { font-size: 13px; color: var(--muted); margin: 0; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pack {
  display: grid; gap: 6px; justify-items: center; padding: 16px 8px; border-radius: 18px; cursor: pointer;
  border: 2px solid var(--line); background: var(--night-0); color: var(--fg); font: inherit; transition: border-color .2s, transform .1s;
}
.pack:hover:not(:disabled) { border-color: var(--gold); } .pack:active:not(:disabled) { transform: scale(.96); } .pack:disabled { opacity: .5; cursor: default; }
.pack-gems { display: inline-flex; align-items: center; gap: 6px; font-size: 20px; } .pack-gems svg { width: 20px; height: 20px; }
.pack-price { font-weight: 700; color: var(--gold-light); }

/* ------------------------------------------------------------------ legal pages (/legal/notice/, /legal/privacy/, /legal/terms/) */
.legal { max-width: 760px; padding-block: 56px 88px; }
.legal h1 { font-size: clamp(34px, 7vw, 52px); margin-bottom: 12px; }
.legal h2 { font-size: clamp(22px, 4vw, 26px); margin: 40px 0 12px; }
.legal h3 { font-size: 19px; margin: 28px 0 8px; }
.legal p, .legal li { line-height: 1.65; max-width: 68ch; }
.legal p { margin: 0 0 14px; }
.legal ul { padding-left: 1.2em; margin: 0 0 14px; display: grid; gap: 6px; }
.legal em { color: var(--muted); }
.legal a { color: var(--gold); }
.legal .table { overflow-x: auto; margin: 18px 0 22px; border: 1px solid var(--line); border-radius: 14px; }
.legal table { border-collapse: collapse; min-width: 680px; font-size: 14px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); line-height: 1.5; }
.legal tbody tr:last-child td { border-bottom: 0; }
.legal th { color: var(--gold-light); font-weight: 700; }
.legal mark.todo { background: #ff5a4a; color: #fff; font-weight: 700; padding: 0 5px; border-radius: 5px; }
.legal-draft { padding: 12px 16px; border-radius: 12px; background: rgba(255, 90, 74, .16); border: 1px solid #ff5a4a; font-size: 14px; margin-bottom: 28px; }

/* ------------------------------------------------------------------ token pages (/consent/, /gems/) */
.token-page { padding: 80px 0; }
.token-box { margin: 18px auto 0; width: fit-content; max-width: 100%; padding: 12px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; overflow-wrap: anywhere; }
.consent-facts { max-width: 560px; margin: 22px auto 0; text-align: left; }

/* ------------------------------------------------------------------ motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .card:not(.in) { opacity: 1; transform: none; }
}
@media (max-width: 480px) {
  .lockup { font-size: 16px; }
  #account { gap: 5px; }
  #account .chip { padding: 4px 8px; gap: 4px; }
  #account .icon-btn { width: 34px; height: 34px; }
}
