.screen-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.screen-kid {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kid-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--sun);
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.screen-kid strong {
  display: block;
  font-size: 1.05rem;
}

.screen-kid small {
  color: var(--muted);
  font-weight: 700;
}

.rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rail-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
}

.rail-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--paper-alt);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}

.rail-step.is-done {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.rail-step.is-done .rail-dot {
  background: var(--teal);
  color: #FFFFFF;
}

.rail-step.is-now {
  border-color: var(--ink);
  background: var(--sun-soft);
}

.rail-step.is-now .rail-dot {
  background: var(--ink);
  color: var(--surface);
}

.stage {
  position: relative;
}

.game-card {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 5px 0 var(--line);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.game-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 2px dashed var(--line);
}

.game-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
}

.game-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.game-start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  padding: 16px 8px;
}

.game-start-copy {
  max-width: 46ch;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.game-prompt,
.game-say {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.game-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.game-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.game-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line);
}

.game-dots span.is-done {
  background: var(--teal);
}

.game-dots span.is-now {
  background: var(--coral);
  transform: scale(1.2);
}

.game-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(34, 48, 43, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.game-result-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 0 var(--ink);
}

.game-result-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
}

.game-result-card p {
  margin: 0 0 8px;
  color: var(--muted);
}

.stack-wrap {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(240px, 1.1fr);
  gap: 24px;
  align-items: center;
}

.stack-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.stack-pile {
  width: 100%;
  max-width: 240px;
  min-height: 100px;
  padding: 16px;
  background: var(--sun-soft);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 0 var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.stack-pile span {
  display: block;
  width: 56px;
  height: 14px;
  border-radius: 5px;
  background: var(--coral-art);
  border: 2px solid var(--ink);
}

.stack-pile em {
  font-style: normal;
  margin-top: 4px;
}

.stack-stage {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.stack-tower {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 3px;
  min-height: 210px;
  justify-content: flex-start;
}

.stack-block {
  width: 66px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--ink);
  transform: rotate(var(--tilt, 0deg));
}

.stack-floor {
  width: 180px;
  height: 8px;
  border-radius: 999px;
  background: var(--ink);
  margin-top: 6px;
}

.stack-count {
  margin: 10px 0 0;
  font-weight: 800;
}

.colors-wrap,
.longer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.color-grid {
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.color-swatch {
  min-height: 104px;
  border-radius: var(--radius-md);
  border: 2.5px solid var(--ink);
  background: var(--swatch);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: capitalize;
  box-shadow: 0 4px 0 var(--ink);
}

.color-swatch.is-right {
  outline: 4px solid var(--teal);
  outline-offset: 2px;
}

.color-swatch.is-wrong {
  opacity: 0.6;
}

.line-choices {
  width: 100%;
  max-width: 640px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.line-btn {
  min-height: 140px;
  padding: 20px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.line-btn .line {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: var(--ink);
}

.line-btn.is-right {
  background: var(--good-bg);
  border-color: var(--teal);
}

.line-btn.is-wrong {
  background: var(--alert-bg);
  border-color: var(--coral);
}

.cmd-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cmd-head,
.cmd-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.room {
  position: relative;
  min-height: 280px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 12px;
  align-items: center;
}

.room-chair {
  grid-column: 1 / -1;
  justify-self: center;
  padding: 10px 26px;
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  font-weight: 800;
}

.room-zone {
  min-height: 58px;
  background: var(--surface);
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-weight: 800;
  padding: 10px 14px;
}

.room-zone.is-hit {
  background: var(--good-bg);
  border-style: solid;
  border-color: var(--teal);
}

.room-zone.is-wrong {
  background: var(--alert-bg);
  border-color: var(--coral);
}

.room-paper {
  display: none;
}

.quiz-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.quiz-card {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quiz-art {
  display: flex;
  justify-content: center;
}

.art {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.art svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quiz-q {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  min-height: 54px;
  padding: 10px 16px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-weight: 800;
}

.quiz-option.is-right {
  background: var(--good-bg);
  border-color: var(--teal);
}

.quiz-option.is-wrong {
  background: var(--alert-bg);
  border-color: var(--coral);
}

.quiz-feedback {
  min-height: 24px;
  font-weight: 800;
  text-align: center;
}

.quiz-next {
  display: flex;
  justify-content: center;
}

.draw-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.draw-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.draw-tool-label {
  font-weight: 800;
  margin-right: 4px;
}

.ink-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  outline: 2px solid var(--line-strong);
  background: var(--c);
}

.ink-btn.is-active {
  outline: 3px solid var(--ink);
  transform: scale(1.06);
}

.draw-tool {
  min-height: 44px;
  padding: 6px 12px;
  background: var(--paper);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.draw-board {
  background: #FFFFFF;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  height: 300px;
  overflow: hidden;
}

.draw-canvas {
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.draw-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.draw-example {
  padding: 14px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.draw-example span {
  font-weight: 800;
}

.example-shape {
  width: 52px;
  height: 52px;
  position: relative;
}

.shape-circle {
  border: 5px solid var(--ink);
  border-radius: 50%;
}

.shape-plus::before,
.shape-plus::after {
  content: "";
  position: absolute;
  background: var(--ink);
  border-radius: 4px;
}

.shape-plus::before {
  width: 44px;
  height: 6px;
  left: 4px;
  top: 23px;
}

.shape-plus::after {
  width: 6px;
  height: 44px;
  left: 23px;
  top: 4px;
}

.judge-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.part-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.part-chip {
  min-height: 44px;
  padding: 6px 12px;
  background: var(--paper);
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  font-weight: 700;
}

.part-chip[aria-pressed="true"] {
  background: var(--teal);
  color: #FFFFFF;
  border-color: var(--teal);
}

.part-count {
  margin: 0;
  font-weight: 700;
}

.screen-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.screen-foot p {
  margin: 0;
}

.form-banner {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.form-banner p {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 60ch;
}

.form-progress {
  padding: 12px 18px;
  background: var(--sun-soft);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  text-align: center;
}

.form-progress strong {
  font-family: var(--font-display);
  font-size: 1.75rem;
}

.form-progress span {
  font-weight: 700;
}

.obs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.obs-item {
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.obs-item.is-answered {
  border-color: var(--teal);
}

.obs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.obs-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.obs-no {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
}

.method-tag {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.obs-toggle {
  display: inline-flex;
  gap: 8px;
}

.yn-btn {
  min-width: 76px;
  min-height: 44px;
  padding: 8px 16px;
  background: var(--paper);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-weight: 800;
}

.yn-yes[aria-pressed="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: #FFFFFF;
}

.yn-no[aria-pressed="true"] {
  background: var(--coral);
  border-color: #9A2F19;
  color: #FFFFFF;
}

.obs-q {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.obs-how {
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.92rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.obs-how p {
  margin: 0;
}

.form-foot {
  background: var(--paper-alt);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.form-foot-note {
  margin: 0;
  font-weight: 700;
}

.form-foot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 780px) {
  .stack-wrap,
  .draw-wrap {
    grid-template-columns: 1fr;
  }

  .draw-board {
    height: 260px;
  }
}

@media (max-width: 560px) {
  .game-card {
    padding: 18px;
  }

  .color-grid,
  .line-choices,
  .room {
    grid-template-columns: 1fr;
  }

  .obs-toggle {
    width: 100%;
  }

  .yn-btn {
    flex: 1 1 0;
  }
}
