.opening {
  --cream: #f8eed9;
  --ember: #f88864;
  --turn-x: -8deg;
  --turn-y: 23deg;
  --turn-z: -9deg;
  --cover-alpha: 1;
  --spread-alpha: 0;
  --book-w: clamp(215px, min(23.3vw,43vh), 375px);
  position: relative;
  background: var(--paper);
  color: var(--cream);
}
.opening.ready { height: 220vh; height: 220svh; }
.opening-stage {
  position: sticky; top: 0; isolation: isolate; height: 100vh; height: 100svh; min-height: 500px;
  display: grid; grid-template-rows: auto 1fr auto; overflow: clip;
}
.stage-matte {
  position: absolute; z-index: -1; inset: var(--frame-y,0px) var(--frame-x,0px);
  overflow: hidden; border-radius: var(--frame-radius,0px); background: #0b1822;
}
.stage-matte::before, .stage-matte::after, .stage-landscape { content: ""; position: absolute; inset: 0; }
.stage-matte::before { background: radial-gradient(ellipse at 72% 45%, #345567 0%, #1c3443 25%, #0e1e2b 52%, #09141d 85%); }
.stage-landscape {
  background: url("assets/cover.webp") 83% 60% / cover;
  mix-blend-mode: luminosity; opacity: .115;
  mask-image: linear-gradient(105deg, transparent 12%, #0003 39%, black 100%);
  transform: scale(var(--land-scale,1.06));
}
.stage-matte::after { background: linear-gradient(0deg,#060e17b0,transparent 27%, transparent 86%,#07121b66); }
.stage-wrap { width: min(1390px,86%); margin-inline: auto; }
.stage-head, .stage-head nav, .stage-foot, .chapter-actions, .stage-button, .stage-link, .chapter-index, .replay, .stage-cue, .object-hint { display: flex; align-items: center; }
.stage-head { position: relative; z-index: 3; justify-content: space-between; height: clamp(65px,10vh,98px); border-bottom: 1px solid #c6d3ce36; }
.stage-head .brand { font-size: clamp(18px,1.55vw,25px); }
.brand-edition { border-left: 1px solid #f8eed957; padding-left: 12px; font: 500 12px/1.2 var(--standard-serif); letter-spacing: .14em; }
@media (max-width: 540px) { .brand-edition { display: none; } }
.stage-head .book-mark::before, .stage-head .book-mark::after { background: transparent; border-color: var(--cream); }
.stage-head .book-mark::after { border-color: var(--ember); }
.stage-head nav { gap: clamp(16px,3.3vw,52px); }
.stage-head .guest-nav { color: #e4c4aa; font-weight: 400; }
.stage-head .nav-link::after { background: var(--ember); }
.stage-main { display: grid; grid-template-columns: 43% 57%; align-items: center; min-height: 0; }
.chapter-stack { position: relative; z-index: 2; display: grid; align-items: center; }
.chapter { grid-area: 1 / 1; }
.chapter[data-chapter="0"] { opacity: var(--first-text,1); transform: translateY(var(--first-y,0)); }
.chapter[data-chapter="1"] { opacity: var(--second-text,0); transform: translateY(var(--second-y,16px)); }
.chapter[inert] { pointer-events: none; visibility: hidden; }
.chapter :is(h1,h2) {
  color: var(--cream); margin: 0; font: 800 clamp(74px,min(7.4vw,12.5vh),128px)/1.04 var(--display); letter-spacing: -.07em; white-space: normal;
}
.chapter :is(h1,h2) > span { display: block; }
.chapter :is(h1,h2) > span + span { margin-top: .06em; }
.chapter :is(h1,h2) em { display: inline-block; margin-right: .035em; color: var(--ember); font: normal 400 .8em/.94 ArchiveBrush, "KaiTi", var(--standard-serif); transform: rotate(-8deg); }
.chapter .title-stop { display: inline-block; vertical-align: .045em; border-radius: 50%; width: .096em; height: .096em; margin-left: .12em; background: var(--ember); }
.chapter p { max-width: 29em; margin: clamp(17px,2.8vh,29px) 0; color: #e0e0d6; font-size: clamp(14px,1.08vw,17px); line-height: 1.85; }
.chapter .cover-byline {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px;
  margin: 14px 0 clamp(24px,4vh,46px); color: #e3c9ad; font-size: 13px; line-height: 1.5;
}
.cover-byline > span { white-space: nowrap; }
.cover-byline [lang="en"] { font: 500 clamp(12px,1.13vw,18px)/1.4 Georgia,serif; letter-spacing: .12em; }
.cover-byline [lang="ja"] { font-family: "Yu Mincho","Hiragino Mincho ProN",serif; }
.cover-byline b { font-family: var(--standard-serif); font-weight: 600; }
.chapter-actions { gap: clamp(17px,2.6vw,41px); flex-wrap: wrap; }
.stage-button, .stage-link { min-height: 46px; width: fit-content; gap: 15px; padding: 0; font-weight: 600; font-size: 14px; letter-spacing: .065em; }
.stage-button { padding: 8px 18px; position: relative; isolation: isolate; color: #152936; background: var(--cream); overflow: hidden; }
.stage-button::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--ember); transform: translateX(-102%); transition: transform .32s ease; }
.stage-button.secondary { color: var(--cream); background: transparent; box-shadow: inset 0 0 0 1px #c6d3ce88; }
.stage-button.secondary::before { background: #ece1ce20; }
.stage-link { position: relative; }
.stage-link::after { content: ""; position: absolute; inset: auto 0 5px; height: 1px; background: var(--ember); transform: scaleX(0); transform-origin: left; transition: transform .28s; }
.stage-button:focus-visible::before { transform: none; }.stage-link:focus-visible::after { transform: scaleX(1); }
.stage-button:active { transform: translateY(2px); }
.opening :focus-visible { outline-color: var(--ember); }

.exhibit {
  position: relative; width: 100%; height: min(100%,calc(var(--book-w) * 1.83)); perspective: 1100px;
  display: grid; place-items: center; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none;
}
.ready .exhibit[data-interactive="true"] { cursor: grab; }
.ready .exhibit.is-dragging { cursor: grabbing; }
.exhibit:focus-visible { outline: 1px dashed #f0c3a0a1; outline-offset: -3px; }
.book-camera { position: relative; grid-area: 1/1; transform-style: preserve-3d; pointer-events: none; }
.book-camera::after { content: ""; position: absolute; inset: auto -9% -18%; height: 11%; border-radius: 50%; background: radial-gradient(ellipse,#020810a3,transparent 69%); transform: scale(var(--cover-alpha)); }
.book-pivot { position: relative; }
.loose-print {
  display: none; position: absolute; inset: 12% 2% 10% 4%; pointer-events: none;
  border: clamp(4px,.5vw,8px) solid #e7d9be; background: #d1cfbf url("assets/cover.webp") 78% 65% / auto 150%;
  box-shadow: 0 8px 20px #03091066; transform-origin: 15% 80%;
}
.rolling .loose-print { display: block; animation: assemble-print 1.38s cubic-bezier(.22,.74,.26,1) both; }
.book-camera { opacity: var(--cover-alpha); transform: translateX(var(--book-offset,0px)) scale(var(--book-scale,1)); }
.book-front::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(116deg,transparent 32%,#fff3cc40 49%,transparent 64%); opacity: 0; }
.spread-camera {
  position: absolute; width: min(94%,calc(var(--book-w) * 1.84)); aspect-ratio: 1.48; display: grid; grid-template-columns: 1fr 1fr;
  transform-style: preserve-3d; pointer-events: none; opacity: var(--spread-alpha); transform: perspective(1000px) rotateX(7deg) rotateZ(var(--spread-z,-6deg)) scale(var(--spread-scale,.83));
}
.spread-page { position: relative; min-width: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; padding: 7% 7.5%; gap: 6%; color: #152d43; background: #f3ebd8; box-shadow: 0 2px #b6aa92,0 4px #ede1c5,0 6px #193445,0 17px 23px #030a1559; }
.spread-page span { font: 650 clamp(10px,1vw,14px)/1.3 var(--standard-serif); letter-spacing: .12em; }
.spread-page img { width: 100%; height: 100%; object-fit: cover; }
.spread-prints { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 4%; min-height: 0; }
.spread-prints img { min-height: 0; }
.spread-page b { font: 800 clamp(11px,1.3vw,20px)/1.4 var(--display); }
.spread-camera:not([inert]) { pointer-events: auto; }
.spread-page { text-align: left; }
.spread-page::after { content: "↗"; position: absolute; top: 5.1%; right: 7%; color: #984c32; font: 16px/1.15 Georgia,serif; transition: transform .2s; }
.spread-page:focus-visible { outline: 3px solid #994225; outline-offset: -4px; }
.spread-page:is(:hover,:focus-visible)::after { transform: translate(2px,-2px); }
.spread-page:is(:hover,:focus-visible) b { text-decoration: underline; text-underline-offset: .24em; text-decoration-thickness: 1px; }
.left-page { transform-origin: right center; transform: rotateY(var(--leaf-angle,76deg)); background: linear-gradient(90deg,#f5ecd7 86%,#bdae95 100%); }
.right-page { transform-origin: left center; transform: rotateY(calc(var(--leaf-angle,76deg) * -1)); background: linear-gradient(90deg,#ddd3bd,#f5ecd7 9%); }
.object-hint { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); white-space: nowrap; color: #d2d9d9; font-size: 11px; letter-spacing: .18em; gap: 8px; opacity: var(--cover-alpha); pointer-events: none; }
.object-hint i { display: inline-block; width: 14px; height: 1px; background: #d4c3a4; }
.stage-foot { position: relative; z-index: 2; min-height: clamp(62px,9.4vh,88px); justify-content: space-between; border-top: 1px solid #c6d3ce36; }
.stage-foot button { min-height: 42px; padding: 4px 2px; color: #efede4; font-size: 12px; letter-spacing: .075em; }
.chapter-index { gap: 11px; }
.chapter-index button:not([aria-pressed="true"]) { color: #bac5c6; }
.chapter-index button[aria-pressed="true"] { color: #ffb091; }
.chapter-rule { display: block; width: clamp(30px,5vw,70px); height: 1px; background: #aabfc060; }
.chapter-rule i { display: block; height: 100%; width: 100%; background: var(--ember); transform-origin: left; transform: scaleX(var(--rail,.09)); }
.replay, .stage-cue { gap: 8px; }
.replay span { display: inline-block; font: 23px/1 Georgia,serif; }
.scroll-symbol { position: relative; width: 12px; height: 18px; border: 1px solid #dad8ca; border-radius: 7px; }
.scroll-symbol::after { content: ""; position: absolute; top: 3px; left: 4px; width: 2px; height: 5px; background: var(--ember); }
.needs-motion-js { display: none; }.ready .needs-motion-js { display: flex; }
.exhibit[data-interactive="false"] .object-hint { visibility: hidden; }
.opening:not(.ready) .opening-stage { min-height: 540px; }
.opening:not(.ready) .stage-main { padding-bottom: 34px; }
.rolling .book-pivot { animation: cover-arrives 2.45s cubic-bezier(.15,.66,.19,1) both; }
.rolling .book-front::after { animation: print-glint 2.45s ease both; }
.rolling .chapter[data-chapter="0"] :is(h1,p,.chapter-actions) { animation: titles-arrive .85s cubic-bezier(.2,.78,.23,1) both; }
.rolling .chapter h1 { animation-delay: .55s !important; }
.rolling .chapter p { animation-delay: .78s !important; }
.rolling .chapter .chapter-actions { animation-delay: .93s !important; }
@keyframes cover-arrives {
  0% { transform: perspective(1100px) translate3d(-9%,2%,265px) rotateX(17deg) rotateY(-62deg) rotateZ(14deg) scale(1.57); }
  44% { transform: perspective(1100px) translate3d(2%,-2%,48px) rotateX(1deg) rotateY(-23deg) rotateZ(4deg) scale(1.11); }
  100% { transform: none; }
}
@keyframes print-glint { 0%,94%,100% { opacity: 0; } 40% { opacity: .85; } }
@keyframes assemble-print {
  0% { opacity: .85; transform: translate3d(-63%,-23%,105px) rotateY(-35deg) rotateZ(-24deg) scale(1.25); }
  67% { opacity: 1; transform: translate3d(-18%,-4%,-15px) rotateY(10deg) rotateZ(-13deg); }
  100% { opacity: 0; transform: translate3d(0,0,-24px) rotateY(23deg) rotateZ(-9deg); }
}
@keyframes titles-arrive { from { opacity: 0; transform: translateY(20px); clip-path: inset(0 0 38%); } to { opacity: 1; transform: translateY(0); clip-path: inset(0); } }
@media (hover:hover) and (pointer:fine) {
  .stage-button:hover::before { transform: none; }.stage-link:hover::after { transform: scaleX(1); }
  .stage-button:hover .arrow, .stage-link:hover .arrow { transform: rotate(var(--angle)) translateX(3px); }
  .stage-foot button:hover { color: #ffb091; }
}
@media (min-width: 1100px) and (min-height: 550px) {
  .stage-main { grid-template-columns: minmax(0,.94fr) minmax(0,1.06fr); }
  #hero-title { font-size: clamp(90px,min(8.4vw,14vh),148px); }
}
@media (pointer: coarse) {
  .stage-head :is(.brand,.nav-link) { min-width: 44px; min-height: 44px; justify-content: center; }
}
@media (max-width: 740px) and (min-height: 501px) {
  .opening { --book-w: clamp(134px,min(52vw,27svh),255px); }
  .stage-wrap { width: 90%; }
  .stage-head { height: calc(56px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .stage-head nav { gap: clamp(5px,2.1vw,15px); }
  .stage-head .nav-link { min-width: 44px; justify-content: center; }
  .stage-head .brand { min-height: 44px; }
  .stage-main { grid-template: minmax(0,1fr) / minmax(0,1fr); padding-block: clamp(14px,3svh,30px) 12px; }
  .chapter-stack, .exhibit { grid-area: 1 / 1; }
  .chapter-stack { height: 100%; align-items: stretch; pointer-events: none; }
  .chapter { display: flex; flex-direction: column; align-items: start; }
  .chapter :is(h1,h2) { font-size: clamp(44px,min(10vw,8.7svh),72px); }
  #hero-title { font-size: clamp(49px,min(14vw,8.5svh),72px); }
  .chapter :is(h1,h2) > span { display: inline-block; }.chapter :is(h1,h2) > span + span { margin: 0 0 0 .06em; }
  .chapter p { font-size: 13px; margin: 7px 0 12px; line-height: 1.6; }
  .chapter .cover-byline { font-size: 11px; gap: 3px 12px; margin: 8px 0 0; }
  .chapter-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; gap: 12px; margin-top: auto; }
  .chapter:not([inert]) .chapter-actions { pointer-events: auto; }
  .stage-button { width: 100%; min-height: 46px; justify-content: space-between; padding-inline: clamp(10px,3vw,20px); font-size: 13px; }
  .exhibit { height: min(calc(100% - 145px),calc(var(--book-w) * 1.88)); align-self: center; margin-top: 30px; }
  .stage-foot { min-height: calc(53px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
  .stage-foot button { font-size: 11px; min-height: 44px; min-width: 44px; justify-content: center; }
  .chapter-index { gap: 0; }.chapter-rule { width: clamp(5px,2vw,16px); }
  .stage-cue,.replay { gap: 5px; }.replay span { font-size: 20px; }
  .spread-camera { width: min(94%,calc(var(--book-w) * 1.84)); }
}
@media (max-height: 500px) {
  .opening { --book-w: clamp(100px,36svh,176px); }
  .opening-stage { min-height: 320px; }
  .stage-wrap { width: 89%; }.stage-head { height: 47px; }.stage-foot { min-height: 43px; }
  .chapter :is(h1,h2) { font-size: clamp(36px,11svh,52px); }
  .chapter p { font-size: 12px; margin: 7px 0; }.chapter-actions { gap: 10px; }
  .chapter .cover-byline { margin-block: 7px 14px; gap: 3px 10px; }
  .stage-button,.stage-link { min-height: 44px; font-size: 12px; }.object-hint { bottom: -5px; }
}
@media (min-width: 550px) and (max-height: 500px) {
  .stage-main { grid-template-columns: minmax(0,.98fr) minmax(0,1.02fr); }
  .stage-button { padding-inline: clamp(9px,1.4vw,16px); gap: 8px; }
}
.opening.static { height: auto; }
.opening.static .opening-stage { position: relative; }
@media (prefers-reduced-motion: reduce) {
  .opening .rolling *, .opening-stage * { animation: none !important; transition: none !important; }
}
