:root {
  color-scheme: light;
  --ink: #192748;
  --soft: #465371;
  --paper: #f8f2e5;
  --white: #fffcf4;
  --gold: #f7c756;
  --line: #ded3bc;
  --red: #943d2e;
  --green: #245c43;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #385ba7; outline-offset: 4px; }
::selection { color: var(--ink); background: var(--gold); }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 84px; }
.brand { display: inline-flex; gap: 10px; align-items: center; text-align: left; padding: 5px 0; border: 0; background: none; color: var(--ink); font-size: 1.05rem; font-weight: 800; text-decoration: none; }
.brand img { flex: 0 0 auto; }
.subjects { display: flex; flex: 0 0 auto; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; }
.subjects a { display: grid; place-items: center; min-height: 44px; padding: 0 13px; border-radius: 8px; color: var(--ink); font-weight: 750; text-decoration: none; }
.subjects a:hover { background: var(--white); }
.subjects a[aria-current] { color: var(--white); background: var(--ink); }
main { flex: 1; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: Georgia, serif; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.5vw, 5rem); line-height: .99; letter-spacing: -.037em; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2rem); line-height: 1.08; letter-spacing: -.026em; }
.cover { display: grid; grid-template-columns: 1.25fr 1fr; overflow: hidden; background: var(--ink); color: var(--white); border-radius: 16px; }
.intro { padding: clamp(32px, 6vw, 76px); position: relative; z-index: 1; }
.intro h1 { margin-bottom: 22px; }
.intro p { font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.6; color: #e9e9ea; max-width: 34ch; margin-bottom: 30px; }
.cover-art { display: grid; place-items: center; min-width: 0; overflow: hidden; background: #192748; }
.cover-art img { display: block; width: min(100%, 440px); height: auto; object-fit: cover; }
.cover-art.has-illustration img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.primary, .quiet { display: inline-flex; justify-content: center; align-items: center; min-height: 53px; padding: 12px 22px; border-radius: 11px; border: 1px solid transparent; font-weight: 800; text-decoration: none; }
.primary { color: var(--ink); background: var(--gold); }
.primary:hover { background: #ffda7d; }
.primary:disabled { background: #eae2d2; color: #5b6272; cursor: default; }
.quiet { color: var(--ink); background: var(--white); border-color: var(--line); }
.quiet:hover { background: var(--paper); }
.cover .primary:focus-visible { outline-color: #fff3cc; }
.rounds { padding-block: 36px 34px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; column-gap: 18px; row-gap: 6px; margin-bottom: 16px; }
.section-title h2 { margin: 0; }
.section-title span { color: var(--soft); font-weight: 600; }
.round-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.round { display: flex; flex-direction: column; text-align: left; gap: 5px; background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.round:hover { border-color: var(--ink); background: #fff4d8; }
.round span { font-size: .9rem; color: var(--soft); }
.round span:first-child { font-size: 1rem; color: var(--ink); font-weight: 800; }
.subject-intro { margin: 36px 0 30px; }
.subject-intro h1 { margin-bottom: 12px; }
.subject-intro p { margin: 0; color: var(--soft); font-size: 1.12rem; line-height: 1.5; }
.activity-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 42px; }
.activity-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--white); overflow: hidden; }
.activity-card-art { display: grid; place-items: center; min-height: 160px; color: var(--ink); background: #fae7ad; border-bottom: 1px solid var(--line); }
.activity-card-copy { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 26px clamp(20px, 3.2vw, 36px) 30px; }
.activity-card-copy h2 { margin-bottom: 8px; }
.activity-card-copy p { margin-bottom: 22px; color: var(--soft); line-height: 1.5; }
.activity-card-copy .primary { margin-top: auto; }
.stained-glass { position: relative; background: var(--ink); }
.stained-glass img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.stage { width: min(100%, 670px); margin: 24px auto 42px; }
.stage-head { padding: 28px clamp(20px, 5vw, 40px); background: var(--ink); color: var(--white); border-radius: 16px 16px 0 0; }
.stage h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); margin-bottom: 12px; }
.stage-head p { margin: 0 0 16px; font-weight: 650; }
.back-activity { display: inline-flex; align-items: center; padding: 0; min-height: 44px; margin: -12px 0 8px; color: var(--white); background: none; border: 0; font-weight: 750; text-decoration: underline; text-underline-offset: .25em; }
.back-activity:hover { color: var(--gold); }
.back-activity:focus-visible { outline-color: var(--gold); }
.progress { display: flex; gap: 7px; padding: 0; margin: 0; list-style: none; }
.progress li { width: 24px; height: 13px; border-radius: 4px; border: 1px solid #aeb8ce; }
.progress .current { border-color: var(--gold); background: var(--gold); }
.progress .correct { background: #8cd8ae; border-color: #8cd8ae; }
.progress .missed { background: #ee9563; border-color: #ee9563; }
.play { background: var(--white); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; padding: clamp(20px, 5vw, 40px); }
.listen { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 57px; padding: 12px 18px; border: 1px solid #a7b3d2; border-radius: 12px; color: var(--ink); background: #e9edfa; font-weight: 800; }
.listen:hover { background: #dce5fc; }
.listen.playing svg { animation: pulse .7s ease-out infinite alternate; }
@keyframes pulse { from { transform: scale(.93); } to { transform: scale(1.13); } }
.audio-status { color: var(--red); margin: 10px 0 0; }
.audio-status:empty { display: none; }
form, .correction { margin-top: 26px; }
label { display: block; font-weight: 800; margin-bottom: 9px; }
.clue { color: var(--soft); margin-bottom: 10px; }
input { width: 100%; min-height: 58px; border-radius: 10px; border: 1px solid #7d89a2; background: white; color: var(--ink); padding: 11px 14px; font-size: 1.25rem; caret-color: #3455a2; }
.accents { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 22px; }
.accents button { color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 7px; min-width: 42px; min-height: 42px; font-weight: 700; }
.accents button:hover { background: #fff0bf; }
.correction h2 { margin-bottom: 9px; }
.correction h2.good { color: var(--green); }
.correction h2.try { color: var(--red); }
#feedback-word { font: 700 clamp(1.65rem, 5vw, 2.45rem)/1.15 Georgia, serif; margin-bottom: 12px; overflow-wrap: anywhere; }
#feedback-note { color: var(--soft); overflow-wrap: anywhere; }
.summary { text-align: center; background: var(--white); padding: clamp(22px, 6vw, 58px); border: 1px solid var(--line); border-radius: 16px; }
.summary img { margin-bottom: 20px; }
.summary p { color: var(--soft); line-height: 1.5; }
.summary-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
footer { color: var(--soft); font-size: .89rem; padding: 16px 0 22px; border-top: 1px solid var(--line); }
@media (max-width: 680px) {
  .wrap { width: calc(100% - 32px); }
  .top { min-height: 68px; }
  .cover { grid-template-columns: 1fr; }
  .cover-art { grid-row: 1; max-height: 225px; }
  .cover-art img { width: min(58%, 215px); }
  .cover-art.has-illustration img { max-height: 225px; object-position: center 46%; }
  .intro { padding: 26px 24px 32px; }
  .intro h1 { font-size: clamp(2.2rem, 10.4vw, 3.6rem); margin-bottom: 15px; }
  .intro p { margin-bottom: 20px; }
  .rounds { padding-top: 26px; }
  .subject-intro { margin: 18px 0 20px; }
  .activity-cards { grid-template-columns: 1fr; gap: 14px; }
  .activity-card-art { min-height: 102px; }
  .activity-card-copy { padding: 18px 20px 22px; }
  .activity-card-copy p { margin-bottom: 14px; }
  .stage { margin-top: 10px; }
}
@media (max-width: 380px) {
  .brand { gap: 7px; font-size: .92rem; }
  .brand img { width: 30px; height: 30px; }
  .subjects a { padding-inline: 8px; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { .listen.playing svg { animation: none; } }
