:root {
  --paper: #f5f1ff;
  --ink: #231936;
  --muted: #615671;
  --line: #d0c5e6;
  --violet: #5730d0;
  --lilac: #e9e0ff;
  --lime: #dafa71;
  --console: #261d3b;
  --display: Bricolage, ui-rounded, system-ui, sans-serif;
  --sans: "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 280px; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(#6d4eb521 .7px, transparent 1px), linear-gradient(155deg, #f9f6ff 15%, #eee6ff 100%);
  background-size: 20px 20px, 100% 100%;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
:where(button, select):focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
[hidden] { display: none !important; }
.symbol-bank { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr-only { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }

.masthead { border-bottom: 1px solid var(--line); background: #fcfaff; }
.mast-inner, main { width: min(1160px, calc(100% - 88px)); margin-inline: auto; }
.mast-inner { height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.imprint, .tools, .utility, .primary, .secondary, .eyebrow, .phase-pill { display: flex; align-items: center; }
.imprint { gap: 10px; font: 800 21px/1 var(--display); letter-spacing: -.045em; white-space: nowrap; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  flex-shrink: 0;
  background: var(--lime);
  border: 1.5px solid var(--ink);
  border-radius: 11px;
  box-shadow: 2px 2px 0 var(--ink);
  rotate: -6deg;
}
.brand-mark .icon { width: 24px; height: 24px; }
.tools { gap: 9px; }
.utility {
  gap: 7px;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #c8bde0;
  background: #fff;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}
.utility[aria-pressed="true"] { background: var(--lilac); border-color: #aa92e9; color: #4628a5; }
.utility:hover, .secondary:hover { color: #432699; background: #f0eaff; }
.audio { width: 44px; padding: 0; }

main { padding: 27px 0 44px; }
.mast-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.eyebrow { font: 800 11px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.edition { gap: 7px; color: #5236a4; margin-bottom: 7px; }
.edition .icon { width: 17px; height: 17px; }
h1 {
  font: 800 clamp(52px, 7.5vw, 96px)/.93 var(--display);
  font-optical-sizing: auto;
  letter-spacing: -.054em;
}
h1 em { margin-left: .025em; font-style: normal; color: var(--violet); }
.dek { margin-top: 12px; color: var(--muted); font-size: 16px; line-height: 1.35; }
.round-meter {
  flex-shrink: 0;
  min-width: 124px;
  margin-bottom: 4px;
  padding: 9px 12px;
  background: #fcfbff;
  border: 1px solid #c4b6df;
  border-radius: 12px;
}
.meter-label { display: flex; align-items: baseline; gap: 4px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.meter-label span:first-child { margin-right: auto; font-weight: 750; color: var(--ink); }
.meter-label b { color: #4e2ab9; font-family: var(--display); font-size: 17px; line-height: 1; }
#bars { display: flex; gap: 3px; margin-top: 6px; }
#bars i { flex: 1; height: 4px; border-radius: 4px; background: #ddd4ee; }
#bars .current { background: var(--violet); }
#bars .done { background: #53711d; }

#game {
  --cloth: #f5d9df;
  --check: #c15d902f;
  --linen: #fff0d3;
  --course-paper: #f0e9fd;
  --phase-bg: #49376b;
  --phase-ink: #f4ebff;
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(268px, 1fr);
  align-items: start;
  gap: clamp(20px, 2.5vw, 35px);
}
#game[data-course="sage"] { --cloth: #dce8c7; --check: #6c8d5543; --linen: #fff1cf; --course-paper: #edf2dc; }
#game[data-course="indigo"] { --cloth: #dbe8fb; --check: #748bc844; --linen: #fff1d9; --course-paper: #e6edff; }
#game[data-course="umber"] { --cloth: #f6deb9; --check: #d4965f47; --linen: #fff2dd; --course-paper: #faedd9; }
#game[data-course="juniper"] { --cloth: #cfe9df; --check: #70a5994d; --linen: #fff0d7; --course-paper: #e4f3e9; }
#game[data-course="plum"] { --cloth: #eadcf3; --check: #ac80a949; --linen: #fff0d6; --course-paper: #efe4fa; }
#game:is([data-phase="guess"], [data-phase="success"], [data-phase="complete"]) { --phase-bg: var(--lime); --phase-ink: #29321a; }
#game[data-phase="miss"] { --phase-bg: #ffc5d0; --phase-ink: #592036; }
#game:is([data-phase="retry"], [data-phase="replay-before"], [data-phase="replay-after"]) { --phase-bg: #dbcbff; --phase-ink: #34205f; }

.frame {
  padding: 8px 9px 9px;
  scroll-margin-block: 6px;
  background: var(--console);
  border: 1px solid #1b122f;
  border-radius: 24px;
  box-shadow: 0 5px 0 #9f86d4, 0 16px 24px -19px #4d328c80;
}
.frame-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 3px 7px;
  color: #e4daf4;
  font-size: 12px;
}
.phase-pill {
  flex-shrink: 0;
  gap: 5px;
  min-height: 25px;
  padding: 3px 8px;
  background: var(--phase-bg);
  color: var(--phase-ink);
  border-radius: 8px;
  white-space: nowrap;
}
.phase-pill .icon { width: 16px; height: 16px; }
.phase-pill b { font-weight: 750; }
#sceneNote { min-width: 0; line-height: 1.15; }
.timer { margin-left: auto; height: 5px; background: #53436c; flex: 1 0 38px; max-width: 114px; border-radius: 6px; overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--lime); transform-origin: left; }

.scene {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1.74;
  border: 1px solid #1b122f;
  border-radius: 15px;
  background-color: var(--cloth);
  background-image: repeating-linear-gradient(0deg,var(--check) 0 17px,transparent 17px 34px), repeating-linear-gradient(90deg,var(--check) 0 17px,transparent 17px 34px);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.scene::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; box-shadow: inset 0 1px 4px #4e345026; border-radius: inherit; }
.runner {
  position: absolute;
  left: 31%;
  top: -10%;
  height: 120%;
  width: 36%;
  rotate: -7deg;
  background: var(--linen);
  border-inline: 2px solid #bd967870;
  box-shadow: 2px 0 0 #9e694f29;
}
.runner::after { content: ""; position: absolute; inset: 0 5px; border-inline: 2px dashed #ba92747a; }
.crease { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, #fffcde24, transparent 70%); }
#napkin {
  position: absolute;
  inset: -2px;
  z-index: 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-color: #cdb7ff;
  background-image: radial-gradient(#4827882e 1px, transparent 1.4px), linear-gradient(147deg, #e7d9ff 8%, #bfa6f6 88%);
  background-size: 16px 16px, 100% 100%;
}
#napkin::before {
  content: "";
  position: absolute;
  width: min(67%, 480px);
  aspect-ratio: 1;
  border: 1px solid #faf4ffa6;
  border-radius: 50%;
  box-shadow: 0 0 0 18px #faf4ff29, 0 0 0 42px #faf4ff1a;
  background: radial-gradient(circle, #f9f1ff85, #decaff1a 70%);
}
#napkin::after { content: ""; position: absolute; inset: 11px; border: 1px dashed #654ca78a; border-radius: 11px; pointer-events: none; }
[data-phase="ready"] #napkin { cursor: pointer; }
.cover-kitten {
  z-index: 1;
  display: block;
  width: 69%;
  height: 84%;
  object-fit: contain;
  rotate: -3deg;
  filter: drop-shadow(2px 8px 0 #492a7530);
  pointer-events: none;
}

#places { position: absolute; inset: 0; }
.place {
  position: absolute;
  display: grid;
  grid-template: 100% / 100%;
  place-items: center;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 40%;
  background: transparent;
  cursor: default;
}
.place img {
  position: relative;
  z-index: 1;
  display: block;
  max-height: 100%;
  height: 100%;
  width: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 3px 1px #825a4638);
  -webkit-user-drag: none;
}
.place:is([data-art="mug"], [data-art="teacup"]) img { width: 78%; height: 89%; }
.place[data-art="pie"] img { width: 76%; height: 87%; transform: translateY(-4%); }
.place[data-art="pumpkin"] img { width: 88%; height: 95%; }
.place:is([data-art="salt"], [data-art="jam"]) img { height: 80%; width: 76%; }
.place[data-flipped="true"] img { scale: -1 1; }
.place[data-plate="true"]::before {
  content: "";
  position: absolute;
  width: 95%;
  height: 64%;
  top: 33%;
  border-radius: 50%;
  rotate: -7deg;
  border: 2px solid #77563f;
  background: radial-gradient(ellipse, #fff5d9 0 56%, #f3ddbd 60%, #fff8e8 62% 72%, #9fccc0 73%);
  box-shadow: 0 2px 0 #b98d752e;
}
.place::after { content: ""; position: absolute; inset: -4%; border-radius: 42%; pointer-events: none; }
[data-phase="guess"] .place { cursor: pointer; }
@media (hover: hover) {
  [data-phase="guess"] .place:not(.confirmed):hover::after { outline: 2px solid #fff5ff; box-shadow: 0 0 0 3px #564476aa; }
}
.place.marked::after { outline: 2px dashed #fff9ed; box-shadow: 0 0 0 3px #643ed9, inset 0 0 0 2px #643ed9; z-index: 2; }
.place.confirmed::after { outline: 2px solid #e7ff9d; box-shadow: 0 0 0 3px #374a20; z-index: 2; }
.place:focus-visible { outline: 0; }
.place:focus-visible::after { outline: 3px dashed white; box-shadow: 0 0 0 6px #452baa; }
.place.departing { pointer-events: none; z-index: 3; }
.place.travels { z-index: 2; }
.found-pin {
  display: none;
  position: absolute;
  right: -3%;
  top: -4%;
  width: clamp(16px, 2.1vw, 23px);
  height: clamp(16px, 2.1vw, 23px);
  place-items: center;
  color: #29371a;
  background: var(--lime);
  border: 1px solid currentColor;
  border-radius: 6px;
  rotate: 7deg;
  z-index: 3;
  pointer-events: none;
}
.found-pin::before { content: ""; width: 4px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; rotate: 38deg; translate: 0 -1px; }
.place.confirmed .found-pin { display: grid; }

#visitor {
  pointer-events: none;
  position: absolute;
  width: 27%;
  height: 37%;
  bottom: 1%;
  left: -32%;
  object-fit: contain;
  z-index: 3;
  visibility: hidden;
  filter: drop-shadow(2px 4px 1px #291c2a66);
}
#visitor[data-kind="leaf"] { width: 19%; height: 25%; left: -24%; bottom: 29%; }
.shade {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, #35264d, #1c142e 80%);
  color: #dfd3ff;
  opacity: 0;
}
.shade .icon { width: 39px; height: 39px; }
[data-phase="dark"] .shade { opacity: 1; }
.scene.paused .shade { opacity: 1; animation: none; background: var(--console); }
.scene.paused .shade .icon { visibility: hidden; }
#missMark {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  pointer-events: none;
  color: #55223a;
  background: #ffbdd4;
  border: 2px solid #55223a;
  border-radius: 8px;
  box-shadow: 2px 2px #55223a;
  font: 800 23px/1 var(--display);
}
.hit-burst {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  width: 0;
  height: 0;
}
.burst-ring {
  position: absolute;
  top: -15px;
  left: -15px;
  width: 30px;
  height: 30px;
  border: 2px solid #6843c8;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px #f8f1ff;
}
.burst-piece {
  position: absolute;
  width: 9px;
  height: 9px;
  margin: -4px;
  border: 1px solid #493366;
  border-radius: 2px;
  background: var(--lime);
}
.burst-piece:nth-child(3n) { background: #a886ff; }
.burst-piece:nth-child(3n + 1) { background: #ffd5ec; border-radius: 50%; }

.place-card {
  position: relative;
  border: 1.5px solid var(--ink);
  border-radius: 22px;
  background: #fffdfd;
  box-shadow: 4px 5px 0 #a68cdc;
}
.card-body { padding: clamp(19px, 2vw, 27px); }
.card-round {
  width: fit-content;
  gap: 7px;
  padding: 6px 9px;
  background: #efe8ff;
  color: #4c3193;
  border-radius: 7px;
}
.short-rule { width: 6px; height: 6px; border-radius: 50%; background: #7143d8; }
h2 {
  font: 800 clamp(27px, 3.2vw, 40px)/1 var(--display);
  letter-spacing: -.059em;
  text-wrap: balance;
}
.card-body h2 { margin: 12px 0 9px; }
#message, dialog p:not(.eyebrow), .rules-list { color: #5a5069; font-size: 15px; line-height: 1.48; }
.primary, .secondary {
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  width: 100%;
  border-radius: 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
}
.primary {
  margin-top: 20px;
  padding: 8px 12px;
  background: var(--lime);
  border: 1.5px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  color: var(--ink);
}
.primary:hover { background: #e5ff96; }
.primary:active { translate: 0 2px; box-shadow: 0 1px 0 var(--ink); }
.primary:disabled { opacity: .68; }
.primary .icon, .secondary .icon { width: 18px; height: 18px; }
.secondary { min-height: 44px; margin-top: 8px; border: 0; color: #503296; background: transparent; }
.secondary:active { translate: 0 1px; }
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  width: min(100%, 23rem);
  margin: 12px auto 0;
  background: #eee7f9;
  border-radius: 12px;
}
.compare button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  font-weight: 780;
  color: #624995;
}
.compare button[aria-pressed="true"] { color: #fff; background: var(--violet); border-color: #4826b4; }

.course-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 1px 12px;
  padding: 16px clamp(17px, 2vw, 26px);
  border-top: 1.5px solid var(--ink);
  border-radius: 0 0 21px 21px;
  background: var(--course-paper);
}
.course-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: #fffaf8;
  border: 1.5px solid #756299;
  border-radius: 14px;
  box-shadow: 2px 2px 0 #ad98cf;
  rotate: -7deg;
}
.course-emblem img, .book-course-head img, .course-tabs img { object-fit: contain; }
.course-emblem img { width: 76%; height: 76%; }
.course-emblem.earned::after, .course-tabs .earned small::after { content: "✓"; color: #29371a; background: var(--lime); border: 1px solid #3c4a25; border-radius: 6px; }
.course-emblem.earned::after {
  position: absolute;
  right: -5px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font: 800 12px var(--sans);
  rotate: 11deg;
}
#stampHost { position: absolute; right: 12px; top: -28px; width: 57px; height: auto; rotate: 9deg; z-index: 1; pointer-events: none; }
.course-detail .eyebrow, .book-course-head .eyebrow { color: #573c91; font-size: 9px; }
.course-detail h3, .book-course-head h3 { margin: 3px 0; font: 800 21px/1.08 var(--display); letter-spacing: -.045em; }
#courseCount { font-size: 12px; color: var(--muted); }
.course-track { display: flex; gap: 4px; grid-column: 1 / -1; margin-top: 12px; }
.course-track i { flex: 1; height: 4px; border-radius: 5px; background: #c9bde2; }
.course-track .current { background: var(--violet); }
.course-track .done { background: #506c21; }

dialog {
  width: min(420px, calc(100% - 28px));
  max-height: 92dvh;
  padding: 22px 25px 24px;
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  background: #fffdfd;
  color: var(--ink);
  box-shadow: 5px 5px #9a7cdf, 0 18px 64px #20143448;
  overscroll-behavior: contain;
}
dialog::backdrop { background: #24183d83; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; color: #513599; }
.dialog-head .utility { margin: -7px -9px 0 0; width: 44px; padding: 0; }
.rules-list { padding-left: 22px; margin: 15px 0; }
.rules-list li { padding: 0 0 7px 2px; }
.rules-list strong { color: var(--ink); }
#rules .key-help { margin-top: 10px; color: var(--muted); font-size: 12px; }
#book { width: min(790px, calc(100% - 32px)); }
.book-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 9px; margin: 6px 0 16px; }
.book-heading h2 { font-size: 39px; }
#bookCount {
  flex-shrink: 0;
  padding: 5px 8px;
  color: #4c318a;
  background: var(--lilac);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 740;
  font-variant-numeric: tabular-nums;
}
.book-layout { display: grid; grid-template-columns: minmax(160px, .93fr) minmax(0, 2fr); border-block: 1px solid var(--line); }
.course-tabs { display: flex; flex-direction: column; gap: 5px; padding: 12px 12px 12px 0; border-right: 1px solid var(--line); }
.course-tabs button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 5px 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 750;
}
.course-tabs img { width: 29px; height: 29px; }
.course-tabs small { margin-left: auto; white-space: nowrap; color: var(--muted); font-size: 10px; }
.course-tabs button[aria-pressed="true"] { background: var(--lilac); color: #46268c; border-color: #bba5ed; }
.course-tabs .earned small::after { margin-left: 3px; padding: 0 2px; }
.book-page { padding: 15px 0 16px 16px; }
.book-course-head { display: flex; align-items: center; gap: 11px; }
.book-course-head img { width: 51px; height: 51px; }
.book-course-head h3 { font-size: 26px; }
#bookHint { margin: 8px 0 13px; font-size: 13px; color: var(--muted); }
#bookLevels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.book-level {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 47px;
  padding: 5px 7px;
  background: #fbf9ff;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: left;
  font-size: 13px;
  line-height: 1.15;
}
.book-level b {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  border-radius: 6px;
  background: #e9dfff;
  color: #4e3192;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.book-level i { margin-left: auto; color: #3f571b; font-weight: 800; font-style: normal; }
.book-level[data-solved="true"] b { background: #e4f5a8; color: #2d3919; }
.book-level[aria-current="step"] { border-color: var(--violet); box-shadow: inset 0 -1px 0 var(--violet); }
.book-level:hover, .course-tabs button:hover { border-color: #9b80d7; }
#book .save-note { margin: 11px 0 0; color: var(--muted); font-size: 12px; }
.book-select { display: none; }
.observer { margin-top: 28px; border-top: 1px solid var(--line); padding: 16px 0; color: var(--muted); font-size: 13px; }
.observer summary { cursor: pointer; }
.observer pre { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }

@media (max-width: 880px) {
  .mast-inner, main { width: calc(100% - 46px); }
  #game { grid-template-columns: minmax(0, 1.78fr) minmax(226px, 1fr); gap: 18px; }
  .scene { aspect-ratio: 1.4; }
  .card-body { padding: 17px; }
}

@media (max-width: 690px) {
  .mast-inner, main { width: min(100% - 28px, 550px); }
  .mast-inner { height: 55px; }
  .imprint { gap: 7px; font-size: 18px; }
  .brand-mark { width: 27px; height: 27px; border-radius: 8px; }
  .brand-mark .icon { width: 19px; height: 19px; }
  .tools { gap: 4px; }
  .tools .utility { min-width: 44px; padding: 0 6px; font-size: 12px; }
  .tools .icon { width: 17px; height: 17px; }
  main { padding: 16px 0 31px; }
  .mast-title { position: relative; display: block; margin-bottom: 13px; }
  .edition { min-height: 20px; margin-bottom: 8px; font-size: 9px; }
  .edition .icon { width: 14px; height: 14px; }
  h1 { font-size: clamp(37px, 12vw, 66px); letter-spacing: -.052em; }
  .dek { margin-top: 8px; font-size: 13px; }
  .round-meter { position: absolute; top: -3px; right: 0; min-width: 79px; margin: 0; padding: 5px 6px; border-radius: 7px; }
  .meter-label { gap: 2px; font-size: 9px; }
  .meter-label b { font-size: 12px; }
  #bars { margin-top: 3px; }
  #bars i { height: 3px; }
  #game { grid-template-columns: 1fr; gap: 14px; }
  .frame { padding: 5px 5px 6px; border-radius: 17px; }
  .frame-legend { min-height: 30px; padding: 0 2px 4px; gap: 7px; font-size: 11px; }
  .compare { width: 100%; }
  .phase-pill { min-height: 22px; padding: 2px 5px; gap: 4px; }
  .phase-pill .icon { width: 14px; height: 14px; }
  .scene { aspect-ratio: 1.43; border-radius: 11px; }
  .cover-kitten { width: 87%; height: 87%; }
  .place-card { border-radius: 16px; box-shadow: 3px 4px 0 #a68cdc; }
  .card-body { padding: 14px 16px; }
  .card-body h2 { margin: 8px 0 6px; font-size: 29px; }
  #message { font-size: 14px; line-height: 1.38; }
  .card-round { padding: 5px 7px; font-size: 9px; }
  .primary { margin-top: 12px; min-height: 44px; font-size: 16px; }
  .course-card { grid-template-columns: 39px 1fr; gap: 0 10px; padding: 10px 15px 12px; border-radius: 0 0 15px 15px; }
  .course-emblem { width: 38px; height: 38px; border-radius: 10px; }
  .course-detail .eyebrow { font-size: 8px; }
  .course-detail h3 { margin: 3px 0; font-size: 17px; }
  #courseCount { font-size: 11px; }
  .course-track { margin-top: 8px; }
  #stampHost { top: -22px; width: 46px; }
  #book { width: min(100% - 22px, 500px); padding: 15px; }
  .book-heading { margin: 4px 0 11px; }
  .book-heading h2 { font-size: 31px; }
  .book-layout { display: block; }
  .course-tabs { display: none; }
  .book-page { padding: 8px 0 12px; }
  .book-select { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
  .book-select label { color: var(--muted); font-size: 12px; }
  .book-select select { min-height: 44px; max-width: 65%; padding: 0 7px; border: 1px solid var(--line); border-radius: 7px; background: #f8f3ff; color: var(--ink); font: 750 13px var(--sans); }
  .book-course-head img { width: 43px; height: 43px; }
  .book-course-head h3 { font-size: 23px; }
  #bookHint { margin: 6px 0 10px; }
  .book-level { min-height: 46px; font-size: 12px; }
}
@media (max-width: 440px) {
  .imprint { font-size: 16px; }
  .tools #help { font-size: 0; gap: 0; }
  .tools #help .icon { width: 19px; height: 19px; }
}
@media (max-width: 335px) {
  .mast-inner, main { width: calc(100% - 20px); }
  .imprint { gap: 0; font-size: 0; }
  .tools #openBook { gap: 5px; }
}
@media (max-width: 690px) and (max-height: 650px) and (orientation: portrait) {
  .mast-inner { height: 48px; }
  main { padding-top: 11px; }
  .edition { margin-bottom: 8px; }
  .mast-title { margin-bottom: 10px; }
  .dek { display: none; }
  .scene { aspect-ratio: 1.57; }
  .card-body { padding: 12px 14px; }
  .card-body h2 { font-size: 25px; }
}
@media (min-width: 570px) and (max-height: 545px) and (orientation: landscape) {
  .mast-inner { height: 46px; }
  main { padding-top: 8px; }
  .mast-title { margin-bottom: 10px; }
  .edition, .dek, .course-card { display: none; }
  h1 { font-size: 36px; }
  #game { grid-template-columns: minmax(0, 1.7fr) minmax(204px, 1fr); gap: 14px; }
  .scene { aspect-ratio: 1.88; max-height: max(176px, calc(100svh - 172px)); }
  .card-body { padding: 11px 14px; }
  .card-body h2 { font-size: 24px; }
  #message { font-size: 13px; }
  .primary { margin-top: 10px; }
  .book-heading h2 { font-size: 27px; }
}

@media (prefers-reduced-motion: no-preference) {
  .utility, .primary, .secondary, .book-level, .compare button { transition: background-color .15s ease, border-color .15s ease, translate .12s ease, box-shadow .12s ease; }
  [data-phase="dark"] .shade .icon { animation: night-sign .26s cubic-bezier(.2,.7,.25,1) both; }
  [data-phase="guess"] .shade { animation: lights-return .17s ease-out both; }
  .course-emblem.earned::after { animation: stamp-land .24s ease-out both; }
  #stampHost:not([hidden]) { animation: kitten-peek .26s ease-out both; }
  @keyframes night-sign {
    from { scale: .8; rotate: -12deg; opacity: .5; }
    to { scale: 1; rotate: 0deg; opacity: 1; }
  }
  @keyframes lights-return { from { opacity: .88; } to { opacity: 0; } }
  @keyframes stamp-land { from { scale: 1.3; opacity: .4; } to { scale: 1; opacity: 1; } }
  @keyframes kitten-peek { from { translate: 0 9px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
}


.site-game-title .game-name { display: block; }
.site-game-title .edition { max-width: max-content; }

.skip-link {
  position: absolute;
  z-index: 20;
  top: 8px;
  left: 8px;
  transform: translateY(calc(-100% - 14px));
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 800;
}
.skip-link:focus { transform: none; }
a:focus-visible, #game:focus-visible, .info-main:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 4px;
}
.script-note {
  margin-top: 18px;
  padding: 12px 16px;
  border: 1px solid var(--violet);
  border-radius: 10px;
  background: #fcfaff;
}
.game-guide {
  --guide-surface: #fcfaff;
  display: grid;
  gap: clamp(30px, 5vw, 58px);
  margin-top: clamp(42px, 7vw, 88px);
  padding-top: clamp(24px, 4vw, 46px);
  border-top: 1px solid var(--line);
}
.guide-intro, .guide-section { scroll-margin-top: 20px; }
.guide-intro, .steps, .course-grid { display: grid; gap: 12px; }
.game-guide h2, .info-article h2 {
  font: 800 clamp(25px, 4.2vw, 40px)/1.07 var(--display);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.game-guide p, .game-guide dd, .info-article p, .info-article li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}
.game-guide p { max-width: 74ch; }
.guide-intro p, .guide-section > p, .info-article p { margin-top: 14px; }
.game-guide strong { color: var(--ink); }
.guide-links {
  align-self: start;
  display: grid;
  padding: 6px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--guide-surface);
}
.guide-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  color: var(--violet);
  font-weight: 750;
  text-decoration: none;
}
.guide-links a + a { border-top: 1px solid var(--line); }
.guide-links a::after { content: "↓" / ""; }
.guide-links a:hover, .site-footer a:hover { text-decoration: underline; }
.steps, .course-grid {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.steps { counter-reset: play-step; }
.steps li, .course-grid li {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--guide-surface);
}
.steps li { counter-increment: play-step; }
.steps li::before {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  margin-bottom: 11px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--lime);
  color: var(--ink);
  font: 800 16px/1 var(--display);
  content: counter(play-step) / "";
}
.steps h3, .course-grid h3 {
  margin-bottom: 5px;
  font: 800 20px/1.15 var(--display);
  letter-spacing: -.02em;
}
.guide-section > h3 { margin-top: 22px; font: 800 22px/1.15 var(--display); }
.steps p, .course-grid p { font-size: 15px; }
.practice {
  max-width: 720px;
  margin-top: 19px;
  padding: clamp(14px, 3vw, 25px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--guide-surface);
}
.practice h3 { font: 800 22px/1.12 var(--display); }
.practice > p { margin-top: 8px; }
.practice-boards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0;
}
.practice-board {
  margin: 0;
  padding: 7px;
  border: 1px solid #c9abde;
  border-radius: 12px;
  background: #ebdefd;
}
.practice-board figcaption {
  padding: 0 3px 6px;
  color: #4b2c83;
  font-size: 14px;
  font-weight: 800;
}
.practice-board > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  place-items: center;
  min-height: 46px;
  padding: 3px;
  border-radius: 7px;
  background-color: #fff6e7;
  background-image: conic-gradient(#b274b223 25%, transparent 0 50%, #b274b223 0 75%, transparent 0);
  background-size: 20px 20px;
}
.practice-board img { width: 100%; max-width: 68px; height: auto; }
.practice fieldset { margin: 0; padding: 0; border: 0; }
.practice legend { padding: 0; font-weight: 800; }
.practice-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 3px;
}
.practice-options label { display: flex; align-items: center; gap: 5px; min-height: 44px; cursor: pointer; }
.practice-options input { accent-color: var(--violet); }
.practice-options input:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
.practice-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.practice-result output { color: #4b2c83; font-size: 14px; font-weight: 700; }
.course-grid li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
}
.course-grid img { object-fit: contain; }
.guide-faq dl {
  max-width: 76ch;
  margin: 16px 0 0;
  border-top: 1px solid var(--line);
}
.guide-faq dl > div {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.guide-faq dt { font: 800 18px/1.3 var(--display); }
.guide-faq dd { margin: 4px 0 0; }
.game-guide dd a, .info-article p a { color: var(--violet); text-underline-offset: .18em; }
.return-to-game {
  display: inline-flex;
  width: auto;
  justify-content: center;
  gap: 16px;
  padding-inline: 16px;
  text-decoration: none;
}
.return-to-game:hover { text-decoration: underline; }

.site-footer {
  border-top: 1px solid var(--line);
  background: #fcfaff;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px 24px;
  width: min(1160px, calc(100% - 28px));
  margin-inline: auto;
  padding: 10px 0;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.footer-title { font: 800 20px/1 var(--display); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.site-footer nav a { font-size: 14px; font-weight: 750; }

.info-page { display: flex; flex-direction: column; }
.site-brand, .play-link { color: var(--ink); text-decoration: none; }
.play-link { min-width: 0; padding-inline: 9px; }
.info-main {
  flex: 1;
  width: min(720px, calc(100% - 28px));
  padding-block: clamp(30px, 7vw, 76px);
}
.info-article {
  padding: clamp(20px, 5vw, 50px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fcfaff;
  box-shadow: 4px 5px 0 #dfd3f5;
}
.info-article h1 { font-size: clamp(36px, 7.5vw, 65px); }
.info-article .info-lead { margin-top: 18px; color: var(--ink); font-size: 18px; }
.info-article section { margin-top: 27px; }
.info-article h2 { font-size: clamp(22px, 4.9vw, 28px); }
.info-article ul { padding-left: 21px; }
.info-article li + li { margin-top: 5px; }

@media (min-width: 610px) {
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 780px) {
  .guide-intro { grid-template-columns: minmax(0, 1fr) minmax(226px, 29%); gap: 28px; }
  .steps, .course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 690px) {
  .site-game-title .edition {
    max-width: calc(100% - 85px);
    gap: 4px;
    letter-spacing: .045em;
    text-transform: none;
    font-size: 10px;
  }
}
@media (max-width: 335px) {
  .site-game-title .edition { gap: 3px; letter-spacing: 0; }
  .site-game-title .edition .icon { width: 12px; height: 12px; }
}

.feedback-form { margin-top: 14px; }
.feedback-form label { display: block; font-weight: 800; }
.feedback-form textarea {
  display: block;
  width: 100%;
  margin: 6px 0 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  resize: vertical;
}
.feedback-form textarea:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.feedback-form [role="status"] { min-height: 1.65em; }

/*
Copyright 2022 The Bricolage Grotesque Project Authors (https://github.com/ateliertriay/bricolage)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded, 
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
*/

/*
Copyright 2014 The DM Sans Project Authors (https://github.com/googlefonts/dm-fonts)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded, 
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
*/
