/* BloxMaps website: bright cartoon style, light + dark, mobile first.

   PALETTE (2026-10-06): built from the stud-brick logo. Logo samples: sky #20B0F8 (face), highlight #38C0F8,
   mid #0068C8, deep #0038A0 ("Maps" lettering). The primary scale runs through them in even OKLCH lightness steps
   (hue 228 -> 264); neutrals are tinted toward the same hue (cool off-white / blue-grey navy, never pure grey or
   black); ONE warm complement (amber) is the call-to-action colour; green = success only, red = errors / close only.

     primary   50 #eef9fe  100 #d3f1fe  200 #a4e2ff  300 #5eccfe  400 #20b0f8 (logo)  500 #008ce1
               600 #0068c8 (logo)  700 #0051b3  800 #0038a0 (logo)  900 #062372
     accent    #ffa844, shadow #ce710c, soft #ffebd2 (dark: #422707); text on it: the ink navy
     success   #22a85a fill, #0b7a38 text      danger #d33a3c (dark #ed756e)

     token       light                       dark
     --bg        #f2f7fe                     #081425
     --surface   #ffffff  / -2 #eef4fc / -3 #e1ebf7      #101e33 / -2 #16273f / -3 #1e314c
     --ink       #081e3a  / -2 #3d516b / -3 #5c6d83      #eff4fc / -2 #bcc8db / -3 #92a3bb
     --line      #d2deed  / -2 #bfcee1                   #283b57 / -2 #364b6b
     --blue      600 #0068c8 (links, fills)              400 #20b0f8 (links, fills: text on it is the ink navy)
     --on-blue   #ffffff                                 #081e3a

   WCAG AA (contrast ratios, measured):
     light  ink/bg 15.5   ink-2/bg 7.5   ink-3/bg 4.9 (ink-3/white 5.3)   link #0068c8/bg 5.1, /white 5.5
            white on primary-600 5.5, on -700 7.4, on -800 10.1   ink on accent 8.7   primary-700 on -100 6.3
     dark   ink/bg 16.7   ink-2/surface 9.9   ink-3/bg 7.2, /surface 6.5, /surface-3 5.1
            link #20b0f8/bg 7.5   ink navy on primary-400 6.9   ink navy on accent 8.7   primary-100 on -800 8.6
   (white on the accent is 1.9: never; buttons on the accent use the ink navy) */

:root {
  --font-display: "Fredoka", "Nunito", ui-rounded, system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* one spacing scale (4 / 8 px grid), one radius scale, one shadow system */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --wrap: 1180px;
  --gutter: 16px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t: 0.18s;

  /* the primary scale (from the logo) */
  --p-50: #eef9fe; --p-100: #d3f1fe; --p-200: #a4e2ff; --p-300: #5eccfe; --p-400: #20b0f8;
  --p-500: #008ce1; --p-600: #0068c8; --p-700: #0051b3; --p-800: #0038a0; --p-900: #062372;
  --stroke: #0b1230;                  /* the stroked headings' outline */

  --bg: #f2f7fe;
  --bg-dots: rgba(0, 104, 200, 0.075);
  --glow: rgba(32, 176, 248, 0.22);
  --surface: #ffffff;
  --surface-2: #eef4fc;
  --surface-3: #e1ebf7;
  --ink: #081e3a;
  --ink-2: #3d516b;
  --ink-3: #5c6d83;
  --line: #d2deed;
  --line-2: #bfcee1;
  --drop: #c6d4e7;
  --overlay: rgba(6, 18, 40, 0.55);
  --shadow-1: 0 4px 0 var(--drop);
  --shadow-2: 0 6px 0 var(--drop), 0 16px 32px rgba(8, 30, 58, 0.12);
  --shadow-3: 0 8px 0 var(--drop), 0 24px 48px rgba(8, 30, 58, 0.18);

  --blue: var(--p-600);
  --blue-d: var(--p-800);
  --blue-soft: var(--p-100);
  --on-blue: #ffffff;
  --accent: #ffa844;
  --accent-d: #ce710c;
  --accent-soft: #ffebd2;
  --on-accent: #081e3a;
  --green: #22a85a;
  --green-d: #0b7a38;
  --green-soft: #dcf5e5;
  --red: #d33a3c;
  --red-d: #a8262a;
  --red-soft: #fde4e3;
  /* the older names, kept so every page follows the palette: yellow = the accent, purple = the deep blues,
     pink = danger, orange = the accent */
  --yellow: var(--accent);
  --yellow-d: var(--accent-d);
  --yellow-soft: var(--accent-soft);
  --ink-on-yellow: var(--on-accent);
  --pink: var(--red);
  --pink-d: var(--red-d);
  --pink-soft: var(--red-soft);
  --purple: var(--p-800);
  --purple-d: var(--p-900);
  --purple-soft: var(--p-50);
  --orange: var(--accent);
  --focus: var(--p-400);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #081425;
  --bg-dots: rgba(94, 204, 254, 0.055);
  --glow: rgba(32, 176, 248, 0.16);
  --surface: #101e33;
  --surface-2: #16273f;
  --surface-3: #1e314c;
  --ink: #eff4fc;
  --ink-2: #bcc8db;
  --ink-3: #92a3bb;
  --line: #283b57;
  --line-2: #364b6b;
  --drop: #020715;
  --overlay: rgba(2, 7, 21, 0.72);
  --shadow-2: 0 6px 0 var(--drop), 0 16px 32px rgba(0, 0, 0, 0.35);
  --shadow-3: 0 8px 0 var(--drop), 0 24px 48px rgba(0, 0, 0, 0.45);
  --blue: var(--p-400);
  --blue-d: var(--p-600);
  --blue-soft: #0b2a57;
  --on-blue: #081e3a;
  --accent-soft: #422707;
  --green: #37bb62;
  --green-d: #5fd38a;
  --green-soft: #12351f;
  --red: #ed756e;
  --red-d: #c8504a;
  --red-soft: #46191b;
  --purple: var(--p-600);
  --purple-d: var(--p-800);
  --purple-soft: #0d2347;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #081425;
    --bg-dots: rgba(94, 204, 254, 0.055);
    --glow: rgba(32, 176, 248, 0.16);
    --surface: #101e33;
    --surface-2: #16273f;
    --surface-3: #1e314c;
    --ink: #eff4fc;
    --ink-2: #bcc8db;
    --ink-3: #92a3bb;
    --line: #283b57;
    --line-2: #364b6b;
    --drop: #020715;
    --overlay: rgba(2, 7, 21, 0.72);
    --shadow-2: 0 6px 0 var(--drop), 0 16px 32px rgba(0, 0, 0, 0.35);
    --shadow-3: 0 8px 0 var(--drop), 0 24px 48px rgba(0, 0, 0, 0.45);
    --blue: var(--p-400);
    --blue-d: var(--p-600);
    --blue-soft: #0b2a57;
    --on-blue: #081e3a;
    --accent-soft: #422707;
    --green: #37bb62;
    --green-d: #5fd38a;
    --green-soft: #12351f;
    --red: #ed756e;
    --red-d: #c8504a;
    --red-soft: #46191b;
    --purple: var(--p-600);
    --purple-d: var(--p-800);
    --purple-soft: #0d2347;
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 2px 2px, var(--bg-dots) 2px, transparent 0);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}
main { flex: 1 0 auto; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--blue-d); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--p-400) 38%, transparent); color: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.78rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 10px; font-weight: 800; }
.skip-link:focus { top: 8px; }

@media (min-width: 720px) { :root { --gutter: 24px; } }

/* ---------- stroked display headings (the Roblox title look): white letters, a thick navy outline under the fill
   (paint-order: only the outer half of the stroke shows), a hard drop below; the .mark words in the logo blue.
   .h-stroke on a hero h1 (about 6 px of outline, 4 px on a phone), .h-stroke.sm on section headings (about 3.5 px).
   Browsers without paint-order on HTML text get the same outline from layered text-shadows. ---------- */
.h-stroke { color: #fff; letter-spacing: 0.03em; word-spacing: 0.1em; text-wrap: balance;
  text-shadow: -3px -3px 0 var(--stroke), 3px -3px 0 var(--stroke), -3px 3px 0 var(--stroke), 3px 3px 0 var(--stroke),
               0 -3px 0 var(--stroke), 0 3px 0 var(--stroke), -3px 0 0 var(--stroke), 3px 0 0 var(--stroke), 0 7px 0 var(--stroke); }
.h-stroke .mark { color: var(--p-400); background: none; padding: 0; }
@supports (paint-order: stroke fill) {
  .h-stroke { -webkit-text-stroke: 12px var(--stroke); paint-order: stroke fill; text-shadow: 0 6px 0 var(--stroke); }
  .h-stroke.sm { -webkit-text-stroke-width: 7px; text-shadow: 0 4px 0 var(--stroke); }
  @media (max-width: 520px) {
    .h-stroke { -webkit-text-stroke-width: 8px; text-shadow: 0 4px 0 var(--stroke); }
    .h-stroke.sm { -webkit-text-stroke-width: 6px; text-shadow: 0 3px 0 var(--stroke); }
  }
}
h1, h2, h3 { text-wrap: balance; }

/* ---------- icons ---------- */
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.i-fill { fill: currentColor; stroke: none; }

/* ---------- header ---------- */
/* ---------- the launch announcement (base.html, pages._announcement): one line above the header, scrolls away ---------- */
.announce {
  /* the logo's blues, deep to mid (white text: 5.5:1 or more everywhere on it); the pill is the accent */
  --a1: var(--p-900); --a2: var(--p-800); --a3: var(--p-600);
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  background: linear-gradient(100deg, var(--a1) 0%, var(--a2) 50%, var(--a3) 100%);
  border-bottom: 2px solid rgba(0, 0, 0, 0.16);
}
.announce[hidden] { display: none; }
/* the shine: a soft light band that sweeps across now and then */
.announce::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: -40%; width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg) translateX(0); animation: announce-shine 7s ease-in-out 1.2s infinite;
}
@keyframes announce-shine { 0% { transform: skewX(-18deg) translateX(0); } 30%, 100% { transform: skewX(-18deg) translateX(560%); } }
.announce-in { display: flex; align-items: center; gap: 8px; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); min-height: 42px; }
.announce-main { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 10px;
  color: #fff; text-decoration: none; font-weight: 800; font-size: 0.98rem; padding: 8px 0; border-radius: 8px; }
a.announce-main:hover { color: #fff; }
a.announce-main:hover .announce-text { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.announce-pill { flex: none; font-family: var(--font-display); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; line-height: 1; padding: 5px 8px 4px; border-radius: 999px;
  background: var(--yellow); color: var(--ink-on-yellow); box-shadow: 0 2px 0 var(--yellow-d); }
.announce-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18); }
.announce-cta { flex: none; display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-display); font-weight: 600;
  padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); border: 1.5px solid rgba(255, 255, 255, 0.45); white-space: nowrap; }
a.announce-main:hover .announce-cta { background: rgba(255, 255, 255, 0.3); }
.announce-cta .i { width: 1em; height: 1em; stroke-width: 3; }
.announce-x { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: #fff; cursor: pointer; opacity: 0.85; }
.announce-x:hover { opacity: 1; background: rgba(255, 255, 255, 0.18); }
.announce-x .i { width: 18px; height: 18px; stroke-width: 3; }
.announce :focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 640px) {
  .announce-main { justify-content: flex-start; gap: 8px; font-size: 0.9rem; }
  .announce-cta { padding: 3px 6px; font-size: 0; gap: 0; }   /* just the arrow on a phone */
  .announce-cta .i { width: 15px; height: 15px; }
}
@media (prefers-reduced-motion: reduce) { .announce::before { animation: none; display: none; } }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 2px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.02em; flex: none; }
.logo:hover { color: var(--ink); }
/* the stud-brick logo (_logo.html: a 40x40 <img>, srcset 1x / 1.5x / 3x) */
.logo-mark { display: block; flex: none; width: 40px; height: 40px; object-fit: contain; transition: transform 0.2s; }
.logo:hover .logo-mark { transform: rotate(-6deg) scale(1.06); }
@media (prefers-reduced-motion: reduce) { .logo-mark { transition: none; } .logo:hover .logo-mark { transform: none; } }
.logo b { color: var(--blue); font-weight: 700; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--ink-2); text-decoration: none; padding: 8px 14px; border-radius: 12px; }
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); }
/* the header's one primary action (Make a game / Make a map): a small green button */
.nav a.nav-cta { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; color: var(--on-accent); background: var(--accent);
  box-shadow: 0 3px 0 var(--accent-d); transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), filter var(--t); }
.nav a.nav-cta::after { display: none; }
.nav a.nav-cta .i { width: 1.05em; height: 1.05em; }
.nav a.nav-cta:hover { color: var(--on-accent); background: var(--accent); filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 4px 0 var(--accent-d); }
.nav a.nav-cta:active { transform: translateY(3px); box-shadow: 0 0 0 var(--accent-d); }
.nav a.nav-cta[aria-current="page"] { color: var(--on-accent); background: var(--accent); box-shadow: 0 3px 0 var(--accent-d), 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.header-right { position: relative; margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; box-shadow: 0 3px 0 var(--drop); font: inherit; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--drop); }
.icon-btn .i { width: 20px; height: 20px; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
.account-slot { display: flex; align-items: center; min-width: 42px; min-height: 42px; }
.account-skel { width: 104px; height: 42px; border-radius: 14px; }
.avatar-btn { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 800; font-size: 0.95rem; cursor: pointer; box-shadow: 0 3px 0 var(--drop); max-width: 210px; font-family: inherit; }
.avatar-btn .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); object-fit: cover; flex: none; }
.avatar-letter { display: inline-grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; line-height: 1; }
.avatar-lg.avatar-letter { font-size: 2rem; }
.map-card .meta .avatar-letter { font-size: 0.7rem; }
.avatar-lg { width: 72px; height: 72px; border-radius: 22px; border: 3px solid var(--surface); box-shadow: 0 4px 0 var(--drop); }
.menu { position: absolute; right: 0; top: calc(100% + 10px); background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); box-shadow: 0 6px 0 var(--drop), 0 18px 40px rgba(10, 20, 60, 0.18); padding: 8px; min-width: 220px; z-index: 50; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font: inherit; font-weight: 700; background: none; border: 0; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-3); }
.menu .menu-head { padding: 8px 12px 10px; border-bottom: 2px solid var(--line); margin-bottom: 6px; }
.menu-toggle { display: none; }
.nav-theme { display: none; }

@media (max-width: 760px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--surface); border-bottom: 2px solid var(--line); flex-direction: column; padding: 8px var(--gutter) 14px; margin: 0; box-shadow: 0 12px 24px rgba(10, 20, 60, 0.12); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1.1rem; }
  .nav a.nav-cta { justify-content: center; margin: 4px 0 8px; padding: 14px; font-size: 1.2rem; border-radius: 16px; }
  .menu-toggle { display: inline-grid; }
  .nav .nav-theme { display: block; text-align: left; font: inherit; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--ink-2); background: none; border: 0; border-top: 2px dashed var(--line); margin-top: 6px; padding: 14px 14px 6px; cursor: pointer; }
  .avatar-btn .name { display: none; }
  .avatar-btn { padding: 3px; }
  .logo { font-size: 1.3rem; }
  .logo-mark { width: 34px; height: 34px; }
}

/* ---------- buttons ---------- */
.btn {
  --b: var(--blue); --bd: var(--blue-d); --bt: var(--on-blue);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; line-height: 1.1; letter-spacing: 0.01em;
  color: var(--bt); background: var(--b);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%);
  border: 0; border-radius: 16px;
  box-shadow: 0 5px 0 var(--bd), 0 9px 18px rgba(8, 30, 58, 0.16);
  text-decoration: none; text-align: center; cursor: pointer; user-select: none;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), filter var(--t), background-color var(--t);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--bt); filter: brightness(1.06) saturate(1.05); transform: translateY(-2px); box-shadow: 0 7px 0 var(--bd), 0 14px 26px rgba(8, 30, 58, 0.2); }
/* the stud press: the button sinks onto its own shadow */
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--bd), 0 3px 8px rgba(8, 30, 58, 0.14); transition-duration: 0.06s; }
.btn .i { width: 1.2em; height: 1.2em; }
/* the call to action (Make a game, Generate, Build): the one warm colour on a blue site, with the ink navy on it */
.btn-go, .btn-yellow { --b: var(--accent); --bd: var(--accent-d); --bt: var(--on-accent);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 55%),
                    linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.5) 50%, transparent 65%);
  background-size: 100% 100%, 260% 100%; background-position: 0 0, 160% 0; background-repeat: no-repeat; }
/* a shine sweeps across the call to action on hover */
.btn-go:hover, .btn-yellow:hover { animation: btn-shine 0.75s var(--ease); }
@keyframes btn-shine { from { background-position: 0 0, 160% 0; } to { background-position: 0 0, -60% 0; } }
.btn-pink { --b: var(--red); --bd: var(--red-d); --bt: #fff; }
.btn-purple { --b: var(--purple); --bd: var(--purple-d); --bt: #fff; }
.btn-dark { --b: var(--ink); --bd: #000; --bt: var(--surface); }
:root[data-theme="dark"] .btn-dark { --b: var(--ink); --bd: var(--ink-3); --bt: #081e3a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-dark { --b: var(--ink); --bd: var(--ink-3); --bt: #081e3a; } }
.btn-ghost { --b: var(--surface); --bd: var(--drop); --bt: var(--ink); background-image: none; border: 2px solid var(--line); box-shadow: 0 4px 0 var(--drop); }
.btn-ghost:hover { border-color: var(--line-2); box-shadow: 0 5px 0 var(--drop); }
.btn-ghost:active { box-shadow: 0 1px 0 var(--drop); }
.btn-lg { min-height: 58px; padding: 14px 28px; font-size: 1.25rem; border-radius: 20px; }
.btn-xl { min-height: 66px; padding: 16px 32px; font-size: 1.4rem; border-radius: 22px; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 0.95rem; border-radius: 12px; box-shadow: 0 3px 0 var(--bd); }
.btn-sm:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--bd); }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.is-disabled { --b: var(--surface-3); --bd: var(--line-2); --bt: var(--ink-3); cursor: not-allowed; filter: none; transform: none; background-image: none; }
.btn.is-locked { --b: var(--surface-3); --bd: var(--line-2); --bt: var(--ink-2); background-image: none; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
.btn-link { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- badges, chips, pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-family: var(--font-display); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.6; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.badge .i { width: 0.95em; height: 0.95em; stroke-width: 3; }
.badge-lock { background: var(--purple); color: #fff; box-shadow: 0 2px 0 var(--purple-d); }
.badge-lock.lk-login { background: var(--ink); color: var(--surface); box-shadow: none; }
.badge-yellow { background: var(--yellow); color: var(--ink-on-yellow); box-shadow: 0 2px 0 var(--yellow-d); }
.badge-green { background: var(--green); color: #081e3a; box-shadow: 0 2px 0 var(--green-d); }
.badge-blue { background: var(--blue); color: var(--on-blue); box-shadow: 0 2px 0 var(--blue-d); }
.badge-pink { background: var(--red); color: #fff; box-shadow: 0 2px 0 var(--red-d); }
:root[data-theme="dark"] .badge-pink { color: #081e3a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge-pink { color: #081e3a; } }
.tier-free { background: var(--surface-3); color: var(--ink-2); }
.tier-pro { background: var(--purple); color: #fff; box-shadow: 0 2px 0 var(--purple-d); }
.tier-studio { background: var(--yellow); color: var(--ink-on-yellow); box-shadow: 0 2px 0 var(--yellow-d); }
.tier-anonymous { background: var(--surface-3); color: var(--ink-3); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); color: var(--ink-2); font-weight: 700; font-size: 0.92rem; cursor: pointer; box-shadow: 0 3px 0 var(--drop); font-family: inherit; line-height: 1.25; text-align: left; }
.chip:hover { color: var(--ink); border-color: var(--blue); }
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--drop); }
.chips-scroll { padding: 2px 0 4px; }
.chips-scroll .chip { padding: 5px 12px; font-size: 0.86rem; }
.chips-scroll .chip { flex: none; }
/* "🎲 More ideas" after the idea chips (static/js/ideas.js) */
.chip.chip-more { border-style: dashed; background: transparent; box-shadow: none; color: var(--ink-3); }
.chip.chip-more:hover { color: var(--ink); border-color: var(--blue); }
.chip.chip-more:active { transform: none; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-weight: 800; font-size: 0.8rem; }
.tag .dot { width: 10px; height: 10px; border-radius: 50%; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 6px 0 var(--drop); padding: 22px; }
.card-tight { padding: 16px; }
.card h2, .card h3 { margin-top: 0; }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-title h2, .card-title h3 { margin: 0; }
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.section-head p { color: var(--ink-2); font-size: 1.1rem; }
.eyebrow { display: inline-block; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.82rem; color: var(--blue); margin-bottom: 8px; }
.skel { background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 10px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- forms ---------- */
label { font-weight: 800; }
.field-label { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; margin-bottom: 8px; color: var(--ink); }
.input, .textarea, select.input {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface-2); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 22%, transparent); }
.textarea { resize: vertical; min-height: 110px; line-height: 1.45; }
.counter { font-size: 0.8rem; color: var(--ink-3); font-weight: 700; }
.counter.warn { color: var(--pink); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; background: var(--surface-2); border: 2px solid var(--line); border-radius: 16px; }
.seg-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 42px; padding: 6px 4px; border: 0; border-radius: 11px; background: transparent; color: var(--ink-2); font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; cursor: pointer; line-height: 1.1; }
.seg-btn:hover { background: var(--surface-3); color: var(--ink); }
.seg-btn[aria-pressed="true"] { background: var(--blue); color: var(--on-blue); box-shadow: 0 3px 0 var(--blue-d); }
.seg-btn.locked { color: var(--ink-3); }
.seg-btn .badge { position: absolute; top: -9px; right: -4px; font-size: 0.62rem; padding: 0 6px; line-height: 1.5; }
.seg-btn .seg-sub { font-family: var(--font-body, inherit); font-weight: 700; font-size: 0.7rem; opacity: 0.8; }
/* /create: Studio's giant sizes, their own row under the four sizes (create.js renderSizes) */
.size-giant .field-label .badge { margin-left: 4px; font-size: 0.64rem; padding: 0 7px; vertical-align: 1px; }
.seg-giant { background: linear-gradient(180deg, color-mix(in srgb, var(--yellow) 12%, var(--surface-2)), var(--surface-2)); }
.seg-giant .seg-btn { min-height: 50px; }
.size-giant-note { margin: 6px 2px 0; font-size: 0.8rem; line-height: 1.35; color: var(--ink-2); }
.size-giant-note a { font-weight: 800; white-space: nowrap; }
/* "Custom size" (create.js): a chip that opens a slider + a number in studs; the track's coloured part is what the plan
   builds (--ok), past it a width shows the plan that builds it */
.size-custom { display: grid; gap: 6px; margin-top: 8px; }
.size-custom[hidden], .size-custom-row[hidden], .size-custom-note[hidden] { display: none; }
.size-custom-btn { justify-self: start; }
.pc-row > .size-custom { grid-column: 2; margin-top: 4px; min-width: 0; }
.pc-row > .size-custom .size-custom-btn { padding: 4px 11px; font-size: 0.86rem; }
.size-custom-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.size-custom-range { flex: 1 1 auto; min-width: 0; height: 28px; accent-color: var(--blue); background: transparent; }
.size-custom-range::-webkit-slider-runnable-track { height: 8px; border-radius: 99px;
  background: linear-gradient(90deg, var(--p-300) 0 var(--ok, 100%), var(--line-2) var(--ok, 100%) 100%); }
.size-custom-range::-moz-range-track { height: 8px; border-radius: 99px;
  background: linear-gradient(90deg, var(--p-300) 0 var(--ok, 100%), var(--line-2) var(--ok, 100%) 100%); }
.size-custom-range::-webkit-slider-thumb { margin-top: -6px; }
.size-custom-num { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink-2); font-size: 0.86rem; }
.size-custom-num .input { width: 84px; min-height: 0; height: 36px; padding: 4px 8px; border-radius: 10px; text-align: right; font-variant-numeric: tabular-nums; }
.size-custom-row.locked .size-custom-num .input { border-color: var(--line-2); color: var(--ink-3); }
.size-custom-note { margin: 0 2px; line-height: 1.35; }
.size-custom-note.is-locked { color: var(--ink-2); font-weight: 600; }
.size-custom-note .badge { margin-right: 2px; }
.size-custom-note a { font-weight: 800; white-space: nowrap; }
/* "Terrain: On / Off" (create.js, gamecreate.js): two small buttons, the line under them says what Off means */
.terrain-seg { max-width: 220px; }
.terrain-seg .seg-btn { min-height: 34px; font-size: 0.92rem; }
.terrain-note { margin-top: 6px; }

.picker-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 8px 12px; background: var(--surface-2); border: 2px solid var(--line); border-radius: 14px; color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; text-align: left; }
.picker-btn:hover { border-color: var(--blue); }
.picker-btn .sw { width: 30px; height: 30px; border-radius: 9px; flex: none; border: 2px solid rgba(0, 0, 0, 0.08); }
.picker-btn .pv { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-btn .i-chev { color: var(--ink-3); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px 10px; padding-top: 6px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px; min-height: 76px; background: var(--surface-2); border: 2px solid var(--line); border-radius: 16px; cursor: pointer; text-align: left; color: var(--ink); font: inherit; box-shadow: 0 3px 0 var(--drop); }
.tile:hover { border-color: var(--blue); }
.tile:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--drop); }
.tile[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 3px 0 var(--blue); }
.tile b { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1.15; }
.tile span.h { font-size: 0.8rem; color: var(--ink-2); font-weight: 700; line-height: 1.25; }
.tile .sw { width: 100%; height: 34px; border-radius: 10px; margin-bottom: 6px; border: 2px solid rgba(0, 0, 0, 0.06); }
.tile .badge { position: absolute; top: -9px; right: 8px; font-size: 0.66rem; padding: 0 7px; }
.tile.locked b, .tile.locked span.h { opacity: 0.65; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 800; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 48px; height: 28px; border-radius: 999px; background: var(--surface-3); border: 2px solid var(--line-2); position: relative; transition: background 0.15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2); transition: transform 0.18s; }
.switch input:checked + .track { background: var(--green); border-color: var(--green-d); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- alerts / notes ---------- */
.note { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px 16px; border-radius: var(--r); background: var(--blue-soft); color: var(--ink); border: 2px solid color-mix(in srgb, var(--blue) 30%, transparent); }
.note .i { color: var(--blue); width: 22px; height: 22px; margin-top: 1px; }
.note-yellow { background: var(--yellow-soft); border-color: color-mix(in srgb, var(--yellow-d) 40%, transparent); }
.note-yellow .i { color: var(--yellow-d); }
.note-pink { background: var(--pink-soft); border-color: color-mix(in srgb, var(--pink) 35%, transparent); }
.note-pink .i { color: var(--pink); }
.note-green { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.note-green .i { color: var(--green-d); }
.note p:last-child { margin-bottom: 0; }

/* ---------- toast ---------- */
.toasts { position: fixed; z-index: 90; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 440px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: var(--ink); color: var(--surface); font-weight: 800; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.25), 0 14px 30px rgba(0, 0, 0, 0.25); animation: toast-in 0.25s cubic-bezier(0.2, 1.4, 0.4, 1); max-width: 100%; }
.toast.ok { background: var(--green-d); color: #fff; }
.toast.err { background: var(--pink-d); color: #fff; }
.toast.out { animation: toast-out 0.2s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ---------- modal ---------- */
dialog.modal { border: 0; padding: 0; background: transparent; color: var(--ink); max-width: min(94vw, 640px); width: 100%; max-height: min(88vh, 860px); overflow: visible; }
dialog.modal::backdrop { background: var(--overlay); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: pop 0.24s cubic-bezier(0.2, 1.3, 0.4, 1); }
.modal-box { background: var(--surface); border: 2px solid var(--line); border-radius: 28px; box-shadow: 0 8px 0 var(--drop), 0 30px 60px rgba(0, 0, 0, 0.3); padding: 24px; max-height: min(88vh, 860px); overflow: auto; }
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { margin: 0; font-size: 1.5rem; }
.modal-head .icon-btn { margin-left: auto; }
dialog.modal.modal-wide { max-width: min(96vw, 860px); }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(10px); } }
@media (max-width: 560px) {
  dialog.modal, dialog.modal.modal-wide { max-width: 100vw; margin: auto 0 0; max-height: 92vh; }
  .modal-box { border-radius: 26px 26px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); max-height: 92vh; }
  dialog.modal[open] { animation: sheet 0.26s cubic-bezier(0.2, 1, 0.3, 1); }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }

/* ---------- plan cards (pricing + upsell) ---------- */
.plans { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); padding: 24px 22px; box-shadow: 0 6px 0 var(--drop); }
.plan.hot { border-color: var(--purple); box-shadow: 0 6px 0 var(--purple-d); }
.plan.gold { border-color: var(--yellow-d); box-shadow: 0 6px 0 var(--yellow-d); }
.plan .ribbon { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); }
.plan h3 { font-size: 1.5rem; margin: 0; }
.plan .price { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1; }
.plan .price small { font-size: 1rem; color: var(--ink-2); font-weight: 600; }
.plan .tagline { color: var(--ink-2); font-weight: 700; margin: 0; }
.plan ul { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 9px; }
.plan li { display: flex; gap: 9px; align-items: flex-start; font-weight: 700; }
.plan li .i { color: var(--green); stroke-width: 3; margin-top: 2px; }
.plan li.no { color: var(--ink-3); font-weight: 600; }
.plan li.no .i { color: var(--ink-3); }
.plan .btn { margin-top: auto; }
.mini-plans { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.mini-plan { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 20px; background: var(--surface-2); border: 2px solid var(--line); }
.mini-plan.hot { border-color: var(--purple); background: var(--purple-soft); }
.mini-plan .price { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; line-height: 1; }
.mini-plan .price small { font-size: 0.85rem; color: var(--ink-2); }
.mini-plan ul { margin: 0; padding-left: 18px; font-size: 0.9rem; font-weight: 700; color: var(--ink-2); }
.mini-plan .btn { margin-top: auto; }
/* the free try's card (app.js freeTryCard): one row per option, the price on its button */
.free-try-options { display: grid; gap: 10px; margin-top: 4px; }
.free-try-option { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 2px solid var(--line); }
.free-try-option .grow { flex: 1; min-width: 0; }
.free-try-option .btn { flex: none; white-space: nowrap; }
.free-try-status { display: flex; gap: 10px; align-items: flex-start; }

/* ---------- footer ---------- */
.site-footer { margin-top: 64px; background: var(--surface); border-top: 2px solid var(--line); padding: 36px 0 28px; color: var(--ink-2); font-size: 0.95rem; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 1.4fr repeat(3, 1fr); }
.footer-grid h4 { font-size: 1rem; color: var(--ink); margin-bottom: 10px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-grid a { color: var(--ink-2); text-decoration: none; font-weight: 700; }
.footer-grid a:hover { color: var(--blue); }
.footer-fine { margin-top: 26px; padding-top: 18px; border-top: 2px dashed var(--line); font-size: 0.82rem; color: var(--ink-3); display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.footer-brand p { margin-top: 10px; max-width: 320px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- landing ---------- */
.hero { position: relative; padding: 48px 0 40px; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; grid-template-columns: 1.1fr 1fr; align-items: center; }
.hero h1 { margin-bottom: 16px; font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
.hero h1 .pop { display: inline-block; color: var(--blue); position: relative; }
/* (the old yellow marker bar is gone: headlines use the stroked style, .h-stroke below) */
.hero h1 .mark { color: var(--p-400); }
.hero .lead { font-size: 1.2rem; color: var(--ink-2); max-width: 540px; font-weight: 600; }
.hero-prompt { margin-top: 22px; display: flex; gap: 10px; padding: 8px; background: var(--surface); border: 2px solid var(--line); border-radius: 22px; box-shadow: 0 6px 0 var(--drop); max-width: 600px; }
.hero-prompt input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.08rem; font-weight: 700; color: var(--ink); padding: 8px 10px; }
.hero-prompt input:focus { outline: none; }
.hero-prompt:focus-within { border-color: var(--blue); }
.hero .chips { margin-top: 16px; max-width: 620px; }
.hero-trust { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 20px; font-weight: 800; color: var(--ink-2); font-size: 0.92rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust .i { color: var(--green); stroke-width: 3; }
.hero-art { position: relative; aspect-ratio: 16 / 11; }
.hero-card { position: absolute; border-radius: 22px; overflow: hidden; border: 4px solid var(--surface); box-shadow: 0 8px 0 var(--drop), 0 24px 50px rgba(10, 20, 60, 0.25); background: var(--surface-3); }
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card.c1 { inset: 0 12% 18% 0; transform: rotate(-2.5deg); animation: bob 6s ease-in-out infinite; }
.hero-card.c2 { width: 48%; aspect-ratio: 16 / 10; right: 0; bottom: 0; transform: rotate(4deg); animation: bob 6s ease-in-out -3s infinite; }
.hero-bubble { position: absolute; left: -2%; bottom: 6%; max-width: 62%; background: var(--surface); border: 2px solid var(--line); border-radius: 18px 18px 18px 4px; padding: 10px 14px; font-weight: 800; box-shadow: 0 5px 0 var(--drop); font-size: 0.95rem; z-index: 2; }
.hero-bubble .caret { display: inline-block; width: 2px; height: 1.05em; background: var(--blue); vertical-align: -0.15em; margin-left: 2px; animation: blink 1s steps(1) infinite; }
.hero-sticker { position: absolute; top: -4%; right: 8%; z-index: 2; transform: rotate(8deg); }
@keyframes bob { 50% { translate: 0 -8px; } }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 560px; width: 100%; margin: 8px auto 0; }
}
@media (max-width: 520px) {
  .hero { padding-top: 28px; }
  .hero-prompt { flex-direction: column; border-radius: 20px; }
  .hero-prompt .btn { width: 100%; }
}

.steps { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.step { position: relative; padding: 26px 22px 22px; }
.step .num { position: absolute; top: -18px; left: 20px; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--on-blue); background: var(--blue); box-shadow: 0 4px 0 var(--blue-d); }
.step:nth-child(2) .num { background: var(--purple); box-shadow: 0 4px 0 var(--purple-d); }
.step:nth-child(3) .num { background: var(--green); box-shadow: 0 4px 0 var(--green-d); }
.step h3 { margin-top: 10px; }
.step p { color: var(--ink-2); margin: 0; font-weight: 600; }
.step .step-art { margin-top: 14px; border-radius: 14px; overflow: hidden; background: var(--surface-2); border: 2px solid var(--line); aspect-ratio: 16 / 9; display: grid; place-items: center; }
.step .step-art img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 30px; } }

.genres { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.genre { padding: 10px 18px; border-radius: 16px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18); text-decoration: none; }
.genre:hover { color: #fff; transform: translateY(-2px) rotate(-1deg); }
.genre:nth-child(6n + 1) { background: var(--blue); }
.genre:nth-child(6n + 2) { background: var(--pink); }
.genre:nth-child(6n + 3) { background: var(--green); }
.genre:nth-child(6n + 4) { background: var(--purple); }
.genre:nth-child(6n + 5) { background: var(--orange); }
.genre:nth-child(6n + 6) { background: #14b8c4; }

.cta-band { background: radial-gradient(60% 90% at 20% 0%, color-mix(in srgb, var(--p-400) 45%, transparent), transparent 70%),
  linear-gradient(135deg, var(--p-600), var(--p-800)); color: #fff; border-radius: 32px; padding: 44px 28px; text-align: center;
  box-shadow: 0 8px 0 var(--p-900), 0 24px 48px color-mix(in srgb, var(--p-800) 30%, transparent); position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.9); font-size: 1.12rem; font-weight: 700; }
.cta-band::before, .cta-band::after { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 28px; background: rgba(255, 255, 255, 0.1); transform: rotate(20deg); }
.cta-band::before { top: -50px; left: -30px; }
.cta-band::after { bottom: -60px; right: -20px; width: 180px; height: 180px; }

/* ---------- gallery ---------- */
.grid-maps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.map-card { display: flex; flex-direction: column; background: var(--surface); border: 2px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 5px 0 var(--drop); color: var(--ink); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.map-card:hover { color: var(--ink); transform: translateY(-3px) rotate(-0.4deg); box-shadow: 0 8px 0 var(--drop), 0 16px 30px rgba(10, 20, 60, 0.14); }
.map-card .thumb { position: relative; aspect-ratio: 16 / 10; background: var(--surface-3); overflow: hidden; }
.map-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.map-card:hover .thumb img { transform: scale(1.04); }
.map-card .thumb .badge { position: absolute; top: 10px; left: 10px; }
.map-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.map-card .prompt { font-weight: 800; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.map-card .meta { display: flex; align-items: center; gap: 8px; margin-top: auto; font-size: 0.85rem; color: var(--ink-3); font-weight: 700; min-width: 0; }
.map-card .meta .avatar { width: 22px; height: 22px; }
.map-card .meta .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-card.skel-card .thumb { animation: shimmer 1.4s linear infinite; background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; }
.map-card .status-pill { position: absolute; bottom: 10px; left: 10px; top: auto; right: auto; width: auto; height: auto; }
.gallery-sentinel { height: 1px; }
.placeholder-art { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, #8fd3ff, #bff0a8); color: rgba(20, 40, 80, 0.55); }
.placeholder-art svg { width: 38%; height: auto; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { padding-left: 42px; }
.empty { text-align: center; padding: 44px 20px; color: var(--ink-2); }
.empty .blob { width: 120px; margin: 0 auto 14px; }

/* ---------- create ---------- */
.create-grid { display: grid; gap: 24px; grid-template-columns: minmax(320px, 420px) 1fr; align-items: start; padding-top: 28px; }
.create-panel { position: static; }
/* sticky on tall screens, and its own scroll area: a form taller than the window (the UI Designer's) scrolls by
   itself under the wheel instead of dragging the page (and the results on the right) along */
@media (min-width: 901px) and (min-height: 940px) {
  .create-panel { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px);
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; border-radius: 26px; }
}
.create-panel .card { padding: 20px; }
.create-panel h1 { font-size: 1.7rem; margin-bottom: 4px; }
.opt-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.opt-grid .full { grid-column: 1 / -1; }
.prompt-wrap { position: relative; }
.prompt-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.advanced { border-top: 2px dashed var(--line); padding-top: 12px; }
.advanced summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 6px; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary .i { transition: transform 0.2s; }
.advanced[open] summary .i { transform: rotate(90deg); }
.seed-row { display: flex; gap: 8px; margin-top: 10px; }
.seed-row .input { flex: 1; }
.gen-foot { display: flex; flex-direction: column; gap: 10px; }
.quota { display: flex; align-items: center; gap: 8px; justify-content: center; font-weight: 800; font-size: 0.9rem; color: var(--ink-2); text-align: center; }
.quota .dots { display: inline-flex; gap: 4px; }
.quota .dots i { width: 10px; height: 10px; border-radius: 4px; background: var(--green); display: inline-block; box-shadow: 0 2px 0 var(--green-d); }
.quota .dots i.used { background: var(--surface-3); box-shadow: 0 2px 0 var(--line-2); }
.gen-note { display: flex; gap: 8px; align-items: flex-start; justify-content: center; margin: 0; font-size: 0.85rem; font-weight: 700; color: var(--ink-2); text-align: left; }
.gen-note .i { color: var(--blue); margin-top: 2px; }
.result-notice { justify-content: flex-start; margin: 10px 0 0; }
.turnstile-box { display: flex; justify-content: center; min-height: 0; }

.stage { min-height: 440px; }
.stage-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; min-height: 440px; padding: 30px; border: 3px dashed var(--line-2); border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--ink-2); }
.stage-empty h2 { font-size: 1.6rem; color: var(--ink); margin: 0; }
.stage-empty .iso { width: 190px; }

.gen-card { overflow: hidden; padding: 0; }
.gen-visual { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(180deg, #8fd3ff 0%, #d4f0ff 60%, #bdeaa5 100%); overflow: hidden; }
:root[data-theme="dark"] .gen-visual { background: linear-gradient(180deg, #1c2a66 0%, #2c3f8a 60%, #1f5a3a 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gen-visual { background: linear-gradient(180deg, #1c2a66 0%, #2c3f8a 60%, #1f5a3a 100%); } }
.gen-visual > img { width: 100%; height: 100%; object-fit: cover; }
.gen-visual.top-mode > img { object-fit: contain; background: #0f5b66; }
.builder { position: absolute; inset: 0; display: grid; place-items: center; }
.builder svg { width: min(58%, 340px); height: auto; overflow: visible; }
.builder .blk { transform-box: fill-box; transform-origin: center; animation: drop 2.4s cubic-bezier(0.3, 1.4, 0.5, 1) infinite; opacity: 0; }
@keyframes drop { 0% { opacity: 0; transform: translateY(-60px); } 18%, 78% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(0); } }
.gen-progress { padding: 20px 22px 22px; }
.progress { position: relative; height: 22px; border-radius: 999px; background: var(--surface-3); border: 2px solid var(--line); overflow: hidden; }
.progress > span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background-color: var(--green); background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.25) 0 10px, transparent 10px 20px); background-size: 28px 28px; animation: stripes 0.8s linear infinite; transition: width 0.6s ease; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15); }
@keyframes stripes { to { background-position: 28px 0; } }
.stage-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(4, 1fr); }
.stage-list li { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 0.86rem; color: var(--ink-3); }
.stage-list li .dot { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line-2); flex: none; display: grid; place-items: center; }
.stage-list li.on { color: var(--ink); }
.stage-list li.on .dot { border-color: var(--blue); border-right-color: transparent; animation: spin 0.9s linear infinite; }
.stage-list li.done { color: var(--green-d); }
.stage-list li.done .dot { background: var(--green); border-color: var(--green); }
.stage-list li.done .dot::after { content: ""; width: 6px; height: 10px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }
@media (max-width: 560px) { .stage-list { grid-template-columns: 1fr 1fr; } }
.gen-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.gen-status h2 { font-size: 1.3rem; margin: 0; }
.gen-status .elapsed { font-weight: 800; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.view-tabs { position: absolute; top: 12px; right: 12px; display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(12, 18, 40, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); z-index: 2; }
.view-tabs button { border: 0; background: transparent; color: #fff; font-family: var(--font-display); font-weight: 600; padding: 6px 12px; border-radius: 10px; cursor: pointer; font-size: 0.92rem; }
.view-tabs button[aria-pressed="true"] { background: #fff; color: #10152b; }
.visual-name { position: absolute; left: 14px; bottom: 12px; z-index: 2; padding: 6px 14px; border-radius: 14px; background: rgba(12, 18, 40, 0.6); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-body { padding: 18px 22px 22px; display: grid; gap: 16px; }
.result-prompt { font-size: 1.1rem; font-weight: 800; margin: 0; }
.result-prompt q { quotes: "\201C" "\201D"; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stat { background: var(--surface-2); border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.stat span { font-size: 0.78rem; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.actions { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 10px; align-items: start; }
.actions .btn { min-width: 0; }
@media (max-width: 560px) { .actions { grid-template-columns: 1fr 1fr; } .actions .export-slot { grid-column: 1 / -1; } }
.export-slot { display: flex; flex-direction: column; gap: 6px; }
.export-sub { font-size: 0.82rem; font-weight: 800; color: var(--ink-3); text-align: center; }
.lock-banner { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; background: linear-gradient(135deg, var(--purple-soft), var(--blue-soft)); border: 2px solid color-mix(in srgb, var(--purple) 35%, transparent); }
.lock-banner .lk { width: 48px; height: 48px; border-radius: 16px; background: var(--purple); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 0 var(--purple-d); flex: none; }
.lock-banner .lk .i { width: 24px; height: 24px; }
.lock-banner p { margin: 0; font-weight: 800; }
.lock-banner .grow { flex: 1; min-width: 0; }
@media (max-width: 560px) { .lock-banner { flex-wrap: wrap; } .lock-banner .btn { width: 100%; } }
.export-done { display: grid; gap: 12px; padding: 16px; border-radius: 20px; background: var(--green-soft); border: 2px solid color-mix(in srgb, var(--green) 40%, transparent); }
.export-done h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.export-done ol { margin: 0; padding-left: 20px; font-weight: 700; display: grid; gap: 4px; }
/* MAP_RBXL: the .rbxl is the hero (Download, Open in Studio, Play); the plugin folds away under it */
.export-rbxl .rbxl-slot { display: grid; gap: 8px; min-height: 58px; }
.rbxl-slot .btn-lg { white-space: nowrap; }
@media (max-width: 560px) { .rbxl-slot .btn-lg { font-size: 1.1rem; padding: 14px 16px; } }
.export-done ol.rbxl-steps { list-style: none; padding: 0; counter-reset: rbxl; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; color: var(--ink-2); }
.rbxl-steps li { counter-increment: rbxl; display: flex; align-items: center; gap: 8px; }
.rbxl-steps li::before { content: counter(rbxl); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 0.8rem; font-weight: 800; background: var(--green); color: #fff; box-shadow: 0 2px 0 var(--green-d); }
.rbxl-facts { text-align: center; color: var(--ink-2); font-weight: 700; }
.rbxl-plugin { border-top: 2px dashed color-mix(in srgb, var(--green) 35%, transparent); padding-top: 12px; }
.rbxl-plugin summary { cursor: pointer; font-weight: 800; color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 6px; min-height: 32px; }
.rbxl-plugin summary::-webkit-details-marker { display: none; }
.rbxl-plugin summary .i { flex: none; transition: transform 0.2s; }
.rbxl-plugin[open] summary .i { transform: rotate(90deg); }
.rbxl-plugin summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.rbxl-plugin-body { display: grid; gap: 12px; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .rbxl-plugin summary .i { transition: none; } }
.share-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 4px; border-top: 2px dashed var(--line); }
/* optional modules' buttons for a creation's owner (BM.ownerActions) */
.owner-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.recent { margin-top: 28px; }
.recent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.recent-item { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--surface); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--drop); cursor: pointer; text-align: left; padding: 0; font: inherit; color: var(--ink); }
.recent-item:hover { border-color: var(--blue); }
.recent-item .thumb { aspect-ratio: 16 / 10; background: var(--surface-3); overflow: hidden; }
.recent-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-item span { padding: 6px 10px 8px; font-size: 0.82rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-item[aria-current="true"] { border-color: var(--blue); box-shadow: 0 3px 0 var(--blue); }
@media (max-width: 900px) {
  .create-grid { grid-template-columns: 1fr; padding-top: 18px; }
  .create-panel { position: static; }
  .stage, .stage-empty { min-height: 300px; }
}
@media (max-width: 420px) { .opt-grid { grid-template-columns: 1fr; } }

/* ---------- share ---------- */
.share-hero { padding-top: 28px; display: grid; gap: 24px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.share-side { display: grid; gap: 18px; min-width: 0; }
.owner-line { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.owner-line .avatar { width: 40px; height: 40px; }
.top-thumb { border-radius: 18px; overflow: hidden; border: 2px solid var(--line); aspect-ratio: 1; background: #0f5b66; }
.top-thumb img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 900px) { .share-hero { grid-template-columns: 1fr; } }

/* ---------- pricing ---------- */
.pricing-head { padding: 48px 0 34px; text-align: center; }
.pricing-head p { font-size: 1.15rem; color: var(--ink-2); font-weight: 600; max-width: 620px; margin: 0 auto; }
.pack { display: grid; gap: 20px; grid-template-columns: auto 1fr auto; align-items: center; background: linear-gradient(135deg, var(--yellow-soft), var(--surface)); border: 2px solid var(--yellow-d); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: 0 6px 0 var(--yellow-d); margin-top: 34px; }
.pack .coin { width: 76px; height: 76px; }
.pack h3 { font-size: 1.45rem; margin-bottom: 4px; }
.pack p { margin: 0; color: var(--ink-2); font-weight: 700; }
.pack .price { font-family: var(--font-display); font-weight: 700; font-size: 2rem; text-align: right; line-height: 1; margin-bottom: 8px; }
@media (max-width: 700px) { .pack { grid-template-columns: 1fr; text-align: center; } .pack .coin { margin: 0 auto; } .pack .price { text-align: center; } }
.compare-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 2px solid var(--line); background: var(--surface); box-shadow: 0 6px 0 var(--drop); -webkit-overflow-scrolling: touch; }
table.compare { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare th, .compare td { padding: 13px 16px; text-align: center; border-bottom: 2px solid var(--line); font-weight: 700; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare thead th { font-family: var(--font-display); font-size: 1.1rem; background: var(--surface-2); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
table.compare.compare-6 { min-width: 680px; }   /* + Studio Max (2026-10-14) */
.compare .yes { color: var(--green-d); }
.compare .no { color: var(--ink-3); }
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 0 18px; box-shadow: var(--shadow-1);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t); }
.faq details:hover { border-color: color-mix(in srgb, var(--p-400) 45%, var(--line)); background: color-mix(in srgb, var(--p-50) 55%, var(--surface)); }
.faq details[open] { border-color: color-mix(in srgb, var(--p-400) 60%, var(--line)); box-shadow: 0 4px 0 color-mix(in srgb, var(--p-400) 35%, var(--drop)); }
.faq summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
/* the + turns into a × as it opens */
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px;
  font-size: 1.45rem; line-height: 1; color: var(--blue); background: var(--blue-soft); transition: transform 0.28s var(--ease), background-color var(--t), color var(--t); }
.faq details[open] summary::after { transform: rotate(135deg); background: var(--blue); color: var(--on-blue); }
.faq details p { color: var(--ink-2); font-weight: 600; margin: 0; padding: 0 0 16px; }

/* ---------- account ---------- */
.account-grid { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; padding-top: 28px; }
.account-grid .span-2 { grid-column: 1 / -1; }
.profile { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile h1, .profile h2 { font-size: 1.9rem; margin: 0; }
/* a side card's heading: an h2 for the outline (one h1 per page, no skipped level), sized like the h3 it was */
.side-h { font-size: 1.25rem; }
.share-head { display: grid; gap: 2px; }
.share-title { font-size: 1.5rem; margin: 0; overflow-wrap: anywhere; }
.profile .spacer { min-width: 10px; }
.usage { display: grid; gap: 16px; }
.usage-row .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 800; margin-bottom: 6px; }
.usage-row .top span { color: var(--ink-2); font-size: 0.9rem; }
.exports-left { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 2px solid var(--line); }
.exports-left .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.exports-left-n { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.exports-left.is-empty { background: var(--yellow-soft); border-color: color-mix(in srgb, var(--yellow-d) 40%, transparent); }
@media (max-width: 420px) { .exports-left { flex-wrap: wrap; } .exports-left .btn { width: 100%; } }
.bar { height: 18px; border-radius: 999px; background: var(--surface-3); border: 2px solid var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--blue); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15); transition: width 0.8s cubic-bezier(0.2, 1, 0.3, 1); }
.bar.green > span { background: var(--green); }
.bar.warn > span { background: var(--orange); }
.bar.full > span { background: var(--pink); }
.credits { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
/* the account page's credit history (credits.py ledger rows) */
.credit-history summary { cursor: pointer; }
.credit-history-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.credit-row { display: flex; gap: 10px; align-items: baseline; font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.credit-row b { min-width: 42px; text-align: right; font-family: var(--font-display); }
.credit-row b.plus { color: var(--green-d, var(--green)); }
.credit-row b.minus { color: var(--ink-2); }
.credit-row .grow-1 { flex: 1; min-width: 0; }
.credits .big { font-family: var(--font-display); font-weight: 700; font-size: 3rem; line-height: 1; color: var(--yellow-d); text-shadow: 0 3px 0 color-mix(in srgb, var(--yellow-d) 30%, transparent); }
.devices { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.device { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); border: 2px solid var(--line); border-radius: 16px; }
.device .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--blue); color: var(--on-blue); display: grid; place-items: center; flex: none; box-shadow: 0 3px 0 var(--blue-d); }
.device .grow { flex: 1; min-width: 0; }
.device b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device small { color: var(--ink-3); font-weight: 700; }
.device.revoked { opacity: 0.55; }
.steps-mini { margin: 0; padding-left: 20px; font-weight: 700; color: var(--ink-2); display: grid; gap: 4px; }
.my-maps { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (max-width: 860px) { .account-grid { grid-template-columns: 1fr; } }

/* ---------- link / login ---------- */
.narrow { max-width: 560px; margin: 0 auto; padding-top: 44px; }
.hero-icon { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 26px; display: grid; place-items: center; background: var(--blue); color: var(--on-blue); box-shadow: 0 6px 0 var(--blue-d); transform: rotate(-4deg); }
.hero-icon .i { width: 42px; height: 42px; }
.hero-icon.green { background: var(--green); box-shadow: 0 6px 0 var(--green-d); }
.hero-icon.purple { background: var(--purple); box-shadow: 0 6px 0 var(--purple-d); }
.hero-icon.red { background: var(--red); box-shadow: 0 6px 0 var(--red-d); }
.cancel-warning { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.cancel-warning li:first-child { font-weight: 700; }
/* "Why are you cancelling?" (account.js askWhy, retention.py) */
.cancel-reasons { display: grid; gap: 6px; margin: 4px 0 12px; }
.cancel-reason { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.cancel-reason:has(input:checked) { border-color: var(--blue, #2f7bff); background: rgba(47, 123, 255, 0.08); }
.cancel-reason input { margin: 0; }
/* auto top-up on /account (account.js autoTopup, topup.py: opt-in) */
.auto-topup { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; }
.auto-topup .mt-6 { margin-top: 6px; }
.auto-topup-error { color: var(--pink, #ff5c8a); }
/* the Team card on /account (team.js) */
.team-box { display: grid; gap: 10px; }
.team-points { margin: 0; padding-left: 18px; color: var(--ink-2); }
.team-members { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.team-members li { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.code-input { width: 100%; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 8vw, 2.6rem); letter-spacing: 0.16em; text-transform: uppercase; padding: 14px 10px; border-radius: 20px; border: 3px solid var(--line-2); background: var(--surface-2); color: var(--ink); }
.code-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 5px color-mix(in srgb, var(--blue) 22%, transparent); }
.code-input.bad { border-color: var(--pink); animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.login-card { text-align: center; }
.login-card .perm { text-align: left; margin: 18px 0; display: grid; gap: 8px; }
.login-card .perm div { display: flex; gap: 10px; align-items: center; font-weight: 700; color: var(--ink-2); }
.login-card .perm .i { color: var(--green); stroke-width: 3; }

/* ---------- legal ---------- */
.legal { max-width: 780px; margin: 0 auto; padding-top: 36px; }
.legal h1 { font-size: 2.3rem; }
.legal h2 { font-size: 1.35rem; margin-top: 1.8em; }
.legal p, .legal li { color: var(--ink-2); font-weight: 600; }
.legal li { margin-bottom: 6px; }
.legal .card { padding: 28px; }
@media (max-width: 560px) { .legal .card { padding: 18px; } }

/* ---------- error ---------- */
.error-page { text-align: center; padding: 64px 0 24px; }
.error-page .code { font-family: var(--font-display); font-weight: 700; font-size: clamp(5rem, 22vw, 9rem); line-height: 1; color: var(--blue); text-shadow: 0 8px 0 var(--blue-d); margin-bottom: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .builder .blk { opacity: 1; }
}

/* ---------- utilities ---------- */
.m0 { margin: 0 !important; }
.mb-12 { margin-bottom: 12px; }
.mb-18 { margin-bottom: 18px; }
.mt-12 { margin-top: 12px; }
.mt-18 { margin-top: 18px; }
.mt-24 { margin-top: 24px; }
.grow-1 { flex: 1; min-width: 0; }
.center-row { justify-content: center; }
.skel-line { display: block; height: 18px; width: 80%; }
.skel-line.short { height: 14px; width: 40%; }
.inline-note { display: inline-flex; text-align: left; }
.btn-primary { --b: var(--blue); --bd: var(--blue-d); }
.textarea.bad, .input.bad { border-color: var(--pink); animation: shake 0.35s; }
.chip.on, .chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--on-blue); box-shadow: 0 3px 0 var(--blue-d); }
@media (max-width: 400px) { .theme-toggle { display: none; } .logo span { font-size: 1.15rem; } }
@media (max-width: 600px) {
  #gallery-filters { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 8px; scrollbar-width: none; }
  #gallery-filters::-webkit-scrollbar { display: none; }
  #gallery-filters .chip { flex: none; }
}
.result-body > div:empty { display: none; }
.compare tbody th, .compare thead th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.compare thead th:first-child { background: var(--surface-2); }
@media (max-width: 600px) { .compare th, .compare td { padding: 11px 10px; font-size: 0.9rem; } }
.card-title h2 { font-size: 1.5rem; }
.export-slot .btn .badge { position: absolute; top: -11px; right: -6px; font-size: 0.66rem; padding: 0 7px; }
.plan.current::after { content: "Your plan"; position: absolute; top: 14px; right: 16px; font-family: var(--font-display); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green-d); background: var(--green-soft); padding: 2px 9px; border-radius: 999px; }

/* ---------------------------------------------------------------- worlds (/world/{id}, result card, account) */
.world-head { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.world-layout { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
@media (max-width: 900px) { .world-layout { grid-template-columns: 1fr; } }
.world-board-card { padding: 16px; overflow-x: auto; }
.world-board { --cols: 3; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 0; max-width: 100%; margin: 0 auto;
  background: repeating-linear-gradient(45deg, var(--surface-2) 0 12px, var(--surface-3) 12px 24px); border-radius: 18px; overflow: hidden; }
.world-cell { position: relative; aspect-ratio: 1; min-width: 0; }
.world-cell.sec { background: #0f5b66; }
.world-cell.sec img { display: block; width: 100%; height: 100%; object-fit: cover; }
.world-cell.sec a { display: block; width: 100%; height: 100%; color: #fff; }
.world-cell.sec a:focus-visible { outline: 4px solid var(--focus); outline-offset: -4px; }
.world-cell .sec-label { position: absolute; left: 6px; bottom: 6px; right: 6px; display: flex; gap: 6px; align-items: center; pointer-events: none; }
.world-cell .sec-label span { background: rgba(10, 16, 40, 0.72); color: #fff; border-radius: 999px; padding: 1px 8px; font-weight: 800; font-size: 0.72rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.world-cell.busy { display: grid; place-items: center; background: var(--blue-soft); color: var(--ink-2); font-weight: 800; font-size: 0.8rem; text-align: center; padding: 6px; }
.world-cell.busy .spin { width: 26px; height: 26px; border-radius: 50%; border: 4px solid var(--blue); border-right-color: transparent; animation: spin 0.8s linear infinite; margin: 0 auto 6px; }
.world-cell.failed { display: grid; place-items: center; background: var(--pink-soft); color: var(--pink-d); font-weight: 800; font-size: 0.8rem; text-align: center; padding: 6px; }
.world-cell .add { position: absolute; inset: 14%; display: grid; place-items: center; border-radius: 16px; border: 3px dashed var(--line-2);
  background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--blue); cursor: pointer; font: inherit; font-weight: 800; }
.world-cell .add:hover { border-color: var(--blue); background: var(--surface); }
.world-cell .add .i { width: 34%; height: 34%; max-width: 40px; max-height: 40px; }
.world-cell .add[disabled] { cursor: not-allowed; color: var(--ink-3); border-color: var(--line); }
.world-cell .add .add-text { display: block; font-size: 0.72rem; }
@media (max-width: 520px) { .world-cell .add .add-text { display: none; } }
.world-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 4px; border-top: 2px dashed var(--line); }
.world-row .grow-1 { font-weight: 700; color: var(--ink-2); flex: 1 1 180px; }   /* wraps above the button on a phone */
.world-card .thumb { aspect-ratio: 1; }
.world-cell .sec-label span:first-child { flex: none; }
@media (max-width: 520px) { .world-cell .sec-label span + span { display: none; } }

/* plugin install paths (account page) */
.plugin-paths { margin: 6px 0 2px; padding-left: 18px; font-weight: 500; display: grid; gap: 3px; }
.plugin-paths code { font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2, rgba(127,127,127,.15)); word-break: break-all; }

/* "Continue with Google": white with the colour G in light and dark themes (Google's button style) */
.btn-google { --b: #ffffff; --bt: #1f1f1f; color: #1f1f1f; border-color: #dadce0; }
.btn-google .i { width: 1.2em; height: 1.2em; }
#login-buttons { gap: 12px; }

/* BloxUI Premium licence key on /account */
.bloxui-key { display: inline-block; margin-top: 4px; font-size: 1.05rem; letter-spacing: 0.04em; user-select: all; word-break: break-all; }

/* /account: Your own AI key (the UI Designer's AI on the account's own Claude / OpenAI key, ownkeys.py) */
.ai-key-form { display: grid; gap: 12px; }
.api-key-form { display: grid; gap: 12px; }
.api-key-form .input[type=number] { width: 9em; }
.api-key-scopes { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.api-key-scopes .check { display: flex; gap: 8px; align-items: center; font-size: .92em; }
.api-key-scopes .check.is-off { opacity: .55; }
.api-key-raw { word-break: break-all; user-select: all; flex: 1 1 260px; padding: 8px 10px; border-radius: 10px; background: var(--card-2, rgba(0,0,0,.06)); }
#api-key-list .device.is-revoked { opacity: .6; }
.ai-key-seg { max-width: 300px; }
.device small.ai-key-err { display: block; color: var(--pink-d); }
@media (max-width: 520px) {
  #ai-key-list .device { flex-wrap: wrap; }
  #ai-key-list .device .grow { flex-basis: calc(100% - 52px); }
}

/* /account: Profile & privacy; /create: the gallery choice; result cards: Delete map */
#privacy .delete-row { border-top: 1px solid var(--line); padding-top: 16px; align-items: center; }
.gallery-opt { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.map-delete { margin-left: auto; }
/* private creations are the paid plans' (limits.PRIVATE_TIERS): Free's line near Generate, and the locked switch */
.gallery-lock { align-items: flex-start; color: var(--ink-2); font-weight: 700; }
.gallery-lock b { color: var(--ink); }
.gallery-lock .i, .private-lock .i { flex: none; margin-top: 2px; color: var(--purple); }
.private-lock { display: inline-flex; align-items: flex-start; gap: 6px; font-weight: 700; color: var(--ink-2); min-width: 0; }
.private-lock .btn-link { font-size: inherit; }
.switch.is-locked-switch { cursor: not-allowed; }
.switch.is-locked-switch .track { opacity: 0.55; }
/* a detailed prompt (cloud/server/prompts.py): others read its first sentence, and this line says why; on the create
   pages the same line says the creation stays private */
.prompt-private { display: flex; align-items: flex-start; gap: 6px; margin: -6px 0 0; font-weight: 700; color: var(--ink-2); }
.prompt-private .i { flex: none; width: 14px; height: 14px; margin-top: 3px; color: var(--purple); }
.gallery-opt.prompt-private { margin: -4px 0 10px; }

/* user text (prompts, names) never stretches a layout: an overlong word wraps inside its box */
body { overflow-wrap: anywhere; }
.result-prompt, .owner-line, .gen-card, .chips { min-width: 0; overflow-wrap: anywhere; }

/* the tutorial video pop-up and its links */
.tutorial-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.tutorial-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tutorial-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font-weight: 700; }
.tutorial-link:hover { text-decoration: underline; }

/* /world: the "Road goes" picker when adding a section (a radiogroup on .seg: 5 across, 3 + 2 on phones) */
.road-seg { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
.road-seg .seg-btn { font-size: 0.92rem; overflow-wrap: normal; }
.road-seg .seg-btn[aria-checked="true"] { background: var(--blue); color: var(--on-blue); box-shadow: 0 3px 0 var(--blue-d); }
.road-seg .seg-btn[aria-disabled="true"], .road-seg .seg-btn[aria-disabled="true"]:hover { background: transparent; color: var(--ink-3); opacity: 0.6; cursor: not-allowed; }

/* self-hosted instance (LOCAL_MODE): hosted-only things (plans, prices, billing, referrals, licence shop) are hidden */
.local-mode [data-hosted] { display: none !important; }

/* =====================================================================================================================
   MOTION (one layer for every page; static/js/motion.js adds .motion to <html>). Transform / opacity only, 180-320 ms,
   one easing (--ease) and a springy overshoot (--spring) for pops. prefers-reduced-motion: no movement, quick fades
   at most. (The build / generation effects are buildfx.js / buildfx.css, not here.)
   ===================================================================================================================== */
:root { --spring: cubic-bezier(0.34, 1.56, 0.64, 1); interpolate-size: allow-keywords; }

/* accordions: <details> open and close smoothly (::details-content where the browser has it; motion.js animates the
   height elsewhere), the answer fades and rises in */
details::details-content { block-size: 0; overflow: clip; transition: block-size 0.28s var(--ease), content-visibility 0.28s allow-discrete; }
details[open]::details-content { block-size: auto; }
details[open] > :not(summary) { animation: acc-in 0.32s var(--ease); }
@keyframes acc-in { from { opacity: 0; transform: translateY(-6px); } }

/* scroll reveals: fade + rise once, staggered (motion.js sets --d); hidden only while motion.js runs */
.motion .reveal { opacity: 0; transform: translateY(18px); }
.motion .reveal.in { opacity: 1; transform: none; transition: opacity 0.5s var(--ease) var(--d, 0ms), transform 0.6s var(--ease) var(--d, 0ms); }
.motion .reveal.pop.in { transition: opacity 0.4s var(--ease) var(--d, 0ms), transform 0.55s var(--spring) var(--d, 0ms); }
.motion .reveal.pop { transform: scale(0.9); }

/* cards and chips lift, their shadow grows */
.card, .plan, .pack-card, .reassure li { transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s; }
.plan:hover, .pack-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.plan.hot:hover { box-shadow: 0 8px 0 var(--purple-d), 0 18px 34px rgba(8, 30, 58, 0.16); }
.plan.gold:hover { box-shadow: 0 8px 0 var(--yellow-d), 0 18px 34px rgba(8, 30, 58, 0.16); }
.chip { transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t), background-color var(--t), color var(--t); }
.chip:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--drop); }
.map-card { transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease); }
.icon-btn { transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), color var(--t), border-color var(--t); }
.icon-btn:hover { transform: translateY(-1px); }

/* the nav: an underline slides in under the hovered / current page */
.nav a { position: relative; transition: color var(--t), background-color var(--t); }
.nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px; border-radius: 3px;
  background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease); }
.nav a:not(.nav-cta):hover::after, .nav a[aria-current="page"]:not(.nav-cta)::after { transform: scaleX(1); }

/* the theme switch: the icon turns, the whole page eases into the other colours */
.theme-toggle .i { transition: transform 0.4s var(--spring); }
.theme-toggle:hover .i { transform: rotate(-25deg); }
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), fill 0.35s, stroke 0.35s !important; }

/* menus, modals, toasts: scale + fade in; the phone menu slides down */
.menu:not([hidden]) { animation: menu-in 0.18s var(--ease); transform-origin: top right; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(0.96); } }
.toast { animation: toast-in 0.3s var(--spring); }
@media (max-width: 760px) { .nav.open { animation: nav-in 0.24s var(--ease); } }
@keyframes nav-in { from { opacity: 0; transform: translateY(-10px); } }

/* pictures fade in when they arrive (motion.js), over a shimmer while they load */
.motion img.img-fade { opacity: 0; transition: opacity 0.45s var(--ease); }
.motion img.img-fade.loaded { opacity: 1; }
.img-wait { background-image: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--surface) 55%, transparent) 50%, transparent 70%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }

/* page to page: a short cross-fade (View Transitions, where the browser has them) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.22s; animation-timing-function: var(--ease); }

@media print { .motion .reveal, .motion .reveal.pop, .motion img.img-fade { opacity: 1 !important; transform: none !important; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  details::details-content { transition: none; }
  details[open] > :not(summary) { animation: none; }
  .motion .reveal, .motion .reveal.pop { opacity: 1; transform: none; }
  .motion .reveal.in { transition: none; }
  .card, .plan, .pack-card, .chip, .map-card, .icon-btn, .btn, .nav a::after, .theme-toggle .i { transition: none !important; }
  .plan:hover, .pack-card:hover, .chip:hover, .icon-btn:hover, .btn:hover, .map-card:hover { transform: none; }
  .btn-go:hover, .btn-yellow:hover { animation: none; }
  .menu:not([hidden]), .toast, .nav.open { animation: none; }
  .img-wait { animation: none; }
  .theme-anim, .theme-anim * { transition: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* an idea chip filled the box: its submit button pulses twice (the player still presses it) */
@keyframes go-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(130, 220, 90, 0.55); } 50% { transform: scale(1.06); box-shadow: 0 0 0 10px rgba(130, 220, 90, 0); } }
.go-pulse { animation: go-pulse 0.7s ease-in-out 2; }
@media (prefers-reduced-motion: reduce) { .go-pulse { animation: none; outline: 3px solid rgba(130, 220, 90, 0.9); outline-offset: 2px; } }

/* the thank-you after a purchase (app.js thankYou): confetti on a canvas, the card pops in, each letter bounces */
.confetti { position: fixed; inset: 0; z-index: 1001; pointer-events: none; }
.ty { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 8, 16, 0.72); backdrop-filter: blur(6px); animation: ty-fade 0.25s ease-out; }
.ty.is-out { animation: ty-fade 0.3s ease-in reverse forwards; }
.ty-card { display: grid; justify-items: center; gap: 10px; max-width: 440px; width: 100%; padding: 32px 24px; text-align: center;
  border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgba(47, 123, 255, 0.55);
  animation: ty-pop 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.ty-title { margin: 4px 0 0; font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; }
.ty-title span { display: inline-block; animation: ty-letter 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.ty-line { margin: 0; font-size: 1.05rem; color: var(--ink); }
.ty-sub { margin: 0 0 8px; color: var(--ink-3); }
.ty-check { width: 72px; height: 72px; }
.ty-check circle { fill: none; stroke: var(--green, #22c55e); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: ty-draw 0.6s ease-out 0.1s forwards; }
.ty-check path { fill: none; stroke: var(--green, #22c55e); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40; animation: ty-draw 0.4s ease-out 0.55s forwards; }
@keyframes ty-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ty-pop { from { opacity: 0; transform: scale(0.7) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes ty-letter { 0% { opacity: 0; transform: translateY(24px) scale(0.6); } 100% { opacity: 1; transform: none; } }
@keyframes ty-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .ty, .ty-card, .ty-title span, .ty-check circle, .ty-check path { animation: none; stroke-dashoffset: 0; } }
