:root {
  --paper: #f8f1ec;
  --paper-deep: #efe0da;
  --ink: #5b4740;
  --muted: #9b847d;
  --teal: #49655d;
  --teal-light: #86aaa2;
  --rose: #bc7571;
  --rose-light: #efd1cc;
  --line: rgba(124, 92, 86, 0.16);
  --card: rgba(255, 250, 246, 0.76);
  --shadow: 0 28px 70px rgba(115, 78, 72, 0.12);
  --joy: #e5a783;
  --anger: #dab2dc;
  --sad: #abd3e2;
  --fear: #7d9262;
  --think: #d18098;
  --section-title-width: 1500px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 4%, rgba(221, 151, 150, 0.2), transparent 24rem),
    radial-gradient(circle at 86% 18%, rgba(171, 211, 226, 0.18), transparent 30rem),
    linear-gradient(180deg, #fbf4ef 0%, var(--paper) 42%, #f5ece6 100%);
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(106, 76, 70, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 76, 70, 0.025) 1px, transparent 1px);
  background-size: 42px 42px, 42px 42px;
  mix-blend-mode: multiply;
}

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

button,
input {
  font: inherit;
}

.side-nav {
  position: fixed;
  top: 50%;
  left: 34px;
  z-index: 35;
  display: grid;
  gap: 20px;
  transform: translateY(-50%);
}

.side-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 40px;
  height: 34px;
  color: var(--teal);
  outline: none;
}

.side-nav-node {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(73, 101, 93, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 0 0 7px rgba(255, 250, 246, 0.58);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.side-nav-label {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translate(-16px, -50%);
  display: inline-flex;
  align-items: center;
  padding: 0 0 0 10px;
  color: #49655d;
  font-size: 15px;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.side-nav-item.active .side-nav-node,
.side-nav-item:hover .side-nav-node,
.side-nav-item:focus-visible .side-nav-node {
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 0 0 8px rgba(255, 250, 246, 0.72);
  transform: scale(1.22);
}

.side-nav-item:hover .side-nav-label,
.side-nav-item:focus-visible .side-nav-label {
  opacity: 1;
  transform: translate(0, -50%);
}

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
  background: #fbf3ec;
}

.hero-cover-img,
.hero-title-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-cover-img {
  z-index: 1;
}

.hero-title-layer {
  z-index: 3;
  pointer-events: none;
  user-select: none;
}

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

.enter-button {
  position: absolute;
  left: 50%;
  top: 83.5%;
  z-index: 5;
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #7b5f58;
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-weight: 600;
  font-size: 28px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transform: translateX(-50%);
  animation: enterFloat 2.4s ease-in-out infinite;
  transition: transform 0.28s ease, color 0.28s ease, opacity 0.28s ease;
}

.enter-button:hover {
  color: #5f4943;
  transform: translateX(-50%) scale(1.06);
}

.enter-arrow {
  width: 36px;
  height: 36px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.78;
  transform: rotate(45deg);
  animation: arrowFloat 1.8s ease-in-out infinite;
}

.music-button {
  position: absolute;
  right: 4.8%;
  top: 4.4%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(95, 73, 67, 0.32);
  border-radius: 50%;
  color: #7b5f58;
  background: rgba(255, 250, 246, 0.18);
  cursor: pointer;
  backdrop-filter: blur(2px);
  transition: transform 0.25s ease, background 0.25s ease, opacity 0.25s ease;
}

.music-button:hover {
  background: rgba(255, 250, 246, 0.34);
  transform: scale(1.08);
}

.music-icon::before {
  content: "♪";
  font-size: 22px;
  line-height: 1;
}

.music-button.playing {
  animation: musicBreath 2.2s ease-in-out infinite;
}

.music-button.playing .music-icon {
  animation: musicRotate 5s linear infinite;
}

.music-button.playing .music-icon::before {
  content: "♫";
}

@keyframes enterFloat {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 8px;
  }
}

@keyframes arrowFloat {
  0%,
  100% {
    translate: 0 0;
    opacity: 0.72;
  }

  50% {
    translate: 0 8px;
    opacity: 0.38;
  }
}

@keyframes musicBreath {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(123, 95, 88, 0);
    opacity: 0.88;
  }

  50% {
    box-shadow: 0 0 16px rgba(123, 95, 88, 0.18);
    opacity: 1;
  }
}

@keyframes musicRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.intro-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 96px 0;
  overflow: hidden;
  background: #f8f1eb;
  cursor: pointer;
}

.intro-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("assets/intro-bg.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  opacity: 0.6;
  filter: saturate(0.88);
}

.intro-content {
  position: relative;
  z-index: 2;
  width: min(900px, 78vw);
  display: grid;
  gap: 28px;
  color: #6f5b55;
  font-size: 22px;
  line-height: 2.05;
  letter-spacing: 0.04em;
}

.intro-content p {
  margin: 0;
}

.story-section {
  width: min(1480px, calc(100% - 140px));
  margin: 0 auto;
  padding: 132px 0 118px;
}

.section-title-block {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  max-width: 100vw;
  margin: 0 0 56px;
  margin-left: 50%;
  transform: translateX(-50%);
}

.section-title-art {
  display: block;
  width: min(var(--section-title-width), 88vw);
  max-width: none;
  height: auto;
}

.emotion-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(86px, 126px));
  justify-content: center;
  gap: 14px;
  margin: 0 auto 36px;
}

.emotion-tabs button {
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--emotion-color) 55%, transparent);
  border-radius: 999px;
  color: var(--emotion-color);
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  opacity: 1;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.emotion-tabs button.selected {
  opacity: 1;
  color: #fff;
  background: var(--emotion-color);
  border-color: var(--emotion-color);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--emotion-color) 30%, transparent);
}

.emotion-tabs button:hover {
  border-color: var(--emotion-color);
  background: color-mix(in srgb, var(--emotion-color) 18%, rgba(255, 255, 255, 0.22));
  transform: translateY(-2px);
}

.chapter-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 42px;
  align-items: start;
}

.chapter-panel {
  position: relative;
}

.chapter-chart-wrap {
  position: relative;
}

.emotion-trend-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.38s ease;
}

.emotion-trend-layer.active {
  opacity: 1;
}

.trend-area {
  fill: var(--trend-color);
  opacity: 0.3;
  stroke: none;
}

.trend-line {
  display: none;
}

.chapter-bars {
  display: grid;
  gap: 5px;
  position: relative;
  z-index: 2;
}

.chapter-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 9px;
}

.chapter-label {
  color: rgba(94, 73, 68, 0.55);
  font-size: 11px;
  text-align: right;
}

.capsule-stack {
  position: relative;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.4);
}

.chapter-segment {
  position: absolute;
  top: 0;
  left: var(--segment-left, 0%);
  width: var(--segment-width, 0%);
  height: 100%;
  min-width: 0;
  background: var(--segment-color);
  opacity: 1;
  transition:
    left 0.58s ease,
    width 0.58s ease,
    opacity 0.35s ease,
    filter 0.35s ease,
    background-color 0.35s ease;
}

.chapter-segment.selected {
  opacity: 1;
  filter: saturate(1.08);
}

.chapter-segment.pinned {
  opacity: 1;
  filter: brightness(1.18) saturate(1.2);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.74),
    0 0 10px color-mix(in srgb, var(--segment-color) 58%, transparent);
}

.chapter-segment.dimmed {
  opacity: 0.24;
}

.chapter-segment:hover {
  opacity: 1;
}

.evidence-card,
.place-card,
.person-panel {
  border: 1px solid rgba(188, 117, 113, 0.16);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.chapter-evidence {
  position: sticky;
  top: 64px;
  padding: 28px 30px 30px;
}

.evidence-card {
  overflow: hidden;
}

.card-label {
  margin: 0 0 12px;
  color: var(--rose);
  font-size: 13px;
  letter-spacing: 0.18em;
}

.card-chapter-title {
  margin: 0 0 16px;
  color: #b98f84;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}

.evidence-card h3,
.place-card h3,
.person-panel h3 {
  margin: 0 0 18px;
  color: #6b514c;
  font-size: 30px;
  font-weight: 600;
}

.evidence-card dl {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
}

.evidence-card dl div,
.place-meta div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
}

dt {
  color: rgba(91, 71, 64, 0.56);
}

dd {
  margin: 0;
}

blockquote {
  margin: 20px 0 16px;
  padding-left: 16px;
  border-left: 3px solid rgba(209, 128, 152, 0.38);
  color: #805c58;
  line-height: 1.8;
}

.card-note {
  margin: 0;
  color: #816d67;
  line-height: 1.8;
}

.evidence-list {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
}

.evidence-list::-webkit-scrollbar {
  width: 5px;
}

.evidence-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(123, 95, 88, 0.22);
}

.evidence-item {
  padding: 14px 0;
  border-top: 1px solid rgba(120, 90, 80, 0.16);
}

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

.evidence-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: rgba(91, 71, 64, 0.62);
  font-size: 12px;
}

.evidence-item-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 250, 246, 0.64);
}

.evidence-emotion {
  margin: 0 0 8px;
  color: #775751;
  font-size: 14px;
  line-height: 1.6;
}

.evidence-item blockquote {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.7;
}

.evidence-reason {
  margin: 0;
  color: #816d67;
  font-size: 13px;
  line-height: 1.7;
}

.chapter-data-error {
  margin: 32px 0 0 92px;
  color: #9b6c66;
}

.garden-layout {
  width: 100%;
  min-height: 900px;
  height: auto;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 960px) minmax(520px, 620px);
  gap: 80px;
  align-items: center;
}

.garden-section {
  width: min(1800px, 94vw);
  min-height: 140vh;
  height: auto;
  overflow: visible;
  display: grid;
  grid-template-rows: auto auto;
  align-items: start;
  padding: 72px 0 96px;
  scroll-snap-align: start;
  transform: translateX(-40px);
}

.garden-section .section-title-block {
  margin-bottom: 36px;
}

.garden-map-column {
  display: grid;
  gap: 20px;
  align-items: start;
}

.garden-section .garden-map-column .emotion-tabs {
  grid-template-columns: repeat(5, minmax(58px, 88px));
  gap: 10px;
  width: min(490px, 100%);
  margin: 0 auto 2px;
}

.garden-section .garden-map-column .emotion-tabs button {
  height: 26px;
}

.garden-reading-tip {
  width: 100%;
  margin: 24px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(151, 119, 98, 0.14);
  color: #8a746d;
  font-size: 12px;
  line-height: 1.72;
}

.garden-reading-tip strong {
  display: block;
  margin-bottom: 9px;
  color: #6b514c;
  font-size: 15px;
  font-weight: 600;
}

.garden-reading-tip p {
  margin: 0;
}

.garden-reading-tip p + p {
  margin-top: 4px;
}

.garden-map-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 900px;
  height: 900px;
  overflow: visible;
}

.garden-map-card,
.garden-section .place-card {
  max-height: none;
}

.garden-map-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.garden-map-renderbox {
  position: relative;
  width: auto;
  height: 900px;
  max-height: none;
  max-width: 100%;
  aspect-ratio: 1056 / 1214;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(73, 101, 93, 0.12);
  border-radius: 18px;
  background: #fbf5ee;
  box-shadow: 0 24px 60px rgba(112, 80, 74, 0.08);
}

.garden-section .place-card {
  width: 100%;
  min-height: unset;
  height: auto;
  max-height: none;
  padding: 40px 48px 44px;
  overflow: visible;
  align-self: center;
}

.garden-section .place-illustration {
  width: 100%;
  aspect-ratio: 1410 / 1027;
  height: auto;
  max-height: 300px;
  margin-bottom: 28px;
  overflow: hidden;
  border-radius: 28px;
}

.garden-section .place-illustration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.garden-section .place-card .card-label {
  margin: 0 0 12px;
}

.garden-section .place-card h3 {
  margin: 0 0 18px;
}

.garden-section .place-summary {
  margin: 0 0 24px;
  line-height: 1.85;
}

.garden-section .place-meta {
  margin-bottom: 28px;
}

.garden-section .place-meta div {
  padding: 18px 14px;
}

.garden-section .emotion-counts {
  gap: 14px;
  margin-top: 26px;
}

.garden-map-img,
.garden-heat-svg,
.garden-hit-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.garden-map-img {
  object-fit: fill;
  object-position: center center;
  display: block;
  transition: opacity 0.55s ease;
}

.garden-map-color {
  opacity: 1;
}

.garden-map-mono {
  opacity: 0;
}

.garden-map-stage.emotion-mode .garden-map-color {
  opacity: 0;
}

.garden-map-stage.emotion-mode .garden-map-mono {
  opacity: 1;
}

.garden-heat-svg {
  pointer-events: none;
  z-index: 3;
}

.garden-hit-svg {
  z-index: 4;
  pointer-events: auto;
}

.garden-heat-circle {
  transition:
    r 0.45s ease,
    fill-opacity 0.45s ease,
    fill 0.3s ease;
}

.garden-hit-circle {
  fill: transparent;
  stroke: none;
  cursor: pointer;
  pointer-events: all;
}

.garden-place-label {
  fill: #6c5e56;
  font-family: "SimHei", "Microsoft YaHei", sans-serif;
  font-size: 14pt;
  pointer-events: none;
  opacity: 0.92;
  transition:
    fill 0.25s ease,
    opacity 0.25s ease,
    font-weight 0.25s ease;
}

.garden-place-label.is-hovered,
.garden-place-label.is-active {
  fill: #9a6b7c;
  opacity: 1;
  font-weight: 700;
}

.garden-debug-point {
  fill: #49655d;
  stroke: #49655d;
  stroke-width: 1.5;
  pointer-events: none;
}

.map-toolbar {
  position: absolute;
  left: 38px;
  top: 16px;
  z-index: 2;
  display: flex;
  gap: 12px;
}

.map-toolbar span {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(73, 101, 93, 0.22);
}

.garden-map {
  position: relative;
  width: 100%;
  min-height: 560px;
  border: 1px solid rgba(73, 101, 93, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(221, 210, 194, 0.38) 1px, transparent 1px),
    linear-gradient(0deg, rgba(221, 210, 194, 0.38) 1px, transparent 1px),
    linear-gradient(135deg, rgba(245, 226, 217, 0.7), rgba(234, 245, 238, 0.72));
  background-size: 74px 74px, 74px 74px, auto;
  box-shadow: inset 0 0 80px rgba(255, 255, 255, 0.55);
}

.map-water {
  position: absolute;
  border-radius: 44% 56% 48% 52%;
  background: rgba(171, 211, 226, 0.52);
  filter: blur(0.4px);
}

.water-one {
  left: 12%;
  top: 30%;
  width: 40%;
  height: 22%;
  transform: rotate(-8deg);
}

.water-two {
  right: 12%;
  top: 18%;
  width: 30%;
  height: 42%;
  transform: rotate(8deg);
}

.map-path {
  position: absolute;
  height: 11px;
  border-radius: 999px;
  background: rgba(228, 191, 151, 0.58);
}

.path-one {
  left: 20%;
  top: 61%;
  width: 56%;
  transform: rotate(-12deg);
}

.path-two {
  left: 41%;
  top: 24%;
  width: 36%;
  transform: rotate(70deg);
}

.map-building,
.place-point {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #6d5752;
  background: rgba(255, 250, 246, 0.72);
  border: 1px solid rgba(124, 92, 86, 0.16);
  box-shadow: 0 10px 24px rgba(112, 80, 74, 0.08);
}

.map-building {
  width: 132px;
  height: 68px;
  font-size: 15px;
}

.building-main {
  left: 34%;
  top: 22%;
}

.building-east {
  right: 12%;
  bottom: 18%;
}

.building-west {
  left: 14%;
  bottom: 16%;
}

.place-point {
  width: 88px;
  height: 34px;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.place-point::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 999px;
  background: var(--heat-color);
  opacity: var(--heat-opacity);
  filter: blur(4px);
  z-index: -1;
}

.place-point:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(112, 80, 74, 0.14);
}

.place-card {
  padding: 34px 38px 36px;
}

.place-illustration {
  position: relative;
  height: 210px;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 250, 246, 0.5);
  border: 1px solid rgba(188, 117, 113, 0.12);
}

.place-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-pavilion {
  position: absolute;
  left: 148px;
  top: 52px;
  width: 180px;
  height: 92px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 0 45%, rgba(73, 101, 93, 0.75) 46% 54%, transparent 55%),
    linear-gradient(180deg, rgba(255, 250, 246, 0.88), rgba(239, 220, 210, 0.72));
  border: 1px solid rgba(194, 157, 88, 0.3);
  box-shadow: 0 20px 34px rgba(93, 75, 67, 0.12);
}

.mini-pavilion::before {
  content: "";
  position: absolute;
  left: -14px;
  right: -14px;
  top: -28px;
  height: 42px;
  clip-path: polygon(0 80%, 50% 0, 100% 80%, 92% 100%, 8% 100%);
  background: #6f8f87;
}

.mini-pond {
  position: absolute;
  right: 42px;
  bottom: 18px;
  width: 250px;
  height: 88px;
  border-radius: 50%;
  background: rgba(171, 211, 226, 0.54);
}

.mini-bamboo {
  position: absolute;
  left: 68px;
  bottom: 20px;
  width: 104px;
  height: 160px;
  opacity: 0.6;
  background:
    linear-gradient(90deg, transparent 48%, rgba(73, 101, 93, 0.7) 49% 51%, transparent 52%),
    radial-gradient(ellipse at 42% 32%, rgba(73, 101, 93, 0.35) 0 18%, transparent 19%),
    radial-gradient(ellipse at 65% 48%, rgba(73, 101, 93, 0.3) 0 17%, transparent 18%);
}

.place-summary {
  margin: 0 0 22px;
  color: #6f5d58;
  line-height: 1.9;
}

.place-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0 0 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.place-meta div {
  display: block;
  padding: 18px 14px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.place-meta div:last-child {
  border-right: 0;
}

.place-meta dt {
  margin-bottom: 8px;
  font-size: 13px;
}

.place-meta dd {
  color: #6d514c;
  font-size: 17px;
}

.emotion-counts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.emotion-count {
  display: grid;
  justify-items: center;
  gap: 9px;
  color: var(--count-color);
}

.emotion-count i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: white;
  font-style: normal;
  background: var(--count-color);
}

.emotion-count strong {
  color: #7b5a55;
  font-size: 17px;
}

.figures-section {
  min-height: 130vh;
  height: auto;
  overflow: visible;
  padding: 72px 0 120px;
}

.figures-layout {
  width: min(1680px, 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1080px) minmax(420px, 480px);
  gap: 56px;
  align-items: center;
}

.network-card {
  position: relative;
  width: 100%;
  height: 760px;
  min-height: 760px;
  border: 1px solid rgba(151, 119, 98, 0.16);
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 48% 58%, rgba(171, 211, 226, 0.20), transparent 46%),
    radial-gradient(ellipse at 72% 32%, rgba(188, 117, 113, 0.10), transparent 36%),
    linear-gradient(135deg, rgba(255, 252, 246, 0.82), rgba(238, 249, 245, 0.72));
  box-shadow:
    inset 0 0 90px rgba(255, 255, 255, 0.42),
    0 28px 90px rgba(114, 86, 78, 0.08);
  overflow: hidden;
}

.figure-controls {
  position: absolute;
  z-index: 5;
  top: 28px;
  left: 28px;
  right: 28px;
  display: grid;
  grid-template-columns: 260px minmax(280px, 360px) auto;
  gap: 24px;
  align-items: start;
  pointer-events: none;
}

.threshold-control,
.figure-search-box,
.figure-view-tools {
  pointer-events: auto;
}

.threshold-control,
.figure-search-box {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid rgba(73, 101, 93, 0.16);
  border-radius: 18px;
  background: rgba(255, 250, 246, 0.76);
  color: rgba(73, 101, 93, 0.72);
  box-shadow: 0 14px 36px rgba(114, 86, 78, 0.06);
  backdrop-filter: blur(12px);
}

.threshold-control {
  width: 260px;
}

.threshold-control span,
.figure-search-box span {
  font-size: 13px;
  letter-spacing: 0.08em;
}

.threshold-control b {
  color: var(--teal);
  font-size: 18px;
  font-weight: 600;
}

.threshold-control input {
  width: 100%;
  accent-color: var(--rose);
}

.figure-search-box {
  width: 330px;
}

.figure-search-box input {
  width: 100%;
  height: 32px;
  border: 0;
  outline: 0;
  color: var(--teal);
  background: transparent;
  font: inherit;
}

.figure-view-tools {
  justify-self: end;
  display: flex;
  gap: 12px;
}

.figure-view-tools button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(73, 101, 93, 0.18);
  border-radius: 50%;
  color: #6b5a54;
  background: rgba(255, 250, 246, 0.72);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.figure-view-tools button:hover,
.figure-view-tools button.is-active {
  color: white;
  background: var(--teal);
  transform: translateY(-1px);
}

.figure-status {
  position: absolute;
  top: 142px;
  left: 32px;
  z-index: 5;
  margin: 0;
  color: rgba(108, 94, 86, 0.72);
  font-size: 14px;
  letter-spacing: 0.06em;
}

#figureNetworkCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

#figureNetworkCanvas.dragging {
  cursor: grabbing;
}

.network-legend {
  position: absolute;
  left: 32px;
  bottom: 28px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 9px 18px;
  padding: 14px 16px;
  border: 1px solid rgba(151, 119, 98, 0.12);
  border-radius: 16px;
  color: #6d5a55;
  background: rgba(255, 250, 246, 0.74);
  font-size: 13px;
  backdrop-filter: blur(12px);
}

.network-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.network-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.person-panel {
  align-self: center;
  width: 100%;
  max-width: 480px;
  height: auto;
  max-height: 760px;
  overflow: visible;
  padding: 42px 44px;
  border-radius: 30px;
  background: rgba(255, 250, 246, 0.84);
  border: 1px solid rgba(151, 119, 98, 0.16);
  box-shadow: 0 24px 80px rgba(114, 86, 78, 0.10);
}

.person-panel p {
  color: #77625d;
  line-height: 1.82;
}

.person-panel h3 {
  margin: 0 0 18px;
  color: #6b514c;
  font-size: 32px;
  font-weight: 600;
}

.person-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 28px 0;
  text-align: center;
}

.person-stats div {
  padding: 17px 8px 16px;
  border-radius: 16px;
  background: rgba(73, 101, 93, 0.07);
}

.person-stats strong {
  display: block;
  color: var(--teal);
  font-size: 26px;
  line-height: 1.05;
  white-space: nowrap;
}

.stat-current {
  color: #1f6a63;
  font-size: 1.04em;
  font-weight: 700;
}

.stat-total {
  color: rgba(31, 106, 99, 0.32);
  font-weight: 400;
  font-size: 0.72em;
  margin-left: 2px;
}

.edge-stat-value {
  color: #1f6a63;
  font-weight: 700;
}

.person-panel.is-edge-mode .person-stats strong,
.person-panel.is-edge-mode .person-stats .stat-current,
.person-panel.is-edge-mode .person-stats .edge-stat-value {
  color: #4f6f68;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
}

.person-panel.is-edge-mode .person-stats .stat-total {
  color: rgba(79, 111, 104, 0.38);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 400;
}

.person-panel.is-edge-mode .person-stats span {
  color: rgba(108, 94, 86, 0.72);
  font-size: 16px;
  line-height: 1.35;
}

.person-stats span {
  color: rgba(91, 71, 64, 0.55);
  font-size: 14px;
  line-height: 1.4;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 28px;
}

.tag-row span {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--teal);
  background: rgba(73, 101, 93, 0.1);
  font-size: 13px;
}

.person-panel h4 {
  margin: 0 0 18px;
  color: #6a514c;
  font-size: 18px;
}

.ranking-list {
  display: grid;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
}

.rank-item {
  display: grid;
  grid-template-columns: 86px 1fr 42px;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  padding: 0;
  color: #6d5752;
  font: inherit;
  font-size: 14px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.rank-item:hover {
  color: var(--rose);
}

.rank-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(188, 117, 113, 0.16);
}

.rank-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--rose);
}

.figure-evidence-list {
  display: grid;
  gap: 12px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.figure-evidence-item {
  padding: 14px 0 0;
  border-top: 1px solid rgba(151, 119, 98, 0.16);
  overflow: visible;
}

.figure-evidence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--rose);
  font-size: 13px;
}

.figure-evidence-item strong {
  display: block;
  margin-bottom: 6px;
  color: #6b514c;
  font-weight: 600;
}

.figure-evidence-item p {
  margin: 0;
  font-size: 12px;
  line-height: 1.72;
}

.site-footer {
  width: min(1680px, calc(100% - 180px));
  margin: 0 auto;
  padding: 92px 0 118px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(360px, 0.9fr);
  gap: 150px;
  align-items: start;
  color: #9b837b;
  border-top: 0;
  background: #faf3ee;
  box-shadow: 0 0 0 100vmax #faf3ee;
  clip-path: inset(0 -100vmax);
  font-family: "SimHei", "Microsoft YaHei", sans-serif;
  font-size: 10pt;
  line-height: 1.5;
}

.site-footer h2 {
  margin: 0 0 10px;
  color: #8e746c;
  font-size: 10pt;
  font-weight: 700;
}

.site-footer p {
  margin: 0;
}

.site-footer ol {
  margin: 0;
  padding-left: 24px;
}

.site-footer li {
  margin: 0 0 7px;
  padding-left: 4px;
}

.footer-note {
  padding-left: 88px;
}

.footer-credit {
  display: grid;
  gap: 132px;
}

.footer-credit strong {
  color: #8e746c;
  font-weight: 700;
}

.footer-credit p + p {
  margin-top: 18px;
}

.floating-evidence {
  position: fixed;
  z-index: 40;
  width: 320px;
  padding: 18px 20px;
  border: 1px solid rgba(188, 117, 113, 0.18);
  border-radius: 20px;
  color: #65514d;
  background: rgba(255, 250, 246, 0.9);
  box-shadow: 0 22px 50px rgba(114, 76, 68, 0.18);
  backdrop-filter: blur(14px);
  pointer-events: none;
}

.floating-evidence h4 {
  margin: 0 0 10px;
  color: #6e504d;
  font-size: 18px;
}

.floating-evidence p {
  margin: 0 0 8px;
  line-height: 1.55;
}

.floating-evidence small {
  color: rgba(91, 71, 64, 0.62);
}

@media (max-width: 1200px) {
  .section-title-art {
    width: 92vw;
  }

  .chapter-layout,
  .garden-layout,
  .figures-layout,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .chapter-evidence {
    position: static;
  }

  .side-nav {
    left: 16px;
  }

  .side-nav-label {
    font-size: 13px;
  }

  .footer-note {
    padding-left: 0;
  }
}

@media (max-width: 760px) {
  .intro-content,
  .story-section,
  .site-footer {
    width: min(100% - 36px, 1480px);
  }

  .intro-content {
    font-size: 17px;
    line-height: 1.9;
  }

  .emotion-tabs {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }

  .chapter-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }

}
