/* PASS203: one shared glass system for the shell, guides and standalone tools. */
:root{--ac-glass:linear-gradient(135deg,rgba(174,222,239,.15),rgba(20,49,70,.34));--ac-edge:rgba(208,242,255,.28);--ac-shadow:inset 0 1px 0 #e9ffff25,0 12px 30px #00162930;--ac-text:#e8f6ff;--ac-muted:#bad3e1;--ac-control:linear-gradient(135deg,#d0f4ff12,#457b9615);--ac-focus:#b4fff0}
*,*::before,*::after{box-sizing:border-box}
body{color:var(--ac-text);font-family:Rajdhani,system-ui,sans-serif}
:is(.panel,.ac-card,.int-card,.ops-card,.hc-glass,.w183-surface,.w183-tool,.w183-accordion,.w183-master-bar,.w183-switch-body,.ds-side,.ds-card,.g199-sidebar,.g199-card){background:var(--ac-glass)!important;border:1px solid var(--ac-edge)!important;box-shadow:var(--ac-shadow)!important;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border-radius:22px;color:var(--ac-text);min-width:0}
:is(.btn,.hc-action,.w183-switch>summary,.w183-page-nav a,.ds-top button,.ds-side button,.ds-controls button,.g199-sidebar button){background:var(--ac-control)!important;border:1px solid var(--ac-edge)!important;border-radius:13px!important;box-shadow:inset 0 1px #edffff20;color:var(--ac-text)!important;min-height:44px;text-decoration:none;line-height:1.35;padding:10px 14px;cursor:pointer}
:is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea){background:#06203250;color:var(--ac-text);border:1px solid var(--ac-edge);border-radius:12px;padding:10px 12px;min-height:44px;max-width:100%;font:inherit}
select option{background:#173448;color:#effaff}input::placeholder,textarea::placeholder{color:var(--ac-muted);opacity:.85}
:is(a,button,input,select,textarea,summary):focus-visible{outline:2px solid var(--ac-focus);outline-offset:3px}
button:disabled,.btn[aria-disabled=true]{opacity:.45;cursor:default}
.content{min-width:0}.content :is(.panel,.ac-card,.ops-card) :is(h1,h2,h3,p,label){overflow-wrap:anywhere}
.w183-switch-body{max-width:calc(100vw - 40px)}.w183-switch-body input{width:100%}
.game-msg-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important}.game-msg-action{width:auto!important;min-width:44px!important;min-height:44px!important;white-space:normal!important;padding:9px 12px!important}
#ac186Nav{background:var(--ac-glass)!important;border-color:var(--ac-edge)!important;box-shadow:var(--ac-shadow)!important}#ac186Nav summary{display:flex;align-items:center;gap:10px}#ac186Nav summary span{flex:1}
/* Retired bottom navigation cannot reappear during script loading or recovery. */
.bottom-nav,.nav-wedge,.section-pop{display:none!important}
body:not(.ac186-ready) #ac186Nav{display:flex;flex-direction:column;transform:none;position:relative;inset:auto;margin:20px;width:calc(100% - 40px)}
@media(max-width:600px){.content{padding-left:12px!important;padding-right:12px!important}.content :is(.panel,.ac-card,.ops-card){padding:18px}.card-actions,.form-actions{display:flex;flex-wrap:wrap;gap:8px}.w183-master-bar{flex-wrap:wrap}.w183-switch-body{left:0;right:0;width:auto}.so203-view-tabs{white-space:normal!important}.game-msg-actions .game-msg-action{flex:0 1 auto}}
@media(prefers-reduced-transparency:reduce){:is(.panel,.ac-card,.ops-card,.hc-glass,.w183-surface,.w183-switch-body,#ac186Nav,.ds-side,.g199-sidebar){background:#19384e!important;backdrop-filter:none}}

.ac203-standalone :is(.card,.ds-panel,aside#sidebar,aside.sidebar){background:var(--ac-glass)!important;border:1px solid var(--ac-edge)!important;box-shadow:var(--ac-shadow)!important;backdrop-filter:blur(24px);border-radius:22px}
.ac203-standalone :is(.ds-tools button,.ds-side button,.ds-top a,.nav a){background:var(--ac-control)!important;border:1px solid var(--ac-edge)!important;border-radius:13px;color:var(--ac-text);min-height:44px;padding:10px 12px}
body.ac203-standalone.ac186-ready :is(header,.ds-top)>.ac186-toggle{position:static;inset:auto;flex:0 0 auto;margin:0 0 0 auto;min-height:44px;padding:9px 12px} .ac203-standalone .ds-top{flex-wrap:wrap;height:auto;min-height:64px}

.ac203-standalone :is(.guide199-rail,.guide199-top){background:var(--ac-glass)!important;border:1px solid var(--ac-edge)!important;box-shadow:var(--ac-shadow)!important;backdrop-filter:blur(24px)}
.ac203-standalone .guide199-rail :is(a,button){border-radius:13px;background:var(--ac-control);border:1px solid var(--ac-edge);min-height:44px}
.ac203-standalone .guide199-top{flex-wrap:wrap;height:auto;min-height:64px}
/* Compact guide headers use the same title + control arrangement on phones. */
@media(max-width:600px){.ac203-standalone :is(.guide199-top,.ds-top){display:grid!important;grid-template-columns:1fr auto!important;gap:8px!important;padding:12px!important}.ac203-standalone .guide199-top>span,.ac203-standalone .ds-top>h1{grid-column:1/-1;grid-row:1;font-size:16px!important;line-height:1.4!important;margin:0;white-space:normal}.ac203-standalone :is(.guide199-top,.ds-top)>a{display:none}.ac203-standalone :is(.guide199-top,.ds-top)>button{grid-row:2;min-width:0}.ac203-standalone .guide199-top>button:first-child,.ac203-standalone .ds-top>button:first-child{justify-self:start}}
.ac203-embedded button,.ac203-standalone button:not(.ds-point){border:1px solid var(--ac-edge);border-radius:13px;background:var(--ac-control);color:var(--ac-text);min-height:44px}

body.ac203-standalone.ac186-ready #appBearHeader>.ac186-toggle{position:static;inset:auto;flex:0 0 44px;width:44px;min-width:44px;height:44px;padding:8px;margin:0;font-size:0}body.ac203-standalone.ac186-ready #appBearHeader>.ac186-toggle::before{content:'☰';font-size:22px}body.app-mode #appBearHeader{gap:6px;padding-inline:8px}body.app-mode #appBearHeader .appTopBtn{padding-inline:8px;min-width:38px}body.app-mode #appBearHeader .title{min-width:0}

/* PASS209: workspace menus own their space instead of covering page content.
   Flow layout also avoids nested backdrop-filter stacking/containing blocks. */
.w183-master-bar{flex-wrap:wrap;align-items:center;isolation:isolate}
.w183-master-bar>.w183-switch{position:relative;min-width:0;max-width:100%;margin-left:0}
.w183-master-bar>.w183-switch[open]{flex:1 0 100%;order:10}
.w183-master-bar>.w183-switch>summary{width:fit-content;max-width:100%;white-space:normal}
.w183-master-bar>.w183-switch>.w183-switch-body{position:static;inset:auto;width:100%;max-width:100%!important;max-height: min(60dvh,600px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;margin-top:12px;padding:18px;box-sizing:border-box}
.w183-master-bar .w183-switch-body :is(a,label,h3){overflow-wrap:anywhere;white-space:normal}
.w183-master-bar .w183-switch-body a{min-height:44px;display:flex;align-items:center;color:var(--ac-text);line-height:1.4}
.w183-master-bar .w183-switch-body label{display:grid;gap:8px}
.w183-master-bar .w183-switch-body input{min-width:0;width:100%}
.w183-master-bar>a:not(.w183-back){padding:10px 12px;min-height:44px;display:flex;align-items:center;text-decoration:none;border:1px solid var(--ac-edge);border-radius:13px;background:var(--ac-control);color:var(--ac-text);overflow-wrap:anywhere}
@media(max-width:600px){.w183-master-bar{gap:8px}.w183-master-bar>.w183-switch>.w183-switch-body{padding:14px;max-height:55dvh}.w183-master-bar>.w183-switch>summary{min-height:44px}}
