/* v47.7 — repairs only, loaded after all existing theme CSS. */
:root { --dnj-mobile-gutter: clamp(16px,4.5vw,28px); }
html,body {max-width:100%;overflow-x:clip;}
/* 1. Fixed navigation remains visible at the top, including on small screens. */
body .dnj-header {position:fixed!important;inset:0 0 auto!important;z-index:99999!important;display:block!important;width:100%!important;min-height:64px;overflow:visible!important;background:rgba(8,13,31,.96)!important;}
body .dnj-header .dnj-nav-shell {width:100%!important;max-width:1280px;min-height:70px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;padding:12px var(--dnj-mobile-gutter)!important;gap:10px;}
body .dnj-header .dnj-nav-brand{display:block!important;max-width:calc(100% - 76px);font-size:clamp(12px,2.5vw,18px)!important;line-height:1.2!important;letter-spacing:.01em!important;white-space:normal!important;color:#fff!important;overflow-wrap:normal;}
body .dnj-header .dnj-nav-mobile{margin-left:auto!important;flex:0 0 auto;position:static;}
body .dnj-header .dnj-nav-mobile summary {display:flex!important;align-items:center;justify-content:center;min-width:46px;min-height:44px;padding:4px!important;border:1px solid rgba(103,232,249,.45);border-radius:9px;cursor:pointer;font-size:25px;color:#fff!important;}
body .dnj-header .dnj-nav-mobile summary:focus-visible {outline:3px solid #67e8f9;outline-offset:2px;}
@media(max-width:1050px){
  body .dnj-header .dnj-nav-desktop{display:none!important;}
  body .dnj-header .dnj-nav-mobile{display:block!important;}
  body .dnj-header .dnj-nav-mobile nav{position:absolute!important;z-index:100000;top:100%!important;left:0!important;right:0!important;width:100%!important;box-sizing:border-box;max-height:calc(100dvh - 65px);overflow-y:auto;background:#080d1f!important;border-top:1px solid rgba(103,232,249,.3)!important;box-shadow:0 25px 55px rgba(0,0,0,.55);padding:16px var(--dnj-mobile-gutter) 24px!important;}
  body .dnj-header .dnj-nav-mobile:not([open]) nav{display:none!important;}
  body .dnj-header .dnj-nav-mobile[open] nav{display:block!important;}
  body .dnj-header .dnj-nav-mobile .dnj-nav-list{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:0!important;margin:0!important;padding:0!important;}
  body .dnj-header .dnj-nav-mobile .dnj-nav-list li{width:100%;list-style:none;}
  body .dnj-header .dnj-nav-mobile .dnj-nav-list li a{display:block!important;padding:12px 8px!important;min-height:44px;box-sizing:border-box;color:#e2e8f0!important;font-size:16px!important;}
}
@media(min-width:1051px){body .dnj-header .dnj-nav-desktop{display:block!important;}body .dnj-header .dnj-nav-mobile{display:none!important;}}
/* Prevent page content from hiding behind the fixed bar. */
body .wp-site-blocks > main {min-width:0;}
/* 2. Book covers: center card content, never crop or expand out of viewport. */
body .dnj-page-shell .dnj-grid{width:min(100%,1152px);margin-inline:auto!important;}
body .dnj-page-shell .dnj-grid > .wp-block-column{min-width:0!important;}
body .dnj-page-shell .dnj-grid .dnj-card{min-width:0;max-width:100%;display:flex!important;flex-direction:column;align-items:center;text-align:center;}
body .dnj-page-shell .dnj-grid .dnj-card figure.wp-block-image{margin:0 auto 22px!important;min-height:0!important;width:100%;max-width:260px!important;display:flex;justify-content:center;align-items:center;}
body .dnj-page-shell .dnj-grid .dnj-card figure.wp-block-image img{width:auto!important;height:auto!important;max-width:100%!important;max-height:245px!important;object-fit:contain!important;margin:0 auto!important;}
body .dnj-page-shell .dnj-grid .dnj-card .wp-block-buttons{margin-top:auto!important;justify-content:center!important;}
/* 3. Individual feature cards and book galleries are centered on mobile. */
@media(max-width:850px){
 body .dnj-page-shell,body .dnj-homepage .wp-block-post-content{min-width:0;}
 body .dnj-page-shell .wp-block-columns:not(.dnj-grid){display:flex!important;flex-direction:column!important;gap:24px!important;align-items:center!important;}
 body .dnj-page-shell .wp-block-columns:not(.dnj-grid)> .wp-block-column{width:100%!important;max-width:700px!important;flex-basis:auto!important;min-width:0!important;}
 body .dnj-page-shell .wp-block-columns:not(.dnj-grid) figure.wp-block-image{margin:0 auto!important;text-align:center!important;}
 body .dnj-page-shell .wp-block-columns:not(.dnj-grid) figure.wp-block-image img{margin-inline:auto!important;}
 body .dnj-page-shell .dnj-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))!important;gap:18px!important;align-items:stretch!important;}
 body .dnj-page-shell .dnj-grid>.wp-block-column{width:100%!important;min-width:0!important;}
 body .dnj-page-shell .dnj-card{padding:clamp(18px,5vw,26px)!important;}
 body .dnj-homepage .dnj-book-showcase .dnj-book-showcase-columns{grid-template-columns:1fr!important;gap:24px!important;}
 body .dnj-homepage .dnj-book-showcase .dnj-book-showcase-image{width:min(100%,330px)!important;max-width:330px!important;}
 body .dnj-homepage .dnj-book-showcase .dnj-book-showcase-image img{display:block;margin:0 auto;max-width:100%!important;height:auto!important;}
 body .wp-block-buttons{flex-wrap:wrap!important;}
}
@media(max-width:480px){
 body .dnj-hero,body .dnj-page-shell{padding-inline:var(--dnj-mobile-gutter)!important;}
 body .dnj-homepage .dnj-hero .dnj-hero-title,body .dnj-homepage .dnj-responsive-home-title{font-size:clamp(1.75rem,8vw,2.55rem)!important;overflow-wrap:normal!important;word-break:normal!important;hyphens:none!important;}
 body .dnj-page-shell .wp-block-buttons .wp-block-button{width:100%!important;}
 body .dnj-page-shell .wp-block-buttons .wp-block-button__link{display:block;width:100%!important;text-align:center;}
}
/* 4. Full-cover Kokopelli thumbnail; page slug-agnostic for saved custom pages. */
body .wp-site-blocks .dnj-koko-responsive-embed,body .dnj-koko-responsive-embed{display:block!important;box-sizing:border-box!important;width:min(100%,1000px)!important;max-width:1000px!important;height:auto!important;min-height:0!important;padding:0!important;margin:24px auto!important;}
body .dnj-koko-responsive-embed .dnj-koko-player{position:relative!important;display:block!important;width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:16/9!important;overflow:hidden!important;border-radius:14px!important;background:#080d1f;}
body .dnj-koko-responsive-embed .dnj-koko-play-trigger,body .dnj-koko-responsive-embed .dnj-koko-player iframe{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-width:none!important;max-height:none!important;box-sizing:border-box!important;}
body .dnj-koko-responsive-embed .dnj-koko-play-trigger > img.dnj-koko-video-poster{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:cover!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;}
body .dnj-koko-responsive-embed .dnj-koko-play-trigger .dnj-koko-play-label{position:absolute!important;inset:0!important;display:flex!important;justify-content:center!important;align-items:center!important;flex-direction:column!important;gap:10px!important;font-size:clamp(14px,2vw,19px)!important;text-align:center!important;text-shadow:0 2px 8px #03050c;background:linear-gradient(0deg,rgba(0,0,0,.35),transparent 55%);}
body .dnj-koko-responsive-embed .dnj-koko-play-trigger .dnj-koko-play-icon{display:grid!important;place-items:center!important;width:clamp(60px,10vw,88px)!important;height:clamp(44px,7vw,62px)!important;border-radius:16px!important;background:#e11d48!important;color:#fff!important;box-shadow:0 7px 22px rgba(0,0,0,.45);}
body .dnj-koko-responsive-embed .dnj-koko-video-fallback{text-align:center!important;margin:12px auto!important;font-size:14px!important;}
/* Any older Kokopelli iframe or image embed should be responsive. */
body .dnj-koko-2026-published iframe,body .dnj-koko-2026-published video{max-width:100%!important;}
/* 5. Crested Butte gallery -- real shortcode renderer with accessible previous/next controls. */
body .dnj-butte-gallery{width:min(100%,960px);max-width:960px;box-sizing:border-box;margin:24px auto!important;text-align:center;}
body .dnj-butte-gallery .dnj-butte-track{display:flex;gap:0;width:100%;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none;border-radius:16px;border:1px solid rgba(103,232,249,.25);background:#101729;}
body .dnj-butte-gallery .dnj-butte-track::-webkit-scrollbar{display:none;}
body .dnj-butte-gallery figure.dnj-butte-slide{margin:0!important;padding:12px!important;box-sizing:border-box;display:flex;flex:0 0 100%;width:100%;min-width:0;flex-direction:column;align-items:center;justify-content:center;scroll-snap-align:start;}
body .dnj-butte-gallery .dnj-butte-slide img{display:block!important;max-width:100%!important;max-height:min(65vh,600px)!important;width:auto!important;height:auto!important;object-fit:contain!important;margin:0 auto!important;border-radius:8px;}
body .dnj-butte-gallery .dnj-butte-slide figcaption{max-width:100%;padding:12px;color:#cbd5e1;font-size:14px;line-height:1.4;}
body .dnj-butte-gallery .dnj-butte-controls{display:flex;justify-content:center;align-items:center;gap:22px;padding:14px;}
body .dnj-butte-gallery .dnj-butte-controls button{border:1px solid #22d3ee;background:#171a38;color:#fff;border-radius:10px;font:inherit;font-size:25px;min-width:46px;min-height:44px;cursor:pointer;}
body .dnj-butte-gallery .dnj-butte-controls button:hover{background:#272456;}
body .dnj-butte-gallery-empty,body .dnj-butte-gallery-admin-note{text-align:center;color:#cbd5e1;}
