/* Panel del arriendo temporal (calculadora y ficha). Solo variables del sistema: funciona igual en claro y oscuro.
   Mobile first desde 320 px. Objetivos táctiles de 44 px. */

.pstr {
  --pstr-ink: var(--text-primary);
  --pstr-ink2: var(--text-secondary);
  --pstr-line: var(--rc-border, var(--border-subtle));
  --pstr-line2: var(--rc-border-strong, var(--border-medium, var(--border-subtle)));
  --pstr-surf: var(--bg-surface);
  --pstr-surf2: var(--bg-surface-elevated);
  /* Subsección que contiene campos (tipo de alojamiento, temporada, impuesto): en claro --pstr-surf2 es blanco o casi,
     igual que el campo, y no se distinguían. Se tiñe con la tinta del tema sobre la sección que la rodea para que el
     campo (blanco) resalte sin depender de la página: calculadora y ficha. En oscuro el campo ya es más claro. */
  --pstr-panel-bg: var(--pstr-surf);
  --pstr-sub-bg: var(--pstr-surf2);
  /* Canales de reserva: cada uno es una subsección; se alternan dos tonos y el encabezado va más intenso que el cuerpo.
     En oscuro el canal par queda más oscuro que el impar (mezcla sobre --pstr-surf, no sobre --pstr-surf2): un par más claro
     le quita diferencia al campo (--campo-bg) y rompe el contraste campo/sección de 1,15:1. En claro el par queda más suave. */
  --pstr-sub-bg-2: color-mix(in srgb, var(--pstr-sel-bg) 8%, var(--pstr-surf));
  --pstr-canal-cab: color-mix(in srgb, var(--pstr-sel-bg) 16%, var(--pstr-surf2));
  --pstr-canal-cab-2: color-mix(in srgb, var(--pstr-sel-bg) 10%, var(--pstr-surf2));
  --pstr-field: var(--rc-field, var(--bg-surface-elevated));
  /* Campos de texto del flujo «Ayúdame a calcularlo»: se distinguen de la sección que los contiene (la tarjeta y el
     panel cambian de tono según la página y el tema: #FFFFFF, #EEF0F3, #F1F5F9 en claro; #12161B a #1A2234 en
     oscuro). Borde >= 3:1 contra cualquiera de ellas (WCAG 1.4.11); en oscuro el fondo además va >= 1,15:1, en claro es
     blanco. Oscuro por defecto. */
  --campo-bg: #2A3140;
  --campo-borde: #707B8C;
  --campo-borde-hover: #94A0B2;
  --pstr-accent: var(--rc-accent, var(--brand-primary));
  --pstr-accent-ink: var(--rc-accent-ink, var(--bg-canvas));
  /* Lo seleccionado usa el verde de marca (candidata A, C1). La calculadora define --rc-*; la ficha no carga ese
     tema y cae en estos valores: oscuro por defecto y claro con body.light-theme o data-theme="light". */
  --pstr-sel-bg: var(--rc-accent, #43A56D);
  --pstr-sel-ink: var(--rc-accent-ink, #07120C);
  --pstr-sel-ring: var(--rc-text, #E8EBEF);
  --pstr-focus: var(--pstr-sel-ring);
  --pstr-warn: var(--rc-warn, var(--color-warning));
  --pstr-neg: var(--re-negative, var(--color-danger));
  /* Texto de «todo bien»: el verde de marca mezclado con la tinta del tema para llegar a 4,5:1 */
  --pstr-ok-ink: color-mix(in srgb, var(--pstr-sel-bg) 55%, var(--pstr-ink));
  /* Texto de aviso: el ámbar solo no llega a 4,5:1 sobre el fondo claro; se mezcla con la tinta del tema */
  --pstr-warn-ink: color-mix(in srgb, var(--pstr-warn) 62%, var(--pstr-ink));
  /* Curva de salida fuerte para abrir y cerrar secciones: arranca rápido y se asienta (se siente inmediato) */
  --pstr-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --pstr-acc-dur: 180ms;
  box-sizing: border-box; width: 100%; min-width: 0; margin: 10px 0 4px; color: var(--pstr-ink);
  font-family: var(--font-main, inherit); font-size: 0.9rem; line-height: 1.45;
}
body.light-theme .pstr, :root[data-theme="light"] .pstr {
  /* En claro el campo va blanco: el borde (>= 3:1) es lo que lo separa de la sección, no un fondo gris */
  --pstr-panel-bg: color-mix(in srgb, var(--pstr-sel-bg) 11%, var(--pstr-surf));
  --pstr-sub-bg: color-mix(in srgb, var(--pstr-sel-bg) 17%, var(--pstr-surf));
  --pstr-sub-bg-2: color-mix(in srgb, var(--pstr-sel-bg) 14%, var(--pstr-surf));
  --pstr-canal-cab: color-mix(in srgb, var(--pstr-sel-bg) 26%, var(--pstr-surf));
  --pstr-canal-cab-2: color-mix(in srgb, var(--pstr-sel-bg) 18%, var(--pstr-surf));
  /* Sobre los fondos grisáceos de la sección el rojo del tema pierde contraste (texto 4,5:1, borde del campo 3:1) */
  --pstr-neg: color-mix(in srgb, var(--re-negative, var(--color-danger)) 68%, #000);
  /* Texto secundario (ayudas, etiquetas) sobre el verde de las subsecciones: se acerca a la tinta para llegar a 4,5:1 */
  --pstr-ink2: color-mix(in srgb, var(--text-secondary) 70%, var(--pstr-ink));
  --campo-bg: #FFFFFF;
  --campo-borde: #6B7684;
  --campo-borde-hover: #4A5565;
  --pstr-sel-bg: var(--rc-accent, #1F7A4C);
  --pstr-sel-ink: var(--rc-accent-ink, #FFFFFF);
  --pstr-sel-ring: var(--rc-text, #0F1720);
}
.pstr *, .pstr *::before, .pstr *::after { box-sizing: border-box; }
.pstr [hidden] { display: none !important; }
.pstr button, .pstr input, .pstr summary { font-family: inherit; }

/* --- Selector segmentado --- */
.pstr-seg {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; width: 100%;
  background: var(--pstr-surf2); border: 1px solid var(--pstr-line); border-radius: 12px;
}
.pstr-seg-op {
  flex: 1 1 130px; min-height: 44px; padding: 8px 12px; border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: var(--pstr-ink2); font-size: 0.9rem; font-weight: 600; cursor: pointer;
  text-align: center; overflow-wrap: anywhere; transition: background-color 0.15s ease, color 0.15s ease;
}
.pstr-seg-op:hover { color: var(--pstr-ink); }
.pstr-seg-op.is-on { background: var(--pstr-sel-bg); color: var(--pstr-sel-ink); border-color: var(--pstr-sel-bg); }
.pstr-seg-op:focus-visible, .pstr-btn:focus-visible, .pstr-step-head:focus-visible, .pstr-det summary:focus-visible {
  outline: 2px solid var(--pstr-focus); outline-offset: 2px;
}
.pstr-seg-chico { margin: 6px 0 10px; }

/* Código de moneda sobre las subsecciones verdes (el botón es transparente): tinta más oscura para llegar a 4,5:1 */
body.light-theme .pstr .pia-moneda, :root[data-theme="light"] .pstr .pia-moneda { --pm-ink: #334155; }

/* --- Selector de moneda dentro de cada campo de dinero ---
   El mismo componente que la calculadora y la ficha (.pia-moneda, pia-moneda.css): el botón con el código de la
   moneda va dentro del campo, sobre el relleno derecho del input; el menú se abre en la capa superior. */
.pstr-ctl.pstr-ctl-dinero:has(.pia-moneda) .pstr-in { width: 100%; padding-right: 62px; }
.pstr-moneda-slot { display: contents; }
.pstr-aviso-campo { margin: 4px 0 0; font-size: 0.8rem; line-height: 1.4; color: var(--pstr-warn-ink); overflow-wrap: anywhere; }
.pstr .pstr-entrada-titulo { margin: 14px 0 0; font-size: inherit; line-height: inherit; }
.pstr .pstr-entrada-apoyo { margin: 2px 0 0; }
.pstr-seg-entrada { margin: 10px 0 14px; }

/* --- Panel --- */
.pstr-panel { margin-top: 12px; padding: 14px; background: var(--pstr-panel-bg); border: 1px solid var(--pstr-line); border-radius: 12px; }
.pstr-nota { margin: 0 0 10px; font-size: 0.85rem; color: var(--pstr-ink2); }
.pstr-nota.is-aviso { color: var(--pstr-warn-ink); }
.pstr-alerta { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--pstr-neg); border-radius: 8px; color: var(--pstr-neg); }
.pstr-sub { margin: 14px 0 0; font-weight: 700; }
.pstr-intro { margin: 0 0 12px; color: var(--pstr-ink2); }
.pstr-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- Campos --- */
.pstr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px 12px; margin: 8px 0; }
.pstr-campo { min-width: 0; margin: 0; }
.pstr-campo-ancho { grid-column: 1 / -1; margin: 6px 0; }
.pstr-lab { display: block; margin-bottom: 4px; font-size: 0.85rem; font-weight: 600; color: var(--pstr-ink); overflow-wrap: anywhere; }
.pstr-ctl { position: relative; display: flex; align-items: center; }
.pstr-in {
  width: 100%; min-width: 0; min-height: 44px; padding: 8px 52px 8px 12px; font-size: 1rem; font-weight: 500;
  color: var(--pstr-ink); background: var(--campo-bg); border: 1.5px solid var(--campo-borde); border-radius: 10px;
  transition: border-color 160ms ease-out, background-color 160ms ease-out, box-shadow 160ms ease-out, opacity 160ms ease-out;
}
.pstr-in:hover:not(:focus):not(:disabled):not([aria-invalid="true"]) { border-color: var(--campo-borde-hover); }
.pstr-ctl:not(:has(.pstr-suf)) .pstr-in { padding-right: 12px; }
/* Nombre de un servicio: el texto largo baja de línea (no se corta) y el campo crece con él */
.pstr-in-multi { display: block; resize: none; overflow: hidden; overflow-wrap: anywhere; font-family: inherit; line-height: 1.3; field-sizing: content; }
.pstr-in, .pstr-mes, .pstr-btn { scroll-margin-bottom: 90px; }
.pstr-in::placeholder { color: var(--pstr-ink2); opacity: 0.8; }
.pstr-in:focus { outline: 2px solid var(--pstr-focus); outline-offset: 1px; border-color: var(--pstr-focus); }
.pstr-in[aria-invalid="true"] { border-color: var(--pstr-neg); box-shadow: inset 0 0 0 1px var(--pstr-neg); }
.pstr-suf { position: absolute; right: 12px; font-size: 0.8rem; font-weight: 600; color: var(--pstr-ink2); pointer-events: none; }
/* Flechitas de subir/bajar: columna de 44 px de ancho y alto del campo (≥ 44), partida en dos mitades de 22 px.
   El input reserva el espacio con padding para no tapar el número ni el sufijo. */
.pstr-ctl.pstr-ctl-paso .pstr-in { padding-right: 84px; }
.pstr-ctl.pstr-ctl-paso.pstr-ctl-paso-sin-suf .pstr-in { padding-right: 52px; }
.pstr-ctl-paso .pstr-suf { right: 52px; }
.pstr-pasos { position: absolute; top: 0; right: 0; bottom: 0; width: 44px; display: flex; flex-direction: column; }
.pstr-pasos::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--pstr-line2); }
.pstr-paso-b {
  position: relative; flex: 1 1 0; min-height: 22px; margin: 0; padding: 0; border: 0; background: transparent;
  color: var(--pstr-ink2); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.pstr-paso-sube { border-radius: 0 10px 0 0; }
.pstr-paso-baja { border-radius: 0 0 10px 0; }
.pstr-paso-b::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px;
  border: solid currentColor; border-width: 2px 0 0 2px; transform: translate(-50%, -25%) rotate(45deg);
}
.pstr-paso-baja::after { transform: translate(-50%, -75%) rotate(225deg); }
.pstr-paso-b:hover:not(:disabled) { color: var(--pstr-ink); background: var(--pstr-surf2); }
.pstr-paso-b:disabled { cursor: not-allowed; opacity: 0.35; }
.pstr-paso-b:focus-visible { outline: 2px solid var(--pstr-focus); outline-offset: -2px; }
.pstr-ayuda { margin: 4px 0 0; font-size: 0.8rem; line-height: 1.4; color: var(--pstr-ink2); }

.pstr-grupo { margin: 12px 0 0; padding: 12px; min-width: 0; border: 1px solid var(--pstr-line); border-radius: 10px; }
.pstr-grupo legend { padding: 0 6px; font-weight: 700; font-size: 0.9rem; }
.pstr-grupo-sep { margin-top: 16px; }
.pstr-grupo-t { margin: 16px 0 6px; font-size: 0.95rem; }
.pstr-grupo-sep .pstr-grupo-t { margin-top: 0; }
/* --- Canales de reserva --- */
/* Una columna: cada canal es un acordeón; cerrado es una fila con su resumen */
.pstr-canales { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 10px 0; }
.pstr-canal.pstr-acc { padding: 0; margin: 0; background: var(--pstr-sub-bg); border-color: var(--pstr-line2); }
.pstr-canales > .pstr-canal.pstr-acc:nth-child(even) { background: var(--pstr-sub-bg-2); }
.pstr-canales > .pstr-canal.pstr-acc:nth-child(even) > .pstr-acc-cab { background: var(--pstr-canal-cab-2); }
.pstr-canal .pstr-acc-cab { background: var(--pstr-canal-cab); border-radius: 9px 9px 0 0; }
.pstr-canal:not(.is-abierto) .pstr-acc-cab { border-radius: 9px; }
.pstr-canal .pstr-card-cab { align-items: flex-start; }
.pstr-canal .pstr-card-cab > .pstr-btn { flex: none; }
.pstr-canal > .pstr-confirma { padding: 8px 12px; }
/* Con las flechitas, dos campos no caben lado a lado en 320 px: se apilan hasta que haya ancho para ambos */
.pstr-grid-canal { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
@media (max-width: 400px) { .pstr-grupo:has(.pstr-canales) { padding-inline: 8px; } }
.pstr-canal .pstr-campo-ancho { margin-top: 6px; }
.pstr-etiq {
  display: inline-block; white-space: nowrap; padding: 2px 8px; border: 1px solid var(--pstr-line2); border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; color: var(--pstr-ink2);
}
.pstr-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.pstr-acciones .pstr-btn { flex: 1 1 200px; max-width: 100%; height: auto; overflow-wrap: anywhere; }
.pstr-suma { display: flex; align-items: flex-start; gap: 6px; margin: 10px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.pstr-suma::before { content: "\2713"; flex: none; }
.pstr-suma.is-aviso::before { content: "\26A0\FE0E"; }
.pstr-suma.is-ok { color: var(--pstr-ok-ink); }
.pstr-chk { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 6px 0 0; cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.pstr-chk-cb { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--pstr-sel-bg); cursor: pointer; }
.pstr-chk-cb:focus-visible { outline: 2px solid var(--pstr-focus); outline-offset: 2px; }
.pstr-confirma { padding: 4px 0; }
.pstr-confirma-t { margin: 0 0 4px; font-weight: 600; overflow-wrap: anywhere; }

/* --- Tarjetas (alojamientos, temporadas) --- */
.pstr-lista { display: grid; gap: 12px; margin-bottom: 12px; }
.pstr-card { padding: 12px; background: var(--pstr-sub-bg); border: 1px solid var(--pstr-line); border-radius: 10px; min-width: 0; }
.pstr-card-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pstr-card-t { margin: 0; font-weight: 700; }

/* --- Meses --- */
.pstr-meses { margin: 8px 0; padding: 0; border: 0; min-width: 0; }
.pstr-meses legend { padding: 0; margin-bottom: 4px; font-size: 0.85rem; font-weight: 600; }
.pstr-meses-rej { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pstr-mes {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px;
  border: 1.5px solid var(--pstr-line2); border-radius: 10px; background: var(--pstr-field); color: var(--pstr-ink);
  font-size: 0.85rem; font-weight: 600; cursor: pointer; text-transform: capitalize;
}
.pstr-mes-cb { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pstr-mes:has(.pstr-mes-cb:checked) { background: var(--pstr-sel-bg); border-color: var(--pstr-sel-bg); color: var(--pstr-sel-ink); }
.pstr-mes:has(.pstr-mes-cb:checked)::after { content: "✓"; position: absolute; top: 1px; right: 4px; font-size: 0.65rem; }
.pstr-mes:has(.pstr-mes-cb:focus-visible) { outline: 2px solid var(--pstr-focus); outline-offset: 2px; }

/* --- Botones --- */
.pstr-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 8px 16px;
  border-radius: 10px; border: 1.5px solid var(--pstr-line2); background: transparent; color: var(--pstr-ink);
  font-size: 0.9rem; font-weight: 600; cursor: pointer; text-align: center;
}
.pstr-btn-pri { background: var(--pstr-sel-bg); border-color: var(--pstr-sel-bg); color: var(--pstr-sel-ink); }
.pstr-btn-sec:hover { border-color: var(--pstr-ink2); }
.pstr-btn-txt { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; padding: 8px; }
.pstr-btn:disabled { opacity: 0.45; cursor: not-allowed; }
/* Botones con ayuda (toque largo, ver pia-tooltip-popover.js): sin menú de selección ni de copiar al mantener el dedo */
[data-pia-tip] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* --- Asistente: avance y pasos --- */
.pstr-prog { height: 8px; margin: 2px 0 6px; border-radius: 999px; background: var(--pstr-surf2); border: 1px solid var(--pstr-line); overflow: hidden; }
.pstr-prog-fill { height: 100%; width: 25%; background: var(--pstr-sel-bg); transition: width 0.25s ease; }
.pstr-prog-txt { margin: 0 0 10px; font-size: 0.85rem; color: var(--pstr-ink2); }
.pstr-step { margin: 0; }
.pstr-step:not(.is-activo) { display: none; }
.pstr-step-h { margin: 0 0 8px; font-size: 1.05rem; }
.pstr-step-head {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 0; border: 0; background: none;
  color: var(--pstr-ink); font-size: 1.05rem; font-weight: 700; text-align: left; cursor: pointer;
}
/* El encabezado abre y cierra su paso (también el activo: pueden quedar todos cerrados) */
.pstr-step-head::after {
  content: ""; flex: none; margin: 0 4px 0 auto; width: 8px; height: 8px; border-right: 2px solid var(--pstr-ink2); border-bottom: 2px solid var(--pstr-ink2);
  transform: rotate(45deg); transition: transform var(--pstr-acc-dur) var(--pstr-ease-out);
}
.pstr-step-head[aria-expanded="true"]::after { transform: rotate(-135deg); }
.pstr-step.is-cerrado .pstr-step-body { display: none; }
.pstr-step-tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pstr-step-res { font-size: 0.8rem; font-weight: 500; line-height: 1.35; color: var(--pstr-ink2); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.pstr-step-res:empty { display: none; }
.pstr-step-res.is-error, .pstr-acc-res.is-error { color: var(--pstr-neg); font-weight: 600; }
.pstr-step-n {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--pstr-sel-bg); color: var(--pstr-sel-ink); font-size: 0.85rem;
}
.pstr-step-t { overflow-wrap: anywhere; }
/* Reparto de canales sobre 100 %: aviso y motivo con borde de 1 px tintado e ícono (sin franja de un lado). Sin movimiento. */
.pstr-reparto-alerta, .pstr-reparto-msj, .pstr-nav-motivo {
  display: flex; align-items: flex-start; gap: 8px; box-sizing: border-box; max-width: 100%; margin: 10px 0 0; padding: 10px 12px;
  color: var(--pstr-ink); border: 1px solid var(--pstr-neg); border-radius: 10px; font-size: 0.85rem; line-height: 1.4; font-weight: 600;
  background: color-mix(in srgb, var(--pstr-neg) 9%, var(--pstr-surf2)); overflow-wrap: anywhere;
}
.pstr-reparto-alerta[hidden], .pstr-reparto-msj[hidden], .pstr-nav-motivo[hidden] { display: none; }
.pstr-reparto-alerta p { margin: 0; min-width: 0; }
.pstr-reparto-ico { flex: none; width: 1.2em; text-align: center; color: var(--pstr-neg); }
.pstr-reparto-ico::before { content: "\26A0\FE0E"; }
.pstr-nav-motivo { margin: 16px 0 0; }
.pstr-nav-motivo + .pstr-nav { margin-top: 10px; }
.pstr-btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.pstr-nav { display: flex; justify-content: space-between; gap: 10px; margin: 16px 0 4px; }
.pstr-nav .pstr-btn { flex: 1 1 0; }

/* --- Barra fija del neto --- */
.pstr-neto {
  position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px;
  margin: 14px -14px -14px; padding: 10px 14px; background: var(--pstr-surf2);
  border-top: 1px solid var(--pstr-line2); border-radius: 0 0 12px 12px;
}
/* La etiqueta completa se parte en varias líneas; nunca se recorta con puntos suspensivos */
.pstr-neto-fila { flex: 1 1 8em; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.pstr-neto-l { flex: 1 1 11em; min-width: 0; font-size: 0.85rem; line-height: 1.35; color: var(--pstr-ink2); overflow-wrap: break-word; }
.pstr-neto-v { flex: 0 0 auto; max-width: 100%; font-size: 1.1rem; overflow-wrap: anywhere; }
.pstr-neto-btn {
  flex: 0 0 auto; min-height: 44px; min-width: 44px; margin: -10px -8px -10px auto; padding: 0 8px; border: 0; background: transparent;
  color: var(--pstr-ink); font: inherit; font-size: 0.85rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.pstr-neto-btn:focus-visible { outline: 2px solid var(--pstr-focus); outline-offset: 2px; border-radius: 6px; }
.pstr-neto-det { flex: 1 1 100%; margin: 10px 0 0; }
.pstr-neto-det[hidden] { display: none; }
.pstr-neto-det > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 6px 0; border-top: 1px dashed var(--pstr-line); }
.pstr-neto-det dt { flex: 1 1 11em; min-width: 0; font-size: 0.85rem; line-height: 1.35; color: var(--pstr-ink2); overflow-wrap: break-word; }
.pstr-neto-det dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.pstr-neto { box-shadow: 0 -6px 12px -8px rgba(0, 0, 0, 0.25); }
/* La barra fija tapa el borde inferior de la pantalla: lo que se enfoca o se desplaza a la vista queda por encima de ella (WCAG 2.4.11) */
.pstr :is(button, input, select, textarea, a[href], [tabindex]) { scroll-margin-bottom: 120px; }
/* En la calculadora móvil la hoja de resultados (64 px) va fija abajo: la barra del neto se apoya encima, no detrás */
@media (max-width: 767px) {
  body.re-calc-page .pstr-neto { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); border-radius: 10px; margin-bottom: 0; }
}
.is-neg, .pstr-neto-v.is-neg { color: var(--pstr-neg); }

/* --- Estado de la ganancia en la barra fija ---
   La tarjeta destacada (.pstr-gan) vive en pia-str-tarjeta-ganancia.css, compartida con la ficha pública.
   Tres estados, siempre con ícono y texto además del color: positivo (verde de marca), cerca de cero (ámbar) y negativo (rojo).
   Los tres colores son tinta de texto mezclada con el tema, así que llegan a 4,5:1 en claro y en oscuro. */
.pstr {
  /* Color de relleno y borde (--gan-b) y tinta de texto (--gan-c, mezclada con la tinta del tema para llegar a 4,5:1) */
  --pstr-gan-pos: color-mix(in srgb, var(--pstr-sel-bg) 42%, var(--pstr-ink));
  --pstr-gan-cerca: color-mix(in srgb, var(--pstr-warn) 45%, var(--pstr-ink));
  --pstr-gan-neg: color-mix(in srgb, var(--pstr-neg) 70%, var(--pstr-ink));
}
.pstr-neto[data-estado="positivo"] { --gan-c: var(--pstr-gan-pos); --gan-b: var(--pstr-sel-bg); }
.pstr-neto[data-estado="cerca"] { --gan-c: var(--pstr-gan-cerca); --gan-b: var(--pstr-warn); }
.pstr-neto[data-estado="negativo"] { --gan-c: var(--pstr-gan-neg); --gan-b: var(--pstr-neg); }
.pstr-neto-v {
  font-family: var(--rc-mono, inherit); font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -0.02em; color: var(--gan-c, inherit);
}
.pstr-neto-est { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; line-height: 1.3; font-weight: 600; color: var(--gan-c); }
.pstr-neto-ico { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* Barra fija: la cifra más grande y el estado debajo, en una línea propia */
.pstr-neto-v { font-size: 1.3rem; }
.pstr-neto-est { flex: 1 1 100%; margin: 2px 0 0; font-size: 0.8rem; }
.pstr-neto-est[hidden] { display: none; }
.pstr-neto-ico { width: 16px; height: 16px; }

/* --- Resumen --- */
.pstr-filas { margin: 0 0 6px; }
.pstr-fila { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 8px 0; border-bottom: 1px dashed var(--pstr-line); }
.pstr-fila dt { color: var(--pstr-ink2); }
.pstr-fila dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.pstr-fila-total { border-bottom: 0; border-top: 2px solid var(--pstr-line2); font-size: 1rem; align-items: baseline; }
.pstr-fila-total dt { color: var(--pstr-ink); font-weight: 600; }
.pstr-fila-total dd { margin-left: auto; font-size: 1.15rem; }
.pstr-barra { display: flex; height: 18px; margin: 6px 0 10px; border-radius: 6px; overflow: hidden; background: var(--pstr-surf2); border: 1px solid var(--pstr-line); }
.pstr-barra-seg { display: block; height: 100%; min-width: 2px; box-shadow: inset -2px 0 0 var(--pstr-surf); }
.pstr-barra-seg:last-child { box-shadow: none; }
.pstr-sw { flex: none; width: 14px; height: 14px; margin-top: 3px; border-radius: 4px; border: 1px solid var(--pstr-line2); }
.pstr-c0 { background: color-mix(in srgb, var(--pstr-sel-bg) 100%, var(--pstr-surf2)); }
.pstr-c1 { background: color-mix(in srgb, var(--pstr-warn) 80%, var(--pstr-surf2)); }
.pstr-c2 { background: color-mix(in srgb, var(--pstr-sel-bg) 70%, var(--pstr-surf2)); }
.pstr-c3 { background: color-mix(in srgb, var(--pstr-warn) 55%, var(--pstr-surf2)); }
.pstr-c4 { background: color-mix(in srgb, var(--pstr-sel-bg) 45%, var(--pstr-surf2)); }
.pstr-c5 { background: color-mix(in srgb, var(--pstr-warn) 35%, var(--pstr-surf2)); }
.pstr-c6 { background: color-mix(in srgb, var(--pstr-sel-bg) 25%, var(--pstr-surf2)); }
.pstr-c7 { background: color-mix(in srgb, var(--pstr-ink2) 40%, var(--pstr-surf2)); }
.pstr-leyenda { list-style: none; margin: 0 0 8px; padding: 0; }
.pstr-leyenda li { display: flex; flex-wrap: wrap; gap: 2px 8px; padding: 4px 0; align-items: flex-start; }
.pstr-ley-t { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.pstr-ley-v { margin-left: auto; font-weight: 600; overflow-wrap: anywhere; }
.pstr-leyenda-simple li { display: list-item; list-style: disc; margin-left: 18px; padding: 2px 0; }
.pstr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 138px), 1fr)); gap: 8px; margin: 12px 0; }
.pstr-kpi { padding: 10px 12px; background: var(--pstr-surf2); border: 1px solid var(--pstr-line); border-radius: 10px; min-width: 0; }
.pstr-kpi dt { font-size: 0.8rem; color: var(--pstr-ink2); }
.pstr-kpi dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.pstr-avisos { margin: 8px 0; padding: 0 0 0 18px; color: var(--pstr-warn-ink); }
.pstr-avisos li { margin: 3px 0; }
.pstr-avisos li.pstr-aviso-error { color: var(--pstr-neg); font-weight: 600; }
.pstr-det { margin: 8px 0; }
.pstr-det summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }

/* --- Escritorio: acordeón --- */
@media (min-width: 900px) {
  .pstr-step, .pstr-step:not(.is-activo) { display: block; border-top: 1px solid var(--pstr-line); }
  .pstr-step:first-of-type { border-top: 0; }
  .pstr-step:not(.is-activo) .pstr-step-body { display: none; }
  .pstr-step:not(.is-activo) .pstr-step-n { background: var(--pstr-surf2); color: var(--pstr-ink2); border: 1px solid var(--pstr-line2); }
  .pstr-step.is-hecho .pstr-step-n { background: var(--pstr-sel-bg); color: var(--pstr-sel-ink); }
  .pstr-meses-rej { grid-template-columns: repeat(6, 1fr); }
  .pstr-nav .pstr-btn { flex: 0 0 auto; min-width: 120px; }
  .pstr-nav { justify-content: flex-end; }
}
@media (min-width: 480px) and (max-width: 899px) {
  .pstr-meses-rej { grid-template-columns: repeat(6, 1fr); }
}

/* --- Cierre planificado (bajo el campo de vacancia) y temporadas cerradas --- */
.pstr.pstr-cierre { margin: 8px 0 4px; padding: 12px; background: var(--pstr-surf2); border: 1px solid var(--pstr-line); border-radius: 10px; font-size: 0.85rem; }
.pstr-cierre-aviso { margin: 0 0 4px; color: var(--pstr-ink); }
.pstr-cierre-det { margin: 0 0 4px; }
.pstr-cierre-eq { margin: 8px 0 0; font-weight: 700; color: var(--pstr-ink); overflow-wrap: anywhere; }
.pstr-cierre .pstr-grid { margin: 8px 0 0; }
.pstr-cierre .pstr-nota { margin: 8px 0 0; }
.pstr-chk { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 6px 0; font-weight: 600; cursor: pointer; }
.pstr-chk-in { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 44px; margin: 0; opacity: 0; cursor: pointer; }
.pstr-chk-box { flex: none; position: relative; width: 22px; height: 22px; border: 1.5px solid var(--pstr-line2); border-radius: 6px; background: var(--pstr-field); }
.pstr-chk:has(.pstr-chk-in:checked) .pstr-chk-box { background: var(--pstr-sel-bg); border-color: var(--pstr-sel-bg); }
.pstr-chk:has(.pstr-chk-in:checked) .pstr-chk-box::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid var(--pstr-sel-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.pstr-chk:has(.pstr-chk-in:focus-visible) { outline: 2px solid var(--pstr-focus); outline-offset: 2px; border-radius: 6px; }
.pstr-campo.is-off { opacity: 0.55; }
.pstr-in:disabled { cursor: not-allowed; opacity: 0.6; }
@media (prefers-reduced-motion: reduce) { .pstr-in { transition: none; } }
.pstr-nota-cerrada { margin: 0 0 6px; font-size: 0.85rem; }
.pstr-aviso-txt { margin: 0 0 10px; font-size: 0.85rem; color: var(--pstr-ink2); }
.pstr-aviso-txt.is-aviso { color: var(--pstr-warn-ink); }
.pstr-comparador .pstr-fila-total dd { overflow-wrap: anywhere; }

/* --- Factor de tarifa: precio resultante junto al campo --- */
.pstr-tarifa-res { display: block; margin: 4px 0 0; font-size: 0.85rem; font-weight: 600; line-height: 1.4; color: var(--pstr-ink); overflow-wrap: anywhere; }

/* --- Meses repetidos entre temporadas ---
   Rayas diagonales + icono + texto: el aviso nunca depende solo del color. Las dos rayas son mezclas del ámbar de aviso
   con el fondo del campo, así el texto de la casilla (tinta del tema) llega a 4,5:1 sobre ambas en claro y oscuro. */
.pstr {
  --pstr-dup-a: color-mix(in srgb, var(--pstr-warn) 38%, var(--pstr-field));
  --pstr-dup-b: color-mix(in srgb, var(--pstr-warn) 14%, var(--pstr-field));
  --pstr-dup-rayas: repeating-linear-gradient(135deg, var(--pstr-dup-a) 0 6px, var(--pstr-dup-b) 6px 12px);
}
@keyframes pstr-alerta-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pstr-dup-ico { display: none; flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pstr-mes .pstr-dup-ico { position: absolute; bottom: 2px; left: 3px; width: 12px; height: 12px; }
.pstr-mes.is-dup .pstr-dup-ico, .pstr-cal-m[data-estado="dup"] > .pstr-dup-ico, .pstr-cal-frase .pstr-dup-ico { display: block; }
.pstr-mes.is-dup, .pstr-mes.is-dup:has(.pstr-mes-cb:checked) {
  background: var(--pstr-dup-rayas); color: var(--pstr-ink); border: 2px solid var(--pstr-sel-bg);
}
.pstr-meses-dup { margin: 8px 0 0; font-size: 0.85rem; line-height: 1.4; color: var(--pstr-warn-ink); font-weight: 600; overflow-wrap: anywhere; animation: pstr-alerta-in 150ms ease-out; }

.pstr-cal { container-type: inline-size; margin: 14px 0 10px; }
.pstr-cal-tit { margin: 0 0 6px; font-size: 0.85rem; font-weight: 700; }
.pstr-cal-tit:focus-visible { outline: 2px solid var(--pstr-focus); outline-offset: 2px; }
/* Las columnas salen del ancho del panel, no de la pantalla: en la calculadora el panel es una columna angosta aun en
   768 px. Cada casilla mide al menos 44 px (las repetidas son botones): 4 columnas (4 x 3), 6 (6 x 2) o 12 en una fila. */
.pstr-cal-rej { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
@container (min-width: 270px) { .pstr-cal-rej { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; } }
@container (min-width: 560px) { .pstr-cal-rej { grid-template-columns: repeat(12, minmax(0, 1fr)); } }
.pstr-cal-m {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; min-width: 0; padding: 4px 1px; text-align: center; color: var(--pstr-ink);
  border: 1.5px solid var(--pstr-line2); border-radius: 10px; background: color-mix(in srgb, var(--pstr-sel-bg) 14%, var(--pstr-field));
}
.pstr-cal-mes { font-size: 0.85rem; font-weight: 700; text-transform: capitalize; line-height: 1.1; }
.pstr-cal-ns { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.pstr-cal-n {
  display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 3px;
  border-radius: 9px; border: 1px solid var(--pstr-line2); background: var(--pstr-field); color: var(--pstr-ink);
  font-size: 0.68rem; font-weight: 700; line-height: 1;
}
.pstr-cal-m[data-estado="sin"] { background: transparent; border-style: dashed; color: var(--pstr-ink2); }
.pstr-cal-sin { font-size: 0.58rem; font-weight: 600; line-height: 1.1; overflow-wrap: anywhere; hyphens: auto; }
.pstr-cal-m[data-estado="dup"] { padding-top: 12px; background: var(--pstr-dup-rayas); border-color: var(--pstr-warn-ink); cursor: pointer; }
.pstr-cal-m[data-estado="dup"] > .pstr-dup-ico { position: absolute; top: 2px; left: 3px; }
.pstr-cal-m[data-estado="dup"][aria-expanded="true"] { box-shadow: 0 0 0 2px var(--pstr-ink2); }
.pstr-cal-m[data-estado="dup"]:focus-visible { outline: 2px solid var(--pstr-focus); outline-offset: 2px; }
.pstr-cal-ley { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; font-size: 0.8rem; color: var(--pstr-ink2); }
.pstr-cal-ley-i { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.pstr-cal-alerta {
  margin: 10px 0 0; padding: 10px 12px; color: var(--pstr-ink); border: 1.5px solid var(--pstr-warn); border-radius: 10px;
  background: color-mix(in srgb, var(--pstr-warn) 10%, var(--pstr-surf2)); animation: pstr-alerta-in 150ms ease-out;
}
.pstr-cal-lista { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.pstr-cal-frase { display: flex; align-items: flex-start; gap: 8px; font-size: 0.9rem; font-weight: 600; overflow-wrap: anywhere; }
.pstr-cal-frase .pstr-dup-ico { margin-top: 3px; }
.pstr-cal-acc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pstr-cal-acc .pstr-btn { flex: 1 1 140px; max-width: 100%; height: auto; text-align: center; overflow-wrap: anywhere; }

/* --- Costos (G3): líneas de libro con columnas alineadas ---
   Cada monto es una línea concepto | monto | unidad. Las columnas de monto y unidad tienen ancho fijo y la del concepto toma
   el resto, así el campo empieza en la misma x en todos los bloques. El corte entre «en línea» y «apilado» se mide sobre el
   ancho del paso (@container), no de la pantalla: en la calculadora el panel es una columna angosta aun a 768 px. */
.pstr-costos { container: pstr-costos / inline-size; --pstr-col-monto: minmax(12rem, 15rem); --pstr-col-unidad: minmax(5.5rem, 7.5rem); }
.pstr-costos-intro { margin-top: 0; }
.pstr-bloque { margin-top: 10px; }
.pstr-apoyo { margin: 0 0 6px; }
.pstr-bloque-nota { margin: 8px 0 0; font-size: 0.8rem; }

.pstr-linea {
  display: grid; gap: 4px 8px; align-items: end; padding: 8px 0; min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "concepto unidad" "control control" "nota nota";
}
.pstr-linea + .pstr-linea { border-top: 1px dashed var(--pstr-line); }
/* Columna muy angosta (la ficha a 320 px): la unidad pasa bajo el concepto para que este no se parta letra por letra */
@container pstr-costos (max-width: 230px) {
  .pstr-linea:not(.pstr-total) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "concepto" "unidad" "control" "nota"; }
  .pstr-linea:not(.pstr-total) .pstr-lin-unidad { text-align: left; }
}
.pstr-lin-concepto { grid-area: concepto; margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--pstr-ink); overflow-wrap: break-word; }
.pstr-lin-concepto.is-sangria { padding-left: 12px; }
.pstr-lin-unidad { grid-area: unidad; font-size: 0.8rem; color: var(--pstr-ink2); text-align: right; overflow-wrap: break-word; }
.pstr-linea > .pstr-ctl { grid-area: control; width: 100%; min-width: 0; }
.pstr-lin-nota { grid-area: nota; margin: 0; min-width: 0; font-size: 0.8rem; color: var(--pstr-ink2); }
.pstr-lin-nota:not(:has(> :not([hidden]))) { display: none; }
.pstr-lin-nota .pstr-ayuda, .pstr-lin-nota .pstr-aviso-campo { margin: 0; }
.pstr-lin-nota > * + * { margin-top: 2px; }

/* Números a la derecha y con dígitos de ancho fijo: se comparan de un vistazo */
.pstr-costos .pstr-in[inputmode="decimal"] { text-align: right; font-variant-numeric: tabular-nums; }
.pstr-costos .pstr-in[inputmode="decimal"]::placeholder { text-align: right; }

/* Totales: la cifra en la columna de los montos, alineada a la derecha */
.pstr-total { align-items: baseline; border-top: 2px solid var(--pstr-line2) !important; margin-top: 4px; }
.pstr-total .pstr-lin-concepto { font-weight: 700; }
.pstr-total-ctl { grid-area: control; text-align: right; min-width: 0; }
.pstr-total-v { font-size: 1.05rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pstr-total-u { grid-area: unidad; font-size: 0.8rem; color: var(--pstr-ink2); text-align: right; overflow-wrap: anywhere; }
.pstr-total-nota { margin: 0; }
.pstr-total { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "concepto control" "unidad unidad" "nota nota"; }
.pstr-total .pstr-total-u { text-align: right; }

.pstr-lin-lectura .pstr-lin-val { grid-area: control; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.pstr-lin-val-t { font-size: 0.85rem; color: var(--pstr-ink); overflow-wrap: anywhere; }
.pstr-lin-lectura .pstr-btn-txt { min-height: 44px; }

/* Servicios: cabecera (nombre | tipo | quitar) sobre las mismas columnas */
.pstr-leyenda-tipos { margin: 4px 0 6px; padding-left: 18px; font-size: 0.8rem; color: var(--pstr-ink2); }
.pstr-leyenda-tipos li { margin: 2px 0; }
.pstr-leyenda-tipos strong { color: var(--pstr-ink); }
.pstr-servicios { display: block; }
.pstr-serv { padding: 10px 0 6px; min-width: 0; }
.pstr-serv + .pstr-serv { border-top: 1px solid var(--pstr-line2); }
.pstr-serv-cab {
  display: grid; gap: 6px 8px; align-items: center; min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nombre quitar" "tipo tipo";
}
.pstr-serv-nom { grid-area: nombre; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.pstr-serv-nom .pstr-campo { flex: 1 1 8rem; min-width: 0; }
.pstr-serv-cab > .pstr-seg-tipo { grid-area: tipo; min-width: 0; }
.pstr-serv-cab > .pstr-btn { grid-area: quitar; justify-self: end; }
.pstr-seg-tipo { flex-wrap: nowrap; }
.pstr-seg-tipo .pstr-seg-op { flex: 1 1 0; min-width: 0; padding: 0 2px; font-size: 0.78rem; overflow-wrap: normal; }
.pstr-serv-lineas { margin-top: 2px; }
.pstr-serv-lineas .pstr-linea:first-child { border-top: 0; }
.pstr-serv-est { margin: 0 0 4px; padding-left: 12px; font-size: 0.85rem; font-weight: 600; color: var(--pstr-ink); overflow-wrap: anywhere; }
.pstr-serv-est:empty { display: none; }
.pstr-serv .pstr-confirma { padding: 8px 0; }

/* Administración, mantenimiento y reposición: un solo campo según la forma de cobro */
.pstr-modo { padding: 10px 0 8px; min-width: 0; }
.pstr-modo + .pstr-modo { border-top: 1px dashed var(--pstr-line); }
.pstr-modo-t { margin: 0; font-weight: 700; font-size: 0.9rem; }
.pstr-modo-ayuda { margin: 0 0 6px; }
.pstr-seg-modo-costo { margin: 4px 0 2px; }
.pstr-seg-modo-costo .pstr-seg-op { flex: 1 1 96px; }
.pstr-modo-slot .pstr-linea { border-top: 0; }
.pstr-modo-eq { margin: 0; font-size: 0.85rem; color: var(--pstr-ink); overflow-wrap: anywhere; }

@container pstr-costos (min-width: 520px) {
  .pstr-linea {
    grid-template-columns: minmax(6rem, 1fr) var(--pstr-col-monto) var(--pstr-col-unidad);
    grid-template-areas: "concepto control unidad" "nota nota nota"; align-items: center; column-gap: 12px;
  }
  .pstr-lin-unidad, .pstr-total .pstr-total-u { text-align: left; }
  .pstr-lin-lectura .pstr-lin-val { grid-column: 2 / -1; }
  .pstr-serv-cab {
    grid-template-columns: minmax(6rem, 1fr) var(--pstr-col-monto) var(--pstr-col-unidad);
    grid-template-areas: "nombre tipo quitar"; column-gap: 12px;
  }
  .pstr-serv-cab > .pstr-btn { justify-self: start; }
}

/* --- Acordeones (Parts.grupoAcordeones): canales y bloques de costos ---
   Encabezado = botón (título + resumen de una línea). Abrir y cerrar anima grid-template-rows 0fr -> 1fr, sin medir
   alturas en JS; el contenido cerrado queda visibility: hidden (fuera del orden de tabulación y del lector). */
.pstr-acc-barra { display: flex; justify-content: flex-end; margin: 6px 0 0; }
.pstr-acc-todos { min-height: 44px; }
.pstr-acc { min-width: 0; border: 1px solid var(--pstr-line); border-radius: 10px; background: var(--pstr-panel-bg); }
.pstr-acc-cab { display: flex; align-items: flex-start; gap: 4px; min-width: 0; }
.pstr .pstr-acc-h { flex: 1 1 auto; min-width: 0; margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; }
.pstr-acc-btn {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--pstr-ink); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { .pstr-acc-btn:hover .pstr-acc-chev { border-color: var(--pstr-ink); } }
.pstr-acc-btn:focus-visible { outline: 2px solid var(--pstr-focus); outline-offset: -2px; }
.pstr-acc-chev {
  flex: none; width: 8px; height: 8px; margin: 7px 2px 0 2px; border-right: 2px solid var(--pstr-ink2); border-bottom: 2px solid var(--pstr-ink2);
  transform: rotate(-45deg); transition: transform var(--pstr-acc-dur) var(--pstr-ease-out);
}
.pstr-acc.is-abierto > .pstr-acc-cab .pstr-acc-chev { transform: rotate(45deg); }
.pstr-acc-tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pstr-acc-t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: 0.9rem; font-weight: 700; overflow-wrap: anywhere; }
.pstr-acc-t > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.pstr-acc-res { font-size: 0.8rem; line-height: 1.35; color: var(--pstr-ink2); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.pstr-acc-res:empty { display: none; }
.pstr-acc-cuerpo { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--pstr-acc-dur) var(--pstr-ease-out); }
.pstr-acc.is-abierto > .pstr-acc-cuerpo { grid-template-rows: 1fr; }
.pstr-acc-in { min-height: 0; min-width: 0; overflow: hidden; visibility: hidden; transition: visibility 0s linear var(--pstr-acc-dur); }
.pstr-acc.is-abierto > .pstr-acc-cuerpo > .pstr-acc-in { visibility: visible; transition-delay: 0s; }
.pstr-acc-pad { padding: 0 12px 12px; min-width: 0; }
.pstr-acc-pad > .pstr-apoyo:first-child { margin-top: 0; }
@media (max-width: 400px) {
  .pstr-acc-btn { padding: 10px 8px; gap: 8px; }
  .pstr-acc-pad { padding: 0 8px 10px; }
}

/* --- IVA e impuestos (paso 4) --- */
.pstr-imp { container: pstr-imp / inline-size; }
.pstr-pregunta { margin: 16px 0 0; font-size: 0.95rem; font-weight: 700; color: var(--pstr-ink); overflow-wrap: anywhere; }
.pstr-imp > .pstr-intro + .pstr-pregunta { margin-top: 4px; }
.pstr-pregunta-apoyo { margin: 2px 0 8px; }
.pstr-seg-imp-modo { margin: 6px 0 4px; }
.pstr-seg-imp { margin: 6px 0 4px; }
.pstr-seg-imp .pstr-seg-op { flex: 1 1 200px; }
.pstr-imp-sin { margin-top: 12px; }

/* Tarjetas de radio: apiladas hasta que haya ancho para las tres; cada una mide al menos 44 px */
.pstr-tarjetas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 6px 0 4px; }
@container pstr-imp (min-width: 600px) { .pstr-tarjetas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pstr-tarjeta {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 44px; min-width: 0; padding: 10px 12px 10px 38px;
  text-align: left; color: var(--pstr-ink); font-family: inherit; font-size: 0.85rem; line-height: 1.35; cursor: pointer;
  background: var(--pstr-field); border: 1.5px solid var(--pstr-line2); border-radius: 10px;
}
.pstr-tarjeta::before {
  content: ""; position: absolute; left: 12px; top: 13px; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--pstr-line2); background: var(--pstr-field);
}
.pstr-tarjeta.is-on { border-color: var(--pstr-sel-bg); box-shadow: inset 0 0 0 1px var(--pstr-sel-bg); background: color-mix(in srgb, var(--pstr-sel-bg) 12%, var(--pstr-field)); }
.pstr-tarjeta.is-on::before { border-color: var(--pstr-sel-bg); background: radial-gradient(circle, var(--pstr-sel-bg) 0 4px, var(--pstr-field) 4.5px); }
.pstr-tarjeta:hover { border-color: var(--pstr-ink2); }
.pstr-tarjeta.is-on:hover { border-color: var(--pstr-sel-bg); }
.pstr-tarjeta:focus-visible { outline: 2px solid var(--pstr-focus); outline-offset: 2px; }
.pstr-tarjeta-t { font-weight: 700; overflow-wrap: anywhere; }
.pstr-tarjeta-d { color: var(--pstr-ink2); overflow-wrap: anywhere; }

.pstr-lab-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 4px; }
.pstr-lab-fila .pstr-lab { margin: 0; }
.pstr-imp-tasa { margin-top: 12px; max-width: 22rem; }
.pstr-etiq-sup { color: var(--pstr-ink); }
.pstr-traduccion { margin: 10px 0 0; padding: 10px 12px; font-size: 0.9rem; color: var(--pstr-ink); background: var(--pstr-surf2); border: 1px solid var(--pstr-line); border-radius: 10px; overflow-wrap: anywhere; }
.pstr-consecuencia { margin: 8px 0 0; font-size: 0.85rem; color: var(--pstr-ink); overflow-wrap: anywhere; }
.pstr-det-iva { margin: 2px 0 0; }
.pstr-imp-p2 .pstr-seg-imp + .pstr-pregunta { margin-top: 12px; }

/* Lista de otros impuestos: cada fila es una tarjeta (nombre, base y valor; abajo la casilla y quitar) */
.pstr-imp-lista { display: grid; gap: 8px; margin: 6px 0 4px; }
.pstr-imp-fila { padding: 10px; min-width: 0; background: var(--pstr-sub-bg); border: 1px solid var(--pstr-line); border-radius: 10px; }
.pstr-imp-campos { display: grid; gap: 8px 12px; grid-template-columns: minmax(0, 1fr); align-items: start; min-width: 0; }
.pstr-imp-celda { min-width: 0; }
.pstr-imp-cap { display: block; margin-bottom: 4px; font-size: 0.8rem; font-weight: 600; color: var(--pstr-ink2); }
.pstr-imp-texto { margin: 0; min-height: 44px; display: flex; align-items: center; font-weight: 600; overflow-wrap: anywhere; }
.pstr-select { appearance: auto; width: 100%; padding-inline: 10px 4px; cursor: pointer; text-overflow: ellipsis; }
.pstr-imp-campos > .pstr-chk { margin: 0; min-width: 0; }
.pstr-imp-campos > .pstr-btn-txt { justify-self: start; min-height: 44px; }
.pstr-imp-migrado { margin: 8px 0 0; font-size: 0.8rem; overflow-wrap: anywhere; }
.pstr-imp-celda .pstr-in[inputmode="decimal"] { text-align: right; font-variant-numeric: tabular-nums; }
@container pstr-imp (min-width: 640px) {
  .pstr-imp-campos { grid-template-columns: minmax(8rem, 1.2fr) minmax(12rem, 1.2fr) minmax(0, 1.7fr); }
  .pstr-imp-campos > .pstr-chk { grid-column: 1 / 3; }
  .pstr-imp-campos > .pstr-btn-txt { grid-column: 3; justify-self: end; }
}

/* Resumen tributario */
.pstr-imp-resumen { min-width: 0; }
.pstr-trib { container: pstr-trib / inline-size; min-width: 0; }
.pstr-trib-filas { margin-bottom: 4px; }
.pstr-trib-filas dd { font-variant-numeric: tabular-nums; }
.pstr-fila-sub dt { padding-left: 12px; }
.pstr-fila-sub dd { font-weight: 600; }
.pstr-fila-sub-total { border-top: 1px solid var(--pstr-line2); }
.pstr-fila-sub-total dt { color: var(--pstr-ink); font-weight: 600; }
.pstr-trib-scroll { min-width: 0; }
.pstr-trib-mes { width: 100%; border-collapse: collapse; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.pstr-trib-mes thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.pstr-trib-mes tbody, .pstr-trib-mes tr, .pstr-trib-mes th, .pstr-trib-mes td { display: block; }
.pstr-trib-mes tr { margin: 0 0 8px; padding: 8px 10px; background: var(--pstr-sub-bg); border: 1px solid var(--pstr-line); border-radius: 10px; }
.pstr-trib-mes th[scope="row"] { padding: 0 0 4px; text-align: left; font-weight: 700; text-transform: capitalize; }
.pstr-trib-mes td { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; text-align: right; overflow-wrap: anywhere; }
.pstr-trib-mes td { white-space: nowrap; }
.pstr-trib-mes td::before { content: attr(data-cap); flex: 1 1 0; min-width: 0; white-space: normal; text-align: left; color: var(--pstr-ink2); }
@container pstr-trib (min-width: 560px) {
  .pstr-trib-mes thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; display: table-header-group; }
  .pstr-trib-mes { display: table; }
  .pstr-trib-mes tbody { display: table-row-group; }
  .pstr-trib-mes tr { display: table-row; margin: 0; padding: 0; background: transparent; border: 0; }
  .pstr-trib-mes thead tr { display: table-row; }
  .pstr-trib-mes th, .pstr-trib-mes td { display: table-cell; padding: 6px 8px; border-bottom: 1px dashed var(--pstr-line); text-align: right; }
  .pstr-trib-mes th[scope="row"], .pstr-trib-mes thead th:first-child { text-align: left; }
  .pstr-trib-mes thead th { color: var(--pstr-ink2); font-weight: 600; font-size: 0.8rem; vertical-align: bottom; }
  .pstr-trib-mes td::before { content: none; }
}
.pstr-imp-nota-fija { margin: 14px 0 0; }

@media (prefers-reduced-motion: reduce) {
  .pstr *, .pstr *::before, .pstr *::after { transition: none !important; animation: none !important; }
}

/* --- Campo de ingreso bloqueado (arriendo temporal) ---
   Vive fuera del panel (en la calculadora y en la ficha), así que sus tokens se definen en :root y se adaptan al tema. */
:root {
  --pstr-bloq-bg: color-mix(in srgb, var(--text-primary, #E8EBEF) 9%, var(--bg-surface-elevated, #1b2128));
  --pstr-bloq-borde: color-mix(in srgb, var(--text-primary, #E8EBEF) 38%, transparent);
}
body.light-theme, :root[data-theme="light"] {
  --pstr-bloq-bg: color-mix(in srgb, var(--text-primary, #0F1720) 7%, var(--bg-surface-elevated, #f3f5f7));
  --pstr-bloq-borde: color-mix(in srgb, var(--text-primary, #0F1720) 40%, transparent);
}
input.pstr-rent-bloqueado[readonly] {
  background-color: var(--pstr-bloq-bg) !important;
  border-style: dashed !important;
  border-color: var(--pstr-bloq-borde) !important;
  cursor: not-allowed;
}
