/* Pip's Learning Games — kids' world. Pastel, rounded, big tap targets.
   No external fonts or requests: everything here is self-contained. */
:root {
  --cream: #FFF9EE;
  --ink: #2B3A67;
  --ink-soft: #56628C;
  --sky: #8ED8F8;
  --sun: #FFD966;
  --mint: #A8E6CF;
  --coral: #FF9E9E;
  --lilac: #C3B1E1;
  --peach: #FFD3B6;
  --white: #FFFFFF;
  --good: #1F7A52;
  --radius: 24px;
  --lift: 0 6px 0 rgba(43, 58, 103, 0.14);
  --font: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --c: var(--sun);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
}
a { color: var(--ink); }
:focus-visible { outline: 4px solid #5B6CFF; outline-offset: 3px; border-radius: 12px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: clamp(32px, 6vw, 52px); }
h2 { font-size: clamp(24px, 4vw, 34px); }
h3 { font-size: 21px; }
p { margin: 0 0 14px; }
.k-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.k-skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 10px 16px; border-radius: 12px; z-index: 50; }
.k-skip:focus { left: 8px; }

/* ---------- header / footer ---------- */
.k-header { background: var(--white); border-bottom: 4px solid var(--sun); }
.k-header .k-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.k-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 22px; }
.k-logo svg { width: 46px; height: 46px; }
.k-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.k-nav a { text-decoration: none; font-weight: 700; font-size: 16px; padding: 10px 16px; border-radius: 100px; min-height: 44px; display: inline-flex; align-items: center; }
.k-nav a:hover { background: color-mix(in srgb, var(--sky) 35%, white); }
.k-nav a[aria-current="page"] { background: var(--sun); }
.k-footer { margin-top: 56px; background: var(--white); border-top: 4px solid var(--mint); padding: 32px 0 40px; font-size: 15.5px; color: var(--ink-soft); }
.k-footer .k-wrap { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; }
.k-footer p { margin: 0 0 6px; max-width: 560px; }
.k-footer a { color: var(--ink-soft); }

/* ---------- buttons ---------- */
.k-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 12px 28px; border-radius: 100px; border: 0;
  background: var(--c); color: var(--ink); font: inherit; font-weight: 800; font-size: 20px;
  text-decoration: none; cursor: pointer; box-shadow: var(--lift);
  transition: transform 0.12s ease;
}
.k-btn:hover { transform: translateY(-2px); }
.k-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(43, 58, 103, 0.14); }
.k-btn.alt { background: var(--white); border: 3px solid var(--ink); }
.k-btn.small { min-height: 48px; font-size: 16px; padding: 8px 18px; }
.k-btn[disabled] { opacity: 0.45; cursor: default; transform: none; }

/* ---------- home ---------- */
.k-hero { padding: 40px 0 24px; }
.k-hero .k-wrap { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.k-hero p.lead { font-size: 22px; max-width: 560px; }
.k-hero .pip-big svg { width: clamp(140px, 24vw, 230px); height: auto; }
.k-hero.year { background: color-mix(in srgb, var(--c) 40%, white); border-bottom: 6px solid var(--c); }
.k-badge { display: inline-block; background: var(--white); border-radius: 100px; padding: 4px 16px; font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.k-yeargrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; margin: 12px 0 8px; }
.k-yearcard {
  position: relative; display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  background: color-mix(in srgb, var(--c) 55%, white); border-radius: var(--radius); padding: 22px 22px 20px;
  box-shadow: var(--lift); border: 4px solid var(--c); min-height: 170px;
  transition: transform 0.15s ease;
}
a.k-yearcard:hover { transform: translateY(-4px) rotate(-1deg); }
.k-yearcard .emoji { font-size: 44px; line-height: 1; }
.k-yearcard .yname { font-size: 26px; font-weight: 800; }
.k-yearcard .yworld { font-weight: 700; }
.k-yearcard .yage { font-size: 15px; color: var(--ink-soft); }
.k-yearcard.soon { opacity: 0.6; box-shadow: none; filter: saturate(0.8); }
.k-tag { position: absolute; top: 14px; right: 14px; background: var(--white); border-radius: 100px; padding: 3px 12px; font-size: 13px; font-weight: 800; }
.k-section { padding: 28px 0 4px; }
.k-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.k-step { background: var(--white); border-radius: var(--radius); padding: 22px; box-shadow: var(--lift); }
.k-step .emoji { font-size: 38px; }
.k-strip { background: var(--mint); border-radius: var(--radius); padding: 22px 26px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; margin-top: 28px; }
.k-strip p { margin: 0; font-weight: 700; }

/* ---------- year page ---------- */
.k-doors { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }
.k-door { text-decoration: none; background: var(--white); border-radius: 100px; padding: 12px 22px; font-weight: 800; box-shadow: var(--lift); min-height: 48px; display: inline-flex; align-items: center; gap: 8px; }
.k-door:hover { background: color-mix(in srgb, var(--c) 35%, white); }
.k-gamegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.k-game {
  display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--lift); text-decoration: none;
  transition: transform 0.15s ease;
}
a.k-game:hover { transform: translateY(-4px); }
.k-game .art { background: color-mix(in srgb, var(--c) 55%, white); font-size: 54px; text-align: center; padding: 20px 10px; }
.k-game .info { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.k-game h3 { margin: 0; }
.k-game p { margin: 0; font-size: 16px; color: var(--ink-soft); }
.k-game .go { margin-top: auto; padding-top: 8px; font-weight: 800; }
.k-game.soon { opacity: 0.6; box-shadow: none; border: 3px dashed var(--c); }
.k-stickers { display: flex; flex-wrap: wrap; gap: 12px; }
.k-sticker {
  width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 40px; background: var(--white); border: 4px solid var(--c); box-shadow: var(--lift);
}
.k-sticker.locked { filter: grayscale(1); opacity: 0.35; font-size: 30px; box-shadow: none; border-style: dashed; }
details.k-grownups { background: var(--white); border-radius: var(--radius); padding: 6px 22px; box-shadow: var(--lift); }
details.k-grownups summary { cursor: pointer; font-weight: 800; font-size: 19px; padding: 14px 0; min-height: 48px; }
details.k-grownups ul { margin: 0 0 14px; padding-left: 22px; }
details.k-grownups li { margin-bottom: 6px; }

/* ---------- parents page ---------- */
.k-prose { max-width: 760px; }
.k-prose h2 { margin-top: 32px; }
.k-prose ul { padding-left: 22px; }
.k-prose li { margin-bottom: 8px; }
.k-card { background: var(--white); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--lift); margin: 16px 0; }

/* ---------- game shell ---------- */
.g-wrap { max-width: 860px; margin: 0 auto; padding: 20px 20px 0; }
.g-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.g-title h1 { font-size: clamp(26px, 5vw, 38px); margin: 0; }
.g-panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--lift); padding: 20px; border: 4px solid var(--c); min-height: 420px; }
.g-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.g-dots { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.g-setlabel { font-weight: 800; font-size: 15px; margin-right: 6px; background: color-mix(in srgb, var(--c) 40%, white); border-radius: 100px; padding: 2px 12px; }
.g-tally { font-weight: 700; color: var(--ink-soft); }
.g-dot { width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--c) 30%, white); border: 3px solid var(--c); }
.g-dot.done { background: var(--c); }
.g-dot.now { transform: scale(1.3); background: var(--white); }
.g-prompt { font-size: clamp(24px, 4.5vw, 34px); font-weight: 800; text-align: center; margin: 8px 0 14px; outline: none; }
.g-feedback { min-height: 40px; text-align: center; font-weight: 800; font-size: 22px; margin: 10px 0; }
.g-feedback.good { color: var(--good); }
.g-area { position: relative; }
.g-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 10px; }
.g-levels { display: grid; gap: 16px; margin: 20px 0; }
.g-level {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left;
  min-height: 84px; padding: 14px 24px; border-radius: var(--radius); border: 4px solid var(--c);
  background: color-mix(in srgb, var(--c) 30%, white); font: inherit; color: var(--ink); cursor: pointer; box-shadow: var(--lift);
}
.g-level:hover { transform: translateY(-2px); }
.g-level .ln { font-size: 26px; font-weight: 800; display: block; }
.g-level .ld { font-size: 16px; color: var(--ink-soft); }
.g-level .stars { font-size: 28px; white-space: nowrap; }
.g-result { text-align: center; padding: 10px 0; }
.g-result .big-stars { font-size: 64px; letter-spacing: 6px; }
.g-result .sticker-won { display: inline-flex; font-size: 72px; width: 120px; height: 120px; align-items: center; justify-content: center; border-radius: 50%; border: 5px solid var(--c); background: var(--white); box-shadow: var(--lift); margin: 8px 0; }
.g-confetti { position: fixed; top: -40px; font-size: 30px; pointer-events: none; z-index: 40; animation: fall 2.4s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(360deg); opacity: 0.9; } }
.g-pip { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.g-pip svg { width: 56px; height: 56px; flex-shrink: 0; }
.g-pip .say { background: color-mix(in srgb, var(--c) 30%, white); border-radius: 18px; padding: 8px 16px; font-weight: 700; }

/* ---------- bubble pop ---------- */
.bp-counter { text-align: center; font-size: 46px; font-weight: 800; margin: 0 0 6px; }
.bp-counter span { display: inline-block; min-width: 2.2ch; background: color-mix(in srgb, var(--sky) 40%, white); border-radius: 18px; padding: 0 14px; }
.bp-field { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; padding: 14px; min-height: 260px; background: linear-gradient(#E8F7FF, #CFEFFF); border-radius: 20px; }
.bp-bubble {
  --s: 74px; width: var(--s); height: var(--s); border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.95);
  background: radial-gradient(circle at 32% 30%, #fff 0 14%, color-mix(in srgb, var(--bc) 70%, white) 15% 60%, var(--bc) 100%);
  cursor: pointer; padding: 0; font: inherit; font-weight: 800; font-size: 26px; color: var(--ink);
  animation: bob 3.2s ease-in-out infinite; animation-delay: var(--d, 0s);
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.bp-bubble.small { --s: 56px; font-size: 20px; }
.bp-bubble.static { cursor: default; }
.bp-bubble.marked { outline: 4px solid var(--good); }
.bp-bubble.popped { transform: scale(1.6); opacity: 0; pointer-events: none; animation: none; }
.bp-bubble.locked { opacity: 0.45; cursor: default; }
.bp-bubble.glow { box-shadow: 0 0 0 6px #fff, 0 0 0 11px #FFB703; }
@keyframes bob { 50% { transform: translateY(-7px); } }
.bp-choices { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 18px; }
.bp-choice { min-width: 96px; min-height: 76px; font-size: 38px; }

/* ---------- bond bakery ---------- */
.bb-eq { text-align: center; font-size: 44px; font-weight: 800; margin: 0 0 10px; }
.bb-eq .q { display: inline-block; min-width: 1.6ch; line-height: 1.05; border-bottom: 5px dashed var(--ink); }
.bb-frame { display: grid; gap: 10px; margin: 0 auto; max-width: 440px; padding: 14px; background: #FFE9C9; border-radius: 22px; border: 4px solid #E7B77A; }
.bb-slot { aspect-ratio: 1; border-radius: 16px; font: inherit; font-size: clamp(28px, 7vw, 44px); padding: 0; border: 3px solid #E7B77A; background: #FFF6E6; display: flex; align-items: center; justify-content: center; }
.bb-slot.fixed { background: #fff; }
button.bb-slot { cursor: pointer; }
button.bb-slot.empty { border-style: dashed; }
button.bb-slot.added { background: #FFD3E1; border-color: #F27AA6; }
button.bb-slot.glow { box-shadow: 0 0 0 5px #fff, 0 0 0 9px #FFB703; }
.bb-added { text-align: center; font-weight: 800; margin-top: 10px; }
.shake { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------- shared choice buttons ---------- */
.c-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 16px; }
.c-btn {
  min-width: 112px; min-height: 112px; padding: 10px 14px; border-radius: 22px; border: 4px solid var(--c);
  background: color-mix(in srgb, var(--c) 25%, white); font: inherit; font-weight: 800; color: var(--ink);
  cursor: pointer; box-shadow: var(--lift); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.c-btn:hover { transform: translateY(-2px); }
.c-btn .em { font-size: 52px; line-height: 1.1; }
.c-btn .lb { font-size: 17px; }
.c-btn.right { background: #A8E6CF; border-color: var(--good); }
.c-btn.dim, .c-btn[disabled] { opacity: 0.35; cursor: default; transform: none; }

/* ---------- quick look ladybirds ---------- */
.ql-card { position: relative; width: min(100%, 300px); margin: 6px auto 0; aspect-ratio: 1; border-radius: 40% 40% 46% 46%; background: #FF8A8A; border: 6px solid #2B3A67; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 14%; box-shadow: var(--lift); }
.ql-card::before { content: ""; position: absolute; left: 50%; top: 4%; bottom: 4%; width: 4px; background: #2B3A67; opacity: 0.35; transform: translateX(-50%); }
.ql-dot { display: flex; align-items: center; justify-content: center; }
.ql-dot i { width: 78%; aspect-ratio: 1; border-radius: 50%; background: #2B3A67; display: block; }
.ql-cover { position: absolute; inset: 0; border-radius: inherit; background: #FFB3B3; border: 0; font: inherit; font-size: 26px; font-weight: 800; color: var(--ink); cursor: pointer; }
.ql-cover[disabled] { cursor: default; }

/* ---------- shape train ---------- */
.st-train { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: flex-end; margin: 6px 0 4px; }
.st-car { width: 74px; height: 74px; background: #fff; border: 4px solid #2B3A67; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; }
.st-car.engine { background: #FFD966; font-size: 40px; }
.st-car.glow { box-shadow: 0 0 0 4px #fff, 0 0 0 8px #FFB703; }
.st-car.gap { border-style: dashed; background: #FFF6E6; }
.st-opt { min-width: 100px; min-height: 100px; }

/* ---------- bigger or smaller ---------- */
.bs-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.bs-opt { min-height: 190px; border-radius: 22px; border: 4px solid var(--c); background: color-mix(in srgb, var(--c) 20%, white); padding: 12px; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; box-shadow: var(--lift); color: var(--ink); }
.bs-opt.right { background: #A8E6CF; border-color: var(--good); }
.bs-opt[disabled] { opacity: 0.4; cursor: default; }
.bs-things { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; align-items: center; font-size: 34px; line-height: 1.1; }
.bs-big { font-size: 96px; line-height: 1; }
.bs-small { font-size: 44px; line-height: 1; }
.bs-bars { display: grid; gap: 18px; margin-top: 12px; }
.bs-bar { display: flex; align-items: center; min-height: 64px; padding: 0 0 0 0; border: 0; background: none; cursor: pointer; width: 100%; font: inherit; text-align: left; }
.bs-bar .rod { height: 44px; border-radius: 22px; border: 4px solid #2B3A67; background: var(--rc); }
.bs-bar.right .rod { background: #A8E6CF; }
.bs-bar[disabled] { opacity: 0.4; cursor: default; }
.bs-count { font-size: 30px; font-weight: 800; }

/* ---------- sound safari ---------- */
.sf-letter { text-align: center; font-size: 96px; font-weight: 800; line-height: 1; margin: 4px 0 6px; }
.sf-letter span { display: inline-block; background: color-mix(in srgb, var(--c) 40%, white); border-radius: 28px; padding: 6px 34px; }

/* ---------- word builder ---------- */
.wb-pic { text-align: center; font-size: 110px; line-height: 1.1; }
.wb-slots, .wb-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 14px 0; }
.wb-slot, .wb-tile { width: 72px; height: 82px; border-radius: 18px; font: inherit; font-size: 44px; font-weight: 800; color: var(--ink); padding: 0; }
.wb-slot { border: 4px dashed var(--ink); background: #fff; }
.wb-slot.filled { border-style: solid; background: color-mix(in srgb, var(--c) 40%, white); cursor: pointer; }
.wb-tile { border: 4px solid var(--c); background: color-mix(in srgb, var(--c) 25%, white); cursor: pointer; box-shadow: var(--lift); }
.wb-tile.used { opacity: 0.25; cursor: default; box-shadow: none; }

/* ---------- year 1: number games ---------- */
.nh-pads { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; max-width: 520px; margin: 10px auto; }
.nh-pad { aspect-ratio: 1.2; border-radius: 50%; border: 4px solid #3E9E6B; background: #BDEBC9; font: inherit; font-size: 24px; font-weight: 800; color: var(--ink); cursor: pointer; padding: 0; min-height: 52px; }
.nh-pad.glow { box-shadow: 0 0 0 4px #fff, 0 0 0 8px #FFB703; }
.nh-pad.right { background: #FFD966; }
.nh-pad[disabled] { opacity: 0.4; cursor: default; }
.nh-frog { text-align: center; font-size: 60px; line-height: 1; }
.seq-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0; }
.seq-stone { min-width: 76px; height: 76px; padding: 0 10px; border-radius: 50%; border: 4px solid var(--ink); background: color-mix(in srgb, var(--c) 35%, white); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; }
.seq-stone.gap { border-style: dashed; background: #fff; }
.num-choice { min-width: 100px; min-height: 80px; font-size: 36px; }
.oa-sum { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin: 6px 0; }
.oa-sum .bs-things { max-width: 300px; }
.oa-sum .eaten { opacity: 0.25; filter: grayscale(1); }
.oa-sum .op { font-size: 40px; font-weight: 800; }
.to-stage { display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; margin: 10px 0; min-height: 140px; align-items: flex-end; }
.to-col { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 150px; }
.to-title { font-weight: 800; }
.to-blocks { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: flex-end; min-height: 110px; }
.to-ten { width: 18px; height: 104px; border-radius: 5px; border: 2px solid #2B3A67; background: repeating-linear-gradient(#8ED8F8 0 9.4px, #5AB6E0 9.4px 10.4px); }
.to-one { width: 18px; height: 18px; border-radius: 4px; border: 2px solid #2B3A67; background: #FFD966; }
.to-ctrl { display: flex; gap: 8px; }
.clock { display: block; margin: 6px auto; }
.opt-clock { min-width: 140px; min-height: 140px; padding: 8px; }
.ph-card { text-align: center; font-size: clamp(54px, 14vw, 88px); font-weight: 800; letter-spacing: 4px; background: color-mix(in srgb, var(--c) 40%, white); border-radius: 28px; padding: 14px 20px; margin: 8px auto; max-width: 420px; }
.ph-hint { text-align: center; font-size: 30px; font-weight: 800; min-height: 44px; letter-spacing: 3px; }
.ph-real { --c: #A8E6CF; }
.ph-alien { --c: #C3B1E1; }
.sb-slots, .sb-tiles { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 12px 0; }
.sb-slot, .sb-tile { min-width: 74px; height: 66px; padding: 0 16px; border-radius: 16px; font: inherit; font-size: 28px; font-weight: 800; color: var(--ink); }
.sb-slot { border: 4px dashed var(--ink); background: #fff; }
.sb-slot.filled { border-style: solid; background: color-mix(in srgb, var(--c) 40%, white); cursor: pointer; }
.sb-tile { border: 4px solid var(--c); background: color-mix(in srgb, var(--c) 25%, white); cursor: pointer; box-shadow: var(--lift); }
.sb-tile.used { opacity: 0.25; cursor: default; box-shadow: none; }
.sp-sentence { text-align: center; font-size: clamp(28px, 6vw, 40px); font-weight: 800; margin: 10px 0 4px; }
.sp-sentence .blank { display: inline-block; min-width: 3ch; border-bottom: 5px dashed var(--ink); }
.sp-sentence .blank.done { border-bottom-style: solid; color: var(--good); }
.sp-opt { font-size: 30px; min-width: 130px; min-height: 80px; }
.am-pic { text-align: center; font-size: 110px; line-height: 1.1; }
.am-name { text-align: center; font-size: 26px; font-weight: 800; }

/* ---------- year 2 ---------- */
.tm-eq { text-align: center; font-size: clamp(40px, 9vw, 64px); font-weight: 800; margin: 6px 0; }
.tm-chest { text-align: center; font-size: 70px; line-height: 1; }
.tm-steps { text-align: center; font-weight: 800; font-size: 22px; min-height: 34px; }
.tc-cannon { text-align: center; font-size: 64px; line-height: 1; }
.tc-array { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 8px 0; font-size: 22px; line-height: 1.1; }
.pz-wrap { display: flex; justify-content: center; margin: 6px 0; }
.pz-wrap svg { width: min(240px, 70vw); height: auto; overflow: visible; }
.pz-slice { cursor: pointer; }
.pz-slice:focus-visible { outline: none; stroke: #5B6CFF; stroke-width: 4; }
.frac-btn { min-width: 100px; min-height: 84px; font-size: 34px; }
.coin { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 3px solid #2B3A67; font-weight: 800; font-size: 17px; color: #2B3A67; box-shadow: inset 0 -4px 0 rgba(0,0,0,0.12); }
.coin.copper { background: #E9A27A; }
.coin.silver { background: #E3E9F0; }
.coin.gold { background: #F7D56E; }
.coin.s1 { width: 48px; height: 48px; } .coin.s2 { width: 56px; height: 56px; } .coin.s3 { width: 64px; height: 64px; font-size: 20px; }
.coin-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 10px 0; min-height: 70px; padding: 10px; background: #FFF4D6; border-radius: 18px; border: 3px dashed #E7B77A; }
button.coin { cursor: pointer; padding: 0; font-family: inherit; }
button.coin:active { transform: translateY(2px); }
.coin-total { text-align: center; font-size: 34px; font-weight: 800; }
.ch-chart { max-width: 560px; margin: 8px auto; display: grid; gap: 8px; }
.ch-row { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 10px; background: #fff; border: 3px solid color-mix(in srgb, var(--c) 60%, white); border-radius: 16px; padding: 6px 12px; min-height: 56px; }
.ch-label { font-weight: 800; font-size: 18px; white-space: nowrap; }
.ch-marks { font-size: 28px; line-height: 1.1; letter-spacing: 1px; word-break: break-all; }
.ch-count { font-weight: 800; font-size: 22px; background: #FFF1B0; border-radius: 10px; padding: 0 10px; }
.ch-key { text-align: center; font-weight: 700; color: var(--ink-soft); }
.tally5 { position: relative; display: inline-block; font-weight: 800; letter-spacing: 3px; margin-right: 10px; }
.tally5::after { content: ""; position: absolute; left: -2px; right: 2px; top: 52%; height: 3px; background: var(--ink); transform: rotate(-18deg); }
.ch-opt { min-width: 110px; }
.wc-sentence { text-align: center; font-size: clamp(26px, 5.5vw, 38px); font-weight: 800; line-height: 1.5; margin: 12px 0; }
.wc-sentence mark { background: #FFE08A; border-radius: 10px; padding: 0 10px; color: var(--ink); }
.wc-sub { font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.ap-text { text-align: center; font-size: clamp(26px, 5vw, 36px); font-weight: 800; margin: 10px 0; }
.ap-text .miss { color: #B8314F; }
.ap-opt { font-size: 30px; min-width: 150px; min-height: 80px; }

/* ---------- year 3 ---------- */
.cc-col { width: max-content; margin: 8px auto; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: clamp(38px, 9vw, 56px); font-weight: 800; line-height: 1.15; text-align: right; }
.cc-col .op { float: left; margin-right: 16px; }
.cc-col .rule { border-top: 5px solid var(--ink); margin-top: 4px; }
.cc-col .carry { color: #B8314F; font-size: 0.5em; letter-spacing: 0.2em; min-height: 1.1em; }
.fr { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.05; vertical-align: middle; margin: 0 4px; }
.fr .fn { border-bottom: 3px solid currentColor; padding: 0 6px 2px; }
.fr .fd { padding: 2px 6px 0; }
.frac-lg { font-size: 34px; font-weight: 800; }
.ff-bar { display: flex; max-width: 440px; margin: 8px auto; border: 4px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fff; }
.ff-bar i { flex: 1; min-height: 44px; border-right: 3px solid var(--ink); }
.ff-bar i:last-child { border-right: 0; }
.ff-bar i.on { background: #FF9E7A; }
.ff-sym { text-align: center; font-size: 34px; font-weight: 800; margin: 8px 0; }
.rm-num { font-family: Georgia, "Times New Roman", serif; letter-spacing: 3px; }
.cb-sentence { text-align: center; font-size: clamp(24px, 5vw, 34px); font-weight: 800; line-height: 1.5; margin: 14px 0; }
.cb-sentence .blank { display: inline-block; min-width: 4ch; border-bottom: 5px dashed var(--ink); }
.cb-sentence .blank.done { border-bottom-style: solid; color: var(--good); }
.sm-text { text-align: center; font-size: clamp(24px, 5vw, 34px); font-weight: 800; margin: 12px 0; }
.sm-opt { text-align: center; font-size: 24px; min-width: 0; width: 100%; max-width: 560px; min-height: 64px; line-height: 1.3; }
.mm-pair { display: flex; justify-content: center; align-items: center; gap: 22px; margin: 14px 0; flex-wrap: wrap; }
.mm-mag { display: inline-flex; border: 4px solid var(--ink); border-radius: 10px; overflow: hidden; font-weight: 800; font-size: 30px; color: #fff; }
.mm-mag span { width: 62px; height: 56px; display: flex; align-items: center; justify-content: center; }
.mm-mag .n { background: #E0556B; }
.mm-mag .s { background: #4C8DF6; }
.tt-digital { text-align: center; font-size: 56px; font-weight: 800; margin: 6px 0; letter-spacing: 2px; }
.yn-pic { text-align: center; font-size: 110px; line-height: 1.1; }

/* ---------- year 4 ---------- */
.g-timer { position: relative; height: 22px; border-radius: 100px; background: color-mix(in srgb, var(--c) 25%, white); border: 3px solid var(--ink); overflow: hidden; margin: 6px 0 10px; }
.g-timer-fill { position: absolute; inset: 0 auto 0 0; width: 100%; background: #FF9E7A; }
.g-timer-label { position: absolute; right: 10px; top: -1px; font-weight: 800; font-size: 15px; line-height: 18px; }
.kp-display { text-align: center; font-size: 60px; font-weight: 800; min-height: 78px; border-bottom: 5px solid var(--ink); max-width: 260px; margin: 6px auto 10px; letter-spacing: 4px; }
.kp-display.shake { animation: shake 0.35s; }
.kp-grid { display: grid; grid-template-columns: repeat(3, 84px); gap: 10px; justify-content: center; margin: 8px auto; }
.kp-key { height: 66px; border-radius: 18px; border: 4px solid var(--c); background: color-mix(in srgb, var(--c) 25%, white); font: inherit; font-size: 30px; font-weight: 800; color: var(--ink); cursor: pointer; box-shadow: var(--lift); }
.kp-key:active { transform: translateY(2px); }
.kp-key.go { background: #A8E6CF; border-color: var(--good); }
.kp-key[disabled] { opacity: 0.4; cursor: default; }
.pv-num { text-align: center; font-size: clamp(40px, 9vw, 64px); font-weight: 800; letter-spacing: 2px; margin: 6px 0; }
.pv-num mark { background: #FFE08A; border-radius: 10px; padding: 0 6px; color: var(--ink); }
.aa-grid { display: grid; margin: 8px auto; border: 4px solid var(--ink); background: #fff; width: max-content; max-width: 100%; }
.aa-cell { width: 34px; height: 34px; border: 1px solid #C9D3E8; }
.aa-cell.on { background: #A8E6CF; border-color: #6FC4A4; }
.aa-cell.off { background: transparent; border-color: transparent; }
.aa-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 6px 0; }
.aa-label { font-weight: 800; font-size: 20px; }
.aa-side { display: flex; align-items: center; gap: 8px; }
.cs-svg { display: block; width: min(440px, 100%); height: auto; margin: 6px auto; }
.cs-pt { cursor: pointer; fill: transparent; }
.cs-pt:hover, .cs-pt:focus-visible { fill: rgba(91, 108, 255, 0.35); outline: none; }
.th-wrap { display: flex; justify-content: center; margin: 6px 0; }
.th-wrap svg { height: 300px; width: auto; }
.mx-pic { text-align: center; font-size: 100px; line-height: 1.1; }
.cr-svg { width: 150px; height: 120px; }
.cr-opt { min-width: 170px; min-height: 140px; padding: 6px; }
.ps-row { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 56px; line-height: 1; margin: 6px 0; }

/* ---------- Year 5 ---------- */
.mx { font-weight: 800; margin-right: 6px; font-size: 1.05em; vertical-align: middle; }
.pd-grid { display: grid; gap: 3px; justify-content: center; margin: 6px auto; }
.pd-grid i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); box-sizing: border-box; }
.as-pic { display: flex; justify-content: center; margin: 6px 0; }
.as-svg { width: 230px; height: 230px; }
.as-opt { min-width: 130px; min-height: 100px; }
.as-opt .em { font-size: 40px; }
@media (max-width: 640px) { .as-svg { width: 200px; height: 200px; } .as-opt { min-width: 120px; } }

/* ---------- Year 6 ---------- */
.sd-svg { width: 260px; height: 180px; }
.dd-pie { width: 210px; height: 210px; }
.dd-line { width: 320px; max-width: 100%; height: auto; }
.sym-svg { width: 220px; height: 110px; }
.rr-passage { background: var(--white); border: 3px solid var(--c); border-radius: 18px; padding: 14px 18px; margin: 8px auto 4px; max-width: 640px; text-align: left; }
.rr-passage p { margin: 0; font-size: 18px; line-height: 1.55; }
.rr-title { margin: 0 0 6px; font-size: 20px; }
.ns-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0; }
.ns-item { width: 88px; height: 88px; background: var(--white); border: 3px solid var(--ink); border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.ns-item.ns-q { font-size: 44px; font-weight: 800; background: color-mix(in srgb, var(--c) 25%, white); }
.ns-cell { width: 80px; height: 80px; }
.ns-opt { min-width: 100px; min-height: 100px; padding: 6px; }
@media (max-width: 640px) { .sd-svg { width: 220px; height: 150px; } .ns-item { width: 70px; height: 70px; } .ns-cell { width: 62px; height: 62px; } .ns-opt { min-width: 86px; min-height: 86px; } .rr-passage p { font-size: 16px; } }

@media (max-width: 640px) {
  .bs-big { font-size: 72px; }
  .kp-grid { grid-template-columns: repeat(3, 72px); }
  .kp-key { height: 58px; }
  .aa-cell { width: 28px; height: 28px; }
  .mm-mag span { width: 48px; height: 48px; font-size: 24px; }
  .ch-row { grid-template-columns: 86px 1fr auto; }
  .ch-label { font-size: 15px; }
  .nh-pad { font-size: 19px; aspect-ratio: auto; min-height: 48px; min-width: 0; }
  .sb-slot, .sb-tile { font-size: 22px; min-width: 60px; height: 58px; padding: 0 12px; }
  .wb-slot, .wb-tile { width: 60px; height: 70px; font-size: 38px; }
  .k-hero .k-wrap { grid-template-columns: 1fr; text-align: center; }
  .k-hero .pip-big { order: -1; }
  .k-hero p.lead { margin-left: auto; margin-right: auto; }
  .g-panel { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- home page, breadcrumbs, game finder ---------- */
.k-twodoors { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.k-bigdoor { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-decoration: none; border-radius: var(--radius); padding: 28px; box-shadow: var(--lift); border: 4px solid var(--sky); background: color-mix(in srgb, var(--sky) 40%, white); transition: transform 0.15s ease; }
.k-bigdoor.exam { border-color: var(--lilac); background: color-mix(in srgb, var(--lilac) 40%, white); }
.k-bigdoor:hover { transform: translateY(-4px); }
.k-bigdoor .emoji { font-size: 52px; line-height: 1; }
.k-bigdoor h2 { margin: 6px 0 4px; }
.k-bigdoor p { margin: 0 0 14px; }
.k-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 12px; padding: 0; font-size: 15.5px; font-weight: 700; }
.k-crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--ink-soft); }
.k-crumbs a { color: var(--ink-soft); }
.k-crumbs [aria-current] { color: var(--ink); }
.g-wrap .k-crumbs { margin-top: 4px; }
.k-find input[type="search"] { width: 100%; max-width: 480px; font: inherit; font-size: 20px; padding: 12px 18px; border-radius: 100px; border: 4px solid var(--sky); background: var(--white); color: var(--ink); min-height: 52px; }
.k-find-label { display: block; font-weight: 700; margin-bottom: 8px; }
.k-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 6px; }
.k-chip { font: inherit; font-weight: 800; font-size: 16px; border: 3px solid var(--sky); background: var(--white); color: var(--ink); border-radius: 100px; padding: 8px 18px; min-height: 44px; cursor: pointer; }
.k-chip.on { background: var(--sun); border-color: var(--sun); }
.k-find-count { margin: 10px 0 12px; font-weight: 700; color: var(--ink-soft); min-height: 1.4em; }

/* ---------- landing pages, related games ---------- */
.k-yearnav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 28px 0 0; }
.k-seeall { margin: 10px 0 0; font-weight: 800; }
.k-about { margin-top: 28px; background: var(--white); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--lift); }
.k-about h2 { font-size: 24px; }
.k-about p { margin: 0 0 10px; }
.g-wrap .k-section { padding-top: 24px; }

/* ---------- 11+ Exam Zone ---------- */
.ex-subnav { background: color-mix(in srgb, var(--lilac) 45%, white); border-bottom: 3px solid var(--lilac); }
.ex-subnav .k-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding-top: 6px; padding-bottom: 6px; }
.ex-zone { font-weight: 800; text-decoration: none; padding: 8px 4px; }
.ex-subnav nav { display: flex; flex-wrap: wrap; gap: 4px; }
.ex-subnav nav a { text-decoration: none; font-weight: 700; font-size: 16px; padding: 8px 14px; border-radius: 100px; min-height: 44px; display: inline-flex; align-items: center; }
.ex-subnav nav a:hover { background: rgba(255, 255, 255, 0.7); }
.ex-subnav nav a[aria-current="page"] { background: var(--white); }
.ex-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; align-items: start; }
.ex-note { font-weight: 700; color: var(--ink-soft); }
.ex-demo { background: var(--white); border-radius: var(--radius); border: 4px solid var(--c); box-shadow: var(--lift); padding: 20px 22px; }
.ex-demo .k-badge { background: color-mix(in srgb, var(--c) 40%, white); margin-bottom: 4px; }
.ex-q { font-size: 20px; font-weight: 700; margin: 8px 0 14px; }
.ex-opts { display: flex; flex-direction: column; gap: 10px; }
.ex-opts .c-btn { min-height: 56px; font-size: 20px; text-align: left; padding: 10px 18px; }
.ex-why { min-height: 1.6em; margin: 12px 0 0; font-weight: 700; color: var(--good); }
.ex-mock { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; }
.ex-mock > div { flex: 1 1 380px; }
.ex-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.ex-topic { display: block; text-decoration: none; background: var(--white); border-radius: 20px; border: 3px solid color-mix(in srgb, var(--c) 70%, white); padding: 16px 18px; box-shadow: var(--lift); transition: transform 0.15s ease; }
.ex-topic:hover { transform: translateY(-3px); border-color: var(--c); }
.ex-topic h3 { font-size: 19px; margin: 0 0 6px; }
.ex-topic p { margin: 0; font-size: 15.5px; color: var(--ink-soft); line-height: 1.45; }
h2 small { font-size: 0.6em; color: var(--ink-soft); font-weight: 700; }

/* ---- Exam Zone: practice questions, mock exam, info pages ---- */
.xtopic { scroll-margin-top: 16px; }
.xdesc { font-size: 18px; color: var(--ink-soft); font-weight: 700; margin: 0 0 12px; }
.xhow { background: color-mix(in srgb, var(--c, var(--lilac)) 22%, white); }
.xhow h3, .xstep h3 { margin: 0 0 6px; }
.xintro p:last-child, .xhow p:last-child { margin-bottom: 0; }
.xq { background: var(--white); border-radius: var(--radius); border: 3px solid color-mix(in srgb, var(--c, var(--lilac)) 70%, white); box-shadow: var(--lift); padding: 18px 20px; margin: 16px 0; }
.xnum { font-weight: 800; font-size: 15px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.xtext { font-size: 19px; font-weight: 700; margin: 0 0 14px; white-space: pre-line; overflow-wrap: anywhere; }
.xopts { display: grid; gap: 10px; margin-bottom: 14px; }
.xopt { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; min-height: 52px; padding: 8px 14px; font: inherit; font-size: 18px; font-weight: 700; color: var(--ink); background: var(--white); border: 3px solid color-mix(in srgb, var(--ink) 18%, white); border-radius: 18px; cursor: pointer; overflow-wrap: anywhere; }
.xopt:hover { border-color: var(--ink); }
.xbadge { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; background: color-mix(in srgb, var(--c, var(--lilac)) 55%, white); }
.xopt.correct { background: #A8E6CF; border-color: var(--good); }
.xopt.wrong { background: #FFD6D6; border-color: #B3402F; }
.xexp { border-top: 3px dotted color-mix(in srgb, var(--ink) 18%, white); padding-top: 10px; }
.xexp summary { cursor: pointer; font-weight: 800; min-height: 44px; display: flex; align-items: center; }
.xexp p { margin: 6px 0; }
.xans { color: var(--good); }
.xstep { display: flex; gap: 18px; align-items: flex-start; }
.xstep p { margin: 0; }
.xn { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--lilac); font-size: 26px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ex-timer { position: sticky; top: 8px; z-index: 20; width: fit-content; margin: 12px 0 0 auto; background: var(--white); border: 3px solid var(--lilac); border-radius: 100px; padding: 4px 8px 4px 16px; font-weight: 800; box-shadow: var(--lift); display: flex; align-items: center; gap: 8px; }
.ex-timer button { font: inherit; font-weight: 800; min-height: 40px; padding: 0 14px; border-radius: 100px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); cursor: pointer; }
.ex-timer.off span { visibility: hidden; }
.xlegal h2 { margin-top: 0; }
.xlegal ul { padding-left: 22px; }
.xlegal p:last-child, .xlegal ul:last-child { margin-bottom: 0; }
.ex-ad { margin: 28px 0; text-align: center; min-height: 120px; }
.ex-ad-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 4px; }
