/* SlotSheet. The sign-up sibling of BingoSheet, PuzzleSheet and CrossSheet: chunky outlines, offset "sticker"
   shadows, a mint hero. Self-hosted Bricolage Grotesque (OFL, see /fonts/OFL.txt). No external requests. No inline
   style attributes (the CSP forbids them): meter widths are classes w0 ... w100 generated below. */

@font-face {
  font-family: 'Bricolage';
  src: url('/fonts/bricolage-grotesque.woff2') format('woff2-variations'), url('/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --lime: #b6f03c;
  --pink: #ff4f9a;
  --sky: #38bdf8;
  --sun: #ffd23f;
  --grape: #7c4dff;
  --tang: #ff8a1f;
  --mint: #3ee0b0;
  --coral: #ff7f5c;
  --deep: #16123d; /* fixed ink for outlines and paper */

  --bg: #fbfaf2;
  --bg-alt: #f0f6da;
  --surface: #ffffff;
  --surface-2: #f6f7ec;
  --ink: #16123d;
  --ink-soft: #4a4570;
  --line: #16123d;
  --shadow: #16123d;
  --hero-bg: #3ee0b0; /* deep ink on it: 10.9:1 */
  --hero-ink: #16123d;
  --hero-line: rgba(22, 18, 61, 0.1);
  --brand-b: #3a0ca3; /* on the mint header: 7.2:1 */
  --mark-bg: #ff4f9a;
  --mark-ink: #16123d;
  --pop: #5b2be0;
  --pop-btn: #5b2be0; /* white text: 7.9:1 */
  --pop-ink: #ffffff;
  --chip-bg: #ffffff;
  --ok-bg: #dcf7b0;
  --ok-ink: #2c4a00;
  --bad-bg: #ffd9e8;
  --bad-ink: #8a0c43;
  --warn-bg: #fff1c2;
  --warn-ink: #5c3d00;
  --band: #5b2be0;
  --band-ink: #ffffff;
  --focus: #5b2be0;

  --font: 'Bricolage', ui-rounded, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 22px;
  --bw: 3px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f0c29;
    --bg-alt: #151137;
    --surface: #1d1846;
    --surface-2: #262057;
    --ink: #f3f0ff;
    --ink-soft: #c9c2ee;
    --line: #f3f0ff;
    --shadow: #b6f03c;
    --hero-bg: #1b1550;
    --hero-ink: #f3f0ff;
    --hero-line: rgba(182, 240, 60, 0.1);
    --brand-b: #b6f03c;
    --mark-bg: #b6f03c;
    --mark-ink: #16123d;
    --pop: #b6f03c;
    --pop-btn: #6d3cf5;
    --chip-bg: #262057;
    --ok-bg: #2c4a00;
    --ok-ink: #d9f99d;
    --bad-bg: #5a1235;
    --bad-ink: #ffc2db;
    --warn-bg: #4a3500;
    --warn-ink: #ffe49a;
    --band: #b6f03c;
    --band-ink: #16123d;
    --focus: #b6f03c;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0f0c29;
  --bg-alt: #151137;
  --surface: #1d1846;
  --surface-2: #262057;
  --ink: #f3f0ff;
  --ink-soft: #c9c2ee;
  --line: #f3f0ff;
  --shadow: #b6f03c;
  --hero-bg: #1b1550;
  --hero-ink: #f3f0ff;
  --hero-line: rgba(182, 240, 60, 0.1);
  --brand-b: #b6f03c;
  --mark-bg: #b6f03c;
  --mark-ink: #16123d;
  --pop: #b6f03c;
  --pop-btn: #6d3cf5;
  --chip-bg: #262057;
  --ok-bg: #2c4a00;
  --ok-ink: #d9f99d;
  --bad-bg: #5a1235;
  --bad-ink: #ffc2db;
  --warn-bg: #4a3500;
  --warn-ink: #ffe49a;
  --band: #b6f03c;
  --band-ink: #16123d;
  --focus: #b6f03c;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font); overflow-x: hidden; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 0.4em; font-weight: 800; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); border: 1.5px solid color-mix(in srgb, var(--line) 25%, transparent); padding: 0.05em 0.35em; border-radius: 6px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.skip:focus { left: 8px; }
.fine { font-size: 0.86rem; color: var(--ink-soft); margin: 0.6em 0 0; }
.test-banner { background: var(--sun); color: var(--deep); text-align: center; font-weight: 700; padding: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  --sh: 4px;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
  padding: 0.62em 1.25em; border: var(--bw) solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font-weight: 750; text-decoration: none; cursor: pointer;
  box-shadow: var(--sh) var(--sh) 0 var(--shadow); transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s;
  white-space: nowrap; line-height: 1.2;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: calc(var(--sh) + 2px) calc(var(--sh) + 2px) 0 var(--shadow); }
.btn:active { transform: translate(var(--sh), var(--sh)); box-shadow: 0 0 0 var(--shadow); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-pop { background: var(--pop-btn); color: var(--pop-ink); border-color: var(--deep); box-shadow: var(--sh) var(--sh) 0 var(--deep); }
.btn-pop:hover { box-shadow: calc(var(--sh) + 2px) calc(var(--sh) + 2px) 0 var(--deep); }
.btn-ghost { background: var(--surface); }
.btn-ink { background: var(--deep); color: #f3f0ff; border-color: var(--deep); }
.btn-sm { --sh: 3px; padding: 0.42em 0.95em; font-size: 0.92rem; }
.btn-xl { --sh: 6px; font-size: clamp(1.15rem, 2.4vw, 1.45rem); padding: 0.7em 1.4em; }
.btn-block { width: 100%; }
.btn .arrow { display: inline-block; transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(5px); }
.linkish { background: none; border: 0; padding: 0; color: inherit; font-weight: 750; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--hero-bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: var(--bw) solid var(--line); color: var(--hero-ink); }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; text-decoration: none; }
.brand b { color: var(--brand-b); font-weight: 800; }
.logo-mark { width: 34px; height: 34px; transition: transform 0.4s cubic-bezier(.3, 1.6, .5, 1); }
:root[data-theme='dark'] .logo-mark rect, .site-footer .logo-mark rect { stroke: #f3f0ff; stroke-width: 1.6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .logo-mark rect { stroke: #f3f0ff; stroke-width: 1.6; } }
.brand:hover .logo-mark { transform: rotate(-12deg) scale(1.08); }
.nav { margin-left: auto; display: flex; gap: 22px; font-weight: 700; }
.nav a { text-decoration: none; position: relative; white-space: nowrap; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; background: var(--pop); transform: scaleX(0); transform-origin: left; transition: transform 0.2s; border-radius: 3px; }
.nav a:hover::after { transform: scaleX(1); }
.theme-toggle { width: 42px; height: 42px; border-radius: 50%; border: var(--bw) solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: transform 0.3s; flex: none; }
.theme-toggle:hover { transform: rotate(-20deg) scale(1.06); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.theme-toggle .i-moon { fill: var(--ink); stroke: none; }
.theme-toggle .i-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .i-sun { display: block; }
:root[data-theme='dark'] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme='light']) .theme-toggle .i-moon { display: none; }
}
@media (max-width: 860px) {
  .nav a:not(.nav-all) { display: none; } /* phones keep only the "All tools" pill */
  .nav { gap: 0; }
  .brand { font-size: 1.25rem; }
  .header-inner { gap: 10px; min-height: 60px; }
}
@media (max-width: 420px) { /* brand + All tools + toggle + CTA overflowed a 360 px screen by ~30 px */
  .header-inner { gap: 7px; }
  .brand { font-size: 1.08rem; gap: 6px; }
  .logo-mark { width: 28px; height: 28px; }
  .header-cta { font-size: 0.85rem; padding-inline: 0.75em; }
}
@media (max-width: 359px) { /* 320 px phones: header overflowed by 24-30 px once touch targets grew to 44 px */
  .site-header .header-inner { gap: 4px; padding-inline: 12px; }
  .brand { font-size: 0.96rem; gap: 5px; letter-spacing: -0.04em; }
  .logo-mark { width: 26px; height: 26px; }
  .header-cta { font-size: 0.8rem; padding-inline: 0.6em; white-space: nowrap; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; background-color: var(--hero-bg); color: var(--hero-ink); padding: clamp(28px, 5vw, 64px) 0 clamp(40px, 6vw, 80px); overflow: hidden; isolation: isolate;
  background-image: linear-gradient(var(--hero-line) 2px, transparent 2px), linear-gradient(90deg, var(--hero-line) 2px, transparent 2px);
  background-size: 36px 36px; background-position: -1px -1px;
}
:root[data-theme='dark'] .hero { background-image: linear-gradient(var(--hero-line) 2px, transparent 2px), linear-gradient(90deg, var(--hero-line) 2px, transparent 2px), radial-gradient(1100px 520px at 85% 0%, rgba(62, 224, 176, 0.26), transparent 62%), linear-gradient(160deg, #1b1550, #0f0b2e); background-size: 36px 36px, 36px 36px, auto, auto; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .hero { background-image: linear-gradient(var(--hero-line) 2px, transparent 2px), linear-gradient(90deg, var(--hero-line) 2px, transparent 2px), radial-gradient(1100px 520px at 85% 0%, rgba(62, 224, 176, 0.26), transparent 62%), linear-gradient(160deg, #1b1550, #0f0b2e); background-size: 36px 36px, 36px 36px, auto, auto; }
}
.hero-deco i { position: absolute; z-index: -1; display: grid; place-items: center; font-style: normal; font-weight: 800; color: var(--deep); border: var(--bw) solid var(--deep); border-radius: 12px; width: 58px; height: 58px; font-size: 1.9rem; box-shadow: 4px 4px 0 var(--deep); animation: float 7s ease-in-out infinite; }
.hero-deco i:nth-child(1) { background: var(--pink); top: 8%; right: 5%; transform: rotate(10deg); }
.hero-deco i:nth-child(2) { background: var(--sky); top: 48%; left: -14px; width: 46px; height: 46px; font-size: 1.4rem; animation-delay: -2s; }
.hero-deco i:nth-child(3) { background: var(--sun); bottom: 5%; right: 40%; width: 40px; height: 40px; font-size: 1.2rem; animation-delay: -4s; }
.hero-deco i:nth-child(4) { background: #fff; top: 3%; left: 43%; width: 36px; height: 36px; font-size: 1.1rem; animation-delay: -1s; }
.hero-deco i:nth-child(5) { background: var(--tang); top: 26%; right: 36%; width: 30px; height: 30px; font-size: 0.95rem; animation-delay: -3s; }
.hero-deco i:nth-child(6) { background: var(--grape); color: #fff; bottom: 10%; left: 3%; width: 40px; height: 40px; font-size: 1.2rem; animation-delay: -5s; }
@media (max-width: 760px) { .hero-deco i:nth-child(1), .hero-deco i:nth-child(4), .hero-deco i:nth-child(5) { display: none; } }
@keyframes float { 0%, 100% { translate: 0 0; rotate: -6deg; } 50% { translate: 0 -16px; rotate: 8deg; } }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; font-size: 0.95rem; padding: 6px 14px 6px 10px; border: var(--bw) solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: 3px 3px 0 var(--shadow); margin-bottom: 18px; }
.eyebrow .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--grape); animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(124, 77, 255, 0.7); } 80%, 100% { box-shadow: 0 0 0 10px rgba(124, 77, 255, 0); } }
.hero-title { font-size: clamp(2.6rem, 6.2vw, 4.7rem); line-height: 0.95; letter-spacing: -0.045em; margin-bottom: 0.3em; max-width: 13ch; }
.hero-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: -6px 0 clamp(22px, 3vw, 34px); }
.hero-cta-note { font-weight: 700; font-size: 0.95rem; }
.hero-title-theme { font-size: clamp(2.2rem, 5vw, 4rem); max-width: 15ch; }
.hero-emoji { display: inline-block; animation: wiggle 2.6s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes wiggle { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) scale(1.04); } }
/* The highlighter swipe: same marker as a found word. */
.hero-title mark {
  color: var(--mark-ink); padding: 0 0.16em 0.04em; margin: 0 -0.04em; border-radius: 0.5em; display: inline-block; transform: rotate(-2.5deg);
  background: linear-gradient(var(--mark-bg), var(--mark-bg)) no-repeat left center / 100% 100%; box-shadow: 0 0 0 var(--bw) var(--deep), 5px 5px 0 var(--bw) var(--deep);
  animation: swipe 0.8s cubic-bezier(.6, 0, .3, 1) 0.25s both;
}
@keyframes swipe { from { background-size: 0% 100%; color: var(--hero-ink); box-shadow: 0 0 0 0 var(--deep), 0 0 0 0 var(--deep); } 70% { box-shadow: 0 0 0 0 var(--deep), 0 0 0 0 var(--deep); } }
.hero-lede { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 44ch; margin-bottom: clamp(22px, 3vw, 32px); }
.hero-lede b { background: linear-gradient(transparent 58%, color-mix(in srgb, var(--pink) 55%, transparent) 58%); }
.crumbs { font-size: 0.9rem; font-weight: 650; margin-bottom: 14px; opacity: 0.85; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Generator ---------- */
.gen { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); grid-template-areas: 'intro preview' 'form preview'; column-gap: clamp(28px, 4.5vw, 64px); row-gap: 8px; align-items: start; }
.gen-intro { grid-area: intro; }
.gen-form { grid-area: form; scroll-margin-top: 90px; }
.preview { grid-area: preview; position: sticky; top: 88px; }
@media (max-width: 920px) {
  .gen { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'intro' 'preview' 'form'; row-gap: 22px; }
  .preview { position: relative; top: 0; }
}
.panel { background: var(--surface); color: var(--ink); border: var(--bw) solid var(--line); border-radius: var(--r); box-shadow: 8px 8px 0 var(--shadow); }
.gen-form { padding: clamp(18px, 2.6vw, 30px); display: grid; gap: 18px; animation: rise 0.6s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.lbl { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.lbl-note { text-transform: none; letter-spacing: 0; font-weight: 600; opacity: 0.85; }
.lbl-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.input { width: 100%; border: var(--bw) solid color-mix(in srgb, var(--line) 30%, transparent); background: var(--surface-2); border-radius: 14px; padding: 0.6em 0.85em; transition: border-color 0.15s, box-shadow 0.15s; }
.input:focus { outline: none; border-color: var(--grape); box-shadow: 0 0 0 4px color-mix(in srgb, var(--grape) 28%, transparent); }
.input::placeholder { color: color-mix(in srgb, var(--ink-soft) 80%, transparent); }
.input-title { font-size: 1.25rem; font-weight: 750; }
.input-sm { padding: 0.4em 0.65em; border-radius: 10px; font-size: 0.95rem; width: auto; }
.words { min-height: 150px; resize: vertical; line-height: 1.5; font-size: 1rem; }
.hint { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.badge { font-size: 0.82rem; font-weight: 800; padding: 3px 11px; border-radius: 999px; transition: background-color 0.2s, color 0.2s; }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.bad { background: var(--bad-bg); color: var(--bad-ink); animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.gen-row { display: flex; gap: 18px 26px; flex-wrap: wrap; }
.gen-row > .field { flex: 1 1 200px; }
.field-size { flex: 1 1 220px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { --c: var(--sun); display: inline-flex; align-items: center; gap: 6px; border: 2px solid color-mix(in srgb, var(--line) 25%, transparent); background: var(--chip-bg); border-radius: 999px; padding: 0.3em 0.85em; font-weight: 700; font-size: 0.9rem; cursor: pointer; text-decoration: none; transition: transform 0.15s, border-color 0.15s, background-color 0.15s; }
.chip:hover { transform: translateY(-2px) rotate(-1.5deg); border-color: var(--c); }
.chip.on { background: var(--c); color: var(--deep); border-color: var(--deep); box-shadow: 2px 2px 0 var(--deep); }
.chip-more { border-style: dashed; }
.c-pink { --c: var(--pink); } .c-orange, .c-tang { --c: var(--tang); } .c-yellow, .c-sun { --c: var(--sun); }
.c-teal, .c-mint { --c: var(--mint); } .c-blue, .c-sky { --c: var(--sky); } .c-violet, .c-grape { --c: var(--grape); } .c-lime { --c: var(--lime); }
.chip.on.c-violet, .chip.on.c-grape { color: #fff; }
details.more { border: 2px dashed color-mix(in srgb, var(--line) 28%, transparent); border-radius: 16px; padding: 0 14px; }
details.more summary { cursor: pointer; font-weight: 800; padding: 10px 0; list-style: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: '+'; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--ink); color: var(--bg); font-size: 1rem; line-height: 1; transition: transform 0.2s; }
details.more[open] summary::before { transform: rotate(45deg); }
.more-body { display: grid; gap: 16px; padding: 4px 0 16px; }
.toggles { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; background: none; border: 0; padding: 0; color: inherit; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.track { width: 46px; height: 26px; border-radius: 999px; background: color-mix(in srgb, var(--line) 22%, transparent); position: relative; transition: background-color 0.2s; flex: none; }
.track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1); }
.switch input:checked + .track { background: var(--grape); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch-pro .switch-text { opacity: 0.85; }
.switch-pro:hover .track::after { transform: translateX(6px); }
.pro-tag, .upsell-btn i { font-style: normal; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; background: var(--grape); color: #fff; padding: 2px 7px; border-radius: 6px; }
.form-error { margin: 0; font-weight: 700; color: var(--bad-ink); background: var(--bad-bg); padding: 10px 14px; border-radius: 12px; }
.report { font-size: 0.92rem; background: var(--surface-2); border-radius: 14px; padding: 12px 14px; border: 2px solid color-mix(in srgb, var(--line) 18%, transparent); }
.report.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn-ink) 40%, transparent); }
.report p { margin: 0 0 6px; }
.report p:last-child { margin: 0; }
.report ul { margin: 0 0 8px; padding-left: 20px; }
.report-title { font-weight: 800; }
.report-fixes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.fine-row { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; align-items: center; }
.handoff-row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 0; }
.handoff { font-weight: 750; color: var(--ink); }


/* ---------- Marquee ---------- */
.marquee { background: var(--deep); color: #f3f0ff; border-block: var(--bw) solid var(--deep); overflow: hidden; padding: 14px 0; }
.marquee-track { display: flex; width: max-content; animation: scroll 50s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; } /* a keyboard focus target never slides away */
.marquee a, .marquee-dup { display: inline-flex; }
.marquee a { padding: 0 22px; font-weight: 750; font-size: 1.1rem; text-decoration: none; white-space: nowrap; gap: 8px; }
.marquee a:hover { color: var(--lime); }
.marquee a:focus-visible { outline-offset: -3px; } /* the strip clips overflow: keep the ring inside it */
.marquee a + a::before, .marquee-dup a::before { content: '✦'; color: var(--lime); margin-right: 22px; }
@keyframes scroll { to { transform: translateX(-50%); } }


/* ---------- Sections ---------- */
section.how, section.features, section.themes, section.pricing, section.faq, section.related, .guide { padding: clamp(48px, 7vw, 96px) 0; }
.section-title { font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -0.035em; }
.section-title-sm { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 1.2em; }
.section-lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; }
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step-card { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r); padding: 26px; box-shadow: 6px 6px 0 var(--c); transition: transform 0.2s; }
.step-card:hover { transform: translateY(-4px) rotate(-0.6deg); }
.step-n { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--c); color: var(--deep); font-weight: 800; font-size: 1.6rem; border: var(--bw) solid var(--deep); margin-bottom: 14px; transform: rotate(-6deg); }
.step-card h3 { font-size: 1.5rem; }
.step-card p { margin: 0; color: var(--ink-soft); }
.features { background: var(--bg-alt); border-block: var(--bw) solid var(--line); }
.feat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 26px; }
.feat { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: 6px 6px 0 var(--c, var(--shadow)); transition: transform 0.2s; }
.feat:hover { transform: translateY(-4px); }
.feat-wide { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end; }
.feat h3 { font-size: 1.35rem; }
.feat p { margin: 0; color: var(--ink-soft); }
.feat-wide h3 { font-size: 2rem; }
.feat-wide p { font-size: 1.1rem; }
@media (max-width: 960px) { .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feat-grid { grid-template-columns: minmax(0, 1fr); } .feat-wide { grid-column: auto; grid-row: auto; } .feat-wide h3 { font-size: 1.6rem; } }
.feat-demo { height: 90px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.tiles-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-decoration: none; background: var(--surface); border: var(--bw) solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: 5px 5px 0 var(--c); transition: transform 0.16s, box-shadow 0.16s; }
.tile:hover { transform: translate(-3px, -3px) rotate(-0.8deg); box-shadow: 8px 8px 0 var(--c); }
.tile-emoji { grid-row: span 2; font-size: 2rem; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--c) 32%, transparent); transition: transform 0.3s cubic-bezier(.3, 1.8, .5, 1); }
.tile:hover .tile-emoji { transform: scale(1.15) rotate(-8deg); }
.tile-name { font-weight: 800; font-size: 1.12rem; line-height: 1.15; }
.tile-meta { font-size: 0.85rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pro { background: var(--band); color: var(--band-ink); padding: clamp(48px, 7vw, 96px) 0; border-block: var(--bw) solid var(--line); position: relative; overflow: hidden; }
.pro::before { content: 'PRO PRO PRO PRO PRO PRO'; position: absolute; right: -40px; top: 10px; font-weight: 800; font-size: 9rem; opacity: 0.08; white-space: nowrap; letter-spacing: -0.04em; pointer-events: none; }
.tag { display: inline-block; font-weight: 800; font-size: 0.85rem; padding: 5px 12px; border-radius: 999px; border: 2px solid var(--deep); margin-bottom: 14px; }
.tag-lime { background: var(--lime); color: var(--deep); }
.tag-ink { background: var(--deep); color: #f3f0ff; }
.pro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
@media (max-width: 900px) { .pro-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pro-grid { grid-template-columns: 1fr; } }
.pro-card { background: #fff; color: var(--deep); border: var(--bw) solid var(--deep); border-radius: 18px; padding: 20px; box-shadow: 5px 5px 0 var(--deep); display: flex; flex-direction: column; align-items: flex-start; transition: transform 0.18s; }
.pro-card:hover { transform: translateY(-4px) rotate(0.5deg); }
.pro-card h3 { font-size: 1.3rem; margin-top: 8px; }
.pro-card p { color: #4a4570; flex: 1; }
.pro-emoji { font-size: 2rem; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 34px 0 18px; align-items: start; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.plan { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r); padding: 26px; box-shadow: 6px 6px 0 var(--shadow); position: relative; }
.plan h3 { font-size: 1.2rem; }
.plan .price { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 6px; }
.plan ul { padding: 0; list-style: none; margin: 14px 0 22px; display: grid; gap: 8px; }
.plan li { padding-left: 28px; position: relative; }
.plan li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--lime); color: var(--deep); font-weight: 800; font-size: 0.75rem; display: grid; place-items: center; margin-top: 3px; }
.plan-hot { border-color: var(--grape); box-shadow: 8px 8px 0 var(--grape); transform: translateY(-10px); }
.plan-flag { position: absolute; top: -16px; right: 20px; background: var(--pop-btn); color: #fff; font-weight: 800; padding: 4px 12px; border-radius: 999px; border: 2px solid var(--deep); transform: rotate(4deg); }
.plan-note { background: var(--lime); color: var(--deep); border-radius: 10px; padding: 6px 10px; font-size: 0.92rem; font-weight: 600; }

.faq details { background: var(--surface); border: var(--bw) solid var(--line); border-radius: 16px; margin-bottom: 12px; box-shadow: 4px 4px 0 var(--shadow); }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 800; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; line-height: 1; color: var(--grape); transition: transform 0.2s; }
:root[data-theme='dark'] .faq summary::after { color: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .faq summary::after { color: var(--lime); } }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 16px; margin: 0; color: var(--ink-soft); }

.license { padding: 0 0 64px; }
.license-panel { padding: 22px 26px; box-shadow: 5px 5px 0 var(--shadow); }
.license-panel h2 { font-size: 1.3rem; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form .input { flex: 1 1 220px; }
.form-msg { min-height: 1.4em; margin: 8px 0 0; font-weight: 600; }
.pro-status { font-weight: 800; color: var(--ok-ink); }


/* ---------- Landing pages ---------- */
.guide-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .guide-grid { grid-template-columns: minmax(0, 1fr); } }
.guide-main, .guide-side { min-width: 0; overflow-wrap: break-word; }
.guide-intro { font-size: 1.18rem; line-height: 1.6; }
.guide-steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; margin: 22px 0 10px; }
.guide-steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 62px; background: var(--surface); border: var(--bw) solid var(--line); border-radius: 16px; box-shadow: 4px 4px 0 var(--shadow); }
.guide-steps li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--lime); color: var(--deep); border: 2px solid var(--deep); font-weight: 800; transform: rotate(-6deg); }
.guide-steps li:nth-child(2)::before { background: var(--sky); } .guide-steps li:nth-child(3)::before { background: var(--pink); } .guide-steps li:nth-child(4)::before { background: var(--sun); }
.guide-tips { padding-left: 0; list-style: none; display: grid; gap: 10px; }
.guide-tips li { padding-left: 34px; position: relative; }
.guide-tips li::before { content: '✦'; position: absolute; left: 4px; top: -1px; color: var(--grape); font-size: 1.2rem; }
:root[data-theme='dark'] .guide-tips li::before { color: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .guide-tips li::before { color: var(--lime); } }
.guide-side { position: sticky; top: 90px; display: grid; gap: 24px; }
@media (max-width: 900px) { .guide-side { position: static; } }
.words-panel { padding: 22px; }
.words-title { font-size: 1.3rem; }
.cluelist { margin: 0 0 18px; display: grid; gap: 8px; }
.cluelist div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr); gap: 10px; padding-bottom: 8px; border-bottom: 2px dashed color-mix(in srgb, var(--line) 18%, transparent); }
.cluelist dt { font-weight: 800; overflow-wrap: anywhere; }
.cluelist dd { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.sister-panel { background: var(--deep); color: #f3f0ff; border: var(--bw) solid var(--deep); border-radius: var(--r); padding: 22px; box-shadow: 6px 6px 0 var(--pink); }
.sister-panel p { color: #d6d0f5; }
.sister-panel .btn-ink { background: var(--sky); color: var(--deep); border-color: #f3f0ff; box-shadow: 4px 4px 0 #f3f0ff; }
.sister-panel .btn-ink-2 { background: var(--pink); }
.sister-btns { display: flex; flex-wrap: wrap; gap: 12px 14px; }
.sister-panel .chips { margin-top: 16px; }
.sister-panel .chip { background: transparent; color: #f3f0ff; border-color: rgba(243, 240, 255, 0.4); }
.sister-panel .chip:hover { border-color: var(--pink); }
.sister-panel-wide { margin-top: 40px; }
.sister-kicker { font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pink) !important; margin-bottom: 6px; }
.sister-title { font-size: 1.6rem; }
.related { background: var(--bg-alt); border-top: var(--bw) solid var(--line); }
.related-more { margin-top: 22px; font-weight: 700; }
.prose { padding-block: 48px 72px; font-size: 1.08rem; }
.prose h1 { font-size: 3rem; } .prose h2 { font-size: 1.5rem; margin-top: 1.4em; }
.success-box { padding: 22px; margin: 18px 0; }
.license-key { font-size: 1.05rem; word-break: break-all; }
.hero-hub { padding-bottom: 56px; }


/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: #f3f0ff; padding: 48px 0 40px; }
.site-footer .brand b { color: var(--lime); }
.footer-top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.footer-top p { margin: 0; opacity: 0.85; }
.footer-themes { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 600; font-size: 0.95rem; margin-bottom: 22px; }
.footer-themes a { opacity: 0.85; text-decoration: none; }
.footer-themes a:hover { opacity: 1; color: var(--lime); }
.site-footer .fine { color: #c9c2ee; }

/* ---------- Dialogs ---------- */
.dlg { border: var(--bw) solid var(--line); border-radius: 26px; background: var(--surface); color: var(--ink); padding: 0; box-shadow: 10px 10px 0 var(--grape); max-width: min(96vw, 560px); width: 100%; max-height: 94vh; }
.dlg[open] { animation: dlgin 0.35s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes dlgin { from { transform: translateY(30px) scale(0.94); opacity: 0; } }
.dlg::backdrop { background: rgba(15, 12, 41, 0.6); backdrop-filter: blur(6px); }
.dlg-waitlist form { padding: 26px; display: grid; gap: 10px; }
.dlg-waitlist h2 { font-size: 2rem; margin: 0; }
.dlg-waitlist .tag { justify-self: start; margin: 0; }
.wl-feature { margin: 0; font-weight: 700; color: var(--grape); }
:root[data-theme='dark'] .wl-feature { color: var(--lime); }
/* System dark too: grape on the dark dialog was 3.4:1. */
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .wl-feature { color: var(--lime); } }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--grape); flex: none; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; background: var(--deep); color: #f3f0ff; font-weight: 750; padding: 12px 20px; border-radius: 999px; border: 2px solid #f3f0ff; box-shadow: 4px 4px 0 var(--lime); animation: dlgin 0.3s; max-width: calc(100vw - 32px); text-align: center; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 2000; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: fall var(--t, 2s) cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes fall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x, 0), 105vh) rotate(var(--r, 720deg)); opacity: 0.9; } }

/* ---------- Planned Pro (not built: waitlist only) ---------- */
.pro-lede { font-size: 1.1rem; max-width: 62ch; opacity: 0.95; }
.planned-tag { display: inline-block; margin-top: 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: var(--sun); color: var(--deep); border: 2px solid var(--deep); padding: 1px 8px; border-radius: 6px; }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .preview { padding-inline: 2px; }
  .preview-card { transform: none; }
  .sticker { font-size: 0.8rem; }
  .sticker-top { right: -2px; }
  .gen-row { gap: 16px; }
  .share-row { flex-wrap: wrap; }
  .share-row .btn { flex: 1 1 auto; }
}

/* ---------- Touch screens: tap targets of at least 44 px, 16 px inputs (no iOS zoom) ---------- */
@media (pointer: coarse) {
  .btn-sm, .chip, .switch, .x-btn, .qty-btn, .row-x { min-height: 44px; }
  .qty-btn, .row-x, .qty-input { min-width: 44px; }
  .handoff { display: inline-flex; align-items: center; min-height: 44px; }
  .theme-toggle { width: 44px; height: 44px; flex: none; }
  .brand { min-height: 44px; }
  nav a.nav-all { min-width: 44px; min-height: 44px; justify-content: center; }
  .crumbs a { display: inline-block; padding-block: 12px; }
  .crumbs { margin-block: -12px 2px; }
  .footer-themes { row-gap: 0; }
  .footer-themes a { display: inline-flex; align-items: center; min-height: 44px; }
  .marquee { padding-block: 4px; }
  .marquee a { padding-block: 10px; }
  .input-sm { font-size: 16px; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee-dup { display: none; }
  .slot.pop, .meter-fill { animation: none; }
}


/* ---------- Live preview (builder) ---------- */
.preview { padding: 26px 10px 0 6px; max-width: 560px; width: 100%; justify-self: center; }
.preview-card { position: relative; transform: rotate(-1deg); transition: transform 0.3s; }
.preview-card:hover, .preview-card:focus-within { transform: rotate(0deg); }
.sticker { position: absolute; z-index: 3; font-weight: 800; padding: 6px 14px; border-radius: 12px; border: var(--bw) solid var(--deep); box-shadow: 3px 3px 0 var(--deep); font-size: 0.95rem; white-space: nowrap; pointer-events: none; }
.sticker-top { top: -16px; right: -6px; background: var(--sun); color: var(--deep); transform: rotate(6deg); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.preview-hint { margin: 12px 4px 0; font-weight: 700; font-size: 0.92rem; text-align: center; }
.empty { color: var(--ink-soft); font-weight: 600; padding: 12px 0; margin: 0; }

/* ---------- Sheet card (preview, shared page, print) ---------- */
.sheet-card { background: var(--surface); color: var(--ink); border: var(--bw) solid var(--line); border-radius: var(--r); box-shadow: 8px 8px 0 var(--shadow); padding: clamp(18px, 3vw, 28px); }
.sheet-title { font-size: clamp(1.6rem, 3.6vw, 2.4rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 6px; overflow-wrap: anywhere; outline: none; }
.sheet-date { font-weight: 750; margin: 0 0 6px; }
.sheet-note { color: var(--ink-soft); margin: 0 0 10px; overflow-wrap: anywhere; }
.meter { position: relative; height: 16px; border-radius: 999px; background: var(--surface-2); border: 2px solid var(--line); overflow: hidden; margin: 14px 0 6px; }
.meter-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--lime), var(--mint)); border-right: 2px solid var(--line); transition: width 0.5s cubic-bezier(.3, 1.4, .5, 1); animation: grow 0.9s cubic-bezier(.2, .9, .3, 1) both; }
.meter-fill.w0 { border-right: 0; }
@keyframes grow { from { width: 0; } }
.meter-count { font-weight: 800; font-size: 0.95rem; margin: 0 0 14px; }
.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.slot { position: relative; border: 2px solid var(--line); border-left: 10px solid var(--c, var(--lime)); border-radius: 16px; padding: 12px 14px; background: var(--surface); display: grid; gap: 8px; transition: transform 0.18s; }
.slot:hover { transform: translateX(3px); }
.slot.is-full { background: var(--surface-2); }
.slot.pop { animation: slotpop 0.55s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes slotpop { 40% { transform: scale(1.035) rotate(-0.6deg); } }
.slot-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.slot-label { font-weight: 800; font-size: 1.1rem; overflow-wrap: anywhere; min-width: 0; }
.slot-count { font-size: 0.82rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-ink); white-space: nowrap; }
.slot-count.full { background: var(--bad-bg); color: var(--bad-ink); }
.pips { display: flex; flex-wrap: wrap; gap: 5px; }
.pips i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: transparent; }
.pips i.on { background: var(--c); border-color: var(--deep); animation: dab 0.4s cubic-bezier(.3, 1.8, .5, 1) both; }
@keyframes dab { from { transform: scale(0.2); } }
.bar { display: block; height: 10px; border-radius: 999px; border: 2px solid var(--line); overflow: hidden; position: relative; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--c); }
.claims { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.claims:empty { display: none; }
.claim { display: inline-flex; align-items: center; gap: 6px; background: color-mix(in srgb, var(--c) 30%, var(--surface)); color: var(--ink); border: 2px solid color-mix(in srgb, var(--line) 30%, transparent); border-radius: 999px; padding: 3px 4px 3px 12px; font-size: 0.95rem; max-width: 100%; }
.claim:not(:has(.x-btn)) { padding-right: 12px; }
.claim-who { overflow-wrap: anywhere; min-width: 0; }
.claim-note { color: color-mix(in srgb, var(--ink) 50%, var(--ink-soft)); font-size: 0.88rem; } /* plain --ink-soft is 4.4:1 on a dark-mode lime chip */
.claim.mine { border-color: var(--line); box-shadow: 2px 2px 0 var(--shadow); }
.you { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; background: var(--deep); color: #f3f0ff; padding: 1px 7px; border-radius: 6px; }
.x-btn { border: 2px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; font-weight: 750; font-size: 0.8rem; padding: 2px 10px; cursor: pointer; transition: background-color 0.15s; }
.x-btn:hover, .x-btn.armed { background: var(--bad-bg); color: var(--bad-ink); }
.btn-claim { justify-self: start; }
.print-only { display: none !important; }

/* ---------- Builder form ---------- */
.slot-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.srow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.qty { display: inline-flex; align-items: center; border: var(--bw) solid color-mix(in srgb, var(--line) 30%, transparent); border-radius: 14px; background: var(--surface-2); overflow: hidden; }
.qty-input { width: 3.2em; text-align: center; border: 0; border-radius: 0; background: transparent; padding: 0.55em 0.1em; font-weight: 800; -moz-appearance: textfield; appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input:focus { box-shadow: none; outline: 3px solid var(--focus); outline-offset: -3px; }
.qty-btn { border: 0; background: transparent; width: 36px; height: 40px; font-size: 1.25rem; font-weight: 800; cursor: pointer; color: inherit; }
.qty-btn:hover { background: color-mix(in srgb, var(--grape) 18%, transparent); }
.row-x { border: 0; background: transparent; width: 36px; height: 40px; border-radius: 12px; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink-soft); }
.row-x:hover { background: var(--bad-bg); color: var(--bad-ink); }
.add-row { justify-self: start; border-style: dashed; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.privacy-line { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.privacy-line b { color: var(--ink); }
@media (max-width: 400px) {
  .srow { gap: 4px; }
  .qty-btn, .row-x { width: 32px; }
  .qty-input { width: 2.4em; }
}

/* ---------- Created / share ---------- */
.created { padding: clamp(18px, 2.6vw, 30px); display: grid; gap: 14px; animation: rise 0.5s cubic-bezier(.2, .9, .3, 1.2) both; }
.created h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0; outline: none; overflow-wrap: anywhere; }
.share-row { display: flex; gap: 10px; align-items: center; }
.share-row .input { flex: 1 1 200px; min-width: 0; font-family: var(--mono); font-size: 0.9rem; }
.share-box { border: 2px dashed color-mix(in srgb, var(--line) 35%, transparent); border-radius: 16px; padding: 12px 14px; display: grid; gap: 8px; min-width: 0; }
.share-box.secret { border-color: var(--bad-ink); background: color-mix(in srgb, var(--bad-bg) 45%, transparent); }
.share-box p { margin: 0; font-size: 0.92rem; }
.mine-box { margin-top: 24px; padding: 18px 20px; }
.mine-box h2 { font-size: 1.3rem; outline: none; }
.mine-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mine-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mine-link { display: inline-flex; flex-direction: column; text-decoration: none; min-height: 44px; justify-content: center; min-width: 0; }
.mine-link b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.mine-link small { color: var(--ink-soft); font-weight: 600; }

/* ---------- Shared sheet page ---------- */
.sheet-page { padding: clamp(24px, 4vw, 48px) 0 clamp(48px, 6vw, 80px); background-color: var(--hero-bg); background-image: linear-gradient(var(--hero-line) 2px, transparent 2px), linear-gradient(90deg, var(--hero-line) 2px, transparent 2px); background-size: 36px 36px; border-bottom: var(--bw) solid var(--line); }
.sheet-page .loading { color: var(--hero-ink); }
.sheet-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 3.5vw, 40px); align-items: start; }
@media (max-width: 900px) { .sheet-layout { grid-template-columns: minmax(0, 1fr); } }
.side { display: grid; gap: 18px; position: sticky; top: 90px; min-width: 0; }
@media (max-width: 900px) { .side { position: static; } }
.side-card { padding: 18px 20px; display: grid; gap: 12px; box-shadow: 5px 5px 0 var(--shadow); min-width: 0; }
.side-card h2 { font-size: 1.25rem; margin: 0; }
.side-card .btn { width: 100%; }
.admin-card { border-color: var(--grape); box-shadow: 6px 6px 0 var(--grape); }
.admin-tag { justify-self: start; margin: 0; }
.closed-banner { background: var(--warn-bg); color: var(--warn-ink); font-weight: 750; border-radius: 12px; padding: 10px 14px; margin: 10px 0 0; }
.expiry { font-size: 0.85rem; color: var(--ink-soft); margin: 16px 0 0; }
.loading { font-weight: 700; padding: 40px 0; }
.gone { padding: 30px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.gone h1 { font-size: clamp(2rem, 5vw, 3rem); outline: none; }
.edit-box { margin-top: 20px; padding: clamp(16px, 2.6vw, 26px); display: grid; gap: 16px; border-color: var(--grape); }
.edit-box h2 { font-size: 1.4rem; margin: 0; }
/* The edit form sits inside the sheet card: on phones the name field got squeezed to ~35px, so the name takes
   its own line and the spots stepper and remove button go under it. */
@media (max-width: 440px) {
  .edit-box .slot-rows { gap: 14px; }
  .edit-box .srow { grid-template-columns: auto auto; justify-content: space-between; }
  .edit-box .srow-label { grid-column: 1 / -1; }
}
.btn-danger { background: var(--bad-bg); color: var(--bad-ink); border-color: var(--bad-ink); box-shadow: 4px 4px 0 var(--bad-ink); }
.btn-danger:hover { box-shadow: 6px 6px 0 var(--bad-ink); }
.dlg-claim form, .dlg-delete .dlg-body { padding: 24px; display: grid; gap: 10px; }
.dlg-claim h2, .dlg-delete h2 { font-size: 1.7rem; margin: 0; overflow-wrap: anywhere; }

/* ---------- Home extras ---------- */
.compare-wrap { overflow-x: auto; margin-top: 26px; }
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r); overflow: hidden; }
.compare th, .compare td { padding: 12px 16px; text-align: left; border-bottom: 2px solid color-mix(in srgb, var(--line) 15%, transparent); vertical-align: top; }
.compare thead th { background: var(--deep); color: #f3f0ff; font-size: 0.95rem; }
.compare tbody th { font-weight: 700; }
.compare td.yes { font-weight: 800; color: var(--ok-ink); }
.compare tr:last-child > * { border-bottom: 0; }
@media (max-width: 560px) { .compare th, .compare td { padding: 9px 8px; font-size: 0.88rem; } }
.feat-ico { font-size: 2.4rem; display: block; margin-bottom: 10px; }
.mini-slots { display: grid; gap: 8px; margin-bottom: 18px; }
.mini-slot { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--surface-2); border: 2px solid var(--line); border-left: 8px solid var(--c, var(--lime)); border-radius: 12px; padding: 8px 12px; font-weight: 750; }
.mini-slot i { font-style: normal; font-size: 0.8rem; background: var(--ok-bg); color: var(--ok-ink); padding: 1px 8px; border-radius: 999px; }
.mini-slot.fill { animation: fillin 4s ease-in-out infinite; }
.mini-slot.fill:nth-child(2) { animation-delay: 0.6s; }
.mini-slot.fill:nth-child(3) { animation-delay: 1.2s; }
@keyframes fillin { 0%, 20% { transform: none; } 30%, 80% { transform: translateX(6px); } 100% { transform: none; } }

/* Meter widths (CSP: classes, not inline styles). */
.w0 { width: 0; } .w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; } .w30 { width: 30%; }
.w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; } .w65 { width: 65%; }
.w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }

/* ---------- Print: only the sheet, with blank lines for open spots ---------- */
@page { size: auto; margin: 0.45in; }
@media print {
  html, body { background: #fff !important; color: #000; }
  .np, .site-header, .site-footer, .qw-strip, dialog, .toast, .confetti, .skip, .test-banner, .side, .marquee, .sticker { display: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; transition: none !important; box-shadow: none !important; }
  .sheet-page { padding: 0; }
  .sheet-page .wrap { max-width: none; padding: 0; }
  .sheet-layout { display: block; }
  .sheet-card { border: 0; padding: 0; color: #000; background: #fff; }
  .sheet-title { font-size: 26pt; }
  .slot { break-inside: avoid; border: 1.5px solid #000; border-left: 8px solid #000; background: #fff !important; }
  .claim { background: #fff; border: 0; border-bottom: 1px solid #000; border-radius: 0; padding: 2px 4px; min-width: 2in; color: #000; }
  .claim.blank { display: inline-flex !important; height: 22px; }
  .x-btn, .btn-claim, .you, .pips, .bar, .meter, .meter-count { display: none !important; }
  .expiry { color: #333; }
}

/* 404 page */
.nf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 26px; }
.nf-hero .hero-title { max-width: 16ch; }

.form-title { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: 0; }
.mine-sec { padding: 28px 0 0; }
.mine-sec + .marquee { margin-top: 28px; }
.page-sheet .site-footer, .page-sheet .qw-strip { margin-top: 0; }
/* Small phones: long button labels wrap instead of pushing the page sideways. */
@media (max-width: 480px) {
  .btn-block, .side-card .btn, .sister-btns .btn, .form-actions .btn, .words-panel .btn { white-space: normal; text-align: center; }
  .sister-btns .btn { width: 100%; }
}
