:root {
  color-scheme: light;
  --surface: #f7f8f3;
  --plain: #fff;
  --ink: #21392e;
  --muted: #486056;
  --accent: #1d5c45;
  --tint: #e9f1e9;
  --line: #d7e2d9;
  font: 16px/1.65 system-ui, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--surface);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .23em; }
:focus-visible { outline: 3px solid #a64c1d; outline-offset: 3px; }
h1, h2, p, figure { margin: 0; }
p + p { margin-top: .75rem; }
.layout { width: min(100% - 2rem, 63rem); margin: auto; padding: 1.7rem 0 3rem; }
.breadcrumb, .contact-links { display: flex; gap: .55rem 1rem; flex-wrap: wrap; align-items: center; }
.breadcrumb { font-size: .875rem; color: var(--muted); }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; padding: 1.55rem 0 1.85rem; }
.kicker { color: var(--accent); font-weight: 650; letter-spacing: .09em; font-size: .825rem; }
h1 { font-size: clamp(1.7rem, 5vw, 3rem); line-height: 1.2; margin: .55rem 0 .7rem; letter-spacing: -.025em; }
.lede, .contact p, dialog p { color: var(--muted); }
h2 { font-size: 1.24rem; line-height: 1.4; }
.button, button { border: 1px solid var(--line); color: var(--accent); font: inherit; background: var(--plain); text-decoration: none; cursor: pointer; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.7rem; padding: .4rem .9rem; border-radius: .55rem; white-space: nowrap; font-weight: 650; }
.primary { background: var(--accent); color: var(--plain); border-color: var(--accent); }
.primary:hover { background: #144836; }
.reader { background: var(--plain); border: 1px solid var(--line); border-radius: .9rem; padding: clamp(.7rem, 2.2vw, 1.4rem); }
.reader-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.switcher, .pager, .page-numbers { display: flex; align-items: center; gap: .32rem; }
.switcher { display: inline-flex; flex-wrap: wrap; background: var(--tint); padding: .23rem; border-radius: .6rem; }
.switcher button, .pager button, .page-numbers button { border-radius: .4rem; min-height: 2.35rem; padding: .25rem .6rem; font-size: .875rem; }
.switcher button { border-color: transparent; background: transparent; }
.switcher button span { margin-inline-start: .18rem; font-size: .76rem; }
.switcher button[aria-pressed="true"], .page-numbers button[aria-current="page"] { color: var(--plain); background: var(--accent); border-color: var(--accent); }
.pages { display: flex; justify-content: space-between; gap: .55rem 1rem; flex-wrap: wrap; padding-top: .8rem; margin-top: .8rem; border-top: 1px solid var(--line); }
.pager { gap: .5rem; }
.pager [role="status"] { text-align: center; color: var(--muted); font-size: .875rem; min-width: 6ch; font-variant-numeric: tabular-nums; }
.pager button:disabled { color: var(--muted); opacity: .55; cursor: default; }
.page-numbers button { min-width: 2.25rem; }
.sheet { margin-top: 1rem; }
.sheet figcaption { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: .65rem; font-size: .875rem; }
.sheet figcaption > div { display: flex; flex-wrap: wrap; gap: .45rem 1rem; }
.sheet-image { display: grid; place-items: center; padding: clamp(.15rem, 1.5vw, .85rem); background: #eef1ec; border: 1px solid var(--line); border-radius: .55rem; }
.sheet-image img { display: block; width: min(100%, 46rem); height: auto; background: var(--plain); }
.group-title { margin-top: 1rem; }
.contact { padding: 1.2rem .25rem; margin-top: .9rem; }
.contact h2, dialog h2 { margin-bottom: .5rem; }
.contact-links { margin-top: .75rem; }
dialog { width: min(30rem, 100% - 1.8rem); max-height: calc(100% - 1.8rem); padding: clamp(1rem, 5vw, 1.65rem); border: 1px solid var(--line); border-radius: .85rem; color: var(--ink); background: var(--surface); box-shadow: 0 12px 36px #10271b36; }
dialog::backdrop { background: #0c251c83; }
dialog form { display: flex; justify-content: end; margin-top: 1.05rem; }
@media (max-width: 40rem) {
  .layout { width: calc(100% - 1.3rem); padding-top: 1.05rem; }
  .intro { align-items: start; flex-direction: column; }
}
