@font-face {
  font-family: DM Sans;
  src: url('fonts/dm-sans.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: Young Serif;
  src: url('fonts/young-serif.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
:root {
  --ink: #223e36;
  --forest: #23483e;
  --muted: #506159;
  --paper: #f8f5e9;
  --line: #c8c7b3;
  --orange: #ae4122;
  --serif: 'Young Serif', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  color: var(--ink);
  font: 100%/1.5 var(--sans);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 280px;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 150 150' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23795021' opacity='.06' filter='url(%23n)' d='M0 0h150v150H0z'/%3E%3C/svg%3E");
}
button,
a {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #326fb0;
  outline-offset: 4px;
}
button {
  border: 0;
  background: none;
  line-height: 1.25;
}
button:disabled:not(.route-card) {
  opacity: 0.52;
}
button,
a,
summary {
  touch-action: manipulation;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.12;
}
h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.035em;
}
.icon {
  flex: none;
  vertical-align: middle;
}
.skip {
  position: absolute;
  top: -100px;
  left: 15px;
  z-index: 4;
  background: white;
  padding: 8px;
}
.skip:focus {
  top: 5px;
}
header {
  border-bottom: 1px solid #c8c6b2;
  background: #f9f7eced;
}
.bar,
main {
  max-width: 1264px;
  margin: auto;
  padding-inline: clamp(22px, 4.6vw, 66px);
}
.bar {
  height: 81px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  padding: 0;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 10px;
  color: #24483c;
}
.brand > svg {
  width: 41px;
  height: 47px;
}
.brand > span {
  font: 400 1.55rem/0.98 var(--serif);
  letter-spacing: -0.055em;
}
.brand small {
  display: block;
  margin: 5px 0 0 1px;
  font: 800 0.68rem/1.12 var(--sans);
  letter-spacing: 0.145em;
  text-transform: uppercase;
}
nav,
.actions,
.primary,
.outline,
.top-book,
.eyebrow,
.top-help,
.filed,
.proof,
.crumb,
.crumb button,
.section-label,
.meter,
footer,
footer span {
  display: flex;
  align-items: center;
}
nav {
  gap: 17px;
}
.top-book,
.top-help,
.outline {
  border: 1px solid #a6ac98;
  background: #faf8ef;
  border-radius: 9px;
  font-weight: 700;
  gap: 8px;
}
.top-book {
  min-height: 42px;
  padding: 8px 14px;
  font-size: 0.9rem;
}
.top-help {
  min-height: 42px;
  min-width: 42px;
  justify-content: center;
  border: 0;
  background: none;
}
.top-book:hover,
.outline:hover,
.top-help:hover {
  background: #e8ebdc;
}
main:focus,
#sheet-title:focus {
  outline: none;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.83fr) minmax(0, 1.17fr);
  gap: clamp(28px, 3vw, 60px);
  align-items: center;
  padding: clamp(41px, 5vw, 75px) 0 clamp(44px, 5vw, 74px);
}
.eyebrow,
.step,
.section-label > span,
.filed,
.card-symbol,
.meter {
  font-weight: 800;
}
.eyebrow,
.step {
  font-size: 0.75rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.eyebrow {
  color: #934021;
  gap: 10px;
}
.eyebrow i {
  background: #bf602f;
  width: 27px;
  height: 3px;
  display: inline-block;
  border-radius: 3px;
}
.hero h1 {
  font-size: clamp(3.1rem, 5.6vw, 5.38rem);
  line-height: 1.02;
  letter-spacing: -0.053em;
  margin: 17px 0 19px;
}
.hero h1 span {
  color: #39604e;
}
.hero-copy > p {
  color: #42554b;
  font-size: clamp(1.03rem, 1.4vw, 1.17rem);
  line-height: 1.57;
  max-width: 39ch;
}
.actions {
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 24px;
}
.primary,
.outline,
.listen {
  justify-content: center;
  gap: 9px;
}
.primary,
.outline {
  padding: 12px 18px;
  min-height: 47px;
  border-radius: 9px;
  font-weight: 750;
}
.primary {
  color: #fffaf0;
  background: var(--orange);
  box-shadow: 0 3px 0 #763c24;
  font-size: 1rem;
  border: 1px solid #903d24;
}
.primary:hover {
  background: #97371c;
}
.primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #763c24;
}
.listen {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 3.375rem;
  padding: 0.625rem 1rem;
  color: var(--ink);
  background: #ffd474;
  border: 2px solid #866129;
  border-radius: 12px;
  box-shadow: 0 3px 0 #866129;
  font-size: 1.125rem;
  font-weight: 800;
}
.listen .icon {
  grid-area: 1 / 1;
  width: 1.625rem;
  height: 1.625rem;
}
/* Keep the tap target in place when a longer listening label becomes “Stop”. */
.listen span,
.listen::after {
  grid-area: 1 / 2;
}
.listen::after {
  content: attr(data-label);
  visibility: hidden;
}
.listen:hover {
  background: #ffdf92;
}
.listen[aria-pressed='true'] {
  color: #fff9e8;
  background: var(--forest);
  border-color: var(--forest);
  box-shadow: 0 2px 0 #163127;
}
.listen[aria-pressed='true'] .icon {
  fill: currentColor;
}
.station-photo {
  position: relative;
  transform: rotate(1.5deg);
  background: #fffcf1;
  padding: 9px 9px 0;
  box-shadow:
    0 3px 8px #3b361829,
    0 0 1px 1px #8c887150;
  border: 1px solid #d4cebb;
  margin-right: 4px;
}
.station-photo:before {
  content: '';
  position: absolute;
  inset: 9px -4px -5px 5px;
  background: #eee8d4;
  border: 1px solid #cec8b4;
  transform: rotate(-2.5deg);
  z-index: -1;
}
.station-photo > img {
  display: block;
  width: 100%;
  aspect-ratio: 1.78;
  object-fit: cover;
  object-position: 50% 47%;
  border: 1px solid #555f4b3b;
}
.tape {
  position: absolute;
  background: #d5b96fc7;
  z-index: 1;
  transform: rotate(-10deg);
  top: -9px;
  left: 39%;
  width: 85px;
  height: 25px;
  clip-path: polygon(
    1% 0,
    98% 2%,
    100% 15%,
    98% 30%,
    100% 55%,
    98% 76%,
    100% 95%,
    2% 100%,
    3% 84%,
    0 66%,
    2% 47%,
    0 23%
  );
  box-shadow: inset 0 1px 4px #dcb96080;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0 3px,
    #fff4c325 3px 4px
  );
}
figcaption {
  font: 400 1.03rem var(--serif);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  color: #4b5746;
  position: relative;
}
.photo-paw {
  color: #a89e81;
  position: absolute;
  right: 7px;
  top: 7px;
  transform: rotate(-14deg);
  opacity: 0.88;
}
.photo-paw svg {
  width: 26px;
  height: 26px;
}
.route {
  border-top: 2px dashed #bbbba3;
  padding: 27px 0 32px;
}
.route-heading,
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
}
.route h2,
.section-label h2,
.decision h2,
.deduction h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
}
.meter {
  gap: 4px;
  color: #626b57;
  font-size: 0.81rem;
  white-space: nowrap;
}
.meter i {
  width: 11px;
  height: 11px;
  border: 1px solid #889780;
  border-radius: 50%;
  background: #edeedf;
}
.meter i.filled {
  background: #518065;
}
.meter span {
  margin-left: 5px;
}
.cards,
.object-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.route-card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 16px 17px 13px;
  min-height: 137px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 2px 0 #615f3e13;
}
.stage-0 {
  --bg: #e7eddf;
  --border: #aebb9f;
  --tone: #466b53;
  --wash: #d1dfc8;
}
.stage-1 {
  --bg: #f4ead3;
  --border: #d7c7a3;
  --tone: #796137;
  --wash: #e9d9b5;
}
.stage-2 {
  --bg: #eee7df;
  --border: #d4c6b8;
  --tone: #815d49;
  --wash: #e1d6c9;
}
.route-card:not(:disabled):hover,
.object:hover {
  box-shadow: 0 4px 0 #595a3829;
  transform: translateY(-2px);
}
.card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.card-copy > strong {
  font: 400 clamp(1.03rem, 1.68vw, 1.36rem)/1.14 var(--serif);
  letter-spacing: -0.035em;
}
.card-copy > span:last-child {
  font-size: 0.91rem;
  line-height: 1.35;
  color: #526056;
}
.step {
  color: var(--tone);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  margin-bottom: 1px;
}
.card-symbol {
  position: absolute;
  right: 9px;
  top: 8px;
  color: var(--tone);
}
.card-figure {
  width: 72px;
  height: 77px;
  display: grid;
  place-items: center;
  flex: none;
  position: relative;
}
.card-figure:before {
  content: '';
  position: absolute;
  width: 65px;
  height: 62px;
  background: var(--wash);
  border-radius: 43% 57% 55% 45%;
}
.mini-scene {
  position: relative;
  width: 68px;
  height: 72px;
  display: block;
}
.scrap {
  position: absolute;
  left: 6px;
  bottom: 7px;
  width: 40px;
  height: 37px;
  background: repeating-linear-gradient(25deg, #dbb586 0 5px, #966c4c 5px 9px);
  transform: rotate(-13deg);
  clip-path: polygon(
    4% 3%,
    100% 0,
    91% 18%,
    100% 25%,
    91% 42%,
    100% 77%,
    92% 100%,
    4% 93%,
    9% 83%,
    0 75%,
    7% 63%,
    0 50%
  );
}
.lens {
  position: absolute;
  left: 23px;
  top: 5px;
  width: 38px;
  height: 38px;
  border: 4px solid #2d574c;
  background: linear-gradient(
    128deg,
    #d9eae39c 0 26%,
    #fff8 27% 33%,
    #c2dcd4 34% 60%,
    #fffa 61% 66%,
    #b6d4c8 67%
  );
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 2px #99b8a1,
    0 0 0 2px #bd984d;
  transform: rotate(37deg);
}
.lens:after {
  content: '';
  position: absolute;
  left: 10px;
  top: 32px;
  width: 9px;
  height: 26px;
  border-radius: 2px 2px 4px 4px;
  background: linear-gradient(90deg, #795436, #af7f45 60%, #624730);
  border: 1px solid #514a36;
}
.glint,
.dots {
  position: absolute;
  font: 700 1.05rem/1 Georgia;
  color: #aa7833;
  top: 4px;
  left: 3px;
}
.dots {
  top: 2px;
  left: auto;
  right: 0;
  background: #fff4d4;
  border: 1px solid #907a55;
  border-radius: 45%;
  padding: 0 4px 2px;
  font-size: 0.8rem;
}
.snap {
  position: absolute;
  background: #fdf7eb;
  border: 1px solid #938777;
  padding: 2px 2px 6px;
  width: 36px;
  height: 43px;
  box-shadow: 1px 2px #9b896f77;
}
.snap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.snap.first {
  top: 10px;
  left: 2px;
  transform: rotate(-12deg);
}
.snap.second {
  top: 22px;
  left: 29px;
  transform: rotate(11deg);
}
.tiny-book {
  position: absolute;
  top: 12px;
  left: 11px;
  width: 39px;
  height: 50px;
  border: 2px solid #405745;
  border-radius: 4px 5px 5px 4px;
  background: linear-gradient(
    90deg,
    #325c51 0 15%,
    #76927a 16% 20%,
    #527663 21%
  );
  transform: rotate(-12deg);
  box-shadow:
    inset 0 -4px #d2c7a3,
    2px 2px #8b846d;
}
.tiny-book:after {
  content: '';
  position: absolute;
  right: 6px;
  top: -1px;
  background: #c78148;
  width: 4px;
  height: 47px;
}
.tiny-book svg {
  width: 16px;
  color: #dbc17f;
  position: absolute;
  top: 13px;
  left: 9px;
}
.pencil {
  position: absolute;
  top: 18px;
  right: 7px;
  width: 7px;
  height: 46px;
  transform: rotate(20deg);
  background: linear-gradient(90deg, #cf7a37 0 50%, #edbd6d 50%);
  border: 1px solid #91633b;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%);
}
.book-scene .glint {
  left: 0;
  top: 1px;
}
footer {
  border-top: 1px solid #c9c8b5;
  margin-top: 17px;
  padding-block: 18px 24px;
  justify-content: space-between;
  color: #687364;
  font-size: 0.78rem;
}
footer span {
  gap: 6px;
  font-weight: 650;
}
footer svg {
  width: 18px;
  height: 18px;
}
footer a {
  text-underline-offset: 3px;
}
.game-view {
  max-width: 1110px;
}
.crumb {
  padding: 26px 0 22px;
  gap: 8px;
  font-size: 0.86rem;
  color: #5a675e;
  flex-wrap: wrap;
}
.crumb button {
  gap: 3px;
  font-weight: 700;
  padding: 4px 4px 4px 0;
}
.play-title h1,
.final-card h1 {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  margin: 9px 0 20px;
}
.detective-line {
  padding: 18px 22px;
  background: #e6ebdd;
  border: 1px solid #b7c4ab;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 22px 0 28px;
}
.detective-face {
  width: 81px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid #aca480;
}
.detective-line b,
.filed {
  color: #375b47;
}
.detective-line p {
  max-width: 75ch;
  margin: 3px 0;
}
.detective-line .listen {
  margin-top: 0.5rem;
}
.section-label > span {
  font-size: 0.85rem;
  color: var(--muted);
}
.object {
  background: #fffaf0;
  border: 1px solid #c6c4ad;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 2px 0 #77704d24;
}
.object > img {
  width: 100%;
  height: clamp(130px, 15vw, 175px);
  object-fit: contain;
  display: block;
  background: #fcf6e8;
}
.object > span {
  padding: 13px 17px;
  display: block;
  border-top: 1px solid #ddd7c5;
}
.object strong {
  font: 400 1.38rem var(--serif);
}
.object small,
.filed {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  margin-top: 3px;
}
.continue {
  margin: 24px 0 8px;
  display: flex;
  justify-content: end;
}
.decision {
  background: #fffaf0;
  border: 1px solid #ccc5ad;
  border-radius: 15px;
  padding: 24px;
}
.pick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 25px;
}
.pick,
.proof {
  border: 1px solid #bfc1ac;
  border-radius: 10px;
  background: #faf7eb;
  font-weight: 700;
}
.pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 15px 4px 5px;
}
.pick img {
  width: 50px;
  height: 50px;
  border-radius: 7px;
}
.proof {
  gap: 7px;
  padding: 11px 14px;
  min-height: 44px;
}
.pick[aria-pressed='true'],
.proof[aria-pressed='true'] {
  border-color: #527b5f;
  box-shadow: inset 0 0 0 1px #527b5f;
  background: #dfe9d7;
}
dialog {
  background: #fffaf0;
  color: var(--ink);
  border: 1px solid #aea78c;
  box-shadow: 0 14px 65px #10281e48;
  border-radius: 18px;
  width: min(680px, calc(100% - 24px));
  top: var(--sheet-center, 50%);
  bottom: auto;
  transform: translateY(-50%);
  margin: 0 auto;
  max-height: min(90dvh, calc(var(--sheet-height, 100dvh) - 16px));
  padding: 0;
  overflow: hidden;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
.sheet-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 4px clamp(19px, 4vw, 34px) clamp(19px, 4vw, 34px);
}
dialog::backdrop {
  background: #1e302bbb;
}
dialog h2 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  margin: 8px 0 12px;
  padding-right: 16px;
}
dialog h3 {
  font-size: 1.04rem;
  line-height: 1.32;
  margin: 16px 0 6px;
}
dialog p,
.final-card p {
  font-size: 1.07rem;
  line-height: 1.6;
  margin: 8px 0;
}
.x {
  flex: none;
  align-self: flex-end;
  margin: 7px 8px 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e9e8da;
  z-index: 1;
}
.clue-modal {
  display: grid;
  grid-template-columns: 32% 1fr;
  gap: 20px;
  align-items: start;
}
.modal-art {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #d1c8ae;
  margin-top: 9px;
}
.answers {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.answers .outline {
  min-height: 40px;
  padding: 8px 11px;
}
.dialog-foot {
  margin-top: 18px;
}
.filed {
  margin-top: 16px;
}
.hint {
  background: #f9e7c9;
  border-radius: 8px;
  padding: 11px 14px;
  margin: 12px 0;
  font-weight: 600;
}
.hint .listen {
  display: grid;
  margin-top: 0.625rem;
}
.hint-steps {
  margin-block: 14px;
}
.hint-step:not([open]) > :not(summary) {
  display: none;
}
.hint-step summary {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #f6ecd4;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.hint-step .hint-step {
  margin-top: 6px;
}
.hint-card {
  padding: 3px 12px 10px;
  border-inline-start: 3px solid #d7b670;
}
.hint-card .listen {
  margin-top: 5px;
}
#clue-retry:not(:empty) {
  margin-block: 8px;
  color: #814226;
  font-weight: 700;
}
.notes h3 {
  font: 400 1.3rem var(--serif);
  margin-top: 20px;
}
.note-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed #d1cdb9;
}
.note-row > img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 7px;
}
.note-row > span {
  flex: 1 1 7rem;
}
.note-row .listen {
  margin-inline-start: auto;
}
.notes summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
}
.notes details {
  margin-top: 14px;
}
.final-card {
  margin: auto;
  max-width: 760px;
  background: #fff9ea;
  border: 1px solid #c4bea6;
  border-radius: 18px;
  padding: clamp(20px, 4vw, 46px);
}
.medal {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #eed194;
  color: #785022;
  border: 3px double #ad863e;
  margin-bottom: 16px;
}
.deduction {
  margin-top: 20px;
  border-top: 2px dashed #c9bda0;
  padding-top: 20px;
}
.audio-message:not(:empty) {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #233c32;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 5;
}
@media (min-width: 1450px) {
  .hero {
    padding-block: 72px 74px;
  }
  .route {
    padding-top: 32px;
  }
  .bar {
    height: 88px;
  }
}
@media (max-width: 1020px) {
  .card-figure {
    width: 60px;
  }
  .mini-scene {
    transform: scale(0.86);
  }
  .route-card {
    gap: 9px;
    padding: 17px 10px;
    min-height: 135px;
  }
  .card-copy > strong {
    font-size: 1.12rem;
  }
  .cards {
    gap: 10px;
  }
  .hero {
    grid-template-columns: 0.93fr 1.07fr;
    gap: 24px;
  }
  .hero .actions {
    gap: 6px;
  }
  .hero .primary {
    padding-inline: 13px;
  }
}
@media (max-width: 750px) {
  .bar {
    height: 67px;
  }
  .brand > svg {
    width: 34px;
    height: 40px;
  }
  .brand > span {
    font-size: 1.33rem;
  }
  .brand small {
    font-size: 0.6rem;
  }
  nav {
    gap: 4px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 29px;
    padding: 30px 0 34px;
  }
  .hero-copy > p {
    max-width: 48ch;
  }
  .hero h1 {
    font-size: clamp(3.15rem, 9.5vw, 4rem);
    margin: 11px 0 12px;
  }
  .hero h1 br {
    display: none;
  }
  .hero h1 span:before {
    content: ' ';
  }
  .hero-copy .actions {
    margin-top: 16px;
    gap: 9px;
  }
  .station-photo {
    max-width: 590px;
    width: 95%;
    justify-self: center;
    transform: rotate(1deg);
    padding: 6px 6px 0;
  }
  .station-photo > img {
    aspect-ratio: 2.08;
  }
  .tape {
    width: 67px;
    height: 20px;
  }
  figcaption {
    min-height: 33px;
    font-size: 0.9rem;
  }
  .photo-paw {
    top: 3px;
  }
  .photo-paw svg {
    width: 22px;
  }
  .route {
    padding: 22px 0 10px;
  }
  .cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .route-card {
    min-height: 84px;
    padding: 8px 14px;
    gap: 16px;
  }
  .card-figure {
    height: 63px;
    width: 63px;
  }
  .mini-scene {
    transform: scale(0.79);
  }
  .card-figure:before {
    width: 55px;
    height: 53px;
  }
  .card-copy {
    gap: 2px;
  }
  .card-copy > strong {
    font-size: 1.2rem;
  }
  .route-heading {
    margin-bottom: 14px;
  }
  .card-symbol {
    right: 12px;
    top: 11px;
  }
  .route h2 {
    font-size: 1.45rem;
  }
  .meter {
    font-size: 0.73rem;
  }
  .meter i {
    width: 8px;
    height: 8px;
  }
  .object-grid {
    gap: 10px;
  }
  .object > span {
    padding: 10px;
  }
  .object strong {
    font-size: 1.05rem;
  }
  .object small {
    font-size: 0.78rem;
  }
  .object > img {
    height: 120px;
  }
}
@media (max-width: 490px) {
  .bar,
  main {
    padding-inline: 18px;
  }
  .bar {
    height: 63px;
  }
  .top-book {
    font-size: 0.8rem;
    padding: 6px 9px;
    gap: 5px;
  }
  .top-help {
    min-width: 32px;
  }
  .brand {
    gap: 6px;
  }
  .hero {
    padding: 27px 0 25px;
    gap: 23px;
  }
  .hero h1 {
    line-height: 1.03;
  }
  .hero-copy > p {
    font-size: 1rem;
    line-height: 1.5;
  }
  .hero h1 br {
    display: block;
  }
  .hero h1 span:before {
    content: none;
  }
  .route-heading {
    gap: 4px;
  }
  .meter {
    gap: 3px;
  }
  .meter span {
    margin-left: 2px;
  }
  .object-grid {
    grid-template-columns: 1fr;
  }
  .object {
    display: flex;
    align-items: center;
  }
  .object > img {
    width: 83px;
    height: 83px;
  }
  .object > span {
    border: 0;
  }
  .object strong {
    font-size: 1.25rem;
  }
  .object small {
    font-size: 0.85rem;
  }
  .detective-line {
    align-items: start;
    padding: 13px;
    gap: 10px;
  }
  .detective-face {
    width: 49px;
  }
  .crumb {
    padding-block: 18px 15px;
  }
  .play-title h1 {
    margin-bottom: 10px;
  }
  .detective-line {
    margin: 14px 0 20px;
  }
  .pick-row {
    gap: 7px;
  }
  .decision {
    padding: 15px;
  }
  .pick {
    gap: 3px;
    padding: 4px 7px 4px 3px;
  }
  .pick img {
    width: 30px;
    height: 34px;
  }
  .proof {
    padding: 9px 11px;
  }
  .clue-modal {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .modal-art {
    width: 105px;
    height: 105px;
    margin: 0;
  }
  .note-row > img {
    width: 34px;
    height: 34px;
  }
  .audio-message:not(:empty) {
    width: 90%;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .primary,
  .route-card,
  .object {
    transition:
      transform 0.13s ease,
      box-shadow 0.13s ease;
  }
}

[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.top-town,
.town-tally,
.case-pager,
.case-pager button,
.shelf-tools,
.tile-meta,
.tile-status,
.tile-place,
.case-search {
  display: flex;
  align-items: center;
}
.top-town {
  gap: 5px;
  min-height: 42px;
  font-weight: 700;
}
.town {
  padding: clamp(18px, 2.6vw, 36px) 0 15px;
}
.town-heading {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #c1bda6;
  border-radius: 12px;
  background: #e9ecdd;
  min-height: clamp(180px, 17vw, 248px);
  display: flex;
  align-items: center;
}
.town-scene {
  position: absolute;
  inset: 0 0 0 auto;
  width: 77%;
  height: 100%;
  object-fit: cover;
  object-position: center 51%;
  z-index: -2;
}
.town-heading:after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    #e9ecdd 0 26%,
    #e9ecddf7 32%,
    #e9ecdd99 43%,
    transparent 57%
  );
}
.town-copy {
  padding: clamp(20px, 2.9vw, 40px);
}
.town-heading h1 {
  color: var(--forest);
  font-size: clamp(3.1rem, 5.6vw, 5.25rem);
  letter-spacing: -0.065em;
  line-height: 1.04;
}
.town-heading p {
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  margin-top: 7px;
}
.town-tally {
  gap: 6px;
  margin-top: 15px;
  font-size: 0.84rem;
  color: #435e49;
}
.catalogue-tools {
  margin: 21px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.shelf-tools {
  gap: 5px;
  flex-wrap: wrap;
}
.filter-label {
  margin-right: 7px;
  font-size: 0.9rem;
  font-weight: 750;
  color: var(--muted);
}
.level {
  min-height: 39px;
  border: 1px solid #b9bea8;
  border-radius: 7px;
  background: #fcf9ed;
  padding: 6px 12px;
  font-size: 0.9rem;
  font-weight: 700;
}
.level span[aria-hidden] {
  color: #946625;
}
.level[aria-pressed='true'] {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff9e8;
}
.level[aria-pressed='true'] span[aria-hidden] {
  color: #f5cf72;
}
.level:hover:not([aria-pressed='true']) {
  background: #e7eadb;
}
.case-search {
  gap: 8px;
  border: 1px solid #b9bea8;
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--muted);
  background: #fffaef;
}
.case-search input {
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  width: 12.5em;
  min-width: 0;
  border: none;
  background: transparent;
}
.case-search input:focus {
  outline: none;
}
.case-search:focus-within {
  outline: 3px solid #326fb0;
  outline-offset: 2px;
}
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 23px);
  align-content: start;
}
.case-tile {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  border: 1px solid #beb9a2;
  border-radius: 11px;
  overflow: hidden;
  background: #fffaed;
  box-shadow: 0 3px 0 #75643625;
}
.case-tile:hover {
  border-color: #788c71;
  box-shadow: 0 4px 8px #766d4b2e;
}
.tile-photo {
  position: relative;
  display: block;
  width: 100%;
  background: #e4e7d8;
}
.tile-photo img {
  width: 100%;
  aspect-ratio: 2.15;
  display: block;
  object-fit: cover;
}
.tile-status {
  position: absolute;
  bottom: 6px;
  left: 8px;
  padding: 4px 7px;
  gap: 5px;
  border-radius: 5px;
  color: #fffae9;
  background: #294d40;
  font-size: 0.78rem;
  font-weight: 700;
}
.tile-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  padding: clamp(12px, 1.35vw, 19px);
}
.tile-meta {
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 7px;
}
.tile-meta > span:first-child {
  color: #765332;
  font: 800 0.75rem/1.15 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stars {
  color: #925b17;
  letter-spacing: 0.07em;
}
.empty-stars {
  color: #8a7a60;
}
.tile-body > strong {
  font: 400 clamp(1.25rem, 1.9vw, 1.65rem)/1.15 var(--serif);
  letter-spacing: -0.035em;
}
.tile-place {
  margin-top: auto;
  padding-top: 9px;
  gap: 4px;
  color: #59695e;
  font-size: 0.86rem;
}
.no-matches {
  grid-column: 1 / -1;
  text-align: center;
  padding: 35px;
}
.no-matches button {
  display: inline-flex;
  margin-top: 10px;
}
.case-pager {
  gap: 12px;
  justify-content: flex-end;
  padding-top: 15px;
  font-size: 0.9rem;
}
.case-pager > span {
  color: var(--muted);
}
.case-pager button {
  font-weight: 750;
  gap: 2px;
  min-height: 40px;
}
.case-pager + .hero {
  padding-top: clamp(14px, 2.5vw, 35px);
  touch-action: pan-y pinch-zoom;
}
.object-grid:has(> :nth-child(4)) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (min-width: 921px) and (max-width: 1099px) {
  .level-word {
    display: none;
  }
  .object-grid:has(> :nth-child(5)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .object-grid:has(> :nth-child(5)) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (min-width: 491px) and (max-width: 920px) {
  .catalogue-tools {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .level-word {
    display: none;
  }
  .case-search input {
    width: 100%;
  }
  .object-grid:has(> :nth-child(4)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 630px) and (max-width: 920px) {
  .object-grid:has(> :nth-child(4)) .object {
    display: flex;
    align-items: center;
  }
  .object-grid:has(> :nth-child(4)) .object > img {
    width: clamp(76px, 11vw, 100px);
    height: auto;
    aspect-ratio: 1;
    flex: none;
  }
  .object-grid:has(> :nth-child(4)) .object > span {
    border: 0;
    padding: 10px;
  }
}
@media (min-width: 491px) and (max-width: 739px) {
  .catalogue-tools {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 750px) {
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .town-heading:after {
    background: linear-gradient(
      90deg,
      #e9ecdd 3%,
      #e9ecddf0 33%,
      #e9ecdd65 67%,
      transparent 85%
    );
  }
  .town-copy {
    padding: 18px;
  }
  .town-heading {
    min-height: 160px;
  }
  .town-scene {
    width: 83%;
  }
  .top-town {
    font-size: 0.88rem;
  }
}
@media (max-width: 490px) {
  .level-word {
    display: none;
  }
  .shelf-tools {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
  }
  .filter-label {
    grid-column: 1 / -1;
  }
  .catalogue-tools {
    gap: 7px;
    margin: 13px 0;
  }
  .level {
    padding: 5px 8px;
  }
  .filter-label {
    margin-right: 1px;
  }
  .case-search {
    width: 100%;
  }
  .case-search input {
    width: 100%;
  }
  .town-heading h1 {
    font-size: clamp(2.45rem, 11.3vw, 3.1rem);
  }
  .town-heading p {
    font-size: 0.94rem;
  }
  .town-tally {
    margin-top: 11px;
  }
  .town-copy {
    padding: 13px;
  }
  .town-heading {
    min-height: 135px;
  }
  .town-heading:after {
    background: linear-gradient(
      90deg,
      #e9ecdd 0%,
      #e9ecddf0 34%,
      #e9ecdd60 78%,
      transparent
    );
  }
  .case-grid {
    gap: 11px;
  }
  .tile-body {
    padding: 9px;
  }
  .tile-meta {
    flex-wrap: wrap;
    gap: 3px;
  }
  .tile-meta > span:first-child {
    letter-spacing: 0.04em;
  }
  .tile-photo img {
    aspect-ratio: 1.65;
  }
  .tile-body > strong {
    font-size: clamp(1.06rem, 4.4vw, 1.31rem);
  }
  .tile-place {
    font-size: 0.81rem;
    align-items: start;
  }
  .tile-place svg {
    width: 12px;
    height: 16px;
  }
  .object-grid:has(> :nth-child(4)) {
    grid-template-columns: 1fr;
  }
  .top-town span {
    display: none;
  }
  .top-town {
    width: 32px;
    justify-content: center;
  }
  .case-pager {
    padding-top: 9px;
  }
}
@media (max-width: 319px) {
  .shelf-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.calculation {
  margin-top: 15px;
}
.calculation label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}
.calculation > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}
.calculation input {
  box-sizing: border-box;
  width: 6em;
  max-width: 100%;
  min-height: 45px;
  padding: 7px 10px;
  background: white;
  color: var(--ink);
  border: 2px solid #87917b;
  border-radius: 7px;
  font: 700 1.08rem var(--sans);
}
.calculation input:focus-visible {
  outline: 3px solid #326fb0;
  outline-offset: 2px;
}
.calculation input[aria-invalid='true'] {
  border-color: #a9582c;
}
.worked-sum,
.hint-equation {
  white-space: pre-line;
  display: block;
  margin-block: 6px;
  width: fit-content;
  padding: 3px 9px;
  border-radius: 5px;
  background: #e6eddb;
  color: #294a37;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
@media (any-pointer: coarse) {
  .brand,
  .top-help,
  .top-book,
  .top-town,
  .level,
  .case-pager button,
  .crumb button,
  .answers .outline {
    min-width: 44px;
    min-height: 44px;
  }
  .case-search {
    min-height: 44px;
    padding-block: 0;
  }
  .case-search input {
    min-height: 44px;
    font-size: 1rem;
  }
}
@media (max-width: 374px) {
  .bar:has(.top-book:not([hidden])) .brand > span {
    display: none;
  }
}
