/* Hello, AI · 讲义版幻灯片
   —— 一页 1280×720 的纸，沿用本书的暖白纸色、部色与衬线标题。
   浅色、可投影、可打印、可全屏。                                          */

:root {
  --stage: #e7e2d6;
  --sheet: #fffdf9;
  --paper-2: #f2eee4;
  --paper-3: #e9e4d6;
  --ink: #1c1b18;
  --ink-soft: #46433c;
  --muted: #7b766b;
  --muted-2: #a29d92;
  --line: #ddd7c8;
  --line-soft: #ebe6d9;
  --accent: #a8402a;
  --p-map: #8a6d1f;
  --p-learn: #1d6b6b;
  --p-language: #a8402a;
  --p-world: #4a5a8f;
  --p-topics: #6b5b95;
  --pc: var(--accent);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --W: 1280px;
  --H: 720px;
  --pad: 62px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--stage); color: var(--ink);
  font-family: var(--sans); font-size: 22px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
::selection { background: color-mix(in srgb, var(--pc) 22%, transparent); }

/* ---------------------------------------------------------------- 舞台 */
#stage {
  position: fixed; inset: 0; height: 100dvh; overflow: hidden;
  touch-action: manipulation; overscroll-behavior: none;
}
.cell {
  position: absolute; top: 50%; left: 50%;
  width: var(--W); height: var(--H);
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(var(--k, 1));
  transform-origin: center; display: none;
}
.cell.on { display: block; }
.slide {
  width: 100%; height: 100%; position: relative; overflow: hidden;
  background: var(--sheet);
  border: 1px solid var(--line-soft); border-radius: 3px;
  box-shadow: 0 1px 0 rgba(28, 27, 24, .05), 0 24px 60px -18px rgba(28, 27, 24, .22);
  padding: var(--pad) var(--pad) 54px;
  display: flex; flex-direction: column;
}
@media (prefers-reduced-motion: no-preference) {
  .cell.on .slide { animation: sIn .2s ease-out; }
}
@keyframes sIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 页眉 / 页脚 */
.slide::after {
  content: attr(data-no); position: absolute; right: var(--pad); bottom: 22px;
  font-family: var(--mono); font-size: 13px; color: var(--muted-2); letter-spacing: .06em;
}
.slide > .foot {
  position: absolute; left: var(--pad); bottom: 22px; right: 120px;
  font-size: 13px; color: var(--muted-2); font-family: var(--mono);
  letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.kick {
  font-family: var(--mono); font-size: 13px; letter-spacing: .16em;
  color: var(--pc); text-transform: uppercase; display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; flex: none;
}
.kick i { font-style: normal; color: var(--muted-2); letter-spacing: .1em; }
.kick i::before { content: "/"; margin-right: 10px; color: var(--line); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.24; }
h2 { font-size: 40px; letter-spacing: -.01em; flex: none; }
h2::before {
  content: ""; display: block; width: 30px; height: 3px;
  background: var(--pc); border-radius: 2px; margin-bottom: 15px;
}
h2 small { display: block; font-family: var(--sans); font-size: 19px; font-weight: 400;
  color: var(--muted); line-height: 1.5; margin-top: 9px; letter-spacing: 0; }
h3 { font-size: 25px; }
h4 { font-size: 21px; }
.slide > h2 { margin-bottom: 26px; }
.slide.no-rule h2::before { display: none; }

p, li { font-size: 21px; }
strong, b { font-weight: 600; }
em { font-style: normal; color: var(--pc); font-weight: 600; }
.lead { font-size: 25px; line-height: 1.52; }
.small { font-size: 17.5px; line-height: 1.55; color: var(--ink-soft); }
.micro { font-size: 15px; color: var(--muted); line-height: 1.5; }
.mono { font-family: var(--mono); }
.dim { color: var(--muted); }
.pcx { color: var(--pc); }
.body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 20px; }
.center { justify-content: center; }
.grow { flex: 1 1 auto; min-height: 0; }

/* ---------------------------------------------------------------- 列 */
.cols { display: grid; gap: 40px; flex: 1 1 auto; min-height: 0; align-content: start; }
.cols.mid { align-items: center; }
.c2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.c21 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.c12 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.c31 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.c13 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.stack { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.stack.gap-s { gap: 10px; }
.stack.gap-l { gap: 26px; }
.tight { gap: 22px; }

/* ---------------------------------------------------------------- 列表 */
ul.pts { list-style: none; display: flex; flex-direction: column; gap: 13px; }
ul.pts li { position: relative; padding-left: 24px; }
ul.pts li::before {
  content: ""; position: absolute; left: 0; top: .58em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--pc);
}
ul.pts li b { display: block; font-weight: 600; }
ul.pts li span { display: block; font-size: 17.5px; color: var(--ink-soft); line-height: 1.5; margin-top: 2px; }
ul.pts.sparse { gap: 20px; }
ul.dash { list-style: none; display: flex; flex-direction: column; gap: 9px; }
ul.dash li { position: relative; padding-left: 20px; font-size: 19px; color: var(--ink-soft); }
ul.dash li::before { content: "—"; position: absolute; left: 0; color: var(--line); }

ol.steps { list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 15px; }
ol.steps li { counter-increment: s; position: relative; padding-left: 48px; }
ol.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 1px;
  font-family: var(--mono); font-size: 15px; color: var(--pc);
  width: 32px; height: 32px; border: 1.5px solid color-mix(in srgb, var(--pc) 45%, transparent);
  border-radius: 50%; display: grid; place-items: center;
}
ol.steps li b { display: block; font-weight: 600; }
/* 列表撑满剩余高度时居中，避免下方留一个大洞 */
ol.steps.grow, ul.pts.grow, ul.dash.grow { justify-content: center; }
ol.steps li span { display: block; font-size: 17.5px; color: var(--ink-soft); line-height: 1.5; }

/* 内容确实多的那几页：整页收一档，排版语汇不变 */
.slide.dense > .kick { margin-bottom: 10px; }
.slide.dense > h2 { margin-bottom: 18px; }
.slide.dense p:not(.small):not(.micro):not(.lead), .slide.dense li { font-size: 19px; }
.slide.dense .small { font-size: 16.5px; line-height: 1.5; }
.slide.dense .micro { font-size: 14px; }
.slide.dense ul.pts { gap: 8px; }
.slide.dense ul.pts.sparse { gap: 12px; }
.slide.dense ul.dash { gap: 7px; }
.slide.dense ol.steps { gap: 9px; }
.slide.dense ul.pts li span, .slide.dense ol.steps li span { font-size: 16px; line-height: 1.45; }
.slide.dense .cards { gap: 13px; }
.slide.dense .card { padding: 16px 18px; }
.slide.dense .card p { font-size: 16.5px; }
.slide.dense .cols { gap: 30px; }
.slide.dense .stack { gap: 12px; }
.slide.dense .stack.gap-l { gap: 18px; }
.slide.dense .flat { padding: 13px 18px; }
.slide.dense .tl .row { padding: 8px 0; }
.slide.dense .nums { gap: 20px; }
.slide.dense .nums .num b { font-size: 42px; }
.slide.dense .nums .num span { font-size: 16px; }
.slide.dense table { font-size: 17px; }
.slide.dense .lead { font-size: 22px; }

/* ---------------------------------------------------------------- 卡片 */
.cards { display: grid; gap: 18px; }
.cards.k2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: 8px;
  padding: 18px 20px 19px; display: flex; flex-direction: column; gap: 7px; min-width: 0;
}
.card.plain { background: transparent; border: 0; border-top: 2px solid var(--ink); border-radius: 0; padding: 12px 0 0; }
.card.mark { border-left: 3px solid var(--pc); }
.card h3 { font-size: 22px; }
.card h4 { font-size: 19.5px; font-family: var(--sans); font-weight: 600; }
.card p { font-size: 17.5px; color: var(--ink-soft); line-height: 1.52; }
.card .n { font-family: var(--mono); font-size: 13px; letter-spacing: .12em; color: var(--pc); text-transform: uppercase; }
.card .big { font-family: var(--serif); font-size: 38px; font-weight: 700; line-height: 1; color: var(--pc); }

/* 强调块 */
.tint { background: color-mix(in srgb, var(--pc) 8%, var(--sheet)); border-left: 3px solid var(--pc); padding: 17px 22px; border-radius: 0 6px 6px 0; }
.tint p { font-size: 20px; }
.flat { background: var(--paper-2); border-radius: 8px; padding: 17px 22px; }
.rule-top { border-top: 1px solid var(--line); padding-top: 16px; }

/* 引言 */
blockquote, .quote {
  font-family: var(--serif); font-size: 26px; line-height: 1.5; color: var(--ink);
  border-left: 3px solid var(--pc); padding-left: 24px;
}
.quote cite { display: block; font-family: var(--sans); font-style: normal; font-size: 16px;
  color: var(--muted); margin-top: 12px; letter-spacing: .02em; }

/* ---------------------------------------------------------------- 表格 */
table { border-collapse: collapse; width: 100%; font-size: 18px; }
th, td { text-align: left; padding: 9px 14px 9px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: 14px; font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--line); padding-bottom: 7px; }
td b { font-weight: 600; }
tr:last-child td { border-bottom: 0; }
table.tight-t { font-size: 16.5px; }
table.tight-t th, table.tight-t td { padding: 6px 12px 6px 0; }
td.num, th.num { font-family: var(--mono); white-space: nowrap; }

/* ---------------------------------------------------------------- 图 */
.fig { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1 1 auto; justify-content: center; }
.fig svg { width: 100%; height: auto; max-height: 100%; display: block; font-family: var(--sans); }
.fig img { width: 100%; height: 100%; object-fit: contain; display: block; min-height: 0; }
.fig figcaption, .cap { font-size: 15px; color: var(--muted); text-align: center; line-height: 1.45; flex: none; }
.fig.frame img { border: 1px solid var(--line-soft); border-radius: 6px; object-fit: cover; }
.photo { border-radius: 6px; overflow: hidden; background: var(--paper-2); min-height: 0; flex: 1 1 auto; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 内联 SVG 继承站点变量 */
.fig svg text { fill: var(--ink); }
.fig svg .muted { fill: var(--muted); }
.fig svg .mono { font-family: var(--mono); }
.fig svg .line { stroke: var(--line); }
.fig svg .ink { stroke: var(--ink); }
.fig svg .box { fill: var(--sheet); stroke: var(--line); }
.fig svg .box-soft { fill: var(--paper-2); stroke: none; }
.fig svg .accent { fill: var(--accent); }
.fig svg .accent-stroke { stroke: var(--accent); }
.fig svg .pc { fill: var(--pc); }
.fig svg .pc-stroke { stroke: var(--pc); }
.fig svg .pc-soft { fill: color-mix(in srgb, var(--pc) 14%, transparent); }
.fig svg .lab { fill: var(--p-learn); }
.fig svg .paper { fill: var(--paper-2); }

/* ---------------------------------------------------------------- 专用版式 */
/* 封面 */
.slide.cover { padding: 0; flex-direction: row; }
.cover .cv-text {
  flex: 1 1 56%; padding: var(--pad) 46px var(--pad) var(--pad);
  display: flex; flex-direction: column; justify-content: center; gap: 18px; min-width: 0;
}
.cover .cv-art { flex: 1 1 44%; position: relative; background: var(--paper-3); }
.cover .cv-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .cv-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--sheet) 0%, rgba(255, 253, 249, .45) 22%, rgba(255, 253, 249, 0) 58%);
}
.cover .cv-no { font-family: var(--mono); font-size: 14px; letter-spacing: .2em; color: var(--pc); }
.cover h1 { font-size: 58px; line-height: 1.14; letter-spacing: -.015em; }
.cover .cv-sub { font-size: 19.5px; color: var(--ink-soft); line-height: 1.6; max-width: 26em; }
.cover .cv-meta { font-family: var(--mono); font-size: 13.5px; color: var(--muted-2); letter-spacing: .05em;
  border-top: 1px solid var(--line-soft); padding-top: 14px; margin-top: 6px; }
.cover::after { display: none; }

/* 分节页 */
.slide.divider { justify-content: center; background: var(--paper-2); }
.divider h2 { font-size: 46px; }
.divider h2::before { width: 44px; height: 4px; }
.divider .d-lead { font-size: 21px; color: var(--ink-soft); margin-top: 16px; max-width: 30em; line-height: 1.6; }
.divider .d-list { margin-top: 26px; display: flex; gap: 30px; flex-wrap: wrap; }
.divider .d-list span { font-size: 17px; color: var(--muted); font-family: var(--mono); }

/* 大问题 / 大论断 */
.slide.q, .slide.stmt { justify-content: center; }
.q .q-mark { font-family: var(--serif); font-size: 84px; color: color-mix(in srgb, var(--pc) 30%, transparent); line-height: .7; margin-bottom: 18px; }
.q h2 { font-size: 46px; line-height: 1.34; max-width: 22em; }
.q h2::before { display: none; }
.stmt .st { font-family: var(--serif); font-size: 44px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; max-width: 24em; }
.stmt .st em { color: var(--pc); }
.stmt .st-sub { font-size: 20px; color: var(--ink-soft); margin-top: 26px; max-width: 32em; line-height: 1.6; }
.stmt .st-tag { font-family: var(--mono); font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--pc); margin-bottom: 22px; }

/* 对照 */
.vs { display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); gap: 34px; flex: 1 1 auto; min-height: 0; }
.vs .bar { background: var(--line-soft); }
.vs .side { display: flex; flex-direction: column; gap: 13px; min-width: 0; }
.vs .side > .n { font-family: var(--mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.vs .side.hi > .n { color: var(--pc); }
.vs .side h3 { font-size: 24px; }

/* 数字 */
.nums { display: grid; gap: 30px; }
.nums .num { display: flex; flex-direction: column; gap: 6px; }
.nums .num b { font-family: var(--serif); font-size: 52px; font-weight: 700; line-height: 1; color: var(--pc); letter-spacing: -.02em; }
.nums .num span { font-size: 17px; color: var(--ink-soft); line-height: 1.45; }
.nums .num i { font-style: normal; font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted-2); }

/* 时间线 */
.tl { display: flex; flex-direction: column; gap: 0; }
.tl .row { display: grid; grid-template-columns: 96px 1fr; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.tl .row:last-child { border-bottom: 0; }
.tl .yr { font-family: var(--mono); font-size: 17px; color: var(--pc); padding-top: 2px; }
.tl .row b { font-weight: 600; font-size: 20px; }
.tl .row span { display: block; font-size: 17px; color: var(--ink-soft); line-height: 1.45; }

/* 自测 */
.check .qs { font-family: var(--serif); font-size: 29px; font-weight: 700; line-height: 1.42; }
.check .ans { margin-top: 24px; font-size: 19.5px; color: var(--ink-soft); line-height: 1.62;
  border-left: 3px solid var(--pc); padding-left: 20px; }
.check .ans .lb { font-family: var(--mono); font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--pc); display: block; margin-bottom: 7px; }

/* 收束 */
.recap ul { list-style: none; display: flex; flex-direction: column; gap: 16px; counter-reset: r; }
.recap li { counter-increment: r; position: relative; padding-left: 40px; font-size: 21px; line-height: 1.5; }
.recap li::before { content: counter(r); position: absolute; left: 0; top: .1em;
  font-family: var(--serif); font-size: 21px; font-weight: 700; color: color-mix(in srgb, var(--pc) 55%, transparent); }

/* 术语 */
.terms { display: flex; flex-wrap: wrap; gap: 9px 10px; }
.terms span { font-size: 16px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; color: var(--ink-soft); background: var(--sheet); }

/* 实验挂钩 */
.lab-chip { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; color: var(--p-learn);
  border: 1px solid color-mix(in srgb, var(--p-learn) 35%, transparent); background: color-mix(in srgb, var(--p-learn) 7%, transparent);
  border-radius: 999px; padding: 6px 16px; font-family: var(--mono); letter-spacing: .04em; }

/* 逐步显示 */
.step { opacity: .16; transition: opacity .28s ease; }
.step.shown { opacity: 1; }
body.is-print .step, body.is-overview .step { opacity: 1 !important; }
/* 默认一次一整页：翻到这页时 .step 依次淡入，不用多点几次。按 S 才回到一步一点。 */
@media (prefers-reduced-motion: no-preference) {
  body:not(.is-bystep):not(.is-overview):not(.is-print) .cell.on .slide .step {
    animation: stepIn .44s ease-out backwards; animation-delay: var(--sd, 0ms);
  }
}
@keyframes stepIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- HUD */
#hud {
  position: fixed; left: 0; right: 0; bottom: 0; height: 34px; z-index: 30;
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  background: linear-gradient(to top, rgba(231, 226, 214, .96), rgba(231, 226, 214, 0));
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
#hud.show { opacity: 1; pointer-events: auto; }
#hud a, #hud button { color: var(--muted); background: none; border: 0; font: inherit; cursor: pointer; padding: 4px 8px; border-radius: 5px; }
#hud a:hover, #hud button:hover { color: var(--ink); background: rgba(255, 253, 249, .8); }
#hud .sp { margin-left: auto; }
#prog { position: fixed; left: 0; top: 0; height: 2px; background: var(--pc); width: 0; z-index: 40; transition: width .2s; }

/* 讲者备注抽屉 */
#notes {
  position: fixed; right: 0; bottom: 0; top: 0; width: 380px; z-index: 35;
  background: var(--sheet); border-left: 1px solid var(--line);
  padding: 26px 26px 44px; overflow-y: auto; display: none;
  font-size: 15.5px; line-height: 1.68; color: var(--ink-soft);
  box-shadow: -18px 0 40px -24px rgba(28, 27, 24, .3);
}
body.is-notes #notes { display: block; }
body.is-notes #stage { right: 380px; }
#notes h4 { font-family: var(--mono); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--pc); margin-bottom: 14px; font-weight: 500; }
#notes .nt-title { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 12px; line-height: 1.4; }
#notes p { font-size: 15.5px; margin-bottom: 11px; }
#notes b { color: var(--ink); }
#notes .empty { color: var(--muted-2); font-style: italic; }
.nt { display: none; }

/* 缩略总览 */
body.is-overview { overflow: auto; }
body.is-overview #stage { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 16px; padding: 22px 22px 60px; overflow: visible; height: auto; }
body.is-overview .cell {
  display: block; position: relative; top: auto; left: auto; transform: none;
  width: auto; height: auto; aspect-ratio: 16 / 9; cursor: pointer;
  border-radius: 4px; overflow: hidden; outline: 2px solid transparent; outline-offset: 2px;
}
body.is-overview .cell:hover { outline-color: color-mix(in srgb, var(--pc) 45%, transparent); }
body.is-overview .cell.on { outline-color: var(--pc); }
body.is-overview .cell .slide {
  width: var(--W); height: var(--H); transform: scale(var(--ok, .18)); transform-origin: top left;
  box-shadow: none; animation: none; pointer-events: none;
}
body.is-overview #hud, body.is-overview #notes, body.is-overview #prog { display: none; }

/* 帮助 */
#help { position: fixed; inset: 0; z-index: 50; background: rgba(231, 226, 214, .92);
  display: none; place-items: center; backdrop-filter: blur(3px); }
body.is-help #help { display: grid; }
#help .box { background: var(--sheet); border: 1px solid var(--line); border-radius: 10px;
  padding: 34px 40px; max-width: 520px; box-shadow: 0 24px 60px -20px rgba(28, 27, 24, .3); }
#help h3 { font-size: 21px; margin-bottom: 18px; }
#help dl { display: grid; grid-template-columns: auto 1fr; gap: 9px 20px; font-size: 15px; }
#help dt { font-family: var(--mono); color: var(--pc); }
#help dd { color: var(--ink-soft); }
#help .fine { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------------- 打印 */
@media print {
  @page { size: 1280px 720px; margin: 0; }
  html, body { background: #fff; overflow: visible; height: auto; }
  #stage { position: static; display: block; overflow: visible; height: auto; }
  .cell { display: block !important; position: relative; top: auto; left: auto;
    width: var(--W); height: var(--H); transform: none; page-break-after: always; break-after: page; }
  .slide { border: 0; border-radius: 0; box-shadow: none; animation: none; }
  #hud, #notes, #prog, #help { display: none !important; }
}

/* ---------------------------------------------------------------- 手机上第一次打开的说明 */
#small { display: none; position: fixed; inset: 0; z-index: 60; background: var(--stage);
  padding: 40px 28px; place-content: center; text-align: center; }
#small p { font-size: 16px; color: var(--ink-soft); line-height: 1.7; max-width: 24em; margin: 0 auto 14px; }
#small b { font-family: var(--serif); font-size: 21px; display: block; margin-bottom: 14px; color: var(--ink); }
#small em { font-style: normal; color: var(--ink); font-weight: 600; }
#small .go { font: inherit; font-size: 15.5px; color: var(--sheet); background: var(--pc);
  border: 0; border-radius: 999px; padding: 11px 30px; cursor: pointer; margin: 6px 0 4px; }
body.is-tip #small { display: grid; }

/* ---------------------------------------------------------------- 手机 / 平板 */
/* 竖着拿手机时把整张 16:9 的纸转 90°：同样一页，字能大一倍。
   控制条、备注、总览不跟着转，还留在屏幕的正常方向上。                         */
body.is-rot:not(.is-overview):not(.is-print) { --rot: 90deg; }

.hud-rot { display: none; }
#hud em { font-style: normal; color: var(--muted-2); }

@media (pointer: coarse) {
  #hud em { display: none; }
  #hud a, #hud button { padding: 7px 9px; }
}

/* 手机不论横竖都用这条窄控制条：按屏幕矮不矮判断，横过来的手机也算。 */
@media (max-width: 760px), (max-height: 520px) and (pointer: coarse) {
  #hud { gap: 2px; padding: 0 8px 0 4px; height: 44px; font-size: 12.5px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: linear-gradient(to top, rgba(231, 226, 214, .97) 60%, rgba(231, 226, 214, 0)); }
  #hud .hud-wide { display: none; }
  #hud .hud-rot { display: inline-block; }
  #hud .sp { margin-left: auto; }

  #help .box { padding: 24px 22px; margin: 16px; max-width: none; }
  #help h3 { font-size: 19px; }
  #help dl { font-size: 14px; gap: 8px 14px; }
  #small { padding: 32px 22px; overflow-y: auto; }
  #small b { font-size: 19px; }
  #small p { font-size: 15px; }
}

/* 横过来的手机很矮，说明页和帮助页再压一档，免得撑出屏幕 */
@media (max-height: 520px) {
  #small { place-content: start center; padding-top: 22px; }
  #small b { margin-bottom: 10px; }
  #small p { margin-bottom: 10px; }
  #help .box { max-height: 86dvh; overflow-y: auto; }
}

@media (max-width: 760px) {
  /* 讲者备注改成从下面推上来的一层 */
  #notes { top: auto; left: 0; right: 0; width: auto; height: 46dvh;
    border-left: 0; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0;
    padding: 18px 20px 30px; box-shadow: 0 -18px 40px -22px rgba(28, 27, 24, .3); }
  #notes .nt-title { font-size: 17px; }
  #notes p, #notes { font-size: 15px; }
  /* 备注推上来之后，幻灯片只用上面那块地方居中，控制条压在两者交界上 */
  body.is-notes #stage { right: 0; height: 54dvh; }
  body.is-notes #hud { bottom: 46dvh; z-index: 36;
    background: linear-gradient(to top, rgba(231, 226, 214, .97) 55%, rgba(231, 226, 214, .72)); }

  body.is-overview #stage { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
    gap: 10px; padding: 14px 14px 56px; }
}
