:root {
  --bg: #efe4ce;
  --card: rgba(251, 247, 238, 0.9);
  --card-strong: #fdf9f0;
  --ink: #2f2418;
  --sub: #6f6251;
  --pri: #6b4a2c;
  --pri-2: #53341b;
  --accent: #a54d2a;
  --accent-deep: #8f4424;
  --accent-soft: #d3b38f;
  --jade: #5c6652;
  --muted: #6f6251;
  --line: rgba(84, 58, 30, 0.18);
  --line-strong: rgba(84, 58, 30, 0.32);
  --paper-shadow: 0 18px 42px rgba(71, 46, 20, 0.12);
  --shadow: 0 16px 40px rgba(71, 46, 20, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  background-image:
    radial-gradient(circle at top left, rgba(165, 77, 42, 0.12), transparent 24%),
    radial-gradient(circle at top right, rgba(92, 102, 82, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 249, 240, 0.86), rgba(239, 228, 206, 0.96));
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(133, 104, 74, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(133, 104, 74, 0.04) 1px, transparent 1px);
  background-size: 100% 34px, 34px 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 82%);
  opacity: 0.42;
}

.hero::before,
.subhero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 18%, rgba(255, 246, 229, 0.28), transparent 20%),
    radial-gradient(circle at 84% 28%, rgba(168, 77, 42, 0.16), transparent 26%),
    linear-gradient(90deg, rgba(255, 248, 232, 0.04), transparent 42%, rgba(255, 248, 232, 0.04));
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 88%);
  pointer-events: none;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 244, 223, 0.16), transparent 16%),
    radial-gradient(circle at 82% 24%, rgba(165, 77, 42, 0.18), transparent 18%),
    linear-gradient(135deg, #2d2117, #59402a 56%, #866449);
  color: #f8f0df;
  padding-bottom: 48px;
  min-height: 88vh;
  box-shadow: inset 0 -18px 40px rgba(49, 29, 12, 0.16);
}

.subhero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 243, 222, 0.14), transparent 20%),
    radial-gradient(circle at 84% 22%, rgba(165, 77, 42, 0.14), transparent 24%),
    linear-gradient(135deg, #38281c, #5f4630 60%, #8a6847);
  color: #f8f0df;
  padding-bottom: 40px;
  box-shadow: inset 0 -16px 32px rgba(49, 29, 12, 0.14);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 20px 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.08em;
}

.brand::before {
  content: "王";
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(165, 77, 42, 0.88);
  color: #f8ecd3;
  font-size: 14px;
  box-shadow: 0 8px 16px rgba(54, 27, 10, 0.16);
}

.nav-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.nav a {
  color: rgba(248, 240, 223, 0.9);
  text-decoration: none;
  font-size: 14px;
  position: relative;
  letter-spacing: 0.05em;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: rgba(248, 240, 223, 0.7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.nav a:hover::after {
  transform: scaleX(1);
}

.hero-content {
  max-width: 1100px;
  margin: 20px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.hero-stage {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.85fr);
  align-items: center;
  padding-bottom: 40px;
}

.hero-copy-col {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 28px;
  border: 1px solid rgba(248, 238, 220, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.08), rgba(255, 250, 241, 0.04)),
    rgba(66, 45, 27, 0.32);
  box-shadow: inset 0 0 0 1px rgba(255, 241, 214, 0.06);
}

.badge {
  display: inline-block;
  width: fit-content;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 247, 231, 0.12);
  border: 1px solid rgba(255, 238, 208, 0.2);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: rgba(248, 240, 223, 0.88);
}

h1 {
  margin: 14px 0;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.2;
  font-family: "STSong", "Songti SC", "Noto Serif SC", "SimSun", serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-copy {
  max-width: 760px;
  font-size: 17px;
  color: rgba(248, 240, 223, 0.84);
}

.cta {
  display: inline-block;
  margin-top: 12px;
  background: linear-gradient(180deg, #b55a32, #8f4424);
  color: #f7ebd1;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 230, 196, 0.22);
  box-shadow: 0 14px 28px rgba(50, 24, 9, 0.2);
}

.page-link {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  color: var(--pri-2);
  background: linear-gradient(180deg, rgba(251, 247, 238, 0.96), rgba(242, 232, 214, 0.92));
  border: 1px solid rgba(84, 58, 30, 0.2);
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(71, 46, 20, 0.08);
}

select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(84, 58, 30, 0.18);
  background: rgba(251, 247, 238, 0.9);
  color: var(--ink);
}

.ghost-link {
  display: inline-block;
  margin-top: 12px;
  margin-left: 10px;
  color: rgba(248, 240, 223, 0.92);
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 238, 208, 0.18);
  background: rgba(255, 248, 232, 0.08);
}

.hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-scroll-copy {
  color: rgba(248, 240, 223, 0.68);
  margin: 4px 0 0;
}

.hero-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 28px;
  max-width: 860px;
}

.hero-showcase {
  display: grid;
}

.showcase-shell {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(254, 248, 236, 0.98), rgba(242, 231, 213, 0.96)),
    radial-gradient(circle at top right, rgba(165, 77, 42, 0.12), transparent 30%);
  border: 1px solid rgba(86, 60, 33, 0.2);
  color: var(--ink);
  box-shadow: 0 28px 60px rgba(58, 34, 14, 0.18);
  position: relative;
}

.showcase-shell::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 22px;
  border: 1px solid rgba(109, 80, 50, 0.18);
  pointer-events: none;
}

.showcase-bar {
  display: flex;
  gap: 8px;
}

.showcase-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(107, 74, 44, 0.34);
}

.showcase-main,
.showcase-feature {
  display: grid;
  gap: 14px;
}

.showcase-main h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  font-family: "STSong", "Songti SC", "SimSun", serif;
}

.showcase-kicker {
  color: rgba(165, 77, 42, 0.9);
}

.showcase-note {
  color: var(--sub);
}

.showcase-links,
.showcase-stats {
  display: grid;
  gap: 12px;
}

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

.showcase-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 18px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 251, 244, 0.76);
  border: 1px solid rgba(86, 60, 33, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.showcase-link-stack {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
}

.showcase-link-stack span {
  font-size: 12px;
  color: var(--sub);
}

.showcase-link-stack strong {
  font-size: 16px;
}

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

.showcase-stat {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 251, 244, 0.72);
  border: 1px solid rgba(86, 60, 33, 0.14);
}

.showcase-stat span {
  display: block;
  color: var(--sub);
  font-size: 13px;
}

.showcase-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
  color: var(--pri-2);
}

.showcase-feature {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(248, 239, 223, 0.82), rgba(241, 230, 210, 0.82));
  border: 1px solid rgba(86, 60, 33, 0.14);
}

.showcase-feature strong {
  font-size: 18px;
  color: var(--pri-2);
}

.hero-panel-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 249, 239, 0.1);
  border: 1px solid rgba(255, 241, 214, 0.12);
  backdrop-filter: blur(4px);
}

.hero-panel-item strong {
  display: block;
  font-size: 16px;
}

.hero-kicker,
.section-kicker {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(248, 240, 223, 0.76);
}

.section-kicker {
  color: var(--accent);
}

.section-head {
  margin-bottom: 20px;
}

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 58px 20px;
  position: relative;
}

.section.alt {
  background:
    linear-gradient(180deg, rgba(247, 239, 225, 0.72), rgba(252, 247, 238, 0.78));
  border-top: 1px solid rgba(84, 58, 30, 0.12);
  border-bottom: 1px solid rgba(84, 58, 30, 0.12);
}

h2 {
  margin-top: 0;
  margin-bottom: 0;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: clamp(26px, 4vw, 34px);
}

.grid {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--paper-shadow);
  backdrop-filter: blur(5px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  position: relative;
}

.card::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 14px;
  border: 1px solid rgba(109, 80, 50, 0.08);
  pointer-events: none;
}

.card p:last-child {
  margin-bottom: 0;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(71, 46, 20, 0.14);
  border-color: rgba(84, 58, 30, 0.24);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 20px;
}

.head-line {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

#searchInput {
  width: min(420px, 100%);
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(84, 58, 30, 0.18);
  outline: none;
  background: rgba(253, 249, 240, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

#searchInput:focus {
  border-color: rgba(165, 77, 42, 0.42);
  box-shadow: 0 0 0 4px rgba(165, 77, 42, 0.08);
}

#browserSearchInput,
#browserModeSelect {
  width: 100%;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(84, 58, 30, 0.18);
  outline: none;
  background: rgba(253, 249, 240, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
  color: var(--ink);
}

#browserSearchInput:focus,
#browserModeSelect:focus {
  border-color: rgba(165, 77, 42, 0.42);
  box-shadow: 0 0 0 4px rgba(165, 77, 42, 0.08);
}

.search-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.search-shortcuts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.search-clear {
  border: 1px solid rgba(84, 58, 30, 0.14);
  background: rgba(253, 249, 240, 0.92);
  color: var(--sub);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.search-quick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-chip,
.summary-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.quick-chip {
  border: 0;
  cursor: pointer;
  background: rgba(107, 74, 44, 0.1);
  color: var(--pri-2);
}

.db-status {
  margin: 12px 0 16px;
  color: var(--jade);
  font-size: 14px;
}

.compact-note {
  margin: 4px 0 0;
  color: var(--sub);
}

.search-summary:empty {
  display: none;
}

.search-summary {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.summary-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.summary-row-meta {
  gap: 10px;
}

.summary-block {
  display: grid;
  gap: 8px;
}

.summary-label {
  font-size: 13px;
  color: var(--sub);
}

.summary-group {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-pill {
  background: rgba(253, 249, 240, 0.92);
  color: var(--ink);
  border: 1px solid var(--line);
}

.summary-pill-button {
  cursor: pointer;
  font: inherit;
}

.summary-pill-button.active {
  background: rgba(165, 77, 42, 0.14);
  border-color: rgba(165, 77, 42, 0.3);
  color: var(--accent-deep);
  font-weight: 700;
}

.summary-pill.muted {
  color: var(--sub);
}

.match-note {
  margin: 0;
  color: var(--sub);
  font-size: 14px;
}

.match-mark {
  background: rgba(181, 90, 50, 0.18);
  color: var(--accent-deep);
  padding: 0 2px;
  border-radius: 4px;
}

.result-head {
  margin-top: 28px;
  margin-bottom: 14px;
}

.result-head h3 {
  margin: 0;
  font-size: 20px;
}

.search-result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 16px;
}

.stat-card {
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 24px rgba(71, 46, 20, 0.06);
}

.stat-card .value {
  font-size: 30px;
  font-weight: 700;
  color: var(--pri-2);
}

.stat-card .label {
  color: var(--sub);
  font-size: 13px;
}

.schema-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(107, 74, 44, 0.12);
  color: var(--pri-2);
  font-size: 12px;
}

.tag.muted {
  background: rgba(109, 98, 81, 0.12);
  color: var(--sub);
}

.field-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.browser-schema-fold {
  margin-top: 2px;
}

.field-row {
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.field-name {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.field-name code {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
  color: var(--pri-2);
  background: rgba(107, 74, 44, 0.08);
  padding: 2px 8px;
  border-radius: 999px;
}

.field-desc {
  color: var(--sub);
  font-size: 14px;
}

.case-card {
  position: relative;
  overflow: hidden;
}

.term-card {
  display: grid;
  gap: 14px;
}

.term-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.term-glyph {
  min-width: 60px;
  height: 60px;
  padding: 6px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(165, 77, 42, 0.86), rgba(119, 51, 27, 0.94));
  color: #f7ecd6;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 30px;
  font-weight: 700;
  box-shadow: 0 14px 24px rgba(72, 33, 13, 0.16);
}

.term-glyph-link {
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.term-glyph-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(18, 38, 63, 0.08);
}

.term-meta-stack {
  display: grid;
  gap: 8px;
}

.term-core {
  margin: 0;
  color: var(--ink);
}

.mini-chip-list,
.term-footer,
.case-members {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-chip,
.term-case-ref {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.mini-chip {
  background: rgba(107, 74, 44, 0.08);
  color: var(--pri-2);
}

.term-case-ref {
  background: rgba(165, 77, 42, 0.12);
  color: #8f4424;
  text-decoration: none;
}

.term-actions,
.case-actions {
  margin-top: 4px;
}

.detail-link,
.inline-link {
  color: var(--pri-2);
  text-decoration: none;
  font-weight: 700;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(107, 74, 44, 0.1);
}

.detail-layout {
  display: grid;
  gap: 18px;
}

.detail-stack {
  display: grid;
  gap: 18px;
}

.detail-focus-card {
  display: grid;
  gap: 18px;
}

.detail-focus-top {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.detail-glyph {
  min-width: 110px;
  min-height: 110px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(165, 77, 42, 0.88), rgba(119, 51, 27, 0.96));
  color: #f7ecd6;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 56px;
  font-weight: 700;
  box-shadow: 0 18px 30px rgba(72, 33, 13, 0.16);
}

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

.detail-lead,
.detail-paragraph {
  margin: 0;
  white-space: pre-wrap;
}

.detail-card-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.detail-card {
  padding: 16px;
}

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

.detail-list p,
.fold-body p {
  margin: 0;
  display: grid;
  gap: 4px;
}

.detail-list strong,
.fold-body strong {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sub);
}

.detail-block {
  display: grid;
  gap: 10px;
}

.detail-block h3 {
  margin: 0;
}

.fold-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(252, 247, 238, 0.9);
  box-shadow: var(--paper-shadow);
  overflow: hidden;
}

.inline-fold {
  margin-top: 14px;
  background: rgba(252, 247, 238, 0.82);
}

.result-fold {
  grid-column: 1 / -1;
}

.result-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.result-link-card {
  display: grid;
  gap: 12px;
  align-content: center;
}

.browser-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: 280px minmax(0, 1fr);
}

.browser-sidebar,
.browser-main,
.browser-panel {
  display: grid;
  gap: 18px;
}

.browser-sidebar {
  align-self: start;
  position: sticky;
  top: 20px;
}

.sidebar-card,
.browser-toolbar {
  display: grid;
  gap: 14px;
}

.sidebar-nav,
.sidebar-filter-list {
  display: grid;
  gap: 10px;
}

.sidebar-empty {
  padding: 8px 2px;
}

.sidebar-button,
.filter-chip {
  width: 100%;
  border: 1px solid rgba(84, 58, 30, 0.12);
  background: rgba(252, 247, 238, 0.88);
  color: var(--ink);
  border-radius: 16px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.sidebar-button,
.filter-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.sidebar-button.active,
.filter-chip.active {
  border-color: rgba(165, 77, 42, 0.34);
  background: rgba(165, 77, 42, 0.08);
}

.browser-search-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.8fr);
}

.toolbar-field {
  display: grid;
  gap: 8px;
}

.toolbar-field span {
  font-size: 13px;
  color: var(--sub);
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-button {
  cursor: pointer;
}

.browser-card {
  min-height: 100%;
}

.browser-preset-fold {
  margin-top: -4px;
}

.browser-preset-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.preset-chip {
  border: 1px solid rgba(84, 58, 30, 0.14);
  background: rgba(253, 249, 240, 0.94);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.preset-chip:hover {
  border-color: rgba(165, 77, 42, 0.28);
  background: rgba(165, 77, 42, 0.08);
}

.browser-pagination[hidden] {
  display: none;
}

.pagination-card {
  display: grid;
  gap: 14px;
}

.pagination-meta,
.pagination-controls,
.pagination-jump {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.pagination-meta {
  color: var(--sub);
  font-size: 14px;
}

.pagination-button {
  border: 1px solid rgba(84, 58, 30, 0.14);
  background: rgba(253, 249, 240, 0.92);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
}

.pagination-button.active {
  background: rgba(165, 77, 42, 0.12);
  border-color: rgba(165, 77, 42, 0.28);
  color: var(--accent-deep);
}

.pagination-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pagination-jump input {
  width: 88px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(84, 58, 30, 0.18);
  background: rgba(253, 249, 240, 0.94);
  color: var(--ink);
}

.fold-card summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-weight: 700;
}

.fold-card summary::-webkit-details-marker {
  display: none;
}

.fold-card summary::after {
  content: "展开";
  float: right;
  color: var(--sub);
  font-weight: 400;
}

.fold-card[open] summary::after {
  content: "收起";
}

.fold-body {
  padding: 0 18px 18px;
}

.evidence-card {
  display: grid;
  gap: 12px;
}

.term-nav-chip {
  text-decoration: none;
}

.inline-tag-link {
  text-decoration: none;
}

.case-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--accent), #7b2f1c);
}

.case-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.case-term {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(165, 77, 42, 0.1);
  color: #8f4424;
  font-size: 13px;
  font-weight: 700;
}

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

.case-subtitle {
  margin: 0 0 12px;
  color: var(--sub);
}

.case-summary {
  margin: 12px 0 0;
}

.case-meta,
.case-body,
.case-footer {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.case-meta {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.case-footer {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.case-meta p,
.case-body p,
.case-footer p {
  margin: 0;
  display: grid;
  gap: 4px;
}

.case-meta strong,
.case-body strong,
.case-footer strong {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sub);
}

.quote-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.quote-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(107, 74, 44, 0.1);
  color: var(--pri-2);
  font-size: 13px;
}

.flow-note {
  margin: 0 0 16px;
  color: var(--sub);
  max-width: 860px;
}

.flow-placeholder {
  display: grid;
  gap: 14px;
}

.flow-placeholder-box {
  min-height: 260px;
  border-radius: 24px;
  border: 1px dashed rgba(84, 58, 30, 0.32);
  background:
    linear-gradient(180deg, rgba(251, 246, 237, 0.84), rgba(245, 236, 220, 0.78));
  position: relative;
}

.flow-placeholder-box::before {
  content: "流程图占位";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  letter-spacing: 0.14em;
  color: rgba(84, 58, 30, 0.46);
}

.flow-placeholder-note {
  margin: 0;
  color: var(--sub);
}

.flow-figure {
  margin: 0;
  display: grid;
  gap: 12px;
}

.flow-figure img {
  width: 100%;
  display: block;
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: var(--paper-shadow);
}

.flow-figure figcaption {
  color: var(--sub);
}

.flow-figure figcaption p {
  margin: 0;
}

.flow-figure figcaption p + p {
  margin-top: 10px;
}

.flow-diagram {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(252, 247, 238, 0.94), rgba(244, 236, 221, 0.9));
  border: 1px solid var(--line);
  box-shadow: var(--paper-shadow);
}

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

.flow-branch.labels {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.flow-node {
  position: relative;
  border-radius: 16px;
  padding: 16px 14px;
  color: #fff;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 12px 24px rgba(16, 42, 67, 0.1);
}

.flow-node.large {
  padding: 18px 14px;
  font-size: 20px;
}

.flow-node::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 2px;
  height: 14px;
  background: rgba(16, 42, 67, 0.18);
  transform: translateX(-50%);
}

.flow-branch.labels .flow-node::after {
  display: none;
}

.flow-node.start { background: #4a3828; }
.flow-node.blue { background: #6b4a2c; }
.flow-node.red { background: #9e4323; }
.flow-node.light { background: #8f7351; }
.flow-node.pink { background: #b96a4e; }
.flow-node.out { background: #5c6652; }

.flow-diagram > .flow-node.start::after,
.flow-diagram > .flow-note.end::after {
  display: none;
}

.flow-diagram > .flow-note.end {
  text-align: center;
  margin-top: 6px;
}

.timeline {
  margin: 0;
  padding-left: 22px;
  position: relative;
}

.timeline li {
  margin-bottom: 12px;
  padding-left: 8px;
}

.timeline li::marker {
  color: var(--accent);
}

.footer {
  text-align: center;
  color: var(--sub);
  padding: 26px 20px 34px;
  font-size: 13px;
}

.cta,
.page-link,
.ghost-link,
.detail-link,
.search-clear,
.sidebar-button,
.filter-chip,
.quick-chip {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.cta:hover,
.page-link:hover,
.ghost-link:hover,
.detail-link:hover,
.search-clear:hover,
.sidebar-button:hover,
.filter-chip:hover,
.quick-chip:hover {
  transform: translateY(-1px);
}

.card,
.showcase-shell,
.fold-card,
.flow-figure img {
  animation: fade-rise 420ms ease both;
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.case-study-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.case-quote-card,
.case-structure-card,
.case-step-card,
.glossary-card {
  position: relative;
  overflow: hidden;
}

.case-quote {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.case-quote p {
  margin: 0;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  color: var(--ink);
}

.case-structure-card h3 {
  margin-top: 0;
}

.case-structure-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.case-structure-flow span {
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(160, 90, 58, 0.24);
  background: rgba(255, 248, 238, 0.88);
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}

.case-step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.case-step-card {
  min-height: 100%;
}

.case-step-card-wide {
  grid-column: span 2;
}

.case-step-index {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(160, 90, 58, 0.14), rgba(207, 171, 123, 0.28));
  color: var(--accent-deep);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
}

.case-step-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.knowledge-hero .hero-content {
  gap: 18px;
}

.knowledge-anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.knowledge-anchor-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(160, 90, 58, 0.24);
  background: rgba(255, 248, 238, 0.78);
  color: var(--ink);
  text-decoration: none;
}

.knowledge-anchor-chip strong {
  color: var(--accent-deep);
}

.knowledge-shell {
  display: grid;
  gap: 36px;
}

.knowledge-section-meta {
  margin: 0;
  color: var(--accent-deep);
  font-weight: 700;
}

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

.glossary-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.glossary-card-head h3 {
  margin: 0;
}

.glossary-index {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(160, 90, 58, 0.12);
  color: var(--accent-deep);
  font-weight: 800;
}

.glossary-definition {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

@media (max-width: 700px) {
  .nav {
    align-items: flex-start;
  }

  .flow-branch {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-stage {
    grid-template-columns: 1fr;
  }

  .hero-copy-col {
    padding: 22px 20px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .ghost-link {
    margin-left: 0;
  }

  .showcase-links,
  .showcase-stats,
  .showcase-feature {
    grid-template-columns: 1fr;
  }

  .case-study-layout,
  .case-step-grid,
  .knowledge-grid,
  .case-structure-flow {
    grid-template-columns: 1fr;
  }

  .search-result-grid {
    grid-template-columns: 1fr;
  }

  .case-step-card-wide {
    grid-column: auto;
  }

  .case-footer {
    grid-template-columns: 1fr;
  }

  .search-bar {
    align-items: stretch;
  }

  .search-clear {
    width: 100%;
  }

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

  .browser-sidebar {
    position: static;
  }

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

  .pagination-meta,
  .pagination-controls,
  .pagination-jump {
    flex-direction: column;
    align-items: flex-start;
  }

  .summary-row {
    flex-direction: column;
    gap: 12px;
  }

  .detail-focus-top {
    flex-direction: column;
  }

  .detail-glyph {
    min-width: 88px;
    min-height: 88px;
    font-size: 44px;
  }
}
