.reading-trail {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 26px;
  background: linear-gradient(#1b24386b, #211c2ac9), var(--trail-art) center top / cover;
  color: #331e28;
  padding-bottom: clamp(12px, 3vw, 42px);
}
.reading-hall {
  position: relative;
  aspect-ratio: 1448 / 238;
  min-height: 65px;
  background: var(--trail-art) center top / 100% auto no-repeat;
}
.reading-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.reading-back { position: absolute; top: 1%; right: 1%; width: 7%; height: 35%; min-width: 30px; min-height: 28px; border-radius: 15px; }
.reading-trail-tools { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 5px 10px 16px; }
.reading-trail-tools button { font-size: clamp(11px, 1.5vw, 16px); }
.reading-parchment {
  margin: 0 clamp(7px, 3.5vw, 54px);
  padding: clamp(7px, 2vw, 26px);
  background: radial-gradient(ellipse at center, #fff2ce 30%, #f9ce89 72%, #d08a44);
  border: 3px solid #9b551e;
  border-radius: 28px 15px 31px 17px;
  box-shadow: inset 0 0 28px #9b521a73, 0 12px 28px #1812219e;
}
.reading-trail-grid {
  display: grid;
  direction: ltr;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(134px, 19vw, 210px);
  position: relative;
  isolation: isolate;
}
.reading-trail-grid > svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.reading-trail-grid path { fill: none; stroke: #53505a; stroke-width: 6; stroke-dasharray: 12 7; }
.reading-trail-grid path.walked { stroke: #c71e21; }
.reading-trail .reading-stop {
  display: flex; flex-direction: column; justify-content: flex-start; align-items: center;
  gap: 8px; direction: rtl; margin: 0; min-width: 0; padding: 0 2px;
  padding-top: clamp(23px, 3.1vw, 34px);
  background: transparent; border: 0; color: #382022; box-shadow: none; font: inherit;
}
.reading-medal {
  position: relative; display: grid; place-items: center; flex: none;
  width: min(87%, clamp(57px, 13vw, 143px)); aspect-ratio: 1;
  border: 4px solid #eaae49; border-radius: 50%;
  box-shadow: 0 3px 0 #995216, 0 5px 10px #68421965, inset 0 0 0 2px #fff6c2;
  background: radial-gradient(circle at 28% 24%, #fff5b5, #c1e6dc 56%, #6a9aa7);
}
.reading-art { position: absolute; inset: 0; border-radius: inherit; background: var(--trail-art) var(--art-x) var(--art-y) / var(--art-width) var(--art-height); }
.reading-book-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 24%; border-radius: inherit; }
.reading-clue { font-size: clamp(17px, 3.5vw, 45px); line-height: 1; letter-spacing: -.16em; padding-inline-end: .16em; filter: drop-shadow(0 2px 2px #3f2f4160); }
.reading-stop strong { position: relative; background: #fff0c9; border-radius: 8px; padding: 2px 4px; font-size: clamp(10px, 1.5vw, 16px); line-height: 1.3; overflow-wrap: anywhere; }
.reading-stop.locked .reading-medal { filter: grayscale(1); opacity: .86; }
.reading-check { position: absolute; bottom: -6px; background: #278623; color: white; border: 2px solid #ffdf8f; border-radius: 99px; min-width: 24px; padding: 0 3px; }
.reading-pin { position: absolute; white-space: nowrap; bottom: 91%; background: #aa1e27; color: white; border: 2px solid #ffd16b; padding: 0 7px; border-radius: 9px; font-size: clamp(10px, 1.5vw, 17px); z-index: 1; }
.reading-stop.current .reading-medal { animation: reading-float 2.8s ease-in-out infinite; box-shadow: 0 0 0 3px #fff7bb, 0 0 24px #f4a71d; }
.reading-stop:focus-visible, .reading-back:focus-visible { outline: 3px solid #492588; outline-offset: 3px; }
.reading-trail-footer { display: grid; grid-template-columns: 1fr auto 1fr; gap: 5px; align-items: center; text-align: center; font-size: clamp(10px, 1.4vw, 15px); }
.reading-trail-footer button { color: #392329; background: #ffe4a4; border: 1px solid #9b551e; font-size: inherit; }
@keyframes reading-float { 50% { transform: translateY(-9px); } }
body.reduce .reading-stop.current .reading-medal { animation: none; }
@media (prefers-reduced-motion: reduce) { .reading-stop.current .reading-medal { animation: none; } }
