/* Camuve CR — CONVERSOR (página principal `/`, plantillas/publico/conversor.html), encima de Bootstrap 5.3 y camuve.css.
   Etapa 5 del rediseño (docs/DISENO_RESPONSIVO.md §6): la distribución que ya funcionaba se conserva —teléfono: una columna
   1 subir → 2 simulación → 3 resultados → consejos; ≥ 900 px: opciones y resultados | simulador, consejos debajo de las
   opciones; ≥ 1200 px: consejos | simulador | opciones— con la marca (docs/MARCA.md), modo claro y oscuro (data-bs-theme, ver
   js/tema.js) y, debajo, la franja de servicios. Todo va bajo `.cv` (el <main> y la caja de diálogos) para no tocar Bootstrap
   ni la carcasa. El lienzo del simulador conserva su propio fondo (--screen), igual en los dos modos.
   Controles: los del conversor tienen su propia medida (44 px de toque en teléfono, 16 px de letra; compactos ≥ 900). */

.cv {
  --bg: var(--cmv-marfil); --panel: #fff; --ink: var(--cmv-negro); --muted: var(--cmv-gris-texto); --line: #E6DDD8; --ctl: #A39894;
  --accent: #B5345F; --accent-ink: #fff;
  --ok: #1D6B34; --err: #A12A1F; --focus: #1d4ed8; --warn-bg: #FFF4E5; --warn-ink: #6B3900; --aviso: #B45309;
  --cv-top: 112px;
  color: var(--ink);
}
[data-bs-theme="dark"] .cv {
  --panel: #1F2226; --line: #33373C; --ctl: #5E636A; --accent: #F39BBB; --accent-ink: #1A1A1A;
  --ok: #8FD9A0; --err: #FCA5A5; --focus: #93c5fd; --warn-bg: #3A2A12; --warn-ink: #F5C27A; --aviso: #F5A524;
}
/* Fondo propio del lienzo (pantalla de máquina): js/simulador.js lo lee de <html> (getComputedStyle(document.documentElement)) */
:root { --screen: #20262e; --screen-grid: #2c343e; --hoop: #8a96a3; }
:root[data-bs-theme="dark"] { --screen: #0f1317; --screen-grid: #1b2128; }
main.cv { padding: 0 0 calc(96px + env(safe-area-inset-bottom)); min-width: 0; }
main.cv:focus { outline: none; }
.cv :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cv-titulo { font-size: 1.25rem; line-height: 1.2; margin: 0; padding: 10px 16px 8px; }
.cv-titulo small { display: block; font: 400 .8rem/1.3 var(--bs-body-font-family); color: var(--muted); margin-top: 2px; }
.cv-noscript { margin: 12px 16px; }

/* ---------------------------------------------------------------- distribución (mobile first) */
.cv .app { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "inputs" "stage" "results" "help";
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cv .help { grid-area: help; border-top: 1px solid var(--line); }
.cv .help h3 { font-size: 15px; font-weight: 700; margin: 16px 0 6px; font-family: inherit; }
.cv .help:focus { outline: none; }
.cv .help.flash { outline: 3px solid var(--accent); outline-offset: -3px; }   /* outline: una sombra inset no se ve en una columna con desplazamiento propio (Chrome) */
.cv .side { display: contents; }
.cv .inputs { grid-area: inputs; border-bottom: 1px solid var(--line); }
.cv .results { grid-area: results; border-top: 1px solid var(--line); }
.cv .stage { grid-area: stage; display: flex; flex-direction: column; min-width: 0; }
.cv aside { background: var(--panel); padding: 14px 16px; min-width: 0; }
/* Paso 1: el orden visual es imagen/texto → medida → máquina → más opciones → botón → precio → estado */
.cv aside.inputs { display: flex; flex-direction: column; }
.cv .inputs > section { display: contents; }
.cv .inputs .machine, .cv .inputs #machineHint { order: 1; }
.cv .inputs .late { order: 2; }
.cv .inputs #status { order: 3; }
@media (min-width: 900px) {
  main.cv { padding-bottom: 0; font-size: 14px; }
  .cv-titulo { padding: 8px 24px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
  .cv-titulo small { display: inline; margin: 0; }
  /* la herramienta llena la pantalla debajo del encabezado; la franja de servicios queda debajo (se llega desplazando) */
  .cv .app { height: calc(100dvh - var(--cv-top)); min-height: 560px; grid-template-columns: 340px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 38%); grid-template-areas: "side stage" "help stage"; }
  .cv .side { display: block; grid-area: side; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); }
  .cv .help { overflow-y: auto; border-right: 1px solid var(--line); }
  .cv .inputs, .cv .results { border: 0; }
  .cv .results { padding-top: 0; }
}
@media (min-width: 1200px) {
  .cv .app { grid-template-columns: 320px minmax(0, 1fr) 340px; grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "help stage side"; }
  /* consejos a la izquierda; subir, configuración y pagos a la derecha */
  .cv .help { border-top: 0; border-left: 0; border-right: 1px solid var(--line); }
  .cv .side { border-right: 0; border-left: 1px solid var(--line); }
}
@media (min-width: 1600px) { .cv .app { grid-template-columns: 340px minmax(0, 1fr) 380px; } }

/* ---------------------------------------------------------------- títulos y controles */
.cv h2 { font: 600 12px/1.3 var(--bs-body-font-family); text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 18px 0 8px; }
.cv h2:first-child { margin-top: 0; }
.cv h2.step { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 0 0 12px; }
.cv h2.step .num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.cv .stage > h2.step { margin: 14px 16px 4px; }
@media (min-width: 900px) { .cv .stage > h2.step, .cv .stage > .hint.touch { display: none; } }
.cv .tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.cv .tabs button { flex: 1 1 0; min-width: 0; padding-left: 4px; padding-right: 4px; font-size: 13px; line-height: 1.2; }
.cv button, .cv select, .cv textarea, .cv input[type=number], .cv input[type=text], .cv input[type=tel], .cv input[type=email], .cv input:not([type]) {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--ctl); border-radius: 8px; padding: 8px 10px; min-height: 44px; }
.cv textarea { width: 100%; }
@media (min-width: 900px) {
  .cv button, .cv select, .cv textarea, .cv input[type=number], .cv input[type=text], .cv input[type=tel], .cv input[type=email], .cv input:not([type]) {
    font-size: inherit; padding: 6px 10px; min-height: 0; border-radius: 6px; }
  .cv .tabs button { font-size: 12.5px; }
}
.cv button { cursor: pointer; }
.cv button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.cv button.primary:hover { filter: brightness(1.06); }
.cv button.big { min-height: 52px; font-size: 16px; border-radius: 10px; }
.cv .cv-ancho { width: 100%; }
.cv #buyStart .cv-ancho:not(#btnBuy) { margin-bottom: 8px; }
.cv .inputs button.big { margin-top: 8px; }
.cv button.on { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }
.cv button.play { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.cv button:disabled { opacity: .55; cursor: default; }
.cv button.linkbtn { align-self: flex-start; min-height: 0; background: none; border: 0; padding: 0 2px; color: var(--accent); text-decoration: underline; font-size: 14px; }
.cv label.cv-fila { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 6px 0; }
.cv label.cv-fila input[type=number] { width: 90px; }
.cv label.cv-fila select { flex: 1 1 0; width: 0; min-width: 0; }
.cv label.cv-fila input[type=text], .cv label.cv-fila input[type=tel], .cv label.cv-fila input:not([type]) { flex: 1 1 0; min-width: 0; }
.cv label.cv-fila select + input[type=number] { width: 76px; flex: none; box-sizing: border-box; }
.cv label.cv-medida { font-weight: 600; }
.cv input[type=checkbox] { flex: none; width: 22px; height: 22px; accent-color: var(--accent); }
.cv input[type=color] { flex: none; width: 50px; height: 44px; padding: 2px; border: 1px solid var(--ctl); border-radius: 8px; background: var(--bg); cursor: pointer; }
.cv input[type=file] { width: 100%; margin: 4px 0 8px; font: inherit; color: var(--ink); }
.cv input[type=file]::file-selector-button { font: inherit; min-height: 44px; padding: 8px 12px; margin-right: 10px; border: 1px solid var(--ctl);
  border-radius: 8px; background: var(--bg); color: var(--ink); cursor: pointer; }
.cv input.vh { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; overflow: hidden; clip-path: inset(50%); }
@media (min-width: 900px) {
  .cv input[type=checkbox] { width: 16px; height: 16px; }
  .cv input[type=color] { width: 44px; height: 30px; }
  .cv input[type=file]::file-selector-button { min-height: 0; padding: 5px 10px; border-radius: 6px; }
}
/* Interruptores de la vista (Vista realista, Saltos, Revés): la etiqueta dice qué es; la pista muestra si está encendido */
.cv button.cv-switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; box-shadow: none; color: var(--ink); border-color: var(--ctl); }
.cv button.cv-switch::before { content: ""; flex: none; width: 34px; height: 20px; border-radius: 10px; background: var(--ctl);
  box-shadow: inset -14px 0 0 2px var(--ctl), inset 0 0 0 9px var(--panel); transition: box-shadow .15s, background .15s; }
.cv button.cv-switch.on { color: var(--ink); border-color: var(--accent); }
.cv button.cv-switch.on::before { background: var(--accent); box-shadow: inset 14px 0 0 2px var(--accent), inset 0 0 0 9px var(--accent-ink); }
@media (prefers-reduced-motion: reduce) { .cv button.cv-switch::before { transition: none; } }
/* Zona para elegir la imagen (el input real queda oculto pero se puede enfocar con el teclado) */
.cv .drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 96px; padding: 14px;
  border: 2px dashed var(--ctl); border-radius: 12px; background: var(--bg); text-align: center; cursor: pointer; }
.cv .drop.over { border-color: var(--accent); }
.cv .drop.has { flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; min-height: 76px; border-style: solid; border-color: var(--accent); }
.cv .drop img { flex: none; width: 56px; height: 56px; object-fit: contain; border-radius: 6px; background: #fff; }
.cv .drop-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cv .drop-t { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.cv .drop-s { color: var(--muted); font-size: 12.5px; }
.cv input.vh:focus-visible + .drop { outline: 3px solid var(--focus); outline-offset: 2px; }
.cv .hint { color: var(--muted); font-size: 12.5px; margin: 4px 0; }
.cv .cv-precio { font-size: 13.5px; color: var(--ink); text-align: center; }
.cv .cv-precio:empty { display: none; }
.cv .cv-resumen { font-weight: 600; font-variant-numeric: tabular-nums; margin: -4px 0 10px; }
.cv .cv-resumen:empty { display: none; }
.cv .cv-sugerencia { border-left: 3px solid var(--cmv-rosa); padding: 4px 0 4px 10px; font-size: 13.5px; }
/* Bloques plegables (acordeones sin JavaScript) */
.cv details.fold > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; }
.cv details.fold > summary::-webkit-details-marker { display: none; }
.cv details.fold > summary::after { content: "▸"; margin-left: auto; padding-left: 8px; color: var(--muted); font-size: 16px; }
.cv details.fold[open] > summary::after { content: "▾"; }
.cv details.card { border: 1px solid var(--ctl); border-radius: 12px; padding: 0 12px; margin: 10px 0; background: var(--panel); }
.cv details.card[open] { padding-bottom: 10px; }
.cv details.more { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 8px 0; }
.cv details.more > summary { color: var(--ink); font-size: 14px; font-weight: 600; }
.cv details.more[open] { padding-bottom: 8px; }
@media (min-width: 900px) { .cv details.fold > summary { min-height: 34px; } }
.cv .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cv .checks { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.cv .checks li { padding: 4px 0; }
.cv .checks .error::before { content: "✖ "; color: var(--err); }
.cv .checks .aviso::before { content: "⚠ "; color: var(--aviso); }
.cv .checks .ok::before { content: "✔ "; color: var(--ok); }
.cv .checks .info::before { content: "✂ "; color: var(--muted); }
.cv .stat { background: var(--bg); border-radius: 6px; padding: 6px 8px; }
.cv .stat b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.cv .stat small { color: var(--muted); }
.cv .colors { list-style: none; padding: 0; margin: 0; }
.cv .colors li { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; padding: 10px 0 8px; font-variant-numeric: tabular-nums; cursor: pointer; }
@media (min-width: 900px) { .cv .colors li { padding: 4px 0; } }
.cv .colors li.cur { font-weight: 600; }
.cv .sw { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,.2); }
.cv .bar { grid-column: 2 / 4; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.cv .bar i { display: block; height: 100%; background: var(--accent); width: 0; }
.cv .files a { display: inline-flex; align-items: center; min-height: 44px; margin: 0 6px 6px 0; padding: 4px 14px; border: 1px solid var(--ctl); border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
@media (min-width: 900px) { .cv .files a { min-height: 0; padding: 4px 8px; border-radius: 6px; font-size: 13px; } }

/* ---------------------------------------------------------------- simulador (su fondo es la pantalla de la máquina o la tela) */
.cv .views { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 8px; min-height: 0; }
.cv .view { position: relative; background: var(--screen); border-radius: 10px; overflow: hidden; height: clamp(280px, 50vh, 400px); }
/* En teléfono un dedo en vertical desplaza la página (pan-y); al acercar (dos dedos o ＋) el lienzo toma el control (none) */
.cv .view canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.cv .view.zoomed canvas { touch-action: none; }
@media (min-width: 900px) {
  .cv .views.two { grid-template-columns: 1fr 1fr; }
  .cv .view { height: auto; min-height: 360px; }
}
.cv .view .tag { position: absolute; top: 8px; left: 10px; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #e6ebf0; font-size: 12px; background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 10px; }
.cv .view .tag:empty { display: none; }
.cv .view .empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; pointer-events: none; }
.cv .view .empty span { color: #fff; background: rgba(0,0,0,.62); padding: 10px 14px; border-radius: 10px; line-height: 1.5; }
.cv .zoomer { position: absolute; right: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.cv .zoomer button { width: 44px; height: 44px; min-height: 0; padding: 0; font-size: 22px; line-height: 1; color: #fff; background: rgba(0,0,0,.6);
  border: 1px solid rgba(255,255,255,.55); border-radius: 10px; }
@media (min-width: 900px) { .cv .zoomer button { width: 32px; height: 32px; font-size: 18px; border-radius: 6px; } }
.cv .stage > .hint.touch { margin: 0 16px 6px; }
.cv #muestraNote { margin: 0 16px 6px; }
.cv .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px 12px; border-top: 1px solid var(--line); background: var(--panel); }
.cv .controls > #btnPlay { flex: 1 1 auto; }
.cv .controls > button { min-width: 48px; }
.cv .controls input[type=range] { flex: 1 1 100%; order: -1; min-width: 0; accent-color: var(--accent); height: 44px; margin: 0; }
.cv .counter { flex: 1 1 100%; order: -2; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; }
.cv .counter:empty { display: none; }
.cv .simmore { flex: 1 1 100%; min-width: 0; }
.cv details.simmore > summary { color: var(--muted); font-size: 14px; }
.cv .simrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 4px; }
.cv .simrow > select { flex: 1 1 140px; min-width: 0; }
@media (min-width: 900px) {
  .cv .controls > #btnPlay { flex: 0 0 auto; }
  .cv .controls > button { min-width: 0; }
  .cv .controls input[type=range] { flex: 1 1 160px; order: 0; height: 28px; }
  .cv .counter { flex: 0 0 auto; order: 0; min-width: 260px; font-size: inherit; }
  .cv details.simmore > summary { display: none; }
  .cv .simrow > select { flex: 0 1 auto; }
}
.cv .err { color: var(--err); }
.cv #status { font-size: 14px; margin: 8px 0 0; }
.cv #status:empty { display: none; }
.cv #status.err { padding: 8px 10px; border: 1px solid var(--err); border-radius: 8px; font-weight: 600; }
.cv #status.busy::before, .cv .fab-status.busy::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid var(--ctl); border-top-color: var(--accent); border-radius: 50%; animation: cv-giro .8s linear infinite; }
@keyframes cv-giro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cv #status.busy::before, .cv .fab-status.busy::before { animation: none; } }
.cv .guide { margin: 10px 0; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: 13.5px; line-height: 1.45; }
.cv .guide[open] { padding-bottom: 8px; }
.cv .guide summary { font-weight: 600; }
.cv .guide ul { margin: 6px 0 2px; padding-left: 18px; }
.cv .guide li { margin: 4px 0; }
.cv .guide p { margin: 6px 0 0; color: var(--muted); }
.cv .fabric { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 0; }
@media (min-width: 900px) { .cv .fabric { display: inline-flex; flex: 0 1 auto; gap: 4px; } }
.cv .fabric > span { color: var(--muted); font-size: 13px; margin-right: 2px; }
.cv .fabric button.sw { flex: none; width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid var(--ctl); background-clip: content-box; }
@media (min-width: 900px) { .cv .fabric button.sw { width: 24px; height: 24px; } }
.cv .fabric button.sw.on { outline: 3px solid var(--accent); outline-offset: 1px; box-shadow: none; }
.cv .fabric button.sw.screen { background: linear-gradient(135deg, #20262e 50%, #2c343e 50%); }
.cv .fabric input[type=text] { flex: none; width: 104px; font: 14px ui-monospace, Consolas, monospace; }
.cv .fabric input[type=text].bad { border-color: var(--err); }
@media (min-width: 900px) { .cv .fabric input[type=text] { width: 92px; font-size: 13px; } .cv .fabric input[type=color] { width: 36px; } }
.cv .viewlist { list-style: none; margin: 8px 0 0; padding: 0; }
.cv .viewlist li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--ctl); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.cv .viewlist li.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cv .viewlist small { color: var(--muted); white-space: nowrap; }
.cv .viewlist small.warn { white-space: normal; overflow-wrap: anywhere; min-width: 0; }   /* «comprobante rechazado: motivo» es largo */
.cv .viewlist a { color: var(--accent); padding: 8px 4px; }
.cv .viewlist .vname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv .viewlist .vact { display: flex; gap: 4px; }
.cv .viewlist .vact button { min-width: 44px; padding: 2px 8px; line-height: 1.4; }
@media (min-width: 900px) { .cv .viewlist .vact button { min-width: 0; } }
.cv .ai ol { margin: 6px 0; padding-left: 20px; }
.cv .ai li { margin: 4px 0; }
.cv .ai textarea { font: 12px/1.4 ui-monospace, Consolas, monospace; padding: 8px; resize: vertical; }
.cv .ai a { color: var(--accent); }
.cv .ai label.cv-fila { justify-content: flex-start; }
.cv .aicheck { margin: 4px 0; padding-left: 20px; }
.cv .chk { display: flex; gap: 8px; align-items: center; min-height: 44px; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
@media (min-width: 900px) { .cv .chk { min-height: 0; } }
.cv .help a, .cv .inputs a, .cv .results a:not(.dl):not([download]) { color: var(--accent); }
.cv .machine select { flex: 1 1 0; width: 0; min-width: 0; }
.cv a.primary.dl { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: 10px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 16px; text-decoration: none; margin-bottom: 8px; }
.cv .sheet-btn { width: 100%; margin: 4px 0; }
.cv #payLink { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- compra, membresías y factura */
.cv .price { font-size: 16px; margin: 4px 0 10px; }
.cv ol.pay { padding-left: 20px; margin: 6px 0; } .cv ol.pay li { margin: 8px 0; }
.cv ol.pay input[type=file] { margin: 6px 0; }
.cv .code { font-family: ui-monospace, Consolas, monospace; font-size: 16px; background: var(--bg); padding: 1px 6px; border-radius: 4px; }
.cv .warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: 6px; padding: 8px 10px; font-size: 13.5px; }
.cv .warn:empty { display: none; }
.cv .memline { margin: 0 0 10px; font-size: 14px; }
.cv .memline button.linkbtn { font-size: 14px; font-weight: 600; }
.cv .mem-status { border: 1px solid var(--accent); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
.cv .mem-status p { margin: 0 0 6px; }
.cv .mem-status .warn { margin: 6px 0 8px; }
.cv .mem-status button { width: 100%; }
.cv #facLink { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; }
.cv #feBox label { display: block; margin: 8px 0; font-size: 14px; }
.cv #feBox input, .cv #feBox select { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; }
.cv .plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 10px 0 14px; }
.cv button.plan { display: flex; flex-direction: column; gap: 3px; width: 100%; min-width: 0; padding: 12px; text-align: left; border-radius: 12px;
  font-size: 14px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.cv button.plan.on { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.cv .plan .pname { font-weight: 700; font-size: 17px; }
.cv .plan .badge { margin-left: 6px; padding: 2px 8px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; vertical-align: 2px; }
.cv .plan .pprice { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cv .plan .pprice small, .cv .plan .cmp { font-size: 13px; font-weight: 400; color: var(--muted); }
.cv .plan .save, .cv .periods small { color: var(--ok); font-weight: 600; }
.cv .periods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cv .periods button { min-width: 0; padding: 6px 8px; line-height: 1.25; white-space: normal; }
.cv .periods small { display: block; font-size: 12.5px; }
.cv .total { margin: 14px 0 6px; font-size: 16px; }
.cv .total small { display: block; color: var(--muted); font-size: 13px; }
.cv #planesBenefits { margin: 8px 0 12px; padding-left: 20px; font-size: 14px; }
.cv #planesBenefits li { margin: 4px 0; }
.cv .cv-periodo-t { margin-bottom: 8px; }

/* diálogos del conversor (consejos, planes, confirmar, mis pedidos): hoja inferior en teléfono (§7) */
.cv dialog.cv-dlg { border: 1px solid var(--line); border-radius: 14px 14px 0 0; padding: 18px; width: 100%; max-width: none; max-height: 92dvh;
  margin: auto auto 0; background: var(--panel); color: var(--ink); }
.cv dialog.cv-dlg::backdrop { background: rgba(0,0,0,.5); }
.cv dialog.cv-dlg h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; font-family: inherit; }
.cv dialog.cv-dlg p { margin: 0 0 12px; line-height: 1.45; }
.cv .dlg-actions { display: flex; flex-wrap: wrap-reverse; gap: 8px; justify-content: flex-end; }
.cv .dlg-actions button { flex: 1 1 140px; }
@media (min-width: 640px) { .cv dialog.cv-dlg { width: min(460px, calc(100vw - 32px)); margin: auto; border-radius: 12px; } }
@media (min-width: 760px) {
  .cv #planesDlg { width: min(880px, calc(100vw - 32px)); }
  .cv .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cv .periods { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cv .mem-status button { width: auto; }
}
@media (min-width: 900px) { .cv .dlg-actions button { flex: 0 0 auto; } }

/* hoja de trabajo (siempre en papel blanco, también en modo oscuro) */
#sheetWrap { position: fixed; inset: 0; z-index: 1050; background: rgba(0,0,0,.55); overflow: auto; padding: 16px; }
.sheet-bar { position: sticky; top: 0; z-index: 1; display: flex; gap: 8px; justify-content: center; width: fit-content; margin: 0 auto 12px; padding: 8px; border-radius: 10px; background: rgba(20,20,20,.75); }
.sheet { background: #fff; color: #111; max-width: 800px; margin: 0 auto; padding: 28px 32px; border-radius: 6px; font: 13px/1.45 system-ui, "Segoe UI", sans-serif; }
.sheet h1 { font-size: 20px; margin: 0 0 2px; font-family: inherit; }
.sheet .sub { color: #555; margin: 0 0 14px; }
.sheet .top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.sheet .thumb { width: 100%; max-width: 320px; aspect-ratio: 1; border: 1px solid #ccc; border-radius: 4px; }
.sheet table { border-collapse: collapse; width: 100%; }
.sheet th, .sheet td { border: 1px solid #bbb; padding: 4px 6px; text-align: left; vertical-align: middle; }
.sheet th { background: #f0f0f0; font-weight: 600; }
.sheet .kv td:first-child { color: #555; width: 42%; }
.sheet .swatch { display: inline-block; width: 16px; height: 16px; border: 1px solid #999; vertical-align: middle; margin-right: 6px; }
.sheet .blank { min-width: 120px; }
.sheet h2 { color: #111; font: 600 14px/1.3 system-ui, sans-serif; letter-spacing: 0; text-transform: none; margin: 18px 0 6px; }
.sheet ul.chk { display: block; list-style: none; padding: 0; margin: 0; columns: 2; min-height: 0; color: #111; }
.sheet ul.chk li::before { content: "☐ "; }
.sheet .warn li { color: #8a4b00; }
.sheet .notes { border: 1px solid #bbb; height: 70px; }
.sheet .foot { color: #666; font-size: 11px; margin-top: 14px; }
@media (min-width: 640px) { .sheet .top { grid-template-columns: 320px minmax(0, 1fr); } }
@media (max-width: 640px) { .sheet { padding: 18px; overflow-x: auto; } .sheet ul.chk { columns: 1; } .sheet .blank { min-width: 70px; } }
@media print {
  body { display: block; height: auto; overflow: visible; padding: 0; background: #fff !important; }
  body > *:not(.cv-extra) { display: none !important; }
  .cv-extra > *:not(#sheetWrap) { display: none !important; }
  #sheetWrap { position: static; background: none; padding: 0; overflow: visible; }
  .sheet-bar { display: none; }
  .sheet { max-width: none; padding: 0; border-radius: 0; }
  .sheet .top { grid-template-columns: 300px minmax(0, 1fr); }
  @page { margin: 14mm; }
}

/* Barra fija de abajo (solo teléfono): la acción que sigue, siempre al alcance del pulgar */
.cv .fab { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.14); }
.cv .fab button { width: 100%; }
.cv .fab-status { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); }
.cv .fab-status.err { color: var(--err); font-weight: 600; }
@media (min-width: 900px) { .cv .fab { display: none; } }

/* ---------------------------------------------------------------- franja de servicios (debajo del simulador) */
.cv-franja { padding: 20px 16px 8px; }
.cv-franja > h2 { font: 600 1.5rem/1.2 "Cormorant Garamond", Georgia, serif; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 0 0 12px; }
.cv-franja-rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cv-servicio { display: flex; flex-direction: column; gap: 4px; min-width: 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; }
.cv-servicio-tienda { grid-column: 1 / -1; }
.cv-servicio h3 { font: 700 1rem/1.3 var(--bs-body-font-family); margin: 0; }
.cv-servicio h3 a { color: var(--ink); text-decoration: none; }
.cv-servicio h3 a:hover { color: var(--accent); }
.cv-servicio h3 small { display: block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cv-servicio p { margin: 0; font-size: .875rem; color: var(--muted); }
.cv-ir { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: .9rem; color: var(--accent); min-height: 32px; display: inline-flex; align-items: center; }
.cv-productos { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cv-producto { display: flex; flex-direction: column; gap: 2px; color: var(--ink); text-decoration: none; font-size: .85rem; min-width: 0; }
.cv-producto-img { aspect-ratio: 4 / 3; background: var(--pub-suave); border-radius: 8px; overflow: hidden; display: grid; place-items: center; font-size: 1.6rem; }
.cv-producto-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cv-producto-n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-producto-p { color: var(--muted); }
.cv-producto:hover .cv-producto-n { color: var(--accent); }
@media (min-width: 640px) { .cv-franja-rejilla { gap: 16px; } .cv-productos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 768px) { .cv-franja { padding: 24px 32px 8px; } .cv-franja-rejilla { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) {
  .cv-franja-rejilla { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cv-servicio-tienda { grid-column: span 2; }
  .cv-servicio-tienda .cv-productos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* bloque indexable de la portada (web/sitio/_portada.html), plegado */
.cv-seo-caja { padding: 4px 16px 12px; }
@media (min-width: 768px) { .cv-seo-caja { padding: 4px 32px 16px; } }
.cmv-seo > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.cmv-cuerpo { max-width: 760px; font-size: 15px; line-height: 1.55; padding-bottom: 8px; }
.cmv-cuerpo h2 { font-size: 1.35rem; margin: 14px 0 6px; }
.cmv-cuerpo h3 { font-size: 15px; font-weight: 700; margin: 12px 0 2px; }
.cmv-cuerpo p, .cmv-cuerpo ol, .cmv-cuerpo ul { margin: 0 0 8px; }
.cmv-cuerpo li a { display: inline-block; padding: 6px 0; }

/* ---------------------------------------------------------------- «A vector» (js/vector.js): la vista previa es una imagen
   (muestra con marca, o la vista limpia tras pagar) sobre un cuadriculado claro que deja ver lo transparente; los controles del
   simulador de bordado no aplican y se esconden */
.cv .view .vec-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; box-sizing: border-box;
  background-color: #fff; background-image: linear-gradient(45deg, #e8e8e8 25%, transparent 25%), linear-gradient(-45deg, #e8e8e8 25%, transparent 25%),
  linear-gradient(45deg, transparent 75%, #e8e8e8 75%), linear-gradient(-45deg, transparent 75%, #e8e8e8 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.cv .view.has-vec .empty, .cv .view.has-vec .zoomer, .cv .view.has-vec .tag { display: none; }
.cv .stage.cv-vec .controls, .cv .stage.cv-vec > .hint.touch { display: none; }
.cv #vecNote { margin: 0 16px 6px; }
.cv #vecSize2 { max-width: 100%; }
.cv .vec-colores li { cursor: default; grid-template-columns: 18px 1fr auto; }
.cv .vec-formatos { padding-left: 18px; margin: 4px 0 8px; }
.cv .vec-formatos li { margin-bottom: 4px; }
.cv .cv-modo-vec .machine, .cv .cv-modo-vec #machineHint { display: none; }
