/* Grey Mist Life / black-leather reading shell. Last stylesheet, scoped tokens. */
body.gml-shell{--ink:#0c1514;--panel:#142321;--panel-alt:#1b2d2a;--text:#e8e6dc;--muted:#a5b5ad;--gold:#bc9d6e;--line:#344640;--danger:#dfaa96;--serif:'Noto Serif CJK SC','Songti SC','STSong',serif;--sans:'PingFang SC','Microsoft YaHei','Noto Sans CJK SC',sans-serif;background:var(--ink);color:var(--text);font-family:var(--sans);font-size:15px;line-height:1.65;margin:0;min-height:100vh;overflow-x:hidden;color-scheme:dark}
body.gml-shell *{box-sizing:border-box}body.gml-shell [hidden]{display:none!important}
body.gml-shell #app{max-width:1360px;margin:auto;padding:0 34px 42px 142px;min-height:100vh}
body.gml-shell .topbar{position:relative;display:flex;align-items:center;justify-content:space-between;gap:16px;background:transparent;border:0;border-bottom:1px solid var(--line);padding:22px 0 16px;box-shadow:none;z-index:5;min-height:84px}
body.gml-shell button,body.gml-shell input,body.gml-shell select,body.gml-shell textarea{font:inherit}body.gml-shell button{color:var(--text);background:var(--panel-alt);border:1px solid var(--line);border-radius:6px;min-height:44px;padding:10px 15px;line-height:1.5;cursor:pointer;transition:background .15s,border-color .15s;box-shadow:none;white-space:normal;overflow-wrap:anywhere}
body.gml-shell button:hover{background:#263c36;border-color:var(--gold)}body.gml-shell button:disabled{opacity:.45;cursor:not-allowed}
body.gml-shell button.primary{background:var(--gold);border-color:var(--gold);color:#13211d;font-weight:700}body.gml-shell button.danger{color:var(--danger);background:transparent}
body.gml-shell :is(button,input,textarea,select,a,summary):focus-visible{outline:2px solid var(--gold);outline-offset:3px}
body.gml-shell :is(input,select,textarea){width:100%;min-width:0;border:1px solid var(--line);background:var(--ink);border-radius:6px;padding:12px;color:var(--text);font-size:16px}body.gml-shell textarea{line-height:1.7;resize:vertical}
body.gml-shell h1,body.gml-shell h2,body.gml-shell h3,body.gml-shell .scene-title{color:var(--text)}body.gml-shell h2{font:600 27px/1.5 var(--serif);margin:6px 0 14px}body.gml-shell h3{font-size:17px;letter-spacing:0;margin:22px 0 12px}body.gml-shell p{margin:10px 0 16px}body.gml-shell small,body.gml-shell .small,body.gml-shell .micro{color:var(--muted);line-height:1.7}body.gml-shell .small{font-size:14px}body.gml-shell .micro{font-size:12px}body.gml-shell hr{border:0;border-top:1px solid var(--line);margin:22px 0}
body.gml-shell a{color:var(--gold)}body.gml-shell .notice,body.gml-shell .info-card,body.gml-shell .choice{background:var(--panel);border:1px solid var(--line);border-radius:7px;padding:16px;box-shadow:none;color:var(--text)}
body.gml-shell .notice{border-left:2px solid var(--gold)}body.gml-shell .info-card strong{color:var(--text)}body.gml-shell .chip{border-color:var(--line);background:var(--panel-alt);color:var(--text);border-radius:4px;padding:5px 9px;line-height:1.6}body.gml-shell .muted{color:var(--muted)}
body.gml-shell .ui-icon{width:23px;height:23px;display:inline-block;flex:none;vertical-align:middle}
body.gml-shell .ui-brand{display:flex;gap:13px;align-items:center;border:0;background:transparent!important;text-align:left;padding:0;min-height:48px}body.gml-shell .ui-brand-mark{font:25px/47px var(--serif);height:48px;width:43px;text-align:center;color:var(--gold);border:1px solid var(--gold);border-radius:21px 21px 3px 3px;flex:none}body.gml-shell .ui-brand b{font:600 24px/1.35 var(--serif);display:block;letter-spacing:2px}body.gml-shell .ui-brand small{display:block;font-size:11px;margin-top:3px;letter-spacing:0;color:var(--muted)}
body.gml-shell .ui-header-controls{display:flex;align-items:center;gap:8px}body.gml-shell .ui-header-controls button{background:transparent;border-color:transparent;padding:7px 12px;color:var(--muted)}body.gml-shell #uiHeaderRecord{display:flex;gap:7px;align-items:center}body.gml-shell #uiHeaderRecord .ui-icon{width:18px;height:18px}
body.gml-shell .ui-context{display:flex;align-items:center;flex-wrap:wrap;gap:9px 16px;color:var(--muted);padding:13px 0 15px;font-size:12px}.ui-context-place{color:var(--gold);font-weight:600}
body.gml-shell .layout{display:block!important;padding:0;margin:0;grid-template-columns:none!important;min-width:0}body.gml-shell .state-panel,body.gml-shell .right-panel{display:none!important}
body.gml-shell .story-panel{max-width:860px;min-width:0;width:100%;border:0;background:transparent;box-shadow:none;border-radius:0;padding:0;margin:0 auto;display:flex;flex-direction:column}
body.gml-shell #screen{height:auto;max-height:none;min-height:0;overflow:visible;padding:22px 32px;background:var(--panel);border:1px solid var(--line);border-radius:12px 12px 0 0;overflow-wrap:anywhere;flex:none}
body.gml-shell .scene-title{font:600 25px/1.5 var(--serif);letter-spacing:.02em;margin:0 0 10px}body.gml-shell .scene-meta{font-size:13px;color:var(--muted);margin:0 0 22px;line-height:1.7}
body.gml-shell .prose,body.gml-shell .feed-entry>div:not(.feed-meta),body.gml-shell .dialogue{font-family:var(--sans);font-size:var(--reader-size,18px);line-height:1.95;white-space:pre-wrap;word-break:normal;overflow-wrap:anywhere;letter-spacing:.025em;color:var(--text)}
body.gml-shell .life-feed{display:block;gap:0}body.gml-shell .feed-entry{border:0;border-radius:0;padding:20px 0;margin:0;border-bottom:1px solid var(--line);background:transparent;box-shadow:none}body.gml-shell .feed-entry:last-child{border-bottom:0}body.gml-shell .feed-entry .feed-meta{font:12px/1.5 var(--sans);color:var(--muted);margin-bottom:12px;opacity:.85}body.gml-shell .feed-entry.player{border-left:2px solid var(--gold);padding:10px 18px;background:var(--panel-alt);margin:18px 0;border-bottom:0;border-radius:0 6px 6px 0}body.gml-shell .feed-entry.player .feed-meta{color:var(--gold)}body.gml-shell .feed-entry.player>div:not(.feed-meta){font-size:calc(var(--reader-size,18px) - 1px);line-height:1.8}
body.gml-shell .feed-entry.system>div:not(.feed-meta){font-size:calc(var(--reader-size,18px) - 2px);color:var(--muted);line-height:1.8}body.gml-shell .ui-settlement-fold{color:var(--muted);font-size:15px;white-space:normal}body.gml-shell .ui-settlement-fold>div{white-space:pre-wrap;line-height:1.85;padding-top:12px}body.gml-shell summary{cursor:pointer;line-height:1.7;min-height:44px;padding:10px 0;color:var(--gold)}
body.gml-shell .scene-anchor{font-size:13px;line-height:1.7;margin:0 0 16px;background:transparent;border-top:0;border-right:0;border-bottom:0;padding:8px 13px;color:var(--muted)}body.gml-shell .scene-anchor b{color:var(--gold)}
body.gml-shell .storylet-lead-box,body.gml-shell .storylet-leads,body.gml-shell .storylet-lead-list{margin:16px 0}body.gml-shell .storylet-lead{background:var(--panel-alt);border-color:var(--line);padding:14px}.ui-catalog-utility{display:none!important}
body.gml-shell #actionArea{margin:0;padding:18px 24px 20px;border:1px solid var(--line);border-top:0;background:var(--panel);border-radius:0 0 12px 12px;position:relative!important;bottom:auto!important;z-index:4;box-shadow:none}
body.gml-shell .free-row{display:flex;align-items:stretch;gap:10px;margin:0 0 12px;width:100%}body.gml-shell .free-row textarea{min-height:76px;max-height:220px;flex:1;min-width:0}body.gml-shell .free-row button{min-width:78px;flex:0 0 auto;align-self:stretch}body.gml-shell .ui-life-menu{border-top:1px solid var(--line);margin-top:14px;font-size:14px}body.gml-shell .ui-life-menu summary{display:flex;gap:10px;justify-content:space-between;font-weight:600}body.gml-shell .ui-life-menu summary span{color:var(--muted);font-size:12px;font-weight:400}body.gml-shell .ui-life-menu .life-tools-head{display:none}body.gml-shell .ui-life-menu .choices{margin:10px 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}body.gml-shell .ui-life-menu .choice{padding:12px;font-size:13px}body.gml-shell .ui-life-menu .choice strong{font-size:14px}
body.gml-shell .choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}body.gml-shell .card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}body.gml-shell .button-row{display:flex;flex-wrap:wrap;gap:8px}body.gml-shell .button-row>*{min-width:0}body.gml-shell .kv{border-color:var(--line);gap:18px;padding:11px 0}body.gml-shell .kv b{overflow-wrap:anywhere;text-align:right}
body.gml-shell .ui-nav{position:fixed;top:180px;bottom:auto;left:max(20px,calc(50% - 650px));width:92px;display:flex;flex-direction:column;gap:12px;z-index:50;padding:14px 8px;border:1px solid var(--line);background:var(--ink);border-radius:44px}
body.gml-shell .ui-nav button{display:flex;flex-direction:column;align-items:center;gap:6px;justify-content:center;border:0;border-radius:30px;background:transparent;min-height:68px;font-size:12px;padding:10px 3px;color:var(--muted)}body.gml-shell .ui-nav .selected{background:var(--panel-alt);color:var(--gold);box-shadow:inset 0 0 0 1px var(--line)}
body.gml-shell .ui-content-notice{text-align:center;color:var(--muted);font-size:11px;padding:18px 0 8px;opacity:.85}body.gml-shell .ui-story-hint{font-size:13px;color:var(--muted);padding:6px 0 18px}
body.gml-shell #uiToast{position:fixed;z-index:300;left:50%;bottom:36px;transform:translate(-50%,15px);max-width:min(88vw,520px);background:#e8e6dc;color:#13211d;padding:13px 20px;border-radius:7px;box-shadow:0 8px 35px #0008;opacity:0;pointer-events:none;font-size:14px;transition:opacity .18s,transform .18s}body.gml-shell #uiToast.visible{opacity:1;transform:translate(-50%,0)}
body.gml-shell #uiLatest{position:fixed;bottom:45px;right:max(26px,calc(50vw - 620px));z-index:25;box-shadow:0 6px 24px #0004;font-size:13px}body.gml-shell #uiRecordExit{position:fixed;top:max(12px,env(safe-area-inset-top));right:max(12px,calc(50vw - 590px));z-index:101;border-color:var(--gold);background:var(--ink);color:var(--gold);font-size:12px;padding:8px 12px;min-height:38px}
/* Existing business / case / journal modules retain their containers, inputs and events. */
body.gml-shell .modal{z-index:40;inset:0;align-items:center;justify-content:center;background:#0009;padding:22px 22px 22px 126px;overflow:hidden}body.gml-shell .modal.hidden{display:none}
body.gml-shell .modal-card,body.gml-shell .modal-card.journal-modal-card,body.gml-shell .modal-card.commerce-modal-card,body.gml-shell .modal-card.circulation-modal-card,body.gml-shell .modal-card.trade-finance-modal,body.gml-shell .modal-card.market-modal-card,body.gml-shell .modal-card.exploration-modal-card{width:min(100%,960px);max-width:100%;height:auto;max-height:calc(var(--viewport-height,100dvh) - 44px);padding:0 28px 28px;overflow-y:auto;overflow-x:hidden;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);box-shadow:0 30px 120px #0008;scrollbar-color:var(--line) var(--panel)}
body.gml-shell .modal-card .x{position:sticky;top:8px;float:right;width:42px;height:42px;z-index:15;font-size:24px;border:0;margin:8px -10px -48px 0;background:var(--panel);padding:0;color:var(--muted)}body.gml-shell .ui-modal-bar{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;z-index:10;margin:0 -28px 24px;padding:8px 67px 8px 18px;background:var(--panel);border-bottom:1px solid var(--line);color:var(--muted);font-size:12px;min-height:60px}body.gml-shell .ui-modal-bar button{display:flex;align-items:center;gap:5px;border:0;background:transparent;color:var(--muted);padding:8px;min-height:44px}
body.gml-shell #modalBody{min-width:0;overflow-wrap:anywhere}body.gml-shell #modalBody>h2:first-child{padding-right:0}body.gml-shell .ui-page-head{margin:0 0 26px}body.gml-shell .ui-page-head>span{color:var(--gold);font-size:13px}body.gml-shell .ui-page-head p{color:var(--muted);font-size:15px;max-width:62ch}
body.gml-shell .ui-menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}body.gml-shell .ui-menu-grid>button{display:flex;gap:13px;align-items:center;text-align:left;min-height:85px;background:transparent;padding:14px}body.gml-shell .ui-menu-grid>button>.ui-icon{color:var(--gold);height:25px;width:25px}body.gml-shell .ui-menu-grid>button>span:first-of-type{flex:1}body.gml-shell .ui-menu-grid b{display:block;font-size:15px}body.gml-shell .ui-menu-grid small{display:block;font-size:12px;margin-top:3px}body.gml-shell .ui-section-title{padding-bottom:10px;border-bottom:1px solid var(--line);margin-top:28px}
body.gml-shell .ui-dev-disclosure{margin-top:28px;border-top:1px solid var(--line);padding-top:10px}body.gml-shell .ui-dev-disclosure summary{color:var(--muted);font-size:13px}body.gml-shell .ui-build{margin-top:28px;font-size:12px;color:var(--muted);display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}
body.gml-shell .ui-setting{padding:8px 0 20px;border-bottom:1px solid var(--line)}body.gml-shell .ui-setting p{color:var(--muted)}body.gml-shell .ui-segments{display:flex;gap:7px;flex-wrap:wrap}body.gml-shell .ui-segments button[aria-pressed=true],body.gml-shell .ui-character-tabs button[aria-pressed=true]{border-color:var(--gold);color:var(--gold);background:var(--panel-alt)}body.gml-shell .ui-setting p.ui-sample{font-size:var(--reader-size,18px);color:var(--text);line-height:1.95;padding:20px;background:var(--ink);border-radius:8px}body.gml-shell .ui-note{color:var(--muted);font-size:13px;line-height:1.8}
body.gml-shell .ui-character-head{display:flex;align-items:center;gap:18px;margin:0 0 26px}body.gml-shell .ui-person-seal{font:32px/77px var(--serif);color:var(--gold);width:68px;height:82px;flex:none;text-align:center;border:1px solid var(--gold);border-radius:34px 34px 6px 6px;background:var(--ink)}body.gml-shell .ui-character-head span{font-size:13px;color:var(--gold)}body.gml-shell .ui-character-head h2{margin:3px 0;font-size:27px}body.gml-shell .ui-character-head p{margin:2px 0;color:var(--muted);font-size:13px}
body.gml-shell .ui-vitals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;padding:4px 0 22px}body.gml-shell .ui-vitals>div>span{font-size:12px;color:var(--muted);display:block}body.gml-shell .ui-vitals b{font:22px/1.8 var(--serif)}body.gml-shell .ui-vitals b small{font:11px var(--sans)}body.gml-shell .ui-vitals i{display:block;height:3px;background:var(--line);margin-top:8px}body.gml-shell .ui-vitals em{display:block;height:100%;background:var(--gold)}body.gml-shell .ui-vitals>div:last-child em{background:var(--danger)}
body.gml-shell .ui-character-tabs{display:flex;gap:10px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 0;margin:0 0 24px}body.gml-shell .ui-character-tabs button{flex:1;background:transparent;border-color:transparent;font-size:14px;padding:10px}
body.gml-shell .ui-equipment-board{display:grid;grid-template-columns:minmax(0,1fr) 180px minmax(0,1fr);align-items:center;gap:16px;padding:4px 0 24px}.ui-slot-col{display:grid;gap:10px}
body.gml-shell .ui-slot{min-width:0;min-height:80px;display:flex;gap:10px;align-items:center;text-align:left;background:var(--ink);border-color:var(--line);padding:12px;border-radius:6px}body.gml-shell .ui-slot.occupied{border-color:#6b6550;background:var(--panel-alt)}body.gml-shell .ui-slot .ui-icon{color:var(--gold);width:23px}body.gml-shell .ui-slot span{min-width:0}body.gml-shell .ui-slot small{display:block;font-size:11px}body.gml-shell .ui-slot b{display:block;font-size:13px;line-height:1.6;font-weight:500}body.gml-shell .ui-slot:not(.occupied) b{color:var(--muted)}body.gml-shell .ui-body-figure{text-align:center;color:var(--gold);position:relative}.ui-figure{width:100%;display:block;max-height:350px}.ui-body-figure>span{font-family:var(--serif);font-size:13px;color:var(--muted)}
body.gml-shell .ui-loadout-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:14px 0}.ui-loadout-footer>span{font-size:12px;color:var(--muted)}body.gml-shell .ui-loadout-footer button{font-size:13px}body.gml-shell .ui-actual-effects{padding:0 0 18px}body.gml-shell .ui-actual-effects p{font-size:14px}.ui-actual-effects small{font-size:12px}
body.gml-shell .ui-character-links{display:flex;gap:10px;border-top:1px solid var(--line);padding-top:20px;margin-top:20px}body.gml-shell .ui-character-links button{flex:1;background:transparent}
body.gml-shell .ui-inventory-search label{display:block;font-size:13px;color:var(--muted);margin-bottom:8px}body.gml-shell .ui-bag-meta{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--muted);margin:15px 0}body.gml-shell .ui-inventory-list{display:grid;gap:8px}body.gml-shell .ui-item-row{display:flex;align-items:center;text-align:left;gap:14px;background:var(--ink);padding:16px;min-height:78px}body.gml-shell .ui-item-row>.ui-icon{color:var(--gold);width:27px;height:27px}body.gml-shell .ui-item-row>span{flex:1;min-width:0}body.gml-shell .ui-item-row b{display:block;font-size:15px;font-weight:500}body.gml-shell .ui-item-row small{display:block;font-size:12px;margin-top:5px}body.gml-shell .ui-item-row>strong{font:16px var(--serif);color:var(--gold);flex:none}
body.gml-shell .ui-item-detail{max-width:600px;margin:auto;text-align:center;padding:8px 0 12px}body.gml-shell .ui-item-emblem{margin:10px auto 24px;width:85px;height:85px;border:1px solid var(--gold);border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--gold);background:var(--ink)}body.gml-shell .ui-item-emblem svg{height:39px;width:39px}body.gml-shell .ui-item-detail>span{font-size:13px;color:var(--muted)}body.gml-shell .ui-item-detail>p{line-height:1.9;text-align:left}body.gml-shell .ui-item-facts{border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:23px 0;padding:10px 0}body.gml-shell .ui-item-facts>div{display:flex;justify-content:space-between;gap:14px;padding:10px 4px;font-size:14px}body.gml-shell .ui-item-facts span{color:var(--muted)}body.gml-shell .ui-item-controls{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}body.gml-shell .ui-item-controls>button{flex:1 1 150px}
body.gml-shell .ui-attributes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}body.gml-shell .ui-attributes>div{padding:16px;border:1px solid var(--line);background:var(--ink);border-radius:6px}body.gml-shell .ui-attributes span{display:block;color:var(--muted);font-size:12px}body.gml-shell .ui-attributes b{font:28px var(--serif);display:inline-block;padding-top:7px;margin-right:9px;color:var(--text)}body.gml-shell .ui-attributes small{font-size:12px;color:var(--gold)}body.gml-shell .ui-skill-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:26px}body.gml-shell .ui-skill-list>div{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line);padding:12px 0;font-size:13px}body.gml-shell .ui-skill-list b{font-size:12px;color:var(--muted);font-weight:400}
body.gml-shell .ui-empty{padding:32px 20px;border:1px dashed var(--line);color:var(--muted);font-size:14px;line-height:1.8}body.gml-shell .ui-save-warning{border:1px solid var(--danger);padding:18px;background:var(--ink);margin:0 0 20px;color:var(--danger)}body.gml-shell .ui-condition{border-left:2px solid var(--danger);padding:6px 12px}
/* Journal and existing module visual integration, without replacing business logic. */
body.gml-shell :is(.journal-shell,.commerce-shell,.circulation-shell,.trade-finance-shell,.exploration-shell,.society-shell,.communication-shell){background:transparent;color:var(--text)}
body.gml-shell :is(.journal-top,.journal-header,.journal-tabs,.content-tabs,.society-tabs,.circulation-tabs,.commerce-tabs,.communication-tabs){border-color:var(--line);flex-wrap:wrap}body.gml-shell :is(.journal-card,.matter-card,.contract-card,.civic-card,.society-card,.content-card){background:var(--ink);border-color:var(--line);color:var(--text)}body.gml-shell :is(.journal-kicker,.journal-tab-count,.content-card-head,.contract-meta){color:var(--muted)}body.gml-shell .journal-kicker{font-size:11px;letter-spacing:.02em}
body.gml-shell .roll284-overlay{z-index:150;background:#000b;padding:20px}body.gml-shell .roll284-panel{background:var(--panel);border-color:var(--gold);color:var(--text);max-height:calc(var(--viewport-height,100dvh) - 40px)}body.gml-shell .roll284-profile{background:var(--ink)}body.gml-shell .roll284-profile[aria-pressed=true]{border-color:var(--gold);background:var(--panel-alt)}body.gml-shell .roll284-profile strong{color:var(--gold)}body.gml-shell .global-action-busy{z-index:160;max-width:85vw;bottom:26px;right:24px;background:var(--panel);border-color:var(--gold);font-size:13px}
/* The opening keeps eight real choices, with less preamble. */
body.gml-shell .setup-progress{font-size:12px;gap:8px;color:var(--muted);margin-bottom:24px}body.gml-shell .setup-progress b{background:var(--panel-alt);border-color:var(--line);color:var(--gold)}body.gml-shell .opening-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin-top:22px}body.gml-shell .opening-card{min-height:142px;padding:19px;text-align:left;background:var(--ink);border-color:var(--line);border-radius:8px}body.gml-shell .opening-card:hover{border-color:var(--gold);background:var(--panel-alt)}body.gml-shell .opening-card-top{align-items:flex-start;gap:8px}body.gml-shell .opening-card-top b{font:600 18px/1.6 var(--serif);color:var(--text)}body.gml-shell .opening-card-top em{font-size:11px;color:var(--gold);background:transparent}body.gml-shell .opening-summary{font-size:13px;color:var(--muted);line-height:1.8;margin-top:10px}body.gml-shell .opening-experience{display:none}body.gml-shell .opening-badge{display:inline-block;padding:1px 0;color:var(--gold);background:transparent;font-size:11px;border:0}
body.gml-shell .starter-guide-card{display:block;padding:16px 0;margin:0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}body.gml-shell .starter-guide-kicker,body.gml-shell .starter-guide-main h2,body.gml-shell .starter-guide-main>p,body.gml-shell .starter-guide-steps{display:none}body.gml-shell .starter-guide-actions{display:flex;gap:9px;flex-wrap:wrap;align-items:center;margin:0}body.gml-shell .starter-guide-actions button{font-size:13px;padding:8px 14px}body.gml-shell .starter-api-status{font-size:11px;color:var(--muted);padding:0;background:transparent}body.gml-shell .route-banner{background:var(--ink);border-color:var(--line);color:var(--text)}body.gml-shell .attr-row{border-color:var(--line);background:var(--ink);gap:10px}body.gml-shell .attr-row>button{min-width:44px;padding:8px}body.gml-shell .start-bottom-note{font-size:13px;color:var(--muted);display:flex;gap:12px;align-items:center;flex-wrap:wrap}
body.gml-shell .ui-recording-only{display:none}body.gml-shell.ui-recording .ui-nav,body.gml-shell.ui-recording .ui-header-controls,body.gml-shell.ui-recording .ui-life-menu,body.gml-shell.ui-recording .scene-anchor,body.gml-shell.ui-recording #worldControlEntry286,body.gml-shell.ui-recording .ui-dev-disclosure{display:none!important}body.gml-shell.ui-recording #app{padding-left:34px}body.gml-shell.ui-recording .story-panel{max-width:800px}body.gml-shell.ui-recording #uiTopIdentity{font-size:12px}body.gml-shell.ui-recording #uiPrivacyIndicator{font-size:11px}body.gml-shell.ui-recording .topbar{padding-right:120px}body.gml-shell.ui-recording .modal{padding-left:22px}
body.gml-shell.ui-paper :is(#screen,#actionArea){--ink:#e6e8df;--panel:#f5f5ed;--panel-alt:#e3e7dc;--text:#182c26;--muted:#4e6359;--gold:#775b2d;--line:#bac8b9;--danger:#9e4630;color-scheme:light;color:var(--text)}body.gml-shell.ui-paper :is(#screen,#actionArea) button:hover{background:#d4dfd1}body.gml-shell.ui-paper :is(#screen,#actionArea) button.primary{background:#775b2d;color:#fff9e7}
@media(min-width:900px){body.gml-shell.ui-portrait #app{width:430px;padding:0 0 90px;margin:22px auto;border:1px solid var(--line);border-radius:18px;overflow:hidden;min-height:calc(100vh - 44px)}body.gml-shell.ui-portrait .topbar{padding:16px 18px 12px;min-height:73px}body.gml-shell.ui-portrait .ui-brand-mark{width:31px;height:40px;font-size:21px;line-height:39px}body.gml-shell.ui-portrait .ui-brand b{font-size:20px}body.gml-shell.ui-portrait .ui-brand small{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.gml-shell.ui-portrait .ui-context{padding:10px 18px;font-size:11px;gap:8px}body.gml-shell.ui-portrait #screen{border:0;border-radius:0;padding:22px 22px 14px}body.gml-shell.ui-portrait #actionArea{border:0;border-radius:0;padding:14px 18px;background:var(--panel)}body.gml-shell.ui-portrait .ui-nav{top:auto;bottom:0;left:50%;transform:translateX(-50%);width:430px;flex-direction:row;gap:0;border-radius:0;padding:6px 10px 10px}body.gml-shell.ui-portrait .ui-nav button{flex:1;min-height:58px;border-radius:6px;font-size:11px;padding:6px 2px}body.gml-shell.ui-portrait .ui-nav .ui-icon{width:21px;height:21px}body.gml-shell.ui-portrait .modal{padding:0;left:50%;transform:translateX(-50%);width:430px;top:0;bottom:80px}body.gml-shell.ui-portrait .modal-card{width:430px;max-height:100%;height:100%;border-radius:0;padding:0 20px 24px}body.gml-shell.ui-portrait .ui-modal-bar{margin:0 -20px 20px}body.gml-shell.ui-portrait .ui-equipment-board{grid-template-columns:minmax(0,1fr) 78px minmax(0,1fr);gap:6px}body.gml-shell.ui-portrait .ui-slot{padding:10px 8px;min-height:82px;gap:5px}body.gml-shell.ui-portrait .ui-slot .ui-icon{width:17px;height:17px}body.gml-shell.ui-portrait .ui-slot b{font-size:12px}body.gml-shell.ui-portrait .ui-menu-grid{grid-template-columns:1fr}body.gml-shell.ui-portrait .opening-grid{grid-template-columns:1fr}body.gml-shell.ui-portrait #uiRecordExit{right:calc(50% - 204px);font-size:11px}body.gml-shell.ui-portrait.ui-recording #app{padding-left:0;padding-bottom:20px}body.gml-shell.ui-portrait .ui-story-hint{padding:12px 20px}body.gml-shell.ui-portrait .ui-life-menu .choices{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:899px){
 body.gml-shell #app{width:100%;padding:0 0 calc(82px + env(safe-area-inset-bottom));max-width:700px;min-height:100dvh}body.gml-shell .topbar{padding:calc(12px + env(safe-area-inset-top)) 18px 12px;gap:10px;min-height:75px}body.gml-shell .ui-brand{gap:10px}body.gml-shell .ui-brand-mark{width:31px;height:40px;font-size:20px;line-height:39px}body.gml-shell .ui-brand b{font-size:20px;letter-spacing:1px}body.gml-shell .ui-brand small{font-size:10px;max-width:185px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.gml-shell .ui-header-controls{gap:1px}body.gml-shell .ui-header-controls button{padding:8px;min-height:42px;font-size:12px}body.gml-shell #uiHeaderRecord{gap:4px}body.gml-shell .ui-context{padding:12px 19px 12px;font-size:11px;gap:7px 12px}body.gml-shell .ui-context-weather{margin-left:auto}
 body.gml-shell .story-panel{border-radius:0;min-width:0}body.gml-shell #screen{padding:22px 22px 14px;border-radius:0;border-left:0;border-right:0;background:var(--panel);border-top:0}body.gml-shell .scene-title{font-size:23px;margin-bottom:12px}body.gml-shell .scene-meta{font-size:12px;margin-bottom:20px}body.gml-shell .prose{font-size:var(--reader-size,18px);line-height:1.95}body.gml-shell #actionArea{padding:15px 18px 18px;border:0;border-radius:0;position:relative!important;bottom:auto!important;background:var(--panel)}body.gml-shell .free-row{gap:9px}body.gml-shell .free-row textarea{min-height:82px;font-size:16px;padding:12px}body.gml-shell .free-row button{min-width:58px;padding:10px 13px;font-size:14px}
 body.gml-shell .ui-nav{position:fixed;top:auto;bottom:0;left:0;width:100%;border:0;border-top:1px solid var(--line);border-radius:0;display:flex;flex-direction:row;gap:0;justify-content:space-around;align-items:stretch;padding:6px 10px calc(8px + env(safe-area-inset-bottom));background:var(--ink);z-index:50}body.gml-shell .ui-nav button{flex:1;min-height:56px;padding:6px 2px;border-radius:7px;font-size:11px;gap:4px;color:var(--muted)}body.gml-shell .ui-nav button.selected{box-shadow:none;color:var(--gold);background:var(--panel-alt)}body.gml-shell .ui-nav .ui-icon{width:21px;height:21px}body.gml-shell .ui-content-notice{font-size:10px;padding:14px 0 6px}body.gml-shell .ui-story-hint{padding:10px 20px 15px;font-size:12px}
 body.gml-shell .modal{padding:0;top:var(--viewport-top,0px);height:calc(var(--viewport-height,100dvh) - 76px - env(safe-area-inset-bottom));bottom:auto;align-items:stretch;background:var(--panel)}body.gml-shell .modal-card,body.gml-shell .modal-card.journal-modal-card,body.gml-shell .modal-card.commerce-modal-card,body.gml-shell .modal-card.circulation-modal-card,body.gml-shell .modal-card.trade-finance-modal,body.gml-shell .modal-card.market-modal-card,body.gml-shell .modal-card.exploration-modal-card{width:100%;max-width:100%;height:100%;max-height:100%;border:0;border-radius:0;padding:0 20px 24px;box-shadow:none;overscroll-behavior:contain}body.gml-shell .ui-modal-bar{margin:0 -20px 22px;padding:8px 60px 8px 12px;min-height:60px}body.gml-shell .modal-card .x{margin-right:-5px}body.gml-shell .ui-page-head h2{font-size:25px}body.gml-shell .ui-page-head p{font-size:14px}body.gml-shell .ui-menu-grid{grid-template-columns:1fr;gap:8px}body.gml-shell .ui-menu-grid>button{min-height:77px}body.gml-shell .ui-menu-grid b{font-size:15px}
 body.gml-shell .ui-character-head{gap:14px;margin-bottom:20px}body.gml-shell .ui-character-head h2{font-size:24px}.ui-person-seal{transform:scale(.93);transform-origin:left center}body.gml-shell .ui-vitals{gap:15px;padding-bottom:20px}body.gml-shell .ui-vitals b{font-size:23px}body.gml-shell .ui-character-tabs{gap:3px;margin-bottom:20px;padding:8px 0}body.gml-shell .ui-character-tabs button{font-size:13px;padding:8px 7px}
 body.gml-shell .ui-equipment-board{grid-template-columns:minmax(0,1fr) 78px minmax(0,1fr);gap:6px;padding-bottom:18px}body.gml-shell .ui-slot-col{gap:8px}body.gml-shell .ui-slot{min-height:85px;padding:10px 8px;gap:6px}body.gml-shell .ui-slot .ui-icon{width:18px;height:18px}body.gml-shell .ui-slot small{font-size:10px}body.gml-shell .ui-slot b{font-size:12px}body.gml-shell .ui-body-figure>span{font-size:11px}body.gml-shell .ui-loadout-footer{flex-wrap:wrap;gap:8px}body.gml-shell .ui-loadout-footer>span{font-size:11px}body.gml-shell .ui-attributes{gap:8px}body.gml-shell .ui-attributes>div{padding:12px 9px}body.gml-shell .ui-attributes b{font-size:25px}.ui-skill-list{gap:0 18px}
 body.gml-shell .card-grid{grid-template-columns:1fr}body.gml-shell .choices{grid-template-columns:1fr}body.gml-shell .ui-life-menu .choices{grid-template-columns:repeat(2,minmax(0,1fr))}body.gml-shell .ui-life-menu summary{font-size:13px}body.gml-shell .ui-life-menu summary span{font-size:11px}body.gml-shell .opening-grid{grid-template-columns:1fr;gap:11px;margin-top:20px}body.gml-shell .opening-card{min-height:136px;padding:18px}body.gml-shell .opening-card-top b{font-size:19px}body.gml-shell .opening-summary{font-size:13px}body.gml-shell .setup-progress{font-size:10px;gap:5px;flex-wrap:wrap;margin-bottom:20px}body.gml-shell .setup-progress b{width:23px;height:23px;min-width:23px}body.gml-shell .starter-guide-actions button{font-size:12px}body.gml-shell .starter-api-status{width:100%;font-size:11px}
 body.gml-shell.ui-keyboard #app{padding-bottom:0}body.gml-shell.ui-keyboard .ui-nav{display:none}body.gml-shell.ui-keyboard .modal{height:var(--viewport-height,100dvh)}body.gml-shell.ui-keyboard .roll284-overlay{height:var(--viewport-height,100dvh);bottom:auto;top:var(--viewport-top,0px)}body.gml-shell.ui-keyboard .roll284-panel{max-height:calc(var(--viewport-height,100dvh) - 20px)}
 body.gml-shell #uiToast{bottom:calc(89px + env(safe-area-inset-bottom));font-size:13px;width:max-content;max-width:90vw;padding:12px 16px}body.gml-shell #uiLatest{bottom:calc(86px + env(safe-area-inset-bottom));right:16px;min-height:40px;font-size:12px}.global-action-busy{bottom:90px!important}
 body.gml-shell .roll284-overlay{padding:10px}body.gml-shell .roll284-panel{max-height:calc(var(--viewport-height,100dvh) - 20px);padding:18px}body.gml-shell .roll284-panel footer{gap:8px}body.gml-shell .roll284-panel h2{font-size:23px}body.gml-shell .roll284-profiles{gap:7px}body.gml-shell .roll284-profile{padding:10px}body.gml-shell .roll284-two{grid-template-columns:1fr}
 body.gml-shell.ui-recording #app{padding:0 0 18px}body.gml-shell.ui-recording .topbar{padding-right:105px}body.gml-shell.ui-recording #screen{padding-left:25px;padding-right:25px}body.gml-shell.ui-recording .ui-content-notice{padding:12px 0}body.gml-shell.ui-recording .modal{height:var(--viewport-height,100dvh);padding-left:0}body.gml-shell.ui-recording #uiRecordExit{top:max(18px,env(safe-area-inset-top));right:12px;font-size:11px;min-height:34px;padding:7px 9px}body.gml-shell.ui-recording #uiLatest{bottom:22px}body.gml-shell.ui-recording #uiToast{bottom:24px}
}
@media(max-width:359px){body.gml-shell .ui-brand small{max-width:136px}body.gml-shell .ui-header-controls button{padding:5px}body.gml-shell #screen{padding-left:16px;padding-right:16px}body.gml-shell .modal-card{padding-left:16px;padding-right:16px}body.gml-shell .ui-equipment-board{grid-template-columns:minmax(0,1fr) 52px minmax(0,1fr)}body.gml-shell .ui-slot{gap:5px;padding:9px 6px}body.gml-shell .ui-slot .ui-icon{width:15px}body.gml-shell .ui-slot b{font-size:11px}body.gml-shell .ui-attributes{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){body.gml-shell *,body.gml-shell *:before,body.gml-shell *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
body.gml-shell .ui-story-heading{display:flex;justify-content:space-between;gap:12px;font:13px/1.7 var(--serif);color:var(--gold);padding:0 0 16px;border-bottom:1px solid var(--line);margin-bottom:18px}body.gml-shell .ui-story-heading span:last-child{color:var(--muted);font-family:var(--sans);font-size:11px}body.gml-shell .ui-available{margin-top:18px;border-top:1px solid var(--line)}body.gml-shell .ui-available>summary{font-size:13px}body.gml-shell.ui-recording .ui-available{display:none}
/* Explicitly reset inherited stacked header/composer and oversized legacy panel minimums. */
body.gml-shell .topbar{flex-direction:row;align-items:center}
body.gml-shell .story-panel{min-height:0}
body.gml-shell .free-row{flex-direction:row}
body.gml-shell .modal:not(.hidden){display:flex}
body.gml-shell .ui-modal-bar{width:calc(100% + 56px)}
body.gml-shell .modal-card .x{position:absolute;top:8px;right:14px;margin:0;float:none}
body.gml-shell #modalClose{position:sticky;float:right;top:8px;right:auto;margin:8px -12px -52px 0}
@media(max-width:899px){body.gml-shell .ui-modal-bar{width:calc(100% + 40px)}body.gml-shell #modalClose{margin-right:-8px}body.gml-shell .topbar{flex-wrap:nowrap}body.gml-shell .ui-header-controls{flex:none}}
@media(min-width:900px){body.gml-shell.ui-portrait .ui-modal-bar{width:calc(100% + 40px)}}
body.gml-shell .ui-modal-bar #modalClose{position:absolute;right:12px;top:8px;float:none;margin:0;width:42px;height:42px;display:block;padding:0;font-size:26px;border-radius:6px;background:transparent}
body.gml-shell :is(.comm-ui,.society-ui,.civic-ui,.circulation-ui,.commerce-ui,.trade-finance-ui,.market-ui,.exploration-ui) :is(.comm-card,.soc-card,.civic-card,.circulation-card,.commerce-card,.trade-card,.market-card,.exploration-card,.comm-callout,.comm-letter){background:var(--ink);border-color:var(--line);color:var(--text)}
body.gml-shell :is(.comm-meta,.comm-card small,.comm-review dt,.comm-notice,.comm-badge){color:var(--muted)}
body.gml-shell table{max-width:100%;border-collapse:collapse;width:100%;font-size:13px}body.gml-shell th,body.gml-shell td{border-color:var(--line);padding:10px;overflow-wrap:anywhere}body.gml-shell td>button{padding:8px 10px;min-height:40px}
body.gml-shell.ui-recording #uiHeaderGuide{display:none}
body.gml-shell.ui-creating .ui-nav{display:none}body.gml-shell.ui-creating #app{padding-bottom:20px}
body.gml-shell .starter-guide-actions{flex-direction:row!important}body.gml-shell .starter-guide-actions button{flex:1 1 135px;width:auto!important}body.gml-shell .starter-api-status{border:0!important;border-radius:0;text-align:left!important;min-height:0!important}
body.gml-shell .life-feed .feed-entry.opening-prose>div:not(.feed-meta){color:var(--text);font-size:var(--reader-size,18px)}
body.gml-shell.ui-recording .prose,body.gml-shell.ui-recording .feed-entry.ai>div:not(.feed-meta),body.gml-shell.ui-recording .feed-entry.opening-prose>div:not(.feed-meta),body.gml-shell.ui-recording .dialogue{font-size:max(20px,var(--reader-size,18px));line-height:1.95}
body.gml-shell .layout{min-height:0!important}
body.gml-shell.ui-recording .ui-content-notice{position:relative;bottom:auto;line-height:1.6;padding:15px 12px;color:var(--muted)}

body.gml-shell.ui-modal-open{overflow-y:hidden}
