/* 筆神文庫：kami（紙）設計語彙——羊皮紙底、墨藍單一強調色、暖灰四階、襯線字。
   參考 E:\claude\refs\open-design\design-systems\kami；字型排除中國字型廠，改用 Noto Serif TC。 */

:root {
  --paper: #f5f4ed;
  --ivory: #faf9f5;
  --sand: #e8e6dc;
  --desk: #e9e7dd;
  --ink: #141413;
  --ink-2: #3d3d3a;
  --olive: #504e49;
  --stone: #6b6a64;
  --line: #e2e0d5;
  --line-soft: #ebe9df;
  --brand: #1b365d;
  --on-brand: #faf9f5;
  --tag: #e4ecf5;
  --tag-soft: #eef2f7;
  --focus: #2d5a8a;
  --danger: #9b2c2c;
  --shadow: 0 4px 24px rgb(0 0 0 / 0.05);
  --page-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 8px 28px rgb(0 0 0 / 0.08);
  --serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", "MingLiU", serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1a1a18;
    --ivory: #222220;
    --sand: #30302e;
    --desk: #121211;
    --ink: #e8e6dd;
    --ink-2: #d2d0c6;
    --olive: #b9b6ab;
    --stone: #9f9c91;
    --line: #34342f;
    --line-soft: #2b2b28;
    --brand: #a9c1e0;
    --on-brand: #141413;
    --tag: #253142;
    --tag-soft: #1e2632;
    --focus: #a9c1e0;
    --danger: #f0a5a5;
    --shadow: 0 4px 24px rgb(0 0 0 / 0.3);
    --page-shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 28px rgb(0 0 0 / 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1a1a18;
  --ivory: #222220;
  --sand: #30302e;
  --desk: #121211;
  --ink: #e8e6dd;
  --ink-2: #d2d0c6;
  --olive: #b9b6ab;
  --stone: #9f9c91;
  --line: #34342f;
  --line-soft: #2b2b28;
  --brand: #a9c1e0;
  --on-brand: #141413;
  --tag: #253142;
  --tag-soft: #1e2632;
  --focus: #a9c1e0;
  --danger: #f0a5a5;
  --shadow: 0 4px 24px rgb(0 0 0 / 0.3);
  --page-shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 28px rgb(0 0 0 / 0.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  font-size: 16px;
  line-height: 1.65;
}
a { color: var(--brand); text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-weight: 500; color: var(--ink); }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ───────── 按鈕與表單 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 18px; border: 0; border-radius: 8px;
  background: var(--sand); color: var(--ink-2); box-shadow: 0 0 0 1px var(--line);
  font: 500 0.9375rem/1.2 var(--serif); letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { box-shadow: 0 0 0 1px var(--stone); }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 0 0 1px var(--brand); }
.btn-primary:hover { box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-2); font: 1.25rem/1 var(--serif);
  text-decoration: none; cursor: pointer;
}
.icon-btn:hover { background: var(--sand); }
input[type="search"], select {
  min-width: 0; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--ivory); color: var(--ink); font: 1rem/1.4 var(--serif);
}
input[type="search"]:focus, select:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 30%, transparent); }
input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { margin: 6px 0 0; color: var(--danger); font-size: 0.875rem; flex-basis: 100%; }

/* ───────── 版頭版尾 */
.site-head { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
/* 手機上版頭折成三列，固定在頂端會吃掉近兩成畫面 */
@media (max-width: 640px) { .site-head { position: static; } }
.head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding-block: 10px; }
.brand { color: var(--ink); font-size: 1.25rem; font-weight: 500; letter-spacing: 0.12em; text-decoration: none; }
.search { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 280px; max-width: 520px; }
.search input { flex: 1 1 160px; }
.head-nav a { color: var(--ink-2); text-decoration: none; }
.head-nav a:hover { color: var(--brand); text-decoration: underline; }
.head-row .theme-toggle { margin-inline-start: auto; }
.site-foot { margin-top: 64px; padding-block: 24px; border-top: 1px solid var(--line); color: var(--stone); font-size: 0.8125rem; }
main { flex: 1; }

/* ───────── 區塊 */
section { margin-block: 44px; }
.hero { margin-block: 40px 24px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: 0.08em; }
.lede { margin: 0; color: var(--olive); max-width: 40em; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 18px; }
.sec-head h2, section > h2 { margin: 0; font-size: 1.375rem; }
section > h2 { margin-bottom: 16px; }
.sec-note { margin: 0; color: var(--stone); font-size: 0.875rem; }
.sec-more { margin-inline-start: auto; font-size: 0.9375rem; }
.empty { color: var(--olive); }

/* ───────── 分類 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: baseline; gap: 6px; min-height: 36px; padding: 6px 14px;
  border-radius: 999px; background: var(--tag-soft); color: var(--brand);
  font-size: 0.9375rem; line-height: 1.5; text-decoration: none;
}
.chip:hover { background: var(--tag); }
.chip .n { color: var(--stone); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.chip[aria-current="true"] { background: var(--brand); color: var(--on-brand); }
.chip[aria-current="true"] .n { color: inherit; opacity: 0.8; }

/* ───────── 書架與卡片 */
.shelf {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 32px 22px; margin: 0; padding: 0; list-style: none;
}
@media (max-width: 480px) { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; } }
.card { position: relative; min-width: 0; }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  margin-top: 10px; font-weight: 500; line-height: 1.45;
}
.card-link:hover .card-title { color: var(--brand); text-decoration: underline; }
.card-link[aria-current="page"] .cover { outline: 2px solid var(--brand); outline-offset: 3px; }
.card-meta, .card-tags { margin: 2px 0 0; color: var(--stone); font-size: 0.8125rem; line-height: 1.5; }
.badge {
  position: absolute; z-index: 2; top: -8px; left: -8px;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px;
  background: var(--brand); color: var(--on-brand); font-size: 0.875rem; font-weight: 500;
  box-shadow: 0 0 0 3px var(--paper); font-variant-numeric: tabular-nums;
}
.badge.vol { inset: auto auto 8px 8px; box-shadow: none; font-size: 0.75rem; height: 24px; }

/* 書封：生圖不含文字，書名以排版疊上（字級用容器寬度 cqw，縮圖與大圖版面一致） */
.cover {
  container-type: inline-size; position: relative; overflow: hidden;
  aspect-ratio: 2 / 3; border-radius: 3px 8px 8px 3px;
  background: #1b365d; box-shadow: var(--shadow), 0 0 0 1px rgb(0 0 0 / 0.06);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-title {
  position: absolute; inset: 0 0 auto; padding: 10% 8% 24%;
  background: linear-gradient(to bottom, rgb(0 0 0 / 0.6), rgb(0 0 0 / 0.28) 62%, transparent);
  color: #fff; font-weight: 500; line-height: 1.25; text-align: center; text-wrap: balance;
  text-shadow: 0 1px 4px rgb(0 0 0 / 0.5);
}
.cover.t1 .cover-title { font-size: 11cqw; }
.cover.t2 .cover-title { font-size: 9cqw; }
.cover.t3 .cover-title { font-size: 7.6cqw; }
.cover.t4 .cover-title { font-size: 6.6cqw; }
.cover.no-img .cover-title {
  inset: 0; display: flex; align-items: center; justify-content: center; padding: 12% 10%;
  background: none; writing-mode: vertical-rl; letter-spacing: 0.12em; text-shadow: none;
}
.cover-author {
  position: absolute; inset: auto 0 0; padding: 16% 8% 7%;
  background: linear-gradient(to top, rgb(0 0 0 / 0.55), transparent);
  color: #fff; font-size: 5cqw; letter-spacing: 0.2em; text-align: center;
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.5);
}
.cover-author span { margin-inline-start: 1em; }

/* ───────── 查詢頁 */
.browse h1 { margin: 32px 0 20px; font-size: 1.75rem; }
.filter { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.grow { flex: 1 1 340px; }
.field label, .genre-bar .label { color: var(--ink-2); font-size: 0.875rem; font-weight: 500; margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.row input { flex: 1 1 200px; }
.genre-bar { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.notice { margin: 16px 0 0; padding: 10px 14px; border-radius: 8px; background: var(--tag-soft); color: var(--ink-2); }
.status { margin: 20px 0 16px; color: var(--stone); font-size: 0.9375rem; }

/* ───────── 書籍頁 */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; color: var(--stone); font-size: 0.875rem; }
.crumbs a { color: var(--stone); }
.book-hero { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 24px; }
@media (max-width: 720px) {
  .book-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .book-hero > .cover { width: min(240px, 70%); margin-inline: auto; }
}
.kicker { margin: 0; color: var(--brand); font-size: 0.9375rem; letter-spacing: 0.08em; }
.book-info h1 { margin: 4px 0 6px; font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.3; }
.byline { margin: 0 0 14px; color: var(--ink-2); }
.stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 20px 0; }
.stats dt { color: var(--stone); font-size: 0.8125rem; }
.stats dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 14px; }
.synopsis { max-width: 42em; }
.synopsis p { margin: 0 0 0.8em; line-height: 1.95; color: var(--ink-2); }
.toc { columns: 2 300px; column-gap: 40px; margin: 0; padding: 0; list-style: none; }
.toc li { break-inside: avoid; border-bottom: 1px solid var(--line-soft); }
.toc a { display: flex; gap: 12px; padding: 9px 2px; color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--brand); }
.toc-no { flex: none; min-width: 4.5em; color: var(--stone); font-variant-numeric: tabular-nums; }

/* ───────── 閱讀頁：直式（vertical-rl）由右至左分頁
   每頁是多欄容器的一欄；直排時欄位沿垂直方向堆疊（第 k 頁在 y = k ×（頁高＋欄距）），
   reader.js 以 scrollTop 切換頁面，跨頁的段落由瀏覽器自動斷開 */
body.reader {
  height: 100vh; height: 100dvh; min-height: 0; overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--desk);
}
.r-bar { display: flex; align-items: center; gap: 4px; padding: 4px 8px; background: var(--paper); border-bottom: 1px solid var(--line); }
.r-back { font-size: 1.75rem; }
.r-title { flex: 1; min-width: 0; margin: 0; display: flex; align-items: baseline; gap: 12px; white-space: nowrap; overflow: hidden; }
.r-book-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.r-ch-title { color: var(--stone); font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; }
.r-tools { display: flex; gap: 2px; }
.tool-btn {
  min-width: 44px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-2); font: 500 0.9375rem/1 var(--serif); cursor: pointer;
}
.tool-btn:hover { background: var(--sand); }
.tool-btn:disabled { opacity: 0.4; cursor: default; }
@media (max-width: 560px) { .r-ch-title { display: none; } .tool-btn { min-width: 40px; padding: 0 6px; } }

.r-stage { position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: pan-y pinch-zoom; }
.r-book { display: flex; flex-direction: row-reverse; }
.r-page {
  position: relative; background: var(--paper); box-shadow: var(--page-shadow);
  padding: var(--pad-y, 32px) var(--pad-x, 28px) calc(var(--pad-y, 32px) + 22px);
}
.r-book.is-spread .r-right { border-radius: 0 6px 6px 0; }
.r-book.is-spread .r-left { border-radius: 6px 0 0 6px; }
.r-book.is-spread .r-right::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 18px; pointer-events: none;
  background: linear-gradient(to right, rgb(0 0 0 / 0.07), transparent);
}
.r-book.is-spread .r-left::after {
  content: ""; position: absolute; inset: 0 0 0 auto; width: 18px; pointer-events: none;
  background: linear-gradient(to left, rgb(0 0 0 / 0.07), transparent);
}
.r-book:not(.is-spread) .r-left { display: none; }
.r-book:not(.is-spread) .r-right { border-radius: 6px; }
.r-page.is-blank .r-clip, .r-page.is-blank .r-folio { visibility: hidden; }
.r-clip { width: var(--pw, 300px); height: var(--ph, 500px); overflow: hidden; }
.r-flow {
  writing-mode: vertical-rl;
  width: var(--pw, 300px); height: var(--ph, 500px);
  column-width: var(--ph, 500px); column-gap: var(--gap, 60px); column-fill: auto;
  font-size: var(--fs, 20px); line-height: var(--lh, 36px); font-weight: 400;
  color: var(--ink); text-align: justify; line-break: strict; overflow-wrap: anywhere;
}
/* 站台的 section 有上下外距；直排時 margin-block 變成左右，會把章首推離頁緣，閱讀區一律歸零 */
.r-flow section { display: block; margin: 0; }
.r-flow p { margin: 0; text-indent: 2em; }
.r-flow h2 {
  margin: 0 0 var(--lh, 36px); padding-inline-start: 2em;
  font-size: 1.3em; line-height: var(--lh, 36px); font-weight: 500;
}
.r-flow h2 .cno { display: block; color: var(--stone); font-size: 0.72em; }
.r-flow hr.sb { margin: 0; border: 0; block-size: calc(var(--lh, 36px) * 2); text-align: center; overflow: visible; color: var(--stone); }
.r-flow hr.sb::before { content: "◇"; line-height: calc(var(--lh, 36px) * 2); }
.r-flow .pg { break-before: column; break-after: column; break-inside: avoid; margin: 0; block-size: var(--pw, 300px); inline-size: 100%; }
.r-flow .pg-img { display: flex; align-items: center; justify-content: center; }
.r-flow .pg-img img { width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 2px; }
.r-flow .title-page h1 { margin: 0; padding-block-start: 22%; padding-inline-start: 3em; font-size: 1.9em; line-height: 1.6; letter-spacing: 0.15em; }
.r-flow .title-page .by { margin: 0; padding-block-start: 1.5em; padding-inline-start: 50%; color: var(--ink-2); text-indent: 0; letter-spacing: 0.15em; }
.r-flow .colophon p { text-indent: 0; padding-inline-start: 2em; }
.r-flow .colophon .fin { padding-block-end: var(--lh, 36px); padding-inline-start: 6em; }
.r-flow .colophon .back { padding-block-start: var(--lh, 36px); }
.r-flow .tcy { text-combine-upright: all; }
.r-folio { position: absolute; inset: auto 0 calc(var(--pad-y, 32px) * 0.55); text-align: center; color: var(--stone); font-size: 0.75rem; font-variant-numeric: tabular-nums; }

/* 翻頁區：下一頁在左（由右至左），按鈕覆蓋頁面兩側，滑鼠移入或鍵盤聚焦才顯示箭頭 */
.r-nav {
  position: absolute; top: 0; bottom: 0; width: 30%; padding: 0 12px; border: 0;
  background: transparent; color: var(--stone); font: 2.5rem/1 var(--serif);
  cursor: pointer; opacity: 0; transition: opacity 0.2s;
}
.r-nav:hover, .r-nav:focus-visible { opacity: 1; }
.r-nav:disabled { cursor: default; opacity: 0 !important; }
.r-next { left: 0; text-align: left; }
.r-prev { right: 0; text-align: right; }
.r-noscript { padding: 24px; color: var(--olive); }

.r-foot { padding: 6px 16px 10px; background: var(--paper); border-top: 1px solid var(--line); }
.r-progress { height: 3px; border-radius: 2px; background: var(--sand); overflow: hidden; direction: rtl; }
.r-progress-bar { width: 0; height: 100%; background: var(--brand); transition: width 0.2s; }
.r-pos { margin: 4px 0 0; color: var(--stone); font-size: 0.8125rem; text-align: center; font-variant-numeric: tabular-nums; }

dialog.r-toc {
  width: min(440px, 100vw - 32px); max-height: min(80vh, 640px); padding: 0;
  border: 0; border-radius: 12px; background: var(--ivory); color: var(--ink); box-shadow: var(--page-shadow);
}
dialog.r-toc::backdrop { background: rgb(20 20 19 / 0.45); }
.r-toc-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 20px; border-bottom: 1px solid var(--line); }
.r-toc-head h2 { margin: 0; font-size: 1.125rem; }
.r-toc ol { margin: 0; padding: 8px; list-style: none; overflow-y: auto; max-height: calc(min(80vh, 640px) - 62px); }
.r-toc ol button {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); font: 1rem/1.4 var(--serif); text-align: left; cursor: pointer;
}
.r-toc ol button:hover { background: var(--sand); }
.r-toc ol button[aria-current="true"] { color: var(--brand); font-weight: 500; background: var(--tag-soft); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ───────── 讀者帳號：版頭選單、登入頁、我的閱讀記錄、隱私權說明 */
.head-row .account { margin-inline-start: auto; display: flex; align-items: center; min-height: 44px; }
.head-row .account + .theme-toggle { margin-inline-start: 0; }
.head-login { padding: 10px 8px; color: var(--ink-2); text-decoration: none; }
.head-login:hover { color: var(--brand); text-decoration: underline; }
.account-menu { position: relative; }
.account-menu summary {
  max-width: 12em; min-height: 44px; padding: 10px 12px; border-radius: 8px; box-sizing: border-box;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink-2); cursor: pointer; list-style: none;
}
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary::after { content: "▾"; margin-inline-start: 6px; color: var(--stone); }
.account-menu summary:hover, .account-menu[open] summary { background: var(--sand); }
.account-menu .menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 20;
  display: grid; gap: 2px; min-width: 11em; padding: 6px;
  background: var(--ivory); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
}
.menu-item {
  display: block; width: 100%; min-height: 44px; padding: 10px 12px; box-sizing: border-box;
  border: 0; border-radius: 6px; background: none; color: var(--ink);
  font: 1rem/1.5 var(--serif); text-align: start; text-decoration: none; cursor: pointer;
}
.menu-item:hover { background: var(--sand); }
.site-foot a { margin-inline-start: 1.5em; color: inherit; }
.hero.narrow { max-width: 46em; }
.providers { display: grid; gap: 12px; max-width: 22em; margin: 24px 0; }
.notice { padding: 10px 14px; border: 1px solid var(--danger); border-radius: 8px; color: var(--danger); }
.fine { color: var(--stone); font-size: 0.8125rem; }
.history { display: grid; gap: 14px; margin: 24px 0; padding: 0; list-style: none; }
.history-item {
  display: flex; align-items: center; gap: 16px; padding: 14px;
  background: var(--ivory); border: 1px solid var(--line); border-radius: 12px;
}
.history-thumb { flex: none; }
.history-cover { display: block; width: 64px; height: 94px; border-radius: 4px; object-fit: cover; background: var(--brand); }
.history-info { flex: 1; min-width: 0; }
.history-title { margin: 0; font-weight: 500; }
.history-title a { color: var(--ink); text-decoration: none; }
.history-title a:hover { color: var(--brand); text-decoration: underline; }
.history-meta, .history-when { margin: 2px 0 0; color: var(--stone); font-size: 0.8125rem; }
.history-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.confirm-q { font-size: 0.875rem; }
.btn-quiet { background: none; color: var(--stone); box-shadow: none; }
.btn-quiet:hover { color: var(--danger); box-shadow: 0 0 0 1px var(--line); }
.btn-danger { background: var(--danger); color: var(--paper); box-shadow: 0 0 0 1px var(--danger); }
.account-box { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.account-box h2 { font-size: 1.125rem; }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.prose { max-width: 42em; margin-block: 32px; line-height: 1.9; }
.prose h2 { margin-top: 2em; font-size: 1.25rem; }
.prose code { font-size: 0.875em; }
@media (max-width: 640px) {
  .history-item { flex-wrap: wrap; }
  .history-actions { flex-basis: 100%; justify-content: flex-start; }
}
