:root {
  --lm-ink: #f2e7ce;
  --lm-muted: #a8ad9f;
  --lm-gold: #cda56c;
  --lm-night: #10130f;
  --lm-panel: rgba(18, 23, 18, 0.84);
  --lm-line: rgba(232, 220, 191, 0.16);
  --lm-red: #b52e2a;
  --lm-blue: #315c87;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--lm-night);
  color: var(--lm-ink);
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.play-controls button:disabled {
  opacity: 0.42;
  cursor: wait;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(220, 181, 119, 0.82);
  outline-offset: 2px;
}

.lm-app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 34%, rgba(108, 118, 84, 0.16), transparent 46%),
    #0a0e0b;
}

.cesium-map,
.terrain-canvas,
.route-canvas,
.event-effects-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cesium-map {
  z-index: 0;
  background: #07100c;
}

.cesium-map[hidden] {
  display: none;
}

.cesium-map .cesium-viewer,
.cesium-map .cesium-viewer-cesiumWidgetContainer,
.cesium-map .cesium-widget,
.cesium-map canvas {
  width: 100%;
  height: 100%;
}

.cesium-map .cesium-widget-credits {
  right: 18px;
  bottom: 112px;
  max-width: min(52vw, 680px);
  color: rgba(245, 238, 221, 0.72);
  font: 9px/1.35 system-ui, sans-serif;
}

.lm-app.is-cesium .terrain-canvas,
.lm-app.is-cesium .route-canvas {
  display: none;
}

.terrain-canvas {
  cursor: grab;
}

.terrain-canvas:active {
  cursor: grabbing;
}

.route-canvas {
  pointer-events: none;
}

.event-effects-canvas {
  z-index: 9;
  pointer-events: none;
}

.map-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 9, 7, 0.2), rgba(38, 48, 39, 0.08) 13%, transparent 25%, transparent 68%, rgba(4, 7, 5, 0.72)),
    radial-gradient(ellipse at center, transparent 40%, rgba(3, 6, 4, 0.55) 100%);
}

.lm-app.is-cesium .map-atmosphere {
  background:
    linear-gradient(180deg, rgba(4, 9, 7, 0.24), transparent 19%, transparent 74%, rgba(4, 7, 5, 0.34)),
    radial-gradient(ellipse at center, transparent 64%, rgba(3, 6, 4, 0.2) 100%);
}

.grain {
  position: absolute;
  inset: -50%;
  pointer-events: none;
  opacity: 0.08;
  background-image: repeating-radial-gradient(circle at 10% 20%, #fff 0 0.5px, transparent 0.5px 4px);
  transform: rotate(6deg);
}

.lm-app.is-cesium .grain {
  opacity: 0.025;
}

.topbar {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  min-height: 88px;
  padding: 18px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(180deg, rgba(7, 10, 8, 0.86), rgba(7, 10, 8, 0));
}

.brand-block {
  display: flex;
  align-items: stretch;
  gap: 13px;
}

.brand-mark {
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(#d65b42, #781d22);
  box-shadow: 0 0 20px rgba(213, 61, 47, 0.45);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--lm-gold);
  font: 600 10px/1.2 system-ui, sans-serif;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.brand-block h1 {
  margin: 0;
  font-size: clamp(21px, 2.2vw, 32px);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 18px #000;
}

.brand-subline {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--lm-muted);
  font: 12px/1.2 system-ui, sans-serif;
}

.data-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(205, 165, 108, 0.3);
  border-radius: 999px;
  color: #dbc39e;
  background: rgba(30, 31, 24, 0.55);
}

.data-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d8a45d;
  box-shadow: 0 0 8px #d8a45d;
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--lm-line);
  border-radius: 14px;
  background: rgba(10, 14, 11, 0.62);
  backdrop-filter: blur(14px);
}

.view-button {
  min-width: 58px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  color: #b9bbaa;
  background: transparent;
  font: 12px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: 180ms ease;
}

.view-button:hover,
.view-button.is-active {
  color: #fff4dc;
  background: rgba(178, 55, 43, 0.28);
}

.view-divider {
  width: 1px;
  height: 20px;
  margin: 0 2px;
  background: var(--lm-line);
}

.utility-button {
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  color: #b9bbaa;
  background: transparent;
  font: 12px/1 system-ui, sans-serif;
  cursor: pointer;
}

.utility-button:hover,
.utility-button.is-active {
  color: #fff4dc;
  background: rgba(205, 165, 108, 0.16);
}

.utility-button.is-active::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--lm-gold);
  box-shadow: 0 0 8px var(--lm-gold);
  vertical-align: 1px;
}

.left-panel {
  position: absolute;
  z-index: 8;
  top: 112px;
  left: 22px;
  width: min(300px, calc(100vw - 44px));
  max-height: calc(100vh - 256px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--lm-line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(23, 29, 23, 0.9), rgba(11, 15, 12, 0.78));
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.panel-heading {
  padding: 17px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.panel-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.panel-heading span {
  color: #888f81;
  font: 10px/1 system-ui, sans-serif;
}

.formation-list {
  padding: 7px 10px 10px;
  display: grid;
  gap: 2px;
}

.formation-toggle {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 160ms ease;
}

.formation-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
}

.formation-toggle input {
  position: absolute;
  opacity: 0;
}

.formation-swatch {
  width: 16px;
  height: 6px;
  border-radius: 99px;
  box-shadow: 0 0 11px currentColor;
}

.formation-name {
  color: #e6ddc7;
  font-size: 13px;
}

.formation-status {
  color: #81887b;
  font: 10px/1 system-ui, sans-serif;
}

.formation-toggle:has(input:not(:checked)) {
  opacity: 0.36;
}

.formation-toggle:has(input:not(:checked)) .formation-swatch {
  box-shadow: none;
}

.chapter-section {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.section-label {
  padding: 13px 18px 8px;
  color: var(--lm-gold);
  font: 600 10px/1 system-ui, sans-serif;
  letter-spacing: 0.16em;
}

.chapter-list {
  min-height: 0;
  padding: 0 8px 12px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #485044 transparent;
}

.chapter-button {
  width: 100%;
  padding: 10px;
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  color: #aeb2a5;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.chapter-button:hover,
.chapter-button.is-active {
  color: #f5ead1;
  background: rgba(163, 60, 44, 0.18);
}

.chapter-number {
  color: #72796f;
  font: 10px/1.5 ui-monospace, monospace;
}

.chapter-copy strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}

.chapter-copy small {
  display: block;
  margin-top: 4px;
  color: #747c71;
  font: 10px/1.3 system-ui, sans-serif;
}

.narrative-card {
  position: absolute;
  z-index: 8;
  right: 22px;
  top: 132px;
  width: min(320px, calc(100vw - 44px));
  padding: 18px;
  border: 1px solid var(--lm-line);
  border-radius: 18px;
  background: var(--lm-panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.literary-map-card {
  position: absolute;
  z-index: 9;
  right: clamp(20px, 4vw, 68px);
  bottom: 172px;
  width: min(280px, calc(100vw - 40px));
  padding: 13px 15px;
  border: 1px solid rgba(211, 174, 113, 0.42);
  border-radius: 12px;
  text-align: left;
  color: #eee2c8;
  background: linear-gradient(135deg, rgba(29, 26, 18, 0.9), rgba(17, 23, 18, 0.78));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
  cursor: pointer;
  animation: literary-card-in 700ms ease both;
}

.literary-map-card[hidden] {
  display: none;
}

.literary-map-card span,
.literary-map-card small {
  display: block;
  color: #b9a47e;
  font: 10px/1.4 system-ui, sans-serif;
}

.literary-map-card strong {
  display: block;
  margin: 5px 0;
  font-size: 18px;
  font-weight: 500;
}

@keyframes literary-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.event-type {
  color: var(--lm-gold);
  font: 600 10px/1 system-ui, sans-serif;
  letter-spacing: 0.14em;
}

.narrative-card h2 {
  margin: 10px 0 8px;
  font-size: 25px;
  font-weight: 500;
}

.narrative-card p {
  margin: 0;
  color: #b7b9ae;
  font: 13px/1.65 system-ui, sans-serif;
}

.narrative-card .event-place {
  margin-top: 10px;
  color: #d0b98e;
  font-size: 11px;
}

.event-meta {
  margin-top: 14px;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #82887e;
  font: 10px/1.3 system-ui, sans-serif;
}

.event-jump {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(205, 165, 108, 0.28);
  border-radius: 10px;
  color: #dbc7a5;
  background: rgba(116, 57, 38, 0.18);
  cursor: pointer;
}

.event-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.event-jump:hover {
  background: rgba(151, 64, 43, 0.28);
}

.map-legend {
  position: absolute;
  z-index: 7;
  right: 24px;
  bottom: 126px;
  display: flex;
  gap: 14px;
  padding: 8px 11px;
  border-radius: 11px;
  background: rgba(8, 11, 9, 0.62);
  color: #9da297;
  font: 10px/1 system-ui, sans-serif;
  backdrop-filter: blur(10px);
}

.overview-legend {
  display: none;
}

.overview-mode .overview-legend {
  display: flex;
}

.legend-line-ghost {
  opacity: 0.5;
  background: repeating-linear-gradient(90deg, #d9c59f 0 6px, transparent 6px 10px);
  box-shadow: none;
}

.map-source-note {
  position: absolute;
  z-index: 7;
  right: 24px;
  bottom: 157px;
  max-width: 330px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  color: #8f978a;
  background: rgba(8, 11, 9, 0.62);
  backdrop-filter: blur(10px);
  font: 9px/1.35 system-ui, sans-serif;
}

.map-source-note.is-loaded::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: #8eaa78;
  box-shadow: 0 0 7px #8eaa78;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-line {
  width: 22px;
  height: 5px;
  border-radius: 99px;
  background: var(--legend-color);
  box-shadow: 0 0 8px var(--legend-color);
}

.timeline-dock {
  position: absolute;
  z-index: 11;
  left: 22px;
  right: 22px;
  bottom: 20px;
  min-height: 88px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--lm-line);
  border-radius: 18px;
  background: rgba(12, 16, 13, 0.9);
  backdrop-filter: blur(20px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

.play-controls {
  display: flex;
  align-items: center;
  gap: 9px;
}

.play-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(219, 183, 127, 0.28);
  border-radius: 50%;
  background: linear-gradient(145deg, #a52e29, #6f1e23);
  cursor: pointer;
  box-shadow: 0 0 25px rgba(178, 42, 37, 0.25);
}

.speed-button,
.poem-demo-button,
.work-demo-button {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  color: #aaa99f;
  background: rgba(255, 255, 255, 0.035);
  font: 11px/1 system-ui, sans-serif;
  cursor: pointer;
}

.timeline-main {
  display: grid;
  gap: 7px;
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.current-date {
  font-size: 19px;
  letter-spacing: 0.05em;
}

.current-chapter {
  color: #93998d;
  font: 11px/1 system-ui, sans-serif;
}

.timeline-range {
  width: 100%;
  height: 16px;
  margin: 0;
  accent-color: var(--lm-red);
  cursor: pointer;
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  color: #626a60;
  font: 9px/1 ui-monospace, monospace;
}

.timeline-status {
  min-width: 150px;
  text-align: right;
}

.timeline-status strong {
  display: block;
  color: #d8c7a6;
  font-size: 13px;
  font-weight: 500;
}

.timeline-status span {
  display: block;
  margin-top: 4px;
  color: #747b70;
  font: 10px/1.2 system-ui, sans-serif;
}

.poem-overlay {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(300px, 1.3fr);
  align-items: center;
  padding: 8vw;
  background:
    radial-gradient(circle at 68% 46%, rgba(36, 26, 18, 0.16), transparent 40%),
    rgba(8, 9, 7, 0.44);
  backdrop-filter: blur(2px) saturate(0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.poem-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.mao-portrait {
  justify-self: end;
  align-self: end;
  width: clamp(100px, 14vw, 190px);
  aspect-ratio: 0.72;
  position: relative;
  opacity: 0.78;
  filter: sepia(0.65);
}

.mao-portrait::before {
  content: "";
  position: absolute;
  left: 24%;
  top: 4%;
  width: 52%;
  height: 31%;
  border-radius: 52% 48% 46% 54%;
  background: #c1a67c;
  box-shadow: 0 0 0 5px rgba(56, 43, 30, 0.55);
}

.mao-portrait::after {
  content: "";
  position: absolute;
  left: 9%;
  bottom: 0;
  width: 82%;
  height: 66%;
  border-radius: 47% 53% 12% 12%;
  background: linear-gradient(145deg, #767a5f, #343a2e 70%);
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}

.poem-content {
  padding-left: 7vw;
  border-left: 1px solid rgba(224, 205, 168, 0.25);
}

.poem-kicker {
  color: var(--lm-gold);
  font: 11px/1 system-ui, sans-serif;
  letter-spacing: 0.25em;
}

.poem-title {
  margin: 14px 0 18px;
  font-size: clamp(32px, 5vw, 72px);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-shadow: 0 3px 28px #000;
}

.poem-lines {
  min-height: 80px;
  color: #ede0c6;
  font-size: clamp(18px, 2.5vw, 34px);
  line-height: 1.8;
  letter-spacing: 0.18em;
}

.poem-lines span {
  display: block;
  opacity: 0;
  filter: blur(5px);
  transform: translateX(-10px);
}

.poem-overlay.is-visible .poem-lines span {
  animation: ink-in 1.5s 0.5s forwards;
}

.poem-note {
  max-width: 640px;
  color: #aaa99e;
  font: 12px/1.6 system-ui, sans-serif;
}

.poem-continue {
  margin-top: 24px;
  padding: 10px 20px;
  border: 1px solid rgba(222, 193, 143, 0.38);
  border-radius: 999px;
  color: #f0dfc1;
  background: rgba(61, 39, 26, 0.34);
  cursor: pointer;
}

.archive-scrim {
  position: absolute;
  z-index: 23;
  inset: 0;
  background: rgba(3, 6, 4, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.archive-scrim.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.archive-drawer {
  position: absolute;
  z-index: 24;
  top: 14px;
  right: 14px;
  bottom: 14px;
  width: min(460px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(225, 209, 177, 0.2);
  border-radius: 20px;
  background: rgba(13, 18, 14, 0.96);
  box-shadow: -18px 0 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 24px));
  transition: transform 280ms ease, opacity 240ms ease;
}

.archive-drawer.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.archive-header {
  padding: 18px 18px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--lm-line);
}

.archive-kicker {
  color: var(--lm-gold);
  font: 600 9px/1 system-ui, sans-serif;
  letter-spacing: 0.18em;
}

.archive-header h2 {
  margin: 7px 0 0;
  font-size: 24px;
  font-weight: 500;
}

.archive-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--lm-line);
  border-radius: 50%;
  color: #c8c5ba;
  background: rgba(255, 255, 255, 0.04);
  font: 22px/1 system-ui, sans-serif;
  cursor: pointer;
}

.archive-filters {
  padding: 13px 18px;
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 9px;
  border-bottom: 1px solid var(--lm-line);
}

.archive-filters label {
  display: grid;
  gap: 5px;
  color: #8d9588;
  font: 9px/1 system-ui, sans-serif;
}

.archive-filters input,
.archive-filters select {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  outline: none;
  color: #eee4cf;
  background: #171e18;
  font: 12px/1 system-ui, sans-serif;
}

.archive-filters input:focus,
.archive-filters select:focus {
  border-color: rgba(205, 165, 108, 0.56);
}

.archive-notice {
  padding: 10px 18px;
  color: #c6ad82;
  background: rgba(128, 83, 37, 0.14);
  font: 10px/1.5 system-ui, sans-serif;
}

.archive-detail,
.archive-list {
  scrollbar-width: thin;
  scrollbar-color: #485044 transparent;
}

.archive-detail {
  max-height: 52%;
  overflow: auto;
  border-bottom: 1px solid var(--lm-line);
}

.event-record {
  padding: 17px 18px 20px;
}

.record-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.record-heading span {
  color: #8c9487;
  font: 10px/1 system-ui, sans-serif;
}

.record-heading h3 {
  margin: 6px 0 0;
  font-size: 21px;
  font-weight: 500;
}

.record-heading button {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid rgba(205, 165, 108, 0.28);
  border-radius: 8px;
  color: #d7bf99;
  background: rgba(122, 67, 39, 0.18);
  font: 10px/1 system-ui, sans-serif;
  cursor: pointer;
}

.record-badges {
  margin: 13px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.record-badges span {
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: #aeb3a7;
  background: rgba(255, 255, 255, 0.035);
  font: 9px/1 system-ui, sans-serif;
}

.record-badges .review-disputed,
.record-badges .review-draft {
  color: #e0b282;
  border-color: rgba(215, 148, 77, 0.28);
}

.event-record > p,
.record-result p {
  margin: 0;
  color: #b7bcb0;
  font: 12px/1.65 system-ui, sans-serif;
}

.record-result,
.archive-place {
  margin-top: 13px;
  padding: 11px 12px;
  border-left: 2px solid rgba(205, 165, 108, 0.42);
  background: rgba(255, 255, 255, 0.025);
}

.record-result > span,
.archive-place > span {
  display: block;
  margin-bottom: 6px;
  color: #8f9689;
  font: 9px/1 system-ui, sans-serif;
}

.archive-place strong,
.archive-place small {
  display: block;
}

.archive-place strong {
  color: #e5dbc5;
  font-size: 13px;
}

.archive-place small {
  margin-top: 5px;
  color: #8f9689;
  font: 10px/1.45 system-ui, sans-serif;
}

.record-relations {
  margin: 13px 0 0;
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 8px;
}

.record-relations div {
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.025);
}

.record-relations dt {
  color: #81887c;
  font: 9px/1 system-ui, sans-serif;
}

.record-relations dd {
  margin: 5px 0 0;
  color: #d0c7b4;
  font: 11px/1.3 system-ui, sans-serif;
}

.record-sources > h4 {
  margin: 17px 0 8px;
  color: #d9c49d;
  font-size: 12px;
  font-weight: 500;
}

.source-card {
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.source-card > span {
  color: #8d9588;
  font: 9px/1 system-ui, sans-serif;
}

.source-card h4 {
  margin: 6px 0;
  color: #ded4bf;
  font-size: 12px;
  font-weight: 500;
}

.source-card p {
  margin: 0;
  color: #989e93;
  font: 10px/1.5 system-ui, sans-serif;
}

.source-card footer {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #747c71;
  font: 9px/1 system-ui, sans-serif;
}

.source-card a {
  color: #cfb080;
  text-decoration: none;
}

.archive-list-heading {
  padding: 12px 18px 8px;
  display: flex;
  justify-content: space-between;
  color: #989e93;
  font: 10px/1 system-ui, sans-serif;
}

.archive-list {
  min-height: 110px;
  padding: 0 9px 14px;
  display: grid;
  align-content: start;
  gap: 3px;
  overflow: auto;
}

.archive-event {
  width: 100%;
  padding: 10px;
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 5px 9px;
  border: 0;
  border-radius: 9px;
  color: #acb1a5;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.archive-event:hover,
.archive-event.is-active {
  color: #f0e4cc;
  background: rgba(152, 60, 42, 0.15);
}

.archive-event-date {
  grid-row: 1 / span 2;
  color: #7d8579;
  font: 9px/1.4 system-ui, sans-serif;
}

.archive-event strong {
  font-size: 12px;
  font-weight: 500;
}

.archive-event small {
  color: #7d8579;
  font: 9px/1.3 system-ui, sans-serif;
}

.archive-empty {
  margin: 0;
  padding: 18px;
  color: #858c80;
  font: 11px/1.5 system-ui, sans-serif;
}

.offline-banner,
.webgl-banner {
  position: absolute;
  z-index: 20;
  top: 95px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 13px;
  border-radius: 999px;
  color: #d9c8aa;
  background: rgba(69, 49, 29, 0.86);
  font: 11px/1 system-ui, sans-serif;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

.is-hidden {
  display: none !important;
}

@keyframes ink-in {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
  }
}


@media (max-width: 980px) {
  .left-panel {
    width: 250px;
  }

  .narrative-card {
    width: 270px;
  }

  .timeline-dock {
    grid-template-columns: auto 1fr;
  }

  .timeline-status {
    display: none;
  }

  .view-button {
    min-width: auto;
  }

  .utility-button {
    padding-inline: 7px;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 14px;
  }

  .brand-subline,
  .left-panel,
  .narrative-card,
  .map-legend,
  .map-source-note {
    display: none;
  }

  .view-controls {
    position: absolute;
    top: 78px;
    right: 14px;
  }

  .view-button:nth-child(2) {
    display: none;
  }

  .view-button:first-child,
  .view-divider {
    display: none;
  }

  .utility-button,
  .view-button {
    padding: 7px;
    font-size: 11px;
  }

  .timeline-dock {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 11px;
    gap: 10px;
  }

  .poem-demo-button,
  .work-demo-button {
    display: none;
  }

  .poem-overlay {
    grid-template-columns: 1fr;
    padding: 12vw 8vw;
  }

  .mao-portrait {
    display: none;
  }

  .poem-content {
    padding-left: 0;
    border-left: 0;
  }

  .archive-drawer {
    top: 6px;
    right: 6px;
    bottom: 6px;
    width: calc(100vw - 12px);
    border-radius: 15px;
  }

  .archive-detail {
    max-height: 48%;
  }

  .archive-filters {
    grid-template-columns: minmax(0, 1fr) 112px;
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Guided cinematic experience */
.guided-experience .terrain-canvas {
  cursor: grab;
}

.mission-header {
  position: absolute;
  z-index: 12;
  top: 20px;
  left: 22px;
  display: flex;
  align-items: flex-start;
  gap: 26px;
  pointer-events: none;
  text-shadow: 0 2px 18px #000;
}

.mission-brand {
  display: flex;
  gap: 12px;
}

.mission-brand i {
  width: 3px;
  min-height: 54px;
  border-radius: 99px;
  background: linear-gradient(#df6248, #7b2021);
  box-shadow: 0 0 18px rgba(214, 66, 49, 0.55);
}

.mission-brand p,
.chapter-readout span {
  margin: 0 0 5px;
  color: #c9a66f;
  font: 600 9px/1.2 system-ui, sans-serif;
  letter-spacing: 0.22em;
}

.mission-brand h1 {
  margin: 0;
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.chapter-readout {
  margin-top: 5px;
  padding-left: 24px;
  border-left: 1px solid rgba(238, 222, 190, 0.2);
}

.chapter-readout span,
.chapter-readout strong {
  display: block;
}

.chapter-readout strong {
  max-width: 240px;
  color: rgba(240, 229, 207, 0.82);
  font-size: 13px;
  font-weight: 500;
}

.compass-ribbon {
  position: absolute;
  z-index: 12;
  top: 19px;
  left: 50%;
  width: min(430px, 36vw);
  min-width: 300px;
  padding: 8px 14px 7px;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  color: rgba(221, 215, 198, 0.5);
  border-top: 1px solid rgba(238, 225, 197, 0.2);
  border-bottom: 1px solid rgba(238, 225, 197, 0.12);
  background: linear-gradient(90deg, transparent, rgba(8, 13, 10, 0.62) 18%, rgba(8, 13, 10, 0.62) 82%, transparent);
  font: 9px/1 ui-monospace, monospace;
  transform: translateX(-50%);
  pointer-events: none;
}

.compass-ribbon i {
  height: 1px;
  background: rgba(224, 214, 192, 0.16);
}

.compass-ribbon strong {
  color: #edddbd;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.formation-actor {
  position: absolute;
  z-index: 11;
  top: 0;
  left: 0;
  opacity: 0;
  transform: translate3d(-200px, -200px, 0);
  transition: opacity 240ms ease;
  pointer-events: none;
}

.formation-actor.is-visible {
  opacity: 1;
}

.formation-actor-graphic {
  position: absolute;
  left: 0;
  bottom: -4px;
  width: var(--formation-actor-width, 112px);
  height: var(--formation-actor-height, 104px);
  transform: translateX(-50%);
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.72));
  transform-origin: 50% 100%;
}

.formation-actor-graphic img,
.formation-actor-graphic svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.formation-actor.is-marching .formation-actor-graphic {
  animation: formation-bob var(--formation-walk-cycle, .78s) ease-in-out infinite;
}

.formation-actor.is-marching .flag-cloth {
  transform-box: fill-box;
  transform-origin: 0 50%;
  animation: flag-wave calc(var(--formation-walk-cycle, .78s) * 1.35) ease-in-out infinite;
}

.formation-actor.is-marching .leg-left,
.formation-actor.is-marching .leg-right {
  transform-box: fill-box;
  transform-origin: 50% 0;
  animation: march-leg var(--formation-walk-cycle, .78s) ease-in-out infinite alternate;
}

.formation-actor.is-marching .leg-right {
  animation-direction: alternate-reverse;
}

.formation-actor > span {
  position: absolute;
  top: var(--formation-label-offset, 15px);
  left: 50%;
  width: max-content;
  padding: 4px 7px;
  border-radius: 5px;
  color: rgba(239, 222, 190, 0.78);
  background: rgba(8, 13, 10, 0.58);
  font: 9px/1 system-ui, sans-serif;
  letter-spacing: 0.08em;
  transform: translateX(-50%);
}

@keyframes formation-bob {
  50% { transform: translateX(-50%) translateY(-3px); }
}

@keyframes flag-wave {
  50% { transform: skewY(-4deg) scaleX(.96); }
}

@keyframes march-leg {
  from { transform: rotate(-9deg); }
  to { transform: rotate(9deg); }
}

.strategy-inset {
  position: absolute;
  z-index: 12;
  top: 22px;
  right: 22px;
  width: min(270px, 27vw);
  overflow: hidden;
  border: 1px solid rgba(229, 213, 183, 0.18);
  border-radius: 13px;
  background: rgba(8, 14, 11, 0.76);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.inset-heading,
.inset-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 9px/1.2 system-ui, sans-serif;
}

.inset-heading {
  padding: 10px 12px 8px;
  color: #9b9f95;
}

.inset-heading strong {
  color: #dcc8a3;
  font-weight: 500;
}

#strategy-minimap {
  width: 100%;
  aspect-ratio: 1.7;
  display: block;
  border-block: 1px solid rgba(255, 255, 255, 0.07);
}

.inset-footer {
  justify-content: flex-start;
  padding: 7px 10px 8px;
  color: #8b9188;
}

.inset-footer span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.inset-footer i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.red-dot { background: #cf4a3d; box-shadow: 0 0 6px #cf4a3d; }
.blue-dot { background: #5482a8; box-shadow: 0 0 6px #5482a8; }

.inset-footer em {
  margin-left: auto;
  color: #6f766e;
  font-style: normal;
}

.narrative-subtitle {
  position: absolute;
  z-index: 12;
  right: 25px;
  bottom: 158px;
  width: min(440px, 38vw);
  padding: 16px 18px 15px;
  border-left: 2px solid rgba(202, 70, 53, 0.78);
  background: linear-gradient(90deg, rgba(9, 14, 11, 0.85), rgba(9, 14, 11, 0.52) 74%, transparent);
  text-shadow: 0 2px 14px #000;
  pointer-events: none;
}

.event-heading {
  display: flex;
  gap: 10px;
  color: #b9a478;
  font: 9px/1 system-ui, sans-serif;
  letter-spacing: 0.08em;
}

.narrative-subtitle h2 {
  margin: 8px 0 6px;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: 0.06em;
}

.narrative-subtitle p {
  margin: 0;
  color: rgba(226, 220, 207, 0.76);
  font: 12px/1.65 system-ui, sans-serif;
}

.narrative-subtitle .event-place {
  margin-top: 7px;
  color: #cdb587;
  font-size: 10px;
}

.guided-experience .literary-map-card {
  right: 28px;
  bottom: 330px;
  cursor: default;
  pointer-events: none;
}

.guided-experience .map-source-note {
  right: auto;
  left: 22px;
  bottom: 132px;
  max-width: 520px;
  border: 0;
  color: rgba(219, 214, 199, 0.54);
  background: rgba(7, 11, 9, 0.35);
}

.guided-experience .map-legend {
  right: auto;
  left: 22px;
  bottom: 160px;
  background: rgba(7, 11, 9, 0.44);
}

.guided-timeline {
  z-index: 40;
  left: 50%;
  right: auto;
  bottom: 18px;
  width: min(1040px, calc(100vw - 44px));
  min-height: 94px;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  padding: 12px 16px;
  border-color: rgba(226, 210, 180, 0.2);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(14, 20, 16, 0.9), rgba(9, 14, 11, 0.94));
  transform: translateX(-50%);
}

.guided-timeline .play-controls {
  min-width: 255px;
}

.guided-timeline .speed-button,
.guided-timeline .poem-button {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #bcb9ad;
  background: rgba(255, 255, 255, 0.035);
  font: 11px/1 system-ui, sans-serif;
  cursor: pointer;
}

.guided-timeline .poem-button {
  min-width: 96px;
}

.guided-timeline .poem-button.is-lit {
  color: #efdcb7;
  border-color: rgba(215, 176, 110, 0.4);
  background: rgba(124, 77, 38, 0.25);
  box-shadow: 0 0 18px rgba(206, 153, 77, 0.12);
}

.guided-timeline .poem-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.timeline-progress {
  position: relative;
  width: 100%;
  height: 12px;
  overflow: visible;
  border-block: 5px solid transparent;
  background: rgba(220, 213, 193, 0.16);
  background-clip: content-box;
  pointer-events: none;
}

.timeline-progress span {
  position: absolute;
  top: 5px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #772124, #d35240);
  box-shadow: 0 0 10px rgba(213, 68, 50, 0.7);
}

.timeline-progress i {
  position: absolute;
  top: 1px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border: 2px solid #efcf9e;
  border-radius: 50%;
  background: #9d302a;
  box-shadow: 0 0 12px rgba(220, 92, 63, 0.8);
}

.guided-poem {
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  padding: 7vw max(5vw, 50px) 150px 38vw;
  background: linear-gradient(90deg, rgba(5, 8, 6, 0.06) 0%, rgba(7, 10, 8, 0.28) 36%, rgba(9, 10, 8, 0.9) 72%, rgba(9, 10, 8, 0.96));
  backdrop-filter: saturate(0.68) brightness(0.82);
  pointer-events: none;
}

.guided-poem .poem-content {
  width: min(720px, 50vw);
  align-self: center;
  padding-left: clamp(24px, 4vw, 64px);
  border-left: 1px solid rgba(224, 205, 168, 0.3);
}

.guided-poem .poem-title {
  font-size: clamp(34px, 4.4vw, 66px);
}

.guided-poem .poem-lines {
  font-size: clamp(17px, 2vw, 29px);
  line-height: 1.9;
}

.poem-place {
  margin: -8px 0 18px;
  color: #bda77c;
  font: 10px/1.5 system-ui, sans-serif;
}

.poem-hint {
  margin-top: 16px;
  color: rgba(219, 207, 183, 0.48);
  font: 10px/1.4 system-ui, sans-serif;
}

@media (max-width: 900px) {
  .chapter-readout,
  .compass-ribbon {
    display: none;
  }

  .strategy-inset {
    width: 220px;
  }

  .guided-timeline {
    grid-template-columns: auto minmax(190px, 1fr);
  }

  .guided-timeline .timeline-status {
    display: none;
  }

  .narrative-subtitle {
    width: min(390px, 54vw);
  }
}

/* North-up staff-map and calligraphy experience */
.poem-index {
  position: absolute;
  z-index: 100;
  top: 92px;
  right: 24px;
  bottom: 126px;
  width: min(390px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(220, 199, 158, 0.24);
  border-radius: 8px 8px 2px 8px;
  background: linear-gradient(145deg, rgba(16, 22, 17, 0.94), rgba(7, 12, 9, 0.88));
  box-shadow: -18px 24px 70px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px) saturate(0.75);
  opacity: 0;
  pointer-events: none;
  transform: translateX(32px);
  transition: opacity 240ms ease, transform 320ms cubic-bezier(.2,.8,.2,1);
}

.guided-experience.poem-index-open .cesium-map,
.guided-experience.poem-index-open .cesium-map *,
.guided-experience.poem-index-open .terrain-canvas {
  pointer-events: none !important;
}

.poem-index.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.poem-index-head {
  padding: 20px 20px 15px;
  border-bottom: 1px solid rgba(221, 202, 165, 0.16);
}

.poem-index-head div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.poem-index-head span,
.poem-index-head em {
  color: #a88d62;
  font: 10px/1.4 system-ui, sans-serif;
  letter-spacing: .12em;
}

.poem-index-head h2 {
  margin: 0;
  color: #eadcc0;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: .12em;
}

.poem-index-head em {
  display: block;
  margin-top: 9px;
  color: #777e72;
  font-style: normal;
  letter-spacing: .04em;
}

.poem-index-list {
  flex: 1;
  overflow: auto;
  padding: 8px 10px;
}

.poem-index-item {
  width: 100%;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 5px 12px;
  padding: 12px 10px;
  border: 0;
  border-bottom: 1px solid rgba(221, 202, 165, 0.1);
  color: #dcd3bf;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.poem-index-item:hover,
.poem-index-item:focus-visible {
  background: linear-gradient(90deg, rgba(164, 49, 39, 0.2), rgba(164, 49, 39, 0.02));
  outline: none;
}

.poem-index-item span {
  grid-row: 1 / 3;
  color: #9d8058;
  font: 9px/1.6 ui-monospace, monospace;
}

.poem-index-item strong {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .07em;
}

.poem-index-item em {
  color: #747c71;
  font: normal 10px/1.4 system-ui, sans-serif;
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px 8px;
  border-top: 1px solid rgba(221, 202, 165, 0.14);
  color: #9a9f93;
  font: 10px/1.4 system-ui, sans-serif;
}

.music-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-controls input[type="range"] {
  width: 104px;
  accent-color: #a83b32;
}

.music-credit {
  min-height: 30px;
  margin: 0;
  padding: 0 18px 12px;
  color: #656d63;
  font: 9px/1.45 system-ui, sans-serif;
}

.guided-poem,
.guided-poem.is-visible {
  z-index: 26;
  display: block;
  padding: 0;
  background: linear-gradient(90deg, transparent 20%, rgba(7, 9, 7, 0.05) 46%, rgba(7, 9, 7, 0.52) 100%);
  backdrop-filter: none;
  pointer-events: none;
}

.poem-calligraphy {
  position: absolute;
  top: 13vh;
  right: clamp(28px, 6vw, 110px);
  bottom: 150px;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: clamp(16px, 2.5vw, 44px);
  color: #eee2c9;
  text-shadow: 0 3px 18px #000, 0 0 2px rgba(247, 226, 188, .6);
}

.guided-poem .poem-title {
  width: 1.5em;
  margin: 8px 0 0;
  writing-mode: vertical-rl;
  font-family: STKaiti, KaiTi, "Songti SC", serif;
  font-size: clamp(26px, 3.2vw, 50px);
  font-weight: 600;
  letter-spacing: .18em;
  opacity: 0;
  transform: translateX(30px);
}

.guided-poem .poem-lines {
  height: min(62vh, 620px);
  min-height: 0;
  writing-mode: vertical-rl;
  font-family: STKaiti, KaiTi, "Songti SC", serif;
  font-size: clamp(20px, 2.35vw, 36px);
  line-height: 1.75;
  letter-spacing: .12em;
}

.guided-poem .poem-lines span {
  display: block;
  opacity: 0;
  filter: blur(7px);
  transform: translateX(42px);
}

.guided-poem.is-visible .poem-title,
.guided-poem.is-visible .poem-lines span {
  animation: calligraphy-reveal 1.7s cubic-bezier(.16,.72,.18,1) forwards;
}

.guided-poem.is-visible .poem-lines span:nth-child(1) { animation-delay: .45s; }
.guided-poem.is-visible .poem-lines span:nth-child(2) { animation-delay: .9s; }
.guided-poem.is-visible .poem-lines span:nth-child(3) { animation-delay: 1.35s; }
.guided-poem.is-visible .poem-lines span:nth-child(4) { animation-delay: 1.8s; }
.guided-poem.is-visible .poem-lines span:nth-child(5) { animation-delay: 2.25s; }
.guided-poem.is-visible .poem-lines span:nth-child(6) { animation-delay: 2.7s; }
.guided-poem.is-visible .poem-lines span:nth-child(7) { animation-delay: 3.15s; }
.guided-poem.is-visible .poem-lines span:nth-child(8) { animation-delay: 3.6s; }

.guided-poem .poem-kicker,
.guided-poem .poem-place {
  position: absolute;
  right: 0;
  color: rgba(214, 190, 148, 0.72);
  font: 10px/1.5 system-ui, sans-serif;
  writing-mode: horizontal-tb;
  white-space: nowrap;
}

.guided-poem .poem-kicker { top: -26px; letter-spacing: .18em; }
.guided-poem .poem-place { bottom: 0; margin: 0; }

.poem-brush {
  position: absolute;
  right: 4vw;
  top: 8vh;
  width: 56vw;
  height: 72vh;
  opacity: .13;
  background: radial-gradient(ellipse at 70% 40%, #a4875d 0, transparent 58%);
  filter: blur(22px);
}

.poem-accessible {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.guided-experience .narrative-subtitle,
.guided-experience .strategy-inset {
  transition: opacity 500ms ease, transform 500ms ease;
}

.guided-experience.poem-active .narrative-subtitle,
.guided-experience.poem-active .strategy-inset {
  opacity: 0;
  pointer-events: none;
}

.guided-experience.poem-active .formation-actor {
  opacity: .28;
}

.guided-experience.poem-active .narrative-subtitle { transform: translateX(24px); }

@keyframes calligraphy-reveal {
  0% { opacity: 0; filter: blur(8px); transform: translateX(42px); mask-image: linear-gradient(to bottom, transparent, #000 20%); }
  55% { opacity: .65; filter: blur(2px); }
  100% { opacity: .96; filter: blur(0); transform: translateX(0); mask-image: none; }
}

.is-cesium .cesium-map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(235, 213, 166, .055), transparent 38%, rgba(3, 12, 10, .2));
  mix-blend-mode: soft-light;
}

@media (max-width: 700px) {
  .poem-index { top: 72px; right: 8px; bottom: 112px; }
  .poem-calligraphy { top: 11vh; right: 20px; bottom: 125px; gap: 12px; }
  .guided-poem .poem-lines { height: 56vh; font-size: clamp(17px, 5vw, 25px); line-height: 1.45; }
  .guided-poem .poem-title { font-size: clamp(22px, 6vw, 32px); }
}

@media (prefers-reduced-motion: reduce) {
  .poem-index,
  .guided-poem .poem-title,
  .guided-poem .poem-lines span { transition: none; animation-duration: .01ms !important; animation-delay: 0ms !important; }
}

@media (max-width: 640px) {
  .mission-header {
    top: 14px;
    left: 14px;
  }

  .strategy-inset {
    top: 82px;
    right: 12px;
    width: 158px;
  }

  .formation-actor-graphic { width: 86px; height: 82px; }

  .inset-footer,
  .guided-experience .map-legend,
  .guided-experience .map-source-note {
    display: none;
  }

  .narrative-subtitle {
    right: 12px;
    bottom: 162px;
    width: calc(100vw - 24px);
    padding: 12px 14px;
  }

  .narrative-subtitle #event-summary {
    display: none;
  }

  .guided-experience .literary-map-card {
    right: 12px;
    bottom: 278px;
  }

  .guided-timeline {
    bottom: 8px;
    width: calc(100vw - 16px);
    min-height: 122px;
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 10px 12px;
  }

  .guided-timeline .play-controls {
    min-width: 0;
    justify-content: center;
  }

  .guided-timeline .play-button {
    width: 38px;
    height: 38px;
  }

  .guided-timeline .timeline-head {
    gap: 8px;
  }

  .guided-timeline .current-date {
    font-size: 15px;
  }

  .guided-poem {
    padding: 90px 24px 150px;
    background: rgba(8, 10, 8, 0.88);
  }

  .guided-poem .poem-content {
    width: 100%;
    padding-left: 18px;
  }

  .guided-poem .poem-title {
    font-size: 34px;
  }

  .guided-poem .poem-lines {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guided-experience *,
  .guided-experience *::before,
  .guided-experience *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  .guided-poem,
  .guided-poem.is-visible {
    display: block;
    padding: 0;
    background: linear-gradient(90deg, transparent 10%, rgba(7, 9, 7, .12) 48%, rgba(7, 9, 7, .62));
  }
  .guided-poem .poem-title { font-size: clamp(22px, 6vw, 34px); }
  .guided-poem .poem-lines { font-size: clamp(17px, 5vw, 26px); }

/* V2 Styles */
.v2-experience .cesium-map {
  position: absolute; inset: 0; z-index: 1;
}
.v2-experience .cesium-map .cesium-viewer {
  width: 100%; height: 100%;
}
.v2-timeline {
  z-index: 10;
}
.v2-poem {
  position: fixed; inset: 0; z-index: 100;
  background: linear-gradient(135deg, rgba(8, 10, 14, 0.92) 0%, rgba(12, 16, 12, 0.88) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.v2-poem .poem-brush {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(180, 140, 80, 0.06) 0%, transparent 70%);
}
.v2-poem .poem-calligraphy {
  position: relative; z-index: 1; max-width: 800px; padding: 2rem;
  display: flex; flex-direction: column; align-items: flex-end;
}
.v2-poem .poem-kicker {
  font-size: 14px; color: #cda56c; letter-spacing: 0.15em; margin-bottom: 0.5rem;
}
.v2-poem .poem-title {
  font-size: 36px; color: #f2e7ce; margin-bottom: 1.5rem; font-weight: 600;
  writing-mode: vertical-rl; text-orientation: mixed; letter-spacing: 0.1em;
}
.v2-poem .poem-lines {
  writing-mode: vertical-rl; text-orientation: mixed;
  font-size: 24px; color: #e8d5a3; line-height: 2.2; letter-spacing: 0.08em;
  display: flex; flex-direction: row-reverse;
}
.v2-poem .poem-line {
  margin: 0 0.3rem; opacity: 0;
}
@keyframes poemFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.v2-poem .poem-place {
  font-size: 13px; color: #8a8d7f; margin-top: 1.5rem; text-align: right;
}
.v2-poem .poem-note {
  font-size: 12px; color: #6a6d5f; max-width: 600px; text-align: center; margin-top: 1rem;
}
.v2-poem .poem-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: 1px solid rgba(255,255,255,0.2); color: #f2e7ce;
  font-size: 24px; width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; z-index: 2;
}
.v2-poem .poem-close:hover { background: rgba(255,255,255,0.1); }
.poem-index-item {
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--lm-line); cursor: pointer;
  transition: background 0.2s;
}
.poem-index-item:hover { background: rgba(255,255,255,0.05); }
.poem-index-item strong { display: block; color: var(--lm-ink); font-size: 15px; }
.poem-index-item span { color: var(--lm-gold); font-size: 12px; }
.poem-index-item small { display: block; color: var(--lm-muted); font-size: 12px; margin-top: 0.25rem; }
}
