@charset "UTF-8";
/* 家书 · 改版视觉（Claude 设计）
   骨架取自古籍版式：版框、书口、朱印、朱丝栏；底色是熟宣，示例区是檀木书案上的一页页纸。
   字体为思源宋体子集（SIL OFL 1.1），只含页面用到的字，改文案后用 docs/subset_fonts.py 重新生成。 */

@font-face { font-family: "JiaShu Serif"; src: url("../fonts/jiashu-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JiaShu Heavy"; src: url("../fonts/jiashu-heavy.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --serif: "JiaShu Serif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --heavy: "JiaShu Heavy", "Source Han Serif SC Heavy", "Noto Serif SC", "Songti SC", serif;
  --xuan: #ede3cd;      /* 熟宣 */
  --xuan-hi: #f6eedd;   /* 亮纸 */
  --mo: #2b211a;        /* 墨 */
  --mo-2: #6a5341;      /* 淡墨 */
  --tan: #2a1a12;       /* 檀 */
  --jin: #b38a4c;       /* 金 */
  --jin-hi: #dcbd80;
  --zhu: #9b3226;       /* 朱，只用于印与线 */
  --indigo: #2f3c4a;    /* 线装书面 */
  --rule: rgba(91, 58, 38, .28);
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .22 0 0 0 0 .12 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .32' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .33 0 0 0 0 .2 0 0 0 .09 -.02'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}
body { font-family: var(--serif); background: var(--xuan); }
.hero-copy h1 { font-family: var(--heavy); font-weight: 900; }

/* ---------- 卷：每一段是一页书 ---------- */
.juan { position: relative; padding: 130px 84px 140px 72px; overflow: hidden; overflow: clip; }
.juan-inner { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; }
.juan-paper { color: var(--mo); background: var(--tex), var(--xuan); }
.juan-silk { color: var(--mo); background: var(--tex), #e5d7bb; }
.juan-paper::before, .juan-silk::before {
  content: ""; position: absolute; inset: 22px; z-index: 2; pointer-events: none;
  border: 1.5px solid var(--rule); box-shadow: inset 0 0 0 4px transparent, inset 0 0 0 5px rgba(91, 58, 38, .16);
}
/* 书口：竖排卷次 + 鱼尾 */
.shukou {
  position: absolute; top: 22px; right: 22px; z-index: 3; display: flex; align-items: center; gap: 12px;
  width: 30px; height: 250px; padding: 18px 0; writing-mode: vertical-rl;
  border-left: 1.5px solid var(--rule); color: rgba(91, 58, 38, .62); font: 12px/1 var(--serif); letter-spacing: .32em; white-space: nowrap;
}
.shukou i { display: block; width: 14px; height: 12px; background: rgba(91, 58, 38, .55); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 58%, 0 100%); }
.shukou-light { border-left-color: rgba(220, 189, 128, .25); color: rgba(220, 189, 128, .55); }
.shukou-light i { background: rgba(220, 189, 128, .5); }

.juan-title { display: flex; align-items: flex-start; gap: 16px; margin: 0 0 40px; }
.juan-title h2 { margin: 0; font: 900 clamp(30px, 4.6vw, 52px)/1.3 var(--heavy); letter-spacing: .04em; text-wrap: balance; }
.seal {
  flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; margin-top: .3em;
  color: #f6e9d8; background: var(--zhu); font: 900 23px/1 var(--heavy); border-radius: 4px;
  box-shadow: inset 0 0 0 3px var(--zhu), inset 0 0 0 4.5px rgba(246, 233, 216, .85); transform: rotate(-5deg); opacity: .94;
}
.seal-sample { width: auto; height: auto; white-space: nowrap; padding: 8px 9px; font-size: 15px; letter-spacing: .1em; }
.io .juan-title .seal { opacity: 0; }
.io .juan-title.is-in .seal { animation: stamp .6s cubic-bezier(.2, .9, .25, 1) .3s both; }
@keyframes stamp {
  0% { opacity: 0; transform: rotate(-5deg) scale(1.9); }
  55% { opacity: 1; transform: rotate(-5deg) scale(.92); }
  100% { opacity: .94; transform: rotate(-5deg) scale(1); }
}
.juan-hint { margin: -22px 0 22px; color: var(--mo-2); font-size: 14px; letter-spacing: .04em; }
.juan-lead { max-width: 34em; margin: -18px 0 0; font-size: 17px; line-height: 1.9; }
.review-mark { display: inline-block; margin: 0 0 14px; padding: 2px 9px; border: 1px dashed currentColor; color: var(--zhu); font: 12px/1.6 var(--serif); letter-spacing: .06em; }

/* 横向滑动的行（理念、流程、故事） */
.snap-row { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.snap-row::-webkit-scrollbar { display: none; }
.snap-row > * { scroll-snap-align: start; }

/* ---------- 卷一 缘起：照片随阅读褪色，读到「薄手册」又回来 ---------- */
#origin.juan { padding: 0; overflow: visible; }
.origin-stage { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
.origin-photo { --fade: 0; position: sticky; top: 0; grid-column: 1; grid-row: 1; align-self: start; height: 100vh; height: 100svh; margin: 0; overflow: hidden; background: #d9cbb0; }
.origin-photo img { display: block; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(var(--fade)) sepia(calc(var(--fade) * .35)) contrast(calc(1 - var(--fade) * .38)) brightness(calc(1 + var(--fade) * .2)) blur(calc(var(--fade) * 1.6px));
  transform: scale(calc(1.04 + var(--fade) * .03)); }
.origin-veil { position: absolute; inset: 0; background: rgba(237, 227, 205, calc(var(--fade) * .5)); }
.origin-veil::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 70%, var(--xuan)); }
.origin-steps { grid-column: 2; grid-row: 1; padding: 18vh 96px 22vh 52px; }
.origin-step { display: flex; align-items: center; min-height: 72vh; }
.origin-step-title { min-height: 60vh; }
.origin-step > * { transition: opacity .6s ease, transform .6s ease; }
.origin-step:not(.is-current) > * { opacity: .22; transform: translateY(12px); }
.origin-line { margin: 0; font-size: 21px; line-height: 2; }
.origin-step-fade .origin-line { font-family: var(--heavy); font-size: 25px; line-height: 1.8; }
.origin-ending { color: var(--mo-2); }
.slip { position: relative; margin: 0; padding: 30px 28px 26px; background: var(--tex), var(--xuan-hi); box-shadow: 0 22px 40px -24px rgba(43, 33, 26, .5); transform: rotate(-1.2deg); }
.slip p { margin: 0 0 14px; font: 900 26px/1.65 var(--heavy); }
.slip .review-mark { margin: 0; }

/* ---------- 卷二 理念：翻面卡 ---------- */
.flip-row { gap: 22px; }
.flip-card { position: relative; flex: 1 1 0; min-width: 0; aspect-ratio: 3 / 4.2; padding: 0; border: 0; color: inherit; background: none; font: inherit; text-align: left; cursor: pointer; perspective: 1500px; }
.flip-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .85s cubic-bezier(.3, .75, .2, 1); }
.flip-card[aria-pressed="true"] .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; display: flex; overflow: hidden; border-radius: 3px; -webkit-backface-visibility: hidden; backface-visibility: hidden; box-shadow: 0 26px 40px -26px rgba(43, 33, 26, .7), 0 0 0 1px rgba(91, 58, 38, .18); }
.flip-front { background: #cdbb9b; }
.flip-front img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s ease; }
.flip-card:hover .flip-front img { transform: scale(1.04); }
.flip-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(31, 21, 14, 0) 38%, rgba(31, 21, 14, .86)); }
.flip-front-text { position: absolute; right: 24px; bottom: 24px; left: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; color: #f8efdf; }
.flip-title { font: 900 24px/1.5 var(--heavy); letter-spacing: .03em; }
.flip-turn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border: 1px solid rgba(220, 189, 128, .65); border-radius: 30px; color: var(--jin-hi); font-size: 13px; letter-spacing: .1em; }
.flip-turn::before { content: "↻"; font-size: 14px; }
.flip-back { flex-direction: column; gap: 18px; padding: 32px 28px 26px; color: var(--mo); background: var(--tex), var(--xuan-hi); transform: rotateY(180deg); }
.flip-back-title { font: 900 20px/1.55 var(--heavy); }
.flip-body { font-size: 17px; line-height: 2; color: #4a392c; }
.flip-back .flip-turn { margin-top: auto; border-color: rgba(91, 58, 38, .35); color: var(--mo-2); }
.io .flip-row.is-in .flip-card:first-child .flip-inner { animation: peek 1.5s ease .7s; }
@keyframes peek { 0%, 100% { transform: rotateY(0); } 40% { transform: rotateY(-22deg); } }

/* ---------- 卷三 流程：手卷 + 红线结 ---------- */
.step-thread { --progress: 0; position: relative; display: flex; justify-content: space-between; margin: 0 0 26px; padding: 0; list-style: none; }
.step-thread::before, .step-thread::after { content: ""; position: absolute; top: 16px; left: 16px; height: 1px; }
.step-thread::before { right: 16px; background: rgba(91, 58, 38, .3); }
.step-thread::after { height: 2px; margin-top: -.5px; width: calc((100% - 32px) * var(--progress)); background: var(--zhu); transition: width .5s ease; }
.knot { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.knot button { width: 32px; height: 32px; padding: 0; border: 1px solid rgba(91, 58, 38, .45); border-radius: 50%; color: var(--mo-2); background: #e5d7bb; font: 900 14px/1 var(--heavy); cursor: pointer; transition: transform .3s, background .3s, color .3s; }
.knot.is-done button { color: #f6e9d8; border-color: var(--zhu); background: var(--zhu); }
.knot.is-active button { color: var(--xuan); border-color: var(--mo); background: var(--mo); transform: scale(1.18); }
.knot-label { color: var(--mo-2); font-size: 13px; letter-spacing: .1em; }
.knot.is-active .knot-label { color: var(--mo); font-weight: 700; }
.step-track { gap: 22px; padding-bottom: 6px; }
.step-panel { flex: 0 0 calc((100% - 44px) / 2.35); display: flex; flex-direction: column; background: var(--tex), var(--xuan-hi); box-shadow: 0 24px 40px -28px rgba(43, 33, 26, .6), 0 0 0 1px rgba(91, 58, 38, .14); }
.step-figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: #d6c6a6; }
.step-figure img, .deliver-figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.io .step-figure img, .io .deliver-figure img { clip-path: inset(0 0 100% 0); }
.io .step-figure.is-in img, .io .deliver-figure.is-in img { clip-path: inset(0); transition: clip-path 1.2s cubic-bezier(.65, .05, .25, 1); }
.step-text { position: relative; padding: 22px 24px 28px; }
.step-no { position: absolute; top: -48px; right: 18px; color: rgba(248, 240, 226, .95); font: 900 72px/1 var(--heavy); text-shadow: 0 3px 16px rgba(43, 33, 26, .45); pointer-events: none; }
.step-title { margin: 0 0 10px; font: 900 26px/1.3 var(--heavy); letter-spacing: .12em; }
.step-body { margin: 0; color: #4a392c; font-size: 17px; line-height: 1.95; }
.row-arrows { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.row-arrow { width: 46px; height: 46px; padding: 0 0 3px; border: 1px solid rgba(91, 58, 38, .4); border-radius: 50%; color: var(--mo); background: transparent; font: 26px/1 var(--serif); cursor: pointer; }
.row-arrow:hover { color: var(--xuan); background: var(--mo); }

/* ---------- 卷四 示例：檀木书案上的一页页纸 ---------- */
.juan-desk { color: #efe3cc; background: radial-gradient(110% 50% at 50% 0%, #4b3224 0%, rgba(42, 26, 18, 0) 70%), var(--tan); }
.juan-desk .juan-title h2 { color: #f4e8d1; }
.juan-desk .juan-lead { color: #d1bd9b; }
.example-nav { position: sticky; top: 0; z-index: 30; display: flex; gap: 6px; overflow-x: auto; margin: 30px 0 34px; padding: 11px 0; background: rgba(42, 26, 18, .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(220, 189, 128, .18); scrollbar-width: none; }
.example-nav::-webkit-scrollbar { display: none; }
.example-nav a { flex: 0 0 auto; padding: 6px 15px; border-radius: 20px; color: #d1bd9b; font-size: 15px; letter-spacing: .12em; text-decoration: none; transition: background .3s, color .3s; }
.example-nav a.is-active, .example-nav a:hover { color: var(--tan); background: var(--jin-hi); }
.leaf { position: relative; margin: 0 0 34px; padding: 40px 38px 40px; color: var(--mo); background: var(--tex), #f3e9d5; box-shadow: 0 40px 60px -40px rgba(0, 0, 0, .75); scroll-margin-top: 70px; }
.leaf::before { content: ""; position: absolute; inset: 10px; pointer-events: none; border: 1px solid rgba(91, 58, 38, .22); box-shadow: inset 0 0 0 3px transparent, inset 0 0 0 4px rgba(91, 58, 38, .12); }
.page-title { display: flex; flex-direction: column; gap: 8px; margin: 0 0 22px; font: 900 27px/1.3 var(--heavy); letter-spacing: .06em; }
.page-title small { color: var(--mo-2); font: 400 14px/1.6 var(--serif); letter-spacing: .04em; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; }
.family-hint { display: none; }
.leaf .snap-row { margin: 0 -38px; padding: 4px 38px 16px; scroll-padding-left: 38px; }
.page-index { color: var(--zhu); font: 900 15px var(--heavy); }

.story-row { gap: 16px; }
.story-tile { position: relative; flex: 0 0 236px; aspect-ratio: 3 / 4.3; overflow: hidden; padding: 0; border: 0; border-radius: 3px; color: #f8efdf; background: #3a2a20; text-align: left; font: inherit; cursor: pointer; }
.story-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.story-tile:hover img, .story-tile:focus-visible img { transform: scale(1.06); }
.story-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(31, 21, 14, .05) 30%, rgba(31, 21, 14, .9)); }
.story-tile-text { position: absolute; right: 18px; bottom: 20px; left: 18px; display: flex; flex-direction: column; gap: 7px; }
.story-tile-narrator { color: #e3d0ad; font-size: 12px; letter-spacing: .1em; }
.story-tile strong { font: 900 22px/1.35 var(--heavy); }
.story-tile-quote { color: #eadbbd; font-size: 14px; line-height: 1.7; }
.story-tile-source { color: var(--jin-hi); font-size: 12px; }
.story-tile::after { content: "读"; position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 30px; height: 30px; color: #f6e9d8; background: var(--zhu); font: 900 15px var(--heavy); border-radius: 3px; box-shadow: inset 0 0 0 2px var(--zhu), inset 0 0 0 3px rgba(246, 233, 216, .8); transform: rotate(-5deg); }

/* 家风：八枚印 */
.spirit-summary { margin: 4px 0 12px; font: 900 25px/1.75 var(--heavy); text-align: center; letter-spacing: .08em; }
.spirit-central { margin: 0 auto 30px; max-width: 34em; color: var(--mo-2); font-size: 15px; line-height: 1.9; text-align: center; }
.seal-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; margin: 0 auto; max-width: 860px; }
.seal-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0; border: 0; color: inherit; background: none; font: inherit; cursor: pointer; }
.seal-inner, .seal-face { display: contents; }
.seal-back { display: none; }
.seal-char { display: grid; place-items: center; width: 100%; max-width: 74px; aspect-ratio: 1; color: #f6e9d8; background: var(--zhu); font: 900 34px/1 var(--heavy); border-radius: 5px; box-shadow: inset 0 0 0 3px var(--zhu), inset 0 0 0 4.5px rgba(246, 233, 216, .82); transition: transform .35s cubic-bezier(.2, .9, .3, 1.3), opacity .3s, box-shadow .3s; }
.seal-word { font-size: 14px; letter-spacing: .06em; transition: opacity .3s; }
.seal-tile:nth-child(odd) .seal-char { transform: rotate(-4deg); }
.seal-tile:nth-child(even) .seal-char { transform: rotate(3deg); }
.seal-grid.has-pick .seal-tile:not([aria-pressed="true"]) .seal-char,
.seal-grid.has-pick .seal-tile:not([aria-pressed="true"]) .seal-word { opacity: .35; }
.seal-tile[aria-pressed="true"] .seal-char { transform: rotate(0) scale(1.12); box-shadow: inset 0 0 0 3px var(--zhu), inset 0 0 0 4.5px rgba(246, 233, 216, .82), 0 12px 22px -10px rgba(110, 30, 20, .7); }
.seal-caption { min-height: 112px; margin: 26px auto 6px; max-width: 30em; padding: 20px 22px; text-align: center; background: rgba(155, 50, 38, .06); border-top: 1px solid rgba(155, 50, 38, .25); border-bottom: 1px solid rgba(155, 50, 38, .25); }
.seal-caption strong { display: block; margin-bottom: 8px; font: 900 18px var(--heavy); letter-spacing: .1em; }
.seal-caption p { margin: 0; font-size: 18px; line-height: 1.8; }
.seal-caption small { color: var(--mo-2); font-size: 13px; }
.seal-caption.is-empty { color: var(--mo-2); font-size: 15px; line-height: 4; }
.seal-caption.flash { animation: caption-in .45s ease; }
@keyframes caption-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.spirit-comparison { margin: 22px 0 0; color: var(--mo-2); font-size: 14px; line-height: 1.9; }

/* 家训：文言竖排成卷，白话横排 */
.seg { display: inline-flex; padding: 3px; border: 1px solid rgba(91, 58, 38, .32); border-radius: 22px; }
.seg button { padding: 6px 16px; border: 0; border-radius: 18px; color: var(--mo-2); background: none; font: 15px var(--serif); letter-spacing: .12em; cursor: pointer; transition: background .3s, color .3s; }
.seg button[aria-selected="true"] { color: var(--xuan-hi); background: var(--mo); }
.motto-box { margin-top: 8px; }
.motto-box[data-mode="classical"] .motto-plain, .motto-box[data-mode="plain"] .motto-classical { display: none; }
.motto-classical {
  writing-mode: vertical-rl; height: 400px; overflow-x: auto; overflow-y: hidden; padding: 30px 26px;
  color: var(--mo); font-size: 18px; line-height: 2.2; letter-spacing: .14em;
  background: repeating-linear-gradient(to left, transparent 0 39px, rgba(155, 50, 38, .2) 39px 40px), linear-gradient(#efe0c2, #e9d8b6);
  border-top: 7px solid #6b4a32; border-bottom: 7px solid #6b4a32; box-shadow: inset 0 0 30px rgba(107, 74, 50, .18);
}
.motto-classical p { margin: 0 0 0 1.6em; text-indent: 2em; }
.motto-plain p { max-width: 36em; margin: 0 0 1em; font-size: 17px; line-height: 2; }
.motto-box::after { content: "竖排，自右向左读，可左右滑动"; display: block; margin-top: 10px; color: var(--mo-2); font-size: 13px; }
.motto-box[data-mode="plain"]::after { content: none; }

/* 对联块的标题行 */
.couplet-block .page-head { margin-bottom: 8px; }

/* ---------- 卷五 交付：立体线装书 ----------
   书脊在右（线装书右翻）。合上时是靛蓝封面；点开，封面向右翻成扉页，与目录页并成一个对开，整本书同时左移半个书宽保持居中。 */
.delivery-layout { display: grid; grid-template-columns: 500px minmax(0, 1fr); gap: 20px 64px; align-items: start; }
.delivery-layout > .juan-title { grid-column: 1 / -1; }
.book3d-wrap {
  position: sticky; top: 80px; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 34px 0 28px;
  background: radial-gradient(ellipse 58% 54% at 50% 46%, rgba(255, 248, 230, .8), rgba(255, 248, 230, 0) 72%);
}
.book3d {
  --w: 236px; --col: 35px;
  position: relative; width: var(--w); aspect-ratio: 3 / 4.2; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer;
  perspective: 1700px; transition: transform 1.15s cubic-bezier(.45, .05, .2, 1);
}
.book3d[aria-pressed="true"] { transform: translateX(calc(var(--w) / -2)); }
.book3d-page {
  position: absolute; inset: 0; padding: 24px 13px; overflow: hidden;
  background: var(--tex), #f6eedc; border-radius: 4px 2px 2px 4px;
  box-shadow: 0 30px 45px -24px rgba(43, 33, 26, .6), inset -12px 0 18px -14px rgba(0, 0, 0, .3);
}
/* 目录：竖排，从右往左一行一栏，栏与栏之间是朱丝栏 */
.book3d-toc { display: flex; flex-direction: column; height: 100%; writing-mode: vertical-rl; text-align: start; }
.toc-head, .toc-item { flex: 0 0 auto; width: var(--col); display: flex; align-items: center; border-left: 1px solid rgba(155, 50, 38, .32); }
.toc-head { padding-top: 6px; color: var(--zhu); font: 900 20px/1 var(--heavy); letter-spacing: .5em; }
.toc-item { padding: 8px 0 2px; color: var(--mo); font-size: 15px; line-height: 1; letter-spacing: .2em; }
.toc-leader { flex: 1; width: 0; margin: 8px 0; border-left: 1px dotted rgba(91, 58, 38, .45); }
.toc-no { color: var(--mo-2); font-size: 12px; letter-spacing: 0; }
.book3d-cover { position: absolute; inset: 0; transform-origin: right center; transform-style: preserve-3d; transition: transform 1.15s cubic-bezier(.45, .05, .2, 1); }
.book3d-front, .book3d-inside { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.book3d-front {
  background: var(--tex), linear-gradient(100deg, #3a4a5a, var(--indigo) 60%, #26313d); border-radius: 3px 2px 2px 3px;
  box-shadow: 0 30px 45px -24px rgba(20, 25, 35, .8), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
/* 扉页：封面的背面 */
.book3d-inside {
  display: flex; flex-direction: row-reverse; justify-content: center; align-items: flex-start; gap: 14px; padding-top: 22%;
  transform: rotateY(180deg); background: var(--tex), #f3ead6; border-radius: 2px 4px 4px 2px;
  box-shadow: 0 30px 45px -24px rgba(43, 33, 26, .55), inset 12px 0 18px -14px rgba(0, 0, 0, .3);
}
.inside-title { writing-mode: vertical-rl; color: var(--mo); font: 900 26px/1 var(--heavy); letter-spacing: .32em; }
.inside-sub { margin-top: 2.4em; writing-mode: vertical-rl; color: var(--mo-2); font-size: 13px; line-height: 1; letter-spacing: .45em; }
.inside-seal {
  position: absolute; bottom: 26px; left: 22px; padding: 7px 5px; writing-mode: vertical-rl;
  color: #f6e9d8; background: var(--zhu); font: 900 13px/1 var(--heavy); letter-spacing: .12em; border-radius: 3px;
  box-shadow: inset 0 0 0 2px var(--zhu), inset 0 0 0 3px rgba(246, 233, 216, .8); transform: rotate(-4deg); opacity: .92;
}
.inside-brand { position: absolute; right: 20px; bottom: 26px; writing-mode: vertical-rl; color: var(--mo-2); font-size: 12px; line-height: 1; letter-spacing: .3em; }
.book3d[aria-pressed="true"] .book3d-cover { transform: rotateY(176deg); }
.book3d-label { position: absolute; top: 18px; left: 22px; padding: 14px 7px; writing-mode: vertical-rl; color: var(--mo); background: #f1e6cf; font: 900 18px/1 var(--heavy); letter-spacing: .3em; box-shadow: inset 0 0 0 1px rgba(91, 58, 38, .35), inset 0 0 0 3px #f1e6cf, inset 0 0 0 4px rgba(91, 58, 38, .25); }
.book3d-stitch { position: absolute; top: 0; right: 12px; bottom: 0; width: 18px; border-left: 1px solid rgba(255, 255, 255, .08);
  background: radial-gradient(circle, #d8c7a2 2.2px, transparent 2.8px) center / 18px 25% repeat-y,
    repeating-linear-gradient(to bottom, transparent 0 calc(12.5% - 1px), rgba(216, 199, 162, .75) calc(12.5% - 1px) 12.5%, transparent 12.5% 25%); background-position: center 12.5%, 0 0; }
.book3d:hover .book3d-cover { transform: rotateY(14deg); }
.book3d[aria-pressed="true"]:hover .book3d-cover { transform: rotateY(176deg); }
.io .book3d-wrap.is-in .book3d[aria-pressed="false"] .book3d-cover { animation: tease 1.8s ease .8s; }
@keyframes tease { 0%, 100% { transform: rotateY(0); } 40% { transform: rotateY(28deg); } }
.book3d-hint { margin: 0; color: var(--mo-2); font-size: 14px; letter-spacing: .08em; }
@media (max-width: 1180px) {
  .delivery-layout { grid-template-columns: 1fr; gap: 10px; }
  .book3d-wrap { position: static; margin-bottom: 30px; }
}

.deliver-row { padding: 26px 0; border-top: 1px solid var(--rule); }
.deliver-row:first-child { border-top: 0; padding-top: 0; }
.deliver-head h3 { margin: 0 0 6px; font: 900 23px/1.4 var(--heavy); letter-spacing: .08em; }
.deliver-head p { margin: 0; color: #4a392c; font-size: 17px; line-height: 1.9; }
.deliver-figure { margin: 18px 0 0; aspect-ratio: 4 / 3; overflow: hidden; background: #d6c6a6; }
.version-demo { margin-top: 18px; padding: 18px; background: var(--tex), var(--xuan-hi); box-shadow: inset 0 0 0 1px rgba(91, 58, 38, .18); }
.version-panes { margin-top: 14px; min-height: 170px; }
.version-pane:not([hidden]) { animation: caption-in .4s ease; }
.version-book { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: center; margin: 0; }
.version-book img { width: 104px; aspect-ratio: 3 / 4; object-fit: cover; box-shadow: 0 10px 18px -10px rgba(43, 33, 26, .6); }
.version-book figcaption { font-size: 17px; line-height: 1.8; }
.version-plain, .version-classical { margin: 0; font-size: 16px; line-height: 2; }
.version-classical { letter-spacing: .06em; }
.version-note { margin: 12px 0 0; color: var(--mo-2); font-size: 13px; }

/* ---------- 卷六 全景：三幅长卷 ---------- */
.pano-row { display: flex; gap: 12px; height: 540px; margin-top: 12px; }
.pano { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; padding: 0; border: 0; border-radius: 3px; color: #f8efdf; background: #3a2a20; font: inherit; text-align: left; cursor: pointer; transition: flex-grow .8s cubic-bezier(.45, .05, .2, 1); }
.pano[aria-expanded="true"] { flex-grow: 3.4; cursor: default; }
.pano img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); transition: transform 1.4s ease, filter .8s; filter: saturate(.55) brightness(.85); }
.pano[aria-expanded="true"] img { transform: scale(1); filter: none; }
.pano-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(31, 21, 14, .1) 40%, rgba(31, 21, 14, .85)); }
.pano-text { position: absolute; right: 26px; bottom: 28px; left: 26px; display: flex; flex-direction: column; gap: 10px; }
.pano-title { font: 900 30px/1.2 var(--heavy); letter-spacing: .24em; }
.pano[aria-expanded="false"] .pano-text { top: 28px; bottom: auto; right: auto; left: 50%; transform: translateX(-50%); }
.pano[aria-expanded="false"] .pano-title { writing-mode: vertical-rl; }
.pano-body { max-width: 24em; max-height: 0; overflow: hidden; opacity: 0; font-size: 17px; line-height: 1.85; transition: opacity .5s ease .35s, max-height .6s ease; }
.pano[aria-expanded="true"] .pano-body { max-height: 8em; opacity: 1; }

/* ---------- 卷七 结尾：窗里的灯 ---------- */
.juan-night { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; min-height: 100svh; padding: 120px 40px 150px; color: #f3e7d0; background: #1d130d; }
.ending-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .62; }
.juan-night::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 55% at 50% 48%, rgba(29, 19, 13, .45), rgba(29, 19, 13, .9)); }
.ending-layout { position: relative; z-index: 2; max-width: 780px; text-align: center; }
.ending-layout h2 { text-wrap: balance; }
.ending-layout h2 { margin: 0 0 18px; color: #f7ebd5; font: 900 clamp(32px, 5vw, 50px)/1.4 var(--heavy); letter-spacing: .06em; text-shadow: 0 3px 22px rgba(0, 0, 0, .45); }
.ending-layout p { margin: 0 auto; max-width: 24em; color: #e4d3b4; font-size: 18px; line-height: 1.95; }
.qr-card { width: 210px; margin: 44px auto 0; padding: 14px 14px 12px; border-radius: 4px; background: #fbf6ec; box-shadow: 0 0 0 6px rgba(220, 189, 128, .16), 0 24px 50px rgba(0, 0, 0, .45); }
.qr-card img { display: block; width: 100%; height: auto; }
.qr-card figcaption { margin-top: 10px; color: #6e4f36; font-size: 13px; line-height: 1.6; text-align: center; }
.site-footer { position: absolute; z-index: 2; right: 40px; bottom: 28px; left: 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer img { width: 120px; height: 39px; object-fit: contain; object-position: left center; opacity: .85; }
.site-footer p { margin: 0; color: #b8a48a; font-size: 12px; }

/* ---------- 悬浮预约印 ---------- */
.fab-seal {
  position: fixed; right: 18px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; writing-mode: vertical-rl;
  color: #f6e9d8; background: var(--zhu); font: 900 18px/1 var(--heavy); letter-spacing: .08em; text-decoration: none; border-radius: 6px;
  box-shadow: inset 0 0 0 3px var(--zhu), inset 0 0 0 4.5px rgba(246, 233, 216, .85), 0 12px 26px rgba(60, 20, 10, .4);
  opacity: 0; pointer-events: none; transform: translateY(80px) rotate(-6deg); transition: opacity .4s, transform .5s cubic-bezier(.2, .9, .3, 1.2);
}
.fab-seal.is-shown { opacity: 1; pointer-events: auto; transform: rotate(-6deg); }
body.reader-open .fab-seal { display: none; }

:focus-visible { outline: 2px solid var(--jin); outline-offset: 3px; }

/* ---------- 手机 ---------- */
@media (max-width: 860px) {
  .juan { padding: 92px 50px 100px 26px; }
  .juan-paper::before, .juan-silk::before { inset: 12px; }
  .shukou { top: 12px; right: 12px; width: 26px; height: 236px; font-size: 11px; letter-spacing: .26em; }
  .juan-title { gap: 12px; margin-bottom: 32px; }
  .juan-title h2 { font-size: clamp(27px, 7.6vw, 36px); }
  .seal { width: 36px; height: 36px; font-size: 20px; }
  .juan-hint { margin-top: -18px; }

  .origin-stage { display: block; }
  .origin-photo { height: 100vh; height: 100svh; }
  .origin-veil::after { background: linear-gradient(180deg, transparent 45%, rgba(237, 227, 205, .92)); }
  .origin-steps { position: relative; z-index: 2; margin-top: -100vh; margin-top: -100svh; padding: 0 22px 18vh; }
  .origin-step { align-items: flex-end; min-height: 78vh; min-height: 78svh; padding-bottom: 9svh; }
  .origin-step-title { min-height: 92svh; }
  .origin-step > * { max-width: 30em; padding: 22px 22px; background: rgba(246, 238, 221, .92); box-shadow: 0 18px 40px -20px rgba(43, 33, 26, .5); }
  .origin-step-title > .juan-title { margin: 0; }
  .origin-step-quote > .slip { padding: 26px 22px 22px; }
  .origin-line { font-size: 18px; }
  .origin-step-fade .origin-line { font-size: 21px; }
  .slip p { font-size: 22px; }

  .snap-row { margin: 0 -50px 0 -26px; padding: 6px 50px 16px 26px; scroll-padding-left: 26px; }
  .flip-card { flex: 0 0 78%; }
  .flip-title { font-size: 21px; }
  .flip-body { font-size: 16px; }

  .step-thread { margin-right: -6px; }
  .knot-label { font-size: 12px; letter-spacing: .02em; }
  .step-panel { flex: 0 0 86%; }
  .step-no { font-size: 60px; top: -40px; }
  .step-title { font-size: 23px; }
  .step-body { font-size: 16px; }
  .row-arrows { display: none; }

  .juan-desk { padding-right: 22px; padding-left: 22px; }
  .shukou-light { display: none; }
  .example-nav { margin-right: -22px; margin-left: -22px; padding: 10px 22px; }
  .leaf { margin-right: -6px; margin-left: -6px; padding: 32px 22px 30px; }
  .leaf::before { inset: 7px; }
  .leaf .snap-row { margin: 0 -22px; padding: 4px 22px 14px; scroll-padding-left: 22px; }
  .page-title { font-size: 24px; }
  .story-tile { flex-basis: 64%; }
  .spirit-summary { font-size: 21px; }
  .seal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 12px; }
  .seal-char { font-size: 28px; }
  .seal-word { font-size: 13px; }
  .seal-caption p { font-size: 17px; }
  .motto-classical { height: 360px; font-size: 17px; padding: 24px 18px; }

  .book3d-wrap { margin: 0 -50px 26px -26px; padding: 28px 0 22px; }
  .book3d { --w: 156px; --col: 23px; }
  .book3d-page { padding: 16px 9px; }
  .toc-head { font-size: 16px; letter-spacing: .4em; }
  .toc-item { padding-top: 6px; font-size: 13px; letter-spacing: .12em; }
  .toc-leader { margin: 6px 0; }
  .toc-no { font-size: 11px; }
  .book3d-label { top: 12px; left: 14px; padding: 10px 5px; font-size: 14px; }
  .book3d-stitch { right: 8px; width: 14px; background-size: 14px 25%, auto; }
  .book3d-inside { gap: 9px; }
  .inside-title { font-size: 19px; }
  .inside-sub { font-size: 11px; }
  .inside-seal { bottom: 16px; left: 14px; font-size: 11px; padding: 5px 4px; }
  .inside-brand { right: 13px; bottom: 16px; font-size: 10px; }

  .pano-row { flex-direction: column; height: auto; gap: 10px; }
  .pano { flex: none; height: 96px; transition: height .75s cubic-bezier(.45, .05, .2, 1); }
  .pano[aria-expanded="true"] { height: 64vh; height: 64svh; max-height: 540px; }
  .pano[aria-expanded="false"] .pano-text { top: 50%; left: 22px; transform: translateY(-50%); }
  .pano[aria-expanded="false"] .pano-title { writing-mode: horizontal-tb; }
  .pano-title { font-size: 26px; }
  .pano-shade { background: linear-gradient(180deg, rgba(31, 21, 14, .25) 30%, rgba(31, 21, 14, .85)); }

  .juan-night { padding: 100px 26px 150px; }
  .ending-layout p { font-size: 16px; }
  .site-footer { right: 26px; left: 26px; }
  .site-footer img { width: 100px; }
  .site-footer p { max-width: 150px; font-size: 11px; line-height: 1.6; text-align: right; }
}
@media (prefers-reduced-motion: reduce) {
  .io .juan-title .seal { opacity: .94; }
  .io .step-figure img, .io .deliver-figure img { clip-path: none; }
  .origin-step:not(.is-current) > * { opacity: 1; transform: none; }
}

/* 中文断行：短句只在标点处折行，避免「薄 / 手册」「起 / 点」这类孤字 */
.slip p { word-break: keep-all; text-wrap: balance; }
.pano-body { text-wrap: pretty; }
