/* gm.css: games and classroom tools (lane GM). Standalone: does not rely on kid.css. */
:root {
  --gm-t: 48px;
  --gm-cream: #fff7ed;
  --gm-green2: #4caf63;
}
body.kid-young {
  --gm-t: 56px;
}
[hidden] {
  display: none !important;
}
.gm-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 72px;
}
.gm-wrap h1 {
  font-size: clamp(2rem, 6vw, 3.1rem);
  margin: 8px 0 10px;
}
.gm-wrap .lede {
  font-size: 1.15rem;
  max-width: 60ch;
}
.gm-wrap h2 {
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  margin: 36px 0 12px;
}
.gm-wrap button:focus-visible,
.gm-wrap a:focus-visible,
.gm-wrap input:focus-visible,
.gm-wrap select:focus-visible,
.gm-wrap textarea:focus-visible,
.gm-wrap [tabindex]:focus-visible,
.gm-obj:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

/* hub tiles */
.gm-tiles {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  margin: 14px 0 6px;
  padding: 0;
  list-style: none;
}
.gm-tile {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--gm-cream);
  border: 3px solid var(--ink);
  border-radius: 24px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--ink);
  min-height: 96px;
  position: relative;
}
.gm-tile:hover {
  background: var(--yellow-soft);
  color: var(--ink);
}
.gm-tile .gm-emoji {
  font-size: 2.6rem;
  line-height: 1;
  flex: none;
}
.gm-tile b {
  display: block;
  font: 800 1.2rem var(--display);
}
.gm-tile span.d {
  display: block;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.35;
  margin-top: 2px;
}
.gm-tag {
  display: inline-block;
  font: 800 0.72rem var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
  background: var(--green-soft);
  color: #14502f;
}
.gm-tag.older {
  background: var(--blue-soft);
  color: var(--blue-ink);
}
.gm-tag.all {
  background: var(--yellow-soft);
  color: var(--yellow-ink);
}
.gm-tag.tool {
  background: var(--bg-alt);
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
}

/* cards and layout */
.gm-card {
  background: var(--gm-cream);
  border: 3px solid var(--ink);
  border-radius: 26px;
  padding: 18px;
  margin: 16px 0;
  box-shadow: 0 6px 0 rgba(18, 18, 18, 0.12);
}
.gm-intro {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 600;
}
.gm-say-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.gm-say {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  flex: none;
  display: grid;
  place-items: center;
  width: var(--gm-t);
  height: var(--gm-t);
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
}
.gm-say:hover {
  background: #ffd757;
}
.gm-say.gm-big {
  width: 64px;
  height: 64px;
}
.gm-say:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.gm-group {
  border: 0;
  padding: 0;
  margin: 0 0 14px;
  min-width: 0;
}
.gm-group legend {
  font: 800 1.05rem var(--sans);
  margin-bottom: 8px;
  padding: 0;
}
.gm-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gm-opt,
.gm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--gm-t);
  padding: 8px 18px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font: 700 1.05rem var(--sans);
  cursor: pointer;
  text-decoration: none;
}
.gm-opt:hover,
.gm-btn:hover {
  background: var(--bg-alt);
  color: var(--ink);
}
.gm-opt[aria-pressed="true"] {
  background: var(--yellow);
}
.gm-btn.gm-primary {
  background: var(--green);
  border-color: var(--ink);
  color: #fff;
}
.gm-btn.gm-primary:hover {
  background: #1c6340;
  color: #fff;
}
.gm-btn[disabled] {
  opacity: 0.45;
  cursor: default;
}
.gm-go {
  margin-top: 6px;
  min-width: 160px;
  font-size: 1.2rem;
}
.gm-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.gm-prog {
  font: 800 1rem var(--sans);
}
.gm-dots {
  display: inline-flex;
  gap: 6px;
}
.gm-dots i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: #fff;
}
.gm-dots i.done {
  background: var(--green-2, #4caf63);
}
.gm-dots i.now {
  background: var(--yellow);
}
.gm-fb {
  min-height: 1.7em;
  margin: 12px 0 4px;
  font: 700 1.1rem var(--sans);
}
.gm-fb.good {
  color: var(--green);
}
.gm-fb.try {
  color: var(--red-ink);
}
.gm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.gm-q {
  font: 700 1.2rem var(--sans);
  margin: 4px 0 12px;
}
.gm-listen {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.gm-emoji {
  font-family:
    "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 3.4rem;
  line-height: 1;
}
.gm-emoji.gm-small {
  font-size: 2.4rem;
}
.gm-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.gm-k {
  position: absolute;
  top: 6px;
  left: 8px;
  font: 800 0.8rem var(--sans);
  color: var(--ink-soft);
}

/* picture and choice buttons */
.gm-pics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) {
  .gm-pics {
    grid-template-columns: repeat(4, 1fr);
  }
}
.gm-pic,
.gm-choice,
.gm-sortcard,
.gm-card-flip,
.gm-die,
.gm-bin,
.gm-swatch,
.gm-letter,
.gm-car,
.gm-word,
.gm-gap {
  font-family: var(--sans);
  color: var(--ink);
  cursor: pointer;
}
.gm-pic {
  position: relative;
  min-height: 120px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 22px;
  display: grid;
  place-items: center;
  padding: 12px;
  transition: opacity 0.2s;
}
.gm-pic:hover:not([disabled]) {
  background: var(--yellow-soft);
}
.gm-pic.ok,
.gm-choice.ok {
  background: var(--green-soft);
  border-color: var(--green);
}
.gm-pic.ok::after,
.gm-choice.ok::after {
  content: "\2713";
  position: absolute;
  top: 6px;
  right: 12px;
  font: 800 1.5rem var(--sans);
  color: var(--green);
}
.gm-pic.fade,
.gm-choice.fade,
.gm-letter.fade {
  opacity: 0.3;
  border-style: dashed;
  cursor: default;
}
.gm-pic[disabled]:not(.ok) {
  cursor: default;
}
.gm-choices,
.gm-words {
  display: grid;
  gap: 10px;
}
@media (min-width: 640px) {
  .gm-words {
    grid-template-columns: repeat(2, 1fr);
  }
}
.gm-choice {
  position: relative;
  min-height: 60px;
  padding: 12px 16px 12px 42px;
  text-align: left;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 18px;
  font: 700 1.15rem var(--sans);
  display: flex;
  align-items: center;
}
.gm-choice .gm-k {
  top: 50%;
  transform: translateY(-50%);
  left: 14px;
  font-size: 1rem;
}
.gm-choice:hover:not([disabled]) {
  background: var(--yellow-soft);
}
.gm-choice.no {
  background: var(--red-soft);
  border-color: var(--red-ink);
}
.gm-choice[disabled]:not(.ok):not(.no) {
  cursor: default;
}
.gm-why {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 14px;
  background: var(--blue-soft);
  border-radius: 18px;
  font-size: 1.1rem;
}
.gm-why p {
  margin: 0 0 4px;
}
.gm-done {
  font: 800 1.3rem var(--display);
}
.gm-qrow {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.gm-qtext {
  font: 800 clamp(1.2rem, 3vw, 1.6rem)/1.3 var(--display);
  margin: 0;
}

/* punctuation */
.gm-sentence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 2px;
  font: 700 clamp(1.4rem, 4vw, 2rem) var(--display);
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 16px;
  line-height: 1.6;
}
.gm-w {
  padding: 0 2px;
}
.gm-gap {
  min-width: 40px;
  min-height: 48px;
  padding: 0 4px;
  border-radius: 10px;
  border: 2px dashed var(--line-strong);
  background: transparent;
  font: 800 1.6rem var(--display);
}
.gm-gap:hover:not([disabled]) {
  background: var(--yellow-soft);
  border-color: var(--ink);
}
.gm-gap.ok {
  border: 2px solid var(--green);
  background: var(--green-soft);
  color: var(--green);
}
.gm-gap.fade,
.gm-word.fade {
  background: var(--red-soft);
  border-color: var(--red-ink);
}
.gm-word {
  min-height: 48px;
  padding: 2px 10px;
  border-radius: 12px;
  border: 2px dashed var(--line-strong);
  background: #fff;
  font: inherit;
}
.gm-word:hover:not([disabled]) {
  background: var(--yellow-soft);
  border-color: var(--ink);
}
.gm-word.ok {
  border: 2px solid var(--green);
  background: var(--green-soft);
  color: var(--green);
}
.gm-gap[disabled],
.gm-word[disabled] {
  cursor: default;
}

/* mystery word */
.gm-clue {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 1.2rem;
  font-weight: 600;
}
.gm-clue p {
  margin: 0;
  flex: 1 1 200px;
}
.gm-flowerbox {
  max-width: 260px;
  margin: 6px auto;
}
.gm-flower {
  width: 100%;
  height: auto;
  display: block;
}
.gm-slots {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 14px;
}
.gm-slot {
  width: 46px;
  height: 58px;
  border-bottom: 5px solid var(--ink);
  display: grid;
  place-items: end center;
  font: 800 2.2rem var(--display);
  text-transform: uppercase;
}
.gm-slot.on {
  color: var(--green);
}
.gm-keys {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--gm-t), 1fr));
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
}
.gm-letter {
  min-height: var(--gm-t);
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  font: 800 1.4rem var(--display);
  text-transform: uppercase;
}
.gm-letter:hover:not([disabled]) {
  background: var(--yellow-soft);
}
.gm-letter.ok {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}
.gm-letter[disabled] {
  cursor: default;
}

/* memory */
.gm-cards {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
}
.gm-card-flip {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 72px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--blue) linear-gradient(135deg, #2d5bd7, #1f3b8c);
  display: grid;
  place-items: center;
  font: 800 1rem var(--sans);
  padding: 4px;
  overflow: hidden;
}
.gm-card-flip::before {
  content: "?";
  font: 800 2rem var(--display);
  color: #fff;
}
.gm-card-flip.up {
  background: #fff;
}
.gm-card-flip.up::before {
  content: none;
}
.gm-card-flip.done {
  background: var(--green-soft);
  border-color: var(--green);
  opacity: 1;
}
.gm-card-flip .gm-emoji {
  font-size: clamp(1.8rem, 8vw, 3rem);
}
.gm-card-flip .gm-cw {
  font: 800 clamp(0.9rem, 3.4vw, 1.25rem) var(--sans);
  word-break: break-word;
  text-align: center;
}
.gm-card-flip.up .gm-emoji + .gm-sr + .gm-cw {
  display: none;
}

/* ladder */
.gm-ladder {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 360px;
}
.gm-ladder li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  font: 800 1.8rem var(--display);
  letter-spacing: 0.08em;
}
.gm-ladder li.goal {
  background: var(--yellow-soft);
}
.gm-ladder li.goal.ok {
  background: var(--green-soft);
}
.gm-ladder li.start {
  background: var(--blue-soft);
}
.gm-lab {
  font: 800 0.75rem var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: 56px;
  color: var(--ink-soft);
}
.gm-entry {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.gm-input {
  min-height: var(--gm-t);
  width: 10ch;
  padding: 6px 14px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  font: 800 1.6rem var(--display);
  letter-spacing: 0.12em;
  text-transform: lowercase;
  background: #fff;
}

/* syllables */
.gm-drum {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: min(100%, 260px);
  min-height: 150px;
  margin: 12px auto;
  border: 4px solid var(--ink);
  border-radius: 50% / 40%;
  background: var(--yellow);
  font: 800 1.3rem var(--display);
  color: var(--ink);
  cursor: pointer;
}
.gm-drum:active {
  transform: scale(0.97);
  background: #ffd757;
}
.gm-drum .gm-emoji {
  font-size: 3rem;
}
.gm-beats {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  min-height: 60px;
}
.gm-beats i {
  width: 26px;
  border-radius: 8px 8px 0 0;
  background: var(--blue);
  border: 2px solid var(--ink);
}
.gm-count {
  text-align: center;
  font: 800 1.3rem var(--sans);
  margin: 6px 0;
}

/* sort it */
.gm-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  min-height: var(--gm-t);
}
.gm-sortcard {
  min-height: var(--gm-t);
  min-width: 72px;
  padding: 8px 14px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font: 800 1.1rem var(--sans);
}
.gm-sortcard .gm-emoji {
  font-size: 2.2rem;
}
.gm-sortcard[aria-pressed="true"] {
  background: var(--yellow);
  box-shadow: 0 0 0 3px var(--blue);
}
.gm-sortcard.fade {
  background: var(--red-soft);
  border-color: var(--red-ink);
}
.gm-bins {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.gm-bin {
  text-align: left;
  min-height: 130px;
  padding: 12px;
  background: var(--blue-soft);
  border: 3px dashed var(--blue-ink);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.gm-bin strong {
  font: 800 1.2rem var(--display);
}
.gm-bin:hover,
.gm-bin.over {
  background: #d6e0fb;
  border-style: solid;
}
.gm-binlist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gm-chip {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
  font: 700 1rem var(--sans);
}

/* listen and colour */
.gm-cmd {
  font: 800 clamp(1.2rem, 3.4vw, 1.7rem)/1.3 var(--display);
  margin: 0;
  flex: 1 1 220px;
}
.gm-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.gm-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: var(--gm-t);
  padding: 8px 4px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  font: 700 0.95rem var(--sans);
}
.gm-swatch i {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  display: block;
}
.gm-swatch[aria-pressed="true"] {
  background: var(--yellow-soft);
  box-shadow: 0 0 0 3px var(--blue);
}
.gm-scene {
  border: 3px solid var(--ink);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
}
.gm-scene svg {
  display: block;
  width: 100%;
  height: auto;
}
.gm-obj {
  cursor: pointer;
}
.gm-obj:hover .fill {
  filter: brightness(0.96);
}
.gm-obj.fade {
  opacity: 0.45;
}
.gm-obj.ok {
  cursor: default;
}

/* sentence train */
.gm-train {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 84px;
  padding: 10px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 20px;
  margin-bottom: 14px;
}
.gm-engine {
  font-size: 2.6rem;
  line-height: 1;
}
.gm-car {
  min-height: var(--gm-t);
  min-width: 52px;
  padding: 6px 16px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--yellow);
  font: 800 1.35rem var(--display);
  position: relative;
}
.gm-car.in {
  background: var(--green-soft);
  border-color: var(--green);
}
.gm-car::after {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow:
    0 0 0 0 transparent,
    calc(100% - 4px) 0 0 transparent;
}
.gm-hintline {
  flex-basis: 100%;
  margin: 8px 0 0;
  font-weight: 700;
}

/* dice and prompts */
.gm-dice {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.gm-die {
  min-height: 170px;
  border: 4px solid var(--ink);
  border-radius: 26px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  font: 800 1.05rem var(--sans);
  box-shadow: 0 6px 0 rgba(18, 18, 18, 0.15);
}
.gm-die:hover {
  background: var(--yellow-soft);
}
.gm-die .gm-emoji {
  font-size: clamp(2.6rem, 11vw, 4.4rem);
}
.gm-dlabel {
  font: 800 0.75rem var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.gm-die.spin {
  animation: gm-roll 0.5s ease-out;
}
@keyframes gm-roll {
  0% {
    transform: rotate(-25deg) scale(0.8);
  }
  60% {
    transform: rotate(12deg) scale(1.06);
  }
  100% {
    transform: none;
  }
}
.gm-promptcard {
  min-height: 3.2em;
  font: 700 1.2rem/1.4 var(--sans);
  background: var(--blue-soft);
  border-radius: 16px;
  padding: 12px 16px;
  margin: 14px 0 0;
}
.gm-promptcard:empty {
  display: none;
}
.gm-diceline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font: 700 1.15rem var(--sans);
  margin: 12px 0 0;
}

/* result */
.gm-end {
  text-align: center;
}
.gm-end h2 {
  margin-top: 4px;
}
.gm-stars {
  font-size: 3rem;
  line-height: 1;
  margin: 6px 0;
  color: #c8cbd2;
}
.gm-stars .on {
  color: var(--yellow);
  text-shadow: 0 0 0 var(--ink);
  -webkit-text-stroke: 2px var(--ink);
}
.gm-endmsg {
  font: 600 1.2rem var(--sans);
}
.gm-end .gm-actions {
  justify-content: center;
}

/* wiggles only when motion is fine */
@media (prefers-reduced-motion: no-preference) {
  .gm-pic.ok,
  .gm-choice.ok,
  .gm-sortcard.fade,
  .gm-gap.fade,
  .gm-word.fade {
    animation: gm-pop 0.35s ease-out;
  }
}
@keyframes gm-pop {
  0% {
    transform: scale(0.94);
  }
  60% {
    transform: scale(1.04);
  }
  100% {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gmt-wheel {
    transition: none !important;
  }
}

/* small screens */
@media (max-width: 480px) {
  .gm-card {
    padding: 14px;
    border-radius: 22px;
  }
  .gm-dice {
    gap: 6px;
  }
  .gm-die {
    min-height: 150px;
  }
  .gm-slot {
    width: 34px;
    height: 50px;
    font-size: 1.8rem;
  }
  .gm-ladder li {
    font-size: 1.5rem;
  }
}

/* ------------------------------ classroom tools ------------------------------ */
.gmt-wrap {
  max-width: 1100px;
}
.gmt {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 24px;
  padding: 20px;
  margin: 18px 0;
}
@media (min-width: 860px) {
  .gmt {
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  }
  .gmt .gmt-stage.wide {
    grid-column: 2;
  }
  .gmt-noise,
  .gmt-noise.gmt {
    grid-template-columns: 1fr;
  }
  .gmt-noise .gmt-stage.wide {
    grid-column: 1;
  }
}
.gmt-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 340px;
  text-align: center;
}
.gmt-stage.wide {
  align-items: stretch;
}
.gmt-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
.gmt-side label,
.gmt-side h3 {
  font: 800 1rem var(--sans);
  margin: 4px 0 0;
}
.gmt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.gmt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 22px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 800 1.1rem var(--sans);
  cursor: pointer;
}
.gmt-btn:hover {
  background: var(--bg-alt);
}
.gmt-btn[aria-pressed="true"] {
  background: var(--yellow);
}
.gmt-btn.gmt-main {
  background: var(--ink);
  color: #fff;
  font-size: 1.4rem;
  min-height: 64px;
  padding: 12px 34px;
}
.gmt-btn.gmt-main:hover {
  background: #000;
}
.gmt-btn[disabled] {
  opacity: 0.5;
  cursor: default;
}
.gmt button:focus-visible,
.gmt input:focus-visible,
.gmt select:focus-visible,
.gmt textarea:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 3px;
}
.gmt-ta {
  width: 100%;
  min-height: 180px;
  padding: 12px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  font: 600 1.1rem/1.5 var(--sans);
  resize: vertical;
}
.gmt-sel,
.gmt-num {
  min-height: 48px;
  padding: 6px 12px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  font: 700 1.1rem var(--sans);
  background: #fff;
}
.gmt-num {
  width: 6.5em;
}
.gmt-note {
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin: 0;
}
.gmt-check {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
}
.gmt-check input {
  width: 24px;
  height: 24px;
}
.gmt-big {
  font: 800 clamp(2.6rem, 9vw, 6rem)/1.05 var(--display);
  min-height: 1.2em;
  word-break: break-word;
}
.gmt-big.small {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}
.gmt-big.pop {
  animation: gm-pop 0.4s ease-out;
}
.gmt-hist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.gmt-hist li {
  background: var(--bg-alt);
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 14px;
  font-weight: 700;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.gmt-stage h3 {
  margin: 6px 0 0;
  font-size: 1rem;
}
.gmt:fullscreen {
  background: #fff;
  padding: 4vmin;
  align-content: center;
}
.gmt:fullscreen .gmt-side {
  display: none;
}
.gmt:fullscreen .gmt-stage {
  min-height: 60vh;
}
.gmt:fullscreen .gmt-big {
  font-size: clamp(3rem, 14vw, 12rem);
}
.gmt:fullscreen .gmt-digits {
  font-size: clamp(5rem, 22vw, 20rem);
}
.gmt:fullscreen .gmt-panel {
  min-height: 70vh;
}

/* timer */
.gmt {
  --gmt-fill: var(--blue);
}
.gmt-ring {
  width: min(60vw, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 4px solid var(--ink);
  position: relative;
}
.gmt-ring::after {
  content: "";
  position: absolute;
  inset: 14%;
  background: #fff;
  border-radius: 50%;
  border: 4px solid var(--ink);
}
.gmt-digits {
  font: 800 clamp(4rem, 14vw, 8rem)/1 var(--display);
  font-variant-numeric: tabular-nums;
}
.gmt-state {
  font: 800 1.4rem var(--sans);
  margin: 0;
  min-height: 1.5em;
}
.gmt.up {
  --gmt-fill: var(--green);
}
.gmt.up .gmt-digits,
.gmt.up .gmt-state {
  color: var(--green);
}

/* dice */
.gmt-dicearea {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  min-height: 140px;
}
.gmt-die {
  width: 120px;
  height: 120px;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: #fff;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  padding: 14px;
  box-shadow: 0 6px 0 rgba(18, 18, 18, 0.18);
}
.gmt-die i {
  width: 100%;
  height: 100%;
  max-width: 26px;
  max-height: 26px;
  margin: auto;
  border-radius: 50%;
  background: var(--ink);
}
.gmt-die.num {
  display: grid;
  place-items: center;
  font: 800 3rem var(--display);
  padding: 0;
}
.gmt-dicearea.shake .gmt-die {
  transform: rotate(6deg);
}
@media (prefers-reduced-motion: reduce) {
  .gmt-dicearea.shake .gmt-die {
    transform: none;
  }
}

/* wheel */
.gmt-wheelbox {
  width: 100%;
  max-width: 460px;
}
.gmt-wheelbox svg {
  width: 100%;
  height: auto;
  display: block;
}
.gmt-wheel {
  transform-origin: 0 0;
  transform-box: view-box;
}

/* noise card */
.gmt-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 380px;
  border-radius: 24px;
  border: 4px solid var(--ink);
  padding: 24px;
  text-align: center;
}
.gmt-panel.red {
  background: #c23a31;
  color: #fff;
}
.gmt-panel.amber {
  background: var(--yellow);
  color: var(--ink);
}
.gmt-panel.green {
  background: var(--green);
  color: #fff;
}
.gmt-bigword {
  font: 800 clamp(3rem, 12vw, 8rem)/1 var(--display);
}
.gmt-sub {
  font: 700 clamp(1.3rem, 3.4vw, 2.2rem) var(--sans);
  margin: 0;
  max-width: 28ch;
}
.gmt-levelbars {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  height: 70px;
}
.gmt-levelbars i {
  width: 26px;
  border: 4px solid currentColor;
  border-radius: 6px;
  height: 24px;
  opacity: 0.5;
}
.gmt-levelbars i:nth-child(2) {
  height: 46px;
}
.gmt-levelbars i:nth-child(3) {
  height: 70px;
}
.gmt-levelbars i.on {
  background: currentColor;
  opacity: 1;
}

/* groups */
.gmt-groups {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.gmt-group {
  border: 4px solid var(--ink);
  border-radius: 18px;
  padding: 12px 16px;
  background: #fff;
  text-align: left;
}
.gmt-group h3 {
  margin: 0 0 6px;
  font: 800 1.3rem var(--display);
}
.gmt-group ul {
  margin: 0;
  padding-left: 1.1em;
  font: 700 1.25rem/1.5 var(--sans);
}
.gmt-group.c0 {
  background: var(--red-soft);
}
.gmt-group.c1 {
  background: var(--yellow-soft);
}
.gmt-group.c2 {
  background: var(--blue-soft);
}
.gmt-group.c3 {
  background: var(--green-soft);
}
.gmt-group.c4 {
  background: #f4e9fb;
}
.gmt-group.c5 {
  background: #e4f4f6;
}
@media print {
  header.top,
  footer,
  .gmt-side,
  .gmt-row,
  .crumbs,
  .jump,
  .gm-grownups {
    display: none !important;
  }
  .gmt-stage.wide {
    grid-column: 1;
  }
  .gmt {
    border: 0;
  }
}
.gmt > * {
  min-width: 0;
}

/* QA3 a11y: kid strand rule, motion only under no-preference */
@media (prefers-reduced-motion: reduce) {
  .gm-die.spin,
  .gmt-big.pop {
    animation: none;
  }
}
