:root {
  --bg: #f6f4ee;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.84);
  --ink: #101010;
  --muted: #625d57;
  --line: rgba(0, 0, 0, 0.12);
  --line-strong: rgba(0, 0, 0, 0.68);
  --accent: #d81919;
  --accent-soft: rgba(216, 25, 25, 0.08);
  --shadow-soft: 0 20px 54px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 14px 30px rgba(0, 0, 0, 0.05);
  --display: "STSong", "Songti SC", "Noto Serif CJK SC", serif;
  --sans: "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  --shell: min(1200px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    var(--bg);
  background-size: 56px 56px;
  color: var(--ink);
  font-family: var(--sans);
}

body.has-modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: var(--shell);
  margin: 0 auto;
  padding: 28px 0 72px;
}

.back-link,
.eyebrow,
.subnav-link,
.card-label,
.data-chip,
.footer-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.back-link::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.hero {
  margin-top: 18px;
  padding: 28px 0 26px;
  border-bottom: 2px solid var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 24px;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0 42%, transparent 42% 58%, rgba(216, 25, 25, 0.9) 58% 74%, transparent 74% 86%, rgba(0, 0, 0, 0.85) 86% 100%);
}

.eyebrow {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.page-title {
  margin: 16px 0 0;
  font-family: var(--display);
  font-size: min(56px, 7vw);
  line-height: 0.94;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.page-desc {
  margin: 14px 0 0;
  max-width: 42rem;
  color: var(--muted);
  line-height: 1.85;
  font-size: 16px;
}

.hero-meta {
  display: grid;
  gap: 10px;
  align-content: start;
}

.meta-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.meta-chip strong {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.subnav-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.subnav-link:hover,
.subnav-link.active {
  color: var(--ink);
  border-color: rgba(216, 25, 25, 0.4);
  box-shadow: var(--shadow-soft);
}

.subnav-link:hover {
  transform: translateY(-1px);
}

.section-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.section-card {
  background: var(--panel);
  padding: 24px;
  display: grid;
  gap: 14px;
  border-top: 2px solid var(--accent);
  box-shadow: var(--shadow-card);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  border-radius: 18px 18px 0 0;
}

.section-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, rgba(216, 25, 25, 0.03), transparent 26%), var(--panel);
}

.section-card--major {
  grid-column: span 7;
  min-height: 300px;
}

.section-card--side {
  grid-column: span 5;
}

.section-card--half {
  grid-column: span 6;
}

.section-card--third {
  grid-column: span 4;
}

.page-shell--maps {
  position: relative;
  isolation: isolate;
  --maps-display: "Songti TC", "Songti SC", "STSong", "Noto Serif CJK TC", "Noto Serif CJK SC", serif;
  --maps-sans: "PingFang TC", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK TC", "Noto Sans CJK SC", sans-serif;
}

.page-shell--maps::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 0, 0, 0.06), transparent 28%),
    radial-gradient(circle at 78% 22%, rgba(0, 0, 0, 0.045), transparent 24%),
    radial-gradient(circle at 50% 76%, rgba(0, 0, 0, 0.04), transparent 30%);
  opacity: 0.7;
}

.page-shell--maps,
.page-shell--maps button,
.page-shell--maps input,
.page-shell--maps textarea,
.page-shell--maps select {
  font-family: var(--maps-sans);
}

.page-shell--maps .page-title,
.page-shell--maps .map-detail-panel h2,
.page-shell--maps .map-info-head span,
.page-shell--maps .map-city-card h3,
.page-shell--maps .map-dossier-card h4 {
  font-family: var(--maps-display);
}

.page-shell--maps .back-link,
.page-shell--maps .eyebrow,
.page-shell--maps .subnav-link,
.page-shell--maps .card-label,
.page-shell--maps .footer-note,
.page-shell--maps .map-status,
.page-shell--maps .map-meta-pill,
.page-shell--maps .map-chip-state,
.page-shell--maps .map-chip-meta,
.page-shell--maps .map-monster-source,
.page-shell--maps .map-source-link,
.page-shell--maps .map-dossier-meta,
.page-shell--maps .map-inline-pill,
.page-shell--maps .map-monster-media-badge {
  font-family: var(--maps-sans);
  letter-spacing: 0.08em;
  text-transform: none;
}

.map-script-switch {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
}

.map-script-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.map-script-button:hover,
.map-script-button:focus-visible {
  border-color: rgba(17, 17, 17, 0.14);
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink);
  outline: none;
}

.map-script-button.is-active {
  border-color: rgba(17, 17, 17, 0.14);
  background: rgba(17, 17, 17, 0.08);
  color: var(--ink);
  transform: translateY(-1px);
}

.map-theme-bar {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.map-theme-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.map-theme-button {
  padding: 14px 15px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 240, 230, 0.94));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.map-theme-button:hover,
.map-theme-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.3);
  box-shadow: var(--shadow-soft);
  outline: none;
}

.map-theme-button.is-active {
  border-color: rgba(216, 25, 25, 0.24);
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.94), rgba(40, 34, 28, 0.92));
  color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.14);
}

.map-theme-button-title,
.map-theme-button-meta {
  display: block;
}

.map-theme-button-title {
  font-family: var(--maps-display);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.map-theme-button-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.map-theme-button-badge {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px dashed rgba(17, 17, 17, 0.2);
  border-radius: 999px;
  color: rgba(44, 44, 44, 0.72);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-theme-button[data-theme-state="coming-soon"] {
  border-style: dashed;
}

.map-theme-button.is-active .map-theme-button-meta {
  color: rgba(255, 255, 255, 0.68);
}

.map-theme-button.is-active .map-theme-button-badge {
  border-color: rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.76);
}

.map-theme-note {
  padding: 14px 16px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.map-theme-summary {
  margin: 10px 0 0;
  max-width: 54rem;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.82;
}

.hero--maps {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.035), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 239, 228, 0.96));
}

.map-stage {
  margin-top: 28px;
  display: block;
}

.map-shell,
.map-detail-panel,
.map-province-strip {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.018), transparent 20%),
    linear-gradient(180deg, rgba(255, 252, 244, 0.98), rgba(244, 238, 227, 0.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.map-shell {
  min-height: 740px;
  padding: 20px;
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.map-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 22% 16%, rgba(0, 0, 0, 0.08), transparent 30%),
    radial-gradient(circle at 74% 28%, rgba(0, 0, 0, 0.05), transparent 26%);
  background-size: 22px 22px, 22px 22px, auto, auto;
  opacity: 0.72;
  pointer-events: none;
}

.map-shell-top,
.map-detail-top,
.map-strip-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-status {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.map-canvas {
  position: relative;
  z-index: 1;
  min-height: 640px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 251, 241, 0.96), rgba(244, 239, 228, 0.94));
  overflow: hidden;
}

.map-culture-layer,
.map-culture-hovercard {
  position: absolute;
  inset: 0;
}

.map-culture-layer {
  z-index: 4;
  pointer-events: none;
  overflow: clip;
}

.map-culture-region {
  position: absolute;
  inset: 0;
  opacity: 0.78;
  filter: saturate(114%);
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.map-culture-region-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  pointer-events: none;
}

.map-culture-region-fill {
  fill: color-mix(in srgb, var(--culture-tint) 84%, rgba(255, 255, 255, 0.22));
}

.map-culture-region-stroke {
  fill: none;
  stroke: color-mix(in srgb, var(--culture-tint) 72%, rgba(17, 17, 17, 0.34));
  stroke-width: 0.18;
  stroke-linejoin: round;
  stroke-dasharray: none;
  opacity: 0.18;
}

.map-culture-region::before {
  content: none;
}

.map-culture-region-label {
  position: absolute;
  left: var(--culture-label-left);
  top: var(--culture-label-top);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  max-width: 132px;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background: rgba(255, 252, 244, 0.78);
  color: rgba(17, 17, 17, 0.82);
  font: inherit;
  font-family: var(--maps-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.24;
  text-align: center;
  white-space: normal;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(8px);
  cursor: pointer;
  appearance: none;
  pointer-events: auto;
  touch-action: manipulation;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.map-culture-region-label:hover,
.map-culture-region-label:focus-visible {
  background: rgba(255, 252, 244, 0.94);
  border-color: rgba(17, 17, 17, 0.28);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  outline: none;
}

.map-culture-region.is-active {
  opacity: 0.96;
  transform: translateY(-3px);
}

.map-culture-region.is-active .map-culture-region-fill {
  fill: color-mix(in srgb, var(--culture-hover) 80%, rgba(255, 252, 244, 0.18));
}

.map-culture-region.is-active .map-culture-region-stroke {
  stroke: color-mix(in srgb, var(--culture-hover) 74%, rgba(17, 17, 17, 0.42));
  stroke-width: 0.34;
  opacity: 0.64;
}

.map-culture-region.is-active .map-culture-region-label {
  background: rgba(255, 252, 244, 0.92);
  color: var(--ink);
}

.map-culture-hovercard {
  z-index: 3;
  inset: auto auto auto auto;
  width: min(300px, calc(100% - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 28%),
    color-mix(in srgb, var(--culture-tint, #e7d8c8) 58%, rgba(255, 252, 244, 0.96));
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
  pointer-events: none;
  transform: translate(0, 0);
}

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

.map-culture-hovercard strong {
  display: block;
  margin-top: 10px;
  font-family: var(--maps-display);
  font-size: 28px;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.map-culture-hovercard p {
  margin: 10px 0 0;
  color: rgba(44, 44, 44, 0.8);
  font-size: 13px;
  line-height: 1.74;
}

.map-culture-hovercard-meta {
  display: inline-flex;
  margin-top: 10px;
  color: rgba(17, 17, 17, 0.66);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-canvas::before,
.map-modal-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 18%, rgba(0, 0, 0, 0.1), transparent 24%),
    radial-gradient(circle at 72% 22%, rgba(0, 0, 0, 0.08), transparent 24%),
    radial-gradient(circle at 58% 72%, rgba(0, 0, 0, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), transparent 24%);
  opacity: 0.62;
}

.map-canvas::after,
.map-modal-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-radial-gradient(circle at 20% 18%, rgba(0, 0, 0, 0.055) 0 1px, transparent 1px 16px),
    repeating-radial-gradient(circle at 75% 28%, rgba(0, 0, 0, 0.045) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.026) 0 1px, transparent 1px 8px);
  mix-blend-mode: multiply;
  opacity: 0.34;
}

.map-detail-panel {
  margin-top: 18px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(260px, 0.74fr) minmax(0, 1.26fr);
  align-items: start;
  gap: 18px;
}

.map-detail-intro,
.map-detail-content {
  min-width: 0;
}

.map-detail-intro {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.036), transparent 24%),
    linear-gradient(180deg, rgba(216, 25, 25, 0.025), transparent 34%),
    rgba(255, 252, 244, 0.82);
  box-shadow: var(--shadow-soft);
}

.map-detail-content {
  display: grid;
  gap: 16px;
}

.map-pulse {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.05);
}

.map-detail-panel h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(36px, 4vw, 52px);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.map-detail-desc {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.map-culture-banner {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.022), transparent 26%),
    color-mix(in srgb, var(--culture-tint, #ece3d3) 62%, rgba(255, 255, 255, 0.92));
  box-shadow: var(--shadow-soft);
}

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

.map-culture-banner--modal {
  margin: 4px 0 2px;
}

.map-culture-badge {
  justify-self: start;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-family: var(--maps-display);
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.map-culture-caption {
  margin: 0;
  color: rgba(44, 44, 44, 0.76);
  font-size: 13px;
  line-height: 1.74;
}

.map-detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.map-detail-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-meta-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-info-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-top: 2px solid var(--accent);
  border-radius: 18px 18px 0 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.045), transparent 26%),
    linear-gradient(180deg, rgba(216, 25, 25, 0.03), transparent 34%),
    rgba(255, 252, 244, 0.94);
  box-shadow: var(--shadow-soft);
}

.map-theme-empty {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed rgba(17, 17, 17, 0.16);
  background: rgba(255, 255, 255, 0.72);
}

.map-theme-empty strong {
  font-family: var(--maps-display);
  font-size: 24px;
  line-height: 0.98;
}

.map-theme-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.76;
}

.map-info-head,
.map-source-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.map-info-head span {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1;
}

.map-insight-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.map-insight-item,
.map-monster-item {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  background: rgba(255, 255, 255, 0.74);
}

.map-insight-item {
  color: var(--muted);
  line-height: 1.78;
  font-size: 14px;
}

.map-insight-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.map-insight-item--culture {
  gap: 8px;
  border-color: rgba(17, 17, 17, 0.12);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.025), transparent 28%),
    color-mix(in srgb, var(--culture-tint, #ece3d3) 54%, rgba(255, 255, 255, 0.92));
}

.map-insight-item--culture strong {
  font-family: var(--maps-display);
  font-size: 24px;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.map-insight-item--culture span {
  color: rgba(44, 44, 44, 0.74);
}

.map-insight-item--deity {
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent 24%),
    color-mix(in srgb, var(--culture-tint, #ece3d3) 22%, rgba(255, 255, 255, 0.94));
}

.map-insight-item--deity-missing {
  grid-template-columns: 1fr;
}

.map-deity-media {
  margin: 0;
  position: relative;
  display: grid;
  gap: 10px;
  overflow: hidden;
}

.map-deity-media--placeholder {
  min-height: 180px;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(17, 17, 17, 0.14);
  background: rgba(255, 255, 255, 0.55);
}

.map-deity-media--placeholder span {
  color: rgba(44, 44, 44, 0.62);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-deity-media img {
  width: 100%;
  aspect-ratio: var(--deity-media-aspect, 3 / 4);
  display: block;
  object-fit: contain;
  object-position: var(--deity-focus-x, 50%) var(--deity-focus-y, 50%);
  transform: scale(var(--deity-zoom, 1));
  transform-origin: var(--deity-focus-x, 50%) var(--deity-focus-y, 50%);
  padding: 0;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: #fff;
  box-shadow: none;
}

.map-deity-media figcaption {
  color: rgba(44, 44, 44, 0.68);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-deity-copy {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.map-deity-lead {
  margin: 0;
  color: rgba(44, 44, 44, 0.82);
  line-height: 1.8;
}

.map-deity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.map-deity-block {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.66)),
    rgba(255, 255, 255, 0.76);
}

.map-deity-block--wide {
  grid-column: 1 / -1;
}

.map-deity-label {
  color: rgba(44, 44, 44, 0.6);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-deity-block p {
  margin: 0;
  color: rgba(44, 44, 44, 0.82);
  line-height: 1.78;
}

.map-deity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-deity-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--deity-accent, rgba(17, 17, 17, 0.18)) 24%, rgba(17, 17, 17, 0.12));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: color-mix(in srgb, var(--deity-accent, #7d7d7d) 76%, #2c2c2c);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.map-insight-item--deity strong,
.map-insight-item--signal strong {
  color: var(--ink);
  font-family: var(--maps-display);
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.map-insight-meta {
  color: rgba(44, 44, 44, 0.72);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-insight-note,
.map-insight-item--signal span {
  color: rgba(44, 44, 44, 0.82);
}

.map-insight-item--empty {
  color: rgba(44, 44, 44, 0.72);
}

.map-monster-list {
  display: grid;
  gap: 10px;
}

.map-monster-item--with-media {
  gap: 10px;
}

.map-monster-item--placeholder {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.028), transparent 30%),
    rgba(255, 255, 255, 0.72);
}

.map-monster-item--pending {
  background:
    linear-gradient(180deg, rgba(185, 118, 34, 0.06), transparent 28%),
    rgba(255, 252, 245, 0.82);
}

.map-monster-media {
  margin: 0 0 2px;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.1);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), transparent 24%),
    rgba(241, 236, 226, 0.88);
}

.map-monster-media-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  background: rgba(16, 16, 16, 0.6);
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-monster-media-badge--pending {
  border-color: rgba(160, 110, 44, 0.18);
  background: rgba(153, 102, 36, 0.88);
}

.map-monster-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04) saturate(0.82);
}

.map-monster-media--placeholder {
  border-style: dashed;
  border-color: rgba(17, 17, 17, 0.14);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), transparent 20%),
    rgba(243, 238, 228, 0.96);
}

.map-monster-media--pending {
  border-style: solid;
  border-color: rgba(173, 120, 49, 0.22);
  background:
    linear-gradient(180deg, rgba(182, 124, 45, 0.08), transparent 18%),
    rgba(244, 238, 226, 0.98);
}

.map-monster-media--placeholder img {
  filter: none;
}

.map-monster-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.map-monster-head strong {
  font-family: var(--display);
  font-size: 24px;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.map-monster-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.76;
  font-size: 14px;
}

.map-monster-source,
.map-source-note {
  color: rgba(44, 44, 44, 0.72);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-monster-source {
  display: block;
}

.map-monster-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.map-monster-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.map-monster-item--fallback {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.018), transparent 45%),
    rgba(255, 255, 255, 0.7);
}

.map-monster-item--empty strong {
  font-size: 18px;
}

.map-inline-pill,
.map-source-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.map-inline-pill {
  white-space: nowrap;
}

.map-source-bar {
  gap: 8px;
  justify-content: flex-start;
}

.map-source-note {
  margin: -6px 0 0;
  line-height: 1.7;
}

.map-info-block--sources .map-info-head span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-source-link {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.map-source-host {
  margin-left: 7px;
  color: rgba(44, 44, 44, 0.62);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: none;
}

.map-source-link--mini {
  min-height: 28px;
  padding: 0 9px;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.map-source-link:hover,
.map-source-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.34);
  box-shadow: var(--shadow-soft);
}

.map-source-link--muted {
  color: rgba(44, 44, 44, 0.62);
}

.map-detail-action,
.map-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.map-detail-action {
  min-height: 48px;
  padding: 0 16px;
  justify-self: start;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.map-detail-action:hover,
.map-detail-action:focus-visible,
.map-chip:hover,
.map-chip:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.4);
  box-shadow: var(--shadow-soft);
}

.map-province-strip {
  margin-top: 18px;
  padding: 18px;
  display: grid;
  gap: 16px;
}

.map-strip-heading {
  display: grid;
  gap: 8px;
}

.map-strip-note {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.66;
}

.map-strip-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.map-strip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

.map-strip-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(44, 44, 44, 0.72);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.map-strip-mode-button:hover,
.map-strip-mode-button:focus-visible {
  color: var(--ink);
  outline: none;
}

.map-strip-mode-button.is-active {
  background: #111;
  color: rgba(255, 255, 255, 0.92);
}

.map-strip-head span {
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
}

.map-strip-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.map-chip {
  min-height: 132px;
  padding: 14px;
  border-radius: 18px;
  display: grid;
  justify-items: stretch;
  align-content: start;
  gap: 10px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.025), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 242, 233, 0.94));
}

.map-chip--culture {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.025), transparent 24%),
    color-mix(in srgb, var(--culture-tint, #ece3d3) 46%, rgba(250, 247, 240, 0.96));
}

.map-chip-top,
.map-chip-stats {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.map-chip-top {
  min-width: 0;
}

.map-chip-state {
  flex: 0 0 auto;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  color: rgba(44, 44, 44, 0.68);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-chip-main {
  font-family: var(--display);
  font-size: 24px;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.map-chip-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.64;
  min-height: 42px;
}

.map-chip-meta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  color: rgba(44, 44, 44, 0.62);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.map-chip.is-active {
  background: #111;
  color: #fff;
  border-color: #111;
  box-shadow: var(--shadow-soft);
}

.map-chip--culture.is-active {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 30%),
    color-mix(in srgb, var(--culture-tint, #d7c6a9) 42%, rgba(21, 21, 21, 0.98));
  border-color: rgba(17, 17, 17, 0.96);
}

.map-chip.is-active .map-chip-desc,
.map-chip.is-active .map-chip-state,
.map-chip.is-active .map-chip-meta {
  color: rgba(255, 255, 255, 0.72);
}

.map-chip.is-active .map-chip-state,
.map-chip.is-active .map-chip-meta {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.map-modal-open {
  overflow: hidden;
}

.map-modal {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.map-modal.is-open {
  display: flex;
}

.map-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.48);
  backdrop-filter: blur(10px);
}

.map-modal-panel {
  position: relative;
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(17, 17, 17, 0.18);
  border-radius: 28px 28px 18px 18px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.035), transparent 18%),
    linear-gradient(180deg, rgba(255, 252, 244, 0.98), rgba(242, 237, 226, 0.96));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
}

.map-modal-head,
.map-modal-map-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.map-modal-head {
  margin-bottom: 18px;
}

.map-modal-head h2 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 58px);
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.map-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  touch-action: manipulation;
}

.map-modal-close:hover,
.map-modal-close:focus-visible {
  border-color: rgba(0, 0, 0, 0.44);
  transform: translateY(-1px);
}

.map-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 20px;
  min-width: 0;
  align-items: start;
}

.map-modal-map-shell,
.map-city-card,
.map-city-dossier,
.map-city-strip-wrap {
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), transparent 20%),
    linear-gradient(180deg, rgba(255, 252, 244, 0.98), rgba(244, 238, 228, 0.94));
  border: 1px solid rgba(17, 17, 17, 0.12);
  box-shadow: var(--shadow-soft);
}

.map-modal-map-shell {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.map-modal-canvas {
  position: relative;
  inline-size: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, rgba(255, 251, 241, 0.96), rgba(243, 237, 226, 0.94));
  overflow: hidden;
}

.map-modal-canvas.is-subculture-fallback {
  background:
    radial-gradient(circle at 18% 20%, rgba(0, 0, 0, 0.035), transparent 24%),
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(241, 234, 222, 0.94));
}

.map-edge-tooltip {
  max-width: min(220px, calc(100vw - 48px));
  backdrop-filter: blur(10px);
  pointer-events: none;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

.map-subculture-fallback {
  position: absolute;
  inset: 20px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-content: center;
}

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

.map-subculture-fallback-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--subculture-border, rgba(17, 17, 17, 0.18));
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 32%),
    color-mix(in srgb, var(--subculture-fill, #ead6c4) 74%, rgba(255, 252, 244, 0.94));
  color: var(--ink);
  text-align: left;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.map-subculture-fallback-card:hover,
.map-subculture-fallback-card:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--subculture-border, #111) 82%, rgba(17, 17, 17, 0.12));
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.1);
  outline: none;
}

.map-subculture-fallback-card.is-active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 28%),
    color-mix(in srgb, var(--subculture-select, #d9b461) 80%, rgba(255, 249, 239, 0.96));
  border-color: color-mix(in srgb, var(--subculture-border, #111) 90%, rgba(17, 17, 17, 0.08));
  transform: translateY(-4px);
}

.map-subculture-fallback-kicker,
.map-subculture-fallback-meta,
.map-subculture-fallback-cities {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-subculture-fallback-kicker,
.map-subculture-fallback-meta {
  color: rgba(17, 17, 17, 0.62);
}

.map-subculture-fallback-card strong {
  font-family: var(--display);
  font-size: 24px;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.map-subculture-fallback-card p {
  margin: 0;
  color: rgba(17, 17, 17, 0.7);
  font-size: 13px;
  line-height: 1.65;
}

.map-subculture-fallback-cities {
  color: rgba(17, 17, 17, 0.74);
}

.map-subculture-strip-wrap {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent 40%),
    rgba(255, 255, 255, 0.74);
}

.map-subculture-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-subculture-chip {
  min-width: 0;
  min-height: 40px;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--subculture-border, rgba(17, 17, 17, 0.16));
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 70%),
    color-mix(in srgb, var(--subculture-fill, #f1d6c7) 70%, rgba(255, 252, 244, 0.9));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.map-subculture-chip:hover,
.map-subculture-chip:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--subculture-border, #111) 78%, rgba(17, 17, 17, 0.2));
  box-shadow: var(--shadow-soft);
  outline: none;
}

.map-subculture-chip.is-active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 68%),
    color-mix(in srgb, var(--subculture-select, #d9b461) 78%, rgba(255, 250, 240, 0.92));
  border-color: color-mix(in srgb, var(--subculture-border, #111) 88%, rgba(17, 17, 17, 0.12));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}

.map-subculture-chip-title {
  font-family: var(--maps-sans);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.map-subculture-chip-meta {
  color: rgba(17, 17, 17, 0.62);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-modal-copy {
  display: grid;
  gap: 14px;
  min-width: 0;
  align-content: start;
  max-height: var(--modal-copy-max-height, none);
  overflow: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.map-modal-province-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.76;
  max-width: 46ch;
}

.map-modal-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.map-city-card,
.map-city-dossier,
.map-city-strip-wrap {
  padding: 15px;
}

.map-city-dossier {
  display: grid;
  gap: 12px;
}

.map-city-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.map-modal-deity-media {
  margin: 2px 0 0;
  width: min(100%, 320px);
}

.map-modal-deity-media img {
  aspect-ratio: var(--deity-media-aspect, 3 / 4);
}

.map-modal-deity-source {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-modal-deity-source:empty {
  display: none;
}

.map-city-card h3 {
  margin: 4px 0 8px;
  font-family: var(--display);
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.map-city-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.74;
  font-size: 14px;
}

.map-dossier-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

#modal-city-index,
#modal-dossier-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(44, 44, 44, 0.78);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.map-dossier-card {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.018), transparent 42%),
    rgba(255, 255, 255, 0.72);
}

.map-dossier-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.map-dossier-meta {
  color: rgba(44, 44, 44, 0.68);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.map-dossier-card h4 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(21px, 2vw, 26px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.map-dossier-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.68;
}

.map-dossier-card--empty {
  background: rgba(255, 255, 255, 0.68);
}

.map-city-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.map-city-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.map-city-chip--culture {
  border-color: color-mix(in srgb, var(--city-culture-border, rgba(17, 17, 17, 0.16)) 76%, rgba(17, 17, 17, 0.14));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 70%),
    color-mix(in srgb, var(--city-culture-tint, #f1d6c7) 42%, rgba(255, 252, 244, 0.92));
}

.map-city-chip:hover,
.map-city-chip:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.4);
  box-shadow: var(--shadow-soft);
}

.map-city-chip.is-active {
  background: #111;
  border-color: #111;
  color: #fff;
}

.map-city-chip--culture.is-active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 70%),
    color-mix(in srgb, var(--city-culture-tint, #f1d6c7) 82%, rgba(255, 250, 242, 0.92));
  border-color: color-mix(in srgb, var(--city-culture-border, #111) 86%, rgba(17, 17, 17, 0.14));
  color: var(--ink);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.08);
}

.section-card--full {
  grid-column: span 12;
}

.section-card--feature {
  grid-column: span 12;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  align-items: start;
}

.card-label {
  color: var(--muted);
}

.section-card h2,
.section-card h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.section-card h2 {
  font-size: 56px;
  line-height: 0.92;
  max-width: 7ch;
}

.section-card h3 {
  font-size: 32px;
}

.section-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 16px;
  max-width: 36rem;
}

.data-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.data-chip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.data-chip:hover {
  border-color: rgba(216, 25, 25, 0.38);
  color: var(--ink);
  background: #fff;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.list-item:first-child {
  border-top: none;
  padding-top: 0;
}

.list-item strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.list-item span {
  color: var(--muted);
  line-height: 1.75;
  font-size: 14px;
}

.cover-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f1eee8;
}

.cover-frame img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.section-card--major .cover-frame img {
  height: 300px;
}

.section-card--feature .cover-frame img {
  height: 100%;
  min-height: 320px;
}

.feature-copy {
  display: grid;
  gap: 14px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 180ms ease, letter-spacing 180ms ease;
}

.card-link::after {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
}

.card-link:hover {
  color: var(--accent);
  letter-spacing: 0.18em;
}

.card-link:focus-visible,
.story-open:focus-visible,
.story-modal-close:focus-visible {
  outline: 2px solid rgba(216, 25, 25, 0.7);
  outline-offset: 4px;
}

.story-copy {
  display: grid;
  gap: 12px;
}

.summary-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.summary-clamp--3 {
  -webkit-line-clamp: 3;
}

.summary-clamp--5 {
  -webkit-line-clamp: 5;
}

.story-empty {
  min-height: 240px;
  align-content: center;
}

.story-empty-card {
  grid-column: 1 / -1;
}

.story-stat-grid,
.story-modal-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.story-stat {
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 86%, rgba(216, 25, 25, 0.06));
  display: grid;
  align-content: start;
  gap: 8px;
}

.story-stat span,
.story-card-meta span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.story-stat strong {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.masonry {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: start;
}

.masonry-card {
  background: var(--panel);
  border-top: 2px solid var(--accent);
  box-shadow: var(--shadow-card);
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  display: grid;
  gap: 14px;
  padding: 0 0 20px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.masonry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, rgba(216, 25, 25, 0.03), transparent 26%), var(--panel);
}

.masonry-card .cover-frame {
  position: relative;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.masonry-card .cover-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(16, 16, 16, 0), rgba(16, 16, 16, 0.18));
  pointer-events: none;
}

.masonry-card .cover-frame img {
  height: 220px;
  min-height: 220px;
  max-height: 220px;
  object-position: center;
}

.masonry-card-body {
  display: grid;
  gap: 12px;
  padding: 0 20px;
}

.masonry-card--feature .masonry-card-body {
  padding-top: 4px;
}

.story-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.story-open {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: block;
}

.story-open:hover h3,
.story-open:hover .card-link {
  color: var(--accent);
}

.story-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  pointer-events: auto;
  background: rgba(16, 16, 16, 0.58);
  backdrop-filter: blur(8px);
  overflow-x: hidden;
}

.story-modal.is-open {
  display: flex;
}

.story-modal-panel {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
  padding: 24px;
  display: grid;
  gap: 18px;
  margin-top: 24px;
  pointer-events: auto;
  border-radius: 24px 24px 18px 18px;
}

.story-modal-head {
  display: grid;
  gap: 10px;
}

.story-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.story-modal-handle {
  width: 54px;
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 16%, transparent);
}

.story-modal-progress {
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--line) 70%, #fff);
}

.story-modal-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 78%, #000), color-mix(in srgb, var(--accent) 64%, #fff));
  transform: scaleX(0);
  transform-origin: left center;
}

.story-modal-close {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 90%, rgba(216, 25, 25, 0.04));
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.story-modal-close:hover {
  color: var(--accent);
  border-color: rgba(216, 25, 25, 0.4);
}

.story-modal-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
  gap: 20px;
  min-width: 0;
  overflow-x: hidden;
}

.story-modal-cover {
  min-width: 0;
}

.story-modal-cover img {
  width: 100%;
  max-width: 100%;
  display: block;
  object-fit: cover;
  max-height: 520px;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.story-modal-cover-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  background: linear-gradient(180deg, rgba(216, 25, 25, 0.04), rgba(0, 0, 0, 0.02));
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.story-modal-copy {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.story-modal-copy h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 40px;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.story-modal-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.story-modal-section {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.story-modal-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.story-modal-status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(216, 25, 25, 0.22);
  border-radius: 999px;
  background: rgba(216, 25, 25, 0.06);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-modal-text {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.95;
  white-space: pre-line;
}

.story-modal-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.story-modal-section--critique {
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(216, 25, 25, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(216, 25, 25, 0.05), rgba(216, 25, 25, 0.015)),
    rgba(17, 17, 17, 0.02);
}

.story-modal-critique {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.95;
  letter-spacing: 0.01em;
}

.story-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.story-click-zone {
  cursor: pointer;
}

.story-click-zone:hover img {
  transform: scale(1.02);
}

.story-click-zone img {
  transition: transform 220ms ease;
}

.footer-bar {
  margin-top: 1px;
  padding: 16px 24px;
  border-top: 2px solid var(--ink);
  background: var(--panel);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-note {
  color: var(--muted);
}

.page-shell--rankings {
  position: relative;
  isolation: isolate;
}

.page-shell--rankings::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.44;
  background:
    radial-gradient(circle at 14% 18%, rgba(119, 255, 218, 0.12), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(216, 25, 25, 0.12), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(7, 255, 197, 0.03) 48%, rgba(255, 255, 255, 0));
  z-index: -1;
}

.hero--rankings {
  overflow: hidden;
  padding: 30px 28px 28px;
  border: 1px solid rgba(15, 20, 24, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(230, 236, 239, 0.92)),
    linear-gradient(180deg, rgba(216, 25, 25, 0.04), transparent 42%);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.08);
}

.hero--rankings::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(7, 255, 197, 0.15) 8% 8.2%, transparent 8.2% 100%),
    repeating-linear-gradient(180deg, rgba(16, 16, 16, 0.035) 0 1px, transparent 1px 8px);
}

.page-title--glitch {
  position: relative;
  width: fit-content;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.66);
}

.page-title--glitch::before,
.page-title--glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.32;
}

.page-title--glitch::before {
  color: rgba(216, 25, 25, 0.7);
  transform: translate(1px, 0);
  clip-path: inset(0 0 48% 0);
  animation: rankingGlitchShift 5.6s steps(2, end) infinite;
}

.page-title--glitch::after {
  color: rgba(0, 171, 146, 0.86);
  transform: translate(-1px, 0);
  clip-path: inset(54% 0 0 0);
  animation: rankingGlitchShift 4.4s steps(2, end) infinite reverse;
}

.ranking-sigil {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 132px;
  height: 132px;
  pointer-events: none;
  opacity: 0.65;
}

.ranking-sigil span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(15, 20, 24, 0.22);
  border-radius: 50%;
}

.ranking-sigil span:nth-child(1) {
  inset: 14px;
  border-color: rgba(216, 25, 25, 0.34);
  animation: rankingPulse 5.8s ease-in-out infinite;
}

.ranking-sigil span:nth-child(2) {
  inset: 34px;
  border-color: rgba(0, 171, 146, 0.38);
  animation: rankingPulse 4.8s ease-in-out infinite reverse;
}

.ranking-sigil span:nth-child(3) {
  inset: 58px;
  border-style: dashed;
  border-color: rgba(16, 16, 16, 0.18);
}

.page-shell--rankings .section-grid {
  gap: 18px;
  background: transparent;
}

.ranking-card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  color: #edf2f4;
  border: 1px solid rgba(116, 232, 214, 0.16);
  border-top-color: rgba(116, 232, 214, 0.72);
  border-top-width: 2px;
  border-radius: 22px 22px 10px 10px;
  background:
    linear-gradient(180deg, rgba(11, 16, 19, 0.98), rgba(18, 23, 27, 0.96)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ranking-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(0, 171, 146, 0.18), transparent 22%),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.03));
  opacity: 0.52;
}

.ranking-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 8px);
  opacity: 0.2;
  animation: rankingScanline 12s linear infinite;
}

.ranking-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(116, 232, 214, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(10, 14, 16, 0.98), rgba(20, 24, 28, 0.98)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.ranking-card:nth-child(2) {
  border-top-color: rgba(216, 25, 25, 0.74);
}

.ranking-card:nth-child(2)::before {
  background:
    linear-gradient(135deg, rgba(216, 25, 25, 0.18), transparent 24%),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.03));
}

.ranking-card:nth-child(3) {
  border-top-color: rgba(164, 136, 255, 0.72);
}

.ranking-card:nth-child(3)::before {
  background:
    linear-gradient(135deg, rgba(164, 136, 255, 0.16), transparent 24%),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.03));
}

.ranking-card > * {
  position: relative;
  z-index: 1;
}

.ranking-card .card-label,
.ranking-signal,
.ranking-card .data-chip {
  color: rgba(226, 236, 239, 0.72);
}

.ranking-card .data-chip {
  border-color: rgba(226, 236, 239, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.ranking-card .data-chip:hover {
  border-color: rgba(116, 232, 214, 0.44);
  color: #f5fbfc;
  background: rgba(255, 255, 255, 0.08);
}

.ranking-card h3 {
  color: #f9fbfc;
  text-shadow: 0 0 18px rgba(92, 225, 203, 0.08);
}

.ranking-card p {
  color: rgba(224, 233, 236, 0.72);
}

.ranking-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ranking-signal {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ranking-list {
  gap: 12px;
}

.ranking-film {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-top: 12px;
  border-top-color: rgba(226, 236, 239, 0.12);
}

.ranking-rank {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  padding-top: 3px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  color: rgba(116, 232, 214, 0.74);
}

.ranking-film-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ranking-film-title {
  display: block;
  margin: 0;
  font-family: "Bodoni 72", "Iowan Old Style", "Songti SC", "Noto Serif CJK SC", serif;
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: #ffffff;
  text-wrap: balance;
}

.ranking-film-trigger {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: color 180ms ease, text-shadow 180ms ease, transform 180ms ease;
}

.ranking-film-trigger:hover {
  color: #9af9ea;
  text-shadow: 0 0 20px rgba(92, 232, 210, 0.22);
  transform: translateX(3px);
}

.ranking-film-trigger:focus-visible {
  outline: 2px solid rgba(116, 232, 214, 0.88);
  outline-offset: 6px;
  border-radius: 6px;
}

.ranking-film-original,
.ranking-film-note {
  display: block;
}

.ranking-film-original {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(116, 232, 214, 0.72);
}

.ranking-film-note {
  color: rgba(226, 236, 239, 0.7);
  line-height: 1.68;
  font-size: 14px;
}

.page-shell--rankings .footer-bar {
  margin-top: 18px;
  border-top: 1px solid rgba(15, 20, 24, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(240, 243, 245, 0.94));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

@keyframes rankingGlitchShift {
  0%,
  88%,
  100% {
    transform: translate(0, 0);
  }

  90% {
    transform: translate(2px, -1px);
  }

  94% {
    transform: translate(-1px, 1px);
  }
}

@keyframes rankingScanline {
  0% {
    transform: translateY(-18%);
  }

  100% {
    transform: translateY(18%);
  }
}

@keyframes rankingPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.4;
  }

  50% {
    transform: scale(1.06);
    opacity: 0.72;
  }
}

@media (max-width: 980px) {
  .hero,
  .section-grid {
    grid-template-columns: 1fr;
  }

  .map-stage {
    margin-top: 24px;
  }

  .map-shell {
    min-height: 660px;
  }

  .map-detail-panel {
    grid-template-columns: 1fr;
  }

  .map-canvas {
    min-height: 560px;
  }

  .map-modal-grid {
    grid-template-columns: 1fr;
  }

  .map-modal-canvas {
    min-height: 0;
  }

  .map-edge-tooltip {
    max-width: min(200px, calc(100vw - 32px));
  }

  .map-modal-copy {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .section-card,
  .section-card--major,
  .section-card--side,
  .section-card--half,
  .section-card--third,
  .section-card--full,
  .section-card--feature {
    grid-column: auto;
  }

  .section-card--feature {
    grid-template-columns: 1fr;
  }

  .story-stat-grid,
  .story-modal-meta {
    grid-template-columns: 1fr;
  }

  .story-modal-grid {
    grid-template-columns: 1fr;
  }

  .story-modal-copy h2 {
    font-size: 30px;
  }

  .section-card h2 {
    font-size: 44px;
    max-width: none;
  }

  .section-card h3 {
    font-size: 28px;
  }

  .hero--rankings {
    padding: 24px 22px;
  }

  .ranking-sigil {
    width: 104px;
    height: 104px;
  }

  .ranking-film-title {
    font-size: 24px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 20px, 100vw - 20px);
    padding-top: 18px;
    padding-bottom: 28px;
  }

  .hero,
  .section-card,
  .footer-bar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .back-link {
    gap: 9px;
    font-size: 10px;
  }

  .back-link::before {
    width: 20px;
  }

  .hero {
    margin-top: 10px;
    gap: 18px;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .page-title {
    font-size: min(44px, 12vw);
  }

  .page-desc,
  .section-card p {
    font-size: 15px;
  }

  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .subnav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .subnav-link {
    min-height: 38px;
    justify-content: center;
    padding-inline: 10px;
  }

  .map-script-switch {
    width: 100%;
    align-items: stretch;
    justify-content: space-between;
    gap: 6px;
  }

  .map-script-button {
    flex: 1 1 0;
    min-height: 44px;
    justify-content: center;
  }

  .map-theme-switch {
    grid-template-columns: 1fr;
  }

  .map-stage {
    margin-top: 20px;
    gap: 14px;
  }

  .map-shell,
  .map-detail-panel,
  .map-province-strip {
    padding-left: 16px;
    padding-right: 16px;
  }

  .map-shell {
    min-height: 520px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .map-shell-top,
  .map-detail-top,
  .map-strip-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .map-status {
    min-height: 30px;
    padding-inline: 10px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .map-canvas {
    min-height: 420px;
  }

  .map-culture-region-label {
    min-width: 52px;
    max-width: 84px;
    min-height: 44px;
    padding: 7px 10px;
    font-size: 10px;
    line-height: 1.24;
    letter-spacing: 0.05em;
    white-space: normal;
    text-align: center;
  }

  .map-detail-panel {
    margin-top: 14px;
    padding-top: 18px;
    padding-bottom: 18px;
    gap: 16px;
  }

  .map-detail-intro {
    padding: 16px;
  }

  .map-detail-panel h2 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .map-detail-meta {
    grid-template-columns: 1fr;
  }

  .map-detail-ribbon {
    gap: 6px;
  }

  .map-info-block {
    padding: 14px;
  }

  .map-info-head span {
    font-size: 24px;
  }

  .map-theme-note {
    padding: 12px 0 0;
  }

  .map-theme-summary {
    font-size: 14px;
    line-height: 1.78;
  }

  .map-theme-button-badge {
    margin-top: 8px;
  }

  .map-insight-item,
  .map-monster-item p {
    font-size: 13px;
    line-height: 1.72;
  }

  .map-insight-item--deity {
    grid-template-columns: 1fr;
  }

  .map-deity-grid {
    grid-template-columns: 1fr;
  }

  .map-detail-action {
    width: 100%;
    justify-self: stretch;
    justify-content: center;
    display: inline-flex;
    align-items: center;
  }

  .map-province-strip {
    margin-top: 14px;
    padding-top: 16px;
    padding-bottom: 16px;
    gap: 12px;
  }

  .map-strip-note {
    font-size: 11px;
  }

  .map-strip-tools {
    width: 100%;
    justify-content: space-between;
  }

  .map-strip-toggle {
    width: 100%;
    align-items: stretch;
  }

  .map-strip-mode-button {
    flex: 1 1 0;
    min-height: 44px;
    justify-content: center;
  }

  .map-strip-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .map-chip {
    min-height: 104px;
    padding: 11px;
    gap: 6px;
  }

  .map-chip-main {
    font-size: 18px;
  }

  .map-chip-desc {
    font-size: 12px;
    min-height: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .map-chip-state {
    min-height: 22px;
    padding-inline: 7px;
  }

  .map-chip-stats {
    gap: 6px;
    flex-wrap: wrap;
  }

  .map-chip-meta,
  .map-monster-source,
  .map-source-note,
  .map-meta-pill {
    font-size: 9px;
  }

  .map-modal {
    padding: 0;
    align-items: flex-end;
  }

  .map-modal-panel {
    width: 100%;
    max-height: 100dvh;
    padding: 16px 14px calc(18px + env(safe-area-inset-bottom));
    border-width: 0;
    border-top: 2px solid var(--ink);
    border-radius: 24px 24px 0 0;
  }

  .map-modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: -16px -14px 12px;
    padding: max(14px, env(safe-area-inset-top)) 14px 10px;
    background: linear-gradient(180deg, rgba(248, 244, 235, 0.98), rgba(248, 244, 235, 0.92) 82%, rgba(248, 244, 235, 0));
  }

  .map-modal-head .card-label {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .map-modal-head h2 {
    font-size: clamp(32px, 10vw, 46px);
  }

  .map-modal-grid {
    gap: 10px;
  }

  .map-modal-map-shell {
    padding: 10px;
    gap: 8px;
  }

  .map-modal-canvas {
    aspect-ratio: 1.46 / 1;
    min-height: 244px;
  }

  .map-modal-copy {
    gap: 12px;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    padding-bottom: 2px;
  }

  .map-modal-province-desc {
    max-width: none;
    color: rgba(44, 44, 44, 0.7);
    font-size: 12.5px;
    line-height: 1.68;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .map-modal-copy > .map-city-strip-wrap {
    order: 1;
  }

  .map-modal-copy > .map-city-card {
    order: 2;
  }

  .map-modal-copy > .map-city-dossier {
    order: 3;
  }

  .map-modal-copy > .map-modal-meta {
    order: 5;
  }

  .map-modal-copy > .map-culture-banner--modal {
    order: 4;
  }

  .map-modal-copy > .map-modal-province-desc {
    order: 6;
  }

  .map-modal-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .map-city-card,
  .map-city-dossier,
  .map-city-strip-wrap {
    padding: 12px;
    border-radius: 18px;
  }

  .map-city-strip-wrap {
    display: grid;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
    position: sticky;
    top: calc(env(safe-area-inset-top) + 70px);
    z-index: 3;
    border-color: rgba(17, 17, 17, 0.14);
    background:
      linear-gradient(180deg, rgba(17, 17, 17, 0.045), transparent 34%),
      rgba(255, 251, 243, 0.94);
    box-shadow:
      0 8px 22px rgba(0, 0, 0, 0.06),
      0 0 0 1px rgba(17, 17, 17, 0.04);
    backdrop-filter: blur(12px);
  }

  .map-city-strip-wrap .map-strip-head {
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .map-city-strip-wrap #modal-city-index,
  .map-city-dossier #modal-dossier-count {
    min-height: 28px;
    padding: 0 10px;
  }

  .map-city-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-top: 0;
    padding-bottom: 2px;
    gap: 7px;
    scroll-padding-inline: 1px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .map-city-strip::-webkit-scrollbar {
    display: none;
  }

  .map-city-card h3 {
    font-size: 28px;
    margin: 0;
  }

  .map-city-card {
    gap: 10px;
    background:
      linear-gradient(180deg, rgba(17, 17, 17, 0.055), transparent 26%),
      linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(246, 240, 231, 0.96));
    border-color: rgba(17, 17, 17, 0.16);
  }

  .map-city-card .card-label {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .map-city-card p {
    font-size: 13px;
    line-height: 1.72;
  }

  .map-modal-deity-media {
    width: min(100%, 240px);
    margin-top: 2px;
  }

  .map-culture-banner--modal {
    gap: 6px;
    padding: 10px 12px;
    box-shadow: none;
  }

  .map-culture-banner--modal .map-culture-badge {
    min-height: 26px;
    padding-inline: 10px;
    font-size: 16px;
  }

  .map-culture-banner--modal .map-culture-caption {
    font-size: 12px;
    line-height: 1.6;
  }

  .map-modal-meta .story-stat {
    min-height: 0;
    padding: 9px 10px;
    gap: 4px;
    border-radius: 14px;
    border-color: rgba(17, 17, 17, 0.08);
    background:
      linear-gradient(180deg, rgba(17, 17, 17, 0.016), transparent 46%),
      rgba(255, 255, 255, 0.56);
    box-shadow: none;
  }

  .map-modal-meta .story-stat span {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .map-modal-meta .story-stat strong {
    font-size: 15px;
    line-height: 1.15;
  }

  .map-dossier-card {
    gap: 7px;
    padding: 13px 12px 12px;
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
    background:
      linear-gradient(180deg, rgba(17, 17, 17, 0.028), transparent 34%),
      rgba(255, 253, 247, 0.84);
  }

  .map-dossier-card h4 {
    font-size: 22px;
    line-height: 1.04;
  }

  .map-dossier-card p {
    font-size: 13px;
    line-height: 1.72;
  }

  .map-dossier-top {
    align-items: flex-start;
    gap: 7px;
  }

  .map-city-dossier {
    gap: 10px;
    background:
      linear-gradient(180deg, rgba(17, 17, 17, 0.03), transparent 24%),
      rgba(255, 251, 244, 0.92);
  }

  .map-city-dossier .map-strip-head {
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .map-dossier-list {
    gap: 9px;
    margin-top: 0;
  }

  .map-dossier-meta {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid rgba(17, 17, 17, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .map-city-chip {
    min-height: 44px;
    flex: 0 0 auto;
    padding-inline: 14px;
    font-size: 13px;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .map-subculture-chip {
    min-height: 44px;
  }

  .hero--rankings {
    padding: 20px 18px 22px;
  }

  .ranking-sigil {
    top: auto;
    right: 12px;
    bottom: 14px;
    width: 78px;
    height: 78px;
    opacity: 0.46;
  }

  .meta-chip {
    min-height: 54px;
    padding: 10px 12px;
    border-radius: 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .meta-chip strong {
    font-size: 16px;
  }

  .subnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-top: 16px;
    padding: 0 2px 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .subnav::-webkit-scrollbar {
    display: none;
  }

  .subnav-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .section-card h2,
  .section-card h3 {
    font-size: 24px;
  }

  .ranking-card {
    padding: 18px 16px 20px;
    border-radius: 18px 18px 10px 10px;
  }

  .ranking-card-top {
    gap: 10px;
  }

  .ranking-film {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-rank {
    padding-top: 4px;
    font-size: 11px;
    letter-spacing: 0.18em;
  }

  .ranking-film-title {
    font-size: 22px;
  }

  .ranking-film-original {
    font-size: 10px;
  }

  .ranking-film-note {
    font-size: 13px;
  }

  .masonry {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .masonry-card {
    gap: 12px;
    padding-bottom: 16px;
    border-radius: 16px 16px 0 0;
  }

  .masonry-card .cover-frame img {
    height: clamp(196px, 56vw, 244px);
    min-height: 196px;
    max-height: 244px;
    aspect-ratio: 1.22 / 1;
  }

  .masonry-card-body {
    gap: 10px;
    padding: 0 16px;
  }

  .story-copy h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.08;
  }

  .story-copy .summary-clamp {
    font-size: 14px;
    line-height: 1.72;
  }

  .story-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .story-card-meta span {
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 86%, rgba(216, 25, 25, 0.05));
    align-items: center;
    display: flex;
    line-height: 1.45;
    letter-spacing: 0.1em;
  }

  .card-link {
    min-height: 42px;
  }

  .story-modal {
    padding: 0;
    align-items: flex-end;
  }

  .story-modal-panel {
    width: 100%;
    max-width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    margin-top: 0;
    padding: 0 16px calc(18px + env(safe-area-inset-bottom));
    border-width: 0;
    border-top: 2px solid var(--ink);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.22);
  }

  .story-modal-head {
    position: sticky;
    top: 0;
    z-index: 4;
    gap: 10px;
    margin: 0;
    padding: max(12px, env(safe-area-inset-top)) 0 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94) 80%, rgba(255, 255, 255, 0));
  }

  .story-modal-topbar {
    align-items: center;
  }

  .story-modal-handle {
    width: 44px;
    margin-inline: auto 0;
  }

  .story-modal-progress {
    margin: 0 2px;
  }

  .story-modal-grid {
    gap: 16px;
  }

  .story-modal-cover {
    margin: -4px 0 0;
  }

  .story-modal-cover img {
    width: 100%;
    max-width: 100%;
    max-height: min(42vh, 340px);
    border-radius: 22px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
  }

  .story-modal-copy {
    gap: 12px;
  }

  .story-modal-copy h2 {
    font-size: clamp(28px, 8.6vw, 38px);
    line-height: 1.04;
  }

  .story-modal-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .story-stat {
    min-height: 0;
    padding: 10px 12px;
    gap: 6px;
    border-radius: 14px;
  }

  .story-stat strong {
    font-size: 16px;
  }

  .story-modal-section {
    gap: 12px;
    padding-top: 12px;
  }

  .story-modal-section--critique {
    padding: 14px 15px;
    border-radius: 20px;
  }

  .story-modal-text {
    font-size: 16.5px;
    line-height: 2;
    word-break: break-word;
  }

  .story-modal-critique {
    font-size: 15.5px;
    line-height: 1.9;
  }

  .story-modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 8px 0 0;
    padding: 14px 0 calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), #fff 24%);
    gap: 10px;
  }

  .story-modal-actions > * {
    flex: 1 1 100%;
  }

  .story-modal-actions .card-link {
    width: 100%;
    justify-content: space-between;
  }

  .footer-bar {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .footer-note {
    font-size: 10px;
    letter-spacing: 0.11em;
  }
}

@media (max-width: 480px) {
  .hero-meta,
  .story-card-meta,
  .story-modal-meta {
    grid-template-columns: 1fr;
  }

  .map-shell {
    min-height: 460px;
  }

  .map-canvas {
    min-height: 360px;
  }

  .map-detail-panel h2 {
    font-size: 28px;
  }

  .map-modal-canvas {
    min-height: 0;
  }

  .map-modal-close {
    min-height: 44px;
    padding-inline: 12px;
  }

  .map-city-card h3 {
    font-size: 26px;
  }

  .map-dossier-card h4 {
    font-size: 20px;
  }

  .map-detail-desc,
  .map-modal-province-desc,
  .map-insight-item,
  .map-monster-item p,
  .map-dossier-card p {
    font-size: 13px;
    line-height: 1.75;
  }

  .map-modal-meta {
    grid-template-columns: 1fr;
  }

  .map-modal-meta .story-stat strong {
    font-size: 14px;
  }

  .map-culture-banner--modal {
    padding: 9px 10px;
  }

  .map-city-strip-wrap {
    top: calc(env(safe-area-inset-top) + 66px);
    padding-bottom: 8px;
  }

  #modal-city-index,
  #modal-dossier-count {
    min-height: 26px;
    padding: 0 9px;
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .map-dossier-card {
    padding: 11px;
    border-radius: 16px;
  }

  .map-dossier-card h4 {
    font-size: 19px;
  }

  .map-dossier-card {
    gap: 7px;
  }

  .map-dossier-meta,
  .map-inline-pill {
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .map-deity-media {
    gap: 8px;
  }

  .map-deity-tag {
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .map-monster-head strong {
    font-size: 21px;
  }

  .map-chip {
    min-height: 108px;
    padding: 11px;
    font-size: 12px;
  }

  .map-strip-list {
    grid-template-columns: 1fr;
  }

  .map-chip-main {
    font-size: 18px;
  }

  .map-chip-desc {
    min-height: 0;
  }

  .map-script-switch {
    padding: 5px;
  }

  .map-script-button {
    min-height: 44px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .map-theme-button {
    padding: 13px 12px;
    border-radius: 18px;
  }

  .map-theme-button-title {
    font-size: 20px;
  }

  .map-theme-button-meta {
    font-size: 11px;
  }

  .map-theme-empty strong {
    font-size: 20px;
  }

  .story-copy h3 {
    font-size: 22px;
  }

  .story-modal-copy h2 {
    font-size: 26px;
  }

  .story-modal-text {
    font-size: 16px;
    line-height: 1.92;
  }

  .story-modal-close {
    min-height: 40px;
    padding-inline: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-title--glitch::before,
  .page-title--glitch::after,
  .ranking-card::after,
  .ranking-sigil span:nth-child(1),
  .ranking-sigil span:nth-child(2) {
    animation: none;
  }

  .ranking-card,
  .section-card,
  .subnav-link,
  .data-chip {
    transition: none;
  }
}
