/* 0.47.7: one low-saturation palette; no decorative high-luminance phosphor. */
:root{--ui-bg:#101716;--ui-surface:#151e1c;--ui-panel:#17221f;--ui-border:#374c43;--ui-text:#c1cdc4;--ui-sub:#8c9c92;--ui-accent:#99b4a0;--accent:#99b4a0;--crt:#99b4a0;--crt-bright:#c1d2c5;--lcd-ink:#adc0af;--map-paper:#111c18;--reaction-bg:#1b2822;--r-common:#95b29b;--r-rare:#829eb9;--r-epic:#ad91bb;--r-legendary:#c3b174;--r-mythic:#c18b89}
:root[data-theme="light"]{--ui-bg:#e7e9e0;--ui-surface:#f0f1e8;--ui-panel:#e0e7db;--ui-border:#9aa99b;--ui-text:#34493c;--ui-sub:#596f5f;--ui-accent:#466550;--accent:#466550;--crt:#466550;--crt-bright:#2f4e39;--lcd-ink:#334e3b;--map-paper:#dde4d4;--reaction-bg:#dfe6d9;--r-common:#466751;--r-rare:#385f86;--r-epic:#765181;--r-legendary:#85661c;--r-mythic:#984c48}
html[data-type-font="retro"]{--pixel:'Galmuri11','Galmuri9','Gulim',sans-serif;--mono:'Galmuri11',monospace}
html[data-type-font="gulim"]{--pixel:'Gulim','굴림','Malgun Gothic',sans-serif;--mono:'Gulim','굴림',monospace}
html[data-type-font="pretendard"]{--pixel:'Pretendard','Malgun Gothic',sans-serif;--mono:'Pretendard',monospace}
body,#game-shell,.workspace{background:var(--ui-bg);color:var(--ui-text)}
body button,body input,body select,body textarea{font-family:var(--pixel);}
#game-shell :is(button,input,select,textarea){color:var(--ui-text);border-color:var(--ui-border)}
#game-shell :is(button,input,select,textarea):focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px;box-shadow:none}
#game-shell :is(h1,h2,h3,h4,strong){text-shadow:none}
#game-shell .world-banner{border-color:var(--ui-border);filter:saturate(.55)}
#game-shell #zone-title{font-family:var(--pixel);font-weight:900;letter-spacing:.04em;color:var(--ui-text)!important;text-shadow:none!important}
#game-shell :is(#profile-name,.identity-name h3){font-weight:800;color:var(--ui-text)}
#game-shell :is(.scene-choice,.scene-module,.v07-card,.v17-info,.v17-card,.achievement-card){background:var(--ui-surface)!important;border-color:var(--ui-border)!important;color:var(--ui-text)!important;box-shadow:none;text-shadow:none}
#game-shell :is(.scene-choice,.scene-module) :is(strong,small,span){color:inherit}
#game-shell :is(.scene-choice,.scene-module):hover:not(:disabled){background:var(--reaction-bg)!important;color:var(--ui-text)}
#game-shell .terminal-display{background:var(--map-paper)!important;color:var(--ui-text)!important;box-shadow:inset 0 0 18px #0002;border-color:var(--ui-border)!important;text-shadow:none}
#game-shell .terminal-screen,#game-shell .terminal-screen :is(h3,h4,p,small,b,strong,span){color:var(--ui-text);text-shadow:none}
#game-shell .terminal-screen .muted{color:var(--ui-sub)}
#game-shell .terminal-screen :is(button,.terminal-contact,.thread-row,.v07-card,.pda-organ-card,.terminal-organ-card,.terminal-body-metric,.bag-collapsible){background:transparent!important;color:var(--ui-text)!important;border-color:var(--ui-border)!important;box-shadow:none}
#game-shell .terminal-screen :is(button.active,button[aria-pressed="true"]){background:var(--reaction-bg)!important;color:var(--ui-text)!important}
#game-shell :is(.progress-fill,.meter-fill,.terminal-meter>i,.tiny-meter i b,.pda-meter i,.pda-identity-bar i b){background:var(--ui-accent)!important}
#game-shell .terminal-home-clock{color:var(--ui-text);background:var(--reaction-bg)!important;border-color:var(--ui-border)!important;box-shadow:none}
#game-shell .terminal-clock-dial{background:conic-gradient(var(--ui-accent) var(--dial),var(--ui-border) var(--dial))!important;box-shadow:none}
#game-shell .terminal-clock-dial>div{background:var(--map-paper)!important;color:var(--ui-text)}
#game-shell .terminal-clock-dial strong,#game-shell .clock-job-label,#game-shell .terminal-home-clock small{color:var(--ui-text)!important}
#game-shell .app-grid-crt button{color:var(--ui-text)!important;border-color:transparent!important}
#game-shell .app-grid-crt button :is(span,b,small){color:inherit!important}
.ability-options{grid-template-columns:1fr;gap:10px}
.login-card .ability-option{position:relative;display:grid!important;grid-template-columns:minmax(0,1fr);gap:8px;padding:14px 16px!important;min-width:0;text-align:left;white-space:normal!important;overflow-wrap:anywhere;line-height:1.6;color:var(--ui-text);background:var(--ui-surface);border:1px solid var(--ui-border)}
.login-card .ability-option :is(strong,b,span,small){white-space:normal!important;overflow-wrap:anywhere;min-width:0;line-height:1.6}
.login-card .ability-option strong{padding-right:58px;color:var(--ui-text);font-weight:800}
.login-card .ability-option[aria-checked="true"]{border:2px solid var(--ui-accent)!important;background:var(--reaction-bg)!important;box-shadow:none}
.login-card .ability-option[aria-checked="true"]:after{content:'✓ 선택';position:absolute;top:12px;right:12px;color:var(--ui-text);font-size:11px;background:var(--ui-border);padding:1px 5px}
.left-module .module-head{align-items:start}
.left-module .module-head>span{display:flex;width:100%;gap:8px;align-items:center;justify-content:space-between}
.left-module .babel-status{font:8px var(--mono);margin-left:auto;white-space:nowrap;color:var(--ui-sub);font-weight:400;letter-spacing:0}
#left-ai-report{font-size:12px;line-height:1.6}
#game-shell #typography-toggle{border:0!important;background:none!important;box-shadow:none!important;padding:3px 5px;min-width:28px;color:var(--ui-text);font-size:18px}
#typography-popover{width:min(310px,calc(100vw - 20px));padding:12px}
#typography-popover>label{display:grid;gap:7px;margin-top:12px}
#typography-popover select[hidden]{display:none!important}
.type-icon-group{display:flex;gap:7px}
.type-icon-group button{display:flex;flex:1;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:58px;border:1px solid var(--ui-border);border-radius:3px;background:none}
.type-icon-group button span{font-size:19px}.type-icon-group button small{font-size:10px}
.type-icon-group [aria-pressed="true"]{background:var(--reaction-bg)!important;border:2px solid var(--ui-accent)!important}
.type-gulim span{font-family:'Gulim','굴림',sans-serif!important}.type-pretendard span{font-family:'Pretendard',sans-serif!important}.type-retro span{font-family:'Galmuri11',monospace!important}
#game-shell .field-terminal{padding-bottom:12px!important}
#game-shell .terminal-bezel{min-height:0;padding-bottom:0}
#game-shell .terminal-dock{flex:none;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:center;justify-items:center;gap:13px!important;margin:7px 0 0!important;padding:5px 12px 4px!important;min-height:54px;max-height:62px;background:transparent!important;border:none!important;box-shadow:none}
#game-shell .terminal-dock button{width:52px!important;height:40px!important;min-height:40px!important;max-width:100%;display:flex!important;align-items:center;justify-content:center;padding:6px!important;border-radius:45%!important;background:linear-gradient(#424a45,#242d28)!important;border:1px solid #647064!important;box-shadow:inset 0 1px 1px #a0aaa14d,0 3px 1px #080c09!important;color:#b5c2b5!important;transform:none!important}
#game-shell .terminal-dock svg{width:21px;height:21px;margin:0;display:block}
#game-shell .terminal-dock button:active{transform:translateY(2px)!important;box-shadow:inset 0 1px 3px #080c09!important}
#game-shell .terminal-dock :is(small,.dock-label){display:none!important}
:root[data-theme="light"] #game-shell .terminal-dock button{background:linear-gradient(#cbd0c5,#969e92)!important;color:#344639!important;border-color:#747e70!important}
.pda-screen-stack{position:relative;display:flex;flex:1;min-height:0;overflow:hidden;isolation:isolate}
#terminal-display{width:100%;height:100%;min-height:0;min-width:0;flex:1;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
#terminal-display :is(p,span,small,strong,b,h3,h4,button,label){max-width:100%;overflow-wrap:anywhere}
.pda-crt-glass{position:absolute;inset:0;pointer-events:none!important;z-index:4;opacity:.16;background:repeating-linear-gradient(0deg,transparent 0 2px,#35463a44 2px 3px)}
#terminal-display .pda-app-heading{flex:none;display:flex;align-items:flex-end;justify-content:space-between;gap:4px;flex-wrap:wrap;margin:3px 0 8px}
#terminal-display .pda-app-heading h3{font-weight:800;line-height:1.35;margin:0;font-size:18px}
#terminal-display .pda-app-heading nav{margin:0!important;display:flex;flex-wrap:nowrap;gap:3px;justify-content:flex-start}
#terminal-display .pda-app-heading nav button{width:25px!important;height:25px!important;min-width:25px!important;min-height:25px!important;padding:4px!important;margin:0;border-radius:2px}
#terminal-display .pda-app-heading nav svg{width:15px;height:15px}
#terminal-display .pda-contact-actions{display:flex;gap:3px;flex-wrap:nowrap;justify-content:flex-start;align-items:center;grid-column:2/-1;padding-top:2px}
#terminal-display .pda-contact-actions :is(button,.pda-pin-setting){width:24px!important;height:23px!important;min-width:24px!important;min-height:23px!important;padding:3px!important;margin:0;border-radius:2px}
#terminal-display .pda-contact-actions svg{width:15px;height:15px}
#terminal-display .pda-pin-setting input{width:18px;height:17px;border:0;padding:0}
#terminal-display .friend-online{font-size:9px;white-space:nowrap;overflow-wrap:normal;color:var(--ui-sub)}
#terminal-display .pda-contact-row{padding:7px 2px;gap:4px 8px;grid-template-columns:38px minmax(0,1fr);border-bottom:1px solid var(--ui-border)}
/* The screen height, not the transcript, defines the PDA housing. */
#terminal-display.chat-layout477{overflow:hidden!important;display:flex;flex-direction:column;padding-bottom:8px}
#terminal-display .terminal-screen.chat-screen477:not(.hidden){display:flex!important;flex-direction:column;flex:1;min-height:0;height:100%;overflow:hidden}
.chat-screen477>.terminal-screen-title{flex:none}
.chat-screen477 .comms-page:not(.hidden),.chat-screen477 .colony-page:not(.hidden){display:flex;flex-direction:column;min-height:0;flex:1;overflow:hidden}
#pda-chat-room:not(.hidden),#comms-chat-controls{display:flex;flex-direction:column;min-height:0;flex:1;overflow:hidden}
#pda-chat-room .chat-room-header{flex:none;padding:4px 0 6px;border-bottom:1px solid var(--ui-border)}
#private-radio-list,#party-message-list-v45,#chat-list{flex:1 1 0%!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;padding:4px 1px!important;display:flex!important;flex-direction:column!important;gap:4px!important;scroll-behavior:auto}
#private-radio-list>*,#party-message-list-v45>*,#chat-list>*{flex-shrink:0}
#private-radio-form,#party-message-form-v45,#chat-form{flex:0 0 auto!important;display:flex!important;align-items:end!important;margin:0!important;padding:7px 0 0!important;border-top:1px solid var(--ui-border);position:static!important;background:var(--map-paper)!important;width:100%}
#private-radio-form :is(input,textarea),#party-message-form-v45 :is(input,textarea),#chat-form input{flex:1;min-width:0;width:100%;font-size:12px!important;line-height:1.5;max-height:92px;min-height:33px}
#private-radio-form>button,#party-message-form-v45>button,#chat-form>button{flex:none;width:30px;min-width:30px;height:33px;padding:3px}
#private-radio-form label{min-width:0;flex:1}
.private-message{display:flex!important;align-items:flex-start;gap:7px!important;margin:0!important;padding:4px 0!important;width:100%;border:none!important;background:none!important;min-width:0}
.private-message .comm-avatar{width:36px;height:36px;flex:0 0 36px;border-radius:4px;object-fit:cover;background:var(--reaction-bg)}
.private-message>div{min-width:0;flex:1}.private-message small{display:block;font-size:10px;line-height:1.3;margin-bottom:3px;color:var(--ui-sub)!important}
.private-message p{margin:0;padding:7px 9px;border-radius:7px;border:1px solid var(--ui-border);font-size:12px;line-height:1.55;white-space:pre-wrap;background:var(--ui-surface)}
.private-message.mine{flex-direction:row-reverse}.private-message.mine p{background:var(--reaction-bg)}
.private-message.mine small{text-align:right}
#party-messages-v45{display:flex;flex-direction:column;min-height:0;flex:1;overflow:hidden;border:0;padding:0;margin-top:6px}
#party-messages-v45.hidden{display:none!important}
.party-active477 #pda-party-current{flex:0 1 auto;max-height:43%;overflow:auto}
#terminal-display .pda-party-card{border:1px solid var(--ui-border);padding:6px;background:var(--ui-surface)}
#terminal-display .pda-party-card summary{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;list-style:none}
#terminal-display .pda-party-card summary:before{content:'▸';font-size:10px}
#terminal-display .pda-party-card[open] summary:before{content:'▾'}
#terminal-display .pda-party-card h4{font-size:13px;margin:0}
#terminal-display .pda-party-card .party-card-title small{font-size:8px}
#terminal-display .pda-party-card .pda-danger{min-height:23px;padding:2px 4px;font-size:10px}
.party-line477{display:flex;gap:6px;padding:2px 0;margin:0}
.party-line477 .comm-avatar{width:30px;height:30px;flex:0 0 30px;object-fit:cover;border-radius:3px;background:var(--reaction-bg)}
.party-line477>div{min-width:0;flex:1}.party-line477 strong{display:block;font-size:10px;font-weight:700;line-height:1.3}.party-line477 span{display:block;font-size:12px;line-height:1.4;white-space:pre-wrap}
#colony-timeline{min-height:0;flex:1;display:flex;flex-direction:column;overflow:hidden}
#game-shell #colony-timeline .chat-panel{display:flex!important;flex:1;min-height:0;height:100%;flex-direction:column;overflow:hidden;border:0;background:transparent;padding:0;margin:0;box-shadow:none}
#colony-timeline .local-channel-title{font-size:12px;flex:none;padding:0 0 6px;margin:0;color:var(--ui-sub)!important}
#colony-timeline :is(.online-names,.online-list,.chat-presence,.module-caption,.section-header){display:none!important}
.local-line477{display:flex;align-items:start;gap:6px;margin:0;padding:1px 0;border:0}
.local-line477 .comm-avatar{width:22px;height:22px;flex:0 0 22px;border-radius:3px;object-fit:cover;background:var(--reaction-bg)}
.local-line477>div{min-width:0;flex:1;line-height:1.5;font-size:11px;overflow-wrap:anywhere}
.local-line477 strong{font-weight:800;margin-right:5px;white-space:normal}.local-line477 span{white-space:pre-wrap;word-break:break-word}
.pda-screen-stack>.pda-chat-notice{position:absolute!important;inset:5px 5px auto!important;z-index:15;transform:none!important;margin:0!important;width:auto!important;max-height:155px;overflow:auto;padding:9px 10px;border:1px solid var(--ui-accent);border-radius:3px;background:var(--ui-panel);color:var(--ui-text);box-shadow:0 4px 12px #0004}
.notice-head{display:flex;gap:5px;align-items:center}.notice-head strong{flex:1;min-width:0;font-size:12px;overflow-wrap:anywhere}
.notice-head button{width:24px;height:24px;min-width:24px;min-height:24px;padding:4px;background:transparent;border:0}
.notice-head svg{width:16px;height:16px}.pda-chat-notice p{margin:4px 0 0;white-space:pre-wrap;font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.gift-modal{position:absolute;inset:6px;z-index:20;background:var(--map-paper);color:var(--ui-text);border:1px solid var(--ui-border);padding:12px;overflow:auto;border-radius:3px}
.gift-modal>header{display:flex;align-items:center;justify-content:space-between;gap:8px}.gift-modal h3{font-size:17px;margin:0}.gift-modal header button{width:26px;height:26px;min-height:26px;padding:0}
#gift-target477{font-size:12px;line-height:1.6;overflow-wrap:anywhere}
#gift-form477{display:grid;gap:10px}.gift-line{display:grid;grid-template-columns:minmax(0,1fr) 47px 24px;gap:4px;margin:6px 0}
.gift-line :is(select,input,button){min-width:0;max-width:100%;font-size:11px;padding:5px 3px;min-height:30px;box-sizing:border-box}.gift-line select{width:100%}
#gift-form477 textarea{width:100%;box-sizing:border-box;resize:vertical;max-height:140px}
#gift-form477 small{font-size:10px;line-height:1.5;color:var(--ui-sub)}
.gift-message477{align-self:center;width:92%;box-sizing:border-box;border:1px solid #718e80;border-radius:12px;background:color-mix(in srgb,var(--ui-accent) 13%,var(--map-paper));padding:12px 10px;margin:7px 0;font-size:11px;line-height:1.6;overflow-wrap:anywhere}
.gift-message477 strong{display:block;font-size:11px;font-weight:700}.gift-items477{display:flex;flex-wrap:wrap;gap:4px;margin:7px 0}.gift-items477 span{font-size:10px;border:1px solid var(--ui-border);background:var(--ui-surface);padding:1px 5px;border-radius:3px}.gift-message477 p{margin:8px 0 0;white-space:pre-wrap}
#radar-canvas,#terminal-map-canvas{background:var(--map-paper);position:relative;overflow:hidden;padding:0;border-color:var(--ui-border)}
.pan-map{display:block;width:100%;height:auto;aspect-ratio:1;touch-action:none;user-select:none;cursor:grab;overflow:hidden}
.pan-map:active{cursor:grabbing}.pan-map .map-grid-line{stroke:var(--ui-border);opacity:.4;fill:none;stroke-width:.8}
.pan-map .terrain-lines{fill:none;stroke:var(--ui-sub);opacity:.26;stroke-width:1.1}
.pan-map .terrain-water{stroke:#729d9e;stroke-width:5;opacity:.65;fill:none}
.pan-map .terrain-flat,.pan-map .terrain-canopy{fill:var(--ui-accent);opacity:.13}
.pan-map .terrain-structure{stroke-width:2;fill:var(--ui-border);opacity:.6}
.pan-map .map-landmark{stroke:var(--ui-accent);stroke-width:1.3;fill:none;opacity:.45}
.pan-map .map-route{fill:none;stroke:var(--ui-sub);stroke-dasharray:4 4;stroke-width:1.3;opacity:.85}
.pan-map .route-point{fill:var(--ui-accent);stroke:var(--ui-accent);cursor:pointer}
.pan-map .route-point text{fill:var(--ui-text);stroke:none;font-size:11px;font-family:var(--pixel);font-weight:600;paint-order:stroke;stroke:var(--map-paper);stroke-width:3px;stroke-linejoin:round}
.pan-map .route-point .selection-ring{display:none;fill:none;stroke:#c3b174;stroke-width:3}
.pan-map .route-point.route-selected .selection-ring{display:block!important}
.pan-map .route-point.route-selected>circle:not(.selection-ring),.pan-map .route-point.route-selected>rect{fill:#c3b174!important;stroke:#c3b174!important}
.pan-map .route-point.active>circle:not(.selection-ring){fill:var(--ui-text);stroke:var(--ui-text)}
.pan-map .friend-pin{fill:var(--pin);stroke:var(--pin)}.pan-map .habitat-marker{fill:none;stroke:var(--ui-sub);stroke-dasharray:2 2}.pan-map .habitat-marker text{fill:var(--ui-text);stroke:none;font-size:12px}
.atlas-layer-tabs{display:flex;gap:4px;position:absolute;top:5px;left:5px;z-index:2;flex-wrap:wrap}
#terminal-map-canvas .atlas-layer-tabs button{font-size:10px;padding:3px 5px;min-height:23px;background:var(--map-paper)!important;border:1px solid var(--ui-border)}
#terminal-map-canvas .atlas-layer-tabs button[aria-pressed="true"]{background:var(--ui-border)!important}
.mini-map-controls button,#mini-zoom-in,#mini-zoom-out,[data-pda-zoom]{width:23px!important;min-width:23px!important;height:23px!important;min-height:23px!important;padding:1px!important;font-size:14px!important}
#terminal-display :is(.log-day,.terminal-date,.journal-date){display:block!important;background:none!important;border:0!important;border-radius:0!important;padding:6px 0 2px!important;margin:7px 0 2px!important;box-shadow:none!important;text-align:left!important}
#terminal-display .log-day:before,#terminal-display .log-day:after{display:none!important}
#terminal-display .log-day span{display:inline-block!important;padding:2px 5px!important;background:var(--ui-text)!important;color:var(--map-paper)!important;border-radius:0!important;border:0!important;font-size:10px!important}
#terminal-display .terminal-date{width:max-content;padding:2px 5px!important;background:var(--ui-text)!important;color:var(--map-paper)!important}
#terminal-display #log-list{font-size:12px;line-height:1.6}
#terminal-display .terminal-log,#terminal-display .log-line{margin:0;padding:4px 0;border:0;background:none}
#command-form[hidden],#command-form.hidden{display:none!important}
#command-form[data-operator="true"]{display:flex!important;position:sticky;bottom:0;background:var(--map-paper)!important;min-height:38px;flex:none;z-index:2}
#qa-log-entry477{font-size:10px;padding:4px 7px;min-height:25px;margin-top:5px}
#game-shell .location-section>.section-header{align-items:center;gap:10px;flex-wrap:wrap}
#game-shell #field-status{display:flex!important;flex-direction:row!important;flex-wrap:wrap;gap:5px!important;align-items:center;margin:0 0 0 auto!important;padding:0!important;border:0!important;background:none!important;width:auto;max-width:100%;font-size:9px;}
#field-status :is(.climate-badge,.field-effect,.field-clear,.field-weather){font-size:9px!important;line-height:1.4;padding:2px 5px!important;border:1px solid var(--ui-border);border-radius:3px;background:var(--reaction-bg)!important;color:var(--ui-sub)!important;margin:0!important}
#field-status .field-effect{color:#c5a886!important;border-color:#695846;background:#2a241c!important}
:root[data-theme="light"] #field-status .field-effect{color:#7c512e!important;background:#eee0ce!important}
#field-status .field-clear{color:var(--ui-sub)!important}
#game-shell .environment-strip{display:flex;align-items:baseline;flex-wrap:wrap;gap:7px 13px;padding:8px 0;margin:6px 0;font-size:11px;line-height:1.7;background:none!important;border:0}
#game-shell .environment-strip>span:first-child{display:flex;gap:7px;align-items:baseline;flex:none}
.environment-strip b{font-weight:800!important;margin-right:8px}.environment-strip .env-sep{display:none}
#game-shell #result-ticker{border:1px solid var(--ui-border);background:var(--reaction-bg)!important;border-radius:3px;padding:12px 13px;margin:8px 0;color:var(--ui-text)!important;line-height:1.7}
#result-ticker:empty{display:none}#result-ticker .result-heading{display:none}
#result-ticker .result-line{display:block;font-size:12px;margin:5px 0;white-space:pre-wrap;color:var(--ui-text)}
#result-ticker .result-line time{display:none}
#reaction-combat-log{background:var(--reaction-bg);border:1px solid var(--ui-border);padding:10px 12px;margin:10px 0;border-radius:3px;max-height:275px;overflow-y:auto;overflow-x:hidden}
.combat-line477{display:block;line-height:1.7;font-size:12px;padding:3px 0;overflow-wrap:anywhere}
.combat-line477 strong{color:var(--ui-text);font-weight:700}.combat-line477 b{font-size:10px;color:var(--ui-sub);font-weight:500}
#bag-drag-ghost{width:auto!important;height:auto!important;display:flex;flex-direction:column;gap:3px;padding:5px!important;background:transparent!important;border:0!important;box-shadow:none!important;pointer-events:none!important;opacity:.85;z-index:30000}
.drag-shape477 rect{fill:var(--ui-accent);stroke:var(--map-paper);stroke-width:1}
#bag-drag-ghost small{font-size:10px;background:var(--ui-panel);color:var(--ui-text);padding:3px;max-width:150px;overflow-wrap:anywhere}
#bag-rotate svg{width:18px;height:18px}
#game-shell .achievement-card{display:block;padding:12px;margin:7px 0;border:1px solid var(--ui-border)!important;border-radius:3px}
.achievement-card.unlocked{border-left:3px solid currentColor!important}.achievement-card :is(h3,h4){color:inherit!important}
#game-shell .rarity-common{color:var(--r-common)!important}#game-shell .rarity-rare{color:var(--r-rare)!important}#game-shell .rarity-epic{color:var(--r-epic)!important}#game-shell .rarity-legendary{color:var(--r-legendary)!important}#game-shell .rarity-mythic{color:var(--r-mythic)!important}
.rarity-badge{display:inline-block;font-size:9px;border:1px solid currentColor;border-radius:2px;padding:1px 4px;margin-right:5px;color:inherit!important}
#game-shell .achievement-filter button{font-size:11px;min-height:28px;padding:4px 9px;border-radius:2px;background:transparent}
#game-shell .achievement-filter button.active{background:var(--reaction-bg)!important}
#game-shell .achievement-equipped{padding:8px;background:var(--reaction-bg);border:1px solid var(--ui-border);border-radius:2px}
.public-title477{font-size:10px;line-height:1.4;font-weight:700}
.codex-section-heading{font-size:12px;margin:5px 0 12px;padding-bottom:7px;border-bottom:1px solid var(--ui-border);font-weight:700}
@media(max-width:740px){#game-shell .terminal-dock{margin-top:5px!important;padding:3px 12px 2px!important}.pda-screen-stack{min-height:0}.field-terminal{height:calc(100dvh - 125px)!important;min-height:440px!important;max-height:820px!important}.terminal-bezel{height:100%}.chat-layout477 input,.chat-layout477 textarea{font-size:16px!important}#game-shell .location-section>.section-header #field-status{margin-left:0!important}}
@media(max-width:360px){#terminal-display .pda-app-heading{gap:4px}#terminal-display .pda-app-heading nav button{width:23px!important;min-width:23px!important}.gift-line{grid-template-columns:minmax(0,1fr) 42px 22px}.private-message .comm-avatar{width:32px;height:32px;flex-basis:32px}}
@media(prefers-reduced-motion:reduce){.pda-crt-glass{opacity:.08}.block-cursor{animation:none!important}}
/* Final precedence over earlier shared-shell overrides. */
:root #game-shell .terminal-dock{flex:0 0 55px!important;min-height:55px!important;height:55px!important;max-height:55px!important;gap:13px!important;padding:4px 12px 6px!important;margin:4px 0 0!important;transform:translateY(-3px)}
:root #game-shell .terminal-dock button,:root #game-shell .terminal-dock #terminal-nav-home{height:38px!important;min-height:38px!important;width:52px!important;border-radius:45%!important;background:linear-gradient(#424a45,#242d28)!important;border:1px solid #647064!important;color:#b5c2b5!important;box-shadow:inset 0 1px 1px #a0aaa14d,0 3px 1px #080c09!important}
:root[data-theme="light"] #game-shell .terminal-dock button{background:linear-gradient(#cbd0c5,#969e92)!important;color:#344639!important}
:root #game-shell #result-ticker{background:var(--reaction-bg)!important;border:1px solid var(--ui-border)!important;border-radius:3px!important;padding:12px 13px!important;margin:8px 0!important;box-shadow:none!important}
:root #game-shell #result-ticker .reaction-line{font-size:calc(12px * var(--type-scale))!important;line-height:1.7;margin:4px 0!important;color:var(--ui-text)}
:root #game-shell #result-ticker .reaction-line.warning{color:var(--r-mythic)}
:root #game-shell .left-module .module-head>span{display:flex!important;align-items:center;gap:5px;justify-content:space-between}
:root #game-shell .left-module .babel-status{font-size:7px!important;text-align:right;letter-spacing:0}
:root #game-shell .terminal-screen .field-climate,:root #game-shell #field-status .field-climate{font-size:9px!important;padding:2px 5px!important;line-height:1.4;border:1px solid var(--ui-border);border-radius:3px;margin:0!important;color:var(--ui-sub)!important;background:var(--reaction-bg)!important}
:root #game-shell #field-status .climate-hazard{color:#baa180!important;border-color:#6d5d44!important}
:root #game-shell #field-status .positive{color:var(--ui-accent)!important;border-color:var(--ui-border)!important;background:var(--reaction-bg)!important}
:root #game-shell .achievement-entry{padding:11px 12px;margin:7px 0;background:var(--ui-panel)!important;border:1px solid var(--ui-border)!important;border-radius:3px;box-shadow:none!important;color:var(--ui-text);}
:root #game-shell .achievement-entry.earned{border-left:3px solid currentColor!important}.achievement-entry p{line-height:1.65;font-size:11px;color:var(--ui-sub)!important;margin:8px 0}.achievement-entry .achievement-progress{height:3px;background:var(--ui-border);border-radius:0}.achievement-entry .achievement-progress span{background:currentColor!important}.achievement-entry .achievement-row{align-items:flex-start;gap:8px}.achievement-entry .achievement-row>span{font-size:9px;flex:none}.achievement-entry .achievement-footer{flex-wrap:wrap;gap:7px;font-size:10px}.achievement-entry button{font-size:10px!important;min-height:25px;padding:3px 7px;border-radius:2px}
.anonymous-comm{display:grid;place-items:center;color:var(--ui-sub);fill:currentColor}.anonymous-comm svg{width:80%;height:80%;fill:currentColor}
svg.pan-map[data-map-big="0"] .route-point text{font-size:17px}
svg.pan-map[data-map-big="1"] .route-point text{font-size:15px}
:root #game-shell .terminal-screen .log-day{background:transparent!important;border-radius:0!important;padding:6px 0 2px!important;display:block!important;color:var(--ui-text)!important}
:root #game-shell .terminal-screen .log-day>span{border-radius:0!important;background:var(--ui-text)!important;color:var(--map-paper)!important;padding:2px 5px!important}
:root #game-shell #terminal-display #reaction-combat-log{color:var(--ui-text)}

/* Use the same palette even where legacy panels consume the shell/LCD tokens. */
:root[data-theme="dark"]{--ui-bg:#101716;--ui-surface:#151e1c;--ui-panel:#17221f;--ui-border:#374c43;--ui-text:#c1cdc4;--ui-sub:#8c9c92;--ui-accent:#99b4a0;--shell-bg:#101716;--shell-panel:#151e1c;--shell-raised:#1b2822;--shell-input:#101a15;--shell-text:#c1cdc4;--shell-sub:#8c9c92;--shell-accent:#99b4a0;--shell-line:#374c43;--shell-screen:#111c18;--shell-screen-text:#adc0af;--pda-screen:#111c18;--pda-ink:#c1cdc4;--pda-hi:#adc0af;--pda-muted:#8c9c92;--pda-trim:#374c43}
:root[data-theme="light"]{--shell-bg:#e7e9e0;--shell-panel:#f0f1e8;--shell-raised:#dfe6d9;--shell-text:#34493c;--shell-sub:#596f5f;--shell-accent:#466550;--shell-line:#9aa99b;--shell-screen:#dde4d4;--shell-screen-text:#334e3b;--pda-screen:#dde4d4;--pda-ink:#34493c;--pda-hi:#466550;--pda-muted:#596f5f;--pda-trim:#9aa99b}
html:root[data-console="true"] #command-form{display:flex!important}
html:root[data-console="true"] #pda-help-v472:not(.hidden){display:block!important}
:root #game-shell #profile-name{font-weight:800!important}
:root #game-shell svg.pan-map[data-map-big="0"] .route-point text{font:17px var(--pixel)!important}
:root #game-shell svg.pan-map[data-map-big="1"] .route-point text{font:15px var(--pixel)!important}

:root #game-shell .terminal-screen .anonymous-comm,:root #game-shell .terminal-screen .anonymous-comm svg{color:var(--ui-sub)!important;fill:var(--ui-sub)!important}
:root #game-shell .terminal-screen .anonymous-comm :is(circle,path){fill:var(--ui-sub)!important;stroke:none!important}
:root #game-shell .terminal-screen button svg{color:var(--ui-accent)!important;stroke:currentColor!important}

/* Settings is a sibling of the game shell, not a descendant of it. */
:root #profile-dialog .achievement-entry{padding:11px 12px;margin:7px 0;background:var(--ui-panel)!important;border:1px solid var(--ui-border)!important;border-radius:3px!important;box-shadow:none!important;color:var(--ui-text);font-family:var(--pixel)}
:root #profile-dialog .achievement-entry.earned{border-left:3px solid currentColor!important}
:root #profile-dialog .achievement-entry .achievement-row strong{color:inherit!important;font-size:12px;font-weight:700;overflow-wrap:anywhere}
:root #profile-dialog .achievement-entry.locked{opacity:.7}
:root #profile-dialog .achievement-equipped{padding:9px 10px!important;background:var(--reaction-bg)!important;border:1px solid var(--ui-border)!important;border-radius:3px!important;color:var(--ui-text)!important}
:root #profile-dialog .achievement-equipped>span{color:var(--ui-sub)!important}
:root #profile-dialog .achievement-equipped>strong{color:var(--ui-text)!important}
:root #profile-dialog .achievement-filter button{font-size:11px;min-height:28px;padding:4px 9px;border-radius:2px!important;color:var(--ui-text)!important;border:1px solid var(--ui-border)!important;background:transparent!important;box-shadow:none!important}
:root #profile-dialog .achievement-filter button.active{background:var(--reaction-bg)!important;border-color:var(--ui-accent)!important}
:root #profile-dialog .rarity-common{color:var(--r-common)!important}
:root #profile-dialog .rarity-rare{color:var(--r-rare)!important}
:root #profile-dialog .rarity-epic{color:var(--r-epic)!important}
:root #profile-dialog .rarity-legendary{color:var(--r-legendary)!important}
:root #profile-dialog .rarity-mythic{color:var(--r-mythic)!important}
