/* Final iPhone polish: accessible photo viewing and uninterrupted chapter listening. */
.image-dialog--refined{width:min(95vw,1000px);max-height:93dvh;padding:15px 17px 14px;border-radius:10px;overflow:auto;color:#eee5d8}
.image-dialog--refined .dialog-close{position:sticky;top:0;float:right;width:44px;height:44px;border-radius:50%;margin:-5px -6px 0 0;z-index:3}
.image-dialog__meta{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:46px;color:#c5a983;font:700 .66rem/1.3 'DM Sans',system-ui,sans-serif;letter-spacing:.12em}
.image-dialog__meta>span:first-child{max-width:75%;text-wrap:balance}
.image-dialog__meta>span:last-child{color:#f0dfc6;font-size:.73rem;white-space:nowrap}
.image-dialog--refined figure{margin:0;clear:both;touch-action:pan-y}
.image-dialog--refined img{display:block;max-width:100%;width:auto;max-height:min(63dvh,680px);object-fit:contain;margin:0 auto;border:1px solid rgba(231,216,187,.12);border-radius:3px;background:#060d11}
.image-dialog--refined figcaption{min-height:45px;padding:12px 8px 4px;color:#e5d6c4;font-size:.85rem;line-height:1.55;letter-spacing:0;text-align:center}
.image-dialog__navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding-top:10px;border-top:1px solid rgba(202,176,135,.2)}
.image-dialog__navigation button{min-width:100px;min-height:45px;padding:9px 12px;border:1px solid rgba(206,174,133,.48);border-radius:7px;background:rgba(40,52,54,.75);color:#f0e1cd;font:600 .81rem 'DM Sans',system-ui,sans-serif;cursor:pointer}
.image-dialog__navigation button:hover{background:#c7a77b;color:#102028}
.image-dialog__hint{font:700 .57rem/1.3 'DM Sans',system-ui,sans-serif;color:#b5a186;letter-spacing:.1em;text-align:center}
.image-dialog__navigation button:focus-visible{outline:2px solid #e9ca96;outline-offset:3px}
.storybook-last-step[hidden]{display:none!important}
.storybook-last-step{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 21px;margin:19px 0 10px;border:1px solid rgba(195,165,121,.32);border-radius:5px;background:#152226}
.storybook-last-step>span{font-size:.65rem;font-weight:700;letter-spacing:.14em;color:#c6aa81}
.storybook-last-step a{color:#efe0cb;font-size:.85rem;font-weight:600;line-height:1.5;text-align:right;text-decoration:underline;text-underline-offset:3px}
.storybook-last-step a:hover{color:#e6be83}
.listening-dock__pause{flex-shrink:0;min-width:44px;min-height:44px}
.listening-dock__close{flex-shrink:0;min-width:32px;min-height:44px;padding:0;background:transparent;border:0;color:#d2bfa1;cursor:pointer;font:1.4rem/1 system-ui,sans-serif}
.listening-dock__close:hover{color:#fff}
.listening-dock__detail small{font-size:.6rem;letter-spacing:.075em;color:#dbbf95}
#prologue,#story,#gallery,#soundtrack,#recordings-heading{scroll-margin-top:92px}
@media(max-width:600px){
  .image-dialog--refined{width:calc(100vw - 18px);max-width:none;max-height:94dvh;padding:10px 11px 12px}
  .image-dialog--refined .dialog-close{margin:-2px -3px 0 0}
  .image-dialog__meta{min-height:45px;font-size:.58rem;letter-spacing:.07em}
  .image-dialog--refined img{max-height:58dvh}
  .image-dialog--refined figcaption{font-size:.83rem;min-height:50px;padding:9px 8px 2px}
  .image-dialog__navigation button{min-width:82px;min-height:46px;padding:9px 10px;font-size:.82rem}
  .image-dialog__hint{font-size:.52rem;letter-spacing:.04em}
  .storybook-last-step{flex-direction:column;align-items:flex-start;gap:8px;padding:15px 16px}
  .storybook-last-step a{text-align:left}
  .listening-dock__inner{gap:8px;padding:9px 10px}
  .listening-dock__emblem{flex-basis:29px;height:29px}
  .listening-dock__detail strong{font-size:.81rem}
  .listening-dock__close{min-width:29px}
  /* A few extra pixels make the photographic captions readable without scrolling the image. */
  .gallery-grid .photo-plate .gallery-item__caption small{font-size:.77rem!important;line-height:1.35}
}
@media(prefers-reduced-motion:reduce){
  .image-dialog--refined img,.image-dialog__navigation button{animation:none!important;transition:none!important}
}
