:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #242046;
  background: #f7f4ff;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.masthead {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.masthead a { color: #503096; font-weight: 800; text-decoration: none; }
.masthead p, .progress { color: #625779; font-size: .9rem; }
.masthead p { margin: 0; }
main { max-width: 760px; padding: 0 18px 36px; margin: auto; }
h1 { margin: 18px 0 12px; font-size: clamp(1.7rem, 3.9vw, 2.8rem); line-height: 1.1; }
h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 2rem); }
button {
  background: #ffffff;
  color: #302748;
  border: 2px solid #d5c9f3;
  min-height: 48px;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  padding: 8px 13px;
  cursor: pointer;
}
button[aria-pressed="true"] { background: #5934a2; color: white; border-color: #5934a2; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #7447ca; outline-offset: 3px; }
button:disabled { opacity: .56; cursor: default; }
.modes, .choices, .navigation, .audio-controls { display: flex; flex-wrap: wrap; gap: 10px; }
article { background: white; border: 1px solid #dfd6f2; border-radius: 22px; margin-top: 16px; padding: 14px; }
.stage {
  min-height: 180px;
  border-radius: 16px;
  padding: 6px 12px;
  background: #eadbff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 5vw, 30px);
}
.stage[data-scene="2"] { background: #d9f4f4; }
.stage[data-scene="3"] { background: #f6e8d1; }
.stage[data-scene="4"] { background: #e3dcff; }
.stage img { width: min(41%, 200px); height: 165px; object-fit: contain; }
.objects { font-size: clamp(1.9rem, 9vw, 4.5rem); letter-spacing: .03em; }
.progress { margin: 12px 0 4px; font-weight: 750; }
.scene-text { font-size: 1.08rem; line-height: 1.48; margin: 8px 0 12px; }
.choices { margin: 12px 0; }
.choices button { flex: 1; background: #fbf8ff; font-size: clamp(2.4rem, 9vw, 4rem); min-height: 85px; }
.navigation { justify-content: space-between; }
.navigation button { font-size: 1.5rem; min-width: 54px; }
.audio-controls { margin-top: 12px; }
#audio-status, #feedback { margin: 8px 0; min-height: 0; font-weight: 650; }
#feedback:empty, #audio-status:empty { display: none; }
details { margin-top: 16px; }
summary { cursor: pointer; }
@media (max-width: 400px) {
  .masthead, main { padding-inline: 12px; }
  article { padding: 10px; }
  .stage { min-height: 130px; }
  .stage img { height: 125px; }
}
.stage[data-scene="1"] { padding: 0; overflow: hidden; }
.stage[data-scene="1"] img { display: block; width: 100%; height: auto; max-height: 340px; }
