#sphere-companion { position:fixed; z-index:5000; box-sizing:border-box; display:flex; flex-direction:column; overflow:hidden; background:var(--pn); color:var(--tx); border:1px solid var(--bd); border-radius:5px; box-shadow:var(--sh3); font:inherit; }
#sphere-companion{background:var(--pn);color:var(--tx);border:2px solid var(--bd-hi,var(--bd));box-shadow:var(--sh3)} #sphere-companion header{background:color-mix(in srgb,var(--ac) 7%,var(--pn))} #sphere-companion-readout{color:var(--tx)} #sphere-companion button{border-color:var(--bd-hi,var(--bd));color:var(--tx);background:var(--bg)}
#sphere-speculum { position:fixed; z-index:5001; box-sizing:border-box; overflow:auto; background:var(--pn); color:var(--tx); border:2px solid var(--bd-hi,var(--bd)); border-radius:5px; box-shadow:var(--sh3); font:14px var(--text-font); }
#sphere-speculum[hidden]{display:none} #sphere-speculum header{display:flex;gap:4px;padding:7px 8px;background:color-mix(in srgb,var(--ac) 7%,var(--pn));border-bottom:1px solid var(--bd-hi,var(--bd))} #sphere-speculum button{font:inherit;color:var(--tx);background:var(--bg);border:1px solid var(--bd-hi,var(--bd));cursor:pointer} #sphere-speculum-move{flex:1;cursor:move!important;font-weight:700;touch-action:none} #sphere-speculum-readout{padding:9px 10px;margin:0;color:var(--tx);border-bottom:1px solid var(--bd);line-height:1.4} #sphere-speculum-positions{padding:8px 10px} #sphere-speculum table{width:100%;border-collapse:collapse} #sphere-speculum th,#sphere-speculum td{padding:6px 7px;border-bottom:1px solid var(--bd);text-align:right;font-variant-numeric:tabular-nums} #sphere-speculum th{color:var(--tx);text-align:left} #sphere-speculum-resize{position:absolute;right:1px;bottom:1px;width:26px;cursor:nwse-resize!important;touch-action:none} #sphere-speculum-reset{min-width:48px}
#sphere-companion, #sphere-companion * { transition:none!important; animation:none!important; }
#sphere-companion[hidden] { display:none; }
#sphere-companion header { display:flex; gap:4px; padding:5px; flex-shrink:0; border-bottom:1px solid var(--bd); }
#sphere-companion button { font:inherit; min-height:26px; cursor:pointer; }
#sphere-companion-view { max-width:108px; min-height:26px; color:var(--tx); background:var(--bg); border:1px solid var(--bd-hi,var(--bd)); font:inherit; }
#sphere-companion-move { flex:1; cursor:move!important; touch-action:none; }
:is(#sphere-companion,#sphere-speculum) :is(button,summary,select,input):focus-visible { outline:2px solid var(--a2); outline-offset:1px; }
#sphere-companion-readout { padding:4px 8px; margin:0; color:var(--td); flex-shrink:0; }
#sphere-companion svg { width:100%; flex:1; min-height:70px; display:block; }
#sphere-companion details { padding:4px 26px 5px 8px; max-height:40%; overflow:auto; flex-shrink:0; }
#sphere-companion summary { cursor:pointer; min-height:26px; }
#sphere-companion table { width:100%; font:inherit; color:var(--tx); } #sphere-companion th { text-align:left; }
#sphere-companion-resize { position:absolute; bottom:1px; right:1px; width:26px; cursor:nwse-resize!important; touch-action:none; }
.sph-companion-controls { display:flex; align-items:center; gap:6px; flex-wrap:wrap; padding:6px 8px; border-bottom:1px solid var(--bd); flex-shrink:0; }
.sph-companion-controls input { width:85px; } .sph-companion-controls output { min-width:36px; }
#sphere-companion-close { min-width:30px; flex-shrink:0; } #sphere-companion-reset { min-width:48px; flex-shrink:0; }
#sphere-companion svg text { font-family:TopoGlyph,serif; }

/* Popup chrome follows the active theme; SVG fills and body colors remain renderer-owned. */
:is(#sphere-companion,#sphere-speculum) button:hover { background:color-mix(in srgb,var(--ac) 12%,var(--bg)); }
:is(#sphere-companion,#sphere-speculum) button[aria-pressed=true] { background:var(--ac);color:var(--bg);border-color:var(--ac); }

/* Position labels use a panel-color halo, keeping fine glyphs legible over lines. */
#sphere-companion svg text { paint-order:stroke fill; stroke:var(--pn);stroke-width:2.5px;stroke-linejoin:round;font-weight:600; }
#sphere-companion svg .sphere-degree-label { font-family:var(--text-font),sans-serif;font-variant-numeric:tabular-nums; }
#sphere-companion-readout { color:var(--tx);line-height:1.4; }
.srlr-chart-window { position:fixed;z-index:5100;top:90px;right:24px;width:min(680px,94vw);max-height:86vh;overflow:auto;resize:both;box-sizing:border-box;background:#08111e;color:#f4f8ff;border:2px solid #9fb7d1;border-radius:9px;box-shadow:0 10px 40px #0009;font:14px var(--text-font,sans-serif); }
.srlr-chart-window[hidden] {display:none!important}
.srlr-chart-window header {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;background:#213247;position:sticky;top:0;z-index:1;touch-action:none;cursor:move}
.srlr-chart-window header strong {flex:1}
.srlr-chart-window p {padding:0 12px;line-height:1.5;font-variant-numeric:tabular-nums}
.srlr-chart-window canvas {display:block;width:100%;height:auto;}
.srlr-chart-window button {color:#ffffff;background:#20384f;border:1px solid #a1bbd3;border-radius:4px;min-height:30px;padding:3px 9px;cursor:pointer;font:inherit}
.srlr-chart-window :is(button,[tabindex]):focus-visible {outline:3px solid #ffe08d;outline-offset:2px}
.srlr-chart-window .srlr-positions {padding:12px;display:block}
.srlr-chart-window table {width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.srlr-chart-window caption {text-align:left;color:#ffe08d;padding-bottom:8px}
.srlr-chart-window th,.srlr-chart-window td {text-align:left;padding:5px 8px;border-bottom:1px solid #405870}
.srlr-chart-window td {text-align:right}
@media(max-width:600px){.srlr-chart-window{right:3vw;top:65px;max-height:88vh}.srlr-chart-window header{padding:8px}}

/* Monochrome astronomical symbols and restrained coordinate typography. */
#sphere-companion{border-radius:14px;font:12px/1.4 TopoGlyph,system-ui,sans-serif}
#sphere-companion svg text{font-family:TopoGlyph,"Noto Sans Symbols 2","Noto Sans Symbols",serif;font-variant-emoji:text;stroke-width:1.7px;font-weight:400}
#sphere-companion svg .sphere-degree-label{font-family:TopoGlyph,system-ui,"Noto Sans Symbols",sans-serif;font-size:8px;font-variant-numeric:tabular-nums;font-weight:500}
#sphere-companion-readout{font:11px/1.4 TopoGlyph,system-ui,sans-serif;padding:5px 9px}
#sphere-companion table{font:11px/1.4 TopoGlyph,system-ui,"Noto Sans Symbols",sans-serif;font-variant-emoji:text}
#sphere-companion th,#sphere-companion td{padding:4px 6px}
.srlr-chart-window{font-variant-emoji:text}

/* Dense coordinate rows match the bordered main-chart tables. */
#sphere-companion table{border-collapse:collapse;width:auto;min-width:100%}
#sphere-companion th,#sphere-companion td{padding:2px 4px;border:1px solid var(--bd);white-space:nowrap}
#sphere-companion svg .sphere-degree-label{stroke:none;letter-spacing:0}
