:root {
  color-scheme: light;
  --ink: #2d2036;
  --muted: #605469;
  --purple: #651583;
  --purple-dark: #4c1162;
  --night: #311943;
  --gold: #f6d68d;
  --line: #ded2e5;
  --wash: #f7f1fa;
  --surface: #fff;
  font: 100%/1.55 Arial, Helvetica, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #faf7fb; }
[hidden] { display: none !important; }
a { color: var(--purple); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #835292; outline-offset: 4px; }
button { font: inherit; }
.skip-link { position: absolute; inset: .5rem auto auto .5rem; z-index: 1; padding: .75rem; background: var(--surface); }
.skip-link:not(:focus) { transform: translateY(-180%); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner, main, footer > div { max-width: 69rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.75rem); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5.25rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--purple); text-decoration: none; }
.brand img { border-radius: 50%; }
.brand strong { font: italic bold clamp(1.35rem, 4vw, 1.8rem) Georgia, serif; }
main { padding-top: clamp(1.3rem, 4vw, 2.75rem); padding-bottom: 3rem; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(.75rem, 4vw, 3rem);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(1.1rem, 5vw, 4rem);
  border-radius: 1.2rem;
  background: linear-gradient(112deg, #301640 28%, #54296b);
  color: #fff9ef;
}
.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: radial-gradient(#f6d68d60 1px, transparent 1px) 0 0 / 15px 15px;
  mask-image: linear-gradient(90deg, transparent 44%, #000);
  pointer-events: none;
}
.club-name { margin: 0 0 .65rem; color: var(--gold); font-weight: 700; }
.hero h1 { margin: 0; font: 400 clamp(2.5rem, 8vw, 5.6rem)/.98 Georgia, serif; letter-spacing: -.045em; }
.intro { max-width: 32rem; margin: 1rem 0 1.25rem; color: #f3e8f3; font-size: clamp(1rem, 1.8vw, 1.15rem); }
.club-crest {
  display: grid;
  width: clamp(4.25rem, 20vw, 12rem);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #f6d68d9c;
  box-shadow: 0 0 0 .45rem #f6d68d19, 0 0 0 .9rem #f6d68d12;
  background: #321745;
}
.club-logo { display: block; object-fit: contain; width: 83%; height: auto; aspect-ratio: 1; border-radius: 50%; background: #fff9ef; }
.page-nav { display: flex; flex-wrap: wrap; gap: .5rem .75rem; border-bottom: 1px solid var(--line); padding: 1rem 0; }
.page-nav a { display: inline-flex; align-items: center; min-height: 2.65rem; padding: .35rem .75rem; border-radius: .55rem; font-weight: 700; background: #efe5f3; text-decoration: none; }
.page-nav a:hover { text-decoration: underline; }
main > section { margin-top: 2.4rem; scroll-margin-top: 1rem; }
h2 { margin: 0; font: 400 clamp(1.65rem, 4vw, 2.15rem)/1.2 Georgia, serif; }
h3 { margin: 0 0 .6rem; font-size: 1.2rem; }
p { margin: .6rem 0 1rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.print-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .6rem .9rem;
  border: 1px solid var(--purple);
  border-radius: .55rem;
  background: var(--purple);
  color: white;
  font-size: .94rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--purple-dark); }
.button.secondary { background: var(--surface); color: var(--purple-dark); border-color: var(--line); }
.button.secondary:hover { background: var(--wash); }
.hero-cta { background: var(--gold); color: var(--night); border-color: var(--gold); }
.hero-cta:hover { background: #ffe6a8; }
.hero-cta:focus-visible { outline-color: #fff9ef; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.hero-secondary { color: #fff9ef; background: transparent; border-color: #dfc9e6; }
.hero-secondary:hover { background: #fff9ef1f; }
.hero-secondary:focus-visible { outline-color: #fff9ef; }
.button:disabled { opacity: .65; cursor: default; }
.escape-hero { background: linear-gradient(110deg, #171634 16%, #39204e 75%, #482661); }
.escape-hero::after {
  background: radial-gradient(#fff6d987 1px, transparent 1px) 0 0 / 24px 24px,
    radial-gradient(#d1a8f2aa 1px, transparent 1px) 9px 7px / 37px 37px;
}
.escape-planet {
  position: relative;
  width: clamp(4rem, 17vw, 10rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(140deg, #e4c4ef, #a270c8 35%, #4c2970 70%);
  box-shadow: inset -.4rem -.45rem 1.5rem #28193c88, 0 0 2rem #e4b2f466;
}
.escape-planet::after {
  content: "";
  position: absolute;
  inset: 26% -30%;
  transform: rotate(-25deg);
  border-radius: 50%;
  border: .28rem solid #eecb83a8;
  border-top-color: #eecb834b;
}
.mission-facts {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .75rem;
  margin-bottom: .6rem;
}
.mission-facts div { padding: .85rem; background: #efe5f3; border-radius: .65rem; }
.mission-facts dt { color: var(--purple-dark); font-size: .875rem; font-weight: 700; }
.mission-facts dd { margin: .25rem 0 0; font-size: 1.05rem; }
.escape-host { margin-top: .8rem; }
.escape-host > :first-child { margin-top: 0; }
.kahoot-hero { background: linear-gradient(115deg, #241942 12%, #51266b 75%, #692f78); }
.kahoot-name { grid-template-columns: minmax(0, 30rem); }
.kahoot-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kahoot-counts .status { font-weight: normal; }
.kahoot-fallback { display: flex; align-items: flex-start; gap: .55rem; cursor: pointer; }
.kahoot-fallback input { accent-color: var(--purple); margin: .3rem 0 0; inline-size: 1rem; block-size: 1rem; flex-shrink: 0; }
.kahoot-fallback + p { margin-top: .25rem; }
.kahoot-result { background: var(--wash); }
#kahoot-manual { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--line); }
.kahoot-question-list { margin: .65rem 0; padding-inline-start: 1.6rem; }
.kahoot-question-list li { padding-block: .25rem; }
.kahoot-question-list p { margin: .15rem 0; }
.kahoot-run-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: .85rem; }
.team-hero { background: linear-gradient(112deg, #26213d 15%, #41305e 62%, #455748); }
.team-quiz .builder-card { margin-top: 1rem; }
.team-format-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.team-format-options .choice { margin: 0; }
.team-format-options small { display: block; color: var(--muted); }
.team-game-count { grid-template-columns: minmax(0, 11rem); }
.team-classroom-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#team-station-pool, #team-topic-pool { margin-bottom: .9rem; }
.team-table-wrap { overflow-x: auto; margin-top: 1rem; }
.team-table { width: 100%; border-collapse: collapse; }
.team-table caption { text-align: left; font-weight: 700; margin-bottom: .35rem; }
.team-table th, .team-table td { text-align: start; vertical-align: top; padding: .4rem .55rem; border: 1px solid var(--line); }
.team-table thead th { background: var(--wash); }
.team-station-print { margin-top: 1.1rem; }
.team-question-list li p { margin-block: .2rem .4rem; }
.team-writing-line { min-height: 1.1rem; border-bottom: 1px solid #908597; }
.team-answer-lines li { min-height: 1.5rem; }
.team-response-strips { display: grid; gap: .25rem; padding: 0; list-style: none; }
.team-response-strips li { margin: 0; padding: .35rem .6rem; border: 1px dashed #908597; }
.topic-grid, .game-grid { display: grid; gap: .75rem; }
.topic-grid { grid-template-columns: repeat(auto-fit, minmax(min(10.5rem, 100%), 1fr)); }
.game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.topic-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 4.65rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  font-weight: 700;
  text-align: start;
}
.topic-button:hover, .topic-button[aria-pressed="true"] { border-color: #835292; background: var(--wash); }
.topic-button small { color: var(--muted); font-size: .875rem; font-weight: 400; }
.round, .game, .guide, .builder-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: clamp(.9rem, 3vw, 1.5rem);
}
.builder-card { border-top: .25rem solid #a873b5; }
.builder-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .85rem; margin-bottom: 1rem; }
.builder-fields label, .saved-draws label { display: grid; gap: .35rem; font-weight: 700; }
.builder-fields input, .saved-draws select, .question-picker-field input, .question-picker-field select {
  width: 100%;
  min-height: 2.75rem;
  padding: .4rem .65rem;
  border: 1px solid #b8a5c0;
  border-radius: .5rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
.question-picker-panel { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.question-picker-panel > summary { color: var(--purple-dark); font-weight: 700; cursor: pointer; }
.question-picker { margin-top: .9rem; }
.question-picker-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  gap: .6rem;
}
.question-picker-field { display: grid; gap: .3rem; min-width: 0; font-weight: 700; }
.question-picker-actions, .question-picker-pages { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .85rem; }
.question-picker-selected { margin: 0; margin-inline-end: auto; }
.question-picker-range { margin: .85rem 0 .3rem; }
.question-picker-list { margin-top: 0; padding-inline-start: 1.55rem; }
.question-picker-item { border-bottom: 1px solid var(--line); margin-top: 0; }
.question-picker-choice { display: flex; gap: .65rem; padding: .5rem .35rem; align-items: flex-start; cursor: pointer; }
.question-picker-choice:has(input:checked) { background: var(--wash); }
.question-picker-choice input { accent-color: var(--purple); margin: .2rem 0 0; inline-size: 1.1rem; block-size: 1.1rem; flex-shrink: 0; }
.question-picker-prompt, .question-picker-meta { display: block; }
.question-picker-meta { color: var(--muted); }
.topic-options { display: flex; flex-wrap: wrap; gap: .45rem; }
.topic-option { display: inline-flex; gap: .4rem; align-items: center; min-height: 2.75rem; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: .45rem; cursor: pointer; }
.topic-option:has(input:checked) { background: var(--wash); border-color: #a587b2; }
.topic-option input { margin: 0; inline-size: 1rem; block-size: 1rem; accent-color: var(--purple); }
.builder-card fieldset { margin-bottom: .25rem; }
.saved-draws { display: flex; align-items: end; flex-wrap: wrap; gap: .5rem; padding-top: 1.1rem; margin-top: 1.1rem; border-top: 1px solid var(--line); }
.saved-draws label { flex: 1 1 min(18rem, 100%); min-width: 0; }
.generated-draw { margin-top: 1.15rem; padding: 1rem; border-radius: .55rem; background: var(--wash); overflow-wrap: anywhere; }
.generated-draw details { margin-top: .75rem; }
.generated-draw summary { color: var(--purple-dark); font-weight: 700; cursor: pointer; }
.round { margin-top: .9rem; }
.round h3 { margin-top: .15rem; }
.progress-label, .status { color: var(--muted); font-size: .94rem; }
.progress-label { margin: 0 0 .5rem; }
fieldset { margin: 0 0 1rem; padding: 0; min-width: 0; border: 0; }
legend { font-weight: 700; margin-bottom: .6rem; padding: 0; }
.choice { display: flex; align-items: center; gap: .6rem; min-height: 2.75rem; padding: .5rem .65rem; margin-bottom: .4rem; border: 1px solid var(--line); border-radius: .5rem; }
.choice:has(input:checked) { background: var(--wash); border-color: #835292; }
.choice input { accent-color: var(--purple); inline-size: 1.15rem; block-size: 1.15rem; flex-shrink: 0; }
.feedback { margin: .9rem 0; padding: .65rem .8rem; border-inline-start: .25rem solid #835292; background: var(--wash); }
.feedback p { margin: 0 0 .35rem; }
.source { font-size: .9rem; overflow-wrap: anywhere; }
.game summary, .guide summary { color: var(--purple-dark); font-weight: 700; cursor: pointer; }
.game > p { color: var(--muted); }
ol, ul { padding-inline-start: 1.45rem; }
li + li { margin-top: .35rem; }
.game .source { margin: .7rem 0 0; }
.guide { margin-top: 1rem; }
.guide h3 { margin: 1.3rem 0 .4rem; }
.guide > :first-child { margin-top: 0; }
.guide details { margin-top: 1rem; }
.guide .table-wrap { overflow-x: auto; }
.guide table { width: 100%; border-collapse: collapse; margin: .65rem 0 1rem; }
.guide .writing-line { border-bottom: 1px solid var(--line); width: min(100%, 24rem); }
.guide caption { text-align: left; font-weight: 700; margin-bottom: .35rem; }
.guide th, .guide td { text-align: start; vertical-align: top; padding: .38rem .5rem; border: 1px solid var(--line); }
.guide th { background: var(--wash); }
footer { border-top: 1px solid var(--line); }
footer > div { color: var(--muted); padding-block: 1rem; }
.noscript { max-width: 65rem; margin: 1rem auto; padding-inline: 1rem; }
@media (max-width: 38rem) {
  .game-grid { grid-template-columns: 1fr; }
  .club-crest { align-self: start; margin-top: .5rem; }
  .builder-fields { grid-template-columns: 1fr; }
  .kahoot-run-grid { grid-template-columns: 1fr; }
  .team-format-options, .team-classroom-counts { grid-template-columns: 1fr; }
  .header-inner { gap: .5rem; }
  .header-inner .button { padding-inline: .55rem; }
  .mission-facts { grid-template-columns: 1fr; }
  .escape-planet { align-self: start; margin: 1.15rem .4rem 0 0; }
}
@media print {
  body.print-paper > :not(#print-content) { display: none !important; }
  body.print-paper #print-content[hidden] { display: block !important; }
  #print-content h2 { font: bold 14pt Arial, sans-serif; }
  #print-content li { break-inside: avoid; }
  #print-content li p { margin: .2rem 0 .55rem; white-space: pre-wrap; }
  #print-content .team-station-print + .team-station-print { break-before: page; }
  #print-content .team-table-wrap { overflow: visible; }
  body.print-guide .site-header, body.print-guide .hero, body.print-guide .page-nav,
  body.print-guide #builder, body.print-guide #practice, body.print-guide #games, body.print-guide #print-guide,
  body.print-guide footer, body.print-guide .skip-link { display: none; }
  body, .guide { background: white; }
  main { padding: 0; }
  main > section { margin-top: 0; }
  .guide { border: 0; padding: 0; }
  h2, h3, caption { break-after: avoid; }
  tr { break-inside: avoid; }
}

@media print{#print-content .quiz-answer-line{margin-bottom:1rem}#print-content .quiz-correct-answer{font-weight:700}#print-content .print-brand-header{margin-bottom:18px}}
