/* The Art Club — retro-premium design system */

:root {
  --paper: #F2ECE1;
  --paper-2: #EAE1D2;
  --surface: #FBF8F3;
  --surface-2: #F3EDE3;
  --surface-3: #E9E1D3;
  --line: rgba(26, 24, 20, .12);
  --line-strong: rgba(26, 24, 20, .24);
  --ink: #1A1814;
  --ink-2: #4B463E;
  --ink-3: #776F63;
  --accent: #E2601B;
  --accent-hover: #CF5412;
  --accent-soft: #F6DCC9;
  --on-accent: #FFF8F0;
  --green: #2F5D50; --green-soft: #D9E4DC;
  --mustard: #E3A72F; --mustard-soft: #F4E5BF; --mustard-ink: #5A4300;
  --blue: #3B5BA5; --blue-soft: #DDE3F1;
  --rose: #C9746B; --rose-soft: #F2DCD6;
  --plum: #6B4A7A; --plum-soft: #E8DEEA;
  --night: #23325E; --night-soft: #DEE1EC;
  --focus: #3B5BA5;
  --danger: #B3361F; --danger-soft: #F6DDD6;
  --success: #2F5D50;
  --scrim: rgba(20, 18, 15, .42);
  --r-s: 10px; --r-m: 14px; --r-l: 20px; --r-xl: 28px;
  --shadow-1: 0 1px 2px rgba(26,24,20,.06), 0 3px 10px rgba(26,24,20,.05);
  --shadow-2: 0 10px 30px rgba(26,24,20,.10), 0 2px 6px rgba(26,24,20,.06);
  --shadow-3: 0 24px 70px rgba(26,24,20,.22);
  --retro: 3px 3px 0 var(--ink);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --t-fast: 140ms; --t-med: 220ms; --t-slow: 320ms;
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 72px;
  --container: 1240px;
  --gutter: clamp(16px, 4.2vw, 48px);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --section: clamp(48px, 7vw, 88px);
  --tabbar-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* studio chrome is always dark, like a pro paint app */
  --chrome: rgba(30, 28, 25, .86);
  --chrome-solid: #23201D;
  --chrome-2: rgba(255, 248, 240, .08);
  --chrome-3: rgba(255, 248, 240, .14);
  --chrome-line: rgba(255, 248, 240, .1);
  --chrome-ink: #F4EBDD;
  --chrome-ink-2: rgba(244, 235, 221, .66);
  --canvas-bg: #2A2723;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #151311;
  --paper-2: #1B1916;
  --surface: #1F1C19;
  --surface-2: #282420;
  --surface-3: #332E29;
  --line: rgba(244, 235, 221, .1);
  --line-strong: rgba(244, 235, 221, .22);
  --ink: #F4EBDD;
  --ink-2: #CFC6B8;
  --ink-3: #9C9385;
  --accent: #F07A3A;
  --accent-hover: #F48C52;
  --accent-soft: #3C2518;
  --on-accent: #1A1814;
  --green-soft: #1E2E28; --mustard-soft: #352B16; --mustard-ink: #F2C96A; --blue-soft: #1D2436; --rose-soft: #3A2421; --plum-soft: #2D2230; --night-soft: #1C2034;
  --focus: #9DB4F0;
  --danger: #FF8C76; --danger-soft: #3E211B;
  --scrim: rgba(0, 0, 0, .58);
  --shadow-1: 0 1px 2px rgba(0,0,0,.35);
  --shadow-2: 0 10px 30px rgba(0,0,0,.45);
  --shadow-3: 0 24px 70px rgba(0,0,0,.6);
  --retro: 3px 3px 0 #000;
  --canvas-bg: #161412;
  color-scheme: dark;
}

:root[data-motion="reduced"] *, :root[data-motion="reduced"] *::before, :root[data-motion="reduced"] *::after {
  animation-duration: 1ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 1ms !important;
  scroll-behavior: auto !important;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
/* Paper grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: .055; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: .04; }
body.immersive::before { display: none; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
.icon-wrap { display: inline-flex; flex: none; }
.icon { flex: none; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.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; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 12px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------ logo */

.logo { position: relative; display: inline-flex; align-items: flex-end; gap: .14em; text-decoration: none; color: var(--ink); line-height: 1; padding: .2em .14em .1em 0; isolation: isolate; flex: none; }
.logo-the { font-family: var(--display); font-style: italic; font-weight: 400; font-size: .48em; transform: translateY(-.78em); color: var(--ink-2); }
.logo-word { position: relative; font-family: var(--display); font-weight: 800; letter-spacing: -.035em; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; }
.logo-word::before {
  content: attr(data-text); position: absolute; inset: 0; color: var(--accent); z-index: -1;
  transform: translate(.05em, .05em); animation: misregister 1s var(--spring) both; transition: transform var(--t-med) var(--spring);
}
.logo:hover .logo:hover .logo-word::before { transform: translate(.085em, .07em); }
.logo:active .logo-word::before { transform: translate(.02em, .02em); }
.seal { display: inline-grid; place-items: center; border-radius: 50%; background: var(--accent); color: #F4EBDD; border: 1.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); font-family: var(--display); font-weight: 800; font-style: italic; letter-spacing: -.04em; font-variation-settings: 'SOFT' 100, 'WONK' 1; }
.seal span { transform: translateY(-.06em); }
.logo-md { font-size: 28px; }
.logo-lg { font-size: clamp(56px, 9vw, 110px); }
@keyframes misregister { from { transform: translate(0, 0); opacity: 0; } }
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ app shell */

.app { min-height: 100dvh; display: flex; flex-direction: column; }
.app-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid transparent; transition: border-color var(--t-med), background var(--t-med);
}
.header-inner { height: 100%; width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: var(--s5); }
.app-header.scrolled { border-bottom-color: var(--line); }
.header-nav { display: none; gap: 2px; }
.header-link { position: relative; padding: 9px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--ink-2); transition: color var(--t-fast), background var(--t-fast); }
.header-link:hover { color: var(--ink); background: var(--surface-2); }
.header-link.active { color: var(--ink); }
.header-link.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--accent); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header-actions .btn-new { display: none; }
.avatar-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--ink); text-decoration: none; }
.avatar-btn.active, .avatar-btn:hover { border-color: var(--ink); }
.app-main { flex: 1; outline: none; padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 48px); }
.tab span { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.tabbar {
  position: fixed; z-index: 40; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%);
  width: min(calc(100% - 24px), 440px); display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 6px; border-radius: 999px;
  background: color-mix(in srgb, #1A1814 94%, transparent); color: #F4EBDD;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow-3);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; height: 54px; border-radius: 999px; text-decoration: none; font-size: 10.5px; font-weight: 600; color: rgba(244,235,221,.6); transition: color var(--t-fast), background var(--t-fast); }
.tab.active { color: #F4EBDD; background: rgba(255,255,255,.12); }
.tab-create { color: #FFF8F0 !important; background: #E2601B !important; }

@media (min-width: 900px) {
  .header-inner { gap: var(--s6); }
  .header-nav { display: flex; }
  .header-actions .btn-new { display: inline-flex; }
  .tabbar { display: none; }
  .app-main { padding-bottom: 60px; }
}

.app.immersive .app-header, .app.immersive .tabbar { display: none; }
.app.immersive .app-main { padding: 0; }

/* ------------------------------------------------------------------ page layout */

.page { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: var(--s5) var(--gutter) var(--s6); animation: enter var(--t-slow) var(--ease) both; }
.page-narrow { max-width: calc(820px + var(--gutter) * 2); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
@media (min-width: 760px) { .page { padding-top: var(--s7); } }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s4) var(--s6); margin-bottom: var(--s6); }
.page-title { font-family: var(--display); font-weight: 600; font-size: clamp(34px, 5vw, 56px); line-height: 1; letter-spacing: -.035em; font-variation-settings: "SOFT" 70, "opsz" 144; }
.page-title em { font-style: italic; font-weight: 400; color: var(--accent); }
.eyebrow { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .16em; margin-bottom: var(--s3); }
.lede { color: var(--ink-2); font-size: 16px; max-width: 520px; margin-top: 12px; }
.back-link { display: inline-flex; align-items: center; gap: 2px; text-decoration: none; color: var(--ink-3); font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.back-link:hover { color: var(--ink); }

.section { margin-top: var(--section); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: var(--s5); gap: var(--s3); }
.section-title { font-family: var(--display); font-size: clamp(24px, 2.8vw, 32px); font-weight: 600; letter-spacing: -.025em; line-height: 1.05; font-variation-settings: "SOFT" 70, "opsz" 96; }
.section-title em { font-style: italic; font-weight: 400; color: var(--accent); }
.section-sub { color: var(--ink-3); font-size: 14px; margin-top: 6px; }
.link { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 14px; color: var(--ink-2); text-decoration: none; padding: 6px 2px; white-space: nowrap; }
.link:hover { color: var(--accent); }
.result-count { color: var(--ink-3); font-size: 14px; font-weight: 500; margin-bottom: 16px; }

/* ------------------------------------------------------------------ buttons & inputs */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 14.5px; text-decoration: none; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast), box-shadow var(--t-fast) var(--ease), opacity var(--t-fast), border-color var(--t-fast);
}
.btn:active:not(:disabled) { transform: translate(1px, 1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 8px 22px rgba(26,24,20,.22); }
.btn-accent { background: var(--accent); color: var(--on-accent); border-color: var(--ink); box-shadow: var(--retro); }
.btn-accent:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); background: var(--accent-hover); }
.btn-accent:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-soft { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-soft:hover:not(:disabled) { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-icon {
  display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 50%; border: 0; background: transparent; color: inherit;
  transition: background var(--t-fast), transform var(--t-fast) var(--ease), opacity var(--t-fast);
}
.btn-icon:hover:not(:disabled) { background: var(--surface-2); }
.btn-icon:active:not(:disabled) { transform: scale(.92); }
.btn-icon:disabled { opacity: .3; cursor: default; }
.btn-icon.sm { width: 36px; height: 36px; }
.link-btn { border: 0; background: none; padding: 4px 6px; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.field { display: grid; gap: 6px; }
.field-label { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-3); margin: 20px 0 10px; text-transform: uppercase; letter-spacing: .12em; }
.field .field-label { margin: 0; }
.field-input, .select { min-height: 46px; width: 100%; padding: 0 14px; border-radius: var(--r-m); border: 1.5px solid var(--line-strong); background: var(--surface); }
.field-input:focus-visible, .select:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.field-input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 14px; font-weight: 600; min-height: 1em; margin-top: 8px; }
.select { width: auto; padding-right: 36px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23776F63' stroke-width='2'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }

.search { display: flex; align-items: center; gap: 10px; flex: 1 1 320px; max-width: 440px; min-height: 50px; padding: 0 18px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--ink-3); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.search:focus-within { border-color: var(--ink); box-shadow: var(--retro); }
.search-input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; height: 46px; font-size: 15px; color: var(--ink); }

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 38px; padding: 0 15px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: transparent; font-weight: 600; font-size: 13.5px; color: var(--ink-2); transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast); }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"], .chip[aria-checked="true"], .chip[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.chip-sep { width: 1px; background: var(--line-strong); margin: 6px 4px; flex: none; }
.filters { display: grid; gap: 2px; margin-bottom: 6px; }

.segmented { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented button { flex: none; white-space: nowrap; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; font-weight: 600; font-size: 13.5px; color: var(--ink-2); transition: background var(--t-fast); }
.segmented button.on { background: var(--ink); color: var(--paper); }

.switch { position: relative; display: inline-block; width: 50px; height: 30px; flex: none; cursor: pointer; }
.switch-input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch-track { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); border: 1.5px solid var(--line-strong); transition: background var(--t-med); }
.switch-track::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-1); transition: transform var(--t-med) var(--spring); }
.switch-input:checked + .switch-track { background: var(--accent); border-color: var(--ink); }
.switch-input:checked + .switch-track::after { transform: translateX(20px); }
.switch-input:focus-visible + .switch-track { outline: 2.5px solid var(--focus); outline-offset: 2px; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: transparent; color: var(--ink-2); white-space: nowrap; border: 1px solid var(--line-strong); }
.badge-easy { color: var(--green); }
.badge-medium { color: #9A6A0C; }
.badge-advanced { color: var(--accent); }
:root[data-theme="dark"] .badge-medium { color: #E9C46A; }
:root[data-theme="dark"] .badge-easy { color: #8FC7AE; }
.badge-new, .badge-premium { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.diff-dots { display: inline-flex; gap: 2px; }
.diff-dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .25; }
.diff-dots i.on { opacity: 1; }

.notice { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r-m); margin-bottom: 16px; font-weight: 500; font-size: 14px; background: var(--mustard-soft); }

.tint-home { background: var(--rose-soft); }
.tint-animals { background: var(--green-soft); }
.tint-fantasy { background: var(--plum-soft); }
.tint-cities { background: var(--blue-soft); }
.tint-nature { background: var(--mustard-soft); }
.tint-space { background: var(--night-soft); }
.tint-food { background: var(--accent-soft); }
.tint-landmarks { background: #E4DCCB; }
.tint-people { background: #EBD9CF; }
:root[data-theme="dark"] .tint-landmarks { background: #2A261F; }
:root[data-theme="dark"] .tint-people { background: #33241F; }

/* ------------------------------------------------------------------ explore */

.hero { position: relative; display: grid; gap: 28px; align-items: center; padding: 30px 22px 32px; border-radius: var(--r-xl); background: var(--surface); border: 1.5px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; }
.hero-copy { position: relative; z-index: 1; }
.hero-title { font-family: var(--display); font-size: clamp(42px, 6.4vw, 80px); font-weight: 600; letter-spacing: -.04em; line-height: .95; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; }
.hero-title em { font-style: italic; font-weight: 400; color: var(--accent); }
.hero-text { color: var(--ink-2); margin: 18px 0 26px; font-size: 16.5px; max-width: 440px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stack { position: relative; height: 330px; display: grid; place-items: center; }
.stack-card { position: absolute; width: min(60%, 250px); aspect-ratio: 4/5; border-radius: 18px; overflow: hidden; border: 1.5px solid var(--ink); background: var(--surface); box-shadow: var(--shadow-2); padding: 0; transition: transform 500ms var(--spring); }
.stack-card svg { width: 100%; height: 100%; }
.stack-card:nth-child(1) { transform: translate(-36%, 5%) rotate(-9deg); }
.stack-card:nth-child(2) { transform: translate(36%, 3%) rotate(8deg); }
.stack-card:nth-child(3) { transform: translateY(-4%) rotate(-1.5deg); z-index: 2; }
.hero-stack:hover .stack-card:nth-child(1) { transform: translate(-46%, 7%) rotate(-13deg); }
.hero-stack:hover .stack-card:nth-child(2) { transform: translate(46%, 4%) rotate(12deg); }
.hero-stack:hover .stack-card:nth-child(3) { transform: translateY(-7%) rotate(0deg) scale(1.03); }
.marquee { display: flex; gap: 36px; overflow: hidden; margin-top: var(--s7); padding: 14px 0; border-block: 1.5px solid var(--ink); font-family: var(--display); font-style: italic; font-size: 22px; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 36px; animation: marquee 50s linear infinite; flex: none; }
.marquee-track span { display: inline-flex; align-items: center; gap: 36px; }
.marquee-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--ink); flex: none; }
@keyframes marquee { to { transform: translateX(calc(-100% - 36px)); } }
@media (min-width: 860px) { .hero { grid-template-columns: 1.05fr 1fr; padding: 56px; } .hero-stack { height: 430px; } }
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 700px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); } }
@media (max-width: 699px) { .cat-grid > .cat-tile:last-child:nth-child(odd) { grid-column: span 2; } }
/* Equal tiles: icon left, title and blurb right, same height everywhere. */
.cat-tile { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 14px; row-gap: 4px; align-items: start; padding: 16px; border-radius: var(--r-l); text-decoration: none; min-height: 108px; border: 1.5px solid var(--ink); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.cat-tile:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.cat-tile:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.cat-icon { grid-row: 1 / span 2; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.cat-name { font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.15; letter-spacing: -.015em; padding-top: 2px; overflow-wrap: anywhere; }
.cat-count { font-size: 13px; line-height: 1.4; color: var(--ink-3); font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 480px) { .cat-tile { grid-template-columns: 1fr; padding: 14px; min-height: 132px; } .cat-icon { grid-row: auto; width: 40px; height: 40px; margin-bottom: 8px; } .cat-name { font-size: 17px; } }

.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(196px, 232px); gap: var(--s5); overflow-x: auto; padding: 18px var(--gutter) var(--s4); margin: -12px calc(var(--gutter) * -1) 0; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; }
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll > * { scroll-snap-align: start; }

.feature-band { display: grid; gap: var(--s5); margin-top: var(--section); }
.feature-card { position: relative; display: grid; gap: 8px; align-content: end; min-height: 300px; padding: 24px; border-radius: var(--r-xl); text-decoration: none; overflow: hidden; border: 1.5px solid var(--ink); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.feature-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.feature-card h3 { font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: -.03em; line-height: 1; position: relative; z-index: 1; font-variation-settings: "SOFT" 100, "opsz" 144; }
.feature-card p { position: relative; z-index: 1; max-width: 300px; opacity: .8; }
.feature-card .eyebrow { color: inherit; opacity: .7; position: relative; z-index: 1; margin: 0; }
.feature-dark { background: #1A1814; color: #F4EBDD; }
.feature-accent { background: var(--accent); color: #1A1814; }
.feature-green { background: var(--green); color: #F4EBDD; }
.feature-art { position: absolute; right: -4%; top: -6%; width: 66%; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 75%); mask-image: linear-gradient(to bottom, #000 45%, transparent 75%); }
.feature-art canvas, .feature-art svg { width: 100%; height: auto; }
@media (min-width: 860px) { .feature-band { grid-template-columns: 1.3fr 1fr 1fr; } }

/* ------------------------------------------------------------------ cards */

.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: var(--s5) var(--s4); }
@media (min-width: 760px) { .tgrid { grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: var(--s6) var(--s5); } }

.tcard { position: relative; display: grid; gap: 10px; }
.tcard-hit { border: 0; padding: 0; background: none; border-radius: var(--r-l); text-align: left; }
.tcard-art { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-l); padding: 11%; display: grid; place-items: center; overflow: hidden; border: 1.5px solid var(--line-strong); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast); }
.tcard-art svg { width: 100%; height: 100%; filter: drop-shadow(0 8px 16px rgba(26,24,20,.16)); border-radius: 3px; }
.tcard-art .placeholder { width: 72%; aspect-ratio: 1; border-radius: 6px; background: color-mix(in srgb, var(--surface) 55%, transparent); }
.tcard-hit:hover .tcard-art { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); border-color: var(--ink); }
.tcard-hit:active .tcard-art { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.tcard-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.tcard-text { min-width: 0; display: grid; gap: 6px; }
.tcard-title { font-family: var(--display); font-size: 17.5px; font-weight: 600; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.tcard-sub { display: flex; gap: 6px; flex-wrap: wrap; }
.premium-tag { position: absolute; top: 10px; left: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 700; pointer-events: none; letter-spacing: .02em; }
.tcard-sm .tcard-title { font-size: 15px; }
.fav-btn { display: grid; place-items: center; width: 36px; height: 36px; margin: -4px -6px 0 0; border-radius: 50%; border: 0; background: none; color: var(--ink-3); flex: none; transition: color var(--t-fast), transform var(--t-fast) var(--spring); }
.fav-btn:hover { color: var(--ink); background: var(--surface-2); }
.fav-btn.on { color: var(--accent); }
.fav-btn:active { transform: scale(.82); }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 24px 16px; }
@media (min-width: 760px) { .pgrid { grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: var(--s6) var(--s5); } }
.pcard { display: grid; gap: 10px; }
.pcard-hit { border: 0; padding: 0; background: none; border-radius: var(--r-l); }
.pcard-art { aspect-ratio: 1; border-radius: var(--r-l); background: var(--surface); border: 1.5px solid var(--line-strong); overflow: hidden; display: grid; place-items: center; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast); }
.pcard-art img { width: 100%; height: 100%; object-fit: contain; background: var(--surface-2); }
.pcard-hit:hover .pcard-art { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); border-color: var(--ink); }
.pcard-empty { color: var(--ink-3); }
.pcard-meta { display: flex; justify-content: space-between; gap: 4px; align-items: flex-start; }
.pcard-text { min-width: 0; }
.pcard-title { font-family: var(--display); font-size: 17.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.015em; }
.pcard-sub { font-size: 12.5px; color: var(--ink-3); font-weight: 500; display: flex; align-items: center; flex-wrap: wrap; gap: 0 5px; margin-top: 2px; }
.pcard .btn-icon { margin: -6px -8px 0 0; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mustard); }
.status-completed { background: var(--green); }

.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.load-more { display: flex; justify-content: center; margin-top: 34px; }

.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 16px; grid-column: 1 / -1; border-radius: var(--r-xl); background: var(--surface); border: 1.5px dashed var(--line-strong); }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; border: 1.5px solid var(--ink); }
.empty h3 { font-family: var(--display); font-size: 24px; font-weight: 600; }
.empty p { max-width: 380px; }
.empty .btn, .empty .btn-row { margin-top: 8px; }

/* ------------------------------------------------------------------ create & profile */

.panel-card { background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-xl); padding: clamp(20px, 3vw, 32px); }
.panel-card + .panel-card { margin-top: var(--s5); }
.panel-card .section-title { margin-bottom: 6px; }
.panel-card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.panel-card-head .cat-icon { margin: 0; }
.create-split { display: grid; gap: var(--s5); align-items: start; }
.create-col { display: grid; gap: var(--s5); align-content: start; }
.create-split .panel-card + .panel-card { margin-top: 0; }
@media (min-width: 1000px) { .create-split { grid-template-columns: 1.15fr 1fr; } }

.paper-row { display: flex; gap: 10px; flex-wrap: wrap; }
.paper-opt { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px 0 5px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 13.5px; }
.paper-opt[aria-checked="true"] { border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.paper-swatch { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; color: #888; }
.preset-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .preset-grid { grid-template-columns: repeat(4, 1fr); } }
.preset { display: grid; justify-items: center; gap: 2px; padding: 14px 8px; border-radius: var(--r-l); border: 1.5px solid var(--line-strong); background: var(--surface-2); font-size: 14px; transition: transform var(--t-fast) var(--ease), border-color var(--t-fast), box-shadow var(--t-fast); }
.preset:hover { border-color: var(--ink); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.preset .muted { font-size: 12px; }
.preset strong { font-family: var(--display); font-weight: 600; font-size: 16px; }
.preset-shape-wrap { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 6px; }
.preset-shape { display: block; background: var(--paper-preview, #fff); border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--accent); }
.custom-details { margin-top: 18px; }
.custom-details summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.custom-size { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.custom-size .field { flex: 1 1 110px; }
.times { padding-bottom: 12px; color: var(--ink-3); font-weight: 700; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); margin: var(--s5) 0; }
.mini-grid .tcard-art { aspect-ratio: 1; }
.mini-grid .tcard-sub, .mini-grid .fav-btn { display: none; }
.object-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s3); }
.object-opt { display: grid; justify-items: center; gap: 8px; padding: 16px 10px; border-radius: var(--r-l); border: 1.5px solid var(--line-strong); background: var(--surface-2); font-weight: 600; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast), border-color var(--t-fast); }
.object-opt:hover { border-color: var(--ink); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.object-opt svg { width: 54px; height: 54px; }
.object-opt span { font-family: var(--display); font-size: 15px; text-align: center; line-height: 1.15; }

.account { display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: center; }
.account .btn { grid-column: 1 / -1; justify-self: start; }
.account-note { grid-column: 1 / -1; }
@media (min-width: 560px) { .account { grid-template-columns: auto 1fr auto; } .account .btn { grid-column: auto; } }
.avatar { width: 62px; height: 62px; font-size: 26px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.setting:first-of-type { margin-top: 12px; }
.setting-text { flex: 1 1 240px; }
.setting-title { font-weight: 600; display: block; }
.facts-list { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 10px; color: var(--ink-2); }
.facts-list li { display: flex; gap: 10px; align-items: flex-start; }
.event-details summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.event-log { margin: 6px 0 0; padding-left: 22px; display: grid; gap: 4px; font-size: 14px; }
.event-log code { font-size: 12.5px; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.shortcuts { display: grid; gap: 4px; margin: 0; }
.shortcuts > div { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.shortcuts dd { margin: 0; color: var(--ink-2); text-align: right; }
.shortcuts dt { display: flex; gap: 4px; }
kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line-strong); border-bottom-width: 2px; font: 600 12px/1 var(--font); color: var(--ink-2); }

/* ------------------------------------------------------------------ sheets, menus, toasts */

.scrim { position: fixed; inset: 0; z-index: 120; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity var(--t-med) var(--ease); }
.scrim.open { opacity: 1; }
.sheet { width: 100%; max-height: 92dvh; display: flex; flex-direction: column; color: var(--ink); background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-3); border: 1.5px solid var(--ink); border-bottom: 0; padding-bottom: var(--safe-b); transform: translateY(30px); transition: transform var(--t-slow) var(--ease); }
.scrim.open .sheet { transform: none; }
.sheet-grabber { width: 40px; height: 4px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 14px 0 24px; flex: none; }
.sheet-title { font-family: var(--display); font-size: 27px; font-weight: 600; letter-spacing: -.025em; }
.sheet-body { padding: 10px 24px 20px; overflow: auto; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 24px 20px; border-top: 1px solid var(--line); flex: none; }
.sheet-actions .btn { flex: 1 1 auto; }
@media (min-width: 640px) {
  .scrim { align-items: center; padding: 24px; }
  .sheet { max-width: 520px; border-radius: 26px; border-bottom: 1.5px solid var(--ink); box-shadow: 8px 8px 0 var(--ink), var(--shadow-3); transform: translateY(14px) scale(.98); }
  .sheet-wide { max-width: 980px; }
  .sheet-grabber { display: none; }
  .sheet-head { padding-top: 20px; }
  .sheet-actions .btn { flex: 0 0 auto; }
  .sheet-compact { max-width: 440px; }
}

.preview { display: grid; gap: 22px; }
.preview-stage { position: relative; }
.preview-art { border-radius: var(--r-l); padding: 7%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); }
.preview-art svg { width: 100%; height: auto; max-height: 54dvh; filter: drop-shadow(0 12px 26px rgba(26,24,20,.18)); border-radius: 4px; }
.preview-tools { position: absolute; right: 12px; bottom: 12px; }
.preview-tools .chip { box-shadow: var(--shadow-1); }
.preview-tools .chip:not([aria-pressed="true"]) { background: var(--surface); }
.preview-info { display: grid; gap: 14px; align-content: start; }
.preview-badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.preview-badges .fav-btn { margin: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: var(--s3); margin: 0; }
.facts > div { background: var(--surface-2); border-radius: var(--r-m); padding: 12px 14px; border: 1px solid var(--line); }
.facts dt { font-size: 11px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.facts dd { margin: 4px 0 0; font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.15; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); }
.tag:hover { border-color: var(--ink); }
.licence { font-size: 12px; color: var(--ink-3); }
@media (min-width: 760px) { .preview { grid-template-columns: 1.25fr 1fr; align-items: start; } }

.premium-body { display: grid; gap: 12px; justify-items: start; }
.premium-badge { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: #F4EBDD; border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }

.export { display: grid; gap: 16px; }
.export-preview { display: grid; place-items: center; min-height: 180px; background: var(--surface-2); border-radius: var(--r-l); padding: 16px; }
.export-canvas { max-width: 100%; max-height: 38dvh; width: auto; height: auto; border-radius: 4px; box-shadow: var(--shadow-2); }
.size-options { display: grid; gap: 8px; }
.size-opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border-radius: var(--r-m); border: 1.5px solid var(--line-strong); background: var(--surface); text-align: left; }
.size-opt span { color: var(--ink-3); font-size: 13.5px; }
.size-opt[aria-checked="true"] { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.export-opts .field-label { margin-top: 0; }
.export-opts > .muted { display: block; margin-top: 8px; font-size: 13.5px; }
.export-status { min-height: 1.4em; margin-top: 8px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.export-status.error { color: var(--danger); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.menu-layer { position: fixed; inset: 0; z-index: 130; }
.menu { position: fixed; min-width: 230px; padding: 6px; border-radius: 16px; background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); box-shadow: 5px 5px 0 var(--ink), var(--shadow-2); display: grid; animation: pop var(--t-med) var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu-item { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 10px; background: none; text-align: left; font-weight: 500; color: var(--ink); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); outline: none; }
.menu-item > span:not(.icon-wrap) { flex: 1; white-space: nowrap; }
.menu-item > .icon-wrap { flex: none; display: inline-flex; color: var(--ink-2); }
.menu-item.danger > .icon-wrap { color: inherit; }
.menu-item kbd { flex: none; }
.menu-item.danger { color: var(--danger); }
.menu-item:disabled { opacity: .4; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }

#toast-root { position: fixed; z-index: 150; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 26px); transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 460px); pointer-events: none; }
@media (min-width: 900px) { #toast-root { bottom: 28px; } }
.app.immersive ~ #toast-root { bottom: 76px; }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; min-height: 50px; border-radius: 16px; background: #1A1814; color: #F4EBDD; box-shadow: var(--shadow-2); font-weight: 500; font-size: 14.5px; pointer-events: auto; opacity: 0; transform: translateY(10px); transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease); border: 1px solid rgba(255,255,255,.08); }
.toast.show { opacity: 1; transform: none; }
.toast-error { background: var(--danger); color: #fff; }
.toast-msg { flex: 1; }
.toast-action { border: 0; background: rgba(255,255,255,.16); color: inherit; font-weight: 700; padding: 8px 12px; border-radius: 10px; }

/* ================================================================== STUDIO (pro paint UI) */

.studio { position: fixed; inset: 0; overflow: hidden; color: var(--chrome-ink); background: radial-gradient(120% 90% at 50% 40%, #34302B, var(--canvas-bg)); font-size: 14px; }
.stage-host { position: absolute; inset: 0; }
.bar { position: absolute; z-index: 6; display: flex; align-items: center; gap: 2px; padding: 5px; background: var(--chrome); border: 1px solid var(--chrome-line); border-radius: 18px; backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 10px 34px rgba(0,0,0,.35); }
.bar-tl { left: 12px; top: calc(12px + env(safe-area-inset-top, 0px)); max-width: calc(50% - 18px); }
.bar-tr { right: 12px; top: calc(12px + env(safe-area-inset-top, 0px)); }
.bar-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 42px; height: 42px; padding: 0 9px; border-radius: 13px; border: 0; background: transparent; color: var(--chrome-ink); font-weight: 600; font-size: 13.5px; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease); flex: none; }
.bar-btn:hover { background: var(--chrome-2); }
.bar-btn:active { transform: scale(.94); }
.bar-btn[aria-pressed="true"], .bar-btn[aria-expanded="true"] { color: #FF8A4C; background: var(--chrome-2); }
.bar-btn:disabled { opacity: .3; }
.bar-sep { width: 1px; height: 24px; background: var(--chrome-line); margin: 0 4px; flex: none; }
.doc-title { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 0 8px 0 4px; line-height: 1.2; max-width: 240px; }
.doc-title button { border: 0; background: none; padding: 0; text-align: left; font-family: var(--display); font-weight: 600; font-size: 15.5px; color: var(--chrome-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.save-status { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; color: var(--chrome-ink-2); white-space: nowrap; min-height: 14px; }
.save-status .icon { width: 13px; height: 13px; }
.save-status[data-state="saving"] .icon { animation: spin .9s linear infinite; }
.save-status[data-state="saved"] { color: #9FD3B8; }
.save-status[data-state="failed"] { color: #FF9A84; }
.save-status .link-btn { color: #FFB38A; padding: 0 4px; font-size: 11.5px; }
.color-btn { width: 44px; height: 42px; padding: 0; display: grid; place-items: center; border: 0; background: none; border-radius: 50%; flex: none; }
.color-btn span { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 2px var(--chrome-ink), 0 0 0 4px rgba(0,0,0,.35); transition: transform var(--t-fast) var(--spring), background var(--t-fast); }
.color-btn[aria-expanded="true"] span { transform: scale(1.1); }
.progress-pill { display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 12px; font-weight: 600; color: var(--chrome-ink-2); flex: none; }
.progress-bar { width: 60px; height: 5px; border-radius: 99px; background: var(--chrome-3); overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; background: #FF8A4C; border-radius: inherit; transition: width var(--t-slow) var(--ease); }
@media (max-width: 1000px) { .progress-pill { display: none; } }
@media (max-width: 760px) {
  .doc-title, .hide-sm, .bar-tl .bar-sep { display: none; }
  .bar-btn { min-width: 36px; height: 40px; padding: 0 6px; }
  .bar { gap: 0; padding: 3px; border-radius: 15px; }
  .bar-sep { margin: 0 2px; }
  .bar-tl { left: 8px; max-width: none; }
  .bar-tr { right: 8px; }
  .color-btn { width: 40px; }
}

.side { position: absolute; z-index: 5; left: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 6px; width: 50px; background: var(--chrome); border: 1px solid var(--chrome-line); border-radius: 26px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 10px 34px rgba(0,0,0,.3); }
.studio[data-hand="left"] .side { left: auto; right: 10px; }
.vslider { position: relative; width: 36px; height: clamp(110px, 22vh, 190px); border-radius: 18px; background: var(--chrome-2); cursor: ns-resize; touch-action: none; outline: none; }
.vslider:focus-visible { box-shadow: 0 0 0 2px #FF8A4C; }
.vslider-fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 18px; background: var(--chrome-3); }
.vslider-thumb { position: absolute; left: 4px; right: 4px; height: 26px; border-radius: 12px; background: var(--chrome-ink); box-shadow: 0 2px 8px rgba(0,0,0,.4); transform: translateY(50%); display: grid; place-items: center; }
.vslider-thumb i { display: block; border-radius: 50%; background: var(--chrome-solid); }
.vslider-tip { position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%); padding: 6px 10px; border-radius: 10px; background: var(--chrome-solid); color: var(--chrome-ink); font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity var(--t-fast); border: 1px solid var(--chrome-line); }
.studio[data-hand="left"] .vslider-tip { left: auto; right: calc(100% + 14px); }
.vslider.dragging .vslider-tip, .vslider:focus-visible .vslider-tip, .vslider:hover .vslider-tip { opacity: 1; }
.side-label { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--chrome-ink-2); margin-bottom: -4px; }
.side .btn-icon { width: 38px; height: 38px; color: var(--chrome-ink); }
.side .btn-icon:hover:not(:disabled) { background: var(--chrome-2); }
.side .btn-icon[aria-pressed="true"] { color: #FF8A4C; background: var(--chrome-2); }
.side.dim .vslider { opacity: .35; pointer-events: none; }
.side-sep { width: 22px; height: 1px; background: var(--chrome-line); }
@media (max-width: 760px) { .side { width: 44px; padding: 8px 4px; gap: 8px; left: 6px; } .studio[data-hand="left"] .side { right: 6px; } .vslider { width: 32px; height: clamp(90px, 17vh, 150px); } .side .btn-icon { width: 34px; height: 34px; } }

.view-pill { position: absolute; z-index: 5; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--chrome); border: 1px solid var(--chrome-line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.view-pill .btn-icon { width: 36px; height: 36px; color: var(--chrome-ink); }
.view-pill .btn-icon:hover:not(:disabled) { background: var(--chrome-2); }
.view-label { min-width: 56px; height: 34px; border: 0; border-radius: 999px; background: none; color: var(--chrome-ink); font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.view-label:hover { background: var(--chrome-2); }

.popover { position: absolute; z-index: 8; top: calc(68px + env(safe-area-inset-top, 0px)); right: 12px; width: 370px; max-height: calc(100% - 140px); display: flex; flex-direction: column; color: var(--chrome-ink); background: color-mix(in srgb, var(--chrome-solid) 95%, transparent); border: 1px solid var(--chrome-line); border-radius: 22px; backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); box-shadow: 0 24px 70px rgba(0,0,0,.5); transform-origin: top right; animation: pop-in var(--t-med) var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.popover[hidden] { display: none; }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 12px 8px 18px; flex: none; }
.pop-title { font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: -.015em; }
.pop-body { overflow: auto; padding: 4px 14px 16px; overscroll-behavior: contain; min-height: 0; }
.pop-tabs { display: flex; gap: 4px; padding: 0 14px 10px; flex: none; }
.pop-tab { flex: 1; min-height: 32px; border: 0; border-radius: 999px; background: transparent; color: var(--chrome-ink-2); font-weight: 600; font-size: 12.5px; }
.pop-tab[aria-selected="true"] { background: var(--chrome-3); color: var(--chrome-ink); }
.popover .btn-icon { color: var(--chrome-ink); }
.popover .btn-icon:hover:not(:disabled) { background: var(--chrome-2); }
@media (max-width: 760px) {
  .popover { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 74%; border-radius: 24px 24px 0 0; padding-bottom: var(--safe-b); animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
}

.brush-lib { display: grid; grid-template-columns: 112px 1fr; gap: 10px; }
.brush-lib.eraser-mode { grid-template-columns: 1fr; }
.brush-sets { display: grid; gap: 2px; align-content: start; position: sticky; top: 0; }
.brush-set { border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 10px; color: var(--chrome-ink-2); font-weight: 600; font-size: 12.5px; }
.brush-set:hover { color: var(--chrome-ink); }
.brush-set[aria-selected="true"] { background: var(--chrome-3); color: var(--chrome-ink); }
.brush-list { display: grid; gap: 6px; align-content: start; }
.brush-item { display: grid; gap: 0; border: 1.5px solid transparent; background: var(--chrome-2); border-radius: 12px; padding: 4px 8px 8px; text-align: left; color: var(--chrome-ink); transition: border-color var(--t-fast); }
.brush-item:hover { border-color: var(--chrome-line); }
.brush-item[aria-pressed="true"] { border-color: #FF8A4C; background: rgba(226, 96, 27, .14); }
.brush-item canvas { width: 100%; height: 46px; }
.brush-item span { font-size: 12.5px; font-weight: 600; }
@media (max-width: 760px) { .brush-lib { grid-template-columns: 1fr; } .brush-sets { display: flex; overflow-x: auto; position: static; scrollbar-width: none; } .brush-set { flex: none; } .brush-list { grid-template-columns: 1fr 1fr; } }

.layer-list { display: grid; gap: 6px; }
.layer-row { display: grid; grid-template-columns: 54px 1fr auto auto; align-items: center; gap: 10px; padding: 6px 6px 6px 6px; border-radius: 14px; background: var(--chrome-2); border: 1.5px solid transparent; cursor: pointer; }
.layer-row.active { border-color: #FF8A4C; background: rgba(226, 96, 27, .14); }
.layer-row.fixed { cursor: default; }
.layer-thumb { width: 54px; height: 42px; border-radius: 8px; background: repeating-conic-gradient(#d8d2c8 0 25%, #f2ede5 0 50%) 0 0 / 10px 10px; overflow: hidden; border: 1px solid var(--chrome-line); display: grid; place-items: center; }
.layer-thumb canvas { max-width: 100%; max-height: 100%; }
.layer-name { min-width: 0; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layer-meta { display: block; font-size: 11px; color: var(--chrome-ink-2); font-weight: 500; }
.layer-badge { font-size: 11px; font-weight: 700; color: var(--chrome-ink-2); min-width: 18px; text-align: center; }
.vis-toggle { width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; color: var(--chrome-ink); display: grid; place-items: center; }
.vis-toggle:hover { background: var(--chrome-3); }
.vis-toggle[aria-pressed="false"] { opacity: .4; }
.layer-opts { grid-column: 1 / -1; display: grid; gap: 10px; padding: 8px 4px 4px; cursor: default; }
.layer-opts .row { display: flex; align-items: center; gap: 10px; }
.layer-opts label { font-size: 11.5px; color: var(--chrome-ink-2); font-weight: 600; min-width: 58px; }
.layer-opts input[type="range"] { flex: 1; accent-color: #FF8A4C; }
.layer-opts output { font-size: 12px; min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.layer-opts select { flex: 1; min-height: 34px; border-radius: 10px; background: var(--chrome-3); color: var(--chrome-ink); border: 1px solid var(--chrome-line); padding: 0 10px; }
.layer-opts select option { background: var(--chrome-solid); }
.layer-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.layer-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--chrome-line); background: transparent; color: var(--chrome-ink); font-size: 12px; font-weight: 600; }
.layer-actions button:hover:not(:disabled) { background: var(--chrome-2); }
.layer-actions button:disabled { opacity: .35; }
.layer-actions button.danger { color: #FF9A84; }
.layer-actions button[aria-pressed="true"] { color: #FF8A4C; border-color: #FF8A4C; }
.layer-sep { height: 1px; background: var(--chrome-line); margin: 6px 0; }
.paper-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.paper-dots button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--chrome-line); }
.paper-dots button[aria-pressed="true"] { border-color: #FF8A4C; }

.disc { position: relative; width: 260px; height: 260px; margin: 4px auto 14px; touch-action: none; }
.disc-canvas { display: block; cursor: crosshair; border-radius: 50%; touch-action: none; }
.disc-canvas:focus-visible { outline: 2px solid #FF8A4C; outline-offset: 4px; }
.disc-knob { position: absolute; z-index: 1; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.4); pointer-events: none; }
.colour-now { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.colour-now .sw { width: 46px; height: 46px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); flex: none; }
.colour-now strong { display: block; font-size: 15px; text-transform: capitalize; }
.colour-now input { width: 104px; min-height: 30px; border-radius: 8px; border: 1px solid var(--chrome-line); background: var(--chrome-2); color: var(--chrome-ink); padding: 0 8px; font-variant-numeric: tabular-nums; text-transform: uppercase; font-size: 12.5px; margin-top: 4px; }
.pal-name { font-size: 11px; color: var(--chrome-ink-2); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; margin: 14px 0 8px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 8px; }
.swatch { position: relative; aspect-ratio: 1; min-width: 32px; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); display: grid; place-items: center; color: var(--on); transition: transform var(--t-fast) var(--spring); }
.swatch:hover { transform: scale(1.1); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--chrome-solid), 0 0 0 4px var(--chrome-ink); }
.swatch-check { display: grid; }
.swatches > .muted { grid-column: 1 / -1; }
.popover.pop-bottom { top: auto; bottom: calc(70px + var(--safe-b)); right: 50%; transform: translateX(50%); width: 340px; transform-origin: bottom center; }
@media (max-width: 760px) { .popover.pop-bottom { right: 0; transform: none; bottom: 0; width: auto; } }
.sound-panel { display: grid; gap: 14px; }
.sound-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--chrome-line); background: var(--chrome-2); color: var(--chrome-ink); }
.sound-toggle strong { display: block; font-size: 14px; }
.sound-toggle small { display: block; color: var(--chrome-ink-2); font-size: 12px; margin-top: 2px; }
.sound-toggle i { flex: none; width: 40px; height: 24px; border-radius: 99px; background: var(--chrome-3); position: relative; transition: background var(--t-med); }
.sound-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #F4EBDD; transition: transform var(--t-med) var(--spring); }
.sound-toggle.on i { background: #E2601B; }
.sound-toggle.on i::after { transform: translateX(16px); }
.sound-vol { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--chrome-ink-2); font-weight: 600; }
.sound-vol span { min-width: 110px; }
.sound-vol input { flex: 1; accent-color: #FF8A4C; }
.ambient-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ambient-opt { min-height: 40px; border-radius: 12px; border: 1px solid var(--chrome-line); background: transparent; color: var(--chrome-ink); font-size: 12.5px; font-weight: 600; }
.ambient-opt[aria-checked="true"] { border-color: #FF8A4C; background: rgba(226, 96, 27, .16); color: #FFB38A; }

.stage { overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; outline: none; }
.stage.kbd-focus { box-shadow: inset 0 0 0 3px #FF8A4C; }
.stage[data-tool="fill"] { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='white' stroke='%231A1814' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M5.5 11.5L12 5l7 7-6.5 6.5a2 2 0 0 1-2.8 0L5.5 14.3a2 2 0 0 1 0-2.8z'/%3E%3Cpath d='M20.5 15.5s1.5 1.8 1.5 3a1.5 1.5 0 0 1-3 0c0-1.2 1.5-3 1.5-3z'/%3E%3C/svg%3E") 20 22, pointer; }
.stage[data-tool="pan"], .stage.grab { cursor: grab; }
.stage.panning { cursor: grabbing; }
.stage[data-tool="brush"], .stage[data-tool="eraser"], .stage[data-tool="smudge"] { cursor: none; }
.stage[data-tool="eyedropper"] { cursor: copy; }
@media (pointer: coarse) { .stage[data-tool] { cursor: crosshair; } }
.tilt-wrap { position: absolute; inset: 0; transition: transform 460ms var(--spring); }
.tilt-wrap.tilting { transition: transform 90ms linear; }
.viewport { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.viewport.animate { transition: transform 260ms var(--ease); }
.board { position: relative; box-shadow: 0 2px 6px rgba(0,0,0,.25), 0 30px 80px rgba(0,0,0,.45); }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.layer-box { position: absolute; inset: 0; }
.layer-lines { mix-blend-mode: multiply; }
.layer-fills path { transition: fill 160ms var(--ease); }
.layer-fills path.pulse { animation: pulse 260ms var(--ease); }
@keyframes pulse { 50% { opacity: .6; } }
.focus-path { fill: none; stroke: #E2601B; stroke-width: calc(4px / var(--zoom, 1)); stroke-dasharray: calc(10px / var(--zoom, 1)) calc(6px / var(--zoom, 1)); stroke-linejoin: round; animation: march 1s linear infinite; }
@keyframes march { to { stroke-dashoffset: calc(-16px / var(--zoom, 1)); } }
.brush-cursor { position: absolute; left: 0; top: 0; border-radius: 50%; border: 1.5px solid rgba(26,24,20,.9); box-shadow: 0 0 0 1px rgba(255,255,255,.9); pointer-events: none; z-index: 2; transition: width 90ms var(--ease), height 90ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms; }
.brush-cursor.drawing { border-color: rgba(226, 96, 27, .95); box-shadow: 0 0 0 1px rgba(255,255,255,.95), 0 0 0 5px rgba(226, 96, 27, .14); }
.touch-ripple { position: absolute; z-index: 3; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; pointer-events: none; border: 1.5px solid rgba(255, 248, 240, .85); background: radial-gradient(circle, rgba(255,248,240,.28), rgba(255,248,240,0) 70%); animation: ripple 420ms var(--ease) forwards; }
.touch-ripple.pen { width: 22px; height: 22px; margin: -11px 0 0 -11px; border-color: rgba(226, 96, 27, .9); }
@keyframes ripple { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.loupe { position: fixed; z-index: 20; width: 90px; height: 90px; margin: -126px 0 0 -45px; border-radius: 50%; border: 6px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.4); pointer-events: none; background: linear-gradient(var(--new) 0 50%, var(--old) 50% 100%); }
.stage-hint { position: absolute; left: 50%; bottom: calc(70px + var(--safe-b)); transform: translateX(-50%); z-index: 4; pointer-events: none; padding: 8px 16px; border-radius: 999px; background: var(--chrome-solid); color: var(--chrome-ink); font-weight: 500; font-size: 13.5px; width: max-content; max-width: calc(100vw - 32px); text-align: center; border: 1px solid var(--chrome-line); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.stage-hint.gone { opacity: 0; transform: translate(-50%, 8px); }

.celebrate { position: absolute; inset: 0; z-index: 9; pointer-events: none; display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px 76px; }
.celebrate-card { pointer-events: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; max-width: 520px; padding: 16px; border-radius: 22px; background: #FBF8F3; color: #1A1814; border: 1.5px solid #1A1814; box-shadow: 6px 6px 0 #1A1814; animation: rise 460ms var(--spring); }
.celebrate.out .celebrate-card { opacity: 0; transform: translateY(12px); transition: all var(--t-med) var(--ease); }
.celebrate-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #E2601B; color: #F4EBDD; flex: none; border: 1.5px solid #1A1814; }
.celebrate-text strong { font-family: var(--display); font-size: 20px; }
.celebrate-text { flex: 1 1 200px; }
.celebrate .btn-row { flex: 1 1 100%; justify-content: flex-end; }
.celebrate .btn-soft { background: #fff; color: #1A1814; border-color: rgba(26,24,20,.24); }
.celebrate .btn-primary { background: #1A1814; color: #F4EBDD; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.confetti { position: absolute; inset: 0; overflow: hidden; }
.confetti i { position: absolute; top: -12px; left: var(--x); width: 10px; height: 14px; border-radius: 2px; background: var(--c); animation: fall 1.4s var(--delay) cubic-bezier(.3, .6, .5, 1) forwards; opacity: 0; }
@keyframes fall { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--drift), 70vh) rotate(var(--rot)); } }

.gl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; outline: none; }
.gl-canvas.kbd-focus { box-shadow: inset 0 0 0 3px #FF8A4C; }

@media (forced-colors: active) { .swatch[aria-pressed="true"], .bar-btn[aria-pressed="true"] { outline: 3px solid CanvasText; } }

/* ---------------------------------------------------------------- play hub */
.play-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--s5); }
.play-card { display: grid; grid-template-rows: auto 1fr; border-radius: var(--r-xl); background: var(--surface); border: 1.5px solid var(--ink); box-shadow: var(--retro); color: inherit; text-decoration: none; overflow: hidden; transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); }
.play-card:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.play-art { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--surface-2); border-bottom: 1.5px solid var(--ink); padding: var(--s4); overflow: hidden; }
.play-art svg { width: 100%; height: 100%; }
.play-art-avatar { padding: 0; background: #F4E8FF; }
.play-art-avatar svg { height: 100%; width: auto; }
.play-card-body { padding: var(--s5); display: grid; gap: var(--s2); align-content: start; }
.play-card-body h2 { font-family: var(--display); font-size: clamp(24px, 3vw, 30px); letter-spacing: -.02em; line-height: 1.1; }
.play-card-body .eyebrow { margin: 0; }
.play-card-body .btn { justify-self: start; margin-top: var(--s3); }

/* ---------------------------------------------------------------- world map */
.world-path { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--s5); }
.world-card { position: relative; display: grid; border-radius: var(--r-xl); background: var(--surface); border: 1.5px solid var(--line-strong); overflow: hidden; color: inherit; text-decoration: none; transition: border-color var(--t-fast), transform var(--t-med) var(--ease); }
a.world-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.world-card.locked { opacity: .62; }
.world-card.locked .world-art { filter: grayscale(1) blur(1.5px); }
.world-step { position: absolute; top: 14px; left: 14px; z-index: 1; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.world-art { aspect-ratio: 1; display: grid; place-items: center; padding: var(--s5) var(--s4) var(--s3); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.world-art svg { width: 100%; height: 100%; }
.world-card-body { padding: var(--s4) var(--s5) var(--s5); display: grid; gap: 6px; }
.world-card-body h3 { font-family: var(--display); font-size: 22px; letter-spacing: -.01em; }
.world-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.world-go { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; }
.lock-note { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.stars { display: inline-flex; gap: 2px; color: var(--line-strong); }
.stars .on { color: #E3A72F; }
.stars .on svg { fill: currentColor; }

/* ---------------------------------------------------------------- world editor */
.world-editor, .avatar-editor { position: fixed; inset: 0; display: grid; grid-template-rows: auto auto 1fr auto; background: var(--paper); color: var(--ink); }
.avatar-editor { grid-template-rows: auto 1fr; }
.world-bar { display: flex; align-items: center; gap: var(--s2); padding: 10px max(12px, var(--gutter)); padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: var(--surface); }
.world-title { flex: 1; min-width: 0; display: grid; gap: 4px; }
.world-title strong { font-family: var(--display); font-size: 19px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.world-progress { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.world-progress .progress-bar { width: min(140px, 28vw); background: var(--surface-3); }
.world-controls { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: center; padding: 10px 12px 0; }
.world-viewport { position: relative; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.world-viewport:active { cursor: grabbing; }
.world-viewport { background: radial-gradient(ellipse at 50% 40%, var(--surface), var(--surface-2) 70%); }
.world-canvas { position: absolute; inset: 12px; transform-origin: 50% 50%; }
.world-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.world-canvas [data-k] { cursor: pointer; transition: fill var(--t-med) var(--ease); }
.world-canvas:not(.building) [data-k]:hover { filter: brightness(.96); }
.world-canvas.building [data-slot] { cursor: pointer; }
.world-canvas.building [data-slot]:not(.slot-ph):hover path { filter: brightness(.95); }
.world-canvas .slot-ph path { fill: rgba(226, 96, 27, .13); stroke: #E2601B; stroke-width: 1.6; stroke-dasharray: 5 4; animation: ph-pulse 1.8s ease-in-out infinite; }
@keyframes ph-pulse { 50% { fill: rgba(226, 96, 27, .26); } }
[data-motion="reduced"] .world-canvas .slot-ph path { animation: none; }
.world-foot { padding: 10px 12px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); }
.world-hint { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); min-height: 40px; text-align: center; }
.world-hint[hidden], .world-tray[hidden] { display: none; }
.world-tray { display: grid; gap: 10px; max-width: 760px; margin: 0 auto; }
.world-pal-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.world-pal-tabs .chip { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.world-swatches, .av-swatches { display: flex; gap: 10px; overflow-x: auto; padding: 4px 4px 2px; scrollbar-width: none; }
.world-swatches .swatch, .av-swatches .swatch { width: 38px; min-width: 38px; flex: none; box-shadow: inset 0 0 0 1px rgba(26,24,20,.18); }
.world-swatches .swatch[aria-pressed="true"], .av-swatches .swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.swatch-clear { background: var(--surface) !important; color: var(--ink-2); border: 1.5px dashed var(--line-strong) !important; }
.swatch-custom { background: conic-gradient(#F87171, #FBBF24, #A3E635, #34D399, #38BDF8, #818CF8, #E879F9, #F87171) !important; color: #fff; cursor: pointer; overflow: hidden; }
.swatch-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.world-sheet .opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.opt-card { display: grid; gap: 8px; padding: 10px; border-radius: var(--r-l); border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 13.5px; text-align: center; transition: border-color var(--t-fast), transform var(--t-fast) var(--spring); }
.opt-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.opt-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.opt-art { display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--r-m); background: var(--surface-2); padding: 6px; }
.opt-art svg { width: 100%; height: 100%; }
.world-editor .celebrate, .avatar-editor .celebrate { position: fixed; }

/* ---------------------------------------------------------------- avatar studio */
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 200px), 1fr)); gap: var(--s4); }
.avatar-card { display: grid; border-radius: var(--r-xl); border: 1.5px solid var(--line-strong); background: var(--surface); overflow: hidden; color: inherit; text-decoration: none; }
.avatar-card:hover { border-color: var(--ink); }
.avatar-thumb svg { display: block; width: 100%; height: auto; }
.avatar-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 14px; }
.avatar-card-foot strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar-new { aspect-ratio: 300 / 520; place-content: center; justify-items: center; gap: 8px; text-align: center; border-style: dashed; padding: var(--s4); }
.avatar-new-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: var(--paper); }
.avatar-name { background: none; border: 0; padding: 0; text-align: left; font-family: var(--display); font-size: 19px; font-weight: 600; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar-body { display: grid; grid-template-columns: 184px minmax(0, 1fr) minmax(340px, 440px); min-height: 0; }
.avatar-rail { display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; }
.rail-tab { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 14px; border: 0; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 14px; text-align: left; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--spring); }
.rail-tab:hover { background: var(--surface-2); color: var(--ink); }
.rail-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.rail-tab[aria-selected="true"] svg { color: #FF8A4C; }
.avatar-stage { display: grid; place-items: center; padding: var(--s4); min-height: 0; background: var(--surface-2); }
.avatar-stage svg { height: 100%; max-height: calc(100dvh - 110px); width: auto; max-width: 100%; border-radius: var(--r-xl); box-shadow: var(--shadow-2); transition: transform var(--t-med) var(--spring); }
.avatar-side { display: grid; grid-template-rows: auto 1fr; min-height: 0; border-left: 1px solid var(--line); background: var(--surface); }
.avatar-panel-title { font-family: var(--display); font-size: 22px; font-weight: 600; padding: 16px 16px 0; letter-spacing: -.01em; }
@media (max-width: 1100px) and (min-width: 860px) {
  .avatar-body { grid-template-columns: 84px minmax(0, 1fr) minmax(320px, 400px); }
  .rail-tab { flex-direction: column; gap: 4px; padding: 8px 4px; font-size: 10.5px; text-align: center; min-height: 62px; justify-content: center; }
}
.avatar-panel { overflow-y: auto; padding: 4px 16px calc(24px + var(--safe-b)); overscroll-behavior: contain; }
.av-group { padding: 14px 0 6px; }
.av-title { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.av-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.av-options.av-tall .av-art { aspect-ratio: 3 / 4.2; }
.av-opt { display: grid; gap: 6px; padding: 6px; border-radius: var(--r-m); border: 1.5px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--ink-2); transition: border-color var(--t-fast), transform var(--t-fast) var(--spring); }
.av-opt:hover { border-color: var(--ink); transform: translateY(-1px); }
.av-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--ink); }
.av-art { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #F7F1E8; }
.av-art svg { display: block; width: 100%; height: 100%; }
.av-toggle { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-weight: 600; }
.av-toggle input { width: 20px; height: 20px; accent-color: var(--accent); }
.av-note { padding: 12px 0; }
@media (max-width: 859px) {
  .avatar-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(220px, 40dvh) 1fr; }
  .avatar-body .avatar-stage { grid-row: 2; }
  .avatar-rail { grid-row: 1; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .rail-tab { flex: none; min-height: 38px; padding: 0 12px; font-size: 13px; }
  .rail-tab svg { width: 16px; height: 16px; }
  .avatar-panel-title { display: none; }
  .avatar-side { grid-row: 3; }
  .avatar-stage { padding: 10px; }
  .avatar-stage svg { max-height: calc(44dvh - 20px); }
  .avatar-side { border-left: 0; border-top: 1px solid var(--line); }
  .av-options { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
}
.world-progress-text { white-space: nowrap; }
.world-hint span { min-width: 0; }
@media (max-width: 600px) {
  .world-bar { gap: 4px; padding-left: 8px; padding-right: 8px; }
  .world-bar .btn { min-height: 40px; padding: 0 12px; }
  .world-bar .stars svg { width: 13px; height: 13px; }
  .world-progress .progress-bar { width: 56px; }
  .world-hint { font-size: 13px; justify-content: flex-start; }
  .world-controls .segmented button { padding: 0 11px; font-size: 13px; }
}
.quests { margin-top: var(--section); }
.quests-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.quest-meter .progress-bar { width: 160px; height: 8px; background: var(--surface-3); }
.quest-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--s3); }
.quest { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-l); border: 1.5px solid var(--line-strong); background: var(--surface); color: inherit; text-decoration: none; transition: border-color var(--t-fast); }
.quest:hover { border-color: var(--ink); }
.quest-check { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; border: 1.5px solid var(--line-strong); color: var(--ink-3); }
.quest.done .quest-check { background: var(--green); border-color: var(--green); color: #fff; }
.quest-text { display: grid; gap: 2px; min-width: 0; }
.quest.done strong { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.avatar-band { display: grid; grid-template-columns: 1fr; gap: var(--s5); align-items: center; margin-top: var(--s5); padding: clamp(20px, 3vw, 32px); border-radius: var(--r-xl); border: 1.5px solid var(--ink); background: #F4E8FF; color: #1A1814; text-decoration: none; overflow: hidden; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.avatar-band:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.avatar-band-art { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.avatar-band-art svg { width: 100%; height: auto; border-radius: 16px; border: 1.5px solid rgba(26,24,20,.2); }
.avatar-band-copy { display: grid; gap: 10px; justify-items: start; }
.avatar-band-copy .eyebrow { margin: 0; color: #4B463E; }
.avatar-band-copy h3 { font-family: var(--display); font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.avatar-band-copy p { color: #4B463E; max-width: 440px; }
@media (min-width: 860px) { .avatar-band { grid-template-columns: 1.2fr 1fr; } }

/* ---------------------------------------------------------------- elements library */
#pop-elements { width: min(420px, calc(100vw - 24px)); }
.el-panel { display: grid; gap: 10px; }
.el-search { width: 100%; min-height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--chrome-line); background: var(--chrome-2); color: var(--chrome-ink); font: inherit; font-size: 14px; }
.el-search::placeholder { color: var(--chrome-ink-2); }
.el-cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.el-cat { flex: none; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--chrome-line); background: transparent; color: var(--chrome-ink-2); font-weight: 600; font-size: 12.5px; }
.el-cat[aria-selected="true"] { background: var(--chrome-ink); color: var(--chrome-solid); border-color: var(--chrome-ink); }
.el-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; max-height: min(52vh, 420px); overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.el-item { display: grid; justify-items: center; gap: 4px; padding: 8px 4px 6px; border-radius: 14px; border: 1px solid transparent; background: var(--chrome-2); color: var(--chrome-ink-2); font-size: 11.5px; font-weight: 600; transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--spring); }
.el-item:hover { background: var(--chrome-3); border-color: var(--chrome-line); transform: translateY(-1px); color: var(--chrome-ink); }
.el-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.placer { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.placer[hidden] { display: none; }
.placer-box { position: absolute; pointer-events: auto; touch-action: none; cursor: move; outline: 1.5px dashed #FF8A4C; outline-offset: 4px; border-radius: 6px; }
.placer-art, .placer-art svg { display: block; width: 100%; height: 100%; }
.placer-handle { position: absolute; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #FF8A4C; color: #1A1814; border: 2px solid #F4EBDD; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.ph-scale { right: -18px; bottom: -18px; cursor: nwse-resize; }
.ph-rotate { left: 50%; top: -46px; transform: translateX(-50%); cursor: grab; }
.placer-bar { position: absolute; left: 50%; bottom: calc(76px + var(--safe-b)); transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 18px; background: var(--chrome); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--chrome-line); pointer-events: auto; max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none; }
.placer-styles { display: flex; gap: 2px; }
.placer-bar .bar-btn { white-space: nowrap; }
.bar-btn-accent { background: #E2601B; color: #FFF8F0; }
.bar-btn-accent:hover { background: #CF5412; }
/* Studio tools with visible names */
.bar-tr .tool-btn { flex-direction: column; gap: 1px; height: 50px; min-width: 52px; padding: 4px 6px 3px; }
.tool-label { font-size: 10.5px; font-weight: 600; letter-spacing: .01em; line-height: 1; opacity: .8; }
.tool-btn[aria-pressed="true"] .tool-label { opacity: 1; }
@media (max-width: 760px) { .bar-tr .tool-btn { height: 40px; min-width: 36px; padding: 0 6px; } .tool-label { display: none; } }
.world-stage { position: relative; min-height: 0; display: grid; }
.world-stage .world-viewport { grid-area: 1 / 1; }
.world-orbit { grid-area: 1 / 1; align-self: end; justify-self: center; margin-bottom: 12px; z-index: 2; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-1); }
.world-orbit .view-label { min-width: 46px; text-align: center; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.world-orbit .bar-sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 4px; }
.world-floor[hidden] { display: none; }
.opt-count { margin-bottom: 10px; }

/* ---------------------------------------------------------------- motion: reveal, parallax, tilt */
[data-motion="full"] [data-reveal]:not(.in) { opacity: 0; translate: 0 22px; }
[data-motion="full"] [data-reveal] { transition: opacity 620ms var(--ease) var(--rd, 0ms), translate 720ms var(--spring) var(--rd, 0ms), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
[data-motion="full"] .plx { translate: 0 var(--plx, 0); transition: translate 120ms linear; will-change: translate; }
[data-motion="full"] .tilting { transform: perspective(900px) rotateX(var(--tx, 0)) rotateY(var(--ty, 0)) translate(-2px, -2px); }
[data-motion="full"] .page { animation: page-in 560ms var(--ease) both; }
@keyframes page-in { from { opacity: 0; translate: 0 14px; filter: blur(4px); } to { filter: none; } }
[data-motion="full"] .hero-title em, [data-motion="full"] .page-title em { display: inline-block; animation: word-in 900ms var(--spring) 120ms both; }
@keyframes word-in { from { opacity: 0; translate: 0 0.35em; rotate: -3deg; } }
[data-motion="full"] .marquee-track { will-change: transform; }
[data-motion="full"] .avatar-stage svg { animation: doll-float 5.5s ease-in-out infinite; }
@keyframes doll-float { 50% { translate: 0 -6px; } }
[data-motion="full"] .world-card .world-art svg, [data-motion="full"] .play-art svg { transition: scale 600ms var(--spring); }
[data-motion="full"] .world-card:hover .world-art svg, [data-motion="full"] .play-card:hover .play-art svg { scale: 1.04; }
[data-motion="reduced"] [data-reveal] { opacity: 1 !important; translate: none !important; }
/* World editor: clean single-row controls on every width */
.world-controls { flex-wrap: nowrap; justify-content: safe center; overflow-x: auto; scrollbar-width: none; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.world-controls::-webkit-scrollbar { display: none; }
.world-controls .segmented { flex: none; }
.hint-short { display: none; }
@media (max-width: 600px) {
  .world-bar { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: 8px; }
  .world-title strong { font-size: 17px; }
  .world-bar .stars { display: none; }
  .world-bar .btn { width: 40px; padding: 0; justify-content: center; }
  .world-controls { justify-content: flex-start; gap: 6px; padding: 8px 10px; }
  .world-controls .segmented { padding: 3px; }
  .world-controls .segmented button { min-height: 32px; padding: 0 11px; font-size: 12.5px; }
  .world-orbit { gap: 0; padding: 3px; margin-bottom: 10px; }
  .world-orbit .btn-icon { width: 38px; height: 38px; }
  .world-orbit .orbit-zoom { display: none; }
  .world-orbit .view-label { min-width: 40px; font-size: 12px; }
  .world-hint { justify-content: center; font-size: 13px; min-height: 30px; }
  .hint-long { display: none; }
  .hint-short { display: inline; }
  .world-foot { padding: 8px 10px calc(8px + var(--safe-b)); }
  .world-swatches .swatch { width: 34px; min-width: 34px; }
}

/* ---------------------------------------------------------------- accounts & premium */
.avatar-initial { font-family: var(--display); font-weight: 700; font-size: 17px; }
.avatar-btn.is-premium { border-color: #E3A72F; box-shadow: 0 0 0 2px rgba(227,167,47,.35); }
.auth-form, .upgrade { display: grid; gap: 14px; }
.auth-title { font-family: var(--display); font-size: 24px; letter-spacing: -.01em; }
.auth-reason { padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: #7A3510; font-weight: 600; font-size: 14px; }
.field { display: grid; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form-error { color: var(--danger); font-size: 13.5px; font-weight: 600; min-height: 0; }
.form-error:empty { display: none; }
.btn-block { width: 100%; justify-content: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth-swap { text-align: center; }
.upgrade-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price-was { font-size: 20px; color: var(--ink-3); text-decoration: line-through; }
.price-now { font-family: var(--display); font-size: 48px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.price-now small { font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.price-tag { padding: 4px 10px; border-radius: 999px; background: #E3A72F; color: #1A1814; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.perk-list { list-style: none; display: grid; gap: 10px; }
.perk-list li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.perk-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green-soft); color: var(--green); flex: none; }

/* ---------------------------------------------------------------- challenges */
.challenge-band { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s4); margin-top: var(--s5); padding: var(--s5); border-radius: var(--r-xl); border: 1.5px solid var(--ink); background: var(--mustard-soft); color: #1A1814; text-decoration: none; box-shadow: var(--retro); }
.challenge-band h2 { font-family: var(--display); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.1; }
.challenge-band .eyebrow, .challenge-band .muted { color: #4B463E; margin: 0; }
.challenge-band-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #1A1814; color: #F6D186; }
@media (max-width: 700px) { .challenge-band { grid-template-columns: 1fr; } }
.brief-card { display: grid; grid-template-columns: 1fr auto; gap: var(--s5); padding: clamp(20px, 3vw, 36px); border-radius: var(--r-xl); border: 1.5px solid var(--ink); background: var(--surface); box-shadow: var(--retro); margin-bottom: var(--s6); }
.brief-text { display: grid; gap: 10px; justify-items: start; }
.brief-text h2 { font-family: var(--display); font-size: clamp(30px, 4vw, 44px); letter-spacing: -.03em; line-height: 1; }
.brief-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 700; }
.brief-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.brief-elements { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.brief-elements li { padding: 8px 14px; border-radius: 999px; border: 1.5px dashed var(--ink); font-weight: 700; text-transform: capitalize; }
.brief-stat { display: grid; place-content: center; text-align: center; min-width: 140px; padding: 16px; border-radius: var(--r-l); background: var(--surface-2); }
.brief-stat strong { font-family: var(--display); font-size: 48px; line-height: 1; }
@media (max-width: 700px) { .brief-card { grid-template-columns: 1fr; } .brief-stat { min-width: 0; } }
.section-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 220px), 1fr)); gap: var(--s4); }
.entry-card { margin: 0; border-radius: var(--r-l); overflow: hidden; border: 1.5px solid var(--line-strong); background: var(--surface); }
.entry-card.mine { border-color: var(--accent); }
.entry-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-2); }
.entry-card figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.entry-card figcaption > div:first-child { display: grid; min-width: 0; }
.entry-card strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vote { display: flex; align-items: center; gap: 4px; font-weight: 700; }
.vote-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink-2); transition: transform var(--t-fast) var(--spring), color var(--t-fast); }
.vote-btn.on { color: #E0475B; border-color: #E0475B; }
.vote-btn:active { transform: scale(.88); }
.vote-btn:disabled { opacity: .45; }
.past-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); }
.past-card { padding: 16px; border-radius: var(--r-l); border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; gap: 10px; }
.past-card ol { display: grid; gap: 8px; padding-left: 18px; }
.past-card li img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; vertical-align: middle; margin-right: 8px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; max-height: 46vh; overflow-y: auto; }
.pick-card { display: grid; gap: 6px; padding: 6px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 600; text-align: left; }
.pick-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.pick-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pick-card span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.enter-form { display: grid; gap: 14px; }
.leader-list { display: grid; gap: 8px; }
.leader { display: grid; grid-template-columns: 36px 40px 1fr auto auto auto; align-items: center; gap: 12px; padding: 10px 16px; border-radius: var(--r-l); background: var(--surface); border: 1.5px solid var(--line); }
.leader.me { border-color: var(--accent); }
.leader .rank { font-family: var(--display); font-size: 22px; font-weight: 700; text-align: center; }
.leader.p1 .rank { color: #E3A72F; } .leader.p2 .rank { color: #9AA3AE; } .leader.p3 .rank { color: #C27C4A; }
.leader-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--display); font-weight: 700; }
.leader-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-stat, .leader-votes { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.leader-votes { color: #E0475B; font-weight: 700; }
@media (max-width: 520px) { .leader { grid-template-columns: 28px 34px 1fr auto; gap: 8px; padding: 10px; } .leader .leader-stat { display: none; } .leader-avatar { width: 34px; height: 34px; } }
.world-sub { display: flex; gap: var(--s2); flex: none; }
@media (max-width: 600px) {
  .world-controls { flex-direction: column; align-items: stretch; gap: 8px; overflow: visible; }
  .world-controls > .segmented { display: grid; grid-template-columns: 1fr 1fr; }
  .world-controls > .segmented button { min-height: 38px; font-size: 14px; }
  .world-sub { overflow-x: auto; scrollbar-width: none; gap: 6px; margin: 0 -10px; padding: 0 10px; }
  .world-sub::-webkit-scrollbar { display: none; }
  .world-sub .segmented { flex: none; }
}
.world-editor, .avatar-editor { grid-template-columns: minmax(0, 1fr); }
.world-controls, .world-stage, .world-foot, .world-bar { min-width: 0; }
.brief-elements { padding: 0; }
@media (max-width: 600px) { .world-controls > .segmented { width: 100%; } .world-controls > .segmented button { min-width: 0; } }

/* ---------------------------------------------------------------- timelapse */
.tl-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.tl-stage { display: grid; place-items: center; background: var(--surface-2); border-radius: var(--r-l); padding: 12px; min-height: 280px; }
.tl-canvas { display: block; max-width: 100%; max-height: 56vh; border-radius: 12px; box-shadow: var(--shadow-2); background: #fff; }
.tl-canvas:not([width]) { width: 220px; height: 280px; }
.tl-side { display: grid; gap: 14px; }
.tl-bar { width: 100%; height: 8px; background: var(--surface-3); }
@media (max-width: 700px) { .tl-body { grid-template-columns: 1fr; } }
.btn[hidden] { display: none !important; }

/* ---------------------------------------------------------------- AI line art */
.ai-band { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s4); width: 100%; margin-bottom: var(--s5); padding: var(--s5) var(--s5) var(--s5) var(--s5); border-radius: var(--r-xl); border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); text-align: left; box-shadow: var(--retro); overflow: hidden; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.ai-band::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 36px 36px; opacity: .6; pointer-events: none; }
.ai-band > * { position: relative; }
.ai-band:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.ai-band h2 { font-family: var(--display); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.1; }
.ai-band .eyebrow { color: var(--accent); margin: 0; }
.ai-band .muted { margin: 0; }
.ai-band-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--on-accent); border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.ai-band .btn { background: var(--accent); color: var(--on-accent); border-color: var(--ink); }
@media (max-width: 700px) { .ai-band { grid-template-columns: 1fr; } }
.ai-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); }
.ai-form { display: grid; gap: 14px; align-content: start; }
.ai-prompt { min-height: 96px; resize: vertical; padding: 12px 14px; line-height: 1.45; }
.ai-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-preview { display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--r-l); background: #FFFFFF; border: 1.5px dashed var(--line-strong); overflow: hidden; color: #776F63; }
.ai-preview img { width: 100%; height: 100%; object-fit: contain; }
.ai-loading { display: grid; justify-items: center; gap: 10px; }
.ai-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #EADFD0; border-top-color: #E2601B; animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) { .ai-body { grid-template-columns: 1fr; } }
.ai-collection { margin-top: 0; margin-bottom: var(--s5); }
.ai-card { flex: none; width: 180px; display: grid; gap: 8px; padding: 8px; border-radius: var(--r-l); border: 1.5px solid var(--line-strong); background: var(--surface); text-align: left; font-weight: 600; font-size: 13px; }
.ai-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #fff; }
.ai-card:hover { border-color: var(--ink); }
.tl-video { display: block; max-width: 100%; max-height: 56vh; border-radius: 12px; background: #000; box-shadow: var(--shadow-2); }
.tl-video[hidden], .tl-canvas[hidden] { display: none; }
.fam-body { display: grid; gap: var(--s4); }
.fam-preview svg { display: block; width: 100%; height: auto; border-radius: var(--r-l); box-shadow: var(--shadow-1); }
.fam-controls { display: grid; gap: 8px; }
.fam-people, .fam-pets { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.fam-person { flex: none; width: 92px; display: grid; gap: 4px; padding: 6px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.fam-person.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--ink); }
.fam-person span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fam-face { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #F7F1E8; }
.fam-face svg { display: block; width: 100%; height: 100%; }
.fam-preview { display: grid; place-items: center; }
.fam-preview svg { width: auto; max-width: 100%; max-height: 40vh; }
.master-card { position: relative; width: 220px; }
.master-badge { position: absolute; top: 14px; left: 14px; z-index: 1; padding: 3px 10px; border-radius: 999px; background: #1A1814; color: #F6D186; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }

/* ---------------------------------------------------------------- paywall */
.paywall .sheet-body { padding-top: 4px; }
.paywall-body { display: grid; gap: 16px; }
.pw-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pw-balance { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--mustard-soft); color: var(--mustard-ink); font-weight: 700; font-size: 13px; }
.pw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 4px; }
@media (max-width: 760px) { .pw-grid { grid-template-columns: 1fr; } }
.pw-card { position: relative; display: grid; gap: 8px; align-content: start; padding: 20px 18px 18px; border-radius: var(--r-l); border: 1.5px solid var(--line-strong); background: var(--surface); }
.pw-card.featured { border-color: var(--ink); box-shadow: var(--retro); background: linear-gradient(160deg, var(--surface), var(--accent-soft)); }
.pw-card h3 { font-family: var(--display); font-size: 22px; letter-spacing: -.01em; }
.pw-badge { position: absolute; top: -12px; left: 16px; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pw-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pw-price s { color: var(--ink-3); font-size: 16px; }
.pw-price strong { font-family: var(--display); font-size: 36px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.pw-price small { color: var(--ink-3); font-weight: 600; }
.pw-save { justify-self: start; padding: 3px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 700; }
.pw-save.muted-save { background: var(--surface-2); color: var(--ink-3); }
.pw-credits { display: flex; align-items: baseline; gap: 6px; }
.pw-credits strong { font-family: var(--display); font-size: 40px; line-height: 1; letter-spacing: -.03em; }
.pw-credits span { font-weight: 700; color: var(--ink-3); }
.pw-card .btn { margin-top: 6px; }
.pw-perks { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
@media (max-width: 600px) { .pw-perks { grid-template-columns: 1fr; } }
.pw-foot { text-align: center; }
.credit-pill { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line-strong); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 13px; background: var(--surface); }
.credit-pill .icon-wrap { color: #E3A72F; }
.credit-pill[hidden] { display: none; }
.ai-wallet { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brief-rewards { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--mustard-soft); color: var(--mustard-ink); font-weight: 600; font-size: 14px; }
.brief-rewards .icon-wrap { color: #C28A10; }

/* ---------------------------------------------------------------- funky hero */
.hero-funky { position: relative; border-radius: 28px; border: 3px solid #1A1814; box-shadow: 8px 8px 0 #1A1814; overflow: hidden; background: #FBF3E2; color: #1A1814; }
.hf-top { position: relative; padding: clamp(46px, 7vw, 86px) clamp(20px, 5vw, 64px) clamp(40px, 6vw, 72px); background-color: #F25C2A;
  background-image: linear-gradient(#2A120B 2px, transparent 2px), linear-gradient(90deg, #2A120B 2px, transparent 2px); background-size: 84px 84px; background-position: -2px -2px; }
.hf-copy { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; gap: 14px; }
.hf-greet { display: inline-block; padding: 6px 14px; border-radius: 999px; background: #FBF3E2; border: 2.5px solid #1A1814; font-weight: 800; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; box-shadow: 3px 3px 0 #1A1814; transform: rotate(-2deg); }
.hf-title { font-family: var(--display); font-weight: 700; font-size: clamp(44px, 7.4vw, 104px); line-height: .92; letter-spacing: -.045em; color: #FFF6E5; text-shadow: 4px 5px 0 #1A1814; -webkit-text-stroke: 2px #1A1814; paint-order: stroke fill; max-width: 14ch; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; }
.hf-title em { font-style: italic; font-weight: 500; color: #FFC23C; }
.hf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 18px; }
.hf-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 64px; padding: 0 34px; border-radius: 999px; border: 3px solid #1A1814; background: #FFB703; color: #1A1814; font-family: var(--display); font-style: italic; font-weight: 700; font-size: clamp(19px, 2vw, 24px); text-decoration: none; box-shadow: 0 7px 0 #1A1814; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.hf-pill span { text-decoration: underline; text-decoration-thickness: 2.5px; text-underline-offset: 6px; }
.hf-pill:hover { transform: translateY(-2px); box-shadow: 0 9px 0 #1A1814; }
.hf-pill:active { transform: translateY(5px); box-shadow: 0 2px 0 #1A1814; }
.hf-pill-ghost { background: #FBF3E2; }
.hf-pill-ghost span { text-decoration: none; }
.hf-ticket { position: absolute; left: clamp(12px, 5vw, 70px); top: clamp(26px, 5vw, 56px); z-index: 2; display: grid; justify-items: center; padding: 10px 22px; background: #4CC764; border: 3px solid #1A1814; border-radius: 10px; transform: rotate(-9deg); box-shadow: 4px 4px 0 #1A1814;
  -webkit-mask: radial-gradient(circle 9px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 9px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 9px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 9px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat; }
.hf-ticket small { font-weight: 800; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.hf-ticket strong { font-family: var(--display); font-style: italic; font-size: 24px; line-height: 1; }
.hf-burst { position: absolute; right: clamp(10px, 5vw, 70px); top: clamp(30px, 6vw, 70px); z-index: 2; width: clamp(96px, 11vw, 136px); aspect-ratio: 1; display: grid; place-items: center; transform: rotate(12deg); animation: burst-spin 18s linear infinite; }
.hf-burst svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(4px 4px 0 #1A1814); }
.hf-burst b { position: relative; font-family: var(--display); font-style: italic; font-size: clamp(22px, 2.6vw, 30px); color: #FFF6E5; }
@keyframes burst-spin { to { rotate: 360deg; } }
.hf-wave { margin-top: -38px; position: relative; z-index: 1; line-height: 0; color: #FBF3E2; }
.hf-wave { overflow: hidden; }
.hf-wave svg { display: block; width: max(100%, 1200px); height: 40px; }
.hf-bottom { display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 4vw, 48px); align-items: center; padding: 6px clamp(20px, 5vw, 64px) clamp(28px, 4vw, 44px); }
.hf-mascot { position: relative; width: clamp(150px, 18vw, 230px); }
.hf-mascot .mascot { display: block; width: 100%; height: auto; }
.hf-bubble { position: absolute; top: -30px; left: 34%; white-space: nowrap; padding: 8px 14px; border-radius: 18px; background: #FFFFFF; border: 2.5px solid #1A1814; font-weight: 700; font-size: 14px; box-shadow: 3px 3px 0 #1A1814; }
.hf-bubble::after { content: ""; position: absolute; left: 22px; bottom: -9px; width: 14px; height: 14px; background: #FFFFFF; border-left: 2.5px solid #1A1814; border-bottom: 2.5px solid #1A1814; transform: rotate(-45deg); }
.hf-tag { display: grid; gap: 18px; min-width: 0; }
.hf-tag p { font-weight: 600; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.45; max-width: 520px; }
.hf-stack { display: flex; gap: clamp(8px, 1.2vw, 16px); padding: 12px 0 6px; }
.hf-card { flex: 1 1 0; min-width: 0; max-width: 150px; aspect-ratio: 4 / 5; border-radius: 16px; border: 2.5px solid #1A1814; overflow: hidden; padding: 0; background: #fff; box-shadow: 4px 4px 0 #1A1814; transition: transform var(--t-med) var(--spring); }
.hf-card:nth-child(odd) { transform: rotate(-5deg); } .hf-card:nth-child(even) { transform: translateY(-10px) rotate(3deg); } .hf-card:nth-child(3n) { transform: rotate(6deg) translateY(4px); }
.hf-card:hover { transform: translateY(-10px) rotate(0) scale(1.04); }
.hf-card svg { width: 100%; height: 100%; display: block; }
[data-motion="full"] .hf-mascot .mascot { animation: dab-bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes dab-bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
[data-motion="reduced"] .hf-burst { animation: none; }
@media (max-width: 700px) {
  .hf-top { padding-top: 132px; }
  .hf-ticket { top: 22px; left: 14px; padding: 8px 16px; }
  .hf-ticket strong { font-size: 19px; }
  .hf-burst { top: 16px; right: 12px; width: 86px; }
  .hf-bottom { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-top: 36px; }
  .hf-bubble { left: 50%; top: -34px; transform: translateX(-30%); font-size: 13px; }
  .hf-stack { justify-content: center; width: 100%; }
  .hf-card:nth-child(n+5) { display: none; }
  .hf-pill { min-height: 56px; padding: 0 24px; }
}

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.app.immersive .site-footer { display: none; }
.footer-inner { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: var(--s6) var(--gutter) var(--s5); display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s5); }
.footer-brand { display: grid; gap: 10px; align-content: start; max-width: 360px; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.footer-links div { display: grid; gap: 8px; align-content: start; }
.footer-links strong { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.footer-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.footer-links a:hover { color: var(--accent); }
.footer-legal { grid-column: 1 / -1; padding-top: var(--s4); border-top: 1px solid var(--line); }
@media (max-width: 759px) {
  .footer-inner { grid-template-columns: 1fr; padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 32px); }
  .app-main { padding-bottom: 32px; }
}

/* ---------------------------------------------------------------- about */
.about { display: grid; gap: var(--section); }
.ab-hero { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s5); align-items: center; padding: clamp(28px, 5vw, 64px); border-radius: 28px; border: 3px solid #1A1814; box-shadow: 8px 8px 0 #1A1814; color: #1A1814; background-color: #FFC23C;
  background-image: radial-gradient(#1A1814 1.6px, transparent 1.8px); background-size: 26px 26px; overflow: hidden; }
.ab-hero-copy { display: grid; gap: 16px; justify-items: start; }
.ab-chip { padding: 6px 14px; border-radius: 999px; background: #FBF3E2; border: 2.5px solid #1A1814; font-weight: 800; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; box-shadow: 3px 3px 0 #1A1814; transform: rotate(-3deg); }
.ab-hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(42px, 6.4vw, 88px); line-height: .92; letter-spacing: -.045em; color: #FFF6E5; -webkit-text-stroke: 2px #1A1814; paint-order: stroke fill; text-shadow: 4px 5px 0 #1A1814; }
.ab-hero h1 em { color: #F25C2A; font-weight: 500; }
.ab-hero p { font-size: clamp(16px, 1.6vw, 19px); font-weight: 600; line-height: 1.5; max-width: 560px; background: #FBF3E2; border: 2.5px solid #1A1814; border-radius: 18px; padding: 16px 18px; box-shadow: 4px 4px 0 #1A1814; }
.ab-hero-art { position: relative; justify-self: center; width: min(320px, 70vw); }
.ab-hero-art .mascot { width: 100%; height: auto; display: block; }
[data-motion="full"] .ab-hero-art .mascot { animation: dab-bob 3s ease-in-out infinite; transform-origin: 50% 100%; }
.ab-sticker { position: absolute; padding: 8px 14px; border-radius: 12px; border: 2.5px solid #1A1814; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 18px; box-shadow: 3px 3px 0 #1A1814; }
.ab-sticker.s1 { top: 0; left: -12px; background: #4CC764; transform: rotate(-10deg); }
.ab-sticker.s2 { bottom: 10px; right: -10px; background: #2F55D4; color: #FFF6E5; transform: rotate(8deg); }
.ab-band { margin: 0 calc(var(--gutter) * -1); background: #F25C2A; border-block: 3px solid #1A1814; overflow: hidden; transform: rotate(-1.2deg); }
.ab-marquee { display: flex; width: max-content; animation: ab-marq 26s linear infinite; }
@keyframes ab-marq { to { transform: translateX(-50%); } }
.ab-marquee-track { display: flex; gap: 28px; padding: 16px 14px; }
.ab-marquee span { display: inline-flex; align-items: center; gap: 28px; font-family: var(--display); font-style: italic; font-weight: 700; font-size: clamp(22px, 3vw, 34px); color: #FFF6E5; white-space: nowrap; -webkit-text-stroke: 1px #1A1814; }
.ab-marquee i { font-style: normal; color: #FFC23C; }
.ab-section { display: grid; gap: var(--s4); }
.ab-story { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: start; }
.ab-story h2, .ab-cta h2 { font-family: var(--display); font-size: clamp(32px, 4.4vw, 56px); font-weight: 600; letter-spacing: -.035em; line-height: 1; }
.ab-story h2 em { color: var(--accent); }
.ab-story p { color: var(--ink-2); font-size: 17px; line-height: 1.6; margin-bottom: 12px; }
.ab-founders { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.ab-founder { position: relative; display: grid; gap: 10px; align-content: start; padding: 28px; border-radius: 24px; border: 2.5px solid var(--ink); background: var(--surface); box-shadow: 6px 6px 0 var(--ink); transform: rotate(var(--tilt)); transition: transform var(--t-med) var(--spring); }
.ab-founder:hover { transform: rotate(0) translateY(-4px); }
.ab-monogram { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--c); color: #FFF6E5; border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-family: var(--display); font-weight: 700; font-style: italic; font-size: 32px; -webkit-text-stroke: 1px #1A1814; margin-bottom: 6px; }
.ab-founder h3 { font-family: var(--display); font-size: 28px; letter-spacing: -.02em; }
.ab-role { font-weight: 700; color: var(--accent); }
.ab-founder p { color: var(--ink-2); line-height: 1.6; }
.ab-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ab-tags li { padding: 6px 12px; border-radius: 999px; border: 1.5px dashed var(--ink); font-size: 13px; font-weight: 700; }
.ab-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.ab-value { padding: 24px; border-radius: 20px; background: var(--c); color: #1A1814; border: 2.5px solid #1A1814; box-shadow: 5px 5px 0 #1A1814; transform: rotate(var(--tilt)); }
.ab-value strong { display: block; font-family: var(--display); font-style: italic; font-size: 28px; margin-bottom: 6px; }
.ab-value p { font-weight: 600; line-height: 1.45; }
.ab-cta { display: grid; justify-items: center; text-align: center; gap: 16px; padding: clamp(32px, 6vw, 64px) var(--s4); border-radius: 28px; border: 2.5px dashed var(--ink-3); }
.ab-cta p { color: var(--ink-2); font-size: 17px; }
@media (max-width: 860px) {
  .ab-hero, .ab-story, .ab-founders, .ab-values { grid-template-columns: 1fr; }
  .ab-founder, .ab-value { transform: none; }
}

/* ---------------------------------------------------------------- legal */
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s6); }
.legal-toc a { padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line-strong); color: var(--ink-2); text-decoration: none; font-size: 13px; font-weight: 600; }
.legal-toc a:hover { border-color: var(--ink); color: var(--ink); }
.legal-section { padding: var(--s5) 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 16px); }
.legal-section h2 { font-family: var(--display); font-size: 24px; letter-spacing: -.01em; margin-bottom: 10px; }
.legal-section p { color: var(--ink-2); line-height: 1.65; margin-bottom: 10px; max-width: 70ch; }
.hf-bottom { position: relative; z-index: 2; }

/* ---------------------------------------------------------------- profile */
.acct-wrap { display: grid; gap: var(--s5); margin-bottom: var(--s5); }
.acct-you { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s5); align-items: center; }
.acct-id { display: grid; gap: 4px; min-width: 0; }
.acct-id .eyebrow { margin: 0; }
.acct-name { font-family: var(--display); font-size: clamp(28px, 3.4vw, 38px); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.acct-id .muted { overflow-wrap: anywhere; }
.acct-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.acct-note { grid-column: 1 / -1; }
.profile-pic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: #F4E8FF; flex: none; }
.profile-pic svg { width: 100%; height: 100%; display: block; }
.profile-pic.initial { background: var(--accent); color: var(--on-accent); font-family: var(--display); font-weight: 700; font-size: 20px; }
.acct-pic { width: 104px; height: 104px; border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.acct-pic.initial { font-size: 46px; }
.header-pic { width: 100%; height: 100%; font-size: 17px; }
.avatar-btn { overflow: hidden; padding: 0; }
.acct-plan { display: grid; gap: var(--s4); }
.acct-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acct-plan-head .section-title em { color: var(--accent); font-style: italic; }
.plan-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1.5px solid var(--line-strong); font-weight: 700; font-size: 13px; }
.plan-chip.premium { background: var(--mustard-soft); border-color: #E3A72F; color: var(--mustard-ink); }
.acct-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.acct-tile { display: grid; gap: 8px; align-content: start; padding: 18px; border-radius: var(--r-l); background: var(--surface-2); border: 1px solid var(--line); }
.acct-tile .btn { justify-self: start; margin-top: 4px; }
.tile-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.tile-big { font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.tile-big small { font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.meter i { height: 10px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-strong); }
.meter i.on { background: var(--accent); border-color: var(--accent); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
.acct-earn { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-l); border: 1.5px dashed var(--line-strong); color: var(--ink); text-decoration: none; }
.acct-earn:hover { border-color: var(--ink); }
.acct-earn > span:nth-child(2) { flex: 1; min-width: 0; }
.acct-earn-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--mustard-soft); color: var(--mustard-ink); flex: none; }
.acct-history summary { cursor: pointer; font-weight: 700; }
.acct-history ul { list-style: none; display: grid; gap: 6px; margin-top: 10px; }
.acct-history li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.acct-history .plus { color: var(--green); } .acct-history .minus { color: var(--danger); }
.edit-profile { display: grid; gap: 16px; }
.pic-grid { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; }
.pic-opt { flex: none; width: 82px; display: grid; justify-items: center; gap: 6px; padding: 8px 4px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 12px; font-weight: 600; text-decoration: none; }
.pic-opt .profile-pic { width: 56px; height: 56px; }
.pic-opt span:last-child { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pic-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--ink); }
.pic-new .profile-pic.initial { background: var(--surface-2); color: var(--ink-2); border: 1.5px dashed var(--line-strong); }
.pw-change summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.pw-change .edit-profile { margin-top: 10px; }
@media (max-width: 760px) {
  .acct-you { grid-template-columns: auto 1fr; }
  .acct-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .acct-tiles { grid-template-columns: 1fr; }
  .acct-pic { width: 76px; height: 76px; }
}
.challenge-body .quests { margin-top: 0; }
.quest-tag { margin-left: auto; flex: none; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); font-size: 11.5px; font-weight: 700; }
.quest-list { padding: 0; margin: 0; }

/* ---------------------------------------------------------------- quests (redesign) */
.challenge-body .quests { display: grid; gap: var(--s6); margin: 0; }
.qhero { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s5); align-items: center; padding: clamp(20px, 3vw, 32px); border-radius: 26px; border: 2.5px solid var(--ink); background: var(--surface); box-shadow: 6px 6px 0 var(--ink); }
.qring { position: relative; width: 104px; height: 104px; color: var(--ink); }
.qring svg { width: 100%; height: 100%; }
.qring strong { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 26px; font-weight: 700; }
.qhero-text { display: grid; gap: 6px; justify-items: start; }
.qhero-text h2 { font-family: var(--display); font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; line-height: 1.05; }
.qlevel { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--mustard-soft); color: var(--mustard-ink); font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.qnext { display: grid; gap: 6px; min-width: 220px; padding: 16px 18px; border-radius: 18px; background: var(--qc); color: #1A1814; border: 2.5px solid #1A1814; box-shadow: 4px 4px 0 #1A1814; text-decoration: none; transform: rotate(1.5deg); transition: transform var(--t-med) var(--spring); }
.qnext:hover { transform: rotate(0) translateY(-2px); }
.qnext-label { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.qnext-title { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 22px; font-weight: 700; }
.qline { display: grid; gap: var(--s4); }
.qline-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.qline-head h3 { font-family: var(--display); font-size: 26px; letter-spacing: -.01em; }
.qline-meter { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.qline-meter .qbar { width: 160px; }
.qbar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.qbar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width var(--t-slow) var(--ease); }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--s4); }
.qcard { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 18px; border-radius: 20px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color var(--t-fast), transform var(--t-med) var(--spring), box-shadow var(--t-med) var(--ease); }
a.qcard:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: 4px 4px 0 var(--ink); }
.qcard-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--qc); color: #1A1814; border: 2px solid #1A1814; box-shadow: 3px 3px 0 #1A1814; transform: rotate(-4deg); }
.qcard-body { display: grid; gap: 4px; min-width: 0; }
.qcard-body h3 { font-weight: 800; font-size: 16px; }
.qcard-body p { color: var(--ink-2); font-size: 13.5px; line-height: 1.4; }
.qcard-progress { display: grid; gap: 5px; margin-top: 6px; }
.qcard-progress span { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.qcard .qbar i { background: var(--qc); }
.qgo { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: 13px; color: var(--accent); white-space: nowrap; }
.qnext .qgo { color: #1A1814; }
.qstamp { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 10px; border: 2px solid var(--green); color: var(--green); font-weight: 900; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; transform: rotate(-8deg); }
.qcard.done { background: color-mix(in srgb, var(--green) 8%, var(--surface)); }
.qcard.done .qcard-body h3 { text-decoration: none; }
.qcard.locked { opacity: .6; border-style: dashed; }
.qcard.locked .qcard-icon { background: var(--surface-2); color: var(--ink-3); box-shadow: none; border-color: var(--line-strong); }
@media (max-width: 760px) {
  .qhero { grid-template-columns: auto 1fr; }
  .qnext { grid-column: 1 / -1; transform: none; }
  .qring { width: 84px; height: 84px; }
}
.pw-bonus { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 4px 10px; border-radius: 999px; background: var(--mustard-soft); color: var(--mustard-ink); font-size: 12.5px; font-weight: 700; }

/* ---- Photo to Page, redraws and credit uses ---- */
.ai-band-actions { display: flex; flex-direction: column; gap: 8px; }
.ai-band-actions .btn { justify-content: flex-start; white-space: nowrap; }
@media (max-width: 700px) { .ai-band-actions { flex-direction: row; flex-wrap: wrap; } .ai-band-actions .btn { flex: 1 1 160px; justify-content: center; } }
.ai-tabs { display: flex; width: 100%; }
.ai-tabs button { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ai-pane { display: grid; gap: var(--s3); }
.ai-drop { position: relative; display: grid; place-items: center; align-content: center; gap: 4px; width: 100%; min-height: 180px; padding: var(--s4); border-radius: var(--r-l); border: 1.5px dashed var(--line-strong); background: var(--surface-2); color: var(--ink); overflow: hidden; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.ai-drop:hover, .ai-drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.ai-drop img { max-width: 100%; max-height: 240px; border-radius: var(--r-m, 12px); object-fit: contain; }
.ai-drop-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--mustard-soft); color: var(--mustard-ink); border: 1.5px solid var(--ink); }
.ai-drop-change { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 700; }
.ai-tips { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; color: var(--ink-3); }
.ai-result { display: grid; gap: var(--s3); align-content: start; }
.ai-versions { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.ai-versions .tile-label { margin-right: 4px; }
.ai-versions button { flex: none; width: 56px; height: 56px; padding: 0; border-radius: 10px; border: 1.5px solid var(--line-strong); background: #FFFFFF; overflow: hidden; }
.ai-versions button.on { border-color: var(--ink); box-shadow: 2px 2px 0 var(--accent); }
.ai-versions img { width: 100%; height: 100%; object-fit: contain; }
.pw-offer { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s4); padding: var(--s4); border-radius: var(--r-l); border: 1.5px solid var(--ink); background: color-mix(in srgb, #FFC23C 16%, var(--surface)); color: var(--ink); box-shadow: var(--retro); }
.pw-offer strong { font-family: var(--display); font-size: 20px; }
.pw-offer p { margin: 2px 0 0; color: var(--ink-2); }
.pw-uses { margin-top: var(--s5); padding: var(--s4); border-radius: var(--r-l); border: 1.5px solid var(--line-strong); }
.pw-uses ul { list-style: none; margin: var(--s2) 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 20px; }
.pw-uses li { display: flex; align-items: center; gap: 10px; }
.pw-uses li strong { margin-left: auto; white-space: nowrap; font-size: 14px; }
.pw-uses .muted { margin: 0; }
.ai-versions[hidden] { display: none; }
.ai-failed { display: grid; justify-items: center; gap: 10px; max-width: 300px; padding: var(--s4); text-align: center; color: #8A3B12; }
.ai-failed p { margin: 0; font-weight: 600; color: #3D2A1E; }
.brief-stat.has-cover { position: relative; overflow: hidden; min-width: 220px; color: #FFFFFF; place-content: end center; padding-bottom: 20px; }
.brief-stat.has-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.brief-stat.has-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0,0,0,.6)); }
.brief-stat.has-cover strong, .brief-stat.has-cover span { position: relative; z-index: 1; }

/* Background sprinkles: sparkles, stars and doodles, tinted from the theme so they work in light and dark. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--deco, var(--ink)); opacity: var(--deco-opacity, .07);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27640%27 height=%27640%27 fill=%27%23000%27%3E%3Cpath d=%27M70 76Q70 90 84 90Q70 90 70 104Q70 90 56 90Q70 90 70 76Z%27/%3E%3Ccircle cx=%27210%27 cy=%2760%27 r=%273%27/%3E%3Cpath d=%27M330.0 121.0L332.4 126.7L338.6 127.2L333.9 131.3L335.3 137.3L330.0 134.1L324.7 137.3L326.1 131.3L321.4 127.2L327.6 126.7Z%27 stroke-linejoin=%27round%27/%3E%3Ccircle cx=%27470%27 cy=%2770%27 r=%276%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%272%27/%3E%3Cpath d=%27M554 190H566M560 184V196%27 stroke=%27%23000%27 stroke-width=%272.2%27 stroke-linecap=%27round%27/%3E%3Ccircle cx=%27120%27 cy=%27250%27 r=%272.5%27/%3E%3Cpath d=%27M250 270q6 -8 12 0t12 0t12 0%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%272.2%27 stroke-linecap=%27round%27/%3E%3Cpath d=%27M420 291Q420 300 429 300Q420 300 420 309Q420 300 411 300Q420 300 420 291Z%27/%3E%3Ccircle cx=%27560%27 cy=%27330%27 r=%273%27/%3E%3Cpath d=%27M60 410A10 10 0 1 0 60 430A7.2 7.2 0 1 1 60 410Z%27/%3E%3Cpath d=%27M200.0 453.0L201.9 457.5L206.7 457.8L203.0 461.0L204.1 465.7L200.0 463.1L195.9 465.7L197.0 461.0L193.3 457.8L198.1 457.5Z%27 stroke-linejoin=%27round%27/%3E%3Cpath d=%27M325 420H335M330 415V425%27 stroke=%27%23000%27 stroke-width=%272.2%27 stroke-linecap=%27round%27/%3E%3Cpath d=%27M500 468Q500 480 512 480Q500 480 500 492Q500 480 488 480Q500 480 500 468Z%27/%3E%3Ccircle cx=%27300%27 cy=%27560%27 r=%272.5%27/%3E%3Ccircle cx=%27110%27 cy=%27560%27 r=%275%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%272%27/%3E%3Ccircle cx=%27590%27 cy=%27580%27 r=%272%27/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27400%27 height=%27400%27 fill=%27%23000%27%3E%3Ccircle cx=%2740%27 cy=%2760%27 r=%271.8%27/%3E%3Cpath d=%27M160 34Q160 40 166 40Q160 40 160 46Q160 40 154 40Q160 40 160 34Z%27/%3E%3Ccircle cx=%27300%27 cy=%27110%27 r=%271.8%27/%3E%3Cpath d=%27M76.5 200H83.5M80 196.5V203.5%27 stroke=%27%23000%27 stroke-width=%272.2%27 stroke-linecap=%27round%27/%3E%3Cpath d=%27M240 225Q240 230 245 230Q240 230 240 235Q240 230 235 230Q240 230 240 225Z%27/%3E%3Ccircle cx=%27360%27 cy=%27300%27 r=%272%27/%3E%3Ccircle cx=%27130%27 cy=%27330%27 r=%271.8%27/%3E%3Cpath d=%27M330 26Q330 30 334 30Q330 30 330 34Q330 30 326 30Q330 30 330 26Z%27/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27640%27 height=%27640%27 fill=%27%23000%27%3E%3Cpath d=%27M70 76Q70 90 84 90Q70 90 70 104Q70 90 56 90Q70 90 70 76Z%27/%3E%3Ccircle cx=%27210%27 cy=%2760%27 r=%273%27/%3E%3Cpath d=%27M330.0 121.0L332.4 126.7L338.6 127.2L333.9 131.3L335.3 137.3L330.0 134.1L324.7 137.3L326.1 131.3L321.4 127.2L327.6 126.7Z%27 stroke-linejoin=%27round%27/%3E%3Ccircle cx=%27470%27 cy=%2770%27 r=%276%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%272%27/%3E%3Cpath d=%27M554 190H566M560 184V196%27 stroke=%27%23000%27 stroke-width=%272.2%27 stroke-linecap=%27round%27/%3E%3Ccircle cx=%27120%27 cy=%27250%27 r=%272.5%27/%3E%3Cpath d=%27M250 270q6 -8 12 0t12 0t12 0%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%272.2%27 stroke-linecap=%27round%27/%3E%3Cpath d=%27M420 291Q420 300 429 300Q420 300 420 309Q420 300 411 300Q420 300 420 291Z%27/%3E%3Ccircle cx=%27560%27 cy=%27330%27 r=%273%27/%3E%3Cpath d=%27M60 410A10 10 0 1 0 60 430A7.2 7.2 0 1 1 60 410Z%27/%3E%3Cpath d=%27M200.0 453.0L201.9 457.5L206.7 457.8L203.0 461.0L204.1 465.7L200.0 463.1L195.9 465.7L197.0 461.0L193.3 457.8L198.1 457.5Z%27 stroke-linejoin=%27round%27/%3E%3Cpath d=%27M325 420H335M330 415V425%27 stroke=%27%23000%27 stroke-width=%272.2%27 stroke-linecap=%27round%27/%3E%3Cpath d=%27M500 468Q500 480 512 480Q500 480 500 492Q500 480 488 480Q500 480 500 468Z%27/%3E%3Ccircle cx=%27300%27 cy=%27560%27 r=%272.5%27/%3E%3Ccircle cx=%27110%27 cy=%27560%27 r=%275%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%272%27/%3E%3Ccircle cx=%27590%27 cy=%27580%27 r=%272%27/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27400%27 height=%27400%27 fill=%27%23000%27%3E%3Ccircle cx=%2740%27 cy=%2760%27 r=%271.8%27/%3E%3Cpath d=%27M160 34Q160 40 166 40Q160 40 160 46Q160 40 154 40Q160 40 160 34Z%27/%3E%3Ccircle cx=%27300%27 cy=%27110%27 r=%271.8%27/%3E%3Cpath d=%27M76.5 200H83.5M80 196.5V203.5%27 stroke=%27%23000%27 stroke-width=%272.2%27 stroke-linecap=%27round%27/%3E%3Cpath d=%27M240 225Q240 230 245 230Q240 230 240 235Q240 230 235 230Q240 230 240 225Z%27/%3E%3Ccircle cx=%27360%27 cy=%27300%27 r=%272%27/%3E%3Ccircle cx=%27130%27 cy=%27330%27 r=%271.8%27/%3E%3Cpath d=%27M330 26Q330 30 334 30Q330 30 330 34Q330 30 326 30Q330 30 330 26Z%27/%3E%3C/svg%3E");
  -webkit-mask-size: 640px 640px, 400px 400px; mask-size: 640px 640px, 400px 400px;
  -webkit-mask-position: 0 0, 170px 230px; mask-position: 0 0, 170px 230px;
  -webkit-mask-repeat: repeat; mask-repeat: repeat;
}
:root[data-theme="dark"] { --deco: #F4EBDD; --deco-opacity: .06; }
body.immersive::after { display: none; }
@media (max-width: 700px) { body::after { -webkit-mask-size: 480px 480px, 300px 300px; mask-size: 480px 480px, 300px 300px; } }
.pw-wrap { position: relative; display: block; }
.pw-wrap .field-input { width: 100%; padding-right: 48px; }
.pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer; }
.pw-eye:hover { color: var(--ink); background: var(--surface-2); }
.pw-eye[aria-pressed="true"] { color: var(--accent); }
.ai-cats { margin: 4px 0 6px; }

/* the hidden attribute always wins over layout display rules */
[hidden] { display: none !important; }
/* drawn (AI line-art) library pages sit on white paper inside the tinted card */
.tcard-photo { padding: 9%; }
.tcard-photo img { width: 100%; height: 100%; object-fit: contain; background: #FFFFFF; border-radius: 4px; box-shadow: 0 8px 16px rgba(26,24,20,.16); }
/* weekly challenge band in dark mode: a warm mustard-tinted card with light text */
:root[data-theme="dark"] .challenge-band { background: color-mix(in srgb, #F0B43C 14%, var(--surface)); border-color: color-mix(in srgb, #F0B43C 55%, var(--ink)); color: var(--ink); box-shadow: 4px 4px 0 color-mix(in srgb, #F0B43C 45%, #000); }
:root[data-theme="dark"] .challenge-band .eyebrow { color: #F0B43C; }
:root[data-theme="dark"] .challenge-band .muted { color: var(--ink-2); }
:root[data-theme="dark"] .challenge-band-icon { background: #F0B43C; color: #1A1814; }

/* ---- challenge: stats, entry viewer, past challenges ---- */
.ch-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: var(--s3); color: var(--ink-2); font-size: 14px; }
.ch-stats strong { font-family: var(--display); font-size: 20px; color: var(--ink); }
.ch-guest-note { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--s3); padding: 8px 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 13.5px; }
.entry-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.entry-medal { position: absolute; top: 8px; left: 8px; font-size: 26px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.entry-view { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); gap: var(--s5); align-items: center; }
.entry-big { position: relative; border-radius: var(--r-l); overflow: hidden; background: #FFFFFF; border: 1.5px solid var(--line-strong); }
.entry-big img { display: block; width: 100%; max-height: 70vh; object-fit: contain; }
.entry-nav { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); display: grid; place-items: center; box-shadow: var(--retro); }
.entry-nav.prev { left: 10px; } .entry-nav.prev svg { transform: rotate(180deg); }
.entry-nav.next { right: 10px; }
.entry-side { display: grid; gap: 10px; align-content: center; justify-items: start; }
.entry-side h3 { font-family: var(--display); font-size: clamp(22px, 3vw, 30px); line-height: 1.1; }
.entry-rank { padding: 4px 12px; border-radius: 999px; background: var(--mustard-soft); color: var(--mustard-ink); font-weight: 700; font-size: 14px; }
.entry-votes { font-size: 15px; color: var(--ink-2); } .entry-votes strong { font-family: var(--display); font-size: 30px; color: var(--ink); }
@media (max-width: 760px) { .entry-view { grid-template-columns: 1fr; } }
.past-open { text-align: left; color: inherit; cursor: pointer; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.past-open:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); border-color: var(--ink); }
.past-cover { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); }
.past-cover img { width: 100%; height: 100%; object-fit: cover; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 110px)); gap: 12px; align-items: end; }
.podium-spot { display: grid; justify-items: center; gap: 4px; text-align: center; }
.podium-spot img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1.5px solid var(--ink); background: #FFF; }
.podium-spot.p1 { order: 2; } .podium-spot.p1 img { box-shadow: 4px 4px 0 #F0B43C; }
.podium-spot.p2 { order: 1; } .podium-spot.p3 { order: 3; }
.podium-medal { font-size: 24px; margin-top: -18px; }
@media (max-width: 760px) { .podium { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
