/* diguike.dev v6 · 设计规范
   颜色取自写书人的桌子：白纸、黑字、灰色桌面，一支橙色铅笔做批注，一枚绿色图章表示「已上线」。
   标题用宋体，正文用黑体，英文名用意大利斜体衬线；等宽字只用在代码和命令上。
   不做循环动画，打开就是全部内容。组件见 system.html。 */

:root {
  /* 颜色 */
  --bg: #fbfbfa;          /* 纸面以外的底 */
  --desk: #ecece9;        /* 灰色桌面：放实物的底板 */
  --sheet: #ffffff;       /* 一张纸 */
  --ink: #141414;
  --ink-soft: #55554f;
  --ink-faint: #6b6b64;   /* 小字也能读：纸面 5.2:1，桌面灰 4.5:1 */
  --line: rgba(20, 20, 20, .1);
  --line-strong: rgba(20, 20, 20, .24);
  --pencil: #b04a16;      /* 橙色铅笔，偏印泥色：批注、在做、当前位置。纸面 5.3:1，桌面灰 4.6:1 */
  --pencil-mark: #e0682e; /* 画在纸上的线，不承载文字 */
  --stamp: #2a6e45;       /* 绿色图章：只表示「已上线 / 完成」。纸面 5.9:1 */
  --hl: rgba(255, 196, 120, .55); /* 橙色荧光笔 */
  --sticky: #fff1a1;      /* 便利贴 */

  /* 字体 */
  --serif: "Source Serif 4", "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "LXGW WenKai Screen", serif;
  --latin: "Playfair Display", "Didot", "Bodoni 72", Georgia, serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* 尺寸 */
  --w: 1120px;
  --w-text: 680px;
  --r-desk: 20px;
  --r-ui: 6px;
  --gap-section: 128px;
  --gap-block: 80px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
@media (prefers-reduced-motion: no-preference) { html:focus-within { scroll-behavior: smooth; } }
html.lock { overflow: hidden; }
html.booting main, html.booting .site-ft { visibility: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
.sr-ext { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--hl); color: var(--ink); }
:focus-visible { outline: 2px solid var(--pencil); outline-offset: 3px; border-radius: 3px; }
[id] { scroll-margin-top: 84px; }
h1, h2, h3 { text-wrap: balance; }
.desk-wide { max-width: calc(var(--w) - 48px); margin-left: auto; margin-right: auto; }
.wrap { max-width: var(--w); margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }

/* ========== 顶栏 ========== */
.site-hd { position: sticky; top: 0; z-index: 50; height: 64px; background: rgba(251, 251, 250, .95); border-bottom: 1px solid var(--line); view-transition-name: site-header; }
.site-hd .wrap { height: 100%; display: flex; align-items: center; gap: 16px; max-width: none; padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
.brand { font-family: var(--serif); font-size: 19px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.brand i { margin-left: 8px; font-family: var(--latin); font-style: italic; font-weight: 400; font-size: 14px; letter-spacing: .02em; color: var(--ink-faint); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 7px 14px; border-radius: var(--r-ui); font-size: 14px; color: var(--ink-soft); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--pencil-mark); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.hd-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: var(--r-ui); border: 1px solid var(--line-strong); background: var(--sheet); color: var(--ink); cursor: pointer; }
.hd-btn:hover { background: #f3f3f1; }
.hd-btn svg { width: 16px; height: 16px; }
.menu-btn { display: none; }

/* ========== 基础组件 ========== */
/* 按钮 */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 24px; border-radius: var(--r-ui); font-size: 15px; font-weight: 600; letter-spacing: .04em; color: #fff; background: var(--ink); border: 1px solid var(--ink); white-space: nowrap; cursor: pointer; transition: background .2s; }
.btn:hover { background: #333; }
.btn.ghost { color: var(--ink); background: var(--sheet); border-color: var(--line-strong); }
.btn.ghost:hover { background: #f3f3f1; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; letter-spacing: .02em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* 图章：像盖在稿子上的一个章 */
.stamp { display: inline-block; padding: 3px 12px; border: 1.5px solid var(--pencil); border-radius: 3px; font-size: 13px; letter-spacing: .12em; color: var(--pencil); }

/* 状态：一个点 + 字。绿 = 能用；橙 = 还在做；墨 = 开源仓库 */
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); }
.status.live::before { background: var(--stamp); }
.status.wip::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--pencil); }

/* 大标题和铅笔线 */
.display { margin: 0; font-family: var(--serif); font-weight: 900; font-size: clamp(40px, 6.4vw, 76px); line-height: 1.2; letter-spacing: .04em; }
.display em { position: relative; font-style: normal; white-space: nowrap; }
.display em svg { position: absolute; left: -2%; bottom: -.08em; width: 104%; height: .22em; overflow: visible; }
.display em path { fill: none; stroke: var(--pencil-mark); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.h1 { margin: 0; font-family: var(--serif); font-weight: 900; font-size: clamp(34px, 4.6vw, 52px); line-height: 1.25; letter-spacing: .04em; }
.h2 { margin: 0; font-family: var(--serif); font-weight: 800; font-size: clamp(26px, 3vw, 36px); line-height: 1.3; letter-spacing: .04em; }
.h3 { margin: 0; font-family: var(--serif); font-weight: 800; font-size: 20px; line-height: 1.4; letter-spacing: .04em; }
.latin { font-family: var(--latin); font-style: italic; font-weight: 400; letter-spacing: .02em; color: var(--ink-faint); }
.lede { margin: 0; font-size: clamp(16px, 1.6vw, 18px); line-height: 1.85; color: var(--ink-soft); }
.meta { font-size: 13px; color: var(--ink-faint); }
.link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; transition: border-color .2s; }
.link:hover { border-color: var(--ink); }

/* 桌面和纸 */
.desk { border-radius: var(--r-desk); background: var(--desk); }
/* 纸只有放在桌面上才有投影；直接放在页面上就是平的 */
.sheet { position: relative; background: var(--sheet); border: 1px solid var(--line); }
.sheet.stack { box-shadow: 5px 5px 0 -1px var(--sheet), 5px 5px 0 0 var(--line), 10px 10px 0 -1px var(--sheet), 10px 10px 0 0 var(--line); }
.desk .sheet { box-shadow: 0 26px 44px -28px rgba(0, 0, 0, .3); }
.desk .sheet.stack { box-shadow: 5px 5px 0 -1px var(--sheet), 5px 5px 0 0 var(--line), 10px 10px 0 -1px var(--sheet), 10px 10px 0 0 var(--line), 0 26px 44px -28px rgba(0, 0, 0, .3); }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; margin-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: .08em; color: var(--ink-faint); }
.sticky { padding: 14px 18px 18px; font-family: var(--kai); font-size: 15px; line-height: 1.7; color: #2b2717; background: var(--sticky); transform: rotate(-2.5deg); box-shadow: 0 14px 22px -14px rgba(0, 0, 0, .35); }
.sticky b { display: block; margin-bottom: 2px; }

/* 截图：放在纸上 */
.shot { padding: 6px; background: var(--sheet); border: 1px solid var(--line); box-shadow: 0 26px 44px -28px rgba(0, 0, 0, .3); }
.shot img { width: 100%; }

/* 书封 */
.cover { position: relative; aspect-ratio: 2 / 3; border-radius: 2px 6px 6px 2px; overflow: hidden; background: #e2e2de; box-shadow: 0 1px 1px rgba(0, 0, 0, .08), 0 18px 28px -18px rgba(0, 0, 0, .45); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 8%; max-width: 12px; background: linear-gradient(90deg, rgba(0, 0, 0, .22), rgba(255, 255, 255, .18) 55%, transparent); pointer-events: none; }
.book-link .cover { transition: box-shadow .2s var(--ease); }
@media (hover: hover) { .book-link:hover .cover { box-shadow: 0 1px 1px rgba(0, 0, 0, .08), 0 28px 36px -16px rgba(0, 0, 0, .55); } }
.book-link .t { margin-top: 10px; font-size: 14px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
/* 封面下的进度线：完稿是绿色整条，持续追加是一段橙色 */
.book-link .bar { position: relative; height: 2px; margin-top: 12px; background: var(--line); }
.book-link .bar i { position: absolute; inset: 0 auto 0 0; width: 100%; background: var(--stamp); }
.book-link .bar.wip i { width: 38%; background: var(--pencil); }
.cover .badge { position: absolute; left: 8px; top: 8px; z-index: 2; padding: 2px 8px; border-radius: 3px; background: var(--sheet); color: var(--pencil); font-size: 11px; font-weight: 600; letter-spacing: .06em; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
/* 没有封面图的书：用书名排一个封面 */
.cover.plain { display: flex; flex-direction: column; justify-content: space-between; padding: 14% 12% 10%; background: #24413a; color: #f3efe4; font-family: var(--serif); }
.cover.plain b { font-size: clamp(14px, 1.3vw, 17px); line-height: 1.35; letter-spacing: .04em; }
.cover.plain span { font-size: 10px; letter-spacing: .1em; opacity: .7; font-family: var(--sans); }
.book-link .m { font-size: 12px; color: var(--ink-faint); }

/* 区块标题：左标题，右说明 */
.sec { padding-block: var(--gap-section) 0; }
.sec-h { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 64px; align-items: end; margin-bottom: 40px; }
.sec-h p { margin: 0; color: var(--ink-soft); }
.sec-h .end { justify-self: end; text-align: right; }

/* 双线标题 + 格子：成组的小东西 */
.rule2 { margin: 0; border-top: 3px double var(--ink); padding-top: 10px; font-size: 13px; font-weight: 500; letter-spacing: .3em; color: var(--ink-soft); }
.cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); margin-top: 10px; }
.cell { padding: 26px 28px 28px 0; border-bottom: 1px solid var(--line); }
.cell:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.cell .h3 { font-size: 18px; }
.cell p { margin: 8px 0 0; font-size: 14px; line-height: 1.8; color: var(--ink-soft); }
.cell .foot { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
a.cell:hover .h3 { text-decoration: underline; text-decoration-color: var(--pencil-mark); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* 规格表 */
.spec { margin: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); border-top: 1px solid var(--ink); font-size: 14px; }
.spec dt, .spec dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--ink-faint); }
.spec dd a { border-bottom: 1px solid var(--line-strong); }
.spec dd a:hover { border-color: var(--ink); }

/* 数据表 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; font-size: 12px; letter-spacing: .1em; color: var(--ink-faint); padding: 0 16px 10px 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.table td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td:first-child { font-weight: 600; white-space: nowrap; }
.table tr:hover td { background: rgba(20, 20, 20, .02); }

/* 标签页：带下划线的文字 */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; flex-shrink: 0; font: inherit; font-size: 15px; padding: 10px 0 12px; border: 0; background: none; color: var(--ink-soft); cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.tabs button[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.tabs .n { margin-left: 4px; font-size: 12px; color: var(--ink-faint); font-weight: 400; }

/* 页头 */
.page-h { padding-block: 72px 48px; }
.crumb { font-size: 13px; color: var(--ink-faint); }
.crumb a:hover { color: var(--ink); }
.crumb span { margin: 0 6px; color: var(--line-strong); }
.page-h .h1 { margin-top: 14px; }
.page-h .lede { margin-top: 14px; max-width: 34em; }

/* 落款区：灰色桌面，居中 */
.closing { margin-top: var(--gap-section); padding: 72px 32px; text-align: center; }
.closing .h2 { font-size: clamp(28px, 3.6vw, 44px); }
.closing p { margin: 14px 0 0; color: var(--ink-soft); }
.mail { margin-top: 28px; display: inline-flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-ui); }
.mail code { font-family: var(--mono); font-size: 15px; user-select: all; }

/* ========== 页脚 ========== */
.site-ft { margin-top: 96px; border-top: 1px solid var(--line); }
.site-ft .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-block: 28px 40px; font-size: 13px; color: var(--ink-faint); }
.site-ft nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-ft a:hover { color: var(--ink); }

/* ========== ⌘K 搜索 ========== */
.pal { position: fixed; inset: 0; z-index: 80; display: none; align-items: flex-start; justify-content: center; padding: 14vh 16px 16px; background: rgba(20, 20, 20, .28); }
.pal.open { display: flex; }
.pal-box { width: min(600px, 100%); background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5); overflow: hidden; }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.pal-in svg { width: 17px; height: 17px; color: var(--ink-faint); flex-shrink: 0; }
.pal-in input { flex: 1; min-width: 0; height: 56px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); }
.pal-list { max-height: 50vh; overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.pal-grp { padding: 10px 12px 4px; font-size: 12px; letter-spacing: .1em; color: var(--ink-faint); }
.pal-it { display: flex; align-items: baseline; gap: 12px; padding: 9px 12px; border-radius: var(--r-ui); }
.pal-it .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-it .s { font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.pal-it.on { background: #f3f3f1; }
.pal-it.on .t { text-decoration: underline; text-decoration-color: var(--pencil-mark); text-underline-offset: 4px; }
.pal-empty { padding: 28px; text-align: center; color: var(--ink-faint); font-size: 14px; }

/* ========== 本页 Markdown ========== */
.md-view { display: none; }
body.md-mode main { display: none; }
body.md-mode .md-view { display: block; }
.md-view .wrap { padding-block: 48px 0; }
.md-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 16px; font-size: 13px; color: var(--ink-faint); }
.md-bar .sp { margin-left: auto; }
.md-sheet { margin: 0; padding: 36px 40px; font-family: var(--mono); font-size: 13px; line-height: 1.9; white-space: pre-wrap; word-break: break-word; color: var(--ink); }

@media (max-width: 860px) {
  .site-hd .wrap { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .brand i { display: none; }
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; padding: 8px 20px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open a { padding: 12px 0; font-size: 16px; }
  .menu-btn { display: inline-grid; }
  #open-pal { margin-left: auto; }
  :root { --gap-section: 80px; --gap-block: 48px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .stats > div + div { padding-left: 14px !important; border-left: 1px solid var(--line) !important; }
  .stats b { font-size: 26px !important; }
  .sec-h { grid-template-columns: minmax(0, 1fr); }
  .sec-h .end { justify-self: start; text-align: left; }
  .cells { grid-template-columns: minmax(0, 1fr); }
  .cell, .cell:not(:nth-child(3n + 1)) { padding: 22px 0; border-left: 0; }
  .closing { padding: 48px 20px; }
  .md-sheet { padding: 24px 20px; }
  input { font-size: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ========== 项目组件：能操作的界面小样，放在桌面上 ==========
   所有状态叠在同一格里，切换只改内容和 visibility，高度不变。 */
.obj-stage { position: relative; display: grid; place-items: center; padding: 40px; }
.obj-stage > * { width: 100%; }
.pick { font: inherit; cursor: pointer; touch-action: manipulation; }
[role="radio"], [aria-pressed] { touch-action: manipulation; }

/* KeepMyMacAwake：菜单栏 + 面板（照真实界面） */
.x-kma { max-width: 400px; margin: 0 auto; font-size: 13px; }
.x-kma .bar { display: flex; align-items: center; gap: 12px; height: 26px; padding: 0 12px; margin-bottom: 8px; border-radius: 6px; background: rgba(246, 246, 244, .9); border: 1px solid var(--line); font-size: 12px; }
.x-kma .bar .app { font-weight: 600; }
.x-kma .bar .sp { flex: 1; }
.x-kma .bar .cnt { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 4px; background: rgba(20, 20, 20, .08); font-variant-numeric: tabular-nums; font-weight: 600; }
.x-kma .bar svg { width: 14px; height: 14px; }
.x-kma .panel { padding: 16px; border-radius: 12px; }
.x-kma .hd { display: flex; align-items: center; gap: 8px; }
.x-kma .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); }
.x-kma.on .dot { background: var(--pencil-mark); }
.x-kma .hd b { font-weight: 600; }
.x-kma .end { margin-left: auto; color: var(--ink-faint); font-size: 12px; }
.x-kma .big { margin-top: 6px; font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1.2; white-space: nowrap; }
.x-kma .sum { margin-top: 4px; font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-kma .scenes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.x-kma .scenes button { font: inherit; text-align: left; padding: 8px 10px; min-height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--sheet); color: var(--ink); cursor: pointer; transition: border-color .15s, background-color .15s; }
.x-kma .scenes button:hover { border-color: var(--line-strong); }
.x-kma .scenes button[aria-checked="true"] { border-color: var(--pencil-mark); background: #fdf3ec; }
.x-kma .scenes b { display: block; font-size: 13px; }
.x-kma .scenes span { font-size: 11px; color: var(--ink-faint); }
.x-kma .acts { display: grid; margin-top: 12px; }
.x-kma .acts > div { grid-area: 1 / 1; display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.x-kma .acts .idle { grid-template-columns: 1fr; }
.x-kma .acts .btn { justify-content: center; }
.x-kma .acts .running { visibility: hidden; }
.x-kma.on .acts .running { visibility: visible; }
.x-kma.on .acts .idle { visibility: hidden; }
.x-kma .last { margin: 10px 0 0; font-size: 11px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 发音词卡 */
.x-term { max-width: 380px; margin: 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chips button { font: inherit; font-size: 13px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--sheet); color: var(--ink-soft); cursor: pointer; transition: background-color .15s, color .15s; }
.chips button:hover { color: var(--ink); }
.chips button[aria-checked="true"], .chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.x-term .card { padding: 22px 24px 18px; }
.x-term .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.x-term .w { font-family: var(--latin); font-size: 40px; line-height: 1.05; letter-spacing: .01em; }
.x-term .ipa { margin-top: 6px; font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.x-term .play { width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--sheet); color: var(--ink); cursor: pointer; transition: background-color .15s, color .15s; }
.x-term .play:hover { background: #f3f3f1; }
.x-term .play.playing { background: var(--ink); color: #fff; border-color: var(--ink); }
.x-term .play svg { width: 18px; height: 18px; }
.x-term dl { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 6px 10px; font-size: 13px; }
.x-term dt { color: var(--ink-faint); }
.x-term dd { margin: 0; min-height: 1.6em; }
.x-term mark { background: linear-gradient(100deg, transparent .1em, var(--hl) .2em, var(--hl) calc(100% - .2em), transparent calc(100% - .1em)); color: inherit; padding: 0 .15em; }

/* 你会买吗 */
.x-fire { max-width: 420px; margin: 0 auto; }
.x-fire .who { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 12px; color: var(--ink-soft); }
.x-fire .who b { color: var(--ink); }
.x-fire .score { color: var(--ink-faint); white-space: nowrap; }
.x-fire .deal { padding: 18px 22px 20px; border-top: 3px solid var(--pencil-mark); }
.x-fire .deal h4 { margin: 0; font-family: var(--serif); font-weight: 800; font-size: 22px; letter-spacing: .04em; }
.x-fire .deal p { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); min-height: 3.2em; }
.x-fire .nums { display: grid; grid-template-columns: 1fr 1fr; margin-top: 10px; border-top: 1px solid var(--line); }
.x-fire .nums div { padding-top: 10px; }
.x-fire .nums div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.x-fire .nums small { display: block; font-size: 11px; color: var(--ink-faint); }
.x-fire .nums b { font-size: 22px; }
.x-fire .nums [data-k="cf"] { color: var(--stamp); }
.x-fire .nums [data-k="cf"].neg { color: var(--pencil); }
.x-fire .stage { display: grid; margin-top: 24px; }
.x-fire .ask, .x-fire .ans { grid-area: 1 / 1; }
.x-fire .ask { display: flex; gap: 10px; align-self: start; }
.x-fire .ask .btn { flex: 1; justify-content: center; }
.x-fire .ans { visibility: hidden; font-size: 13px; }
.x-fire.revealed .ans { visibility: visible; }
.x-fire.revealed .ask { visibility: hidden; }
.x-fire .verdict { margin: 0 0 8px; font-weight: 600; }
.x-fire .line { margin: 0; display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.x-fire .line span { color: var(--ink-faint); }
.x-fire .line b { font-weight: 400; }
.x-fire .ans .link { margin-top: 8px; background: none; border-top: 0; border-left: 0; border-right: 0; font: inherit; font-size: 14px; cursor: pointer; padding: 0 0 1px; }

/* 克劳德医生：体检单 */
.x-doc { padding: 18px 20px 16px; font-size: 13px; }
.x-doc .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.x-doc .list { display: grid; }
.x-doc .list button { font: inherit; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 36px; padding: 0 8px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-align: left; cursor: pointer; }
.x-doc .list button[aria-checked="true"] { background: #f3f3f1; font-weight: 600; }
.ev { font-style: normal; font-family: var(--mono); font-size: 10px; padding: 1px 6px; border-radius: 3px; border: 1px solid currentColor; white-space: nowrap; font-weight: 400; }
.ev-confirmed { color: var(--stamp); }
.ev-reported { color: var(--ink-soft); }
.ev-x { color: var(--ink-faint); text-decoration: line-through; }
.x-doc .desc { margin: 0; color: var(--ink-soft); line-height: 1.8; }
.x-doc .steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.x-doc .steps button { font: inherit; font-size: 12px; min-height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--sheet); cursor: pointer; }
.x-doc .steps button[aria-checked="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.x-doc code { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--ink-soft); white-space: nowrap; }

/* lark-ai-task-queue */
.x-lark { padding: 18px 20px 16px; font-size: 13px; }
.x-lark .it { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 40px; border-bottom: 1px solid var(--line); }
.x-lark .box { width: 14px; height: 14px; border: 1.5px solid var(--line-strong); border-radius: 50%; }
.x-lark .done .box { background: var(--stamp); border-color: var(--stamp); box-shadow: inset 0 0 0 2px #fff; }
.x-lark .done .t { color: var(--ink-faint); text-decoration: line-through; }
.x-lark .daily .box { border-color: var(--stamp); }
.x-lark .s { font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.x-lark .run .s { color: var(--ink); font-weight: 600; }
.x-lark .wait .s { color: var(--pencil); font-weight: 600; }
.x-lark .done .s, .x-lark .daily .s { color: var(--stamp); }
.x-lark .foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.x-lark code { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }

/* CoffeesMap */
.x-map { max-width: 400px; margin: 0 auto; }
.x-map .map { position: relative; aspect-ratio: 10 / 7; overflow: hidden; }
.x-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.x-map .pin { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--line-strong); transition: background-color .15s, border-color .15s; }
.x-map .pin.hit { background: var(--stamp); border-color: #fff; box-shadow: 0 0 0 1px var(--stamp), 0 4px 10px -4px rgba(0, 0, 0, .4); }
.x-map .count { position: absolute; left: 10px; bottom: 8px; font-size: 12px; font-weight: 600; background: var(--sheet); padding: 2px 8px; border-radius: 4px; border: 1px solid var(--line); }
.x-map .tag { position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: var(--ink-faint); }

@media (max-width: 860px) {
  .obj-stage { padding: 24px 14px; }
  .x-doc .cols { grid-template-columns: minmax(0, 1fr); }
  .x-doc .desc { min-height: 5.4em; }
}

/* ========== 详情页组件 ========== */
/* 数据：大数字 + 说明 */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.stats > div { padding: 22px 24px 24px 0; border-bottom: 1px solid var(--line); }
.stats > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.stats b { display: block; font-family: var(--serif); font-weight: 900; font-size: 40px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats span { font-size: 13px; color: var(--ink-faint); }

/* 编号卡片：几种模式、几个步骤 */
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.steps3 .sheet { padding: 22px 24px 24px; }
.steps3 .n { font-family: var(--latin); font-style: italic; font-size: 28px; line-height: 1; color: var(--pencil); }
.steps3 .h3 { margin-top: 14px; font-size: 18px; }
.steps3 p { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }

/* 决策卡：AI 玩家说出的理由 */
.decision { position: relative; max-width: 460px; padding: 22px 26px 24px; }
.decision .who { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-faint); }
.decision .who b { color: var(--ink); font-weight: 600; }
.decision q { display: block; margin-top: 10px; font-family: var(--serif); font-size: 19px; line-height: 1.7; quotes: "「" "」"; }
.decision .seal { position: absolute; right: 18px; bottom: -14px; padding: 2px 10px; border: 2px solid var(--pencil); border-radius: 4px; color: var(--pencil); font-family: var(--serif); font-weight: 900; font-size: 15px; letter-spacing: .2em; background: var(--sheet); transform: rotate(-8deg); }

/* 带说明的图 */
.figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.figs figure { margin: 0; }
.figs figcaption { margin-top: 12px; font-size: 13px; color: var(--ink-faint); }
.figs figcaption b { color: var(--ink); font-weight: 600; margin-right: 6px; }

/* 上一个 / 下一个 */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); margin-top: 104px; }
.pager a { padding: 20px 0; }
.pager a + a { text-align: right; border-left: 1px solid var(--line); }
.pager small { display: block; font-size: 12px; color: var(--ink-faint); }
.pager b { font-family: var(--serif); font-size: 19px; }
.pager a:hover b { text-decoration: underline; text-decoration-color: var(--pencil-mark); text-underline-offset: 5px; }

@media (max-width: 860px) {
  .steps3, .figs { grid-template-columns: minmax(0, 1fr); }
}
