/* Studio Momo — paper, ink, and a little stage magic. */
:root {
  --ink: #30263c;
  --purple: #704ba2;
  --violet: #a67bcf;
  --cream: #fff9ec;
  --mango: #ffc45c;
}
body {
  background: #f8f1e4;
  color: var(--ink);
  background-image: radial-gradient(#a9855810 0.8px, transparent 0.8px);
  background-size: 7px 7px;
}
.app {
  min-height: 100svh;
}
header {
  height: 76px;
  padding: 12px 3.3vw;
  border-bottom: 1px solid #49344b13;
}
.brand {
  font-size: 26px;
  line-height: 1;
  letter-spacing: -1.3px;
  color: #483050;
}
.brand small {
  color: #806c7b;
  font-size: 9px;
  margin-top: 8px;
  letter-spacing: 2.5px;
}
.tools {
  gap: 5px;
}
.tool {
  background: transparent;
  border: 1px solid #715b701a;
  border-radius: 10px;
  min-height: 38px;
  padding: 8px 11px;
  font-size: 11px;
  font-weight: 800;
  color: #725e73;
  box-shadow: none;
}
.tool:hover {
  background: #fffaf1;
  border-color: #90729e55;
}
button:focus-visible {
  outline: 4px solid #ef9b31;
  outline-offset: 4px;
}
.studio {
  grid-template-columns: minmax(300px, 0.79fr) minmax(0, 1.21fr);
  padding: 18px 3.3vw 20px;
  gap: 3.2vw;
  max-width: 1600px;
  min-height: 0;
  align-items: center;
}
.copy {
  padding: 5px 0 8px;
  position: relative;
  z-index: 2;
}
.eyebrow {
  color: #806587;
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 1000;
  gap: 9px;
}
.eyebrow:before {
  width: 19px;
  height: 3px;
  background: #ecaa4d;
}
h1 {
  font-size: clamp(38px, 4.35vw, 65px);
  font-weight: 1000;
  line-height: 1.06;
  letter-spacing: -2.1px;
  margin: 19px 0 19px;
  color: #3c2949;
  text-wrap: balance;
}
p.lead {
  font-size: clamp(19px, 1.85vw, 26px);
  line-height: 1.5;
  color: #6d596c;
  max-width: 490px;
  margin-bottom: 22px;
}
.actions {
  gap: 12px;
  margin-top: 25px;
}
.primary,
.choice {
  border-radius: 16px;
  font-size: 19px;
  font-weight: 1000;
  min-height: 60px;
  padding: 15px 23px;
  box-shadow:
    0 5px 0 #4b2c6d,
    0 10px 18px #53336213;
  background: #7950a8;
  color: #fffaf0;
  border: 2px solid #ffffff40;
}
.primary:hover,
.choice:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}
.choice {
  background: #ffc45c;
  color: #5c3c35;
  box-shadow:
    0 5px 0 #d49a3a,
    0 10px 18px #53336213;
}
.choice.alt {
  background: #e2cff5;
  color: #61417b;
  box-shadow:
    0 5px 0 #b292d0,
    0 10px 18px #53336213;
}
.tag.visible {
  font-size: 13px;
  background: #eee3f4;
  color: #705184;
  border-radius: 8px;
  padding: 8px 12px;
  letter-spacing: 0.4px;
}
.hint {
  border-left: 3px solid #bc9dd0;
  background: #ffffff85;
  border-radius: 0 10px 10px 0;
  padding: 12px 15px;
  color: #6e5a70;
  line-height: 1.5;
  font-size: 13px;
  max-height: 150px;
  margin-top: 24px;
}
.scene {
  height: min(630px, calc(100svh - 164px));
  min-height: 390px;
  max-height: none;
  width: 100%;
  aspect-ratio: auto;
  border: 7px solid #fffcf4;
  border-radius: 28px 28px 95px 28px;
  background: #d9c4e9;
  box-shadow:
    0 1px 0 1px #80648625,
    0 12px 0 -3px #d7cbbf,
    0 25px 35px -18px #59435d45;
  isolation: isolate;
}
.scene:before {
  background: linear-gradient(180deg, #fff4d51a, transparent 50%, #71463717);
  z-index: 0;
  pointer-events: none;
}
.set-backdrop {
  position: absolute;
  inset: 0;
  background: url("assets/studio-set.jpg") center/cover;
  z-index: -2;
  transition:
    filter 0.7s,
    opacity 0.7s;
}
.floor {
  display: none;
}
.halo {
  position: absolute;
  width: 68%;
  height: 76%;
  aspect-ratio: auto;
  border-radius: 48% 48% 38% 38%;
  top: 10%;
  background: radial-gradient(ellipse, #fff9db65, transparent 70%);
  opacity: 1;
  z-index: -1;
}
.performer {
  position: absolute;
  width: 66%;
  height: 78%;
  bottom: 9%;
  left: 17%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2;
  transform-origin: 50% 90%;
}
.performer .momo {
  width: 100%;
  height: 100%;
  max-height: none;
  position: relative;
  margin: 0;
  object-fit: contain;
  animation: none;
  filter: drop-shadow(0 12px 6px #61406426);
  transition:
    filter 0.8s,
    opacity 0.8s;
  transform-origin: 50% 88%;
  align-self: auto;
}
.ground-shadow {
  position: absolute;
  bottom: 10%;
  left: 31%;
  width: 38%;
  height: 5%;
  border-radius: 50%;
  background: #603f6c25;
  filter: blur(6px);
  z-index: 1;
}
.bubble {
  top: 5%;
  right: 5%;
  max-width: 65%;
  font-size: clamp(17px, 1.8vw, 25px);
  line-height: 1.2;
  padding: 16px 21px;
  background: #fffdf4;
  border: 2px solid #6d4d7620;
  border-radius: 23px 23px 23px 3px;
  box-shadow: 0 5px 0 #6d4d7615;
  color: #725184;
  z-index: 5;
}
.prop {
  left: 5%;
  bottom: 6%;
  width: 110px;
  height: 120px;
  z-index: 4;
  display: grid;
  place-items: center;
  color: #704ba2;
}
.star {
  bottom: 6%;
  right: 6%;
  color: #fff7cc;
  font-size: 35px;
  text-shadow: 0 2px #b79756;
  z-index: 3;
}
.unrevealed .performer {
  opacity: 0;
}
.unrevealed .prop {
  width: 180px;
  height: 210px;
  left: calc(50% - 90px);
  bottom: 23%;
}
.unrevealed .mystery {
  display: grid;
  place-items: center;
  width: 160px;
  height: 180px;
  font-size: 105px;
  background: #fff4d9;
  color: #8d65b1;
  border: 3px dashed #ac88c9;
  border-radius: 70px 70px 23px 23px;
  box-shadow: 0 12px 0 #8c64a626;
  transform: rotate(-7deg);
}
.horn-sketch .set-backdrop {
  filter: saturate(0.5);
  opacity: 0.55;
}
.horn-sketch .halo {
  width: 74%;
  height: 85%;
  top: 5%;
  border-radius: 5px 12px 8px 5px;
  background: repeating-linear-gradient(
    0deg,
    #fffdf3 0 25px,
    #d6d4dc 26px,
    #fffdf3 27px
  );
  border: 1px solid #c7bbcd;
  box-shadow:
    9px 10px 0 #a690b329,
    0 15px 25px #5f45661f;
  transform: rotate(-5deg);
}
.horn-sketch .performer .momo {
  filter: grayscale(1) sepia(0.14) contrast(0.75);
  opacity: 0.8;
}
.horn-count {
  gap: 8px;
  margin: 16px 0;
  font-size: 18px;
}
.horn-count span {
  background: #fffdf5;
  color: #9b849e;
  border-color: #c2accb;
  padding: 6px 15px;
  border-radius: 10px;
}
.horn-count .done {
  background: #ffe0a1;
  color: #7a5233;
  border-color: #efb95d;
}
.sleep {
  background: #484466;
}
.sleep .set-backdrop {
  filter: brightness(0.48) saturate(0.65) hue-rotate(12deg);
}
.sleep:before {
  background:
    radial-gradient(circle at 85% 15%, #fff4c030 0 6%, transparent 6.2%),
    radial-gradient(circle at 15% 21%, #fff4cf 0 2px, transparent 3px),
    radial-gradient(circle at 71% 35%, #fff4cf 0 2px, transparent 3px),
    radial-gradient(circle at 34% 9%, #fff4cf 0 2px, transparent 3px),
    linear-gradient(#36335266, #50446b18);
}
.sleep .halo {
  background: radial-gradient(ellipse, #c0a9db30, transparent 70%);
}
.sleep .performer .momo {
  filter: drop-shadow(0 10px 5px #261b4433) saturate(0.8);
}
.sleep .bubble {
  color: #76668f;
  background: #f1eafc;
}
.step-6 .halo {
  background: radial-gradient(ellipse, #ffe299aa, transparent 70%);
}
.push {
  width: 100px;
  height: 100px;
  font-size: 17px;
  border: 6px solid #fff2d4;
  box-shadow:
    0 10px 0 #ad533f,
    0 16px 16px #53336228;
  background: #ee8861;
  color: #fffaf0;
}
.vote-icons {
  font-size: 51px;
  line-height: 1.2;
  color: #76548c;
}
.step-7:after {
  content: "✦ · ✧";
  position: absolute;
  top: 8%;
  left: 7%;
  color: #fff6c0;
  font-size: 40px;
  letter-spacing: 12px;
  transform: rotate(-12deg);
}
.step-8 .halo {
  background: url("assets/dunia-momo.jpg") center/cover;
  width: 87%;
  height: 72%;
  top: 8%;
  border: 7px solid #fffdf3;
  border-radius: 10px;
  transform: rotate(-4deg);
  opacity: 1;
  box-shadow: 0 12px 20px #52386133;
  z-index: 0;
}
.step-8 .performer {
  width: 46%;
  height: 59%;
  left: 51%;
  bottom: 1%;
}
.step-8 .performer .momo {
  width: 100%;
  margin: 0;
}
.step-8 .ground-shadow {
  left: 57%;
  bottom: 4%;
  width: 31%;
}
.step-8 .bubble {
  top: 6%;
}
footer {
  padding: 12px 3.3vw 15px;
  min-height: 65px;
}
.nav button {
  border: 1px solid #9e849a30;
  border-radius: 10px;
  font-size: 12px;
  min-height: 39px;
  padding: 8px 15px;
  color: #775d7b;
}
#next {
  background: #eee4ef;
  border-color: #d9c7e2;
  color: #68467d;
}
.cue {
  color: #9e8e9c;
  font-size: 9px;
  letter-spacing: 0.8px;
}
.steps {
  gap: 6px;
}
.dot {
  width: 6px;
  height: 6px;
  background: #b9a9bb66;
}
.dot.active {
  background: #966fb8;
  width: 23px;
}
.game-bar {
  background: #704ba2;
}
@media (min-width: 761px) and (max-height: 760px) {
  h1 {
    font-size: clamp(37px, 4vw, 53px);
  }
  p.lead {
    font-size: 21px;
    line-height: 1.45;
  }
  .scene {
    height: calc(100svh - 151px);
    min-height: 350px;
  }
  .studio {
    padding-top: 12px;
    padding-bottom: 15px;
    gap: 3vw;
  }
  .actions {
    margin-top: 20px;
  }
  .primary,
  .choice {
    font-size: 18px;
    min-height: 58px;
    padding: 13px 18px;
  }
  .hint {
    font-size: 12px;
    max-height: 112px;
    margin-top: 16px;
  }
}
@media (min-width: 761px) and (max-width: 1080px) {
  .studio {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 2.8vw;
  }
  .tools {
    gap: 3px;
  }
  .tool {
    font-size: 10px;
    padding: 7px 8px;
  }
  h1 {
    font-size: 43px;
  }
  p.lead {
    font-size: 21px;
  }
  .primary,
  .choice {
    font-size: 17px;
    padding: 13px 17px;
  }
}
@media (max-width: 760px) {
  header {
    height: auto;
    min-height: 78px;
    padding: 15px 5vw;
    align-items: center;
    gap: 12px;
  }
  .brand {
    font-size: 23px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 1.8px;
  }
  .tools {
    max-width: 62%;
    gap: 4px;
  }
  .tool {
    font-size: 9px;
    padding: 6px 8px;
    min-height: 30px;
    border-radius: 7px;
  }
  .studio {
    display: flex;
    flex-direction: column;
    padding: 10px 5vw 12px;
    gap: 25px;
  }
  .scene {
    height: clamp(300px, 48svh, 500px);
    min-height: 300px;
    max-width: 600px;
    max-height: none;
    border-width: 5px;
    border-radius: 22px 22px 65px 22px;
    aspect-ratio: auto;
  }
  .copy {
    order: 2;
    width: 100%;
    padding: 0;
  }
  h1 {
    font-size: 38px;
    letter-spacing: -1.4px;
    margin: 12px 0;
  }
  p.lead {
    font-size: 20px !important;
    line-height: 1.45;
    max-width: none;
    margin-bottom: 15px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .actions {
    margin-top: 18px;
  }
  .primary,
  .choice {
    min-height: 57px;
    font-size: 17px;
    padding: 13px 19px;
  }
  .prop {
    transform: scale(0.75);
    transform-origin: left bottom;
  }
  .bubble {
    font-size: 18px;
    right: 4%;
    top: 5%;
    max-width: 65%;
    padding: 12px 16px;
  }
  .hint {
    font-size: 12px;
    max-height: 180px;
  }
  footer {
    padding: 17px 5vw;
    flex-wrap: wrap;
    gap: 17px;
  }
  .cue {
    display: none;
  }
  .steps {
    margin-left: auto;
  }
  .unrevealed .prop {
    transform: scale(0.8);
    transform-origin: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .set-backdrop {
    transition: none;
  }
}
.prop svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 5px 2px #563b6120);
}
.stage-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, #fff4c421, transparent 65%);
  z-index: 0;
}
.stage-wings {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
.stage-wings:before,
.stage-wings:after {
  content: "";
  position: absolute;
  top: 0;
  width: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    #61416f 0,
    #7b528a 18px,
    #533960 35px
  );
  box-shadow: 8px 2px 18px #40274733;
  transition: width 0.8s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.stage-wings:before {
  left: 0;
  border-radius: 0 0 45% 0;
}
.stage-wings:after {
  right: 0;
  border-radius: 0 0 0 45%;
  transform: scaleX(-1);
}
.unrevealed .stage-wings:before,
.unrevealed .stage-wings:after {
  width: 29%;
}
.unrevealed .prop {
  z-index: 7;
}
.unrevealed .prop .mystery {
  background: none;
  border: none;
  box-shadow: none;
  transform: none;
  width: 100%;
  height: 100%;
}
@media (prefers-reduced-motion: reduce) {
  .stage-wings:before,
  .stage-wings:after {
    transition: none;
  }
}
.tool {
  min-height: 44px;
}
.horn-sketch .prop {
  inset: auto auto 6% 5%;
  width: 110px;
  height: 120px;
  transform: rotate(-8deg);
}
.horn-sketch .prop svg {
  width: 100%;
  height: 100%;
}
@media (min-width: 761px) {
  .studio {
    flex: 1 1 auto;
  }
  footer {
    padding-top: 7px;
    padding-bottom: 10px;
    min-height: 55px;
  }
}
@media (max-width: 760px) {
  .tool {
    min-height: 44px;
  }
  header {
    align-items: flex-start;
  }
  .tools {
    max-width: 66%;
  }
  .scene {
    height: clamp(300px, 45svh, 500px);
  }
}
.unrevealed .halo {
  width: 65%;
  height: 83%;
  top: 6%;
  background: linear-gradient(140deg, #fff7dfbc, #e8c7f1a0);
  border: 2px dashed #fff8eaaa;
  border-radius: 48% 48% 28% 28%;
  box-shadow: 0 14px 30px #593f6620;
}
.unrevealed .performer .momo {
  opacity: 0.28;
  filter: grayscale(0.7) blur(1px);
}
.unrevealed .prop {
  left: calc(50% - 45px);
  bottom: 9%;
  width: 90px;
  height: 90px;
}
.unrevealed .prop .mystery {
  width: 90px;
  height: 90px;
  font-size: 62px;
  background: #fff4d7;
  border: 3px solid #fff9e9;
  border-radius: 50%;
  box-shadow: 0 5px 0 #805f9940;
}
@media (min-width: 761px) and (max-height: 800px) {
  .scene {
    height: calc(100svh - 165px);
  }
  .studio {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  footer {
    min-height: 51px;
    padding-top: 5px;
    padding-bottom: 7px;
  }
}
.unrevealed .performer {
  filter: drop-shadow(0 0 3px #ffe8a5);
}
.unrevealed .performer .momo,
.unrevealed .performer .momo-rig {
  opacity: 1 !important;
  filter: brightness(0) saturate(100%) invert(22%) sepia(18%) saturate(1731%)
    hue-rotate(227deg) brightness(89%) contrast(89%);
}
.unrevealed .halo {
  background: radial-gradient(ellipse, #ffe0a35c, transparent 70%);
  border: 0;
  box-shadow: none;
}
#scene.unrevealed .performer {
  visibility: visible;
}
#scene.unrevealed .rig-ready img.momo {
  opacity: 0 !important;
}
#scene.unrevealed .performer {
  opacity: 1;
}
#scene.scene.unrevealed .performer {
  visibility: visible;
  opacity: 1;
}

/* V5 — the classroom sees a theatre, with the presenter beside the stage. */
header {
  border-bottom: 1px solid #87668913;
}
.scene {
  border-radius: 24px 24px 64px 24px;
}
.set-backdrop {
  filter: saturate(0.85);
}
.stage-light {
  background: radial-gradient(
    ellipse at 50% 42%,
    #fff9e557 0%,
    #fff0c010 43%,
    #42304d17 100%
  );
}
.scene .star {
  opacity: 0.6;
  font-size: 32px;
}
.horn-sketch .halo {
  background: repeating-linear-gradient(
    0deg,
    #fffdf4 0 29px,
    #dcd8e3 30px,
    #fffdf4 31px
  );
  border: 7px solid #fffdf6;
  box-shadow:
    8px 10px 0 #bba8c44a,
    0 18px 30px #4e385a22;
}
.step-7 .stage-light {
  background: radial-gradient(
    ellipse at 50% 35%,
    #fff9d39e,
    #ffdf7040 48%,
    #b87f5f1a
  );
}
.step-9 .set-backdrop {
  filter: saturate(0.7) brightness(0.87);
}
.step-9 .stage-light {
  background: radial-gradient(
    ellipse at 50% 48%,
    #fff5c98c 0%,
    #ffe8b533 44%,
    #54356530 100%
  );
}
.step-9 .bubble {
  background: #fff7da;
  color: #64417e;
}

@media (min-width: 761px) {
  .app {
    height: 100svh;
    min-height: 0;
  }
  header {
    height: 64px;
    min-height: 64px;
    padding: 8px 3vw;
  }
  .brand {
    font-size: 24px;
  }
  .brand small {
    font-size: 8px;
    letter-spacing: 2.4px;
  }
  .tools {
    gap: 5px;
  }
  .tool {
    padding: 8px 10px;
    font-size: 10px;
    border-color: transparent;
  }
  .tool:hover {
    border-color: #90729e45;
  }
  .studio {
    flex: 1;
    min-height: 0;
    padding: 14px 3vw 16px;
  }
  .scene {
    height: 100%;
    min-height: 0;
  }
  footer {
    flex: 0 0 48px;
    min-height: 48px;
    padding: 4px 3vw 9px;
  }
  .nav button {
    min-height: 36px;
  }
  .studio:has(.has-circuit) {
    grid-template-columns: minmax(225px, 0.3fr) minmax(0, 1fr);
    gap: 24px;
    padding-left: 2.5vw;
    padding-right: 2.5vw;
  }
  .studio:has(.has-circuit) .copy {
    align-self: center;
  }
  .studio:has(.has-circuit) h1 {
    font-size: clamp(32px, 3vw, 43px);
    line-height: 1.08;
    letter-spacing: -1.4px;
    margin: 18px 0;
  }
  .studio:has(.has-circuit) p.lead {
    font-size: 19px;
    line-height: 1.42;
    margin-bottom: 14px;
  }
  .studio:has(.has-circuit) .eyebrow {
    font-size: 8px;
    letter-spacing: 1.3px;
    gap: 7px;
  }
  .studio:has(.has-circuit) .actions {
    gap: 10px;
    margin-top: 18px;
  }
  .studio:has(.has-circuit) .primary,
  .studio:has(.has-circuit) .choice {
    font-size: 17px;
    min-height: 54px;
    padding: 11px 17px;
  }
  .studio:has(.has-circuit) .tag {
    font-size: 11px;
    padding: 7px 9px;
  }
  .studio:has(.has-circuit) .hint {
    font-size: 11px;
    max-height: 122px;
    padding: 9px 11px;
    margin-top: 22px;
  }
  #scene.has-circuit {
    border-radius: 22px 22px 52px 22px;
    border-width: 6px;
    box-shadow:
      0 1px 0 1px #80648625,
      0 10px 0 -3px #d7cbbf,
      0 24px 32px -18px #59435d45;
  }
  #scene.has-circuit .set-backdrop {
    filter: brightness(0.69) saturate(0.62);
  }
  #scene.has-circuit .stage-light {
    background:
      radial-gradient(
        ellipse at 51% 34%,
        #fff7d995 0%,
        #ffedc73b 32%,
        #3d244c24 68%
      ),
      linear-gradient(0deg, #49334f33, transparent 53%);
  }
  #scene.has-circuit .halo {
    width: 63%;
    height: 62%;
    top: 0;
    left: 19%;
    background: radial-gradient(ellipse, #fff4c66e, transparent 69%);
    border: 0;
    box-shadow: none;
  }
  #scene.has-circuit .star {
    display: none;
  }
  #scene.has-circuit .bubble {
    font-size: 20px;
    top: 6%;
    right: 4%;
    max-width: 33%;
    padding: 12px 17px;
    border-radius: 19px 19px 19px 2px;
  }
  #scene.has-circuit .ground-shadow {
    background: #2d19384a;
  }
}
@media (min-width: 761px) and (max-width: 1080px) {
  .studio:has(.has-circuit) {
    grid-template-columns: 225px minmax(0, 1fr);
    gap: 20px;
  }
  .studio:has(.has-circuit) h1 {
    font-size: 34px;
  }
  .studio:has(.has-circuit) p.lead {
    font-size: 18px;
  }
  .studio:has(.has-circuit) .primary,
  .studio:has(.has-circuit) .choice {
    font-size: 15px;
    padding: 10px 13px;
  }
  .studio:has(.has-circuit) .hint {
    max-height: 150px;
  }
}
@media (max-width: 760px) {
  header {
    padding: 10px 4vw;
    min-height: 96px;
    gap: 8px;
  }
  .brand {
    padding-top: 10px;
    font-size: 21px;
  }
  .brand small {
    font-size: 6px;
  }
  .tools {
    max-width: 63%;
    gap: 2px;
  }
  .tool {
    font-size: 8px;
    padding: 5px 7px;
    min-height: 44px;
  }
  .studio {
    padding: 8px 4vw 10px;
    gap: 19px;
  }
  .scene {
    height: clamp(270px, 36svh, 370px);
    min-height: 270px;
    border-radius: 20px 20px 45px 20px;
  }
  h1 {
    font-size: 30px;
    line-height: 1.08;
    margin: 10px 0;
    letter-spacing: -1px;
  }
  p.lead {
    font-size: 17px !important;
    line-height: 1.4;
    margin-bottom: 10px;
  }
  .actions {
    margin-top: 13px;
    gap: 9px;
  }
  .primary,
  .choice {
    font-size: 16px;
    min-height: 48px;
    padding: 10px 16px;
  }
  .hint {
    font-size: 10px;
    line-height: 1.4;
    max-height: 79px;
    margin-top: 15px;
    padding: 8px 10px;
  }
  footer {
    padding: 8px 4vw 12px;
    gap: 10px;
  }
  .nav button {
    min-height: 44px;
    padding: 8px 13px;
  }
  #scene.has-circuit .set-backdrop {
    filter: brightness(0.76) saturate(0.7);
  }
  #scene.has-circuit .stage-light {
    background: radial-gradient(ellipse at 50% 30%, #fff5d47a, transparent 65%);
  }
}
@media (min-width: 761px) {
  .studio {
    grid-template-rows: minmax(0, 1fr);
  }
  .studio:has(.has-circuit) .copy {
    max-height: 100%;
  }
  .studio:has(.has-circuit) .actions {
    gap: 9px;
    margin-top: 15px;
  }
  .studio:has(.has-circuit) .actions button {
    font-size: 16px;
    min-height: 49px;
    padding: 10px 15px;
  }
  .studio:has(.has-circuit) .hint {
    max-height: 112px;
    margin-top: 16px;
  }
  .studio:has(.step-7) h1 {
    font-size: clamp(30px, 2.8vw, 38px);
  }
  .studio:has(.step-7) p.lead {
    font-size: 18px;
  }
}
@media (max-width: 760px) {
  .studio {
    gap: 15px;
  }
  .scene {
    height: clamp(265px, 32svh, 340px);
    min-height: 265px;
  }
  .hint {
    max-height: 65px;
    margin-top: 10px;
  }
  .actions {
    gap: 7px;
  }
  .actions button {
    padding: 10px 13px;
    font-size: 15px;
  }
}

/* The phone is a presenter companion: keep the artwork and notes comfortable. */
@media (max-width: 760px) {
  .scene {
    height: clamp(300px, 41svh, 420px);
    min-height: 300px;
  }
  .tool {
    font-size: 10px;
    padding: 8px 9px;
  }
  .tools {
    max-width: 65%;
  }
  h1 {
    font-size: 32px;
  }
  p.lead {
    font-size: 18px !important;
  }
  .hint {
    max-height: 180px;
    font-size: 12px;
    line-height: 1.5;
    padding: 11px 13px;
    margin-top: 18px;
  }
  .actions button {
    min-height: 52px;
    font-size: 16px;
    padding: 11px 16px;
  }
  footer {
    padding-top: 16px;
    padding-bottom: 20px;
  }
}

/* Keep the entire leap inside its proscenium. No actor transforms live here. */
#scene.has-circuit .performer {
  height: 44%;
  bottom: 42%;
}
#scene.has-circuit .ground-shadow {
  bottom: 42%;
}
#scene.has-circuit[data-action="jump"] .stage-light {
  background: radial-gradient(
    ellipse at 50% 30%,
    #ffe69a9e,
    #ffc95424 37%,
    transparent 69%
  );
}
#scene.has-circuit[data-action="dance"] .stage-light {
  background: radial-gradient(
    ellipse at 50% 30%,
    #e8c5ff9e,
    #b68af324 37%,
    transparent 69%
  );
}
#scene.has-circuit[data-action="sleep"] .stage-light {
  background: radial-gradient(
    ellipse at 50% 30%,
    #c6d1ff8a,
    #6969b324 37%,
    #30274f33 80%
  );
}
.studio:has(.is-busy) .copy h1 {
  color: #6f5b78;
}
.studio:has(.is-busy) .copy .lead {
  color: #806d80;
}
.studio:has(.is-busy) .copy .actions button:disabled {
  opacity: 0.75;
}
@media (max-width: 760px) {
  #scene.has-circuit .performer {
    height: 46%;
    bottom: 42%;
  }
}
.studio.circuit-running .copy h1 {
  color: #6f5b78;
}
.studio.circuit-running .copy .lead {
  color: #806d80;
}
.studio.circuit-running .copy .actions button:disabled {
  opacity: 0.75;
}

/* Re-rendered controls retain a stable pointer target. */
.primary:hover,
.choice:hover {
  transform: none;
  filter: brightness(1.05);
}
.primary:active,
.choice:active {
  transform: none;
  filter: brightness(0.97);
}
#scene.has-circuit[data-performing="jump"] .stage-light {
  background: radial-gradient(
    ellipse at 50% 30%,
    #ffe69a9e,
    #ffc95424 37%,
    transparent 69%
  );
}
#scene.has-circuit[data-performing="dance"] .stage-light {
  background: radial-gradient(
    ellipse at 50% 30%,
    #e8c5ff9e,
    #b68af324 37%,
    transparent 69%
  );
}
#scene.has-circuit[data-performing="sleep"] .stage-light {
  background: radial-gradient(
    ellipse at 50% 30%,
    #c6d1ff8a,
    #6969b324 37%,
    #30274f33 80%
  );
}
/* kabel.css follows this sheet; reserve jump headroom with explicit scene specificity. */
#scene.scene.has-circuit .performer { height: 44%; bottom: 42%; }
#scene.scene.has-circuit .ground-shadow { bottom: 42%; }

/* Opening canvas is large enough to read from the back of a classroom. */
@media(min-width:761px){
 .studio:has(.paper-opening){grid-template-columns:minmax(250px,.65fr) minmax(0,1.35fr);gap:3vw;}
 .studio:has(.paper-opening) h1{font-size:clamp(36px,3.7vw,57px);}
 .studio:has(.paper-opening) .lead{font-size:clamp(21px,2vw,28px);}
}
#scene.paper-opening {border-radius:22px;border-color:#f6f0e6;}
@media(max-width:760px){#scene.paper-opening{height:clamp(330px,43svh,470px);}}
