/* VORAX FIRE — design system v3
   Estrutura e tipografia do DTI 360 (Barlow / Barlow Condensed, menu lateral, cartões e KPIs com faixa de cor),
   identidade de fogo da marca Vorax. Temas: escuro (padrão) e claro (body.light). Paletas: html[data-palette].
   Os nomes de classes e variáveis antigos (--bg, --card, --ac, .card, .kpi, .btn.pri…) continuam valendo para os módulos. */

/* ---------------- fontes (SIL OFL, servidas pelo próprio sistema) ---------------- */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(../vendor/fonts/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(../vendor/fonts/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(../vendor/fonts/barlow-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700 900; font-display: swap; src: url(../vendor/fonts/barlow-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url(../vendor/fonts/barlow-condensed-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(../vendor/fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700 900; font-display: swap; src: url(../vendor/fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }

/* ---------------- paletas de fogo (cor principal, secundária e profunda) ---------------- */
:root, :root[data-palette="fogo"] { --ac: #ff5a1f; --ac-2: #ffb703; --ac-3: #d62828; }
:root[data-palette="brasa"] { --ac: #e63946; --ac-2: #ff8a4c; --ac-3: #8d0801; }
:root[data-palette="lava"] { --ac: #ff3d00; --ac-2: #ffd000; --ac-3: #9a031e; }
:root[data-palette="ambar"] { --ac: #f59e0b; --ac-2: #fde047; --ac-3: #c2410c; }
:root[data-palette="magma"] { --ac: #f72585; --ac-2: #ff7b00; --ac-3: #7209b7; }
:root[data-palette="azul"] { --ac: #3b82f6; --ac-2: #22d3ee; --ac-3: #6d28d9; }

/* ---------------- tokens (tema escuro) ---------------- */
:root {
  --fs: clamp(13.5px, .28vw + 10px, 16px);
  --f-head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font: var(--f-body);
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-xl: 20px; --ease: cubic-bezier(.2, .7, .2, 1);
  --sbw: 248px; --sbw-min: 72px; --topbar: 58px;

  --grad: linear-gradient(135deg, var(--ac-3) 0%, var(--ac) 55%, var(--ac-2) 100%);
  --grad-h: linear-gradient(90deg, var(--ac-2), var(--ac) 55%, var(--ac-3));
  --ac-soft: color-mix(in srgb, var(--ac) 14%, transparent);
  --ac-line: color-mix(in srgb, var(--ac) 42%, transparent);
  --ac-t: color-mix(in srgb, var(--ac) 78%, #fff);   /* cor de destaque para texto */
  --on-ac: #1c0800;                                   /* texto sobre a cor principal */
  --glow: 0 0 0 1px var(--ac-line), 0 8px 26px color-mix(in srgb, var(--ac) 32%, transparent);

  --bg: #0c0806; --bg2: #120c09; --card: #181009; --card2: #21170f; --line: #2e2017; --line2: #42301f;
  --surface: var(--card); --surface-2: var(--card2);
  --ink: #f6ede6; --mut: #bba697; --dim: #8b7667;
  --map: #070504;
  --tele: #38e1ff;
  --ok: #22c55e; --warn: #f59e0b; --bad: #ef4444; --info: #60a5fa;
  --ev-sat: #ffb547; --ev-mod: #a78bfa; --ev-prev: #60a5fa; --ev-obs: #34d399; --ev-rel: #fbbf24;
  --ev-ofi: #10b981; --ev-sim: #f472b6; --ev-na: #78716c;
  --sb-bg: #120905; --sb-bg2: #1a0d07; --sb-ink: #f1e3d8; --sb-mut: #a48a78; --sb-line: rgba(255, 255, 255, .07);
  --ov: rgba(16, 10, 7, .9); --ov-ink: #f6ede6;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 18px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
/* ---------------- tema claro ---------------- */
body.light {
  --bg: #f7f2ed; --bg2: #ffffff; --card: #ffffff; --card2: #f6eee7; --line: #ebdfd4; --line2: #dccbbc;
  --ink: #22150e; --mut: #6f5a4b; --dim: #98826f; --map: #e9e2da;
  --tele: #0891b2;
  --ac-t: color-mix(in srgb, var(--ac) 72%, #000);
  --ov: rgba(255, 255, 255, .95); --ov-ink: #22150e;
  --ev-sat: #d97706; --ev-obs: #059669; --ev-rel: #b45309; --ev-mod: #7c3aed; --ev-prev: #2563eb;
  --shadow-sm: 0 1px 2px rgba(60, 30, 10, .07); --shadow: 0 1px 2px rgba(60, 30, 10, .07), 0 6px 16px rgba(60, 30, 10, .07); --shadow-lg: 0 18px 50px rgba(60, 30, 10, .2);
  color-scheme: light;
}
body.contraste { --mut: var(--ink); --dim: var(--ink); --line: var(--line2); }

/* ---------------- base ---------------- */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  height: 100dvh; overflow: hidden; display: grid; grid-template-columns: var(--sbw) minmax(0, 1fr);
  background: var(--bg); color: var(--ink); font: 500 var(--fs)/1.45 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-tap-highlight-color: color-mix(in srgb, var(--ac) 22%, transparent);
  transition: grid-template-columns .22s var(--ease);
}
body.sb-min { --sbw: var(--sbw-min); }
[hidden] { display: none !important; }
h1, h2, h3, h4, h5 { font-family: var(--f-head); font-weight: 700; letter-spacing: .15px; }
a { color: var(--ac-t); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--ac) 35%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.mut { color: var(--mut); }
.skip { position: absolute; inset-inline-start: 8px; top: -80px; z-index: 9000; background: var(--ac); color: var(--on-ac); padding: .4em .7em; border-radius: .4em; }
.skip:focus { top: 4px; }
.ico { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- menu lateral (padrão DTI 360) ---------------- */
#sb {
  grid-column: 1; grid-row: 1; height: 100dvh; display: flex; flex-direction: column; min-width: 0; position: relative; z-index: 60;
  background: linear-gradient(180deg, var(--sb-bg2), var(--sb-bg) 40%); color: var(--sb-ink); border-right: 1px solid var(--sb-line); overflow: hidden;
}
#sb::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad-h); }
#sb::before {
  content: ""; position: absolute; left: -40%; right: -40%; bottom: -30%; height: 55%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--ac) 22%, transparent), transparent 65%); opacity: .55;
}
.brandbar { display: flex; align-items: center; gap: 10px; padding: 16px 14px 10px; min-height: 70px; position: relative; }
#brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; min-width: 0; }
#brand .vf-logo { width: 42px; height: 47px; flex: none; filter: drop-shadow(0 3px 10px color-mix(in srgb, var(--ac) 45%, transparent)); }
#brand .btxt { min-width: 0; }
#brand b { display: block; font: 700 23px/1 var(--f-head); letter-spacing: 1.6px; white-space: nowrap; }
#brand b em { font-style: normal; background: var(--grad-h); -webkit-background-clip: text; background-clip: text; color: transparent; }
#brand small { display: block; font: 600 10px/1.2 var(--f-head); letter-spacing: 2.1px; text-transform: uppercase; color: var(--sb-mut); margin-top: 4px; white-space: nowrap; }
.vf-flame, .vf-core { transform-origin: 32px 35px; animation: flick 2.6s ease-in-out infinite; }
.vf-core { animation-duration: 1.9s; }
.vf-sat { animation: blip 2.4s ease-in-out infinite; }
@keyframes flick { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(.96, 1.05); } 55% { transform: scale(1.03, .97); } 80% { transform: scale(.98, 1.03); } }
@keyframes blip { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

#sbStatus { margin: 4px 12px 6px; padding: 9px 11px; border-radius: 11px; background: rgba(255, 255, 255, .04); border: 1px solid var(--sb-line); position: relative; }
#live { display: flex; align-items: center; gap: 8px; font: 700 12.5px/1.25 var(--f-body); color: #fff; cursor: pointer; }
#live i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 2s infinite; }
#live.warn i { background: var(--warn); } #live.bad i { background: var(--bad); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
#clock { font: 12px/1.35 var(--mono); color: var(--sb-mut); margin-top: 4px; }
#clock b { color: #fff; font-weight: 600; }

.sbnav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 2px 10px 12px; position: relative; scrollbar-color: rgba(255, 255, 255, .14) transparent; }
.sbnav .ng { font: 600 10.5px/1 var(--f-body); text-transform: uppercase; letter-spacing: 1.3px; color: var(--sb-mut); padding: 14px 10px 6px; white-space: nowrap; }
.sbnav a, .sbnav button {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border-radius: 9px; border: 0; background: none; color: var(--sb-ink);
  font: 500 14px/1.2 var(--f-body); text-align: left; text-decoration: none; cursor: pointer; white-space: nowrap; position: relative;
}
.sbnav a .ico, .sbnav button .ico { opacity: .85; width: 19px; height: 19px; }
.sbnav a:hover, .sbnav button:hover { background: rgba(255, 255, 255, .06); }
.sbnav button.on, .sbnav a.on { background: color-mix(in srgb, var(--ac) 18%, transparent); color: #fff; }
.sbnav button.on::before, .sbnav a.on::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.sbnav button.on .ico, .sbnav a.on .ico { opacity: 1; color: var(--ac-2); }
.sbnav .lb { overflow: hidden; text-overflow: ellipsis; }
.sbnav .bdg { margin-left: auto; background: var(--ac); color: var(--on-ac); font: 800 11px/18px var(--f-body); border-radius: 999px; padding: 0 6px; min-width: 18px; text-align: center; }
.sbfoot { border-top: 1px solid var(--sb-line); padding: 8px 10px; display: flex; gap: 4px; align-items: center; position: relative; flex-wrap: wrap; }
.sbfoot button { background: none; border: 0; color: var(--sb-mut); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; min-width: 34px; padding: 0 8px; border-radius: 8px; font: 600 12.5px/1 var(--f-body); }
.sbfoot button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sbfoot .sp { flex: 1; }
body.sb-min .brandbar { justify-content: center; padding: 16px 0 10px; }
body.sb-min #brand .btxt, body.sb-min .sbnav .ng, body.sb-min .sbnav .lb, body.sb-min .sbnav .bdg, body.sb-min #clock, body.sb-min #liveTx, body.sb-min .sbfoot .lbx { display: none; }
body.sb-min #sbStatus { margin: 4px 14px 6px; padding: 10px; display: flex; justify-content: center; }
body.sb-min .sbnav a, body.sb-min .sbnav button { justify-content: center; padding: 10px 0; }
body.sb-min .sbfoot { flex-direction: column; }
#sbScrim { display: none; }

/* ---------------- área do sistema ---------------- */
#shell { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; min-width: 0; height: 100dvh; position: relative; }
#top {
  flex: 0 0 auto; min-height: var(--topbar); display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 9px 16px;
  background: color-mix(in srgb, var(--bg2) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: relative; z-index: 30;
}
#bBurger, #mBrand { display: none; }
#crumb { display: flex; align-items: center; gap: 6px; white-space: nowrap; font: 700 1.05em/1 var(--f-head); letter-spacing: .3px; }
#crumb a { color: var(--ink); text-decoration: none; cursor: pointer; opacity: .78; }
#crumb a:hover { opacity: 1; color: var(--ac-t); }
#crumb > span:last-child { color: var(--ac-t); }
#crumb span.sep { color: var(--dim); }
#back { border: 1px solid var(--line2); background: var(--card); color: var(--ink); border-radius: 9px; height: 34px; min-width: 34px; cursor: pointer; }
#gsw { position: relative; flex: 1 1 170px; max-width: 460px; min-width: 160px; }
#gs {
  width: 100%; height: 38px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 0 12px 0 36px; outline: none;
  box-shadow: var(--shadow-sm); font-weight: 500;
}
#gs:focus { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); }
#gs::placeholder { color: var(--dim); }
#gsw .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); width: 17px; height: 17px; pointer-events: none; }
#gsr {
  position: absolute; top: 44px; left: 0; right: 0; background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px;
  box-shadow: var(--shadow-lg); z-index: 3000; max-height: 60vh; overflow: auto; padding: 4px; margin: 0; list-style: none; color: var(--ink);
}
#gsr li { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
#gsr li:hover, #gsr li.on { background: var(--card2); }
#gsr li small { color: var(--mut); white-space: nowrap; }
.spacer { flex: 1; }
.sel {
  height: 36px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 0 10px; font-weight: 600; font-size: .92em; max-width: 15em; cursor: pointer;
}
.sel option { background: var(--bg2); color: var(--ink); }
.seg { display: inline-flex; background: var(--card2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; flex: none; }
.seg button { border: 0; background: transparent; color: var(--mut); padding: 0 11px; height: 30px; border-radius: 8px; cursor: pointer; font: 700 .9em/1 var(--f-head); letter-spacing: .4px; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button { font-family: var(--f-body); font-size: .84em; }
#viewSeg button { letter-spacing: .6px; }
.seg button.on { background: var(--grad); color: var(--on-ac); box-shadow: 0 2px 8px color-mix(in srgb, var(--ac) 35%, transparent); }
.tools { display: flex; gap: 4px; align-items: center; }
.tb {
  min-width: 36px; height: 36px; padding: 0 9px; border-radius: var(--r); border: 1px solid transparent; background: none; color: var(--mut);
  cursor: pointer; font-weight: 700; font-size: .9em; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
}
.tb:hover { background: var(--card); border-color: var(--line); color: var(--ink); }
.tb.on { background: var(--grad); color: var(--on-ac); }
#bUser { border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 0 12px 0 5px; border-radius: 999px; }
#bUser .av { width: 27px; height: 27px; border-radius: 50%; background: var(--grad); color: var(--on-ac); display: grid; place-items: center; font: 800 12px/1 var(--f-body); }
#bUser:hover { border-color: var(--ac-line); }

/* ---------------- camadas ---------------- */
#chips {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 7px 16px; background: var(--bg); border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; min-height: 44px;
}
#chips .lbl { color: var(--dim); font: 700 .74em/1 var(--f-body); text-transform: uppercase; letter-spacing: 1.2px; white-space: nowrap; margin-right: 4px; }
#chips .mtitle { font: 700 1.15em/1 var(--f-head); color: var(--ink); white-space: nowrap; margin-right: 10px; display: inline-flex; align-items: center; gap: 7px; }
#chips .mtitle .ico { color: var(--ac); }
.chip {
  border: 1px solid var(--line2); background: var(--card); color: var(--mut); border-radius: 999px; padding: 0 12px; height: 30px; font: 700 .84em/1 var(--f-body); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px; transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { color: var(--ink); border-color: var(--ac-line); }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.chip.on { background: var(--ac-soft); border-color: var(--ac); color: var(--ink); }
.chip.on i { box-shadow: 0 0 0 2px color-mix(in srgb, var(--ac) 35%, transparent); }

/* ---------------- mapa + painel ---------------- */
main { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr) 6px var(--pw, clamp(23em, 31vw, 37em)); min-height: 0; }
body.nopanel main { grid-template-columns: minmax(0, 1fr); }
body.nopanel #rsz, body.nopanel aside { display: none; }
#mapwrap { position: relative; overflow: hidden; background: radial-gradient(ellipse at 40% 35%, #1a0e08 0%, var(--map) 70%); }
body.light #mapwrap { background: radial-gradient(ellipse at 40% 35%, #f6efe8 0%, var(--map) 70%); }
#globe, #map2d { position: absolute; inset: 0; }
#rsz { background: var(--line); cursor: col-resize; position: relative; z-index: 5; }
#rsz::after { content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 34px; transform: translate(-50%, -50%); background: var(--dim); border-radius: 2px; }
#rsz:hover, #rsz.drag { background: var(--ac); }
aside { display: flex; flex-direction: column; min-height: 0; background: var(--bg2); border-left: 1px solid var(--line); }
#ptabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: 0 0 auto; }
#ptabs button {
  border: 0; background: transparent; color: var(--mut); padding: 13px 11px 11px; font: 700 .98em/1 var(--f-head); letter-spacing: .4px; cursor: pointer; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
#ptabs button:hover { color: var(--ink); }
#ptabs button.on { color: var(--ink); border-image: var(--grad-h) 1; border-bottom: 3px solid; }
#side { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 30px; }
#side h2 { font: 700 1.62em/1.08 var(--f-head); margin: 0 0 4px; letter-spacing: .2px; }
#side .sub { color: var(--mut); font-size: .86em; line-height: 1.45; margin: 0 0 8px; }
#side h3 {
  font: 700 .78em/1 var(--f-body); text-transform: uppercase; letter-spacing: 1.3px; color: var(--ac-t); margin: 20px 0 9px;
  display: flex; align-items: center; gap: 7px;
}
#side h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent); }
footer {
  flex: 0 0 auto; display: flex; gap: 14px; align-items: center; padding: 5px 16px; font-size: .74em; color: var(--dim); background: var(--bg2); border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden;
}
footer a { color: var(--mut); cursor: pointer; text-decoration: none; }
footer a:hover { color: var(--ac-t); }
footer .kb { margin-left: auto; }

/* ---------------- sobreposições do mapa ---------------- */
.ov { position: absolute; background: var(--ov); border: 1px solid var(--line2); border-radius: 12px; backdrop-filter: blur(8px); color: var(--ov-ink); z-index: 1000; box-shadow: var(--shadow); }
#mtools { right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; background: none; border: 0; backdrop-filter: none; box-shadow: none; }
#mtools .tb { background: var(--ov); border: 1px solid var(--line2); color: var(--ov-ink); backdrop-filter: blur(8px); }
#mtools .tb:hover { border-color: var(--ac); color: var(--ac-t); }
#mtools .tb.on { background: var(--grad); color: var(--on-ac); border-color: transparent; }
#mtools .grp { display: flex; flex-direction: column; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; background: var(--ov); }
#mtools .grp .tb { border: 0; border-radius: 0; border-bottom: 1px solid var(--line2); background: transparent; }
#mtools .grp .tb:last-child { border-bottom: 0; }
#hud { left: 10px; top: 10px; padding: 7px 11px; font: .74em/1.55 var(--mono); color: var(--mut); pointer-events: none; min-width: 15em; }
#hud b { color: var(--ov-ink); font-weight: 600; }
#hud .r { display: flex; justify-content: space-between; gap: 1em; }
#legend { left: 10px; bottom: 10px; font-size: .82em; max-width: min(25em, calc(100% - 5em)); }
#legend .hd { padding: 8px 12px; font: 700 1.05em/1 var(--f-head); letter-spacing: .3px; display: flex; justify-content: space-between; gap: 1em; cursor: pointer; }
#legend .bd { padding: 0 12px 10px; max-height: 38vh; overflow: auto; }
#legend .it { display: flex; align-items: center; gap: 8px; margin: 3px 0; font-size: .92em; }
#legend .sw { width: 13px; height: 13px; border-radius: 4px; flex: 0 0 auto; }
#legend .ramp { height: 8px; border-radius: 4px; margin: 5px 0 2px; }
#legend .scale { display: flex; justify-content: space-between; font-size: .82em; color: var(--mut); }
#attr { right: 8px; bottom: 6px; font-size: 10px; padding: 2px 8px; border-radius: 6px; cursor: pointer; max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: none; }
#attr.open { white-space: normal; max-width: 34em; padding: 9px 12px; font-size: 11px; line-height: 1.5; }
#load { left: 50%; top: 10px; transform: translateX(-50%); padding: 6px 13px; font-size: .84em; display: none; align-items: center; gap: 8px; font-weight: 600; }
#load.on { display: flex; }
#load i { width: 14px; height: 14px; border: 2px solid var(--ac); border-right-color: transparent; border-radius: 50%; animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
#tip {
  position: absolute; z-index: 1100; pointer-events: none; background: var(--bg2); border: 1px solid var(--line2); color: var(--ink); border-radius: 10px; padding: 8px 11px; font-size: .84em; line-height: 1.45;
  box-shadow: var(--shadow-lg); max-width: 22em; border-top: 2px solid var(--ac);
}
#tip b { font-size: 1.04em; }
#drawer { left: 10px; right: 10px; bottom: 10px; max-height: 46%; overflow: auto; padding: 12px 14px; border-radius: 14px; z-index: 1001; border-top: 2px solid var(--ac); }
#drawer .x { position: absolute; right: 8px; top: 7px; }
#scenebar { left: 50%; transform: translateX(-50%); bottom: 10px; padding: 5px 11px; font-size: .78em; display: flex; gap: 10px; align-items: center; white-space: nowrap; }

/* ---------------- componentes do painel (padrão DTI 360) ---------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 13px 14px; margin: 8px 0; box-shadow: var(--shadow-sm); }
.card.hl { border-color: var(--ac-line); background: linear-gradient(160deg, color-mix(in srgb, var(--ac) 10%, var(--card)), var(--card) 60%); box-shadow: var(--shadow-sm), inset 3px 0 0 var(--ac); }
.hero { display: flex; align-items: baseline; gap: .4em; flex-wrap: wrap; }
.big { font: 700 2.5em/1 var(--f-head); font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.big small { font: 600 .4em/1 var(--f-body); color: var(--mut); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 9px 0; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 10px 14px; position: relative; overflow: hidden; min-width: 0; }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); opacity: .85; }
.kpi b { display: block; font: 700 1.6em/1.05 var(--f-head); font-variant-numeric: tabular-nums; letter-spacing: .3px; overflow-wrap: anywhere; }
.kpi span { font-size: .76em; color: var(--mut); font-weight: 600; }
.row { display: grid; grid-template-columns: minmax(6.4em, 1fr) 1fr 4em; gap: 8px; align-items: center; margin: 5px 0; font-size: .9em; }
.row .t { height: 8px; background: var(--card2); border-radius: 4px; overflow: hidden; }
.row .t i { display: block; height: 100%; background: var(--grad-h); border-radius: 4px; }
.row .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: .9em; margin: 5px 0; }
.kv dt { color: var(--mut); } .kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.list { margin: 5px 0; padding: 0; list-style: none; }
.list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px; transition: background .12s; }
.list li:hover { background: var(--card2); }
.list li .ic { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--ac-soft); color: var(--ac-t); font-size: .95em; }
.list li .tx { flex: 1; min-width: 0; }
.list li .tx b { display: block; font-size: .95em; font-weight: 700; }
.list li .tx small { color: var(--mut); font-size: .8em; }
.list li .rt { font-size: .8em; color: var(--mut); white-space: nowrap; text-align: right; }
.note { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--card2); color: var(--mut); font-size: .83em; line-height: 1.5; border-left: 3px solid var(--line2); }
.empty { padding: 22px 10px; text-align: center; color: var(--mut); font-size: .92em; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--line2); background: var(--card); color: var(--ink);
  border-radius: var(--r); cursor: pointer; font: 700 .9em/1 var(--f-body); text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s, transform .05s;
}
.btn:hover { background: var(--card2); border-color: var(--ac-line); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.pri { background: var(--grad); border-color: transparent; color: var(--on-ac); box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 4px 14px color-mix(in srgb, var(--ac) 35%, transparent); }
.btn.pri:hover { filter: brightness(1.07); box-shadow: var(--glow); }
.btn.ghost { background: none; border-color: transparent; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn.sm { height: 30px; padding: 0 10px; font-size: .82em; border-radius: 8px; }
.btns { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.ev {
  display: inline-flex; align-items: center; gap: 5px; font: 700 .68em/1 var(--f-body); letter-spacing: .3px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line2);
  color: var(--mut); white-space: nowrap; vertical-align: .15em; text-transform: lowercase; background: var(--card);
}
.ev::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.ev.SATELITAL::before { background: var(--ev-sat); } .ev.MODELADO::before { background: var(--ev-mod); } .ev.PREVISTO::before { background: var(--ev-prev); }
.ev.OBSERVADO::before { background: var(--ev-obs); } .ev.RELATO::before { background: var(--ev-rel); } .ev.CONFIRMADO_AUTORIDADE::before { background: var(--ev-ofi); }
.ev.SIMULADO { color: var(--ev-sim); border-color: var(--ev-sim); } .ev.SIMULADO::before { background: var(--ev-sim); }
.ev.INDISPONIVEL::before { background: var(--ev-na); }
.info { border: 0; background: transparent; color: var(--dim); cursor: pointer; font-size: .95em; padding: 0 3px; vertical-align: .05em; }
.info:hover { color: var(--ac-t); }
.pop {
  position: fixed; z-index: 5200; background: var(--bg2); border: 1px solid var(--line2); border-top: 2px solid var(--ac); border-radius: 12px; padding: 12px 14px; max-width: 24em; font-size: .86em; line-height: 1.5;
  box-shadow: var(--shadow-lg); color: var(--ink);
}
.pop h4 { margin: 0 0 5px; font-size: 1.15em; }
.pop dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 11px; margin: 7px 0 0; }
.pop dt { color: var(--mut); } .pop dd { margin: 0; }
.chart { height: 13em; margin: 5px 0; }
.chart.tall { height: 18em; }
.tag { display: inline-flex; align-items: center; gap: 4px; font: 700 .72em/1 var(--f-body); padding: 3px 8px; border-radius: 999px; background: var(--card2); color: var(--mut); border: 1px solid var(--line); }
.tag.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.tag.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.tag.bad { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.tag.ac { background: var(--grad); color: var(--on-ac); border-color: transparent; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: .86em; color: var(--mut); margin: 9px 0; font-weight: 600; }
.field input, .field select, .field textarea {
  background: var(--card); color: var(--ink); border: 1px solid var(--line2); border-radius: var(--r); padding: 9px 11px; font-size: 1.05em; font-weight: 500; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); }
table.t { width: 100%; border-collapse: collapse; font-size: .86em; }
table.t th, table.t td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.t th { color: var(--mut); position: sticky; top: 0; background: var(--bg2); font: 700 .86em/1.2 var(--f-body); text-transform: uppercase; letter-spacing: .6px; }
table.t tr:hover td { background: var(--card2); }
table.t td.r { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- páginas cheias ---------------- */
#page { position: absolute; inset: var(--topH, 58px) 0 0 0; overflow: auto; background: var(--bg); padding: 22px 26px 50px; z-index: 1500; }
#page .wrap { max-width: 1180px; margin: 0 auto; }
:where(#page) h1 { font: 700 2.1em/1.05 var(--f-head); margin: 4px 0 6px; letter-spacing: .3px; }
:where(#page) h2 { font: 700 1.45em/1.1 var(--f-head); }
:where(#page) .lead { color: var(--mut); margin: 0 0 18px; max-width: 62em; font-size: 1.04em; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(22em, 1fr)); gap: 14px; }
.eyebrow { font: 700 .76em/1 var(--f-body); text-transform: uppercase; letter-spacing: 1.4px; color: var(--ac-t); }

/* ---------------- janelas, menu, toast ---------------- */
.dlg { position: fixed; inset: 0; z-index: 5000; background: rgba(12, 5, 2, .66); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dlg .box { background: var(--bg2); border: 1px solid var(--line2); border-radius: 18px; width: min(46em, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: rpIn .38s cubic-bezier(.2, .9, .25, 1); overflow: hidden; }
.dlg .box::before { content: ""; height: 3px; background: var(--grad-h); flex: none; }
.dlg .hd { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font: 700 1.25em/1.1 var(--f-head); letter-spacing: .3px; }
.dlg .bd { padding: 16px; overflow: auto; }
.dlg .x { border: 1px solid var(--line2); background: var(--card); color: var(--ink); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
@keyframes rpIn { 0% { opacity: 0; transform: translateY(20px) scale(.96); } 100% { opacity: 1; transform: none; } }
#menu { position: fixed; right: 14px; top: 60px; z-index: 4000; background: var(--bg2); border: 1px solid var(--line2); border-radius: 14px; width: 22em; max-height: calc(100dvh - 80px); overflow: auto; box-shadow: var(--shadow-lg); padding: 6px; }
#menu h5 { margin: 10px 10px 4px; font: 700 .72em/1 var(--f-body); text-transform: uppercase; letter-spacing: 1.2px; color: var(--dim); }
#menu a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; cursor: pointer; }
#menu a:hover { background: var(--card2); }
#menu a span { font-size: 1.1em; width: 1.4em; text-align: center; }
#menu a small { display: block; color: var(--mut); font-size: .8em; }
#pal { position: fixed; z-index: 4100; background: var(--bg2); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 12px; width: 268px; color: var(--ink); }
#pal h5 { margin: 2px 2px 8px; font: 700 .74em/1 var(--f-body); text-transform: uppercase; letter-spacing: 1.2px; color: var(--dim); }
#pal .pals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 12px; }
#pal .pals button { border: 1px solid var(--line2); background: var(--card); border-radius: 10px; padding: 7px 4px 6px; cursor: pointer; color: var(--ink); font: 700 .78em/1 var(--f-body); display: flex; flex-direction: column; align-items: center; gap: 6px; }
#pal .pals button i { width: 100%; height: 16px; border-radius: 6px; display: block; }
#pal .pals button.on { border-color: var(--ac); box-shadow: 0 0 0 2px var(--ac-soft); }
#pal .seg { width: 100%; } #pal .seg button { flex: 1; }
#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 6000; background: var(--bg2); border: 1px solid var(--line2); border-left: 3px solid var(--ac); color: var(--ink); padding: 10px 16px; border-radius: 10px; max-width: 90vw; font-size: .9em; box-shadow: var(--shadow-lg); font-weight: 600; }
.demo-mark { position: absolute; inset: 0; pointer-events: none; z-index: 999; background: repeating-linear-gradient(-30deg, transparent 0 140px, rgba(244, 114, 182, .08) 140px 142px); }
.demo-mark::after { content: attr(data-txt); position: absolute; top: 3.4em; left: 50%; transform: translateX(-50%); background: var(--ev-sim); color: #1a0010; padding: .2em .8em; border-radius: 999px; font-weight: 900; font-size: .78em; }

/* ---------------- intermediário: barra superior em duas linhas ---------------- */
@media (max-width: 1280px) { #clock { display: none; } }

/* ---------------- celular e tablet: mapa primeiro, menu lateral deslizante, painel em folha ---------------- */
#sheetH { display: none; }
@media (max-width: 860px) {
  :root { --fs: 14.5px; }
  body { display: block; }
  #sb { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); z-index: 4500; }
  body.sb-open #sb { transform: none; }
  body.sb-min #sb { width: min(300px, 86vw); }
  body.sb-min #brand .btxt, body.sb-min .sbnav .ng, body.sb-min .sbnav .lb, body.sb-min .sbnav .bdg, body.sb-min #clock, body.sb-min #liveTx { display: revert; }
  body.sb-min .sbnav a, body.sb-min .sbnav button { justify-content: flex-start; padding: 8px 10px; }
  #sbScrim { display: block; position: fixed; inset: 0; z-index: 4400; background: rgba(10, 4, 1, .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.sb-open #sbScrim { opacity: 1; pointer-events: auto; }
  #sbCollapse { display: none !important; }
  #shell { height: 100dvh; }
  #top { padding: 8px 10px; gap: 7px; }
  #bBurger, #mBrand { display: inline-flex; }
  #mBrand { align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font: 700 1.15em/1 var(--f-head); letter-spacing: 1px; }
  #mBrand svg { width: 26px; height: 29px; }
  #mBrand em { font-style: normal; background: var(--grad-h); -webkit-background-clip: text; background-clip: text; color: transparent; }
  #crumb { display: none; }
  #gsw { order: 20; flex: 1 1 100%; max-width: none; }
  #gs { font-size: 16px; }
  #munSel { display: none; }
  #winSeg { order: 22; } #viewSeg { order: 23; }
  .tools .tb.dsk, #bUser .nm { display: none; }
  #bUser { padding: 0 4px; }
  #chips { padding: 6px 10px; }
  #chips .mtitle { display: none; }
  footer { display: none; }
  main { display: block; position: relative; flex: 1 1 auto; }
  #mapwrap { position: absolute; inset: 0; }
  #rsz { display: none; }
  aside {
    position: absolute; left: 0; right: 0; bottom: 0; height: var(--shPx, 34%); z-index: 1200; border-left: 0; border-top: 1px solid var(--line2);
    border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .42); transition: height .24s cubic-bezier(.2, .8, .2, 1);
  }
  aside.drag { transition: none; }
  #sheetH { display: flex; flex-direction: column; align-items: center; padding: 7px 0 2px; cursor: grab; touch-action: none; }
  #sheetH::before { content: ""; width: 42px; height: 4px; border-radius: 4px; background: var(--line2); }
  #sheetH small { font-size: .7em; color: var(--dim); margin-top: 3px; }
  #legend, #attr { bottom: calc(var(--shPx, 34%) + 8px); transition: bottom .24s; }
  #hud { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb, .chip, #ptabs button { min-height: 40px; }
  .dlg { align-items: flex-end; padding: 0; }
  .dlg .box { border-radius: 18px 18px 0 0; max-height: 94%; }
  #drawer { bottom: calc(var(--shPx, 34%) + 8px); }
  #page { padding: 16px 14px 40px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* painel inferior aberto: legenda e atribuição não sobrepõem a linha do tempo */
#mapwrap.dw-on #legend { bottom: calc(var(--dwH, 30%) + 1.2em); }
#mapwrap.dw-on #attr { display: none; }
#mapwrap.dw-on #scenebar { bottom: calc(var(--dwH, 30%) + 1.2em); z-index: 1002; }
@media (max-width: 860px) { #mapwrap.dw-on #scenebar { bottom: calc(var(--shPx, 34%) + var(--dwH, 30%) + 1.2em); max-width: calc(100% - 20px); overflow: hidden; } }
@media (max-width: 860px) { #mapwrap.dw-on #legend .bd { display: none; } }
#mapwrap.picking, #mapwrap.picking canvas { cursor: crosshair !important; }

/* amostras do seletor de paleta */
#pal i[data-palette="fogo"] { background: linear-gradient(90deg, #d62828, #ff5a1f, #ffb703); }
#pal i[data-palette="brasa"] { background: linear-gradient(90deg, #8d0801, #e63946, #ff8a4c); }
#pal i[data-palette="lava"] { background: linear-gradient(90deg, #9a031e, #ff3d00, #ffd000); }
#pal i[data-palette="ambar"] { background: linear-gradient(90deg, #c2410c, #f59e0b, #fde047); }
#pal i[data-palette="magma"] { background: linear-gradient(90deg, #7209b7, #f72585, #ff7b00); }
#pal i[data-palette="azul"] { background: linear-gradient(90deg, #6d28d9, #3b82f6, #22d3ee); }
#pal i[data-palette="daltonismo"] { background: linear-gradient(90deg, #0072b2, #56b4e9, #e69f00); }
#pal i[data-palette="contraste"] { background: linear-gradient(90deg, #000, #ffd400 50%, #fff); outline: 1px solid var(--line2); }

/* =====================================================================================================
   EXPERIÊNCIA v3 (agente "experiência"): idiomas/RTL, acessibilidade, paleta de comandos, tour, sala de situação,
   briefing, painel inicial, abertura, economia de bateria, esqueletos e estados vazios.
   ===================================================================================================== */

/* paletas acessíveis: azul/laranja seguro para daltonismo (Okabe–Ito) e alto contraste fogo */
:root[data-palette="daltonismo"] { --ac: #e69f00; --ac-2: #56b4e9; --ac-3: #0072b2; }
:root[data-palette="contraste"] { --ac: #ffd400; --ac-2: #ffffff; --ac-3: #ff3b00; --on-ac: #000; }
:root[data-palette="contraste"] body:not(.light) { --line: #6b5444; --line2: #9a7d68; --mut: #e9dcd2; --dim: #cdbbae; }
:root[data-palette="contraste"] body.light { --ac: #b30000; --ac-2: #000; --ac-3: #7a0000; --on-ac: #fff; --line: #6f5a4b; --line2: #3d2c20; --mut: #2d1f16; --dim: #3d2c20; }
body.contraste :focus-visible, :root[data-palette="contraste"] :focus-visible { outline: 3px solid var(--ac); outline-offset: 2px; }
body.contraste .sbnav a, body.contraste .sbnav button { color: #fff; }

/* idioma: espera curta para não piscar o português antes da tradução; fontes de sistema para escritas fora do latim */
html.i18n-wait body { visibility: hidden; }
html[lang="ar"] { --f-head: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", system-ui, sans-serif; --f-body: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", system-ui, sans-serif; }
html[lang="zh"] { --f-head: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif; --f-body: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif; }
html[lang="hi"] { --f-head: "Nirmala UI", "Noto Sans Devanagari", "Mangal", system-ui, sans-serif; --f-body: "Nirmala UI", "Noto Sans Devanagari", "Mangal", system-ui, sans-serif; }
html[lang="ru"] { --f-head: "Arial Narrow", "Roboto Condensed", "Segoe UI", system-ui, sans-serif; --f-body: "Segoe UI", Roboto, system-ui, sans-serif; }
html[lang="ar"] *, html[lang="zh"] *, html[lang="hi"] * { letter-spacing: 0 !important; }
html[lang="ar"] .sbnav .ng, html[lang="ar"] #side h3, html[lang="ar"] .eyebrow, html[lang="ar"] table.t th, html[lang="ar"] #pal h5 { text-transform: none; }

/* RTL (árabe): menu lateral à direita (a grade do body inverte sozinha), painel à esquerda do mapa, textos à direita */
.sbnav a, .sbnav button { text-align: start; }
.sbnav .bdg { margin-left: 0; margin-inline-start: auto; }
[dir="rtl"] #sb { border-right: 0; border-left: 1px solid var(--sb-line); }
[dir="rtl"] .sbnav button.on::before, [dir="rtl"] .sbnav a.on::before { left: auto; right: -10px; border-radius: 3px 0 0 3px; }
[dir="rtl"] aside { border-left: 0; border-right: 1px solid var(--line); }
[dir="rtl"] #gsw .ico { left: auto; right: 11px; }
[dir="rtl"] #gs { padding: 0 36px 0 12px; }
[dir="rtl"] #mtools { right: auto; left: 10px; align-items: flex-start; }
[dir="rtl"] #hud { left: auto; right: 10px; }
[dir="rtl"] #legend { left: auto; right: 10px; }
[dir="rtl"] #attr { right: auto; left: 8px; }
[dir="rtl"] .kv dd, [dir="rtl"] .row .n, [dir="rtl"] table.t td.r, [dir="rtl"] .list li .rt { text-align: left; }
[dir="rtl"] table.t th, [dir="rtl"] table.t td { text-align: right; }
[dir="rtl"] footer .kb { margin-left: 0; margin-right: auto; }
[dir="rtl"] .note { border-left: 0; border-right: 3px solid var(--line2); }
[dir="rtl"] #toast { border-left: 1px solid var(--line2); border-right: 3px solid var(--ac); }
[dir="rtl"] .kpi::after { left: auto; right: 0; }
[dir="rtl"] .kpi { padding: 10px 14px 10px 12px; }
[dir="rtl"] #drawer .x { right: auto; left: 8px; }
[dir="rtl"] .card.hl { box-shadow: var(--shadow-sm), inset -3px 0 0 var(--ac); }
[dir="rtl"] #crumb .sep { transform: scaleX(-1); display: inline-block; }
[dir="rtl"] #sbCollapse svg, [dir="rtl"] #back { transform: scaleX(-1); }
@media (max-width: 860px) {
  [dir="rtl"] #sb { left: auto; right: 0; transform: translateX(102%); }
  [dir="rtl"] body.sb-open #sb { transform: none; }
}

/* foco e alvos de toque */
.sbnav a:focus-visible, .sbnav button:focus-visible { outline-offset: -2px; background: rgba(255, 255, 255, .08); }
#rsz:focus-visible { background: var(--ac); }
kbd { display: inline-block; min-width: 1.6em; padding: .12em .45em; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; background: var(--card); color: var(--ink); font: 600 .8em/1.3 var(--mono); text-align: center; white-space: nowrap; }
table.kbd-t td:first-child { width: 9em; }
footer #fKb { cursor: pointer; }

/* faixa sem conexão */
#net { flex: 0 0 auto; padding: 6px 16px; background: color-mix(in srgb, var(--warn) 18%, var(--bg2)); color: var(--ink); border-bottom: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); font-size: .84em; font-weight: 600; }
#toast .btn { margin-inline-start: 10px; vertical-align: middle; }

/* seletor de cores/tema/idioma */
#pal { max-height: calc(100dvh - 20px); overflow: auto; width: 288px; }
#pal .sel { width: 100%; max-width: none; margin-bottom: 4px; }
#pal .seg { margin-bottom: 8px; }
.pal-note { font-size: .74em; color: var(--mut); margin: 2px 2px 10px; line-height: 1.4; }
.pal-note b { color: var(--warn); font-weight: 700; }
.pal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.pal-row label { display: flex; flex-direction: column; gap: 3px; font-size: .76em; color: var(--mut); font-weight: 600; }
.pal-ck { display: flex; gap: 8px; align-items: center; font-size: .9em; cursor: pointer; padding: 3px 0; }
.pal-ft { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .84em; }
.pal-ft a { cursor: pointer; }

/* ajuda contextual e "o que isso significa?" */
.help-q { width: 1.35em; height: 1.35em; border-radius: 50%; border: 1px solid var(--line2); background: var(--card); color: var(--mut); font: 700 .78em/1 var(--f-body); cursor: pointer; display: inline-grid; place-items: center; vertical-align: middle; margin-inline-start: .35em; padding: 0; }
.help-q:hover, .help-q:focus-visible { color: var(--ac-t); border-color: var(--ac); }
.explain { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--ac-t); font: 600 .78em/1.2 var(--f-body); cursor: pointer; padding: 2px 0; margin: 2px 0; }
.explain:hover { text-decoration: underline; }
.explain-bd p { margin: 0 0 .7em; line-height: 1.55; }
.pop .pp + .pp { margin-top: .4em; }

/* esqueletos de carregamento e estados vazios */
#sideWrap { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
#sideSkel { position: absolute; inset: 0; padding: 14px 16px; pointer-events: none; background: var(--bg2); }
.skel .sk { display: block; height: .8em; border-radius: 6px; margin: .45em 0; background: linear-gradient(90deg, var(--card2) 0%, color-mix(in srgb, var(--card2) 50%, var(--line2)) 50%, var(--card2) 100%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.skel .sk-row { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.skel .sk-ic { width: 32px; height: 32px; border-radius: 9px; flex: none; margin: 0; }
.skel .sk-chart { height: 11em; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ac-soft); color: var(--ac-t); font: 700 1.2em/1 var(--f-head); }
.empty small { color: var(--dim); font-size: .86em; max-width: 30em; }

/* paleta de comandos (Ctrl+K) */
.cmdk { position: fixed; inset: 0; z-index: 7000; background: rgba(8, 4, 2, .55); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.cmdk-box { width: min(40em, 100%); max-height: 72vh; display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: rpIn .22s var(--ease); }
.cmdk-box::before { content: ""; height: 3px; background: var(--grad-h); flex: none; }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.cmdk-in .ico { color: var(--dim); }
.cmdk-in input { flex: 1; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 1.08em; min-width: 0; }
.cmdk ul { list-style: none; margin: 0; padding: 6px; overflow: auto; }
.cmdk li[role="option"] { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.cmdk li[role="option"].on { background: var(--ac-soft); box-shadow: inset 3px 0 0 var(--ac); }
.cmdk li .ci { color: var(--mut); display: inline-flex; } .cmdk li.on .ci { color: var(--ac-t); }
.cmdk li .ct { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk li .ct small { display: block; color: var(--mut); font-size: .8em; }
.cmdk-g { font: 700 .7em/1 var(--f-body); text-transform: uppercase; letter-spacing: 1.2px; color: var(--dim); padding: 10px 10px 4px; }
.cmdk-empty { padding: 22px; text-align: center; color: var(--mut); }
.cmdk-ft { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--dim); font-size: .78em; flex-wrap: wrap; }

/* tour guiado */
#tour { position: fixed; inset: 0; z-index: 7500; }
#tour .tr-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(8, 4, 2, .62), 0 0 0 2px var(--ac); transition: all .3s var(--ease); pointer-events: none; }
#tour .tr-box { position: fixed; width: min(340px, calc(100vw - 24px)); background: var(--bg2); color: var(--ink); border: 1px solid var(--line2); border-top: 3px solid var(--ac); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-lg); outline: none; }
#tour h3 { margin: 4px 0 6px; font-size: 1.3em; }
#tour p { margin: 0 0 10px; color: var(--mut); line-height: 1.5; font-size: .93em; }
.tr-n { font: 700 .72em/1 var(--f-body); color: var(--ac-t); letter-spacing: 1px; }
.tr-b { display: flex; gap: 6px; align-items: center; } .tr-b .sp, .dcard header .sp, .brf-h .sp, .bc-meta .sp { flex: 1; }

/* telas cheias de features (sala de situação, reprodução de briefing): sem menu, barra e rodapé */
body.tela { grid-template-columns: minmax(0, 1fr); }
body.tela #sb, body.tela #sbScrim, body.tela #top, body.tela #chips, body.tela footer, body.tela #mtools, body.tela #hud, body.tela #net { display: none !important; }
body.tela #shell { grid-column: 1; }
body.tela-briefing-play main { grid-template-columns: minmax(0, 1fr); }
body.tela-briefing-play #rsz, body.tela-briefing-play aside { display: none; }
body.tela-sala { --fs: clamp(17px, .55vw + 11px, 30px); }
body.tela-sala #ptabs button { pointer-events: none; }
#salaHud { position: absolute; left: 0; right: 0; top: 0; z-index: 1300; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 14px 20px; background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 92%, transparent), transparent); pointer-events: none; }
#salaHud > div { pointer-events: auto; }
.sh-clock { font: 700 3.4em/1 var(--f-head); letter-spacing: 1px; text-shadow: 0 2px 14px rgba(0, 0, 0, .6); }
.sh-sub { color: var(--mut); font-size: .9em; }
.sh-sub::first-letter { text-transform: uppercase; }
.dcard .sub, #page .card .sub { color: var(--mut); font-size: .84em; line-height: 1.45; margin: 6px 0 0; font-weight: 500; }
#page:focus { outline: none; }
.sh-c { text-align: center; min-width: 0; }
.sh-mod { font: 700 1.9em/1.05 var(--f-head); overflow-wrap: anywhere; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.sh-mod small { color: var(--mut); font-size: .62em; margin-inline-start: .4em; }
.sh-mod .sh-n { display: block; margin: .2em 0 0; font: 600 .45em/1 var(--f-body); color: var(--dim); }
.sh-bar { height: 4px; border-radius: 3px; background: color-mix(in srgb, var(--line2) 70%, transparent); margin: 8px auto 0; max-width: 24em; overflow: hidden; }
.sh-bar i { display: block; height: 100%; width: 0; background: var(--grad-h); }
.sh-r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sh-kpis { display: flex; gap: 12px; }
.sh-k { background: var(--ov); border: 1px solid var(--line2); border-radius: 12px; padding: 8px 14px; text-align: end; }
.sh-k b { display: block; font: 700 2.1em/1 var(--f-head); }
.sh-k span { font-size: .72em; color: var(--mut); }
.sh-ctl { position: absolute; left: 50%; bottom: -54px; transform: translateX(-50%); display: flex; gap: 6px; opacity: 0; transition: opacity .25s; }
#salaHud.ctl-on .sh-ctl { opacity: 1; }
body.tela-sala #legend { font-size: .9em; }
@media (max-width: 860px) {
  #salaHud { grid-template-columns: 1fr; gap: 6px; padding: 10px 12px; }
  .sh-clock { font-size: 2.2em; } .sh-c { text-align: start; } .sh-r { align-items: flex-start; } .sh-mod { font-size: 1.3em; }
  .sh-ctl { position: static; transform: none; opacity: 1; flex-wrap: wrap; }
  body.tela-sala { --fs: 15px; }
}

/* reprodução de briefing */
#brfPlay { position: absolute; inset: 0; z-index: 1300; pointer-events: none; }
#brfPlay > * { pointer-events: auto; }
.bp-cap { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); width: min(46em, calc(100% - 32px)); background: var(--ov); border: 1px solid var(--line2); border-top: 3px solid var(--ac); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow-lg); backdrop-filter: blur(10px); }
.bp-cap h2 { margin: 2px 0 4px; font-size: 1.7em; }
.bp-cap p { margin: 0; color: var(--ink); line-height: 1.5; white-space: pre-wrap; }
.bp-n { font: 700 .74em/1 var(--f-body); color: var(--ac-t); letter-spacing: 1px; text-transform: uppercase; }
.bp-bar { height: 3px; background: var(--line2); border-radius: 2px; margin-top: 10px; overflow: hidden; } .bp-bar i { display: block; height: 100%; width: 0; background: var(--grad-h); }
.bp-cap { bottom: 100px; }
.bp-ctl { position: absolute; left: 50%; bottom: 50px; transform: translateX(-50%); display: flex; gap: 6px; }
.bp-note { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); font-size: .74em; color: var(--mut); background: var(--ov); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2); white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }

/* páginas da experiência: cabeçalho, painel de cartões, briefing, preferências, glossário */
.pg-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.pg-head .lead { margin-bottom: 4px; }
.dash { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); gap: 14px; align-items: start; }
.dcard { margin: 0; min-width: 0; }
.dcard.sz-l { grid-column: span 2; } .dcard.sz-s .dbody { font-size: .95em; }
.dcard header { display: flex; align-items: center; gap: 6px; margin: -4px -4px 6px; }
.dcard header h3 { margin: 0; font: 700 1.12em/1.1 var(--f-head); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcard .dh { cursor: grab; touch-action: none; border: 0; background: none; color: var(--dim); font-size: 1.1em; padding: 4px 6px; border-radius: 6px; }
.dcard .dh:hover, .dcard .dh:focus-visible { color: var(--ac-t); background: var(--card2); }
.dcard.dragging { opacity: .6; outline: 2px dashed var(--ac); }
.dcard .btn.ghost { padding: 0 7px; }
.kpis.k2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.clock-big { font: 700 3em/1 var(--f-head); }
@media (max-width: 700px) { .dcard.sz-l { grid-column: auto; } }
.brf-list { display: grid; gap: 12px; }
.brf-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.brf-nome { font: 700 1.2em/1.2 var(--f-head); background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--ink); padding: 4px 6px; min-width: 0; flex: 1 1 12em; }
.brf-nome:hover, .brf-nome:focus { border-color: var(--line2); background: var(--card2); outline: none; }
.brf-cenas { margin: 10px 0 0; padding-inline-start: 1.4em; display: grid; gap: 8px; }
.brf-c { display: grid; gap: 6px; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.brf-c input, .brf-c textarea { background: var(--card); color: var(--ink); border: 1px solid var(--line2); border-radius: 8px; padding: 6px 8px; width: 100%; resize: vertical; min-width: 0; }
.bc-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .84em; }
.bc-meta input { width: 4.5em; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5em, 1fr)); gap: 8px; }
.lang-op { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line2); border-radius: 10px; padding: 8px 10px; cursor: pointer; position: relative; }
.lang-op input { position: absolute; opacity: 0; }
.lang-op.on, .lang-op:has(input:checked) { border-color: var(--ac); background: var(--ac-soft); }
.lang-op:has(input:focus-visible) { outline: 2px solid var(--ac); }
.lang-op small { color: var(--mut); font-size: .72em; }
.pref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12em, 1fr)); gap: 10px; }
.pref-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .84em; color: var(--mut); font-weight: 600; }
.pref-grid .sel { max-width: none; }
.pref-ck { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; cursor: pointer; }
.pref-ck input { margin-top: .25em; }
.pref-ck small { display: block; color: var(--mut); font-size: .84em; font-weight: 500; }
.ck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12em, 1fr)); gap: 2px 12px; margin: 8px 0; }
.glos-q { width: min(28em, 100%); max-width: none; margin-bottom: 12px; }
.glos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(22em, 100%), 1fr)); gap: 10px; margin: 0; }
.glos-i { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.glos dt { font: 700 1.08em/1.2 var(--f-head); } .glos dt small { color: var(--dim); font: 500 .74em var(--f-body); }
.glos dd { margin: 4px 0 0; color: var(--mut); font-size: .9em; line-height: 1.5; }

/* abertura cinematográfica */
#abertura { position: absolute; inset: 0; z-index: 2000; display: grid; place-items: center; cursor: pointer; background: radial-gradient(ellipse at 50% 60%, transparent 30%, rgba(0, 0, 0, .55)); transition: opacity .45s; }
#abertura.out { opacity: 0; }
.ab-t { text-align: center; color: #fff; text-shadow: 0 2px 20px rgba(0, 0, 0, .8); animation: abIn 1.6s var(--ease) both; }
.ab-logo { font: 700 clamp(2.4em, 6vw, 4.6em)/1 var(--f-head); letter-spacing: 6px; }
.ab-logo em { font-style: normal; background: var(--grad-h); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ab-s { font: 600 clamp(.85em, 1.4vw, 1.15em)/1.4 var(--f-body); letter-spacing: 3px; text-transform: uppercase; opacity: .85; margin-top: 8px; }
.ab-c { margin-top: 14px; font: 700 1.1em/1 var(--mono); color: var(--ac-2); min-height: 1.2em; }
.ab-skip { position: absolute; right: 16px; bottom: 16px; }
[dir="rtl"] .ab-skip { right: auto; left: 16px; }
.ab-fx { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); font-size: .72em; color: rgba(255, 255, 255, .75); background: rgba(0, 0, 0, .45); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
@keyframes abIn { 0% { opacity: 0; transform: scale(.94); letter-spacing: 12px; } 100% { opacity: 1; transform: none; } }

/* economia de bateria: sem animações nem desfoque (o globo 3D também cai para a qualidade econômica) */
body.economia *, body.economia *::before, body.economia *::after { animation: none !important; transition: none !important; }
body.economia .ov, body.economia #top, body.economia .dlg, body.economia .cmdk { backdrop-filter: none !important; }

/* cortina (swipe) entre duas camadas no globo */
.map-swipe { position: absolute; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--ac); z-index: 1005; cursor: ew-resize; touch-action: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); }
.map-swipe i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: var(--on-ac); display: grid; place-items: center; font-style: normal; font-weight: 800; box-shadow: var(--shadow); }
.map-swipe:focus-visible { outline: 3px solid var(--ac-2); }
#legend .leg-img { display: block; max-width: 100%; height: auto; margin: 4px 0; border-radius: 4px; background: #fff; }

/* rodapé do menu lateral numa linha só (rótulos longos em outros idiomas são cortados) */
body:not(.sb-min) .sbfoot { flex-wrap: nowrap; }
.sbfoot .lbx { max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 420px) { #top .seg button { padding: 0 8px; } #top { gap: 6px; } }

/* botões de ferramenta do mapa: rótulo some em telas estreitas */
@media (max-width: 560px) { #mtools .tl { display: none; } .cmdk { padding-top: 4vh; } .cmdk-ft { display: none; } }
@media (prefers-reduced-motion: reduce) { .skel .sk { animation: none !important; } }

/* ---------------- onda C: painel por geração, cortina 2D, território, organização ---------------- */
/* cada renderização do painel ganha um contêiner próprio (corrida em renderPanel); sem efeito no layout */
.side-host { display: contents; }
/* cortina no 2D: segundo mapa sincronizado, recortado por clip-path; o clique passa para o mapa principal */
#mapwrap .map2d-swipe { position: absolute; inset: 0; pointer-events: none; z-index: 1; }   /* vence o .maplibregl-map { position: relative } */
.map2d-swipe .maplibregl-control-container { display: none; }
/* seletor de território (país/estado) */
#bTerr { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); border-radius: 9px; cursor: pointer; font-weight: 600; }
#bTerr svg { width: 16px; height: 16px; }
#bTerr[aria-expanded="true"] { border-color: var(--ac); box-shadow: 0 0 0 2px var(--ac-soft); }
#terr { position: fixed; z-index: 4100; background: var(--bg2); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 12px; width: 300px; max-width: calc(100vw - 16px); max-height: min(70vh, 560px); overflow: auto; color: var(--ink); }
#terr .tr-rap { display: flex; gap: 6px; margin-bottom: 8px; }
#terr .tr-rap button { flex: 1; border: 1px solid var(--line2); background: var(--card); color: var(--ink); border-radius: 9px; padding: 6px 4px; cursor: pointer; font-weight: 600; }
#terr .tr-rap button:hover { border-color: var(--ac); }
#terr .sel { width: 100%; max-width: none; margin: 2px 0 6px; }
#terr ul { list-style: none; margin: 0; padding: 0; }
#terr li { padding: 7px 9px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
#terr li:hover, #terr li:focus { background: var(--card2); outline: none; }
#terr li small { color: var(--mut); white-space: nowrap; }
#terr li.mut { cursor: default; color: var(--mut); }
#terr li[hidden] { display: none; }
#terr h5 { margin: 10px 2px 6px; font: 700 .74em/1.2 var(--f-body); text-transform: uppercase; letter-spacing: 1px; color: var(--dim); }
#terr .tr-nota { margin: 8px 2px 2px; font-size: .86em; color: var(--mut); }
@media (max-width: 860px) { #bTerr .tl { display: none; } #bTerr { padding: 0 9px; } }
/* marca da organização (página /o/<slug>/) */
.pf-org { display: flex; align-items: center; gap: 8px; margin: 2px 16px 6px; padding: 6px 10px; border: 1px solid var(--line2); border-radius: 10px; background: var(--card); font-weight: 700; font-size: .86em; color: var(--ink); overflow: hidden; }
.pf-org img { max-height: 26px; max-width: 64px; object-fit: contain; }
.pf-org span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.sb-min .pf-org span { display: none; }

/* seletor de data do mapa */
#bData { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 11px; height: 36px; padding: 0 12px; font-weight: 700; white-space: nowrap; }
#bData.passado { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); color: var(--ac-t); }
#dataPop { width: 300px; }
#dataPop .btns { display: flex; gap: 6px; align-items: center; }
#dataAviso { left: 50%; top: 10px; transform: translateX(-50%); padding: 6px 10px; font-size: .86em; display: flex; gap: 8px; align-items: center; white-space: nowrap; z-index: 1002; }
@media (max-width: 860px) { #bData { order: 22; } #dataAviso { top: auto; bottom: calc(var(--shPx, 34%) + 52px); } }

/* celular: data, janela de tempo e 2D/3D numa linha só (mais espaço para o mapa) */
@media (max-width: 860px) {
  #top { row-gap: 6px; }
  #bData, #winSeg, #viewSeg { order: 22; flex: none; }
  #bData { height: 32px; padding: 0 8px; font-size: .86em; }
  #winSeg button, #viewSeg button { height: 26px; padding: 0 7px; font-size: .78em; }
  #winSeg, #viewSeg { padding: 2px; }
  #gs { height: 36px; }
  #chips { min-height: 38px; padding-top: 4px; padding-bottom: 4px; }
  .chip { height: 28px; padding: 0 10px; font-size: .8em; }
}
@media (max-width: 400px) { #winSeg button[data-h="48"] { display: none; } }
@media (min-width: 861px) {
  #munSel { max-width: 11.5em; }
  #gsw { flex: 1 1 200px; min-width: 150px; }
  #top { flex-wrap: nowrap; }
  #crumb { min-width: 0; overflow: hidden; }
}
@media (min-width: 861px) and (max-width: 1360px) { #munSel { display: none; } #crumb { display: none; } }

/* crédito da Vorax (rodapé e fim do menu lateral) */
footer .credito { color: var(--dim); }
footer .credito b { color: var(--mut); font-weight: 600; }
footer .credito a { color: var(--mut); }
.sbcred { padding: 8px 14px 6px; font-size: 11px; line-height: 1.45; color: var(--sb-mut); border-top: 1px solid var(--sb-line); position: relative; }
.sbcred b { color: var(--sb-ink); font-weight: 600; }
.sbcred a { color: var(--sb-mut); text-decoration: none; }
.sbcred a:hover { color: #fff; }
body.sb-min .sbcred { display: none; }
@media (min-width: 861px) { .sbcred { display: none; } }
@media (max-width: 1500px) { footer .kb { display: none; } }
footer .credito { margin-left: auto; }

/* =====================================================================================================================
   PILHAS DE CONTROLES NO MAPA (ctx.mapa.controle): HUD, aviso de data, legenda e controles das features sem sobreposição
   ===================================================================================================================== */
.mcanto { position: absolute; z-index: 1000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: calc(100% - 90px); }
.mcanto:empty { display: none; }
.mcanto > * { pointer-events: auto; position: relative !important; inset: auto !important; transform: none !important; margin: 0; max-width: 100%; }
.mcanto[data-canto="sup-esq"] { top: var(--hudB, 10px); left: 10px; align-items: flex-start; }
.mcanto[data-canto="sup-dir"] { top: 10px; right: 64px; align-items: flex-end; }
.mcanto[data-canto="inf-esq"] { bottom: 10px; left: 10px; align-items: flex-start; flex-direction: column-reverse; max-width: min(25em, calc(100% - 5em)); }
.mcanto > #dataAviso { white-space: normal; }
#mapwrap.dw-on .mcanto[data-canto="inf-esq"] { bottom: calc(var(--dwH, 30%) + 1.2em); }
[dir="rtl"] .mcanto[data-canto="sup-esq"], [dir="rtl"] .mcanto[data-canto="inf-esq"] { left: auto; right: 10px; align-items: flex-end; }
[dir="rtl"] .mcanto[data-canto="sup-dir"] { right: auto; left: 64px; align-items: flex-start; }

/* elementos que só existem no celular */
#tabbar, #splash, #mtT, .mbar, #sheetGrip, #sheetH .sh-row { display: none; }
#chips .chs { display: contents; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =====================================================================================================================
   CELULAR E TABLET (≤ 860 px) COM CARA DE APLICATIVO — barra de abas, folha de dados, folhas modais, busca em tela cheia.
   O computador (> 860 px) não usa nada deste bloco.
   ===================================================================================================================== */
@media (max-width: 860px) {
  :root { --fs: 15.5px; --tabH: calc(58px + env(safe-area-inset-bottom)); }
  body { overscroll-behavior: none; }
  #shell { height: 100dvh; }

  /* splash com a logo (some quando a casca monta os módulos) */
  #splash { display: grid; place-items: center; position: fixed; inset: 0; z-index: 9500; background: var(--bg); transition: opacity .32s; }
  #splash > div { display: flex; flex-direction: column; align-items: center; gap: 14px; }
  #splash img { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 10px 40px color-mix(in srgb, var(--ac) 35%, transparent); }
  #splash b { font: 700 28px/1 var(--f-head); letter-spacing: 3px; color: var(--ink); }
  #splash em { font-style: normal; background: var(--grad-h); -webkit-background-clip: text; background-clip: text; color: transparent; }
  #splash i { width: 120px; height: 3px; border-radius: 3px; background: var(--grad-h); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
  #splash.out { opacity: 0; pointer-events: none; }

  /* cabeçalho translúcido de uma linha: ☰ · marca · busca · conta */
  #top { flex-wrap: nowrap; min-height: 0; gap: 6px; padding: max(6px, env(safe-area-inset-top)) 8px 6px; background: color-mix(in srgb, var(--bg2) 80%, transparent); backdrop-filter: blur(16px) saturate(1.25); -webkit-backdrop-filter: blur(16px) saturate(1.25); }
  #bBurger, #bUser, #back { min-width: 44px; height: 44px; border-radius: 22px; }
  #bBurger .ico { width: 22px; height: 22px; }
  #mBrand span { display: none; }
  #mBrand svg { width: 28px; height: 32px; }
  #gsw { order: 0; flex: 1 1 auto; min-width: 0; max-width: none; }
  #gs { height: 44px; border-radius: 22px; font-size: 16px; padding-inline-start: 40px; background: var(--card); }
  #gsw .ico { left: 14px; }
  [dir="rtl"] #gsw .ico { left: auto; right: 14px; }
  #bTerr, #bData, #winSeg, #viewSeg, #munSel, #crumb, #bMenu { display: none !important; }
  .tools { gap: 2px; }

  /* barra do mapa: Vista (fixo à esquerda) · camadas roláveis · Camadas (fixo à direita) */
  #chips { gap: 8px; padding: 6px 8px; min-height: 52px; background: color-mix(in srgb, var(--bg) 92%, transparent); overflow: hidden; }
  #chips .chs { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px 0; mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 14px), transparent); }
  #chips .chs::-webkit-scrollbar { display: none; }
  #chips .lbl { display: none; }
  .chip { height: 40px; padding: 0 14px; font-size: .86em; flex: none; }
  .mbar { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 13px; border-radius: 20px; border: 1px solid var(--line2); background: var(--card2); color: var(--ink); font: 700 .86em/1 var(--f-body); white-space: nowrap; flex: none; cursor: pointer; }
  .mbar .ico { width: 18px; height: 18px; color: var(--ac-t); }
  #bVista.passado { border-color: var(--ac); background: var(--ac-soft); color: var(--ac-t); }
  #bCamadas { margin-inline-start: auto; }
  .mbar .bdg { background: var(--ac); color: var(--on-ac); font: 800 11px/18px var(--f-body); border-radius: 9px; min-width: 18px; padding: 0 5px; text-align: center; }

  /* mapa ocupa tudo entre a barra do mapa e a barra de abas; a folha corre por cima, recortada */
  main { overflow: hidden; }
  #mapwrap { position: absolute; inset: 0; }

  /* ferramentas do mapa num botão flutuante recolhível */
  #mtools { top: 10px; right: 10px; gap: 8px; }
  #mtools:not(.open) > :not(#mtT) { display: none; }
  #mtools #mtT { display: inline-flex; width: 46px; height: 46px; border-radius: 23px; box-shadow: var(--shadow); }
  #mtools.open #mtT { background: var(--grad); color: var(--on-ac); border-color: transparent; }
  #mtools .tb { min-width: 46px; min-height: 46px; font-size: 1em; }
  #mtools .grp { border-radius: 23px; }
  [dir="rtl"] #mtools { right: auto; left: 10px; }

  /* sobreposições acima da parte visível da folha */
  .mcanto { display: none; }               /* controles das features: na gaveta "Camadas" */
  #legend { display: none !important; }    /* legenda: na gaveta "Camadas" */
  #attr { bottom: calc(var(--shPx, 34%) + 8px); right: 8px; max-width: 55%; font-size: 11px; }
  #scenebar { left: 50%; bottom: calc(var(--shPx, 34%) + 40px); max-width: calc(100% - 20px); font-size: .8em; overflow: hidden; }
  #scenebar > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  #dataAviso { top: auto; bottom: calc(var(--shPx, 34%) + 40px); white-space: normal; max-width: calc(100% - 20px); flex-wrap: wrap; justify-content: center; z-index: 1003; }
  #load { top: 64px; }
  #drawer { bottom: calc(var(--shPx, 34%) + 8px); max-height: 40%; }

  /* cartão de toque no mapa (1º toque mostra; "Abrir" ou 2º toque abre o detalhe) */
  #tipM { left: 10px; right: 10px; bottom: calc(var(--shPx, 34%) + 12px); max-width: 460px; margin: 0 auto; padding: 12px 12px 10px 14px; border-radius: 16px; border-top: 3px solid var(--ac); z-index: 1150; box-shadow: var(--shadow-lg); font-size: .95em; line-height: 1.45; animation: rpIn .2s var(--ease); }
  #tipM .tm-c { max-height: 34vh; overflow: auto; }
  #tipM .tm-b { display: flex; gap: 8px; margin-top: 10px; }
  #tipM .tm-b .btn.pri { flex: 1; }
  #tipM .tm-b .btn { min-height: 44px; min-width: 44px; }

  /* folha de dados: 3 paradas (altura e posição vêm de shell/mobile.js); arrasta por qualquer parte sem brigar com a rolagem */
  aside { height: var(--shPx, 34%); border-radius: 20px 20px 0 0; transition: transform .32s cubic-bezier(.2, .9, .25, 1); will-change: transform; border-top: 1px solid var(--line2); box-shadow: 0 -8px 28px rgba(0, 0, 0, .38); }
  aside.drag { transition: none; }
  #sheetH { display: block; position: relative; padding: 0; min-height: 58px; cursor: grab; touch-action: none; flex: none; }
  #sheetGrip { display: block; position: absolute; inset: 0; width: 100%; border: 0; background: none; cursor: grab; z-index: 0; border-radius: 20px 20px 0 0; }
  #sheetGrip::before { content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line2); }
  #sheetGrip:focus-visible { outline-offset: -3px; }
  #sheetH .sh-row { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; padding: 20px 16px 4px; pointer-events: none; min-height: 58px; }
  #sheetBack { pointer-events: auto; min-height: 44px; padding: 0 16px; border-radius: 22px; font-size: 1em; font-weight: 800; flex: none; }
  #sheetT { display: flex; align-items: center; gap: 9px; min-width: 0; font: 700 1.3em/1.15 var(--f-head); letter-spacing: .2px; }
  #sheetT .ico { width: 22px; height: 22px; color: var(--ac); flex: none; }
  #sheetT .st-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  aside.det #sheetT { font-size: 1.12em; }
  aside.det #ptabs, #dBack { display: none; }
  #ptabs { padding: 0 8px; }
  #ptabs button { min-height: 46px; padding: 0 14px; font-size: 1.02em; }
  #side { padding: 14px 16px calc(var(--shHid, 0px) + 32px); overscroll-behavior: contain; }
  #sideSkel { padding: 14px 16px; }

  /* barra de abas inferior fixa */
  #tabbar { display: flex; flex: none; position: relative; z-index: 1600; height: var(--tabH); padding: 0 4px env(safe-area-inset-bottom); background: color-mix(in srgb, var(--bg2) 90%, transparent); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border-top: 1px solid var(--line); }
  #tabbar button { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: none; color: var(--mut); font: 600 12px/1 var(--f-body); position: relative; cursor: pointer; padding: 0; }
  #tabbar .ico { width: 24px; height: 24px; padding: 3px 16px; box-sizing: content-box; border-radius: 15px; transition: background .2s; }
  #tabbar button.on { color: var(--ink); }
  #tabbar button.on .ico { background: var(--ac-soft); color: var(--ac-t); }
  #tabbar .tl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
  #tabbar .bdg { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--ac); color: var(--on-ac); font: 800 10.5px/17px var(--f-body); border-radius: 9px; min-width: 17px; padding: 0 4px; text-align: center; }
  #tabbar .bdg.dot { min-width: 9px; width: 9px; height: 9px; padding: 0; top: 7px; left: calc(50% + 12px); }
  [dir="rtl"] #tabbar .bdg { left: auto; right: calc(50% + 6px); }

  /* páginas cheias: acima da barra de abas, com "voltar" grande */
  #page { bottom: var(--tabH); padding: 12px 14px 32px; }
  #pgBack { min-height: 44px; padding: 0 16px; font-size: .95em; border-radius: 22px; }
  body.tela #tabbar { display: none !important; }

  /* toasts e aviso de instalação acima da barra de abas */
  #toast { bottom: calc(var(--tabH) + 14px); max-width: calc(100vw - 24px); border-radius: 14px; padding: 12px 16px; }
  #instalar { position: fixed; left: 10px; right: 10px; bottom: calc(var(--tabH) + 12px); z-index: 5900; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 16px; max-width: 520px; margin: 0 auto; animation: rpIn .3s var(--ease); }
  #instalar img { border-radius: 10px; flex: none; }
  #instalar div { flex: 1; min-width: 0; }
  #instalar b { display: block; }
  #instalar small { color: var(--mut); font-size: .86em; }
  #instalar .btn { min-height: 44px; }

  /* folhas modais (Mais, Vista, Camadas e legenda) */
  .msheet { position: fixed; inset: 0; z-index: 5500; }
  .ms-scrim { position: absolute; inset: 0; background: rgba(8, 4, 2, .5); opacity: 0; transition: opacity .22s; }
  .msheet.on .ms-scrim { opacity: 1; }
  .ms-box { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88dvh; display: flex; flex-direction: column; background: var(--bg2); color: var(--ink); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line2); box-shadow: var(--shadow-lg); transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .9, .25, 1); padding-bottom: env(safe-area-inset-bottom); }
  .msheet.on .ms-box { transform: none; }
  .ms-box:focus { outline: none; }
  .ms-h { position: relative; display: flex; align-items: center; gap: 10px; padding: 22px 12px 6px 18px; touch-action: none; flex: none; }
  .ms-h .grab { position: absolute; left: 50%; top: 8px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line2); }
  .ms-h h2 { flex: 1; margin: 0; font: 700 1.4em/1.1 var(--f-head); }
  .ms-x { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); font-size: 1.05em; cursor: pointer; flex: none; }
  .ms-bd { overflow: auto; overscroll-behavior: contain; padding: 4px 16px 22px; }
  .ms-bd h3 { font: 700 .8em/1 var(--f-body); text-transform: uppercase; letter-spacing: 1.2px; color: var(--ac-t); margin: 18px 2px 10px; }
  .ms-bd .field { font-size: .95em; }
  /* Mais: grade de ícones grandes */
  .mg { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; }
  .mg-i { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 7px; min-height: 92px; padding: 8px 2px 6px; border: 0; border-radius: 16px; background: none; color: var(--ink); cursor: pointer; position: relative; text-align: center; }
  .mg-i:active, .mg-i.on { background: var(--card2); }
  .mg-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--ac-soft); color: var(--ac-t); flex: none; }
  .mg-ic .ico { width: 26px; height: 26px; }
  .mg-i.on .mg-ic { background: var(--grad); color: var(--on-ac); }
  .mg-t { font: 600 12.5px/1.2 var(--f-body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
  .mg-i .bdg { position: absolute; top: 4px; right: calc(50% - 34px); background: var(--ac); color: var(--on-ac); font: 800 10.5px/17px var(--f-body); border-radius: 9px; min-width: 17px; padding: 0 4px; }
  .mg-q { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 2px; scrollbar-width: none; }
  .mg-p { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); font: 600 .9em/1 var(--f-body); cursor: pointer; }
  .mg-p .ico { width: 18px; height: 18px; color: var(--ac-t); }
  .mg-cred { margin: 22px 2px 4px; font-size: .82em; color: var(--dim); line-height: 1.5; }
  .mg-cred a { color: var(--mut); }
  /* Vista e Camadas: botões segmentados e interruptores grandes */
  .vs-seg { display: flex; gap: 4px; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
  .vs-seg button { flex: 1 1 0; min-height: 44px; border: 0; border-radius: 10px; background: none; color: var(--mut); font: 700 .92em/1.1 var(--f-body); cursor: pointer; padding: 0 4px; }
  .vs-seg button.on { background: var(--grad); color: var(--on-ac); }
  .vs-nota { color: var(--mut); font-size: .86em; margin: 8px 2px 0; line-height: 1.45; }
  .sw-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
  .sw { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: 600 1em/1.25 var(--f-body); text-align: start; cursor: pointer; }
  .sw:last-child { border-bottom: 0; }
  .sw-t { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .sw-t i { width: 12px; height: 12px; border-radius: 50%; background: var(--dim); flex: none; }
  .sw-k { width: 48px; height: 28px; border-radius: 14px; background: var(--line2); position: relative; flex: none; transition: background .18s; }
  .sw-k::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .18s; }
  .sw[aria-checked="true"] .sw-k { background: var(--ac); }
  .sw[aria-checked="true"] .sw-k::after { transform: translateX(20px); }
  [dir="rtl"] .sw[aria-checked="true"] .sw-k::after { transform: translateX(-20px); }
  .sw-r { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2); flex: none; }
  .sw[aria-checked="true"] .sw-r { border: 7px solid var(--ac); }
  .cm-leg { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px 14px; }
  .cm-leg .it { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
  .cm-leg .sw { width: 14px; height: 14px; min-height: 0; padding: 0; border-radius: 4px; flex: none; border: 0; }
  .cm-leg .ramp { height: 10px; border-radius: 5px; margin: 5px 0 2px; }
  .cm-leg .scale { display: flex; justify-content: space-between; font-size: .86em; color: var(--mut); }
  .cm-leg .leg-img { display: block; max-width: 100%; height: auto; margin: 4px 0; border-radius: 4px; background: #fff; }
  .cm-ctl { display: flex; flex-direction: column; gap: 10px; }
  .cm-ctl > * { position: relative !important; inset: auto !important; transform: none !important; max-width: 100% !important; }

  /* busca em tela cheia */
  #buscaM { position: fixed; inset: 0; z-index: 5600; background: var(--bg); display: flex; flex-direction: column; }
  #buscaM .bm-h { display: flex; align-items: center; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 10px 8px 6px; border-bottom: 1px solid var(--line); }
  #buscaM .bm-v { width: 44px; height: 44px; border-radius: 22px; border: 0; background: none; color: var(--ink); font-size: 1.4em; cursor: pointer; flex: none; }
  #buscaM .bm-slot { flex: 1; min-width: 0; }
  #buscaM #gsw { width: 100%; }
  #buscaM #gsr { position: fixed; top: calc(max(8px, env(safe-area-inset-top)) + 61px); left: 0; right: 0; bottom: 0; max-height: none; border: 0; border-radius: 0; box-shadow: none; background: var(--bg); padding: 4px 6px calc(16px + env(safe-area-inset-bottom)); }
  #buscaM #gsr li { min-height: 54px; align-items: center; padding: 10px 12px; font-size: 1.04em; border-bottom: 1px solid var(--line); border-radius: 0; }
  #buscaM #gsr li.gh { min-height: 0; padding: 16px 12px 6px; border: 0; font: 700 .76em/1 var(--f-body); text-transform: uppercase; letter-spacing: 1.2px; color: var(--ac-t); cursor: default; }
  body.busca-on #tabbar { visibility: hidden; }

  /* menus soltos da casca viram folhas inferiores (cores/idioma, território) */
  #pal, #terr { left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; width: auto !important; max-width: none !important; max-height: 82dvh; border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); z-index: 5550; box-shadow: 0 -12px 40px rgba(0, 0, 0, .45); }
  #pal .pals button { min-height: 52px; }
  #pal .seg button, #terr .tr-rap button { min-height: 44px; }
  #pal .sel, #terr .sel { height: 44px; font-size: 16px; }
  .pal-ck { min-height: 44px; font-size: 1em; }
  .pal-ck input, .pop input[type="radio"], .pop input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--ac); }
  .pal-ft a { display: inline-flex; align-items: center; min-height: 44px; }
  #terr li { min-height: 48px; align-items: center; }
  .pop label { min-height: 44px; align-items: center; }
  .pop { max-width: calc(100vw - 16px); }

  /* janelas: folha inferior com alvos grandes */
  .dlg .box { border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .dlg .x { width: 44px; height: 44px; }
  .dlg .hd { padding: 10px 12px 10px 18px; }

  /* componentes compartilhados (design system): corpo ≥ 15 px, alvos de 44 px, cantos de 16 px */
  .card { border-radius: 16px; padding: 14px 15px; }
  .kpi { border-radius: 14px; }
  .kpi span { font-size: .84em; }
  .btn { min-height: 44px; height: auto; padding: 0 16px; border-radius: 12px; }
  .btn.sm { min-height: 40px; height: auto; padding: 0 13px; font-size: .86em; }
  .seg button { min-height: 40px; }
  .sel { height: 44px; }
  input, select, textarea { font-size: max(16px, 1em); }   /* evita o zoom automático do iOS ao focar */
  .field input, .field select, .field textarea { min-height: 46px; }
  .list li { padding: 12px 8px; min-height: 52px; }
  .list li .tx small, .list li .rt { font-size: .86em; }
  #side .sub, .dcard .sub, #page .card .sub { font-size: .92em; }
  #side h3 { font-size: .84em; }
  .kv { font-size: .95em; gap: 6px 12px; }
  .note { font-size: .9em; }
  .ev { font-size: .76em; padding: 4px 9px; }
  .tag { font-size: .8em; }
  .eyebrow { font-size: .82em; }
  table.t { font-size: .9em; }
  table.t th { font-size: .82em; }
  #pgBody table.t, #side table.t, .dlg table.t { display: block; overflow-x: auto; max-width: 100%; }
  /* ⓘ e "?" pequenos: área de toque de 44 px sem mudar o desenho */
  .info, .help-q { position: relative; }
  .info::after, .help-q::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
  .explain { min-height: 40px; }
  details > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
  .sbnav a, .sbnav button { min-height: 46px; font-size: 15px; }
  .sbfoot button { min-width: 44px; height: 44px; }
  .sbnav .ng { font-size: 11.5px; }
  #brand small { font-size: 11px; }
  footer { display: none; }
  /* ajustes da auditoria (depois): alvos ≥ 44 px e texto ≥ 12 px também na barra do mapa e no menu lateral */
  #mBrand { min-width: 44px; min-height: 44px; justify-content: center; }
  .chip, .mbar { height: 44px; border-radius: 22px; }
  #chips { min-height: 56px; }
  #ptabs button { min-width: 44px; }
  #attr { font-size: 12px; }
  .sbnav .ng, #brand small, .sbcred { font-size: 12px; }
  .sbcred a { display: inline-flex; align-items: center; min-height: 44px; }
  #pal h5, #terr h5, .pal-note, .pal-row label { font-size: 12px; }
  #sheetHt { display: none; }   /* o puxador já diz o estado (aria-expanded) */
  .pop { font-size: .95em; }
  .pop .btn { min-width: 44px; }
  #scenebar { white-space: normal; flex-wrap: wrap; justify-content: center; row-gap: 2px; text-align: center; }
  #scenebar > span { overflow: visible; }
  /* componentes da casca usados pelos módulos: segmentados e botões pequenos também com 44 px; selos e cabeçalhos ≥ 12 px
     mesmo dentro de títulos menores; campos de formulário com altura de toque */
  .seg button, .btn.sm { min-height: 44px; }
  .ev { font-size: max(12px, .76em); }
  .tag { font-size: max(12px, .8em); }
  table.t th { font-size: max(12px, .82em); }
  :is(#side, #pgBody, .dlg, .ms-bd) :is(select, input:is([type="text"], [type="search"], [type="date"], [type="number"], [type="email"], [type="password"], [type="tel"], [type="url"], :not([type]))) { min-height: 44px; }
  :is(#side, #pgBody, .dlg, .ms-bd) input:is([type="checkbox"], [type="radio"]) { width: 22px; height: 22px; accent-color: var(--ac); flex: none; }
  :is(#side, #pgBody, .dlg) input[type="range"] { min-height: 44px; }
  /* folha cheia: créditos, barra de cena e avisos do mapa ficariam atrás da barra do mapa */
  html[data-folha="cheia"] #attr, html[data-folha="cheia"] #scenebar, html[data-folha="cheia"] #dataAviso { visibility: hidden; }
  /* páginas da experiência (painel inicial, preferências, sala) */
  .dcard header .btn, .dcard .dh { min-width: 44px; min-height: 44px; }
  .lang-op { min-height: 52px; } .lang-op small { font-size: .82em; }
  .sh-k span { font-size: .84em; } .sh-mod .sh-n { font-size: .62em; }
  .sh-ctl .btn { min-height: 44px; }
}

@media (max-width: 430px) { #bCamadas .mb-t, #bVista .vk { display: none; } #bCamadas { padding: 0 11px; } }

/* celular deitado (paisagem): barras mais baixas e a folha começa menor */
@media (max-width: 860px) and (max-height: 500px) {
  :root { --tabH: calc(46px + env(safe-area-inset-bottom)); }
  #tabbar button { flex-direction: row; gap: 6px; }
  #tabbar .ico { padding: 2px 8px; }
  #top { padding-top: max(4px, env(safe-area-inset-top)); padding-bottom: 4px; }
  #bBurger, #bUser, #gs { height: 40px; }
  #chips { min-height: 46px; padding-top: 3px; padding-bottom: 3px; }
  .chip, .mbar { height: 38px; }
  #sheetH, #sheetH .sh-row { min-height: 48px; }
  #sheetH .sh-row { padding-top: 14px; }
  .ms-box { max-height: 94dvh; }
}

/* PWA instalado (sem barra do navegador): respeita o recorte da tela */
@media (display-mode: standalone) and (max-width: 860px) {
  #top { padding-top: max(10px, env(safe-area-inset-top)); }
}
@media (prefers-reduced-motion: reduce) {
  aside, .ms-box, .ms-scrim, #splash, #tabbar .ico, .sw-k, .sw-k::after { transition: none !important; }
}
body.economia #top, body.economia #tabbar { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

/* ===== Onda E — pedidos dos módulos à casca (19/10/2026) =====
   Piso de leitura de 12 px nos textos de apoio (selos, títulos de seção, notas, KPIs, listas) e alvos maiores; no
   celular, todo botão pequeno e o "O que isso significa?" com 44 px de toque. */
.ev { font-size: max(12px, .68em); }
#side h3 { font-size: max(12px, .78em); }
.note { font-size: max(12px, .83em); }
.kpi span { font-size: max(12px, .76em); }
.list li .tx small { font-size: max(12px, .8em); }
.btn.sm { height: auto; min-height: 34px; font-size: max(12px, .82em); }
.field > span { font-size: max(12px, 1em); }
.explain { min-height: 32px; font-size: max(12px, .78em); }
#pgBody > *, #side > *, #dBody > * { min-width: 0; }   /* nenhuma página alarga por causa de uma tabela larga */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dlg .x { width: 36px; height: 36px; }
@media (max-width: 860px) {
  .btn.sm, .seg button { min-height: 44px; }
  .explain { min-height: 44px; padding: 8px 0; }
  .dlg .x { width: 44px; height: 44px; }
}
/* celular: a barra de cena e o aviso do dia não ficam mais no meio de baixo do mapa, por cima dos focos
   (pedido das frentes da onda E). A barra de cena é só texto: deixa o toque passar para o mapa. */
@media (max-width: 860px) {
  #scenebar, #mapwrap.dw-on #scenebar {
    left: 10px; right: auto; transform: none; max-width: min(72%, 300px); pointer-events: none;
    justify-content: flex-start; text-align: left; font-size: 12px; line-height: 1.3; padding: 4px 9px; opacity: .92;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: normal; max-height: calc(2.6em + 8px);
  }
  #scenebar > span { display: inline; }
  #dataAviso { top: 10px; bottom: auto; max-width: calc(100% - 120px); font-size: 12.5px; }
}
/* abas do painel no celular: espaço visível entre elas e um degradê na borda direita indicando que há mais abas
   (avaliação de produto 20/10: "Previsão Para vocêSensores" saía colado) */
@media (max-width: 860px) {
  #ptabs { gap: 6px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 28px; }
  #ptabs button { white-space: nowrap; flex: 0 0 auto; }
}
/* botão "Perto de você" (só celular, tela inicial) */
#perto { display: none; }
@media (max-width: 860px) {
  #perto:not([hidden]) { display: inline-grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; position: absolute; left: 10px; top: 10px;
    z-index: 1001; min-height: 44px; padding: 7px 14px; border-radius: 14px; border: 1px solid var(--ac); background: color-mix(in srgb, var(--card) 92%, transparent);
    color: var(--ink); font: 700 13px/1.15 var(--f-body); box-shadow: 0 6px 18px rgba(0,0,0,.35); cursor: pointer; text-align: left; }
  #perto > span { grid-row: 1 / 3; font-size: 18px; }
  #perto b { grid-column: 2; }
  #perto small { grid-column: 2; font-weight: 600; font-size: 12px; color: var(--mut); }
  #mapwrap:has(#dataAviso) #perto { top: 58px; }
}
/* ===== Menu de páginas em grupos que abrem e fecham (lateral e "Mais" do celular) ===== */
.sbnav .sbf { padding: 10px 0 2px; }
.sbnav .sbf input, .mg-f input { width: 100%; box-sizing: border-box; height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--sb-line); background: rgba(255, 255, 255, .05); color: var(--sb-ink); font: 500 13.5px/1 var(--f-body); }
.sbnav .sbf input::placeholder { color: var(--sb-mut); }
.sbnav .sbf input:focus-visible, .mg-f input:focus-visible { outline: 2px solid var(--ac); outline-offset: 1px; }
.sbnav .sbg { margin-top: 2px; }
.sbnav .sbg-h { font: 600 12.5px/1.2 var(--f-body); color: var(--sb-mut); padding: 9px 10px; gap: 8px; }
.sbnav .sbg-h:hover { color: var(--sb-ink); }
.sbnav .sbg-h .lb { flex: 1; text-transform: uppercase; letter-spacing: .9px; font-size: 11px; }
.sbg-n { font: 700 11px/18px var(--f-body); min-width: 20px; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); text-align: center; color: inherit; }
.sbg-v { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: 0 4px 3px 2px; transition: transform .15s ease; flex: none; }
.sbg.fechado .sbg-v, .mg-g.fechado .sbg-v { transform: rotate(-45deg); margin-bottom: 0; }
.sbnav .sbg-c { padding-left: 6px; border-left: 1px solid var(--sb-line); margin-left: 14px; }
.sbnav .sbg.fechado:not(.busca) .sbg-c { display: none; }
.sbnav .sbg-c a { font-size: 13.5px; padding: 7px 10px; }
.sbnav .sbg-c a.on::before { left: -17px; }
.menu-vazio { color: var(--sb-mut); font-size: 13px; padding: 10px; margin: 0; }
/* barra recolhida (só ícones): sem cabeçalhos nem filtro, todos os ícones à vista como antes */
body.sb-min .sbnav .sbf, body.sb-min .sbnav .sbg-h { display: none; }
body.sb-min .sbnav .sbg .sbg-c { display: block; border: 0; margin: 0; padding: 0; }
@media (prefers-reduced-motion: reduce) { .sbg-v { transition: none; } }
/* celular: "Mais" com os mesmos grupos */
.mg-f { margin: 14px 0 0; }
.mg-f input { border-color: var(--line2); background: var(--card); color: var(--ink); height: 44px; font-size: 15px; border-radius: 12px; }
.mg-g { margin-top: 10px; border-top: 1px solid var(--line); }
.mg-gh { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 4px; border: 0; background: none; color: var(--ink); font: 700 .95em/1.2 var(--f-body); text-align: left; cursor: pointer; }
.mg-gh > span:first-child { flex: 1; }
.mg-gh .sbg-n { background: var(--card2); color: var(--mut); }
.mg-g.fechado:not(.busca) > .mg { display: none; }
/* ===== Linha do tempo do dia (item 36, 20/10/2026): botão ▶ ao lado do 📅 (reproduz os focos hora a hora).
   No celular o 📅 sai da barra superior; a reprodução abre pelo painel da Central orbital e pelo aviso do dia. ===== */
#bPlay { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 11px; height: 36px; min-width: 36px; padding: 0 10px; font-weight: 700; cursor: pointer; }
#bPlay:hover { border-color: var(--ac); color: var(--ac-t); }
#bPlay[hidden] { display: none; }
@media (max-width: 860px) { #bPlay { display: none !important; } }
/* ===== presença: "● 12 online" na barra de cima, ao lado da busca (shell/presenca.js) ===== */
.onl { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--mut); font: 600 12.5px/1 var(--f-body); white-space: nowrap; cursor: default; user-select: none; }
.onl[hidden] { display: none !important; }
.onl i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .22); flex: none; animation: onlPulso 2.4s ease-in-out infinite; }
.onl b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes onlPulso { 50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, .06); } }
@media (prefers-reduced-motion: reduce) { .onl i { animation: none; } }
/* computador: a barra já é cheia — ponto + número (palavra "online" só em telas largas); o botão do dia nunca é cortado */
@media (min-width: 861px) { .onl { padding: 0 9px; } .onl .onl-t { display: none; } #top:has(.onl:not([hidden])) #munSel { flex: 0 1 11.5em; min-width: 6.5em; } }
@media (min-width: 1181px) { #top:has(.onl:not([hidden])) #bData { flex-shrink: 0; } }
@media (min-width: 1680px) { .onl { padding: 0 10px; } .onl .onl-t { display: inline; } }
@media (min-width: 861px) and (max-width: 1180px) { #top:has(.onl:not([hidden])) #gsw { min-width: 100px; } .onl { padding: 0 7px; gap: 5px; } }
/* celular: só o ponto e o número, compacto, sem empurrar a busca nem os botões */
@media (max-width: 860px) { .onl { height: 26px; padding: 0 7px; gap: 5px; font-size: 12px; margin-inline: -2px; } .onl .onl-t { display: none; } .onl i { width: 7px; height: 7px; } }
@media (max-width: 340px) { .onl { display: none !important; } }
/* ---------------- onda 3B: busca ampliada, "O que há aqui", camadas favoritas, modo TV e alto contraste ---------------- */
/* busca: linha de apoio (povo, categoria, município) embaixo do nome */
#gsr li > span { min-width: 0; }
/* lista da busca aberta passa por cima dos controles do mapa (ferramentas, ★ favoritas), que ficam em z-index 1000 */
#top:has(#gsr:not([hidden])) { z-index: 1100; }
@media (min-width: 861px) { #gsr { right: auto; width: max(100%, 27em); max-width: calc(100vw - 24px); } }
#gsr .gs-sub { display: block; font-style: normal; font-size: .8em; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* "O que há aqui": cabeçalho, coordenadas, altitude, índice e blocos progressivos */
.loc-cab h2 { margin-bottom: .1em; }
.loc-lugar { margin: 0 0 .35em; font-weight: 600; }
.loc-coord { display: flex; flex-wrap: wrap; align-items: center; gap: .4em; font-size: .9em; }
.loc-coord code { font: 600 .95em var(--mono); background: var(--card2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; user-select: all; }
.loc-alt { margin: .45em 0 0; font-size: .92em; }
.loc-alt small { display: block; margin-top: 1px; }
.loc-idx { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: .7em 0 .4em; padding: .5em 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .84em; position: sticky; top: 0; z-index: 2; background: var(--bg2); }
.loc-ix { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border: 1px solid var(--line2); border-radius: 999px; color: var(--ink); text-decoration: none; }
.loc-ix:hover, .loc-ix:focus-visible { border-color: var(--ac); }
.loc-ix.wait { color: var(--mut); border-style: dashed; }
.loc-ix.indisp { color: var(--mut); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--mut) 60%, transparent); }
.loc-blk { scroll-margin-top: 3.2em; border-radius: 8px; transition: box-shadow .3s; }
.loc-blk.loc-flash { box-shadow: 0 0 0 2px var(--ac); }
.loc-wait, .loc-indisp { display: flex; align-items: center; gap: 8px; padding: .55em 0; font-size: .88em; color: var(--mut); border-bottom: 1px dashed var(--line); }
.loc-indisp { flex-wrap: wrap; color: var(--ink); }
.loc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ac); animation: locPulso 1.1s ease-in-out infinite; flex: 0 0 auto; }
@keyframes locPulso { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .loc-dot { animation: none; } }
/* camadas favoritas (controle ★ no canto superior direito; no celular aparece na gaveta "Camadas") */
.cj-ctl { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cj-b { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; background: var(--ov); color: var(--ov-ink); border: 1px solid var(--line2); box-shadow: var(--shadow); cursor: pointer; font: 600 .86em var(--f-body); }
.cj-b span[aria-hidden] { color: var(--ac-2); font-size: 1.1em; }
.cj-b[aria-expanded="true"] { border-color: var(--ac); }
.cj-pan { width: min(22em, calc(100vw - 32px)); background: var(--ov); color: var(--ov-ink); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 10px 12px; font-size: .88em; max-height: 60vh; overflow: auto; }
.cj-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cj-x { background: none; border: 0; color: var(--mut); cursor: pointer; font-size: 1em; min-width: 32px; min-height: 32px; }
.cj-l { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cj-l li { display: flex; gap: 4px; align-items: stretch; }
.cj-a { flex: 1; min-width: 0; text-align: start; background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; color: var(--ink); cursor: pointer; }
.cj-a:hover, .cj-a:focus-visible { border-color: var(--ac); }
.cj-a span { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cj-a small { display: block; color: var(--mut); font-size: .86em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cj-s, .cj-d { flex: 0 0 auto; min-width: 36px; background: var(--card2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--ink); }
.cj-f { display: flex; gap: 6px; flex-wrap: wrap; }
.cj-f input { flex: 1 1 10em; min-width: 0; height: 34px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg2); color: var(--ink); padding: 0 9px; font: inherit; }
.cj-vazio, .cj-nota { color: var(--mut); margin: 4px 0 8px; }
.cj-nota { margin: 8px 0 0; font-size: .9em; }
.cm-ctl .cj-ctl { align-items: stretch; }
.cm-ctl .cj-b { width: 100%; justify-content: flex-start; }
.cm-ctl .cj-pan { width: 100%; max-height: none; box-shadow: none; }
@media (max-width: 860px) { .cj-bt { display: inline; } }
/* modo TV / sala de situação: sem menus nem controles flutuantes; vista atual, "AO VIVO" com frescor e dica de saída */
body.tela-sala .mcanto > :not(#legend), body.tela-sala #perto, body.tela-sala #mtools, body.tela-sala #dataAviso, body.tela-sala .demo-mark ~ .mcanto { display: none !important; }
.sh-reg { color: var(--mut); font: 600 .95em/1.2 var(--f-head); letter-spacing: .4px; margin-top: .15em; min-height: 1.2em; }
.sh-live { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sh-vivo { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font: 700 1.05em/1 var(--f-head); letter-spacing: .6px; background: var(--ov); border: 2px solid currentColor; }
.sh-vivo i { width: .7em; height: .7em; border-radius: 50%; background: currentColor; }
.sh-vivo.ok { color: var(--ok); } .sh-vivo.ok i { animation: locPulso 1.6s ease-in-out infinite; }
.sh-vivo.warn { color: var(--warn); } .sh-vivo.bad { color: var(--bad); }
.sh-vivo-l { font-size: .78em; color: var(--ink); text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.sh-dica { position: absolute; left: 50%; top: calc(100% + 64px); transform: translateX(-50%); background: var(--ov); border: 1px solid var(--line2); border-radius: 999px; padding: 5px 14px; font-size: .8em; color: var(--ink); transition: opacity .6s; white-space: nowrap; }
.sh-dica.some { opacity: 0; pointer-events: none; }
@media (max-width: 860px) { .sh-live { align-items: flex-start; } .sh-dica { position: static; transform: none; justify-self: start; } }
/* preferências: alto contraste como seletor (seguir o sistema / sempre / nunca) */
.pref-ck.pref-sel { display: grid; grid-template-columns: 1fr; gap: 6px; cursor: default; }
/* alto contraste para centro de operações (body.contraste — Preferências, lembrado; sem escolha segue prefers-contrast: more):
   texto AAA (≥ 7:1), bordas fortes, nada de painel translúcido ou desfocado que "apague" o que está atrás ou na frente */
body.contraste:not(.light) { --bg: #000; --bg2: #000; --card: #000; --card2: #0d0d0d; --ink: #fff; --mut: #f2f2f2; --dim: #e6e6e6; --line: #cfcfcf; --line2: #ffffff; --ov: #000; --ov-ink: #fff; --sb-bg: #000; --sb-bg2: #000; --sb-ink: #fff; --sb-mut: #f2f2f2; --sb-line: #cfcfcf; --ac-t: #ffd400; }
body.contraste.light { --bg: #fff; --bg2: #fff; --card: #fff; --card2: #f2f2f2; --ink: #000; --mut: #111; --dim: #1a1a1a; --line: #3a3a3a; --line2: #000; --ov: #fff; --ov-ink: #000; --ac-t: #7a0000; }
body.contraste .ov, body.contraste #top, body.contraste #mtools .tb, body.contraste .dlg, body.contraste .cmdk, body.contraste .bp-cap, body.contraste #salaHud { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
body.contraste .ov, body.contraste #tip, body.contraste #legend, body.contraste #mtools .tb, body.contraste .cj-b, body.contraste .cj-pan, body.contraste #attr, body.contraste #scenebar,
body.contraste .card, body.contraste .kpi, body.contraste .btn, body.contraste .chip, body.contraste .pop, body.contraste #gsr, body.contraste .sh-k, body.contraste .sh-vivo { border-width: 2px !important; border-style: solid !important; border-color: var(--line2) !important; box-shadow: none !important; }
body.contraste #mtools.ov, body.contraste #mtools { border: 0 !important; background: none !important; }
body.contraste #top { background: var(--bg2) !important; border-bottom: 2px solid var(--line2); }
body.contraste .dlg, body.contraste .cmdk { background: rgba(0, 0, 0, .86); }
body.contraste #salaHud { background: var(--bg) !important; border-bottom: 2px solid var(--line2); }
body.contraste .sh-clock, body.contraste .sh-mod, body.contraste .sh-vivo-l { text-shadow: none; }
body.contraste a { text-decoration: underline; text-underline-offset: 2px; }
body.contraste .ev { border: 1px solid currentColor; font-weight: 700; }
body.contraste .mut, body.contraste small, body.contraste .sub, body.contraste .note { color: var(--mut) !important; opacity: 1 !important; }
body.contraste .chip.on, body.contraste .btn.pri { outline: 2px solid var(--ink); outline-offset: 1px; }
body.contraste :focus-visible { outline: 3px solid var(--ac-t) !important; outline-offset: 2px; }
body.contraste .loc-ix.wait { border-style: dashed !important; }
