/* Ronda 7 · F · capa de «física táctil» unificada con Marco Claro + FV Pro (28-nov-2026):
   Interruptores compactos 22×38px en tinta Magma #1B1C1F (#EDEDF0 con pomo #111114 en Black), cero azules ajenos,
   botones primarios con radio limpio (nunca globos 999px) y segmentados precisos. */

:is(.vv, .ix-raiz, .ac) {
  --f-on: #1B1C1F; --f-ring: #1B1C1F;
  --f-off: #D4D4D8; --f-off-ln: rgba(27,28,31,.10);
  --f-knob: #FFFFFF; --f-knob-on: #FFFFFF;
  --f-knob-sh: 0 1px 2px rgba(16,17,20,.26), 0 0 0 .5px rgba(16,17,20,.08);
  --f-spring: cubic-bezier(.34,1.45,.64,1); --f-seg: cubic-bezier(.34,1.35,.64,1); --f-out: cubic-bezier(.23,1,.32,1);
  --f-sheen: none;
  --f-lift: 0 4px 12px -6px rgba(16,17,20,.35);
  --f-ind-bg: #FFFFFF; --f-ind-sh: 0 1px 2px rgba(16,17,20,.08), 0 0 0 .5px rgba(16,17,20,.06);
  --f-ok: #1A7A4C;
}
:is([data-tema="black"], [data-theme="dark"]) :is(.vv, .ix-raiz, .ac) {
  --f-on: #EDEDF0; --f-ring: #EDEDF0;
  --f-off: #33343A; --f-off-ln: rgba(255,255,255,.12);
  --f-knob: #EDEDF0; --f-knob-on: #111114;
  --f-knob-sh: 0 1px 3px rgba(0,0,0,.55);
  --f-sheen: none;
  --f-lift: 0 6px 16px -8px rgba(0,0,0,.8);
  --f-ind-bg: #2A2B32; --f-ind-sh: 0 1px 2px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.08);
  --f-ok: #4ADE80;
}

/* ═════ 1 · INTERRUPTORES · pista 38×22 (22×38px), pomo 18×18, tinta Magma #1B1C1F en activo ═════ */
.vv.i2 .nt-sw__p { width: 38px; height: 22px; border-radius: 999px; background: var(--f-off); box-shadow: inset 0 0 0 1px var(--f-off-ln); }
.vv.i2 .nt-sw__p::after { top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--f-knob); box-shadow: var(--f-knob-sh); }
.vv.i2 .nt-sw input:checked + .nt-sw__p { background: var(--f-on); box-shadow: none; }
.vv.i2 .nt-sw input:checked + .nt-sw__p::after { transform: translateX(16px); background: var(--f-knob-on); }
.vv.i2 .nt-sw input:focus-visible + .nt-sw__p { outline: 2px solid var(--f-ring); outline-offset: 2px; }
.vv.i2 .nt-sw:active .nt-sw__p { transform: none; }

.vv.i2 .zt .zt-int > input { width: 38px; height: 22px; margin-top: -11px; }
.vv.i2 .zt .zt-int > i { width: 38px; height: 22px; border-radius: 999px; background: var(--f-off); box-shadow: inset 0 0 0 1px var(--f-off-ln); }
.vv.i2 .zt .zt-int > i::after { left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--f-knob); box-shadow: var(--f-knob-sh); }
.vv.i2 .zt .zt-int > input:checked + i, .vv.i2 .zt .zt-int[aria-checked="true"] > i { background: var(--f-on); box-shadow: none; }
.vv.i2 .zt .zt-int > input:checked + i::after, .vv.i2 .zt .zt-int[aria-checked="true"] > i::after { left: 2px; transform: translateX(16px); background: var(--f-knob-on); }
.vv.i2 .zt .zt-int > input:focus-visible + i, .vv.i2 .zt .zt-int:focus-visible > i { outline: 2px solid var(--f-ring); outline-offset: 2px; }

.vv.bt .bt-sw { width: 42px; height: 34px; min-height: 34px; }
.vv.bt .bt-sw i { width: 38px; height: 22px; border-radius: 999px; background: var(--f-off); box-shadow: inset 0 0 0 1px var(--f-off-ln); }
.vv.bt .bt-sw i::after { top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--f-knob); box-shadow: var(--f-knob-sh); }
.vv.bt .bt-sw[aria-checked="true"] i { background: var(--f-on); box-shadow: none; }
.vv.bt .bt-sw[aria-checked="true"] i::after { transform: translateX(16px); background: var(--f-knob-on); }
.vv.bt .bt-sw:focus-visible i { outline: 2px solid var(--f-ring); outline-offset: 2px; }

[data-ui="panel"] .ix-raiz [data-pantalla="taquilla"] .interr, .ix-raiz .eve .interr {
  width: 38px; min-width: 38px; height: 22px; min-height: 22px; border-radius: 999px; background: var(--f-on); box-shadow: none;
}
[data-ui="panel"] .ix-raiz [data-pantalla="taquilla"] .interr[aria-checked="false"], .ix-raiz .eve .interr[aria-checked=false] {
  background: var(--f-off); box-shadow: inset 0 0 0 1px var(--f-off-ln);
}
.ix-raiz [data-pantalla="taquilla"] .interr::after, .ix-raiz .eve .interr::after,
[data-tema="black"] .ix-raiz .eve .interr[aria-checked="true"]::after,
[data-tema="black"] .ix-raiz [data-pantalla="taquilla"] .interr[aria-checked="true"]::after,
[data-tema="noche"] .eve .interr::after {
  top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--f-knob-on); box-shadow: var(--f-knob-sh); transform: translateX(16px);
}
.ix-raiz [data-pantalla="taquilla"] .interr[aria-checked="false"]::after,
.ix-raiz .eve .interr[aria-checked=false]::after,
[data-tema="black"] .ix-raiz .eve .interr[aria-checked="false"]::after {
  left: 2px; transform: none; background: var(--f-knob);
}
.ix-raiz :is(.eve, [data-pantalla="taquilla"]) .interr:focus-visible { outline: 2px solid var(--f-ring); outline-offset: 2px; }

.vv a.vv-pil--tog i { background: var(--f-off); }
.vv a.vv-pil--tog i::after { background: var(--f-knob); box-shadow: var(--f-knob-sh); }
.vv a.vv-pil--tog.on i { background: var(--f-on); }
.vv a.vv-pil--tog.on i::after { background: var(--f-knob-on); }

.plb-herr .plb-web i { background: var(--f-off); }
.plb-herr .plb-web i::after { background: var(--f-knob); box-shadow: var(--f-knob-sh); }
.plb-herr .plb-web[aria-checked="true"] i { background: var(--f-on); }
.plb-herr .plb-web[aria-checked="true"] i::after { background: var(--f-knob-on); }

/* ═════ 2 · BOTONES PRINCIPALES · rectángulo nítido (7–8px), compresión táctil .97 ═════ */
:is(.vv-b.n, .tq-btn:not(.tq-btn--contorno):not(.tq-btn--peligro), .tl-btn:not(.tl-btn--2):not(.tl-btn--mal), .nc-btn-pri):not(.ico):not(:has(> svg:only-child)) {
  border-radius: 8px; background-image: none;
}
.ac .ac-b:not(.ac-b--txt):not(.ac-b--sec), .ac .ac-b--sec { border-radius: 8px; background-image: none; }
:is(.vv-b.n, .tq-btn, .tl-btn, .nc-btn-pri, .fp-btn, .ac-b):not(.ico):not(:has(> svg:only-child)):not(:disabled):not([aria-disabled="true"]):active { transform: scale(.97); }
:is(.vv-b, .tq-btn, .tl-btn, .nc-btn-pri, .fp-btn, .ac-b):focus-visible { outline: 2px solid var(--f-ring); outline-offset: 2px; }
:is(.vv-b, .tq-btn, .tl-btn, .nc-btn-pri, .ac-b)[data-ocupado]::after { content: "\2192"; display: inline-block; font-weight: 700; }

/* ═════ 3 · SEGMENTADOS Y PÍLDORAS ═════ */
:where(.dsh-pest__tabs, .gr .gr-seg, .vv.i2 .zt .zt-seg)[data-f-ind] { position: relative; }
:is(.dsh-pest__tabs, .gr .gr-seg, .vv.i2 .zt .zt-seg)[data-f-ind] { isolation: isolate; }
:is(.dsh-pest__tabs, .gr .gr-seg, .vv.i2 .zt .zt-seg)[data-f-ind]::before {
  content: ""; position: absolute; z-index: 0; left: 0; top: 0; width: var(--f-w); height: var(--f-h);
  transform: translate(var(--f-x), var(--f-y)); border-radius: 6px; background: var(--f-ind-bg); box-shadow: var(--f-ind-sh); pointer-events: none;
}
:is(.dsh-pest__tabs, .gr .gr-seg, .vv.i2 .zt .zt-seg)[data-f-ind] > * { position: relative; z-index: 1; }
.dsh-pest__tabs[data-f-ind] > button[aria-selected=true], .gr .gr-seg[data-f-ind] > button[aria-pressed="true"], .vv.i2 .zt .zt-seg[data-f-ind] > label.on { background: none; box-shadow: none; }
.vv .vv-seg a[aria-current], .vv.i2.mz .mz-chips a[aria-current], .vv.i2.rs .rs-seg a[aria-current] { box-shadow: var(--f-ind-sh); }

/* ═════ 4 · KPI: pares cortos sin partir ═════ */
.vv.i2 :is(.i2-kv dd, .i2-cifra small, .i2-sec__n, .dsh-apoyo) { white-space: nowrap; }
.vv.i2 .dsh-tabla-caja > p.dsh-apoyo { white-space: normal; }

/* ═════ MOVIMIENTO ═════ */
@media (prefers-reduced-motion: no-preference) {
  .vv.i2 .nt-sw__p, .vv.i2 .zt .zt-int > i, .vv.bt .bt-sw i { transition: background-color 180ms var(--f-out), box-shadow 180ms var(--f-out); }
  .vv.i2 .nt-sw__p::after, .vv.i2 .zt .zt-int > i::after, .vv.bt .bt-sw i::after,
  .ix-raiz [data-pantalla="taquilla"] .interr::after, .ix-raiz .eve .interr::after { transition: transform 300ms var(--f-spring), width 160ms var(--f-out), background-color 180ms var(--f-out); }
  .vv.i2 .nt-sw:not(.fijo):active .nt-sw__p::after, .vv.i2 .zt .zt-int:not(:disabled):active > i::after, .vv.bt .bt-sw:not(:disabled):active i::after,
  .ix-raiz :is(.eve, [data-pantalla="taquilla"]) .interr:active::after { width: 21px; }
  .vv.i2 .nt-sw:not(.fijo):active input:checked + .nt-sw__p::after,
  .vv.i2 .zt .zt-int:active > input:checked + i::after, .vv.i2 .zt .zt-int[aria-checked="true"]:active > i::after,
  .vv.bt .bt-sw[aria-checked="true"]:not(:disabled):active i::after,
  .ix-raiz :is(.eve, [data-pantalla="taquilla"]) .interr:not([aria-checked="false"]):active::after { width: 21px; transform: translateX(13px); }
  .ix-raiz :is(.eve, [data-pantalla="taquilla"]) .interr { transition: background-color 180ms var(--f-out); }
  .vv a.vv-pil--tog i { transition: background-color 180ms var(--f-out); }
  .vv a.vv-pil--tog i::after { transition: transform 300ms var(--f-spring), width 160ms var(--f-out); }
  :is(.vv-b.n, .tq-btn:not(.tq-btn--contorno), .tl-btn, .nc-btn-pri, .ac-b):not(.ico) { transition: transform 140ms var(--f-out), box-shadow 180ms var(--f-out), background-color 140ms ease, opacity 140ms ease, border-color 140ms ease; }
  :is(.vv-b, .tq-btn, .tl-btn, .nc-btn-pri, .ac-b)[data-ocupado]::after { animation: f-flecha 900ms var(--f-out) infinite; }
  @keyframes f-flecha { 0% { transform: translateX(-6px); opacity: 0; } 35% { opacity: 1; } 100% { transform: translateX(3px); opacity: 1; } }
  :is(.dsh-pest__tabs, .gr .gr-seg, .vv.i2 .zt .zt-seg)[data-f-lista]::before { transition: transform 260ms var(--f-seg), width 260ms var(--f-seg), height 260ms var(--f-seg); }
}
@media (prefers-reduced-motion: reduce) {
  :is(.nt-sw__p, .zt-int > i, .bt-sw i, .interr, .vv-pil--tog i, .plb-web i, .vv-b, .tq-btn, .tl-btn, .nc-btn-pri, .fp-btn, .ac-b, .dsh-pest__tabs button, .gr-seg button, .zt-seg > label, .vv-seg a, .mz-chips a, .rs-seg a, .tl-seg label),
  :is(.nt-sw__p, .zt-int > i, .bt-sw i, .interr, .vv-pil--tog i, .plb-web i, .dsh-pest__tabs, .gr-seg, .zt-seg, .vv-b, .tq-btn, .tl-btn, .nc-btn-pri, .ac-b)::before,
  :is(.nt-sw__p, .zt-int > i, .bt-sw i, .interr, .vv-pil--tog i, .plb-web i, .vv-b, .tq-btn, .tl-btn, .nc-btn-pri, .ac-b)::after { transition: none !important; animation: none !important; }
  :is(.vv-b, .tq-btn, .tl-btn, .nc-btn-pri, .fp-btn, .ac-b):active { transform: none; }
}
