@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,700;0,800;1,700&display=swap");
:root {
  --pink: #f77cbb;
  --gold: #fbd481;
  --cream: #fff3dd;
  --ink: #26153e;
  --muted: #c6b7cd;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: "DM Sans", system-ui, sans-serif;
  min-height: 100svh;
  overflow-x: hidden;
}
button,
a {
  touch-action: manipulation;
}
button {
  font: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}
header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 4vw;
  font-size: 12px;
  letter-spacing: 1px;
}
header a {
  color: var(--cream);
  text-decoration: none;
}
header button {
  border: 1px solid #ffffff40;
  background: #ffffff08;
  color: var(--cream);
  border-radius: 30px;
  padding: 10px 16px;
}
.on-air {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--pink);
}
.stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 38% 62%;
  max-width: 1250px;
  margin: 0 auto;
  min-height: calc(100svh - 150px);
  padding: 28px 40px 35px;
  align-items: center;
}
.scenery {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 65% 0%, #69305270, transparent 65%),
    radial-gradient(ellipse at 10% 40%, #a6387370, transparent 55%);
}
.mountain {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 38%;
  clip-path: polygon(
    0 65%,
    10% 35%,
    22% 64%,
    34% 15%,
    43% 50%,
    55% 10%,
    66% 44%,
    79% 0,
    92% 39%,
    100% 18%,
    100% 100%,
    0 100%
  );
  background: #5a536b40;
}
.mountain.front {
  height: 25%;
  transform: scaleX(-1);
  background: #8f7c9820;
}
.sun {
  position: absolute;
  left: 12%;
  top: 22%;
  width: 270px;
  height: 270px;
  border: 1px solid #fbd48120;
  border-radius: 50%;
  box-shadow:
    0 0 0 22px #fbd48105,
    0 0 0 50px #fbd48103;
}
.beam {
  position: absolute;
  top: -10%;
  width: 180px;
  height: 110%;
  background: linear-gradient(#ffeec815, transparent);
  transform: rotate(24deg);
  filter: blur(15px);
}
.beam.right {
  right: 8%;
  transform: rotate(-24deg);
}
.host {
  position: relative;
  text-align: center;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 35px;
}
.host img {
  width: 100%;
  max-height: 540px;
  object-fit: contain;
  filter: drop-shadow(0 14px 30px #13081780);
  animation: sway 6s ease-in-out infinite;
}
.host-stars {
  position: absolute;
  top: 9%;
  left: 4%;
  font-size: 64px;
  color: var(--gold);
  animation: twinkle 3s infinite;
}
.speech {
  background: var(--cream);
  color: var(--ink);
  border-radius: 18px;
  padding: 17px 22px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
  line-height: 1.4;
  position: relative;
  margin-top: -10px;
  box-shadow: 0 8px 25px #0002;
}
.speech:before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 13px solid var(--cream);
}
.host-label {
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 3px;
  margin-top: 16px;
}
.show {
  padding: 10px 0 10px 25px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow:before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--gold);
}
h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(42px, 6.5vw, 82px);
  letter-spacing: -2px;
  line-height: 1.03;
  margin: 20px 0 24px;
  font-weight: 800;
}
h1 em {
  color: var(--pink);
  font-weight: 700;
}
h1 .quiz-word {
  color: var(--gold);
  font-size: 0.7em;
  letter-spacing: 10px;
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
}
h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(25px, 3.1vw, 39px);
  line-height: 1.2;
  margin: 20px 0 24px;
}
.intro {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  max-width: 440px;
}
.details {
  display: flex;
  gap: 20px;
  margin: 26px 0;
  font-size: 11px;
  color: var(--gold);
}
.primary {
  background: var(--pink);
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  padding: 18px 28px;
  font-weight: 700;
  box-shadow: 0 4px 0 #ac407b;
  display: inline-flex;
  gap: 35px;
  align-items: center;
  min-height: 52px;
}
.primary:hover {
  background: #ffafd7;
}
.primary:active {
  transform: translateY(2px);
}
.small-note {
  font-size: 10px;
  color: var(--muted);
  margin-top: 22px;
  line-height: 1.6;
}
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.choice {
  color: var(--cream);
  text-align: left;
  padding: 20px;
  border: 1px solid #ffffff29;
  background: #ffffff06;
  border-radius: 10px;
  min-height: 72px;
  transition:
    background 0.2s,
    transform 0.2s;
}
.choice:hover:not(:disabled) {
  background: #ffffff15;
  transform: translateY(-2px);
}
.choice.selected {
  border-color: var(--pink);
  background: #f77cbb18;
}
.choice strong {
  display: block;
  font-size: 17px;
  margin-bottom: 5px;
}
.choice small {
  color: var(--muted);
  font-size: 12px;
}
.topics {
  margin: 24px 0;
}
.topics .choice {
  display: flex;
  gap: 15px;
  align-items: center;
}
.icon {
  font-size: 28px;
}
.topics .choice:last-child {
  grid-column: 1/-1;
}
.scoreboard {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.score {
  border: 1px solid #ffffff20;
  padding: 9px 13px;
  border-radius: 30px;
  font-size: 12px;
  color: var(--muted);
}
.score.active {
  border-color: var(--gold);
  color: var(--gold);
}
.question-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 1px;
}
.progress {
  height: 4px;
  border-radius: 4px;
  background: #ffffff15;
  margin: 18px 0;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--pink);
  transition: width 0.3s;
}
.answer {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}
.letter {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border: 1px solid #ffffff30;
  border-radius: 6px;
  color: var(--gold);
  font-size: 12px;
}
.answer.correct {
  border-color: #94dcb8;
  background: #3c866b40;
}
.answer.wrong {
  border-color: #f77cbb;
  background: #b8416740;
}
.answer:disabled {
  opacity: 0.6;
}
.answer.correct:disabled,
.answer.wrong:disabled {
  opacity: 1;
}
.feedback {
  margin-top: 20px;
  min-height: 45px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.feedback strong {
  color: var(--gold);
  display: block;
}
.feedback a {
  color: var(--pink);
  font-size: 11px;
}
.actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.secondary {
  padding: 14px 18px;
  border-radius: 8px;
  color: var(--cream);
  background: transparent;
  border: 1px solid #ffffff30;
  min-height: 48px;
}
.secondary:disabled {
  opacity: 0.35;
}
.bonus {
  color: var(--pink);
  font-weight: 700;
}
.results {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}
.results li {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #ffffff20;
  font-size: 18px;
}
.results b {
  color: var(--gold);
}
.trophy {
  font-size: 55px;
  margin: 18px 0;
}
footer {
  position: relative;
  z-index: 1;
  padding: 12px 4vw 22px;
  color: #c6b7cd90;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 9px;
  letter-spacing: 0.3px;
}
#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}
.confetto {
  position: absolute;
  top: -30px;
  font-size: 20px;
  animation: fall 2.4s ease-in forwards;
}
@keyframes fall {
  to {
    transform: translateY(110vh) rotate(600deg);
  }
}
@keyframes sway {
  50% {
    transform: translateY(-7px) rotate(1deg);
  }
}
@keyframes twinkle {
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}
@media (max-width: 720px) {
  header {
    padding: 15px 18px;
  }
  .on-air {
    display: none;
  }
  .stage {
    grid-template-columns: 1fr;
    padding: 8px 22px 30px;
    min-height: auto;
  }
  .host {
    padding: 0;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 15px;
    align-items: center;
    margin: 0 0 10px;
  }
  .host img {
    height: 155px;
    grid-column: 1;
    grid-row: 1;
  }
  .speech {
    grid-column: 2;
    grid-row: 1;
    font-size: 15px;
    margin: 0;
  }
  .speech:before,
  .host-label,
  .host-stars {
    display: none;
  }
  .show {
    padding: 12px 0;
  }
  h1 {
    font-size: 54px;
    margin: 15px 0;
  }
  .intro {
    font-size: 14px;
  }
  .details {
    margin: 20px 0;
    gap: 14px;
  }
  footer {
    display: block;
    padding: 15px 22px;
  }
  footer span {
    display: block;
    margin-top: 6px;
  }
  .choice {
    padding: 16px 12px;
  }
  .answer {
    font-size: 14px;
    gap: 10px;
  }
  h2 {
    font-size: 27px;
  }
  .host .speech {
    padding: 14px;
  }
  .sun {
    left: -80px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
  .confetto {
    display: none;
  }
}

dialog {
  max-width: min(90vw, 480px);
  padding: 30px;
  color: var(--cream);
  background: var(--ink);
  border: 1px solid var(--gold);
  border-radius: 16px;
}
dialog::backdrop {
  background: #150820c9;
}
dialog p {
  line-height: 1.6;
  color: var(--muted);
}

.voice-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.voice-controls .secondary {
  font-size: 11px;
  min-height: 38px;
  padding: 8px 15px;
}
.voice-controls span {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 260px;
}
.host.speaking .speech {
  box-shadow:
    0 0 0 3px #fbd48155,
    0 8px 25px #0002;
}
.porch-button {
  margin: 14px 0 0 12px;
  font-size: 12px;
}
.story-tag {
  color: var(--pink);
  font-size: 12px;
  letter-spacing: 1px;
}
.story-text {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
  line-height: 1.7;
}
.story-source {
  font-size: 12px;
  color: var(--pink);
}
blockquote {
  margin: 22px 0;
  padding: 15px 22px;
  border-left: 2px solid var(--gold);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 23px;
  line-height: 1.5;
  color: var(--gold);
}
blockquote cite {
  display: block;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 1px;
  margin-top: 10px;
  color: var(--muted);
}
@media (max-width: 720px) {
  .voice-controls {
    grid-column: 1/-1;
    flex-direction: row;
    justify-content: center;
    margin-top: 0;
    gap: 12px;
  }
  .voice-controls span {
    max-width: 180px;
    text-align: left;
  }
  .porch-button {
    margin: 14px 0 0;
    display: block;
  }
  .story-text {
    font-size: 20px;
  }
  blockquote {
    font-size: 20px;
  }
}

.host-source {
  color: var(--gold);
  font-size: 10px;
  margin-top: 12px;
}
.host-source[hidden] {
  display: none;
}
@media (max-width: 720px) {
  .host-source {
    grid-column: 1/-1;
    margin: 0;
  }
  .host-source:not([hidden]) {
    display: block;
  }
}
