:root {
  --ds-paper: #f0e3ea;
  --ds-ink: #2c1a24;
  --ds-ink-2: #5a4250;
  --ds-green: #2f6b3a;
  --ds-green-d: #24542d;
  --ds-wood: #c89b6d;
  --ds-wood-d: #a87c52;
  --ds-line: #dcc6d1;
  --ds-sheet: #fffafc;
  --ds-r-big: 20px;
  --ds-r-small: 6px;
  --ds-latin: "Century Schoolbook", "Georgia", serif;
  --ds-cjk: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --ds-gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body.ds-body {
  margin: 0;
  background: var(--ds-paper);
  color: var(--ds-ink);
  font-family: var(--ds-cjk);
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: break-word;
}

a { color: var(--ds-green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ds-green-d); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ds-green); outline-offset: 2px; border-radius: 4px; }

img { max-width: 100%; height: auto; }
.ds-nb { display: inline-block; }

.ds-skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ds-ink); color: var(--ds-sheet); padding: 10px 16px; border-radius: var(--ds-r-small);
}
.ds-skip:focus { top: 12px; }

.ds-wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--ds-gutter); }

.ds-top { border-bottom: 1px solid var(--ds-line); background: var(--ds-paper); }
.ds-top-in {
  max-width: 1180px; margin: 0 auto; padding: 8px var(--ds-gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px;
}
.ds-mark { display: inline-flex; align-items: center; min-height: 48px; color: var(--ds-ink); text-decoration: none; }
.ds-logo { display: block; width: 132px; height: auto; }
.ds-nav { display: flex; flex-wrap: wrap; gap: 0 4px; margin-left: -10px; }
.ds-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--ds-ink); text-decoration: none; font-size: 15px; border-radius: var(--ds-r-small);
}
.ds-nav a:hover { background: var(--ds-sheet); }
.ds-nav a[aria-current="page"] { color: var(--ds-green); font-weight: 700; box-shadow: inset 0 -3px 0 var(--ds-green); border-radius: 0; }

.ds-hero {
  max-width: 1180px; margin: 0 auto; padding: 18px var(--ds-gutter) 36px;
  display: grid; grid-template-columns: 1fr; gap: 20px;
}
.ds-kicker { margin: 0 0 6px; font-size: 14px; color: var(--ds-ink-2); }
.ds-h1 {
  margin: 0; font-size: 43px; line-height: 1.12; font-weight: 800; letter-spacing: -0.01em;
  line-break: strict; text-wrap: balance;
}
.ds-pick {
  margin-top: 16px; padding: 12px 14px 12px 16px;
  border-left: 4px solid var(--ds-green); background: var(--ds-sheet); border-radius: 0 var(--ds-r-small) var(--ds-r-small) 0;
}
.ds-pick-tag { margin: 0; font-size: 13px; font-weight: 700; color: var(--ds-green); }
.ds-pick-link {
  display: inline-block; margin: 2px 0; font-size: 17px; font-weight: 700; line-height: 1.5; color: var(--ds-ink);
  text-decoration: underline; text-decoration-color: var(--ds-wood); text-decoration-thickness: 2px;
}
.ds-pick-link:hover { color: var(--ds-green); }
.ds-pick-why { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ds-ink-2); }

.ds-board {
  position: relative; display: flex; flex-direction: column;
  background: var(--ds-wood); border-radius: var(--ds-r-big);
  padding: 30px 12px 14px;
  box-shadow: inset 0 0 0 3px var(--ds-wood-d), 0 18px 28px -20px rgba(44, 26, 36, .55);
}
.ds-clip {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 34px; border-radius: 10px;
  background: linear-gradient(180deg, #bdb6ba 0%, #8d868a 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 #6e676b;
}
.ds-clip::before {
  content: ""; position: absolute; left: 50%; top: -12px; transform: translateX(-50%);
  width: 34px; height: 18px; border: 5px solid #8d868a; border-bottom: 0; border-radius: 10px 10px 0 0;
}
.ds-sheet {
  position: relative; z-index: 2; order: 2;
  background: var(--ds-sheet); border-radius: var(--ds-r-small);
  padding: 16px 16px 10px; box-shadow: 0 2px 0 rgba(44, 26, 36, .12);
}
.ds-sheet-h { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.ds-check { list-style: none; margin: 0; padding: 0; }
.ds-check li {
  position: relative; padding: 8px 0 8px 32px; border-top: 1px solid var(--ds-line);
  display: grid; gap: 2px;
}
.ds-check li:first-child { border-top: 0; }
.ds-check li::before {
  content: ""; position: absolute; left: 0; top: 12px; width: 20px; height: 20px;
  border: 2px solid var(--ds-green); border-radius: 4px; background: var(--ds-sheet);
}
.ds-check li::after {
  content: ""; position: absolute; left: 6px; top: 15px; width: 7px; height: 11px;
  border: solid var(--ds-green); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.ds-check-k { font-weight: 700; font-size: 15px; }
.ds-check-v { font-size: 14px; line-height: 1.6; }
.ds-check-src { font-size: 13px; color: var(--ds-ink-2); }

.ds-slip {
  position: relative; z-index: 1; order: 1;
  background: var(--ds-sheet); border-radius: var(--ds-r-small);
  padding: 12px 14px 12px; margin: 0 0 12px;
  border-top: 2px dashed var(--ds-line);
}
.ds-slip-h { margin: 0; font-size: 13px; font-weight: 700; color: var(--ds-ink-2); }
.ds-code-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 2px 0 4px; }
.ds-code {
  font-family: var(--ds-latin); font-size: 30px; font-weight: 700; letter-spacing: .06em; color: var(--ds-ink);
  background: none; padding: 0;
}
.ds-copy {
  min-height: 44px; min-width: 76px; padding: 0 16px; border: 0; border-radius: var(--ds-r-small);
  background: var(--ds-green); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.ds-copy:hover { background: var(--ds-green-d); }
.ds-copy.ds-copied { background: var(--ds-ink); }
.ds-slip-note { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--ds-ink); }
.ds-go {
  display: inline-flex; align-items: center; min-height: 46px; margin: 10px 0 6px; padding: 0 18px;
  border-radius: var(--ds-r-small); background: var(--ds-ink); color: var(--ds-sheet);
  font-weight: 700; text-decoration: none; font-size: 15px;
}
.ds-go:hover { background: var(--ds-green-d); color: #fff; }
.ds-slip-disc { margin: 0; font-size: 13px; line-height: 1.65; color: var(--ds-ink-2); }

.ds-home-body { padding-bottom: 40px; }
.ds-home-prose h2, .ds-shelf h2 {
  font-size: 24px; line-height: 1.35; margin: 34px 0 10px; padding-top: 16px; border-top: 2px solid var(--ds-ink);
  line-break: strict; text-wrap: balance;
}
.ds-shelf-more a { display: inline-flex; align-items: center; min-height: 44px; }

.ds-files { list-style: none; margin: 0; padding: 0; counter-reset: ds-f; }
.ds-file {
  position: relative; padding: 16px 16px 14px 56px; margin: 0 0 12px;
  background: var(--ds-sheet); border: 1px solid var(--ds-line); border-radius: var(--ds-r-small);
  counter-increment: ds-f;
}
.ds-file::before {
  content: counter(ds-f, decimal-leading-zero); position: absolute; left: 14px; top: 15px;
  font-family: var(--ds-latin); font-size: 20px; font-weight: 700; color: var(--ds-wood-d);
}
.ds-file-t { font-size: 18px; font-weight: 700; line-height: 1.5; color: var(--ds-ink); display: inline-block; min-height: 44px; padding: 8px 0 0; }
.ds-file-t:hover { color: var(--ds-green); }
.ds-file-d { margin: 4px 0 6px; font-size: 15px; line-height: 1.7; }
.ds-file-m { font-size: 13px; color: var(--ds-ink-2); }

.ds-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; padding: 8px 0 0; font-size: 14px; }
.ds-crumb a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.ds-crumb-sep { color: var(--ds-ink-2); padding: 0 2px; }
.ds-crumb-now { color: var(--ds-ink-2); padding: 0 4px; min-height: 44px; display: inline-flex; align-items: center; }

.ds-art-head { padding: 6px 0 14px; max-width: 46em; }
.ds-art-h1 {
  margin: 0 0 10px; font-size: 30px; line-height: 1.3; font-weight: 800;
  line-break: strict; text-wrap: balance;
}
.ds-byline { display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 14px; color: var(--ds-ink-2); }
.ds-cover { margin: 0 0 20px; }
.ds-cover img { display: block; width: 100%; border-radius: var(--ds-r-big); border: 1px solid var(--ds-line); }
.ds-cover figcaption { font-size: 13px; color: var(--ds-ink-2); margin-top: 6px; }
.ds-art-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.ds-toc {
  background: var(--ds-sheet); border: 1px solid var(--ds-line); border-left: 6px solid var(--ds-wood);
  border-radius: var(--ds-r-small); padding: 12px 14px;
}
.ds-toc-h { margin: 0 0 4px; font-weight: 700; font-size: 15px; }
.ds-toc-list { margin: 0; padding: 0 0 0 1.4em; }
.ds-toc-list li { font-size: 15px; line-height: 1.5; }
.ds-toc-list a { display: block; padding: 11px 0; color: var(--ds-ink); text-decoration-color: var(--ds-line); }
.ds-toc-list a:hover { color: var(--ds-green); }

.ds-prose { max-width: 38em; font-size: 16.5px; line-height: 1.85; }
.ds-prose p { margin: 0 0 1.05em; }
.ds-prose h2 {
  margin: 2.2em 0 .7em; padding-top: .7em; border-top: 2px solid var(--ds-ink);
  font-size: 24px; line-height: 1.4; line-break: strict; text-wrap: balance; scroll-margin-top: 16px;
}
.ds-prose h3 { margin: 1.6em 0 .5em; font-size: 19px; line-height: 1.5; scroll-margin-top: 16px; }
.ds-prose ul, .ds-prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.ds-prose li { margin: .3em 0; }
.ds-prose strong { font-weight: 700; }
.ds-prose blockquote {
  margin: 1.2em 0; padding: 12px 16px; background: var(--ds-sheet);
  border-left: 4px solid var(--ds-wood); border-radius: 0 var(--ds-r-small) var(--ds-r-small) 0;
}
.ds-prose blockquote p:last-child { margin-bottom: 0; }

.ds-prose ol.ds-ticks { list-style: none; padding: 0; counter-reset: ds-t; margin: 1em 0 1.3em; }
.ds-prose ol.ds-ticks > li {
  position: relative; counter-increment: ds-t; margin: 0; padding: 12px 14px 12px 50px;
  background: var(--ds-sheet); border: 1px solid var(--ds-line); border-top: 0;
}
.ds-prose ol.ds-ticks > li:first-child { border-top: 1px solid var(--ds-line); border-radius: var(--ds-r-small) var(--ds-r-small) 0 0; }
.ds-prose ol.ds-ticks > li:last-child { border-radius: 0 0 var(--ds-r-small) var(--ds-r-small); }
.ds-prose ol.ds-ticks > li::before {
  content: counter(ds-t); position: absolute; left: 14px; top: 14px; width: 24px; height: 24px;
  border: 2px solid var(--ds-green); border-radius: 4px; text-align: center; line-height: 20px;
  font-family: var(--ds-latin); font-size: 14px; font-weight: 700; color: var(--ds-green);
}

.ds-prose ul.ds-ticks { list-style: none; padding: 0; margin: 1em 0 1.3em; }
.ds-prose ul.ds-ticks > li {
  position: relative; margin: 0; padding: 12px 14px 12px 50px;
  background: var(--ds-sheet); border: 1px solid var(--ds-line); border-radius: var(--ds-r-small);
}
.ds-prose ul.ds-ticks > li::before {
  content: ""; position: absolute; left: 14px; top: 14px; width: 24px; height: 24px; box-sizing: border-box;
  border: 2px solid var(--ds-green); border-radius: 4px;
}
.ds-prose ul.ds-ticks > li::after {
  content: ""; position: absolute; left: 23px; top: 17px; width: 6px; height: 12px;
  border: solid var(--ds-green); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.ds-shot { margin: 1.3em 0 1.5em; }
.ds-shot img { display: block; border: 1px solid var(--ds-line); border-radius: var(--ds-r-small); background: #fff; }
.ds-shot-narrow img { max-width: min(100%, 420px); }
.ds-shot figcaption { margin-top: 6px; font-size: 13.5px; line-height: 1.6; color: var(--ds-ink-2); }

.ds-tablewrap { margin: 1.1em 0 1.4em; }
.ds-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.65; background: var(--ds-sheet); }
.ds-table th { text-align: left; background: var(--ds-ink); color: var(--ds-sheet); font-weight: 700; padding: 8px 10px; }
.ds-table td { padding: 9px 10px; border-bottom: 1px solid var(--ds-line); vertical-align: top; }

.ds-faq-item { padding: 2px 0 4px; border-bottom: 1px dashed var(--ds-line); }
.ds-faq-q { font-size: 18px; }
.ds-after { margin: 26px 0 40px; max-width: 38em; }
.ds-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.ds-tags-h { font-size: 14px; color: var(--ds-ink-2); }
.ds-tag {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px;
  border: 1px solid var(--ds-wood-d); border-radius: var(--ds-r-small); font-size: 14px; color: var(--ds-ink);
  background: var(--ds-sheet);
}
.ds-after-list { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ds-ink); }
.ds-after-list li { border-bottom: 1px solid var(--ds-line); }
.ds-after-list a { display: flex; align-items: center; min-height: 48px; }

.ds-prose .ds-slip-art {
  margin: 1.4em 0 1.6em; padding: 16px 18px; border: 0;
  background: var(--ds-sheet);
  box-shadow: 0 0 0 10px var(--ds-wood), 0 0 0 13px var(--ds-wood-d);
  border-radius: var(--ds-r-small);
}
.ds-prose .ds-slip-art p { margin: 0; }
.ds-prose .ds-slip-art .ds-go { margin: 12px 0 8px; }

.ds-doc-wrap, .ds-list-wrap, .ds-find, .ds-lost { padding-bottom: 48px; }
.ds-doc { background: var(--ds-sheet); border: 1px solid var(--ds-line); border-radius: var(--ds-r-small); padding: 20px 18px 10px; max-width: 46em; position: relative; }
.ds-doc-tab {
  display: inline-block; margin: 0 0 8px; padding: 2px 10px; font-size: 13px; font-weight: 700;
  background: var(--ds-wood); color: var(--ds-ink); border-radius: var(--ds-r-small);
}
.ds-doc-h1, .ds-list-h1 { margin: 0 0 8px; font-size: 30px; line-height: 1.3; line-break: strict; text-wrap: balance; }
.ds-doc .ds-prose { margin-top: 16px; }
.ds-list-head { padding: 6px 0 10px; max-width: 46em; }
.ds-list-intro { font-size: 16px; }
.ds-count { font-size: 14px; color: var(--ds-ink-2); margin: 4px 0 12px; }
.ds-pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.ds-pager-a, .ds-pager-now {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px;
  border: 1px solid var(--ds-line); border-radius: var(--ds-r-small); background: var(--ds-sheet);
}
.ds-pager-now { background: var(--ds-ink); color: var(--ds-sheet); }
.ds-termlist { list-style: none; padding: 0; }

.ds-find-form { margin: 14px 0 8px; max-width: 40em; }
.ds-find-label { display: block; font-weight: 700; margin-bottom: 4px; }
.ds-find-row { display: flex; gap: 8px; }
.ds-find-input {
  flex: 1; min-width: 0; min-height: 46px; padding: 0 12px; font: inherit; font-size: 16px;
  border: 2px solid var(--ds-ink); border-radius: var(--ds-r-small); background: var(--ds-sheet); color: var(--ds-ink);
}
.ds-find-btn {
  min-height: 46px; padding: 0 18px; border: 0; border-radius: var(--ds-r-small);
  background: var(--ds-green); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.ds-find-state { font-size: 14px; color: var(--ds-ink-2); }

.ds-foot { border-top: 6px solid var(--ds-wood); background: var(--ds-ink); color: #f3e9ee; margin-top: 20px; }
.ds-foot a { color: #f3e9ee; }
.ds-foot a:hover { color: #fff; }
.ds-foot-in {
  max-width: 1180px; margin: 0 auto; padding: 26px var(--ds-gutter) 8px;
  display: grid; grid-template-columns: 1fr; gap: 18px;
}
.ds-mark-foot { color: #f3e9ee; }
.ds-foot-say, .ds-foot-aff { margin: 6px 0; font-size: 14px; line-height: 1.7; max-width: 34em; }
.ds-foot-h { margin: 0 0 2px; font-size: 14px; font-weight: 700; color: var(--ds-wood); }
.ds-foot-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.ds-foot-list a, .ds-foot-rss a { display: inline-flex; align-items: center; min-height: 46px; font-size: 15px; }
.ds-foot-aff a { padding: 14px 0; }
.ds-foot-rss { margin: 4px 0 0; }
.ds-foot-copy { max-width: 1180px; margin: 0 auto; padding: 10px var(--ds-gutter) 22px; font-size: 13px; color: #cdb9c4; font-family: var(--ds-latin); }

@media (max-width: 719px) {
  .ds-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ds-table, .ds-table tbody, .ds-table tr, .ds-table td { display: block; width: 100%; }
  .ds-table tr { border: 1px solid var(--ds-line); border-radius: var(--ds-r-small); margin-bottom: 10px; background: var(--ds-sheet); }
  .ds-table td { border-bottom: 1px dashed var(--ds-line); padding: 8px 12px; }
  .ds-table td:last-child { border-bottom: 0; }
  .ds-table td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 700; color: var(--ds-green); }
  .ds-table td:first-child { font-weight: 700; background: var(--ds-ink); color: var(--ds-sheet); border-radius: var(--ds-r-small) var(--ds-r-small) 0 0; }
  .ds-table td:first-child::before { display: none; }
  .ds-table { background: none; }
}

@media (min-width: 720px) {
  :root { --ds-gutter: 28px; }
  body.ds-body { font-size: 17px; }
  .ds-art-h1 { font-size: 40px; }
  .ds-doc-h1, .ds-list-h1 { font-size: 36px; }
  .ds-doc { padding: 30px 34px 16px; }
  .ds-foot-in { grid-template-columns: 1.2fr 1fr; }
}

@media (min-width: 1000px) {
  .ds-hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 48px; padding: 34px var(--ds-gutter) 54px; align-items: start; }
  .ds-hero-l { padding-top: 22px; }
  .ds-kicker { font-size: 16px; margin-bottom: 12px; }
  .ds-h1 { font-size: 84px; line-height: 1.06; letter-spacing: -0.02em; }
  .ds-pick { margin-top: 28px; padding: 16px 18px 16px 20px; max-width: 34em; }
  .ds-pick-link { font-size: 19px; }
  .ds-pick-why { font-size: 15px; }
  .ds-board { padding: 34px 20px 18px; transform: rotate(-.6deg); }
  .ds-sheet { order: 1; padding: 18px 20px 12px; }
  .ds-slip {
    order: 2; margin: -22px 14px 0; padding: 32px 18px 14px; transform: rotate(1.4deg);
    border-top: 0; box-shadow: 0 2px 0 rgba(44, 26, 36, .14);
  }
  .ds-prose .ds-slip-art { transform: none; margin: 1.6em 13px 1.8em; padding: 18px 22px; }
  .ds-home-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 56px; }
  .ds-art-grid { grid-template-columns: 250px minmax(0, 1fr); gap: 44px; align-items: start; }
  .ds-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
  .ds-toc-list a { padding: 8px 0; }
  .ds-prose h2 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .ds-top, .ds-foot, .ds-toc, .ds-copy, .ds-go { display: none; }
  body.ds-body { background: #fff; }
}
