.photo-reading{background:#141414;color:#f4f5f7;display:flow-root}
@media(min-width:701px){
 .photo-reading{background:transparent}
 /* Keep fixed reading controls outside the fractional scrolling transform. */
}

/* M7: photographs retain their real composition; failed enhancement remains readable. */
.photo-reading[data-device-state="fallback"] :is(.photo-directory-native,.photo-directory-selection,.photo-progress){display:none}

.g-gallery{background:#fafbfc;color:#16181a;min-height:100svh;display:flow-root}.g-gallery button{font:inherit;color:inherit;border:0;padding:0;background:none;cursor:pointer}.g-gallery [hidden]{display:none!important}.g-gallery[data-enhanced]~*{display:none}.g-group{padding:104px 296px 16vh 96px}.g-photo{margin:var(--gap) 0 0 auto;width:min(42vw,100%);position:relative}.g-photo:first-child{margin-top:0}.g-photo[data-size=l]{width:min(56vw,100%)}.g-photo[data-size=s]{width:min(27vw,100%)}.g-photo[data-size=p]{width:min(62vw,100%)}.g-photo[data-size=v]{width:auto;max-width:100%;height:72vh;aspect-ratio:var(--ratio)}.g-photo[data-size=w]{width:auto;height:52vh;aspect-ratio:var(--ratio)}.g-photo a{display:block;position:relative;overflow:hidden;width:100%;height:100%;cursor:zoom-in}.g-photo a::before{content:'';position:absolute;inset:0;background:var(--thumb) center/cover no-repeat;filter:blur(10px);transform:scale(1.06)}.g-photo img{display:block;position:relative;width:100%;height:100%;object-fit:contain;color:transparent}.g-photo:after{content:'';position:absolute;inset:0;box-shadow:inset 0 0 0 1px #14181c0d;pointer-events:none}.g-entry{height:100svh;overflow:hidden;position:relative;touch-action:pan-y}.g-track{display:flex;gap:1vw;align-items:center;height:100%;padding:68px 50vw 0 12vw;width:max-content;will-change:transform}.g-card{width:min(9vw,17.25vh);height:min(24vw,46vh);position:relative;flex:none;overflow:hidden;text-align:left}.g-card img{width:100%;height:100%;object-fit:cover;filter:grayscale(1);opacity:.82;transition:filter .6s,opacity .6s;pointer-events:none;user-select:none;-webkit-user-drag:none}.g-card:is([data-lit],:focus-visible) img{filter:none;opacity:1;transition-duration:.25s;transition-timing-function:cubic-bezier(.22,1,.36,1)}.g-card span{position:absolute;z-index:1;left:12px;bottom:10px;line-height:20px;white-space:nowrap;color:white;font-size:13px;letter-spacing:.2em}.g-card[data-open]::after{content:'';position:absolute;left:0;right:0;bottom:0;height:34%;background:linear-gradient(to top,rgba(10,12,14,.42),rgba(10,12,14,0));pointer-events:none}.g-ticks{position:absolute;top:72px;left:50%;transform:translateX(-50%);display:flex;height:44px;z-index:2}.g-ticks button{width:14px;display:grid;place-items:center}.g-ticks i{width:1px;height:8px;background:#16181a;opacity:.22;transition:height .6s cubic-bezier(.16,1,.3,1),opacity .6s ease}.g-map{position:fixed;right:40px;top:76px;bottom:28px;width:112px;z-index:8}.g-map .g-close{position:absolute;right:0;top:0;width:44px;height:44px;display:flex;align-items:center;justify-content:flex-end;font-size:18px!important;z-index:2}.g-mini{position:absolute;inset:52px 0 0}.g-mini button{position:absolute;right:0;opacity:.42;transition:opacity .5s ease}.g-gallery .g-mini button:is(:hover,:focus-visible){opacity:1!important}.g-mini img{width:100%;height:100%;object-fit:contain}.g-window{position:absolute;left:-6px;right:-6px;border:1px solid #16181a80;pointer-events:none}.g-tail{padding-top:42vh;display:flex;flex-direction:column;align-items:flex-end}.g-charge{margin-top:18px;width:min(9vw,17.25vh);height:1px;background:#16181a2e}.g-charge i{height:1px;display:block;background:#16181a;transform-origin:left;transform:scaleX(0)}.g-ending{padding:70vh 0 18vh;display:flex;justify-content:flex-end}.g-ending>div{display:flex;flex-direction:column;gap:22px}.g-ending p{margin:0;font-size:22px;line-height:34px;font-weight:300;letter-spacing:.06em}.g-ending button{border-bottom:1px solid currentColor!important;padding-bottom:2px!important;letter-spacing:inherit}.g-ending a{display:flex;align-items:baseline;gap:12px;min-height:44px;font-size:15px;color:inherit;text-decoration:none}.g-ending a span:first-child{letter-spacing:.3em}.g-lightbox{position:fixed;inset:0;width:100vw;height:100svh;max-width:none;max-height:none;padding:24px;border:0;background:#fafbfc;z-index:20000}.g-lightbox::backdrop{background:#fafbfc}.g-gallery .g-lightbox button{width:100%;height:100%;cursor:zoom-out}.g-lightbox img{max-width:92vw;max-height:calc(100svh - 48px);width:auto;height:auto;object-fit:contain}.g-flight{position:fixed;z-index:9999;object-fit:cover;pointer-events:none;max-width:none}.g-retry{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:6px 14px!important;font-size:13px!important;letter-spacing:.2em;background:#fafbfccc!important}body:has(.g-gallery[data-enhanced]) .next-stage{display:none}body:has(.g-gallery[data-enhanced]){background:#fafbfc}body:has(.g-gallery[data-enhanced][data-view=group]) #site-navigation{background:#fafbfc!important;--ink:#16181a!important}body:has(.g-gallery[data-enhanced][data-view=group]) #site-navigation a{color:#16181a}body:has(.g-gallery[data-enhanced][data-view=group]) #site-navigation a.is-active{color:#6f5726}
@media(max-width:700px){.g-ending p{font-size:18px}.g-group{padding:90px 24px 12vh}.g-photo,.g-photo[data-size=l],.g-photo[data-size=p]{width:100%}.g-photo[data-size=s]{width:70%}.g-photo[data-size=v]{height:auto;width:75%}.g-map,.g-ticks{display:none!important}.g-card{width:25vw;height:58vw}.g-track{gap:4vw}.g-card img{filter:none;opacity:1}.g-charge{width:25vw}.g-photo{margin-top:24vh}}
@media(prefers-reduced-motion:reduce){.g-card img,.g-ticks i{transition:none}}
/* The shell canvas stays fixed during reading; the gallery is an opaque foreground. */
.g-gallery{position:relative;z-index:1}.chapter-content:has(>.g-gallery[data-enhanced]){margin-bottom:0;min-height:calc(100svh + 2px)}
body:has(.g-gallery[data-enhanced][data-view=group]) #site-navigation .site-menu-toggle{color:#16181a}
.g-entry{touch-action:none}

.g-lightbox::backdrop{background:transparent}.g-lightbox img{transform-origin:top left}.g-mobile-close{display:none}
body:has(.g-gallery[data-enhanced]) #site-navigation{transition:background-color .5s,color .5s}body:has(.g-gallery[data-enhanced]) #site-navigation[data-surface=paper]{background:#fafbfc}
@media(max-width:700px){.g-gallery[data-view=group] .g-mobile-close{display:block;position:fixed;right:24px;top:76px}}

.g-gallery:not([data-enhanced]) .g-tail,.g-gallery:not([data-enhanced]) [data-restart]{display:none}
@media(max-width:700px){.g-group{padding-top:120px}.g-mobile-close{width:44px;height:44px;top:68px!important;right:15px!important}}

.g-mini button[data-next] img{object-fit:cover;filter:grayscale(1);transition:filter .6s}.g-mini button[data-next]:is(:hover,:focus-visible) img{filter:none}

/* Transitions: the shared navigation stays above stand-ins; hovering never follows the scrolling strip. */
.g-track{user-select:none}
@keyframes g-appear{from{opacity:0}}
.g-map{animation:g-appear .34s ease}.g-mini button{animation:g-appear .8s ease}
.g-ghost,.g-ghost *{animation:none!important}
body:has(.g-gallery[data-enhanced]) #site-navigation a{transition:color .5s,opacity 360ms ease}
@media(prefers-reduced-motion:reduce){.g-map,.g-mini button{animation:none}body:has(.g-gallery[data-enhanced]) #site-navigation a{transition:none}}

/* Each group opens with its first photograph centred below the navigation. */
@media(min-width:701px){
 .g-gallery[data-enhanced] .g-group{padding-top:var(--site-nav-height,68px)}
 .g-gallery[data-enhanced] .g-opening{min-height:calc(100svh - var(--site-nav-height,68px));display:flex;align-items:center;justify-content:flex-end}
 .g-gallery[data-enhanced] .g-opening .g-photo{margin:0;flex:none}
}

/* Tail card and pull line follow the scroll themselves; focus rings stay as light as the page. */
.g-tail .g-card img{transition:none}
.g-charge{margin-top:6px}.g-charge i{transition:transform .25s ease}
.g-gallery :is(.g-photo a,.g-card):focus-visible{outline:1px solid #16181a;outline-offset:3px}
.g-gallery .g-photo a[data-quiet]:focus-visible,.g-lightbox button:focus-visible{outline:none}
@media(prefers-reduced-motion:reduce){.g-charge i{transition:none}}

/* The entry strip can be grabbed; a failed card leaves a quiet ground rather than a broken-image mark. */
.g-track{cursor:grab}.g-track:active{cursor:grabbing}
.g-card{background:#eceef0}.g-card img{color:transparent}
body:has(.g-gallery[data-enhanced]) .chapter-progress{display:none}

/* 桌面入口：竖线贴在照片上方，第一根竖条和题头左对齐。依据见 specs/019-chapter-head。 */
@media(min-width:701px){
  .g-gallery[data-enhanced][data-view=entry]{min-height:0}
  .g-gallery[data-enhanced] .g-entry{height:calc(100svh - var(--band-top) - var(--band-h) - 218px);--card-h:min(24vw,calc(100svh - var(--band-top) - var(--band-h) - 310px))}
  .g-gallery[data-enhanced] .g-entry .g-card{height:var(--card-h);width:calc(var(--card-h)*var(--card-ratio,.375))}
  .g-gallery[data-enhanced] .g-track{align-items:flex-start;height:auto;padding:62px 50vw 0 var(--track-pad,86px);gap:var(--card-gap,1vw)}
  .g-gallery[data-enhanced] .g-ticks{top:18px;left:50%;transform:translateX(-50%)}
}
/* 矮屏（笔记本）入口：题头不动，三张卡片站到题头右侧同一行，题头占的高度还给卡片；
   卡片滑到题头边上淡出，刻度在卡片上方正中。高屏仍上下排。依据见 specs/085-plans。 */
@media(min-width:1024px) and (max-height:917px){
  .g-gallery[data-enhanced] .g-entry{margin-top:-218px;height:calc(100svh - var(--band-top) - var(--band-h));--card-h:min(24vw,calc(100svh - var(--band-top) - var(--band-h) - 104px));-webkit-mask-image:linear-gradient(90deg,transparent 590px,#000 640px);mask-image:linear-gradient(90deg,transparent 590px,#000 640px)}
  .g-gallery[data-enhanced] .g-track{padding:56px 50vw 0 640px}
  .g-gallery[data-enhanced] .g-ticks{top:22px;left:calc((100vw + 640px - 48px) / 2)}
}
