.audience {
  height: auto;
  min-height: 100dvh;
  overflow: auto;
}
.audience .stage-surface {
  min-width: 0;
}
.audience .stage-bottom {
  position: static;
}
.audience fieldset {
  border: 0;
  padding: 0;
  margin: 1rem 0;
}
.audience fieldset div {
  position: relative;
  margin: 0.5rem 0;
}
.audience label {
  display: block;
  padding: 0.7rem 0.7rem 0.7rem 2.2rem;
  border: 1px solid var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 400;
}
.audience input[type="radio"] {
  position: absolute;
  top: 50%;
  left: 0.65rem;
  transform: translateY(-50%);
  width: auto;
  margin: 0;
}
.audience input:focus-visible + label {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.audience #build-signal:empty {
  display: none;
}
.audience button {
  font: inherit;
  padding: 0.6rem 1.2rem;
}
.audience [data-mode="poll"] {
  max-width: 48rem;
  width: 100%;
  margin: auto;
}
@media (max-width: 600px) {
  .audience .stage-surface {
    padding: 20px;
  }
  .audience .stage-surface h1 {
    font-size: 2rem;
  }
  .audience .stage-copy {
    font-size: 1.1rem;
  }
  .audience .stage-top,
  .audience .stage-bottom {
    padding: 12px 20px;
  }
  .audience .diagram {
    overflow: auto;
  }
  .audience .stage-surface iframe {
    height: 60vh;
  }
}
#student-feedback {
  border-top: 1px solid #aaa;
  padding: 12px 0;
  margin: 12px 0;
}
#student-feedback > summary {
  cursor: pointer;
  font-size: 18px;
}
#student-feedback label {
  display: block;
  margin: 12px 0 6px;
}
#student-feedback textarea {
  display: block;
  width: 100%;
  min-height: 80px;
  font: 18px/1.4 sans-serif;
  padding: 8px;
}
#student-feedback p {
  font-size: 14px;
}
#student-feedback button {
  font: inherit;
  padding: 8px 12px;
}

/* Audience-only controls flow below the shared slide layout. */
.audience.stage > .stage-bottom:has(#slide-number) {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.audience.stage > .stage-bottom:has(#build-signal[hidden]):has(#slide-number) {
  grid-template-columns: minmax(0, 1fr) auto;
}
@media (max-width: 600px) {
  .audience.stage {
    --slide-unit: 8px;
    padding: 12px 20px;
  }
  .audience.stage #stage-content > h1 {
    font-size: 2rem;
  }
  .audience.stage #stage-content > h1.chapter-divider {
    font-size: 4rem;
  }
  .audience.stage .chapter-divider + .stage-copy {
    max-width: none;
  }
  .audience.stage .stage-copy:has(pre code):has(> h3),
  .audience.stage .stage-copy:has(> p > img):has(> blockquote) {
    display: block;
  }
  .audience.stage .stage-copy pre:has(code) {
    overflow-x: auto;
  }
  .audience.stage .stage-copy > p:only-child > img {
    height: auto;
  }
}
