:root {
  color-scheme: light;
  --gs-paper: #f8f4eb;
  --gs-surface: #fffdf7;
  --gs-ink: #243b35;
  --gs-muted: #53625a;
  --gs-gold: #8c642a;
  --gs-line: #ded3be;
  --gs-serif: "Noto Serif SC", "Songti SC", "Noto Serif CJK SC", SimSun, serif;
  --gs-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

body {
  margin: 0;
  background: var(--gs-paper);
  color: var(--gs-ink);
  font: 16px/1.75 var(--gs-sans);
}

.gs-page, .gs-page * { box-sizing: border-box; }
.gs-page {
  max-width: 1220px;
  margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 48px) 0;
}
.gs-fallback, .gs-footer {
  max-width: 1220px;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 48px);
}
.gs-footer { color: var(--gs-muted); font-size: .85rem; }
.gs-page a, .gs-fallback a { color: inherit; text-underline-offset: .23em; }
.gs-page p { margin: .65em 0; }
.gs-page h1, .gs-page h2, .gs-page h3, .gs-page h4 {
  margin: 0;
  font-family: var(--gs-serif);
  line-height: 1.35;
  font-weight: 600;
}
.gs-page h2 { font-size: clamp(1.68rem, 3.2vw, 2.6rem); }
.gs-page h3 { font-size: clamp(1.19rem, 2vw, 1.53rem); }
.gs-page h4 { font-size: 1.17rem; }
.gs-page [hidden] { display: none !important; }
.gs-page :focus-visible { outline: 3px solid #9a6b2e; outline-offset: 3px; }

.gs-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, .75fr);
  align-items: end;
  gap: clamp(24px, 5vw, 68px);
  min-width: 0;
  padding: clamp(30px, 6vw, 82px);
  color: #fff6e4;
  border: 1px solid #6b7857;
  border-radius: 32px 8px;
  background: radial-gradient(ellipse at 100% 0%, #697050 0%, transparent 54%), #193c33;
  box-shadow: 0 20px 45px #22382e18;
}
.gs-hero::before {
  position: absolute;
  inset: 7px;
  border: 1px solid #c5ac72a8;
  border-radius: 25px 3px;
  pointer-events: none;
  content: "";
}
.gs-page .gs-kicker {
  margin: 0 0 .6em;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .11em;
  color: var(--gs-gold);
}
.gs-hero .gs-kicker { color: #efce90; }
.gs-hero h1 { font-size: clamp(2.85rem, 7vw, 5rem); }
.gs-page .gs-subtitle {
  margin: .1em 0 .4em;
  font: 600 clamp(1.25rem, 2.5vw, 1.9rem)/1.45 var(--gs-serif);
  color: #f0d69e;
}
.gs-page .gs-hero-intro { max-width: 35em; color: #f2eddb; margin-bottom: 1.3em; }
.gs-hero-index {
  min-width: 0;
  padding: 15px 0 0 22px;
  border-left: 1px solid #efce9070;
}
.gs-hero-index dl { margin: 0; }
.gs-hero-index dl div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid #efce9040;
}
.gs-hero-index dt { font-size: .88rem; color: #f2eddb; }
.gs-hero-index dd {
  flex-shrink: 0;
  margin: 0;
  color: #f0d69e;
  font: 1.55rem Georgia, serif;
  font-variant-numeric: tabular-nums;
}

.gs-primary, .gs-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 18px;
  border: 1px solid #a7844a;
  border-radius: 9px;
  color: #33291c;
  background: linear-gradient(120deg, #d6b97b, #f5e4bc);
  font: 650 1rem/1.35 var(--gs-sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.gs-page a.gs-primary { color: #33291c; }
.gs-secondary { background: var(--gs-surface); border-color: var(--gs-line); color: var(--gs-ink); }
.gs-primary:hover { background: #efd9a4; }
.gs-secondary:hover { border-color: var(--gs-gold); }
.gs-primary:disabled { opacity: .55; cursor: wait; }

.gs-toc {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 15px 0;
  border-bottom: 1px solid var(--gs-line);
}
.gs-toc a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: .9rem;
  text-decoration: none;
}
.gs-toc a:hover { background: #efe6d4; }
.gs-toc a span { color: var(--gs-gold); font: 1.05rem Georgia, serif; }

.gs-section {
  min-width: 0;
  padding: clamp(34px, 6vw, 66px) 0;
  border-bottom: 1px solid var(--gs-line);
  scroll-margin-top: 24px;
}
.gs-page .gs-lede { max-width: 48em; margin: .55em 0 1.25em; color: var(--gs-muted); }
.gs-card-grid, .gs-source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.gs-card, .gs-result-panel, .gs-form {
  min-width: 0;
  border: 1px solid var(--gs-line);
  border-radius: 14px;
  background: var(--gs-surface);
  padding: clamp(16px, 2.4vw, 26px);
}
.gs-card { overflow-wrap: anywhere; }
.gs-method { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 15px; }
.gs-method p { margin-bottom: 0; color: var(--gs-muted); }
.gs-method-letter {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #dfcfb0;
  color: var(--gs-gold);
  background: #f4ecdb;
  font: 1.45rem Georgia, serif;
}
.gs-page .gs-note {
  margin: 16px 0 0;
  padding: 12px 15px;
  border-left: 3px solid #a98144;
  background: #f0e8d9;
  color: #544a38;
  font-size: .91rem;
}
.gs-page .gs-help { color: var(--gs-muted); font-size: .88rem; overflow-wrap: anywhere; }

.gs-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 10px 0 18px;
  border: 0;
}
.gs-form fieldset + fieldset { margin-top: 12px; }
.gs-form legend {
  width: 100%;
  padding: 0 0 7px;
  border-bottom: 1px solid var(--gs-line);
  font: 600 1.14rem/1.35 var(--gs-serif);
}
.gs-fields, .gs-page .ls-place-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
}
.gs-wide { grid-column: 1 / -1; }
.gs-page label {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  font-size: .91rem;
  font-weight: 600;
}
.gs-page input, .gs-page select, .gs-page .ls-place-results button {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid #bbae95;
  border-radius: 8px;
  background: #fffefa;
  color: var(--gs-ink);
  font: 1rem/1.35 var(--gs-sans);
}
.gs-page input[type=date], .gs-page input[type=time] { -webkit-min-logical-width: 0; }
.gs-page input::placeholder { color: #686e65; }
.gs-page .ls-place-results {
  z-index: 10;
  position: absolute;
  inset: 100% 0 auto;
  min-width: 0;
  max-height: 16rem;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #c8b999;
  border-radius: 8px;
  background: var(--gs-surface);
  box-shadow: 0 10px 22px #243b351d;
}
.gs-page .ls-place-results button {
  display: block;
  padding: 8px 10px;
  text-align: left;
  overflow-wrap: anywhere;
  border-color: transparent;
  border-radius: 5px;
  cursor: pointer;
}
.gs-page .ls-place-results button:hover, .gs-page .ls-place-results button:focus-visible {
  background: #efe5d1;
  outline-offset: -2px;
}
.gs-page .ls-place-status { grid-column: 1 / -1; color: var(--gs-muted); font-weight: 400; }
.gs-page .ls-place-status:empty { display: none; }
.gs-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.gs-page .gs-status { min-height: 1.75em; margin: 12px 0; font-weight: 600; }
.gs-page .gs-status[data-kind=error] { color: #7b4527; }

.gs-result-panel { background: linear-gradient(150deg, #fffdf6, #f4ebd8); }
.gs-pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 18px;
}
.gs-pillar {
  display: grid;
  place-items: center;
  padding: 8px 3px;
  border: 1px solid #d0b989;
  border-radius: 9px;
  background: #fffdf6;
  color: var(--gs-gold);
}
.gs-pillar span { font-size: .84rem; }
.gs-pillar strong { font: 650 clamp(1.12rem, 2.8vw, 1.85rem)/1.45 var(--gs-serif); color: var(--gs-ink); }
.gs-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 15px;
  margin: 16px 0;
}
.gs-context div { min-width: 0; padding: 3px 0 7px; border-bottom: 1px solid #d8c8aa; }
.gs-context dt { color: var(--gs-muted); font-size: .85rem; }
.gs-context dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.gs-page .gs-results-title { margin-top: 24px; }
.gs-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 13rem));
  gap: 12px;
  margin: 12px 0;
}
.gs-badge {
  display: block;
  margin-bottom: .3em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--gs-gold);
}
.gs-result-card { border-top: 3px solid #b7b5a3; }
.gs-result-card[data-state=matched] { border-top-color: #54806a; }
.gs-result-card[data-state=pending] { border-top-color: #b38c52; }
.gs-result-state {
  display: inline-block;
  margin: 8px 0 0;
  padding: 3px 8px;
  border-radius: 6px;
  color: #394e41;
  background: #ebeee4;
  font-size: .83rem;
}
.gs-result-card[data-state=pending] .gs-result-state { background: #f1e6cf; color: #715028; }
.gs-page .gs-evidence-heading { margin-bottom: 2px; font-size: .88rem; font-weight: 700; }
.gs-evidence { margin: 0 0 8px; padding-left: 1.3em; }
.gs-result-reason { font-size: .89rem; color: var(--gs-muted); }
.gs-reading {
  padding-top: 8px;
  margin-top: 12px;
  border-top: 1px solid var(--gs-line);
}
.gs-reading summary { cursor: pointer; min-height: 42px; padding: 8px 0; font-weight: 600; }
.gs-variant { padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--gs-line); }
.gs-variant h4 { font: 650 .92rem/1.5 var(--gs-sans); }
.gs-citation {
  display: grid;
  min-width: 0;
  margin-bottom: 0;
  font-size: .86rem;
  color: var(--gs-muted);
}
.gs-citation a { color: var(--gs-ink); }
.gs-citation small { font-size: .82rem; }
.gs-source h3 { font-size: 1.14rem; }
.gs-source a { font-weight: 650; }
.gs-empty { grid-column: 1 / -1; color: var(--gs-muted); }

@media (max-width: 880px) {
  .gs-hero { grid-template-columns: 1fr; gap: 18px; }
  .gs-hero-index { padding: 0; border-left: 0; }
  .gs-hero-index dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .gs-hero-index dl div { display: block; }
}

@media (max-width: 620px) {
  .gs-hero { border-radius: 22px 7px; }
  .gs-hero::before { border-radius: 16px 3px; }
  .gs-toc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gs-card-grid, .gs-source-list { grid-template-columns: 1fr; }
  .gs-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 440px) {
  .gs-fields, .gs-page .ls-place-picker, .gs-context { grid-template-columns: 1fr; }
  .gs-actions { display: grid; }
  .gs-hero-index dt { font-size: .79rem; }
}
