#workspace-main.gx-active > #chat-view,
#workspace-main.gx-active > #login-view { display:none !important; }
#galaxy-tab,#doc-tab { font:inherit; gap:8px; white-space:nowrap; position:relative; }
/* Editor tabs: only the pressed one looks active, as in VS Code. */
.editor-tabs .editor-tab[aria-pressed="false"] { background:var(--panel); border-top-color:transparent; color:var(--muted); }
.editor-tabs .editor-tab[aria-pressed="false"]:hover { background:var(--bg); color:var(--text); }
.editor-tabs .editor-tab[aria-pressed="true"] { background:var(--bg); border-top-color:var(--accent); color:var(--text); }
.editor-tabs .editor-tab[aria-pressed="false"] .file-log { opacity:.7; }
.file-md { color:#519aba; }
button.tree-file { display:flex; width:100%; background:none; border:0; color:inherit; font:inherit; text-align:left; cursor:pointer; }
button.tree-file:hover { background:#2a2d2e; }
.editor-tabs { overflow-x:auto; flex-shrink:0; }
.editor-tabs > button { flex:none; }
#galaxy-tab:focus-visible,#stream-tab:focus-visible { outline-offset:-3px; }
#galaxy-view,#galaxy-mini {
 --gx-background:var(--bg); --gx-ink:var(--text); --gx-self:var(--accent);
 --gx-friend:var(--text); --gx-close:var(--text); --gx-outer:var(--muted);
 --gx-line:var(--muted); --gx-border:var(--line); --gx-selection:var(--line); color:var(--gx-ink);
}
@supports (color:color-mix(in srgb, currentColor, transparent)) {
 #galaxy-view,#galaxy-mini {
  --gx-friend:color-mix(in srgb, var(--text) 65%, var(--muted));
  --gx-selection:color-mix(in srgb, var(--accent) 12%, var(--bg));
 }
}
#galaxy-view:not([hidden]) { flex:1 1 0; min-height:0; min-width:0; overflow:auto; padding:clamp(10px,2vw,24px); scrollbar-gutter:stable; background:var(--bg); }
#galaxy-view > * { max-width:1180px; margin-inline:auto; }
#galaxy-view button,#galaxy-mini-body button { font:12px/1.5 var(--font); min-height:32px; padding:5px 10px; color:var(--gx-ink); border:1px solid var(--gx-border); background:var(--gx-background); border-radius:2px; }
#galaxy-view button:hover,#galaxy-mini-body button:hover { border-color:var(--gx-ink); }
#galaxy-view button:focus-visible,#galaxy-view summary:focus-visible,.gx-map:focus-visible { outline:2px solid var(--accent); outline-offset:-3px; }
#galaxy-view .gx-message { background:var(--accent); border-color:var(--accent); color:var(--bg); }
#galaxy-view .gx-request { background:transparent; border:1px solid var(--gx-outer); color:var(--gx-ink); }
.gx-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:12px; }
.gx-heading h2 { margin:0; font:20px var(--font); }
.gx-heading p { margin:5px 0 0; }
.gx-layout { display:grid; grid-template-columns:minmax(0,1fr) 240px; border:1px solid var(--gx-border); }
.gx-stage { min-width:0; position:relative; background:var(--gx-background); }
.gx-map { display:block; width:100%; height:min(440px,50vh); max-height:55vh; touch-action:none; cursor:grab; }
.gx-controls { display:flex; position:absolute; right:8px; top:8px; gap:4px; }
#galaxy-view .gx-controls button { min-width:32px; min-height:32px; padding:3px; font-size:17px; }
.gx-list { border-left:1px solid var(--gx-border); max-height:min(440px,50vh); overflow:auto; background:var(--gx-background); min-width:0; }
.gx-list summary { padding:10px; font-size:12px; cursor:pointer; }
.gx-list h3 { font:11px var(--font); margin:12px 8px 3px; overflow-wrap:anywhere; }
.gx-list ul { list-style:none; margin:0; padding:0; }
#galaxy-view .gx-list button { display:block; text-align:left; width:100%; border:0; border-left:2px solid transparent; border-radius:0; overflow-wrap:anywhere; }
#galaxy-view .gx-list button[aria-pressed="true"] { border-left-color:var(--accent); background:var(--gx-selection); }
.gx-subgroup { padding-left:12px; }
.gx-sub { font-size:12px; line-height:1.6; color:var(--gx-ink); }
.gx-person,.gx-requests,.gx-settings,.gx-recs { border-top:1px solid var(--gx-border); padding:12px 0; margin-top:12px; }
.gx-person h3 { font:15px var(--font); overflow-wrap:anywhere; margin:0 0 6px; }
.gx-person p { margin:6px 0; }
.gx-person button,.gx-item button { margin-right:6px; }
.gx-item { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:7px 0; border-bottom:1px solid var(--gx-border); }
.gx-item b { overflow-wrap:anywhere; }
.gx-requests h3,.gx-recs h3 { font-size:13px; }
.gx-settings summary { cursor:pointer; font-size:13px; }
#gx-survey { max-width:660px; padding:12px 0; }
#gx-survey fieldset { min-inline-size:0; border:1px solid var(--gx-border); margin:12px 0; }
#gx-survey legend { font-size:12px; }
.gx-check { display:inline-flex; gap:8px; align-items:center; min-height:32px; margin-right:12px; font-size:12px; }
#gx-survey .gx-check input { appearance:auto; width:16px; height:16px; margin:0; padding:0; accent-color:var(--accent); }
#gx-survey fieldset:disabled { opacity:.5; }
.gx-coach { position:absolute; left:10px; right:10px; bottom:10px; max-width:480px; padding:10px; background:var(--panel); border:1px solid var(--accent); box-shadow:0 3px 10px var(--bg); }
.gx-coach p { font:12px/1.6 var(--font); margin:3px 0; }
#galaxy-mini { flex:0 0 auto; border-top:1px solid var(--gx-border); background:var(--panel); font:11px var(--font); }
#galaxy-mini > summary { padding:5px 12px; cursor:pointer; min-height:24px; }
#galaxy-mini-count { margin-left:10px; font-size:10px; }
#galaxy-mini[open] { max-height:min(170px,24vh); overflow:auto; }
.gx-map.gx-compact { height:clamp(60px,12vh,105px); max-height:105px; touch-action:pan-y; }
.gx-mini-info { display:flex; justify-content:flex-end; padding:2px 10px; }
.gx-empty { padding:8px 12px; }
.request-badge { display:inline-block; min-width:15px; border-radius:8px; padding:1px 4px; background:var(--accent); color:var(--bg); font:10px/1.4 var(--font); }
.request-badge[hidden] { display:none; }
#activity-friends { position:relative; }
#activity-friends .request-badge { position:absolute; top:1px; right:0; }
#mobile-friends { position:relative; }
#galaxy-tab .request-badge,#mobile-friends .request-badge { margin-left:4px; }
.friend-toast-action { border:1px solid var(--accent); padding:5px 8px; margin:8px 8px 0 0; }
#tour-topics { display:grid; gap:7px; }
#tour-topics button,.topic-guides button { text-align:left; border:1px solid #666; padding:7px 9px; border-radius:2px; }
.topic-guides { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
/* Settings-editor frame: table of contents on the left, one section on the right. */
#galaxy-view input:not([type="checkbox"]),#galaxy-view select { color:var(--gx-ink); background:var(--panel); border:1px solid var(--gx-border); }
#galaxy-view input::placeholder { color:var(--gx-friend); opacity:1; }
.gx-heading .gx-search { flex:1; max-width:340px; min-width:120px; margin:0 8px 0 auto; padding:5px 8px; font:12px var(--font); border-radius:2px; }
.gx-heading .gx-search:focus-visible { outline:1px solid var(--accent); outline-offset:-1px; }
.gx-shell { display:grid; grid-template-columns:168px minmax(0,1fr); gap:0; border-top:1px solid var(--gx-border); }
.gx-toc { display:flex; flex-direction:column; padding:8px 0; border-right:1px solid var(--gx-border); position:sticky; top:0; align-self:start; }
#galaxy-view .gx-toc button { display:flex; align-items:center; gap:8px; width:100%; text-align:left; border:0; border-left:2px solid transparent; border-radius:0; background:transparent; padding:6px 12px; }
#galaxy-view .gx-toc button:hover { background:var(--line); }
#galaxy-view .gx-toc button[aria-current="page"] { border-left-color:var(--accent); background:var(--gx-selection); }
.gx-toc-mark { width:22px; color:var(--gx-friend); font-family:var(--font); text-align:center; }
.gx-toc .gx-count { margin-left:auto; font-size:11px; opacity:.75; }
.gx-toc .request-badge { margin-left:auto; }
.gx-content { min-width:0; padding:4px 0 24px 20px; }
.gx-section-head h3 { margin:12px 0 4px; font:600 15px var(--font); }
.gx-section-head p { margin:0 0 12px; }
.gx-banner { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:10px 0 4px; padding:10px 12px; border:1px solid var(--accent); border-left-width:3px; background:var(--gx-selection); }
.gx-banner p { flex:1 1 280px; margin:0; font-size:12px; line-height:1.6; }
.gx-modes { display:inline-flex; margin:10px 0; border:1px solid var(--gx-border); }
#galaxy-view .gx-modes button { border:0; border-radius:0; background:transparent; min-width:84px; }
#galaxy-view .gx-modes button[aria-pressed="true"] { background:var(--gx-selection); color:var(--accent); box-shadow:inset 0 -2px var(--accent); }
.gx-rows { list-style:none; margin:0; padding:0; border-top:1px solid var(--gx-border); }
.gx-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:8px 4px; border-bottom:1px solid var(--gx-border); }
.gx-row:hover { background:var(--panel); }
.gx-row[hidden] { display:none; }
.gx-row-label { display:flex; align-items:center; gap:8px; flex:1 1 200px; min-width:0; }
.gx-row-label b { font:13px var(--font); overflow-wrap:anywhere; }
.gx-row-actions { display:flex; flex-wrap:wrap; gap:6px; }
.gx-glyph { width:30px; text-align:center; font:13px var(--font); color:var(--gx-friend); }
.gx-close-glyph { color:var(--gx-close); } .gx-outer-glyph { color:var(--gx-outer); } .gx-online-dot { color:var(--accent); font-size:10px; }
.gx-tag { display:inline-block; padding:1px 7px; margin:2px 4px 2px 0; border:1px solid var(--gx-border); border-radius:9px; font-size:11px; }
.gx-tag-hot { border-color:var(--gx-self); color:var(--gx-self); }
#galaxy-view .gx-danger { color:var(--gx-ink); border-style:dashed; }
#galaxy-view .gx-danger:hover { border-color:var(--gx-ink); }
.gx-block { margin:14px 0; }
.gx-block h4,.gx-setting h4 { margin:0 0 6px; font:600 13px var(--font); }
.gx-setting { padding:12px 0; border-bottom:1px solid var(--gx-border); max-width:720px; }
.gx-setting[hidden] { display:none; }
.gx-setting p { margin:0 0 8px; }
.gx-setting-cat { color:var(--gx-friend); font-weight:400; }
.gx-setting select,.gx-setting input:not([type="checkbox"]) { font:12px var(--font); padding:5px 8px; border-radius:2px; max-width:100%; }
.gx-setting select:focus-visible,.gx-setting input:focus-visible { outline:1px solid var(--accent); outline-offset:-1px; }
.gx-setting select:disabled,.gx-setting input:disabled { opacity:.5; }
.gx-setting .gx-check input { appearance:auto; width:16px; height:16px; margin:0; accent-color:var(--accent); }
.gx-inline { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.gx-inline input { flex:1 1 180px; min-width:0; }
.gx-topics { display:flex; flex-wrap:wrap; gap:0 4px; border:1px solid var(--gx-border); padding:6px 10px; margin:0; min-inline-size:0; }
.gx-topics:disabled { opacity:.5; }
.gx-topics legend { font-size:12px; padding:0 4px; }
.gx-settings-form .gx-inline { margin-top:14px; }
.gx-tags { display:flex; flex-wrap:wrap; margin:6px 0; }
.gx-list h4 { font:11px var(--font); margin:12px 8px 3px; overflow-wrap:anywhere; opacity:.85; }
.gx-map-section .gx-person { margin-top:0; }
/* Toggle switches and chips: the selected state is written out, not only coloured. */
#galaxy-view .gx-switch { display:inline-flex; align-items:center; gap:10px; border:1px solid var(--gx-border); background:var(--panel); padding:6px 12px 6px 8px; border-radius:2px; text-align:left; }
.gx-switch-track { position:relative; flex:none; width:34px; height:18px; border-radius:9px; background:var(--muted); transition:background .15s; }
.gx-switch-thumb { position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:var(--bg); transition:transform .15s; }
.gx-switch[aria-checked="true"] .gx-switch-track { background:var(--accent); }
.gx-switch[aria-checked="true"] .gx-switch-thumb { transform:translateX(16px); }
.gx-switch-state { min-width:2.6em; font:600 12px var(--font); }
.gx-switch[aria-checked="true"] .gx-switch-state { color:var(--accent); }
.gx-switch[aria-checked="false"] .gx-switch-state { color:var(--gx-friend); }
.gx-switch-label { color:var(--gx-ink); }
.gx-chips,.gx-company-list { display:flex; flex-wrap:wrap; gap:6px; list-style:none; margin:0; padding:0; }
#galaxy-view .gx-chip { border-radius:12px; padding:3px 11px; min-height:28px; background:transparent; border:1px solid var(--gx-border); color:var(--gx-friend); }
#galaxy-view .gx-chip[aria-pressed="true"] { background:var(--gx-selection); border-color:var(--accent); color:var(--accent); font-weight:600; }
#galaxy-view .gx-chip:disabled { opacity:.45; }
.gx-chip-static { display:inline-flex; align-items:center; gap:4px; border:1px solid var(--accent); background:var(--gx-selection); border-radius:12px; padding:2px 4px 2px 11px; font-size:12px; }
#galaxy-view .gx-chip-remove { min-height:22px; min-width:22px; padding:0 6px; border:0; background:transparent; border-radius:50%; }
.gx-companies { display:grid; gap:8px; max-width:520px; }
.gx-survey-off .gx-setting:not(:first-child) h4,.gx-survey-off .gx-setting:not(:first-child) > p { opacity:.6; }
.gx-state { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:4px 0 6px; padding:8px 10px; border:1px solid var(--gx-border); background:var(--panel); max-width:720px; }
.gx-state-title { font:600 12px var(--font); margin-right:4px; }
.gx-pill { display:inline-block; padding:1px 9px; border-radius:10px; border:1px solid var(--gx-border); font-size:11px; }
.gx-pill-on { border-color:var(--accent); background:var(--gx-selection); color:var(--accent); }
.gx-pill-off { color:var(--gx-friend); }
.gx-pill-warn { border-color:var(--gx-ink); border-style:dashed; color:var(--gx-ink); }
@media (prefers-reduced-motion:reduce){ .gx-switch-track,.gx-switch-thumb { transition:none; } }
/* workspace.md: a read-only "markdown source" guide in the editor area. */
#workspace-main.doc-active > #chat-view,#workspace-main.doc-active > #login-view { display:none !important; }
#doc-view:not([hidden]) { flex:1 1 0; min-height:0; overflow:auto; background:#1e1e1e; padding:14px 0 40px; font:13px/1.75 var(--font); color:#d4d4d4; }
.md-line { display:flex; gap:0; padding-right:18px; max-width:980px; }
.md-line .ln { flex:none; width:52px; padding-right:18px; text-align:right; color:#6e7681; user-select:none; }
.md-line .tx { flex:1; min-width:0; white-space:pre-wrap; overflow-wrap:anywhere; }
.md-h1 { color:#569cd6; font-weight:700; } .md-h2 { color:#569cd6; font-weight:600; } .md-quote { color:#6a9955; }
.md-bullet { color:#d7ba7d; } .md-code { color:#ce9178; }
#doc-view .md-link { font:inherit; color:#3794ff; background:none; border:0; padding:0; text-decoration:underline; cursor:pointer; min-height:0; }
#doc-view a.md-link { display:inline; }
#doc-view .md-link:focus-visible { outline:1px solid #007fd4; outline-offset:2px; }
:root[data-ui-theme="forest"] #doc-view:not([hidden]) { background:#1f2721; }
@media(max-width:680px){ .md-line .ln { width:34px; padding-right:10px; } #doc-view:not([hidden]) { font-size:12.5px; } }
@media(max-width:680px){
 .gx-shell { grid-template-columns:minmax(0,1fr); }
 .gx-toc { flex-direction:row; overflow-x:auto; position:static; border-right:0; border-bottom:1px solid var(--gx-border); padding:0; scrollbar-width:thin; }
 #galaxy-view .gx-toc button { width:auto; flex:none; border-left:0; border-bottom:2px solid transparent; padding:8px 10px; }
 #galaxy-view .gx-toc button[aria-current="page"] { border-bottom-color:var(--accent); }
 .gx-toc-mark { display:none; }
 .gx-content { padding:4px 0 20px; }
 .gx-heading { flex-wrap:wrap; }
 .gx-heading .gx-search { order:3; flex-basis:100%; max-width:none; margin:6px 0 0; }
 .gx-layout { grid-template-columns:minmax(0,1fr); }
 .gx-list { border-left:0; border-top:1px solid var(--gx-border); max-height:260px; }
 .gx-map { height:42vh; max-height:55vh; }
 .gx-heading h2 { font-size:18px; }
 #galaxy-mini-count { font-size:9px; }
 #galaxy-view:not([hidden]) { padding:10px; }
 .gx-coach { padding:8px; }
}
@media(forced-colors:active){.gx-map { border:1px solid CanvasText; }.request-badge { border:1px solid ButtonText; }}
