/* Original style block 1 */
/* ============================================================================
   样式 —— 暖白纸感面板 + 深墨字，给画面留白。界面按 1920×1080 设计，由 16-ui.js 整体缩放。
   文字大小按教室投影定：正文 18–19px，结论句 25px。
   ============================================================================ */
:root {
  --u: 1;
  --paper: rgba(253, 249, 241, 0.9);
  --paper-solid: #fdf9f1;
  --ink: #24353b;
  --dim: #5d6d72;
  --faint: #8b989b;
  --line: rgba(50, 62, 66, 0.13);
  --accent: #1c7890;
  --accent-soft: rgba(28, 120, 144, 0.12);
  --warm: #c9771c;
  --shadow: 0 14px 44px rgba(34, 46, 58, 0.2), 0 2px 8px rgba(34, 46, 58, 0.1);
  /* 中文优先用思源黑体、思源宋体（Noto CJK 是同一套字体的另一个名字）；电脑上没装就用后面的系统字体 */
  --sans: "Source Han Sans SC", "思源黑体", "Source Han Sans CN", "Noto Sans CJK SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", system-ui, sans-serif;
  --serif: "Source Han Serif SC", "思源宋体", "Source Han Serif CN", "Noto Serif CJK SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", "宋体", serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #e9dfd0; font-family: var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
.hidden { display: none !important; }

#view { position: fixed; inset: 0; }
#view canvas { display: block; width: 100%; height: 100%; }

/* ---------- 三维标签（投影到屏幕的文字） ---------- */
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.lbl { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; white-space: nowrap; --c: var(--ink); --stem: 0px; }
.lbl span { display: block; padding: calc(5px * var(--u)) calc(13px * var(--u)); border-radius: 999px; background: rgba(255, 252, 246, 0.93); color: var(--c); font-weight: 600; font-size: calc(17px * var(--u)); line-height: 1.25; box-shadow: 0 4px 16px rgba(30, 40, 50, 0.22); letter-spacing: 0.02em; }
.lbl.big span { font-size: calc(21px * var(--u)); font-family: var(--serif); font-weight: 700; padding: calc(6px * var(--u)) calc(16px * var(--u)); }
.lbl.tag span { font-size: calc(15.5px * var(--u)); padding: calc(3px * var(--u)) calc(10px * var(--u)); background: rgba(255, 252, 246, 0.86); box-shadow: 0 2px 8px rgba(30, 40, 50, 0.18); }
.lbl i { position: absolute; left: 50%; top: 100%; width: calc(2px * var(--u)); margin-left: calc(-1px * var(--u)); height: var(--stem); background: linear-gradient(to bottom, rgba(255, 252, 246, 0.95), rgba(255, 252, 246, 0.35)); }
.lbl i::after { content: ""; position: absolute; left: 50%; bottom: calc(-4px * var(--u)); width: calc(8px * var(--u)); height: calc(8px * var(--u)); margin-left: calc(-4px * var(--u)); border-radius: 50%; background: #fffdf8; box-shadow: 0 1px 5px rgba(30, 40, 50, 0.4); }
.lbl.tag i { display: none; }
/* 可以点的文字标签（看得见时才接收点击）与高亮 */
.lbl.hit.live { pointer-events: auto; cursor: pointer; }
.lbl.hit.live:hover span { background: #fff; box-shadow: 0 0 0 calc(2px * var(--u)) var(--warm), 0 calc(3px * var(--u)) calc(10px * var(--u)) rgba(30, 40, 50, 0.25); }
.lbl.hot span { background: var(--warm); color: #fff; }
/* 现场照片：白边相纸、微微歪一点，引线连到地面上拍摄的位置；可以点开看大图 */
.lbl.photo { pointer-events: none; cursor: zoom-in; white-space: normal; }
.lbl.photo.live { pointer-events: auto; }      /* 淡出后不接收点击（原来隐藏的相片还留在原位，别的步点到会打开大图） */
.lbl.photo span { width: calc(236px * var(--u)); padding: calc(7px * var(--u)) calc(7px * var(--u)) calc(9px * var(--u)); border-radius: calc(6px * var(--u)); background: #fffdf8; transform: rotate(var(--tilt, 0deg)); transform-origin: 50% 100%; box-shadow: 0 calc(8px * var(--u)) calc(22px * var(--u)) rgba(20, 30, 40, 0.32); transition: transform 0.2s; }
.lbl.photo.live:hover span { transform: rotate(0deg) scale(1.03); }
.lbl.photo.side span { position: relative; z-index: 1; }
.lbl.photo i { width: calc(2.5px * var(--u)); margin-left: calc(-1.25px * var(--u)); background: rgba(255, 253, 248, 0.96); box-shadow: 0 0 calc(3px * var(--u)) rgba(20, 30, 40, 0.5); }      /* 相片的引线实一点，浅色地面上也看得见 */
.lbl.photo.side i { top: 50%; height: var(--stem); transform-origin: 50% 0; transform: rotate(var(--rot, 0rad)); }      /* 侧放：引线从相片中心出发，斜指地面点 */
.lbl.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: calc(3px * var(--u)); }
.lbl.photo b { display: block; margin-top: calc(6px * var(--u)); font-size: calc(15.5px * var(--u)); line-height: 1.3; color: var(--ink); }
.lbl.photo em { display: block; margin-top: calc(2px * var(--u)); font-style: normal; font-weight: 500; font-size: calc(13px * var(--u)); line-height: 1.4; color: var(--dim); }

/* ---------- 界面根：等比缩放 ---------- */
#ui { position: fixed; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; z-index: 10; }
#ui > * { pointer-events: auto; }
.paper { background: var(--paper); border-radius: 20px; box-shadow: var(--shadow); -webkit-backdrop-filter: blur(16px) saturate(1.15); backdrop-filter: blur(16px) saturate(1.15); border: 1px solid rgba(255, 255, 255, 0.7); }

#brand { position: absolute; left: 34px; top: 26px; pointer-events: none; }
#brand h1 { font-family: var(--serif); font-size: 34px; font-weight: 700; letter-spacing: 0.08em; color: #fffdf7; text-shadow: 0 2px 14px rgba(20, 40, 60, 0.55), 0 0 2px rgba(20, 40, 60, 0.5); }
#brand p { margin-top: 2px; font-size: 15px; letter-spacing: 0.18em; color: rgba(255, 253, 247, 0.92); text-shadow: 0 1px 8px rgba(20, 40, 60, 0.6); }

/* ---------- 左：章节栏 ---------- */
#chapters { position: absolute; left: 28px; top: 112px; width: 232px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.chap { display: grid; grid-template-columns: 34px 1fr; align-items: baseline; column-gap: 6px; text-align: left; padding: 8px 12px; border-radius: 13px; transition: background 0.2s; }
.chap b { font-family: var(--serif); font-size: 16px; color: var(--faint); font-weight: 700; }
.chap span { font-size: 18.5px; font-weight: 600; }
.chap em { grid-column: 2; font-style: normal; font-size: 13px; color: var(--faint); max-height: 0; overflow: hidden; transition: max-height 0.25s; }
.chap:hover { background: rgba(28, 120, 144, 0.07); }
.chap.on { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(28, 120, 144, 0.35); }
.chap.on b, .chap.on em { color: rgba(255, 255, 255, 0.82); }
.chap.on em { max-height: 20px; }

/* ---------- 左：讲解卡 ---------- */
#card { position: absolute; left: 28px; bottom: 26px; width: 452px; padding: 22px 26px 16px; }      /* 底边与步条底边对齐 */
#card.in { animation: cardIn 0.5s ease both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.kicker { display: flex; align-items: baseline; gap: 10px; color: var(--accent); font-size: 15px; letter-spacing: 0.1em; }
.kicker b { font-family: var(--serif); font-size: 17px; }
.kicker span { font-weight: 700; }
.kicker em { font-style: normal; color: var(--faint); letter-spacing: 0.06em; }
#sTitle { font-family: var(--serif); font-size: 31px; font-weight: 700; margin: 4px 0 8px; letter-spacing: 0.04em; }
#sLead { font-size: 21.5px; line-height: 1.5; font-weight: 600; color: #1d2c31; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
#sPoints { list-style: none; padding-top: 12px; }
/* 要点默认收起：网格行 0fr ↔ 1fr 做展开动画 */
#sFold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.32s ease; }
#sFold > div { overflow: hidden; min-height: 0; }
#card.open #sFold { grid-template-rows: 1fr; }
#sMore { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 12px 5px 13px; border-radius: 999px; font-size: 15px; font-weight: 600; letter-spacing: 0.04em; color: var(--accent); background: var(--accent-soft); }
#sMore:hover { background: rgba(28, 120, 144, 0.2); }
#sMore i { font-style: normal; font-size: 12px; transition: transform 0.32s; }
#card.open #sMore i { transform: rotate(180deg); }
#sPoints li { position: relative; padding-left: 18px; font-size: 18px; line-height: 1.55; color: #33454b; margin-bottom: 6px; }
#sPoints li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: var(--warm); opacity: 0.85; }
#sChain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
#sLead + #sChain { border-top: 0; padding-top: 0; }      /* 因果链紧跟在一句话结论下面，结论已有分隔线 */
#sChain .link { font-size: 15.5px; padding: 4px 11px; border-radius: 999px; background: rgba(50, 62, 66, 0.07); color: var(--dim); font-weight: 600; }
#sChain .link.on { background: var(--accent-soft); color: var(--accent); }
#sChain .link.on:last-of-type { background: var(--warm); color: #fff; }
#sChain i { font-style: normal; color: var(--faint); font-size: 15px; }
#sChain .link.cut { text-decoration: line-through; color: #b0483a; background: rgba(176, 72, 58, 0.1); }      /* 活的因果链：这一环此刻不成立 */

/* ---------- 右：原理图、滑杆、读数、图例 ---------- */
#panel { position: absolute; right: 28px; top: 96px; width: 428px; padding: 18px 22px 18px; }
#pTitle { font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 8px; }
#pDiagram svg { display: block; width: 100%; height: auto; }
#pDiagram text { font-family: var(--sans); }
.slider { margin-top: 12px; }
.sl-h { display: flex; justify-content: space-between; font-size: 17px; font-weight: 600; }
.sl-f { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--faint); margin-top: -2px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(28, 120, 144, 0.5), rgba(28, 120, 144, 0.2)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(20, 40, 60, 0.3); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 4px; background: rgba(28, 120, 144, 0.35); }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.rd { display: flex; justify-content: space-between; align-items: baseline; font-size: 16.5px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.rd b { font-weight: 700; color: var(--accent); }
.grains { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.grain { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.grain i { display: block; border-radius: 50%; box-shadow: inset -2px -3px 5px rgba(0, 0, 0, 0.22), 0 2px 5px rgba(0, 0, 0, 0.18); margin: auto 0; }
.grain { height: 78px; justify-content: flex-end; }
.grain b { font-size: 16px; }
.grain em { font-style: normal; font-size: 12px; color: var(--faint); white-space: nowrap; }      /* 粒径范围不折行：折成两行会把这一列的圆点和名称顶高，四列对不齐 */
.lgh { font-size: 15px; font-weight: 600; margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(40, 60, 70, 0.12); }      /* 补在别的内容后面的「沉积物粒径」小标题 */
.hint { font-size: 13px; color: var(--faint); margin-top: 6px; text-align: center; }
.lg { display: flex; align-items: center; gap: 10px; font-size: 16px; margin-top: 8px; }
.lg i { width: 30px; height: 9px; border-radius: 5px; flex: none; box-shadow: inset 0 0 0 1px rgba(40, 60, 70, 0.22); }      /* 白色图例也看得见边 */
#pLegend:empty, #pReadout:empty, #pSliders:empty { display: none; }

/* ---------- 右上：工具 ---------- */
#tools { position: absolute; right: 28px; top: 28px; z-index: 20; display: flex; gap: 6px; padding: 6px; border-radius: 999px; }
.tool { font-size: 15.5px; font-weight: 600; padding: 8px 15px; border-radius: 999px; color: var(--dim); transition: background 0.2s, color 0.2s; white-space: nowrap; }
.tool:hover { background: rgba(28, 120, 144, 0.1); color: var(--ink); }
.tool.on { background: var(--accent); color: #fff; }
.tool.off { opacity: 0.38; }
.tool s { text-decoration: none; display: inline-block; margin-left: 5px; font-size: 12px; opacity: 0.7; transform: translateY(-1px); transition: transform 0.2s; }
.tool.on s { transform: translateY(-1px) rotate(180deg); }

.tool.icon { display: grid; place-items: center; width: 40px; padding: 0; }      /* 设置（齿轮）：与文字按钮同高的圆形 */
.tool.icon svg { display: block; }
/* 设置菜单：配色、画质、关于 */
.mh { padding: 8px 14px 4px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--faint); }
.mh em { font-style: normal; font-weight: 500; letter-spacing: 0; margin-left: 6px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 2px 6px 6px; padding: 4px; border-radius: 13px; background: rgba(50, 62, 66, 0.07); }
.seg button { padding: 8px 0; border-radius: 10px; font-size: 15.5px; font-weight: 600; color: var(--dim); transition: background 0.15s, color 0.15s; }
.seg button:hover { background: rgba(255, 255, 255, 0.7); color: var(--ink); }
.seg button.cur { background: var(--accent); color: #fff; }
.mline { height: 1px; margin: 4px 10px; background: var(--line); }
.mi.about .ck { color: var(--faint); font-weight: 400; font-size: 22px; }
/* 配色下拉菜单 */
.menu { position: absolute; top: calc(100% + 10px); width: 390px; padding: 8px; background: var(--paper-solid); display: flex; flex-direction: column; gap: 2px; animation: menuIn 0.16s ease-out; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } }
.mi { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 13px; text-align: left; transition: background 0.15s; }
.mi:hover { background: rgba(28, 120, 144, 0.09); }
.mi.cur { background: var(--accent-soft); }
.mi .swatch { display: flex; flex: none; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(40, 60, 70, 0.15), 0 1px 3px rgba(30, 40, 50, 0.15); }
.mi .swatch i { width: 13px; height: 34px; }      /* 色样类名不能叫 .sw：那是拨动开关的样式 */
.mi .tx { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mi .tx b { font-size: 17px; font-weight: 700; color: var(--ink); }
.mi .tx em { white-space: nowrap; font-style: normal; font-size: 14px; color: var(--dim); line-height: 1.35; }
.mi .ck { flex: none; width: 18px; font-size: 18px; font-weight: 700; color: var(--accent); text-align: center; }

/* ---------- 下：步条与演化时间 ---------- */
#bar { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 999px; max-width: calc(100% - 56px); }
.nav { width: 46px; height: 46px; border-radius: 50%; font-size: 26px; line-height: 1; color: var(--accent); background: rgba(28, 120, 144, 0.1); flex: none; }
.nav:hover { background: rgba(28, 120, 144, 0.2); }
.nav:disabled { opacity: 0.3; cursor: default; }
#steps { display: flex; gap: 4px; }
.step { display: flex; align-items: center; gap: 7px; padding: 8px 14px 8px 9px; border-radius: 999px; font-size: 16px; font-weight: 600; color: var(--dim); white-space: nowrap; transition: background 0.2s; }
.step b { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: rgba(50, 62, 66, 0.1); color: var(--dim); }
.step:hover { background: rgba(28, 120, 144, 0.08); }
.step.done b { background: var(--accent-soft); color: var(--accent); }
.step.on { background: var(--accent); color: #fff; box-shadow: 0 5px 16px rgba(28, 120, 144, 0.35); }
.step.on b { background: rgba(255, 255, 255, 0.25); color: #fff; }
#playBox { position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 8px 9px 8px 9px; border-radius: 999px; width: 640px; }
/* 拨动开关（时间条里的「光影」、右侧面板里的开关）：带描边的按钮 + 小开关，关着时也看得出能点；开的状态用橙色 */
.sw { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 13px; border-radius: 999px; border: 1.5px solid rgba(50, 62, 66, 0.22); background: rgba(255, 255, 255, 0.6); font-size: 14.5px; font-weight: 600; color: var(--dim); white-space: nowrap; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.sw:hover { border-color: var(--warm); color: var(--ink); background: #fff; }
.sw i { position: relative; flex: none; width: 30px; height: 17px; border-radius: 999px; background: rgba(50, 62, 66, 0.3); transition: background 0.2s; }
.sw i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28); transition: transform 0.2s; }
.sw.on { border-color: rgba(201, 119, 28, 0.5); color: #b0650f; }
.sw.on i { background: var(--warm); }
.sw.on i::after { transform: translateX(13px); }
/* 面板里的开关：一行一个，文字在左、开关在右，下面一句此刻的说明 */
.swrow { margin-top: 10px; }
.swrow .sw { width: 100%; justify-content: space-between; font-size: 16px; padding: 8px 10px 8px 15px; }
.swrow em { display: block; margin: 5px 4px 0 15px; font-style: normal; font-size: 14px; line-height: 1.4; color: var(--dim); }
.swrow.off em { color: #b0483a; }
#playBtn { width: 44px; height: 44px; border-radius: 50%; background: var(--warm); display: grid; place-items: center; flex: none; box-shadow: 0 4px 12px rgba(201, 119, 28, 0.4); }
#playBtn svg { width: 22px; height: 22px; fill: #fff; pointer-events: none; }
#playBox label { font-size: 15.5px; font-weight: 600; color: var(--dim); white-space: nowrap; }
#scrub::-webkit-slider-runnable-track { background: linear-gradient(90deg, rgba(201, 119, 28, 0.55), rgba(201, 119, 28, 0.2)); }
#scrub::-webkit-slider-thumb { border-color: var(--warm); }

#note { position: absolute; right: 30px; bottom: 30px; font-size: 13px; letter-spacing: 0.04em; color: rgba(255, 253, 247, 0.9); text-shadow: 0 1px 6px rgba(20, 40, 60, 0.7); text-align: right; line-height: 1.5; pointer-events: none; }

#toast { position: absolute; left: 50%; top: 96px; transform: translate(-50%, -12px); padding: 10px 22px; border-radius: 999px; background: rgba(36, 53, 59, 0.9); color: #fff; font-size: 16px; opacity: 0; transition: opacity 0.25s, transform 0.25s; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 自测 ---------- */
/* 讲解配图：右侧面板里上下两张；点开铺满屏幕 */
.fig { margin: 10px 0 0; cursor: zoom-in; }
.fig img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; box-shadow: 0 3px 10px rgba(30, 40, 50, 0.18); }
.fig figcaption { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--dim); }
.fig figcaption b { display: block; font-size: 16.5px; color: var(--ink); }
#figView { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(24, 32, 38, 0.72); z-index: 32; cursor: zoom-out; }
#figView.open { display: flex; }
#figView figure { margin: 0; max-width: 78%; }
#figView img { display: block; max-width: 100%; max-height: 82vh; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }
#figView figcaption { margin-top: 12px; text-align: center; font-size: 20px; color: #fdf9f1; }
#figView figcaption b { margin-right: 12px; }
#quiz { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(30, 40, 48, 0.35); z-index: 30; }
#quiz.open { display: flex; }
#quizCard { width: 760px; max-height: 86%; overflow: auto; padding: 28px 34px 26px; background: var(--paper-solid); }
#quizHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#quizTitle { font-family: var(--serif); font-size: 26px; font-weight: 700; }
/* ---------- 关于 ---------- */
#about { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(30, 40, 48, 0.35); z-index: 31; }
#about.open { display: flex; }
#aboutCard { position: relative; width: min(880px, 92vw); max-height: 86%; overflow: auto; padding: 28px 32px 30px; background: var(--paper-solid); line-height: 1.75; scroll-behavior: smooth; }
#aboutClose { position: sticky; top: 0; float: right; margin: -10px -12px 0 0; width: 40px; height: 40px; border-radius: 50%; font-size: 24px; line-height: 1; color: var(--dim); background: rgba(50, 62, 66, 0.08); z-index: 1; }
#aboutClose:hover { background: rgba(50, 62, 66, 0.14); color: var(--ink); }
.about-head h2 { font-family: var(--serif); font-size: 28px; font-weight: 700; }
.about-head p { margin: 2px 0 16px; font-size: 14px; color: var(--dim); }
.about-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 6px; }
.about-nav a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.6); color: var(--ink); text-decoration: none; transition: background 0.15s, border-color 0.15s; }
.about-nav a:hover { background: var(--accent-soft); border-color: rgba(28, 120, 144, 0.35); }
.about-nav small { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.about-nav span { font-size: 16px; font-weight: 600; }
.about-card { margin: 14px 0 0; padding: 18px 22px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.55); scroll-margin-top: 8px; }
.about-kicker { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.about-card h3 { font-family: var(--serif); font-size: 21px; margin: 2px 0 8px; color: var(--ink); }
.about-card h4 { font-size: 15.5px; margin: 14px 0 4px; color: var(--accent); }
.about-card p, .about-card li { font-size: 15px; color: #33454b; }
.about-card p { margin: 4px 0; }
.about-card ul { margin: 6px 0; padding-left: 22px; }
.about-card li { margin: 3px 0; }
.about-card li::marker { color: var(--warm); }
.about-card a { color: var(--accent); }
.about-summary { color: var(--ink) !important; font-size: 15.5px !important; font-weight: 500; padding-bottom: 4px; }
.about-rule { height: 1px; background: var(--line); margin: 16px 0 10px; }
.about-foot { font-size: 13px !important; color: var(--faint) !important; margin: 2px 0 !important; }
@media (max-width: 620px) { #aboutCard { padding: 20px 16px; } .about-nav { grid-template-columns: 1fr; } .about-card { padding: 14px; } }
#quizClose { width: 40px; height: 40px; border-radius: 50%; font-size: 24px; color: var(--dim); background: rgba(50, 62, 66, 0.08); }
.q-count { font-size: 14.5px; color: var(--faint); letter-spacing: 0.08em; }
.q-text { font-size: 21px; line-height: 1.6; font-weight: 600; margin: 8px 0 14px; }
.q-opt { display: flex; gap: 12px; align-items: baseline; width: 100%; text-align: left; font-size: 18.5px; line-height: 1.5; padding: 11px 16px; margin-top: 8px; border-radius: 13px; background: rgba(50, 62, 66, 0.055); border: 2px solid transparent; }
.q-opt b { color: var(--accent); }
.q-opt:hover { border-color: rgba(28, 120, 144, 0.4); }
.q-opt.right { background: rgba(46, 160, 100, 0.16); border-color: #2ea064; }
.q-opt.wrong { background: rgba(214, 80, 60, 0.13); border-color: #d6503c; }
.q-exp { margin-top: 14px; padding: 12px 16px; border-radius: 13px; background: var(--accent-soft); font-size: 17.5px; line-height: 1.6; }
.q-nav { display: flex; justify-content: space-between; margin-top: 16px; }
.q-nav button { font-size: 16.5px; font-weight: 600; padding: 9px 22px; border-radius: 999px; background: rgba(28, 120, 144, 0.1); color: var(--accent); }

/* ---------- 载入幕 ---------- */
#veil { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: linear-gradient(180deg, #9cc4ea 0%, #f1dcc6 62%, #e6d2b6 100%); transition: opacity 0.8s; }
#veil.gone { opacity: 0; pointer-events: none; }
#veil div { text-align: center; color: #fffdf7; text-shadow: 0 2px 16px rgba(20, 50, 80, 0.45); }
#veil h1 { font-family: var(--serif); font-size: clamp(30px, 5vw, 64px); letter-spacing: 0.14em; }
#veil p { margin-top: 10px; font-size: clamp(14px, 1.5vw, 20px); letter-spacing: 0.3em; }

/* ---------- 开场镜头：界面与标注淡出，上下出遮幅，字幕像片名一样在画面中央偏上 ---------- */
#ui, #labels { transition: opacity 0.9s; }
body.intro #ui, body.intro #labels { opacity: 0; }
body.intro #ui > *, body.introLock #ui > * { pointer-events: none; }
#brand { pointer-events: auto; cursor: pointer; }
#intro { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
#intro i { position: absolute; left: 0; right: 0; height: 9vh; background: #0c0e11; transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1); }
#intro i.t { top: 0; transform: translateY(-101%); }
#intro i.b { bottom: 0; transform: translateY(101%); }
body.intro #intro i { transform: none; }
body.intro.cut #intro::before { content: ""; position: absolute; inset: 0; background: #0c0e11; animation: introDip 1.3s ease-out forwards; }      /* 重看时从黑场淡入，盖住机位的跳切 */
@keyframes introDip { from { opacity: 1; } to { opacity: 0; } }
#introCap { position: absolute; left: 0; right: 0; top: 31vh; text-align: center; color: #fffdf7; opacity: 0; filter: blur(8px); transform: translateY(-50%) scale(1.035); transition: opacity 1.1s ease-out, filter 1.4s ease-out, transform 3.2s cubic-bezier(0.2, 0.6, 0.2, 1); text-shadow: 0 2px 22px rgba(12, 30, 50, 0.6), 0 0 3px rgba(12, 30, 50, 0.55); }
#introCap::before { content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: min(1500px, 92vw); height: 34vh; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(10, 24, 36, 0.32), rgba(10, 24, 36, 0)); }      /* 字后面压一层很淡的暗晕：画面上半部常是亮天空 */
#introCap.on { opacity: 1; filter: none; transform: translateY(-50%); }
#introCap span { display: flex; align-items: center; justify-content: center; gap: 1.1em; font-size: clamp(14px, 1.45vw, 24px); letter-spacing: 0.6em; }
#introCap span::before, #introCap span::after { content: ""; width: clamp(28px, 4vw, 72px); height: 1px; background: rgba(255, 253, 247, 0.75); box-shadow: 0 0 6px rgba(12, 30, 50, 0.5); }
#introCap span::before { margin-right: 0.6em; }      /* 补上最后一个字后面多出的字距，两侧横线对称 */
#introCap span:empty { display: none; }
#introCap b { display: block; margin-top: 0.32em; font-family: var(--serif); font-weight: 700; font-size: clamp(36px, 4.4vw, 76px); letter-spacing: 0.3em; text-indent: 0.3em; }
#introCap.big b { font-size: clamp(48px, 6.6vw, 112px); letter-spacing: 0.2em; text-indent: 0.2em; }
#introSkip { position: absolute; right: 2.4vw; bottom: 0; height: 9vh; display: grid; place-items: center; font-size: clamp(11px, 0.85vw, 14px); letter-spacing: 0.2em; color: rgba(255, 253, 247, 0.55); opacity: 0; transition: opacity 0.9s; }
body.intro #introSkip { opacity: 1; transition-delay: 1.2s; }

/* ---------- 调试面板（?editor=1） ---------- */
#editor { position: fixed; right: 12px; top: 96px; z-index: 60; width: 318px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; font: 12px/1.4 var(--sans); color: #263238; background: rgba(255, 252, 246, 0.97); border-radius: 12px; box-shadow: 0 8px 30px rgba(20, 40, 60, 0.25); overflow: hidden; }
#editor.min .ed-body { display: none; }
#editor .ed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 9px 12px; background: #1c7890; color: #fff; cursor: pointer; user-select: none; }
#editor .ed-head span { font-size: 11px; opacity: 0.85; }
#editor .ed-body { overflow-y: auto; padding: 4px 0 8px; }
#editor .ed-sec { border-bottom: 1px solid rgba(50, 62, 66, 0.1); }
#editor summary { padding: 7px 12px; font-weight: 700; cursor: pointer; user-select: none; }
#editor .ed-box { padding: 0 12px 8px; }
#editor .ed-grid { display: grid; grid-template-columns: 84px 1fr; gap: 2px 8px; }
#editor .ed-k { color: #5d6d72; white-space: nowrap; }
#editor .ed-v { font-variant-numeric: tabular-nums; }
#editor .ed-row { display: grid; grid-template-columns: 84px 1fr 62px; align-items: center; gap: 6px; margin: 3px 0; }
#editor .ed-cam .ed-row { grid-template-columns: 84px 1fr; }
#editor input[type=number] { width: 100%; padding: 2px 4px; border: 1px solid rgba(50, 62, 66, 0.25); border-radius: 5px; font: inherit; background: #fff; }
#editor input[type=range] { width: 100%; }
#editor input[type=color] { width: 100%; height: 22px; padding: 0; border: 1px solid rgba(50, 62, 66, 0.25); border-radius: 5px; background: #fff; }
#editor .ed-hex { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: #5d6d72; }
#editor .ed-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
#editor button { padding: 4px 9px; border-radius: 999px; background: rgba(28, 120, 144, 0.12); color: #1c7890; font: inherit; font-weight: 600; cursor: pointer; }
#editor button:hover { background: rgba(28, 120, 144, 0.22); }
#editor .ed-note { margin-top: 5px; color: #8b989b; font-size: 11px; }
#editor .ed-toast { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; background: #263238; color: #fff; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
#editor .ed-toast.on { opacity: 0.92; }

/* ---------- 网站免费版：Pro 功能上的锁（单文件版不会出现）---------- */
.pro-lock { width: 13px; height: 13px; flex: none; margin-left: 6px; vertical-align: -1px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; }
.step.locked span, .tool.locked { opacity: 0.6; }
.step.on.locked span { opacity: 1; }
#playBox.locked, .slider.locked, .swrow.locked { cursor: pointer; }
.swrow.locked button { pointer-events: none; opacity: 0.55; }
.seg button.locked { opacity: 0.6; }
.seg button.locked .pro-lock { margin-left: 4px; }
#note .qnote { margin-bottom: 4px; font-weight: 600; }
#playBox.locked input, #playBox.locked button, .slider.locked input { pointer-events: none; }
#playBox.locked input, .slider.locked input { opacity: 0.4; }
#playBtn .pro-lock { width: 20px; height: 20px; margin: 0; fill: none; stroke: #fff; opacity: 1; }
.slider.locked .sl-h { color: var(--dim); }
/* 网站的画笔（标注）：和齿轮一样只显示图标；文字留给读屏 */
#tools .tm-annotate-trigger svg, #tools .tm-annotate-locked svg { width: 19px; height: 19px; vertical-align: 0; }
#tools .tm-annotate-label, #tools .tm-annotate-locked > span:not(.tm-lock) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#tools .tm-annotate-locked { position: relative; }
#tools .tm-annotate-locked .tm-lock { position: absolute; right: 2px; top: 2px; margin: 0; color: var(--dim); }
