/* One translucent surface per panel keeps words crisp over the coloured backdrop. */
body.pregame {
  --playroom-ink: #21364c;
  --playroom-muted: #4f6274;
  --playroom-blue: #075abb;
  --playroom-edge: #ffffffd9;
  --playroom-glass: linear-gradient(145deg, #ffffffd9, #ffffff9c);
  --playroom-shadow: inset 0 1px 1px #fff, inset 0 -1px 1px #ffffff85,
    0 12px 34px #456d8b14, 0 2px 5px #456d8b0a;
  color: var(--playroom-ink);
  background: radial-gradient(ellipse at 12% 9%, #cce7f7 0, transparent 42%),
    radial-gradient(ellipse at 92% 29%, #d6eee4 0, transparent 38%),
    radial-gradient(ellipse at 60% 88%, #f8e2c9 0, transparent 46%), #eef3f7;
  background-attachment: fixed;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.pregame :is(.glass, .activity-card, .setup-panel),
body.pregame :is(.masthead, .site-header) {
  background: var(--playroom-glass);
  border: 1px solid var(--playroom-edge);
  box-shadow: var(--playroom-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  backdrop-filter: blur(24px) saturate(145%);
}

body.pregame :is(.masthead, .site-header) {
  width: calc(100% - 64px);
  max-width: 1200px;
  margin: 20px auto 8px;
  padding: 12px 22px;
  border-radius: 26px;
  gap: 20px;
}

.pregame .brand {
  color: var(--playroom-ink);
}

.pregame .masthead .brand {
  font-size: 25px;
  letter-spacing: -1px;
}

.pregame .brand span,
.pregame .brand small {
  color: var(--playroom-muted);
}

.pregame .site-header .brand {
  font-size: 20px;
  letter-spacing: -.6px;
}

.pregame .site-header .brand > span {
  color: var(--playroom-ink);
}

.pregame .site-header .brand small {
  font-size: 8px;
  letter-spacing: 1.4px;
}

.pregame .navigation-options {
  background: #ffffff40;
  border-color: #b8ccdf;
  box-shadow: inset 0 1px #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.pregame .navigation-options > [aria-current=page] {
  background: linear-gradient(160deg, #fff, #d8eafd);
  border-color: #adcae5;
  box-shadow: inset 0 1px #fff, 0 2px 6px #486b8f1a;
}

.pregame .hero {
  margin: 25px 0 44px;
  gap: 56px;
}

.pregame .hero h1 {
  color: var(--playroom-ink);
  font-size: clamp(42px, 4.8vw, 64px);
  font-weight: 750;
  letter-spacing: -.055em;
}

.pregame .hero-copy > p:not(.eyebrow) {
  color: var(--playroom-muted);
  font-size: 16px;
}

.pregame .eyebrow {
  color: #425e77;
}

.pregame .hero-garden {
  height: 320px;
  border-radius: 36px;
  border-color: #ffffffde;
  background: radial-gradient(ellipse at 50% 140%, #aacda6 0 46%, transparent 46.4%),
    linear-gradient(160deg, #e7f5f5b8, #bcdfe2b8 63%, #c7dbb6bd 63%);
  box-shadow: inset 0 2px 2px #fff, inset 0 -1px 1px #ffffff70, 0 24px 50px #4b6f7e14;
}

.pregame .hero-mole.first {
  width: 240px;
  left: 5%;
  bottom: 42px;
  transform: rotate(-7deg);
}

.hub-balloon {
  position: absolute;
  right: 12%;
  top: 53px;
  width: 102px;
  height: 175px;
  transform: rotate(9deg);
}

.hub-balloon img {
  display: block;
  width: 100%;
  height: 115px;
  border-radius: 32px;
  box-shadow: 0 6px 20px #6b8a7b16;
}

.hub-balloon::after {
  content: '';
  position: absolute;
  top: 112px;
  height: 24px;
  left: 50%;
  border-left: 1px solid #698785;
}

.hub-balloon b {
  position: absolute;
  bottom: 0;
  left: 4%;
  width: 92%;
  height: 42px;
  border: 1px solid #ddcba9;
  border-radius: 10px;
  background: #fffdf0;
  box-shadow: 0 3px 0 #bfae8b;
  text-align: center;
  color: #233743;
  font-size: 28px;
  line-height: 40px;
}

.pregame .hero-note {
  color: var(--playroom-muted);
  font-size: 11px;
}

.pregame :is(.primary, .start-row .primary) {
  border: 1px solid #135bb4;
  border-radius: 17px;
  background: linear-gradient(165deg, #176ed0, #0754ad);
  box-shadow: inset 0 1px 1px #ffffff9c, 0 5px 12px #175fbb26;
  color: #fff;
  font-family: inherit;
  font-weight: 650;
}

.pregame .primary:hover {
  background: #084e9f;
}

.pregame :is(.section-heading, .section-note) {
  color: var(--playroom-ink);
}

.pregame .section-heading .eyebrow {
  font-size: 10px;
  margin-bottom: 8px;
}

.pregame .collection-tag {
  border-color: #bacedd;
  background: #ffffff65;
  color: #425d71;
}

.game-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 22px 0 40px;
}

.game-choice {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 152px;
  gap: 21px;
  padding: 23px;
  border-radius: 26px;
  text-align: left;
  font: inherit;
  color: var(--playroom-ink);
  transition: border-color .16s, box-shadow .16s;
}

.pregame .game-choice:hover {
  border-color: #89b4d7;
}

.pregame .game-choice[aria-pressed=true] {
  border-color: #6b9fce;
  box-shadow: inset 0 1px 1px #fff, inset 0 0 0 1px #9ec5ea,
    0 12px 34px #456d8b18, 0 2px 5px #456d8b0a;
}

.choice-image {
  display: grid;
  place-items: center;
  flex: 0 0 82px;
  height: 86px;
  border: 1px solid #ffffffc7;
  border-radius: 23px;
  box-shadow: inset 0 2px 1px #ffffffa3;
}

.mole-choice {
  background: linear-gradient(145deg, #eef3da, #cfe0ba);
}

.balloon-choice {
  background: linear-gradient(145deg, #ffefdf, #f2d2ba);
}

.choice-image img {
  display: block;
  width: 68px;
  height: 68px;
}

.balloon-choice img {
  width: 58px;
  height: 58px;
  border-radius: 18px;
}

.choice-copy {
  display: block;
  min-width: 0;
  padding-right: 14px;
}

.game-name {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.6px;
}

.game-description {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--playroom-muted);
}

.game-detail {
  display: block;
  margin-top: 11px;
  font-size: 10px;
  color: #46667b;
}

.choice-check {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid #8eabc2;
  border-radius: 50%;
  color: transparent;
  font-size: 12px;
}

[aria-pressed=true] > .choice-check {
  border-color: #075abb;
  background: #075abb;
  color: #fff;
  box-shadow: inset 0 1px 1px #ffffff65;
}

.pregame .activity-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
}

.pregame .activity-grid .activity-card {
  padding: 20px 17px;
  border-radius: 24px;
  color: var(--playroom-ink);
  text-decoration: none;
}

.pregame .activity-grid .activity-card:hover {
  border-color: #89b4d7;
  box-shadow: inset 0 2px #fff, 0 14px 28px #3159861a;
}

.pregame .card-top {
  margin-bottom: 20px;
}

.pregame .vowel {
  border: 1px solid #b7ccde;
  border-radius: 18px;
  width: 52px;
  height: 56px;
  background: linear-gradient(155deg, #ffffffdb, #d2e5f5b5);
  box-shadow: inset 0 2px #fff, inset 0 -1px 1px #ffffff7a, 0 3px 7px #31598612;
  color: #315f80;
  font-size: 36px;
}

.pregame .card-number {
  color: #50677a;
  font-size: 10px;
}

.pregame .card-title {
  font-size: 21px;
  line-height: 1.18;
  min-height: 50px;
}

.pregame .card-description {
  font-size: 12px;
  color: var(--playroom-muted);
}

.pregame .card-label {
  color: #426078;
  font-size: 8px;
}

.pregame .card-bottom {
  border-color: #bfceda;
  color: #0755a9;
  font-size: 10px;
  gap: 4px;
}

.pregame .library-note,
.pregame footer,
.pregame .site-footer {
  color: var(--playroom-muted);
}

.pregame :is(.stage-panel, .setup-panel) {
  border-radius: 30px;
  color: var(--playroom-ink);
  background: linear-gradient(145deg, #fffffff0, #f5faffd6);
  border: 1px solid #ffffffed;
  box-shadow: inset 0 2px 2px #fff, inset 0 -1px 2px #ffffffb3,
    0 24px 60px #173a4a24, 0 2px 5px #274a6712;
}

.pregame .stage-overlay {
  background: #37697824;
}

.pregame :is(.stage-panel, .setup-panel) .eyebrow {
  color: #3d627c;
}

.pregame :is(.setup-panel, .stage-panel) :is(.panel-intro, .lead, p, small) {
  color: #4b5e70;
}

.pregame .setup-panel h2 {
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -1.4px;
}

.pregame .settings select,
.pregame .mode-options label,
.pregame .listen {
  border-color: #aec5d9;
  background: #ffffff73;
  border-radius: 12px;
  box-shadow: inset 0 1px #fff;
}

.pregame .mode-options label:has(:checked) {
  background: linear-gradient(150deg, #ffffffcf, #cce4ffb3);
  border-color: #6097c9;
  box-shadow: inset 0 1px #fff, 0 2px 5px #31598612;
}

.pregame .settings input {
  accent-color: var(--playroom-blue);
}

.pregame .library-heading h1 {
  font-family: inherit;
  font-weight: 750;
  letter-spacing: -2.5px;
}

.pregame .library-heading h1 span {
  color: #075abb;
}

.pregame .activity-card[aria-pressed=true] {
  border-color: #6097c9;
  box-shadow: inset 0 1px #fff, inset 0 0 0 1px #9ec5ea, 0 8px 20px #31598612;
}

.pregame .card-check {
  background: #075abb;
  border-color: #edf4f7;
}

.pregame .how-to {
  border-color: #bdcfd9;
}

.pregame .how-to b {
  background: #d8e8f4;
  color: #305c7b;
}

.pregame .stage[data-screen=setup] {
  border-color: #ffffffd9;
  box-shadow: inset 0 1px #fff, 0 12px 40px #31598617;
}

.pregame .back-link {
  color: #254f72;
}

@media (max-width: 1000px) {
  .pregame .hero {
    gap: 30px;
  }
  .game-choice {
    padding: 20px;
    gap: 15px;
  }
  .choice-image {
    flex-basis: 65px;
    height: 72px;
    border-radius: 20px;
  }
  .choice-image img {
    width: 57px;
    height: 57px;
  }
  .game-name {
    font-size: 20px;
  }
  .pregame .activity-grid .activity-card {
    padding: 18px 14px;
  }
  .pregame .card-title {
    font-size: 19px;
  }
}

@media (max-width: 760px) {
  body.pregame :is(.masthead, .site-header) {
    width: calc(100% - 36px);
    padding: 12px 16px;
    margin-top: 14px;
    border-radius: 23px;
  }
  .pregame .hero-garden {
    height: 280px;
  }
  .pregame .hero-mole.first {
    width: 190px;
    left: 0;
  }
  .hub-balloon {
    right: 6%;
    width: 85px;
    top: 50px;
    transform: rotate(7deg) scale(.9);
  }
  .game-picker {
    gap: 12px;
  }
  .game-choice {
    align-items: flex-start;
    min-height: 182px;
    flex-direction: column;
    gap: 14px;
  }
  .game-description {
    margin-top: 7px;
  }
  .pregame .activity-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  body.pregame :is(.masthead, .site-header) {
    width: calc(100% - 24px);
    padding: 12px;
    gap: 12px;
    margin: 12px auto 4px;
  }
  .pregame .masthead .brand {
    font-size: 23px;
  }
  .pregame .masthead .brand span {
    padding-left: 12px;
    font-size: 11px;
  }
  .pregame .hero {
    gap: 22px;
    margin-top: 18px;
    margin-bottom: 32px;
  }
  .pregame .hero h1 {
    font-size: 46px;
  }
  .pregame .hero-garden {
    height: 250px;
  }
  .pregame .hero-mole.first {
    width: 200px;
    left: 0;
    bottom: 45px;
  }
  .hub-balloon {
    right: 9%;
    top: 24px;
    width: 90px;
    transform: rotate(9deg) scale(.9);
  }
  .pregame .hero-note {
    font-size: 10px;
  }
  .pregame .section-heading h2 {
    font-size: 27px;
  }
  .game-picker {
    gap: 10px;
    margin: 18px 0 32px;
  }
  .game-choice {
    padding: 16px 14px;
    gap: 12px;
    border-radius: 22px;
  }
  .choice-copy {
    padding: 0;
  }
  .game-name {
    font-size: 17px;
    letter-spacing: -.5px;
  }
  .game-description {
    font-size: 11px;
  }
  .game-detail {
    font-size: 9px;
    margin-top: 9px;
    line-height: 1.5;
  }
  .choice-check {
    top: 12px;
    right: 12px;
    width: 17px;
    height: 17px;
    font-size: 10px;
  }
  .pregame .activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pregame .activity-grid .activity-card {
    padding: 16px 13px;
    border-radius: 21px;
  }
  .pregame .card-top {
    margin-bottom: 16px;
  }
  .pregame .card-title {
    font-size: 19px;
    min-height: 46px;
  }
  .pregame .card-description {
    font-size: 11px;
  }
  .pregame .card-label {
    font-size: 7px;
    letter-spacing: .04em;
  }
  .pregame .card-bottom {
    margin-top: 15px;
    padding-top: 12px;
    font-size: 9px;
  }
  .pregame .card-bottom > span {
    font-size: 17px;
  }
  .pregame .vowel {
    width: 44px;
    height: 48px;
    font-size: 31px;
    border-radius: 15px;
  }
  .pregame .site-header .brand {
    font-size: 18px;
  }
  .pregame .site-header .brand small {
    font-size: 7px;
    letter-spacing: .6px;
  }
  .pregame .site-header .back-link {
    white-space: nowrap;
    font-size: 10px;
  }
  .pregame .site-header .brand svg {
    width: 24px;
  }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), (update: slow) {
  .pregame :is(.glass, .activity-card, .setup-panel, .stage-panel),
  body.pregame :is(.masthead, .site-header) {
    background: #f8fbff;
    border-color: #8098ad;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }
}

@media (forced-colors: active) {
  .pregame :is(.glass, .activity-card, .setup-panel, .stage-panel, .game-choice),
  body.pregame :is(.masthead, .site-header) {
    background: Canvas;
    color: CanvasText;
    border: 1px solid ButtonText;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }
  .pregame .game-choice[aria-pressed=true] {
    outline: 2px solid Highlight;
  }
}


/* Paired lesson sounds need room for two labels rather than a single vowel tile. */
.pregame .activity-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  margin-bottom: 32px;
}

.activity-group-title {
  margin: 28px 0 16px;
  font-size: 19px;
  letter-spacing: -.4px;
}

.sound-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sound-badges > span {
  padding: 7px 10px;
  border: 1px solid #b7ccde;
  border-radius: 12px;
  background: #e4f0fa;
  color: #315f80;
  font-size: 21px;
  font-weight: 700;
}

.pregame .activity-picker {
  display: block;
}

.picker-group > h2 {
  margin: 24px 0 12px;
  font-size: 18px;
}

.lesson-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 10px;
}

.pregame .lesson-picker .activity-card {
  width: 100%;
  min-width: 0;
  padding: 16px 38px 16px 16px;
}

.pregame .lesson-picker .activity-card strong {
  white-space: normal;
  font-size: 19px;
}

.pregame .lesson-picker .activity-card small {
  white-space: normal;
  line-height: 1.5;
}

/* Three formats share the same lesson catalogue. */
.pair-choice { background: linear-gradient(145deg, #edf2d5, #cddfc0); }
@media (min-width: 1100px) {
  .game-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-choice { gap: 14px; padding: 20px 16px; }
  .game-choice .choice-image { flex-basis: 66px; }
  .game-choice .choice-image img { width: 55px; height: 55px; }
  .game-choice .game-name { font-size: 20px; }
}
@media (min-width: 641px) and (max-width: 1099px) {
  .game-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-choice { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; }
}
@media (max-width: 640px) {
  .game-picker { grid-template-columns: 1fr; }
  .game-choice { flex-direction: row; align-items: center; min-height: 130px; }
}
