@font-face {
  font-family: 'Lilita One';
  src: url('/assets/lilita-one-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('/assets/barlow-condensed-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/assets/dm-sans-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/assets/dm-sans-700.woff2') format('woff2');
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Kero Japanese';
  src: url('/assets/noto-sans-jp.woff2') format('woff2');
  font-display: swap;
}
/* The comic fonts load only on pages that use them. */
@font-face {
  font-family: 'Kero Comic';
  src: url('/assets/fonts/comic-neue-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Kero Comic';
  src: url('/assets/fonts/comic-neue-700-italic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Kero Impact';
  src: url('/assets/fonts/bangers-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #392c20;
  --paper: #fffaf0;
  --yellow: #f6c747;
  --butter: #ffe6a3;
  --red: #b6382b;
  --blue: #8bd1d6;
  --muted: #685844;
  --line: #d8c9a9;
  --heading: 'Lilita One', sans-serif;
  --body: 'DM Sans', sans-serif;
  --page: 1380px;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--body);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
select {
  font: inherit;
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 400;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
h2 {
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  margin-bottom: 24px;
}
h3 {
  font-size: 2rem;
}
h1 em,
h2 em {
  font-style: normal;
  color: var(--red);
}
p {
  margin-bottom: 18px;
}
a,
summary,
select,
button {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
summary:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 3px solid #075693;
  outline-offset: 5px;
}
a:hover .link-label,
.text-link:hover,
.quiet-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.nowrap {
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  background: var(--ink);
  color: white;
  padding: 14px 20px;
  transform: translateY(-180%);
}
.skip-link:focus {
  transform: none;
}
.section {
  max-width: var(--page);
  margin: 0 auto;
  padding: 80px 6%;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.section-heading h2 {
  margin: 0;
}
.section-heading h2 > span {
  color: var(--red);
}
.eyebrow {
  display: block;
  font: 700 0.8125rem/1.5 var(--body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 56px;
  max-width: 100%;
  padding: 15px 24px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 18px 21px 17px 23px;
  box-shadow: 0 4px 0 var(--ink);
  font-weight: 700;
  line-height: 1.4;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.button:hover {
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 0 7px 0 var(--ink);
}
.button.white {
  background: var(--paper);
}
.button span {
  flex-shrink: 0;
}
.watch-button {
  background: var(--red);
  color: white;
}
.play-icon {
  font-size: 0.875rem;
}
/* TikTok's note (src/components/channel-marks.ts), white on an ink circle, the size of the
   YouTube play circle beside it. */
.tiktok-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
}
.tiktok-icon svg {
  display: block;
  width: 17px;
  height: 17px;
}
.quiet-link {
  display: block;
  width: fit-content;
  padding: 14px 0 4px;
  font-size: 0.9375rem;
  font-weight: 700;
  min-height: 44px;
}
.text-link,
.link-label {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-weight: 700;
  min-height: 44px;
}
.page-intro {
  padding-top: 52px;
  padding-bottom: 28px;
}
.page-intro h1 {
  margin: 0 0 18px;
}
.page-intro > p {
  max-width: 560px;
}
.site-header {
  max-width: var(--page);
  margin: 0 auto;
  padding: 22px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-frog {
  width: 54px;
  height: 56px;
  position: relative;
}
.brand-frog img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotate(-8deg);
}
.brand-name {
  font: 400 2.15rem/0.9 var(--heading);
  letter-spacing: -0.025em;
}
.brand-name small {
  display: block;
  font: 700 0.625rem/1.5 var(--body);
  letter-spacing: 0.055em;
  margin-top: 5px;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  font-size: 0.9375rem;
  font-weight: 700;
}
.site-header nav > a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
}
.site-header nav > a[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 7px;
}
/* The way into learning stands out: Learn comes first, as a butter pill. */
.site-header nav > a.nav-learn {
  padding: 0 14px;
  background: var(--butter);
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.site-header nav > a.nav-learn:hover {
  background: var(--yellow);
}
.youtube {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 19px;
  flex-shrink: 0;
  border-radius: 30px;
  color: white;
  background: var(--red);
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
}
.youtube:hover {
  background: var(--ink);
}
.site-footer {
  max-width: var(--page);
  margin: 0 auto;
  padding: 42px 6% 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 0.875rem;
  font-weight: 700;
}
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.copyright {
  flex-basis: 100%;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
  padding-top: 14px;
}
.not-found {
  min-height: 65vh;
}
.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
/* A SLIM BAR, NOT A CARD. The bar is legal furniture and it should read as furniture: one line of
   text and two answers on a single row from about 700px up, and a two row stack on a phone. It
   used to be a paragraph on a chunky pair of buttons, which measured 237px on a 320px phone and
   103px on a desktop, and a notice that size stops being furniture and starts being a takeover.

   The bar is capped and scrolls: at 200% text on a small phone an uncapped one filled the screen
   and buried the page behind it. src/client/consent.ts reserves its measured height at the foot
   of the body so the footer never sits underneath it. */
.consent-banner {
  position: fixed;
  inset: auto 0 0;
  z-index: 900;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 10px 6%;
  background: var(--butter);
  border-top: 3px solid var(--ink);
}
.consent-banner[hidden] {
  display: none;
}
.consent-banner:focus-visible {
  outline: 3px solid #075693;
  outline-offset: -8px;
}
/* The basis is what decides the two layouts, and it is the only thing that does. Wider than about
   700px there is room for the line and both answers, so nothing wraps; narrower, the line claims
   its own row and the answers drop under it. No media query is needed for either. */
.consent-copy {
  flex: 1 1 340px;
  max-width: 640px;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
}
/* Grows into whatever the line leaves, so the answers sit at the far end of the bar on a wide
   screen and at the right of their own row on a phone. */
.consent-actions {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
/* ONE RULE FOR BOTH ANSWERS, AND NO VARIANT. Same size, same fill, same weight, and the decline
   is first: see the note in src/components/consent-banner.ts. The site's own button, cut down to
   the bar's scale. These two sit at 44px rather than the 56px .button floor, because the bar has
   to read as furniture and a 56px pair pushes it back towards the card it replaced; 44px is the
   floor the site's smaller controls keep and it still clears WCAG 2.5.5 at AAA. The wobble is
   scaled, not flattened: a perfect pill would make the only two buttons a first time visitor
   meets the only two that are not in the site's hand drawn voice. The rest plus the lift equals
   the hover offset, as it does on .button, so the shadow's bottom edge stays put. */
.consent-actions .button {
  min-height: 44px;
  padding: 9px 18px;
  border-radius: 14px 17px 13px 19px;
  box-shadow: 0 3px 0 var(--ink);
  font-size: 0.875rem;
  cursor: pointer;
}
.consent-actions .button:hover {
  box-shadow: 0 6px 0 var(--ink);
}
.consent-choice {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.consent-choice[hidden] {
  display: none;
}
.consent-choice:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
@media (max-width: 1100px) {
  .site-header {
    gap: 18px;
  }
  .site-header nav {
    gap: 18px;
  }
}
/* Two rows from here down: the logo and YouTube on top, the six places under them, spread
   across the whole width so every one shows on a 320px phone without sideways scrolling. Six
   places only fit beside the logo from 900px. */
@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    row-gap: 4px;
    padding: 14px 5% 6px;
  }
  .site-header .youtube {
    margin-left: auto;
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.8125rem;
  }
  .site-header nav {
    order: 3;
    flex-basis: 100%;
    justify-content: space-between;
    gap: 2px 10px;
    margin-left: 0;
    font-size: 0.875rem;
  }
  .site-header nav > a.nav-learn {
    padding: 0 12px;
  }
  .brand-name {
    font-size: 1.9rem;
  }
  .brand-frog {
    width: 45px;
    height: 47px;
  }
  .brand-name small {
    font-size: 0.5625rem;
  }
}
/* Six places do not fit one row on a phone, so they sit in two even rows of three. */
@media (max-width: 520px) {
  .site-header nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-items: center;
    gap: 0 8px;
  }
  .site-header nav > a {
    min-height: 40px;
  }
}
@media (max-width: 360px) {
  .site-header nav {
    font-size: 0.8125rem;
  }
  .site-header nav > a.nav-learn {
    padding: 0 9px;
  }
  .brand-name {
    font-size: 1.7rem;
  }
}
@media (max-width: 700px) {
  .section {
    padding: 48px 6%;
  }
  .section-heading {
    gap: 8px;
    margin-bottom: 20px;
  }
  .page-intro {
    padding-top: 28px;
    padding-bottom: 18px;
  }
  .site-footer {
    padding-top: 32px;
  }
  .site-footer nav {
    gap: 4px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media (forced-colors: active) {
  .button,
  .cast-card,
  .portrait,
  .manga-page,
  .manga-panel {
    box-shadow: none;
    border: 2px solid CanvasText;
  }
  a:focus-visible,
  summary:focus-visible,
  select:focus-visible,
  button:focus-visible {
    outline: 3px solid Highlight;
  }
}
/* How a drawing gets onto the art wall: Fan art and Draw. */
.share-steps {
  overflow-wrap: anywhere;
  display: grid;
  gap: 10px;
  margin: 18px 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: share-step;
  font-size: 1rem;
  line-height: 1.5;
}
.share-steps li {
  position: relative;
  padding-left: 44px;
  counter-increment: share-step;
}
.share-steps li::before {
  content: counter(share-step);
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fffaf0;
  font-weight: 800;
}
.share-steps a {
  display: inline-block;
  padding: 4px 0;
  font-weight: 700;
  text-decoration: underline;
}
/* The Continue button: home, /learn/ and /study/. */
.continue-box {
  display: flex;
  justify-content: center;
  margin: 0 0 18px;
}
.continue-box[hidden] {
  display: none;
}
.continue-box .continue-go {
  max-width: 100%;
  text-align: left;
}
.continue-go span:first-child {
  overflow-wrap: anywhere;
}

.world-site {
  --atlas-night: #081924;
  --atlas-gold: #ffdc59;
  --atlas-cream: #fff5d9;
  background: var(--atlas-cream);
}
.world-guide {
  color: #252b25;
}
.atlas-masthead,
.atlas-contents,
.atlas-inner,
.atlas-end {
  max-width: 1440px;
  margin-inline: auto;
}
.atlas-intro {
  background: #fff5d9;
  background-image: radial-gradient(#98704418 0.8px, transparent 0.8px);
  background-size: 6px 6px;
}
.atlas-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 44px;
  padding: 45px 5% 35px;
}
.atlas-kicker {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.atlas-masthead h1 {
  font:
    400 clamp(3.5rem, 8vw, 7.5rem)/0.95 'Kero Impact',
    var(--heading);
  letter-spacing: 0.01em;
  margin: 0;
}
.atlas-masthead h1 em {
  display: block;
  width: fit-content;
  color: #fff5d9;
  background: #173f36;
  padding: 0.02em 0.15em 0.07em 0.1em;
  margin: 8px 0 0 0.3em;
  transform: rotate(-3deg);
  font-style: normal;
  box-shadow: 5px 5px 0 #e3b956;
}
.atlas-welcome {
  max-width: 43ch;
  padding-left: 26px;
  border-left: 3px solid #8b4d28;
  font:
    700 1.2rem/1.5 'Kero Comic',
    var(--body);
}
.atlas-welcome p {
  margin: 0 0 18px;
}
.atlas-welcome .atlas-welcome-lead {
  display: block;
  margin-bottom: 18px;
  font:
    700 clamp(1.4rem, 2.2vw, 1.9rem)/1.3 'Kero Comic',
    var(--body);
}
.atlas-spoilers {
  display: inline-block;
  border: 1px solid #9b845b;
  border-radius: 3px;
  padding: 4px 9px;
  font-size: 0.8125rem;
  line-height: 1.4;
}
.atlas-contents {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 0 5% 36px;
}
.atlas-contents a {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 2px solid #252b25;
  color: #252b25;
  background: #fff9e9;
  box-shadow: 3px 4px 0 #252b25;
  transition: background 160ms ease;
}
.atlas-nav-art {
  display: block;
  position: relative;
  border-bottom: 2px solid #252b25;
}
.atlas-nav-art img {
  width: 100%;
  height: auto;
}
.atlas-nav-number {
  position: absolute;
  top: 6px;
  left: 6px;
  color: #252b25;
  background: #ffdc59;
  border: 1px solid #252b25;
  padding: 3px 6px;
  font:
    1.1rem/1 'Kero Impact',
    var(--heading);
  transform: rotate(-5deg);
}
.atlas-nav-name {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 10px;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.atlas-nav-name > span {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.atlas-contents a:hover {
  background: var(--atlas-gold);
}
/* Each subject is an illustrated spread. Text lives around the original art,
   with generous print margins so overlaps never conceal the illustration. */
.atlas-topic {
  position: relative;
  isolation: isolate;
  scroll-margin-top: 20px;
}
.atlas-inner {
  position: relative;
  padding: 80px 6%;
}
.atlas-topic h2,
.atlas-topic h3 {
  font-family: 'Kero Impact', var(--heading);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}
.atlas-topic h2 {
  font-size: clamp(3.4rem, 8.8vw, 8.5rem);
}
.atlas-topic h2 em {
  font-style: normal;
}
.atlas-topic figure {
  margin: 0;
  min-width: 0;
}
.atlas-topic img {
  display: block;
  width: 100%;
  height: auto;
}
.atlas-marker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font: 700 0.875rem/1.5 var(--body);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.atlas-marker > span {
  font:
    400 1.75rem/1 'Kero Impact',
    var(--heading);
  opacity: 0.85;
}
.atlas-lead,
.atlas-town-lead {
  font:
    700 clamp(1.4rem, 2.3vw, 2rem)/1.25 'Kero Comic',
    var(--body);
  max-width: 28ch;
  overflow-wrap: anywhere;
}
.atlas-prose {
  font:
    700 clamp(1.25rem, 1.55vw, 1.45rem)/1.5 'Kero Comic',
    var(--body);
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.atlas-prose p {
  margin: 0;
  max-width: 44ch;
}
.atlas-prose strong {
  font-weight: 700;
  color: var(--story-accent, inherit);
  background: linear-gradient(
    transparent 76%,
    var(--story-highlight, #a7741e33) 76%,
    var(--story-highlight, #a7741e33) 96%,
    transparent 96%
  );
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.atlas-dropcap > p:first-child::first-letter {
  float: left;
  font:
    400 3.8em/0.85 'Kero Impact',
    var(--heading);
  margin: 0.03em 0.11em 0 0;
  color: var(--story-accent, inherit);
}
.atlas-art-print {
  position: relative;
  padding: 14px 14px 58px;
  background: var(--print-paper, #fff5da);
  box-shadow: 0 18px 35px #071b2826;
}
.atlas-art-print::before {
  content: '';
  position: absolute;
  inset: -8px 10px 8px -10px;
  border: 1px solid var(--print-line, #78582d80);
  transform: rotate(-1.5deg);
  z-index: -1;
  pointer-events: none;
}
/* Kerotown: a big illustrated postcard with Kero outside the picture. */
.atlas-kerotown {
  background: #f5cf53;
  background-image:
    radial-gradient(#805b2220 0.7px, transparent 0.7px),
    linear-gradient(115deg, #ffe998, #f5cf53 65%);
  background-size:
    5px 5px,
    auto;
}
.atlas-kerotown .atlas-inner {
  padding-top: 50px;
  padding-bottom: 85px;
}
.atlas-town-heading {
  position: relative;
  z-index: 2;
  padding-left: 3%;
  padding-bottom: 26px;
}
.atlas-town-heading h2 {
  font-family: var(--heading);
  font-size: clamp(4rem, 12.2vw, 11rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0;
  color: #24483b;
  text-shadow: 3px 4px 0 #fff1ba;
}
.atlas-town-lead {
  margin: 16px 0 0 auto;
  max-width: 27ch;
  transform: rotate(-3deg);
}
.atlas-town-art {
  transform: rotate(-1deg);
}
.atlas-town-story {
  position: relative;
  margin: -26px 2% 0 4%;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.75fr);
  gap: 6%;
  align-items: start;
}
.atlas-town-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 0.43fr);
  align-items: end;
  gap: 10px;
  padding: 28px 0 0;
}
.atlas-town-welcome .atlas-prose {
  --story-accent: #214e3b;
}
.atlas-town-welcome .atlas-town-kero {
  width: 125%;
  max-width: none;
  margin-left: -8%;
  margin-bottom: -10px;
  transform: rotate(6deg);
}
.atlas-town-secret {
  margin-top: 35px;
  padding: 26px;
  background: #24483b;
  color: #fff4d7;
  --story-accent: #ffe085;
  --story-highlight: #ae893455;
  transform: rotate(2deg);
  box-shadow: 6px 7px 0 #aa7d32;
}
/* Uneven paper transitions connect the illustrated spreads. */
.atlas-first-dragon::before,
.atlas-goro-childhood::before,
.atlas-fin-brigade-lore::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 24px;
  background: inherit;
  clip-path: polygon(
    0 60%,
    6% 25%,
    16% 65%,
    23% 42%,
    34% 65%,
    46% 15%,
    55% 40%,
    68% 12%,
    79% 48%,
    91% 25%,
    100% 60%,
    100% 100%,
    0 100%
  );
}
/* A wide reveal, followed by two different voices in the margin. */
.atlas-first-dragon {
  color: #dcedf5;
  background: #050f19;
  background-image: radial-gradient(ellipse at 50% 35%, #113d5666, transparent 66%);
}
.atlas-first-dragon .atlas-inner {
  padding-top: 65px;
  padding-bottom: 40px;
}
.atlas-dragon-heading {
  margin: 0 0 28px 5%;
  position: relative;
  z-index: 2;
}
.atlas-dragon-heading h2 {
  margin: 0;
  font-size: clamp(4.2rem, 13vw, 12rem);
  color: #84daff;
  text-shadow: 3px 5px 0 #0d3149;
}
.atlas-dragon-heading h2 span {
  display: block;
  font:
    700 0.3em/1.2 'Kero Comic',
    var(--body);
  color: #dcedf5;
}
.atlas-dragon-heading h2 em {
  display: block;
  color: inherit;
}
.atlas-dragon-heading .atlas-lead {
  margin: 12px 0 0 32%;
  max-width: 28ch;
  color: #bedae9;
}
.atlas-dragon-art {
  padding-bottom: 44px;
  background: #081b2a;
  box-shadow: 0 0 70px #407caf24;
  transform: rotate(-1deg);
}
.atlas-dragon-story {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 9%;
  margin: -22px 4% 0 7%;
  align-items: start;
}
.atlas-dragon-glimpse {
  background: #153449;
  padding: 30px;
  transform: rotate(2deg);
  --story-accent: #9ae4ff;
  --story-highlight: #1f6985;
  box-shadow: 7px 9px 0 #020b13;
}
.atlas-dragon-warning {
  padding-top: 60px;
  --story-accent: #ffe181;
  --story-highlight: #70623355;
}
.atlas-bloodline-note {
  display: grid;
  grid-template-columns: minmax(100px, 0.42fr) minmax(0, 1fr);
  align-items: end;
  gap: 28px;
  max-width: 730px;
  margin: 44px auto 0;
}
.atlas-bloodline-note .atlas-note-goro {
  align-self: end;
  filter: drop-shadow(6px 4px 0 #194357);
}
.atlas-bloodline-note > div {
  align-self: center;
  position: relative;
  color: #f1e9d1;
  padding: 22px 28px;
  border: 1px solid #6e95a6;
  border-radius: 44% 15% 25% 8% / 10% 25% 13% 30%;
  background: #122b3a;
}
.atlas-bloodline-note h3 {
  font:
    700 1.6rem/1.2 'Kero Comic',
    var(--body);
  color: #ffe181;
  margin-bottom: 10px;
}
.atlas-bloodline-note p {
  font:
    700 1.125rem/1.5 'Kero Comic',
    var(--body);
  margin: 0;
  overflow-wrap: anywhere;
}
/* Goro's memory is a loose album, with the story between its pictures. */
.atlas-goro-childhood {
  color: #412c25;
  background: #f9e4b5;
  background-image:
    radial-gradient(#70432218 0.6px, transparent 0.6px),
    linear-gradient(105deg, #f9e4b5 48%, #e9c893 50%, #fceaca 52%);
  background-size:
    4px 4px,
    auto;
}
.atlas-memory-heading {
  position: relative;
  margin-bottom: 34px;
  padding-left: 2%;
}
.atlas-memory-heading h2 {
  font-family: var(--heading);
  font-size: clamp(3.4rem, 8vw, 7.5rem);
  margin: 0;
  letter-spacing: -0.02em;
}
.atlas-memory-heading h2 em {
  color: #9a3825;
}
.atlas-memory-spread {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 25px;
  align-items: center;
}
.atlas-memory-photo {
  position: relative;
  padding: 10px 10px 0;
  background: #fff9e8;
  box-shadow:
    0 5px 6px #503b3933,
    6px 9px 0 #ad876d55;
}
.atlas-memory-photo::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 42%;
  width: 90px;
  height: 28px;
  background: #b9875f80;
  transform: rotate(-6deg);
}
.atlas-memory-photo figcaption {
  padding: 14px 6px;
  font:
    700 1.0625rem/1.4 'Kero Comic',
    var(--body);
}
.atlas-memory-before {
  grid-column: 1 / 9;
  grid-row: 1;
  transform: rotate(-2deg);
}
.atlas-memory-spread blockquote {
  grid-column: 9 / -1;
  grid-row: 1;
  margin: 0 0 0 8px;
  transform: rotate(4deg);
  color: #8d3225;
}
.atlas-memory-spread blockquote p {
  font:
    700 clamp(1.8rem, 3.2vw, 3rem)/1.15 'Kero Comic',
    var(--body);
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}
.atlas-memory-spread cite {
  font:
    700 1.125rem/1.4 'Kero Comic',
    var(--body);
  color: #412c25;
}
.atlas-memory-beginning {
  grid-column: 1 / 6;
  grid-row: 2;
  margin: 45px 0 5px 6%;
  --story-accent: #922e23;
}
.atlas-memory-after {
  grid-column: 6 / -1;
  grid-row: 2 / 4;
  margin: 50px 2% 0 0 !important;
  transform: rotate(3deg);
}
.atlas-memory-ending {
  grid-column: 2 / 6;
  grid-row: 3;
  border-top: 2px solid #b7734f;
  padding-top: 25px;
  --story-accent: #922e23;
}
/* The Echo Frogs' voice ties two loose illustrations together. */
.atlas-echo-frogs {
  color: #f1f4d2;
  background: #18483b;
  background-image: radial-gradient(ellipse at 20% 35%, #49765099, transparent 62%);
}
.atlas-echo-heading {
  position: relative;
  z-index: 2;
  margin: 0 0 35px 4%;
}
.atlas-echo-heading h2 {
  font-size: clamp(3.5rem, 9vw, 8rem);
  margin: 0;
}
.atlas-echo-heading h2 em {
  display: block;
  color: #ffe375;
  margin-left: 5%;
}
.atlas-echo-spread {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  gap: 30px;
}
.atlas-echo-portrait {
  position: relative;
  grid-column: 1 / 9;
  grid-row: 1;
}
.atlas-echo-portrait figure {
  --print-paper: #e9e9b5;
  --print-line: #ebd374;
  padding: 10px 10px 28px;
  transform: rotate(-2deg);
  z-index: 1;
}
.atlas-rings {
  position: absolute;
  inset: -19% -8%;
  pointer-events: none;
}
.atlas-rings i {
  position: absolute;
  inset: 0;
  border: 1px solid #d7e99b50;
  border-radius: 50%;
  transform: rotate(-15deg);
}
.atlas-rings i:nth-child(2) {
  inset: 8%;
}
.atlas-rings i:nth-child(3) {
  inset: 16%;
}
.atlas-echo-spread .atlas-echo-call {
  grid-column: 9 / -1;
  grid-row: 1;
  position: relative;
  transform: rotate(4deg);
  font:
    700 clamp(1.65rem, 2.9vw, 2.7rem)/1.15 'Kero Comic',
    var(--body);
}
.atlas-echo-call strong {
  font:
    400 1.55em/1 'Kero Impact',
    var(--heading);
  display: block;
  color: #ffe375;
  margin-top: 10px;
}
.atlas-echo-beginning {
  grid-column: 1 / 6;
  grid-row: 2;
  margin: 20px 0 0 5%;
  --story-accent: #ffe375;
  --story-highlight: #9ea34c55;
}
.atlas-echo-demonstration {
  grid-column: 6 / -1;
  grid-row: 2 / 4;
  align-self: start;
  transform: rotate(2deg);
  margin-top: 20px !important;
  padding: 10px 10px 0;
  background: #d9dfae;
  color: #20392d;
  box-shadow: 8px 8px 0 #0e3027;
}
.atlas-echo-demonstration figcaption {
  padding: 16px 12px;
  font:
    700 1.25rem/1.25 'Kero Comic',
    var(--body);
}
.atlas-echo-ending {
  grid-column: 2 / 6;
  grid-row: 3;
  --story-accent: #ffe375;
  --story-highlight: #9ea34c55;
}
.atlas-echo-note {
  grid-column: 7 / -1;
  grid-row: 4;
  font:
    700 1.3rem/1.4 'Kero Comic',
    var(--body);
  color: #f6edb8;
  border-bottom: 2px solid #aabd7e;
  padding-bottom: 12px;
  transform: rotate(-2deg);
  margin: 0;
  overflow-wrap: anywhere;
}
/* The fish arrive in a tilted comic ensemble. Their attack gets a full spread. */
.atlas-fin-brigade-lore {
  color: #def3f5;
  background: #075466;
  background-image:
    radial-gradient(#89d5cf18 1px, transparent 1px), linear-gradient(155deg, #075466, #082c44 65%);
  background-size:
    6px 6px,
    auto;
}
.atlas-fin-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  align-items: center;
  gap: 50px;
}
.atlas-fin-heading h2 {
  margin: 0;
  font-size: clamp(4rem, 9vw, 8rem);
  transform: rotate(-3deg);
}
.atlas-fin-heading h2 em {
  color: #ffe174;
}
.atlas-fin-heading .atlas-lead {
  margin: 0 2% 0 0;
  max-width: 18ch;
  color: #203238;
  background: #fff3c6;
  border: 2px solid #142b34;
  border-radius: 48% 52% 43% 8% / 14% 28% 13% 26%;
  padding: 26px 30px;
  transform: rotate(4deg);
  box-shadow: 5px 5px 0 #062234;
}
.atlas-fish-lineup {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 50px 0 35px;
  align-items: start;
}
.atlas-fish {
  position: relative;
  border: 3px solid #0b2835;
  padding-bottom: 52px;
  background: #072d40;
  box-shadow: 5px 7px 0 #051d2f;
}
.atlas-fish--le-chomp {
  transform: rotate(-4deg);
}
.atlas-fish--le-crunch {
  margin-top: 42px !important;
  transform: rotate(2deg);
}
.atlas-fish--le-bubbles {
  transform: rotate(-2deg);
}
.atlas-fish figcaption {
  position: relative;
  margin: -3px 10px -44px;
  padding: 10px 14px;
  color: #18343e;
  background: #ffe18c;
  transform: rotate(3deg);
}
.atlas-fish--le-crunch figcaption {
  background: #dec8f0;
}
.atlas-fish--le-bubbles figcaption {
  background: #afe5eb;
}
.atlas-fish figcaption > span {
  display: block;
  font:
    400 clamp(1.35rem, 2.5vw, 2.3rem)/1.05 'Kero Impact',
    var(--heading);
  overflow-wrap: anywhere;
}
.atlas-fish figcaption small {
  display: block;
  font: 700 0.875rem/1.4 var(--body);
  margin-top: 7px;
}
.atlas-fin-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 7%;
  margin: 44px 5% 0;
  --story-accent: #ffe184;
  --story-highlight: #96914940;
}
.atlas-fin-story p:last-child {
  margin-top: 24px;
}
.atlas-fin-technique {
  position: relative;
  margin-top: 65px;
}
.atlas-technique-heading {
  position: relative;
  z-index: 2;
  margin: 0 2% 25px;
  transform: rotate(-3deg);
}
.atlas-technique-heading h3 {
  font-size: clamp(3rem, 7vw, 6.8rem);
  max-width: 15ch;
  color: #ffe184;
  margin: 0;
  text-shadow: 3px 4px 0 #052b40;
}
.atlas-fin-technique figure {
  padding: 10px 10px 50px;
  background: #acd8d9;
  box-shadow: 7px 10px 0 #051d30;
  transform: rotate(1deg);
}
.atlas-technique-copy {
  position: relative;
  margin: -25px 4% 0 20%;
  padding: 25px 32px;
  background: #fff1ca;
  color: #24363c;
  box-shadow: 6px 7px 0 #071d2f;
  transform: rotate(-2deg);
}
.atlas-technique-copy p {
  font:
    700 clamp(1.25rem, 1.55vw, 1.45rem)/1.5 'Kero Comic',
    var(--body);
  margin: 0;
  overflow-wrap: anywhere;
}
.atlas-end {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 28px 5%;
  font-weight: 700;
}
.atlas-end a {
  padding-block: 10px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.world-site .site-footer {
  border-top: 1px solid #b6a36d;
}
.cast-lore-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  border-top: 2px solid var(--ink);
  background: #ffe6a3;
}
.cast-lore-link h2 {
  margin: 0 0 12px;
}
.cast-lore-link p {
  margin: 0;
}
/* A later episode's news sits on its own labelled note, so spoilers never blend into older lore. */
.atlas-update {
  position: relative;
  max-width: 46rem;
  margin: 44px 4% 0 auto;
  padding: 22px 28px 24px;
  background: #fff1ca;
  color: #24363c;
  box-shadow: 6px 7px 0 #071d2f;
  transform: rotate(-1deg);
}
.atlas-update p {
  margin: 0;
  font:
    700 clamp(1.15rem, 1.45vw, 1.35rem)/1.5 'Kero Comic',
    var(--body);
  overflow-wrap: anywhere;
}
.atlas-update .atlas-update-label {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 12px;
  color: #fff6df;
  background: #9a3f2c;
  font: 800 0.8125rem/1.3 var(--body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.atlas-update strong {
  color: #8a3423;
}
/* The mysterious voice glows gold in the dark, as it does in Episode 3. */
.atlas-mysterious-voice {
  color: #f6ecd0;
  background: #0b1824;
  background-image:
    radial-gradient(ellipse at 70% 30%, #f3d58a33, transparent 60%),
    linear-gradient(170deg, #122636, #070f18 70%);
}
.atlas-voice-heading {
  position: relative;
  z-index: 2;
  margin: 0 0 30px 4%;
}
.atlas-voice-heading h2 {
  margin: 0;
  color: #f6ecd0;
  font-size: clamp(3.6rem, 10vw, 9.5rem);
  text-shadow: 3px 5px 0 #06121c;
}
.atlas-voice-heading h2 em {
  display: block;
  color: #ffe08a;
  text-shadow:
    0 0 28px #ffd66a88,
    3px 5px 0 #06121c;
}
.atlas-voice-heading .atlas-lead {
  margin: 14px 0 0 30%;
  max-width: 28ch;
  color: #e8dcb8;
}
.atlas-voice-art {
  padding: 10px 10px 40px;
  background: #1c2e3d;
  box-shadow:
    0 0 60px #ffd66a33,
    7px 9px 0 #03080e;
  transform: rotate(1deg);
}
.atlas-voice-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 5%;
  align-items: start;
  margin: 44px 3% 0;
  --story-accent: #ffe08a;
  --story-highlight: #8d7a3955;
}
.atlas-voice-quote {
  margin: 0;
  padding: 24px 22px;
  background: #fff1ca;
  color: #24363c;
  box-shadow: 6px 7px 0 #03080e;
  transform: rotate(-3deg);
}
.atlas-voice-quote p {
  margin: 0 0 10px;
  font:
    400 clamp(1.5rem, 2.4vw, 2.2rem)/1.1 'Kero Impact',
    var(--heading);
  overflow-wrap: anywhere;
}
.atlas-voice-quote cite {
  font: 700 1rem/1.3 var(--body);
  font-style: normal;
}
.atlas-voice-second {
  padding-top: 40px;
}
.atlas-voice-trials {
  position: relative;
  margin-top: 70px;
}
.atlas-voice-trials figure {
  padding: 10px 10px 50px;
  background: #b9d6cf;
  box-shadow: 7px 10px 0 #03080e;
  transform: rotate(-1deg);
}
@media (max-width: 1100px) {
  .atlas-contents {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .atlas-town-story {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .atlas-town-welcome {
    grid-template-columns: minmax(0, 1fr) minmax(90px, 0.23fr);
  }
  .atlas-town-welcome .atlas-prose p {
    max-width: none;
  }
  .atlas-town-secret {
    margin: 15px 0 0 15%;
  }
  .atlas-dragon-story {
    gap: 5%;
    margin-inline: 3%;
  }
  .atlas-memory-spread,
  .atlas-echo-spread {
    gap: 22px;
  }
  .atlas-memory-ending,
  .atlas-echo-ending {
    grid-column-start: 1;
  }
}
@media (max-width: 800px) {
  .atlas-masthead {
    grid-template-columns: minmax(0, 1fr);
    padding: 30px 6%;
    gap: 30px;
  }
  .atlas-masthead h1 {
    font-size: clamp(2.75rem, 14vw, 5.5rem);
  }
  .atlas-welcome {
    padding-left: 16px;
  }
  .atlas-contents {
    padding-inline: 6%;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
    gap: 14px;
  }
  .atlas-inner {
    padding: 50px 7% 65px;
  }
  .atlas-marker {
    font-size: 0.8125rem;
    gap: 8px;
    margin-bottom: 15px;
  }
  .atlas-marker > span {
    font-size: 1.5rem;
  }
  .atlas-topic h2 {
    letter-spacing: 0;
  }
  .atlas-town-heading {
    padding-left: 0;
  }
  .atlas-town-heading h2 {
    font-size: clamp(3rem, 14vw, 7rem);
  }
  .atlas-town-lead {
    margin: 16px 0 0 5%;
    max-width: 24ch;
  }
  .atlas-art-print {
    padding: 7px 7px 34px;
  }
  .atlas-art-print::before {
    inset: -5px 4px 5px -4px;
  }
  .atlas-town-story {
    margin: -15px 0 0;
  }
  .atlas-town-welcome {
    grid-template-columns: minmax(0, 1fr);
    padding: 25px 3% 0;
  }
  .atlas-town-welcome .atlas-town-kero {
    width: min(43%, 160px);
    margin: 8px 2% -38px auto;
  }
  .atlas-town-secret {
    margin: 22px 2% 0;
    padding: 25px;
  }
  .atlas-dragon-heading {
    margin-left: 0;
  }
  .atlas-dragon-heading h2 {
    font-size: clamp(4rem, 19vw, 8rem);
  }
  .atlas-dragon-heading .atlas-lead {
    margin: 15px 0 0 6%;
  }
  .atlas-dragon-art {
    padding-bottom: 30px;
  }
  .atlas-dragon-story {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    margin-top: -12px;
  }
  .atlas-dragon-glimpse {
    padding: 25px;
  }
  .atlas-dragon-warning {
    padding: 0 3%;
  }
  .atlas-bloodline-note {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 30px;
  }
  .atlas-bloodline-note .atlas-note-goro {
    width: min(40%, 160px);
    margin-left: 8%;
  }
  .atlas-bloodline-note > div {
    padding: 22px 25px;
  }
  .atlas-memory-heading {
    padding-left: 0;
  }
  .atlas-memory-heading h2 {
    font-size: clamp(2.8rem, 12vw, 6rem);
  }
  .atlas-memory-spread {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 25px 0;
  }
  .atlas-memory-before {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 96%;
  }
  .atlas-memory-photo {
    padding: 7px 7px 0;
  }
  .atlas-memory-photo figcaption {
    font-size: 1rem;
    padding: 12px 5px;
  }
  .atlas-memory-spread blockquote {
    grid-column: 2 / -1;
    grid-row: 2;
    margin: 12px 0;
    max-width: 20rem;
  }
  .atlas-memory-spread blockquote p {
    font-size: clamp(1.6rem, 7vw, 2.5rem);
  }
  .atlas-memory-beginning {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 5px 3%;
  }
  .atlas-memory-after {
    grid-column: 1 / -1;
    grid-row: 4;
    width: 89%;
    margin: 15px 0 0 auto !important;
  }
  .atlas-memory-ending {
    grid-column: 1 / -1;
    grid-row: 5;
    margin: 10px 5% 0;
    border: 0;
    padding: 0;
  }
  .atlas-echo-heading {
    margin-left: 0;
  }
  .atlas-echo-heading h2 {
    font-size: clamp(3rem, 13vw, 6rem);
  }
  .atlas-echo-heading h2 em {
    margin-left: 3%;
  }
  .atlas-echo-spread {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 25px 0;
  }
  .atlas-echo-portrait {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 96%;
  }
  .atlas-rings {
    inset: -10% 0;
  }
  .atlas-rings i {
    transform: rotate(-5deg);
  }
  .atlas-echo-spread .atlas-echo-call {
    grid-column: 2 / -1;
    grid-row: 2;
    font-size: clamp(1.5rem, 6vw, 2.2rem);
    margin: 8px 0;
  }
  .atlas-echo-beginning {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 0 3%;
  }
  .atlas-echo-demonstration {
    grid-column: 1 / -1;
    grid-row: 4;
    width: 93%;
    margin: 10px 0 0 auto !important;
    padding: 7px 7px 0;
  }
  .atlas-echo-demonstration figcaption {
    font-size: 1.125rem;
    padding: 12px 8px;
  }
  .atlas-echo-ending {
    grid-column: 1 / -1;
    grid-row: 5;
    margin: 10px 3% 0;
  }
  .atlas-echo-note {
    grid-column: 2 / -1;
    grid-row: 6;
    font-size: 1.2rem;
  }
  .atlas-fin-heading {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 28px;
  }
  .atlas-fin-heading h2 {
    font-size: clamp(4rem, 16vw, 7rem);
  }
  .atlas-fin-heading .atlas-lead {
    align-self: end;
    max-width: 22ch;
    padding: 22px;
    transform: rotate(2deg);
  }
  .atlas-fish-lineup {
    margin-top: 35px;
    gap: 16px;
  }
  .atlas-fin-story {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin: 35px 3% 0;
  }
  .atlas-fin-story p:last-child {
    margin: 0;
  }
  .atlas-fin-technique {
    margin-top: 45px;
  }
  .atlas-technique-heading h3 {
    font-size: clamp(2.75rem, 11vw, 5rem);
  }
  .atlas-fin-technique figure {
    padding: 6px 6px 30px;
  }
  .atlas-technique-copy {
    margin: -12px 3% 0 4%;
    padding: 23px;
  }
}
@media (max-width: 600px) {
  .atlas-fish-lineup {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 15px;
    margin-inline: 2%;
  }
  .atlas-fish--le-crunch {
    margin-top: 24px !important;
  }
  .atlas-fish--le-bubbles {
    grid-column: 1 / -1;
    width: 78%;
    justify-self: center;
    margin-top: 0 !important;
  }
  .atlas-fish figcaption {
    padding: 9px;
    margin-inline: 5px;
  }
  .atlas-fish figcaption small {
    font-size: 0.875rem;
  }
}
@media (max-width: 800px) {
  .atlas-update {
    margin: 34px 0 0;
    padding: 18px 20px 20px;
  }
  .atlas-voice-heading {
    margin-left: 0;
  }
  .atlas-voice-heading h2 {
    font-size: clamp(3rem, 15vw, 6rem);
  }
  .atlas-voice-heading .atlas-lead {
    margin: 14px 0 0 6%;
  }
  .atlas-voice-art {
    padding: 7px 7px 28px;
  }
  .atlas-voice-story {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    margin: 30px 0 0;
  }
  .atlas-voice-second {
    padding-top: 0;
  }
  .atlas-voice-trials {
    margin-top: 50px;
  }
  .atlas-voice-trials figure {
    padding: 7px 7px 34px;
  }
}

.learn-room {
  --learn-bg: var(--butter);
  max-width: var(--page);
  margin: 10px auto 40px;
  padding: 30px 6% 48px;
  background: var(--learn-bg);
  border-block: 3px solid var(--ink);
}
.learn-room--katakana {
  --learn-bg: var(--blue);
  /* Darker text tones keep contrast on the blue background. */
  --muted: #3f3224;
  --red: #7f2219;
}
.learn-room--numbers {
  --learn-bg: #ffd9c2;
  --muted: #4a3a2a;
  --red: #8a2a1f;
}
.learn-room--index {
  --learn-bg: var(--butter);
}
.learn-room [hidden] {
  display: none !important;
}
.learn-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
}
.learn-intro h1 {
  font-size: clamp(2.3rem, 4.5vw, 3.8rem);
  margin-bottom: 12px;
}
.learn-intro h1 [lang='ja'] {
  font-family: 'Kero Japanese', var(--body);
  color: var(--red);
}
.learn-intro p:last-child {
  margin: 0;
  max-width: 46ch;
}
.learn-sticker {
  padding: 16px 22px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(7deg);
  font: 1.3rem/1.1 var(--heading);
  flex-shrink: 0;
  text-align: center;
}
.learn-room--katakana .learn-sticker {
  background: var(--paper);
}
.learn-switch {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px 0 26px;
}
.learn-switch a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 18px;
  font-weight: 700;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
}
.learn-switch a[aria-current='page'] {
  background: var(--ink);
  color: var(--paper);
}
.learn-switch [lang='ja'] {
  font-family: 'Kero Japanese', var(--body);
}

.learn-lesson {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  grid-template-areas:
    'guide cards'
    'guide nav';
  gap: 18px 28px;
  align-items: start;
}
.learn-guide {
  grid-area: guide;
  text-align: center;
}
.learn-sensei {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 50%;
}
.learn-guide h2 {
  font-size: 1.4rem;
  margin: 12px 0 4px;
}
.learn-count {
  margin: 0;
  font-weight: 700;
  color: var(--muted);
}
.learn-cards {
  grid-area: cards;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.learn-card {
  padding: 24px 28px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 20px 24px 18px 26px;
  box-shadow: 6px 6px 0 var(--ink);
}
.learn-card .eyebrow {
  color: var(--red);
  margin-bottom: 6px;
}
.learn-card h3 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 10px;
}
.learn-card h3:focus {
  outline: none;
}
.learn-card p {
  font-size: 1.1rem;
  margin: 0 0 14px;
  max-width: 60ch;
}
.learn-outro {
  font-weight: 700;
}
.learn-examples {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.learn-examples li {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 130px;
  flex: 1 1 130px;
  max-width: 260px;
  padding: 14px 12px;
  background: var(--butter);
  border: 2px solid var(--ink);
  border-radius: 14px;
  text-align: center;
}
.learn-room--katakana .learn-examples li {
  background: #d9f0f2;
}
.learn-jp {
  font:
    2.2rem/1.2 'Kero Japanese',
    var(--body);
  font-weight: 700;
}
.learn-romaji {
  font-weight: 700;
  color: var(--red);
}
.learn-meaning {
  font-size: 0.95rem;
  color: var(--muted);
}
.learn-nav {
  grid-area: nav;
  display: flex;
  gap: 12px;
}
.learn-nav .primary {
  flex: 1;
}

.learn-quiz {
  margin-top: 44px;
  padding: 26px 28px 30px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 24px 20px 26px 18px;
  box-shadow: 6px 6px 0 var(--ink);
  scroll-margin-top: 90px;
}
.learn-quiz-heading h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin: 0 0 6px;
}
.learn-quiz-heading p:last-child {
  margin: 0 0 18px;
}
.learn-question h3 {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  margin: 0 0 14px;
}
.learn-question h3:focus,
.learn-results h3:focus {
  outline: none;
}
.learn-choices {
  display: grid;
  gap: 10px;
  max-width: 560px;
}
.learn-choice {
  min-height: 52px;
  padding: 10px 18px;
  font: 700 1.05rem/1.4 var(--body);
  color: var(--ink);
  text-align: left;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
}
.learn-choice [lang='ja'] {
  font-family: 'Kero Japanese', var(--body);
  font-size: 1.25em;
}
.learn-choice:not(:disabled):hover {
  background: var(--butter);
  transform: translateY(-2px);
}
.learn-choice:disabled {
  cursor: default;
  opacity: 0.6;
}
.learn-choice.is-right {
  opacity: 1;
  background: #cfeccb;
}
.learn-choice.is-right::after {
  content: ' ✓';
}
.learn-choice.is-wrong {
  opacity: 1;
  background: #f6d2cc;
}
.learn-choice.is-wrong::after {
  content: ' ✗';
}
.learn-feedback {
  max-width: 560px;
  margin-top: 16px;
}
.learn-feedback p {
  margin: 0 0 12px;
}
.learn-verdict {
  font: 1.3rem/1.2 var(--heading);
  color: var(--red);
}
.learn-verdict.is-right {
  color: #2f7a35;
}
.learn-results {
  display: flex;
  align-items: center;
  gap: 24px;
}
.learn-result-kero {
  width: 140px;
  height: auto;
  flex-shrink: 0;
}
.learn-results h3 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 14px;
  letter-spacing: 0.04em;
}
.learn-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.learn-result-actions [lang='ja'] {
  font-family: 'Kero Japanese', var(--body);
}
.learn-paper details {
  margin-bottom: 10px;
}

@media (max-width: 720px) {
  .learn-intro {
    flex-direction: column;
    align-items: flex-start;
  }
  .learn-sticker {
    display: none;
  }
  .learn-lesson {
    grid-template-columns: 1fr;
    grid-template-areas: 'guide' 'cards' 'nav';
  }
  .learn-guide {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
  }
  .learn-sensei {
    width: 84px;
  }
  .learn-guide h2 {
    margin: 0;
  }
  .learn-card,
  .learn-quiz {
    padding: 20px;
  }
  .learn-results {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .learn-choice:not(:disabled):hover {
    transform: none;
  }
}

/* ════ Lesson grid ════ */
.learn-back {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.learn-progress {
  margin: -8px 0 18px;
  font-weight: 700;
}
.learn-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.learn-tile {
  position: relative;
  display: grid;
  gap: 4px;
  height: 100%;
  padding: 18px 18px 16px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 18px 22px 16px 20px;
  box-shadow: 0 4px 0 var(--ink);
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.learn-tile:hover {
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 0 7px 0 var(--ink);
}
.learn-tile--intro {
  background: var(--yellow);
}
.learn-tile-label {
  font: 700 0.8125rem/1.4 var(--body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red);
}
.learn-tile-kana {
  font:
    700 1.9rem/1.25 'Kero Japanese',
    var(--body);
  letter-spacing: 0.04em;
}
.learn-tile-title {
  font: 1.2rem/1.2 var(--heading);
}
.learn-tile-sub {
  color: var(--muted);
  font-size: 0.95rem;
}
.learn-tile--intro .learn-tile-sub,
.learn-tile--intro .learn-tile-label {
  color: var(--ink);
}
.learn-tile-badge:empty {
  display: none;
}
.learn-tile-badge {
  justify-self: start;
  margin-top: 6px;
  padding: 2px 10px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #cfeccb;
}
.learn-tile.is-next {
  outline: 4px solid var(--red);
  outline-offset: 3px;
}
.learn-tile.is-next .learn-tile-badge {
  background: var(--yellow);
}
.learn-how {
  margin-top: 36px;
  padding: 22px 26px;
  background: var(--paper);
  border: 2px dashed var(--ink);
  border-radius: 18px;
}
.learn-how h2 {
  font-size: 1.5rem;
  margin: 0 0 10px;
}
.learn-how ol {
  margin: 0 0 10px;
  padding-left: 1.3em;
}
.learn-how li + li {
  margin-top: 6px;
}
.learn-how p {
  margin: 0;
  color: var(--muted);
}

/* ════ Flash cards ════ */
.learn-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.learn-section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.flash-cards {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}
.learn-flash--stepped .flash-cards {
  grid-template-columns: minmax(0, 460px);
  justify-content: center;
}
.flash-face {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  width: 100%;
  min-height: 210px;
  padding: 20px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 22px 18px 24px 20px;
  box-shadow: 6px 6px 0 var(--ink);
  cursor: pointer;
}
.flash-face:disabled {
  cursor: default;
  opacity: 1;
}
.learn-flash--stepped .flash-face {
  min-height: 300px;
}
.flash-kana {
  font:
    700 clamp(4.5rem, 12vw, 7rem)/1 'Kero Japanese',
    var(--body);
}
.flash-back {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}
.flash-romaji {
  font: 2rem/1 var(--heading);
  color: var(--red);
}
.flash-cue {
  max-width: 30ch;
  color: var(--muted);
}
.flash-hint {
  display: none;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--muted);
}
/* With JavaScript the back is hidden until the card is flipped. */
.learn-flash--stepped .flash-back {
  display: none;
}
.learn-flash--stepped .flash-hint {
  display: block;
}
.learn-flash--stepped .is-flipped .flash-back {
  display: grid;
}
.learn-flash--stepped .is-flipped .flash-hint {
  display: none;
}
.learn-flash--stepped .is-flipped .flash-face {
  background: var(--butter);
}
.learn-room--katakana .learn-flash--stepped .is-flipped .flash-face {
  background: #d9f0f2;
}
.learn-flash .learn-nav {
  max-width: 460px;
  margin: 0 auto;
}

/* ════ Multiple choice ════ */
.mc-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.mc-progress p {
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
}
.mc-bar {
  flex: 1;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  overflow: hidden;
}
.mc-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--yellow);
  transition: width 0.3s;
}
.mc-question {
  text-align: center;
}
.mc-prompt {
  margin: 0;
  font-weight: 700;
  color: var(--muted);
}
.mc-target {
  margin: 4px 0 18px;
  font: 2.6rem/1.2 var(--heading);
}
.mc-target:focus {
  outline: none;
}
.mc-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}
.mc-choice {
  min-height: 64px;
  padding: 10px;
  font: 1.6rem/1.2 var(--heading);
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
}
.mc-choice--kana {
  font:
    700 2.2rem/1.2 'Kero Japanese',
    var(--body);
}
.mc-choice:not(:disabled):hover {
  background: var(--butter);
  transform: translateY(-2px);
}
.mc-choice:disabled {
  cursor: default;
  opacity: 0.55;
}
.mc-choice.is-right {
  opacity: 1;
  background: #cfeccb;
}
.mc-choice.is-wrong {
  opacity: 1;
  background: #f6d2cc;
}
.mc-question .learn-feedback {
  margin: 18px auto 0;
}
.learn-paper-list {
  columns: 3;
  font-size: 1.1rem;
}

/* ════ Home page section ════ */
.learn-preview {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: center;
  background: var(--butter);
  border-block: 3px solid var(--ink);
  margin-block: 35px 0;
}
.learn-preview [hidden] {
  display: none !important;
}
.learn-preview h2 span {
  color: var(--red);
}
.learn-resume {
  display: grid;
  gap: 10px;
  justify-items: start;
  font-weight: 700;
}
.learn-preview-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.learn-preview-card {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 22px 20px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 22px 18px 24px 20px;
  box-shadow: 6px 6px 0 var(--ink);
  transform: rotate(-2deg);
  transition: transform 0.18s;
}
.learn-preview-card--katakana {
  background: #d9f0f2;
  transform: rotate(2deg);
}
.learn-preview-card:hover {
  transform: rotate(0) translateY(-4px);
}
.learn-preview-kana {
  font:
    700 clamp(2rem, 4vw, 2.8rem)/1.2 'Kero Japanese',
    var(--body);
}
.learn-preview-name {
  font: 1.5rem/1.2 var(--heading);
}
.learn-preview-name [lang='ja'] {
  white-space: nowrap;
  font-family: 'Kero Japanese', var(--body);
  color: var(--red);
  font-size: 0.85em;
}
.learn-preview-sub {
  color: var(--muted);
}
.learn-preview-go {
  margin-top: 6px;
  font-weight: 700;
}

@media (max-width: 860px) {
  .learn-preview {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .learn-preview-cards {
    grid-template-columns: 1fr;
  }
  .learn-paper-list {
    columns: 2;
  }
  .mc-choice {
    font-size: 1.35rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .learn-tile,
  .learn-preview-card,
  .mc-bar span {
    transition: none;
  }
  .learn-tile:hover,
  .learn-preview-card:hover,
  .mc-choice:not(:disabled):hover {
    transform: none;
  }
}

/* ════ Simpler lesson layout ════ */
.lesson-head {
  text-align: center;
  margin-bottom: 18px;
}
.lesson-head .eyebrow {
  margin-bottom: 4px;
  color: var(--red);
}
.lesson-head h1 {
  margin: 0;
  font:
    700 clamp(3rem, 9vw, 5.5rem)/1.1 'Kero Japanese',
    var(--heading);
  letter-spacing: 0.06em;
}
.battle-room .lesson-head h1 {
  font: clamp(2.4rem, 6vw, 4rem)/1.1 var(--heading);
  letter-spacing: 0;
}
.battle-vs {
  color: var(--red);
}
.lesson-romaji {
  margin: 4px 0 0;
  font: 1.3rem/1.3 var(--heading);
  letter-spacing: 0.08em;
  color: var(--muted);
}
.lesson-steps {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 28px;
}
.lesson-steps a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lesson-steps b,
.step-title b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding-top: 0.1em;
}
.lesson-steps a {
  min-height: 46px;
  padding: 8px 18px;
  font-weight: 700;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
}
.lesson-steps b,
.step-title b {
  justify-content: center;
  width: 1.7em;
  height: 1.7em;
  font: 1rem/1 var(--heading);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}
.learn-flash,
.learn-words,
.learn-draw {
  scroll-margin-top: 90px;
}
.learn-room .learn-quiz {
  margin-top: 36px;
}

/* Sound buttons */
.sound-button {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font-size: 1.5rem;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
}
.sound-button:hover {
  transform: translateY(-2px);
}
.flash-card {
  position: relative;
}
.flash-sound {
  position: absolute;
  top: 14px;
  right: 14px;
}
.flash-card audio {
  width: 100%;
  margin-top: 8px;
}
.mc-target-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.mc-target-row .mc-target {
  margin-bottom: 18px;
}
.mc-target-row .sound-button {
  margin-bottom: 18px;
}

/* ════ Stroke order ════ */
.learn-draw {
  margin-top: 36px;
  padding: 26px 28px 22px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 20px 26px 18px 24px;
  box-shadow: 6px 6px 0 var(--ink);
}
.draw-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.draw-picker button {
  width: 58px;
  height: 58px;
  font:
    700 1.8rem/1 'Kero Japanese',
    var(--body);
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
}
.draw-picker button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--paper);
}
.draw-stage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.draw-demo,
.draw-pad {
  margin: 0;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.draw-demo svg,
.draw-paper {
  width: min(100%, 320px);
  aspect-ratio: 1;
  background:
    linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat,
    linear-gradient(var(--line), var(--line)) center / 1px 100% no-repeat,
    #fff;
  border: 3px solid var(--ink);
  border-radius: 16px;
}
.draw-demo figcaption,
.draw-pad figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  font-weight: 700;
}
.draw-under {
  fill: none;
  stroke: #efe4cb;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.draw-stroke {
  fill: none;
  stroke: var(--ink);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw-stroke 0.9s ease-in-out forwards;
  animation-delay: calc(var(--s) * 1s + 0.3s);
}
.draw-number {
  opacity: 0;
  animation: draw-number 0.2s forwards;
  animation-delay: calc(var(--s) * 1s + 0.3s);
}
.draw-number circle {
  fill: var(--red);
}
.draw-number text {
  font: 700 6.5px/1 var(--body);
  fill: #fff;
}
/* Stroke timing by class, because the live security policy blocks inline styles. */
.draw-s0 {
  --s: 0;
}
.draw-s1 {
  --s: 1;
}
.draw-s2 {
  --s: 2;
}
.draw-s3 {
  --s: 3;
}
.draw-s4 {
  --s: 4;
}
.draw-s5 {
  --s: 5;
}
@keyframes draw-stroke {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes draw-number {
  to {
    opacity: 1;
  }
}
.draw-paper {
  position: relative;
  overflow: hidden;
}
.draw-guide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.draw-guide path {
  fill: none;
  stroke: #e9dcc0;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.draw-paper canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.draw-credit {
  margin: 18px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
.draw-credit a {
  text-decoration: underline;
}

/* ════ Battle ════ */
.battle-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 26px;
  padding: 14px 20px;
  background: var(--red);
  color: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 5px 0 var(--ink);
  font: 1.6rem/1.2 var(--heading);
  text-align: center;
  transition: transform 0.18s;
}
.battle-banner:hover {
  transform: translateY(-3px) rotate(-1deg);
}
.battle-banner span {
  display: grid;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
}
.battle-banner b {
  font: 1.8rem/1.1 var(--heading);
}
.battle-banner img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}
.battle-banner-sensei {
  border: 3px solid var(--ink);
  border-radius: 50%;
  object-fit: cover !important;
  object-position: top;
  background: var(--paper);
}
.battle-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto 18px;
  padding: 18px 18px 26px;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(57, 44, 32, 0.15) 0 40%, transparent 41%),
    linear-gradient(#fff6dc, var(--paper));
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
}
.fighter {
  display: grid;
  gap: 8px;
  justify-items: center;
}
.fighter-art {
  width: min(100%, 220px);
  height: 220px;
  object-fit: contain;
}
.fighter--sensei .fighter-art {
  width: min(100%, 180px);
  object-fit: cover;
  object-position: top;
  border: 3px solid var(--ink);
  border-radius: 20px;
}
.hp {
  display: grid;
  gap: 4px;
  width: min(100%, 200px);
  margin: 0;
  font-weight: 700;
}
.hp-bar {
  display: block;
  height: 14px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.hp-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: #4caf50;
  transition: width 0.4s;
}
.fighter--sensei .hp-bar span {
  background: var(--red);
}
.battle-bubble {
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 8px;
}
.battle-kana {
  display: grid;
  place-items: center;
  width: 130px;
  height: 130px;
  margin: 0;
  font:
    700 4.5rem/1 'Kero Japanese',
    var(--body);
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 5px 0 var(--ink);
}
.battle-kana.is-new {
  animation: battle-pop-in 0.35s ease-out;
}
.fighter--kero.is-attacking .fighter-art {
  animation: kero-lunge 0.6s ease-in-out;
}
.fighter--sensei.is-attacking .fighter-art {
  animation: sensei-lunge 0.6s ease-in-out;
}
.fighter.is-hit .fighter-art {
  animation: fighter-shake 0.5s 0.25s ease-in-out;
}
.battle-pop {
  position: absolute;
  top: 30%;
  margin: 0;
  font: 2rem/1 var(--heading);
  color: var(--red);
  opacity: 0;
  pointer-events: none;
}
.battle-pop[data-side='sensei'] {
  right: 18%;
}
.battle-pop[data-side='kero'] {
  left: 18%;
}
.battle-pop.is-popping {
  animation: damage-float 1s ease-out;
}
.battle-choices {
  margin-bottom: 10px;
}
.battle-log {
  min-height: 1.6em;
  margin: 8px 0 0;
  font-weight: 700;
  text-align: center;
}
.battle-using {
  margin: 4px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.battle-won .fighter--sensei .fighter-art {
  transform: rotate(80deg) translateY(30px);
  transition: transform 0.6s;
}
.battle-lost .fighter--kero .fighter-art {
  transform: rotate(-80deg) translateY(30px);
  transition: transform 0.6s;
}
.battle-room .learn-results {
  justify-content: center;
  text-align: center;
}
.battle-room .learn-result-actions {
  justify-content: center;
}
@keyframes kero-lunge {
  40% {
    transform: translateX(90px) rotate(12deg);
  }
}
@keyframes sensei-lunge {
  40% {
    transform: translateX(-90px) rotate(-8deg);
  }
}
@keyframes fighter-shake {
  20%,
  60% {
    translate: -10px 0;
  }
  40%,
  80% {
    translate: 10px 0;
  }
}
@keyframes damage-float {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-40px);
  }
}
@keyframes battle-pop-in {
  0% {
    transform: scale(0.4);
  }
  70% {
    transform: scale(1.1);
  }
}

@media (max-width: 640px) {
  .battle-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 'bubble bubble' 'kero sensei';
  }
  .battle-bubble {
    grid-area: bubble;
  }
  .fighter--kero {
    grid-area: kero;
  }
  .fighter--sensei {
    grid-area: sensei;
  }
  .fighter-art {
    height: 140px;
  }
  .battle-kana {
    width: 104px;
    height: 104px;
    font-size: 3.6rem;
  }
  .battle-banner img {
    width: 60px;
    height: 60px;
  }
  .learn-draw {
    padding: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .draw-stroke {
    animation: none;
    stroke-dashoffset: 0;
  }
  .draw-number {
    animation: none;
    opacity: 1;
  }
  .battle-kana.is-new,
  .fighter .fighter-art,
  .battle-pop.is-popping {
    animation: none !important;
  }
  .battle-pop.is-popping {
    opacity: 1;
  }
  .battle-banner,
  .hp-bar span {
    transition: none;
  }
}

/* ════ Read words ════ */
.learn-words {
  margin-top: 36px;
  padding: 26px 28px 26px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 24px 18px 22px 20px;
  box-shadow: 6px 6px 0 var(--ink);
  text-align: center;
}
.learn-words .step-title {
  justify-content: flex-start;
}
.word-card {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: 6px auto 14px;
}
.word-art {
  width: 120px;
  height: 120px;
  object-fit: contain;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 18px;
}
.word-meaning {
  margin: 0;
  font: 1.4rem/1.2 var(--heading);
}
.word-tiles {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 4px;
}
.word-tiles:focus {
  outline: none;
}
.word-tile {
  display: grid;
  place-items: center;
  width: 72px;
  height: 80px;
  font:
    700 2.8rem/1 'Kero Japanese',
    var(--body);
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--ink);
}
.word-tile.is-blank {
  color: var(--red);
  background: var(--butter);
  border-style: dashed;
}
.word-tile.is-filled {
  background: #cfeccb;
  animation: battle-pop-in 0.35s ease-out;
}
.word-romaji {
  margin: 4px 0 6px;
  font: 1.4rem/1.2 var(--heading);
  letter-spacing: 0.08em;
  color: var(--muted);
}
.learn-words .learn-results {
  justify-content: center;
}
.learn-words .learn-result-actions {
  justify-content: center;
}
.word-list {
  list-style: none;
  padding: 0;
  font-size: 1.2rem;
}
@media (max-width: 520px) {
  .word-tile {
    width: 54px;
    height: 62px;
    font-size: 2.1rem;
  }
  .word-tiles {
    gap: 5px;
  }
  .learn-words {
    padding: 20px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .word-tile.is-filled {
    animation: none;
  }
}

/* ════ Next lesson ════ */
.lesson-next {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* ════ In this lesson: a plain table under the games (docs/pm-audit.md C6) ════ */
.lesson-table {
  max-width: 760px;
  margin: 36px auto 0;
}
.lesson-table h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
}
.lesson-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 2px solid var(--ink);
  font-size: 0.95rem;
}
.lesson-table th,
.lesson-table td {
  padding: 8px 6px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.lesson-table td:nth-child(3),
.lesson-table td:nth-child(4) {
  overflow-wrap: anywhere;
}
.lesson-table th:first-child,
.lesson-table td:nth-child(2) {
  white-space: nowrap;
}
.lesson-table thead th {
  border-top: 0;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
}
.lesson-table tbody th {
  font-size: 1.6rem;
  line-height: 1.1;
  text-align: center;
}
.lesson-table p {
  margin: 12px 0 0;
}
.learn-chart-link {
  display: flex;
  justify-content: center;
  margin: 22px 0 0;
}
.manga-word-links {
  max-width: 760px;
  margin: 28px auto 0;
  padding: 16px 18px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
}
.manga-word-links h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}
.manga-word-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.manga-word-links a {
  display: inline-block;
  min-height: 44px;
  padding: 10px 0;
  font-weight: 700;
  text-decoration: underline;
}

/* ════ The kana chart: tap to hear, and printable ════ */
.kana-chart-room h1 {
  font-family: var(--heading);
  font-size: clamp(2.2rem, 9vw, 3.6rem);
  line-height: 1;
}
.kana-chart-line {
  max-width: 34rem;
  margin-inline: auto;
}
.kana-chart-wrap {
  max-width: 640px;
  margin: 18px auto 0;
}
.kana-chart {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  table-layout: fixed;
}
.kana-chart thead th {
  font-size: 0.9rem;
  color: var(--muted);
}
.kana-chart .kana-chart-lesson {
  width: 3.4em;
  font-size: 0.7rem;
}
.kana-chart tbody th {
  text-align: center;
}
.kana-chart tbody th a {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  min-height: 44px;
  font-weight: 800;
}
.kana-chart td {
  padding: 0;
}
.chart-cell {
  display: grid;
  justify-items: center;
  width: 100%;
  min-height: 56px;
  padding: 6px 2px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.chart-cell:hover,
.chart-cell:focus-visible {
  background: var(--yellow);
}
.chart-kana {
  font-size: clamp(1.4rem, 6vw, 2rem);
  line-height: 1.1;
}
.chart-romaji {
  font-size: 0.8rem;
  font-weight: 700;
}
.kana-chart-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
@media print {
  .site-header,
  .site-footer,
  .consent-banner,
  .skip-link,
  .learn-back,
  .kana-chart-actions {
    display: none !important;
  }
  .kana-chart-room {
    margin: 0;
    padding: 0;
    border: 0;
    background: #fff;
  }
  .chart-cell {
    background: #fff;
  }
}

/* ════ Learn landing ════ */
.learn-picks {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.learn-pick {
  display: grid;
  gap: 6px;
  height: 100%;
  padding: 26px 22px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 22px 18px 24px 20px;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform 0.18s;
}
.learn-pick:hover {
  transform: translateY(-4px) rotate(-1deg);
}
.learn-pick--katakana {
  background: #d9f0f2;
}
.learn-pick--numbers {
  background: #ffe9dc;
}
.learn-pick-big {
  font:
    700 clamp(2.2rem, 5vw, 3rem)/1.15 'Kero Japanese',
    var(--heading);
}
.learn-pick-title {
  font: 1.7rem/1.2 var(--heading);
}
.learn-pick-sub {
  font-weight: 700;
  color: var(--muted);
}

/* ════ Numbers and time ════ */
.learn-group + .learn-group {
  margin-top: 28px;
}
.learn-group-title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.learn-room--numbers .learn-tile-title {
  font-size: 1.35rem;
}
.learn-room--numbers .learn-tile-sub[lang='ja'] {
  font-family: 'Kero Japanese', var(--body);
}
.lesson-head .lesson-title {
  font: clamp(2.4rem, 7vw, 4rem)/1.1 var(--heading);
  letter-spacing: 0;
}
.lesson-jp {
  font-family: 'Kero Japanese', var(--body);
  letter-spacing: 0.04em;
}
.time-prompt {
  display: grid;
  justify-items: center;
  gap: 6px;
}
.time-prompt--number {
  font: clamp(3.5rem, 11vw, 5.5rem)/1 var(--heading);
}
.time-prompt-visual {
  display: grid;
  place-items: center;
}
.learn-art {
  width: 120px;
  height: 120px;
  object-fit: contain;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 18px;
}
.time-prompt-text {
  font: 1.7rem/1.2 var(--heading);
}
.clock {
  width: 130px;
  height: 130px;
}
.clock-face {
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 4;
}
.clock-tick {
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
}
.clock-tick--big {
  stroke-width: 3.5;
}
.clock-hour,
.clock-minute {
  stroke: var(--ink);
  stroke-linecap: round;
}
.clock-hour {
  stroke-width: 6;
}
.clock-minute {
  stroke: var(--red);
  stroke-width: 4;
}
.clock-pin {
  fill: var(--ink);
}
.flash-jp {
  font:
    700 clamp(2.4rem, 8vw, 3.4rem)/1.15 'Kero Japanese',
    var(--body);
}
.mc-choice-main {
  display: block;
}
.mc-choice-main[lang='ja'] {
  font:
    700 1.6rem/1.25 'Kero Japanese',
    var(--body);
}
.learn-quiz .mc-choice {
  font-size: 1.25rem;
}
.battle-kana--text {
  width: auto;
  min-width: 130px;
  height: auto;
  min-height: 130px;
  padding: 12px 18px;
  border-radius: 28px;
  font: 1.6rem/1.2 var(--heading);
  text-align: center;
}
.battle-kana .time-prompt-text {
  font-size: 1rem;
}
.battle-show-main {
  display: block;
}
.battle-kana--text .battle-show-main:not(:has(*)) {
  font-size: 2rem;
  line-height: 1.1;
}
/* How a number's reading is said, under what Sensei shows. */
.battle-romaji {
  display: block;
  margin-top: 4px;
  font: 1.3rem/1.2 var(--heading);
  color: var(--red);
}
/* The kana battle shows a sound in romaji: letters, a little smaller than a kana. */
.battle-kana--sound {
  font: 3.3rem/1 var(--heading);
}
@media (max-width: 640px) {
  .battle-kana--sound {
    font-size: 2.7rem;
  }
}
.battle-kana .clock {
  width: 92px;
  height: 92px;
}
.learn-preview-card--numbers {
  background: #ffe9dc;
  transform: rotate(-1deg);
}
@media (max-width: 520px) {
  .clock {
    width: 110px;
    height: 110px;
  }
  .time-prompt-text {
    font-size: 1.4rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .learn-pick {
    transition: none;
  }
  .learn-pick:hover {
    transform: none;
  }
}

/* Long "Next lesson: …" labels wrap on narrow phones instead of pushing the page wide. */
.learn-room .button {
  text-align: center;
}
.learn-room .button > span:first-child {
  flex-shrink: 1;
  min-width: 0;
}

.learn-quiz .mc-target-row {
  flex-wrap: wrap;
}
.sound-button--big {
  width: 96px;
  height: 96px;
  font-size: 2.6rem;
  margin-bottom: 18px;
}

/* ════ Drawn visuals ════ */
.speaker-icon {
  width: 26px;
  height: 26px;
}
.speaker-body {
  fill: var(--ink);
}
.speaker-waves {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
}
.sound-button--big .speaker-icon {
  width: 48px;
  height: 48px;
}
.visual {
  display: block;
}
.visual--calendar {
  width: 110px;
  height: 110px;
}
.cal-page {
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 3;
}
.cal-top {
  fill: var(--red);
  stroke: var(--ink);
  stroke-width: 3;
}
.cal-ring {
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
}
.cal-day {
  font: 30px var(--heading);
  fill: var(--ink);
}
.visual--days,
.visual--span,
.visual--week {
  width: 250px;
  max-width: 100%;
  height: auto;
}
.tl-label {
  font: 700 11px var(--body);
  fill: var(--red);
}
.tl-box {
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 2.5;
}
.tl-box--on {
  fill: var(--yellow);
}
.tl-today {
  fill: var(--red);
}
.tl-tick {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.clock-wedge {
  fill: var(--yellow);
  stroke: var(--ink);
  stroke-width: 1.5;
}
.clock-question {
  font: 48px var(--heading);
  fill: var(--red);
}
.battle-kana .learn-art,
.battle-kana .visual--calendar {
  width: 84px;
  height: 84px;
}
.battle-kana .visual--days,
.battle-kana .visual--span,
.battle-kana .visual--week {
  width: 150px;
}
@media (max-width: 520px) {
  .learn-art,
  .word-art,
  .visual--calendar {
    width: 96px;
    height: 96px;
  }
}

/* ════ The learning path (home page and /learn/) ════ */
.learn-path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  counter-reset: none;
}
.learn-path-step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    'number big go'
    'number title go'
    'number line go'
    'number size go';
  column-gap: 14px;
  row-gap: 2px;
  align-items: center;
  padding: 16px 18px;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 22px 18px 24px 20px;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.18s;
}
.learn-path-step:hover {
  transform: translateY(-3px);
}
.learn-path-step--katakana {
  background: #d9f0f2;
}
.learn-path-step--numbers {
  background: #ffe9dc;
}
.learn-path-step--study {
  background: #e6f5dc;
}
.learn-path-number {
  grid-area: number;
  align-self: start;
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding-top: 0.1em;
  font: 1.3rem/1 var(--heading);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.learn-path-step.is-done .learn-path-number {
  background: #9ccf7f;
}
.learn-path-big {
  grid-area: big;
  font:
    700 clamp(1.6rem, 5vw, 2.2rem)/1.15 'Kero Japanese',
    var(--heading);
}
.learn-path-title {
  grid-area: title;
  margin: 0;
  font: 1.45rem/1.15 var(--heading);
}
.learn-path-line {
  grid-area: line;
  line-height: 1.35;
}
.learn-path-size {
  grid-area: size;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted, #4a3a2a);
}
.learn-path-go {
  grid-area: go;
  font: 1.6rem/1 var(--heading);
}
.learn-preview--path {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}
.learn-preview--path .learn-path {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.learn-path-does {
  grid-area: does;
  margin-top: 2px;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--muted, #4a3a2a);
}
.learn-room--index .learn-path {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 8px 0 0;
}
.learn-room--index .learn-path-step {
  height: 100%;
  grid-template-areas:
    'number big go'
    'number title go'
    'number line go'
    'number does go'
    'number size go';
  align-content: start;
}
.learn-room--index .continue-box {
  margin: 12px 0 0;
}
.learn-steps-title {
  margin: 34px 0 16px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

/* ════ /learn/: Kero at his desk ════ */
.learn-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
}
.learn-hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  margin-bottom: 14px;
}
.learn-hero-copy > p:not(.eyebrow) {
  max-width: 40ch;
}
.learn-order {
  padding: 10px 14px;
  background: var(--paper);
  border: 2px dashed var(--ink);
  border-radius: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.learn-saved {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.learn-order {
  margin: 18px 0 8px;
}
.learn-new {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0;
  font-weight: 700;
}
/* A returning learner's Continue button is the one yellow button; the newcomer's start goes white. */
.learn-hero-copy:has(.continue-box:not([hidden])) .learn-new .button {
  background: var(--paper);
}
.study-scene {
  margin: 0;
  min-width: 0;
}
.study-scene-inner {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border: 3px solid var(--ink);
  border-radius: 26px 22px 28px 24px;
  box-shadow: 6px 6px 0 var(--ink);
  background: #f6e7c8;
  transform: rotate(1deg);
}
.study-scene-inner picture,
.study-scene-room,
.study-scene-desk,
.study-scene-sheet {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.study-scene-room,
.study-scene-desk img {
  display: block;
  width: 100%;
  height: 100%;
}
/* Kero stands behind the desk; the desk's back edge is at 66.5% of the room's height. */
.study-scene-kero {
  position: absolute;
  left: 33.5%;
  top: 38%;
  width: 33%;
  height: auto;
  animation: kero-reads 3.2s ease-in-out infinite;
  transform-origin: 50% 100%;
}
/* The same room again, drawn only below the desk's back edge, in front of Kero. */
.study-scene-desk {
  clip-path: inset(66.5% 0 0 0);
}
.study-scene-sheet path {
  fill: none;
  stroke: #3f3226;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  animation: kana-write 0.42s ease-in backwards;
}
.study-scene figcaption {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
}
.study-scene figcaption a {
  text-decoration: underline;
  white-space: nowrap;
}
@keyframes kero-reads {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  45% {
    transform: translateY(-4%) rotate(-2deg);
  }
  60% {
    transform: translateY(-3%) rotate(1.5deg);
  }
}
@keyframes kana-write {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@media (max-width: 860px) {
  .learn-room--index .learn-path {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 700px) {
  .learn-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .study-scene {
    order: -1;
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
  }
}
/* On a phone the picture shows the right three quarters of the room: Kero and the sheet. */
@media (max-width: 560px) {
  .study-scene-inner {
    aspect-ratio: 9 / 8;
    transform: none;
  }
  .study-scene-inner > picture,
  .study-scene-desk,
  .study-scene-sheet {
    width: 133.4%;
    left: -33.4%;
  }
  .study-scene-kero {
    left: calc(33.5% * 1.334 - 33.4%);
    width: calc(33% * 1.334);
  }
}

/* ════ The home page's short Learn block ════ */
.learn-preview--compact {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  margin-top: 40px;
  padding-block: 48px;
}
.learn-preview--compact h2 {
  margin-bottom: 14px;
}
.learn-preview--compact .learn-preview-copy > p {
  max-width: 36ch;
  font-weight: 700;
}
/* Two steps a row up to tablets (four in a row squeezed the names), wider cards beside the copy
   on a desktop. */
.learn-path--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 901px) {
  .learn-path--compact {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  }
}
.learn-path--compact .learn-path-step {
  grid-template-areas:
    'number title go'
    'number size go';
  padding: 12px 14px;
}
.learn-path--compact .learn-path-number {
  align-self: center;
}
.learn-path--compact .learn-path-title {
  font-size: 1.25rem;
}
@media (max-width: 900px) {
  .learn-preview--compact {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}
/* On phones the number and arrow share the top line and the name gets the card's full width, so
   "Hiragana" and "Lessons 1-6" keep whole words from 320 px up. */
@media (max-width: 560px) {
  .learn-path--compact {
    gap: 10px;
  }
  .learn-path--compact .learn-path-step {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'number go'
      'title title'
      'size size';
    row-gap: 4px;
    padding: 10px 12px;
  }
  .learn-path--compact .learn-path-number {
    justify-self: start;
    width: 2rem;
    height: 2rem;
    font-size: 1.1rem;
  }
  .learn-path--compact .learn-path-go {
    font-size: 1.3rem;
  }
  .learn-path--compact .learn-path-title {
    font-size: 1.15rem;
  }
}
.learn-games {
  margin-top: 40px;
}
.learn-games .section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}
@media (max-width: 900px) {
  .learn-preview--path {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .learn-preview--path .learn-path {
    grid-template-columns: 1fr;
  }
  .learn-path-step {
    padding: 14px 14px;
    column-gap: 10px;
  }
}

/* One stroke after another, in stroke order: あ い う え お. */
.study-scene-sheet .stroke-0 {
  animation-delay: 0.8s;
}
.study-scene-sheet .stroke-1 {
  animation-delay: 1.25s;
}
.study-scene-sheet .stroke-2 {
  animation-delay: 1.7s;
}
.study-scene-sheet .stroke-3 {
  animation-delay: 2.15s;
}
.study-scene-sheet .stroke-4 {
  animation-delay: 2.6s;
}
.study-scene-sheet .stroke-5 {
  animation-delay: 3.05s;
}
.study-scene-sheet .stroke-6 {
  animation-delay: 3.5s;
}
.study-scene-sheet .stroke-7 {
  animation-delay: 3.95s;
}
.study-scene-sheet .stroke-8 {
  animation-delay: 4.4s;
}
.study-scene-sheet .stroke-9 {
  animation-delay: 4.85s;
}
.study-scene-sheet .stroke-10 {
  animation-delay: 5.3s;
}
.study-scene-sheet .stroke-11 {
  animation-delay: 5.75s;
}
