/* Shared floating map surface. Scoped: no changes to the global site chrome. */
.tmf-host.tmf-host {
  --tmf-panel:var(--krn-card,#fff); --tmf-ink:var(--krn-text,#201b31); --tmf-muted:var(--krn-muted,#746d83);
  --tmf-line:var(--krn-line,rgba(100,70,155,.17)); --tmf-soft:#f6f3fa; --tmf-accent:#843de6; --tmf-selected:#efe5ff;
  position:relative; display:block; isolation:isolate; overflow:hidden; border:1px solid var(--tmf-line); border-radius:24px;
  height:clamp(540px,76vh,860px); min-height:540px; color:var(--tmf-ink); background:#e9eee8;
  font-family:var(--krn-font-sans,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif); font-size:14px; line-height:1.4;
}
.tmf-host[data-tmf-theme="dark"] { --tmf-panel:var(--krn-card,#20192c); --tmf-ink:var(--krn-text,#f3eff9); --tmf-muted:var(--krn-muted,#c5bbd6); --tmf-line:rgba(216,194,245,.20); --tmf-soft:#2a2237; --tmf-accent:#bd91ff; --tmf-selected:#3c2857; background:#171d24; color-scheme:dark; }
.tmf-host[data-tmf-theme="light"] { color-scheme:light; }
.tmf-host *, .tmf-host *::before, .tmf-host *::after { box-sizing:border-box; }
.tmf-host .tmf-panel { position:absolute; z-index:750; left:16px; top:16px; width:326px; max-width:calc(100% - 84px); max-height:calc(100% - 68px); overflow:auto; overscroll-behavior:contain; padding:15px; border:1px solid var(--tmf-line); border-radius:22px; background:var(--tmf-panel); color:var(--tmf-ink); box-shadow:0 5px 18px rgba(20,14,35,.13); scrollbar-width:thin; }
.tmf-host .tmf-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 12px; }
.tmf-heading small { display:block; color:var(--tmf-muted); font-size:11px; font-weight:650; }
.tmf-heading strong { display:block; font-size:21px; font-weight:720; letter-spacing:-.035em; }
.tmf-host .tmf-panel button, .tmf-host .tmf-panel a, .tmf-host .tmf-map-tools button, .tmf-host .tmf-selection button { font:inherit; cursor:pointer; color:var(--tmf-ink); text-shadow:none; box-shadow:none; filter:none; }
.tmf-host .tmf-collapse { display:grid; place-items:center; flex:0 0 36px; width:36px; min-height:36px; padding:0; border:1px solid var(--tmf-line); border-radius:50%; background:var(--tmf-soft); font-size:23px; }
.tmf-host .tmf-search { display:block; margin-bottom:10px; }
.tmf-search > span { display:block; font-size:11px; color:var(--tmf-muted); margin:0 0 4px; }
.tmf-host .tmf-search input { width:100%; height:42px; border:1px solid var(--tmf-line); border-radius:13px; background:var(--tmf-soft); color:var(--tmf-ink); padding:0 11px; font:inherit; }
.tmf-host .tmf-modules { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; padding:3px; border:1px solid var(--tmf-line); background:var(--tmf-soft); border-radius:12px; margin-bottom:12px; }
.tmf-host .tmf-modules > * { min-width:0; text-align:center; text-decoration:none; padding:8px 2px; font-size:12px; font-weight:650; white-space:nowrap; border:0; border-radius:9px; background:transparent; }
.tmf-host .tmf-modules [aria-current="page"] { background:var(--tmf-selected); color:var(--tmf-accent); }
.tmf-host .tmf-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin-bottom:12px; }
.tmf-host .tmf-tabs button { text-align:left; min-height:40px; padding:8px 11px; border:1px solid var(--tmf-line); border-radius:12px; background:var(--tmf-soft); font-size:13px; font-weight:650; }
.tmf-host .tmf-tabs button[aria-pressed="true"] { background:var(--tmf-selected); border-color:var(--tmf-accent); color:var(--tmf-accent); }
.tmf-host button:hover, .tmf-host a:hover { outline:1px solid var(--tmf-accent); outline-offset:-1px; }
.tmf-host :is(button,a,input,select,summary):focus-visible { outline:3px solid var(--tmf-accent); outline-offset:2px; }
.tmf-host .tmf-pane { padding-top:10px; border-top:1px solid var(--tmf-line); }
.tmf-host .tmf-detail-hint { margin:0; color:var(--tmf-muted); font-size:12px; }
.tmf-host .tmf-pane:has(> .tmf-native:not([hidden])) .tmf-detail-hint { display:none; }
.tmf-host [hidden], .tmf-host .tmf-native[hidden] { display:none!important; }
.tmf-host .tmf-panel.is-collapsed .tmf-content { display:none; }
.tmf-host .tmf-panel.is-collapsed .tmf-heading { margin:0; }
.tmf-host .tmf-results { display:grid; gap:5px; margin:0 0 10px; }
.tmf-host .tmf-results button { padding:8px 10px; text-align:left; border:1px solid var(--tmf-line); border-radius:9px; background:var(--tmf-soft); }
.tmf-host .tmf-results small { color:var(--tmf-muted); }
.tmf-host .tmf-map-tools { position:absolute; right:16px; top:16px; z-index:751; display:grid; gap:6px; }
.tmf-host .tmf-map-tools button { width:44px; height:44px; display:grid; place-items:center; border:1px solid var(--tmf-line); border-radius:14px; background:var(--tmf-panel); font-size:23px; line-height:1; }
.tmf-host .tmf-selection { position:absolute; z-index:740; left:50%; transform:translateX(-50%); bottom:16px; display:flex; align-items:center; gap:10px; max-width:calc(100% - 32px); padding:7px 10px; border:1px solid var(--tmf-line); border-radius:12px; color:var(--tmf-ink); background:var(--tmf-panel); font-size:12px; }
.tmf-host .tmf-selection button { border:0; border-radius:7px; background:var(--tmf-soft); padding:1px 8px; font-size:20px; }
.tmf-host .tmf-selection-marker { position:absolute; z-index:650; pointer-events:none; width:17px; height:17px; border:3px solid #fff; border-radius:50%; background:var(--tmf-accent); outline:5px solid rgba(153,84,246,.22); transform:translate(-50%,-50%); }
.tmf-host .tmf-native.tmf-native { position:static; inset:auto; transform:none; float:none; width:100%; max-width:none; height:auto; min-height:0; max-height:none; margin:0; padding:0; border:0; border-radius:0; box-shadow:none; background:transparent; color:var(--tmf-ink); overflow:visible; }
.tmf-host .tmf-native :is(h2,h3,h4,p,strong,span,small,label,dt,dd) { color:inherit; font-family:inherit; }
.tmf-host .tmf-native :is(h2,h3,h4) { font-size:14px; line-height:1.3; margin:0 0 8px; }
.tmf-host .tmf-native :is(input,select,textarea) { font-family:inherit; color:var(--tmf-ink); background:var(--tmf-soft); border-color:var(--tmf-line); border-radius:10px; min-width:0; }
.tmf-host .tmf-native button { background:var(--tmf-soft); border:1px solid var(--tmf-line); border-radius:10px; color:var(--tmf-ink); }
.tmf-host .tmf-native :is(.is-active,[aria-pressed="true"]) { color:var(--tmf-accent); background:var(--tmf-selected); border-color:var(--tmf-accent); }
.tmf-host .tmf-native section { background:transparent; box-shadow:none; border-color:var(--tmf-line); }
.tmf-host .tmf-native dl { display:grid; grid-template-columns:auto 1fr; gap:5px 10px; font-size:12px; }
.tmf-host .tmf-native dd { margin:0; overflow-wrap:anywhere; }
/* Atlas: native controls remain bound, relocated into common panes. */
.tmf-host #talia-atlas-map { position:absolute; inset:0; width:100%; height:100%; min-height:0; }
.tmf-host .atlas-layer-panel header, .tmf-host .atlas-map-actions, .tmf-host .leaflet-control-zoom { display:none!important; }
.tmf-host .atlas-layer-panel-body { display:block!important; }
.tmf-host .atlas-layer-panel section { padding:0; margin:0 0 13px; }
.tmf-host .atlas-layer-panel section:not(.atlas-opacity-control) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
.tmf-host .atlas-layer-kicker { grid-column:1/-1; color:var(--tmf-muted); }
.tmf-host .atlas-layer-option { min-width:0; padding:7px; border:1px solid var(--tmf-line); border-radius:10px; background:var(--tmf-soft); font-size:12px; }
.tmf-host .atlas-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.tmf-host .atlas-filters select { width:100%; height:40px; font-size:12px; }
.tmf-host .atlas-view-switch { grid-column:1/-1; min-width:0; padding:0; border:0; }
.tmf-host .atlas-view-switch > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
.tmf-host .atlas-view-switch label { padding:7px; border-color:var(--tmf-line); background:var(--tmf-soft); }
.tmf-host .atlas-view-switch small { display:none; }
.tmf-host .atlas-filter-tools { grid-column:1/-1; }
.tmf-host .atlas-map-status { left:auto; right:74px; top:16px; max-width:min(40%,350px); background:var(--tmf-panel); color:var(--tmf-ink); border-color:var(--tmf-line); }
.tmf-host .atlas-map-empty { background:var(--tmf-panel); color:var(--tmf-muted); }
/* Zona: one panel, same operational forms, original event delegation. */
.za-app.za-visual-v183 .tmf-host.tmf-host { height:clamp(540px,76vh,860px); min-height:540px; --za-183-ink:var(--tmf-ink); --za-183-ink-2:var(--tmf-ink); --za-183-muted:var(--tmf-muted); --za-183-line:var(--tmf-line); --za-183-surface:var(--tmf-panel); --za-183-surface-solid:var(--tmf-panel); --za-183-soft:var(--tmf-soft); --za-183-soft-violet:var(--tmf-selected); }
.tmf-host[data-tmf-module="zona"] .za-map-first-bar { display:none!important; }
.tmf-host .za-map-first-canvas, .tmf-host .za-map-first-stage { position:absolute; inset:0; width:100%; height:100%; min-height:0; }
.tmf-host .za-map-first-panel-trigger { display:none!important; }
.tmf-host .za-map-first-island--workflow { display:block; }
.tmf-host .za-map-first-island--workflow > * { width:100%; }
.tmf-host .za-map-first-time { display:block; }
.tmf-host .za-map-first-context-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.tmf-host .za-map-first-panel .za-map-first-sheet-handle, .tmf-host [data-za-immersive-context-close] { display:none!important; }
.tmf-host .za-immersive-context__header { padding:0 0 10px; }
.tmf-host .za-immersive-context__body { padding:0; }
.tmf-host .za-map-first-layers__panel { position:static; display:block; width:100%; padding:0; border:0; box-shadow:none; background:transparent; }
.tmf-host .za-map-first-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; position:static; width:auto; padding:0; border:0; background:transparent; box-shadow:none; }
.tmf-host .za-map-first-nav button { min-height:38px; padding:7px; font-size:12px; }
.tmf-host .za-map-first-nav + .za-immersive-context { margin-top:12px; }
.tmf-host .za-atlas-object-card__close { float:right; }
/* Previous Zona skins use !important positions and widths. Reset only relocated slots. */
.za-app.za-visual-v183 .tmf-host .tmf-native.tmf-native { position:static!important; inset:auto!important; transform:none!important; width:100%!important; max-width:100%!important; min-width:0!important; height:auto!important; max-height:none!important; overflow:visible!important; border:0!important; border-radius:0!important; background:transparent!important; box-shadow:none!important; padding:0!important; }
.za-app.za-visual-v183 .tmf-host .tmf-native .za-immersive-context__header { padding:0 0 10px!important; min-height:0; background:transparent; }
.za-app.za-visual-v183 .tmf-host .tmf-native .za-immersive-context__body { padding:0!important; overflow:visible; }
.za-app.za-visual-v183 .tmf-host .tmf-native .za-atlas-layer-panel-host { min-width:0; width:100%; }
.za-app.za-visual-v183 .tmf-host .tmf-native :is(.za-map-first-panel-header-actions,.za-section-heading) { flex-wrap:wrap; }
.tmf-host .tmf-native .talia-atlas-layer-panel { position:static; width:100%; max-width:100%; padding:0; border:0; box-shadow:none; background:transparent; color:var(--tmf-ink); }
.tmf-host .tmf-native .talia-atlas-layer-panel__header { display:none; }
.tmf-host .tmf-native .talia-atlas-layer-panel__body { display:block!important; padding:0; }
.tmf-host .tmf-native .talia-atlas-layer-panel__list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.tmf-host .tmf-native .talia-atlas-layer-option { min-width:0; padding:7px; border:1px solid var(--tmf-line); border-radius:10px; background:var(--tmf-soft); color:var(--tmf-ink); }
.tmf-host .tmf-native .talia-atlas-layer-option__label { color:var(--tmf-ink); }
.tmf-host .tmf-native :is(.talia-atlas-layer-option__count,.talia-atlas-layer-panel__kicker) { color:var(--tmf-muted); }
/* Xpedient: full canvas; periods, layers and channels keep their original handlers. */
.tmf-host[data-tmf-module="xpedient"] .xpmw-map-stage { position:absolute; inset:0; }
.tmf-host .xpmw-floating-head, .tmf-host .xpmw-map-tools, .tmf-host .xpmw-mobile-filters, .tmf-host .xpmw-panel-head { display:none!important; }
.tmf-host .xpmw-control-group { margin:0 0 12px; padding:0; border:0; background:transparent; }
.tmf-host .xpmw-layer-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.tmf-host .xpmw-range { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.tmf-host .xpmw-range input { width:100%; min-width:0; height:40px; font:inherit; }
.tmf-host .xpmw-range button { grid-column:1/-1; height:38px; }
.tmf-host .xpmw-map-status { left:auto; right:74px; top:16px; max-width:min(40%,360px); transform:none; background:var(--tmf-panel); color:var(--tmf-muted); box-shadow:none; }
.tmf-host .xpmw-metrics { right:16px; left:auto; bottom:42px; width:min(460px,calc(100% - 370px)); grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
.tmf-host .xpmw-metrics article { padding:7px 10px; min-height:0; background:var(--tmf-panel); border-color:var(--tmf-line); color:var(--tmf-ink); box-shadow:none; border-radius:10px; }
.tmf-host .xpmw-metrics strong { font-size:19px; }
.tmf-host .xpmw-metrics :is(span,small) { color:var(--tmf-muted); }
.tmf-host .xpmw-metrics small { display:none; }
.tmf-host .xpmw-panel-footer { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:9px 0; border-top:1px solid var(--tmf-line); font-size:11px; }
.tmf-host .xpmw-legend, .tmf-host .xpmw-channel-legend, .tmf-host .xpmw-attribution { background:var(--tmf-panel); color:var(--tmf-muted); border-color:var(--tmf-line); }
.tmf-host[data-tmf-theme="dark"] .xpmw-map-bg { background:#171d24; }
.tmf-host[data-tmf-theme="dark"] .xpmw-tiles img { filter:none; opacity:1; }
.tmf-host .xpmw-layer-grid label > span { color:var(--tmf-ink); background:var(--tmf-soft); border-color:var(--tmf-line); }
.tmf-host .xpmw-layer-grid input:checked + span { color:var(--tmf-accent); background:var(--tmf-selected); border-color:var(--tmf-accent); }
.tmf-host .xpmw-chip, .tmf-host .xpmw-channel-item { color:var(--tmf-ink); background:var(--tmf-soft); border-color:var(--tmf-line); }
@media (max-width:740px) {
  .tmf-host.tmf-host { height:clamp(560px,82dvh,900px); min-height:560px; border-radius:18px; }
  .za-app.za-visual-v183 .tmf-host.tmf-host { height:clamp(560px,82dvh,900px); min-height:560px; }
  .tmf-host .tmf-panel { width:300px; left:12px; top:12px; max-height:calc(100% - 110px); }
  .tmf-host .tmf-map-tools { top:12px; right:12px; }
  .tmf-host .tmf-search input, .tmf-host .tmf-native :is(input,select,textarea) { font-size:16px; }
  .tmf-host :is(.atlas-map-status,.xpmw-map-status) { top:auto; bottom:66px; right:12px; max-width:calc(100% - 24px); font-size:11px; }
  .tmf-host .xpmw-metrics { bottom:14px; left:12px; right:12px; width:auto; grid-template-columns:repeat(4,minmax(0,1fr)); }
  .tmf-host .xpmw-metrics span { font-size:8px; letter-spacing:0; }
  .tmf-host .xpmw-metrics strong { font-size:16px; }
  .tmf-host .tmf-selection { bottom:68px; font-size:11px; }
}
@media (max-width:430px) {
  .tmf-host .tmf-panel { top:auto; bottom:108px; width:calc(100% - 24px); max-width:none; max-height:55%; }
  .tmf-host .tmf-panel.is-collapsed { bottom:108px; }
  .tmf-host .tmf-heading strong { font-size:18px; }
  .tmf-host .tmf-panel :is(button,a) { min-height:40px; }
  .tmf-host .tmf-selection { bottom:72px; }
}
@media (prefers-reduced-motion:reduce) { .tmf-host * { scroll-behavior:auto!important; transition:none!important; animation:none!important; } }
/* 1.0.1: fit the available viewport and keep long controls inside the panel. */
.tmf-host.tmf-host,
.za-app.za-visual-v183 .tmf-host.tmf-host { height:var(--tmf-fit-height,clamp(480px,76dvh,980px)); min-height:0; }
.tmf-host .tmf-panel { width:352px; max-width:calc(100% - 84px); max-height:calc(100% - 32px); overflow:auto; overflow-x:hidden; overflow-wrap:normal; }
.tmf-host .tmf-panel .tmf-content { min-width:0; }
.tmf-host .tmf-native .atlas-layer-panel-body,
.tmf-host .tmf-native .atlas-layer-panel { overflow:visible; max-height:none; }
.tmf-host .atlas-layer-panel section:not(.atlas-opacity-control) { grid-template-columns:minmax(0,1fr); }
.tmf-host .atlas-layer-option { width:100%; min-width:0; min-height:38px; grid-template-columns:18px 12px minmax(0,1fr) auto; gap:8px; white-space:normal; overflow-wrap:break-word; line-height:1.3; }
.tmf-host .atlas-layer-option--kind { grid-template-columns:18px minmax(0,1fr); }
.tmf-host .atlas-layer-option span { min-width:0; }
.tmf-host .tmf-native .atlas-view-switch label { padding:0; }
.tmf-host .tmf-native .atlas-view-switch label > span { min-height:40px; padding:7px 5px; }
.tmf-host .tmf-native .atlas-filter-tools { justify-items:start; }
.tmf-host .tmf-geo-status { margin:0 0 10px; padding:7px 9px; border:1px solid var(--tmf-line); border-radius:10px; background:var(--tmf-soft); color:var(--tmf-muted); font-size:11px; font-variant-numeric:tabular-nums; }
.tmf-host .atlas-analysis-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin:0 0 12px; }
.tmf-host .atlas-analysis-grid article { min-width:0; padding:10px; border:1px solid var(--tmf-line); border-radius:12px; background:var(--tmf-soft); }
.tmf-host .atlas-analysis-grid strong { display:block; font-size:20px; color:var(--tmf-ink); }
.tmf-host .atlas-analysis-grid [data-atlas-analysis-location] { font-size:12px; overflow-wrap:anywhere; }
.tmf-host .atlas-analysis-grid span { display:block; color:var(--tmf-muted); font-size:11px; }
.tmf-host .atlas-analysis-note { margin:0 0 10px; color:var(--tmf-muted); font-size:12px; line-height:1.4; }
.tmf-host .atlas-analysis-link { display:block; padding:11px 12px; border-radius:11px; background:var(--tmf-selected); color:var(--tmf-accent); font-weight:750; text-decoration:none; text-align:center; }
.tmf-host[data-tmf-module="zona"] .za-map-first-nav { max-height:none; }
.tmf-host[data-tmf-module="zona"] .tmf-panel { scrollbar-width:thin; }
@media (max-width:740px) {
  .tmf-host.tmf-host,
  .za-app.za-visual-v183 .tmf-host.tmf-host { height:var(--tmf-fit-height,calc(100dvh - 130px)); min-height:420px; }
  .tmf-host .tmf-panel { width:min(352px,calc(100% - 72px)); max-height:calc(100% - 24px); }
  .tmf-host .tmf-map-tools button { min-width:44px; min-height:44px; }
}
@media (max-width:430px) {
  .tmf-host .tmf-panel { left:8px; right:8px; top:auto; bottom:8px; width:auto; max-width:none; max-height:min(56%,520px); padding:12px; border-radius:19px; }
  .tmf-host .tmf-panel.is-collapsed { left:8px; right:auto; bottom:8px; width:auto; max-height:56px; }
  .tmf-host .tmf-heading { position:sticky; top:-12px; z-index:2; padding:2px 0 8px; background:var(--tmf-panel); }
  .tmf-host .tmf-tabs { display:flex; overflow-x:auto; gap:5px; padding-bottom:3px; }
  .tmf-host .tmf-tabs button { flex:0 0 auto; min-height:44px; white-space:nowrap; }
  .tmf-host .tmf-panel :is(button,a,input,select) { min-height:44px; }
  .tmf-host .tmf-modules > * { white-space:normal; line-height:1.15; }
  .tmf-host .tmf-selection { bottom:68px; }
}
/* 1.0.2: one analysis row, two-column tools and a quiet Talia surface. */
.tmf-host .tmf-panel { box-shadow:none; }
.tmf-host .tmf-heading strong { font-size:19px; }
.tmf-host .tmf-heading small { color:var(--tmf-muted); font-size:11px; }
.tmf-host .tmf-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.tmf-host .tmf-tabs button { display:flex; align-items:center; gap:7px; min-width:0; white-space:normal; text-align:left; }
.tmf-host .tmf-tab-icon { display:inline-flex; flex:0 0 18px; }
.tmf-host .tmf-tab-icon svg { display:block; width:18px; height:18px; }
.tmf-host .tmf-analysis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; margin:9px 0; }
.tmf-host .tmf-analysis > * { display:flex; align-items:center; justify-content:center; min-width:0; min-height:38px; padding:6px 3px; border:1px solid var(--tmf-line); border-radius:10px; color:var(--tmf-ink); background:var(--tmf-soft); font:inherit; font-size:12px; font-weight:650; text-decoration:none; cursor:pointer; }
.tmf-host .tmf-analysis > :hover { border-color:var(--tmf-accent); color:var(--tmf-accent); }
.tmf-host .tmf-analysis > [aria-pressed="true"] { border-color:var(--tmf-accent); background:var(--tmf-selected); color:var(--tmf-accent); }
.tmf-host .tmf-analysis > :focus-visible { outline:2px solid var(--tmf-accent); outline-offset:2px; }
.tmf-host .tmf-analysis[hidden] { display:none; }
.tmf-host .tmf-native :is(input,select,button) { box-shadow:none; text-shadow:none; }
.tmf-host .atlas-layer-panel section:not(.atlas-opacity-control) { grid-template-columns:repeat(2,minmax(0,1fr)); }
.tmf-host .atlas-layer-option { grid-template-columns:18px 10px minmax(0,1fr) auto; gap:4px; font-size:11px; }

