/* Shared frame; loaded last. Domain data and article styles remain independent. */
:root { --shell-index-width:15.5rem; --shell-gap:1rem; --shell-frame-inset:16px; }
/* Lagebild: a single editorial opening, no nested scroller or navigation cards.
   Natural height is intentional: short/zoomed windows never lose the ending. */
body.shell-ready[data-route="overview"] .workspace { --overview-inset:clamp(8px,1.6dvh,16px); --overview-pad-y:clamp(12px,2dvh,22px); --overview-pad-x:clamp(16px,1.6vw,28px); padding:var(--overview-inset) clamp(12px,1.4vw,20px); }
#routeContent .overview-opening { display:flex; flex-direction:column; min-width:0; min-height:calc(100dvh - var(--topbar-h) - 2 * var(--overview-inset)); margin:0; border:1px solid #9fc4ca; border-radius:12px; background:#fffdf8; color:#183f48; }
#routeContent .overview-masthead { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:var(--overview-pad-y) var(--overview-pad-x); border-radius:11px 11px 0 0; background:#183f48; color:#fffdf8; }
#routeContent .overview-masthead h1 { margin:0; color:inherit; font:700 clamp(2.625rem,min(4.35vw,8dvh),4.625rem)/1 var(--font-editorial); letter-spacing:.035em; }
#routeContent .overview-subtitle { margin:10px 0 0; color:#fffdf8; font:400 clamp(1.1rem,1.5vw,1.5rem)/1.35 var(--font-editorial); }
#routeContent .overview-numbers { display:flex; flex-shrink:0; gap:28px; margin:0; }
#routeContent .overview-numbers > div { display:flex; flex-direction:column-reverse; }
#routeContent .overview-numbers dt { color:#dcecee; font:400 .75rem/1.5 var(--font-ui); }
#routeContent .overview-numbers dd { margin:0; color:#efc77d; font:700 clamp(1.5rem,2.5vw,2.5rem)/1.25 var(--font-editorial); font-variant-numeric:tabular-nums; }
#routeContent .overview-main { display:grid; grid-template-columns:minmax(0,1fr) clamp(11rem,15vw,14.375rem); align-content:center; flex:1 0 auto; gap:clamp(16px,1.6vw,28px); padding:var(--overview-pad-y) var(--overview-pad-x); }
#routeContent .overview-narrative { min-width:0; }
#routeContent .overview-lead { margin:0 0 clamp(8px,1dvh,12px); font:700 1.125rem/1.4 var(--font-editorial); color:#183f48; }
#routeContent .overview-prose { columns:2; column-gap:clamp(16px,1.6vw,28px); }
#routeContent .overview-prose > :is(p,.overview-closing) { break-inside:avoid; margin:0 0 12px; }
#routeContent .overview-prose p { margin:0; font:400 1rem/1.5 var(--font-ui); color:#3c4b54; }
#routeContent .overview-prose .overview-stayforever-link,
#routeContent .overview-prose .overview-stayforever-link:visited { color:#2f7259; text-decoration:underline; text-decoration-thickness:.08em; text-underline-offset:.18em; }
#routeContent .overview-prose .overview-stayforever-link:is(:hover,:focus-visible) { color:#245d48; text-decoration-thickness:.12em; }
#routeContent .overview-prose .overview-stayforever-link:focus-visible { outline:2px solid #245d48; outline-offset:3px; border-radius:2px; }
#routeContent .overview-closing p + p { margin-top:12px; }
#routeContent .overview-credits { border-left:1px solid #9fc4ca; padding-left:clamp(12px,1.2vw,24px); }
#routeContent .overview-credits h2 { margin:0 0 10px; font:700 1.25rem/1.2 var(--font-editorial); }
#routeContent .overview-credits dl { display:grid; gap:clamp(6px,1dvh,10px); margin:0; }
#routeContent .overview-credits dt { font:700 .9375rem/1.4 var(--font-ui); }
#routeContent .overview-credits dd { margin:1px 0 0; color:#3c4b54; font:400 .8125rem/1.4 var(--font-ui); }
#routeContent .overview-credits > p { margin:10px 0 0; color:#3c4b54; font:400 .75rem/1.4 var(--font-ui); }
#routeContent .overview-files { --overview-files-pad-x:var(--overview-pad-x); border-top:1px solid #9fc4ca; padding:clamp(8px,1.2dvh,12px) var(--overview-files-pad-x) 0; }
#routeContent .overview-files dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 28px; margin:0; }
#routeContent .overview-files dt { display:flex; flex-wrap:wrap; gap:4px 12px; font:700 .8125rem/1.4 var(--font-code); }
#routeContent .overview-files dt span { font:400 .8125rem/1.4 var(--font-ui); font-variant-numeric:tabular-nums; }
#routeContent .overview-files dd, #routeContent .overview-files > p { margin:3px 0 0; color:#3c4b54; font:400 .75rem/1.4 var(--font-ui); }
#routeContent .overview-files > p { margin-top:8px; }
#routeContent .overview-legal { display:grid; grid-template-columns:minmax(0,1fr) max-content; align-items:center; gap:10px 24px; margin:10px calc(-1 * var(--overview-files-pad-x)) 0; padding:11px var(--overview-files-pad-x) 12px; border-top:1px solid #2e6872; border-radius:0 0 11px 11px; color:#dcecee; background:#183f48; font:400 .8125rem/1.5 var(--font-ui); }
#routeContent .overview-legal-item { min-width:0; margin:0; font:inherit; overflow-wrap:anywhere; }
#routeContent .overview-legal-item :is(span,a) { font-size:inherit; line-height:inherit; font-family:inherit; }
#routeContent .overview-legal-author { justify-self:start; }
#routeContent .overview-legal-links { display:flex; flex-wrap:wrap; justify-self:end; justify-content:flex-end; align-items:baseline; gap:4px 7px; min-width:0; text-align:right; }
#routeContent .overview-legal-publisher,
#routeContent .overview-legal-stayforever { display:inline-flex; align-items:center; gap:5px; }
#routeContent .overview-legal-stayforever img { display:block; width:24px; height:24px; flex:0 0 24px; object-fit:contain; }
#routeContent .overview-legal-separator { color:#efc77d; font-weight:700; }
#routeContent .overview-legal a,
#routeContent .overview-legal a:visited { color:#efc77d; font-weight:650; text-decoration:underline; text-decoration-thickness:.08em; text-underline-offset:.18em; }
#routeContent .overview-legal a:is(:hover,:focus-visible) { color:#ffdfa2; text-decoration-thickness:.12em; }
#routeContent .overview-legal a:focus-visible { outline:2px solid #efc77d; outline-offset:3px; border-radius:2px; }
@media(max-width:950px) {
  #routeContent .overview-main { grid-template-columns:minmax(0,1fr); }
  #routeContent .overview-credits { border-left:0; border-top:1px solid #9fc4ca; padding:12px 0 0; }
  #routeContent .overview-credits dl { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #routeContent .overview-legal { grid-template-columns:minmax(0,1fr); }
  #routeContent .overview-legal-links { justify-self:start; justify-content:flex-start; text-align:left; }
}
@media(max-width:700px) {
  #routeContent .overview-prose { columns:1; }
  #routeContent .overview-masthead { flex-wrap:wrap; }
  #routeContent .overview-main { grid-template-columns:minmax(0,1fr); }
  #routeContent .overview-masthead, #routeContent .overview-main { padding:20px; }
  #routeContent .overview-files { --overview-files-pad-x:20px; padding:20px var(--overview-files-pad-x) 0; }
  #routeContent .overview-credits { border-left:0; border-top:1px solid #9fc4ca; padding:20px 0 0; }
  #routeContent .overview-credits h2 br { display:none; }
  #routeContent .overview-credits dl { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  #routeContent .overview-files dl { grid-template-columns:minmax(0,1fr); }
  #routeContent .overview-legal { gap:8px; }
}
@media print {
  #routeContent .overview-opening { min-height:0; border:0; }
  #routeContent .overview-masthead { background:white; color:black; }
  #routeContent .overview-masthead :is(p,dt,dd) { color:black; }
  #routeContent .overview-main { display:block; }
  #routeContent .overview-prose { columns:1; }
  #routeContent .overview-credits { margin-top:20px; border:0; padding:0; }
  #routeContent .overview-legal { color:black; border-color:#888; background:white; }
  #routeContent .overview-legal :is(span,a,a:visited) { color:black; }
}
/* Off-canvas sheets must not widen the page. Unlike hidden, clip does not
   introduce a scrolling ancestor that breaks the sticky register layouts. */
html:has(.shell-ready), body.shell-ready { overflow-x:clip; }
body.shell-ready .topbar { height:auto; min-height:64px; display:flex; gap:12px; padding:8px 20px; background:#183f48; }
body.shell-ready .brand-kicker { display:none; }
body.shell-ready .brand-block { flex:0 1 auto; }
body.shell-ready .brand-block strong { display:block; white-space:nowrap; overflow:visible; font:700 clamp(.625rem,1vw,.75rem)/1.4 var(--font-ui); letter-spacing:.035em; }
body.shell-ready .brand-name { color:#fffdf8; }
body.shell-ready .brand-meta { color:#efc77d; }
body.shell-ready .shell-menu { min-height:44px; flex-shrink:0; font-size:.9375rem; }
body.shell-ready .global-search-area { position:relative; inset:auto; display:block; flex:1 1 280px; max-width:500px; margin-left:auto; }
body.shell-ready .global-search input { min-height:44px; height:auto; padding:10px 40px 10px 12px; font-size:1rem; }
body.shell-ready #searchToggle { display:none; }
body.shell-ready .search-results { max-height:min(60dvh,calc(100dvh - var(--topbar-h) - 16px)); }
body.shell-ready .primary-nav { top:calc(var(--topbar-h) + 8px); bottom:auto; left:12px; width:min(330px,calc(100vw - 24px)); max-height:calc(100dvh - var(--topbar-h) - 20px); padding:8px; border:1px solid #9fc4ca; border-radius:12px; visibility:hidden; transform:none; box-shadow:0 12px 30px #16232c30; background:#fffdf8; }
body.shell-ready.nav-open .primary-nav { visibility:visible; transform:none; }
body.shell-ready .primary-nav > a { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:44px; padding:10px 12px; color:#16232c; font:650 .9375rem/1.4 var(--font-ui); overflow-wrap:anywhere; }
body.shell-ready .primary-nav > a:hover { background:#dcecee; color:#16525d; }
/* Outrank the legacy route-specific white gradient, including hover/focus.
   Selection is a complete surface, not an inset border on the pale menu. */
body.shell-ready #primaryNav > a:is(.active,[aria-current="page"]) {
  background:#183f48; color:#fffdf8; box-shadow:none;
}
body.shell-ready #primaryNav > a:is(.active,[aria-current="page"]) > span { color:inherit; }
body.shell-ready #primaryNav > a .nav-game-chip {
  flex:0 0 auto; padding:2px 7px; border:1px solid #c28c32; border-radius:999px;
  color:#805516; background:#f8edcf; font:800 .625rem/1.35 var(--font-ui); letter-spacing:.08em;
}
body.shell-ready #primaryNav > a:is(.active,[aria-current="page"]) .nav-game-chip {
  color:#183f48; background:#efc77d; border-color:#efc77d;
}
body.shell-ready .nav-evidence > summary, body.shell-ready .nav-evidence-copy { color:#3c4b54; }
body.shell-ready .app-shell { height:auto; min-height:100dvh; padding-top:var(--topbar-h); }
body.shell-ready[data-route="timeline"] { height:auto; min-height:100dvh; overflow:visible; }
body.shell-ready[data-route="timeline"] #routeContent { display:block; height:auto; }
body.shell-ready .workspace { margin:0; width:100%; max-width:none; height:auto; min-height:0; padding:12px 20px 24px; overflow:visible; }
.shell-context { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:12px; }
#shellView { min-height:44px; max-width:100%; padding:8px 12px; color:#16525d; background:#fffdf8; border:1px solid #9fc4ca; border-radius:10px; font:600 .9375rem/1.4 var(--font-ui); }
body.shell-ready:not([data-route="overview"]) #routeContent > .page-head { min-height:0; height:auto; padding:12px 16px; margin-bottom:16px; }
body.shell-ready:not([data-route="overview"]) #routeContent > .page-head .page-title { font:700 clamp(1.5rem,2vw,1.75rem)/1.3 var(--font-editorial); }
body.shell-ready:not([data-route="overview"]) #routeContent > .page-head .page-kicker,
body.shell-ready:not([data-route="overview"]) #routeContent > .page-head::after,
body.shell-ready .page-lead:empty { display:none; }
body.shell-ready .shell-register-layout { grid-template-columns:var(--shell-index-width) minmax(0,1fr); }
body.shell-ready .shell-index { min-width:0; }
body.shell-ready .shell-index .filter-row:has(> input[hidden]):not(:has(select)) { display:none; }
/* RD-01: two sibling surfaces; bounded desktop reader, compact page-flow fallback. */
body.shell-ready[data-route="rooms"] .room-register { display:grid; align-items:start; gap:var(--shell-gap); height:auto; min-height:0; overflow:visible; background:transparent; border:0; box-shadow:none; }
body.shell-ready[data-route="rooms"] .room-register > .register-list { position:sticky; top:calc(var(--topbar-h) + 16px); display:flex; flex-direction:column; min-height:0; max-height:calc(100dvh - var(--topbar-h) - 32px); padding:8px; border:1px solid #9fc4ca; border-radius:12px; overflow:hidden; }
body.shell-ready #roomRegisterList { display:block; min-height:0; overflow:auto; scrollbar-gutter:stable; }
body.shell-ready .room-mobile-picker { display:none; }
body.shell-ready .room-index-title, body.shell-ready #objectIndexTitle, body.shell-ready #figureIndexTitle, body.shell-ready #dialogueIndexTitle { display:block; margin:0; padding:4px 12px; color:var(--route-deep); font:700 var(--type-detail-title)/1.25 var(--font-editorial); overflow-wrap:anywhere; }
body.shell-ready :is(#roomPlanet,#objectCategory,#actorCategory,#relationCategory) { width:100%; min-width:0; min-height:44px; padding:8px 12px; color:#16525d; background:#fffdf8; border:1px solid #9fc4ca; border-radius:10px; font:600 .9375rem/1.4 var(--font-ui); }
body.shell-ready :is(.room-register,.actor-register,.relation-register) .filter-row { display:grid; gap:10px; flex:0 0 auto; padding:8px; }
body.shell-ready :is(.room-register,.actor-register,.relation-register) :is(#shellViewLabel,#shellView,input[type="search"]) { width:100%; min-width:0; }
body.shell-ready :is(#roomFilter,#actorFilter,#relationFilter,#objectFilter) { min-height:44px; padding:8px 12px; font:400 .9375rem/1.4 var(--font-ui); }
body.shell-ready #roomRegisterList button { grid-template-columns:3ch minmax(0,1fr); align-items:start; min-height:44px; font:650 .9375rem/1.4 var(--font-ui); }
body.shell-ready #roomRegisterList button strong { font:inherit; font-family:var(--font-code); }
body.shell-ready #roomRegisterContent { display:block; min-width:0; height:auto; overflow:visible; border:1px solid #9fc4ca; border-radius:12px; background:#fffdf8; padding:0; }
body.shell-ready .room-reading-head { position:static; padding:16px 20px; flex-wrap:wrap; }
body.shell-ready .room-reading-body { display:block; height:auto; max-height:none; overflow:visible; padding:20px; }
body.shell-ready .room-reading-tabs { position:static; z-index:5; }
.shell-tab-picker { display:block; padding:8px 12px; background:#dcecee; border-bottom:1px solid #9fc4ca; }
.shell-tab-picker select { width:100%; min-height:44px; border:1px solid #9fc4ca; border-radius:10px; padding:8px 12px; color:#16525d; background:#fffdf8; font:600 .9375rem/1.4 var(--font-ui); }
body.shell-ready .shell-tab-strip { display:flex; flex-wrap:nowrap; overflow:visible; min-width:0; }
body.shell-ready .shell-tab-strip > :is(button,a) { flex:0 0 auto; white-space:nowrap; min-height:44px; }
body.shell-ready .evidence-row { display:inline-flex; vertical-align:middle; margin-inline:4px; }
body.shell-ready .tab-count { min-width:22px; width:auto; min-height:22px; padding:2px 5px; font-size:.75rem; }
/* Atlas keeps a bounded map surface; only the detail sheet scrolls its text. */
body.shell-ready.route-atlas #routeContent { display:block; height:auto; overflow:visible; }
body.shell-ready.route-atlas .atlas-shell { width:100%; height:calc(100dvh - var(--topbar-h) - 36px); min-height:340px; max-height:none; }
body.shell-ready .atlas-viewport { min-height:240px; }
body.shell-ready .atlas-toolbar { display:grid; grid-template-columns:max-content minmax(0,1fr); align-items:start; gap:16px; padding:16px; overflow:visible; }
body.shell-ready .atlas-toolbar > div { min-width:0; }
body.shell-ready .atlas-tab-rows { display:grid; gap:16px; }
body.shell-ready .atlas-toolbar .atlas-tabs + .atlas-tabs { margin-top:0; }
body.shell-ready .atlas-toolbar .shell-tab-picker { padding:0; border:0; background:transparent; }
body.shell-ready .atlas-toolbar #shellViewLabel { min-width:0; }
body.shell-ready .inspector { z-index:100; }
/* Keep the room layout and pixels until the closing transform has finished. */
body.shell-ready.room-inspector-closing .inspector[aria-hidden="true"] { visibility:visible; pointer-events:none; }
body.shell-ready.room-inspector-open .inspector { top:0; bottom:0; width:min(680px,100vw); max-width:100%; height:100dvh; display:flex; flex-direction:column; }
body.shell-ready.room-inspector-open .inspector-head { flex:0 0 auto; padding:16px 20px; }
body.shell-ready.room-inspector-open #inspectorTabs { flex:0 0 auto; }
body.shell-ready.room-inspector-open #inspectorBody { flex:1 1 auto; min-height:0; height:auto; overflow:auto; padding:20px; }
.shell-inspector-footer { flex:0 0 auto; padding:12px 20px; border-top:1px solid #9fc4ca; background:#fffdf8; }
body.shell-ready.room-sheet-modal::before { content:""; position:fixed; inset:0; z-index:95; background:#16232c55; }
body.shell-ready.room-inspector-open { overflow:hidden; }
body.shell-ready.atlas-inspector-open .atlas-viewport { padding-right:0; }
/* The atlas sheet has one stable frame, both open and closed. Visibility and
   slide position follow its own state, not only legacy body layout classes. */
body.shell-ready[data-route="atlas"] #inspector {
  position:fixed; z-index:100; top:calc(var(--topbar-h) + 12px); right:0; bottom:12px;
  width:min(560px,100vw); max-width:100%; height:auto;
  display:flex; flex-direction:column; min-height:0;
  border:1px solid var(--route-line); border-right:0; border-radius:12px 0 0 12px;
  background:#fffdf8; box-shadow:-6px 4px 20px #16232c18;
  overflow:hidden; transform:translateX(105%); transition:transform .5s ease-in-out;
}
body.shell-ready[data-route="atlas"] #inspector[aria-hidden="false"] {
  transform:translateX(0); visibility:visible; pointer-events:auto;
}
body.shell-ready[data-route="atlas"] #inspector .inspector-head {
  background:#fffdf8; border-bottom:1px solid var(--route-line);
}
body.shell-ready[data-route="atlas"] #inspectorClose {
  color:var(--route-accent-ink); background:#fffdf8; border-color:var(--route-line);
}
body.shell-ready[data-route="atlas"] #inspectorClose:is(:hover,:focus-visible) {
  color:#fffdf8; background:var(--route-deep); outline-color:var(--route-accent);
}
@media (max-width:680px) {
  body.shell-ready[data-route="atlas"] #inspector { top:0; bottom:0; width:100%; border-radius:0; }
}
@media (prefers-reduced-motion:reduce) {
  body.shell-ready[data-route="atlas"] #inspector { transition:none; }
}
/* RG-01/RD-01 opt-in components. Figures and objects share the layout roles.
   #routeContent scopes these rules away from previews and outranks legacy readers. */
body.shell-ready #routeContent .rg-frame { display:grid; grid-template-columns:var(--shell-index-width) minmax(0,1fr); grid-template-rows:none; gap:var(--shell-gap); align-items:start; height:auto; min-height:0; overflow:visible; border:0; background:transparent; box-shadow:none; }
body.shell-ready #routeContent .rg-frame .rg-sidebar { display:flex; flex-direction:column; min-width:0; min-height:0; max-height:none; padding:0; border:1px solid var(--route-line); border-radius:12px; overflow:hidden; background:linear-gradient(180deg,var(--route-soft),#faf7f0 190px); }
body.shell-ready #routeContent .rg-frame .rg-head { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; flex:0 0 auto; margin:0; padding:12px 8px 10px; border-bottom:1px solid var(--route-line); background:#fffdf7d9; backdrop-filter:blur(7px); }
body.shell-ready[data-route="walkthrough"] #routeContent .walk-validation-note { margin:0; padding:0 4px; color:var(--gold-ink); font:800 .8125rem/1.4 var(--font-ui); letter-spacing:.04em; text-align:center; text-transform:uppercase; }
body.shell-ready #routeContent .rg-frame .rg-head h2 { margin:0; padding:4px 12px; color:var(--route-deep); font:700 var(--type-detail-title)/1.25 var(--font-editorial); overflow-wrap:anywhere; }
body.shell-ready #routeContent .rg-frame .rg-head .rg-title-single-line { font-size:1.5rem; white-space:nowrap; overflow-wrap:normal; }
body.shell-ready :is(.room-index-title,#objectIndexTitle,#figureIndexTitle).spielregister-title,
body.shell-ready #routeContent .rg-frame .rg-head .spielregister-title { font-size:1.125rem; line-height:1.25; white-space:nowrap; overflow-wrap:normal; }
body.shell-ready #figureIndexTitle.spielregister-title-long,
body.shell-ready #routeContent .rg-frame .rg-head .spielregister-title-long { font-size:.9375rem; letter-spacing:-.01em; }
body.shell-ready #figureIndexTitle.spielregister-title-extra-long,
body.shell-ready #routeContent .rg-frame .rg-head .spielregister-title-extra-long { font-size:.8125rem; letter-spacing:-.015em; }
body.shell-ready #routeContent .rg-frame .rg-head .rg-title-long-single-line { font-size:1.125rem; white-space:nowrap; overflow-wrap:normal; }
body.shell-ready #routeContent .rg-frame .rg-head :is(input,select),
body.shell-ready #routeContent .rg-frame .rg-picker select { width:100%; min-width:0; min-height:44px; margin:0; padding:8px 12px; color:var(--route-accent-ink); background:#fffdf8; border:1px solid var(--route-line); border-radius:10px; font:600 var(--type-ui)/1.4 var(--font-ui); }
body.shell-ready #routeContent .rg-frame .rg-head input { color:var(--ink); font-weight:400; }
body.shell-ready #routeContent .rg-frame .rg-head input::placeholder { color:var(--ink-soft); opacity:1; }
body.shell-ready #routeContent .rg-frame .rg-head :is(input,select):focus { border-color:var(--route-accent); }
body.shell-ready #routeContent .rg-frame .rg-head [role="status"] { grid-row:auto; margin:0; padding:0; font:400 var(--type-small)/1.6 var(--font-ui); }
body.shell-ready #routeContent .rg-frame .rg-list { display:block; flex:1 1 0; min-height:0; padding:8px; overflow:auto; scrollbar-gutter:stable; overscroll-behavior-y:auto; }
body.shell-ready #routeContent .rg-frame .rg-list > :is(button,a) { display:grid; grid-template-columns:var(--rg-id-width,3ch) minmax(0,1fr); align-items:start; gap:10px; width:100%; min-height:44px; margin:2px 0; padding:10px; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--ink); box-shadow:none; font:650 var(--type-ui)/1.4 var(--font-ui); text-align:left; text-decoration:none; }
body.shell-ready #routeContent .rg-frame .rg-list-named > :is(button,a) { grid-template-columns:minmax(0,1fr); }
body.shell-ready #routeContent .rg-frame .rg-list :is(button strong,a .obj-id) { min-width:0; color:var(--route-accent-ink); font:650 var(--type-ui)/1.4 var(--font-code); font-variant-numeric:tabular-nums; white-space:nowrap; }
body.shell-ready #routeContent .rg-frame .rg-list button span { min-width:0; overflow-wrap:anywhere; }
body.shell-ready #routeContent .rg-frame .rg-list > :is(button,a):hover { background:#ffffffbd; border-color:var(--route-line); }
body.shell-ready #routeContent .rg-frame .rg-list > :is(button,a).active { background:var(--route-deep); border-color:var(--route-deep); color:#fff; box-shadow:inset 4px 0 var(--route-accent),0 5px 14px #16232c20; }
body.shell-ready #routeContent .rg-frame .rg-list :is(button.active strong,a.active .obj-id) { color:#fff2cb; }
body.shell-ready #routeContent .rg-frame :is(.rg-sidebar,.rd-tabs) :is(button,a,input,select):focus-visible { outline:3px solid var(--route-accent); outline-offset:2px; }
body.shell-ready #routeContent .rg-frame .rg-picker { display:none; padding:12px 8px; }
body.shell-ready #routeContent .rg-frame .rd-surface { min-width:0; min-height:0; height:auto; padding:0; border:1px solid var(--route-line); border-radius:12px; background:#fffdf8; overflow:visible; scrollbar-gutter:auto; }
body.shell-ready #routeContent .rg-frame .rd-reader { display:flex; flex-direction:column; min-width:0; min-height:0; height:auto; padding:0; overflow:visible; }
body.shell-ready #routeContent .rg-frame .rd-head { display:flex; flex:0 0 auto; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; position:static; margin:0; padding:16px 20px; background:transparent; }
body.shell-ready #routeContent .rg-frame .rd-head h2 { margin:0; color:var(--route-deep); font:700 var(--type-detail-title)/1.25 var(--font-editorial); overflow-wrap:anywhere; }
body.shell-ready #routeContent .rg-frame .rd-title-group { min-width:0; }
body.shell-ready #routeContent .rg-frame .rd-title-group h2 { margin-top:8px; }
body.shell-ready #routeContent .rg-frame .rd-title-group > .badge { line-height:1.4; }
/* RD-01 3.1: the same identity roles in all four Spielregister readers. */
#spielregisterDetail .rd-register-label { margin:0 0 8px; color:var(--inter-copper-ink); font:800 var(--type-caption)/1.4 var(--font-ui); letter-spacing:.095em; text-transform:uppercase; overflow-wrap:anywhere; }
#spielregisterDetail .rd-register-badges { display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin:0; padding:0; }
#spielregisterDetail .rd-register-badge { display:inline-flex; align-items:center; max-width:100%; margin:0; padding:4px 8px; border:1px solid var(--route-line); border-radius:99px; color:var(--route-accent-ink); background:var(--route-soft); font:800 var(--type-caption)/1.4 var(--font-ui); letter-spacing:.03em; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; cursor:default; }
#spielregisterDetail .rd-register-badge.is-known { border-color:#b1c3b8; color:#355a44; background:#edf3ee; }
#spielregisterDetail .rd-register-badge.is-unknown { border-style:dashed; border-color:#b49b84; color:#775237; background:#f6efe7; }
body.shell-ready #routeContent .rg-frame .rd-head-summary { max-width:75ch; margin:6px 0 0; color:var(--ink-soft); font:400 var(--type-small)/1.5 var(--font-ui); }
/* Non-interactive alternative to a tab strip: event identity, never fake tabs. */
body.shell-ready #routeContent .rg-frame .rd-context-band { display:grid; flex:0 0 auto; gap:4px; min-width:0; min-height:61px; margin:0; padding:8px 12px; border-bottom:1px solid var(--route-line); background:var(--route-soft); overflow-wrap:anywhere; }
body.shell-ready #routeContent .rg-frame .rd-context-band .page-kicker { color:var(--route-accent-ink); font:800 var(--type-caption)/1.4 var(--font-ui); }
body.shell-ready #routeContent .rg-frame .rd-context-band h3 { margin:0; color:var(--route-deep); font:700 var(--type-section-title)/1.3 var(--font-editorial); }
body.shell-ready #routeContent .rg-frame .rd-context-band p { max-width:75ch; margin:0; color:var(--ink-soft); font:400 var(--type-small)/1.5 var(--font-ui); }
body.shell-ready #routeContent .rg-frame .rd-tabs { display:flex; flex:0 0 auto; position:static; flex-wrap:nowrap; gap:6px; margin:0; padding:8px 12px; border:0; border-bottom:1px solid var(--route-line); background:var(--route-soft); overflow:visible; }
body.shell-ready #routeContent .rg-frame .rd-tabs > :is(a,button) { display:inline-flex; flex:0 0 auto; align-items:center; justify-content:center; gap:6px; min-height:44px; margin:0; padding:8px 12px; border:1px solid transparent; border-radius:10px; color:var(--route-accent-ink); background:transparent; box-shadow:none; text-decoration:none; white-space:nowrap; font:600 var(--type-ui)/1.4 var(--font-ui); }
body.shell-ready #routeContent .rg-frame .rd-tabs > :is(a,button):is(:hover,:focus-visible) { background:#fffdf8; border-color:var(--route-line); }
body.shell-ready #routeContent .rg-frame .rd-tabs > .active { color:#fffdf8; background:var(--route-deep); border-color:var(--route-deep); }
body.shell-ready #routeContent .rg-frame .rd-tabs > .active:is(:hover,:focus-visible) { color:#fffdf8; background:var(--route-deep); border-color:var(--route-deep); }
body.shell-ready #routeContent .rg-frame .rd-tabs .tab-count { display:inline-grid; place-items:center; flex:0 0 auto; min-width:22px; width:auto; height:22px; padding:0 4px; border:0; border-radius:99px; color:var(--route-accent-ink); background:#fffdf8; font:800 var(--type-caption)/1 var(--font-ui); font-variant-numeric:tabular-nums; }
body.shell-ready #routeContent .rg-frame .rd-tabs .active .tab-count { color:var(--route-deep); background:#f0c878; }
body.shell-ready #routeContent .rg-frame .shell-tab-picker { flex:0 0 auto; }
body.shell-ready #routeContent .rg-frame .rd-body { flex:1 1 auto; min-height:0; height:auto; max-height:none; padding:20px; overflow:visible; scrollbar-gutter:stable; overscroll-behavior-y:auto; scroll-padding:20px; }
@media screen and (min-width:851px) and (min-height:651px) {
  body.shell-ready:is([data-route="actors"],[data-route="relations"],[data-route="objects"],[data-route="dialogues"],[data-route="timeline"],[data-route="registers"],[data-route="states"],[data-route="mechanics"],[data-route="combat"],[data-route="internals"],[data-route="method"],[data-route="glossary"],[data-route="walkthrough"],[data-route="research"],[data-route="trivia"],[data-route="podcast"],[data-route="media"],[data-route="protection"]) .workspace { padding-top:var(--shell-frame-inset); padding-bottom:var(--shell-frame-inset); }
  body.shell-ready #routeContent .rg-frame { height:calc(100dvh - var(--topbar-h) - 2 * var(--shell-frame-inset)); align-items:stretch; }
  body.shell-ready #routeContent .rg-frame .rg-sidebar { height:100%; }
  body.shell-ready #routeContent .rg-frame .rd-surface,
  body.shell-ready #routeContent .rg-frame .rd-reader { height:100%; overflow:hidden; }
  body.shell-ready #routeContent .rg-frame .rd-body { flex:1 1 0; overflow:auto; }
  body.shell-ready[data-route="rooms"] .workspace { padding-top:var(--shell-frame-inset); padding-bottom:var(--shell-frame-inset); }
  body.shell-ready[data-route="rooms"] .room-register { height:calc(100dvh - var(--topbar-h) - 2 * var(--shell-frame-inset)); align-items:stretch; }
  body.shell-ready[data-route="rooms"] .room-register > .register-list { position:static; height:100%; max-height:none; }
  body.shell-ready[data-route="rooms"] #roomRegisterContent { display:flex; flex-direction:column; height:100%; min-height:0; overflow:hidden; }
  body.shell-ready[data-route="rooms"] #roomRegisterContent > :is(.room-reading-head,.room-reading-tabs,.shell-tab-picker) { flex:0 0 auto; position:static; }
  body.shell-ready[data-route="rooms"] #roomReadingBody { flex:1 1 0; min-height:0; height:auto; overflow:auto; overscroll-behavior-y:auto; scrollbar-gutter:stable; scroll-padding:20px; }
  /* One viewport-sized outer frame. Only existing inner readers may scroll.
     Scope by the rendered frame, not by a list of route names. */
  html:has(body.shell-ready #routeContent > :is(.rg-frame,.room-register,.atlas-shell,.wr-shell)) { height:100%; min-height:0; overflow-y:clip; }
  body.shell-ready:has(#routeContent > :is(.rg-frame,.room-register,.atlas-shell,.wr-shell)) { height:100dvh; min-height:0; overflow-y:clip; }
  body.shell-ready:has(#routeContent > :is(.rg-frame,.room-register,.atlas-shell,.wr-shell)) .app-shell { height:100dvh; min-height:0; }
  body.shell-ready:has(#routeContent > :is(.rg-frame,.room-register,.atlas-shell,.wr-shell)) .workspace { height:calc(100dvh - var(--topbar-h)); min-height:0; padding-top:var(--shell-frame-inset); padding-bottom:var(--shell-frame-inset); }
  body.shell-ready #routeContent:has(> :is(.rg-frame,.room-register,.atlas-shell,.wr-shell)) { display:block; height:100%; min-height:0; margin:0; padding:0; }
  body.shell-ready #routeContent > :is(.rg-frame,.room-register,.atlas-shell,.wr-shell) { height:100%; min-height:0; max-height:none; margin-block:0; }
  body.shell-ready.route-atlas .atlas-viewport { min-height:0; }
}
@media(max-width:850px), (max-height:650px) {
  body.shell-ready #routeContent .rg-frame { grid-template-columns:minmax(0,1fr); }
  body.shell-ready #routeContent .rg-frame .rg-list { display:none; }
  body.shell-ready #routeContent .rg-frame .rg-picker { display:grid; gap:6px; }
  body.shell-ready .shell-register-layout { grid-template-columns:minmax(0,1fr); }
  body.shell-ready[data-route="rooms"] .room-register > .register-list { position:static; max-height:none; }
  body.shell-ready #roomRegisterList { display:none; }
  body.shell-ready .room-mobile-picker { display:block; }
  body.shell-ready[data-route="timeline"] .worldflow-index { position:static; max-height:none; }
  body.shell-ready .room-reading-tabs { position:static; }
  body.shell-ready.route-atlas .atlas-shell { height:65dvh; min-height:340px; }
}
@media(max-width:850px) {
  body.shell-ready .brand-block { flex:1 1 auto; }
  body.shell-ready .brand-block strong { font-size:clamp(.525rem,1.7vw,.7rem); letter-spacing:0; }
  body.shell-ready .workspace { padding:12px; }
}
@media(max-width:600px) {
  body.shell-ready #routeContent .rg-frame :is(.rd-head,.rd-body) { padding:16px; }
  body.shell-ready .atlas-toolbar { grid-template-columns:minmax(0,1fr); }
  body.shell-ready .topbar { flex-wrap:wrap; padding:8px 12px; gap:8px; }
  body.shell-ready .brand-block { flex:1 1 calc(100% - 82px); }
  body.shell-ready .global-search-area { order:3; flex:1 1 150px; max-width:none; }
  body.shell-ready .room-reading-head, body.shell-ready .room-reading-body { padding:16px; }
  body.shell-ready.room-inspector-open .inspector { width:100%; }
}
@media print {
  body.shell-ready #routeContent .rg-frame { display:block; }
  body.shell-ready #routeContent .rg-frame :is(.rg-sidebar,.rd-tabs) { display:none!important; }
  body.shell-ready .topbar,body.shell-ready .primary-nav,.shell-context,.shell-tab-picker,.shell-inspector-footer { display:none!important; }
  body.shell-ready .app-shell { padding-top:0; }
  body.shell-ready .shell-register-layout { display:block!important; }
  body.shell-ready .shell-index { display:none!important; }
}
