/* Emotify design system v2
   Red + white lead, charcoal builds hierarchy, secondary colours are accents only.
   Tint ladders of 80 / 60 / 40 / 20. No gradients. Condensed uppercase headlines. */
:root {
  /* core */
  --red: #D31145;
  --red-80: #DB406A;
  --red-60: #E4708F;
  --red-40: #ED9FB4;
  --red-20: #F6CFD9;
  --red-10: #FBE7EC;
  --red-dark: #A80D37;
  --char: #333D47;
  --char-80: #5B636B;
  --char-60: #848A90;
  --char-40: #ADB1B5;
  --char-20: #D6D8DA;
  --char-10: #EBECED;
  --char-5: #F5F5F6;
  /* secondary (accents only) */
  --salmon: #FF7A85;
  --salmon-20: #FEE4E7;
  --green: #88B943;
  --green-ink: #4F7A1C;
  --green-20: #E9F0DB;
  --yellow: #F9D452;
  --yellow-20: #FDF4D3;
  --orange: #FF9170;
  --orange-20: #FFE2DA;
  --purple: #706CA9;
  --blue: #4B92BE;
  --blue-20: #D2E4F0;

  --bg: #FDF2F5;
  --paper: #FFFFFF;
  --ink: var(--char);
  --muted: var(--char-80);
  --line: var(--char-20);
  --sun: var(--yellow);
  --sun-soft: var(--yellow-20);
  --brand: var(--red);
  --good: var(--green-ink);
  --bad: var(--red);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(51, 61, 71, .06), 0 10px 28px rgba(51, 61, 71, .08);
  --shadow-sm: 0 1px 2px rgba(51, 61, 71, .08);
  --font-display: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Barlow', Arial, system-ui, sans-serif;
  --font-hand: 'Barlow', Arial, sans-serif;
  /* per-context accent (emotion family pages override these) */
  --c: var(--red);
  --c-soft: var(--red-10);
  --c-ink: var(--red);
  --zone-calm: #6E9C2F;
  --zone-tip: #F08A00;
  --zone-hot: var(--red);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 18px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.05; }
h1, h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .005em; color: var(--red); }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.3rem; color: var(--char); line-height: 1.2; }
h4 { font-family: var(--font-body); font-weight: 700; }
p { margin: 0 0 .8em; }
.hand { font-family: var(--font-body); font-weight: 600; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.ico { flex: none; vertical-align: -4px; }
.illo { flex: none; display: block; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 0 clamp(12px, 3vw, 32px); height: 68px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.75rem; line-height: .85; letter-spacing: .01em; color: var(--red); text-transform: uppercase; }
.brand-name b { font-weight: 800; color: var(--red); }
.brand-name small { display: block; font-family: var(--font-body); font-weight: 600; font-size: .68rem; color: var(--char-80); letter-spacing: .02em; text-transform: none; margin-top: 3px; }
.brand-name { display: inline-block; }
/* Lock-up: EMOTIFY with a quiet endorsement line underneath */
.brand-name small.brand-by { font-size: .66rem; font-weight: 500; color: var(--char-60); letter-spacing: .01em; margin-top: 5px; line-height: 1; }
.brand-name small.brand-by b { font-weight: 700; color: var(--char-80); }
.nav { display: flex; gap: 2px; margin-left: 8px; align-self: stretch; }
.nav a {
  display: flex; align-items: center; gap: 7px; text-decoration: none; font-weight: 600; font-size: .98rem;
  padding: 0 14px; color: var(--char); border-bottom: 4px solid transparent; border-top: 4px solid transparent;
}
.nav a:hover { color: var(--red); }
.nav a.active { color: var(--red); border-bottom-color: var(--red); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.stars-pill {
  display: inline-flex; align-items: center; gap: 6px; color: var(--char);
  background: var(--char-5); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; font-weight: 700;
}
.stars-pill .ico { color: var(--red); }
.level-select { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: #fff; }
.level-select button {
  border: 0; background: transparent; cursor: pointer;
  font-weight: 700; font-size: .85rem; padding: 5px 11px; border-radius: 999px; color: var(--char-80);
}
.level-select button[aria-pressed="true"] { background: var(--red); color: #fff; }
.menu-btn { display: none; }

/* ---------- Layout ---------- */
main { padding: 0 clamp(16px, 4vw, 40px) 80px; max-width: 1200px; margin: 0 auto; }
.section { margin: 48px 0; }
.card {
  background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--char-10);
}
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.eyebrow { font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; color: var(--char-80); }
.page-head { padding: 34px 0 8px 22px; border-left: 4px solid var(--red); margin-top: 24px; }
.page-head h1 { margin-bottom: .15em; }
.page-head .sub { font-size: 1.3rem; font-weight: 600; color: var(--char); }
.crumbs { font-size: .88rem; font-weight: 600; color: var(--char-80); margin-top: 20px; }
.crumbs a { text-decoration: none; color: var(--red); }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 2px solid var(--red); cursor: pointer; text-decoration: none;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 11px 22px; border-radius: 8px;
  background: var(--red); color: #fff;
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn:active { transform: translateY(1px); }
.btn.c { background: var(--c); border-color: var(--c); }
.btn.c:hover { filter: brightness(.92); }
.btn.sun { background: #fff; color: var(--red); border-color: var(--red); }
.btn.sun:hover { background: var(--red-10); }
.btn.ghost { background: #fff; color: var(--red); border-color: var(--red); }
.btn.ghost:hover { background: var(--red-10); }
.btn.small { padding: 7px 14px; font-size: .92rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--char-20); background: #fff; cursor: pointer;
  border-radius: 999px; padding: 5px 13px 5px 9px; font-weight: 700; font-size: .88rem; color: var(--char);
}
.icon-btn .ico { color: var(--red); }
.icon-btn:hover { border-color: var(--red); color: var(--red); }
.icon-btn.speaking { background: var(--red); color: #fff; border-color: var(--red); }
.icon-btn.speaking .ico { color: #fff; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--c); color: var(--c-ink); background: #fff;
  padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem;
  text-decoration: none; cursor: pointer;
}
.chip:hover { background: var(--c); color: #fff; }

/* ---------- Emotion Facets device ---------- */
.facets { display: block; width: 100%; height: auto; }

/* ---------- Home ---------- */
.hero {
  position: relative; overflow: hidden;
  margin-top: 24px; border-radius: 20px;
  background: var(--red); color: #fff;
  padding: clamp(26px, 5vw, 60px);
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: center;
}
.hero h1 { color: #fff; font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: .95; }
.hero h1 .big { color: var(--red-20); }
.hero .quote { font-size: 1.25rem; font-weight: 600; color: #fff; margin: 14px 0 22px; }
.hero .eyebrow { color: var(--red-20); }
.hero-art { position: relative; align-self: stretch; min-height: 300px; display: flex; align-items: center; justify-content: center; }
.hero-art .facets { position: absolute; right: -10%; bottom: -30%; width: 120%; }
.hero-art img { position: relative; width: 78%; max-width: 340px; background: #fff; border-radius: 50%; padding: 18px; aspect-ratio: 1 / 1; object-fit: contain; }
.name-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 18px; }
.name-form input {
  font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 8px;
  border: 2px solid #fff; min-width: 0; flex: 1; max-width: 260px; background: #fff; color: var(--char);
}
.hero .btn { border-color: #fff; }
.hero .btn.sun { background: #fff; color: var(--red); }
.hero .btn.ghost { background: transparent; color: #fff; }
.hero .btn.ghost:hover { background: rgba(255, 255, 255, .12); }
.hero .name-form .btn { background: var(--char); border-color: var(--char); }

.journey { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stop {
  position: relative; text-decoration: none;
  background: #fff; border: 1px solid var(--char-10); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease;
}
.stop:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(51, 61, 71, .14); }
.stop .art { aspect-ratio: 4 / 3; background: var(--c-soft); display: grid; place-items: center; overflow: hidden; }
.stop .art img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.stop .body { padding: 14px 16px 18px; border-top: 4px solid var(--c); }
.stop .num {
  position: absolute; top: 0; left: 16px;
  width: 38px; height: 46px; border-radius: 0 0 8px 8px;
  background: var(--c); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
  display: grid; place-items: center;
}
.stop .done {
  position: absolute; top: 10px; right: 10px; display: inline-flex; gap: 4px; align-items: center;
  background: var(--green-ink); color: #fff; font-weight: 700; font-size: .78rem;
  padding: 3px 10px; border-radius: 999px;
}
.stop h3 { margin: 0; font-size: 1.12rem; }
.stop .pages { font-size: .8rem; color: var(--char-80); font-weight: 600; }

.wotd { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; border-left: 6px solid var(--c); }
.wotd .face { width: 104px; }
.wotd h3 { font-family: var(--font-display); text-transform: uppercase; font-size: 2.4rem; font-weight: 800; color: var(--c-ink); margin: 0; }

.progress-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { text-align: center; padding: 20px; }
.stat b { display: block; font-family: var(--font-display); font-size: 2.8rem; line-height: 1; color: var(--red); }
.stat .illo { margin: 0 auto 6px; }
.badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.badge { width: 58px; text-align: center; font-size: .7rem; font-weight: 700; color: var(--char-60); }
.badge img { width: 52px; height: 52px; margin: 0 auto 4px; filter: grayscale(1) opacity(.35); transition: filter .3s; }
.badge.earned img { filter: none; }
.badge.earned { color: var(--char); }

.practice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.game-card { text-decoration: none; display: flex; gap: 16px; align-items: center; transition: transform .15s, box-shadow .15s; }
.game-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(51, 61, 71, .14); }
.game-card .emoji { width: 64px; height: 64px; border-radius: 14px; background: var(--char-5); display: grid; place-items: center; flex: none; }
.game-card h3 { margin: 0 0 2px; font-size: 1.12rem; }
.game-card p { margin: 0; font-size: .9rem; color: var(--char-80); }

/* ---------- Story sections ---------- */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 4vw, 48px); align-items: center; margin: 52px 0; }
.story.flip > .story-art { order: 2; }
.story-art { position: relative; }
.story-art img { border-radius: var(--radius); width: 100%; max-height: 420px; object-fit: contain; position: relative; }
.story-art .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; position: relative; }
.story-art .facets { position: absolute; width: 80%; left: 10%; bottom: -4%; }
.kid-text { font-size: 1.3rem; font-weight: 600; line-height: 1.45; color: var(--char); }
.book-text { margin-top: 14px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--char-10); }
.book-text summary { cursor: pointer; padding: 11px 16px; font-weight: 700; color: var(--red); list-style: none; display: flex; align-items: center; gap: 8px; }
.book-text summary::-webkit-details-marker { display: none; }
.book-text summary::after { content: '+'; margin-left: auto; font-size: 1.3rem; line-height: 1; }
.book-text[open] summary::after { content: '–'; }
.book-text .inner { padding: 0 18px 14px; font-size: 1.02rem; color: var(--char); }
.tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }

.etym { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; margin: 14px 0; }
.etym button {
  border: 2px solid var(--red); background: #fff; color: var(--red); border-radius: 10px; cursor: pointer;
  font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; padding: 2px 20px; min-width: 70px; text-transform: uppercase;
}
.etym button:hover { background: var(--red-10); }
.etym button.open { background: var(--red); color: #fff; }
.etym .meaning { flex-basis: 100%; min-height: 3em; font-weight: 600; color: var(--char-80); }

.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; position: relative; margin: 18px 0; }
.timeline::before { content: ''; position: absolute; top: 17px; left: 8%; right: 8%; height: 3px; background: var(--red-20); }
.tl { text-align: center; position: relative; }
.tl .dot { width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: #fff; border: 4px solid #fff; margin: 0 auto 6px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.tl b { display: block; font-family: var(--font-display); text-transform: uppercase; font-size: 1.15rem; color: var(--char); }
.tl span { font-size: .85rem; color: var(--char-80); font-weight: 600; }

.powers { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.power { border: 1px solid var(--red-40); cursor: pointer; border-radius: 999px; padding: 7px 14px; font-weight: 700; background: #fff; color: var(--red); display: inline-flex; gap: 6px; align-items: center; }
.power.on { background: var(--red); border-color: var(--red); color: #fff; }

.equation { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; text-transform: uppercase; margin: 12px 0; color: var(--char); }
.equation .term { background: #fff; border: 2px solid var(--char-20); border-radius: 10px; padding: 4px 16px; }
.equation .term.info { border-color: var(--blue); color: #2F6E95; }
.equation .term.fuel { border-color: var(--orange); color: #B4461F; }
.equation .term.act { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Wheel ---------- */
.wheel-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 28px; align-items: start; }
.wheel-svg { width: 100%; height: auto; max-width: 640px; margin: 0 auto; display: block; touch-action: manipulation; }
.wheel-svg .seg { cursor: pointer; transition: opacity .15s, filter .15s; }
.wheel-svg .seg:hover, .wheel-svg .seg:focus, .wheel-svg .seg.sel { filter: brightness(1.06) drop-shadow(0 0 6px rgba(51, 61, 71, .3)); outline: none; }
.wheel-svg text { pointer-events: none; font-family: var(--font-body); font-weight: 700; }
.wheel-panel { position: sticky; top: 92px; border-top: 6px solid var(--c); }
.wheel-panel .face { width: 80px; }
.wheel-panel h3 { font-family: var(--font-display); text-transform: uppercase; font-weight: 800; font-size: 2.3rem; color: var(--c-ink); margin: 6px 0 0; }
.level-tabs { display: flex; gap: 0; flex-wrap: wrap; justify-content: center; margin: 10px auto 16px; border: 1px solid var(--line); border-radius: 10px; width: fit-content; max-width: 100%; overflow: hidden; }
.level-tabs button { border: 0; border-right: 1px solid var(--line); background: #fff; cursor: pointer; padding: 8px 16px; font-weight: 700; color: var(--char); }
.level-tabs button:last-child { border-right: 0; }
.level-tabs button[aria-pressed="true"] { background: var(--red); color: #fff; }

/* ---------- Family ---------- */
.fam-hero {
  margin-top: 22px; border-radius: 20px; overflow: hidden; position: relative;
  background: #fff; border: 1px solid var(--char-10); box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr minmax(240px, 420px); align-items: stretch;
  border-top: 8px solid var(--c);
}
.fam-hero .txt { padding: clamp(22px, 4vw, 46px); align-self: center; position: relative; z-index: 1; }
.fam-hero h1 { font-size: clamp(3rem, 8vw, 5.4rem); color: var(--c-ink); margin: 0; line-height: .9; }
.fam-hero .desc { font-size: 1.3rem; font-weight: 600; color: var(--char-80); margin-top: 4px; }
.fam-hero .face { width: 86px; margin-bottom: 12px; }
.fam-hero .kid-text { max-width: 34em; font-size: 1.15rem; }
.fam-hero .art { position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 300px; }
.fam-hero .art .facets { position: absolute; right: -10%; bottom: -6%; width: 118%; }
.fam-hero .portrait { position: relative; width: 86%; max-height: 400px; object-fit: contain; object-position: bottom; }

.sum-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.sum-card { border-top: 4px solid var(--c); }
.sum-card .q { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.5rem; color: var(--c-ink); margin-bottom: 6px; line-height: 1; }
.body-box { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 22px; align-items: center; }
.body-box img { width: 100%; max-height: 330px; object-fit: contain; }
.body-box h3 { color: var(--c-ink); }
.body-note { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.body-note .ico-wrap { width: 48px; height: 48px; border-radius: 50%; background: var(--char-5); display: grid; place-items: center; flex: none; }
.body-note b { font-family: var(--font-display); font-size: 1.25rem; text-transform: uppercase; display: block; line-height: 1.05; color: var(--char); }
.body-note span { font-size: .92rem; color: var(--char-80); }

/* staircase */
.stairs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; height: 260px; padding: 0 4px; }
.step {
  position: relative; border: 0; cursor: pointer; border-radius: 6px 6px 0 0;
  background: var(--c); color: #fff; font-weight: 800;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: center;
  padding-top: 8px; transition: transform .12s, box-shadow .12s;
}
.step:hover { transform: translateY(-4px); }
.step .n { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.step .w {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%) rotate(-28deg);
  transform-origin: left bottom; white-space: nowrap; color: var(--char); font-size: .92rem; font-weight: 700;
}
.step.sel { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--char); }
.step.sel .w { color: var(--c-ink); font-size: 1rem; text-decoration: underline; text-decoration-thickness: 3px; }
.step.off { opacity: .35; }
.step .got { position: absolute; bottom: 6px; color: #fff; }
.stairs-wrap { padding-top: 70px; }
.stairs-axis { display: flex; justify-content: space-between; font-weight: 700; font-size: .85rem; color: var(--char-80); margin-top: 8px; text-transform: uppercase; letter-spacing: .06em; }
.zones { display: grid; grid-template-columns: 3fr 1fr 3fr; gap: 6px; margin-top: 8px; font-size: .76rem; font-weight: 800; text-align: center; text-transform: uppercase; letter-spacing: .05em; }
.zones div { border-radius: 4px; padding: 4px; color: #fff; }
.z-calm { background: var(--zone-calm); }
.z-tip { background: var(--zone-tip); }
.z-hot { background: var(--zone-hot); }

.emo-detail { margin-top: 22px; scroll-margin-top: 90px; border-top: 6px solid var(--c); }
.emo-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.emo-head h2 { font-size: clamp(2.6rem, 7vw, 4rem); color: var(--c-ink); margin: 0; }
.lvl-badge { width: 54px; height: 54px; border-radius: 10px; background: var(--c); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; flex: none; }
.tagline { font-size: 1.2rem; font-weight: 600; color: var(--char-80); margin: 4px 0 12px; }
.zone-pill { font-weight: 800; font-size: .78rem; color: #fff; padding: 4px 12px; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; }
.zone-pill.calm { background: var(--zone-calm); }
.zone-pill.tip { background: var(--zone-tip); }
.zone-pill.hot { background: var(--zone-hot); }
.meter { height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--zone-calm) 0 42%, var(--zone-tip) 42% 58%, var(--zone-hot) 58%); position: relative; margin: 12px 0 6px; }
.meter i { position: absolute; top: -7px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 4px solid var(--char); transform: translateX(-50%); transition: left .4s cubic-bezier(.5, 1.6, .5, 1); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.fact { background: var(--char-5); border-radius: var(--radius-sm); padding: 16px; }
.fact h4 { font-size: .95rem; margin: 0 0 6px; color: var(--char); display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .05em; }
.fact h4 .ico { color: var(--c); }
.fact p { margin: 0; font-size: 1rem; }
.fact.try { background: var(--red-10); border-left: 4px solid var(--red); }
.fact.try h4, .fact.try h4 .ico { color: var(--red); }
.quote-block { font-style: italic; border-left: 4px solid var(--c); padding: 6px 14px; margin: 12px 0; }
.quote-block cite { display: block; font-style: normal; font-weight: 700; font-size: .9rem; color: var(--char-80); margin-top: 4px; }
.collect-btn.got { background: var(--green-ink); border-color: var(--green-ink); }

/* ---------- Dimension ---------- */
.dim-hero { margin-top: 22px; border-radius: 20px; padding: clamp(26px, 5vw, 56px); position: relative; overflow: hidden; background: var(--red); color: #fff; min-height: 360px; display: flex; align-items: flex-end; }
.dim-hero .burst { position: absolute; right: 2%; top: 50%; transform: translateY(-50%); width: 44%; pointer-events: none; z-index: 1; }
.dim-hero .facets { position: absolute; right: 2%; bottom: -22%; width: 34%; }
.dim-hero .txt { position: relative; max-width: min(600px, 54%); z-index: 1; }
.dim-hero h1 { color: #fff; font-size: clamp(3rem, 8vw, 5.6rem); line-height: .9; }
.dim-hero .kid-text { color: #fff; font-weight: 500; }
.dim-hero .eyebrow { color: var(--red-20); }
.fam-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.fam-card { text-decoration: none; display: grid; grid-template-columns: 1.1fr .9fr; overflow: hidden; padding: 0; transition: transform .15s; border-top: 6px solid var(--c); }
.fam-card:hover { transform: translateY(-3px); }
.fam-card .txt { padding: 22px; }
.fam-card h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 2.4rem; color: var(--c-ink); margin: 8px 0 2px; }
.fam-card .face { width: 60px; }
.fam-card .pic { position: relative; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.fam-card .pic .facets { position: absolute; bottom: -8%; right: -16%; width: 132%; }
.fam-card .pic img { position: relative; max-height: 260px; object-fit: contain; }
.fives { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.five { border: 1px solid var(--char-10); cursor: pointer; background: #fff; border-radius: var(--radius-sm); padding: 16px 8px; text-align: center; font-weight: 700; min-height: 116px; box-shadow: var(--shadow-sm); border-top: 4px solid var(--red); }
.five b { display: block; font-family: var(--font-display); text-transform: uppercase; font-size: 1.6rem; color: var(--red); }
.five span { font-size: .85rem; color: var(--char-80); display: block; margin-top: 4px; }
.five.shown { background: var(--red-10); }
.split-bar { display: grid; grid-template-columns: 1fr 1fr; border-radius: 8px; overflow: hidden; font-weight: 800; color: #fff; text-align: center; text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; }
.split-bar div { padding: 12px; }

/* ---------- Dial ---------- */
.dial-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.dial-svg { width: 100%; max-width: 440px; margin: 0 auto; display: block; }
.dial-svg .needle { transition: transform .45s cubic-bezier(.5, 1.5, .5, 1); transform-origin: 200px 200px; }
.fam-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.fam-pick button { border: 3px solid transparent; background: none; padding: 0; cursor: pointer; border-radius: 12px; width: 54px; height: 54px; }
.fam-pick button img { width: 100%; height: 100%; }
.fam-pick button[aria-pressed="true"] { border-color: var(--char); }
input[type=range].dial-range { width: 100%; accent-color: var(--c); height: 34px; }
.brain { display: flex; align-items: center; gap: 12px; font-weight: 700; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--green-20); color: var(--green-ink); transition: background .3s; }
.brain.off { background: var(--red-10); color: var(--red); }
.brain.tip { background: var(--orange-20); color: #9A3D1F; }
.dial-out h2 { color: var(--c-ink); }

/* ---------- Quiz & games ---------- */
.quiz { border-top: 6px solid var(--c); }
.quiz .qnum { font-weight: 700; color: var(--char-80); font-size: .9rem; }
.quiz .q { font-family: var(--font-body); font-size: 1.45rem; font-weight: 700; margin: 8px 0 16px; color: var(--char); }
.options { display: grid; gap: 10px; }
.opt {
  text-align: left; border: 1px solid var(--char-20); background: #fff; border-radius: var(--radius-sm);
  padding: 13px 16px; cursor: pointer; font-weight: 600; font-size: 1.05rem; border-left: 5px solid var(--char-20);
  transition: border-color .1s, background .1s;
}
.opt:hover:not([disabled]) { border-color: var(--red); background: var(--red-10); }
.opt.right { border-color: var(--green); border-left-color: var(--green-ink); background: var(--green-20); }
.opt.wrong { border-color: var(--salmon); border-left-color: var(--red); background: var(--salmon-20); }
.opt[disabled] { cursor: default; }
.feedback { margin-top: 12px; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.feedback > .ico { margin-top: 3px; }
.feedback.ok { background: var(--green-20); color: var(--green-ink); }
.feedback.no { background: var(--char-5); color: var(--char); border-left: 4px solid var(--orange); }
.quiz-done { text-align: center; }
.quiz-done .big-stars { display: flex; justify-content: center; gap: 6px; color: var(--red); margin-bottom: 8px; }
.quiz-done .big-stars .off { color: var(--char-20); }
.quiz-done .illo { margin: 0 auto 8px; }
.word-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.word-opt { border: 2px solid var(--char-20); background: #fff; border-radius: 999px; padding: 9px 20px; cursor: pointer; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .02em; color: var(--char); }
.word-opt:hover:not([disabled]) { border-color: var(--red); color: var(--red); }
.word-opt.right { border-color: var(--green-ink); background: var(--green-20); color: var(--green-ink); }
.word-opt.wrong { border-color: var(--red); background: var(--salmon-20); color: var(--red); }
.speech { position: relative; background: var(--red); color: #fff; border-radius: 16px; padding: 14px 22px; font-weight: 700; font-size: 1.2rem; display: inline-block; margin: 6px 0 16px; }
.speech::after { content: ''; position: absolute; left: 26px; bottom: -12px; border: 12px solid transparent; border-top-color: var(--red); border-bottom: 0; }
.ladder { display: flex; flex-direction: column-reverse; gap: 8px; max-width: 420px; }
.ladder-slot { min-height: 50px; border: 2px dashed var(--char-20); border-radius: var(--radius-sm); display: flex; align-items: center; padding: 0 14px; font-weight: 700; color: var(--char-60); }
.ladder-slot.filled { border-style: solid; border-color: var(--c); background: var(--c-soft); color: var(--c-ink); text-transform: uppercase; font-family: var(--font-display); font-size: 1.25rem; }
.game-score { font-weight: 700; color: var(--char-80); }

/* ---------- Collection ---------- */
.coll-fam { margin: 28px 0; }
.coll-fam h3 { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.7rem; color: var(--c-ink); }
.coll-fam h3 img { width: 40px; }
.coll-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.wcard {
  aspect-ratio: 3 / 4; border-radius: 12px; text-decoration: none;
  border: 2px dashed var(--char-20); background: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 6px; font-weight: 700; font-size: .88rem; color: var(--char-60);
  transition: transform .15s;
}
.wcard:hover { transform: translateY(-3px); }
.wcard .n { font-family: var(--font-display); font-size: 1.8rem; line-height: 1; }
.wcard.got { border: 0; color: #fff; background: var(--c); }
.wcard.got .ico { color: #fff; margin-top: 4px; }

/* ---------- Check-in ---------- */
.ask { border: 0; padding: 0; margin: 20px 0 0; }
.ask legend { font-weight: 700; font-size: 1.15rem; margin-bottom: 8px; color: var(--char); }
.ask-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-opts button { border: 1px solid var(--char-20); background: #fff; border-radius: 10px; cursor: pointer; padding: 8px 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; color: var(--char); }
.ask-opts button .ico { color: var(--char-60); }
.ask-opts button[aria-pressed="true"] { border-color: var(--red); background: var(--red); color: #fff; }
.ask-opts button[aria-pressed="true"] .ico { color: #fff; }
.hist { display: flex; gap: 6px; align-items: flex-end; overflow-x: auto; padding: 6px 2px; min-height: 110px; border-bottom: 1px solid var(--char-20); }
.hbar { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .7rem; font-weight: 700; color: var(--char-80); flex: none; }
.hbar i { display: block; width: 22px; border-radius: 4px 4px 0 0; }
.branch { display: inline-block; margin-top: 6px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--red); }

/* ---------- Misc ---------- */
.next-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 44px 0 0; }
.interlude { text-align: center; font-size: 1.45rem; font-weight: 600; line-height: 1.5; max-width: 760px; margin: 0 auto; color: var(--char); }
.interlude p:first-child::before { content: ''; display: block; width: 60px; height: 4px; background: var(--red); margin: 0 auto 18px; }
.interlude img { max-width: 300px; margin: 10px auto 0; }
.level-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.level-card { cursor: pointer; text-align: left; border: 1px solid var(--char-20); background: #fff; border-radius: var(--radius); padding: 16px; transition: transform .12s; border-top: 6px solid var(--char-20); }
.level-card:hover { transform: translateY(-3px); }
.level-card[aria-pressed="true"] { border-top-color: var(--red); box-shadow: var(--shadow); }
.level-card .lv { font-family: var(--font-display); font-size: 3rem; font-weight: 800; line-height: 1; color: var(--red); }
.level-card .kn { font-weight: 800; color: var(--char); text-transform: uppercase; letter-spacing: .05em; font-size: .9rem; }
.points { counter-reset: p; list-style: none; padding: 0; margin: 10px 0; }
.points li { counter-increment: p; position: relative; padding-left: 48px; margin-bottom: 12px; }
.points li::before { content: counter(p); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 8px; background: var(--red); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(140%);
  background: var(--char); color: #fff; padding: 12px 22px; border-radius: 10px; font-weight: 700;
  box-shadow: var(--shadow); z-index: 100; transition: transform .3s cubic-bezier(.5, 1.6, .5, 1), opacity .2s;
  opacity: 0; visibility: hidden;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 99; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .8; } }
footer.site { text-align: center; color: var(--char-80); font-size: .85rem; padding: 30px 16px 50px; background: #fff; border-top: 4px solid var(--red); }
footer.site a { color: var(--red); }
.print-sheet { text-align: center; }
.print-sheet h2 { color: var(--char); }
.fade-in { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wheel-wrap, .dial-box { grid-template-columns: 1fr; }
  .wheel-panel { position: static; }
  .sum-grid { grid-template-columns: 1fr; }
  .practice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .level-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); margin: 0; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 6px; border: 0; border-left: 4px solid transparent; }
  .nav a.active { border-left-color: var(--red); }
  .menu-btn { display: inline-flex; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px; cursor: pointer; color: var(--char); }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .hero, .story, .fam-hero, .grid-2, .grid-3, .fam-cards, .facts, .progress-strip, .body-box { grid-template-columns: 1fr; }
  .hero-art { min-height: 240px; }
  .story.flip > .story-art { order: 0; }
  .fam-hero .art { min-height: 240px; }
  .fam-hero .portrait { max-height: 280px; width: auto; }
  .fam-card { grid-template-columns: 1fr; }
  .fam-card .pic img { max-height: 200px; }
  .practice-grid { grid-template-columns: 1fr; }
  .coll-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fives { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stairs { height: 200px; gap: 4px; }
  .step .w { font-size: .78rem; }
  .brand-name small { display: none; }
  .level-select button { padding: 5px 7px; }
  .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .timeline::before { display: none; }
  .dim-hero .burst { width: 110%; opacity: .45; right: -30%; }
  .dim-hero .facets { width: 70%; opacity: .5; }
  .dim-hero .txt { max-width: 100%; }
  .wotd { grid-template-columns: 1fr; text-align: center; }
  .wotd .face { margin: 0 auto; }
  .level-tabs button { padding: 7px 10px; font-size: .85rem; }
}
@media (max-width: 560px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .brand-name { display: none; }
  .top-right { gap: 6px; }
  .stars-pill { padding: 5px 9px; }
}
@media (max-width: 460px) {
  .journey { grid-template-columns: 1fr; }
  .stars-pill .lbl { display: none; }
}

/* ---------- Print (printable wheels) ---------- */
@media print {
  body { background: #fff; }
  .topbar, footer.site, .no-print, .crumbs { display: none !important; }
  main { padding: 0; max-width: none; }
  .print-sheet { page-break-after: always; break-after: page; }
  .print-sheet:not(.to-print) { display: none; }
  .card { box-shadow: none; border: 0; }
}

/* Read-aloud is switched off for now (see ENABLED in assets/js/voice.js): hide every Listen / voice button. */
.no-voice [data-say], .no-voice [data-brave], .no-voice [data-say-mine], .no-voice .say-btn, .no-voice .cm-voice { display: none !important; }
