/* TectoScout V1.1: application chrome only. Scientific palettes and canvas stay owned by their renderers. */
:root {
  color-scheme:dark;
  --ts-bg:#10171d;
  --ts-surface:#182229;
  --ts-surface-2:#202e36;
  --ts-border:#41535c;
  --ts-text:#edf2f4;
  --ts-muted:#b4c2c9;
  --ts-brand:#58c4b2;
  --ts-brand-ink:#092824;
  --ts-success:#80c9a2;
  --ts-warning:#e4bc70;
  --ts-error:#ef929d;
  --ts-radius:10px;
  --ts-shadow:0 12px 36px #0005;
  --bg:var(--ts-bg); --panel:var(--ts-surface); --panel2:var(--ts-surface-2);
  --panel-hover:var(--ts-surface-2); --line:var(--ts-brand); --accent:var(--ts-brand);
  --text:var(--ts-text); --muted:var(--ts-muted); --blue:var(--ts-brand);
  --amber:var(--ts-brand); --amber-dim:#58c4b212; --radius:var(--ts-radius);
}
.ts-public { background:var(--ts-bg); color:var(--ts-text); font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.ts-public :is(h1,h2,h3,h4,button,input,select,textarea,.back,#back) { font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important; }
.ts-public *, .ts-public *::before, .ts-public *::after { box-sizing:border-box; }
.ts-public :is(a,button,input,textarea,select,summary,[tabindex]):focus-visible {
  outline:3px solid var(--ts-brand) !important; outline-offset:3px;
}
.ts-public :is(button,input,select,textarea) { font:inherit; }
.ts-public :is(button,select,textarea,input:not([type=range]):not([type=checkbox]):not([type=radio]):not([type=color])) {
  border:1px solid var(--ts-border) !important; border-radius:7px !important;
  background:var(--ts-surface-2) !important; color:var(--ts-text) !important;
  font-size:12px; min-width:0; max-width:100%; line-height:1.4;
}
.ts-public button { font-weight:600 !important; box-shadow:none !important; white-space:normal; overflow-wrap:anywhere; }
.ts-public :is(button,summary,a) { -webkit-tap-highlight-color:transparent; }
.ts-public button:not(:disabled):hover { border-color:var(--ts-brand) !important; filter:none !important; }
.ts-public button:disabled { opacity:.55 !important; cursor:not-allowed; }
.ts-public :is(button.primary,.gs-rs-tutorial-primary,.gs-maqueta-tutorial-primary,.gs-fb-submit,.gs-processing-accept,[data-priority=run],#gsRsZipLoadBtn) {
  background:var(--ts-brand) !important; color:var(--ts-brand-ink) !important; border-color:var(--ts-brand) !important;
}
.ts-public :is(button[aria-pressed=true],button.active,button.on,button.is-active) {
  border-color:var(--ts-brand) !important; background:#25463f !important;
}
.ts-public :is(input[type=range],input[type=checkbox],input[type=radio]) { accent-color:var(--ts-brand); }
.ts-public input::placeholder,.ts-public textarea::placeholder { color:var(--ts-muted); opacity:1; }
.ts-public :is(#panel,#topbar,#legend,#gsV5430FeatureInspector,.gs-priority-v05,.gs-project-panel) {
  background:var(--ts-surface) !important; color:var(--ts-text) !important;
  border-color:var(--ts-border) !important; border-radius:var(--ts-radius) !important; box-shadow:var(--ts-shadow);
}
.ts-public #panel { scrollbar-color:var(--ts-border) var(--ts-surface); }
.ts-maqueta #topbar { max-width:calc(100vw - 438px); flex-wrap:wrap; }
.ts-public #panel :is(h2,h3,.section-title,.gs-section-title,.gs-accordion-header,summary) { color:var(--ts-text) !important; }
.ts-public #panel :is(p,.muted,.gs-wl-empty) { color:var(--ts-muted); }
.ts-public #panel :is(summary,.row,.section) { border-color:var(--ts-border); }
.ts-public #panel :is(summary)::before { color:var(--ts-brand); }
.ts-public #topbar :is(h1,b) { color:var(--ts-text); font-size:15px; font-weight:650; }
.ts-public #topbar small { color:var(--ts-muted); }
.ts-public :is(.badge,.tag,#legendFamily) { border-color:var(--ts-border) !important; background:var(--ts-surface-2) !important; color:var(--ts-muted) !important; }
.ts-public :is(.status,.gs-priority-explanation) { background:var(--ts-surface-2); color:var(--ts-muted); border-color:var(--ts-border); }
.ts-public :is(.gs-priority-v05,.gs-project-panel) { font-size:12px; }
.ts-app-home { flex:none; display:grid; place-items:center; width:36px; height:36px; border-radius:7px; }
.ts-app-home img { display:block; }
.ts-info-brand { display:block; max-width:920px; margin:0 auto 26px; }
.ts-info-brand img { max-width:100%; height:auto; }
.ts-public :is(.back,#back) { border:1px solid var(--ts-border); border-radius:7px; background:var(--ts-surface); color:var(--ts-text); box-shadow:none; }
.ts-home .brand-logo { width:80px; height:80px; margin-bottom:20px; }
.ts-home .brand h1 { font-size:clamp(36px,5vw,48px); letter-spacing:-1.5px; font-weight:650; }
.ts-home .brand h1 .accent { color:var(--ts-text); }
.ts-home .brand p { max-width:520px; margin:0 auto; color:var(--ts-muted); }
.ts-home .brand { margin-bottom:36px; }
.ts-home .card { border-color:var(--ts-border); min-height:165px; box-shadow:none; }
.ts-home .card:hover { transform:translateY(-2px); border-color:var(--ts-brand); box-shadow:var(--ts-shadow); }
.ts-home .card h2 { font-size:20px; font-weight:650; }
.ts-home .card p { line-height:1.6; }
.ts-home :is(.arrow,.comentarios-icon) { color:var(--ts-brand); border-color:var(--ts-border); background:transparent; }
.ts-home .comentarios { border-color:var(--ts-border); background:var(--ts-surface); }
.ts-home .comentarios h3 { color:var(--ts-text); }
.ts-public .foot { color:var(--ts-muted); }
.ts-info h1 { color:var(--ts-text); font-weight:650; }
.ts-info :is(.section,.card,.support-card) { border-color:var(--ts-border); }
.ts-public .ts-aoi-guide { background:var(--ts-surface-2); color:var(--ts-text); }
.ts-public #gsAoiVisualGuide :is(p,dt,.ts-aoi-progress) { color:var(--ts-muted); }
.ts-public .ts-aoi-reference-label { background:var(--ts-surface); color:var(--ts-text); }
/* Keep map controls and the draft visible above the bottom panel. */
@media(max-width:900px) {
  .ts-remote #panel { bottom:12px; max-height:46vh; }
  .ts-remote #back { left:12px; bottom:calc(46vh + 24px); padding:8px 12px; }
  .ts-remote #legend { bottom:calc(46vh + 24px); max-height:32vh; }
  .ts-maqueta #panel { top:auto; bottom:12px; left:12px; right:12px; width:auto; max-height:46vh; }
  .ts-maqueta #topbar { right:12px; left:12px; top:12px; max-width:none; }
}
@media(max-width:600px) {
  .ts-public #topbar { padding:8px; gap:8px; }
  .ts-public #topbar :is(h1,b) { font-size:12px; }
  .ts-public #topbar small { font-size:10px; }
  .ts-remote #backendStatus { display:none; }
  .ts-public #panel { padding:12px; }
  .ts-public :is(#gsRsTutorialHelp,#gsMaquetaTutorialHelp) { padding:8px; font-size:11px; }
  .ts-home .page { padding-top:28px; }
  .ts-info .page { padding:26px 18px 44px; }
}
@media(prefers-reduced-motion:reduce) { .ts-public * { scroll-behavior:auto !important; transition:none !important; animation:none !important; } }
/* Dynamically created panel containers retain their existing event owners. */
.ts-public :is(#gsPriorityV05,#gs2dParityRoot,#gsals-panel,#gsMaquetaActiveLayers,#gsV5430MaquetaPanel,#gs-v5427b-zip-import-section,.gs-rs-basemap-controls,.gsrs-work-card,.gs-product-section) {
  background:var(--ts-surface) !important; border-color:var(--ts-border) !important; border-radius:var(--ts-radius) !important;
}
.ts-public #panel { font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important; }
.ts-public #panel :is(input,textarea,select,button) { font-family:inherit !important; }
.ts-info :is(.support,.method,.monthly-card,.telemetry-control) { background:var(--ts-surface); border-color:var(--ts-border); border-radius:var(--ts-radius); }
.ts-info .btn:not(.secondary),.ts-info .tabs button[aria-selected=true] { background:var(--ts-brand) !important; color:var(--ts-brand-ink) !important; border-color:var(--ts-brand) !important; }
.ts-info .brand img { display:block; max-width:100%; height:auto; }
.ts-public #gsV5430MaquetaPanel > div:first-child { color:var(--ts-text) !important; }
.ts-public #gsV5430MaquetaDetail { color:var(--ts-muted) !important; }
.ts-public #gs-v5427b-zip-import-section span { color:var(--ts-brand) !important; border-color:var(--ts-border) !important; }
.ts-public :is(#gsDynamicLegendV5430,#geoscout-basemap-v18) { background:var(--ts-surface) !important; border-color:var(--ts-border) !important; box-shadow:var(--ts-shadow) !important; }
.ts-public :is(.gs-fb-panel,.gs-processing-dialog) { background:var(--ts-surface); color:var(--ts-text); border-color:var(--ts-border); border-radius:var(--ts-radius); box-shadow:var(--ts-shadow); }
.ts-public :is(.gs-fb-title,.gs-fb-label,.gs-fb-check-label,.gs-processing-dialog h2) { color:var(--ts-text); }
.ts-public :is(.gs-fb-subtitle,.gs-fb-diag-note,.gs-processing-dialog p,.gs-processing-dialog li) { color:var(--ts-muted); }
.ts-public :is(.gs-processing-reference,.gs-processing-actions) { background:var(--ts-surface-2); border-color:var(--ts-border); }
.ts-public .gs-processing-badge { color:var(--ts-brand); border-color:var(--ts-border); }
.ts-public .gs-fb-status--sending { color:var(--ts-warning); }
.ts-public .gs-fb-status--success { color:var(--ts-success); }
.ts-public .gs-fb-status--error { color:var(--ts-error); }
@media(max-width:900px) {
  .ts-maqueta #gsDynamicLegendV5430 { bottom:calc(46vh + 70px) !important; left:12px !important; width:min(270px,calc(100vw - 24px)) !important; max-height:24vh !important; }
  .ts-maqueta #back { bottom:calc(46vh + 24px) !important; left:12px !important; padding:8px 12px; }
  .ts-maqueta #gsMaquetaScaleV5430 { bottom:calc(46vh + 24px) !important; left:auto !important; right:12px !important; transform:none !important; padding:4px 8px !important; }
}
