/* The pocket experience is progressive enhancement, scoped to phones/tablets. */
.pocket-studio,.chapter-dock,.inspect-trigger{display:none}
#image-focus:not([open]){display:none}
@media(max-width:820px){
 body.pocket-ready{--dock-height:64px}
 .pocket-ready .hero{padding-top:30px;padding-bottom:22px}
 .pocket-ready .hero h1{font-size:clamp(33px,9.1vw,46px);letter-spacing:-1.8px;margin-bottom:16px}
 .pocket-ready .hero .eyebrow{margin-bottom:16px}
 .pocket-ready .hero-copy>p{font-size:12px;margin-bottom:12px}
 .pocket-ready .hero-copy .actions,.pocket-ready .hero>.hero-ring,.pocket-ready .hero>.hero-caption,.pocket-ready .hero>.scroll{display:none}
 .pocket-studio{display:block;order:1;width:100%;margin:6px auto 0;position:relative}
 .studio-meta{display:flex;align-items:center;justify-content:space-between;font-size:8px;letter-spacing:1.6px;color:#8e8299;min-height:44px}
 .studio-number{font-variant-numeric:tabular-nums;color:#5e4c6c}
 .studio-expand{font-size:10px;letter-spacing:0;color:#6d577b;background:transparent;border:0;padding:12px 0 12px 15px;min-height:44px}
 .studio-track{display:flex;width:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;isolation:isolate;border:0;touch-action:pan-x pan-y pinch-zoom}
 .studio-track::-webkit-scrollbar{display:none}
 .studio-slide{flex:0 0 100%;width:100%;min-width:0;height:clamp(240px,35svh,340px);scroll-snap-align:center;scroll-snap-stop:always;position:relative;display:grid;place-items:center;margin:0;background:radial-gradient(ellipse at 50% 60%,#f3eefb90,transparent 69%)}
 .studio-slide>img{width:88%;height:92%;max-height:100%;object-fit:contain;pointer-events:none;user-select:none;-webkit-user-drag:none;filter:drop-shadow(0 16px 18px #5342670b)}
 .studio-slide[data-slide="2"]>img{width:82%}
 .studio-hotspot{position:absolute;left:var(--x);top:var(--y);width:44px;height:44px;transform:translate(-50%,-50%);background:none;border:0;padding:0;display:grid;place-items:center;cursor:pointer}
 .studio-hotspot:before{content:'';width:20px;height:20px;border:1px solid #ffffffeb;border-radius:50%;background:#ffffff55;box-shadow:0 0 0 5px #e5daf559,0 2px 12px #2b123029;backdrop-filter:blur(6px)}
 .studio-hotspot:after{content:'+';font-size:14px;line-height:1;position:absolute;color:#3d2152}
 .studio-hotspot[aria-pressed="true"]:before{background:#fff;box-shadow:0 0 0 7px #c7b1e344,0 2px 12px #2b123024}
 .studio-hotspot[aria-pressed="true"]:after{content:'−'}
 .studio-tabs{display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid #3020391a;margin:8px 0 0}
 .studio-tabs button{border:0;border-bottom:1px solid transparent;margin-bottom:-1px;background:none;color:#a398ab;font-size:11px;min-height:44px;transition:color .25s,border-color .25s}
 .studio-tabs button[aria-pressed="true"]{color:#3b244b;border-color:#8f73a2}
 .studio-caption{padding:16px 0 8px;min-height:81px;display:grid;grid-template-columns:1fr auto;gap:8px 16px}
 .studio-caption strong{display:block;color:#4b3b57;font-size:13px;font-weight:500;letter-spacing:-.1px}
 .studio-caption p{margin:6px 0 0;font-size:11px;line-height:1.7;color:#93859e;max-width:290px}
 .studio-arrows{display:flex;gap:3px;align-items:flex-start}
 .studio-arrows button{width:36px;height:40px;border:0;background:none;color:#807087;font-size:18px}
 .studio-arrows button:disabled{opacity:.2;cursor:default}
 .studio-footer{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:8px 0 0;min-height:36px;font-size:8px;color:#a699af;letter-spacing:.5px}
 .studio-footer button{border:0;background:none;color:#6a547b;min-height:44px;font-size:10px;padding:8px 0}
 .studio-caption.changed{animation:studio-detail .35s ease both}
 @keyframes studio-detail{from{opacity:.3;translate:0 5px;filter:blur(3px)}to{opacity:1;translate:0 0;filter:blur(0)}}
 /* Thumb navigation is a reading companion, not a second menu. */
 .chapter-dock{position:fixed;bottom:0;left:0;right:0;z-index:25;display:block;padding:0 max(14px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(14px,env(safe-area-inset-left));background:#fffffff0;backdrop-filter:blur(18px);border-top:1px solid #6a477a16;transform:translateY(115%);opacity:0;visibility:hidden;transition:transform .35s ease,opacity .3s,visibility .35s}
 .chapter-dock.is-visible{transform:translateY(0);opacity:1;visibility:visible}
 .dock-links{display:flex;justify-content:space-between;gap:4px;align-items:center;min-height:62px}
 .dock-links a{display:flex;min-height:50px;min-width:44px;flex-direction:column;align-items:center;justify-content:center;gap:5px;font-size:8px;letter-spacing:.2px;color:#a195a9;padding:4px 6px;transition:color .25s}
 .dock-links a span{font-size:12px;line-height:1;color:#b1a6b8}
 .dock-links a[aria-current="location"]{color:#44304f}
 .dock-links a[aria-current="location"] span{color:#735485}
 .dock-progress{height:1px;position:absolute;top:-1px;left:0;right:0;background:transparent;pointer-events:none}
 .dock-progress i{display:block;background:#9a80ac;width:100%;height:100%;transform:scaleX(var(--reading-progress,0));transform-origin:left}
 .pocket-ready main{padding-bottom:12px}
 .pocket-ready footer{padding-bottom:calc(85px + env(safe-area-inset-bottom))}
 .pocket-ready .motion-stage{height:calc(100svh - var(--sticky-top) - 64px - env(safe-area-inset-bottom))}
 .pocket-ready.motion-off .motion-stage{height:auto}
 .inspect-trigger{display:flex;align-items:center;justify-content:center;gap:16px;min-height:44px;font-size:10px;color:#927b9f;padding:8px 4px;margin:12px auto 0;border:0;background:none;letter-spacing:.25px}
 .inspect-trigger span{font-size:16px;color:#765882}
 .pocket-ready .image-inspectable{cursor:zoom-in}
 .pocket-ready .components .inspect-trigger{margin-top:16px}
 /* Full-screen image inspection keeps the original uncropped. */
 #image-focus[open]{display:flex;flex-direction:column;position:fixed;inset:0;max-width:none;max-height:none;width:100%;height:100dvh;margin:0;padding:max(16px,env(safe-area-inset-top)) 0 max(15px,env(safe-area-inset-bottom));border:0;background:#fff;color:#302337;overflow:hidden}
 #image-focus::backdrop{background:#fff}
 .focus-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 6%;min-height:56px;flex-shrink:0}
 .focus-header .eyebrow{font-size:8px;margin:0;color:#98879f}
 .focus-close{border:0;background:none;font-size:20px;color:#53405d;width:44px;height:44px}
 .focus-title{font-size:25px;letter-spacing:-.8px;font-weight:500;padding:10px 6% 0;margin:0}
 .focus-viewport{position:relative;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;display:flex;align-items:center;justify-content:center;touch-action:pan-x pan-y pinch-zoom}
 .focus-viewport img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;flex-shrink:0;padding:15px}
 .focus-viewport.is-zoomed{display:block}
 .focus-viewport.is-zoomed img{width:200%;height:auto;max-width:none;max-height:none;padding:20px;object-fit:contain}
 .focus-controls{display:flex;justify-content:space-between;align-items:center;padding:12px 6% 4px;gap:20px;flex-shrink:0}
 .focus-controls p{font-size:10px;color:#9787a0;margin:0;line-height:1.6}
 .focus-zoom{background:transparent;border:1px solid #cfc3d5;border-radius:24px;color:#574260;padding:12px 20px;font-size:11px;min-height:44px;white-space:nowrap}
 .focus-footer{font-size:8px;color:#b2a7b8;letter-spacing:1.6px;padding:16px 6% 3px;flex-shrink:0}
 .pocket-ready:has(dialog[open]) .chapter-dock,.pocket-ready:has(nav.open) .chapter-dock{opacity:0;visibility:hidden;transform:translateY(115%)}
}
@media(max-width:359px){.studio-slide{height:230px}.pocket-ready .hero h1{font-size:34px}.studio-caption{min-height:90px}.dock-links a{font-size:7px;padding-inline:4px}}
@media(max-width:820px) and (max-height:500px) and (orientation:landscape){.studio-slide{height:260px}.pocket-ready .motion-stage{height:calc(100svh - var(--sticky-top) - 50px)}.dock-links{min-height:48px}.dock-links a{min-height:44px}.focus-title{font-size:20px;padding-top:0}.focus-header{min-height:40px}.focus-footer{display:none}}
@media(prefers-reduced-motion:reduce){.studio-caption.changed{animation:none!important}.chapter-dock,.studio-tabs button{transition:none!important}}
.motion-off .studio-caption.changed{animation:none!important}
