:root {
  --paper: #fffdf7;
  --ink: #253e65;
  --muted: #5a6e85;
  --line: #dae4ee;
  --coral: #d94e52;
  --green: #217a5c;
  --yellow: #ffd25d;
  --blue: #3e79ce;
  --lilac: #8b64bf;
  --white: #fff;
  --rounded: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Trebuchet MS", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:disabled { cursor: default; }
button:focus-visible, summary:focus-visible, [tabindex="-1"]:focus-visible {
  outline: 3px solid #235ca7;
  outline-offset: 5px;
}
[hidden] { display: none !important; }
main { max-width: 1280px; margin: 0 auto; padding: 25px 48px 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--rounded);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.1px;
}
.brand-icon { font-size: 37px; color: #f26c60; line-height: 1; }
.brand-extra {
  margin-left: 13px;
  padding-left: 23px;
  border-left: 2px solid #e0e6ec;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.session-stars {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 17px;
  border: 2px solid #f6d473;
  border-radius: 30px;
  background: #fff3c9;
  box-shadow: 0 3px 0 #f8e6ab;
  font-size: 18px;
  white-space: nowrap;
}
.session-stars > span { color: #ac760d; font-size: 22px; }
.eyebrow {
  display: block;
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 1.5px;
  font-weight: 800;
  color: #56748e;
}
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.07fr 1fr;
  align-items: center;
  gap: 23px;
  padding: 39px 35px 35px;
  margin-bottom: 39px;
  border: 2px solid #e5edf4;
  border-radius: 32px;
  background: linear-gradient(115deg, #edf7ff 0%, #f2f8ff 44%, #fff5df 100%);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 25px;
  right: 33px;
  width: 128px;
  height: 128px;
  border: 19px solid #ffdda96b;
  border-radius: 50%;
}
.hero-copy { position: relative; }
.hero-copy > .eyebrow {
  display: inline-block;
  padding: 7px 11px;
  border: 1px solid #d2e4f7;
  border-radius: 8px;
  background: #fff9;
  color: #3e658e;
  font-size: 9px;
  letter-spacing: 1.1px;
}
.hero h1 {
  font-family: var(--rounded);
  font-size: clamp(42px, 4.6vw, 59px);
  font-weight: 800;
  letter-spacing: -2.6px;
  line-height: 1.12;
  margin: 21px 0 18px;
}
.hero h1 em { position: relative; color: #db4d58; font-style: normal; white-space: nowrap; }
.hero h1 em::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: 0;
  left: -3px;
  width: calc(100% + 8px);
  height: 13px;
  border-radius: 9px;
  background: #ffd66e;
  transform: rotate(-3deg);
}
.title-spark { display: inline-block; font-size: 37px; color: #de9c17; margin-left: 11px; vertical-align: top; }
.hero-copy > p { margin: 0 0 18px; font-size: 15px; line-height: 1.8; color: #526d86; }
.explore-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 46px;
  padding: 10px 16px;
  border: 2px solid #b9d3ed;
  border-bottom-width: 4px;
  border-radius: 14px;
  background: #fff;
  color: #315e91;
  font-size: 12px;
  font-weight: 800;
  transition: transform .16s, background .16s;
}
.explore-link:hover { transform: translateY(-2px); background: #f9fcff; }
.explore-link > span { font-size: 20px; }
.hero-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 11px; color: #596f83; }
.hero-note > span { color: #b87e0b; font-size: 22px; }
.hero-badges { display: flex; gap: 7px; flex-wrap: wrap; margin: 14px 0 0; }
.hero-badges > span { padding: 6px 10px; border-radius: 20px; font-size: 10px; font-weight: 800; background: #e1f2e8; color: #2a775c; }
.hero-badges i { margin-right: 3px; font-style: normal; }
.hero-badges > span:nth-child(2) { background: #ffeadb; color: #a6542f; }
.hero-badges > span:nth-child(3) { background: #ece3fa; color: #74539d; }
.hero-art { min-width: 0; }
.hero-art svg { display: block; width: 100%; height: auto; overflow: visible; }
h2 {
  font-family: var(--rounded);
  font-weight: 800;
  font-size: 31px;
  letter-spacing: -.8px;
  line-height: 1.22;
  margin: 7px 0 0;
}
.choose-section { padding-top: 0; }
.choose-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.grade-picker {
  display: flex;
  flex-shrink: 0;
  gap: 5px;
  padding: 5px;
  border: 2px solid #dae6f3;
  border-radius: 18px;
  background: #edf3fa;
}
.grade-picker button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 9px 18px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  color: #5c7390;
}
.grade-picker b { font-family: var(--rounded); font-size: 25px; font-weight: 800; }
.grade-picker button[aria-pressed=true] { background: #3875c8; color: #fff; box-shadow: 0 3px 0 #255da5; }
.grade-description { margin: 13px 0 25px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 21px 20px 18px;
  border: 2px solid var(--card-line);
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: 0 6px 0 var(--card-shadow);
  text-align: left;
  transition: transform .18s, box-shadow .18s;
}
.game-card:hover { transform: translateY(-6px); box-shadow: 0 11px 0 var(--card-shadow); }
.game-card:active { transform: translateY(2px); box-shadow: 0 3px 0 var(--card-shadow); }
.game-card[data-game=hunt] { --card-bg: #fff0e8; --card-line: #ffd5c1; --card-shadow: #fbe2d7; --accent: #ad4934; }
.game-card[data-game=sort] { --card-bg: #eaf7ed; --card-line: #c8e6ce; --card-shadow: #d4e9d7; --accent: #26744a; }
.game-card[data-game=count] { --card-bg: #eaf4ff; --card-line: #c8def7; --card-shadow: #d5e5f7; --accent: #336eaf; }
.game-card[data-game=memory] { --card-bg: #f3edff; --card-line: #dfd0f4; --card-shadow: #e4d8f4; --accent: #7e51aa; }
.card-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 125px;
  margin: 0 0 19px;
  border-radius: 18px;
  background: #ffffff82;
}
.card-art svg { width: 156px; height: 110px; max-width: 100%; overflow: visible; }
.card-number {
  align-self: flex-start;
  padding: 5px 7px;
  border-radius: 7px;
  background: #fff9;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .7px;
  line-height: 1.5;
  color: var(--accent);
}
.game-card strong {
  min-height: 57px;
  margin-top: 12px;
  font-family: var(--rounded);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.7px;
  line-height: 1.18;
}
.card-copy { flex: 1; margin: 11px 0 20px; font-size: 12px; line-height: 1.65; color: #50677b; }
.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--card-line);
  border-radius: 12px;
  background: #fff;
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .55px;
}
.card-link > span { font-size: 23px; font-weight: 800; line-height: 1; }
.explore-section { margin-top: 45px; padding: 28px 25px 23px; border: 2px solid #e7eaf0; border-radius: 25px; background: #fff; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.section-heading h2 { font-size: 27px; }
.section-note { max-width: 175px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.shape-library { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.shape-library button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 90px;
  padding: 12px 9px;
  border: 2px solid #e3eaf3;
  border-bottom-width: 4px;
  border-radius: 16px;
  background: #f7faff;
  font-size: 13px;
  font-weight: 800;
  transition: transform .16s, background .16s;
}
.shape-library button:hover { transform: translateY(-2px); }
.shape-library button[aria-pressed=true] { border-color: #edbf4e; background: #fff6d7; }
.shape-library svg { flex-shrink: 0; width: 53px; height: 53px; }
.shape-fact { display: flex; align-items: center; gap: 13px; min-height: 66px; margin: 16px 0 0; padding: 13px 16px; border-radius: 14px; background: #fff6db; }
.shape-fact > span { color: #ba881e; font-size: 27px; }
.shape-fact p { margin: 0; font-size: 12px; line-height: 1.75; }
.teacher-note { margin: 24px 0 0; padding: 0 18px; border: 2px dashed #d9e2ed; border-radius: 16px; background: #f8faff; }
.teacher-note summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 55px; cursor: pointer; list-style: none; font-size: 12px; font-weight: 800; }
.teacher-note summary::-webkit-details-marker { display: none; }
.teacher-note summary > span { font-size: 23px; font-weight: 400; }
.teacher-note[open] summary > span { transform: rotate(45deg); }
.teacher-note > div { padding-bottom: 12px; }
.teacher-note p { font-size: 12px; line-height: 1.8; color: var(--muted); }
footer { padding: 31px 5px 25px; text-align: center; color: var(--muted); font-size: 11px; line-height: 1.9; }
footer > span { font-weight: 800; color: #c34b50; }

/* Il laboratorio dei giochi */
.play-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 13px 0 27px; }
.back-button { min-height: 44px; padding: 9px 0; border: 0; background: none; color: #456d9c; font-size: 12px; font-weight: 800; }
.compact-grades { display: flex; gap: 7px; }
.compact-grades button { min-height: 44px; padding: 8px 14px; border: 2px solid #d6e3f3; border-radius: 12px; background: #fff; font-size: 17px; font-weight: 800; }
.compact-grades button > span { margin-left: 4px; font-size: 10px; }
.compact-grades button[aria-pressed=true] { border-color: #3875c8; background: #3875c8; color: #fff; box-shadow: 0 3px 0 #255da5; }
.game-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.game-heading h2 { font-size: 36px; }
.quiet-button { min-height: 44px; padding: 10px 14px; border: 2px solid #d8e3f0; border-bottom-width: 4px; border-radius: 12px; background: #fff; font-size: 12px; font-weight: 800; }
.quiet-button:hover { background: #f1f6fd; }
.quiet-button > span { margin-left: 5px; font-size: 19px; }
.progress-row { display: flex; justify-content: space-between; gap: 15px; margin: 26px 0 9px; font-size: 12px; font-weight: 800; }
.progress-row > span:last-child { color: #a16d07; }
.progress-track { height: 12px; padding: 2px; overflow: hidden; border: 1px solid #dde6ef; border-radius: 15px; background: #eaf0f7; }
.progress-track > div { width: 0; height: 100%; border-radius: 10px; background: #64bd92; transition: width .3s; }
.instruction-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 28px 0 21px; }
.instruction-row h3 { margin: 0 0 7px; font-family: var(--rounded); font-size: 23px; line-height: 1.35; letter-spacing: -.4px; font-weight: 800; }
.instruction-row p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.help-button { display: flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 9px 14px; border: 2px solid #f0d480; border-bottom-width: 4px; border-radius: 18px; background: #fff3c7; font-size: 12px; font-weight: 800; }
.help-button > span { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 2px solid #a88324; border-radius: 50%; color: #8d6b1d; }
.hint-box { margin: -4px 0 20px; padding: 14px 18px; border: 2px dashed #ebcb6e; border-radius: 14px; background: #fff6d7; font-size: 13px; line-height: 1.7; }
.hunt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 24px; border: 2px solid #f5dace; border-radius: 25px; background: #fff0e7; }
.hunt-grid.grade-two { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.figure-tile { position: relative; display: flex; align-items: center; justify-content: center; min-height: 157px; padding: 15px; border: 2px solid #f2d8ca; border-bottom-width: 5px; border-radius: 18px; background: #fff; transition: background .16s, border-color .16s, transform .16s; }
.figure-tile:hover { transform: translateY(-2px); border-color: #e8b394; }
.figure-tile svg { width: 125px; height: 125px; max-width: 100%; }
.figure-tile[aria-pressed=true] { border-color: #4b9f77; background: #ebf8e8; }
.tile-check { position: absolute; top: 10px; right: 10px; width: 25px; height: 25px; border: 2px solid #e4e8ee; border-radius: 50%; background: #f8faff; color: transparent; font-size: 15px; font-weight: 800; line-height: 21px; }
.figure-tile[aria-pressed=true] .tile-check { border-color: #27835c; background: #27835c; color: #fff; }
.figure-tile.wrong { border-color: #d2783d; background: #fff0dd; }
.figure-tile.wrong .tile-check { border-color: #b66b20; background: #b66b20; color: #fff; }
.figure-tile:disabled { opacity: 1; }
.sort-stage, .count-stage { display: grid; grid-template-columns: 1fr 1.45fr; align-items: center; gap: 30px; padding: 28px; border: 2px solid #d6e9db; border-radius: 25px; background: #edf8ef; }
.sort-prompt { min-width: 0; }
.large-figure { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 245px; border: 2px dashed #c5d9cf; border-radius: 22px; background: #fff; }
.large-figure > svg { width: 200px; height: 200px; max-width: 100%; }
.large-figure > span { padding-bottom: 15px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.sort-arrow { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 15px; color: #37775b; font-size: 0; font-weight: 800; letter-spacing: 1px; }
.sort-arrow > span { font-size: 10px; }
.sort-arrow::after { content: "→"; font-size: 32px; line-height: 1; }
.houses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 21px; align-items: end; }
.house-button { position: relative; display: block; min-width: 0; height: 180px; padding: 0 8px; border: 0; border-radius: 19px; background: none; font-size: 15px; font-weight: 800; transition: transform .16s; }
.house-button:hover { transform: translateY(-4px); }
.house-button .house-roof { position: absolute; top: 0; left: 0; display: block; width: 100%; height: 52px; overflow: visible; }
.house-body { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 136px; margin-top: 44px; padding: 12px 5px 11px; border: 2px solid var(--roof-color, #75ac87); border-bottom-width: 6px; border-top-width: 0; border-radius: 0 0 15px 15px; background: var(--house-color, #daf0d7); box-shadow: 0 4px 0 #285d4020; }
.house-window { display: flex; align-items: center; justify-content: center; width: 82px; height: 82px; padding: 6px; border: 3px solid #fff; border-radius: 17px; background: #ffffffc9; box-shadow: 0 2px 0 #254f5914; }
.house-window > svg { display: block; width: 66px; height: 66px; max-width: 100%; }
.house-name { display: block; max-width: 100%; padding: 5px 9px; border-radius: 7px; background: #ffffffd9; color: #30485f; font-size: 14px; line-height: 1.2; }
.house-door { position: relative; display: block; width: 43px; height: 65px; border: 3px solid #fff; border-radius: 19px 19px 0 0; background: #ffffff6b; }
.house-door::after { content: ""; position: absolute; right: 5px; top: 33px; width: 6px; height: 6px; border-radius: 50%; background: var(--roof-color, #74a486); }
.house-button.correct .house-body { border-color: #248455; box-shadow: 0 0 0 4px #93dab1, 0 5px 0 #76b790; }
.house-button.correct::after, .house-button.wrong::after { position: absolute; top: 42px; right: 2px; display: grid; place-items: center; width: 29px; height: 29px; border: 2px solid #fff; border-radius: 50%; background: #248455; color: #fff; content: "✓"; font-size: 18px; }
.house-button.wrong .house-body { border-color: #c87632; box-shadow: 0 0 0 3px #efbb7b; }
.house-button.wrong::after { content: "!"; background: #b97022; }
.house-button:disabled { opacity: .65; }
.house-button.correct:disabled { opacity: 1; }
.sort-collected { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 61px; margin-top: 16px; padding: 10px 16px; border: 2px dashed #d5e6da; border-radius: 16px; background: #f8fcf7; }
.sort-collected > span { margin-right: 5px; color: var(--muted); font-size: 11px; }
.sort-collected > svg { width: 34px; height: 34px; }
.count-stage { grid-template-columns: 1fr 1.3fr; border-color: #cfe2f7; background: #edf5ff; }
.count-stage .large-figure { border-color: #c4daed; }
.answer-label { margin: 0 0 15px; color: #426f9e; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.answer { min-height: 97px; padding: 14px 8px; border: 2px solid #c0d7f0; border-bottom-width: 6px; border-radius: 19px; background: #fff; color: #386fa9; font-family: var(--rounded); font-size: 37px; font-weight: 800; transition: transform .15s, background .15s; }
.answer:hover { transform: translateY(-2px); background: #f9fcff; }
.answer.correct { border-color: #438c61; background: #e3f5df; color: #267246; }
.answer.wrong { border-color: #cd8841; background: #fff0dd; color: #a56025; }
.answer:disabled { opacity: .7; }
.answer.correct:disabled { opacity: 1; }
.answer-pair { display: flex; align-items: center; justify-content: center; gap: 15px; font-size: 29px; }
.answer-pair > span { display: flex; flex-direction: column; align-items: center; }
.answer-pair small { margin-top: 4px; font-family: "Trebuchet MS", Arial, sans-serif; font-size: 10px; font-weight: 700; }
.pair-separator { width: 2px; height: 34px; border-radius: 2px; background: #d8e5f3; }
.count-legend { margin: 17px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.memory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; padding: 24px; border: 2px solid #e3d9f3; border-radius: 25px; background: #f3effc; }
.memory-card { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 170px; padding: 19px; border: 3px solid #9170bc; border-bottom: 7px solid #73519c; border-radius: 21px; background: #a585d2; color: #fff; font-size: 37px; line-height: 1.6; transition: transform .16s, background .16s, border-color .16s; }
.memory-card:hover:not(:disabled) { transform: translateY(-3px); }
.memory-card::before { content: ""; position: absolute; inset: 8px; border: 2px solid #ffffff65; border-radius: 12px; pointer-events: none; }
.memory-back { display: flex; align-items: center; justify-content: center; width: 100%; }
.memory-card .memory-back svg { width: 113px; height: 113px; max-width: 100%; }
.memory-back > i { position: absolute; top: 15px; right: 17px; color: #fff0ae; font-style: normal; font-size: 19px; }
.memory-card.open { border-color: #d1c0e8; border-bottom-color: #baa1d7; background: #fff; color: var(--ink); font-size: 18px; font-weight: 800; line-height: 1.5; text-align: center; }
.memory-card.open::before { display: none; }
.memory-card > svg { width: 118px; height: 118px; max-width: 100%; }
.memory-card.matched { border-color: #64a875; border-bottom-color: #428b58; background: #e9f7e5; opacity: 1; }
.memory-card.matched::after, .memory-card.mismatch::after { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 25px; height: 25px; border: 2px solid #fff; border-radius: 50%; background: #307a49; color: #fff; content: "✓"; font-size: 15px; line-height: 1; }
.memory-card.mismatch { border-color: #df984a; border-bottom-color: #bd762d; background: #fff7e8; }
.memory-card.mismatch::after { content: "!"; background: #b87022; }
.memory-card:disabled { cursor: default; }
.memory-legend { margin: 15px 0 0; padding: 11px 15px; border-radius: 12px; background: #f4f0fb; color: #725b8a; font-size: 12px; line-height: 1.7; }
.feedback-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 88px; margin-top: 16px; }
#feedback { flex: 1; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
#feedback.success { color: #247747; font-weight: 800; }
#feedback.retry { color: #aa6328; }
#actions { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: 10px; }
.primary-button { min-height: 49px; padding: 12px 22px; border: 2px solid #3674c8; border-bottom: 5px solid #235ba3; border-radius: 14px; background: #3879d2; color: #fff; font-size: 14px; font-weight: 800; transition: transform .15s, background .15s; }
.primary-button:hover { transform: translateY(-2px); background: #2e6cc2; }
.primary-button:active { transform: translateY(2px); }
.primary-button:disabled { opacity: .5; }
.finish-panel { margin-top: 25px; padding: 38px 22px; border: 2px solid #f1d68c; border-radius: 28px; background: #fff4d3; text-align: center; }
.finish-symbols { display: flex; align-items: center; justify-content: center; gap: 11px; margin-bottom: 21px; }
.finish-symbols svg { width: 52px; height: 52px; }
.finish-panel h3 { margin: 0 0 15px; font-family: var(--rounded); font-weight: 800; font-size: 34px; line-height: 1.25; letter-spacing: -.7px; }
.finish-panel p { max-width: 480px; margin: 0 auto 22px; font-size: 14px; line-height: 1.8; }
.finish-stars { margin: 0 0 18px; color: #ba8615; font-size: 29px; letter-spacing: 7px; }
.finish-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.noscript { padding: 20px; background: #ffe8d8; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 1500px) {
  main { padding-top: 32px; }
  .hero { padding-top: 47px; padding-bottom: 43px; }
}
@media (max-width: 1050px) {
  main { padding-right: 30px; padding-left: 30px; }
  .hero { padding: 31px 27px; gap: 10px; }
  .hero h1 { font-size: 48px; }
  .game-grid { gap: 13px; }
  .game-card { padding: 17px 14px 15px; border-radius: 21px; }
  .card-art { height: 109px; }
  .game-card strong { font-size: 22px; }
  .card-number { font-size: 7px; letter-spacing: .3px; padding: 5px; }
  .card-link { font-size: 8px; padding: 9px 8px; letter-spacing: .2px; }
  .brand-extra { font-size: 8px; }
}
@media (max-width: 880px) {
  .hero { grid-template-columns: 1.1fr 1fr; }
  .hero h1 { font-size: 42px; letter-spacing: -2px; }
  .hero-copy > .eyebrow { font-size: 8px; letter-spacing: .65px; }
  .hero-copy > p { font-size: 13px; }
  .title-spark { font-size: 30px; margin-left: 5px; }
  .explore-link { padding: 9px 11px; gap: 9px; font-size: 11px; }
  .hero-note { font-size: 10px; }
  .hero-badges { gap: 5px; }
  .hero-badges > span { font-size: 9px; padding: 5px 8px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
  .game-card { display: grid; grid-template-columns: 100px 1fr; column-gap: 16px; padding: 20px 17px; }
  .card-art { grid-column: 1; grid-row: 1 / 5; align-self: center; height: 119px; margin: 0; padding: 5px; }
  .card-art svg { width: 100px; height: auto; }
  .card-number, .game-card strong, .card-copy, .card-link { grid-column: 2; }
  .card-number { font-size: 7px; }
  .game-card strong { min-height: 0; margin-top: 9px; font-size: 22px; }
  .card-copy { margin: 9px 0 13px; font-size: 11px; }
  .card-link { font-size: 8px; }
  .shape-library button { flex-direction: column; gap: 5px; }
  .shape-library { gap: 10px; }
  .sort-stage, .count-stage { gap: 20px; padding: 21px; }
  .houses { gap: 15px 13px; }
  .house-name { font-size: 12px; }
  .large-figure > svg { width: 170px; height: 170px; }
  .large-figure { min-height: 218px; }
  .memory-card { min-height: 145px; padding: 15px; }
  .memory-card.open { font-size: 15px; }
  .memory-card > svg, .memory-card .memory-back svg { width: 99px; height: 99px; }
  .memory-grid { gap: 13px; padding: 20px; }
}
@media (max-width: 640px) {
  main { padding: 15px 18px 0; }
  .topbar { padding: 0 1px 17px; }
  .brand { gap: 7px; font-size: 11px; letter-spacing: .8px; }
  .brand-icon { font-size: 32px; }
  .brand-extra { display: none; }
  .session-stars { min-height: 42px; padding: 6px 13px; gap: 8px; font-size: 16px; }
  .session-stars > span { font-size: 20px; }
  .hero { grid-template-columns: 1fr; gap: 13px; padding: 26px 23px 19px; margin-bottom: 30px; border-radius: 27px; }
  .hero h1 { margin: 18px 0 16px; font-size: clamp(41px, 9vw, 55px); letter-spacing: -2px; line-height: 1.11; }
  .hero-copy > .eyebrow { font-size: 8px; letter-spacing: .8px; padding: 6px 8px; }
  .hero-copy > p { margin-bottom: 17px; font-size: 14px; line-height: 1.75; }
  .title-spark { font-size: 33px; margin-left: 8px; }
  .hero-badges { margin-top: 12px; }
  .hero-badges > span { font-size: 9px; padding: 6px 9px; }
  .explore-link { min-height: 45px; font-size: 11px; padding: 9px 12px; gap: 11px; }
  .hero-note { margin-top: 12px; font-size: 10px; }
  .hero-art { justify-self: center; width: 100%; max-width: 390px; }
  .hero-art svg { max-height: 287px; }
  .choose-row { flex-direction: column; align-items: flex-start; gap: 18px; }
  h2 { font-size: 29px; }
  .grade-picker { width: 100%; gap: 7px; }
  .grade-picker button { flex: 1; justify-content: center; min-height: 47px; padding: 8px 13px; font-size: 12px; }
  .grade-description { margin: 14px 0 22px; font-size: 12px; }
  .game-grid { grid-template-columns: 1fr; gap: 17px; }
  .game-card { grid-template-columns: 93px 1fr; column-gap: 17px; padding: 21px 18px; border-radius: 23px; }
  .card-art { height: 119px; }
  .game-card strong { font-size: 24px; letter-spacing: -.65px; }
  .card-copy { margin: 10px 0 13px; font-size: 12px; }
  .card-number { font-size: 7px; padding: 5px 6px; letter-spacing: .4px; }
  .card-link { min-height: 42px; font-size: 8px; padding: 8px 10px; }
  .explore-section { margin-top: 32px; padding: 23px 17px 18px; border-radius: 23px; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 9px; }
  .section-heading h2 { font-size: 26px; }
  .section-note { max-width: none; font-size: 11px; }
  .shape-library { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
  .shape-library button { flex-direction: row; min-height: 83px; padding: 9px 5px; gap: 4px; font-size: 11px; }
  .shape-library svg { width: 42px; height: 42px; }
  .shape-fact { align-items: flex-start; padding: 12px; gap: 9px; }
  .shape-fact p { font-size: 11px; }
  .shape-fact > span { font-size: 22px; }
  .teacher-note { margin-top: 22px; padding: 0 14px; }
  .teacher-note summary { font-size: 11px; }
  .teacher-note p { font-size: 11px; }
  footer { padding-top: 26px; font-size: 10px; }
  .play-heading { margin: 8px 0 24px; }
  .back-button { font-size: 11px; }
  .compact-grades button { padding: 8px 12px; font-size: 16px; }
  .compact-grades button > span { display: none; }
  .game-heading { align-items: flex-start; gap: 9px; }
  .game-heading h2 { font-size: 29px; letter-spacing: -.8px; }
  .game-heading .eyebrow { font-size: 8px; letter-spacing: .8px; }
  .quiet-button { min-height: 44px; padding: 9px 10px; font-size: 10px; flex-shrink: 0; }
  .quiet-button > span { font-size: 16px; margin-left: 2px; }
  .progress-row { margin-top: 22px; font-size: 11px; }
  .instruction-row { align-items: flex-start; gap: 12px; margin: 23px 0 18px; }
  .instruction-row h3 { font-size: 20px; }
  .instruction-row p { font-size: 12px; }
  .help-button { flex-direction: column; gap: 3px; min-width: 60px; padding: 9px; border-radius: 14px; font-size: 10px; }
  .help-button > span { width: 19px; height: 19px; font-size: 12px; }
  .hint-box { padding: 12px 14px; font-size: 12px; }
  .hunt-grid, .hunt-grid.grade-two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 14px; border-radius: 21px; }
  .figure-tile { min-height: 131px; padding: 12px; border-radius: 15px; }
  .figure-tile svg { width: 110px; height: 110px; }
  .tile-check { top: 7px; right: 7px; width: 22px; height: 22px; font-size: 13px; line-height: 18px; }
  .sort-stage, .count-stage { grid-template-columns: 1fr; padding: 17px; gap: 18px; border-radius: 23px; }
  .large-figure { min-height: 183px; border-radius: 19px; }
  .large-figure > svg { width: 153px; height: 153px; }
  .large-figure > span { padding-bottom: 11px; font-size: 9px; }
  .sort-arrow { margin-top: 10px; gap: 7px; }
  .sort-arrow > span { font-size: 9px; }
  .sort-arrow::after { content: "↓"; font-size: 25px; }
  .houses { gap: 13px 15px; }
  .house-button { height: 153px; padding: 0 7px; }
  .house-button .house-roof { height: 44px; }
  .house-body { height: 116px; margin-top: 37px; padding: 8px 3px 8px; gap: 5px; border-bottom-width: 5px; }
  .house-window { width: 70px; height: 70px; padding: 5px; border-radius: 14px; }
  .house-window > svg { width: 56px; height: 56px; }
  .house-name { padding: 4px 5px; font-size: 12px; }
  .house-door { width: 37px; height: 57px; }
  .house-door::after { top: 29px; }
  .house-button.correct::after, .house-button.wrong::after { top: 34px; width: 25px; height: 25px; font-size: 15px; }
  .sort-collected { padding: 9px 12px; gap: 4px; }
  .sort-collected > svg { width: 28px; height: 28px; }
  .sort-collected > span { font-size: 10px; }
  .answer { min-height: 88px; padding: 12px 8px; border-radius: 16px; font-size: 33px; }
  .answer-pair { gap: 14px; font-size: 29px; }
  .answer-label { margin-bottom: 12px; font-size: 9px; }
  .count-legend { font-size: 11px; }
  .memory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding: 15px; border-radius: 23px; }
  .memory-card { min-height: 145px; padding: 14px; border-radius: 18px; }
  .memory-card.open { font-size: 16px; }
  .memory-card > svg, .memory-card .memory-back svg { width: 103px; height: 103px; }
  .memory-card::before { inset: 7px; border-radius: 10px; }
  .memory-back > i { top: 12px; right: 13px; font-size: 15px; }
  .memory-legend { padding: 10px 12px; font-size: 11px; }
  .feedback-row { flex-direction: column; align-items: flex-start; gap: 14px; min-height: 110px; margin-top: 18px; }
  #feedback { font-size: 13px; }
  #actions { width: 100%; justify-content: flex-end; }
  .primary-button { min-height: 47px; padding: 11px 18px; font-size: 13px; }
  .finish-panel { padding: 29px 17px; border-radius: 24px; }
  .finish-panel h3 { font-size: 29px; }
  .finish-panel p { font-size: 13px; }
  .finish-symbols { gap: 8px; }
  .finish-symbols svg { width: 43px; height: 43px; }
}
@media (max-width: 360px) {
  main { padding-right: 12px; padding-left: 12px; }
  .hero { padding-right: 17px; padding-left: 17px; }
  .hero h1 { font-size: 40px; letter-spacing: -2px; }
  .hero-copy > .eyebrow { font-size: 7px; letter-spacing: .5px; }
  .title-spark { font-size: 27px; margin-left: 5px; }
  .hero-copy > p { font-size: 13px; }
  .hero-badges { gap: 5px; }
  .hero-badges > span { padding: 5px 7px; font-size: 8px; }
  .explore-link { padding: 9px 10px; gap: 8px; font-size: 10px; }
  h2 { font-size: 27px; }
  .game-card { grid-template-columns: 73px 1fr; column-gap: 13px; padding: 18px 14px; }
  .game-card strong { font-size: 22px; }
  .card-art { height: 104px; }
  .card-number { font-size: 6px; letter-spacing: .35px; }
  .card-copy { font-size: 11px; }
  .card-link { font-size: 7px; letter-spacing: .2px; }
  .shape-library button { flex-direction: column; gap: 3px; font-size: 11px; }
  .shape-library svg { width: 42px; height: 42px; }
  .game-heading h2 { font-size: 25px; }
  .instruction-row h3 { font-size: 18px; }
  .figure-tile { min-height: 117px; padding: 8px; }
  .figure-tile svg { width: 98px; height: 98px; }
  .sort-stage, .count-stage { padding: 13px; }
  .houses { column-gap: 10px; }
  .house-button { padding: 0 6px; }
  .house-name { font-size: 11px; padding-right: 3px; padding-left: 3px; }
  .memory-grid { padding: 12px; gap: 11px; }
  .memory-card { min-height: 128px; padding: 12px; }
  .memory-card.open { font-size: 14px; }
  .memory-card > svg, .memory-card .memory-back svg { width: 89px; height: 89px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
