.vf-flujo { padding: 16px 20px; }
.vf-flujo .flow-heading { margin-bottom: 10px; }
.vf-flujo .flow-nodes { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
.vf-flujo .nodo { min-height: 52px; padding: 7px 8px; gap: 7px; }
.vf-flujo .nodo::before, .vf-flujo .nodo::after { display: none; }
.vf-flujo .nodo-icon { height: 29px; width: 29px; }
.vf-flujo .nodo small { font-size: .73rem; margin-top: 2px; }
.vf-flujo .nodo.selected { background: #a4d65e; border-color: #96c455; color: #1c1d22; }
.vf-flujo .nodo.selected small { color: #34431e; }
.vf-flujo .nodo.selected .nodo-icon { background: #ffffff55; color: #273416; }

.vf-explorador { container: explorador / inline-size; }
.vf-explorador .explorer-name h2 { font-size: 1.06rem; }
.vf-pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.vf-pie .btn { min-height: 38px; }
.vf-fotos { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; background: none; border: 0; color: var(--purple); font-size: .84rem; font-weight: 600; }
.vf-fotos:hover { text-decoration: underline; }
.vf-escena { --grafito: #1c1d22; --violeta: #581c87; --claro: #d4b2f1; --lima: #a4d65e; --ambar: #f2a33a; position: relative; background: var(--grafito); color: #fff; font-family: Inter, sans-serif; }
.vf-escena .sv-frame { border-radius: 0; background: var(--grafito); }
.vf-escena .sv-frame.is-cv::after { content: none; }
.vf-escena .sv-img { object-position: center; }
.vf-plano { position: absolute; top: 50%; left: 50%; height: 100%; width: auto; aspect-ratio: 16/9; transform: translate(-50%,-50%); z-index: 3; pointer-events: none; }
.vf-tag, .vf-muestra-tag { position: absolute; display: block; border-radius: 4px; padding: .2em .53em; background: var(--lima); color: #14160f; font-size: clamp(.72rem,.93cqi,1.0625rem); font-weight: 700; line-height: 1.23; white-space: nowrap; }
.vf-tag.vf-violeta { background: var(--violeta); color: #fff; }
.vf-tag.vf-ambar { background: var(--ambar); }
.vf-tag.vf-grafito { background: rgb(28 29 34 / 88%); color: #fff; }
.vf-corto { display: none; }

.vf-cartelas { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.vf-cartela { position: absolute; left: var(--x); top: var(--y); width: var(--w); padding: clamp(12px,1.15cqi,22px) clamp(13px,1.25cqi,26px); border-radius: clamp(8px,.85cqi,16px); border-left: clamp(3px,.32cqi,6px) solid var(--violeta); background: rgb(28 29 34 / 93%); box-shadow: 0 8px 22px #0004; backdrop-filter: blur(5px); color: #fff; pointer-events: auto; }
.vf-cartela.vf-lima { border-left-color: var(--lima); }
.vf-cartela.vf-ambar { border-left-color: var(--ambar); }
.vf-kicker { margin: 0 0 .43em; color: var(--claro); font-size: clamp(.73rem,.81cqi,.9375rem); font-weight: 600; line-height: 1.2; letter-spacing: .1em; text-transform: uppercase; }
.vf-lima .vf-kicker { color: var(--lima); }
.vf-ambar .vf-kicker { color: var(--ambar); }
.vf-cartela h3 { margin: 0; font-size: clamp(1.12rem,1.64cqi,1.875rem); font-weight: 700; line-height: 1.16; letter-spacing: -.018em; text-wrap: initial; color: #fff; }
.vf-cuerpo, .vf-nota { color: #e4e4e9; margin: .5em 0 0; font-size: clamp(.875rem,1.02cqi,1.1875rem); line-height: 1.38; }
.vf-nota { color: #d1d1d8; font-size: clamp(.79rem,.91cqi,1.0625rem); }
.vf-filas { margin: .4em 0 0; font-variant-numeric: tabular-nums; }
.vf-filas > div { display: flex; align-items: baseline; justify-content: space-between; gap: .6em; padding: .27em 0; border-top: 1px solid #ffffff24; font-size: clamp(.83rem,1.01cqi,1.1875rem); line-height: 1.32; }
.vf-filas dt { color: #cccbd2; }
.vf-filas dd { color: #fff; font-weight: 600; text-align: right; }
.vf-fuentes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: .52em; }
.vf-fuente { display: inline-flex; gap: .38em; align-items: center; width: fit-content; max-width: 100%; padding: .28em .65em; border-radius: 999px; color: #f3f2f6; background: #ffffff15; font-size: clamp(.75rem,.8cqi,.9rem); font-weight: 600; line-height: 1.22; }
.vf-prefijo { color: #d3d1db; font-weight: 400; }
.vf-prefijo::after { content: " ·"; }
.vf-fuente i { display: block; width: .55em; height: .55em; border-radius: 2px; flex: none; background: #7aa7ff; }
.vf-fuente-papel i { background: #efe8d6; }
.vf-fuente-etiqueta i { background: #a4d65e; }
.vf-fuente-operario i { background: #f2a33a; border-radius: 50%; }
.vf-leyenda { position: absolute; left: 1.458%; bottom: 2.222%; z-index: 3; display: flex; align-items: center; flex-wrap: wrap; gap: .35em .62em; min-height: 0; margin: 0; padding: .38em .65em; border-radius: .4em; background: rgb(28 29 34 / 87%); color: #fff; font-size: clamp(.73rem,.81cqi,.9375rem); font-weight: 600; line-height: 1.25; }
.vf-leyenda span { margin: 0; white-space: normal; }
.vf-leyenda em { color: #d4d2db; font-style: normal; font-weight: 400; }
.vf-escena-ubicacion .vf-leyenda { left: 56.25%; }
.vf-escena-revision .vf-leyenda, .vf-escena-salida .vf-leyenda { left: auto; right: 1.458%; top: 2.222%; bottom: auto; }
.vf-escena-salida .vf-cartela h3 { font-size: clamp(1.03rem,1.49cqi,1.8125rem); }
.vf-confirmacion { display: grid; justify-items: start; gap: 5px; margin-top: .48em; }
.vf-retiro { width: 100%; min-height: 34px; display: flex; align-items: center; gap: .55em; text-align: left; border: 1.5px solid var(--ambar); border-radius: .5em; padding: .32em .65em; background: #f2a33a20; color: #fff; font-size: clamp(.86rem,1cqi,1.125rem); font-weight: 600; }
.vf-retiro:not(:disabled):hover { background: #f2a33a3a; }
.vf-retiro:disabled { opacity: 1; border-color: var(--lima); background: #a4d65e20; color: #e2f2d3; }
.vf-retiro:focus-visible { outline-color: white; outline-offset: 2px; }
.vf-casilla { display: grid; place-items: center; width: 1.15em; height: 1.15em; border-radius: .22em; border: 2px solid var(--ambar); }
.vf-retiro:disabled .vf-casilla { border-color: var(--lima); }
.vf-retiro b { border-radius: .22em; background: white; color: #1c1d22; padding: 0 .35em; }
.vf-muestra { position: absolute; z-index: 3; left: 78.125%; top: 12.037%; width: 20.3125%; }
.vf-muestra-tag { top: var(--y-tag); left: 0; }
.vf-muestra-foto { position: relative; aspect-ratio: 390/300; overflow: hidden; border-radius: 4.6% / 6%; outline: 2px solid white; box-shadow: 0 .55em 1.1em #0005; container-type: inline-size; }
.vf-muestra-foto > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vf-etiqueta { position: absolute; left: 14.87%; top: 17.33%; width: 69.23%; padding: 3.6% 4.1%; transform: rotate(-2deg); background: #fbfaf6; color: #171717; border-radius: 4%; box-shadow: 0 1px 3px #0005; font-size: 4.1cqi; line-height: 1.32; }
.vf-etiqueta small { display: block; font-size: .69em; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: #505051; }
.vf-etiqueta strong { display: block; margin: .22em 0 .38em; }
.vf-etiqueta div { border: .15em solid var(--lima); font-weight: 700; }
.vf-etiqueta i { display: block; height: 1.6em; margin-top: .4em; background: repeating-linear-gradient(90deg,#111 0 2%,transparent 2% 3%,#111 3% 4%,transparent 4% 6%); }
.vf-registro { padding: .65rem 0; border-bottom: 1px solid var(--line); }
.vf-registro h4 { margin: 0 0 .25rem; }
.vf-registro .vf-filas > div { border-color: var(--line); }
.vf-registro .vf-filas dt, .vf-registro .vf-filas dd { color: var(--ink); }
.vf-registro .vf-fuente { color: #342c37; background: #f0ecf3; }
.vf-registro .vf-prefijo { color: #57475d; }
.vf-sim-sistema { font-size: .8rem; margin-top: .75rem; }

@media (max-width:1200px) { .vf-flujo .nodo { flex-direction: row; align-items: center; } .vf-flujo .nodo small { display: none; } }
@media (max-width:720px) {
  .vf-flujo { padding: 12px; }
  .vf-flujo .flow-nodes { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
  .vf-flujo .nodo { min-height: 42px; }
  .vf-flujo .nodo-icon { width: 22px; height: 23px; }
  .vf-flujo .nodo-icon .ico { width: 15px; height: 15px; }
  .vf-flujo .nodo strong { font-size: .79rem; }
  .vf-pie { padding: 9px 10px; gap: 5px; }
  .vf-pie .actions { gap: 5px; }
  .vf-pie .btn { padding: 6px 9px; font-size: .8rem; }
  .vf-fotos { font-size: .75rem; gap: 5px; }
}
@container explorador (max-width: 1040px) {
  .vf-cartelas { position: static; display: grid; gap: 10px; padding: 7px 14px 15px; background: var(--grafito); }
  .vf-cartela { position: static; width: 100%; border-radius: 5px 9px 9px 5px; border-left-width: 3px; padding: 13px 15px; background: #28292e; backdrop-filter: none; box-shadow: none; }
  .vf-cartela h3, .vf-escena-salida .vf-cartela h3 { font-size: 1.19rem; line-height: 1.22; }
  .vf-kicker { font-size: .75rem; }
  .vf-cuerpo, .vf-nota, .vf-filas > div { font-size: .94rem; line-height: 1.4; }
  .vf-fuente { font-size: .8rem; }
  .vf-escena .vf-leyenda { position: static; margin: 0; padding: 9px 14px 4px; border-radius: 0; background: var(--grafito); font-size: .75rem; }
  .vf-leyenda em { margin-left: auto; }
  .vf-confirmacion { gap: 8px; }
  .vf-retiro { width: fit-content; min-height: 44px; padding: 7px 12px; font-size: .95rem; }
}
@container explorador (max-width: 590px) {
  /* El ancho conserva la señal del portón y el matafuego de los encuadres originales. */
  .vf-escena .sv-frame { aspect-ratio: var(--recorte); }
  .vf-escena-ingreso { --recorte: 1.61; }
  .vf-escena-remito { --recorte: 1.22; }
  .vf-escena-ubicacion, .vf-escena-revision { --recorte: 1.75; }
  .vf-escena-piso { --recorte: 1.17; }
  .vf-escena-salida { --recorte: 1.42; }
  .vf-largo { display: none; }
  .vf-corto { display: inline; }
  .vf-tag { font-size: .7rem; }
  .vf-escena-salida .vf-tag { font-size: .68rem; }
  .vf-escena-salida .sv-svg text { font-size: 40px; }
  .vf-muestra { left: auto; top: 21px; right: 8px; width: 24%; min-width: 76px; max-width: 122px; }
  .vf-muestra-tag { top: auto; bottom: calc(100% + 2px); right: 0; left: auto; font-size: .66rem; }
  .vf-muestra-foto { outline-width: 1px; }
}
@media (max-width:400px) {
  .vf-explorador .explorer-name { width: auto; }
  .vf-explorador .explorer-bar { padding-inline: 10px; gap: 5px; }
  .vf-explorador .segmented button { min-height: 36px; padding-inline: 6px; font-size: .73rem; }
  .vf-flujo .nodo { gap: 4px; padding-inline: 6px; }
  .vf-explorador .explorer-name h2 { font-size: .92rem; }
}

.vf-vista-corta { display: none; }
.vf-pie nav { margin-left: auto; }
#etapa-activa:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 2px; }
@container explorador (min-width: 1041px) {
  .vf-escena-salida .vf-cartela { min-width: 265px; padding-block: clamp(8px,.8cqi,15px); }
  .vf-escena-salida .vf-kicker { letter-spacing: .035em; margin-bottom: .25em; }
  .vf-escena-salida .vf-filas { margin-top: .22em; }
  .vf-escena-salida .vf-filas > div { padding-block: .12em; }
  .vf-escena-salida .vf-fuentes, .vf-escena-salida .vf-confirmacion { margin-top: .26em; }
  .vf-escena-salida .vf-confirmacion { gap: 3px; }
  .vf-escena-salida .vf-fuente { padding-block: .16em; }
}
@container explorador (max-width: 460px) {
  .vf-vista-larga { display: none; }
  .vf-vista-corta { display: inline; }
  .vf-explorador .explorer-name { width: auto; }
  .vf-pie { flex-wrap: wrap; }
  .vf-pie > a { min-height: 42px; max-width: 60%; font-size: .8rem; }
}
