/* iClassQuest 首页样张 · 正字
   系统字体，无外部资源。 */

:root {
  --board: #1b2a22;
  --board-deep: #15211b;
  --chalk: #ece6d4;
  --chalk-2: rgba(236, 230, 212, .68);
  --chalk-3: rgba(236, 230, 212, .38);
  --chalk-4: rgba(236, 230, 212, .14);
  --paper: #f2eee3;
  --leaf: #f8f5ec;
  --ink: #1b241f;
  --ink-2: #4c564f;
  --ink-3: #868c85;
  --rule: rgba(27, 36, 31, .13);
  --gold: #b99c64;
  --gold-ink: #8a6a34;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --song: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --gutter: clamp(22px, 6vw, 96px);
  --wide: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.75 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
.wrap, .omitted, .bestiary, .story, .footer > * { width: 100%; max-width: var(--wide); margin-inline: auto; }

/* 黑板材质：只在首屏和页脚两处出现，首尾呼应 */
.footer {
  position: relative; color: var(--chalk);
  background:
    radial-gradient(90% 70% at 72% 30%, rgba(236,230,212,.045), transparent 70%),
    linear-gradient(180deg, var(--board), var(--board-deep));
}
.footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.footer > * { position: relative; }

/* ---------- 导航 ---------- */
.nav {
  position: fixed; z-index: 5; inset: 0 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 28px max(var(--gutter), calc((100vw - var(--wide)) / 2));
  color: var(--chalk);
  transition: transform .45s var(--ease), padding .35s var(--ease), background-color .35s, color .35s, box-shadow .35s;
}
/* 离开首屏后：向下读时收起，向上滑时以纸色细条出现 */
.nav.is-away { padding-top: 14px; padding-bottom: 14px; background: rgba(242, 238, 227, .92); color: var(--ink); box-shadow: 0 1px 0 var(--rule);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px); }
.nav.is-away .nav-links a, .nav.is-away .nav-lang { color: var(--ink-2); }
.nav.is-away .nav-lang { border-color: var(--rule); }
.nav.is-away .nav-menu i { background: var(--ink); }
.nav.is-hidden { transform: translateY(-100%); }
section[id], footer[id] { scroll-margin-top: 64px; }
.nav-logo { font: 400 20px/1 var(--serif); text-decoration: none; }
.nav-links { display: flex; gap: 32px; margin-left: auto; }
.nav-end { margin-left: auto; }
.nav-links + .nav-end { margin-left: 0; }
.nav-links a, .nav-lang { font-size: 13.5px; letter-spacing: .1em; text-decoration: none; color: var(--chalk-2); transition: color .3s; }
.nav-links a:hover, .nav-lang:hover { color: var(--chalk); }
.nav-end { display: flex; align-items: center; gap: 22px; }
.nav-lang { font-family: var(--serif); letter-spacing: .14em; padding-left: 22px; border-left: 1px solid var(--chalk-4); }
.nav-menu { display: none; width: 24px; height: 16px; position: relative; }
.nav-menu i { position: absolute; left: 0; right: 0; height: 1px; background: var(--chalk); }
.nav-menu i:first-child { top: 4px; }
.nav-menu i:last-child { top: 11px; left: 9px; }

/* ---------- 章节编号：正字笔画 ---------- */
.mark { opacity: .75; display: inline-block; width: 15px; height: 15px; margin-right: 12px; vertical-align: -2px; }
.mark { display: inline-flex; gap: 4px; width: auto !important; }
.mark svg { flex: none; width: 15px; height: 15px; overflow: visible; }
.mark path { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
.mark path.ghost { opacity: .22; }
.mark + .mark { margin-left: -6px; }

.omitted { padding: 40px var(--gutter); max-width: calc(var(--wide) + 2 * var(--gutter)); border-bottom: 1px solid var(--rule); }
.omitted p { margin: 0; font-size: 13px; letter-spacing: .14em; color: var(--ink-3); }
.omitted small { margin-left: 10px; font-size: 12px; letter-spacing: .04em; opacity: .75; }

.sec-label { margin: 0 0 18px; font-size: 12.5px; letter-spacing: .3em; color: var(--gold-ink); }
.sec-title { margin: 0; font: 400 clamp(30px, 3.3vw, 42px)/1.3 var(--song); letter-spacing: .06em; }
.sec-sub { max-width: 34em; margin: 18px 0 0; color: var(--ink-2); font-size: 15.5px; }

/* ---------- 进化系统 ---------- */
.bestiary { max-width: calc(var(--wide) + 2 * var(--gutter)); padding: clamp(76px, 10vw, 128px) var(--gutter) clamp(64px, 8vw, 100px); }
.routes { display: flex; gap: 32px; margin-top: clamp(40px, 5vw, 56px); border-bottom: 1px solid var(--rule); }
.routes button { position: relative; padding: 0 0 13px; font-size: 15px; letter-spacing: .18em; color: var(--ink-3); transition: color .3s; }
.routes button[aria-selected="true"] { color: var(--ink); }
.routes button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: .18em; bottom: -1px; height: 1px; background: var(--ink); }

.stages { list-style: none; margin: 0; padding: 0; }
.stage-art { margin: 0; display: grid; place-items: end center; }
.stage-art img { width: calc(var(--art) * var(--s)); transform: scaleX(-1); }
.glyph { display: block; font-size: calc(var(--art) * var(--s) * .74); line-height: 1.15; filter: saturate(.7); }
.stage-step { margin: 0; font-size: 12px; letter-spacing: .24em; color: var(--ink-3); }
.stage.is-max .stage-step { color: var(--gold-ink); }
.stage-name { margin: 4px 0 0; font: 400 24px/1.3 var(--song); letter-spacing: .1em; }
.stage-score { margin: 6px 0 0; font-size: 12.5px; letter-spacing: .1em; color: var(--ink-3); }
.stage-score span { font: 400 17px/1 var(--serif); font-variant-numeric: oldstyle-nums; color: var(--gold-ink); }
.stage-desc { margin: 14px 0 0; font-size: 15px; line-height: 1.85; color: var(--ink-2); }
.art-note { margin: 44px 0 0; font-size: 12px; letter-spacing: .06em; color: var(--ink-3); }

@media (min-width: 900px) {
  .stages { --art: 150px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 clamp(20px, 2.6vw, 40px); padding-top: 56px; }
  .stage-art { height: var(--art); padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
  .stage-body { padding-top: 22px; }
  .stage-desc { font-size: 14.5px; }
  .book-index, .book-foot { display: none !important; }
}

/* ---------- 背后的故事 ---------- */
.story { max-width: calc(var(--wide) + 2 * var(--gutter)); padding: clamp(76px, 10vw, 128px) var(--gutter) clamp(84px, 10vw, 136px); }
.story-text { max-width: 31em; margin: 34px 0 0; font: 400 clamp(17px, 1.5vw, 19.5px)/2.05 var(--song); letter-spacing: .04em; }
.story-author { margin: 22px 0 0; font: 400 15px/1 var(--serif); letter-spacing: .1em; color: var(--ink-2); }

/* ---------- 页脚 · 联系作者 ---------- */
.footer { padding: clamp(56px, 7vw, 84px) var(--gutter) 30px; }
.contact summary {
  list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px;
  padding: 6px 0; -webkit-tap-highlight-color: transparent;
}
.contact summary::-webkit-details-marker { display: none; }
.contact-title { position: relative; padding-right: 20px; font-size: 13px; letter-spacing: .3em; color: var(--chalk); }
.contact-title::after {
  content: ""; position: absolute; right: 0; top: 50%; width: 7px; height: 7px; margin-top: -5px;
  border-right: 1px solid var(--chalk-3); border-bottom: 1px solid var(--chalk-3);
  transform: rotate(45deg); transition: transform .3s var(--ease), margin .3s var(--ease);
}
.contact[open] .contact-title::after { transform: rotate(225deg); margin-top: -1px; }
.contact-line { font-size: 13px; letter-spacing: .1em; color: var(--chalk-3); transition: color .3s; }
.contact summary:hover .contact-line { color: var(--chalk-2); }
.contact-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 26px; padding: 18px 0 4px; animation: open .4s var(--ease); }
.addr { font: 400 18px/1.3 var(--serif); letter-spacing: .02em; -webkit-user-select: all; user-select: all; overflow-wrap: anywhere; }
.contact-actions { display: inline-flex; gap: 20px; font-size: 12.5px; letter-spacing: .14em; }
.contact-actions button, .contact-actions a { padding: 6px 0; color: var(--chalk-2); text-decoration: none; border-bottom: 1px solid var(--chalk-4); transition: color .25s, border-color .25s; }
.contact-actions button:hover, .contact-actions a:hover { color: var(--chalk); border-color: var(--chalk-3); }
.copy-tip { font-size: 12px; color: var(--gold); }
@keyframes open { from { opacity: 0; transform: translateY(-4px); } }
.footer-base { margin-top: clamp(40px, 5vw, 64px) !important; padding-top: 20px; border-top: 1px solid var(--chalk-4); font-size: 12px; color: var(--chalk-3); }
.footer-slogan { margin: 0; letter-spacing: .12em; }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin: 10px 0 0; }
.footer-meta a { text-decoration: none; transition: color .25s; }
.footer-meta a:hover { color: var(--chalk-2); }
.gongan { display: inline-flex; align-items: center; gap: 6px; }
.gongan img { width: 14px; height: 14px; opacity: .8; }

/* ================= 手机 ================= */
@media (max-width: 899px) {
  .nav { padding-top: 22px; padding-bottom: 22px; }
  .nav-links { display: none; }
  .nav-links + .nav-end { margin-left: auto; }
  .nav-lang { border: 0; padding: 0; }
  .nav-menu { display: block; }


  .bestiary { padding-top: 72px; }
  .routes { gap: 28px; }

  /* 图鉴：左边是一页，右边是五枚索引签 */
  .js .book { display: grid; grid-template-columns: minmax(0, 1fr) 54px; margin-top: 26px; }
  .js .stages { --art: 176px; position: relative; background: var(--leaf); border: 1px solid var(--rule); border-right: 0; touch-action: pan-y; min-height: 470px; }
  .js .stage { display: none; padding: 22px 20px 22px; }
  .js .stage.is-current { display: block; animation: turn .42s var(--ease); }
  .js .stage.back { animation-name: turn-back; }
  .stage-art { height: calc(var(--art) + 4px); }
  .stage-body { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
  .stage-step, .stage-name { grid-column: 1; }
  .stage-name { font-size: 27px; }
  .stage-score { grid-column: 2; grid-row: 1 / 3; margin: 0 0 4px; text-align: right; }
  .stage-score span { font-size: 21px; }
  .stage-desc { grid-column: 1 / -1; }

  .book-index { display: flex; flex-direction: column; }
  .book-index button {
    flex: 1; position: relative; display: grid; place-items: center; align-content: center; gap: 2px;
    border: 1px solid var(--rule); border-top: 0; background: var(--paper-2, #e9e3d5); color: var(--ink-3);
    transition: background .25s, color .25s;
  }
  .book-index button:first-child { border-top: 1px solid var(--rule); }
  .book-index img, .book-index .g { width: 30px; height: 30px; object-fit: contain; transform: scaleX(-1); opacity: .55; transition: opacity .25s; }
  .book-index .g { font-size: 22px; line-height: 30px; text-align: center; transform: none; }
  .book-index small { font-size: 10.5px; letter-spacing: .08em; }
  .book-index [aria-current="true"] { background: var(--leaf); color: var(--ink); border-left-color: var(--leaf); margin-left: -1px; }
  .book-index [aria-current="true"] img, .book-index [aria-current="true"] .g { opacity: 1; }

  .book-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 13px; letter-spacing: .12em; color: var(--ink-3); }
  .book-foot button { min-height: 44px; color: var(--ink-2); }
  .book-foot button:disabled { opacity: .3; }
  .book-foot output { font: 400 13px/1 var(--serif); letter-spacing: .1em; }

  .contact-body { flex-direction: column; gap: 12px; }
}

@keyframes turn      { from { opacity: 0; transform: translateX(12px); } }
@keyframes turn-back { from { opacity: 0; transform: translateX(-12px); } }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition: none !important; }
}

/* ---------- 精简 ---------- */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sec-label { margin-bottom: 22px; }
.mark + .mark { margin-left: 4px; }
/* 故事：正文字号、偏淡的墨色、窄栏，像书末的一页后记，不抢声音 */
.story-text { max-width: 25em; margin-top: 30px; font: 400 15.5px/2.05 var(--song); letter-spacing: .04em; color: var(--ink-2); }
.story-text p { margin: 0; }
.story-text p + p { margin-top: 1.05em; }
.story-author { margin-top: 26px; font-size: 13.5px; color: var(--ink-3); }
@media (max-width: 899px) {
  .js .stage-step { display: none; }           /* 阶数已经写在右侧索引签上 */
  .js .stage-name { margin-top: 0; }
  .js .stages { min-height: 430px; }
  .story-text { font-size: 15.5px; line-height: 2; letter-spacing: .03em; }
  .footer-meta { gap: 4px 18px; }
}
.sec-sub span { display: inline-block; }
@media (max-width: 899px) { .book-foot { display: none; } }   /* 索引签和横滑已足够，省掉一行字 */
.story .sec-title { font-size: clamp(22px, 2vw, 26px); letter-spacing: .12em; }
.story { padding-bottom: clamp(72px, 9vw, 120px); }
.nb { white-space: nowrap; }  /* 破折号不落到行首 */

/* ================= 首屏：一块真黑板 ================= */
/* 墙面 → 铝框 → 板面 → 粉笔槽。板面的不匀、擦痕、底部粉笔灰都用 CSS/SVG 生成，无图片请求。 */
.hero {
  --wall: #e9e4d8;
  --frame: 9px;
  position: relative; padding: 12px 12px 0; background: var(--wall);
}
.board {
  --side: max(var(--gutter), calc((100vw - var(--wide)) / 2 - 12px - var(--frame)));
  position: relative; overflow: hidden;
  min-height: min(calc(100svh - 12px - 22px), 820px);
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; column-gap: 48px;
  padding: 120px var(--side) 72px;
  color: var(--chalk);
  border: var(--frame) solid #8f958f;
  border-image: linear-gradient(160deg, #c9cdc8, #8a908a 30%, #b5bab4 55%, #7d837d) 1;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), inset 0 3px 10px rgba(0,0,0,.45);
  background:
    /* 底部积下来的粉笔灰 */
    linear-gradient(0deg, rgba(236,230,212,.075), transparent 16%),
    /* 板面不匀 */
    radial-gradient(60% 50% at 22% 30%, rgba(236,230,212,.035), transparent 70%),
    radial-gradient(50% 60% at 78% 70%, rgba(0,0,0,.18), transparent 70%),
    #20342a;
}
/* 擦过的痕迹：几道宽而虚的弧，像板擦来回推过 */
.board::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='none'%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='22'/%3E%3C/filter%3E%3Cg fill='none' stroke='%23ece6d4' stroke-linecap='round' filter='url(%23b)'%3E%3Cpath d='M80 220 C 420 150, 760 260, 1100 190' stroke-width='90' stroke-opacity='.035'/%3E%3Cpath d='M180 520 C 520 450, 860 580, 1260 500' stroke-width='110' stroke-opacity='.03'/%3E%3Cpath d='M900 760 C 1100 700, 1350 780, 1560 720' stroke-width='80' stroke-opacity='.04'/%3E%3Cpath d='M1180 120 C 1300 90, 1420 150, 1540 110' stroke-width='60' stroke-opacity='.03'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
/* 细颗粒 */
.board::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.board > * { position: relative; z-index: 1; }

/* 粉笔字 */
.hero-title, .hero-subtitle em, .group-name, .board-date { filter: url(#chalk-text); }
.hero-text { align-self: center; }
.hero-title { margin: 0; font: 400 clamp(46px, 6vw, 84px)/1 var(--serif); letter-spacing: -.01em; color: #efe9d8; }
.hero-subtitle { margin: clamp(22px, 2.6vw, 30px) 0 0; font-size: clamp(14px, 1.1vw, 15.5px); letter-spacing: .16em; color: var(--chalk-2); }
.hero-subtitle .dash { display: none; }
.hero-subtitle em { display: block; margin-top: 14px; font: 400 clamp(21px, 2vw, 28px)/1.6 var(--song); font-style: normal; letter-spacing: .1em; color: var(--chalk); }
.hero-subtitle em span { display: inline-block; }
.hero-highlights { display: flex; flex-wrap: wrap; margin: clamp(26px, 3vw, 38px) 0 0; padding: 0; list-style: none; font-size: 13px; letter-spacing: .2em; color: var(--chalk-2); }
.hero-highlights li + li::before { content: ""; display: inline-block; width: 1px; height: 10px; margin: 0 18px; background: var(--chalk-3); vertical-align: -1px; }

/* 小组记分 */
.scoreboard { margin: 0; justify-self: end; display: grid; grid-template-columns: auto auto 52px; align-items: end; gap: 18px 16px; }
.group { display: contents; }
.board-date { grid-column: 1 / -1; }
.board-date { margin: 0 0 6px; text-align: right; font: 400 15px/1 var(--kai, "Kaiti SC", "STKaiti", KaiTi, "楷体", var(--song)); letter-spacing: .08em; color: var(--chalk); opacity: .8; }
.group-name { font: 400 17px/1 "Kaiti SC", "STKaiti", KaiTi, "楷体", var(--song); letter-spacing: .1em; color: var(--chalk); padding-bottom: 6px; }
.tally-marks { display: flex; gap: 8px; }
.tally-marks svg { width: var(--z, 38px); height: var(--z, 38px); overflow: visible; filter: url(#chalk); }
.tally-marks path { fill: none; stroke: var(--chalk); stroke-width: 2.5; stroke-linecap: round; opacity: .86; }
.tally-marks path.new { stroke-dasharray: 1; stroke-dashoffset: 1; animation: write .22s ease-out forwards; animation-delay: calc(1.1s + var(--n) * 380ms); }
.pet { position: relative; width: 52px; height: 52px; }
.pet img { position: absolute; bottom: 0; filter: saturate(.75) brightness(.95); }
.pet-egg { width: 26px; left: 13px; }
.pet-young { width: 52px; left: 0; transform: scaleX(-1); opacity: 0; }
.is-hatching .pet-egg { animation: egg 1.1s linear 2.2s both; }
.is-hatching .pet-young { animation: hatch .8s var(--ease) 3.25s forwards; }
.seen .tally-marks path.new { animation: none; stroke-dashoffset: 0; }
.seen .is-hatching .pet-egg { display: none; }
.seen .is-hatching .pet-young { animation: none; opacity: 1; }
@keyframes write { to { stroke-dashoffset: 0; } }
@keyframes egg { 0%, 40% { transform: none; } 55% { transform: rotate(-7deg); } 70% { transform: rotate(6deg); } 85% { opacity: 1; transform: rotate(-2deg); } 100% { opacity: 0; } }
@keyframes hatch { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }

/* 粉笔槽：框的下沿伸出来，搁着粉笔和板擦 */
.tray { position: relative; height: 22px; margin: 0 -4px; background: linear-gradient(180deg, #b8bdb7, #8e948e 40%, #6f756f); border-radius: 0 0 3px 3px; box-shadow: 0 6px 10px -6px rgba(0,0,0,.35); }
.tray::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(180deg, rgba(0,0,0,.28), transparent); }
.chalk { position: absolute; top: 3px; right: 22%; width: 46px; height: 8px; border-radius: 4px; background: linear-gradient(180deg, #faf7ef, #ddd7c6); box-shadow: 0 1px 1px rgba(0,0,0,.25); transform: rotate(-2deg); }
.chalk-short { right: calc(22% + 58px); width: 22px; transform: rotate(4deg); }
.eraser { position: absolute; top: -3px; left: 18%; width: 74px; height: 14px; border-radius: 2px 2px 1px 1px;
  background: linear-gradient(180deg, #b48a5c 0 55%, #4b4f4b 55%); box-shadow: 0 2px 2px rgba(0,0,0,.3); }

@media (max-width: 899px) {
  .hero { padding: 8px 8px 0; --frame: 6px; }
  .board { grid-template-columns: 1fr; min-height: auto; padding: 100px 18px 34px; row-gap: 40px; }
  .hero-subtitle { letter-spacing: .08em; }
  .hero-subtitle em { letter-spacing: .06em; }
  .hero-highlights li + li::before { margin: 0 12px; }
  .scoreboard { justify-self: stretch; gap: 14px; }
  .board-date { text-align: left; font-size: 13.5px; }
  .scoreboard { justify-self: start; grid-template-columns: auto auto 40px; column-gap: 10px; }
  .group-name { font-size: 15px; padding-bottom: 4px; }
  .tally-marks { --z: 30px; gap: 5px; }
  .pet { width: 40px; height: 40px; }
  .pet-egg { width: 20px; left: 10px; }
  .pet-young { width: 40px; }
  .tray { height: 16px; }
  .chalk { width: 34px; height: 6px; }
  .chalk-short { right: calc(22% + 42px); width: 16px; }
  .eraser { width: 54px; height: 11px; }
}

/* ================= 正文模块（纸面） ================= */
.sec { max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(76px, 10vw, 128px) var(--gutter) 0; }
.sec + .bestiary, .sec + .story { padding-top: clamp(76px, 10vw, 128px); }
.sec-head { margin-bottom: clamp(32px, 4vw, 52px); }

/* 实景体验：真实截图是主角，只给极薄的边 */
.scene-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scene-tabs::-webkit-scrollbar { display: none; }
.scene-tabs button { flex: none; position: relative; padding: 0 0 13px; font-size: 14.5px; letter-spacing: .12em; color: var(--ink-3); transition: color .3s; }
.scene-tabs button[aria-selected="true"] { color: var(--ink); }
.scene-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: .12em; bottom: -1px; height: 1px; background: var(--ink); }
.scene { display: grid; grid-template-columns: minmax(0, 1fr) clamp(170px, 19vw, 236px); grid-template-rows: auto 1fr; gap: 22px clamp(24px, 3vw, 44px); padding-top: 26px; animation: fadein .45s var(--ease); }
.scene-desc { grid-column: 1 / -1; max-width: 40em; margin: 0; font-size: 15.5px; color: var(--ink-2); min-height: 3.5em; }
.scene figure, .tool figure { margin: 0; }
.scene figcaption { margin-top: 10px; font-size: 12px; letter-spacing: .2em; color: var(--ink-3); }
.scene-phone { align-self: end; }
.shot { display: block; width: 100%; padding: 0; border-radius: 6px; overflow: hidden; background: #111; box-shadow: 0 0 0 1px rgba(27,36,31,.14), 0 18px 40px -24px rgba(27,36,31,.45); cursor: zoom-in; transition: transform .35s var(--ease), box-shadow .35s; }
.shot:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(27,36,31,.18), 0 24px 46px -24px rgba(27,36,31,.5); }
.scene-phone .shot, .tool.is-phone .shot { border-radius: 14px; }
.shot img { width: 100%; height: auto; }
.shot-note { margin: 22px 0 0; font-size: 12px; letter-spacing: .1em; color: var(--ink-3); }
@keyframes fadein { from { opacity: 0; } }

/* 核心功能：像一页记分册，横线分隔，不用卡片 */
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.feature { padding: 30px clamp(18px, 2.4vw, 36px) 34px 0; border-bottom: 1px solid var(--rule); }
.feature:not(:nth-child(3n + 1)) { padding-left: clamp(18px, 2.4vw, 36px); border-left: 1px solid var(--rule); }
.feature-icon { width: 24px; height: 24px; fill: none; stroke: var(--gold-ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin: 16px 0 0; font: 400 20px/1.4 var(--song); letter-spacing: .08em; }
.feature p { margin: 10px 0 0; font-size: 14.5px; line-height: 1.85; color: var(--ink-2); }
.feature .tags { margin-top: 14px; font-size: 12px; letter-spacing: .08em; color: var(--ink-3); }
.feature .tags span + span::before { content: "·"; margin: 0 8px; }

/* 工具箱：大图与文字左右交替 */
.tools { display: grid; gap: clamp(56px, 7vw, 96px); }
.tool { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.tool:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); }
.tool:nth-child(even) figure { order: 2; }
.tool.is-phone { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tool.is-phone figure { width: min(100%, 220px); justify-self: center; }
.tool h3 { margin: 0; font: 400 22px/1.4 var(--song); letter-spacing: .08em; }
.tool p { margin: 14px 0 0; max-width: 24em; font-size: 15px; line-height: 1.9; color: var(--ink-2); }

/* 技术亮点：紧凑的四栏 */
.tech-list { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 44px); }
.tech-list div { padding-top: 18px; border-top: 1px solid var(--ink); }
.tech-list dt { font-size: 15px; letter-spacing: .12em; }
.tech-list dd { margin: 10px 0 0; font-size: 14px; line-height: 1.85; color: var(--ink-2); }

/* 用户反馈：三封来信 */
.letters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); align-items: start; }
.letter { margin: 0; padding: 30px 28px 26px; background: var(--leaf); box-shadow: 0 0 0 1px var(--rule); }
.letter blockquote { margin: 0; font: 400 16px/2 var(--song); letter-spacing: .03em; color: var(--ink); }
.letter figcaption { margin-top: 18px; font-size: 13px; letter-spacing: .1em; color: var(--ink-3); text-align: right; }

/* 探索轨迹：最新一条展开，其余只露出日期与标题 */
.log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.log li { border-bottom: 1px solid var(--rule); }
.log summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 170px minmax(0, 1fr) 16px; align-items: baseline; gap: 20px; padding: 20px 0; -webkit-tap-highlight-color: transparent; }
.log summary::-webkit-details-marker { display: none; }
.log summary::after { content: ""; width: 7px; height: 7px; border-right: 1px solid var(--ink-3); border-bottom: 1px solid var(--ink-3); transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease); }
.log details[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.log-meta { display: flex; gap: 12px; align-items: baseline; font-size: 13px; color: var(--ink-3); }
.log-meta time { letter-spacing: .06em; }
.log-v { font: 400 13px/1 var(--serif); letter-spacing: .06em; color: var(--gold-ink); }
.log-title { font: 400 17px/1.5 var(--song); letter-spacing: .06em; transition: color .25s; }
.log summary:hover .log-title { color: var(--gold-ink); }
.log-body { padding: 0 36px 26px 190px; font-size: 14.5px; line-height: 1.9; color: var(--ink-2); animation: fadein .35s var(--ease); }
.log-body ul { margin: 0; padding-left: 1.1em; }
.log-body li { border: 0; margin: 0 0 8px; }
.log-body p { margin: 0; }
.log-body strong { font-weight: 500; color: var(--ink); }

/* 原图 */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(18, 26, 21, .94); }
.lightbox::backdrop { background: rgba(18, 26, 21, .6); }
.lightbox[open] { display: grid; place-items: center; animation: fadein .25s ease; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100vh - 88px); width: auto; height: auto; border-radius: 6px; }
.lightbox-close { position: fixed; top: 16px; right: 18px; padding: 10px 6px; font-size: 13px; letter-spacing: .2em; color: var(--chalk-2); }
.lightbox form { margin: 0; }

@media (max-width: 899px) {
  /* 手机：大屏截图在上；下面左边是说明，右边是手机截图，不留空白 */
  .scene { grid-template-columns: minmax(0, 1fr) 40%; grid-template-rows: auto auto; gap: 20px 18px; }
  .scene-pc { grid-column: 1 / -1; grid-row: 1; }
  .scene-desc { grid-column: 1; grid-row: 2; align-self: center; font-size: 15px; line-height: 1.9; min-height: 0; }
  .scene-phone { grid-column: 2; grid-row: 2; }
  .scene figcaption { display: none; }
  .feature-list { grid-template-columns: 1fr; }
  .feature, .feature:not(:nth-child(3n + 1)) { padding: 24px 0 26px; border-left: 0; }
  .feature { display: grid; grid-template-columns: 24px 1fr; column-gap: 16px; }
  .feature-icon { grid-row: 1 / 4; margin-top: 4px; }
  .feature h3, .feature p { grid-column: 2; }
  .feature h3 { margin-top: 0; font-size: 18px; }
  .tool, .tool:nth-child(even), .tool.is-phone { grid-template-columns: 1fr; gap: 22px; }
  .tool:nth-child(even) figure { order: 0; }
  .tool.is-phone figure { width: 56%; }
  .tech-list { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
  .letters { grid-template-columns: 1fr; }
  .letter { padding: 24px 22px 20px; }
  .letter blockquote { font-size: 15.5px; }
  .log summary { grid-template-columns: minmax(0, 1fr) 14px; gap: 6px 12px; padding: 18px 0; }
  .log-meta { grid-column: 1; }
  .log-title { grid-column: 1; font-size: 16px; }
  .log summary::after { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .log-body { padding: 0 0 22px; font-size: 14px; }
}
.scene[hidden] { display: none; }
@media (max-width: 899px) {
  /* 场景标签横向可滑，右侧淡出提示还有更多 */
  .scene-tabs { margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); -webkit-mask: linear-gradient(90deg, #000 82%, transparent); mask: linear-gradient(90deg, #000 82%, transparent); }
}
.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; } .lightbox img { max-height: calc(100% - 88px); }
.lightbox form { position: fixed; top: 0; right: 0; z-index: 1; }  /* 不占网格，图片才能居中 */

/* ================= 设备外框 ================= */
/* 教室一体机：深色窄边框，底边略宽，内嵌两组扬声器网孔；挂在墙上的那种 */
.shot.device-board, .shot.device-phone { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.device-board {
  position: relative; padding: 1.6% 1.6% 4.2%;
  background: linear-gradient(180deg, #2a2d30, #1b1d1f) !important; border-radius: 10px !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 1px 0 rgba(255,255,255,.4), 0 30px 50px -30px rgba(27,36,31,.55) !important;
}
.device-board img { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.device-board::before, .device-board::after {
  content: ""; position: absolute; bottom: 1.3%; width: 9%; height: 1.4%; min-height: 4px; opacity: .55;
  background: radial-gradient(circle, #4b4f53 0.6px, transparent 1px) 0 0 / 5px 5px;
}
.device-board::before { left: 4%; }
.device-board::after { right: 4%; }
/* 手机：窄边、圆角、灵动岛 */
.device-phone {
  position: relative; padding: 3.2%;
  background: linear-gradient(160deg, #3a3d40, #121314 40%) !important; border-radius: 13% / 6.4% !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 30px 50px -30px rgba(27,36,31,.55) !important;
}
.device-phone img { border-radius: 10.5% / 5.2%; }
.device-phone::before {
  content: ""; position: absolute; z-index: 1; top: 5%; left: 50%; width: 30%; height: 2.6%; transform: translateX(-50%);
  border-radius: 99px; background: #050505;
}
.shot.device-board:hover, .shot.device-phone:hover { transform: translateY(-2px); }
.tool.is-phone figure { width: min(100%, 230px); }

/* 原图：长图在电脑上完整缩放显示，需要细看时点图片可切换为原尺寸滚动查看 */
.lightbox { overflow: auto; }
.lightbox img { max-width: calc(100vw - 48px); max-height: calc(100% - 96px); object-fit: contain; cursor: zoom-in; }
.lightbox.is-actual { place-items: start center; padding: 64px 0 40px; }
.lightbox.is-actual img { max-height: none; max-width: min(100vw - 32px, 900px); cursor: zoom-out; }
.lightbox-hint { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: .14em; color: var(--chalk-3); }

/* ================= 成长之路：只露最新一条 ================= */
.log-latest { padding: 26px 0 28px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 170px minmax(0, 1fr); column-gap: 20px; }
.log-latest .log-meta { grid-row: 1 / 3; padding-top: 4px; }
.log-latest-title { margin: 0; font: 400 20px/1.5 var(--song); letter-spacing: .06em; }
.log-latest .log-body { padding: 12px 0 0; }
.log-history { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.log-history > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 18px 0; font-size: 13.5px; letter-spacing: .14em; color: var(--ink-2); -webkit-tap-highlight-color: transparent; }
.log-history > summary::-webkit-details-marker { display: none; }
.log-history > summary::after { content: ""; width: 7px; height: 7px; margin-left: 4px; border-right: 1px solid var(--ink-3); border-bottom: 1px solid var(--ink-3); transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease); }
.log-history[open] > summary::after { transform: rotate(225deg) translateY(-1px); }
.log-history > summary:hover { color: var(--ink); }
.log-count { min-width: 20px; padding: 1px 6px; border-radius: 99px; font: 400 12px/1.5 var(--serif); text-align: center; color: var(--gold-ink); box-shadow: inset 0 0 0 1px rgba(138,106,52,.35); }
.log-history .log { border-top: 1px solid var(--rule); max-height: 520px; overflow: auto; overscroll-behavior: contain; animation: fadein .35s var(--ease); }
.log-history .log li:last-child { border-bottom: 0; }
@media (max-width: 899px) {
  .log-latest { grid-template-columns: 1fr; }
  .log-latest .log-meta { grid-row: auto; padding: 0 0 8px; }
  .log-latest-title { font-size: 18px; }
  .log-history .log { max-height: 60vh; }
}

/* ================= 背后的故事：一页信纸 ================= */
/* 淡红格线的信纸，段首空两格，署名落在右下；像写给班主任的一封信 */
.story .sec-label { text-align: center; }
.letter-paper {
  --line: 38px;
  position: relative; max-width: 660px; margin: 34px auto 0; padding: 58px clamp(26px, 6vw, 72px) 52px;
  background:
    linear-gradient(transparent calc(var(--line) - 1px), rgba(168, 82, 62, .16) calc(var(--line) - 1px)) 0 calc(58px + var(--line) * 2 + 18px) / 100% var(--line) repeat-y,
    #fbf8f0;
  background-clip: padding-box;
  box-shadow: 0 0 0 1px rgba(27,36,31,.06), 0 2px 3px rgba(27,36,31,.05), 0 22px 40px -28px rgba(27,36,31,.35);
}
/* 信纸抬头的双线 */
.letter-paper::before {
  content: ""; position: absolute; left: clamp(26px, 6vw, 72px); right: clamp(26px, 6vw, 72px); top: calc(58px + var(--line) * 2 - 4px); height: 4px;
  border-top: 1px solid rgba(168, 82, 62, .32); border-bottom: 1px solid rgba(168, 82, 62, .18);
}
.letter-paper .sec-title { height: calc(var(--line) * 2); margin: 0; font: 400 19px/calc(var(--line) * 2) var(--song); letter-spacing: .3em; text-align: center; color: var(--ink); }
.letter-paper .story-text { max-width: none; margin: 18px 0 0; font: 400 16.5px/var(--line) var(--song); letter-spacing: .05em; color: #2a302b; }
.letter-paper .story-text p { margin: 0; text-indent: 2em; }
.letter-paper .story-text p + p { margin-top: 0; }
.letter-paper .story-author { margin: var(--line) 0 0; height: var(--line); line-height: var(--line); text-align: right; font: 400 17px/var(--line) "Kaiti SC", "STKaiti", KaiTi, "楷体", var(--song); letter-spacing: .12em; color: var(--ink-2); }
@media (max-width: 899px) {
  .letter-paper { --line: 34px; margin-top: 26px; padding: 40px 22px 36px; background-position: 0 calc(40px + var(--line) * 2 + 18px), 0 0; }
  .letter-paper::before { left: 22px; right: 22px; top: calc(40px + var(--line) * 2 - 4px); }
  .letter-paper .story-text { font-size: 15.5px; letter-spacing: .03em; }
  .letter-paper .sec-title { font-size: 17px; letter-spacing: .2em; }
}
/* 格线只画在正文区域内，并且只从抬头双线以下开始 */
.letter-paper { background: #fbf8f0 !important; }
.letter-paper .story-text, .letter-paper .story-author {
  background: linear-gradient(transparent calc(var(--line) - 1px), rgba(168, 82, 62, .16) calc(var(--line) - 1px)) 0 0 / 100% var(--line);
}
.letter-paper .story-author { margin-top: 0; padding-top: var(--line); height: calc(var(--line) * 2); background-position: 0 0; }
/* 原图默认完整放进屏幕：用视口高度限制（百分比在网格里不生效，长图会被放大成一截） */
.lightbox img { width: auto; height: auto; max-width: calc(100vw - 48px); max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); }
.lightbox.is-actual img { max-height: none; max-width: min(100vw - 32px, 900px); }

/* ================= 接入 Codex 素材 ================= */
/* 板面：生成的真实黑板照片质感；代码只负责边框和槽 */
.board { background: #22392d url("art/board-desktop.webp") center / cover no-repeat !important; }
.board::before { display: none; }
.board::after { opacity: .35; }
@media (max-width: 899px) { .board { background-image: url("art/board-mobile.webp") !important; } }

/* 黑板上的小角色：粉笔画 */
.scoreboard { grid-template-columns: auto auto 84px; }
.pet { width: 84px; height: 44px; }
.pet img { filter: none; }
.pet-egg { width: auto !important; height: 30px; left: 30px !important; }
.pet-young { width: auto !important; height: 40px; left: 0 !important; transform: none !important; }
@media (max-width: 899px) {
  .scoreboard { grid-template-columns: auto auto 64px; }
  .pet { width: 64px; height: 34px; }
  .pet-egg { height: 24px; left: 22px !important; }
  .pet-young { height: 30px; }
}

/* 粉笔槽：真实的粉笔、板擦、积灰 */
.tray::after { display: block; content: ""; position: absolute; left: 1%; right: 1%; top: 0; height: 9px; background: url("art/tray-dust.webp") center / 100% 100% no-repeat; opacity: .8; -webkit-mask: none; mask: none; }
.tray .tp { position: absolute; z-index: 1; height: auto; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.eraser-img { width: 96px; left: 17%; top: -26px; }
.c-yellow { width: 22px; right: 47%; top: -6px; transform: rotate(-6deg); }
.c-red { width: 20px; right: 44%; top: -6px; transform: rotate(5deg); }
.c-short { width: 32px; right: 26%; top: -7px; transform: rotate(3deg); }
.c-long { width: 60px; right: 20%; top: -8px; transform: rotate(-2deg); }
@media (max-width: 899px) {
  .eraser-img { width: 66px; top: -18px; left: 14%; }
  .c-yellow { width: 16px; right: 50%; } .c-red { width: 15px; right: 45%; }
  .c-short { width: 24px; right: 27%; } .c-long { width: 44px; right: 16%; }
}

/* 图鉴：五阶同一画布、同一基线，大小关系已经画在图里 */
.stage-art img { transform: none !important; width: var(--art) !important; }
@media (min-width: 900px) { .stages { --art: 200px; } .stage-art { height: 200px; padding-bottom: 0; } }
@media (max-width: 899px) { .js .stages { --art: 230px; } .stage-art { height: 210px; overflow: hidden; } .stage-art img { margin-bottom: -20px; } }
.book-index img { transform: none !important; object-fit: contain; }

/* 手机外框：固定真实比例（约 19.5:9），长截图从顶部裁切，点开看全图 */
.device-phone img { aspect-ratio: 1206 / 2436; object-fit: cover; object-position: top; }
.group-name { white-space: nowrap; }
.eraser-img { top: -20px; }
.c-yellow { width: 30px; top: -5px; } .c-red { width: 26px; top: -5px; }
@media (max-width: 899px) {
  .scoreboard { column-gap: 8px; }
  .tally-marks { --z: 27px; gap: 4px; }
  .eraser-img { top: -14px; }
  .c-yellow { width: 20px; } .c-red { width: 18px; }
}

/* ================= 更像真实教室 ================= */
/* 黑板：拉丝铝合金边框，四角有压角；铝槽同色 */
.board {
  --frame: 12px;
  border-image: none !important;
  border: var(--frame) solid transparent !important;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.45), inset 0 4px 10px rgba(0,0,0,.45) !important;
}
.hero { position: relative; }
.board-frame { display: none; }
.hero::before {
  content: ""; position: absolute; inset: 12px 12px 0; bottom: 22px; pointer-events: none; z-index: 0;
  border-radius: 2px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #e6e8e9 0%, #c7cbcd 18%, #d8dbdc 40%, #b4b9bc 70%, #cfd3d5 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 -1px 0 rgba(0,0,0,.15) inset, 0 10px 24px -14px rgba(0,0,0,.35);
}
.board { z-index: 1; }
/* 四角压角 */
.board-corners i { position: absolute; z-index: 2; width: 22px; height: 22px; pointer-events: none;
  background: linear-gradient(135deg, #f1f2f3, #a9aeb1); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.tray { z-index: 2; background: linear-gradient(180deg, #e3e6e7, #c3c8ca 35%, #a8adb0 70%, #8f9497) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 12px -8px rgba(0,0,0,.4) !important; }
.tray::before { background: linear-gradient(180deg, rgba(0,0,0,.22), transparent) !important; }
@media (max-width: 899px) { .board { --frame: 8px; } .hero::before { inset: 8px 8px 0; bottom: 16px; } }

/* 教室一体机：浅银色窄边框，底边略宽、居中一个无品牌的小标识，顶部摄像头 */
.device-board {
  padding: 1.1% 1.1% 3% !important;
  background: linear-gradient(180deg, #dfe2e4, #c9cdd0 60%, #b9bdc1) !important;
  border-radius: 6px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 0 0 1px rgba(0,0,0,.08), 0 2px 3px rgba(0,0,0,.08), 0 30px 50px -30px rgba(27,36,31,.5) !important;
}
.device-board img { border-radius: 1px; box-shadow: 0 0 0 2px #0b0c0d; }
.device-board::before { /* 摄像头 */
  left: 50% !important; top: .35%; bottom: auto !important; width: .9% !important; height: auto !important; min-height: 0 !important; aspect-ratio: 1;
  transform: translateX(-50%); border-radius: 50%; opacity: 1 !important;
  background: radial-gradient(circle at 40% 40%, #4a5a6a, #0d1115 60%) !important; box-shadow: 0 0 0 1px rgba(0,0,0,.25);
}
.device-board::after { /* 底边居中标识（不使用任何真实品牌） */
  left: 50% !important; right: auto !important; bottom: .9% !important; width: 5% !important; height: 1% !important; min-height: 3px !important;
  transform: translateX(-50%); border-radius: 99px; opacity: 1 !important;
  background: linear-gradient(180deg, #a7acb0, #c7cbce) !important; box-shadow: inset 0 1px 1px rgba(0,0,0,.18);
}
.board-corners .tl { left: 6px; top: 6px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.board-corners .tr { right: 6px; top: 6px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
@media (max-width: 899px) { .board-corners i { width: 14px; height: 14px; } .board-corners .tl { left: 4px; top: 4px; } .board-corners .tr { right: 4px; top: 4px; } }
.board { background-clip: padding-box !important; }
.board-corners { display: none; }
.device-board { padding-top: 1.5% !important; }
.device-board::before { top: .5% !important; width: .7% !important; }

/* ================= 第二批素材 ================= */
/* 孵化：蛋晃动 → 破壳 → 幼龙 */
.pet-cracked { opacity: 0; }
.is-hatching .pet-egg:not(.pet-cracked) { animation: egg-a 1.4s linear 1.9s both; }
.is-hatching .pet-cracked { animation: egg-b 1s linear 2.95s both; }
.is-hatching .pet-young { animation: hatch .8s var(--ease) 3.8s forwards; }
@keyframes egg-a { 0%, 30% { opacity: 1; transform: none; } 45% { transform: rotate(-7deg); } 60% { transform: rotate(6deg); } 75% { transform: rotate(-3deg); } 99% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes egg-b { 0% { opacity: 1; } 25% { transform: rotate(4deg); } 50% { transform: rotate(-3deg); } 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.seen .is-hatching .pet-egg { display: none; }

/* 黑板铝框：照片级九宫格切片；下沿不画框，接粉笔槽 */
.hero::before { display: none; }
.board {
  border-style: solid !important; border-color: transparent !important;
  border-width: 14px 14px 0 !important;
  border-image: url("art/board-frame.webp") 36 36 0 36 / 14px 14px 0 14px stretch !important;
  box-shadow: inset 0 3px 8px rgba(0,0,0,.35) !important;
}
.tray {
  height: 26px !important; margin: 0 2px !important; border-radius: 0 !important;
  background: url("art/chalk-tray.webp") center / 100% 100% no-repeat !important;
  box-shadow: 0 10px 14px -10px rgba(0,0,0,.35) !important;
}
.tray::before { display: none !important; }
.tray::after { top: 3px; left: 3%; right: 3%; height: 8px; opacity: .7; }
@media (max-width: 899px) {
  .board { border-width: 9px 9px 0 !important; border-image-width: 9px 9px 0 9px !important; }
  .tray { height: 18px !important; }
}

/* 教室一体机：照片级外框（摄像头、底边标识、扬声器都在图里） */
.device-board {
  padding: 0 !important; background: none !important; border-radius: 0 !important;
  border-style: solid; border-color: transparent;
  border-width: 1.1vw 1.1vw 2.5vw;
  border-image: url("art/panel-bezel.webp") 28 28 64 28 / 1 stretch;
  box-shadow: 0 30px 50px -30px rgba(27,36,31,.5) !important;
}
.device-board::before, .device-board::after { display: none !important; }
.device-board img { box-shadow: none; border-radius: 0; }
@media (min-width: 1300px) { .device-board { border-width: 13px 13px 30px; } }
@media (max-width: 899px) { .device-board { border-width: 7px 7px 16px; } }

/* 英文：西文不需要中文的宽字距 */
:lang(en) .hero-subtitle, :lang(en) .hero-subtitle em, :lang(en) .hero-highlights, :lang(en) .sec-title, :lang(en) .nav-links a,
:lang(en) .group-name, :lang(en) .board-date, :lang(en) .scene-tabs button, :lang(en) .routes button, :lang(en) .stage-name,
:lang(en) .feature h3, :lang(en) .tool h3, :lang(en) .log-title, :lang(en) .letter-paper .sec-title, :lang(en) .story-text, :lang(en) .contact-title { letter-spacing: .01em !important; }
:lang(en) .hero-subtitle em { font-family: var(--serif); font-size: clamp(22px, 2.1vw, 30px); line-height: 1.4; }
:lang(en) .letter-paper .story-text p { text-indent: 0; }
:lang(en) .group-name { font-family: var(--serif); }

/* 一体机外框：边框只用纯净的金属边（可拉伸）；摄像头、标识、扬声器按原比例单独叠加，不随宽度变形 */
.device-board {
  --bt: 1.1vw; --bb: calc(var(--bt) * 64 / 28);
  border-width: var(--bt) var(--bt) var(--bb) !important;
  border-image: url("art/panel-bezel-clean.webp") 28 28 64 28 / 1 stretch !important;
}
@media (min-width: 1300px) { .device-board { --bt: 13px; } }
@media (max-width: 899px) { .device-board { --bt: 7px; } }
.device-board::before, .device-board::after { display: block !important; content: "" !important; position: absolute !important; pointer-events: none;
  transform: none !important; opacity: 1 !important; border-radius: 0 !important; box-shadow: none !important; min-height: 0 !important; }
.device-board::before { /* 摄像头 */
  top: calc(-1 * var(--bt)) !important; bottom: auto !important; left: 50% !important;
  height: var(--bt) !important; width: calc(var(--bt) * 130 / 28) !important; margin-left: calc(var(--bt) * -65 / 28);
  background: url("art/bezel-camera.webp") center / 100% 100% no-repeat !important; aspect-ratio: auto !important;
}
.device-board::after { /* 底边：两侧扬声器 + 居中标识 */
  bottom: calc(-1 * var(--bb)) !important; left: calc(-1 * var(--bt)) !important; right: calc(-1 * var(--bt)) !important;
  width: auto !important; height: var(--bb) !important;
  background:
    url("art/bezel-spk-l.webp") calc(var(--bb) * 40 / 64) 0 / auto 100% no-repeat,
    url("art/bezel-spk-r.webp") right calc(var(--bb) * 35 / 64) top 0 / auto 100% no-repeat,
    url("art/bezel-logo.webp") center 0 / auto 100% no-repeat !important;
}
.device-board::before { width: calc(var(--bt) * 170 / 28) !important; margin-left: calc(var(--bt) * -85 / 28); }
.device-board::after {
  background:
    url("art/bezel-spk-l.webp") calc(var(--bb) * 25 / 64) 0 / auto 100% no-repeat,
    url("art/bezel-spk-r.webp") right calc(var(--bb) * 20 / 64) top 0 / auto 100% no-repeat,
    url("art/bezel-logo.webp") center 0 / auto 100% no-repeat !important;
}
/* 一体机不显示摄像头（用户要求） */
.device-board::before { display: none !important; }

/* ================= 手机修复 2026-10-24 ================= */
/* 1. 手机菜单：点「≡」从顶部展开 */
.nav-panel { display: none; }
@media (max-width: 899px) {
  .nav-menu { width: 44px; height: 44px; margin: -14px -10px -14px 0; }
  .nav-menu i { left: 10px; right: 10px; }
  .nav-menu i:first-child { top: 18px; }
  .nav-menu i:last-child { top: 25px; left: 19px; }
  .nav-menu i { transition: transform .3s var(--ease), top .3s var(--ease), left .3s var(--ease); }
  .nav.menu-open .nav-menu i:first-child { top: 21px; transform: rotate(45deg); }
  .nav.menu-open .nav-menu i:last-child { top: 21px; left: 10px; transform: rotate(-45deg); }
  .nav.menu-open { color: var(--chalk); background: #1d2f25; box-shadow: none; }
  .nav.menu-open .nav-menu i { background: var(--chalk); }
  .nav.menu-open .nav-lang { color: var(--chalk-2); }
  .nav-panel {
    display: block; position: fixed; z-index: 4; left: 0; right: 0; top: 0;
    padding: 84px 22px 26px; background: #1d2f25; color: var(--chalk);
    box-shadow: 0 18px 30px -18px rgba(0,0,0,.5);
    transform: translateY(-100%); visibility: hidden;
    transition: transform .35s var(--ease), visibility 0s .35s;
  }
  .nav.menu-open + .nav-panel { transform: none; visibility: visible; transition: transform .35s var(--ease); }
  .nav-panel a { display: block; padding: 15px 2px; font-size: 17px; letter-spacing: .14em; text-decoration: none; color: var(--chalk); border-bottom: 1px solid var(--chalk-4); }
  .nav-panel a:last-child { border-bottom: 0; }
  .nav-scrim { position: fixed; inset: 0; z-index: 3; background: rgba(10,16,13,.35); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
  .nav.menu-open ~ .nav-scrim { opacity: 1; visibility: visible; transition: opacity .3s; }
}

/* 2. 场景标签：手机上两行全部显示，不滑动、不晃动 */
.scene-tabs { overflow-y: hidden; overscroll-behavior: contain; }
@media (max-width: 899px) {
  .scene-tabs {
    display: flex; flex-wrap: wrap; gap: 0 22px;
    overflow: visible; margin-right: 0; padding-right: 0; -webkit-mask: none; mask: none;
  }
  .scene-tabs button { padding: 10px 0 11px; font-size: 14px; letter-spacing: .08em; }
  .scene-tabs button[aria-selected="true"]::after { bottom: 4px; }
}

/* 3. 防止最后一行只剩一个字：脚本把末尾几个字包进 .nw */
.nw { white-space: nowrap; }

/* 4. 页脚标语：手机上在破折号后换行 */
@media (max-width: 899px) { .slogan-2 { display: block; } }
.feature .tags span { white-space: nowrap; display: inline-block; }

/* ================= 粉笔槽修正 2026-10-26 ================= */
/* 粉笔、板擦落在槽底，前挡板单独一层盖住下半截；尺寸随屏幕宽度按真实比例缩放 */
.tray { height: clamp(18px, 1.6vw, 44px) !important; }
.tray::before {                              /* 前挡板：同一张铝槽图的下半部分，盖在物件前面 */
  display: block !important; content: ""; position: absolute; left: 0; right: 0; bottom: 0; top: auto;
  height: 46%; z-index: 2;
  background: url("art/chalk-tray.webp") center bottom / 100% calc(100% / .46) no-repeat !important;
}
.tray::after { z-index: 0; top: 18%; height: 34%; }   /* 槽底积灰 */
.tray .tp { z-index: 1; top: auto !important; bottom: 40%; transform-origin: 50% 100%; }
.eraser-img  { width: clamp(54px, 4vw, 150px) !important; left: 17% !important; transform: rotate(-8deg) !important; bottom: 34%; }
.c-long      { width: clamp(28px, 2.2vw, 84px) !important; right: 20% !important; transform: rotate(-1.5deg) !important; }
.c-short     { width: clamp(16px, 1.2vw, 46px) !important; right: 26% !important; transform: rotate(2deg) !important; }
.c-red       { width: clamp(12px, .9vw, 34px) !important; right: 44% !important; transform: rotate(4deg) !important; }
.c-yellow    { width: clamp(13px, 1vw, 38px) !important; right: 47% !important; transform: rotate(-5deg) !important; }

/* ================= 滚动条 ================= */
.log-history .log { max-height: none !important; overflow: visible !important; }   /* 历史记录随页面滚动，不再套内部滚动框 */
html { scrollbar-color: rgba(27, 36, 31, .28) var(--paper); scrollbar-width: thin; }
.lightbox { scrollbar-color: rgba(236, 230, 212, .35) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: rgba(27, 36, 31, .24); border-radius: 10px; border: 3px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: rgba(27, 36, 31, .4); }
.lightbox::-webkit-scrollbar-track { background: transparent; }
.lightbox::-webkit-scrollbar-thumb { background: rgba(236, 230, 212, .3); border-color: transparent; background-clip: padding-box; }
.c-red, .c-yellow { bottom: 43%; }
.c-red    { width: clamp(14px, 1vw, 38px) !important; }
.c-yellow { width: clamp(15px, 1.1vw, 42px) !important; }
.c-red, .c-yellow { bottom: 47%; }
.c-red    { width: clamp(16px, 1.2vw, 44px) !important; }
.c-yellow { width: clamp(18px, 1.35vw, 50px) !important; }
.c-short { bottom: 50%; } .c-red, .c-yellow { bottom: 52%; }
