/* Film grain on all open spreads; typography remains scoped to intro/Dalian. */
@font-face{
  font-family:'Passport ZhenKai';
  src:url('assets/fonts/passport-zhenkai-notes.woff2') format('woff2');
  font-style:normal;font-weight:400;font-display:swap;
}

/* Nodlume 03 Film grain: the same monochrome tile at 320px and 14% opacity.
   .map-sheet also covers the editor canvas and the existing flip snapshots. */
.map-sheet{
  background-color:#f8f3e7;background-image:none;
}
.map-sheet::before{
  background:url('assets/textures/paper-grain.svg') repeat;
  background-size:320px 320px;opacity:.14;
}
.map-sheet>.map-footer{background:transparent}

/* Soft ink edges from Ballrock's stamp reference, with fine print wear.
   Embed the mask: external SVG masks are blocked on file:// and hide the seal.
   Keep the existing seal rotation, hover scale, tint, focus and click targets. */
.page[data-chapter-page=intro] .visa-seal{
  --chapter:var(--seal-ink);opacity:1;border-width:2.7px;
  text-shadow:0 0 .45px currentColor;
  box-shadow:0 0 .6px currentColor,inset 0 0 .5px currentColor;
  -webkit-mask-image:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22160%22%20height%3D%22160%22%3E%0A%20%20%3Cfilter%20id%3D%22ink%22%20x%3D%220%22%20y%3D%220%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20color-interpolation-filters%3D%22sRGB%22%3E%0A%20%20%20%20%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%22.72%22%20numOctaves%3D%222%22%20seed%3D%228%22%20stitchTiles%3D%22stitch%22%2F%3E%0A%20%20%20%20%3CfeColorMatrix%20type%3D%22matrix%22%20values%3D%220%200%200%200%201%200%200%200%200%201%200%200%200%200%201%201%200%200%200%200%22%2F%3E%0A%20%20%20%20%3CfeComponentTransfer%3E%3CfeFuncA%20type%3D%22discrete%22%20tableValues%3D%22.12%20.36%20.8%201%201%201%22%2F%3E%3C%2FfeComponentTransfer%3E%0A%20%20%3C%2Ffilter%3E%0A%20%20%3Crect%20width%3D%22160%22%20height%3D%22160%22%20fill%3D%22white%22%20filter%3D%22url(%23ink)%22%2F%3E%0A%3C%2Fsvg%3E%0A');
  mask-image:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22160%22%20height%3D%22160%22%3E%0A%20%20%3Cfilter%20id%3D%22ink%22%20x%3D%220%22%20y%3D%220%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20color-interpolation-filters%3D%22sRGB%22%3E%0A%20%20%20%20%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%22.72%22%20numOctaves%3D%222%22%20seed%3D%228%22%20stitchTiles%3D%22stitch%22%2F%3E%0A%20%20%20%20%3CfeColorMatrix%20type%3D%22matrix%22%20values%3D%220%200%200%200%201%200%200%200%200%201%200%200%200%200%201%201%200%200%200%200%22%2F%3E%0A%20%20%20%20%3CfeComponentTransfer%3E%3CfeFuncA%20type%3D%22discrete%22%20tableValues%3D%22.12%20.36%20.8%201%201%201%22%2F%3E%3C%2FfeComponentTransfer%3E%0A%20%20%3C%2Ffilter%3E%0A%20%20%3Crect%20width%3D%22160%22%20height%3D%22160%22%20fill%3D%22white%22%20filter%3D%22url(%23ink)%22%2F%3E%0A%3C%2Fsvg%3E%0A');
  -webkit-mask-size:160px 160px;mask-size:160px 160px;
}
.page[data-chapter-page=intro] .visa-seal::after{
  opacity:.78;border-width:1.2px;box-shadow:0 0 .45px currentColor;
}
.page[data-chapter-page=intro] .visa-link:nth-child(2n) .visa-seal{
  -webkit-mask-position:37px 19px;mask-position:37px 19px;
}
.page[data-chapter-page=intro] .visa-link[data-chapter="1"]{--seal-ink:#a12628}
.page[data-chapter-page=intro] .visa-link[data-chapter="2"]{--seal-ink:#583987}
.page[data-chapter-page=intro] .visa-link[data-chapter="3"]{--seal-ink:#075181}
.page[data-chapter-page=intro] .visa-link[data-chapter="4"]{--seal-ink:#1d6256}
.page[data-chapter-page=intro] .visa-link[data-chapter="5"]{--seal-ink:#365f78}
.page[data-chapter-page=intro] .visa-link[data-chapter="5"] .visa-seal{--seal-ink:#b8912f}
.page[data-chapter-page=intro] .visa-description{--chapter:var(--seal-ink)}
.page[data-chapter-page=intro] .index-heading h2{font-weight:700;color:#082d54}
.page[data-chapter-page=intro] .index-heading p{color:#355776}
.page[data-chapter-page=intro] .identity dt{color:#355776}

/* The handwritten annotations. Each is ONE continuous brush wash, not a
   per-line highlight.

   Chapter list, and why it is explicit: Kyoto and LA were missing from it, which
   is the literal cause of stella's "marker去哪里了？" (京都) and "同理，无marker"
   (洛杉矶). The sentences already inherited the hand FACE; what they lacked was
   a brush. 龟冈/Offer/联系 still do not use this language. */
.page[data-chapter-page=intro] :is(.intro-subtitle,.index-note),
.page[data-chapter-page=dalian] :is(.place-caption,.lesson p),
.page:is([data-chapter-page=kyoto],[data-chapter-page=la]) :is(.place-caption,.lesson p){
  font-family:'Passport ZhenKai','LXGW ZhenKai','LXGW ZhenKai GB','KaiTi',cursive;
  font-weight:400;font-synthesis:none;color:#082d54;
  position:relative;isolation:isolate;
}
/* LA's lesson sentence takes its own ink instead of the shared #082d54.
   stella: "洛杉矶右页 关键词换成另一种颜色" → chose --deep (#173d5b).
   WHY THIS RULE EXISTS AT ALL: the block above sets `color:#082d54` on
   `.page:is([kyoto],[la]) :is(.place-caption,.lesson p)`, which is the SAME
   specificity as a `[data-chapter-page=la] .lesson p` rule written in
   passport.css — and this file wins the cascade. A plain override in
   passport.css therefore measured as `rgb(8,45,84)` (i.e. #082d54), NOT
   #173d5b. Reproduced in tests/_r10.cjs. So the exclusion has to happen HERE,
   at the rule that does the overriding.
   Scoped to LA's lesson ONLY: Kyoto's sentence, and both pages' 导语
   (.place-caption), keep #082d54 exactly as before. */
.page[data-chapter-page=la] .lesson p{color:var(--deep)}
/* intro + Dalian paint their brush straight onto the block here. Kyoto and LA
   do the same thing, but their stroke geometry (bleed, rotation, the scaleX
   flip that makes the ragged end land on the left) is authored in passport.css
   next to the rules that size those blocks — so they are deliberately NOT in
   this list. Adding them here would paint two brushes on one sentence. */
.page[data-chapter-page=intro] :is(.intro-subtitle,.index-note)::before,
.page[data-chapter-page=dalian] :is(.place-caption,.lesson p)::before{
  content:'';position:absolute;z-index:-1;pointer-events:none;
  inset:-.08em -.42em -.1em;
  background:transparent url('assets/textures/sand-brush.svg') center/100% 100% no-repeat;
  clip-path:none;transform:rotate(-.8deg);
}
.page[data-chapter-page=intro] :is(.intro-subtitle,.index-note) .marker-text,
.page[data-chapter-page=dalian] :is(.place-caption,.lesson p) .marker-text,
.page:is([data-chapter-page=kyoto],[data-chapter-page=la]) :is(.place-caption,.lesson p) .marker-text{
  background:none;padding:0;
}
.page[data-chapter-page=intro] :is(.intro-subtitle,.index-note) .marker-text::before,
.page[data-chapter-page=dalian] :is(.place-caption,.lesson p) .marker-text::before,
.page:is([data-chapter-page=kyoto],[data-chapter-page=la]) :is(.place-caption,.lesson p) .marker-text::before{content:none}
.page[data-chapter-page=intro] .index-note::before{transform:rotate(.7deg) scaleX(-1)}
.page[data-chapter-page=dalian] .lesson p::before{transform:rotate(-.5deg) scaleX(-1)}
.page[data-chapter-page=dalian] .place-caption::before{inset:-.2em -.25em;transform:rotate(-.4deg)}

/* Requested typography changes; Dalian's left page is deliberately excluded. */
.page[data-chapter-page=intro] .intro-heading{width:100%}
.page[data-chapter-page=intro] .intro-subtitle{
  font-size:clamp(22px,6.5cqi,28px);transform:rotate(-5deg);
}
.page[data-chapter-page=intro] .intro-subtitle .marker-text{white-space:nowrap}
.page[data-chapter-page=intro] :is(.identity dd,.intro-summary){font-weight:600;color:#082d54}
.page[data-chapter-page=dalian].right .detail-heading{
  font-size:clamp(22px,6.15cqi,30px);font-weight:700;letter-spacing:0;
}
.page[data-chapter-page=dalian].right .detail-intro{font-size:15px}
.page[data-chapter-page=dalian].right .lesson p{font-size:clamp(19px,5.3cqi,23px)}
@media(max-height:849px){
  .page[data-chapter-page=intro] .intro-subtitle{font-size:clamp(20px,5.8cqi,25px)}
}
@media(max-height:700px){
  .page[data-chapter-page=intro] .intro-subtitle{font-size:clamp(18px,5.2cqi,22px)}
}
@media(max-width:1100px){
  .page[data-chapter-page=intro] .intro-subtitle{margin-left:.6em}
}
@media(max-width:760px){
  .page[data-chapter-page=dalian].right .detail-heading{white-space:normal}
}
@container(max-width:340px){
  .page[data-chapter-page=dalian].right .detail-heading{white-space:normal}
}

/* Use the existing page height to bring both right-page compositions down.
   Flex spacing keeps the final annotation near the footer without fixed offsets. */
@media(min-width:761px){
  .page:is([data-chapter-page=intro],[data-chapter-page=dalian]).right>.page-content{
    min-height:calc(100% - 2px);padding-top:18px;padding-bottom:18px;
  }
  .page[data-chapter-page=intro] .index-heading{margin-top:0}
  .page[data-chapter-page=intro] .index-reflection{margin-top:auto;margin-bottom:0}
  .page[data-chapter-page=dalian] .detail-intro{margin-top:12px;padding-bottom:21px}
  .page[data-chapter-page=dalian] .evidence{margin-top:18px}
  .page[data-chapter-page=dalian] .metric-row{margin-top:18px}
  .page[data-chapter-page=dalian] .achievement-strip{padding-top:14px}
  .page[data-chapter-page=dalian].right .page-content>.lesson{margin-top:auto;width:100%}
  .page[data-chapter-page=dalian].right .deco-pen{bottom:23px}
}
@media(min-width:761px) and (max-height:849px){
  .page:is([data-chapter-page=intro],[data-chapter-page=dalian]).right>.page-content{
    padding-top:13px;padding-bottom:13px;
  }
  .page[data-chapter-page=dalian] .detail-intro{padding-bottom:15px}
  .page[data-chapter-page=dalian] .evidence{margin-top:13px}
  .page[data-chapter-page=dalian] .metric-row{margin-top:13px}
}

/* ===========================================================================
   封面 sparkle（stella 2026-09-28）——参考 freefrontend「GSAP Sparkle
   Generate Button」，原生 WAAPI 重写：指针划过闭合封面时沿轨迹生成四角星
   火花，闲置时封面偶尔自行闪烁一颗，点击翻开时迸发一簇。仅新增图层，
   不改封面本身的内容、尺寸与既有交互。prefers-reduced-motion 下完全不启用。
   ========================================================================== */
/* 氛围光（stella：保留“周围发光”的交互）——闭合封面闲置时呼吸微光，
   hover 增亮变快感；纯 box-shadow 叠加，不影响封面内容与尺寸。 */
.passport-cover::after{
  content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  box-shadow:0 0 22px -6px rgba(224,166,61,.14),0 0 54px -12px rgba(224,166,61,.05);
  animation:cover-glow-breathe 3.6s ease-in-out infinite;
  transition:box-shadow .45s ease;
}
.passport-cover:hover::after{
  animation:none;
  box-shadow:0 0 28px -2px rgba(224,166,61,.5),0 0 72px -8px rgba(224,166,61,.32);
}
@keyframes cover-glow-breathe{
  0%,100%{box-shadow:0 0 22px -6px rgba(224,166,61,.14),0 0 54px -12px rgba(224,166,61,.05)}
  50%{box-shadow:0 0 32px -4px rgba(224,166,61,.32),0 0 70px -8px rgba(224,166,61,.16)}
}
@media(prefers-reduced-motion:reduce){
  .passport-cover::after{animation:none}
  .cover-sparkle{display:none}
}
.cover-sparkle{
  position:absolute;z-index:9;pointer-events:none;
  transform:translate(-50%,-50%);
  background:currentColor;
  /* 经典长臂四角星：竖臂长、横臂短，腰部收细 */
  clip-path:polygon(50% 0,57% 43%,100% 50%,57% 57%,50% 100%,43% 57%,0 50%,43% 43%);
  filter:drop-shadow(0 0 7px currentColor);
}

/* 封面圆槽头像（stella 2026-09-28）：style_watercolor 三选一入选，居中裁
   86% 后圆槽的 border-radius:50% 恰好落在画中奶油圆形内。仅替换占位文字，
   圆环、尺寸沿用 viewport.css 的 .cover-portrait。 */
.cover-portrait.cover-portrait-img{
  background:url('assets/cover-portrait.png') center/cover no-repeat;
}

/* 封面下三行（姓名/副题/行动）以“赵…晴”字形中心为公共轴做光学对齐
   （stella 2026-09-28）：letter-spacing 尾隙与句末标点会让盒居中≠墨居中，
   按逐字 Range 实测补偿：副题墨心偏左 11.5px，行动行文字偏左 20.3px。 */
.cover-subtitle{margin-right:-18px}
.cover-action{display:flex;justify-content:center;align-items:center;margin-left:3px}
.cover-action-text{transform:translateX(12px)}
.cover-arrow{transform:translateX(12px)}
