.moving-selection{position:relative;isolation:isolate}
.moving-selection>.selection-marker{position:absolute;pointer-events:none;box-sizing:border-box;border:1px solid #ac7183;border-bottom:3px solid #d28fa3;background:linear-gradient(135deg,#71313f30,transparent);z-index:2}
.moving-selection button[aria-pressed=true]{outline:none!important;border-bottom-color:transparent!important;background-color:transparent!important;background-image:none!important;box-shadow:none!important}
.moving-selection.character-grid button[aria-pressed=true]{border-color:transparent!important}
#world-systems .section-rail .moving-selection button[aria-pressed=true]{border-left-color:transparent}
#world-systems .section-rail .moving-selection>.selection-marker{border:0;border-left:3px solid #d28fa3;background:linear-gradient(90deg,#71313f50,transparent);z-index:-1}
.moving-selection button:focus-visible{outline:2px solid #eee!important;outline-offset:-5px}
#research-archive .year-rail>.selection-marker{border:0;background:none;z-index:2}
#research-archive .year-rail>.selection-marker::before{content:'';position:absolute;width:7px;height:7px;top:12px;left:calc(50% - 3.5px);border-radius:50%;background:#fff;box-shadow:0 0 0 5px var(--oxblood)}
#research-archive .year-rail>.selection-marker::after{content:'';position:absolute;bottom:10px;left:25%;width:50%;height:2px;background:#d28fa3}
#research-archive .year-rail button[aria-pressed=true] i{box-shadow:none;background:#8e9493}
#research-archive .year-rail button[aria-pressed=true] span{border-bottom-color:transparent}
.character-card{cursor:pointer;transition:transform 180ms ease,filter 180ms ease}
@media(hover:hover){.character-card:hover{transform:translateY(-3px) scale(1.025);filter:brightness(1.12)}}
.character-card:focus-visible{outline:2px solid #eee;outline-offset:3px}
@media(prefers-reduced-motion:reduce){.character-card{transition:none}.character-card:hover{transform:none}}
.section-rail .faction-rail-menu{display:flex;flex-direction:column;gap:7px;padding:0;margin-top:30px;border:0;background:none}
.section-rail .faction-rail-menu .faction-choice{display:block;width:100%;aspect-ratio:auto;min-height:48px;padding:14px 10px;text-align:left;border:0;border-left:2px solid #485055;background:none;font:18px 'Bebas Neue',sans-serif;letter-spacing:.1em}
.faction-rail-menu .faction-emblem{display:none}
.section-rail .faction-rail-menu>.selection-marker,.section-rail .timeline-period-menu>.selection-marker{border:0;border-left:3px solid #d28fa3;background:linear-gradient(90deg,#71313f50,transparent);z-index:-1}
.section-rail .faction-rail-menu button[aria-pressed=true]{border-left-color:transparent}
@media(max-width:800px){.section-rail .faction-rail-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.section-rail .timeline-period-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}}
#books .book-introduction{display:block}
#books .featured-book{grid-template-columns:minmax(180px,280px) minmax(0,1fr);gap:clamp(24px,4vw,64px);padding:clamp(20px,3vw,40px)}
#books .featured-book>div{max-width:560px}
#books .featured-book h2{font-size:clamp(42px,5vw,68px);margin:14px 0 22px}
#books .featured-book .purchase-note{font-size:13px;margin-top:24px}
#books .book-shelf{grid-template-columns:repeat(4,minmax(0,1fr));gap:28px 20px}
#books .future-cover{aspect-ratio:3/2;max-height:160px;background:linear-gradient(145deg,#23292c,#151b1e)}
#books .future-cover img{width:42px;opacity:.3}
#books .book-tile>strong{border:0;padding:0;font:12px/1.5 'Space Mono',monospace;letter-spacing:0;text-transform:none;color:#aab1b3}
#books .book-tile>h4{margin:6px 0;font-size:22px}
#books .series-archive{padding:28px;margin-top:24px}
@media(max-width:600px){#books .featured-book{grid-template-columns:1fr;gap:24px}#books .featured-cover{max-width:220px;margin:0 auto}#books .book-shelf{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 14px}#books .series-archive{padding:20px}}
#world-systems .system-banner p{max-width:78ch}
#world-systems .system-banner p+p{margin-top:16px}
#world-systems .system-details-panel{display:block;padding:28px;margin-top:18px}
#world-systems .system-details-panel>section{padding:24px 0;margin:0;border:0;border-bottom:1px solid #384044;background:none}
#world-systems .system-details-panel>section:first-child{padding-top:0}
#world-systems .system-details-panel>section:last-child{border-bottom:0;padding-bottom:0}
#world-systems .system-details-panel .system-flow{margin-top:18px}
#world-systems .system-details-panel .system-flow:not(:has(.flow-arrow)){grid-template-columns:repeat(3,minmax(0,1fr))}
#world-systems .system-details-panel .party-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
#world-systems .system-details-panel .party-list>div{padding:0;border:0}
#world-systems .system-details-panel h4{font-size:22px;margin-bottom:8px}
.system-reading{margin-top:20px;max-width:78ch}
.system-reading summary{min-height:44px;padding:12px 0;cursor:pointer;color:#e4b0be;font:18px 'Bebas Neue',sans-serif;letter-spacing:.08em}
.system-reading>div{overflow:hidden;display:flow-root;box-sizing:border-box}
.system-reading .when-open,.system-reading[open] .when-closed{display:none}
.system-reading[open] .when-open{display:inline}
.system-input-label{padding:12px;border:1px solid #394448;font:14px/1.5 'Space Mono',monospace;color:#ccd3d4}
@media(max-width:650px){#world-systems .system-details-panel{padding:20px}#world-systems .system-details-panel .party-list,#world-systems .system-details-panel .system-flow{display:grid;grid-template-columns:1fr!important;gap:18px}#world-systems .system-flow .flow-arrow{transform:rotate(90deg);justify-self:center}}
#world-systems .system-reading{max-width:none;width:100%}
#world-systems .system-reading .system-details-panel{padding:24px 0 0;margin-top:24px;border:0;border-top:1px solid #384044;background:none}
#research-archive .timeline-introduction{min-height:250px;background:linear-gradient(90deg,#10171b66,transparent 65%),url('images/kaylia-timeline-banner-v2.webp') center right/cover no-repeat}
#research-archive .timeline-introduction>div:first-child{max-width:55%;text-shadow:0 2px 8px #000}
.faction-overview{position:relative;min-height:250px;overflow:hidden}
.faction-overview>div:first-child{position:relative;z-index:1;width:65%}
.faction-header-emblem{position:absolute;right:7%;top:50%;transform:translateY(-50%);width:20%;height:165px;object-fit:contain;opacity:.8;pointer-events:none}
@media(max-width:600px){#research-archive .timeline-introduction{background-position:65% center;min-height:230px}#research-archive .timeline-introduction>div:first-child{max-width:68%}.faction-overview>div:first-child{width:72%}.faction-header-emblem{right:4%;width:20%;height:95px;opacity:.65}}
.faction-overview.has-faction-artwork{min-height:300px}
.has-faction-artwork .faction-header-emblem{inset:0;transform:none;width:100%;height:100%;object-fit:cover;object-position:center;opacity:1}
.faction-overview.has-faction-artwork::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#0b1013ed 0%,#0b1013c9 38%,#0b101333 72%,transparent)}
.faction-overview.has-faction-artwork>div:first-child{z-index:2;text-shadow:0 2px 8px #000}
@media(max-width:600px){.faction-overview.has-faction-artwork>div:first-child{width:85%}.has-faction-artwork .faction-header-emblem{object-position:65% center}}

/* Preserve the full composition of faction header artwork. */
.faction-overview.has-faction-artwork{aspect-ratio:2000/717;background-color:#050606}
.has-faction-artwork .faction-header-emblem{object-fit:contain;object-position:center}


#world-systems[data-active-system="politics"] .system-banner {
  background-color:#0b1013;
  background-image:linear-gradient(90deg,rgba(7,11,14,.88),rgba(7,11,14,.60)),url('images/politics-system-background.webp');
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}

#world-systems[data-active-system="aura"] .system-banner {
  background-color:#0b1013;
  background-image:linear-gradient(90deg,rgba(7,11,14,.88),rgba(7,11,14,.60)),url('images/aura-system-background.webp');
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}

#world-systems[data-active-system="hailstones"] .system-banner {
  background-color:#0b1013;
  background-image:linear-gradient(90deg,rgba(7,11,14,.88),rgba(7,11,14,.60)),url('images/hailstones-system-background.webp');
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}

#books .book-introduction[hidden],#books .series-archive[hidden]{display:none}
#books .section-rail .moving-selection>.selection-marker{border:0;border-left:3px solid #d28fa3;background:linear-gradient(90deg,#71313f50,transparent);z-index:-1}
#books .section-rail .moving-selection button[aria-pressed=true]{border-left-color:transparent}
#books .featured-book{grid-template-columns:minmax(0,1fr) minmax(180px,280px);padding:32px;gap:32px;align-items:start}
#books .featured-book>div{grid-column:1;grid-row:1;max-width:78ch}
#books .featured-cover{grid-column:2;grid-row:1;width:100%}
#books .featured-book h2{font-size:56px;letter-spacing:.18em;margin:18px 0}
#books .series-archive{margin-top:0;padding:32px}
@media(max-width:600px){#books .featured-book{grid-template-columns:1fr;padding:20px}#books .featured-book>div,#books .featured-cover{grid-column:1;grid-row:auto}#books .featured-book>div{order:-1}#books .featured-book h2{font-size:42px}#books .series-archive{padding:20px}}

#books #media-books[hidden],#books #media-cinematics[hidden]{display:none}
#books #media-books .series-archive{margin-top:24px}
#books .cinematics-panel{padding:32px;min-height:350px}
#books .cinematics-panel h2{font:56px 'Bebas Neue',sans-serif;letter-spacing:.18em;margin:18px 0}
#books .cinematics-panel p{max-width:78ch;line-height:1.85}
#books .cinematics-empty{margin-top:32px;color:#b7c0c3}
@media(max-width:600px){#books .cinematics-panel{padding:20px;min-height:280px}#books .cinematics-panel h2{font-size:42px}}

/* Keep the media switch from triggering scroll anchoring or competing transitions. */
#books .books-content{align-self:start;overflow-anchor:none}
#books #media-books,#books #media-cinematics{transition:none;animation:none}

#books .featured-book{grid-template-columns:minmax(0,1fr) minmax(220px,340px);align-items:center;gap:clamp(24px,4vw,56px)}
#books .featured-book>div{max-width:54ch}
#books .compact-series{background:none;border:0;border-top:1px solid var(--rule);padding:22px 0;margin-top:24px}
#books .compact-series>p{margin:0 0 10px;color:#b7c0c3;font-size:14px;line-height:1.7}
#books .series-disclosure summary{cursor:pointer;color:#e4b0be;min-height:44px;padding:12px 0;font:18px 'Bebas Neue',sans-serif;letter-spacing:.08em}
#books .series-disclosure summary:focus-visible{outline:2px solid #eee;outline-offset:4px}
#books .series-disclosure ol{columns:2;max-width:650px;padding-left:30px;margin:14px 0;line-height:2.2}
#books .series-disclosure li{break-inside:avoid;padding-left:8px;color:#bbc4c6}
#books .series-disclosure li:first-child{color:#fff;font-weight:700}
#books .cinematic-record{margin-top:28px;max-width:960px}
#books .cinematic-record h3{font:26px 'Bebas Neue',sans-serif;letter-spacing:.12em;margin-bottom:14px}
#books .cinematic-record video{display:block;width:100%;aspect-ratio:16/9;background:#050708;object-fit:contain;border:1px solid var(--rule)}
@media(max-width:600px){#books .featured-book{grid-template-columns:1fr}#books .featured-cover{max-width:260px}#books .series-disclosure ol{columns:1}}

#books .expanded-book-shelf{margin-top:24px;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px 20px}
#books .expanded-book-shelf .future-cover,#books .series-origins-cover{aspect-ratio:2/3;max-height:none;display:flex;align-items:center;justify-content:center;overflow:hidden}
#books .series-origins-cover img{width:100%;height:100%;object-fit:contain}
#books .expanded-book-shelf .book-tile>span{display:block;margin-top:12px}
@media(min-width:601px){#books .featured-book>.featured-cover{grid-column:2;grid-row:1}#books .featured-book>div{grid-column:1;grid-row:1}}
@media(max-width:600px){#books .expanded-book-shelf{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* One book feature: cover left, story and shop destination right. */
#books #featured-book{display:grid;grid-template-columns:minmax(220px,340px) minmax(0,1fr);align-items:center;gap:clamp(28px,4vw,64px)}
#books #featured-book>.featured-cover{grid-column:1;grid-row:1;width:100%;max-width:340px;margin:0;order:0}
#books #featured-book>.featured-story{grid-column:2;grid-row:1;max-width:54ch;min-width:0;order:0}
#books #featured-book .featured-purchase{margin-top:28px;padding:0;border:0;display:flex;flex-direction:column;align-items:flex-start;gap:14px}
#books #featured-book .book-shop-button{font-size:20px;letter-spacing:.08em;text-align:center;max-width:100%;box-sizing:border-box}
#books #featured-book .purchase-note{margin:0;font-size:12px;line-height:1.7;color:var(--quiet)}
@media(max-width:700px){
 #books #featured-book{grid-template-columns:minmax(0,1fr);gap:28px}
 #books #featured-book>.featured-cover{grid-column:1;grid-row:1;max-width:280px;justify-self:center}
 #books #featured-book>.featured-story{grid-column:1;grid-row:2;max-width:none}
 #books #featured-book .featured-purchase{margin-top:24px}
}/* Cinema feature: poster and free trailer beside film and ticket details. */
#books .movie-feature{display:grid;grid-template-columns:minmax(220px,340px) minmax(0,1fr);gap:clamp(28px,4vw,64px);align-items:start;margin-top:24px}#books .movie-visuals,#books .movie-copy{min-width:0}#books .movie-poster{display:block;width:100%;height:auto;border:1px solid var(--accent)}#books .movie-copy{padding-top:32px}#books .movie-copy h2{margin:18px 0 24px}#books .movie-copy>p{font:16px/1.85 Arial,sans-serif;color:#cbd2d3}
#books .movie-ticket-button{display:inline-flex;padding:14px 22px;margin-top:28px;border:1px solid var(--accent-bright);background:var(--oxblood);color:var(--ice);font:20px/1.2 'Bebas Neue',sans-serif;letter-spacing:.08em;text-decoration:none;max-width:100%;box-sizing:border-box}#books .movie-ticket-button:hover{background:var(--accent)}#books .movie-ticket-button:focus-visible{outline:2px solid var(--ice);outline-offset:4px}#books .movie-copy .movie-availability{font:12px/1.7 'Space Mono',monospace;color:var(--quiet);margin-top:14px}
#books .movie-facts{display:grid;grid-template-columns:1fr 1fr;gap:24px;padding:24px;margin:28px 0;border:1px solid var(--rule);background:var(--surface-deep)}#books .movie-facts dt{font:11px 'Space Mono',monospace;color:var(--quiet);margin-bottom:8px}#books .movie-facts dd{margin:0;font:15px/1.5 Arial,sans-serif;color:var(--ice)}#books .movie-trailer-link{font:16px 'Bebas Neue',sans-serif;letter-spacing:.1em;color:var(--accent-bright);text-underline-offset:5px}#avalanche-trailer-title{scroll-margin-top:150px}#books .movie-visuals .cinematic-record{margin-top:24px}#books .movie-visuals .cinematic-record h3{font-size:23px}#books .movie-visuals .ai-film-note{font-size:10px;line-height:1.7}
@media(max-width:700px){#books .movie-feature{grid-template-columns:minmax(0,1fr);gap:24px}#books .movie-visuals{display:contents}#books .movie-poster{grid-row:1;max-width:280px;justify-self:center}#books .movie-copy{grid-row:2;padding-top:0}#books .movie-visuals .cinematic-record{grid-row:3;margin-top:0}#books .movie-facts{padding:18px;gap:20px 12px}}
/* Carter Case: gallery, demo and full-version entry in the Avalanche archive. */
#books .carter-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:24px 0}#books .carter-heading h2{font-size:clamp(32px,4vw,52px);letter-spacing:.08em;margin:12px 0}.carter-rating{flex-shrink:0}.carter-rating fieldset{border:0;padding:0;margin:8px 0;display:flex;gap:7px}.rating-legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.carter-rating label{position:relative;cursor:pointer;color:#727c7e;font-size:26px}.carter-rating input{position:absolute;opacity:0;width:100%;height:100%;inset:0;cursor:pointer}.carter-rating label.is-rated{color:var(--accent-bright)}.carter-rating label:has(input:focus-visible){outline:2px solid var(--ice);outline-offset:3px}#books .rating-status{font:11px/1.5 'Space Mono',monospace;color:var(--quiet);margin:0}
.carter-showcase{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(240px,1fr);gap:24px}.carter-gallery{min-width:0}.carter-gallery figure{margin:0}.carter-gallery figure>img{width:100%;aspect-ratio:16/10;object-fit:cover;display:block;border:1px solid var(--rule)}.carter-gallery figcaption{font:11px/1.7 'Space Mono',monospace;color:var(--quiet);padding:10px 0}.carter-thumbnails{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.carter-thumbnails button{padding:0;border:1px solid var(--rule);background:var(--surface);cursor:pointer}.carter-thumbnails button[aria-pressed=true]{border-color:var(--accent-bright);outline:1px solid var(--accent-bright)}.carter-thumbnails button:focus-visible{outline:2px solid var(--ice);outline-offset:3px}.carter-thumbnails img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover}.carter-key-art{width:100%;aspect-ratio:16/7;object-fit:cover;display:block;margin-bottom:20px;border:1px solid var(--rule)}
#books .carter-summary h3,#books .carter-actions h3{font:28px/1.15 'Bebas Neue',sans-serif;letter-spacing:.07em;margin:14px 0}#books .carter-summary p,#books .carter-actions p{font:14px/1.8 Arial,sans-serif;color:#cbd2d3}.carter-summary dl{margin:22px 0;display:grid;gap:12px}.carter-summary dl>div{display:grid;grid-template-columns:70px 1fr;gap:12px}.carter-summary dt{font:11px/1.7 'Space Mono',monospace;color:var(--quiet)}.carter-summary dd{margin:0;font:12px/1.7 Arial,sans-serif}.carter-tags{display:flex;gap:6px;flex-wrap:wrap}.carter-tags span{font:10px/1.5 'Space Mono',monospace;padding:5px 8px;border:1px solid var(--rule);color:var(--quiet)}.carter-actions{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:28px}.carter-actions>div{border:1px solid var(--rule);padding:24px;background:var(--surface)}.carter-primary,.carter-store{display:inline-block;margin-top:18px;padding:13px 18px;font:17px/1.3 'Bebas Neue',sans-serif;letter-spacing:.08em;text-decoration:none;border:1px solid var(--accent-bright);color:var(--ice)}.carter-primary{background:var(--oxblood)}.carter-primary:hover,.carter-store:hover{background:var(--accent)}.carter-primary:focus-visible,.carter-store:focus-visible{outline:2px solid var(--ice);outline-offset:4px}#books .carter-rating-note{font:11px/1.7 'Space Mono',monospace;color:var(--quiet);margin-top:20px}
@media(max-width:1000px){.carter-showcase{grid-template-columns:1fr}.carter-key-art{display:none}}@media(max-width:650px){#books .carter-heading{flex-direction:column;align-items:flex-start}.carter-actions{grid-template-columns:1fr}.carter-actions>div{padding:18px}.carter-thumbnails{gap:6px}}
