/* ============================================================
   Chardie Apps: shared design system
   Two zones: the playful "alo" games, and the calm AAC space.
   ============================================================ */
:root {
  --ink: #201c17;
  --ink-soft: #5c554c;
  --ink-faint: #8b8377;
  --paper: #faf7f1;
  --paper-card: #fffdf9;
  --line: #e3dccf;
  --header-h: 66px;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  /* zone hues */
  --alo: #2f6f4f;
  --aac: #5b4b8a;
  --board: #2f6f4f;   --board-soft: #e6f0ea;
  --word: #8a5a2b;    --word-soft: #f4ecdf;
  --num: #274c77;     --num-soft: #e6edf5;
  --aeiou: #5b4b8a;   --aeiou-soft: #ece9f4;
  --kam: #b0533a;     --kam-soft: #f6eae4;
  --arc: #c2255c;     --arc-soft: #fbe8ef;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 68px); }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
.container { width: min(1180px, 92%); margin-inline: auto; position: relative; }
.narrow { width: min(860px, 92%); margin-inline: auto; }

/* Faint paper grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: multiply;
}

::selection { background: var(--ink); color: var(--paper); }
.app ::selection { background: var(--accent, var(--ink)); color: #fff; }
:focus-visible { outline: 2.5px solid var(--accent, #274c77); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0; }
.skip-link:focus { left: 0; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(1180px, 92%); margin-inline: auto; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink);
  font-family: var(--serif); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em;
}
.brand-logo {
  height: 36px; width: auto;
  transition: transform .3s var(--ease-out);
}
.brand:hover .brand-logo { transform: rotate(-3deg) scale(1.05); }

.footer-logo {
  height: 44px; width: auto; display: block;
  margin: clamp(30px, 5vw, 50px) auto 0;
}
.footer-logo + .footer-sign { padding-top: 14px; }
.about-logo { height: 46px; width: auto; display: block; margin: 0 auto 20px; }

.site-nav { display: flex; align-items: center; gap: clamp(8px, 1.6vw, 22px); }
.site-nav a {
  position: relative; text-decoration: none; color: var(--ink-soft); font-weight: 600;
  font-size: 0.93rem; padding: 6px 2px; transition: color .2s; white-space: nowrap;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 2px;
  background: currentColor; transition: right .3s var(--ease-out);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }
.site-nav .nav-pill {
  border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 16px; background: var(--paper-card);
}
.site-nav .nav-pill::after { display: none; }
.site-nav .nav-pill:hover { border-color: var(--ink); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: var(--ink); transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Sticky in-page subnav (family pages) */
.subnav {
  position: sticky; top: var(--header-h); z-index: 40;
  background: color-mix(in srgb, var(--paper) 93%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.subnav-inner {
  width: min(1180px, 92%); margin-inline: auto;
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 9px 0; scrollbar-width: none;
}
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav-label {
  font-family: var(--serif); font-style: italic; font-size: 0.95rem; color: var(--ink-faint);
  margin-right: 10px; white-space: nowrap;
}
.subnav a {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.88rem;
  border: 1.5px solid transparent; border-radius: 999px; padding: 5px 14px 5px 6px;
  white-space: nowrap; transition: border-color .2s, color .2s, background .2s;
}
.subnav a img { width: 26px; height: 26px; border-radius: 26%; }
.subnav a:hover { color: var(--ink); border-color: var(--line); background: var(--paper-card); }
.subnav a.active { color: var(--ink); border-color: var(--ink); background: var(--paper-card); }

/* ============ Buttons & badges ============ */
.btn-primary, .btn-secondary {
  text-decoration: none; font-weight: 700; font-size: 1rem;
  padding: 14px 28px; border-radius: 999px;
  transition: transform .2s var(--ease-out), box-shadow .2s, background .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-secondary { background: var(--paper-card); color: var(--ink); border: 1.5px solid var(--line); }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(32,28,23,0.2); }
.btn-arrow { display: inline-block; transition: transform .25s var(--ease-out); }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }

.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  padding: 11px 22px 11px 17px; border-radius: 999px;
  transition: transform .2s var(--ease-out), box-shadow .2s, background .2s;
}
.store-badge:hover { transform: translateY(-2px); background: var(--accent, var(--ink)); box-shadow: 0 10px 24px rgba(32, 28, 23, 0.25); }
.store-badge svg { width: 25px; height: 25px; flex-shrink: 0; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.12; font-weight: 700; font-size: 1.02rem; }
.store-badge small { font-weight: 500; font-size: 0.66rem; opacity: 0.85; }
.price-note { font-size: 0.88rem; color: var(--ink-soft); font-weight: 600; }
.coming-soon {
  display: inline-block; font-weight: 650; font-size: 0.92rem; color: var(--accent, var(--ink-soft));
  border: 1.5px dashed color-mix(in srgb, var(--accent, var(--ink-soft)) 55%, var(--paper));
  border-radius: 999px; padding: 10px 20px; background: var(--paper-card);
}

/* ============ Home hero ============ */
.hero {
  padding: clamp(60px, 9vw, 120px) 0 clamp(48px, 7vw, 88px);
  text-align: center; position: relative;
  background:
    radial-gradient(1100px 540px at 12% -12%, var(--board-soft) 0%, transparent 58%),
    radial-gradient(1000px 500px at 88% -12%, var(--aeiou-soft) 0%, transparent 58%),
    var(--paper);
}
.hero-char {
  position: absolute; z-index: 0; width: clamp(90px, 11vw, 170px); height: auto;
  opacity: 0.9; filter: drop-shadow(0 10px 20px rgba(32,28,23,0.15));
  transition: transform .4s var(--ease-out);
}
.hero-char-left { left: clamp(8px, 4vw, 70px); bottom: 12%; transform: rotate(-8deg); }
.hero-char-right { right: clamp(8px, 4vw, 70px); bottom: 26%; transform: rotate(7deg); }
.hero-char:hover { transform: rotate(0deg) scale(1.06); }
@media (max-width: 1150px) { .hero-char { display: none; } }
.hero .container { position: relative; z-index: 1; }

.kicker {
  display: inline-block; margin: 0 0 20px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; background: var(--paper-card);
}
.hero-title {
  margin: 0 0 22px; font-family: var(--serif); font-weight: 620;
  font-size: clamp(2.7rem, 9vw, 7rem); line-height: 0.98; letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144;
}
.hero-title .line { display: block; }
.hero-title em { font-style: italic; font-weight: 500; color: var(--alo); }
.hero-sub { margin: 0 auto 34px; max-width: 620px; font-size: clamp(1.02rem, 1.8vw, 1.2rem); color: var(--ink-soft); }
.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* Hero load-in */
.js .load-in { opacity: 0; transform: translateY(24px); animation: rise .8s var(--ease-out) forwards; }
.js .d1 { animation-delay: .08s; } .js .d2 { animation-delay: .18s; }
.js .d3 { animation-delay: .3s; }  .js .d4 { animation-delay: .42s; }
.js .d5 { animation-delay: .54s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ============ Home: the two zones ============ */
.zones { padding: clamp(48px, 7vw, 96px) 0; display: grid; gap: clamp(20px, 3vw, 34px); }
.zone-card {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(20px, 4vw, 56px); align-items: center;
  border-radius: clamp(22px, 3vw, 34px);
  padding: clamp(28px, 5vw, 64px);
  text-decoration: none; color: inherit;
  border: 1px solid var(--line);
  position: relative; overflow: clip;
  transition: transform .35s var(--ease-out), box-shadow .35s;
}
.zone-card:hover { transform: translateY(-5px); box-shadow: 0 26px 56px -18px rgba(32,28,23,0.3); }
.zone-card.alo { background: linear-gradient(125deg, #eaf3ee 0%, var(--paper-card) 60%); }
.zone-card.aac { background: linear-gradient(125deg, #efecf6 0%, var(--paper-card) 55%, #f8efe9 100%); }
.zone-copy .kicker { margin-bottom: 14px; }
.zone-card h2 {
  margin: 0 0 12px; font-family: var(--serif); font-weight: 620;
  font-size: clamp(1.9rem, 4.6vw, 3.3rem); line-height: 1.02; letter-spacing: -0.025em;
}
.zone-card.alo h2 em { font-style: italic; color: var(--alo); }
.zone-card.aac h2 em { font-style: italic; color: var(--aac); }
.zone-card p { margin: 0 0 22px; color: var(--ink-soft); font-size: clamp(0.98rem, 1.5vw, 1.08rem); max-width: 52ch; }
.zone-go {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}
.zone-card:hover .zone-go .btn-arrow { transform: translateX(4px); }
.zone-icons { display: flex; justify-content: center; align-items: center; }
.zone-icons img {
  width: clamp(74px, 9vw, 118px); height: clamp(74px, 9vw, 118px);
  border-radius: 24%;
  box-shadow: 0 14px 30px rgba(32,28,23,0.22), 0 3px 8px rgba(32,28,23,0.12);
  border: 3px solid var(--paper-card);
  transition: transform .35s var(--ease-out);
}
.zone-icons img + img { margin-left: -8%; }
.zone-icons img:nth-child(1) { transform: rotate(-6deg); }
.zone-icons img:nth-child(2) { transform: rotate(3deg) translateY(-10px) scale(1.08); z-index: 1; box-shadow: 0 18px 36px rgba(32,28,23,0.28), 0 4px 10px rgba(32,28,23,0.14); }
.zone-icons img:nth-child(3) { transform: rotate(8deg); }
.zone-icons img:nth-child(4) { transform: rotate(13deg); }
.zone-card:hover .zone-icons img { transform: rotate(0) translateY(0); }

/* ============ Ticker ============ */
.ticker { overflow: hidden; white-space: nowrap; border-block: 1px solid var(--line); background: var(--paper-card); padding: 12px 0; }
.ticker-track {
  display: inline-flex; align-items: baseline; gap: 26px;
  font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink-soft);
  animation: ticker 60s linear infinite; will-change: transform;
}
.ticker-track i { font-style: normal; color: var(--ink-faint); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ============ Zone heroes (family pages) ============ */
.zone-hero { padding: clamp(52px, 8vw, 100px) 0 clamp(40px, 6vw, 72px); text-align: center; position: relative; }
.zone-hero.alo {
  background:
    radial-gradient(900px 460px at 10% -10%, var(--board-soft) 0%, transparent 60%),
    radial-gradient(800px 420px at 55% -14%, var(--word-soft) 0%, transparent 55%),
    radial-gradient(900px 460px at 95% -10%, var(--num-soft) 0%, transparent 60%),
    var(--paper);
}
.zone-hero.aac {
  background:
    radial-gradient(900px 480px at 15% -12%, var(--aeiou-soft) 0%, transparent 60%),
    radial-gradient(900px 480px at 85% -12%, var(--kam-soft) 0%, transparent 60%),
    var(--paper);
}
.zone-hero h1 {
  margin: 0 0 18px; font-family: var(--serif); font-weight: 620;
  font-size: clamp(2.4rem, 7.4vw, 5.6rem); line-height: 1.0; letter-spacing: -0.028em;
  font-variation-settings: "opsz" 144;
}
.zone-hero.alo h1 em { font-style: italic; font-weight: 500; color: var(--alo); }
.zone-hero.aac h1 em { font-style: italic; font-weight: 500; color: var(--aac); }
.zone-hero .hero-sub { margin-bottom: 0; }

/* ============ App articles ============ */
.app { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line); position: relative; overflow: clip; }
.app.tint { background: var(--paper-card); }

.chapter {
  position: absolute; top: clamp(-26px, -2.4vw, -14px); right: -0.05em; margin: 0;
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(5.6rem, 19vw, 15rem); line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px color-mix(in srgb, var(--accent) 30%, transparent);
  letter-spacing: -0.04em; user-select: none; pointer-events: none; z-index: 0;
}
.chapter span {
  -webkit-text-stroke: 0; color: var(--accent); font-size: 0.14em;
  font-style: italic; font-weight: 500; letter-spacing: 0.06em;
  vertical-align: 2.2em; margin-right: 0.4em;
}

.app-header { position: relative; z-index: 1; display: flex; align-items: center; gap: clamp(18px, 3vw, 30px); margin-bottom: clamp(18px, 3vw, 30px); flex-wrap: wrap; }
.app-icon {
  width: clamp(78px, 9vw, 112px); height: clamp(78px, 9vw, 112px); border-radius: 24%;
  box-shadow: 0 14px 30px rgba(32, 28, 23, 0.22), 0 3px 8px rgba(32,28,23,0.12);
  flex-shrink: 0; transform: rotate(-4deg); transition: transform .35s var(--ease-out);
}
.app-header:hover .app-icon { transform: rotate(0deg) scale(1.04); }
.app-platform { margin: 0 0 4px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); }
.app-header h2 {
  margin: 0 0 4px; font-family: var(--serif); font-weight: 640;
  font-size: clamp(2.3rem, 5.4vw, 3.9rem); line-height: 1; letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144;
}
.app-tagline { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 480; font-size: clamp(1.08rem, 2.1vw, 1.45rem); color: var(--ink-soft); }

.app-lede { position: relative; z-index: 1; max-width: 62ch; font-size: clamp(1.05rem, 1.7vw, 1.2rem); line-height: 1.7; margin: 0 0 clamp(14px, 2vw, 20px); }
.app-header-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.doc-links { position: relative; z-index: 1; margin: 0 0 clamp(36px, 5vw, 60px); font-size: 0.86rem; color: var(--ink-faint); }
.doc-links a { color: var(--ink-faint); text-decoration: none; font-weight: 600; }
.doc-links a:hover { color: var(--accent); text-decoration: underline; }

/* Big-idea feature blocks (Apple-style chunking) */
.feat {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
  padding: clamp(26px, 4vw, 44px) 0;
}
.feat + .feat { border-top: 1px dashed var(--line); }
.feat.flip .feat-copy { order: 2; }
.feat.flip .feat-media { order: 1; }
.feat h3 {
  margin: 0 0 12px; font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.5rem, 3.2vw, 2.3rem); line-height: 1.08; letter-spacing: -0.02em;
}
.feat h3 em { font-style: italic; color: var(--accent); font-weight: 500; }
.feat p { margin: 0 0 12px; color: var(--ink-soft); font-size: clamp(0.98rem, 1.5vw, 1.06rem); }
.feat p strong { color: var(--ink); }
.feat-media { display: flex; justify-content: center; }

/* Device frames */
.device {
  margin: 0; background: #17150f;
  border-radius: clamp(22px, 3vw, 32px); padding: clamp(7px, 1vw, 10px);
  box-shadow: 0 24px 48px -12px rgba(32, 28, 23, 0.35), 0 6px 16px rgba(32, 28, 23, 0.15), inset 0 0 0 1.5px #3a362e;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
  position: relative;
}
.device img { width: 100%; border-radius: clamp(15px, 2.1vw, 23px); }
.feat-media > .device { width: min(300px, 78%); }
.feat-media .duo { display: flex; align-items: center; justify-content: center; }
.feat-media .duo .device { width: min(270px, 52%); }
.feat-media .duo .device:nth-child(1) { transform: rotate(-5deg) translateX(6%); z-index: 1; }
.feat-media .duo .device:nth-child(2) { transform: rotate(4deg) translateX(-6%) translateY(4%); }
.feat-media .duo .device:hover { transform: rotate(0) translate(0,0) scale(1.04); z-index: 3; }
.feat-media > .device:hover { transform: translateY(-2%) scale(1.03); }

/* Fan of three (intro showcase rows) */
.shots { position: relative; z-index: 1; }
.shots.fan { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; width: min(680px, 100%); margin-inline: auto; padding: clamp(10px, 2vw, 24px) 0; }
.shots.fan-pads { width: min(920px, 100%); }
.fan .device:nth-child(1) { transform: rotate(-7deg) translateX(12%) translateY(4%); z-index: 1; }
.fan .device:nth-child(2) { transform: scale(1.12); z-index: 3; }
.fan .device:nth-child(3) { transform: rotate(7deg) translateX(-12%) translateY(4%); z-index: 2; }
.fan .device:hover { transform: rotate(0deg) translateY(-2%) scale(1.14); z-index: 4; }

/* Chips (games list, categories, puzzle types) */
.chip-block { position: relative; z-index: 1; padding: clamp(20px, 3vw, 36px) 0 0; }
.chip-block h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.4rem, 2.8vw, 2rem); letter-spacing: -0.015em; margin: 0 0 16px; }
.chip-block h3 em { font-style: italic; color: var(--accent); font-weight: 500; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: 0.88rem; font-weight: 600; color: var(--ink-soft);
  border: 1px solid var(--line); background: var(--paper-card);
  border-radius: 999px; padding: 6px 14px;
  transition: transform .2s var(--ease-out), border-color .2s, color .2s;
}
.chips li:hover { transform: translateY(-2px) rotate(-1deg); border-color: var(--accent); color: var(--ink); }
.chips li.free { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 55%, var(--paper)); color: var(--accent); }
.chips-note { font-size: 0.85rem; color: var(--ink-faint); margin-top: 12px; }

/* Info card grids (puzzle types, AAC features, ways to express) */
.cards { position: relative; z-index: 1; list-style: none; margin: 0; padding: clamp(8px, 1.5vw, 16px) 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: clamp(12px, 1.8vw, 20px); }
.cards li {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 20px 18px;
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.cards li:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -10px rgba(32,28,23,0.16); }
.cards .card-glyph {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent-soft, var(--paper)); color: var(--accent); font-size: 1.15rem; font-weight: 700;
  font-family: var(--serif); margin-bottom: 10px;
}
.cards strong { display: block; font-family: var(--serif); font-size: 1.08rem; font-weight: 640; margin-bottom: 4px; letter-spacing: -0.01em; }
.cards span { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.55; }

/* Stats band */
.stats-band {
  position: relative; z-index: 1;
  margin: clamp(30px, 4vw, 48px) 0 0;
  border-radius: clamp(20px, 2.6vw, 28px);
  background: var(--accent); color: #fff;
  padding: clamp(26px, 4vw, 44px) clamp(22px, 4vw, 52px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: clamp(18px, 3vw, 34px);
  text-align: center;
}
.stats-band .stat b { display: block; font-family: var(--serif); font-weight: 640; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -0.02em; }
.stats-band .stat span { font-size: 0.86rem; opacity: 0.85; font-weight: 600; }
.stats-band ::selection { background: #fff; color: var(--accent); }

/* Board art mosaic */
.mosaic { position: relative; z-index: 1; list-style: none; margin: clamp(10px, 2vw, 18px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 44vw), 1fr)); gap: clamp(10px, 1.6vw, 16px); }
.mosaic li { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 10px 22px -8px rgba(32,28,23,0.18); transition: transform .3s var(--ease-out); }
.mosaic li:hover { transform: translateY(-4px) rotate(-0.5deg); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1.2; }

/* ============ Boardalo seasonal cast teaser ============ */
.seasonal { margin-top: clamp(48px, 6vw, 80px); position: relative; z-index: 1; }
.seasonal h3 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em;
  font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 10px;
}
.seasonal h3 em { font-style: italic; color: var(--accent); font-weight: 500; }
.seasonal-lede { max-width: 62ch; color: var(--ink-soft); font-size: 0.98rem; margin: 0 0 28px; }
.seasonal-group + .seasonal-group { margin-top: 30px; }
.seasonal-label { font-weight: 700; font-size: 0.95rem; margin: 0 0 14px; }
.seasonal-strip {
  list-style: none; margin: 0; padding: 0 0 6px;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(128px, 1fr);
  gap: clamp(12px, 1.6vw, 18px);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.seasonal-strip li {
  scroll-snap-align: start;
  background: var(--paper-card); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px 10px 14px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.seasonal-strip li:hover { transform: translateY(-5px); box-shadow: 0 16px 30px -10px rgba(32,28,23,0.16); }
.seasonal-strip img {
  width: 76px; height: 76px; border-radius: 50%; margin-bottom: 8px;
  background: var(--accent-soft); border: 3px solid var(--paper-card);
  box-shadow: 0 6px 14px rgba(32,28,23,0.14); filter: saturate(0.88);
  transition: filter .3s;
}
.seasonal-strip li:hover img { filter: saturate(1); }
.seasonal-strip strong { font-family: var(--serif); font-size: 0.94rem; font-weight: 640; }
.seasonal-strip span { font-size: 0.76rem; color: var(--ink-faint); line-height: 1.3; }

/* Cast strip */
.cast { margin-top: clamp(36px, 5vw, 60px); position: relative; z-index: 1; }
.cast h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 22px; }
.cast h3 em { font-style: italic; color: var(--accent); font-weight: 500; }
.cast-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 44vw), 1fr)); gap: clamp(12px, 1.8vw, 22px); }
.cast-grid li {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: 20px;
  padding: 22px 14px 18px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform .35s var(--ease-out), box-shadow .35s;
}
.cast-grid li:nth-child(odd) { --tilt: rotate(-1deg); transform: var(--tilt); }
.cast-grid li:nth-child(even) { --tilt: rotate(1.2deg) translateY(6px); transform: var(--tilt); }
.cast-grid li:hover, .js .stagger.revealed > li:hover { transform: rotate(0deg) translateY(-6px); box-shadow: 0 18px 36px -8px rgba(32, 28, 23, 0.18); }
.cast-grid img {
  width: min(104px, 58%); border-radius: 50%; margin-bottom: 10px;
  background: var(--accent-soft); border: 3px solid var(--paper-card);
  box-shadow: 0 6px 14px rgba(32,28,23,0.14); transition: transform .35s var(--ease-out);
}
.cast-grid li:hover img { transform: scale(1.08) rotate(-3deg); }
.cast-grid strong { font-family: var(--serif); font-size: 1.05rem; font-weight: 640; }
.cast-grid span { font-size: 0.83rem; color: var(--ink-soft); line-height: 1.45; }

/* Honest specs table (AAC) */
.specs { position: relative; z-index: 1; margin: clamp(10px, 2vw, 18px) 0 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--paper-card); }
.specs table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.specs th, .specs td { text-align: left; padding: 13px 18px; vertical-align: top; }
.specs th { width: 32%; min-width: 120px; font-family: var(--serif); font-weight: 640; font-size: 1rem; color: var(--ink); }
.specs td { color: var(--ink-soft); }
.specs tr + tr th, .specs tr + tr td { border-top: 1px solid var(--line); }

/* AAC promises band */
.promises {
  position: relative; z-index: 1;
  margin: clamp(30px, 4vw, 48px) 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: clamp(12px, 2vw, 20px);
}
.promise {
  border-radius: 20px; padding: 22px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--paper));
}
.promise strong { display: block; font-family: var(--serif); font-size: 1.1rem; font-weight: 640; margin-bottom: 4px; color: var(--ink); }
.promise span { font-size: 0.9rem; color: var(--ink-soft); }

/* Kammunicate shared canvas vignette */
.kam-canvas {
  width: min(400px, 100%); margin-inline: auto;
  background: var(--paper-card); border: 1px solid var(--line); border-radius: 30px;
  box-shadow: 0 26px 52px -12px rgba(32, 28, 23, 0.28), 0 6px 14px rgba(32,28,23,0.1);
  overflow: hidden; transform: rotate(2.5deg); transition: transform .45s var(--ease-out); position: relative;
}
.kam-wrap:hover .kam-canvas { transform: rotate(0deg) scale(1.02); }
.kam-half { padding: 34px 26px; display: flex; }
.kam-theirs { background: var(--accent-soft); transform: rotate(180deg); justify-content: flex-end; }
.kam-yours { justify-content: flex-end; }
.kam-bubble {
  font-family: var(--serif); font-style: italic; font-size: 1.12rem; color: var(--ink);
  background: var(--paper-card); border: 1.5px solid var(--line);
  border-radius: 18px 18px 4px 18px; padding: 10px 18px;
  box-shadow: 0 4px 10px rgba(32,28,23,0.08);
}
.kam-theirs .kam-bubble { background: #fff; }
.kam-divider { position: relative; height: 0; z-index: 2; display: flex; justify-content: center; }
.kam-divider::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 30%, transparent) 0 10px, transparent 10px 18px); }
.kam-divider img { width: 84px; height: 84px; margin-top: -42px; filter: drop-shadow(0 8px 14px rgba(32,28,23,0.2)); transition: transform .35s var(--ease-out); }
.kam-wrap:hover .kam-divider img { transform: scale(1.1) rotate(-4deg); }
.kam-wrap figcaption, .fig-caption { margin-top: 16px; font-family: var(--serif); font-style: italic; font-size: 0.92rem; color: var(--ink-soft); text-align: center; }
.kam-wrap { margin: 0; }

/* Per-app closing CTA band */
.cta-band {
  position: relative; z-index: 1;
  margin-top: clamp(36px, 5vw, 60px);
  border-radius: clamp(20px, 2.6vw, 28px);
  border: 1px solid var(--line);
  background: linear-gradient(120deg, var(--accent-soft), var(--paper-card) 70%);
  padding: clamp(26px, 4vw, 44px) clamp(22px, 4vw, 52px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cta-band h3 { margin: 0; font-family: var(--serif); font-weight: 620; font-size: clamp(1.4rem, 3vw, 2.1rem); letter-spacing: -0.02em; }
.cta-band h3 em { font-style: italic; color: var(--accent); font-weight: 500; }
.cta-band .app-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ============ About / dark bands ============ */
.about { border-top: 1px solid var(--line); background: var(--ink); color: var(--paper); padding: clamp(60px, 9vw, 112px) 0; text-align: center; }
.about h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 4.8vw, 3.4rem); letter-spacing: -0.025em; line-height: 1.05; margin: 0 0 20px; }
.about h2 em { font-style: italic; font-weight: 480; color: #d7c9a8; }
.about p { max-width: 640px; margin: 0 auto; color: #c8c1b4; font-size: clamp(1rem, 1.6vw, 1.12rem); }
.about ::selection { background: var(--paper); color: var(--ink); }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.js .reveal.revealed { opacity: 1; transform: none; }
.js .stagger > * { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); }
.js .stagger.revealed > * { opacity: 1; transform: var(--tilt, none); }
.js .stagger > *:nth-child(1) { transition-delay: .05s; }
.js .stagger > *:nth-child(2) { transition-delay: .11s; }
.js .stagger > *:nth-child(3) { transition-delay: .17s; }
.js .stagger > *:nth-child(4) { transition-delay: .23s; }
.js .stagger > *:nth-child(5) { transition-delay: .29s; }
.js .stagger > *:nth-child(6) { transition-delay: .35s; }

/* ============ Doc pages (privacy / support / press) ============ */
.doc-main { padding: clamp(40px, 6vw, 72px) 0 clamp(60px, 8vw, 100px); }
.doc-breadcrumb { margin: 0 0 28px; }
.doc-breadcrumb a {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.92rem;
  transition: color .2s;
}
.doc-breadcrumb a:hover { color: var(--accent); }
.doc { position: relative; }
.doc .t-eyebrow {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 10px;
}
.doc h1 {
  font-family: var(--serif); font-weight: 640; letter-spacing: -0.025em;
  font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.04; margin: 0 0 10px;
}
.doc .article__meta { color: var(--ink-faint); font-size: 0.92rem; margin: 0 0 30px; }
.doc h2 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 44px 0 14px;
  padding-top: 20px; border-top: 1px solid var(--line);
}
.doc h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 28px; }
.doc h3 { font-size: 1.08rem; font-weight: 700; margin: 22px 0 8px; color: var(--ink); }
.doc p, .doc li { font-size: 1rem; color: var(--ink-soft); line-height: 1.7; }
.doc p { margin: 0 0 14px; }
.doc strong { color: var(--ink); }
.doc a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 14px; }
.doc li { margin-bottom: 6px; }
.doc .callout {
  background: var(--accent-soft); border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 18px 20px; margin: 22px 0; font-size: 0.98rem; color: var(--ink);
}
.doc .callout strong { display: block; margin-bottom: 4px; }
.doc .muted { color: var(--ink-faint); font-size: 0.9rem; }
.doc nav.toc {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 22px; margin: 26px 0; font-size: 0.92rem;
}
.doc nav.toc h2 { margin: 0 0 10px; font-size: 1rem; border: 0; padding: 0; font-family: var(--sans); font-weight: 700; }
.doc nav.toc ol { columns: 2; padding-left: 1.1em; }
.doc nav.toc a { text-decoration: none; }
.doc nav.toc a:hover { text-decoration: underline; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.94rem; }
.doc th, .doc td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.doc th { font-family: var(--serif); font-weight: 640; color: var(--ink); }
.doc code, .doc pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em; background: var(--paper-card); border: 1px solid var(--line);
  border-radius: 5px; padding: 0.1em 0.4em; word-break: break-word; overflow-wrap: anywhere;
}
.doc pre { display: block; padding: 12px 14px; overflow-x: auto; white-space: pre-wrap; }
.doc-press .facts table, .doc table.facts { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.doc-press img, .doc img { max-width: 100%; height: auto; }

/* Press page: reuse the .doc frame but restore its own card/quote/fact styling */
.doc-press .card, .doc-press .facts, .doc-press .quiet {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin: 16px 0;
}
.doc-press .cast { display: flex; flex-wrap: wrap; gap: 14px; margin: 20px 0; }
.doc-press .cast > * { flex: 1 1 140px; text-align: center; }
.doc-press .cast img { width: 100%; max-width: 130px; border-radius: 50%; margin: 0 auto 8px; }
.doc-press .shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 12px; margin: 20px 0; }
.doc-press .shots img { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.doc-press .tag { display: inline-block; font-size: 0.8rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; margin: 2px 4px 2px 0; }
.doc-press .cta, .doc-press .cta.alt {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700;
  padding: 12px 22px; border-radius: 999px; background: var(--ink); color: var(--paper); margin: 6px 8px 6px 0;
}
.doc-press .cta.alt { background: var(--paper-card); color: var(--ink); border: 1.5px solid var(--line); }
.doc-press .epithet { font-family: var(--serif); font-style: italic; color: var(--ink-soft); }
.doc-press .wrap { max-width: 100%; }

/* ============ Footer ============ */
.site-footer { background: var(--ink); color: #a49c8e; padding: 0 0 52px; text-align: center; font-size: 0.95rem; }
.about + .site-footer { border-top: 1px solid #37322a; }
.footer-sign { margin: 0; padding: clamp(30px, 5vw, 50px) 0 6px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.6rem, 4.4vw, 2.9rem); color: var(--paper); letter-spacing: -0.02em; display: flex; align-items: center; justify-content: center; gap: 0.32em; }
.footer-bee { width: 0.78em; height: 0.78em; flex-shrink: 0; color: #f2c14e; transform: translateY(0.05em); }
.site-footer p { margin: 6px 0 18px; }
.site-footer a { color: #cfc7b8; font-weight: 600; text-decoration: none; }
.site-footer a:hover { color: var(--paper); }
.footer-links { display: flex; justify-content: center; gap: 10px 22px; flex-wrap: wrap; padding: 0 4vw; }
.footer-links a { color: #a49c8e; }
.footer-legal { margin-top: 14px; padding-top: 14px; border-top: 1px solid #37322a; gap: 6px 16px; }
.footer-legal a { font-size: 0.84rem; font-weight: 500; color: #8b8377; }
.footer-legal a:hover { color: var(--paper); }
.site-footer ::selection { background: var(--paper); color: var(--ink); }

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .load-in { animation: none; opacity: 1; transform: none; }
  .js .reveal, .js .stagger > * { opacity: 1; transform: var(--tilt, none); transition: none; }
  .ticker-track { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ============ Responsive ============ */
/* Large tablets / small laptops */
@media (max-width: 1000px) {
  .feat, .feat.flip { grid-template-columns: 1fr; gap: clamp(20px, 4vw, 32px); }
  .feat.flip .feat-copy { order: 1; }
  .feat.flip .feat-media { order: 2; }
  .feat-media > .device { width: min(280px, 70%); }
  .shots.fan { width: min(560px, 96%); }
  .zone-card { grid-template-columns: 1fr; text-align: center; }
  .zone-card p { margin-inline: auto; }
  .zone-icons { order: -1; }
}

/* Phones and small tablets */
@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: color-mix(in srgb, var(--paper) 97%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 0 14px;
    box-shadow: 0 18px 34px rgba(32,28,23,0.14);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 6vw; font-size: 1.12rem; font-family: var(--serif); font-weight: 600; }
  .site-nav a::after { display: none; }
  .site-nav .nav-pill { border: 0; border-radius: 0; background: none; padding: 14px 6vw; }

  /* fans and duos become snap-scroll rows */
  .shots.fan {
    display: flex; overflow-x: auto; gap: 16px;
    scroll-snap-type: x mandatory;
    padding: 8px 6vw 22px; margin-inline: -4vw; width: auto;
    -webkit-overflow-scrolling: touch;
  }
  .fan .device, .fan .device:nth-child(1), .fan .device:nth-child(2), .fan .device:nth-child(3) {
    transform: none; flex: 0 0 62%; max-width: 250px; scroll-snap-align: center;
  }
  .fan-pads .device, .fan-pads .device:nth-child(1), .fan-pads .device:nth-child(2), .fan-pads .device:nth-child(3) {
    flex: 0 0 78%; max-width: 330px;
  }
  .fan .device:hover { transform: none; }
  .feat-media .duo { flex-wrap: nowrap; gap: 12px; }
  .feat-media .duo .device { width: 46%; }
  .feat-media .duo .device:nth-child(1),
  .feat-media .duo .device:nth-child(2) { transform: none; }

  .app-header-actions { margin-bottom: 28px; }
  .cta-band { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* Small phones */
@media (max-width: 430px) {
  .fan .device, .fan .device:nth-child(1), .fan .device:nth-child(2), .fan .device:nth-child(3) { flex-basis: 74%; }
  .store-badge { width: 100%; justify-content: center; }
  .coming-soon { width: 100%; text-align: center; }
  .specs th { width: 38%; min-width: 96px; }
  .specs th, .specs td { padding: 11px 13px; font-size: 0.88rem; }
  .zone-card { padding: 24px 18px; }
  .chips li { font-size: 0.82rem; padding: 5px 11px; }
}

/* Tiny phones */
@media (max-width: 350px) {
  .container, .header-inner, .subnav-inner { width: 94%; }
  .brand-name { display: none; }
  .hero-actions .btn-primary, .hero-actions .btn-secondary { width: 100%; justify-content: center; }
  .stats-band { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Try-it demos: hand-built vanilla-JS recreations, not ports.
   ============================================================ */
.demo { margin-top: clamp(40px, 5.5vw, 64px); position: relative; z-index: 1; }
.demo-head { max-width: 62ch; margin-bottom: clamp(16px, 2.4vw, 24px); }
.demo-head h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; font-size: clamp(1.4rem, 2.8vw, 2rem); margin: 0 0 8px; }
.demo-head h3 em { font-style: italic; color: var(--accent); font-weight: 500; }
.demo-head p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

.demo-shell {
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: clamp(20px, 2.6vw, 28px);
  padding: clamp(20px, 3.4vw, 36px);
  box-shadow: 0 20px 40px -18px rgba(32,28,23,0.18);
}

.demo-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin-bottom: clamp(18px, 2.6vw, 26px); }
.demo-status { font-weight: 700; font-size: 0.98rem; color: var(--ink); min-height: 1.4em; }
.demo-status .accent { color: var(--accent); }
.demo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-btn {
  font-family: var(--sans); font-weight: 700; font-size: 0.86rem;
  padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink); cursor: pointer; appearance: none;
  transition: transform .2s var(--ease-out), border-color .2s, background .2s, color .2s;
}
.demo-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.demo-btn:active:not(:disabled) { transform: translateY(0); }
.demo-btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.demo-btn.primary:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.demo-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.demo-note { font-size: 0.85rem; color: var(--ink-faint); margin-top: 16px; text-align: center; }
.demo-result {
  margin-top: 16px; padding: 12px 18px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.95rem;
  text-align: center; opacity: 0; transform: translateY(4px);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  pointer-events: none;
}
.demo-result.show { opacity: 1; transform: translateY(0); }

/* ---- Boardalo: Tic-Tac-Toe ---- */
.ttt-board {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  width: min(300px, 100%); margin: 0 auto; aspect-ratio: 1 / 1;
}
.ttt-cell {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px;
  display: grid; place-items: center; padding: 0;
  font-family: var(--serif); font-size: clamp(1.9rem, 9vw, 2.6rem); font-weight: 640;
  cursor: pointer; color: var(--ink);
  transition: background .2s, border-color .2s, transform .15s var(--ease-out);
}
.ttt-cell:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.ttt-cell:disabled { cursor: default; }
.ttt-cell.x { color: var(--accent); }
.ttt-cell.o { color: var(--ink-soft); }
.ttt-cell.win { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- Wordalo: Anagram ---- */
.anagram-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: clamp(18px, 2.6vw, 24px); }
.anagram-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 5px 12px;
}
.anagram-progress { font-size: 0.85rem; color: var(--ink-faint); font-weight: 600; }
.anagram-answer { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: clamp(22px, 3.2vw, 30px); min-height: 56px; }
.anagram-slot {
  width: clamp(36px, 8vw, 48px); height: clamp(36px, 8vw, 48px);
  border: none; border-bottom: 3px solid var(--line); border-radius: 4px 4px 0 0;
  display: grid; place-items: center; background: transparent; padding: 0;
  font-family: var(--serif); font-size: clamp(1.15rem, 4vw, 1.6rem); font-weight: 640;
  cursor: pointer; color: var(--ink); transition: border-color .2s;
}
.anagram-slot.filled { border-color: var(--accent); }
.anagram-slot:disabled { cursor: default; }
.anagram-pool { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.anagram-tile {
  width: clamp(36px, 8vw, 48px); height: clamp(36px, 8vw, 48px);
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); padding: 0;
  font-family: var(--serif); font-size: clamp(1.05rem, 3.6vw, 1.5rem); font-weight: 640;
  cursor: pointer; color: var(--ink);
  transition: transform .15s var(--ease-out), border-color .2s, opacity .2s, visibility .2s;
}
.anagram-tile:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); }
.anagram-tile:disabled { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---- Numalo: mini Sudoku ---- */
.sudoku-wrap { display: flex; flex-direction: column; align-items: center; gap: clamp(16px, 2.4vw, 22px); }
.sudoku-board {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px;
  width: min(260px, 78%); aspect-ratio: 1 / 1;
  background: var(--line); border-radius: 14px; padding: 3px; overflow: hidden;
}
.sudoku-cell {
  background: var(--paper-card); border: none; display: grid; place-items: center; padding: 0;
  font-family: var(--serif); font-size: clamp(1.3rem, 6vw, 1.8rem); font-weight: 640;
  color: var(--ink); cursor: pointer; transition: background .2s, color .2s;
}
.sudoku-cell.given { color: var(--ink); background: var(--accent-soft); cursor: default; font-weight: 700; }
.sudoku-cell:hover:not(.given) { background: var(--accent-soft); }
.sudoku-cell.wrong { background: #f6dede; color: #a3352b; }
.sudoku-cell:nth-child(2), .sudoku-cell:nth-child(10) { box-shadow: inset -2px 0 0 var(--ink); }
.sudoku-cell:nth-child(14) { box-shadow: inset -2px 0 0 var(--ink); }
.sudoku-cell:nth-child(5), .sudoku-cell:nth-child(7), .sudoku-cell:nth-child(8) { box-shadow: inset 0 -2px 0 var(--ink); }
.sudoku-cell:nth-child(6) { box-shadow: inset -2px -2px 0 var(--ink); }
.sudoku-cell.wrong:nth-child(2), .sudoku-cell.wrong:nth-child(10) { box-shadow: inset -2px 0 0 var(--ink), inset 0 0 0 999px #f6dede; }
.sudoku-keys { display: flex; gap: 8px; }
.sudoku-key {
  width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--paper); font-family: var(--serif); font-weight: 640; font-size: 1.1rem;
  color: var(--ink); cursor: pointer; transition: border-color .2s, transform .15s var(--ease-out);
}
.sudoku-key:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

@media (max-width: 430px) {
  .demo-shell { padding: 18px 14px; }
  .demo-toolbar { justify-content: center; text-align: center; }
  .anagram-tile, .anagram-slot { width: clamp(32px, 9.5vw, 42px); height: clamp(32px, 9.5vw, 42px); }
}

/* ============ Talking characters ============ */
.char-btn {
  display: block; background: none; border: none; margin: 0; padding: 0;
  font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.char-btn:focus-visible { outline: 3px solid var(--accent, var(--board)); outline-offset: 5px; border-radius: 18px; }
.cast-grid .char-btn, .seasonal-strip .char-btn { display: flex; flex-direction: column; align-items: center; }
.hero-char.char-btn { position: absolute; z-index: 2; }
.hero-char.char-btn img { width: 100%; height: auto; display: block; }
.char-btn.talking img { animation: char-talk-bob 0.5s ease-in-out infinite alternate; }
@keyframes char-talk-bob {
  from { transform: scale(1) rotate(0deg); }
  to   { transform: scale(1.06) rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce) {
  .char-btn.talking img { animation: none; }
}

.char-bubble {
  position: fixed; z-index: 999; max-width: 240px; width: max-content;
  background: var(--ink); color: var(--paper);
  padding: 11px 15px; border-radius: 16px;
  font-family: var(--serif); font-size: 0.86rem; line-height: 1.4; font-weight: 500;
  box-shadow: 0 16px 32px -8px rgba(32,28,23,0.35);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.char-bubble-text { margin: 0; }
.char-bubble.above { transform-origin: 50% 100%; transform: scale(0.9) translateY(4px); }
.char-bubble.below { transform-origin: 50% 0%; transform: scale(0.9) translateY(-4px); }
.char-bubble.show { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
  .char-bubble { transition: opacity .15s ease; transform: none !important; }
}
.char-bubble-arrow {
  position: absolute; width: 13px; height: 13px; background: var(--ink);
  transform: rotate(45deg); margin-left: -6.5px;
}
.char-bubble.above .char-bubble-arrow { bottom: -5px; }
.char-bubble.below .char-bubble-arrow { top: -5px; }

@media (max-width: 430px) {
  .char-bubble { max-width: 78vw; font-size: 0.82rem; }
}
