:root {
  --bg-top: #f6f8fb;
  --bg-bottom: #ffffff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: rgba(249, 252, 255, 0.98);
  --line: rgba(66, 108, 156, 0.18);
  --line-strong: rgba(66, 108, 156, 0.34);
  --ink: #111111;
  --ink-soft: #263e5a;
  --accent: #426c9c;
  --accent-strong: #27486f;
  --tag-bg: rgba(66, 108, 156, 0.12);
  --shadow: 0 18px 40px rgba(47, 77, 111, 0.12);
  --font-kr: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --font-foreign: "HarmonyOS Sans SC", "HarmonyOS Sans TC", "HarmonyOS Sans", "Noto Sans SC", "Segoe UI", sans-serif;
  --sans: var(--font-kr);
  --serif: var(--font-foreign);
  --serif-sc: var(--font-foreign);
}

* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
  scroll-behavior: smooth;
  scrollbar-gutter: stable both-edges;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at top left, rgba(126, 171, 208, 0.18), transparent 24rem),
    radial-gradient(circle at top right, rgba(173, 208, 235, 0.16), transparent 28rem),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(66, 108, 156, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 108, 156, 0.028) 1px, transparent 1px);
  background-size: 2rem 2rem;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.58), transparent 85%);
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

:lang(zh),
:lang(en),
code,
.eyebrow,
.stat-label,
.analysis-kicker,
.topbar-home,
.entry-translation-shell h3,
.entry-topic-strip h3,
.reader-section h3,
.route-reader-section h4,
.original-text,
.route-reader-original,
.person-evidence-snippet {
  font-family: var(--font-foreign);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1360px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
}

.page-shell,
.page-intro,
.feature-section,
.service-panel,
.panel,
.mini-card,
.reader-layout,
.browse-layout,
.analysis-stack,
.analysis-card-grid {
  min-width: 0;
}

.page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  min-height: 4.2rem;
  margin-bottom: 0.9rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.page-nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex: 1 1 auto;
  gap: 0.5rem;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0.76rem 1rem;
  color: var(--accent-strong);
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.topbar-link:hover {
  transform: translateY(-1px);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.topbar-link.is-current {
  color: #ffffff;
  border-color: rgba(39, 72, 111, 0.45);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 30px rgba(39, 72, 111, 0.22);
}

.topbar-home {
  flex: 0 0 auto;
  color: #ffffff;
  border-color: rgba(17, 17, 17, 0.92);
  background: rgba(17, 17, 17, 0.9);
  box-shadow: 0 14px 30px rgba(17, 17, 17, 0.12);
}

.panel,
.hero-copy,
.hero-stats {
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.hero-copy {
  padding: 1.35rem 1.6rem;
  background:
    radial-gradient(circle at top right, rgba(107, 138, 174, 0.18), transparent 28%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(244, 248, 252, 0.98));
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
}

.page-intro h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.08;
}

body[data-yunshan-page="home"] .hero h1 {
  font-family: "Noto Sans KR", "Noto Sans SC", "Malgun Gothic", sans-serif;
  font-weight: 800;
}

.hero-text {
  max-width: 56rem;
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
  line-height: 1.7;
  word-break: keep-all;
}

.project-overview-section,
.project-browser-section {
  margin-bottom: 1rem;
}

.project-overview-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 1rem;
}

.project-overview-card {
  padding: 1.15rem 1.2rem;
  background:
    radial-gradient(circle at 88% 12%, rgba(49, 95, 98, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 250, 0.88));
}

.project-overview-card h2,
.section-kicker h2 {
  margin: 0;
  color: #0d2240;
  font-family: var(--sans);
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.project-overview-card p:not(.eyebrow) {
  margin: 0.72rem 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.78;
  word-break: keep-all;
}

.project-method-card {
  background:
    radial-gradient(circle at 8% 18%, rgba(156, 116, 72, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 248, 244, 0.9));
}

.project-browser-section {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 249, 248, 0.78));
  box-shadow: var(--shadow);
}

.section-kicker {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.browser-guide-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.62rem;
}

.browser-guide-card {
  display: grid;
  align-content: start;
  min-height: 10.5rem;
  padding: 0.92rem;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid rgba(55, 82, 98, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

.browser-guide-card:hover,
.browser-guide-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(49, 95, 98, 0.34);
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(24, 50, 84, 0.1);
}

.browser-guide-card span {
  color: #9c7448;
  font-family: var(--font-foreign);
  font-size: 0.72rem;
  font-weight: 900;
}

.browser-guide-card strong {
  margin-top: 0.34rem;
  color: #0d2240;
  font-size: 1.05rem;
  font-weight: 900;
}

.browser-guide-card p {
  margin: 0.62rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.55;
  word-break: keep-all;
}

body[data-yunshan-page="home"] .search-panel {
  min-height: auto;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  padding: 1rem;
  background: linear-gradient(160deg, rgba(66, 108, 156, 0.96), rgba(39, 72, 111, 0.92));
}

.stat-card {
  padding: 1rem;
  color: #f8fbff;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
}

.stat-label {
  display: block;
  margin-bottom: 0.45rem;
  color: rgba(248, 251, 255, 0.76);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat-card strong {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 2.4rem);
}

.search-section,
.feature-section {
  margin-bottom: 1rem;
}

.page-intro {
  display: grid;
  align-content: center;
  min-height: 6.6rem;
  margin-bottom: 1rem;
}

.service-panel,
.detail-panel {
  padding: 1rem;
  background: var(--panel);
}

.service-panel {
  min-height: 46rem;
}

.feature-section > .service-panel,
.search-section > .service-panel {
  width: 100%;
}

.panel-head {
  min-height: 4.65rem;
}

.panel-head h2 {
  margin: 0;
  color: #0d2240;
  font-family: var(--serif);
  font-size: 1.2rem;
}

.panel-head p {
  margin: 0.35rem 0 0.9rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  word-break: keep-all;
}

.panel-content {
  margin-top: 0;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  max-width: 64rem;
}

.search-box input {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.9rem 1rem;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(66, 108, 156, 0.12);
}

.search-box button,
.tab-button,
.example-row button,
.entry-card,
.entity-card,
.calendar-cell {
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0 1.25rem;
  color: #ffffff;
  border: 1px solid var(--accent-strong);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-weight: 800;
}

.yunshan-search-console {
  display: grid;
  gap: 0.75rem;
  max-width: 72rem;
}

.yunshan-search-group {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.yunshan-search-mode-bar {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.35rem;
  min-height: 3.05rem;
  padding: 0.24rem;
  border: 1px solid rgba(66, 108, 156, 0.22);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  box-shadow: 0 12px 24px rgba(47, 77, 111, 0.08);
}

.search-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.42rem;
  padding: 0 0.72rem;
  color: #38526e;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.search-mode-pill:hover,
.search-mode-pill:focus-visible {
  color: #10263f;
  border-color: rgba(66, 108, 156, 0.2);
  background: rgba(66, 108, 156, 0.08);
  outline: none;
}

.search-mode-pill.is-selected {
  color: #0d2240;
  border-color: rgba(66, 108, 156, 0.26);
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(47, 77, 111, 0.1);
}

.search-mode-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  color: #ffffff;
  border-radius: 9px;
  font-family: var(--font-foreign);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.search-mode-mark-auto {
  background: linear-gradient(135deg, #426c9c, #7f9ab8);
}

.search-mode-mark-ontology {
  background: linear-gradient(135deg, #315f62, #88a8a0);
}

.search-mode-mark-ai {
  background: linear-gradient(135deg, #9c7448, #d2a86d);
}

.yunshan-search-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.yunshan-search-wrap input {
  width: 100%;
  min-height: 3.05rem;
  padding: 0 1rem;
  color: var(--ink);
  border: 1px solid rgba(66, 108, 156, 0.3);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 253, 0.96));
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.yunshan-search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(66, 108, 156, 0.12);
}

.yunshan-search-button,
.yunshan-settings-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 3.05rem;
  min-height: 3.05rem;
  padding: 0 0.9rem;
  border-radius: 16px;
  font-weight: 900;
}

.yunshan-search-button {
  color: #ffffff;
  border: 1px solid var(--accent-strong);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.yunshan-search-button svg {
  width: 1.16rem;
  height: 1.16rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.yunshan-search-reset {
  color: #27486f;
  border-color: rgba(66, 108, 156, 0.24);
  background: #ffffff;
}

.yunshan-settings-toggle {
  color: #27486f;
  border: 1px solid rgba(66, 108, 156, 0.24);
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  box-shadow: 0 10px 20px rgba(47, 77, 111, 0.08);
}

.yunshan-settings-toggle.is-active {
  color: #0d2240;
  border-color: rgba(49, 95, 98, 0.36);
  background: #ffffff;
}

.yunshan-search-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.38fr);
  gap: 0.9rem;
  padding: 0.9rem;
  color: var(--ink-soft);
  border: 1px solid rgba(66, 108, 156, 0.18);
  border-radius: 18px;
  background: rgba(249, 252, 255, 0.94);
  box-shadow: 0 12px 26px rgba(47, 77, 111, 0.08);
}

.yunshan-search-settings.is-hidden {
  display: none;
}

.yunshan-search-settings strong,
.yunshan-model-field span {
  display: block;
  color: #0d2240;
  font-size: 0.86rem;
  font-weight: 900;
}

.yunshan-search-settings p {
  margin: 0.28rem 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
}

.yunshan-model-field {
  display: grid;
  gap: 0.42rem;
}

.yunshan-model-field select {
  min-height: 2.75rem;
  padding: 0 0.72rem;
  color: var(--ink);
  border: 1px solid rgba(66, 108, 156, 0.28);
  border-radius: 14px;
  background: #ffffff;
  font: inherit;
}

.example-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.example-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.62rem 1.05rem;
  color: #0d2240;
  border: 1px solid rgba(66, 108, 156, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 252, 0.84));
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.tab-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.48rem;
  margin: 0 0 -1px;
  padding: 0.55rem 1.18rem 0.64rem;
  color: rgba(13, 34, 64, 0.66);
  border: 1px solid rgba(55, 82, 98, 0.2);
  border-bottom-color: rgba(55, 82, 98, 0.2);
  border-radius: 13px 13px 0 0;
  background: #edf3f2;
  box-shadow: none;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.tab-button::before {
  display: none;
  content: "";
}

.tab-button::after {
  display: none;
  content: "";
}

.example-row button:hover,
.entry-card:hover,
.entity-card:hover,
.calendar-cell.has-entry:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.tab-button:hover {
  z-index: 2;
  transform: none;
  color: #0d2240;
  border-color: rgba(55, 82, 98, 0.28);
  background: #f7faf8;
  box-shadow: none;
}

.tab-button.is-active {
  z-index: 3;
  color: #0d2240;
  border-color: rgba(55, 82, 98, 0.28);
  border-bottom-color: #ffffff;
  background: #ffffff;
  box-shadow: none;
}

.tab-button.is-active::before {
  display: none;
  background: transparent;
}

.ai-search-note {
  margin-top: 0.8rem;
  padding: 0.95rem;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(245, 248, 252, 0.9);
  font-size: 0.92rem;
  line-height: 1.6;
  overflow: visible;
}

.ai-search-note strong {
  color: #0d2240;
}

.answer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.55rem 0 0.72rem;
}

.answer-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: 0.18rem 0.52rem;
  color: #315f62;
  border: 1px solid rgba(49, 95, 98, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.75rem;
  font-weight: 900;
}

.answer-body {
  max-height: none;
  overflow: visible;
  color: var(--ink);
  white-space: normal;
  word-break: keep-all;
}

.analysis-stack {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.reader-layout,
.browse-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, 0.72fr);
  gap: 1rem;
  align-items: start;
}

body[data-yunshan-page="calendar"] .reader-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}

body[data-yunshan-page="calendar"] .calendar-panel {
  min-height: auto;
  overflow: hidden;
  padding: 0.8rem;
}

body[data-yunshan-page="calendar"] .detail-panel {
  position: static;
  max-height: none;
  min-height: 44rem;
}

body[data-yunshan-page="calendar"] .calendar-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.4rem;
  padding: 0.45rem;
  text-align: center;
}

body[data-yunshan-page="calendar"] .calendar-day-number {
  font-size: 1.08rem;
}

body[data-yunshan-page="calendar"] .entry-translation-shell:first-of-type {
  background: rgba(255, 255, 255, 0.9);
}

body[data-yunshan-page="calendar"] .entry-translation-shell p {
  font-size: clamp(1.04rem, 1.32vw, 1.18rem);
  line-height: 1.82;
}

body[data-yunshan-page="calendar"] .original-text {
  font-size: clamp(1.04rem, 1.32vw, 1.18rem);
}

.calendar-timeline-view {
  inline-size: 100%;
  max-inline-size: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  padding: 0.28rem 0.22rem 0.12rem;
  border: 1px solid rgba(83, 117, 158, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 249, 250, 0.76)),
    radial-gradient(circle at 12% 18%, rgba(49, 95, 98, 0.08), transparent 28%);
}

.calendar-timeline-rail {
  position: relative;
  display: flex;
  align-items: end;
  gap: 0;
  width: 100%;
  min-width: 0;
  padding: 0.34rem 0.12rem 0.12rem;
}

.calendar-timeline-rail::before {
  position: absolute;
  right: 0.55rem;
  left: 0.55rem;
  top: 1.5rem;
  height: 1px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(49, 95, 98, 0.18), rgba(156, 116, 72, 0.3), rgba(49, 95, 98, 0.18));
}

.calendar-timeline-day {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 1 1 0;
  justify-items: center;
  align-content: start;
  gap: 0.04rem;
  min-width: 0;
  min-height: 2.35rem;
  padding: 0;
  color: var(--ink);
  border: 0;
  background: transparent;
  text-align: center;
}

.calendar-timeline-month {
  min-height: 0.82rem;
  color: #9c7448;
  font-size: 0.5rem;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-timeline-dot {
  width: 0.46rem;
  height: 0.46rem;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  background: #315f62;
  box-shadow: 0 0 0 3px rgba(49, 95, 98, 0.14);
  transition:
    transform 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

.calendar-timeline-day strong {
  color: #0d2240;
  font-family: var(--serif);
  font-size: clamp(0.5rem, 0.72vw, 0.68rem);
  line-height: 1.05;
}

.calendar-timeline-day:hover .calendar-timeline-dot,
.calendar-timeline-day:focus-visible .calendar-timeline-dot,
.calendar-timeline-day.is-active .calendar-timeline-dot {
  transform: scale(1.45);
  background: #9c7448;
  box-shadow: 0 0 0 4px rgba(156, 116, 72, 0.16);
}

.calendar-timeline-day.is-active strong {
  color: #9c7448;
}

.calendar-strip-view {
  display: grid;
  gap: 0.78rem;
  max-height: min(52rem, calc(100vh - 6rem));
  overflow: auto;
  padding-right: 0.2rem;
}

.calendar-strip-month {
  display: grid;
  gap: 0.45rem;
  padding: 0.72rem;
  border: 1px solid rgba(83, 117, 158, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 249, 250, 0.72)),
    radial-gradient(circle at 12% 12%, rgba(156, 116, 72, 0.08), transparent 34%);
}

.calendar-strip-month h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0;
  color: #0d2240;
  font-family: var(--serif);
  font-size: 1rem;
}

.calendar-strip-month h3 em {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.calendar-strip-list {
  display: grid;
  gap: 0.42rem;
}

.calendar-strip-day {
  display: grid;
  grid-template-columns: 2.3rem minmax(0, 1fr);
  gap: 0.62rem;
  align-items: center;
  width: 100%;
  padding: 0.48rem;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(83, 117, 158, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

.calendar-strip-day:hover,
.calendar-strip-day:focus-visible,
.calendar-strip-day.is-active {
  transform: translateY(-1px);
  border-color: rgba(49, 95, 98, 0.42);
  background: #fffdf8;
  box-shadow: 0 12px 24px rgba(24, 50, 84, 0.12);
}

.calendar-strip-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  color: #fffdf8;
  border-radius: 999px;
  background: #315f62;
  font-family: var(--serif);
  font-weight: 900;
}

.calendar-strip-meta {
  min-width: 0;
}

.calendar-strip-meta strong,
.calendar-strip-meta em {
  display: block;
}

.calendar-strip-meta strong {
  color: #9c7448;
  font-size: 0.72rem;
  font-weight: 900;
}

.calendar-strip-meta em {
  margin-top: 0.12rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.35;
}

.entity-summary-panel {
  margin-bottom: 1rem;
}

.entity-family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
}

.entity-family-card {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
}

.entity-family-card strong {
  display: block;
  color: #0d2240;
  font-family: var(--serif);
  font-size: 1rem;
}

.entity-family-card span {
  display: block;
  margin-top: 0.32rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.browser-panel,
.detail-panel {
  min-height: 36rem;
}

.detail-panel {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: var(--panel-strong);
}

.tab-bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.04rem;
  width: 100%;
  max-width: 100%;
  margin: 0 0 -1px;
  padding: 0 0 0 0.9rem;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.network-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: fit-content;
  max-width: 100%;
}

.tab-bar + .analysis-stack,
.tab-bar + .topic-tab-panel,
.tab-bar + .people-tab-panel {
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding: 1.05rem;
  border: 1px solid rgba(55, 82, 98, 0.26);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, rgba(248, 251, 250, 0.92));
  box-shadow:
    0 14px 28px rgba(24, 50, 84, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.month-stack,
.entity-grid,
.entry-list,
.event-feed,
.analysis-card-grid,
.topic-rhythm {
  display: grid;
  gap: 0.75rem;
}

.month-card,
.entry-card,
.entity-card,
.mini-card,
.insight-card,
.reader-empty,
.error-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
}

.mini-card,
.insight-card {
  padding: 0.95rem;
}

button.insight-card {
  width: 100%;
  color: var(--ink);
  text-align: left;
}

.mini-card strong,
.insight-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #0d2240;
  font-family: var(--serif);
  font-size: 1.06rem;
}

.mini-card p,
.insight-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.analysis-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.browser-grid {
  align-items: stretch;
}

.topic-rhythm {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.topic-mode-tabs,
.people-mode-tabs {
  margin: 0 0 -1px;
}

.topic-mode-tabs .tab-button,
.people-mode-tabs .tab-button,
.imperial-mode-tabs .tab-button,
body[data-yunshan-page="places"] .tab-bar .tab-button,
body[data-yunshan-page="materials"] .tab-bar .tab-button {
  min-width: 8.8rem;
}

.topic-tab-panel,
.people-tab-panel {
  display: grid;
  gap: 0.85rem;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
}

.people-network-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 0.9rem;
  align-items: stretch;
  min-width: 0;
}

.people-network-workbench.is-single-view {
  grid-template-columns: minmax(0, 1fr);
}

.people-network-map,
.people-network-lens,
.people-network-evidence {
  min-width: 0;
}

.people-network-map .person-network-panel,
.people-network-lens .person-network-panel {
  height: 100%;
}

.people-network-map .network-pair-list {
  display: none;
}

.people-network-lens .network-pair-list {
  max-height: 9.5rem;
  overflow: auto;
}

.people-network-evidence {
  display: grid;
  grid-column: 1 / -1;
  gap: 0.85rem;
}

.chip-button {
  color: #ffffff;
  border-color: transparent;
  background: #27486f;
  cursor: pointer;
}

.chip-button:hover,
.chip-button:focus-visible {
  background: #0d2240;
}

.people-evidence-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border-color: rgba(31, 111, 115, 0.16);
  background:
    radial-gradient(circle at 12% 20%, rgba(31, 111, 115, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.9);
}

.people-evidence-summary strong {
  margin: 0.16rem 0 0;
}

.people-evidence-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(0, 2.05fr);
  gap: 0.9rem;
  min-width: 0;
}

.people-evidence-list {
  max-height: 32rem;
  overflow: auto;
  padding-right: 0.15rem;
}

.people-evidence-reader {
  min-width: 0;
}

.person-evidence-row {
  display: grid;
  grid-template-columns: minmax(7.2rem, 0.42fr) minmax(0, 1.58fr);
  gap: 0.68rem;
  align-items: center;
  width: 100%;
  padding: 0.64rem 0.72rem;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(83, 117, 158, 0.13);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.74);
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.person-evidence-row:hover,
.person-evidence-row:focus-visible,
.person-evidence-row.is-active {
  border-color: rgba(31, 111, 115, 0.32);
  background: #ffffff;
  transform: translateY(-1px);
}

.person-evidence-row strong {
  color: #0d2240;
  font-family: var(--serif);
  font-size: 0.92rem;
}

.person-evidence-snippet {
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--serif-sc);
  font-size: 0.92rem;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-hit {
  padding: 0.08rem 0.18rem;
  color: #ffffff;
  border-radius: 0.38rem;
  background: #b85f2e;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.topic-matrix-panel,
.topic-list-panel {
  display: grid;
  gap: 0.75rem;
  inline-size: 100%;
  max-inline-size: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid rgba(83, 117, 158, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% 16%, rgba(83, 117, 158, 0.1), transparent 30%),
    rgba(255, 255, 255, 0.86);
}

.topic-list-browser {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 5fr);
  gap: 0.85rem;
  min-width: 0;
}

.topic-list-sidebar,
.topic-list-main,
.topic-list-detail-card {
  min-width: 0;
}

.topic-list-sidebar {
  max-height: 42rem;
  overflow: auto;
  padding: 0.38rem;
  border: 1px solid rgba(83, 117, 158, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.topic-list-main {
  display: grid;
  gap: 0.85rem;
}

.topic-list-item {
  display: grid;
  gap: 0.16rem;
  width: 100%;
  margin: 0 0 0.36rem;
  padding: 0.62rem 0.64rem;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(83, 117, 158, 0.14);
  border-left: 0.28rem solid var(--topic-color, var(--accent));
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.7);
  transition:
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.topic-list-item:last-child {
  margin-bottom: 0;
}

.topic-list-item:hover,
.topic-list-item.is-active {
  border-color: rgba(39, 72, 111, 0.28);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--topic-color, var(--accent)) 12%, transparent), transparent 48%),
    #ffffff;
  transform: translateX(2px);
}

.topic-list-item strong {
  color: #0d2240;
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.25;
}

.topic-list-item span {
  color: var(--ink-soft);
  font-size: 0.73rem;
  font-weight: 800;
}

.topic-list-detail-card {
  padding: 1rem;
  border: 1px solid rgba(83, 117, 158, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 8% 14%, color-mix(in srgb, var(--topic-color, var(--accent)) 10%, transparent), transparent 34%),
    rgba(255, 255, 255, 0.86);
}

.topic-list-detail-head {
  display: grid;
  gap: 0.22rem;
  margin-bottom: 0.78rem;
}

.topic-list-detail-head span {
  color: var(--topic-color, var(--accent));
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topic-list-detail-head h3 {
  margin: 0;
  color: #0d2240;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.topic-list-detail-head p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 800;
}

.topic-entry-list {
  display: grid;
  gap: 0.5rem;
  max-height: 31rem;
  overflow: auto;
  padding-right: 0.25rem;
}

.topic-entry-row {
  display: grid;
  grid-template-columns: minmax(8.5rem, 0.9fr) minmax(0, 4.1fr);
  gap: 0.75rem;
  align-items: start;
  width: 100%;
  padding: 0.72rem 0.84rem;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(83, 117, 158, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.topic-entry-row:hover,
.topic-entry-row.is-active {
  border-color: rgba(39, 72, 111, 0.32);
  background: #ffffff;
  transform: translateY(-1px);
}

.topic-entry-row strong {
  color: #0d2240;
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.35;
}

.topic-entry-row span {
  color: var(--ink-soft);
  font-family: var(--serif);
  line-height: 1.62;
}

.topic-matrix-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.65rem;
}

.topic-matrix-head > * {
  min-width: 0;
}

.topic-matrix-head strong {
  display: block;
  color: #0d2240;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.topic-matrix-head p {
  max-width: 44rem;
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.58;
}

.topic-matrix-scroll {
  display: block;
  inline-size: 100%;
  width: 100%;
  max-inline-size: 100%;
  max-width: 100%;
  min-width: 0;
  min-inline-size: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  padding-bottom: 0;
  border: 1px solid rgba(83, 117, 158, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 249, 252, 0.8)),
    repeating-linear-gradient(90deg, rgba(39, 72, 111, 0.04) 0 1px, transparent 1px 24px);
}

.topic-matrix-grid {
  display: grid;
  inline-size: max-content;
  width: max-content;
  max-inline-size: none;
  max-width: none;
  min-width: 0;
  gap: 3px;
  padding: 0.62rem;
}

body[data-yunshan-page="topics"] .service-panel,
body[data-yunshan-page="topics"] #topics-panel-body,
body[data-yunshan-page="topics"] .analysis-stack {
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  overflow-x: clip;
}

body[data-yunshan-page="places"] #places-panel-body,
body[data-yunshan-page="topics"] .topic-tab-panel,
body[data-yunshan-page="materials"] #materials-panel-body,
body[data-yunshan-page="topics"] #topics-panel-body,
body[data-yunshan-page="institutions"] #institutions-panel-body,
body[data-yunshan-page="institutions"] .imperial-tab-panel {
  gap: 0.85rem;
}

body[data-yunshan-page="places"] #places-panel-body,
body[data-yunshan-page="institutions"] #institutions-panel-body,
body[data-yunshan-page="materials"] #materials-panel-body,
body[data-yunshan-page="topics"] #topics-panel-body {
  min-height: 42rem;
}

body[data-yunshan-page="places"] .route-map-panel,
body[data-yunshan-page="places"] .place-overview-panel,
body[data-yunshan-page="institutions"] .entity-list-panel,
body[data-yunshan-page="materials"] .entity-list-panel,
body[data-yunshan-page="topics"] .topic-matrix-panel,
body[data-yunshan-page="topics"] .topic-list-panel {
  padding: 1rem;
  border: 1px solid rgba(83, 117, 158, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% 16%, rgba(83, 117, 158, 0.1), transparent 30%),
    rgba(255, 255, 255, 0.86);
}

body[data-yunshan-page="places"] .route-map-panel .network-head strong,
body[data-yunshan-page="places"] .place-overview-panel .network-head strong,
body[data-yunshan-page="institutions"] .entity-list-head h2,
body[data-yunshan-page="materials"] .entity-list-head h2,
body[data-yunshan-page="topics"] .topic-matrix-head strong {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.topic-matrix-corner,
.topic-date-head,
.topic-row-label,
.topic-cell {
  min-height: 14px;
  border: 0;
  border-radius: 4px;
}

.topic-date-head {
  min-width: 14px;
  min-height: 2.85rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  line-height: 1;
}

.topic-matrix-corner,
.topic-date-head {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.58rem;
  font-weight: 900;
}

.topic-matrix-corner {
  position: sticky;
  left: 0;
  z-index: 3;
  justify-content: flex-start;
  min-height: 2.85rem;
  padding-left: 0.48rem;
  border-radius: 6px;
}

.topic-row-label {
  position: sticky;
  left: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 0.24rem;
  min-height: 18px;
  padding: 0.14rem 0.38rem;
  color: #0d2240;
  text-align: left;
  border-left: 0.2rem solid var(--topic-color, var(--accent));
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
}

.topic-row-label span {
  color: var(--topic-color, var(--accent));
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.topic-row-label strong {
  font-family: var(--serif);
  font-size: 0.72rem;
  line-height: 1;
}

.topic-column-head {
  min-width: 14px;
  color: #0d2240;
  border-top: 0;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.topic-column-head:hover,
.topic-column-head:focus-visible {
  color: #111111;
  background: #fffdf8;
}

.topic-date-label {
  min-height: 18px;
  border-left: 0;
  background: rgba(255, 255, 255, 0.96);
}

.topic-date-label span {
  color: var(--ink-soft);
  font-size: 0.66rem;
  letter-spacing: 0;
}

.topic-date-label strong {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 900;
}

.topic-cell {
  display: block;
  inline-size: 14px;
  block-size: 14px;
  width: 14px;
  height: 14px;
  align-self: center;
  justify-self: center;
  background: rgba(83, 117, 158, 0.06);
}

.topic-cell.has-topic {
  background: var(--topic-color, var(--accent));
  cursor: pointer;
  box-shadow: none;
  transition:
    transform 140ms ease,
    filter 140ms ease;
}

.topic-cell.has-topic:hover,
.topic-cell.has-topic:focus-visible,
.topic-cell.has-topic.is-active {
  filter: brightness(1.08) saturate(1.12);
  transform: scale(1.18);
}

.weather-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fffdf8;
  font-family: var(--serif-sc);
  font-size: 0.58rem;
  font-weight: 900;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

.weather-cell.is-clear {
  color: #4d3510;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.6);
}

.weather-cell.is-rain {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0 2px, transparent 2px 7px),
    var(--topic-color, #5277b8);
}

.weather-cell.is-cloudy {
  background:
    radial-gradient(circle at 32% 36%, rgba(255, 255, 255, 0.22) 0 20%, transparent 21%),
    var(--topic-color, #6f7783);
}

.weather-cell.is-cold {
  background:
    radial-gradient(circle at 38% 38%, rgba(255, 255, 255, 0.26) 0 18%, transparent 19%),
    var(--topic-color, #5a7d9a);
}

.weather-cell.is-warm {
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.22) 0 18%, transparent 19%),
    var(--topic-color, #c96d3a);
}

.topic-reader-panel {
  margin-top: 0;
}

.topic-card {
  border-left: 0.32rem solid var(--topic-color, var(--accent));
}

.topic-card .analysis-kicker {
  color: var(--topic-color, var(--accent));
}

.topic-focus-card {
  border-left: 0.36rem solid var(--topic-color, var(--accent));
}

.secondary-topic-panel {
  display: block;
}

.secondary-topic-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: #0d2240;
  font-family: var(--serif);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.secondary-topic-panel summary::-webkit-details-marker {
  display: none;
}

.secondary-topic-panel summary span {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 800;
}

.secondary-topic-panel .topic-rhythm {
  margin-top: 0.85rem;
}

.person-network-panel {
  min-width: 0;
  overflow: hidden;
  padding: 1rem;
  background:
    radial-gradient(circle at 22% 18%, rgba(86, 132, 190, 0.16), transparent 32%),
    radial-gradient(circle at 78% 28%, rgba(179, 205, 230, 0.2), transparent 30%),
    rgba(255, 255, 255, 0.88);
}

.network-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.network-head p {
  max-width: 48rem;
}

.network-summary {
  justify-content: flex-end;
}

.network-controls {
  margin: 0 0 0.85rem;
}

.network-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 1.9rem;
  padding: 0.34rem 0.62rem;
  color: var(--ink-soft);
  border: 1px solid rgba(83, 117, 158, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

button.legend-item {
  cursor: pointer;
}

button.legend-item:hover,
button.legend-item:focus-visible {
  border-color: rgba(39, 72, 111, 0.28);
  background: rgba(255, 255, 255, 0.95);
}

.legend-toggle.is-active {
  color: #0d2240;
  border-color: rgba(155, 93, 47, 0.34);
  background: #fffaf2;
  box-shadow: inset 0 0 0 2px rgba(155, 93, 47, 0.08);
}

.legend-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: #27486f;
  box-shadow: 0 0 0 3px rgba(39, 72, 111, 0.12);
}

.legend-dot.is-protagonist {
  background: #9b5d2f;
  box-shadow: 0 0 0 3px rgba(155, 93, 47, 0.14);
}

.legend-dot.is-selected {
  background: #1f6f73;
  box-shadow: 0 0 0 3px rgba(31, 111, 115, 0.14);
}

.legend-line {
  width: 1.6rem;
  height: 0;
  border-top: 3px solid rgba(39, 72, 111, 0.56);
}

.legend-line.is-dashed {
  border-top-style: dashed;
  border-top-color: rgba(155, 93, 47, 0.5);
}

.network-canvas {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(83, 117, 158, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(247, 250, 253, 0.9), rgba(236, 244, 252, 0.72)),
    repeating-linear-gradient(90deg, rgba(39, 72, 111, 0.045) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(0deg, rgba(39, 72, 111, 0.04) 0 1px, transparent 1px 46px);
}

.person-network-svg {
  display: block;
  width: 100%;
  min-width: 1040px;
  height: auto;
}

.network-edges line {
  stroke: rgba(39, 72, 111, 0.28);
  stroke-linecap: round;
  transition:
    opacity 160ms ease,
    stroke 160ms ease,
    stroke-width 160ms ease;
}

.network-edges line.is-protagonist-edge {
  display: none;
  stroke: rgba(155, 93, 47, 0.13);
  stroke-dasharray: 4 7;
}

.network-edges line.is-coappearance-edge {
  display: none;
  stroke: rgba(39, 72, 111, 0.32);
}

.network-edges line.is-selected-edge {
  stroke: rgba(31, 111, 115, 0.38);
}

.person-network-svg.show-spokes .network-edges line.is-protagonist-edge {
  display: block;
}

.person-network-svg.show-coappearance .network-edges line.is-coappearance-edge {
  display: block;
}

.network-edges line.is-highlighted {
  display: block;
  opacity: 1;
  stroke: #9b5d2f;
  stroke-width: 5.5;
}

.person-network-svg.has-network-focus .network-edges line {
  opacity: 0.06;
}

.person-network-svg.has-network-focus .network-edges line.is-highlighted {
  opacity: 1;
}

.network-edges line.is-dimmed {
  opacity: 0.04;
}

.person-network-node {
  cursor: pointer;
  opacity: var(--node-opacity, 1);
  outline: none;
  transition: opacity 160ms ease;
}

.person-network-node circle {
  fill: rgba(39, 72, 111, 0.9);
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 2.5;
  filter: drop-shadow(0 8px 12px rgba(24, 50, 84, 0.18));
  transition:
    fill 140ms ease,
    stroke 140ms ease,
    transform 140ms ease;
}

.person-network-node text {
  fill: #0d2240;
  font-family: var(--serif);
  font-size: 0.74rem;
  font-weight: 700;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 4px;
  text-anchor: middle;
  transition:
    opacity 160ms ease,
    font-size 160ms ease,
    fill 160ms ease;
}

.person-network-svg[data-motion-network="people"] .person-network-node text {
  font-size: 0.58rem;
  font-weight: 800;
  stroke-width: 3.2px;
}

.person-network-svg[data-motion-network="people"] .person-network-node.is-protagonist text,
.person-network-svg[data-motion-network="people"] .person-network-node.is-current-person text {
  font-size: 0.82rem;
}

.network-node-label.is-hidden-label {
  opacity: 0;
}

.person-network-svg.has-network-focus .person-network-node {
  opacity: 0.16;
}

.person-network-svg.has-network-focus .person-network-node.is-focus,
.person-network-svg.has-network-focus .person-network-node.is-neighbor {
  opacity: 1;
}

.person-network-svg.has-network-focus .person-network-node.is-dimmed text {
  opacity: 0;
}

.person-network-svg.has-network-focus .person-network-node.is-focus .network-node-label,
.person-network-svg.has-network-focus .person-network-node.is-neighbor .network-node-label {
  opacity: 1;
}

.person-network-node.is-focus circle:not(.protagonist-halo):not(.selected-halo) {
  fill: #b85f2e;
  stroke: #ffffff;
  stroke-width: 4;
  transform: scale(1.18);
  filter: drop-shadow(0 20px 26px rgba(155, 93, 47, 0.3));
}

.person-network-node.is-neighbor circle:not(.protagonist-halo):not(.selected-halo) {
  fill: #315f62;
  stroke: #ffffff;
  stroke-width: 3.2;
  transform: scale(1.08);
}

.person-network-node.is-focus text {
  fill: #6e3f22;
  font-size: 0.9rem;
  font-weight: 900;
}

.person-network-node.is-neighbor text {
  fill: #123f54;
  font-weight: 900;
}

.person-network-node.is-protagonist {
  cursor: default;
}

.person-network-node.is-protagonist .protagonist-halo {
  fill: rgba(155, 93, 47, 0.12);
  stroke: rgba(155, 93, 47, 0.18);
  stroke-width: 1.5;
  animation: protagonistPulse 3.6s ease-in-out infinite;
  filter: none;
}

.person-network-node.is-protagonist circle:not(.protagonist-halo) {
  fill: #9b5d2f;
  stroke: #fff7eb;
  stroke-width: 4;
  filter: drop-shadow(0 18px 24px rgba(112, 66, 31, 0.26));
}

.person-network-node.is-protagonist text {
  fill: #6e3f22;
  font-size: 0.92rem;
  font-weight: 900;
}

.selected-person-network {
  background:
    radial-gradient(circle at 24% 22%, rgba(31, 111, 115, 0.14), transparent 30%),
    radial-gradient(circle at 82% 26%, rgba(155, 93, 47, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.9);
}

.selected-network-canvas .person-network-svg {
  min-width: 720px;
}

.person-network-node.is-selected .selected-halo {
  fill: rgba(31, 111, 115, 0.12);
  stroke: rgba(31, 111, 115, 0.18);
  stroke-width: 1.5;
  animation: protagonistPulse 3.2s ease-in-out infinite;
  filter: none;
}

.person-network-node.is-selected circle:not(.selected-halo) {
  fill: #1f6f73;
  stroke: #ffffff;
  stroke-width: 4;
  filter: drop-shadow(0 18px 24px rgba(31, 111, 115, 0.24));
}

.person-network-node.is-selected text {
  fill: #124c50;
  font-size: 0.95rem;
  font-weight: 900;
}

.person-network-node.is-current-person circle:not(.protagonist-halo):not(.selected-halo) {
  fill: #1f6f73;
  stroke: #fffdf7;
  stroke-width: 4;
  filter: drop-shadow(0 18px 24px rgba(31, 111, 115, 0.26));
}

.person-network-node.is-current-person text {
  fill: #124c50;
  font-size: 0.9rem;
  font-weight: 900;
}

.person-network-node:not(.is-protagonist):hover circle,
.person-network-node:not(.is-protagonist):focus-visible circle,
.person-network-node.is-highlighted circle {
  fill: #9b5d2f;
  stroke: #ffffff;
  transform: scale(1.08);
}

@keyframes protagonistPulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.48;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.9;
  }
}

.network-note {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.network-pair-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.network-pair-list .analysis-kicker {
  grid-column: 1 / -1;
}

.network-pair-card {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(83, 117, 158, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.network-pair-card:hover,
.network-pair-card:focus-visible {
  border-color: rgba(155, 93, 47, 0.42);
  background: rgba(255, 248, 238, 0.9);
}

.network-pair-card strong {
  color: #0d2240;
  font-family: var(--serif);
  font-size: 0.92rem;
}

.network-pair-card span {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.route-map-panel {
  overflow: hidden;
  padding: 1rem;
  background:
    radial-gradient(circle at 18% 28%, rgba(95, 132, 171, 0.14), transparent 28%),
    radial-gradient(circle at 86% 32%, rgba(142, 180, 213, 0.22), transparent 34%),
    rgba(255, 255, 255, 0.9);
}

.place-overview-panel {
  padding: 1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 24%, rgba(116, 161, 200, 0.18), transparent 30%),
    radial-gradient(circle at 74% 38%, rgba(155, 93, 47, 0.12), transparent 28%),
    rgba(255, 255, 255, 0.9);
}

.place-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 0.9rem;
  align-items: stretch;
}

.place-sketch-map {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border: 1px solid rgba(83, 117, 158, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 18% 42%, rgba(116, 161, 200, 0.34) 0 15%, transparent 16%),
    radial-gradient(circle at 48% 55%, rgba(255, 255, 255, 0.88) 0 34%, transparent 35%),
    linear-gradient(135deg, rgba(240, 247, 251, 0.94), rgba(225, 237, 247, 0.78)),
    repeating-linear-gradient(90deg, rgba(39, 72, 111, 0.035) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(0deg, rgba(39, 72, 111, 0.032) 0 1px, transparent 1px 38px);
}

.place-sketch-water {
  position: absolute;
  left: 9%;
  top: 36%;
  color: rgba(39, 72, 111, 0.46);
  font-family: var(--serif);
  font-weight: 900;
}

.place-sketch-wall {
  position: absolute;
  inset: 18% 20% 16% 28%;
  border: 2px solid rgba(39, 72, 111, 0.18);
  border-radius: 38% 32% 34% 40%;
  transform: rotate(-8deg);
}

.place-sketch-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  min-width: 4.2rem;
  padding: 0.38rem 0.55rem;
  color: #0d2240;
  border: 1px solid rgba(39, 72, 111, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 18px rgba(39, 72, 111, 0.12);
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.place-sketch-node::before {
  content: "";
  display: inline-block;
  width: 0.48rem;
  height: 0.48rem;
  margin-right: 0.32rem;
  border-radius: 999px;
  background: #9b5d2f;
  box-shadow: 0 0 0 3px rgba(155, 93, 47, 0.12);
}

.place-sketch-node:hover,
.place-sketch-node:focus-visible,
.place-overview-card:hover,
.place-overview-card:focus-visible {
  border-color: rgba(155, 93, 47, 0.42);
  background: #fffaf2;
  transform: translate(-50%, -50%) translateY(-1px);
}

.place-overview-card:hover,
.place-overview-card:focus-visible {
  transform: translateY(-1px);
}

.place-overview-list {
  display: grid;
  gap: 0.55rem;
}

.place-overview-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.16rem 0.6rem;
  align-content: center;
  min-height: 4rem;
  padding: 0.72rem;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(83, 117, 158, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.place-overview-card span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  color: #ffffff;
  border-radius: 999px;
  background: #27486f;
  font-size: 0.78rem;
  font-weight: 900;
}

.place-overview-card strong {
  color: #0d2240;
  font-family: var(--serif);
  font-size: 0.98rem;
}

.place-overview-card em {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.map-focus-summary,
.place-mode-note {
  padding: 0.95rem;
  border: 1px solid rgba(83, 117, 158, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.map-focus-summary strong,
.place-mode-note strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #0d2240;
  font-family: var(--serif);
  font-size: 1.02rem;
}

.map-focus-summary p,
.place-mode-note p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.route-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
  gap: 0.9rem;
  align-items: stretch;
}

.route-map-canvas {
  overflow: hidden;
  border: 1px solid rgba(83, 117, 158, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(249, 252, 253, 0.94), rgba(228, 239, 249, 0.84)),
    repeating-linear-gradient(90deg, rgba(39, 72, 111, 0.038) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(39, 72, 111, 0.035) 0 1px, transparent 1px 44px);
}

.route-map-svg {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
}

.route-map-water {
  fill: url("#routeWater");
  opacity: 0.48;
}

.route-river-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-linecap: round;
  stroke-width: 24;
}

.route-river {
  fill: none;
  stroke: url("#routeLine");
  stroke-dasharray: 10 9;
  stroke-linecap: round;
  stroke-width: 7;
}

.route-geo-line {
  fill: none;
  stroke: rgba(49, 95, 98, 0.54);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.5;
}

.route-lake {
  fill: rgba(116, 161, 200, 0.35);
  stroke: rgba(39, 72, 111, 0.2);
  stroke-width: 2;
}

.route-map-region,
.route-lake-label {
  fill: rgba(13, 34, 64, 0.5);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 800;
}

.route-lake-label {
  font-size: 0.82rem;
  text-anchor: middle;
}

.route-stop {
  cursor: pointer;
  outline: none;
}

.route-stop circle {
  fill: #ffffff;
  stroke: #27486f;
  stroke-width: 4;
  filter: drop-shadow(0 8px 12px rgba(39, 72, 111, 0.2));
  transition:
    fill 140ms ease,
    stroke 140ms ease,
    transform 140ms ease;
}

.route-stop.is-chgis circle {
  fill: #fffdf8;
  stroke: #315f62;
}

.route-stop.is-destination circle,
.route-stop.is-active circle,
.route-stop:hover circle,
.route-stop:focus-visible circle {
  fill: #9b5d2f;
  stroke: #ffffff;
  transform: scale(1.08);
}

.route-stop-label,
.route-stop-sub {
  fill: #0d2240;
  font-family: var(--serif);
  font-weight: 800;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 4px;
  text-anchor: middle;
}

.route-stop-label {
  font-size: 1rem;
}

.route-stop-sub {
  font-size: 0.72rem;
  font-weight: 700;
}

.route-reader {
  min-height: 100%;
  max-height: 30rem;
  overflow: auto;
  padding: 1rem;
  border: 1px solid rgba(83, 117, 158, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
}

.route-reader-head {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.route-reader-head strong {
  color: #0d2240;
  font-family: var(--serif);
  font-size: 1.02rem;
}

.route-reader p {
  color: var(--ink-soft);
  line-height: 1.55;
}

.route-reader-section {
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid rgba(83, 117, 158, 0.14);
}

.route-reader-section h4 {
  margin: 0 0 0.45rem;
  color: var(--accent-strong);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.route-reader-section p {
  margin: 0;
  color: var(--ink);
  line-height: 1.72;
}

.route-reader-original {
  font-family: var(--serif-sc);
}

.route-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.route-step {
  min-height: 4.1rem;
  padding: 0.72rem;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(83, 117, 158, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.route-step:hover,
.route-step.is-active {
  transform: translateY(-1px);
  border-color: rgba(39, 72, 111, 0.42);
  background: #ffffff;
}

.route-step span {
  display: block;
  color: #27486f;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 800;
}

.route-step strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.route-step.has-coordinate {
  border-color: rgba(49, 95, 98, 0.26);
  background:
    linear-gradient(135deg, rgba(49, 95, 98, 0.08), transparent 38%),
    rgba(255, 255, 255, 0.78);
}

.place-hierarchy-panel,
.place-list-panel {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(83, 117, 158, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% 10%, rgba(123, 138, 97, 0.1), transparent 28%),
    rgba(255, 255, 255, 0.86);
}

.place-tree-root {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  margin: 0.55rem 0 0.75rem;
  padding: 0.32rem 0.78rem;
  color: #fffdf8;
  border-radius: 999px;
  background: #315f62;
  font-family: var(--serif);
  font-weight: 900;
}

.place-tree-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
}

.place-tree-group {
  min-width: 0;
  border: 1px solid rgba(83, 117, 158, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.place-tree-group summary,
.place-list-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 0.85rem;
  color: #0d2240;
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 900;
  list-style: none;
}

.place-tree-group summary::-webkit-details-marker,
.place-list-panel summary::-webkit-details-marker {
  display: none;
}

.place-tree-group summary em,
.place-list-panel summary em {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.place-tree-list {
  display: grid;
  gap: 0.38rem;
  padding: 0 0.72rem 0.78rem;
}

.place-tree-node {
  display: grid;
  gap: 0.08rem;
  width: 100%;
  padding: 0.58rem 0.64rem;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(83, 117, 158, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.place-tree-node:hover,
.place-tree-node:focus-visible {
  border-color: rgba(156, 116, 72, 0.42);
  background: #fffaf2;
}

.place-tree-node span {
  color: #0d2240;
  font-family: var(--serif);
  font-weight: 900;
}

.place-tree-node em {
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 800;
}

.place-list-panel .place-section-group {
  margin-top: 0.75rem;
}

.browser-toolbar {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.browser-toolbar-compact {
  margin-bottom: 0.35rem;
}

.browser-summary,
.chip-row,
.browser-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.browser-search {
  max-width: 48rem;
}

.entity-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.32rem 0.62rem;
  color: var(--accent-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--tag-bg);
  font-size: 0.8rem;
  font-weight: 800;
}

.month-card {
  padding: 0.95rem;
}

.month-card h3 {
  margin: 0 0 0.75rem;
  color: #0d2240;
  font-family: var(--serif);
  font-size: 1.12rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.42rem;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.42rem;
  margin-bottom: 0.42rem;
}

.calendar-weekdays span {
  color: var(--ink-soft);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 800;
}

.calendar-view {
  padding: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(249, 252, 255, 0.82);
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.calendar-current {
  text-align: center;
}

.calendar-current strong {
  display: block;
  color: #0d2240;
  font-family: var(--serif);
  font-size: 1.08rem;
}

.calendar-current p {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.calendar-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  color: var(--accent-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 1.6rem;
}

.calendar-nav:disabled {
  opacity: 0.38;
  cursor: default;
}

.calendar-grid-shell {
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

.calendar-cell {
  min-height: 6rem;
  padding: 0.65rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  text-align: left;
}

.calendar-cell.is-active {
  border-color: var(--accent);
  background: var(--tag-bg);
}

.calendar-day-number {
  display: block;
  color: #0d2240;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}

.calendar-day-summary {
  display: block;
  margin-top: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.35;
}

.calendar-cell.is-empty {
  color: rgba(38, 62, 90, 0.52);
  background: rgba(230, 233, 239, 0.48);
}

.calendar-cell.is-blank {
  visibility: hidden;
  min-height: 0;
  padding: 0;
  border: 0;
}

.entity-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.entity-list {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(83, 117, 158, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.entity-list-panel {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(83, 117, 158, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% 16%, rgba(83, 117, 158, 0.1), transparent 30%),
    rgba(255, 255, 255, 0.86);
}

.entity-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.entity-list-head h2 {
  margin: 0;
  color: #0d2240;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.entity-list-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.75fr) minmax(220px, 1.4fr) minmax(140px, 0.55fr);
  gap: 0.8rem;
  align-items: center;
  width: 100%;
  min-height: 3.35rem;
  padding: 0.78rem 0.9rem;
  color: var(--ink);
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(83, 117, 158, 0.12);
  background: rgba(255, 255, 255, 0.58);
}

.entity-list-group-label {
  padding: 0.62rem 0.9rem 0.48rem;
  color: #315f62;
  border-bottom: 1px solid rgba(83, 117, 158, 0.14);
  background:
    linear-gradient(90deg, rgba(49, 95, 98, 0.12), rgba(202, 138, 4, 0.06), transparent),
    rgba(255, 253, 248, 0.92);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.entity-list-group-label:not(:first-child) {
  border-top: 1px solid rgba(83, 117, 158, 0.18);
}

.entity-list-row:last-child {
  border-bottom: 0;
}

.entity-list-row:hover,
.entity-list-row:focus-visible {
  background: #fffaf2;
}

.entity-list-row strong {
  color: #0d2240;
  font-family: var(--serif);
  font-size: 1rem;
}

.entity-list-row span {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-list-row em {
  justify-self: end;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.entity-card,
.entry-card {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  text-align: left;
}

.entity-card strong,
.entry-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #0d2240;
  font-family: var(--serif);
  font-size: 1.02rem;
}

.entity-card span,
.entry-card span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.45;
}

.entry-card p,
.entity-card p {
  margin: 0.25rem 0 0.55rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.entry-card.is-active,
.calendar-cell.is-active {
  border-color: var(--accent);
  background: rgba(66, 108, 156, 0.1);
}

.place-section-group {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.place-section-head {
  padding-top: 0.2rem;
  border-top: 1px solid var(--line);
}

.place-section-head h3 {
  margin: 0;
  color: #0d2240;
  font-family: var(--serif);
}

.place-section-head p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
}

.reader-title {
  margin: 0;
  color: #0d2240;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.16;
}

.reader-kicker {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.65rem;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
}

.reader-summary {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-weight: 700;
  line-height: 1.6;
  word-break: keep-all;
}

.reader-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.reader-section h3 {
  margin: 0 0 0.55rem;
  color: var(--accent-strong);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reader-section p {
  margin: 0;
  line-height: 1.78;
}

.translation-text {
  word-break: keep-all;
}

.original-text {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.9;
}

.detail-head h2 {
  margin: 0;
  color: #0d2240;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.2;
}

.detail-head p {
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
  line-height: 1.6;
  word-break: keep-all;
}

.analysis-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry-translation-shell,
.entry-topic-strip {
  margin-top: 1rem;
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.entry-translation-shell h3,
.entry-topic-strip h3 {
  margin: 0 0 0.5rem;
  color: var(--accent-strong);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry-translation-shell p {
  margin: 0;
  line-height: 1.78;
}

.entry-disclosure {
  margin-top: 0.55rem;
}

.entry-disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.62rem 0.75rem;
  color: #0d2240;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(245, 248, 252, 0.82);
  cursor: pointer;
  list-style: none;
}

.entry-disclosure-summary::-webkit-details-marker {
  display: none;
}

.entry-disclosure-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  min-height: 1.8rem;
  color: #ffffff;
  border-radius: 999px;
  background: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.entry-disclosure-body {
  padding: 0.65rem 0.3rem 0.2rem;
}

.inline-reader {
  position: static;
  min-height: 0;
  max-height: none;
}

.entity-focus:empty {
  display: none;
}

.muted {
  color: var(--ink-soft);
}

.card-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.2rem;
}

.jump-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.85rem;
  color: var(--accent-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  font-weight: 800;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.58rem;
  color: var(--accent-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--tag-bg);
  font-size: 0.82rem;
  font-weight: 800;
}

.reader-empty,
.error-box {
  margin: 0;
  padding: 1rem;
  color: var(--ink-soft);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body[data-yunshan-page="places"] .route-map-panel,
body[data-yunshan-page="places"] .place-overview-panel,
body[data-yunshan-page="institutions"] .entity-list-panel,
body[data-yunshan-page="materials"] .entity-list-panel,
body[data-yunshan-page="topics"] .topic-matrix-panel,
body[data-yunshan-page="topics"] .topic-list-panel {
  padding: 1rem;
  border: 1px solid rgba(83, 117, 158, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% 16%, rgba(83, 117, 158, 0.1), transparent 30%),
    rgba(255, 255, 255, 0.86);
}

body[data-yunshan-page="places"] .route-map-panel .network-head strong,
body[data-yunshan-page="places"] .place-overview-panel .network-head strong,
body[data-yunshan-page="institutions"] .entity-list-head h2,
body[data-yunshan-page="materials"] .entity-list-head h2,
body[data-yunshan-page="topics"] .topic-matrix-head strong {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

@media (max-width: 980px) {
  .page-shell {
    width: min(100vw - 1rem, 100%);
    padding-top: 0.6rem;
  }

  .hero,
  .project-overview-section,
  .browse-layout,
  .reader-layout {
    grid-template-columns: 1fr;
  }

  .browser-guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-panel {
    position: static;
    max-height: none;
  }

  .topic-list-browser {
    grid-template-columns: 1fr;
  }

  .people-network-workbench,
  .people-evidence-layout {
    grid-template-columns: 1fr;
  }

  .topic-list-sidebar {
    display: flex;
    gap: 0.45rem;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .topic-list-item {
    min-width: 9.5rem;
    margin: 0;
  }

  .topic-entry-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-topbar {
    align-items: stretch;
  }

  .page-nav-links,
  .topbar-home,
  .search-box,
  .yunshan-search-console,
  .yunshan-search-group,
  .yunshan-search-mode-bar,
  .yunshan-search-wrap,
  .yunshan-search-button,
  .yunshan-settings-toggle {
    width: 100%;
  }

  .topbar-link,
  .topbar-home {
    flex: 1 1 auto;
  }

  .hero-stats,
  .search-box,
  .browser-guide-grid,
  .entity-grid {
    grid-template-columns: 1fr;
  }

  .yunshan-search-group,
  .yunshan-search-settings {
    grid-template-columns: 1fr;
  }

  .yunshan-search-group {
    display: grid;
  }

  .yunshan-search-mode-bar {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .search-mode-pill {
    flex: 1 0 auto;
    justify-content: center;
  }

  .network-head {
    display: grid;
  }

  .people-evidence-summary {
    display: grid;
  }

  .network-summary {
    justify-content: flex-start;
  }

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

  .place-overview-layout {
    grid-template-columns: 1fr;
  }

  .calendar-grid,
  .calendar-weekdays {
    min-width: 42rem;
  }

  .entity-list-row {
    grid-template-columns: 1fr;
    gap: 0.24rem;
  }

  .entity-list-row em {
    justify-self: start;
  }
}
