/* Colors come from Interior Athabascan beadwork: dark velvet, smoke-tanned hide, and the bead colors. */
:root {
  --hide: #efe3cf;
  --hide-deep: #e2cfb0;
  --paper: #fffaf1;
  --velvet: #1d2433;
  --velvet-2: #2a3347;
  --ink: #2a1f17;
  --muted: #65523f;
  --bead-red: #c8323a;
  --bead-blue: #2457a6;
  --bead-turq: #3fa3a8;
  --bead-gold: #e2a72e;
  --bead-white: #f6f1e7;
  --bead-pink: #ef8fa6;
  --bead-green: #3f8a4f;
  --line: rgba(42, 31, 23, 0.14);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 10px 24px rgba(70, 45, 20, 0.12);
  --radius: 20px;
  --serif: "Noto Serif", Palatino, Georgia, serif;
  font-family: "Noto Sans", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--hide);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: url("img/hide.svg"), var(--hide);
}

a { color: var(--bead-blue); }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--bead-gold);
  color: var(--velvet);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 10;
  font-weight: 800;
}
.skip:focus { top: 12px; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Beaded strip, used as a border between sections. */
.band {
  height: 30px;
  background: url("img/band.svg") repeat-x left center / auto 100%, var(--velvet);
}

/* Site header */
.site-nav {
  background: var(--velvet);
  color: var(--bead-white);
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(246, 241, 231, 0.1);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark { width: 38px; height: 38px; }

.brand-name {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--bead-white);
  text-decoration: none;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
}

.nav-links a:hover { background: var(--velvet-2); }

.nav-links a[aria-current="page"] {
  background: var(--bead-gold);
  color: var(--velvet);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--bead-white);
  background:
    radial-gradient(700px 360px at 85% 30%, rgba(98, 195, 196, 0.12), transparent 70%),
    radial-gradient(600px 300px at 10% 110%, rgba(200, 50, 58, 0.16), transparent 70%),
    var(--velvet);
}

.hero-inner {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 44px 20px 40px;
}

.hero-art {
  position: absolute;
  right: max(-40px, calc(50% - 600px));
  top: 16px;
  height: calc(100% - 24px);
  max-height: 440px;
  width: auto;
  aspect-ratio: 1;
  pointer-events: none;
}

.kicker {
  margin: 0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--bead-gold);
  font-size: 0.85rem;
}

h1 {
  margin: 6px 0 10px;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.02;
  font-weight: 800;
  max-width: 11ch;
}

.lead {
  margin: 0 0 10px;
  font-size: 1.25rem;
  max-width: 30rem;
  color: rgba(246, 241, 231, 0.88);
}

.byline {
  margin: 0 0 22px;
  max-width: 30rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--bead-pink);
}

.search input {
  width: min(100%, 460px);
  border: 3px solid var(--bead-gold);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 14px 20px;
  font: inherit;
  font-size: 1.05rem;
}

.search input:focus {
  outline: 3px solid var(--bead-white);
  outline-offset: 2px;
}

/* On inner pages the hero shrinks to a slim search bar. */
body:not([data-view="home"]) .hero-inner { padding: 18px 20px; }
body:not([data-view="home"]) .hero .kicker,
body:not([data-view="home"]) .hero h1,
body:not([data-view="home"]) .hero .lead,
body:not([data-view="home"]) .hero .byline { display: none; }
body:not([data-view="home"]) .hero-art { display: none; }

/* Content */
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 20px 56px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.back, .chip, .hear, .next, .game-btn {
  font: inherit;
  font-weight: 800;
  border: 0;
  cursor: pointer;
}

.back, .chip, .game-btn {
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  box-shadow: var(--shadow);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back:hover, .chip:hover, .game-btn:hover, .hear:hover, .next:hover, .cat:hover {
  transform: translateY(-2px);
}

.back, .chip, .game-btn, .hear, .next, .cat { transition: transform 0.15s ease; }

.back:focus-visible, .chip:focus-visible, .game-btn:focus-visible, .nav-links a:focus-visible, .brand:focus-visible,
.hear:focus-visible, .next:focus-visible, .cat:focus-visible, .card:focus-visible, .letter:focus-visible {
  outline: 3px solid var(--bead-blue);
  outline-offset: 3px;
}

.nav-links a:focus-visible, .brand:focus-visible { outline-color: var(--bead-gold); }

.cat-grid, .word-grid {
  display: grid;
  gap: 16px;
}

.cat-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.word-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 6px;
}

.home-title { margin-top: 30px; }

.blurb {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 40rem;
}

/* Topic tiles: the emoji sits inside a ring of beads in the topic's color. */
.cat {
  --c: var(--bead-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 20px 14px 18px;
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}

.medal {
  display: block;
  border-radius: 50%;
  flex: none;
  filter: drop-shadow(0 3px 4px rgba(40, 25, 10, 0.18));
}

.cat .medal { margin-bottom: 8px; transition: transform 0.3s ease; }
.cat strong { font-size: 1.15rem; }
.cat span:last-child { color: var(--muted); font-size: 0.95rem; }

/* Word cards */
.card {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 22px 18px 16px;
  box-shadow: var(--shadow);
  outline: 3px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 220px;
}

.card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 8px;
  border-top: 5px dotted var(--c, var(--bead-red));
}

.card.is-playing {
  outline-color: var(--bead-blue);
  background: #f2f6fd;
}

.card .medal { margin-bottom: 4px; }

/* + button that adds a card to the teacher printout */
.pick {
  position: absolute;
  top: 18px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px dashed var(--muted);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.pick[aria-pressed="true"] {
  border: 2px solid var(--bead-gold);
  background: var(--bead-gold);
  color: var(--velvet);
}

.pick:focus-visible { outline: 3px solid var(--bead-blue); outline-offset: 2px; }

.dx {
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1.2;
  font-weight: 700;
  margin: 0;
}

.en {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.note {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  min-height: 1.2em;
}

.hear, .next {
  margin-top: auto;
  align-self: flex-start;
  background: var(--bead-blue);
  color: white;
  border-radius: 999px;
  padding: 10px 18px 10px 14px;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hear::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 10px solid var(--bead-gold);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.next { background: var(--bead-red); padding-left: 18px; }

.card.is-playing .hear, .line.is-playing .hear, .story-line.is-playing .hear { background: var(--bead-green); }

/* Hovering a card turns it inside out: velvet background, light text. */
.cat, .card, .story-line {
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
}

.cat .medal, .card .medal, .story-line .medal { transition: transform 0.35s ease; }

@media (hover: hover) {
  .cat:hover, .card:hover, .story-line:hover {
    background: var(--velvet);
    color: var(--bead-white);
    box-shadow: 0 14px 30px rgba(29, 36, 51, 0.35);
  }
  .cat:hover span:last-child, .card:hover .note, .story-line:hover .note { color: rgba(246, 241, 231, 0.75); }
  .cat:hover .medal, .card:hover .medal, .story-line:hover .medal { transform: rotate(-8deg) scale(1.05); }
  .card:hover .hear, .story-line:hover .hear { background: var(--bead-gold); color: var(--velvet); }
  .card:hover .hear::before, .story-line:hover .hear::before { border-left-color: var(--velvet); }
  .card:hover .pick { border-color: rgba(246, 241, 231, 0.7); color: var(--bead-white); }
  .card:hover .pick[aria-pressed="true"] { border-color: var(--bead-gold); color: var(--velvet); }
  .card:hover::before { border-top-color: var(--bead-gold); }
  .story-line:hover .num { background: var(--bead-gold); color: var(--velvet); }
}

/* Home feature */
.feature {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
  align-items: stretch;
}

.feature-copy {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.feature-copy h2 {
  font-family: var(--serif);
  margin: 0 0 8px;
  font-size: 1.9rem;
}

.feature-copy p { margin: 0 0 16px; font-size: 1.08rem; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.game-btn.primary { background: var(--bead-red); color: white; }

.empty {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px;
  font-size: 1.15rem;
}

/* Listening game */
.practice {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: 28px;
  padding: 34px 22px 28px;
  box-shadow: var(--shadow);
  text-align: center;
  overflow: hidden;
}

.practice::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 14px;
  background: url("img/band.svg") repeat-x left center / auto 100%;
}

.practice .medal { margin: 6px auto 0; }
.practice .en { font-size: 2rem; margin: 8px 0; }
.practice .dx { font-size: clamp(2rem, 6vw, 3rem); min-height: 1.2em; }
.practice .hear, .practice .next { font-size: 1.15rem; padding: 14px 22px; margin: 8px; }
.practice .hear { padding-left: 18px; }

.heard { color: var(--muted); font-weight: 700; }

/* All words */
.letters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: sticky;
  top: 58px;
  z-index: 2;
  margin: 0 0 16px;
  padding: 10px 0;
  background: rgba(239, 227, 207, 0.95);
}

.letter, .letter.off {
  min-width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.letter.on { background: var(--velvet); color: var(--bead-gold); }
.letter.off { color: #b4a48f; background: transparent; box-shadow: none; }

.entry {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 14px 18px 6px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border-left: 6px dotted var(--bead-red);
}

.entry > h3 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 1.4rem;
}

.line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.line .dx { font-size: 1.45rem; }
.line .en { font-size: 1.05rem; }
.who { margin: 0; color: var(--muted); font-size: 0.92rem; }
.line.is-playing { background: #f2f6fd; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 12px; }

.entry-list { display: block; }

.title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.title-row .blurb { margin: 0; }

/* Stories */
.story-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.story-list { display: flex; flex-wrap: wrap; gap: 16px; }
.story-list > .story-tile { width: 240px; }
.story-list > .book-tile { flex: 1 1 100%; }
.story-tile { padding: 24px 18px 22px; }
.story-tile strong { font-family: var(--serif); font-size: 1.4rem; }

.source-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 40rem;
}

.play-all { margin-bottom: 18px; }

/* Picture books */
.book-tile {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  max-width: 760px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.book-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-tile-copy { padding: 22px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.book-tile strong { font-family: var(--serif); font-size: 1.6rem; line-height: 1.15; }
.book-tile-copy > span:not(.note) { font-weight: 800; font-size: 1.1rem; }
.book-tile:focus-visible { outline: 3px solid var(--bead-blue); outline-offset: 3px; }

@media (hover: hover) {
  .book-tile:hover { background: var(--velvet); color: var(--bead-white); box-shadow: 0 14px 30px rgba(29, 36, 51, 0.35); }
  .book-tile:hover .note { color: rgba(246, 241, 231, 0.75); }
}

.book { max-width: 980px; }

.book-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.book-page { display: block; width: 100%; height: auto; aspect-ratio: 1400 / 1082; }

.turn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: rgba(29, 36, 51, 0.8);
  color: var(--bead-white);
  font: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding-bottom: 4px;
}

.turn.prev { left: 12px; }
.turn.next { right: 12px; }
.turn:hover { background: var(--velvet); color: var(--bead-gold); }
.turn:disabled { opacity: 0; pointer-events: none; }
.turn:focus-visible { outline: 3px solid var(--bead-gold); outline-offset: 2px; }

.book-bar { margin: 10px 4px 0; color: var(--muted); font-weight: 700; }

.book-text {
  margin-top: 10px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

.book-text .dx { font-size: 1.8rem; }
.book-tr { margin: 0; font-style: italic; font-weight: 700; font-size: 1.15rem; color: var(--muted); }
.book-narration { margin: 6px 0 0; font-size: 1.2rem; line-height: 1.55; }
.book-heading { margin: 0; font-family: var(--serif); font-weight: 800; font-size: 1.5rem; }

.book-words {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px 16px;
}

.book-words li { font-size: 1.05rem; }
.book-words .dx { font-size: 1.2rem; margin-right: 4px; }
.book-questions { margin: 6px 0 0; padding-left: 1.2em; font-size: 1.2rem; line-height: 1.6; }

.thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 2px 10px;
  scrollbar-width: thin;
}

.thumb {
  flex: none;
  width: 92px;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
  cursor: pointer;
  opacity: 0.75;
}

.thumb img { display: block; width: 100%; height: auto; }
.thumb:hover { opacity: 1; }
.thumb[aria-current="page"] { border-color: var(--bead-red); opacity: 1; }
.thumb:focus-visible { outline: 3px solid var(--bead-blue); outline-offset: 2px; }

.story-lines { display: grid; gap: 12px; max-width: 820px; }

.story-line {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 14px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 14px 18px 14px 14px;
  box-shadow: var(--shadow);
  outline: 3px solid transparent;
}

.story-line.is-playing { outline-color: var(--bead-blue); background: #f2f6fd; }
.story-line .dx { font-size: 1.55rem; }
.story-line .hear { margin: 0; }
.story-text { display: grid; gap: 4px; }

.num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  background: var(--velvet);
  color: var(--bead-gold);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Tray at the bottom while cards are chosen for printing */
.tray {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 6;
  transform: translate(-50%, 140%);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 10px 12px 10px 20px;
  border-radius: 999px;
  background: var(--velvet);
  color: var(--bead-white);
  box-shadow: 0 14px 34px rgba(29, 36, 51, 0.4);
  border: 2px dotted var(--bead-gold);
  transition: transform 0.3s ease;
  visibility: hidden;
}

.tray.on { transform: translate(-50%, 0); visibility: visible; }
.tray-count { margin: 0; font-weight: 800; }
body.has-tray main { padding-bottom: 120px; }

/* Printouts page */
.print-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

.print-panel {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.print-panel h3 { margin: 6px 0 0; font-family: var(--serif); font-size: 1.15rem; }

.field { display: grid; gap: 6px; font-weight: 800; border: 0; padding: 0; margin: 0; }
.field legend { padding: 0; margin-bottom: 6px; }
.field input[type="text"] {
  font: inherit;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: white;
}
.field input[type="text"]:focus { outline: 3px solid var(--bead-blue); outline-offset: 1px; }

.opt { display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 3px 0; }
.opt input { width: 18px; height: 18px; accent-color: var(--bead-red); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.small { padding: 6px 12px; font-size: 0.9rem; box-shadow: none; border: 1px solid var(--line); }
.chip.small:hover { background: var(--velvet); color: var(--bead-white); }

.game-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.pr-status { margin: 0; font-weight: 700; color: var(--bead-green); min-height: 1.2em; }

.preview {
  --s: 0.6;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.preview .sheet {
  transform: scale(var(--s));
  transform-origin: top left;
  margin-bottom: calc(1056px * (var(--s) - 1));
  margin-right: calc(816px * (var(--s) - 1));
  box-shadow: 0 10px 30px rgba(40, 25, 10, 0.2);
}

.preview-empty {
  border: 3px dashed var(--hide-deep);
  border-radius: var(--radius);
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

/* One printed page: US Letter at 96 pixels per inch. */
.sheet {
  width: 816px;
  height: 1056px;
  background: white;
  color: #1b1b22;
  padding: 36px 40px 28px;
  display: flex;
  flex-direction: column;
  font-family: "Noto Sans", sans-serif;
}

.sheet-band {
  height: 24px;
  border-radius: 4px;
  background: url("img/band.svg") repeat-x left center / auto 100%;
  flex: none;
}

.sheet-title {
  margin: 12px 0 14px;
  font-family: "Noto Serif", serif;
  font-weight: 800;
  font-size: 26px;
  text-align: center;
}

.sheet-grid {
  flex: 1;
  display: grid;
  grid-auto-rows: 1fr;
  border-top: 2px dashed #b9b2a6;
  border-left: 2px dashed #b9b2a6;
}

.sheet.per-4 .sheet-grid { grid-template-rows: repeat(2, 1fr); }
.sheet.per-6 .sheet-grid { grid-template-rows: repeat(3, 1fr); }
.sheet.per-12 .sheet-grid { grid-template-rows: repeat(4, 1fr); }

.pc {
  border-right: 2px dashed #b9b2a6;
  border-bottom: 2px dashed #b9b2a6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  min-height: 0;
}

.pc .medal { filter: none; }
.pc-dx { margin: 12px 0 2px; font-family: "Noto Serif", serif; font-weight: 800; line-height: 1.15; }
.pc-en { margin: 0; font-weight: 700; color: #4a4a52; }
.per-4 .pc-dx { font-size: 44px; }
.per-4 .pc-en { font-size: 26px; }
.per-6 .pc-dx { font-size: 34px; }
.per-6 .pc-en { font-size: 21px; }
.per-12 .pc-dx { font-size: 24px; margin-top: 8px; }
.per-12 .pc-en { font-size: 16px; }

.sheet-foot { margin: 10px 0 0; font-size: 12px; color: #6b6b72; text-align: center; flex: none; }

/* The PDF is drawn from full-size copies of the pages kept off screen. */
.pdf-stage { position: fixed; left: -10000px; top: 0; }

@page { size: letter; margin: 0; }

@media print {
  body { background: white; }
  body > *:not(main), main > *:not(.print-layout), .print-panel { display: none !important; }
  main { padding: 0; max-width: none; }
  .print-layout { display: block; }
  .preview { display: block; }
  .preview .sheet { transform: none; margin: 0; box-shadow: none; break-after: page; }
}

/* People */
.people { display: grid; gap: 18px; max-width: 820px; }

.person {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 26px 26px 20px;
  box-shadow: var(--shadow);
}

.person::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 10px;
  border-top: 5px dotted var(--c, var(--bead-red));
}

.person-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.person h3 { margin: 0; font-family: var(--serif); font-size: 1.8rem; }
.person-role { margin: 2px 0 0; font-weight: 800; color: var(--muted); }
.person-summary { margin: 0 0 10px; font-size: 1.12rem; line-height: 1.55; }
.person-list { margin: 0 0 14px; padding-left: 1.2em; font-size: 1.04rem; line-height: 1.6; }
.person-list li::marker { color: var(--c, var(--bead-red)); }

.person-quote {
  margin: 0 0 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--velvet);
  color: var(--bead-white);
}

.person-quote p { margin: 0; font-family: var(--serif); font-size: 1.2rem; font-style: italic; }
.person-quote footer { margin-top: 6px; font-size: 0.9rem; color: rgba(246, 241, 231, 0.75); }
.person-related { margin: 0 0 14px; }
.person-source { margin: 0; font-size: 0.92rem; color: var(--muted); }
.person-source .cite { font-weight: 700; color: var(--bead-blue); text-underline-offset: 2px; }

/* About */
.about {
  display: grid;
  gap: 16px;
  max-width: 760px;
}

.about section {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.about h3 { font-family: var(--serif); font-size: 1.4rem; margin: 0 0 8px; }
.about p { margin: 0 0 10px; font-size: 1.05rem; line-height: 1.55; }
.about p:last-child { margin-bottom: 0; }

/* Footer: the beadwork by Marcy Maillelle is the main thing; the credits sit small in a corner. */
.site-foot {
  background: var(--velvet);
  color: rgba(246, 241, 231, 0.78);
  font-size: 0.72rem;
  line-height: 1.4;
}

.foot-art {
  background: url("img/art/marcy-maillelle-beadwork-digital.jpg") center / cover no-repeat, var(--velvet);
}

.foot-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
  min-height: min(43.7vw, 640px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.foot-text {
  max-width: 21rem;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(29, 36, 51, 0.72);
  backdrop-filter: blur(3px);
}

.art-credit {
  margin: 0 !important;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(29, 36, 51, 0.72);
  color: var(--bead-white);
  font-size: 0.72rem;
  flex: none;
}

.art-credit strong { color: var(--bead-gold); }

.foot-title {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--bead-white);
}

.site-foot .byline { margin: 0 0 5px; font-size: 0.74rem; }
.site-foot p { margin: 0 0 6px; }
.site-foot p:last-child { margin-bottom: 0; }
.site-foot em { font-style: normal; font-weight: 700; color: var(--bead-gold); }
.site-foot .cite { font-weight: 700; color: var(--bead-gold); text-underline-offset: 2px; }
.site-foot .cite:hover { color: var(--bead-white); }
.about .cite { font-weight: 700; color: var(--bead-blue); text-underline-offset: 2px; }

@media (max-width: 900px) {
  .print-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .hero-art { right: -90px; opacity: 0.4; }
}

@media (max-width: 720px) {
  .feature { grid-template-columns: 1fr; }
  .cat-grid, .word-grid { grid-template-columns: 1fr 1fr; }
  .dx { font-size: 1.35rem; }
  /* On phones the whole beadwork shows on top, with the credits underneath. */
  .foot-art {
    background: url("img/art/marcy-maillelle-beadwork-digital.jpg") top center / 100% auto no-repeat, var(--velvet);
    padding-top: 43.7%;
  }
  .foot-inner { min-height: 0; flex-direction: column-reverse; align-items: stretch; padding: 10px 16px 18px; }
  .foot-text { max-width: none; padding: 0; background: none; backdrop-filter: none; }
  .art-credit { align-self: flex-start; background: none; padding: 0; }
  .site-nav { position: static; }
  .letters { top: 0; }
  .story-line { grid-template-columns: auto 1fr; }
  .book-tile { grid-template-columns: 1fr; }
  .turn { width: 40px; height: 40px; font-size: 1.6rem; }
  .turn.prev { left: 6px; }
  .turn.next { right: 6px; }
  .book-text { padding: 16px 18px; }
  .book-text .dx { font-size: 1.45rem; }
  .book-narration { font-size: 1.08rem; }
  .story-line .num { display: none; }
  .tray { border-radius: 24px; padding: 12px 16px; bottom: 10px; }
  .story-line .medal { width: 64px; height: 64px; }
  .story-line .hear { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 460px) {
  .cat-grid, .word-grid { grid-template-columns: 1fr; }
  .nav-inner { padding: 8px 14px 10px; }
  .nav-links { gap: 2px; margin-left: -10px; }
  .nav-links a { padding: 6px 10px; font-size: 0.95rem; }
  .hero-inner { padding-top: 32px; }
  .hero-art { opacity: 0.22; }
}

@media (prefers-reduced-motion: reduce) {
  .back:hover, .chip:hover, .game-btn:hover, .hear:hover, .next:hover, .cat:hover { transform: none; }
  .cat, .card, .story-line, .medal, .tray { transition: none !important; }
  .cat:hover .medal, .card:hover .medal, .story-line:hover .medal { transform: none; }
}
