/* ==========================================================================
   Place Value Peaks — The Number Climb
   Standalone companion site for Maths Explorers Club Unit 8 (Number).
   Design language: dark teal chrome, light-blue accent, cream sections,
   rounded cards, soft shadows, pill tags (all code written for this site).
   ========================================================================== */
:root {
  --teal-darkest: #123c3c; --teal-dark: #1a4f4f; --teal-mid: #2b6f6f;
  --accent: #7dc1d1; --accent-soft: #a9d6e1; --accent-tint: #eaf5f8;
  --ink: #17262e; --ink-soft: #4c636d; --line: #dde9ec;
  --paper: #fff; --cream: #f7f4ee; --radius: 18px;
  --shadow: 0 10px 30px rgba(18, 60, 60, 0.10);
  --shadow-hover: 0 18px 44px rgba(18, 60, 60, 0.18);
  --good-bg: #d6efdd; --good-line: #4d9c66; --good-ink: #1e5c33;
  --bad-bg: #f8dcdc; --bad-line: #c66; --bad-ink: #8a2f2f;
  --gold: #b8860b;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--ink); background: var(--paper); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--teal-mid); text-decoration: none; }
a:hover { color: var(--teal-dark); }
.container { width: min(1180px, 92%); margin: 0 auto; }

/* skip link + header */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--teal-darkest); padding: .6rem 1rem; border-radius: 0 0 10px 0; z-index: 200; }
.skip-link:focus { left: 0; }

/* site header */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--teal-darkest); border-bottom: 1px solid rgba(125, 193, 209, 0.18); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 700; font-size: 1.1rem; }
.brand:hover { color: var(--accent-soft); }
.brand-logo { height: 34px; width: 34px; }
.brand .brand-name { color: var(--accent); }
.brand:hover .brand-name { color: var(--accent-soft); }
.nav-links { display: flex; align-items: center; gap: .3rem; list-style: none; flex-wrap: wrap; justify-content: flex-end; row-gap: .3rem; }
.nav-links a { color: #dcebee; font-size: .92rem; padding: .45rem .6rem; border-radius: 999px; transition: background .2s, color .2s; white-space: nowrap; }
.nav-links a:hover { background: rgba(125, 193, 209, 0.15); color: #fff; }
.nav-links a.active { background: var(--accent); color: var(--teal-darkest); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(125,193,209,.4); color: #fff; border-radius: 10px; padding: .4rem .7rem; font-size: 1.1rem; cursor: pointer; }
@media (max-width: 900px) {
  .nav { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--teal-darkest); flex-direction: column; align-items: stretch; padding: .8rem 4%; border-bottom: 1px solid rgba(125,193,209,.25); }
  .nav-links.open { display: flex; }
  .nav-links a.back-home { margin-right: 0; margin-bottom: .3rem; }
}

/* back link to parent site */
.nav-links a.back-home { border: 1px solid rgba(125,193,209,.4); color: var(--accent-soft); margin-right: .4rem; }
.nav-links a.back-home:hover { background: rgba(125,193,209,.15); color: #fff; }

/* language switcher */
.nav-links a.lang { border: 1px solid rgba(125,193,209,.4); color: var(--accent-soft); padding: .45rem .7rem; }
.nav-links a.lang:hover { background: rgba(125,193,209,.15); color: #fff; }

/* hero */
.hero { position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1100px 500px at 50% -10%, rgba(125,193,209,.22), transparent 60%),
              linear-gradient(160deg, var(--teal-darkest) 0%, var(--teal-dark) 55%, #22605f 100%);
  text-align: center; padding: 5rem 0 4.2rem; }
#hero-particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; }
.pill { display: inline-block; padding: .4rem 1.1rem; border-radius: 999px; background: rgba(125,193,209,.16); border: 1px solid rgba(125,193,209,.45); color: var(--accent-soft); font-size: .9rem; letter-spacing: .4px; margin-bottom: 1.4rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.15; font-weight: 800; margin-bottom: 1rem; }
.hero h1 .hl { color: var(--accent); }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: #cfe4e8; max-width: 720px; margin: 0 auto 1rem; }
.hero p.sub { color: #a9c8cd; max-width: 640px; margin: 0 auto 2.2rem; font-size: .98rem; }
.btn-row { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.7rem; border-radius: 999px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s; border: none; font-family: inherit; }
.btn-primary { background: var(--accent); color: var(--teal-darkest); box-shadow: 0 8px 22px rgba(125,193,209,.35); }
.btn-primary:hover { background: var(--accent-soft); transform: translateY(-2px); color: var(--teal-darkest); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); color: #fff; }
.hero-figure { position: relative; z-index: 2; margin: 3rem auto 0; width: min(860px, 92%); border-radius: 24px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.35); border: 1px solid rgba(125,193,209,.25); background: rgba(255,255,255,.04); padding: 1.5rem; }
.hero-figure.hero-img { padding: 0; }
.hero-figure.hero-img img { display: block; width: 100%; height: auto; }

/* sections */
.section { padding: 4.5rem 0; }
.section.alt { background: var(--cream); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 3rem; }
.section-label { display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--teal-mid); background: var(--accent-tint); border: 1px solid var(--line); padding: .35rem 1rem; border-radius: 999px; margin-bottom: 1rem; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; margin-bottom: .8rem; }
.section-head p { color: var(--ink-soft); }

/* game cards */
.games-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.games-grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .games-grid, .games-grid.three { grid-template-columns: 1fr; } }
.game-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s, box-shadow .25s; }
.game-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.game-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--accent-tint); display: grid; place-items: center; }
.game-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-body { padding: 1.6rem 1.7rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.game-body h3 { font-size: 1.35rem; font-weight: 800; margin-bottom: .5rem; }
.game-body p { color: var(--ink-soft); font-size: .96rem; margin-bottom: 1.1rem; }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.3rem; }
.tag { font-size: .78rem; font-weight: 600; color: var(--teal-mid); background: var(--accent-tint); border: 1px solid var(--line); padding: .25rem .7rem; border-radius: 999px; }
.game-actions { margin-top: auto; display: flex; gap: .7rem; flex-wrap: wrap; }
.btn-play { background: var(--accent); color: var(--teal-darkest); padding: .65rem 1.4rem; font-size: .95rem; }
.btn-play:hover { background: var(--accent-soft); color: var(--teal-darkest); transform: translateY(-2px); }
.btn-learn { background: transparent; color: var(--teal-mid); border: 1px solid var(--line); padding: .65rem 1.2rem; font-size: .95rem; }
.btn-learn:hover { background: var(--accent-tint); color: var(--teal-dark); }

/* why grid + prose */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; margin-top: 1rem; }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr; } }
.why-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.6rem; box-shadow: var(--shadow); text-align: center; }
a.link-card { display: block; color: inherit; transition: transform .2s, box-shadow .25s; }
a.link-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); color: inherit; }
a.link-card h3 { color: var(--teal-dark); }
.why-icon { width: 54px; height: 54px; margin: 0 auto 1rem; border-radius: 16px; background: var(--accent-tint); border: 1px solid var(--line); display: grid; place-items: center; font-size: 1.5rem; }
.why-card h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: .5rem; }
.why-card p { color: var(--ink-soft); font-size: .92rem; }
.prose { max-width: 820px; margin: 2.5rem auto 0; color: var(--ink-soft); }
.prose h3 { color: var(--ink); font-size: 1.25rem; margin: 1.6rem 0 .6rem; }
.prose p { margin-bottom: 1rem; }
.prose ul { margin: 0 0 1rem 1.2rem; }
.prose li { margin-bottom: .4rem; }

/* learn page */
.chapter { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; margin-bottom: 2rem; }
.chapter h3 { font-size: 1.35rem; font-weight: 800; margin-bottom: .4rem; }
.chapter p { color: var(--ink-soft); max-width: 760px; margin-bottom: .7rem; }
.key-idea { display: inline-block; background: var(--accent-tint); border: 1px solid var(--line); border-radius: 14px; padding: .7rem 1.2rem; font-weight: 700; color: var(--teal-dark); margin: 1rem 0; font-size: 1.05rem; }
.chapter-img { display: block; width: 100%; height: auto; border-radius: 14px; margin: .8rem 0 .2rem; }
.hundred { display: grid; grid-template-columns: repeat(10, 1fr); gap: .25rem; max-width: 420px; margin: 1.2rem 0; }
.hundred span { text-align: center; font-size: .8rem; font-weight: 700; padding: .3rem 0; border-radius: 8px; background: var(--cream); border: 1px solid var(--line); color: var(--ink-soft); }
.hundred span.on { background: var(--accent); color: var(--teal-darkest); border-color: var(--teal-mid); }
.mini-btn { font: inherit; font-weight: 700; background: var(--accent-tint); color: var(--teal-dark); border: 1px solid var(--line); border-radius: 999px; padding: .35rem 1rem; cursor: pointer; margin: .2rem .3rem .2rem 0; }
.mini-btn:hover, .mini-btn.on { background: var(--accent); color: var(--teal-darkest); }
.wordpower { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .95rem; }
.wordpower th, .wordpower td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.wordpower th { color: var(--teal-dark); background: var(--accent-tint); }
.wordpower td:first-child { font-weight: 700; white-space: nowrap; color: var(--teal-dark); }
.activity { background: var(--accent-tint); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; margin: 1rem 0; }
.activity h4 { margin-bottom: .3rem; }
.activity p, .activity li { font-size: .95rem; color: var(--ink-soft); }
.activity ul { margin: .4rem 0 0 1.2rem; }
.remember { background: var(--teal-darkest); color: #fff; border-radius: var(--radius); padding: 1.6rem 1.8rem; margin: 2rem 0; font-weight: 600; }
.remember strong { color: var(--accent-soft); }

/* game pages */
.game-hero { color: #fff; background: radial-gradient(900px 400px at 50% -10%, rgba(125,193,209,.22), transparent 60%), linear-gradient(160deg, var(--teal-darkest), var(--teal-dark)); padding: 3.2rem 0 2.6rem; text-align: center; }
.game-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin-bottom: .5rem; }
.game-hero p { color: #cfe4e8; max-width: 620px; margin: 0 auto; }
.game-wrap { padding-bottom: 4.5rem; }
.game-shell { position: relative; max-width: 900px; margin: -1.6rem auto 0; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-hover); padding: 1.8rem; }
.hud { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.hud .stat { font-weight: 700; color: var(--teal-dark); background: var(--accent-tint); border: 1px solid var(--line); border-radius: 999px; padding: .35rem 1rem; font-size: .95rem; }
.stage-box { display: grid; place-items: center; padding: 1.2rem; background: var(--cream); border: 1px solid var(--line); border-radius: 16px; min-height: 200px; text-align: center; }
.stage-box .sentence { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 800; letter-spacing: 1px; }
.necklace { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 1rem; }
.bead { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; font-size: .7rem; font-weight: 700; color: var(--ink-soft); }
.bead.red { background: #e2554f; border-color: #b03a35; color: #fff; }
.bead.blue { background: #4f7de2; border-color: #3554b0; color: #fff; }
.bead.target { outline: 3px dashed var(--gold); outline-offset: 2px; }
.prompt { font-size: 1.15rem; font-weight: 700; color: var(--teal-dark); margin-bottom: .4rem; }
.feedback { min-height: 1.6rem; margin-top: .9rem; font-weight: 600; color: var(--ink-soft); }
.feedback.good { color: var(--good-ink); }
.feedback.bad { color: var(--bad-ink); }
.options-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin-top: 1.4rem; }
.option-btn { font: inherit; font-size: 1.25rem; font-weight: 800; color: var(--teal-dark); background: var(--accent-tint); border: 2px solid var(--line); border-radius: 16px; padding: 1rem; cursor: pointer; transition: transform .12s, background .15s, border-color .15s; }
.option-btn:hover { border-color: var(--teal-mid); transform: translateY(-2px); }
.option-btn.good { background: var(--good-bg); border-color: var(--good-line); color: var(--good-ink); }
.option-btn.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-ink); }
.option-btn:disabled { cursor: default; transform: none; }
.tf-row { display: flex; gap: 1rem; justify-content: center; margin-top: 1.4rem; }
.tf-btn { font: inherit; font-size: 1.3rem; font-weight: 800; padding: .9rem 2.6rem; border-radius: 999px; border: 2px solid var(--line); background: var(--accent-tint); color: var(--teal-dark); cursor: pointer; transition: transform .12s, background .15s; }
.tf-btn:hover { transform: translateY(-2px); border-color: var(--teal-mid); }
.tf-btn.good { background: var(--good-bg); border-color: var(--good-line); color: var(--good-ink); }
.tf-btn.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-ink); }
.scale-stage svg { max-width: 380px; width: 100%; }
.beam { transform-origin: 190px 90px; transition: transform .5s ease; }
.beam.tip-left { transform: rotate(-7deg); }
.beam.tip-right { transform: rotate(7deg); }
.overlay { position: absolute; inset: 0; background: rgba(247, 244, 238, .96); border-radius: 24px; place-items: center; text-align: center; padding: 2rem; z-index: 40; display: none; }
.overlay:not([hidden]) { display: grid; }
.overlay h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: .4rem; }
.overlay .stars { font-size: 2rem; margin: .6rem 0; letter-spacing: .3rem; }
.overlay p { color: var(--ink-soft); margin-bottom: 1.2rem; }
.grownups { margin-top: 2.2rem; background: var(--cream); border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem 1.4rem; }
.grownups h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.grownups p, .grownups li { font-size: .92rem; color: var(--ink-soft); }

.reflist { list-style: none; margin: 0 0 .6rem; }
.reflist li { padding: .8rem 0; border-bottom: 1px dashed var(--line); font-size: .95rem; color: var(--ink-soft); }
.reflist li:last-child { border-bottom: none; }
.reflist a { word-break: break-all; font-weight: 600; }
.reflist strong { color: var(--ink); }

/* footer */
.site-footer { background: var(--teal-darkest); color: #cfe4e8; padding: 3rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--accent); margin-bottom: .6rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .35rem; }
.footer-links a { color: #dcebee; }
.footer-links a:hover { color: #fff; }
.footer-bottom { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(125,193,209,.2); font-size: .88rem; color: #a9c8cd; }
.footer-note { margin-top: .8rem; font-size: .8rem; color: #8fb4ba; max-width: 720px; }

/* ==========================================================================
   Place Value Peaks additions
   ========================================================================== */
:root { --sun: #f0a04b; --sun-deep: #8f4c0e; --sun-tint: #fdf0e1; }
.hero h1 .hl { color: var(--sun); }
.brand .brand-name { color: var(--sun); }
.pill.sun { background: rgba(240,160,75,.14); border-color: rgba(240,160,75,.5); color: #f6c58f; }

/* place-value chart (Digit Slide + Learn) */
.pv-chart { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: .4rem; width: 100%; max-width: 560px; margin: 0 auto; }
.pv-chart .pv-head { font-size: .78rem; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--teal-mid); text-align: center; padding: .3rem 0; background: var(--accent-tint); border: 1px solid var(--line); border-radius: 10px; }
.pv-chart .pv-head.dec { background: var(--sun-tint); color: var(--sun-deep); }
.pv-chart .pv-cell { height: 64px; display: grid; place-items: center; background: #fff; border: 2px dashed var(--line); border-radius: 12px; font-size: 2rem; font-weight: 800; color: var(--ink); position: relative; }
.pv-chart .pv-cell.filled { border-style: solid; border-color: var(--teal-mid); background: var(--accent-tint); }
.pv-chart .pv-cell.zero { color: var(--ink-soft); }
.pv-chart .pv-cell.point::after { content: "."; position: absolute; right: -.42rem; bottom: .2rem; font-size: 2.2rem; color: var(--sun-deep); line-height: 1; }
.pv-tile { display: inline-block; animation: pvPop .35s ease; }
@keyframes pvPop { from { transform: translateX(var(--from, 0)); opacity: .3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pv-tile { animation: none; } }
.slide-row { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 1.2rem; }
.slide-btn { font: inherit; font-weight: 800; font-size: 1.05rem; padding: .75rem 1.3rem; border-radius: 999px; border: 2px solid var(--line); background: var(--accent-tint); color: var(--teal-dark); cursor: pointer; }
.slide-btn:hover { border-color: var(--teal-mid); }
.slide-btn.lock { background: var(--sun); border-color: var(--sun-deep); color: #2a1604; }
.slide-btn:disabled { opacity: .5; cursor: default; }
.slide-count { font-weight: 700; color: var(--ink-soft); margin-top: .6rem; }
.step-note { font-size: .98rem; color: var(--ink-soft); margin: .2rem 0 .8rem; }

/* hundredths grid */
.hgrid-wrap { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center; justify-content: center; }
.hgrid { display: grid; grid-template-columns: repeat(10, 1fr); grid-auto-flow: column; grid-template-rows: repeat(10, 1fr); gap: 3px; width: min(320px, 100%); aspect-ratio: 1; padding: 6px; background: var(--teal-darkest); border-radius: 14px; touch-action: manipulation; }
.hgrid button { border: none; border-radius: 3px; background: #e9f1f2; cursor: pointer; padding: 0; min-width: 0; }
.hgrid button.on { background: var(--sun); }
.hgrid button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.readout { min-width: 220px; text-align: left; }
.readout .big { font-size: 2.6rem; font-weight: 800; color: var(--teal-dark); line-height: 1.1; }
.readout .words { color: var(--ink-soft); font-weight: 600; }
.grid-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }

/* odd or even */
.big-number { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 800; letter-spacing: 2px; color: var(--ink); font-variant-numeric: tabular-nums; }
.big-number .tail { color: var(--sun-deep); text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; }
.pairs { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .8rem; min-height: 2rem; }
.pair { display: inline-flex; flex-direction: column; gap: 3px; }
.pair i { width: 18px; height: 18px; border-radius: 50%; background: var(--teal-mid); display: block; }
.pair.solo i { background: var(--sun); }

/* strategy trail */
.phase { font-size: .8rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--sun-deep); margin-bottom: .3rem; }
.options-grid.one { grid-template-columns: 1fr; }
.option-btn.small { font-size: 1rem; text-align: left; font-weight: 700; padding: .85rem 1rem; }
.calc { margin: 1rem auto 0; max-width: 260px; background: var(--teal-darkest); padding: .8rem; border-radius: 16px; }
.calc output { display: block; background: #e9f1f2; color: var(--ink); font-size: 1.4rem; font-weight: 800; text-align: right; padding: .4rem .7rem; border-radius: 10px; margin-bottom: .6rem; min-height: 2.3rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.calc .keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.calc button { font: inherit; font-weight: 800; padding: .55rem 0; border-radius: 10px; border: none; background: #2b6f6f; color: #fff; cursor: pointer; }
.calc button.op { background: var(--sun); color: #2a1604; }

/* misc */
.chapter-img.blocks { background: #08201f; }
details.faq { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1.1rem; margin-bottom: .7rem; }
details.faq summary { font-weight: 700; color: var(--ink); cursor: pointer; }
details.faq p { margin: .6rem 0 0; }
.support { text-align: center; }
.support .btn-primary { background: var(--sun); color: #2a1604; box-shadow: 0 8px 22px rgba(240,160,75,.35); }
.pv-input { font: inherit; font-size: 1.3rem; font-weight: 700; width: 9rem; padding: .4rem .7rem; border-radius: 10px; border: 2px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chapter h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: .4rem; }
.activity h3 { font-size: 1rem; margin-bottom: .3rem; }
.game-shell h2.prompt { font-size: 1.15rem; }
.grownups h2 { font-size: 1.05rem; margin-bottom: .4rem; }
@media (max-width: 1180px) {
  .nav { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--teal-darkest); flex-direction: column; align-items: stretch; padding: .8rem 4%; border-bottom: 1px solid rgba(125,193,209,.25); }
  .nav-links.open { display: flex; }
  .nav-links a.back-home { margin-right: 0; margin-bottom: .3rem; }
}
/* accessibility: footer contrast, underlined inline links, footer headings as h2 */
.site-footer a { color: var(--accent-soft); }
.site-footer a:hover { color: #fff; }
.site-footer h2 { color: var(--accent); margin-bottom: .6rem; font-size: 1rem; }
.footer-note { color: #b4d0d5; }
.footer-note a, .footer-bottom a, .prose p a, .activity a, .reflist li > a, .grownups a, .overlay p a, .chapter p a { text-decoration: underline; text-underline-offset: 2px; }
.hgrid-wrap > .hgrid { flex: 0 1 320px; }
@media (max-width: 560px) {
  .game-shell { padding: 1rem; }
  .stage-box { padding: .8rem; }
  .hud .stat { font-size: .85rem; padding: .3rem .8rem; }
  .pv-chart .pv-cell { height: 54px; font-size: 1.6rem; }
  .readout { min-width: 0; width: 100%; text-align: center; }
  .grid-tools { justify-content: center; }
}
/* language switch (EN <-> 繁中) */
.lang-switch { margin-left: auto; color: #fff; background: rgba(240,160,75,.18); border: 1px solid rgba(240,160,75,.55); border-radius: 999px; padding: .35rem .9rem; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.lang-switch:hover { background: rgba(240,160,75,.15); color: #fff; }
.nav-toggle { margin-left: .2rem; }
@media (min-width: 1181px) { .lang-switch { order: 3; margin-left: .4rem; } }
html[lang^="zh"] body { font-family: "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", Arial, sans-serif; }
