:root {
  color-scheme: light;
  --ink: #193e34;
  --ink-deep: #133d32;
  --muted: #5e7167;
  --line: #d4dbcc;
  --paper: #f5f6ed;
  --card: #fffef8;
  --gold: #edc366;
  --sans: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --nums: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  background: none;
  border: 0;
}
h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b76610;
  outline-offset: 3px;
}
.skip {
  position: fixed;
  top: 6px;
  left: 6px;
  padding: 8px 14px;
  background: white;
  transform: translateY(-170%);
  z-index: 10;
}
.skip:focus {
  transform: none;
}
.skip:not(:focus) {
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: none;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mast {
  background: #fffef7;
  border-bottom: 1px solid var(--line);
}
.mast-inner,
.main-shell {
  width: min(1880px, 100%);
  margin: auto;
  padding-inline: clamp(20px, 1.6vw, 32px);
}
.mast-inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 62px);
  height: 70px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  white-space: nowrap;
}
.brand img {
  height: 37px;
  width: 37px;
}
.brand strong {
  font-size: 22px;
  letter-spacing: 0.055em;
  font-weight: 800;
}
.nav {
  display: flex;
  gap: 6px;
}
.nav a,
.help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 650;
}
.nav a {
  padding: 8px 15px;
  border-radius: 7px;
  color: #54675c;
}
.nav a .icon,
.help-button .icon {
  width: 17px;
  height: 17px;
}
.nav a[aria-current="page"] {
  background: #e6eddf;
  color: #224a38;
}
.nav a:hover,
.help-button:hover {
  background: #edf2e7;
}
.help-button {
  margin-left: auto;
  padding: 8px 2px 8px 10px;
  color: #4b6053;
}
.main-shell {
  outline: none;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: clamp(25px, 3vw, 46px) 0 24px;
}
.course-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #526956;
}
.course-line > span {
  display: inline-block;
  width: 21px;
  height: 3px;
  border-radius: 3px;
  background: #bb872d;
}
.intro h1 {
  font-size: clamp(36px, 3.25vw, 53px);
  line-height: 1.21;
  font-weight: 850;
  letter-spacing: 0.015em;
  margin: 5px 0 7px;
}
.intro #page-description {
  color: #556b60;
  font-size: 15px;
  letter-spacing: 0.015em;
}
.stats {
  display: flex;
  margin: 0 2px 4px 0;
  align-items: center;
  padding-top: 5px;
}
.stats div {
  min-width: 75px;
  padding: 0 18px;
  border-left: 1px solid #c8d1c1;
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.stats div:first-child {
  border: 0;
}
.stats div:last-child {
  padding-right: 0;
}
.stats dt {
  order: 2;
  font-weight: 650;
  color: #617368;
  font-size: 12px;
}
.stats dd {
  font-family: var(--nums);
  font-weight: 660;
  font-size: 29px;
  letter-spacing: -0.055em;
  line-height: 1;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 23vw, 360px);
  grid-template-rows: auto 1fr;
  gap: 15px 22px;
  align-items: start;
}
.map-card,
.side-panel,
.index-panel {
  background: var(--card);
  border: 1px solid #ccd6c7;
  border-radius: 16px;
}
.map-card {
  grid-column: 1;
  grid-row: 1/3;
  overflow: hidden;
  min-width: 0;
}
.map-viewport {
  aspect-ratio: 1.5;
  position: relative;
  background: #77c8b7;
  overflow: hidden;
  isolation: isolate;
  touch-action: pan-y;
}
.map-viewport.zoomed {
  touch-action: none;
  cursor: grab;
}
.map-viewport.dragging {
  cursor: grabbing;
}
.map-world {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  user-select: none;
  will-change: transform;
}
.map-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
}
.route-overlay {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.route-overlay.on {
  opacity: 1;
}
.route-overlay path {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
}
.route-shadow {
  stroke: #244e41;
  stroke-width: 6;
}
.route-stitch {
  stroke: #ffe79e;
  stroke-width: 3.3;
  stroke-dasharray: 4 6;
}
.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: #254338;
  background: rgba(255, 255, 245, 0.97);
  border: 1px solid #fffae0;
  border-radius: 20px;
  padding: 4px 9px 4px 4px;
  box-shadow:
    0 2px 0 #244d4160,
    0 5px 14px #183b352e;
  font-size: clamp(11px, 1.02vw, 15px);
  font-weight: 780;
  transform: translate(-50%, -100%);
  line-height: 1.2;
}
.pin:after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #fffef3;
}
.pin-number {
  display: grid;
  place-content: center;
  min-width: 22px;
  height: 21px;
  padding: 0 3px;
  border-radius: 12px;
  background: var(--d-pale);
  color: var(--d-color);
  font: 750 12px/1 var(--nums);
  letter-spacing: 0.01em;
}
.pin:hover,
.pin[aria-current="location"] {
  background: #174737;
  color: #fffcef;
  box-shadow:
    0 0 0 2px #ebca71,
    0 4px 12px #163c345c;
  z-index: 1;
  border-color: #174737;
}
.pin:hover:after,
.pin[aria-current="location"]:after {
  border-top-color: #174737;
}
.pin[aria-current="location"] .pin-number,
.pin:hover .pin-number {
  background: #f4cf79;
  color: #264534;
}
.compass {
  position: absolute;
  left: 16px;
  top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 32px;
  height: 45px;
  color: #204c40;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px #fcfbe9);
}
.compass span {
  font: 800 11px/1 var(--nums);
}
.compass svg {
  width: 22px;
  height: 26px;
}
.map-tools {
  position: absolute;
  right: 13px;
  bottom: 14px;
  display: flex;
  align-items: center;
  background: #fffef4f5;
  padding: 3px;
  border: 1px solid #dce4d4;
  border-radius: 9px;
  box-shadow: 0 3px 10px #143d4026;
}
.map-tools button,
.icon-button {
  width: 32px;
  height: 31px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  padding: 0;
}
.map-tools button + button {
  border-left: 1px solid #e1e4d7;
  border-radius: 0;
}
.map-tools button:last-child {
  border-radius: 0 5px 5px 0;
}
.map-tools .icon {
  width: 16px;
  height: 16px;
}
.map-tools button:hover:not(:disabled),
.icon-button:hover {
  background: #eaf0df;
}
.map-tools button:disabled {
  color: #9aab9d;
}
.map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  min-height: 42px;
  color: #566c5e;
  font-size: 12px;
}
.map-footer > span,
.map-footer button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.map-footer .icon {
  width: 15px;
  height: 15px;
}
.map-footer button {
  white-space: nowrap;
  color: #345e4c;
  font-weight: 700;
  padding: 3px 5px;
  border-radius: 4px;
  font-size: 12px;
}
.map-footer button:hover,
.map-footer button[aria-pressed="true"] {
  background: #e6eddf;
}
.side-panel {
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
  outline: none;
  scroll-margin-top: 10px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 17px 20px 13px;
}
.panel-head h2,
.district-detail h2 {
  font-size: 22px;
  letter-spacing: 0.025em;
  line-height: 1.3;
}
.panel-head .hint {
  color: #607365;
  font-size: 12px;
}
.district-list {
  padding: 0 14px 8px;
}
.district-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 5px;
  border-top: 1px solid #e2e6d9;
  min-height: 55px;
}
.district-row:hover,
.lesson-link:hover,
.index-lesson:hover {
  background: #eff3e7;
}
.district-row .district-icon {
  transition: transform 0.2s;
}
.district-row:hover .district-icon {
  transform: translateY(-2px);
}
.district-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--d-pale);
  color: var(--d-color);
  flex: none;
}
.district-icon > .icon {
  width: 23px;
  height: 23px;
  stroke-width: 1.65;
}
.row-copy {
  display: grid;
  line-height: 1.38;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.row-copy strong {
  font-size: 16px;
  font-weight: 720;
  letter-spacing: 0.025em;
}
.row-copy small,
.lesson-meta {
  font-size: 12px;
  color: #617263;
}
.district-row > .icon,
.lesson-link > .icon,
.index-lesson > .icon {
  height: 15px;
  width: 15px;
  color: #718272;
  flex: none;
}
.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: #677969;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.04em;
  margin: 25px 0 0;
  padding: 14px 2px 18px;
}
.footer-seed {
  color: #8c9b77;
  font-size: 14px;
}
.district-detail {
  padding: 15px 18px 10px;
}
.back,
.small-route {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  color: #456957;
}
.back .icon,
.small-route .icon {
  width: 15px;
  height: 15px;
}
.detail-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 13px 0 8px;
}
.detail-title small {
  color: var(--muted);
  font-size: 12px;
}
.district-detail > p {
  font-size: 14px;
  color: #546958;
  margin: 7px 0 15px;
}
.lesson-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 11px 2px;
}
.lesson-code {
  font: 700 13px var(--nums);
  color: #4e6856;
  letter-spacing: 0.04em;
  flex: none;
}
.lesson-link .row-copy strong,
.index-lesson .row-copy strong {
  font-size: 14px;
}
.lesson-link .row-copy small {
  font-size: 12px;
  line-height: 1.4;
}
.journey-mode .side-panel {
  grid-row: 1/3;
}
.index-panel {
  overflow: hidden;
}
.index-head {
  padding: 19px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.index-head label {
  font-weight: 700;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fffef8;
  border: 1px solid #bccab9;
  border-radius: 8px;
  padding: 6px 12px;
  max-width: 420px;
  flex: 1;
}
.search-wrap .icon {
  width: 16px;
}
.search-wrap input {
  border: 0;
  color: var(--ink);
  outline: none;
  background: transparent;
  min-width: 0;
  width: 100%;
  font-size: 14px;
}
.search-wrap:focus-within {
  outline: 2px solid #987127;
}
.results-count {
  font-size: 13px;
  color: var(--muted);
  margin-left: auto;
}
.index-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 24px;
  padding: 24px;
}
.index-group h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  margin-bottom: 9px;
}
.index-group h2 .district-icon {
  width: 31px;
  height: 31px;
  border-radius: 8px;
}
.index-group h2 .icon {
  width: 19px;
  height: 19px;
}
.index-lesson {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #dce2d5;
  padding: 11px 1px;
}
.index-lesson .lesson-code {
  font-size: 12px;
}
.empty-result {
  padding: 20px;
  color: var(--muted);
  grid-column: 1/-1;
}
.empty-result button {
  margin-left: 10px;
  text-decoration: underline;
  color: var(--ink);
}
dialog {
  max-width: min(440px, 90vw);
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 26px;
  box-shadow: 0 15px 60px #17382e30;
}
dialog::backdrop {
  background: #203d3480;
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.dialog-top > .icon {
  width: 28px;
  height: 28px;
  color: #8c6b23;
}
dialog h2 {
  font-size: 25px;
}
dialog ul {
  padding: 0;
  list-style: none;
}
dialog li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
dialog li strong {
  font-size: 15px;
}
dialog p {
  font-size: 14px;
  color: var(--muted);
}
.dialog-note {
  padding-top: 6px;
  font-size: 12px;
}
@media (min-width: 1450px) {
  .district-row {
    padding-block: 13px;
  }
  .panel-head {
    padding-block: 20px;
  }
}
@media (max-width: 1090px) {
  .workspace {
    grid-template-columns: minmax(0, 1.88fr) minmax(270px, 0.93fr);
    gap: 12px 15px;
  }
  .mast-inner,
  .main-shell {
    padding-inline: 25px;
  }
  .district-row {
    min-height: 50px;
    padding-block: 7px;
  }
  .panel-head {
    padding: 14px 18px 12px;
  }
  .district-icon {
    width: 34px;
    height: 34px;
  }
  .index-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .stats div {
    padding-inline: 11px;
    min-width: 55px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) minmax(235px, 0.65fr);
    gap: 10px;
  }
  .mast-inner,
  .main-shell {
    padding-inline: 17px;
  }
  .district-row {
    min-height: 40px;
    padding-block: 5px;
    gap: 9px;
  }
  .district-row .row-copy {
    gap: 0;
  }
  .district-row .row-copy strong {
    font-size: 14px;
  }
  .district-icon {
    width: 29px;
    height: 29px;
    border-radius: 7px;
  }
  .district-icon > .icon {
    width: 19px;
    height: 19px;
  }
  .map-footer {
    padding: 8px;
    font-size: 11px;
  }
  .map-footer button {
    font-size: 11px;
  }
  .pin {
    font-size: 10px;
    gap: 3px;
    padding: 3px 6px 3px 3px;
  }
  .pin-number {
    min-width: 17px;
    height: 17px;
    font-size: 10px;
  }
  .panel-head h2 {
    font-size: 19px;
  }
  .panel-head .hint {
    font-size: 11px;
  }
}
@media (max-width: 680px) {
  .mast-inner {
    gap: 8px;
    height: 58px;
  }
  .brand {
    gap: 6px;
  }
  .brand strong {
    font-size: 17px;
  }
  .brand img {
    width: 31px;
    height: 31px;
  }
  .nav {
    margin-left: auto;
    gap: 0;
  }
  .nav a {
    font-size: 12px;
    padding: 7px 8px;
    gap: 3px;
  }
  .nav .icon {
    width: 15px;
    height: 15px;
  }
  .help-button {
    margin-left: 1px;
    padding: 5px;
  }
  .help-button span {
    display: none;
  }
  .intro {
    padding: 23px 0 16px;
    display: block;
  }
  .intro h1 {
    font-size: 34px;
    margin: 4px 0 5px;
  }
  .intro #page-description {
    font-size: 14px;
  }
  .course-line {
    font-size: 11px;
  }
  .stats {
    margin: 10px 0 0;
    padding: 0;
  }
  .stats dd {
    font-size: 18px;
  }
  .stats div {
    min-width: 0;
    padding-inline: 12px;
    gap: 4px;
  }
  .stats div:first-child {
    padding-left: 0;
  }
  .stats dt {
    font-size: 11px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 11px;
  }
  .map-card,
  .side-panel,
  .route-card {
    width: 100%;
    border-radius: 13px;
  }
  .map-card {
    order: 1;
  }
  .side-panel {
    order: 3;
  }
  .map-footer {
    font-size: 11px;
    min-height: 37px;
    padding: 6px 9px;
  }
  .pin {
    font-size: 10px;
  }
  .map-tools {
    right: 8px;
    bottom: 8px;
    padding: 1px;
  }
  .map-tools button {
    width: 27px;
    height: 27px;
  }
  .compass {
    left: 6px;
    top: 8px;
    transform: scale(0.8);
    transform-origin: top left;
  }
  .panel-head {
    padding: 17px 17px 13px;
  }
  .panel-head h2 {
    font-size: 21px;
  }
  .district-row {
    padding: 9px 3px;
    min-height: 49px;
  }
  .district-icon {
    width: 34px;
    height: 34px;
  }
  .district-row .row-copy strong {
    font-size: 15px;
  }
  .district-row .row-copy {
    display: flex;
    gap: 10px;
    align-items: baseline;
  }
  .district-row .row-copy small {
    font-size: 11px;
  }
  .index-head {
    padding: 15px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .index-head label {
    font-size: 14px;
  }
  .search-wrap {
    max-width: none;
  }
  .index-groups {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
    gap: 18px;
  }
  .results-count {
    font-size: 11px;
  }
  .page-footer {
    margin-top: 18px;
    padding: 10px 0;
    font-size: 10px;
  }
  .journey-mode .side-panel {
    order: 2;
  }
}
@media (max-width: 365px) {
  .mast-inner,
  .main-shell {
    padding-inline: 12px;
  }
  .nav a .icon {
    display: none;
  }
  .pin {
    padding: 3px 5px 3px 3px;
    gap: 2px;
    font-size: 9px;
  }
  .pin-number {
    font-size: 9px;
    min-width: 15px;
    height: 15px;
  }
  .index-head label {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
  }
}
.route-letter {
  position: absolute;
  z-index: 1;
  left: 60%;
  top: 61%;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: #ffe298;
  color: #324f38;
  border: 1px solid #2d5b45;
  border-radius: 50%;
  box-shadow: 0 1px 5px #183e3540;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-9deg);
  transition:
    left 0.65s ease,
    top 0.65s ease,
    opacity 0.16s;
}
.route-letter .icon {
  width: 15px;
  height: 15px;
}
.route-letter.visible {
  opacity: 1;
}
.route-letter.arrived {
  left: 69.3%;
  top: 49.3%;
}
@media (min-width: 681px) {
  .workspace {
    grid-template-rows: auto 1fr;
  }
  .side-panel {
    grid-row: 2;
  }
  .journey-mode .map-card {
    position: sticky;
    top: 13px;
  }
  .journey-mode .side-panel {
    grid-row: 1/3;
  }
}

#scene-layer {
  position: absolute;
  inset: 0;
}
#scene-layer canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
#scene-layer canvas:active {
  cursor: grabbing;
}
#scene-layer canvas.on-building {
  cursor: pointer;
}
#scene-layer canvas:focus-visible {
  outline: 3px solid #b89b52;
  outline-offset: -3px;
}
.map-viewport.has-3d .map-art,
.map-viewport.has-3d .route-overlay {
  display: none;
}
/* The 3D camera adapts to its viewport; the illustration keeps its 1.5 ratio. */
.map-viewport.has-3d {
  aspect-ratio: auto;
  height: clamp(520px, 72vh, 860px);
}
@media (max-width: 1090px) and (min-width: 681px) {
  .map-viewport.has-3d {
    height: clamp(420px, 65vh, 680px);
  }
}
@media (max-width: 680px) {
  .mast-inner,
  .main-shell {
    padding-inline: 8px;
  }
  .map-viewport.has-3d {
    height: clamp(350px, 58svh, 540px);
  }
}
.map-viewport.has-3d .pin {
  touch-action: manipulation;
}
.map-viewport.has-3d .route-letter {
  transition: opacity 0.15s;
  z-index: 1;
}
.map-viewport.has-3d .map-world {
  will-change: auto;
}
.map-viewport.has-3d .pin {
  z-index: 2;
}
.map-viewport.has-3d .pin[aria-current="location"],
.map-viewport.has-3d .pin:focus-visible {
  z-index: 3;
}
.pin-compact:not(:hover):not(:focus-visible) .pin-name {
  display: none;
}
.pin-compact:not(:hover):not(:focus-visible) {
  padding-right: 4px;
}
.map-viewport:not(.has-3d) #scene-layer {
  pointer-events: none;
}
.map-viewport .compass {
  left: auto;
  right: 13px;
  top: 13px;
}
.map-viewport .compass svg {
  transform-origin: 50% 50%;
}
.scene-label,
.orbit-play {
  position: absolute;
  left: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #ecf0dc;
  color: #234f43;
  background: #fffef1ed;
  font: 650 12px/1.3 var(--sans);
  box-shadow: 0 2px 8px #173f3821;
  border-radius: 8px;
  padding: 7px 10px;
}
.scene-label {
  top: 13px;
  pointer-events: none;
}
.orbit-play {
  bottom: 14px;
  cursor: pointer;
}
.scene-label .icon,
.orbit-play .icon {
  width: 16px;
  height: 16px;
}
.orbit-play:hover,
.orbit-play[aria-pressed="true"] {
  background: #e6eccf;
}
@media (max-width: 680px) {
  .scene-label,
  .orbit-play {
    font-size: 10px;
    left: 8px;
    gap: 4px;
    padding: 5px 7px;
  }
  .scene-label {
    top: 8px;
  }
  .orbit-play {
    bottom: 8px;
  }
  .scene-label .icon,
  .orbit-play .icon {
    width: 13px;
    height: 13px;
  }
  .map-viewport .compass {
    right: 4px;
    top: 7px;
  }
}

/* OrbitControls supplies an inline cursor; keep the building target visible to a mouse user. */
#scene-layer canvas {cursor: grab !important;}
#scene-layer canvas.on-building {cursor: pointer !important;}
#scene-layer canvas:active {cursor: grabbing !important;}
@media (max-width: 680px) {
  .map-viewport .compass {display: none;}
  .scene-label {top: 3px; left: 3px; padding: 3px 5px;}
}

.map-actions, .map-actions a, .delivery-controls, .delivery-controls button, .delivery-labels,
.delivery-labels span { display: flex; align-items: center; }
.map-actions { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.map-actions a, .delivery-controls button { gap: 5px; color: #245742; font-weight: 700; font-size: 12px; text-decoration: none; }
.map-actions a:hover, .delivery-controls button:hover { text-decoration: underline; }
.map-actions [hidden], .delivery-dock[hidden], .delivery-controls [hidden] { display: none; }
.map-actions #delivery-preview { padding: 4px 7px; border: 1px solid #c0cdbd; border-radius: 5px; white-space: nowrap; }
.delivery-dock { padding: 11px 15px 9px; border-top: 1px solid #b7c9b6; border-bottom: 1px solid #dbe1d4; background: #f1f4e9; }
.delivery-labels { color: #264d3b; gap: 10px; font-size: 13px; font-weight: 700; }
.delivery-labels span { gap: 7px; }
.delivery-labels b { font: bold 10px/17px ui-monospace, monospace; border: 1px solid #b8c7b1; padding: 0 4px; border-radius: 4px; }
.delivery-labels > .icon { width: 22px; height: 13px; color: #84967c; }
.delivery-track { margin: 8px 0 5px; height: 3px; border-radius: 2px; background: #d6decf; overflow: hidden; }
.delivery-track span { display: block; height: 100%; background: #a87924; transform: scaleX(0); transform-origin: left; }
.delivery-controls { justify-content: space-between; gap: 6px; min-height: 22px; font-size: 12px; color: #47604a; }
.delivery-controls button { min-height: 25px; white-space: nowrap; }
.delivery-controls .icon { width: 13px; height: 13px; }
@media (max-width: 680px) {
  .map-actions { gap: 4px; }
  .map-footer { flex-wrap: wrap; }
  .map-footer > span { flex: 1 1 auto; }
  .district-mode .side-panel { order: 2; }
}

/* 學區第二層：場景裡的各堂路牌與課堂卡片 */
.lesson-pin {
  position: absolute;
  left: calc(var(--x) + var(--col) * max(8%, 32px));
  top: calc(var(--y) + 13% + var(--row) * max(11%, 31px));
  z-index: 4;
  display: grid;
  place-content: center;
  min-width: 27px;
  height: 25px;
  padding: 0 5px;
  border-radius: 13px;
  border: 1.5px solid #fffae0;
  background: var(--d-color);
  color: #fffcef;
  font: 750 12px/1 var(--nums);
  letter-spacing: 0.02em;
  box-shadow:
    0 2px 0 #244d4160,
    0 4px 10px #183b3540;
  transform: translate(-50%, -100%);
  touch-action: manipulation;
}
.lesson-pin[hidden] {
  display: none;
}
/* Widen the tap target without growing the badge. */
.lesson-pin:before {
  content: "";
  position: absolute;
  inset: -8px -5px;
}
.lesson-pin:hover,
.lesson-pin:focus-visible,
.lesson-pin[aria-current] {
  background: #f4cf79;
  color: #264534;
  border-color: #174737;
  box-shadow:
    0 0 0 2px #174737,
    0 4px 12px #163c345c;
  z-index: 5;
}
.district-detail > .chapter-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--ink);
  font-weight: 720;
}
/* Keep the map's own controls above the lesson signposts. */
.map-viewport.has-3d .map-tools,
.map-viewport.has-3d .orbit-play,
.map-viewport.has-3d .scene-label {
  z-index: 6;
}
.chapter-line b {
  font: 700 11px var(--nums);
  letter-spacing: 0.06em;
  color: var(--d-color, #4e6856);
  white-space: nowrap;
}
.lesson-badge {
  flex: none;
  display: grid;
  place-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--d-pale);
  color: var(--d-color);
  font: 750 18px/1 var(--nums);
}
.quest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.quest-card {
  display: grid;
  gap: 3px;
  padding: 11px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbf3;
}
.quest-card:hover,
.quest-card:focus-visible {
  border-color: var(--d-color);
  background: var(--d-pale);
}
.quest-step {
  font: 700 11px var(--nums);
  letter-spacing: 0.06em;
  color: var(--d-color);
}
.quest-card strong {
  font-size: 14px;
  line-height: 1.35;
}
.quest-story {
  font-size: 12.5px;
  line-height: 1.55;
  color: #546958;
}
.quest-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 680;
  color: #2f5a48;
}
.quest-open .icon {
  width: 13px;
  height: 13px;
}
.lesson-walk {
  margin-top: 12px;
}
.lesson-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 0 4px;
  border-top: 1px solid var(--line);
}
.lesson-steps a {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
  color: #2f5a48;
}
.lesson-steps small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.lesson-steps a:hover span {
  text-decoration: underline;
}
.lesson-next {
  text-align: right;
}
@media (max-width: 680px) {
  .lesson-pin {
    min-width: 29px;
    height: 27px;
  }
}

.district-detail > .chapter-line + p {
  margin-bottom: 6px;
}
.district-detail > .district-note {
  margin-top: 0;
  padding-left: 9px;
  border-left: 2px solid var(--d-pale, var(--line));
  font-size: 13px;
}
/* 路牌移入或聚焦時顯示課名 */
.lesson-pin:focus-visible:after {
  content: attr(data-title);
}
@media (hover: hover) {
  .lesson-pin:hover:after {
    content: attr(data-title);
  }
}
.lesson-pin:after {
  content: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(190px, 40vw);
  padding: 5px 9px;
  border-radius: 8px;
  background: #174737;
  color: #fffcef;
  font: 650 12px/1.4 var(--sans);
  letter-spacing: 0;
  white-space: normal;
  text-align: center;
  box-shadow: 0 4px 12px #163c345c;
  pointer-events: none;
}

/* 故事線 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.thread-overlay polyline {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke: #ffd766;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 #244e41);
}
.thread-head {
  border-top: 1px solid var(--line);
  margin-top: 6px;
}
.thread-icon {
  background: #faedc9;
  color: #916416;
}
.thread-row .row-copy small {
  font-family: var(--nums);
  letter-spacing: 0.02em;
}
.thread-tour {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  margin: 0 0 12px;
  padding: 8px 14px;
  border: 1px solid #174737;
  border-radius: 9px;
  background: #174737;
  color: #fffcef;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.thread-tour:hover {
  background: #28594a;
}
.thread-tour[aria-pressed="true"] {
  background: #fffdf5;
  color: #174737;
}
.thread-tour .icon {
  width: 16px;
  height: 16px;
}
.thread-stops {
  list-style: none;
  margin: 0;
  padding: 0;
}
.thread-stops li {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--line);
}
.thread-stop {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 6px 11px 8px;
  border: 0;
  border-left: 3px solid transparent;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.thread-stop .lesson-code {
  color: var(--d-color);
  padding-top: 2px;
}
.thread-stop .row-copy strong {
  font-size: 13.5px;
  line-height: 1.45;
}
.thread-stop .row-copy small {
  font-size: 12px;
  line-height: 1.4;
}
.thread-stop:hover,
.thread-stop[aria-current] {
  background: var(--d-pale);
  border-left-color: var(--d-color);
}
.thread-open {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px 0 8px;
  font-size: 12px;
  font-weight: 650;
  color: #456957;
}
.thread-open:hover {
  text-decoration: underline;
}
.thread-open .icon {
  width: 13px;
  height: 13px;
}
.district-detail > .lesson-threads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 12px;
}
.thread-row .row-copy {
  display: grid;
}
.lesson-threads span {
  color: var(--muted);
  margin-right: 2px;
}
.lesson-threads a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 14px;
  background: #faedc9;
  color: #6f4c0f;
  font-weight: 680;
}
.lesson-threads a:hover {
  background: #f4dc9c;
}
.lesson-threads .icon {
  width: 13px;
  height: 13px;
}

/* 角色：島上的名牌、課堂卡片的出場標記、角色介紹 */
.cast-tag {
  position: absolute;
  z-index: 3;
  display: none;
  padding: 2px 8px;
  border: 1.5px solid #fffae0;
  border-radius: 11px;
  font: 700 11px/1.5 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 6px #183b3540;
  transform: translate(-50%, 3px);
  touch-action: manipulation;
}
.map-viewport.has-3d .cast-tag {
  display: block;
}
#map-viewport[data-office="inside"] #cast-tags {
  display: none;
}
.cast-xiaocen {
  --cast: #e9b949;
  --cast-ink: #3d2c05;
}
.cast-aheng {
  --cast: #2f6b55;
  --cast-ink: #fffcef;
}
.cast-tag,
.cast-chip {
  background: var(--cast);
  color: var(--cast-ink);
}
.cast-tag:hover,
.cast-tag:focus-visible {
  box-shadow: 0 0 0 2px #174737;
}
.cast-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 9px;
  font: 700 11px/1.6 var(--sans);
  letter-spacing: 0;
}
.cast-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.cast-card img {
  flex: none;
  width: 96px;
  height: 96px;
  object-fit: cover;
  object-position: top;
  border-radius: 12px;
  background: #eef0e4;
  border-bottom: 4px solid var(--cast);
}
.cast-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.cast-card h3 small {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.cast-card p {
  margin: 0 0 6px;
  font-size: 13px;
}
.cast-card blockquote {
  margin: 0;
  font-size: 13px;
  color: #456957;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dialog-actions button,
.intro-actions button {
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid #174737;
  border-radius: 9px;
  background: #fffdf5;
  color: #174737;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
#intro-dialog {
  max-width: min(430px, calc(100vw - 32px));
}
.intro-kicker {
  margin: 0 0 6px;
  font: 700 11px var(--nums);
  letter-spacing: 0.08em;
  color: #916416;
}
#intro-dialog h2 {
  margin: 0 0 8px;
  outline: none;
}
.intro-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
}
.intro-actions .intro-primary {
  background: #174737;
  color: #fffcef;
}

/* 教材閱讀室與進度 */
.reader {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.reader-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #fffef8;
}
.reader-tabs {
  display: flex;
  gap: 4px;
  margin-inline: auto;
}
.reader-tabs a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 680;
  color: #54675c;
  white-space: nowrap;
}
.reader-tabs a:hover {
  background: #edf2e7;
}
.reader-tabs a[aria-current] {
  background: var(--d-pale);
  color: var(--d-color);
}
.reader-tabs a.is-done:after {
  content: " ✓";
}
.quest-done,
.quest-card.is-done .quest-todo {
  display: none;
}
.quest-card.is-done .quest-done {
  display: inline;
}
.quest-card.is-done {
  border-color: #b9cdb5;
  background: #f1f6ea;
}
.quest-card.is-done .quest-step:before {
  content: "✓ ";
}
.tally {
  flex: none;
  font: 700 11px var(--nums);
  color: #6f4c0f;
  background: #faedc9;
  border-radius: 9px;
  padding: 2px 7px;
}
.tally:empty {
  display: none;
}
.tally.is-full {
  background: #dcebd6;
  color: #1d5a45;
}
.lesson-pin[data-done="1"],
.lesson-pin[data-done="2"] {
  border-color: #f4cf79;
}
.lesson-pin[data-done="3"] {
  border-color: #f4cf79;
  box-shadow:
    0 0 0 2px #f4cf79,
    0 4px 10px #183b3540;
}
.lesson-pin[data-done="3"]:before {
  content: "✓";
  inset: auto;
  top: -9px;
  right: -8px;
  width: 15px;
  height: 15px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: #f4cf79;
  color: #264534;
  font-size: 10px;
}

/* 課堂卡片：地塊物件的說明 */
.district-detail > .plot-prop {
  margin: -6px 0 14px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--d-pale);
  font-size: 12.5px;
  line-height: 1.5;
  color: #44584c;
}
.plot-prop b {
  margin-right: 7px;
  color: var(--d-color);
}

/* 首頁面板：進度總覽 */
.overview {
  display: grid;
  gap: 9px;
  margin: 14px 14px 2px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #174737;
  color: #fffcef;
}
.overview-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.overview-count strong {
  font: 700 30px/1 var(--nums);
  letter-spacing: -0.03em;
}
.overview-count span {
  font-size: 13px;
  color: #cfe0cf;
}
.overview-bar {
  height: 6px;
  border-radius: 3px;
  background: #ffffff2b;
  overflow: hidden;
}
.overview-bar span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: 3px;
  background: #f4cf79;
}
.overview-next {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffdf5;
  color: #174737;
}
.overview-next small {
  grid-column: 1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #916416;
}
.overview-next span {
  grid-column: 1;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.overview-next .icon {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 18px;
  height: 18px;
}
.overview-next:hover {
  background: #fbf0cf;
}
.overview-done {
  font-size: 13.5px;
  color: #fffcef;
}
.overview-next:focus-visible {
  outline-color: #f4cf79;
}
@media (max-width: 680px) {
  /* 抽屜收合時高度有限：總覽排成一行數字加一顆按鈕，把清單留在首屏。 */
  .overview {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px 12px;
    margin-top: 8px;
    padding: 10px 12px;
  }
  .overview-count strong {
    font-size: 22px;
  }
  .overview-bar {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 4px;
  }
  .overview-next {
    padding: 7px 10px;
  }
  .overview-next span {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* 跨裝置同步 */
.overview-sync {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  padding: 2px 0;
  border: 0;
  background: none;
  color: #cfe0cf;
  font: 600 12.5px/1.4 var(--sans);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.overview-sync .icon {
  width: 14px;
  height: 14px;
}
.overview-sync:hover {
  color: #fffcef;
}
.overview-sync:focus-visible {
  outline-color: #f4cf79;
}
@media (max-width: 680px) {
  .overview-sync {
    grid-column: 1 / -1;
  }
}
#sync-dialog {
  width: min(92vw, 460px);
}
.sync-label {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #916416;
}
.sync-code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.sync-code code {
  padding: 8px 12px;
  border-radius: 10px;
  background: #eef2df;
  color: #174737;
  font: 700 18px/1.3 var(--nums);
  letter-spacing: 0.06em;
  user-select: all;
}
.sync-code button,
.sync-join button,
.sync-primary {
  padding: 8px 14px;
  border: 1px solid #c9d3b6;
  border-radius: 9px;
  background: #fffef1;
  color: #234f43;
  font: 650 13.5px/1.3 var(--sans);
  cursor: pointer;
}
.dialog-actions .sync-primary {
  border-color: #174737;
  background: #174737;
  color: #fffcef;
}
.sync-join {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e3e6d2;
}
.sync-join label {
  display: block;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 650;
}
.sync-join div {
  display: flex;
  gap: 8px;
}
.sync-join input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #b9c4a6;
  border-radius: 9px;
  background: #fff;
  font: 600 16px/1.3 var(--nums);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sync-state {
  font-size: 13px;
  color: #5b6b60;
}
.sync-problem {
  padding: 8px 12px;
  border-radius: 9px;
  background: #fbe9dc;
  color: #8a3b12;
  font-size: 13.5px;
}
#sync-dialog button:disabled {
  opacity: 0.55;
  cursor: default;
}

/* 角色的對話泡泡 */
.cast-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  width: max-content;
  max-width: min(260px, 62vw);
  padding: 9px 12px;
  border-radius: 12px;
  background: #fffef4;
  color: #233f38;
  font: 500 12.5px/1.55 var(--sans);
  text-align: left;
  white-space: normal;
  box-shadow: 0 4px 14px #17403733;
  transform: translateX(-50%);
  /* 不擋住底下的地圖按鈕；要換下一句點名牌 */
  pointer-events: none;
}
.cast-bubble.is-below {
  top: calc(100% + 9px);
  bottom: auto;
}
.cast-bubble.is-below::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: #fffef4;
}
.cast-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  border: 6px solid transparent;
  border-top-color: #fffef4;
  transform: translateX(-50%);
}
.cast-tag:has(.cast-bubble) {
  z-index: 7;
}
/* 首頁進度：外島挑戰另外一行，不混進主線的數字 */
.overview-extra {
  margin: 10px 0 0;
  font-size: 12.5px;
  opacity: 0.85;
}
.overview-extra b {
  font-size: 14px;
}
/* 島上居民說的話：跟著頭頂走的泡泡 */
.folk-tag {
  position: absolute;
  z-index: 7;
  width: 0;
  height: 0;
  pointer-events: none;
}
.folk-bubble {
  position: absolute;
  left: 50%;
  bottom: 9px;
  width: max-content;
  max-width: min(240px, 60vw);
  padding: 8px 12px;
  border-radius: 12px;
  background: #fffef4;
  color: #233f38;
  font: 500 12.5px/1.55 var(--sans);
  box-shadow: 0 4px 14px #17403733;
  transform: translateX(-50%);
}
.folk-bubble b {
  display: block;
  font-size: 11px;
  color: #2f6b55;
}
.folk-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  border: 6px solid transparent;
  border-top-color: #fffef4;
  transform: translateX(-50%);
}
/* 短訊息 */
.toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 22px;
  max-width: min(88vw, 420px);
  margin: 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: #174737;
  color: #fffcef;
  font: 600 14px/1.5 var(--sans);
  box-shadow: 0 6px 20px #10302855;
  transform: translateX(-50%);
  pointer-events: none;
  visibility: hidden;
}
.toast.is-shown {
  visibility: visible;
}
/* 收集冊 */
#book-dialog {
  width: min(94vw, 640px);
  max-width: min(94vw, 640px);
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
  padding: 0;
  list-style: none;
}
.book-item a {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 6px 9px;
  border: 1px solid #e3e6d2;
  border-radius: 12px;
  background: #f7f6ea;
  color: #5b6b60;
  font-size: 11.5px;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}
.book-item img,
.book-blank {
  width: 80px;
  height: 80px;
  /* 還沒完成的只看得到輪廓 */
  filter: grayscale(1) brightness(0.55) opacity(0.35);
}
.book-item b {
  font: 700 11px var(--nums);
  letter-spacing: 0.06em;
}
.book-item.is-got a {
  border-color: #e3c476;
  background: #fffdf0;
  color: #233f38;
}
.book-item.is-got img {
  filter: none;
}
.book-stamp {
  position: absolute;
  right: 6px;
  top: 6px;
  padding: 1px 6px;
  border: 1.5px solid #b5452f;
  border-radius: 6px;
  color: #b5452f;
  font: 700 10px/1.5 var(--sans);
  transform: rotate(8deg);
}
#book-dialog h3 {
  margin: 0 0 6px;
  font-size: 15px;
}
.book-eggs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.book-eggs span {
  padding: 4px 10px;
  border-radius: 999px;
  background: #eceedd;
  color: #7b867b;
  font-size: 12.5px;
}
.book-eggs .is-got {
  background: #174737;
  color: #fffcef;
}
.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
@media (max-width: 680px) {
  .overview-links {
    grid-column: 1 / -1;
  }
}
.book-grid li {
  margin: 0;
  padding: 0;
  border: 0;
}
