/* Visual system of the Dunhuang course portal. Values match the published stylesheet. */
:focus-visible {
  outline: 1px solid var(--gold-hi);
  outline-offset: 3px;
}
:root {
  --ink: #0e0b07;
  --ink-2: #171109;
  --ink-3: #201709;
  --ivory: #efe6d0;
  --ivory-dim: #b9ac8f;
  --gold: #c9a227;
  --gold-hi: #ebcf6b;
  --gold-lo: #f6e29a;
  --gold-deep: #8c6a1d;
  --azurite: #2e7da6;
  --cinnabar: #9c4a2c;
  --line: rgba(201, 162, 39, 0.28);
  --line-soft: rgba(201, 162, 39, 0.14);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --latin: "Cinzel", Georgia, serif;
  --panel-w: 340px;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--serif);
  background: var(--ink);
  color: var(--ivory);
  line-height: 1.9;
  overflow-x: hidden;
  background-image: radial-gradient(
    ellipse 90% 60% at 50% -10%,
    rgba(201, 162, 39, 0.07),
    transparent 60%
  );
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
main,
.mast,
.foot {
  position: relative;
  z-index: 1;
}
a {
  color: var(--gold-hi);
  text-decoration: none;
  transition: color 0.4s var(--ease);
}
a:hover {
  color: var(--gold-lo);
}
img {
  max-width: 100%;
  display: block;
}
::selection {
  background: #c9a22759;
}
.gilt {
  background: linear-gradient(
    180deg,
    var(--gold-lo) 0%,
    var(--gold) 55%,
    var(--gold-deep) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
  letter-spacing: 0.06em;
}
.kicker,
.sec-kicker,
.dim,
.tiny,
.notice {
  letter-spacing: 0.3em;
}
.dim {
  color: var(--ivory-dim);
}
.tiny {
  font-size: 0.72rem;
}
.center {
  text-align: center;
}
.kicker {
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  font-family: var(--latin);
}
.mast {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem clamp(1rem, 4vw, 3rem);
  background: linear-gradient(180deg, #0e0b07eb, #0e0b07c7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.seal {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--cinnabar), #6e2f17);
  color: var(--gold-lo);
  font-weight: 900;
  font-size: 1.25rem;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px #f6e29a66,
    0 4px 14px #00000080;
}
.brand-t b {
  display: block;
  font-size: 1.02rem;
  letter-spacing: 0.12em;
  color: var(--ivory);
}
.brand-t small {
  display: block;
  font-family: var(--latin);
  font-size: 0.58rem;
  letter-spacing: 0.32em;
  color: var(--gold);
}
.nav {
  display: flex;
  gap: clamp(0.6rem, 2vw, 1.6rem);
  flex-wrap: wrap;
}
.nav a {
  font-size: 0.88rem;
  letter-spacing: 0.22em;
  color: var(--ivory-dim);
  position: relative;
  padding: 0.2rem 0.1rem;
}
.nav a:after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -0.35rem;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transition: right 0.4s var(--ease);
}
.nav a:hover,
.nav a.on {
  color: var(--gold-hi);
}
.nav a:hover:after,
.nav a.on:after {
  right: 0;
}
.nojs {
  margin: 5rem auto 0;
  max-width: 640px;
  padding: 1.2rem 1.6rem;
  border: 1px solid var(--line);
  background: var(--ink-2);
  color: var(--ivory);
  text-align: center;
  font-size: 0.92rem;
}
.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-items: end;
  overflow: clip;
}
.hero-stage,
.hero-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-stage img {
  object-fit: cover;
  will-change: transform;
}
.hero-stage:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 11, 7, 0.24) 0%,
    rgba(14, 11, 7, 0.05) 40%,
    rgba(14, 11, 7, 0.86) 88%,
    var(--ink) 100%
  );
}
.ribbons {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.85;
}
.rib {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: drift 9s var(--ease) infinite alternate;
  filter: drop-shadow(0 0 8px rgba(201, 162, 39, 0.45));
}
.r1 {
  stroke: #f6e29a8c;
  animation-duration: 11s;
}
.r2 {
  stroke: #c9a22780;
  animation-duration: 9s;
  animation-delay: 1.2s;
}
.r3 {
  stroke: #2e7da680;
  animation-duration: 13s;
  animation-delay: 0.5s;
}
@keyframes drift {
  0% {
    stroke-dashoffset: 1400;
    transform: translateY(12px);
  }
  35% {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: 0;
    transform: translateY(-14px);
  }
}
.hero-copy {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  padding: 14rem clamp(1rem, 5vw, 4rem) 3rem;
}
.hero-copy h1 {
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  line-height: 1.18;
  margin: 0.4rem 0 0.2rem;
}
.hero-en {
  font-family: var(--latin);
  font-size: clamp(0.62rem, 1.6vw, 0.9rem);
  color: var(--gold);
  letter-spacing: 0.5em;
}
.hero-sub {
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  color: var(--ivory);
  max-width: 34em;
  margin-top: 0.6rem;
}
.hero-meta {
  font-size: 0.82rem;
  color: var(--ivory-dim);
  letter-spacing: 0.14em;
  margin-top: 0.3rem;
}
.hero-cta {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.68rem 1.5rem;
  font-family: var(--serif);
  font-size: 0.92rem;
  letter-spacing: 0.24em;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ivory);
  transition: all 0.45s var(--ease);
}
.btn .icon {
  font-family: var(--latin);
}
.btn.ghost:hover {
  border-color: var(--gold);
  color: var(--gold-hi);
  transform: translateY(-2px);
}
.btn.gold {
  background: linear-gradient(
    160deg,
    var(--gold-lo),
    var(--gold) 55%,
    var(--gold-deep)
  );
  color: #241a05;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 10px 28px #c9a22747;
}
.btn.gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px #c9a22766;
  color: #1c1403;
}
.bgm[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--gold-hi);
}
.bgm[aria-pressed="true"] .icon {
  animation: sway 1.6s ease-in-out infinite;
}
@keyframes sway {
  50% {
    transform: translateY(-3px);
  }
}
.hero-track {
  position: relative;
  margin: 2.2rem auto 0;
  max-width: 1180px;
  width: 92%;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 2.4rem;
}
.hero-track:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 1.35rem;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    var(--gold) 0 8px,
    transparent 8px 16px
  );
  opacity: 0.6;
}
.trk {
  position: relative;
  text-align: center;
  flex: 1;
}
.trk i {
  display: block;
  width: 9px;
  height: 9px;
  margin: 0.55rem auto 0.5rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    0 0 0 4px #c9a2272e,
    0 0 16px #ebcf6bcc;
}
.trk b {
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: var(--ivory);
  display: block;
}
.trk small {
  font-family: var(--latin);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  color: var(--ivory-dim);
}
.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: linear-gradient(180deg, transparent, var(--ink));
}
.sec {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3.6rem, 9vw, 6.5rem) clamp(1rem, 5vw, 2rem) 0;
}
.sec.slim {
  margin-top: 2rem;
}
.sec h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  margin: 0.3rem 0 1.4rem;
}
.sec h3 {
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}
.lead {
  font-size: 1.02rem;
  color: var(--ivory);
}
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2.4rem, 6vw, 4.5rem) clamp(1rem, 5vw, 2rem);
}
.wrap.narrow {
  max-width: 860px;
}
.page-head {
  margin-bottom: clamp(2rem, 6vw, 3.6rem);
}
.page-head h1 {
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  line-height: 1.35;
  margin: 0.4rem 0 0.8rem;
}
.page-head .sub {
  color: var(--ivory-dim);
  max-width: 46em;
}
.intro-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: clamp(1.6rem, 5vw, 4rem);
  align-items: start;
}
.stats {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.stats li {
  border: 1px solid var(--line-soft);
  background: linear-gradient(165deg, var(--ink-2), var(--ink-3));
  padding: 1.1rem 1.2rem;
  transition: border-color 0.4s var(--ease);
}
.stats li:hover {
  border-color: var(--line);
}
.stats b {
  display: block;
  font-family: var(--latin);
  font-size: 2rem;
  color: var(--gold-hi);
  line-height: 1.2;
}
.stats span {
  font-size: 0.78rem;
  color: var(--ivory-dim);
  letter-spacing: 0.22em;
}
.ch-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: stretch;
}
.more {
  margin-top: 1.8rem;
}
.quote-band {
  max-width: 1180px;
  margin: clamp(3rem, 8vw, 6rem) auto;
  padding: 3.2rem clamp(1rem, 5vw, 2rem);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
}
.quote-block,
.quote-band blockquote {
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  color: var(--gold-lo);
  letter-spacing: 0.18em;
}
.quote-band cite {
  display: block;
  font-size: 0.8rem;
  color: var(--ivory-dim);
  letter-spacing: 0.3em;
  margin-top: 1rem;
  font-style: normal;
}
.foot {
  border-top: 1px solid var(--line-soft);
  margin-top: clamp(3.5rem, 9vw, 6.5rem);
  padding: 2.4rem clamp(1rem, 5vw, 3rem) 2.6rem;
  background: linear-gradient(180deg, transparent, rgba(32, 23, 9, 0.5));
}
.foot-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.foot-brand {
  color: var(--gold-hi);
  letter-spacing: 0.18em;
}
.foot-nav,
.foot .foot-nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  justify-content: center;
}
.foot-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--ivory-dim);
}
.notice {
  font-size: 0.72rem;
  color: var(--ivory-dim);
  opacity: 0.8;
}
.notice.inline {
  margin-top: 2rem;
}
.foot .notice {
  margin-top: 1.4rem;
  text-align: center;
}
.foot-mini {
  text-align: center;
  padding: 2rem 1rem 3rem;
  border-top: 1px solid var(--line-soft);
}
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.ph-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(
      ellipse 80% 90% at 20% 0%,
      rgba(201, 162, 39, 0.16),
      transparent 55%
    ),
    radial-gradient(
      ellipse 90% 80% at 85% 100%,
      rgba(46, 125, 166, 0.14),
      transparent 55%
    ),
    repeating-linear-gradient(
      115deg,
      rgba(239, 230, 208, 0.045) 0 2px,
      transparent 2px 26px
    ),
    linear-gradient(160deg, var(--ink-2), var(--ink-3));
}
.ph-cover b {
  font-family: var(--latin);
  font-size: clamp(3.4rem, 8vw, 5.2rem);
  font-weight: 600;
  color: transparent;
  -webkit-text-stroke: 1px rgba(235, 207, 107, 0.5);
  letter-spacing: 0.1em;
}
.ph-cover small {
  position: absolute;
  bottom: 0.8rem;
  right: 1rem;
  writing-mode: vertical-rl;
  font-size: 0.64rem;
  color: var(--ivory-dim);
  letter-spacing: 0.5em;
}
.timeline {
  position: relative;
  display: grid;
  gap: 1.4rem;
}
.timeline:before {
  content: "";
  position: absolute;
  left: 27px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: repeating-linear-gradient(
    180deg,
    var(--gold) 0 6px,
    transparent 6px 14px
  );
  opacity: 0.5;
}
.ch-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(280px, 380px) 1fr;
  gap: 1.2rem;
  align-items: stretch;
  cursor: pointer;
  transform-style: preserve-3d;
}
.ch-dot {
  align-self: start;
  margin-top: 1.35rem;
  width: 55px;
  text-align: center;
  font-family: var(--latin);
  color: var(--gold-hi);
  font-size: 0.95rem;
}
.ch-dot i {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin: 0.5rem auto 0;
  background: var(--ink);
  border: 2px solid var(--gold);
  box-shadow: 0 0 12px #c9a22780;
}
.ch-cover {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--ink-2);
}
.ch-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease);
}
.ch-card:hover .ch-cover img {
  transform: scale(1.06);
}
.ch-body {
  border: 1px solid var(--line-soft);
  padding: 1.3rem 1.5rem;
  background: linear-gradient(165deg, var(--ink-2), var(--ink-3));
  transition:
    border-color 0.5s var(--ease),
    transform 0.5s var(--ease);
  will-change: transform;
}
.ch-card:hover .ch-body {
  border-color: var(--line);
}
.ch-era {
  font-size: 0.7rem;
  color: var(--azurite);
  letter-spacing: 0.3em;
}
.ch-body h3 {
  font-size: 1.22rem;
  margin: 0.35rem 0 0.5rem;
  letter-spacing: 0.06em;
}
.ch-body p.sum {
  font-size: 0.86rem;
  color: var(--ivory-dim);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.ch-tags span {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--gold-hi);
  border: 1px solid var(--line-soft);
  padding: 0.1rem 0.6rem;
}
.ch-tags .demo {
  color: var(--cinnabar);
  border-color: #9c4a2c80;
  letter-spacing: 0.1em;
}
.ch-hours {
  position: absolute;
  right: 1.2rem;
  top: 1.15rem;
  font-family: var(--latin);
  font-size: 0.68rem;
  color: var(--ivory-dim);
  letter-spacing: 0.1em;
}
.crumb {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--ivory-dim);
  margin-bottom: 1.6rem;
}
.crumb b {
  color: var(--gold-hi);
  font-weight: 400;
}
.ch-hero {
  position: relative;
  aspect-ratio: 21/9;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.ch-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ch-hero figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem clamp(1rem, 4vw, 2.6rem) 1.1rem;
  background: linear-gradient(180deg, transparent, rgba(14, 11, 7, 0.88));
  font-size: 0.74rem;
  color: var(--ivory-dim);
  letter-spacing: 0.22em;
}
.ch-title {
  font-size: clamp(1.9rem, 5vw, 3rem);
  margin: 1.6rem 0 0.2rem;
}
.ch-meta-line {
  color: var(--azurite);
  letter-spacing: 0.3em;
  font-size: 0.78rem;
}
.card-note {
  margin: 2.2rem 0;
  padding: 1.4rem 1.8rem;
  border-left: 2px solid var(--gold);
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.08), transparent 70%);
}
.card-note p {
  font-size: 0.95rem;
  color: var(--ivory);
}
.block-h {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 3rem 0 1.1rem;
}
.block-h h3 {
  font-size: 1.15rem;
}
.block-h small {
  color: var(--ivory-dim);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
}
.mural-zoom {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  cursor: zoom-in;
  aspect-ratio: 3/4;
  max-width: 460px;
}
.mural-zoom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.mural-zoom:hover img {
  transform: scale(1.05);
}
.mural-zoom .hint {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--gold-lo);
  background: #0e0b07bf;
  border: 1px solid var(--line-soft);
}
.vwrap {
  border: 1px solid var(--line-soft);
  background: #000;
  aspect-ratio: 16/9;
}
.vwrap video {
  width: 100%;
  height: 100%;
  display: block;
}
.term-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.term-card {
  border: 1px solid var(--line-soft);
  padding: 1.2rem 1.3rem;
  background: linear-gradient(165deg, var(--ink-2), var(--ink-3));
  transition: all 0.5s var(--ease);
}
.term-card:hover {
  border-color: var(--line);
  transform: translateY(-4px);
}
.term-card b {
  color: var(--gold-hi);
  letter-spacing: 0.1em;
}
.term-card i {
  display: block;
  font-style: normal;
  font-family: var(--latin);
  font-size: 0.66rem;
  color: var(--gold-deep);
  margin-bottom: 0.4rem;
}
.term-card p {
  font-size: 0.84rem;
  color: var(--ivory-dim);
  margin-top: 0.5rem;
}
.secs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.sec-card {
  position: relative;
  border: 1px solid var(--line-soft);
  padding: 1.6rem 1.3rem 1.2rem;
  background: linear-gradient(165deg, var(--ink-2), var(--ink-3));
  transition: all 0.5s var(--ease);
}
.sec-card:hover {
  border-color: var(--line);
  transform: translateY(-4px);
}
.sec-card i {
  font-family: var(--latin);
  font-style: normal;
  font-size: 1.7rem;
  color: var(--gold-deep);
}
.sec-card h4 {
  font-size: 1.02rem;
  color: var(--gold-hi);
  margin: 0.35rem 0 0.55rem;
  letter-spacing: 0.04em;
}
.sec-card p {
  font-size: 0.82rem;
  color: var(--ivory-dim);
}
.refbox {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}
.refcol {
  border: 1px solid var(--line-soft);
  padding: 1.2rem 1.4rem;
  background: var(--ink-2);
}
.refcol b {
  color: var(--gold);
  letter-spacing: 0.3em;
  font-size: 0.8rem;
}
.refcol p {
  font-size: 0.84rem;
  color: var(--ivory-dim);
  margin-top: 0.55rem;
}
@media (max-width: 1020px) {
  .secs,
  .refbox {
    grid-template-columns: 1fr;
  }
}
.ch-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.2rem;
  flex-wrap: wrap;
}
.zoom-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #080604f5;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.zoom-layer[hidden] {
  display: none;
}
.zoom-close {
  justify-self: end;
  margin: 1rem 1.2rem auto auto;
}
.zoom-stage {
  overflow: hidden;
  display: grid;
  place-items: center;
  cursor: grab;
  touch-action: none;
}
.zoom-stage img {
  transform-origin: center center;
  will-change: transform;
  max-width: none;
}
.zoom-tip {
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--ivory-dim);
  padding: 0.8rem;
}
.map-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}
.patrol {
  margin-bottom: 0.4rem;
}
.map-layout {
  display: grid;
  grid-template-columns: var(--panel-w) 1fr;
  gap: 1.6rem;
  height: min(72vh, 720px);
  min-height: 480px;
}
#map {
  border: 1px solid var(--line-soft);
  background: #0f0c08;
  position: relative;
  z-index: 2;
}
.node-panel {
  overflow-y: auto;
  padding-right: 0.3rem;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-deep) transparent;
}
.region-head {
  font-size: 0.7rem;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--gold);
  margin: 1.1rem 0 0.6rem;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 0.35rem;
}
.region-head:first-child {
  margin-top: 0;
}
.node-item {
  border: 1px solid var(--line-soft);
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.55rem;
  cursor: pointer;
  transition: all 0.4s var(--ease);
  background: linear-gradient(165deg, var(--ink-2), var(--ink-3));
}
.node-item:hover {
  border-color: var(--line);
  transform: translate(4px);
}
.node-item.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px #c9a22740;
}
.node-item .nm {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.node-item .nm b {
  font-size: 0.95rem;
}
.node-item .nm small {
  color: var(--ivory-dim);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  font-family: var(--latin);
}
.node-item .era {
  color: var(--azurite);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  margin: 0.15rem 0 0.3rem;
}
.node-item p {
  color: var(--ivory-dim);
  font-size: 0.76rem;
  line-height: 1.7;
}
.leaflet-container {
  font-family: var(--serif);
  background: #0f0c08;
}
.tiles-sat img {
  filter: brightness(0.48) contrast(1.05) saturate(0.68) sepia(0.28);
}
.tiles-lbl img {
  filter: brightness(0.92) saturate(0.85);
}
#map:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  background: radial-gradient(
      ellipse 75% 65% at 50% 45%,
      rgba(201, 162, 39, 0.06),
      transparent 60%
    ),
    radial-gradient(
      ellipse 120% 100% at 50% 50%,
      transparent 55%,
      rgba(10, 8, 5, 0.55) 100%
    );
}
.route-flow {
  animation: routeFlow 2.2s linear infinite;
}
@keyframes routeFlow {
  to {
    stroke-dashoffset: -32;
  }
}
.node-halo {
  animation: haloPulse 2.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes haloPulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  70%,
  to {
    transform: scale(2.1);
    opacity: 0;
  }
}
.leaflet-popup-content-wrapper {
  background: var(--ink-2);
  color: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 18px 50px #0009;
}
.leaflet-popup-content {
  margin: 1rem 1.2rem;
  line-height: 1.8;
  min-width: 200px;
}
.leaflet-popup-content b {
  color: var(--gold-hi);
  font-size: 1.02rem;
  letter-spacing: 0.1em;
}
.leaflet-popup-content a {
  display: inline-block;
  margin-top: 0.2rem;
}
.pop-era {
  color: var(--azurite);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  display: block;
  margin: 0.2rem 0 0.5rem;
}
.leaflet-popup-content p {
  color: var(--ivory-dim);
  font-size: 0.82rem;
  margin: 0 0 0.5rem;
}
.leaflet-popup-tip {
  background: var(--ink-2);
}
.city-label {
  color: var(--gold-hi);
  font-size: 12px;
  letter-spacing: 2px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  font-family: var(--serif);
  white-space: nowrap;
}
.dh-tip {
  background: transparent;
  border: none;
  box-shadow: none;
}
.leaflet-control-attribution {
  background: #0e0b07b3 !important;
  color: var(--ivory-dim) !important;
  font-size: 9px !important;
}
.leaflet-control-attribution a {
  color: var(--gold-deep) !important;
}
.legend {
  background: #171109eb;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-soft);
  padding: 0.7rem 0.9rem;
  font-size: 0.72rem;
  line-height: 1.9;
  color: var(--ivory-dim);
}
.legend .lg-title {
  color: var(--gold);
  letter-spacing: 0.3em;
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
}
.legend .lg-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
}
.patrol-toast {
  position: absolute;
  left: 50%;
  bottom: 3.4rem;
  transform: translate(-50%);
  z-index: 500;
  background: #171109f0;
  border: 1px solid var(--line);
  padding: 0.6rem 1.2rem;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--gold-lo);
  max-width: 78%;
}
.patrol-toast b {
  color: var(--gold-hi);
}
.cascade {
  columns: 3 300px;
  column-gap: 1.2rem;
}
.art {
  break-inside: avoid;
  margin-bottom: 1.2rem;
  cursor: pointer;
  perspective: 1400px;
  background: transparent;
  border: none;
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--serif);
  padding: 0;
}
.art-inner {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar, 4/5);
  transition: transform 1s var(--ease);
  transform-style: preserve-3d;
}
.art-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--line-soft);
  overflow: hidden;
  background: var(--ink-2);
}
.art-face.back {
  transform: rotateY(180deg);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-color: var(--line);
}
.art-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.art-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.2rem 1.1rem 0.9rem;
  background: linear-gradient(180deg, transparent, rgba(10, 8, 5, 0.9));
}
.art-cap b {
  display: block;
  font-size: 1rem;
  color: var(--ivory);
  letter-spacing: 0.08em;
}
.art-cap small {
  font-size: 0.68rem;
  color: var(--gold);
  letter-spacing: 0.22em;
}
.back .bk {
  font-family: var(--latin);
  color: var(--gold-deep);
  font-size: 0.66rem;
  letter-spacing: 0.34em;
}
.back h4 {
  color: var(--gold-hi);
  font-size: 1.1rem;
  line-height: 1.5;
}
.back .dyn {
  color: var(--azurite);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
}
.back p {
  color: var(--ivory-dim);
  font-size: 0.84rem;
}
.back .tp {
  margin-top: auto;
  font-size: 0.68rem;
  color: var(--gold);
  letter-spacing: 0.3em;
}
.art .tip {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  z-index: 2;
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  color: var(--gold-lo);
  background: #0e0b07b3;
  border: 1px solid var(--line-soft);
  padding: 0.12rem 0.55rem;
}
.stack {
  display: grid;
  gap: 0.9rem;
}
.doc {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 1.1rem;
  align-items: center;
  border: 1px solid var(--line-soft);
  padding: 1.1rem 1.4rem;
  background: linear-gradient(165deg, var(--ink-2), var(--ink-3));
  transition: all 0.45s var(--ease);
}
.doc:hover {
  border-color: var(--line);
}
.doc .ext {
  font-family: var(--latin);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--gold-lo);
  border: 1px solid var(--line);
  padding: 0.45rem 0.3rem;
  text-align: center;
  background: #c9a22714;
}
.doc b {
  font-weight: 600;
}
.doc .meta {
  display: block;
  font-size: 0.74rem;
  color: var(--ivory-dim);
  letter-spacing: 0.1em;
  margin-top: 0.15rem;
}
.doc .dl {
  border: 1px solid var(--line);
  color: var(--gold-hi);
  padding: 0.5rem 1.2rem;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
}
.doc .dl:hover {
  background: #c9a2271f;
}
.doc.pending {
  opacity: 0.62;
}
.doc.pending .dl {
  cursor: not-allowed;
  border-style: dashed;
  color: var(--ivory-dim);
  letter-spacing: 0.14em;
}
.pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 0.5rem;
  box-shadow: 0 0 #c9a22780;
  animation: pl 2s infinite;
}
@keyframes pl {
  70% {
    box-shadow: 0 0 0 9px #c9a22700;
  }
  to {
    box-shadow: 0 0 #c9a22700;
  }
}
@media (max-width: 1020px) {
  .ch-strip {
    grid-template-columns: 1fr 1fr;
  }
  .term-grid,
  .intro-grid {
    grid-template-columns: 1fr;
  }
  .ch-card {
    grid-template-columns: 44px 1fr;
  }
  .ch-card .ch-body,
  .ch-cover {
    grid-column: 2;
  }
}
@media (max-width: 900px) {
  .map-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  #map {
    min-height: 420px;
  }
  .node-panel {
    max-height: 300px;
  }
}
@media (max-width: 640px) {
  .ch-strip {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    padding-top: 9rem;
  }
  .trk small {
    display: none;
  }
  .doc {
    grid-template-columns: 2.4rem 1fr;
  }
  .doc .dl {
    grid-column: 1 / -1;
    text-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
