.activity-body {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.activity-header {
  width: min(1280px, 100%);
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1rem;
  align-items: start;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
}

.activity-header h1 {
  margin-top: 0.25rem;
  font-size: clamp(2.5rem, 7vw, 5.4rem);
  text-wrap: balance;
}

.activity-header p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.12rem, 2vw, 1.55rem);
}

.activity-main {
  position: relative;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem) 1rem;
}

.quiz-shell,
.results-shell {
  position: relative;
  border: 2px solid rgba(240, 208, 111, 0.82);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 2rem);
  background: rgba(6, 16, 31, 0.72);
  box-shadow: var(--shadow-deep);
}

.quiz-progress {
  margin: 0 0 1rem;
  color: var(--tiffany);
  font-weight: 900;
  text-align: center;
}

.quiz-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
}

.hint-frame {
  border: 1px solid rgba(129, 216, 208, 0.35);
  border-radius: var(--radius);
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.hint-frame img {
  width: 100%;
  max-height: 58svh;
  object-fit: contain;
  border-radius: calc(var(--radius) - 2px);
  filter: drop-shadow(0 0 18px rgba(129, 216, 208, 0.24));
}

.question-panel {
  display: grid;
  gap: 1rem;
}

.question-panel h2 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3.85rem);
  text-wrap: balance;
}

.options-grid {
  display: grid;
  gap: 0.75rem;
}

.option-button {
  min-height: 72px;
  border: 2px solid rgba(129, 216, 208, 0.55);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.option-button:hover,
.option-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--gold-bright);
}

.option-button.correct {
  color: var(--black);
  border-color: var(--tiffany);
  background: var(--tiffany);
}

.option-button.wrong {
  border-color: var(--soft-red);
  background: rgba(217, 92, 92, 0.9);
  animation: shake 420ms ease;
}

.feedback {
  min-height: 2rem;
  margin: 0;
  color: var(--gold-bright);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 900;
}

.next-question {
  justify-self: start;
}

.star-burst {
  position: absolute;
  right: 9%;
  top: 11%;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.star-burst.show::before,
.star-burst.show::after {
  position: absolute;
  content: "";
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, var(--gold-bright) 0 8px, transparent 9px),
    radial-gradient(circle at 80% 20%, var(--tiffany) 0 8px, transparent 9px),
    radial-gradient(circle at 24% 68%, var(--white) 0 6px, transparent 7px),
    radial-gradient(circle at 58% 90%, var(--gold) 0 7px, transparent 8px);
  animation: burst 820ms ease-out forwards;
}

.star-burst.show::after {
  transform: translate(-50%, -50%) rotate(35deg);
}

.results-shell {
  display: grid;
  gap: 1.25rem;
}

.results-shell[hidden] {
  display: none;
}

.score-panel {
  text-align: center;
}

.score-panel h2 {
  font-size: clamp(2.5rem, 7vw, 5.2rem);
}

.rating {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  color: var(--gold-bright);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}

.rating span {
  display: inline-block;
  animation: star-rise 500ms ease backwards;
}

.prompt-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 2rem);
  color: var(--ink);
  background: linear-gradient(135deg, #fff7df, #f0dca6);
}

.prompt-card img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: calc(var(--radius) - 2px);
}

.prompt-copy h3 {
  margin: 0.25rem 0 0.8rem;
  color: #6f2d13;
  font-size: clamp(2rem, 5vw, 4rem);
}

.prompt-copy p:not(.eyebrow) {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 900;
}

.results-actions {
  justify-content: center;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-9px);
  }

  75% {
    transform: translateX(9px);
  }
}

@keyframes burst {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }

  45% {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.3);
  }
}

@keyframes star-rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.8);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 880px) {
  .activity-header {
    grid-template-columns: 64px 1fr;
  }

  .quiz-grid,
  .prompt-card {
    grid-template-columns: 1fr;
  }

  .next-question {
    justify-self: stretch;
  }

  .hint-frame img {
    max-height: 42svh;
  }
}

@media print {
  body {
    color: #0d0d0d;
    background: #ffffff;
  }

  .ambient-field,
  .activity-header,
  .quiz-shell,
  .score-panel,
  .results-actions,
  .brand-footer {
    display: none !important;
  }

  .activity-main,
  .results-shell {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: #ffffff;
  }

  .prompt-card {
    min-height: 95vh;
    border: 2px solid #c9a84c;
    break-inside: avoid;
  }
}
