.wuhan-scroll {
  --scroll-ink: #28362d;
  --scroll-muted: #655e4f;
  --scroll-red: #883c2b;
  --scroll-line: #bcac8c;
  --scroll-paper: #f4ead3;
  --scroll-silk: #525f50;
  --scroll-serif: "Noto Serif SC", "Songti SC", SimSun, serif;
  --scroll-inset: 9.4%;
  --scroll-rail: clamp(12px, 2vw, 21px);
  --scroll-width: min(48rem, calc(100vw - 1.25rem));
  --scroll-rod-height: calc(var(--scroll-width) * .08);
  --scroll-gutter: clamp(16px, 4.6vw, 44px);
  width: var(--scroll-width);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  overflow: visible;
  color: var(--scroll-ink);
  background: transparent;
  color-scheme: light;
}
.wuhan-scroll::backdrop {
  background: radial-gradient(ellipse at 50% 44%, #1c2b2646 12%, #11282091 100%);
  backdrop-filter: blur(2px);
}
.wuhan-scroll [hidden] { display: none !important; }

/* The axis projects beyond both silk selvedges. Its own alpha edge
   carries the carved spindle and collar through to the map behind. */
.wuhan-scroll-rod {
  position: relative;
  z-index: 2;
  height: var(--scroll-rod-height);
  background: url("decor/scroll-roller.webp") 50% / 100% 100% no-repeat;
  filter: drop-shadow(1px 3px 2px #241a1370);
  pointer-events: none;
}
.wuhan-scroll-rod:last-child {
  margin-top: calc(var(--scroll-rod-height) * -.12);
  filter: drop-shadow(2px 8px 5px #211b154d);
}
.wuhan-scroll-aperture {
  position: relative;
  margin: calc(var(--scroll-rod-height) * -.12) var(--scroll-inset) 0;
  overflow: hidden;
  box-shadow: 2px 3px 5px #231c1759, 6px 16px 31px #22251b68;
}
.wuhan-scroll-aperture::before, .wuhan-scroll-aperture::after {
  position: absolute;
  z-index: 1;
  inset-inline: 0;
  height: 14px;
  content: "";
  pointer-events: none;
}
.wuhan-scroll-aperture::before {
  top: 0;
  background: linear-gradient(#30221665, #59462e21 36%, transparent);
}
.wuhan-scroll-aperture::after {
  bottom: 0;
  background: linear-gradient(transparent, #6d52362e 75%, #3b2f264f);
}
.wuhan-scroll-paper {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--scroll-rod-height) * 2 - 1.5rem);
  max-height: min(49rem, calc(100dvh - var(--scroll-rod-height) * 2 - max(1.5rem, env(safe-area-inset-bottom) + env(safe-area-inset-top))));
  padding-inline: var(--scroll-rail);
  background-color: var(--scroll-paper);
  background-image:
    linear-gradient(90deg, #735d372e, transparent 9%, #fffae618 38%, transparent 80%, #75593320),
    linear-gradient(#f6ebd04a, #fff5d846 50%, #f3e5c86b),
    url("decor/scroll-paper.webp");
  background-size: auto, auto, 430px auto;
}
.wuhan-scroll-paper::before, .wuhan-scroll-paper::after {
  position: absolute;
  inset-block: 0;
  width: var(--scroll-rail);
  border-inline: 1px solid #474432aa;
  background-color: var(--scroll-silk);
  background-image:
    linear-gradient(90deg, #212b2461, transparent 17%, #cbb98e55 21%, transparent 25%, transparent 75%, #cbb98e6b 79%, transparent 86%, #27312791),
    repeating-linear-gradient(135deg, #d6bf8738 0 1px, transparent 1px 7px),
    repeating-linear-gradient(45deg, #d6bf8738 0 1px, transparent 1px 7px),
    repeating-linear-gradient(0deg, transparent 0 1px, #322c2021 1px 2px);
  box-shadow: 0 0 2px #423a2566;
  content: "";
  pointer-events: none;
}
.wuhan-scroll-paper::before { left: 0; }
.wuhan-scroll-paper::after { right: 0; }
.wuhan-scroll-header {
  position: relative;
  flex: 0 0 auto;
  margin: 0 var(--scroll-gutter);
  padding: clamp(13px, 2.8vh, 28px) 34px 14px 0;
  border-bottom: 3px double var(--scroll-line);
}
.wuhan-scroll-header h2 {
  margin: 0;
  color: #26392e;
  font: 700 clamp(23px, 4.5vw, 37px)/1.25 var(--scroll-serif);
  letter-spacing: .045em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.wuhan-scroll-header h2:focus { outline: none; }
.wuhan-scroll-location {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  color: var(--scroll-muted);
  font: 500 12px/1.5 var(--scroll-serif);
  letter-spacing: .12em;
}
.wuhan-scroll-grade {
  display: inline-block;
  padding: 0 3px 1px 4px;
  border: 1px solid #9d5b46;
  border-radius: 2px;
  color: var(--scroll-red);
  line-height: 1.35;
  letter-spacing: .045em;
}
.wuhan-scroll button { font-family: inherit; cursor: pointer; }
.wuhan-scroll-close {
  position: absolute;
  top: clamp(9px, 2vh, 19px);
  right: -8px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #5c5748;
}
.wuhan-scroll-close::before, .wuhan-scroll-close::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 21px;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(45deg);
}
.wuhan-scroll-close::after { transform: rotate(-45deg); }
.wuhan-scroll-close:hover { color: var(--scroll-red); }
.wuhan-scroll button:focus-visible, .wuhan-scroll-reader:focus-visible {
  outline: 2px solid #80532e;
  outline-offset: -2px;
}
.wuhan-scroll-reader {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(14px, 2.6vh, 24px) var(--scroll-gutter) clamp(25px, 4vh, 40px);
  scrollbar-width: thin;
  scrollbar-color: #a59676 transparent;
}
.wuhan-scroll-image {
  position: relative;
  container-type: inline-size;
  margin: 0 0 clamp(12px, 2vh, 21px);
}
.wuhan-scroll-photo-mount {
  display: flex;
  align-items: center;
  justify-content: center;
  /* A stable mount keeps the page and photograph controls still as dimensions change. */
  height: clamp(106px, min(61cqi, 35dvh), 330px);
}
.wuhan-scroll-photo-mount img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border: 4px solid #fcf5df;
  box-shadow: 0 0 0 1px #bcb196, 0 1px 2px #48372236, 1px 4px 6px -4px #403422ab;
  object-fit: contain;
}
.wuhan-scroll-image figcaption {
  margin: 9px 0 0;
  color: var(--scroll-muted);
  font: 12px/1.6 var(--scroll-serif);
  text-align: center;
  overflow-wrap: anywhere;
}
.wuhan-scroll-gallery:not([hidden]) {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: var(--scroll-muted);
}
.wuhan-scroll-gallery span {
  font: 12px/1.5 Georgia, serif;
  font-variant-numeric: tabular-nums;
}
.wuhan-scroll-gallery button {
  min-width: 42px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--scroll-red);
  font: 27px/1 Georgia, serif;
}
.wuhan-scroll-gallery button:hover { background: #b9a67629; }
.wuhan-scroll-copy {
  color: #302f28;
  font: 400 clamp(16px, 2.2vw, 18px)/1.95 var(--scroll-serif);
  letter-spacing: .025em;
  overflow-wrap: anywhere;
}
.wuhan-scroll-copy p { margin: 0 0 .8em; }
.wuhan-scroll-copy p:last-child { margin-bottom: 0; }
.wuhan-scroll-source {
  margin: 14px 0 0;
  color: var(--scroll-muted);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.wuhan-scroll-source a {
  color: var(--scroll-ink);
  text-underline-offset: .2em;
}
.wuhan-scroll-source ul {
  display: inline;
  margin: 0;
  padding: 0 0 0 .6em;
  list-style: none;
}
.wuhan-scroll-source li { display: inline; }
.wuhan-scroll-source li + li::before { content: "、"; }
.wuhan-scroll-caption {
  margin: 0 0 3px;
  color: var(--scroll-muted);
  font-size: 12px;
  line-height: 1.6;
}

.wuhan-scroll-recommendations:not(:empty) {
  margin-top: 21px;
  padding-top: 15px;
  border-top: 1px solid #c9bea3;
}
.wuhan-scroll-recommendations section + section { margin-top: 13px; }
.wuhan-scroll-recommendations h3 {
  margin: 0 0 4px;
  color: #6b4835;
  font: 700 15px/1.65 var(--scroll-serif);
}

.wuhan-scroll-recommendations ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wuhan-scroll-recommendations button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 6px 4px 6px 0;
  border: 0;
  border-bottom: 1px solid #dbd1bc;
  color: var(--scroll-ink);
  background: transparent;
  text-align: start;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.wuhan-scroll-recommendations button::after {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-top: 1px solid #727b66;
  border-right: 1px solid #727b66;
  transform: rotate(45deg);
}

.wuhan-scroll-recommendations button:hover { background: #bcb69427; }

@media (max-width: 430px) {
  .wuhan-scroll {
    --scroll-rail: 9px;
    --scroll-gutter: clamp(12px, 4.2vw, 18px);
    --scroll-width: calc(100vw - 6px);
  }
  .wuhan-scroll-header { padding-bottom: 10px; }
  .wuhan-scroll-location { margin-bottom: 5px; }
  .wuhan-scroll-photo-mount { height: clamp(135px, min(86cqi, 32dvh), 245px); }
  .wuhan-scroll-gallery button { min-height: 44px; }
  .wuhan-scroll-recommendations ul { column-gap: 12px; }
  .wuhan-scroll-recommendations button { min-height: 44px; }
}

@media (max-width: 340px) {
  .wuhan-scroll-recommendations ul { grid-template-columns: 1fr; }
}

@media (max-height: 390px) {
  .wuhan-scroll-header { padding-block: 9px; }
  .wuhan-scroll-close { top: 1px; }
  .wuhan-scroll-area { margin-bottom: 0; }
}
