/* The member shell (Astra uplevel2): room rail on desktop, dock on phones, game menu.
   Colours come from whichever identity sheet the page already loads (styles.css,
   membership.css or plan158.css); this sheet declares no colour of its own. */
@font-face{font-family:Fraunces;src:url('/fonts/fraunces-latin-400-800.woff2') format('woff2');font-weight:400 800;font-display:swap}
@font-face{font-family:'Source Sans 3';src:url('/fonts/source-sans-3-latin-400-700.woff2') format('woff2');font-weight:400 700;font-display:swap}
:root{
  --shell-ground:var(--identity-ground,var(--palette-1,var(--social-bg)));
  --shell-panel:var(--color-panel,var(--palette-2,var(--social-panel)));
  --shell-ivory:var(--identity-cream,var(--palette-4,var(--social-text)));
  --shell-gold:var(--identity-gold,var(--palette-7,var(--social-gold)));
  --shell-gold-light:color-mix(in srgb,var(--shell-gold) 62%,var(--shell-ivory));
  --shell-line:color-mix(in srgb,var(--shell-ivory) 15%,var(--shell-ground));
  --shell-muted:color-mix(in srgb,var(--shell-ivory) 55%,var(--shell-ground));
  --shell-rail-w:92px;
  --shell-dock-h:0px;
  --shell-report-h:0px;
  --shell-serif:Fraunces,Georgia,serif;
  --shell-sans:'Source Sans 3',system-ui,sans-serif
}
.shell-icon{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.shell-rail{position:fixed;z-index:30;top:0;bottom:0;left:0;width:var(--shell-rail-w);display:flex;flex-direction:column;gap:6px;padding:14px 10px 18px;overflow-y:auto;scrollbar-width:none;border-right:1px solid var(--shell-line);background:var(--shell-ground);font-family:var(--shell-sans)}
.shell-rail a,.shell-rail button,.shell-dock a,.shell-dock button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 2px;border:1px solid transparent;border-radius:4px;color:var(--shell-muted);font-size:11px;line-height:1.2;letter-spacing:.02em;text-align:center;text-decoration:none;transition:color .2s,background .2s}
.shell-rail a:hover,.shell-rail button:hover,.shell-dock a:hover{color:var(--shell-ivory);background:var(--shell-panel)}
.shell-rail a[aria-current=page],.shell-dock a[aria-current=page]{color:var(--shell-gold-light);background:var(--shell-panel);border-color:var(--shell-line)}
.shell-rail .shell-crest{padding:2px 0 14px;margin-bottom:6px;border-bottom:1px solid var(--shell-line);border-radius:0}
.shell-rail .shell-crest:hover{background:none}
.shell-crest img{width:44px;height:44px;object-fit:contain}
.shell-rail .shell-help{margin-top:auto}
.shell-dock{display:none}
/* The beta bug line rides fixed above the page, so no room's own grid or flex layout gains a
   child; the body pads for it and full-height rooms subtract --shell-report-h. */
:root:has(body>.shell-report){--shell-report-h:calc(30px + env(safe-area-inset-top,0px))}
body:has(>.shell-report){box-sizing:border-box;padding-top:var(--shell-report-h)}
.shell-report{position:fixed;z-index:31;top:0;left:0;right:0;box-sizing:border-box;height:var(--shell-report-h);display:flex;align-items:center;gap:12px;padding:env(safe-area-inset-top,0px) 16px 0;border-bottom:1px solid var(--shell-line);background:var(--shell-panel);color:var(--shell-ivory);font:500 13px/1 var(--shell-sans);white-space:nowrap;overflow:hidden}
.shell-report b{color:var(--shell-gold-light);font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase}
.shell-report a{display:inline-flex;align-items:center;min-height:24px;padding:0;color:var(--shell-gold-light);font:600 13px/1 var(--shell-sans);text-decoration:underline;text-underline-offset:3px}
.shell-report a.shell-report-more{color:var(--shell-muted);font-weight:500}
.shell-report a.shell-report-terms{margin-left:auto;color:var(--shell-ivory);font-weight:500}
.shell-report a:focus-visible{outline:2px solid var(--shell-gold-light);outline-offset:2px}
@media (max-width:600px){.shell-report .shell-report-more{display:none}}
@media (max-width:350px){.shell-report .shell-report-ask{display:none}}
.shell-menu{width:min(680px,calc(100vw - 32px));max-height:calc(100dvh - 48px);padding:0;border:1px solid var(--shell-gold);border-radius:5px;background:var(--shell-ground);color:var(--shell-ivory);font-family:var(--shell-sans)}
.shell-menu::backdrop{background:color-mix(in srgb,var(--shell-ground) 78%,transparent)}
.shell-menu header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--shell-line)}
.shell-menu h2{margin:0;font:500 26px/1.1 var(--shell-serif);letter-spacing:-.4px}
.shell-menu-close{display:grid;place-items:center;width:40px;height:40px;border:0;background:none;color:var(--shell-ivory);cursor:pointer}
.shell-menu-kicker{margin:20px 24px 10px;color:var(--shell-gold-light);font-size:11px;font-weight:600;letter-spacing:.18em;text-transform:uppercase}
.shell-menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:0 24px 24px}
.shell-menu-grid a{display:flex;align-items:center;gap:13px;min-height:50px;padding:13px 15px;border:1px solid var(--shell-line);border-radius:3px;color:var(--shell-ivory);font-size:15px;text-decoration:none}
.shell-menu-grid a:hover,.shell-menu-grid a[aria-current=page]{border-color:var(--shell-gold)}
.shell-menu-grid .shell-icon{color:var(--shell-gold)}
.shell-first-run{position:fixed;z-index:60;inset:0;pointer-events:none;font-family:var(--shell-sans)}
/* The first-run walkthrough: a spotlight on the real control, a coach card, a resume pill. */
.fr-spot{position:fixed;border:2px solid var(--shell-gold-light);border-radius:6px;outline:200vmax solid color-mix(in srgb,var(--shell-ground) 62%,transparent);transition:left .25s,top .25s,width .25s,height .25s}
.fr-card{position:fixed;left:auto;top:auto;width:min(400px,calc(100vw - var(--shell-rail-w) - 48px));padding:18px 20px 14px;border:1px solid var(--shell-gold);border-radius:5px;background:var(--shell-ground);color:var(--shell-ivory);pointer-events:auto}
.fr-kicker{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0 0 8px;color:var(--shell-gold-light);font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase}
.fr-card h2{margin:0 0 8px;font:500 24px/1.15 var(--shell-serif);letter-spacing:-.3px}
.fr-card h2:focus{outline:none}
.fr-card #frLine{margin:0 0 16px;font-size:16px;line-height:1.5}
.fr-actions{display:flex;gap:8px}
.fr-card button{min-height:44px;padding:8px 14px;border:1px solid var(--shell-line);border-radius:3px;background:var(--shell-panel);color:var(--shell-ivory);font:600 14px var(--shell-sans);cursor:pointer}
.fr-card button:disabled{opacity:.45;cursor:default}
.fr-card .fr-primary{margin-left:auto;border-color:var(--shell-gold);background:var(--shell-gold);color:var(--shell-ground)}
.fr-card .fr-skip{display:block;min-height:40px;margin:8px 0 0;padding:6px 0;border:0;background:none;color:var(--shell-muted);font-weight:500;text-decoration:underline}
.fr-card .fr-voice{min-height:32px;padding:4px 10px;font-size:11px;letter-spacing:.06em}
.fr-pill{position:static;min-height:44px;padding:10px 12px;border:1px solid var(--shell-gold);border-radius:4px;background:var(--shell-ground);color:var(--shell-gold-light);font:600 14px/1.25 var(--shell-sans);pointer-events:auto;cursor:pointer}
.fr-pill[hidden]{display:none}
.shell-rail>.fr-pill{flex-shrink:0;width:100%;padding:8px 2px;font-size:11px;overflow-wrap:anywhere}
.fr-live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.fr-card button:focus-visible,.fr-pill:focus-visible{outline:2px solid var(--shell-gold-light);outline-offset:2px}
.shell-menu-grid .fr-menu{display:flex;align-items:center;gap:13px;min-height:50px;padding:13px 15px;border:1px solid var(--shell-gold);border-radius:3px;background:none;color:var(--shell-ivory);font:15px var(--shell-sans);text-align:left;cursor:pointer}
.shell-menu-grid .fr-menu .shell-icon{color:var(--shell-gold)}
.shell-rail a:focus-visible,.shell-rail button:focus-visible,.shell-dock a:focus-visible,.shell-dock button:focus-visible,.shell-menu a:focus-visible,.shell-menu button:focus-visible{outline:2px solid var(--shell-gold-light);outline-offset:2px}

/* Room room for the rail on desktop. */
@media (min-width:901px){
  body.derby-shell{padding-left:var(--shell-rail-w)}
  body.derby-shell>.shell-report{left:var(--shell-rail-w)}
  body.derby-shell .godot-owner-shell:has(#ownerApp:not([hidden])) .godot-owner-topbar nav{left:calc(50% + var(--shell-rail-w) / 2);max-width:calc(100vw - var(--shell-rail-w) - 560px);overflow-x:auto;scrollbar-width:none}
}
/* Phones and narrow tablets: the dock replaces the rail. */
@media (max-width:900px){
  :root{--shell-dock-h:68px}
  .shell-rail{display:none}
  .shell-dock{position:fixed;z-index:30;left:0;right:0;bottom:0;display:flex;justify-content:space-around;height:calc(var(--shell-dock-h) + env(safe-area-inset-bottom));padding:6px 8px env(safe-area-inset-bottom);border-top:1px solid var(--shell-line);background:var(--shell-ground);font-family:var(--shell-sans)}
  .shell-dock a,.shell-dock button{flex:1;justify-content:center;gap:4px;padding:6px 2px;border:0;background:none;font:inherit;font-size:11px;cursor:pointer}
  body.derby-shell{padding-bottom:calc(var(--shell-dock-h) + env(safe-area-inset-bottom,0px))}
  .shell-menu-grid{grid-template-columns:1fr}
  /* Page-owned bottom bars sit above the dock. */
  body.derby-shell .godot-owner-shell:has(#ownerApp:not([hidden])) .godot-owner-topbar nav{bottom:calc(var(--shell-dock-h) + env(safe-area-inset-bottom,0px))}
  body.derby-shell .godot-owner-app,body.derby-shell .owner-outfit{height:calc(100svh - 64px - var(--shell-report-h) - var(--shell-dock-h) - env(safe-area-inset-bottom,0px))}
  body.derby-shell.book-page .slip-dock{bottom:calc(var(--shell-dock-h) + env(safe-area-inset-bottom,0px))}
  body.derby-shell .store-shell{height:calc(100dvh - 104px - var(--safe-top,0px) - var(--shell-report-h) - var(--shell-dock-h) - env(safe-area-inset-bottom,0px))}
  .fr-card{width:calc(100vw - 24px)}
  :root:has(.shell-dock>.fr-pill:not([hidden])){--shell-dock-h:118px}
  .shell-dock:has(>.fr-pill:not([hidden])){flex-wrap:wrap;align-content:flex-start}
  .shell-dock>.fr-pill{order:-1;flex:0 0 100%;box-sizing:border-box;height:44px;min-height:44px;margin:0 0 6px;padding:4px 8px;border:1px solid var(--shell-gold);font-size:14px;line-height:1.2}
}
/* Page chrome the shell replaces: each room keeps its own tools, the rail carries the rooms. */
body.derby-shell .book-page .masthead .nav,body.derby-shell.book-page .masthead .nav,
body.derby-shell .live-topbar-right>a.live-audio-button,
body.derby-shell .social-header>a:first-child,
body.derby-shell .topbar .back-link{display:none}
body.derby-shell .live-shell{min-height:calc(100vh - var(--shell-report-h))}
@media (prefers-reduced-motion:reduce){.shell-rail a,.shell-dock a,.fr-spot{transition:none}}

/* Shared menu categories and stable actions keep their labels on one line. */
.shell-rail button{background:none;font:inherit;font-size:11px;cursor:pointer;min-height:44px}
.shell-menu-section h3{margin:18px 24px 10px;font:600 13px var(--shell-sans);color:var(--shell-gold-light)}
.shell-menu-section .shell-menu-grid{padding-bottom:8px}
.shell-menu-section:last-child .shell-menu-grid{padding-bottom:24px}
.shell-social-links{display:contents}
.shell-social-links[hidden]{display:none}
.godot-owner-topbar .owner-room-nav{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
.owner-nav-group{display:flex;align-items:center;flex:0 0 auto}
.owner-nav-group+ .owner-nav-group{border-left:1px solid var(--shell-line);margin-left:6px;padding-left:6px}
.godot-owner-topbar .owner-room-nav button,.godot-owner-topbar .owner-room-nav a{white-space:nowrap;text-transform:none;letter-spacing:normal;flex:0 0 auto}
@media(max-width:900px){
  .godot-owner-topbar .owner-room-nav,.godot-owner-shell:has(#ownerApp:not([hidden])) .godot-owner-topbar .owner-room-nav{display:flex;justify-content:flex-start;height:52px;background:var(--shell-ground);border-top:1px solid var(--shell-line)}
  .godot-owner-topbar .owner-room-nav button,.godot-owner-topbar .owner-room-nav a{min-height:44px;padding:10px 9px;font-size:13px}
  .godot-owner-builder .owner-builder-actions button{min-height:44px}
  .owner-nav-group+ .owner-nav-group{margin-left:3px;padding-left:3px}
  /* phone: all six stable tabs fit the width, the bar never scrolls or draws a scrollbar, and it wears the header's green texture like desktop (a flat --shell-ground read as black) */
  .godot-owner-topbar .owner-room-nav,.godot-owner-shell:has(#ownerApp:not([hidden])) .godot-owner-topbar .owner-room-nav{left:0;right:0;transform:none;box-sizing:border-box;padding-inline:6px;overflow:hidden;scrollbar-width:none;background:inherit}
  .owner-nav-group{flex:1 1 auto;justify-content:space-between}
  .owner-nav-group+ .owner-nav-group{flex:0 1 auto}
  .godot-owner-topbar .owner-room-nav button,.godot-owner-topbar .owner-room-nav a{flex:0 1 auto;min-width:0;padding:10px clamp(2px,0.8vw,9px);font-size:clamp(11px,3.2vw,13px)}
  html:has(body.godot-owner-page){scroll-padding-bottom:calc(var(--shell-dock-h) + 68px + env(safe-area-inset-bottom,0px))}
}

/* Shared member chrome, including nested store and collection scroll areas. */
html, body.derby-shell * { scrollbar-color:var(--shell-gold) var(--shell-ground); scrollbar-width:thin; }
body.derby-shell ::-webkit-scrollbar { width:8px; height:8px; }
body.derby-shell ::-webkit-scrollbar-track { background:var(--shell-ground); }
body.derby-shell ::-webkit-scrollbar-thumb { background:var(--shell-gold); border:2px solid var(--shell-ground); border-radius:8px; }
