/* Superficie del workspace: mismos tokens, ancho y movimiento que el Asistente. */
.qvp-panel { --qvp-columns-gap:24px; --qwf-control-height:40px; --qvp-provider-slot-height:48px; --qvp-ink:var(--qvw-editor-ink,var(--qv-content-ink,#1e293b)); --qvp-muted:var(--qvw-editor-muted,var(--qv-content-muted,#71829c)); --qvp-bucket-bg:color-mix(in srgb,var(--qv-neutral-surface,#f3f4f6) 40%,var(--qv-surface,#fff)); --qvp-bucket-border:var(--qv-surface-border,#e2e8f0); position:fixed; z-index:1201; display:flex; flex-direction:column; box-sizing:border-box; margin:0; padding:0; background:var(--qv-surface,#fff); color:var(--qvp-ink); font:400 13px/1.45 Inter,system-ui,sans-serif; }
.qvp-panel[hidden] { display:none; }
.qvp-scene { display:contents; }
.qvp-panel *, .qvp-panel *::before, .qvp-panel *::after { box-sizing:border-box; }
.qvp-panel button, .qvp-panel input, .qvp-panel select { font:inherit; }
.qvp-panel button { cursor:pointer; }
.qvp-panel button:disabled { opacity:.4; cursor:default; }
.qvp-panel svg:not(:where(.qv-close-button > svg)) { flex-shrink:0; width:18px; height:18px; stroke-width:1.7; }
.qvp-header { display:flex; align-items:center; flex:0 0 var(--qvw-toolbar-height,56px); gap:4px; padding:10px 20px; border-bottom:1px solid var(--qv-surface-border,#e2e8f0); }
.qvp-header h2 { display:flex; align-items:center; gap:10px; flex:1; min-width:0; margin:0; font-size:16px; font-weight:600; }
.qvp-header h2 svg { color:var(--brand,#008cff); width:22px; height:22px; }
/* Mismo cierre canónico y variante de escritorio que Asistente QuVi. */
.qvp-header .qvp-header-action { --qv-close-bg:transparent; }
@media (hover:hover) {
  .qvp-header .qv-close-button:not(:disabled):hover { --qv-close-bg:var(--qv-neutral-hover,#e5e7eb); }
}
.qvp-icon, .qvp-grip { display:grid; place-items:center; flex-shrink:0; width:30px; height:32px; padding:4px; color:var(--qvp-muted,#71829c); border:0; border-radius:8px; background:transparent; }
@media (hover:hover) {
  .qvp-icon:not(:disabled):hover { background:var(--qv-neutral-hover,#edf1f5); color:var(--qv-content-ink,#1e293b); }
  .qvp-condition:hover { background:var(--qv-neutral-surface,#f5f7fa); }
  .qvp-condition :is(.qvp-icon,.qvp-grip):hover { background:transparent; color:var(--qv-content-ink,#1e293b); }
}
.qvp-scroll { display:flex; flex-direction:column; flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:20px; scrollbar-width:thin; }
.qvp-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); flex:none; gap:3px; padding:3px; border-radius:10px; background:var(--qv-neutral-surface,#f5f7fa); }
.qvp-tabs button { display:flex; flex:1; justify-content:center; align-items:center; gap:6px; min-width:0; padding:9px 4px; border:0; border-radius:8px; color:var(--qvp-muted,#64748b); background:transparent; font-size:12px; font-weight:500; }
.qvp-tabs button[aria-selected="true"] { background:var(--qv-surface,#fff); color:var(--brand,#008cff); box-shadow:0 1px 3px #1e293b12; }
.qvp-tabs svg { width:16px; height:16px; }
.qvp-source { grid-area:1 / 1; align-self:start; min-width:0; padding-block:18px var(--qvp-columns-gap); }
.qvp-source[hidden] { display:none; }
.qvp-sources { display:grid; flex:none; min-width:0; }
.qvp-sources[hidden] { display:none; }
.qvp-source[aria-hidden="true"] { visibility:hidden; pointer-events:none; }
/* Los cuatro editores originales comparten una fila. Sólo su contenido inicial
   reserva altura; las ampliaciones inactivas no estiran las otras pestañas.
   Inert + aria-hidden retiran interacción y lectura, sin clonar controles. */
.qvp-source[aria-hidden="true"] :is(#qvpLinesBody,#qvpTypesBody) { display:none; }
#qvpSource-clinical[aria-hidden="true"] [data-providers] > .qvp-condition:nth-child(n+4) { display:none; }
.qvp-source label { display:block; font-size:12px; font-weight:500; color:var(--qvp-ink); margin-bottom:7px; }
.qvp-source input { width:100%; min-width:0; height:40px; border:1px solid var(--qv-surface-border,#e2e8f0); border-radius:9px; padding:9px 12px; color:var(--qvp-ink); background:var(--qv-surface,#fff); font-size:12px; font-weight:400; }
.qvp-source input::placeholder { color:var(--qvp-muted,#71829c); }
.qvp-search { position:relative; margin-bottom:12px; }
.qvp-search > svg { position:absolute; left:12px; top:12px; width:16px; height:16px; color:var(--qvp-muted,#71829c); pointer-events:none; }
.qvp-search input { padding-left:36px; }
.qvp-condition, .qvp-excluded { -webkit-user-select:none; user-select:none; display:flex; align-items:center; position:relative; gap:4px; min-height:57px; padding:9px 0; border-bottom:1px solid var(--qv-surface-border,#e2e8f0); }
.qvp-condition, .qvp-excluded[data-exclusion-key="exclClin"] { touch-action:none; cursor:grab; }
.qvp-condition:last-child, .qvp-excluded:last-child { border-bottom:0; }
.qvp-condition *, .qvp-excluded * { -webkit-user-select:none; user-select:none; }
#qvpSource-clinical .qvp-condition { min-height:44px; padding-block:4px; padding-right:6px; }
/* Reserva tres nombres de hasta dos líneas sin estirar las filas visibles.
   «Ver más» amplía dentro del único scroll del panel, sin recortar nombres. */
#qvpSource-clinical [data-providers] { min-height:calc(3 * var(--qvp-provider-slot-height)); }
.qvp-condition-text { flex:1; min-width:0; overflow-wrap:anywhere; }
.qvp-condition-text > span { display:block; font-size:13px; font-weight:500; }
.qvp-condition-text > small { display:block; margin-top:3px; color:var(--qvp-muted,#71829c); font-size:12px; line-height:1.4; }
.qvp-condition-text > [data-income-pending][hidden] { display:none; }
.qvp-grip { width:22px; cursor:grab; touch-action:none; }
.qvp-grip svg { width:14px; height:18px; }
.qvp-text { display:block; padding:8px 0; border:0; color:var(--brand,#008cff); background:transparent; font-size:12px; text-align:left; }
.qvp-text[hidden] { display:none; }
.qvp-text[data-more] { margin-inline:auto; padding-inline:12px; text-align:center; min-height:44px; }
.qvp-more-slot { min-height:44px; }
.qvp-isapres { width:100%; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.qvp-isapre { display:flex; align-items:center; justify-content:center; gap:10px; min-width:0; width:100%; min-height:56px; padding:10px; border:1px solid transparent; border-radius:10px; background:var(--qvp-bucket-bg); color:inherit; text-align:left; }
@media (min-width:375px) {
  .qvp-isapres { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .qvp-isapre { gap:6px; padding-inline:8px; }
}
.qvp-isapre[data-isapre="all"] > span:first-child { flex:1; text-align:center; font-weight:500; }
.qvp-isapres-all { display:flex; align-items:center; justify-content:center; gap:8px; }
.qvp-isapres-all svg { color:var(--qvp-muted,#71829c); }
.qvp-isapre[aria-pressed="true"] { background:color-mix(in srgb,var(--qv-neutral-surface,#f3f4f6) 70%,var(--qv-surface,#fff)); }
.qvp-isapre-mark { display:grid; place-items:center; flex:0 0 14px; color:var(--brand,#008cff); }
.qvp-panel .qvp-isapre-mark svg { width:14px; height:14px; stroke-width:2; }
.qvp-isapre[aria-pressed="false"] .qvp-isapre-mark { visibility:hidden; }
.qvp-isapre-logo { display:flex; justify-content:center; flex:1; min-width:0; }
.qvp-isapre-logo .plan-logo-wrap { max-width:100%; }
.qvp-isapre-logo .plan-logo { width:100%; height:100%; object-fit:contain; }
.qvp-isapre:focus-visible { outline:2px solid var(--brand,#008cff); outline-offset:2px; }
@media (hover:hover) {
  .qvp-isapre:not(:disabled):hover { border-color:var(--qvw-control-hover-border,#c3d6e9); background:var(--qv-neutral-surface,#f3f4f6); }
}
.qvp-budget-controls { width:100%; }
.qvp-budget-currency { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; }
.qvp-budget-currency > span { color:var(--qvp-ink); font-size:12px; font-weight:500; }
.qvp-budget-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.qvp-source .qvp-budget-fields > label { min-width:0; margin:0; }
.qvp-budget-money { display:block; position:relative; margin-top:7px; }
.qvp-budget-money > [data-budget-symbol] { position:absolute; inset-block:0; left:12px; display:flex; align-items:center; pointer-events:none; color:var(--qvp-muted); font-size:12px; font-weight:400; }
.qvp-source .qvp-budget-money input { display:block; margin:0; padding-left:26px; }
.qvp-budget-money[data-currency="UF"] input { padding-left:34px; }
.qvp-budget-money[data-currency="USD"] input { padding-left:40px; }
/* El texto sigue el mismo eje que los campos; el hover ocupa el aire lateral. */
.qvp-panel .qvp-disclosure { display:flex; align-items:center; gap:8px; width:calc(100% + 24px); min-height:44px; margin-inline:-12px; padding:10px 12px; border:0; border-radius:8px; background:transparent; color:var(--qvp-ink); text-align:left; font-size:12px; font-weight:500; }
.qvp-disclosure > svg { margin-left:auto; width:16px; height:16px; color:var(--qvp-muted); }
.qvp-disclosure:has(.qvw-filter-summary) > svg { margin-left:0; }
.qvp-disclosure[aria-expanded="true"] > svg { transform:rotate(180deg); }
.qvp-budget-slider { margin-top:8px; }
.qvp-budget-track { position:relative; height:44px; touch-action:none; cursor:pointer; }
.qvp-budget-track::before { content:""; position:absolute; top:20px; inset-inline:calc(var(--qf-thumb-size,16px) / 2); height:4px; border-radius:3px; background:linear-gradient(to right,#e4ecf5 var(--budget-from,0%),var(--brand,#008cff) var(--budget-from,0%) var(--budget-to,100%),#e4ecf5 var(--budget-to,100%)); }
.qvp-budget-track input[type="range"] { position:absolute; inset:0; width:100%; height:44px; margin:0; padding:0; border:0; background:transparent; pointer-events:none; }
.qvp-budget-track input::-webkit-slider-runnable-track { background:transparent; }
.qvp-budget-track input::-moz-range-track, .qvp-budget-track input::-moz-range-progress { background:transparent; }
.qvp-budget-track input:focus-visible { z-index:1; outline:0; }
.qvp-budget-track input:focus-visible::-webkit-slider-thumb { outline:2px solid var(--brand,#008cff); outline-offset:3px; }
.qvp-budget-track input:focus-visible::-moz-range-thumb { outline:2px solid var(--brand,#008cff); outline-offset:3px; }
.qvp-budget-endpoints { display:flex; justify-content:space-between; gap:12px; color:var(--qvp-muted); font-size:12px; font-weight:500; }
.qvp-panel .qvp-help[hidden] { display:none; }
.qvp-panel [data-catalog-options] { margin-top:16px; }
/* Editar clínicas conserva receta y controlador; sólo reduce la presentación. */
.qvp-clinic-help { margin:0 0 16px; color:var(--qvp-muted); font-size:12px; line-height:1.6; }
.qvr-clinic-edit :is(.qvp-tabs,.qvp-destinations,.qvp-header-action,.qvp-source[aria-hidden="true"]) { display:none; }
.qvr-clinic-edit #qvpSource-clinical { padding:0; }
.qvr-clinic-edit [data-clinic-selection] { margin-bottom:12px; }
.qvr-clinic-edit [data-clinic-selection][hidden] { display:none; }
.qvp-clinic-add { display:flex; align-items:center; gap:12px; width:100%; min-height:48px; padding:12px; color:inherit; border:0; border-bottom:1px solid var(--qv-divider); background:transparent; text-align:left; }
.qvp-clinic-add > span { flex:1; min-width:0; }
.qvp-clinic-add > svg { color:var(--qvp-muted); }
.qvp-clinic-choice { position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:4px 8px; padding:12px; border-bottom:1px solid var(--qv-divider); }
.qvp-clinic-choice .qvp-condition-text { grid-column:1; }
.qvp-clinic-tier { grid-column:1; grid-row:2; display:flex; align-items:center; justify-self:start; gap:6px; min-height:30px; padding:4px 8px; margin-left:-8px; }
.qvp-clinic-tier:not(:hover) { background:transparent; border-color:transparent; }
.qvp-clinic-tier > span { font-size:12px; }
.qvp-panel .qvp-clinic-tier svg { width:15px; height:15px; }
.qvp-clinic-choice > .qv-close-button { --qv-close-bg:transparent; grid-column:2; grid-row:1 / span 2; }
@media (hover:hover) {
  .qvp-clinic-add:hover { background:var(--qv-neutral-surface); color:var(--qv-content-ink); }
}
@media (max-width:1024px), (hover:none) and (pointer:coarse) {
  .qvp-clinic-tier { min-height:44px; }
}
.qvp-panel :is(.qvp-catalog-region,.qvp-catalog-disclosure) { padding:0; margin:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.qvp-panel .qvp-catalog-region { margin-top:24px; padding-top:24px; border-top:1px solid var(--qv-divider); }
.qvp-panel .qvp-catalog-region .qf-card-heading { margin:0 0 7px; font-size:12px; font-weight:500; color:var(--qvp-ink); }
.qvp-panel .qvp-catalog-disclosure { border-top:1px solid var(--qv-divider); }
.qvp-catalog-disclosure > [hidden] { display:none; }
.qvp-catalog-disclosure > div { padding-block:12px; }
.qvp-panel .qvp-catalog-disclosure .qvw-filter-summary { font-size:12px; font-weight:400; color:var(--qvp-muted); }
.qvp-panel .qvw-lines-search { display:flex; align-items:center; gap:8px; position:relative; }
.qvp-panel .qvw-lines-search > svg { position:absolute; left:12px; width:16px; color:var(--qvp-muted); pointer-events:none; }
.qvp-panel .qvw-lines-search input { min-width:0; padding-left:36px; }
.qvp-panel .qvw-lines-clear { position:absolute; right:12px; }
.qvp-panel .qvw-lines-search:has(.qvw-lines-clear:not([hidden])) input { padding-right:44px; }
/* Aire constante dentro de cada área de hover, sin desplazarla al entrar. */
html.qv-workspace #qvwPreferences.qvp-panel :is(.qvw-lines-heading,.qvw-filter-choice) { padding-inline:12px; }
html.qv-workspace #qvwPreferences.qvp-panel .qvw-line-only { margin-right:8px; }
html.qv-workspace #qvwPreferences.qvp-panel .qvw-lines-clear { margin:0; }
html.qv-workspace #qvwPreferences.qvp-panel .qvw-lines-total { margin:12px 12px 0; }
.qvp-destinations { flex:none; min-width:0; margin-top:auto; }
.qvp-exclusions { margin-top:12px; }
.qvp-exclusions-head { margin-bottom:4px; padding-bottom:8px; border-bottom:1px solid var(--qv-divider,#e9edf2); }
.qvp-exclusions > .qvp-drop-hint { min-height:28px; }
.qvp-exclusions:has([data-exclusion-chips]:not(:empty)) > [data-exclusion-empty] { display:none; }
.qvp-panel .is-drop-disabled { opacity:.45; }
html[data-qvw-keyboard="true"] .qvp-panel :is(button,input):focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
@media (hover:hover) {
  .qvp-panel .qvp-disclosure:hover { background:var(--qv-neutral-surface); }
  .qvp-excluded:hover { background:var(--qv-neutral-surface,#f5f7fa); }
  .qvp-excluded :is(.qvp-icon,.qvp-grip):hover { background:transparent; color:var(--qv-content-ink,#1e293b); }
}
.qvp-income { display:grid; grid-template-columns:minmax(0,1fr) max-content; align-items:center; gap:12px; margin-top:20px; padding-top:20px; border-top:1px solid var(--qv-surface-border,#e2e8f0); }
.qvp-income-copy { min-width:0; }
.qvp-income-copy strong { display:flex; align-items:center; gap:5px; font-size:12px; font-weight:500; color:var(--qvp-ink); }
.qvp-income-copy > span { display:block; margin-top:3px; color:var(--qvp-muted); font-size:12px; }
/* Acción canónica dentro de un blanco táctil de 44 px. */
.qvp-panel .qvp-income-action { --qvp-income-pill-height:30px; position:relative; isolation:isolate; display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:0 12px; border:0; border-radius:var(--qv-action-radius,999px); background:transparent; color:var(--qf-selection-ink,#008cff); font:500 var(--qvw-control-font-size,12px)/1.3 var(--ff-sans,Inter,system-ui,sans-serif); white-space:nowrap; }
.qvp-income-action::before { content:""; position:absolute; inset:calc((100% - var(--qvp-income-pill-height)) / 2) 0; z-index:-1; border:1px solid var(--qf-selection-border,#c5dfff); border-radius:inherit; background:var(--qf-selection-bg,#edf5ff); pointer-events:none; }
@media (hover:hover) {
  .qvp-income-action:not(:disabled):hover::before { background:var(--qv-accent-soft,#edf7ff); }
}
.qvp-income-action:focus-visible { outline:0; }
.qvp-income-action:focus-visible::before { outline:2px solid var(--brand,#008cff); outline-offset:2px; }
.qvp-help { margin:10px 0 0; color:var(--qvp-muted); font-size:12px; line-height:1.5; }
.qvp-coverage-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:12px; }
.qvp-panel .qf-select { margin-top:5px; width:100%; }
.qvp-panel .qf-select-trigger { min-height:40px; width:100%; font-size:12px; font-weight:400; color:var(--qvp-ink); }
.qvp-buckets { display:grid; grid-template-columns:1fr 1fr; align-items:stretch; flex:none; min-height:150px; gap:12px; }
.qvp-buckets[hidden] { display:none; }
/* Reposo y destino comparten la misma caja; el arrastre sólo cambia colores. */
.qvp-bucket { position:relative; min-width:0; padding:12px 8px 9px; border:1px solid var(--qvp-bucket-border); border-radius:12px; background:var(--qvp-bucket-bg); }
.qvp-bucket h3 { display:flex; align-items:center; justify-content:center; gap:4px; margin:0; font-size:13px; font-weight:600; white-space:nowrap; }
.qvp-bucket h3 > svg { color:var(--brand,#008cff); width:15px; height:15px; }
.qvp-bucket [data-count] { display:inline-grid; place-items:center; flex:none; min-width:18px; height:18px; padding-inline:3px; border-radius:999px; background:var(--qv-neutral-hover,#e5e7eb); color:var(--qvp-muted,#71829c); font-weight:500; font-size:10px; line-height:1; }
.qvp-bucket [data-count][hidden] { display:none; }
.qvp-rule { margin:5px 0 9px; padding-bottom:12px; border-bottom:1px solid var(--qv-divider,#e9edf2); text-align:center; font-size:12px; color:var(--qvp-muted,#71829c); }
.qvp-bucket :is(.qvp-condition,.qvp-excluded) { align-items:center; gap:6px; min-height:44px; padding:4px; border-radius:6px; }
.qvp-bucket .qvp-condition-text > span { font-size:12px; font-weight:400; }
.qvp-bucket .qvp-grip { width:20px; padding-inline:0; }
.qvp-bucket .qvp-icon { width:28px; }
.qvp-bucket .qvp-icon > svg { width:14px; height:14px; }
.qvp-drop-hint { display:grid; place-items:center; min-height:90px; color:color-mix(in srgb,var(--qvp-muted,#71829c) 90%,var(--qv-surface,#fff)); font-size:12px; }
.qvp-bucket:has(.qvp-condition) .qvp-drop-hint { min-height:35px; }
.qvp-bucket.is-drop-target { border-color:var(--qf-selection-border,#c5dfff); background:var(--qv-accent-soft,#edf7ff); }
.qvp-picker { position:absolute; z-index:3; top:calc(100% - 5px); right:0; min-width:172px; padding:4px; border:1px solid var(--qv-surface-border,#e2e8f0); border-radius:10px; background:var(--qv-surface,#fff); box-shadow:0 5px 20px #1e293b16; }
.qvp-picker button { display:flex; align-items:center; gap:8px; width:100%; padding:10px 8px; border:0; border-radius:7px; color:inherit; background:transparent; font-size:12px; text-align:left; }
.qvp-picker button:hover, .qvp-picker button:focus-visible { background:var(--qv-neutral-surface,#f5f7fa); }
.qvp-picker svg { width:15px; height:15px; color:var(--brand,#008cff); }
.qvp-drag-ghost { position:fixed; z-index:9999; top:0; left:0; max-width:min(260px,calc(100vw - 8px)); padding:8px 10px; border:1px solid var(--qf-selection-border,#c5dfff); border-radius:8px; background:var(--qv-surface,#fff); color:var(--qv-content-ink,#1e293b); box-shadow:0 2px 6px #1e293b1f,0 1px 2px #1e293b14; font:500 12px/1.4 Inter,system-ui,sans-serif; pointer-events:none; }
html.qvp-dragging, html.qvp-dragging * { cursor:grabbing !important; -webkit-user-select:none !important; user-select:none !important; }
.qvp-footer { display:flex; align-items:center; flex-shrink:0; gap:12px; min-height:64px; padding:15px 20px; border-top:1px solid var(--qv-surface-border,#e2e8f0); color:var(--qvp-muted,#71829c); font-size:12px; }
/* En escritorio el contador ya está junto a los resultados. Conserva el
   anuncio accesible y los avisos; móvil mantiene su pie. */
@media (min-width:1025px) and (hover:hover) and (pointer:fine) {
  .qvp-footer:has([data-kind="count"]) { min-height:0; padding-block:0; border-top:0; }
  .qvp-footer output[data-kind="count"] { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
}
.qvp-see-results { display:none; }
.qvp-footer :is(.qvp-income-action,.qvp-see-results)[hidden] { display:none; }
.qvp-relax { display:flex; flex:none; align-items:center; gap:8px; padding:12px 0; border:0; border-bottom:1px solid var(--qv-surface-border,#e2e8f0); background:transparent; color:var(--brand,#008cff); font-size:12px; text-align:left; }
.qvp-empty { color:var(--qvp-muted,#71829c); font-size:12px; }
.qvp-empty-action { margin:16px auto 0; }
.qvp-match { display:block; margin-top:6px; color:var(--brand,#008cff); font:500 11px/1.4 Inter,system-ui,sans-serif; }
/* Navegación global, independiente del ancho de resultados y del riel abierto.
   Su altura no se suma al ResizeObserver de la barra de vistas y orden. */
html.qv-workspace.qvp-enabled:not(.qv-pro-conversation):has(#resultados:not([hidden])) { --qvp-modes-height:50px; --qvw-top:var(--qvp-modes-height); --page-nav-h:var(--qvp-modes-height); }
html.qv-workspace.qvp-enabled.qv-pro-conversation { --qvw-top:0px; --page-nav-h:0px; }
html.qv-pro-conversation #qvpModes { display:none; }
html.qv-workspace.qvp-enabled #resultados { padding-top:var(--qvp-modes-height,50px); }
html.qv-workspace.qvp-enabled .qpd-integrated .plan-detail-nav { top:var(--qvp-modes-height,50px); }
#qvpModes { position:fixed; z-index:1205; inset:0 0 auto; display:flex; align-items:center; justify-content:center; box-sizing:border-box; height:var(--qvp-modes-height,50px); padding:0 16px; border:0; background:var(--qv-neutral-surface); box-shadow:inset 0 -1px 0 var(--qv-divider); }
/* La marca ocupa el cruce de las barras y no hereda el acabado de los botones. */
#qvpModes > #qvwReturn { position:absolute; inset:0 auto 0 0; display:grid; place-items:center; box-sizing:border-box; width:var(--qvw-rail,56px); height:100%; min-height:44px; margin:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; transform:none; text-decoration:none; }
/* Centrar el cuadrado «Qu» sobre la mascota; «Vi» conserva su extensión derecha. */
#qvpModes > #qvwReturn > img { display:block; flex:none; justify-self:start; margin-inline-start:calc((100% - 26px) / 2); width:auto; height:26px; max-width:none; }
#qvpModes > #qvwReturn > span, #qvpModes > #qvwReturn::before, #qvpModes > #qvwReturn::after { display:none; }
#qvpModes > #qvwReturn:is(:hover,:active,:focus) { background:transparent; box-shadow:none; }
#qvpModes > #qvwReturn:focus-visible { outline:2px solid var(--brand); outline-offset:-4px; }
html.qv-workspace :is(#qvwPreferencesToggle,#qvwReturn)[hidden] { display:none !important; }
html.qv-workspace.qvp-enabled .qvw-rail-footer { display:none; }
/* Marco continuo con el riel. La máscara redondea las esquinas y una capa
   independiente dibuja el borde suave del lienzo, sin recortar sus controles. */
@media (min-width:1025px) {
  /* El borde invisible reproduce el divisor del riel para alinear sus centros. */
  html.qv-workspace.qvw-desktop #qvpModes > #qvwReturn { border-right:1px solid transparent; }
  html.qv-workspace.qvw-desktop.qvp-enabled #qvpModes { --qvp-frame-radius:16px; box-shadow:none; }
  html.qv-workspace.qvw-desktop.qvp-enabled #qvpModes::before {
    content:""; position:absolute; top:100%; left:var(--qvw-rail); right:0;
    height:var(--qvp-frame-radius); pointer-events:none;
    background:
      radial-gradient(circle at bottom right,transparent calc(var(--qvp-frame-radius) - .5px),var(--qv-neutral-surface) var(--qvp-frame-radius)) top left,
      radial-gradient(circle at bottom left,transparent calc(var(--qvp-frame-radius) - .5px),var(--qv-neutral-surface) var(--qvp-frame-radius)) top right;
    background-size:var(--qvp-frame-radius) var(--qvp-frame-radius);
    background-repeat:no-repeat;
  }
  html.qv-workspace.qvw-desktop.qvp-enabled #qvpModes::after {
    content:""; position:absolute; top:100%; left:var(--qvw-rail); right:0;
    height:calc(100dvh - var(--qvp-modes-height,50px));
    border-radius:var(--qvp-frame-radius) var(--qvp-frame-radius) 0 0;
    outline:1px solid rgb(25 47 73 / 6%); outline-offset:-1px;
    box-shadow:0 -4px 8px -6px rgb(25 47 73 / 2%), 0 3px 14px rgb(25 47 73 / 7%);
    pointer-events:none;
  }
  html.qv-workspace.qvw-desktop.qvp-enabled:not(.qv-pro-conversation):has(#resultados:not([hidden])) .qvw-assistant-rail {
    border-image:none; border-right-color:transparent;
  }
  /* En Pro la franja de modos pertenece al shell: panel y barra empiezan en
     el mismo origen del iframe y comparten la reserva horizontal. */
  html.qv-workspace.qvw-desktop.qvp-enabled.qv-pro-workspace:has(#resultados:not([hidden])) { --qvw-top:0px; }
  /* Pro comparte el origen vertical de franja y paneles. El marco decorativo
     queda debajo del Asistente (1200), los editores (1202) y el riel (1203). */
  html.qv-workspace.qvw-desktop.qvp-enabled.qv-pro-workspace #qvpModes { z-index:1199; }
  html.qv-workspace.qvw-desktop.qvp-enabled.qv-pro-workspace #header-resultados {
    position:fixed; top:0; left:var(--qvw-surface-left); right:0; z-index:1206; inline-size:var(--qvw-surface-width); margin:0;
    /* El marco aporta el fondo: una segunda superficie opaca taparía su sombra superior. */
    background:transparent; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none;
  }
  html.qv-workspace.qvw-desktop.qvp-enabled.qv-pro-workspace[data-qvw-view="results"] #resultados { padding-top:calc(var(--qvp-modes-height,50px) + 20px); }
}
/* Mismo acabado del segmentado de Mi equipo: pista neutra, cápsula blanca
   y contorno interior. El marco público conserva su geometría. */
.qvp-modes { display:inline-flex; align-items:center; gap:0; min-width:0; max-width:100%; box-sizing:border-box; padding:2px; border:1px solid transparent; border-radius:var(--qv-action-radius,999px); background:#eaecf0; white-space:nowrap; }
.qvp-modes button { position:relative; isolation:isolate; display:inline-flex; align-items:center; justify-content:center; gap:6px; box-sizing:border-box; min-width:0; min-height:30px; padding:4px 10px; border:0; border-radius:var(--qv-action-radius,999px); background:transparent; color:#52637b; font:500 13px/20px var(--ff-sans,Inter,system-ui,sans-serif); cursor:pointer; }
.qvp-modes button > svg { flex:none; width:16px; height:16px; stroke-width:1.7; }
.qvp-modes button > .lucide-star,
.qvp-modes button > .lucide-layers > path:first-child { fill:currentColor; }
/* El acceso al editor mantiene su propio estado de apertura en el riel. */
#qvwPreferencesToggle > .qvp-mode-solid { display:none; }
#qvwPreferencesToggle[aria-expanded="true"] > .lucide-list-checks { display:none; }
#qvwPreferencesToggle[aria-expanded="true"] > .qvp-mode-solid { display:block; }
.qvp-modes button.qv-ai-button > svg { color:inherit; }
/* Mismo brillo compartido; sólo se abrevia la pasada de este selector. */
.qvp-modes .qv-ai-button:not(:disabled):is(:hover,.is-entering) > :is(.qv-ai-label,svg,.qv-ai-icon) { animation-duration:1000ms; }
.qvp-modes button[aria-pressed="true"] { color:#0f172a; background:var(--qv-surface,#fff); box-shadow:inset 0 0 0 1px var(--qv-surface-border,#e2e8f0); }
@media (hover:hover) {
  .qvp-modes button:not(:disabled):not([aria-pressed="true"]):hover { color:#0f172a; background:var(--qv-neutral-hover,#e5e7eb); }
}
.qvp-modes button:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
.qvp-modes button:disabled { cursor:wait; opacity:.55; }
html.qvp-enabled .qvr-return.qvr-view-switch { display:none !important; }
/* El catálogo conserva sus filtros visibles; las condiciones están en las columnas. */
html[data-qvp-mode="preferences"] #filtrosSeleccionados :is([data-group="Clínica"],[data-group="Precio"],[data-group="Cobertura hospitalaria"],[data-group="Cobertura ambulatoria"]) { display:none !important; }
html.qvp-unified :is(#qvwFilters,[data-mobile-overlay-open="ajustes"]) { display:none !important; }
html[data-qvp-mode="preferences"] .qvw-results-summary > .qvw-results-total { display:none; }
html[data-qvp-mode="preferences"] :is(.qva-workspace-guide,.qvw-order-guide,.qvw-card-guide) { display:none !important; }
html.qv-workspace.qvw-desktop #qvwPreferences { overflow:visible; }
@media (max-width:1024px), (hover:none) and (pointer:coarse) {
  .qvp-panel { --qvp-provider-slot-height:52px; }
  .qvp-scene { display:flex; flex-direction:column; flex:1; min-height:0; }
  /* El móvil conserva su barra compacta y Más; no deja una franja vacía. */
  html.qv-workspace.qvp-enabled.qv-pro-workspace:not(.qvw-desktop):has(#resultados:not([hidden])) { --qvp-modes-height:0px; --qvw-top:0px; --page-nav-h:0px; }
  html.qv-pro-workspace:not(.qvw-desktop) #qvpModes { display:none; }
  html.qv-pro-workspace:not(.qvw-desktop) .qf-results-bar { background:var(--qv-neutral-surface); }
  #qvwPreferences { z-index:1400; inset:var(--qvw-mobile-viewport-top,0px) 0 auto; width:100%; height:var(--qvw-mobile-viewport-height,100dvh); border:0; }
  .qvp-header { flex-basis:64px; padding-inline:16px; }
  .qvp-scroll { padding:16px; }
  .qvp-header h2 { font-size:16px; }
  .qvp-header h2 svg { display:none; }
  .qvp-tabs button { min-height:42px; }
  .qvp-icon { min-width:32px; min-height:40px; }
  .qvp-grip { min-height:40px; }
  .qvp-bucket .qvp-icon { min-width:22px; }
  .qvp-footer { padding-bottom:max(15px,env(safe-area-inset-bottom)); }
  .qvp-footer output { flex:1; }
  .qvp-see-results { display:block; min-height:44px; padding:10px 20px; border:0; border-radius:var(--qv-action-radius,999px); background:var(--brand,#008cff); color:#fff; font-size:13px; font-weight:500; }
}
/* Escala pública móvil: cuerpo como el Asistente, campos de 16 px y acciones
   táctiles de 44 px. Las ayudas pequeñas no compiten con las condiciones. */
html.qv-workspace:not(.qvw-desktop):not(.qv-pro-workspace) #qvwPreferences { font-size:14px; }
html.qv-workspace:not(.qvw-desktop):not(.qv-pro-workspace) #qvwPreferences :is(.qvp-tabs button,.qf-select-trigger,.qvp-icon,.qvp-grip) { min-height:44px; }
html.qv-workspace:not(.qvw-desktop):not(.qv-pro-workspace) #qvwPreferences .qvp-tabs button { padding-block:8px; font-size:13px; line-height:20px; }
html.qv-workspace:not(.qvw-desktop):not(.qv-pro-workspace) #qvwPreferences .qvp-source input { height:44px; padding-block:9px; font-size:16px; }
html.qv-workspace:not(.qvw-desktop):not(.qv-pro-workspace) #qvwPreferences .qvp-search > svg { top:50%; transform:translateY(-50%); }
html.qv-workspace:not(.qvw-desktop):not(.qv-pro-workspace) #qvwPreferences .qvp-condition-text > span { font-size:14px; }
html.qv-workspace:not(.qvw-desktop):not(.qv-pro-workspace) #qvwPreferences :is(.qvp-source label,.qvp-budget-currency > span,.qvp-catalog-region .qf-card-heading,.qvp-disclosure,.qvp-text,.qvp-income-copy strong,.qvp-income-action,.qvp-picker button) { font-size:13px; }
html.qv-workspace:not(.qvw-desktop):not(.qv-pro-workspace) #qvwPreferences .qf-select-trigger { height:44px; font-size:14px; }
html.qv-workspace:not(.qvw-desktop):not(.qv-pro-workspace) #qvwPreferences :is(.qvp-condition-text > small,.qvp-rule,.qvp-income-copy > span,.qvp-help,.qvp-bucket .qvp-condition-text > span) { font-size:12px; }
html.qv-workspace:not(.qvw-desktop):not(.qv-pro-workspace) #qvwPreferences .qvp-picker button { min-height:44px; }
/* En público móvil Prioridades pertenece al contenido de resultados. Conserva
   la navegación global y el scroll de la página, igual que Recomendación. */
html.qv-workspace:not(.qvw-desktop)[data-qvw-view="preferences"] #header-resultados,
html.qv-workspace:not(.qvw-desktop) #qv-results-workspace[data-workspace-view="preferences"] > :not(#qvwPreferences),
html.qv-workspace:not(.qvw-desktop)[data-qvw-view="preferences"] #resumen7 { display:none !important; }
html.qv-workspace:not(.qvw-desktop) #qv-results-workspace[data-workspace-view="preferences"] { display:block; min-width:0; padding-bottom:0; }
html.qv-workspace:not(.qvw-desktop) #qvwPreferences[data-qvp-integrated] { position:relative; z-index:auto; inset:auto; width:100%; height:auto; min-height:calc(100svh - var(--qvp-modes-height,60px) - 32px); background:var(--qv-page-canvas); }
/* La edición dirigida llega hasta el borde inferior desde su estado corto.
   Descontar el aire real del workspace evita que Ver más desplace el pie. */
html.qv-workspace:not(.qvw-desktop) #qvwPreferences.qvr-clinic-edit[data-qvp-integrated] { min-height:calc(100dvh - var(--qvp-modes-height,60px) - var(--qvw-mobile-content-gap,24px)); }
/* El propio pie aporta el cierre y el área segura. El padding general de
   página no debe levantarlo cuando se alcanza el final de la lista. */
html.qv-workspace:not(.qvw-desktop)[data-qvw-view="preferences"] main#main { padding-bottom:0; }
#qvwPreferences[data-qvp-integrated] .qvp-header { flex-basis:auto; min-height:60px; padding:0 0 16px; border:0; }
#qvwPreferences[data-qvp-integrated] .qvp-header h2 { font-size:24px; line-height:1.3; }
#qvwPreferences[data-qvp-integrated] .qvp-scroll { overflow:visible; overscroll-behavior:auto; padding:0; }
#qvwPreferences[data-qvp-integrated]:not(.qvr-clinic-edit) .qvp-footer {
  position:sticky; bottom:0; z-index:2; margin-top:20px; flex-wrap:wrap;
  padding:16px 0 max(16px,env(safe-area-inset-bottom)); background:var(--qv-page-canvas); font-size:13px;
}
#qvwPreferences.qvr-clinic-edit[data-qvp-integrated] .qvp-footer { margin-top:20px; padding:16px 0 max(16px,env(safe-area-inset-bottom)); background:transparent; font-size:13px; }
@media (max-width:600px) {
  .qvp-panel .qvp-income-action { --qvp-income-pill-height:36px; }
}
@media (max-width:374px) {
  .qvp-scroll { padding:14px; }
  .qvp-buckets { gap:8px; }
  .qvp-bucket { padding-inline:4px; }
  .qvp-bucket h3 { font-size:12px; }
}
@media (max-width:420px) {
  .qvp-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* En móvil el selector se despliega junto al header. Conserva las mismas
   acciones, selección y disponibilidad que escritorio. */
#qvpModeToggle { display:none; }
html.qv-workspace:not(.qvw-desktop):not(.qv-pro-workspace).qvp-enabled:has(#resultados:not([hidden])) { --qvp-modes-height:calc(60px + env(safe-area-inset-top,0px)); }
html.qv-workspace:not(.qvw-desktop) #qvpModes { justify-content:flex-end; padding:env(safe-area-inset-top,0px) 16px 0 68px; background:var(--qv-surface); }
html.qv-workspace:not(.qvw-desktop) #qvpModes > #qvwReturn { top:env(safe-area-inset-top,0px); height:calc(100% - env(safe-area-inset-top,0px)); }
html.qv-workspace:not(.qvw-desktop) #qvpModeToggle {
  display:flex; align-items:center; justify-content:flex-end; gap:10px; min-width:0; min-height:44px;
  padding:8px 0 8px 12px; border:0; border-radius:var(--qv-action-radius,999px);
  background:transparent; color:var(--qv-content-ink); font:500 13px/1.4 var(--ff-sans,Inter,system-ui,sans-serif); cursor:pointer;
}
#qvpModeToggle > svg { flex:none; width:16px; height:16px; color:var(--brand); }
#qvpModeToggle:focus-visible { outline:2px solid var(--brand); outline-offset:3px; }
#qvpModeToggle:disabled { opacity:.55; cursor:wait; }
.qvp-mode-options { min-height:0; overflow:auto; overscroll-behavior:contain; padding:16px; }
#qvwModePicker .qvp-modes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
#qvwModePicker .qvp-modes button { min-height:44px; padding:6px; font-size:12px; }
@media (max-width:374px) {
  #qvwModePicker .qvp-modes { grid-template-columns:1fr; border-radius:14px; }
  #qvwModePicker .qvp-modes button { border-radius:10px; }
}
html.qv-workspace:not(.qvw-desktop) #qvwPreferences[data-qvw-mobile-layer] { background:var(--qv-page-canvas); }
html.qv-workspace:not(.qvw-desktop) #qvwPreferences[data-qvw-mobile-layer] .qvp-footer { background:var(--qv-surface); }
/* El dock legado declara display:block para sus SVG. Conservar una sola
   variante del icono sin desplazar el eje ni la etiqueta de Prioridades. */
html.qv-workspace:not(.qvw-desktop) #resumen7 #qvwPreferencesToggle > .qvp-mode-solid,
html.qv-workspace:not(.qvw-desktop) #resumen7 #qvwPreferencesToggle[aria-expanded="true"] > .lucide-list-checks { display:none; }
html.qv-workspace:not(.qvw-desktop) #resumen7 #qvwPreferencesToggle[aria-expanded="true"] > .qvp-mode-solid { display:block; }

/* El azul indica selección; el hover neutro no añade una cápsula a la X. */
.qvp-bucket .qvp-condition[data-selected="true"] { background:var(--qf-selection-bg); border-radius:6px; }
.qvp-move { width:100%; margin-top:8px; }
.qvp-move[hidden] { display:none; }
@media (hover:hover) {
  .qvp-move:hover { color:var(--qf-selection-ink,var(--brand)); text-decoration:underline; text-underline-offset:3px; }
}

html.qv-workspace[data-qvp-mode="preferences"] .qf-results-bar #filtrosSeleccionados .chip[data-group="Búsqueda"] { flex:0 1 auto; min-width:0; max-width:100%; }
