:root {
  color-scheme: light;
  --paper: #f4efe6;
  --sheet: #fffaf3;
  --ink: #1d1914;
  --muted: #5d564c;
  --line: #e2d8c8;
  --green: #0f6e56;
  --green-dark: #0b5744;
  --notice: #8a4b08;
  --notice-bg: #fff1d6;
  --danger: #8d2b2b;
  --shadow: 0 18px 50px rgba(55, 38, 16, 0.08);
  font-family: "Avenir Next", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 110, 86, 0.08), transparent 28rem),
    var(--paper);
  line-height: 1.7;
}
a { color: var(--green-dark); }
img { max-width: 100%; }
button, input, .button {
  font: inherit;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: white;
  padding: 0.4rem 0.7rem;
}
.skip:focus { top: 0.6rem; }
.site-header, .site-footer, .sheet { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.site-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 0;
}
.brand {
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.sheet {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(1.2rem, 3vw, 2.4rem);
  margin-bottom: 2rem;
}
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 0.75rem 1.25rem;
  align-items: center;
}
.hero {
  width: 220px;
  height: auto;
  aspect-ratio: 16 / 9;
  justify-self: end;
  border-radius: 18px;
  background: #f7f1e7;
}
.intro h1, h1 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Songti SC", "Noto Serif SC", serif;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
}
h2 { font-size: 1.25rem; margin: 0 0 0.6rem; }
.intro p, .lead { font-size: 1.08rem; color: var(--muted); }
.crumbs { display: flex; gap: 0.45rem; color: var(--muted); font-size: 0.92rem; margin-bottom: 1rem; }
.crumbs a { text-decoration: none; }
.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.8fr); gap: 1.5rem; align-items: start; }
.split > *, .stack > * { min-width: 0; }
.cards, .related { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 0.8rem; }
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards a, .related li {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.cards a:hover, .related li:hover { border-color: var(--green); }
.cards span, .related span, .note, .faq dd, .muted { color: var(--muted); }
.panel, .sample, .faq, aside section, section { margin-top: 1.3rem; }
.drop {
  display: grid;
  gap: 0.2rem;
  place-items: center;
  text-align: center;
  min-height: 9.5rem;
  border: 1.5px dashed #c8bba8;
  border-radius: 22px;
  background: #fff;
  padding: 1.2rem;
  cursor: pointer;
}
.drop.is-over { border-color: var(--green); background: #f3fbf7; }
.drop input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.preview { display: block; margin-top: 0.8rem; max-height: 280px; border-radius: 16px; border: 1px solid var(--line); }
.actions, .download-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.download-row { margin-top: 0.9rem; align-items: stretch; }
button, .button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  text-decoration: none;
}
button.primary, .button { background: var(--green); border-color: var(--green); color: white; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
.notice, .error, .sample-flag {
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
}
.notice { background: var(--notice-bg); color: var(--notice); }
.error { background: #fff0f0; color: var(--danger); }
.sample-flag { background: #eef8f4; color: var(--green-dark); }
.table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 16px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 32rem; }
th, td { border-bottom: 1px solid var(--line); padding: 0.45rem; text-align: left; vertical-align: middle; }
th { background: #f7f1e7; }
td input, th input { width: 100%; border: 0; background: transparent; padding: 0.35rem; color: inherit; }
.row-action { width: 4.8rem; white-space: nowrap; }
.row-action button { padding-inline: 0.7rem; }
.text, blockquote {
  white-space: pre-wrap;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 1rem;
}
.follow {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex: 1 1 100%;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.follow .qr {
  width: 200px;
  height: auto;
  flex: none;
  border-radius: 8px;
  background: #fff;
}
.follow p, .follow strong { display: block; margin: 0; }
.follow p { color: var(--muted); font-size: 0.92rem; }
.faq dl { display: grid; gap: 0.8rem; }
.faq div { padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.faq dt { font-weight: 720; }
.faq dd { margin: 0.2rem 0 0; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0 0 2rem; color: var(--muted); }
ol { padding-left: 1.2rem; }
@media (max-width: 860px) {
  .split, .cards, .intro { grid-template-columns: 1fr; }
  .hero { width: min(100%, 280px); justify-self: start; }
  .site-header { align-items: flex-start; flex-direction: column; }
  table { min-width: 28rem; }
}
