/* BingoSheet. Loud on purpose: chunky outlines, offset "sticker" shadows, five bingo colors.
   Self-hosted Bricolage Grotesque (OFL, see /fonts/OFL.txt). No external requests. */

@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 {
  --b: #ff2e88;
  --i: #ff7a1a;
  --n: #ffc61a;
  --g: #00c2a8;
  --o: #3d5afe;
  --violet: #6c2bd9;

  --bg: #fff8ec;
  --bg-alt: #fff0d2;
  --surface: #ffffff;
  --surface-2: #fff7e6;
  --ink: #1a0b3d;
  --ink-soft: #4d4168;
  --line: #1a0b3d;
  --shadow: #1a0b3d;
  --hero-bg: #ffd84d;
  --hero-ink: #1a0b3d;
  --hero-dot: rgba(26, 11, 61, 0.14);
  --mark-bg: #ff2e88;
  --mark-ink: #ffffff;
  --pop: #ff2e88;
  --pop-ink: #ffffff;
  /* Darker pink behind white button text: 5.2:1 contrast (WCAG AA). --pop stays the brand accent. */
  --pop-btn: #d6006a;
  --chip-bg: #ffffff;
  --ok-bg: #c9f7ea;
  --ok-ink: #035c4c;
  --bad-bg: #ffd6e6;
  --bad-ink: #8a0c43;
  --band: #3d5afe;
  --band-ink: #ffffff;
  --paper: #ffffff;
  --paper-ink: #1a0b3d;
  --focus: #3d5afe;

  --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: #140a2e;
    --bg-alt: #1c0f40;
    --surface: #251653;
    --surface-2: #2f1d66;
    --ink: #fff4df;
    --ink-soft: #cdbfeb;
    --line: #fff4df;
    --shadow: #ff2e88;
    --hero-bg: #2a0e5e;
    --hero-ink: #fff4df;
    --hero-dot: rgba(255, 216, 77, 0.18);
    --mark-bg: #ffd84d;
    --mark-ink: #1a0b3d;
    --chip-bg: #2f1d66;
    --ok-bg: #0b4a40;
    --ok-ink: #9ff5de;
    --bad-bg: #5a1235;
    --bad-ink: #ffc2db;
    --band: #ffd84d;
    --band-ink: #1a0b3d;
    --focus: #ffd84d;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #140a2e;
  --bg-alt: #1c0f40;
  --surface: #251653;
  --surface-2: #2f1d66;
  --ink: #fff4df;
  --ink-soft: #cdbfeb;
  --line: #fff4df;
  --shadow: #ff2e88;
  --hero-bg: #2a0e5e;
  --hero-ink: #fff4df;
  --hero-dot: rgba(255, 216, 77, 0.18);
  --mark-bg: #ffd84d;
  --mark-ink: #1a0b3d;
  --chip-bg: #2f1d66;
  --ok-bg: #0b4a40;
  --ok-ink: #9ff5de;
  --bad-bg: #5a1235;
  --bad-ink: #ffc2db;
  --band: #ffd84d;
  --band-ink: #1a0b3d;
  --focus: #ffd84d;
  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); font-variation-settings: 'wdth' 100; 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; }
.skip:focus { left: 8px; }
.fine { font-size: 0.86rem; color: var(--ink-soft); margin: 0.6em 0 0; }
.test-banner { background: var(--n); color: #1a0b3d; text-align: center; font-weight: 700; padding: 6px; }

/* ---------- 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: #1a0b3d; box-shadow: var(--sh) var(--sh) 0 #1a0b3d; }
.btn-pop:hover { box-shadow: calc(var(--sh) + 2px) calc(var(--sh) + 2px) 0 #1a0b3d; }
.btn-ghost { background: var(--surface); }
.btn-ink { background: #1a0b3d; color: #fff4df; border-color: #1a0b3d; }
.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; }
kbd { font-family: var(--mono); font-size: 0.6em; border: 2px solid currentColor; border-radius: 6px; padding: 0.1em 0.4em; opacity: 0.75; margin-left: 0.4em; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--hero-bg) 88%, 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(--pop); font-weight: 800; }
.logo-mark { width: 34px; height: 34px; transition: transform 0.4s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover .logo-mark { transform: rotate(90deg) scale(1.08); }
.nav { margin-left: auto; display: flex; gap: 22px; font-weight: 700; }
.nav a { text-decoration: none; position: relative; }
.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: 760px) {
  .nav { display: none; }
  .theme-toggle { margin-left: auto; }
  .brand { font-size: 1.25rem; }
  .header-inner { gap: 10px; min-height: 60px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--hero-bg); color: var(--hero-ink); padding: clamp(28px, 5vw, 64px) 0 clamp(40px, 6vw, 80px); overflow: hidden; isolation: isolate;
  background-image: radial-gradient(var(--hero-dot) 2.2px, transparent 2.6px); background-size: 26px 26px; }
:root[data-theme='dark'] .hero { background-color: #2a0e5e; background-image: radial-gradient(var(--hero-dot) 2.2px, transparent 2.6px), radial-gradient(1200px 500px at 85% 0%, rgba(255, 46, 136, 0.35), transparent 60%), linear-gradient(160deg, #2a0e5e, #160733); background-size: 26px 26px, auto, auto; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .hero { background-color: #2a0e5e; background-image: radial-gradient(var(--hero-dot) 2.2px, transparent 2.6px), radial-gradient(1200px 500px at 85% 0%, rgba(255, 46, 136, 0.35), transparent 60%), linear-gradient(160deg, #2a0e5e, #160733); background-size: 26px 26px, auto, auto; }
}
.hero-deco i { position: absolute; z-index: -1; border-radius: 50%; border: var(--bw) solid #1a0b3d; width: 64px; height: 64px; animation: float 7s ease-in-out infinite; }
.hero-deco i:nth-child(1) { background: var(--b); top: 9%; right: 6%; }
.hero-deco i:nth-child(2) { background: var(--g); top: 46%; left: -18px; width: 48px; height: 48px; animation-delay: -2s; }
.hero-deco i:nth-child(3) { background: var(--o); bottom: 6%; right: 38%; width: 36px; height: 36px; animation-delay: -4s; }
.hero-deco i:nth-child(4) { background: var(--i); top: 3%; left: 44%; width: 28px; height: 28px; animation-delay: -1s; }
.hero-deco i:nth-child(5) { background: #fff; top: 24%; right: 34%; width: 20px; height: 20px; animation-delay: -3s; }
.hero-deco i:nth-child(6) { background: var(--violet); bottom: 12%; left: 4%; width: 30px; height: 30px; 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% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-16px) rotate(12deg); } }

.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(--g); box-shadow: 0 0 0 0 var(--g); animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(0, 194, 168, 0.7); } 80%, 100% { box-shadow: 0 0 0 10px rgba(0, 194, 168, 0); } }
.hero-title { font-size: clamp(2.7rem, 7.4vw, 5.6rem); line-height: 0.95; letter-spacing: -0.045em; margin-bottom: 0.25em; max-width: 13ch; }
.hero-title-theme { font-size: clamp(2.3rem, 5.4vw, 4.3rem); max-width: 14ch; }
.hero-emoji { display: inline-block; animation: wiggle 2.6s ease-in-out infinite; transform-origin: 50% 80%; }
.hero-title mark { background: var(--mark-bg); color: var(--mark-ink); padding: 0 0.14em 0.04em; border-radius: 0.16em; border: var(--bw) solid #1a0b3d; display: inline-block; transform: rotate(-3deg); box-shadow: 5px 5px 0 #1a0b3d; animation: wiggle 3.2s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(2deg) scale(1.03); } }
.hero-lede { font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 42ch; margin-bottom: clamp(22px, 3vw, 36px); }
.hero-lede b { background: linear-gradient(transparent 60%, color-mix(in srgb, var(--pop) 45%, transparent) 60%); }
.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.08fr) minmax(0, 0.92fr); 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: 92px; }
@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; }
.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.8; }
.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(--pop); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pop) 25%, transparent); }
.input-title { font-size: 1.25rem; font-weight: 750; }
.words { min-height: 168px; 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: 22px; flex-wrap: wrap; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span { display: inline-block; padding: 0.45em 1em; border: var(--bw) solid color-mix(in srgb, var(--line) 28%, transparent); border-radius: 999px; font-weight: 750; background: var(--surface); transition: all 0.15s; cursor: pointer; }
.pill:hover span { border-color: var(--line); transform: translateY(-2px); }
.pill input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); box-shadow: 3px 3px 0 var(--pop); }
.pill input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.pills-dark .pill input:checked + span { background: var(--n); color: #1a0b3d; border-color: #1a0b3d; box-shadow: 3px 3px 0 #1a0b3d; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { --c: var(--n); 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: #1a0b3d; border-color: #1a0b3d; box-shadow: 2px 2px 0 #1a0b3d; }
.chip-more { border-style: dashed; }
.c-pink { --c: var(--b); } .c-orange { --c: var(--i); } .c-yellow { --c: var(--n); } .c-teal { --c: var(--g); } .c-blue { --c: var(--o); }
.chip.on.c-pink, .chip.on.c-blue { color: #fff; }
.stepper { display: inline-flex; align-items: center; border: var(--bw) solid color-mix(in srgb, var(--line) 28%, transparent); border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.stepper input { width: 3.6em; text-align: center; border: 0; background: transparent; font-weight: 800; font-size: 1.2rem; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.step { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.4rem; font-weight: 800; cursor: pointer; transition: background-color 0.15s, transform 0.1s; color: var(--ink); }
.step:hover { background: color-mix(in srgb, var(--pop) 18%, transparent); }
.step:active { transform: scale(0.9); }
.count-hint { margin: -6px 0 0; font-size: 0.9rem; font-weight: 600; background: var(--bad-bg); color: var(--bad-ink); padding: 8px 12px; border-radius: 12px; }
.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(--g); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch input:disabled + .track { opacity: 0.4; }
.switch small { font-weight: 600; color: var(--ink-soft); }
.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(--violet); 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; }
#gen-submit { margin-top: 2px; }

/* ---------- Preview ---------- */
.preview { padding: 26px 14px 0 10px; max-width: 540px; width: 100%; justify-self: center; }
.stack span { position: absolute; inset: 40px 10px 64px 22px; border-radius: var(--r); border: var(--bw) solid #1a0b3d; }
.stack span:nth-child(1) { background: var(--n); transform: rotate(5deg); }
.stack span:nth-child(2) { background: var(--g); transform: rotate(2.5deg); }
.preview-card { position: relative; transform: rotate(-1.5deg); transition: transform 0.3s; }
.preview-card:hover { transform: rotate(0deg) scale(1.01); }
.preview .bcard-foot { visibility: hidden; }
.sticker { position: absolute; z-index: 3; font-weight: 800; padding: 6px 14px; border-radius: 12px; border: var(--bw) solid #1a0b3d; box-shadow: 3px 3px 0 #1a0b3d; font-size: 0.95rem; white-space: nowrap; }
.sticker-top { top: 4px; right: -4px; background: var(--n); color: #1a0b3d; transform: rotate(6deg); animation: bob 3s ease-in-out infinite; }
.sticker-bottom { bottom: 40px; left: -8px; background: var(--b); color: #fff; transform: rotate(-5deg); animation: bob 3s ease-in-out -1.5s infinite; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.preview-hint { margin: 0; font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--b); animation: ping-pink 1.6s infinite; flex: none; }
@keyframes ping-pink { 0% { box-shadow: 0 0 0 0 rgba(255, 46, 136, 0.7); } 80%, 100% { box-shadow: 0 0 0 10px rgba(255, 46, 136, 0); } }
.stamp { position: absolute; z-index: 5; left: 50%; top: 45%; font-weight: 800; font-size: clamp(2.6rem, 9vw, 4.6rem); color: var(--b); background: #fff; border: 5px solid var(--b); padding: 0.05em 0.35em; border-radius: 16px; letter-spacing: -0.02em; pointer-events: none; transform: translate(-50%, -50%) rotate(-12deg) scale(0); opacity: 0; transition: transform 0.35s cubic-bezier(.3, 1.8, .5, 1), opacity 0.2s; box-shadow: 6px 6px 0 #1a0b3d; }
.stamp.show { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 1; }

/* ---------- Bingo card (screen + print) ---------- */
.bcard { container-type: inline-size; background: var(--paper); color: var(--paper-ink); border: var(--bw) solid #1a0b3d; border-radius: 20px; box-shadow: 6px 6px 0 #1a0b3d; position: relative; }
.bcard-in { padding: 4.5cqi 4.5cqi 2.6cqi; }
.bcard-head { display: flex; justify-content: space-between; align-items: baseline; gap: 2cqi; margin-bottom: 2.6cqi; }
.bcard-title { font-size: 7.2cqi; margin: 0; letter-spacing: -0.03em; line-height: 1.05; overflow-wrap: anywhere; }
.bcard-no { font-family: var(--mono); font-size: 2.8cqi; font-weight: 700; opacity: 0.6; white-space: nowrap; }
.bcard-letters, .bcard-grid { display: grid; gap: 1.6cqi; }
.g5 .bcard-letters, .g5 .bcard-grid { grid-template-columns: repeat(5, 1fr); }
.g4 .bcard-grid { grid-template-columns: repeat(4, 1fr); }
.g3 .bcard-grid { grid-template-columns: repeat(3, 1fr); }
.bcard-letters { margin-bottom: 1.6cqi; }
.bcard-letters span { display: grid; place-items: center; font-weight: 800; font-size: 9.5cqi; line-height: 1; padding: 1.2cqi 0 1.6cqi; color: #fff; border-radius: 2.2cqi; border: 0.55cqi solid #1a0b3d; }
.bcard-letters span:nth-child(1) { background: var(--b); } .bcard-letters span:nth-child(2) { background: var(--i); }
.bcard-letters span:nth-child(3) { background: var(--n); color: #1a0b3d; } .bcard-letters span:nth-child(4) { background: var(--g); }
.bcard-letters span:nth-child(5) { background: var(--o); }
.bcard-stripe { display: grid; grid-template-columns: repeat(5, 1fr); height: 2.2cqi; border-radius: 2cqi; overflow: hidden; margin-bottom: 2.4cqi; border: 0.5cqi solid #1a0b3d; }
.bcard-stripe span:nth-child(1) { background: var(--b); } .bcard-stripe span:nth-child(2) { background: var(--i); } .bcard-stripe span:nth-child(3) { background: var(--n); } .bcard-stripe span:nth-child(4) { background: var(--g); } .bcard-stripe span:nth-child(5) { background: var(--o); }
.cell { --k: 1; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 0.55cqi solid #1a0b3d; border-radius: 2cqi; background: #fff; color: #1a0b3d; font-weight: 750; line-height: 1.08; padding: 0.5cqi; overflow: hidden; overflow-wrap: break-word; hyphens: manual; position: relative; letter-spacing: -0.01em; font-family: inherit; }
.g4 .cell { --k: 1.24; } .g3 .cell { --k: 1.62; }
.fit-0 { font-size: calc(var(--k) * 6.4cqi); } .fit-1 { font-size: calc(var(--k) * 5.4cqi); }
.fit-2 { font-size: calc(var(--k) * 4.6cqi); } .fit-3 { font-size: calc(var(--k) * 4cqi); }
.fit-4 { font-size: calc(var(--k) * 3.5cqi); } .fit-5 { font-size: calc(var(--k) * 3.1cqi); }
.fit-6 { font-size: calc(var(--k) * 2.75cqi); } .fit-7 { font-size: calc(var(--k) * 2.45cqi); line-height: 1.04; }
.fit-8 { font-size: calc(var(--k) * 2.2cqi); line-height: 1.03; } .fit-9 { font-size: calc(var(--k) * 2cqi); line-height: 1.02; }
.fit-10 { font-size: calc(var(--k) * 1.8cqi); line-height: 1.02; }
.cell.free { background: var(--n); font-size: calc(var(--k) * 3.6cqi); font-weight: 800; }
.free-star { font-size: 1.1em; line-height: 1; margin-bottom: 0.1em; }
.bcard-foot { text-align: center; font-size: 2.2cqi; margin-top: 2.2cqi; opacity: 0.55; font-weight: 600; }
button.cell { cursor: pointer; transition: transform 0.12s; }
button.cell:hover { transform: scale(1.05); z-index: 1; }
button.cell:active { transform: scale(0.94); }
button.cell::after { content: ''; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff6aa8, var(--b) 60%); opacity: 0.82; transform: scale(0); transition: transform 0.28s cubic-bezier(.3, 1.8, .5, 1); mix-blend-mode: multiply; pointer-events: none; }
button.cell[aria-pressed='true']:not(.free)::after { transform: scale(1); }
button.cell.free[aria-pressed='true']::after { display: none; }
.cell.win { animation: winpulse 0.9s ease-in-out infinite alternate; }
.cell.win::after { background: radial-gradient(circle at 35% 35%, #7cf0db, var(--g) 60%) !important; }
@keyframes winpulse { to { box-shadow: 0 0 0 0.9cqi var(--n); } }
.cell.called { background: #ffe1ef; }
.cell.called::before { content: ''; position: absolute; inset: 10%; border-radius: 50%; background: var(--b); opacity: 0.35; }
.pop-in .cell { animation: popin 0.42s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--d, 0) * 22ms); }
@keyframes popin { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Marquee ---------- */
.marquee { background: #1a0b3d; color: #fff4df; border-block: var(--bw) solid #1a0b3d; overflow: hidden; padding: 14px 0; }
.marquee-track { display: flex; width: max-content; animation: scroll 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.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(--n); }
.marquee a + a::before, .marquee-dup a::before { content: '✦'; color: var(--b); margin-right: 22px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Results ---------- */
.results { background: var(--bg-alt); padding: clamp(36px, 5vw, 64px) 0; border-bottom: var(--bw) solid var(--line); scroll-margin-top: 70px; }
.results-title { font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -0.04em; outline: none; }
.results-title span { color: var(--pop); display: inline-block; animation: countpop 0.5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes countpop { from { transform: scale(0.4) rotate(-10deg); } }
.results-sub { color: var(--ink-soft); font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin: 8px 0 14px; }
.toolbar-2 { margin-bottom: 30px; gap: 10px; }
.btn-print { margin-left: auto; }
@media (max-width: 700px) { .btn-print { margin-left: 0; width: 100%; } }
.sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.sheet { display: contents; }
.sheets .bcard { animation: rise 0.45s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: calc(var(--d, 0) * 35ms); }
.calllist { margin-top: 36px; }
.calllist-inner { background: var(--paper); color: var(--paper-ink); border: var(--bw) solid #1a0b3d; border-radius: var(--r); padding: 22px 26px; box-shadow: 6px 6px 0 #1a0b3d; }
.calllist h2 { font-size: 1.5rem; margin-bottom: 4px; }
.calllist .fine { color: #4d4168; margin: 0 0 14px; }
.calllist ul { list-style: none; padding: 0; margin: 0; columns: 4 170px; column-gap: 26px; }
.calllist li { break-inside: avoid; padding: 3px 0; display: flex; gap: 8px; align-items: flex-start; font-weight: 600; font-size: 0.95rem; }
.calllist li::before { content: ''; flex: none; width: 14px; height: 14px; border: 2px solid #1a0b3d; border-radius: 4px; margin-top: 3px; }
.calllist li small { font-weight: 500; opacity: 0.7; }
.upsell { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 30px; }
.upsell-lbl { font-weight: 800; }
.upsell-btn { border: 2px dashed color-mix(in srgb, var(--line) 50%, transparent); background: var(--surface); border-radius: 999px; padding: 0.45em 1em; font-weight: 700; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; transition: transform 0.15s, border-color 0.15s; }
.upsell-btn:hover { transform: translateY(-2px); border-color: var(--violet); border-style: solid; }

/* ---------- 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: 60ch; }
.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: 50%; background: var(--c); color: #1a0b3d; font-weight: 800; font-size: 1.6rem; border: var(--bw) solid #1a0b3d; margin-bottom: 14px; }
.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(--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; } .demo-ball { min-height: 120px; gap: 10px; } .mini-ball { width: 80px; height: 80px; font-size: 1.2rem; } .mini-ball.b2 { width: 96px; height: 96px; font-size: 1.5rem; } .feat-wide h3 { font-size: 1.6rem; } }
.feat-demo { height: 90px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.demo-ball { height: auto; flex: 1; min-height: 160px; justify-content: center; gap: 18px; }
.mini-ball { display: grid; place-items: center; text-align: center; width: 110px; height: 110px; border-radius: 50%; border: var(--bw) solid #1a0b3d; font-weight: 800; font-size: 1.6rem; line-height: 0.95; color: #1a0b3d; box-shadow: inset -8px -10px 0 rgba(0, 0, 0, 0.12), 4px 4px 0 #1a0b3d; animation: bounce 2.4s cubic-bezier(.3, 1.5, .5, 1) infinite; }
.mini-ball.b1 { background: radial-gradient(circle at 35% 30%, #ff8cbc, var(--b)); color: #fff; }
.mini-ball.b2 { background: radial-gradient(circle at 35% 30%, #ffe48a, var(--n)); animation-delay: -0.8s; width: 130px; height: 130px; font-size: 2rem; }
.mini-ball.b3 { background: radial-gradient(circle at 35% 30%, #8fa0ff, var(--o)); color: #fff; animation-delay: -1.6s; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-18px); } 60% { transform: translateY(2px); } }
.demo-eq span { font-weight: 800; font-size: 1.5rem; padding: 6px 12px; border-radius: 12px; border: var(--bw) solid var(--line); }
.demo-eq b { font-size: 1.6rem; color: var(--b); }
.demo-eq .sq { background: var(--n); color: #1a0b3d; border-color: #1a0b3d; }
.demo-phone { display: grid; grid-template-columns: repeat(3, 26px); gap: 5px; height: auto; padding: 10px; border: var(--bw) solid var(--line); border-radius: 16px; width: max-content; }
.demo-phone span { width: 26px; height: 26px; border-radius: 6px; border: 2px solid var(--line); }
.demo-phone span.on { background: var(--b); border-color: #1a0b3d; animation: dab 2.4s infinite; }
.demo-phone span.on:nth-child(4) { animation-delay: 0.3s; } .demo-phone span.on:nth-child(5) { animation-delay: 0.6s; } .demo-phone span.on:nth-child(8) { animation-delay: 0.9s; }
@keyframes dab { 0%, 10% { transform: scale(0.2); } 25%, 100% { transform: scale(1); } }
.demo-sheets span { width: 46px; height: 60px; background: #fff; border: 2px solid #1a0b3d; border-radius: 6px; box-shadow: 3px 3px 0 var(--c); background-image: repeating-linear-gradient(90deg, transparent 0 8px, #eee 8px 10px), repeating-linear-gradient(0deg, transparent 0 8px, #eee 8px 10px); }
.demo-sheets span:nth-child(odd) { transform: rotate(-4deg); } .demo-sheets span:nth-child(even) { transform: rotate(3deg) translateY(-6px); }
.demo-link { font-size: 3.2rem; animation: wiggle 2.6s infinite; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 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, background-color 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) 30%, 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.15rem; 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.07; 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 #1a0b3d; margin-bottom: 14px; }
.tag-yellow { background: var(--n); color: #1a0b3d; }
.tag-ink { background: #1a0b3d; color: #fff4df; }
.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: #1a0b3d; border: var(--bw) solid #1a0b3d; border-radius: 18px; padding: 20px; box-shadow: 5px 5px 0 #1a0b3d; 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: #4d4168; 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(--g); color: #1a0b3d; font-weight: 800; font-size: 0.75rem; display: grid; place-items: center; margin-top: 3px; }
.plan-hot { border-color: var(--b); box-shadow: 8px 8px 0 var(--b); 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 #1a0b3d; transform: rotate(4deg); }
.plan-note { background: var(--n); color: #1a0b3d; 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(--pop); transition: transform 0.2s; }
.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); }

/* ---------- Theme 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: 1fr; } }
.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: 50%; display: grid; place-items: center; background: var(--n); color: #1a0b3d; border: 2px solid #1a0b3d; font-weight: 800; }
.guide-steps li:nth-child(2)::before { background: var(--g); } .guide-steps li:nth-child(3)::before { background: var(--b); color: #fff; } .guide-steps li:nth-child(4)::before { background: var(--o); color: #fff; }
.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(--b); font-size: 1.2rem; }
.guide-side { position: sticky; top: 90px; }
.words-panel { padding: 22px; }
.words-title { font-size: 1.3rem; }
.wordlist { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.wordlist li { background: var(--surface-2); border: 2px solid color-mix(in srgb, var(--line) 22%, transparent); border-radius: 999px; padding: 2px 10px; font-weight: 650; font-size: 0.92rem; }
.wordtable { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 18px; display: block; max-height: 420px; overflow: auto; }
.wordtable th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); padding: 4px 8px; position: sticky; top: 0; background: var(--surface); }
.wordtable td { padding: 5px 8px; border-top: 1.5px solid color-mix(in srgb, var(--line) 15%, transparent); vertical-align: top; }
.wordtable td:last-child { font-weight: 800; white-space: nowrap; }
.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; }
.hero-hub { padding-bottom: 56px; }

/* ---------- Footer ---------- */
.site-footer { background: #1a0b3d; color: #fff4df; padding: 48px 0 40px; }
.site-footer .brand b { color: var(--n); }
.footer-top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.footer-top p { margin: 0; opacity: 0.8; }
.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.8; text-decoration: none; }
.footer-themes a:hover { opacity: 1; color: var(--n); }
.site-footer .fine { color: #cdbfeb; }

/* ---------- 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(--pop); 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(20, 8, 50, 0.55); backdrop-filter: blur(6px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 0; }
.dlg-head h2 { font-size: 1.6rem; margin: 0; }
.dlg-head small { font-size: 0.95rem; font-weight: 600; color: var(--ink-soft); }
.x { width: 40px; height: 40px; border-radius: 50%; border: var(--bw) solid var(--line); background: var(--surface-2); font-size: 1.5rem; line-height: 1; cursor: pointer; transition: transform 0.2s; }
.x:hover { transform: rotate(90deg); }
.dlg-caller { max-width: min(96vw, 1060px); background: #1a0b3d; color: #fff4df; border-color: #1a0b3d; }
.dlg-caller .x { background: #2f1d66; color: #fff; border-color: #fff4df; }
.dlg-caller .dlg-head small, .dlg-caller .lbl, .dlg-caller .fine { color: #cdbfeb; }
.caller-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 26px; padding: 18px 24px 24px; }
@media (max-width: 820px) { .caller-grid { grid-template-columns: 1fr; } }
.caller-main { display: flex; flex-direction: column; gap: 12px; }
.ball-wrap { display: grid; place-items: center; padding: 6px 0; }
.ball { width: min(64vw, 260px); aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 26px; background: radial-gradient(circle at 34% 28%, #fff7c2 0 9%, #ffe066 24%, var(--n) 60%, #e5a700); color: #1a0b3d; border: 4px solid #1a0b3d; box-shadow: inset -14px -18px 0 rgba(0, 0, 0, 0.12), 0 10px 0 var(--b); }
.ball.long { border-radius: 36px; aspect-ratio: auto; min-height: 200px; width: 100%; }
.ball.roll { animation: roll 0.55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes roll { from { transform: translateX(-60px) rotate(-200deg) scale(0.6); opacity: 0; } }
.ball-letter { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.ball-text { font-size: clamp(2rem, 7vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.ball.long .ball-text { font-size: clamp(1.3rem, 3.4vw, 1.9rem); line-height: 1.15; }
.ball[data-col='0'] { background: radial-gradient(circle at 34% 28%, #ffd0e4 0 9%, #ff7ab2 30%, var(--b) 65%); color: #fff; }
.ball[data-col='1'] { background: radial-gradient(circle at 34% 28%, #ffd9b8 0 9%, #ff9d55 30%, var(--i) 65%); color: #1a0b3d; }
.ball[data-col='3'] { background: radial-gradient(circle at 34% 28%, #c6fff3 0 9%, #4fe0c7 30%, var(--g) 65%); color: #1a0b3d; }
.ball[data-col='4'] { background: radial-gradient(circle at 34% 28%, #d4dbff 0 9%, #7b8fff 30%, var(--o) 65%); color: #fff; }
.caller-answer { text-align: center; margin: 0; font-weight: 700; color: var(--n); }
.caller-progress { text-align: center; margin: 0; font-weight: 700; }
.caller-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.caller-row select { background: #2f1d66; color: #fff; border: 2px solid #cdbfeb; border-radius: 10px; padding: 4px 6px; }
.dlg-caller .btn-ghost { background: #2f1d66; color: #fff4df; border-color: #fff4df; box-shadow: 3px 3px 0 var(--b); }
.dlg-caller .track { background: rgba(255, 255, 255, 0.25); }
.check { background: #251653; border-radius: 18px; padding: 14px; display: grid; gap: 8px; }
.check-row { display: flex; gap: 8px; align-items: center; }
.check-row .hash { font-weight: 800; font-size: 1.3rem; }
.check-row input { width: 7em; background: #fff4df; color: #1a0b3d; border: 2px solid #fff4df; border-radius: 10px; padding: 6px 10px; font-weight: 800; }
.check .btn { box-shadow: 3px 3px 0 var(--b); }
.check-result { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; }
.check-result:empty { display: none; }
.check-result .bcard { box-shadow: none; border-width: 2px; border-radius: 12px; }
.check-result .bcard-foot, .check-result .bcard-head { display: none; }
.verdict { font-weight: 800; font-size: 1.3rem; margin: 0; }
.verdict.yes { color: var(--n); }
.verdict small { display: block; font-size: 0.9rem; font-weight: 600; color: #cdbfeb; }
.caller-board { display: flex; flex-wrap: wrap; gap: 6px; max-height: 52vh; overflow: auto; padding: 4px 2px; }
.caller-board.numbers { display: grid; grid-template-columns: 28px repeat(15, 1fr); gap: 4px; }
.caller-board.numbers.n90 { grid-template-columns: 28px repeat(18, 1fr); }
.bd { font-size: 0.82rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #2f1d66; color: #b6a8d9; transition: all 0.25s; }
.caller-board.numbers .bd { padding: 3px 0; text-align: center; border-radius: 6px; font-size: 0.78rem; }
.bd.row-letter { background: transparent; color: #fff; font-weight: 800; }
.bd.on { background: var(--n); color: #1a0b3d; transform: scale(1.06); }
.bd.last { background: var(--b); color: #fff; box-shadow: 0 0 0 3px #fff4df; }

.dlg-play { max-width: min(96vw, 620px); }
.play-bar { display: flex; align-items: center; gap: 8px; padding: 14px 22px 0; flex-wrap: wrap; }
.play-bar input { width: 4.5em; text-align: center; font-weight: 800; border: var(--bw) solid color-mix(in srgb, var(--line) 30%, transparent); border-radius: 10px; padding: 6px; background: var(--surface-2); }
.play-bar .step { border: var(--bw) solid color-mix(in srgb, var(--line) 30%, transparent); border-radius: 50%; width: 38px; height: 38px; }
#play-clear { margin-left: auto; }
.play-stage { position: relative; padding: 16px 22px 0; }
.play-stage .bcard { box-shadow: 5px 5px 0 #1a0b3d; width: min(100%, calc(94vh - 190px) * 0.8); margin: 0 auto; }
.play-status { text-align: center; font-weight: 700; padding: 12px 22px 20px; margin: 0; }

.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(--violet); }
:root[data-theme='dark'] .wl-feature { color: var(--n); }
.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(--b); 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: #1a0b3d; color: #fff4df; font-weight: 750; padding: 12px 20px; border-radius: 999px; border: 2px solid #fff4df; box-shadow: 4px 4px 0 var(--b); animation: dlgin 0.3s; }
.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; } }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .preview { padding-inline: 4px; }
  .sticker-bottom { display: none; }
  .toolbar-2 .btn { flex: 1 1 calc(50% - 10px); }
  .sticker { font-size: 0.8rem; }
  .sticker-top { right: 0; }
  .gen-row { gap: 16px; }
  .ball { width: 200px; }
  .check-result { grid-template-columns: 110px 1fr; }
  .dlg-head h2 { font-size: 1.3rem; }
}

/* ---------- 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; }
}

/* ---------- Pro (rendered by bingo.js only with a verified license) ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site-header .brand span::after { content: none; }
html.is-pro .site-header .brand span::after { content: 'PRO'; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; background: var(--violet); color: #fff; padding: 2px 7px; border-radius: 6px; margin-left: 8px; vertical-align: 0.35em; }
html.is-pro .pro-card [data-plan], html.is-pro .plan [data-plan] { display: none; }
.switch-pro.pro-on .switch-text { opacity: 1; }
.switch-pro.pro-on:hover .track::after { transform: none; }
.switch-pro[aria-pressed='true'] .track { background: var(--g); }
.switch-pro[aria-pressed='true'] .track::after, .switch-pro.pro-on[aria-pressed='true']:hover .track::after { transform: translateX(20px); }
.switch-pro.pro-on:focus-visible { outline: none; }
.switch-pro.pro-on:focus-visible .track { outline: 3px solid var(--focus); outline-offset: 2px; }
.pro-panel { display: grid; gap: 16px; border: 2px dashed color-mix(in srgb, var(--violet) 70%, transparent); border-radius: 18px; padding: 16px; background: color-mix(in srgb, var(--violet) 7%, var(--surface)); animation: rise 0.45s cubic-bezier(.2, .9, .3, 1.2) both; }
.pro-panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.95rem; }
.pro-panel-head span:last-child { color: var(--ink-soft); font-weight: 600; }
.input-sm { padding: 0.4em 0.65em; border-radius: 10px; font-size: 0.95rem; width: auto; }
.pics { display: grid; gap: 10px; }
.pic-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; border: 3px dashed color-mix(in srgb, var(--line) 30%, transparent); border-radius: 16px; padding: 14px; background: var(--surface); transition: border-color 0.15s, background-color 0.15s; }
.pic-drop.over { border-color: var(--g); background: color-mix(in srgb, var(--g) 14%, var(--surface)); }
.pic-drop-text { font-size: 0.9rem; color: var(--ink-soft); font-weight: 600; }
.pic-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; max-height: 340px; overflow: auto; }
.pic-grid:empty { display: none; }
.pic-item { position: relative; display: grid; gap: 6px; background: var(--surface); border: 2px solid color-mix(in srgb, var(--line) 25%, transparent); border-radius: 12px; padding: 6px; animation: popin 0.35s cubic-bezier(.3, 1.6, .5, 1) both; }
.pic-thumb { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 8px; }
.pic-label { width: 100%; font-size: 0.85rem; font-weight: 700; }
.pic-rm { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #1a0b3d; background: #fff; color: #1a0b3d; font-weight: 800; cursor: pointer; line-height: 1; }
.pic-rm:hover { background: var(--b); color: #fff; }
.lp-note { margin: 0; font-size: 0.9rem; font-weight: 650; background: var(--ok-bg); color: var(--ok-ink); padding: 8px 12px; border-radius: 12px; }
.pro-row { display: grid; gap: 6px; }
.pro-row-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pro-row-ctl select { flex: 1 1 180px; min-width: 0; }
.brand-box summary { cursor: pointer; font-weight: 800; }
.brand-grid { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; margin-top: 10px; }
.brand-field { display: grid; gap: 4px; }
.brand-field input[type='color'] { width: 64px; height: 38px; border: 2px solid var(--line); border-radius: 10px; padding: 2px; background: var(--surface); cursor: pointer; }
.brand-field input[type='file'] { font-size: 0.85rem; max-width: 230px; }
.pro-speak { margin-left: auto; }

/* Picture squares */
.cell.pic { padding: 0.9cqi; gap: 0.5cqi; justify-content: center; }
.cell-pic { display: block; width: 100%; flex: 1 1 0; min-height: 0; object-fit: contain; border-radius: 1cqi; }
.cell-cap { flex: none; max-width: 100%; font-size: calc(var(--k) * 2.3cqi); font-weight: 750; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-missing { font-size: calc(var(--k) * 6cqi); opacity: 0.35; }
button.cell.pic::after { inset: 4%; opacity: 0.6; }
.caller-pic { display: block; width: min(220px, 60%); aspect-ratio: 1; object-fit: contain; margin: 14px auto 0; background: #fff; border: var(--bw) solid #1a0b3d; border-radius: 18px; box-shadow: 5px 5px 0 #1a0b3d; }

/* Branding */
.bcard-logo { height: 9cqi; max-width: 24cqi; object-fit: contain; flex: none; align-self: center; }
.bcard-head:has(.bcard-logo) .bcard-title { flex: 1; }
.branded .bcard-title { color: var(--brand); }
.branded .bcard-letters span, .branded .bcard-stripe span { background: var(--brand) !important; color: var(--brand-ink) !important; }
.branded .cell.free { background: var(--brand); color: var(--brand-ink); }

/* Large print: black on white, extra-bold, thick rules, one card per page */
.sheets.lp { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.lp .bcard-title { color: #000; font-weight: 800; }
.lp .bcard-no { opacity: 1; font-size: 3.4cqi; color: #000; }
.lp .bcard-letters span { background: #000 !important; color: #fff !important; border-color: #000; }
.lp.branded .bcard-letters span { background: var(--brand) !important; color: var(--brand-ink) !important; }
.lp .bcard-stripe { display: none; }
.lp .cell { font-weight: 850; color: #000; border-color: #000; border-width: 0.8cqi; letter-spacing: 0; }
.lp .cell.free { background: #fff; border-style: dashed; }
.lp .cell-cap { font-size: calc(var(--k) * 3.1cqi); font-weight: 850; color: #000; }
.lp .bcard-foot { opacity: 0.8; color: #000; }
.calllist.lp ul { font-size: 1.15rem; columns: 3 220px; }
.lp-probe { position: absolute; left: -10000px; top: 0; width: 740px; visibility: hidden; pointer-events: none; }
.lp-measure { white-space: nowrap; display: inline-block; }

/* ---------- Print: only the cards (and the call list) ---------- */
@page { size: auto; margin: 0.35in; }
@page landscape { size: landscape; margin: 0.35in; }
@media print {
  :root { --paper: #fff; --paper-ink: #000; }
  html, body { background: #fff !important; color: #000; }
  html.has-batch .np, html.has-batch .hero, html.has-batch .marquee, html.has-batch .site-header, html.has-batch dialog, html.has-batch .toast, html.has-batch .confetti, html.has-batch .skip, html.has-batch .test-banner { display: none !important; }
  html.has-batch main > :not(#results) { display: none !important; }
  .results { padding: 0; background: #fff; border: 0; }
  .results .wrap { max-width: none; padding: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; transition: none !important; }
  .sheets { display: block; }
  .sheet { display: flex; break-after: page; page-break-after: always; break-inside: avoid; }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
  .sheets.call-on .sheet:last-child { break-after: page; page-break-after: always; }
  .bcard { box-shadow: none; border-width: 2px; break-inside: avoid; }
  .bcard-letters span, .cell { border-width: 0.4cqi; }
  .sheets[data-per='1'] .sheet { height: 9.9in; align-items: center; justify-content: center; }
  .sheets[data-per='1'] .bcard { width: 7.1in; }
  .sheets[data-per='2'] .sheet { page: landscape; height: 7.4in; align-items: center; justify-content: space-around; gap: 0.3in; }
  .sheets[data-per='2'] .bcard { width: 4.75in; }
  .sheets[data-per='4'] .sheet { height: 9.9in; flex-wrap: wrap; align-content: space-around; justify-content: space-around; row-gap: 0.25in; }
  .sheets[data-per='4'] .bcard { width: 3.55in; }
  .sheets[data-per='4'] .g3, .sheets[data-per='4'] .g4 { width: 3.45in; }
  .calllist { margin: 0; }
  .calllist-inner { box-shadow: none; border-width: 2px; padding: 0.25in 0.3in; }
  .calllist ul { columns: 3; font-size: 10pt; }
  .calllist:empty { display: none; }
  .sheets.lp .sheet { height: 9.9in; align-items: center; justify-content: center; }
  .sheets.lp .bcard { width: 7.4in; border-width: 3px; }
  .lp .cell { border-width: 0.7cqi; }
  .calllist.lp ul { columns: 2; font-size: 16pt; }
}
