.storybody {
  font-family: "Nunito", sans-serif;
  background: #e9f0e6;
}
.book-header {
  background: #f3f7ed;
  border-bottom: 1px solid #cedbc9;
  box-shadow: none;
}
.story-title {
  font-family: "Fredoka", sans-serif;
  font-weight: 500;
}
.world-entry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 14px;
  background: #284f45;
  color: #fff9e8;
  text-decoration: none;
  font:
    800 13px "Nunito",
    sans-serif;
  white-space: nowrap;
}
.world-entry:focus-visible {
  outline: 3px solid #b37741;
  outline-offset: 3px;
}
.voice-status {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  background: #fff7df;
  color: #344b44;
  padding: 12px 20px;
  border-radius: 14px;
  z-index: 100;
  font-size: 13px;
  box-shadow: 0 3px 18px #2343;
}
.voice-status:empty {
  display: none;
}
@media (max-width: 600px) {
  .world-entry {
    font-size: 11px;
    padding: 8px 10px;
  }
  .book-header {
    flex-wrap: wrap;
  }
  .world-entry {
    grid-column: 1/-1;
    justify-content: center;
  }
}
.voice-status button {
  margin-left: 10px;
  min-width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 50%;
  background: #eadfbd;
  color: #344b44;
  font-size: 20px;
  cursor: pointer;
}

.storybody {
  background: #fff8ed;
  color: #493d60;
}
.storybody.theme-bella {
  background: #f8e7ee;
}
.book-header {
  background: #fff8ed;
  color: #493d60;
  border: 0;
  padding: 18px 5vw;
}
.book-header .story-title {
  font-family: "Fredoka", sans-serif;
  color: #493d60;
}
.world-entry {
  background: #4f496c;
  color: #fff8ed;
  border-radius: 24px;
}
#game-area {
  max-width: 1120px;
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 28px;
}
#game-area > h2 {
  font-family: "Fredoka", sans-serif;
  font-weight: 500;
  font-size: 36px;
  letter-spacing: -0.02em;
  margin: 30px 0 8px;
}
#game-area .section-title {
  font:
    500 25px "Fredoka",
    sans-serif;
  color: #594467;
  text-align: left;
  width: 100%;
  margin: 30px 0 15px;
}
.arcade-welcome {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  min-height: 250px;
  padding: 35px;
  border-radius: 30px;
  color: #fff8eb;
  background: #414565;
  box-shadow: 0 12px 30px #493d6020;
}
.arcade-welcome:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("../assets/worlds-panorama.png") center 45% / cover;
}
.arcade-welcome:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #252f4beb, #252f4b44);
}
.arcade-welcome span {
  font:
    900 10px "Nunito",
    sans-serif;
  letter-spacing: 0.15em;
}
.arcade-welcome strong {
  font:
    500 clamp(28px, 4vw, 46px) / 1.1 "Fredoka",
    sans-serif;
  max-width: 490px;
}
.arcade-welcome small {
  font:
    700 14px "Nunito",
    sans-serif;
  max-width: 320px;
}
#game-area .game-hub-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
#game-area .game-hub-card {
  background: #f0e9f5;
  border: 1px solid #e1d6e9;
  border-radius: 24px;
  padding: 23px 18px;
  box-shadow: 0 4px 0 #ded2e4;
  color: #53405e;
  min-height: 205px;
}
#game-area .game-hub-card:nth-child(3n + 2) {
  background: #e9f0e3;
  border-color: #d7e3d0;
  box-shadow: 0 4px 0 #d3dfcc;
}
#game-area .game-hub-card:nth-child(3n + 3) {
  background: #fbe7d8;
  border-color: #efdbca;
  box-shadow: 0 4px 0 #ebd3c2;
}
#game-area .g-title {
  font:
    500 23px "Fredoka",
    sans-serif;
}
#game-area .g-desc {
  font:
    600 13px/1.4 "Nunito",
    sans-serif;
  opacity: 1;
  color: #63566c;
}
#game-area .g-emoji {
  display: grid;
  place-items: center;
  width: 65px;
  height: 65px;
  border-radius: 22px;
  background: #ffffffa0;
  margin: auto auto 8px;
}
#game-area .age-chip {
  background: #ffffff80;
  color: #63566c;
  font-size: 10px;
  padding: 4px 10px;
}
.kg-picker {
  background: #fff8ed;
  border-color: #e3d7e4;
  box-shadow: 0 12px 36px #6d507a16;
}
.kg-page-title {
  color: #624b72;
}
@media (max-width: 600px) {
  #game-area {
    padding: 18px 14px;
  }
  #game-area .game-hub-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  #game-area .game-hub-card {
    padding: 18px 10px;
    min-height: 205px;
  }
  #game-area .g-title {
    font-size: 20px;
  }
  .arcade-welcome {
    min-height: 250px;
    padding: 26px;
  }
  .book-header {
    padding: 14px 20px;
  }
}
.book-header {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
}
.book-header .header-center {
  flex: 1;
}
.book-header .header-spacer {
  display: none;
}
.arcade-welcome {
  text-align: left;
}

/* Lesson tiles (js/engine/lessons.js): an <a> wearing the game card's look.
   They navigate to piano.html / french.html instead of mounting in place, and
   the arrow says so without relying on colour. */
.game-hub-card.game-hub-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  min-height: 44px;
}
#game-area .game-hub-card.game-hub-link {
  color: #53405e;
}
.game-hub-link .g-go {
  font: 800 18px "Nunito", sans-serif;
  color: #53405e;
}
.game-hub-link:focus-visible {
  outline: 3px solid #b37741;
  outline-offset: 3px;
}

/* The kid pages' header links to that child's two courses. Drawn glyph plus a
   word, so Bella has the picture and Abby has the word; 44px tall. */
.kg-learn {
  display: flex;
  gap: 8px;
  align-items: center;
}
.kg-learn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 6px 14px;
  border-radius: 24px;
  background: #fff;
  border: 2px solid #4f496c;
  color: #4f496c;
  text-decoration: none;
  font: 800 13px "Nunito", sans-serif;
  white-space: nowrap;
}
.kg-learn-link .kg-glyph {
  width: 22px;
  height: 22px;
  flex: none;
}
.kg-learn-link:focus-visible {
  outline: 3px solid #b37741;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .kg-learn {
    order: 5;
    width: 100%;
    justify-content: center;
  }
  .kg-learn-link {
    flex: 1;
    justify-content: center;
  }
}
/* While a game is mounted, kid-fit.css makes the page exactly one viewport
   tall; on phones the lesson row would push the game below the fold. The
   links come back on the hub screen. */
.kg-playing .kg-learn {
  display: none;
}
/* games.html#lessons lands below the sticky header, not under it. */
#lessons {
  scroll-margin-top: 96px;
}
