.mobile-menu-head,.mobile-menu-account,.mobile-menu-search,.mobile-menu-utility,.mobile-menu-icon,.mobile-menu-chevron{display:none}
@media(max-width:900px){
 html{scroll-padding-top:74px;-webkit-text-size-adjust:100%;text-size-adjust:100%}body{overflow-wrap:break-word}body .site-header.topbar{height:64px;padding:0 14px;gap:10px}body .site-header .logo-mark{width:88px;height:44px}body .site-header .menu-toggle{display:block;width:40px;height:40px;flex-shrink:0}body .site-header .header-actions{gap:7px;margin-left:auto}body .site-header .header-crm{font-size:10px;padding:8px 5px}body .site-header .orbit-account{width:42px;min-width:42px}body .site-header .orbit-account-text{font-size:9px}.elir-wallet-count{min-width:28px;font-size:12px;padding:4px}.elir-wallet-icon{width:19px!important;height:24px!important}
 body.mobile-site-menu-open{overflow:hidden!important}body .site-header .site-nav{position:fixed;inset:64px 0 0;top:64px;bottom:0;height:calc(100dvh - 64px);max-height:none;overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box;padding:20px max(20px,env(safe-area-inset-left)) calc(24px + env(safe-area-inset-bottom));background:radial-gradient(ellipse at 100% 0,#203d534d,transparent 55%),#0c1b25;z-index:100;border:0;gap:0;box-shadow:0 20px 60px #0009}.site-header .site-nav:not(.is-open){display:none!important}.site-header .site-nav.is-open{display:flex!important;flex-direction:column;align-items:stretch;animation:mobile-menu-in .2s ease-out}.mobile-menu-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.mobile-menu-head h2{font:400 29px/1.2 Georgia,serif;color:#eddbaf;margin:0}.mobile-menu-close{width:40px;height:40px;border:1px solid #cdb78955;border-radius:50%;background:transparent;color:#ead5aa;font-size:29px}.mobile-menu-account{display:flex;width:100%;align-items:center;gap:12px;min-height:86px;padding:13px;border:1px solid #cdb78970;border-radius:12px;background:#ffffff02;color:#eddbaf;text-align:left;margin-bottom:16px}.mobile-menu-avatar{display:grid;place-items:center;width:48px;height:48px;flex-shrink:0;border:1px solid #cdb789;border-radius:50%;font:25px Georgia,serif;overflow:hidden;background:#233845}.mobile-menu-avatar img{width:100%;height:100%;object-fit:cover}.mobile-menu-person{display:grid;gap:6px;min-width:0;flex:1}.mobile-menu-person strong{font:400 20px/1.2 Georgia,serif;overflow-wrap:anywhere}.mobile-menu-person small{font:12px/1.3 Arial,sans-serif;color:#9dafbb}.mobile-menu-balance{display:flex;align-items:center;gap:4px;white-space:nowrap;font:15px Arial,sans-serif}.mobile-menu-search{display:block;min-height:46px;padding:12px 15px;margin-bottom:18px;border:1px solid #87abc06b;border-radius:10px;background:#07141c77;color:#aabcc7;font:16px Arial,sans-serif;text-align:left}body .site-header .site-nav>a[data-page]{display:flex;align-items:center;gap:14px;min-height:58px;max-width:none;padding:13px 12px;border-bottom:1px solid #b4c6d826;flex-shrink:0;font:18px/1.3 Arial,sans-serif;color:#cbd5dc;white-space:normal}body .site-header .site-nav>a[aria-current=page]{border:1px solid #d6b979a0;border-radius:10px;background:#bda06a13;color:#f1dba6}.mobile-menu-icon{display:inline-grid;place-items:center;width:27px;color:#d8bd85;font:26px Georgia,serif}.mobile-menu-chevron{display:inline-block;margin-left:auto;color:#d6bd89;font:25px Arial}.mobile-menu-utility{display:grid;gap:8px;margin-top:22px;padding-top:12px;border-top:1px solid #cdb78938}.mobile-menu-utility button,.mobile-menu-utility a{min-height:46px;padding:10px 12px;background:transparent;border:0;color:#c7d2d9;text-align:left;font:16px/1.4 Arial,sans-serif}.mobile-new{display:inline-block;border:1px solid #cdb789;border-radius:20px;padding:3px 7px;margin-right:10px;color:#ecd9ad;font:10px Arial,sans-serif}
 .mobile-flow{display:flex!important;flex-direction:column!important;gap:0!important;height:auto!important;min-height:0!important;max-height:none!important;padding:0!important;margin-top:0!important;padding-bottom:0!important;background:var(--mobile-surface,#0c1a23)!important;isolation:isolate;overflow:hidden!important}.mobile-flow::before,.mobile-flow::after{display:none!important}.mobile-art{position:relative;display:block;order:-10;flex:none;width:100%;min-width:0;overflow:hidden;background:var(--mobile-surface,#0c1a23)}.mobile-art:after{content:'';position:absolute;inset:0;background:linear-gradient(transparent var(--scene-art-fade-start,78%),var(--mobile-surface,#0c1a23));pointer-events:none}.mobile-flow .mobile-art>img{position:static!important;display:block;inset:auto!important;z-index:0!important;width:100%!important;height:clamp(240px,80vw,440px)!important;max-height:none!important;min-height:0!important;margin:0!important;aspect-ratio:auto!important;object-fit:cover!important;object-position:var(--mobile-focus-x,var(--mobile-auto-x,50%)) var(--mobile-focus-y,45%)!important;mask:none!important;-webkit-mask:none!important;opacity:1!important;filter:none!important;transform:none!important;border-radius:0!important}.mobile-flow .mobile-art>img:not([data-mobile-focus=true]){height:auto!important;object-fit:contain!important}.mobile-flow .mobile-art>img[data-mobile-alternative=true]{height:auto!important;max-height:85svh!important;object-fit:contain!important}.mobile-art-origin{display:none!important}.mobile-flow[data-mobile-baked=true] .mobile-art:after{display:none}.mobile-flow[data-mobile-baked=true] .mobile-art>img{height:auto!important;object-fit:contain!important}
 body .mobile-flow>:is(.cms-custom-block,.encyclopedia-intro),body .mobile-flow:is(.hero,.intro-chapter,.page-custom-block) :is(.hero-content,.intro-chapter-inner),body .mobile-flow>.game-feature-copy{display:block!important;width:100%!important;min-width:0;max-width:none!important;min-height:0!important;height:auto!important;padding:20px 22px 32px!important;margin:0!important;position:relative!important;inset:auto!important;background:transparent!important;clip-path:none!important;overflow:visible!important;white-space:normal!important}.mobile-flow .cms-custom-copy,.mobile-flow .intro-copy,.mobile-flow .encyclopedia-intro-copy{display:block!important;position:static!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;left:auto!important;top:auto!important;text-align:left!important}.mobile-flow .hero-shade,.mobile-flow .hero-bottom{display:none!important}.mobile-flow :is(.intro-chapter-inner,.encyclopedia-intro-inner){width:100%!important;max-width:none!important;margin:0!important;display:block!important}.mobile-flow :is([data-cms-layout=left],[data-cms-layout=right],[data-cms-layout=center]){width:100%!important;max-width:none!important;margin-inline:0!important;text-align:left!important}.mobile-flow :is(.cms-unified-text,.cms-text-area,.cms-prose,[data-cms-field=body],.intro-copy p,.encyclopedia-intro-description){font-size:18px!important;line-height:1.65!important;max-width:none!important;overflow-wrap:anywhere}.mobile-flow [data-cms-role=body]{font-size:18px!important;line-height:1.65!important}.mobile-flow :is([data-cms-role=page-title],h1){font-size:clamp(36px,9vw,48px)!important;line-height:1.12!important;letter-spacing:-.025em!important}.mobile-flow :is([data-cms-role=title],h2){font-size:clamp(30px,8vw,40px)!important;line-height:1.15!important}.mobile-flow :is([data-cms-role=subtitle],h3){font-size:25px!important;line-height:1.3!important}.mobile-flow .cms-content-section{padding:24px 22px!important;background:transparent!important}.mobile-flow .cms-custom-block{grid-template-columns:minmax(0,1fr)!important;gap:0!important}
 #ency-page-content{--ency-join:0px!important}body.ency-open #ency-page-content>.cms-reader-block{--ency-join:0px!important;margin-top:0!important;min-height:0!important;padding-bottom:0!important}#ency-page-content .ency-page-turns{padding:22px 20px 28px!important;gap:10px}#ency-page-content .ency-page-turn{max-width:calc(50% - 5px);min-width:0;padding:12px;gap:8px}#ency-page-content .ency-page-turn strong{font-size:15px}#ency-page-content .cms-truth-teaser{margin:0 22px 24px;max-width:calc(100% - 44px)}.cms-access-badges{position:relative!important;justify-content:flex-end;right:auto!important;bottom:auto!important;padding:0 22px 15px}.cms-subscription-band .cms-subscription-band-titles{max-width:100%!important}.cms-subscription-band .cms-subscription-chapter{font-size:20px!important}.site-reader-preview-status{max-width:130px}.site-reader-preview{flex-wrap:wrap;max-width:calc(100vw - 30px)}
 body :is(.library-details,.library-cover-viewer,.account-profile,.sponsor-dialog,.cms-access-dialog,dialog.media-expanded,dialog.shop-expanded){box-sizing:border-box;width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100dvh - 24px);padding:20px;overflow-y:auto}body :is(.library-detail-layout,.media-expanded,.shop-expanded){grid-template-columns:minmax(0,1fr);gap:22px}.library-detail-cover{height:auto;max-height:46svh;min-height:0}.library-detail-description{max-height:none!important;overflow:visible!important}.library-detail-title{font-size:30px}.library-story{grid-template-columns:1fr!important;max-height:calc(100dvh - 20px)!important}.library-story-gallery{height:36svh;min-height:0}.library-story-text{font-size:17px;line-height:1.65;min-height:0;overflow-y:auto}.library-series-summary{grid-template-columns:90px minmax(0,1fr) 18px!important;gap:14px!important;padding:18px!important}.library-series-art{width:90px!important;height:120px!important;object-fit:cover}.library-series-summary h3{font-size:25px!important}.library-series-books{padding:12px!important}.library-book{grid-template-columns:minmax(0,1fr)!important;gap:0!important;min-height:0!important;overflow:hidden}.library-cover-art,.library-cover-stage{width:100%!important;max-height:70svh}.library-book-copy{padding:22px!important;min-width:0}.library-book h2{font-size:28px!important}.library-book-actions{flex-wrap:wrap;gap:10px}.library-book-actions button{min-height:44px}.library-tabs,.library-toolbar{flex-wrap:wrap;gap:8px}.library-tabs button{min-height:44px}.shop-grid,.media-grid{grid-template-columns:minmax(0,1fr)!important}.shop-card{grid-template-columns:minmax(0,1fr)!important}.shop-thumbnail{height:auto;max-height:60svh;width:100%;object-fit:contain}.media-thumbnail{height:auto;aspect-ratio:4/3}.media-expanded-copy,.shop-expanded-copy{max-height:none!important;overflow:visible!important;min-width:0}.site-footer{margin-inline:0!important;padding-inline:20px!important}.footer-socials{flex-wrap:wrap}.sponsors-grid{gap:6px!important}.sponsor-logo-button{padding:3px!important;min-width:0}.sponsor-callout{min-width:0}input,select,textarea{font-size:16px!important}button,a{touch-action:manipulation}.reader-header{padding-inline:10px!important}.reader-back{min-width:44px;min-height:44px}.reader-book-name{font-size:13px!important;max-width:40vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reader-footer{padding-inline:10px!important;gap:8px!important}.reader-page{max-width:100%!important}.reader-spread{max-width:100vw!important}.reader-side-panel{width:min(320px,calc(100vw - 24px))!important}
 @keyframes mobile-menu-in{from{opacity:0;transform:translateY(-12px)}to{opacity:1;transform:translateY(0)}}
}
@media(prefers-reduced-motion:reduce){.site-header .site-nav.is-open{animation:none!important}}
@media(max-width:900px){
 body .mobile-flow>:is(.intro-chapter,.page-custom-block){display:block!important;min-height:0!important;height:auto!important;padding:20px 22px 32px!important;margin:0!important;background:transparent!important}.mobile-flow>.intro-chapter::after,.mobile-flow>.intro-chapter::before{display:none!important}body .mobile-flow>.hero{min-height:0!important;height:auto!important;max-height:none!important;padding:0!important;background:transparent!important}body .mobile-flow>.hero>.hero-content{position:relative!important;inset:auto!important;width:100%!important;max-width:none!important;padding:22px!important}.mobile-flow>.intro-chapter>.intro-chapter-inner{padding:0!important}.mobile-menu-icon svg{width:25px;height:25px;stroke-width:1.4}#ency-page-content .cms-reader-block:not(.mobile-flow)>.cms-ency-scene{min-height:0!important;padding:28px 22px!important}#ency-page-content [data-cms-layout]{width:100%!important;max-width:none!important;text-align:left!important;margin-inline:0!important}#ency-page-content [data-cms-role=page-title]{font-size:42px!important}#ency-page-content [data-cms-role=title]{font-size:34px!important}#ency-page-content [data-cms-role=subtitle]{font-size:26px!important}#ency-page-content [data-cms-role=body]{font-size:18px!important;line-height:1.65!important}.library-story .story-text{font-size:17px;line-height:1.65}.library-series-summary p{overflow-wrap:anywhere}body .site-nav a.is-locked .mobile-menu-chevron{margin-left:0}
}
@media(max-width:900px){.news-drawer{top:64px!important}.ency-nav-strip{max-width:100%;gap:8px!important}body.ency-open .news-toggle{font-size:10px!important;padding:8px!important}.ency-toc-toggle{padding:8px 10px;font-size:12px;text-transform:none}.site-search-toggle{font-size:12px;padding:8px!important}.mobile-flow .people-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.mobile-flow .people-list li{padding:10px;min-width:0}.mobile-flow .intro-path-links{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mobile-flow .intro-path-links a{padding:12px;font-size:14px!important}}
@media(max-width:900px){
 body .news-drawer .ency-nav-strip{display:flex!important;flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;width:100%;max-width:100%;height:48px!important;min-height:48px;padding:4px 12px!important;gap:8px!important;background:#0b1922f5!important;border-bottom:1px solid #cdb78935;box-sizing:border-box}
 body .news-drawer .ency-controls{position:static!important;display:flex;align-items:center;transform:none!important;margin:0!important;gap:0;left:auto!important;top:auto!important}body .news-drawer .ency-controls[hidden]{display:none!important}
 body .news-drawer .ency-nav-strip :is(.news-toggle,.ency-toc-toggle){position:static!important;transform:none!important;height:38px!important;min-height:38px!important;border:1px solid #cdb78966!important;border-radius:8px!important;padding:7px 9px!important;font-size:12px!important;max-width:100%;margin:0!important}
 body .news-drawer .ency-nav-strip :is(.news-toggle,.ency-toc-toggle)::before{display:none!important}
 body .news-drawer .ency-nav-strip #news-toggle{margin-left:auto!important;width:40px!important;min-width:40px;justify-content:center;flex-shrink:0}body .news-drawer .ency-nav-strip #news-toggle>span:not(.news-pulse){display:none!important}body .news-drawer .ency-nav-strip #news-toggle .news-pulse{display:inline!important;font-size:9px!important;letter-spacing:0}
 body .news-drawer .ency-nav-strip #site-search-toggle{width:40px!important;min-width:40px;justify-content:center;flex-shrink:0}body .news-drawer .ency-nav-strip #site-search-toggle>span{display:none!important}
 body .news-drawer .ency-controls #ency-toc-toggle{border-radius:8px 0 0 8px!important}body .news-drawer .ency-controls #ency-bookmarks-toggle{border-radius:0 8px 8px 0!important;border-left:0!important;width:36px;padding:7px!important}
 body.ency-open #ency-page-content{padding-top:112px!important}.home-root{padding-top:112px!important}#games,#media,#shop,#library{padding-top:112px!important}.mobile-menu-utility a{max-width:none!important}
}
@media(max-width:900px){body .mobile-flow>.intro-page>.intro-chapter{display:block!important;min-height:0!important;height:auto!important;margin:0!important;padding:22px!important;background:transparent!important;overflow:visible!important}body .mobile-flow>.intro-page>.intro-chapter::before,body .mobile-flow>.intro-page>.intro-chapter::after{display:none!important}body .mobile-flow>.intro-page>.intro-chapter>.intro-chapter-inner{padding:0!important}body .mobile-flow>.intro-page>.intro-chapter .intro-copy{width:100%!important;max-width:none!important;margin:0!important}}
@media(max-width:900px){.mobile-flow .home-discover{display:none!important}.mobile-flow .hero-explain{font-size:18px!important;line-height:1.65!important}}
@media(max-width:900px){.mobile-flow .library-cover-shade,.mobile-flow .library-cover-note{display:none!important}.mobile-flow .library-cover-copy{position:static!important;width:100%!important;max-width:none!important;padding:22px!important;margin:0!important}.mobile-flow>.library-cover{min-height:0!important;height:auto!important;padding:0!important}.mobile-flow .library-cover-copy>p:not(.library-kicker){font-size:18px!important;line-height:1.65!important}.game-feature-gameplay .game-feature-player{order:-1;max-width:380px}.game-feature-gameplay video{max-height:65svh;object-fit:contain}.game-development-label{position:relative!important;inset:auto!important;transform:none!important;width:100%!important;max-width:100%!important;order:-5;padding:10px 16px!important;font-size:14px!important;box-sizing:border-box}.mobile-flow .library-kicker{font-size:11px!important;line-height:1.5!important}}
@media(max-width:900px){.mobile-flow :is(.cms-unified-text,.cms-text-area,.cms-prose,.intro-copy p,.hero-explain),.library-story .story-text{hyphens:auto;-webkit-hyphens:auto}#ency-page-content [data-cms-role=page-title]{font-size:clamp(34px,10.5vw,42px)!important}#ency-page-content [data-cms-role=title]{font-size:clamp(30px,9vw,36px)!important}}
@media(max-width:900px){.library-book>.library-cover-art,.library-book>.library-book-copy{grid-column:auto!important;grid-row:auto!important}.library-story .story-layout{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(120px,.9fr) minmax(0,1fr)!important}.game-feature-gameplay{grid-template-columns:minmax(0,1fr)!important;padding:28px 22px!important}.sponsor-logo-button{min-height:44px}.library-story-card .library-cover-art{height:auto!important;min-height:0!important;aspect-ratio:4/3}}

@media(max-width:900px){body .people-symbol{width:32px!important;height:32px!important;max-width:32px!important;max-height:32px!important;object-fit:contain;flex:0 0 32px!important}body .library-race-icon{width:24px!important;height:24px!important;max-width:24px!important;max-height:24px!important;object-fit:contain;flex:0 0 24px!important}}

.news-toggle .mobile-news-label { display: none; }

@media (max-width: 900px) {
  :root {
    --mobile-gutter: clamp(16px, 4.6vw, 32px);
    --mobile-left: max(var(--mobile-gutter), env(safe-area-inset-left));
    --mobile-right: max(var(--mobile-gutter), env(safe-area-inset-right));
    --mobile-header: calc(58px + env(safe-area-inset-top));
    --mobile-tools: 52px;
    --mobile-top: calc(var(--mobile-header) + var(--mobile-tools));
    --mobile-bottom: max(10px, env(safe-area-inset-bottom));
  }
  html { scroll-padding-top: calc(var(--mobile-top) + 8px); }
  body .site-header.topbar {
    box-sizing: border-box; height: var(--mobile-header); min-height: 0;
    padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  }
  body .site-header :is(.menu-toggle, .orbit-account) { min-width: 44px; min-height: 44px; }
  body .site-header :is(.menu-toggle, .orbit-account)::before { inset: 0; }
  body .site-header .site-nav {
    /* The blurred header is a containing block for this fixed panel. */
    inset: var(--mobile-header) 0 auto;
    height: calc(100vh - var(--mobile-header));
    height: calc(100dvh - var(--mobile-header));
    padding: 14px var(--mobile-right) calc(24px + var(--mobile-bottom)) var(--mobile-left);
    scroll-padding-block: 12px; scrollbar-gutter: auto;
  }
  .mobile-menu-head { margin-bottom: 14px; }
  .mobile-menu-close { width: 44px; height: 44px; flex: none; }
  .mobile-menu-account { min-height: 72px; }
  body .site-header .site-nav > a[data-page] { min-height: 50px; gap: 12px; justify-content: flex-start; }
  body.mobile-site-menu-open :is(.news-drawer, #community-chat-toggle, .community-chat-panel) { visibility: hidden; }
  body .news-drawer { top: var(--mobile-header) !important; }
  body .news-drawer .ency-nav-strip {
    height: var(--mobile-tools) !important; min-height: var(--mobile-tools);
    gap: 6px !important; padding: 4px max(10px, env(safe-area-inset-right)) 4px max(10px, env(safe-area-inset-left)) !important;
  }
  body .news-drawer .ency-nav-strip :is(.news-toggle, .ency-toc-toggle) {
    height: 44px !important; min-height: 44px !important; font-size: 13px !important; line-height: 1.1;
  }
  body .news-drawer .ency-controls #ency-bookmarks-toggle,
  body .news-drawer .ency-nav-strip #site-search-toggle { width: 44px !important; min-width: 44px; }
  body .news-drawer .ency-nav-strip #news-toggle { width: auto !important; padding-inline: 12px !important; }
  body .news-drawer .ency-nav-strip #news-toggle .news-pulse { display: none !important; }
  body .news-drawer .ency-nav-strip #news-toggle > span.mobile-news-label { display: inline !important; }
  body .news-drawer .ency-nav-strip .ui-icon { width: 18px; height: 18px; }
  body .home-root, body.ency-open #ency-page-content, body :is(#library, #games, #media, #shop) { padding-top: var(--mobile-top) !important; }
  #about .simple-page { padding: calc(var(--mobile-top) + 28px) var(--mobile-right) 52px var(--mobile-left); }
  #about .simple-page-inner { min-width: 0; margin-inline: auto; }

  /* Reader windows follow the visible area when the phone keyboard is open. */
  body .elmus-flyout {
    max-height: min(var(--flyout-height), calc(100dvh - var(--mobile-keyboard-inset, 0px) - var(--flyout-top) - var(--mobile-bottom))) !important;
  }
  body .elmus-flyout .account-menu-scroll { max-height: inherit; }
  body .news-drawer #ency-toc-panel { max-height: min(var(--toc-height), calc(100dvh - var(--mobile-keyboard-inset, 0px) - var(--toc-top) - var(--mobile-bottom))); }
  body :is(.elmus-flyout, #ency-toc-panel) :is(.site-search-head, .ency-toc-head, .library-contents-heading) {
    grid-template-columns: minmax(0, 1fr) 44px; align-items: center;
  }
  body :is(.elmus-flyout, #ency-toc-panel) :is(.overlay-close, .ency-close, #site-search-close, #library-contents-close),
  body .contents-tree .contents-tree-expand { width: 44px; min-width: 44px; height: 44px; }
  body .contents-tree .contents-tree-label { min-height: 44px; white-space: normal; overflow-wrap: anywhere; }
  body .contents-tree-list .contents-tree-list { margin-inline-start: 6px; padding-inline-start: 6px; }
  body .contents-tree-row { gap: 3px; }
  body .elmus-flyout.news-panel .home-latest-card { flex-basis: min(270px, 78vw); }
  body dialog:is(#auth-dialog, .account-profile, .account-collection, .library-details, .library-story, .community-dialog, .daily-quiz, .sponsor-dialog, .cms-access-dialog) {
    box-sizing: border-box; max-width: calc(100% - var(--mobile-left) - var(--mobile-right) + 12px);
    max-height: calc(var(--mobile-visible-height, 100dvh) - env(safe-area-inset-top) - var(--mobile-bottom) - 12px);
    overflow-y: auto; overscroll-behavior: contain; overflow-wrap: break-word; scroll-padding-block: 12px;
  }
  body :is(.community-dialog, .daily-quiz, .library-details, .sponsor-dialog, .account-profile, .account-collection) :is(.overlay-close, .daily-quiz-close, .sponsor-close),
  body .community-header button { min-width: 44px; min-height: 44px; }
  body :is(.daily-quiz-button, .community-button, .auth-submit, .sponsor-callout button) { min-height: 44px; }
  body #community-chat-toggle { min-height: 44px; right: var(--mobile-right); bottom: var(--mobile-bottom); }
  body .community-chat-panel {
    right: var(--mobile-right); bottom: calc(var(--mobile-bottom) + var(--mobile-keyboard-inset, 0px) + 50px);
    width: min(400px, calc(100% - var(--mobile-left) - var(--mobile-right)));
    height: min(540px, calc(var(--mobile-visible-height, 100dvh) - 84px));
  }

  /* Each published illustration and its copy share one reading column. */
  .mobile-art:has(> img[hidden]) { display: none; }
  body .mobile-flow :is(.hero-content, .library-cover-copy, .intro-copy, .encyclopedia-intro-copy, .cms-custom-copy, .game-feature-copy),
  #ency-page-content :is(.cms-text-area, .cms-unified-text, .cms-prose, .cms-subblock) { min-width: 0; overflow-wrap: break-word; }
  #ency-page-content :is(.cms-reader-block .cms-subblock.has-art) {
    width: auto; min-height: 0; padding: 0; margin: 20px 0; text-shadow: none;
  }
  #ency-page-content .cms-subblock.has-art::before { content: none; }
  #ency-page-content .cms-subblock.has-art > .cms-subblock-art {
    position: static; width: 100%; height: auto; max-height: 72svh; margin: 0 auto 16px;
    object-fit: contain; -webkit-mask-image: none; mask-image: none;
  }
  #ency-page-content .ency-page-turns { display: flex; flex-wrap: wrap; padding-inline: var(--mobile-gutter) !important; }
  #ency-page-content .ency-page-turn { flex: 1 1 10rem; max-width: none; min-height: 48px; }
  #ency-page-content .ency-page-turn-copy { min-width: 0; overflow-wrap: anywhere; }
  body .mobile-flow :is(.intro-path-links a, .game-open-action), .game-back, .game-section-nav a, .media-back {
    display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box;
  }
  :is(.game-feature-player, .media-expanded-visual, .shop-expanded-visual, .media-expanded-copy, .shop-expanded-copy) { min-width: 0; max-width: 100%; }
  :is(.media-expanded-visual, .shop-expanded-visual) :is(img, video, iframe) { width: 100%; max-width: 100%; }
  :is(.media-card, .shop-card) :is(h2, h3, p), .game-feature-copy :is(h1, h2) { overflow-wrap: break-word; }
  .site-footer .footer-socials { flex-wrap: wrap; width: auto; }
  .site-footer { padding-bottom: calc(56px + var(--mobile-bottom)); }
}

@media (max-width: 700px) {
  /* The category selector comes first; its filters open within the toolbar. */
  #library .library-toolbar { position: relative; inset: auto; padding: 16px var(--mobile-right) 14px var(--mobile-left); }
  #library .library-navigation-row { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 10px; }
  #library .library-navigation-row nav {
    order: -1; display: grid; grid-template-columns: 1fr 1fr 1.35fr; flex: 0 0 100%; min-width: 0; gap: 3px;
    padding: 3px; border: 1px solid #bda27354; border-radius: 12px; background: #0a1720;
  }
  #library .library-navigation-row nav button {
    min-width: 0; min-height: 44px; padding: 5px; border-color: transparent; border-radius: 8px;
    font-size: clamp(12px, 3.2vw, 14px); line-height: 1.25; white-space: normal;
  }
  #library .library-navigation-row :is(.library-sort-button, .library-purchase-history, .library-sort-option) { min-height: 44px; }
  #library .library-sort-menu { left: 0; right: auto; width: min(270px, calc(100vw - var(--mobile-left) - var(--mobile-right))); }
  #library .library-sort-option { font-size: 14px; }
  #library .library-section-heading { margin: 0; padding: 20px var(--mobile-right) 12px var(--mobile-left); font-size: clamp(25px, 7vw, 34px); line-height: 1.12; }
  #library .library-results { width: auto; margin-inline: var(--mobile-left) var(--mobile-right); padding: 14px 0 42px; }
  #library .library-series-row { margin-bottom: 12px; background: linear-gradient(135deg, #182a34, #101e28 75%); }
  #library .library-series-summary {
    display: grid; grid-template-columns: auto minmax(0, 1fr) 16px !important; align-items: center;
    column-gap: 12px !important; row-gap: 5px !important; padding: clamp(12px, 3.8vw, 20px) !important;
  }
  #library .library-series-summary > div { display: contents; }
  #library .library-series-art { grid-column: 1; grid-row: 1 / 3; width: clamp(52px, 15vw, 78px) !important; height: auto !important; aspect-ratio: 3 / 4; }
  #library .library-series-summary .library-book-type { grid-column: 2; grid-row: 1; align-self: end; margin: 0; }
  #library .library-series-summary h3 { grid-column: 2; grid-row: 2; align-self: start; margin: 0; font-size: clamp(21px, 5.8vw, 29px) !important; line-height: 1.14; overflow-wrap: break-word; }
  #library .library-series-summary:has(.library-series-art[hidden]) :is(h3, .library-book-type) { grid-column: 1 / 3; }
  #library .library-series-chevron { grid-column: 3; grid-row: 1 / 3; justify-self: end; }
  #library .library-series-summary :is(p, .library-races) { grid-column: 1 / -1; margin: 8px 0 0; }
  #library .library-series-summary p { font-size: 15px; line-height: 1.55; }
  #library .library-series-summary .library-races { gap: 6px 12px; }
  #library .library-series-summary .library-races:empty { display: none; }
  #library .library-series-books { padding: 0 12px !important; }
  #library .library-book .library-book-copy { padding: 15px 2px !important; }
  #library .library-series-books .library-book { margin: 0; padding-block: 16px; }
  #library .library-book .library-cover-art { margin-inline: auto; width: min(100%, 360px) !important; }
  #library .library-book-actions { gap: 8px; }
  .library-details-head h2, .library-detail-copy, .story-head h2 { min-width: 0; }
  body .library-story .story-layout { display: flex; flex-direction: column; gap: 16px; }
  .library-story .story-gallery > img { height: auto; max-height: 42svh; }
  .library-story .story-text { overflow: visible; max-height: none; padding-right: 0; }
  .library-story .story-arrow { width: 44px; height: 44px; }
  body .site-footer { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'about' 'socials' 'sponsors' 'logos'; gap: 18px; padding-inline: var(--mobile-left) var(--mobile-right) !important; }
  .site-footer .footer-socials { justify-self: start; justify-content: flex-start; gap: 4px; }
  .site-footer .sponsor-callout { justify-self: start; text-align: start; }
  .site-footer > a { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (max-width: 900px) {
  /* Keep the book, back button and reading tools in separate usable areas. */
  body .pdf-reader { box-sizing: border-box; height: 100dvh; padding-bottom: calc(48px + var(--mobile-bottom)); }
  body .pdf-reader .reader-back { top: max(4px, env(safe-area-inset-top)); left: max(8px, env(safe-area-inset-left)); }
  body .pdf-reader:not(.reader-controls-hidden) .reader-header {
    min-height: 0; max-height: 29dvh; overflow: auto; justify-content: flex-start; gap: 4px;
    padding: max(6px, env(safe-area-inset-top)) var(--mobile-right) 6px var(--mobile-left) !important;
  }
  body .pdf-reader .reader-header .reader-book-name {
    flex: 0 0 calc(100% - 84px); max-width: none; margin-inline-start: 84px; min-height: 40px; display: grid; align-items: center;
  }
  .pdf-reader .reader-book-name h2 { margin: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; }
  body .pdf-reader :is(.reader-header button, .reader-footer button, .reader-footer input) { min-height: 44px; border-radius: 8px; font-size: 14px; }
  body .pdf-reader .reader-header button { min-width: 44px; }
  body .pdf-reader .reader-body { padding: 4px max(4px, env(safe-area-inset-right)) 4px max(4px, env(safe-area-inset-left)); }
  body .pdf-reader.reader-controls-hidden .reader-body { padding-top: max(48px, calc(44px + env(safe-area-inset-top))); }
  body .pdf-reader .reader-spread { overflow: auto; align-items: safe center; justify-content: safe center; }
  body .pdf-reader .reader-page { max-width: none !important; }
  body .pdf-reader .reader-footer { min-height: 0; gap: 5px 8px !important; justify-content: flex-start; }
  body .pdf-reader .reader-footer #reader-search { flex: 1 1 108px; min-width: 0; max-width: none; }
  body .pdf-reader .reader-pagination { min-width: 0; gap: 8px; }
  body .pdf-reader .reader-pagination button { width: auto; padding-inline: 10px; font: 14px/1.2 Arial, sans-serif; }
  body .pdf-reader .reader-panels-toggle { min-height: 44px; bottom: var(--mobile-bottom) !important; right: var(--mobile-right); font-size: 13px; }
  body .pdf-reader .reader-quiet-count { left: var(--mobile-left); bottom: calc(var(--mobile-bottom) + 13px); transform: none; font-size: 13px; }
  body .pdf-reader .reader-pages-panel { inset: max(54px, env(safe-area-inset-top)) var(--mobile-right) calc(50px + var(--mobile-bottom)) var(--mobile-left); padding: 12px; gap: 8px; }
  .reader-pages-panel > button:first-child { grid-column: 1 / -1; min-height: 44px; }
}

@media (max-width: 900px) and (min-width: 400px) {
  body .news-drawer .ency-nav-strip #site-search-toggle { width: auto !important; gap: 6px; padding-inline: 12px !important; }
  body .news-drawer .ency-nav-strip #site-search-toggle > span { display: inline !important; }
}
@media (max-width: 900px) and (max-height: 500px) {
  body .pdf-reader:not(.reader-controls-hidden) .reader-header .reader-book-name { flex: 0 1 auto; max-width: 23vw; }
  body .pdf-reader .reader-footer { max-height: 25dvh; }
  .mobile-menu-head { margin-bottom: 8px; }
  .mobile-menu-account { min-height: 56px; margin-bottom: 8px; }
  .mobile-menu-search { margin-bottom: 8px; }
}
