/* The Living Book keeps its reflection data separate from the visible page layout. */
.living-book-entry {
  position: relative;
  isolation: isolate;
  width: min(calc(100% - 2.5rem), 1480px);
  min-height: clamp(27rem, 46vw, 43rem);
  margin: clamp(1.5rem, 4vw, 4rem) auto;
  overflow: hidden;
  border: 1px solid rgba(223, 173, 87, .42);
  border-radius: .55rem;
  color: #fff7e8;
  background: #090c13 url('../images/unspoken/living-book-closed-golden-150511.jpg') center / cover no-repeat;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .45);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.living-book-entry { background-image: image-set(url('../images/unspoken/living-book-closed-golden-150511.webp') type("image/webp"), url('../images/unspoken/living-book-closed-golden-150511.jpg') type("image/jpeg")); }
.living-book-entry:hover,
.living-book-entry:focus-within { transform: translateY(-2px); border-color: #f1d28d; box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .45), 0 0 2rem rgba(239, 182, 83, .22); }
.living-book-entry::before { position: absolute; z-index: -1; inset: 0; content: ''; background: linear-gradient(90deg, rgba(3, 7, 13, .82), rgba(4, 6, 10, .62) 37%, transparent 70%); }
.living-book-entry__copy { position: relative; z-index: 2; width: min(47%, 39rem); padding: clamp(2rem, 4.5vw, 5rem); pointer-events: none; }
.living-book-entry__eyebrow { margin: 0 0 1rem; color: #efc977; font-family: var(--mono, monospace); font-size: .73rem; letter-spacing: .27em; }
.living-book-entry h2 { margin: 0; color: #fff9ec; font-family: var(--serif, Georgia, serif); font-size: clamp(2.6rem, 4.2vw, 4.5rem); font-weight: 400; line-height: 1.04; letter-spacing: -.035em; }
.living-book-entry__subtitle { max-width: 26ch; margin: 1.1rem 0 1.5rem; color: #f4c979; font-family: var(--serif, Georgia, serif); font-size: clamp(1.4rem, 2.05vw, 2.15rem); line-height: 1.38; }
.living-book-entry__description { max-width: 43ch; margin: 0 0 2rem; color: #e9e4db; font-size: clamp(.98rem, 1.15vw, 1.16rem); line-height: 1.7; }
.living-book-entry__open, .living-book__controls button, .living-book__close { border: 1px solid #d4aa62; border-radius: .32rem; color: #f9da98; background: rgba(7, 8, 10, .76); font-family: var(--mono, monospace); font-size: .75rem; letter-spacing: .13em; cursor: pointer; }
.living-book-entry__open { position: relative; z-index: 3; display: inline-flex; min-height: 3.3rem; align-items: center; gap: 1.25rem; padding: .8rem 1.35rem; pointer-events: auto; }
.living-book-entry__open span { font-size: 1.25rem; }
.living-book-entry__book { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.living-book-entry__open:hover, .living-book__controls button:hover, .living-book__close:hover { color: #fff7dd; border-color: #ffe1a0; background: rgba(70, 45, 19, .86); }
.living-book-entry__open:focus-visible, .living-book-entry__book:focus-visible, .living-book button:focus-visible, .living-book__page-copy:focus-visible { outline: 3px solid #ffe4a8; outline-offset: 4px; }

html.living-book-active { overflow: hidden; }
.living-book { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; overflow: auto; border: 0; color: #f9e7bf; background: radial-gradient(ellipse at 50% 35%, #24334a 0%, #08101d 48%, #04070d 100%); }
.living-book::backdrop { background: #03050a; }
.living-book__interior { width: 100%; min-height: 100%; padding: clamp(1rem, 2vw, 2rem) clamp(1rem, 2vw, 2rem) 2rem; }
.living-book__toolbar { display: flex; width: min(100%, 1450px); justify-content: space-between; align-items: start; gap: 1rem; margin: 0 auto .7rem; }
.living-book__eyebrow { margin: 0 0 .25rem; color: #e6c47c; font-family: var(--mono, monospace); font-size: .65rem; letter-spacing: .22em; }
.living-book__toolbar h2 { margin: 0; color: #fff4dc; font-family: var(--serif, Georgia, serif); font-size: clamp(1.35rem, 2vw, 2.1rem); font-weight: 400; }
.living-book__close { min-height: 2.8rem; padding: .55rem .8rem; white-space: nowrap; }
.living-book__close span { padding-left: .5rem; font-size: 1.2rem; }
.living-book__stage { position: relative; width: min(100%, 1390px, calc((100dvh - 17rem) * 1.777)); min-width: 0; margin: 0 auto; perspective: 1800px; }
.living-book__spread { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: .4rem; background: #dcb982 url('../images/unspoken/living-book-open-golden-155751.jpg') center / 100% 100% no-repeat; box-shadow: 0 1.5rem 4rem #0009; }
.living-book__spread { background-image: image-set(url('../images/unspoken/living-book-open-golden-155751.webp') type("image/webp"), url('../images/unspoken/living-book-open-golden-155751.jpg') type("image/jpeg")); }
.living-book__cover { visibility: hidden; position: absolute; z-index: 5; top: 8%; left: 50%; width: 44%; height: 82%; background: url('../images/unspoken/living-book-cover-generated.png') center / 100% 100% no-repeat; filter: drop-shadow(-.8rem .5rem 1.3rem #1b0c0799); pointer-events: none; transform-origin: left center; }
.living-book__cover { background-image: image-set(url('../images/unspoken/living-book-cover-generated.webp') type("image/webp"), url('../images/unspoken/living-book-cover-generated.png') type("image/png")); }
.living-book__cover-art { display: block; position: absolute; top: 5%; left: 6%; width: 88%; height: 90%; border: 2px solid #d5aa62; background: #302012 url('../images/unspoken/living-book-cover-golden-150511.png') center / cover no-repeat; box-shadow: 0 0 0 .32rem #180d08, 0 0 0 .43rem #aa793c, inset 0 0 1rem #13080466; }
.living-book__cover-art { background-image: image-set(url('../images/unspoken/living-book-cover-golden-150511.webp') type("image/webp"), url('../images/unspoken/living-book-cover-golden-150511.png') type("image/png")); }
.living-book.is-opening .living-book__cover { visibility: visible; animation: living-book-open 820ms ease-in-out both; }
.living-book.is-closing .living-book__cover { visibility: visible; animation: living-book-close 420ms ease-in both; }
.living-book__left-copy { position: absolute; top: 13%; left: 13%; width: 32%; max-height: 48%; overflow: auto; padding: .4rem; color: #281a11; text-align: center; scrollbar-width: thin; }
.living-book__roman { margin: 0 0 .25rem; font-family: var(--serif, Georgia, serif); font-size: clamp(1.1rem, 1.7vw, 1.8rem); }
.living-book__left h3 { margin: 0; color: #28170c; font-family: var(--serif, Georgia, serif); font-size: clamp(1.3rem, 2.25vw, 2.55rem); font-weight: 400; line-height: 1.12; }
.living-book__ornament { display: block; margin: .5rem auto; color: #82581f; font-size: 1.2rem; }
.living-book__page-copy { display: block; position: absolute; top: 16%; right: 12%; bottom: 16%; width: 32%; overflow-y: auto; overscroll-behavior: contain; padding: clamp(.5rem, 1.5vw, 1.5rem); color: #24160d; font-family: var(--serif, Georgia, serif); font-size: clamp(1rem, 1.55vw, 1.6rem); line-height: 1.55; overflow-wrap: anywhere; scrollbar-width: thin; }
.living-book__page-copy p { margin: 0; }
.living-book__page-copy p + p { margin-top: 1em; }
.living-book__mobile-number, .living-book__mobile-title { display: none; }
.living-book__turn { display: none; position: absolute; z-index: 4; top: 8%; left: 50%; width: 44%; height: 82%; border-radius: 1% 5% 5% 1%; background: linear-gradient(90deg, #7e5129 0%, #d6ad74 4%, #f7d9a8 29%, #e7bd84 75%, #956134 100%); box-shadow: -1rem .4rem 2rem #23140977, inset .3rem 0 1.3rem #57301466; backface-visibility: visible; pointer-events: none; }
.living-book__stage.is-turning-forward .living-book__turn { display: block; transform-origin: left center; animation: living-book-turn-forward 660ms ease-in-out both; }
.living-book__stage.is-turning-backward .living-book__turn { display: block; left: 6%; border-radius: 5% 1% 1% 5%; transform-origin: right center; animation: living-book-turn-backward 660ms ease-in-out both; }
.living-book__controls { display: flex; width: min(100%, 1390px); justify-content: space-between; align-items: center; gap: 1rem; margin: .75rem auto 1.25rem; }
.living-book__controls button { min-width: 9.2rem; min-height: 2.7rem; padding: .55rem .8rem; }
.living-book__controls button:disabled { opacity: .35; cursor: default; }
.living-book__progress { margin: 0; color: #f0d28c; font-family: var(--mono, monospace); font-size: .75rem; letter-spacing: .14em; white-space: nowrap; }
.living-book__navigation { width: min(100%, 1450px); margin: 0 auto; }
.living-book__navigation h3 { margin: 0 0 .65rem; color: #efc977; font-family: var(--mono, monospace); font-size: .72rem; font-weight: 400; letter-spacing: .12em; }
.living-book__navigation ol { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(6.8rem, 1fr); gap: .55rem; margin: 0; padding: .15rem .1rem .65rem; overflow-x: auto; list-style: none; scrollbar-color: #8c6b3f #0c111b; }
.living-book__navigation li { min-width: 0; }
.living-book__chapter { display: flex; width: 100%; height: 100%; min-height: 8.5rem; flex-direction: column; overflow: hidden; padding: 0 0 .45rem; border: 1px solid #7f6240; border-radius: .35rem; color: #f7e4bc; background: #0b0d13; font-family: var(--serif, Georgia, serif); text-align: center; cursor: pointer; }
.living-book__chapter:hover, .living-book__chapter[aria-current='true'] { border-color: #ffd68c; box-shadow: inset 0 0 0 1px #ffd68c; }
.living-book__chapter-image { display: block; width: 100%; height: 4.8rem; margin-bottom: .25rem; background: #182032 url('../images/unspoken/golden-rings-over-misty-mountain-seas-960.jpg') center / cover no-repeat; }
.living-book__chapter-image { background-image: image-set(url('../images/unspoken/golden-rings-over-misty-mountain-seas-960.webp') type("image/webp"), url('../images/unspoken/golden-rings-over-misty-mountain-seas-960.jpg') type("image/jpeg")); }
.living-book__chapter--2 .living-book__chapter-image, .living-book__chapter--5 .living-book__chapter-image, .living-book__chapter--8 .living-book__chapter-image { background-image: url('../images/unspoken/living-book-open-golden-155751.jpg'); background-position: left bottom; }
.living-book__chapter--2 .living-book__chapter-image, .living-book__chapter--5 .living-book__chapter-image, .living-book__chapter--8 .living-book__chapter-image { background-image: image-set(url('../images/unspoken/living-book-open-golden-155751.webp') type("image/webp"), url('../images/unspoken/living-book-open-golden-155751.jpg') type("image/jpeg')); }
.living-book__chapter--3 .living-book__chapter-image, .living-book__chapter--6 .living-book__chapter-image, .living-book__chapter--9 .living-book__chapter-image { background-image: url('../images/unspoken/living-book-cover-golden-150511.png'); background-position: center; }
.living-book__chapter--3 .living-book__chapter-image, .living-book__chapter--6 .living-book__chapter-image, .living-book__chapter--9 .living-book__chapter-image { background-image: image-set(url('../images/unspoken/living-book-cover-golden-150511.webp') type("image/webp"), url('../images/unspoken/living-book-cover-golden-150511.png') type("image/png')); }
.living-book__chapter--4 .living-book__chapter-image, .living-book__chapter--7 .living-book__chapter-image { background-position: 80% center; filter: hue-rotate(20deg); }
.living-book__chapter-number { color: #e6b96e; font-size: .78rem; line-height: 1.2; }
.living-book__chapter-title { display: block; padding: 0 .25rem; font-size: .83rem; line-height: 1.18; }

@keyframes living-book-open { 0% { opacity: 1; transform: rotateY(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: rotateY(-178deg); } }
@keyframes living-book-close { 0% { opacity: 0; transform: rotateY(-178deg); } 30% { opacity: 1; } 100% { opacity: 1; transform: rotateY(0); } }
@keyframes living-book-turn-forward { 0% { transform: rotateY(0); filter: brightness(1); } 50% { filter: brightness(.7); } 100% { transform: rotateY(-180deg); filter: brightness(1); } }
@keyframes living-book-turn-backward { 0% { transform: rotateY(0); filter: brightness(1); } 50% { filter: brightness(.7); } 100% { transform: rotateY(180deg); filter: brightness(1); } }

@media (max-width: 900px) {
  .living-book-entry { min-height: 31rem; background-position: 60% center; }
  .living-book-entry__copy { width: min(58%, 35rem); }
  .living-book__stage { width: min(100%, 1000px); }
  .living-book__left-copy { top: 13%; max-height: 50%; }
  .living-book__left h3 { font-size: clamp(1.1rem, 2.4vw, 1.8rem); }
  .living-book__page-copy { font-size: clamp(.95rem, 1.7vw, 1.3rem); }
  .living-book__navigation ol { grid-auto-columns: 7rem; }
}
@media (max-width: 820px) {
  .living-book-entry { min-height: 41rem; width: calc(100% - 1.5rem); background-position: 66% top; }
  .living-book-entry::before { background: linear-gradient(0deg, #030711 0%, rgba(3, 7, 17, .92) 32%, transparent 72%); }
  .living-book-entry__copy { position: absolute; inset: auto 0 0; width: 100%; padding: 2rem 1.4rem; }
  .living-book-entry h2 { font-size: clamp(2.35rem, 8vw, 3.6rem); }
  .living-book-entry__subtitle { margin: .6rem 0; font-size: 1.35rem; }
  .living-book-entry__description { margin-bottom: 1.15rem; font-size: .94rem; line-height: 1.5; }
}
@media (max-width: 640px) {
  .living-book__interior { padding: 1rem .75rem 1.5rem; }
  .living-book__toolbar { align-items: center; }
  .living-book__toolbar h2 { font-size: 1.25rem; }
  .living-book__close { font-size: .64rem; }
  .living-book__stage { width: min(100%, 34rem); }
  .living-book__spread { min-height: 0; aspect-ratio: auto; border: .7rem solid #342113; border-radius: .45rem; background: #edd0a0; box-shadow: inset 0 0 0 .3rem #ad7540, inset 0 0 2rem #714b2a88, 0 1rem 2rem #0008; }
  .living-book__spread::before { position: absolute; inset: .25rem; content: ''; border: 1px solid #bc915e; background: radial-gradient(ellipse at 30% 20%, #fff0c9, #e5c18c 80%, #ba8855); box-shadow: inset 0 0 2rem #69401e66; }
  .living-book__cover { top: 1rem; left: 1rem; width: calc(100% - 2rem); height: calc(100% - 2rem); }
  .living-book__left { display: none; }
  .living-book__right { position: relative; z-index: 1; height: auto; }
  .living-book__page-copy { position: relative; inset: auto; width: 100%; max-height: none; overflow: visible; padding: 2rem clamp(1.15rem, 5vw, 2rem) 2.25rem; font-size: clamp(1.05rem, 4.4vw, 1.35rem); line-height: 1.62; }
  .living-book__mobile-number { display: block; margin: 0 0 .25rem !important; color: #6e451f; font-size: 1.2rem; text-align: center; }
  .living-book__mobile-title { display: block; margin: 0 0 .9rem; color: #29190e; font-family: var(--serif, Georgia, serif); font-size: clamp(1.65rem, 7vw, 2.2rem); font-weight: 400; line-height: 1.15; text-align: center; }
  .living-book__turn { top: 1.3rem; left: 1rem; width: calc(100% - 2rem); height: calc(100% - 2.6rem); }
  .living-book__stage.is-turning-backward .living-book__turn { left: 1rem; }
  .living-book__controls button { min-width: 6rem; padding-inline: .45rem; font-size: .65rem; }
  .living-book__navigation ol { grid-auto-columns: 7rem; }
}
@media (max-width: 640px) {
  .living-book-entry {
    display: flex;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    padding: clamp(1.25rem, 5vw, 1.75rem) clamp(.9rem, 4vw, 1.25rem);
    background-position: 66% top;
    background-size: cover;
  }
  .living-book-entry::before { background: linear-gradient(180deg, rgba(3, 7, 13, .88), rgba(4, 6, 10, .78) 58%, rgba(3, 7, 13, .5)); }
  .living-book-entry__copy { display: contents; }
  .living-book-entry__eyebrow { display: none; }
  .living-book-entry h2 { order: 1; width: 100%; max-width: 20ch; margin: 0 auto; font-size: clamp(1.85rem, 7.4vw, 2.45rem); line-height: 1.1; letter-spacing: -.025em; text-align: center; text-wrap: balance; }
  .living-book-entry__subtitle { order: 2; max-width: 36ch; margin: .6rem auto 0; font-size: clamp(1.08rem, 4.4vw, 1.3rem); line-height: 1.35; text-align: center; }
  .living-book-entry__description { order: 3; max-width: 44ch; margin: .55rem auto .45rem; font-size: clamp(.94rem, 3.8vw, 1.05rem); line-height: 1.5; text-align: center; }
  .living-book-entry__book {
    position: relative;
    z-index: 2;
    order: 4;
    inset: auto;
    display: block;
    width: min(100%, 38rem);
    height: auto;
    aspect-ratio: 1672 / 941;
    margin: .45rem auto 0;
    padding: 0;
    border: 1px solid rgba(223, 173, 87, .72);
    border-radius: .35rem;
    background: #090c13 url('../images/unspoken/living-book-closed-golden-150511.jpg') center / contain no-repeat;
    box-shadow: 0 0 1.4rem rgba(225, 168, 75, .2);
  }
  .living-book-entry__book { background-image: image-set(url('../images/unspoken/living-book-closed-golden-150511.webp') type("image/webp"), url('../images/unspoken/living-book-closed-golden-150511.jpg') type("image/jpeg")); }
  .living-book-entry__open { order: 5; align-self: center; margin: 1rem auto 0; }
}
@media (prefers-reduced-motion: reduce) {
  .living-book-entry { transition: none; }
  .living-book-entry:hover, .living-book-entry:focus-within { transform: none; }
  .living-book.is-opening .living-book__cover, .living-book.is-closing .living-book__cover, .living-book__stage.is-turning-forward .living-book__turn, .living-book__stage.is-turning-backward .living-book__turn { animation: none; }
  .living-book__cover { display: none; }
  .living-book__turn { display: none !important; }
}
