/* Juanva · Módulos: identidad, recursos, composición, fondos animados y documentos. */

/* ════════ juanva (antes juanva.css) ════════ */
/* Juanva · v005
   Identidad visual y presentación. Cargar después de workspace.css e iconos.css.
   No modifica el tamaño del lienzo, los controles ni los píxeles del documento. */

:root {
  --juanva-petrol: #19545a;
  --juanva-gold: #e1b240;
  --juanva-blue: #01a0e2;
  --juanva-green: #009746;
  --juanva-orange: #de5936;
  --juanva-paper: #f1f2f6;
  --juanva-accent-text: #19545a;
  --juanva-accent-soft: #e9f2f2;
  --juanva-accent-border: #b8d0d2;
  --zb: #19545a;
  --zb-dark: #113e43;
  --zb-light: #2d7178;
  --zb-pale: #e9f2f2;
  --zb-paler: #f3f7f7;
  --bg: #f6f7f9;
  --w: #ffffff;
  --bd: #dce2e5;
  --bd-soft: #eaf0f1;
  --text: #243338;
  --text-soft: #516168;
  --text-mute: #637178;
  --studio-primary: #19545a;
  --studio-primary-text: #ffffff;
  --studio-stage: #eeeeee;
  --studio-focus: #19545a;
  --shadow: 0 1px 3px rgb(20 35 39 / 4%);
  --shadow-md: 0 5px 22px rgb(20 35 39 / 8%);
  --shadow-lg: 0 20px 65px rgb(20 35 39 / 18%);
}

html[data-theme="dark"] {
  --juanva-accent-text: #a5d8dc;
  --juanva-accent-soft: #223c41;
  --juanva-accent-border: #42646a;
  --zb: #2a737c;
  --zb-dark: #215e66;
  --zb-light: #398995;
  --zb-pale: #223c41;
  --zb-paler: #203035;
  --bg: #151a1e;
  --w: #1d2429;
  --bd: #37444b;
  --bd-soft: #2c363d;
  --text: #eef3f4;
  --text-soft: #c9d4d8;
  --text-mute: #a2b2ba;
  --studio-primary: #2a737c;
  --studio-primary-text: #ffffff;
  --studio-stage: #151515;
  --studio-focus: #a5d8dc;
  --shadow: 0 1px 3px rgb(0 0 0 / 14%);
  --shadow-md: 0 6px 24px rgb(0 0 0 / 24%);
  --shadow-lg: 0 20px 65px rgb(0 0 0 / 38%);
}

body.workspace-v2 {
  --ws-rail-bg: #f6f8f8;
  --ws-stage-bg: #eeeeee;
  --ws-control-bg: #f4f6f7;
  --ws-active-bg: var(--juanva-accent-soft);
  --ws-active-line: var(--juanva-petrol);
  --ws-shadow: 0 1px 3px rgb(25 84 90 / 5%);
}

html[data-theme="dark"] body.workspace-v2 {
  --ws-rail-bg: #1a2227;
  --ws-stage-bg: #151515;
  --ws-control-bg: #263138;
  --ws-active-bg: var(--juanva-accent-soft);
  --ws-active-line: var(--juanva-accent-text);
  --ws-shadow: 0 1px 3px rgb(0 0 0 / 20%);
}

/* La marca ocupa el espacio de la cabecera existente, sin quitar altura al editor. */
body.workspace-v2 .studio-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(to right,
    var(--juanva-blue) 0 25%, var(--juanva-gold) 25% 50%,
    var(--juanva-green) 50% 75%, var(--juanva-orange) 75% 100%);
}

body.workspace-v2 #studio-inicio {
  gap: 9px;
  color: var(--juanva-accent-text);
}

body.workspace-v2 #studio-inicio .juanva-header-symbol {
  display: block;
  flex: none;
  width: 33px;
  height: 33px;
  max-width: none;
  max-height: none;
  object-fit: contain;
  border-radius: 0;
}

body.workspace-v2 #studio-inicio .juanva-header-wordmark {
  display: block;
  flex: none;
  width: 112px;
  line-height: 0;
}

body.workspace-v2 #studio-inicio .juanva-header-wordmark img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 36px;
  object-fit: contain;
  border-radius: 0;
}

:root:not([data-theme="dark"]) .juanva-logo-dark,
html[data-theme="dark"] .juanva-logo-light { display: none !important; }

:root:not([data-theme="dark"]) .juanva-logo-light,
html[data-theme="dark"] .juanva-logo-dark { display: block; }

/* El petróleo orienta la selección; las miniaturas y muestras conservan sus colores. */
body.workspace-v2 .ws-rail-button.is-active,
body.workspace-v2 .ws-subtools button.is-active,
body.workspace-v2 .ws-anim-tabs button.is-active {
  color: var(--juanva-accent-text);
  background: var(--juanva-accent-soft);
  border-color: var(--juanva-accent-border);
}

body.workspace-v2 .ws-rail-button:hover,
body.workspace-v2 :is(.ws-search-results, .ws-more-panel) > button:hover {
  color: var(--juanva-accent-text);
}

/* Inicio: tareas a la izquierda, logo completo como firma de la aplicación. */
body.workspace-v2.workspace-home { background: var(--bg); }
body.workspace-v2.workspace-home #studio-home {
  padding-top: clamp(40px, 6vh, 66px);
  padding-bottom: 36px;
}

.juanva-home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: center;
  gap: clamp(30px, 5vw, 72px);
}

.juanva-home-copy { min-width: 0; }
body.workspace-v2.workspace-home .juanva-home-copy .studio-kicker {
  color: var(--juanva-accent-text);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 1.8px;
  margin-bottom: 17px;
}
body.workspace-v2.workspace-home #studio-home h1 {
  max-width: 650px;
  font-size: clamp(36px, 4.5vw, 57px);
  line-height: 1.08;
  letter-spacing: -2.1px;
  color: var(--text);
  margin-bottom: 19px;
}
.juanva-home-copy .studio-lead,
.juanva-home-copy > p {
  max-width: 570px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
}
.juanva-home-identity {
  width: 100%;
  max-width: 230px;
  min-width: 0;
  justify-self: end;
}
.juanva-home-identity img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 0;
}

body.workspace-v2.workspace-home .studio-starts { margin-top: 31px; }
body.workspace-v2.workspace-home .studio-starts > button {
  border-color: var(--bd);
  box-shadow: var(--shadow);
}
body.workspace-v2.workspace-home .studio-starts > button:hover {
  border-color: var(--juanva-accent-border);
  box-shadow: var(--shadow-md);
}
body.workspace-v2.workspace-home #studio-open-image {
  background: var(--studio-primary);
  border-color: var(--studio-primary);
  color: var(--studio-primary-text);
}
body.workspace-v2.workspace-home #studio-open-image small { opacity: .95; }
body.workspace-v2.workspace-home #studio-open-project > span:first-child {
  color: var(--juanva-accent-text);
}
body.workspace-v2.workspace-home #studio-new > span:first-child {
  color: var(--juanva-accent-text);
}
body.workspace-v2.workspace-home .studio-feature-grid {
  margin-top: 30px;
  padding-top: 22px;
}
body.workspace-v2.workspace-home .studio-feature-grid > button:hover {
  background: var(--juanva-accent-soft);
}
body.workspace-v2.workspace-home .studio-feature-grid svg { color: var(--juanva-accent-text); }
body.workspace-v2.workspace-home .studio-home-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 20px;
  margin-top: 21px;
  border-top: 1px solid var(--bd-soft);
}
.juanva-domain {
  color: var(--text-mute);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: .15px;
}

@media (max-width: 850px) {
  .juanva-home-intro { grid-template-columns: minmax(0, 1fr) 180px; gap: 25px; }
  .juanva-home-identity { max-width: 180px; }
}

@media (max-width: 640px) {
  body.workspace-v2.workspace-home #studio-home { padding-top: 30px; }
  .juanva-home-intro { grid-template-columns: minmax(0, 1fr); gap: 25px; }
  .juanva-home-identity { grid-row: 1; width: 145px; max-width: 145px; justify-self: start; }
  body.workspace-v2.workspace-home .juanva-home-copy .studio-kicker { margin-bottom: 12px; font-size: 10px; }
  body.workspace-v2.workspace-home #studio-home h1 { font-size: clamp(35px, 7.8vw, 45px); letter-spacing: -1.5px; }
  .juanva-home-copy .studio-lead, .juanva-home-copy > p { font-size: 14.5px; line-height: 1.6; }
  body.workspace-v2.workspace-home .studio-starts { margin-top: 27px; }
}

@media (max-width: 479px) {
  body.workspace-v2 #studio-inicio { gap: 7px; }
  body.workspace-v2 #studio-inicio .juanva-header-symbol { width: 28px; height: 28px; }
  body.workspace-v2 #studio-inicio .juanva-header-wordmark { width: 88px; }
  body.workspace-v2 #studio-inicio .juanva-header-wordmark img { max-height: 29px; }
  body.workspace-v2.workspace-home .studio-home-foot { align-items: flex-start; flex-direction: column; }
}

/* En ventanas de 320 px, la barra de desplazamiento puede reducir el ancho útil. */
@media (max-width: 350px) {
  html, body { min-width: 0; }
  body.workspace-v2 #studio-inicio { gap: 6px; }
  body.workspace-v2 #studio-inicio .juanva-header-wordmark { width: 80px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  body.workspace-v2 #studio-inicio .juanva-header-symbol { width: 28px; height: 28px; }
  body.workspace-v2 #studio-inicio .juanva-header-wordmark { width: 88px; }
  body.workspace-v2 #studio-inicio .juanva-header-wordmark img { max-height: 29px; }
  body.workspace-v2.workspace-home #studio-home { padding-top: 28px; }
  .juanva-home-identity { max-width: 155px; }
}

/* ════════ juanva_recursos (antes juanva_recursos.css) ════════ */
/* Juanva v006 · controles de tipografía y recursos */
.jv-text-start,.jv-resource-section,.jv-palette-section,.jv-template-section{display:flex;flex-direction:column;gap:12px;padding:14px 0;border-bottom:1px solid var(--bd);margin:0 0 14px;font-size:13px;min-width:0}.jv-text-start{padding-top:0}.jv-resource-section h3,.jv-template-section h3{font-size:14px;line-height:1.4;font-weight:700;margin:0!important}.jv-resource-section>h3{display:flex;align-items:center;justify-content:space-between}.jv-resource-section h3 span{font-size:11px;color:var(--text-mute)}.jv-actions,.jv-style-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.jv-actions>.zb-btn{flex:1}.jv-actions button{min-width:0}.jv-field{display:flex;flex-direction:column;gap:5px;font-weight:600;margin:8px 0;font-size:12px}.jv-field input:not([type=file]),.jv-field select,.jv-field textarea,.jv-font-filters input,.jv-font-filters select{width:100%;box-sizing:border-box;font:inherit;background:var(--w,#fff);color:var(--text,#1f2937);border:1px solid var(--bd,#ddd);border-radius:7px;padding:9px;min-width:0}.jv-field input[type=file]{max-width:100%;font:inherit;font-size:12px}.jv-field textarea{resize:vertical}.jv-inline{display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:600;margin:8px 0}.jv-inline input[type=color],.jv-actions input[type=color]{width:42px;height:34px;padding:2px;border:1px solid var(--bd);border-radius:6px;background:var(--w)}.jv-note{font-size:12px;line-height:1.5;color:var(--text-mute);margin:3px 0}.jv-text-start details>summary,.jv-palette-section>summary{font-size:13px;font-weight:700;cursor:pointer;padding:7px 0}.jv-palette-section{display:block}.jv-palette-section[open]>summary{margin-bottom:9px}.jv-pairing-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:9px 0}.jv-pairing-grid button{display:flex;flex-direction:column;gap:5px;border:1px solid var(--bd);background:var(--w);color:var(--text);border-radius:8px;padding:13px 8px;text-align:left;cursor:pointer;min-width:0}.jv-pairing-grid b{font-size:19px;font-weight:600;line-height:1.2}.jv-pairing-grid span{font-size:9px;color:var(--text-mute);line-height:1.4}.jv-style-actions{margin:8px 0}.jv-style-actions button,.jv-colors-button{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--bd);background:var(--w);color:var(--text);border-radius:6px;padding:7px;font-family:inherit;font-size:11px;line-height:1.2;font-weight:500;cursor:pointer}.jv-style-actions svg,.jv-colors-button svg{width:14px;height:14px;flex-shrink:0}.jv-style-actions button:disabled{opacity:.4;cursor:default}.jv-colors-button{padding:5px;vertical-align:middle}.jv-resource-grid,.jv-template-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.jv-resource-grid>.jv-note,.jv-template-grid>.jv-note{grid-column:1/-1}.jv-resource-card,.jv-template-card{border:1px solid var(--bd);border-radius:8px;overflow:hidden;min-width:0;background:var(--w)}.jv-resource-card>button,.jv-template-card>button{width:100%;padding:0;border:0;background:transparent;color:var(--text);cursor:pointer;text-align:left;display:block}.jv-resource-card img,.jv-template-card img{display:block;width:100%;height:92px;object-fit:contain;background:repeating-conic-gradient(#f1f1f1 0% 25%,#fff 0% 50%) 50%/12px 12px}.jv-resource-card>button>span,.jv-template-card>button>b{display:block;font-size:11px;padding:7px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jv-resource-card>div,.jv-template-card>div{display:flex;border-top:1px solid var(--bd)}.jv-resource-card>div>button,.jv-template-card>div>button{flex:1;background:transparent;border:0;font-family:inherit;font-size:10px;line-height:1.2;font-weight:500;padding:7px 4px;color:var(--text-mute);cursor:pointer}.jv-resource-card>div>button:last-child,.jv-template-card>div>button:last-child{flex:0 0 28px;border-left:1px solid var(--bd)}.jv-resource-card>div svg,.jv-template-card>div svg{width:12px;height:12px}.jv-resource-section.is-dragover{outline:2px dashed var(--zb,#19545a);outline-offset:5px}.jv-palette-colors{display:flex;flex-wrap:wrap;gap:9px;padding:7px 0}.jv-swatch-wrap{position:relative;display:inline-flex;padding:3px 3px 7px 0}.jv-swatch{width:29px;height:29px;border-radius:50%;background:var(--swatch);border:1px solid #8888;cursor:pointer;box-shadow:inset 0 0 0 2px #ffffff40;flex-shrink:0}.jv-swatch:focus-visible{outline:2px solid var(--zb);outline-offset:3px}.jv-swatch-remove{position:absolute;right:-3px;bottom:0;width:16px;height:16px;border-radius:50%;border:1px solid var(--bd);background:var(--w);color:var(--text);font:12px/1 sans-serif;padding:0;cursor:pointer}.jv-dialog-backdrop{position:fixed;inset:0;z-index:20000;background:#071b2480;display:flex;align-items:center;justify-content:center;padding:18px;box-sizing:border-box;backdrop-filter:blur(3px)}.jv-dialog{display:flex;flex-direction:column;width:min(680px,100%);max-height:calc(100dvh - 36px);background:var(--w,#fff);color:var(--text,#17272c);border:1px solid var(--bd,#ddd);border-radius:14px;box-shadow:0 20px 70px #0005;min-width:0}.jv-dialog>header{display:flex;align-items:center;gap:16px;justify-content:space-between;padding:17px 20px;border-bottom:1px solid var(--bd);flex-shrink:0}.jv-dialog h2{font-size:18px;margin:0;line-height:1.35}.jv-dialog>header>button{border:0;background:transparent;color:inherit;padding:7px;cursor:pointer}.jv-dialog>header svg{width:18px;height:18px}.jv-dialog-content{padding:17px 20px;overflow:auto;overscroll-behavior:contain;min-height:0}.jv-font-filters{display:grid;grid-template-columns:1.2fr 1fr;gap:12px}.jv-font-filters label{font-size:12px;font-weight:600;display:flex;flex-direction:column;gap:5px}.jv-font-list{margin:16px 0;display:flex;flex-direction:column;gap:8px;max-height:44vh;overflow:auto}.jv-font-row{display:flex;border:1px solid var(--bd,#ddd);border-radius:8px;overflow:hidden;flex-shrink:0}.jv-font-use{flex:1;min-width:0;border:0;background:transparent;color:inherit;text-align:left;padding:10px 13px;cursor:pointer}.jv-font-use small{display:block;color:var(--text-mute);font:11px/1.2 system-ui,sans-serif;margin-bottom:8px}.jv-font-use span{display:block;font-size:25px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jv-font-favorite{width:45px;border:0;border-left:1px solid var(--bd);background:transparent;color:var(--text-mute);cursor:pointer;flex-shrink:0}.jv-font-favorite svg{width:18px;height:18px}.jv-font-favorite[aria-pressed=true]{color:#ac7810;background:#e1b24018}.jv-font-favorite[aria-pressed=true] svg{fill:#e1b240}.jv-palette-modal{margin-bottom:18px;display:flex;gap:9px;flex-wrap:wrap}.jv-palette-modal h3{flex-basis:100%;font-size:13px;margin:0 0 3px}.jv-template-preview{display:block;max-width:220px;max-height:210px;object-fit:contain;margin:15px auto;border:1px solid var(--bd);border-radius:6px}.jv-resource-card button:hover,.jv-template-card button:hover,.jv-pairing-grid button:hover,.jv-font-use:hover{background:var(--bg-soft,#19545a0d)}.jv-dialog button:focus-visible,.jv-resource-section button:focus-visible,.jv-text-start button:focus-visible{outline:2px solid var(--zb,#19545a);outline-offset:2px}@media(max-width:560px){.jv-dialog-backdrop{padding:8px}.jv-dialog{max-height:calc(100dvh - 16px)}.jv-dialog>header,.jv-dialog-content{padding:14px}.jv-font-filters{grid-template-columns:1fr}.jv-font-list{max-height:39vh}.jv-font-use span{font-size:23px}}

.jv-dialog h2{min-width:0;overflow-wrap:anywhere;flex:1}.jv-dialog>header>button{flex:none}.jv-swatch-wrap{position:static;align-items:center;gap:3px;padding:3px}.jv-swatch-remove{position:static;flex:none;width:24px;height:24px;font-size:18px}

/* ════════ juanva_composicion (antes juanva_composicion.css) ════════ */
/* Juanva v006 · selección, composición y diálogos de imagen */
.jv-icon{width:23px;height:23px;display:inline-block;vertical-align:middle}.jv-note{font-size:12px;line-height:1.5;color:var(--text-mute,#657174);margin:8px 0}.jv-section{border:1px solid var(--bd,#dce1e1);border-radius:9px;margin:12px 0;background:var(--w,#fff)}.jv-section>summary{padding:10px 11px;font-weight:650;cursor:pointer;font-size:13px;list-style-position:inside}.jv-section-body{padding:0 11px 12px;display:grid;gap:10px}.jv-section-body label,.jv-select-settings label,.jv-mask-controls label,.jv-corners label{display:flex;flex-direction:column;gap:5px;font-size:12px}.jv-section input[type=number],.jv-section select,.jv-mask-controls select{width:100%;min-width:0;font:inherit;color:var(--text,#202728);background:var(--w,#fff);border:1px solid var(--bd,#ccd5d5);border-radius:6px;padding:7px;box-sizing:border-box}.jv-section input[type=range],.jv-select-settings input[type=range],.jv-mask-controls input[type=range]{width:100%;min-width:0;accent-color:var(--zb,#19545a)}.jv-pair{display:grid;grid-template-columns:1fr 1fr;gap:9px;align-items:end}.jv-buttons{display:flex;flex-wrap:wrap;gap:7px}.jv-buttons>button{flex:1;white-space:normal!important;min-width:86px;line-height:1.3}.jv-select-settings{display:grid;gap:8px}.jv-select-settings [hidden]{display:none!important}#sel-modo{display:flex;flex-wrap:wrap;gap:3px}#sel-modo button{font-size:11px!important;padding:7px 9px!important}.jv-composition{display:grid;gap:8px;border-bottom:1px solid var(--bd,#ccd5d5);padding-bottom:14px;margin-bottom:14px}.jv-composition>.jv-note{margin:0}.jv-composition>.jv-section{margin:0}.jv-composition>.zb-btn{text-align:left;white-space:normal}.jv-multi-check{width:15px;height:15px;flex:0 0 15px;accent-color:var(--zb,#19545a);margin:0 4px 0 0!important;cursor:pointer}.edi-capas>li.jv-multi-selected{box-shadow:inset 3px 0 0 var(--zb,#19545a)}.jv-group-mark{font-size:9px;letter-spacing:.02em;font-weight:500;border:1px solid var(--bd,#ccd5d5);border-radius:3px;padding:1px 3px;margin-left:4px;color:var(--text-mute,#657174)}
.jv-edit-dialog{box-sizing:border-box;width:min(1020px,calc(100vw - 26px));max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--bd,#ccd5d5);border-radius:14px;background:var(--w,#fff);color:var(--text,#202728);font:14px/1.4 system-ui,sans-serif;box-shadow:0 24px 90px #0005;overflow:auto}.jv-edit-dialog::backdrop{background:#0c1c22aa;backdrop-filter:blur(2px)}.jv-edit-dialog>header{position:sticky;top:0;z-index:2;background:var(--w,#fff);border-bottom:1px solid var(--bd,#ccd5d5);padding:15px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px}.jv-edit-dialog h2{font-size:19px;font-weight:650;margin:0}.jv-dialog-close{border:0;color:inherit;background:transparent;font-size:26px;width:34px;height:34px;cursor:pointer}.jv-dialog-body{padding:16px 20px}.jv-edit-dialog>footer{position:sticky;bottom:0;background:var(--w,#fff);border-top:1px solid var(--bd,#ccd5d5);padding:12px 20px;display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap}.jv-edit-dialog .zb-btn{font:inherit}.jv-mask-controls{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:14px;align-items:center;margin:10px 0}.jv-mask-controls .jv-inline{display:flex;flex-direction:row;align-items:center}.jv-canvas-wrap{background-color:#f1f1f1;background-image:conic-gradient(#d8dddd 25%,transparent 0 50%,#d8dddd 0 75%,transparent 0);background-size:18px 18px;border:1px solid #c8cfcf;border-radius:6px;margin:12px 0;overflow:hidden;display:flex;justify-content:center;align-items:center;min-height:90px}.jv-canvas-wrap canvas{display:block;max-width:100%;max-height:55dvh;width:auto;height:auto;object-fit:contain;touch-action:none;cursor:crosshair}.jv-perspective-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:18px;align-items:start}.jv-perspective-layout canvas{max-height:48dvh}.jv-corners{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:12px}.jv-edit-dialog [data-pers=mensaje]{min-height:1.4em}.jv-edit-dialog button:disabled{opacity:.45;cursor:default}@media(max-width:640px){.jv-edit-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);border-radius:10px}.jv-dialog-body{padding:12px}.jv-edit-dialog>header,.jv-edit-dialog>footer{padding:11px 12px}.jv-mask-controls{grid-template-columns:1fr 1fr;gap:10px}.jv-perspective-layout{grid-template-columns:1fr}.jv-perspective-layout>div:last-child .jv-canvas-wrap canvas{max-height:20dvh}.jv-corners{grid-template-columns:1fr}.jv-edit-dialog footer .zb-btn{flex:1;white-space:normal;text-align:center}.jv-canvas-wrap canvas{max-height:44dvh}}

.jv-edit-dialog h2{min-width:0;overflow-wrap:anywhere;flex:1}.jv-dialog-close{flex:none}

/* El cursor es una superposición: sus dos trazos se ven sobre tonos claros y oscuros. */
.jv-selection-cursor{position:absolute;inset:0;display:block;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:1;forced-color-adjust:none}
.jv-selection-cursor[hidden]{display:none!important}
.jv-selection-cursor circle{fill:none;vector-effect:non-scaling-stroke}
.jv-selection-cursor-exterior{stroke:#111;stroke-width:3px}
.jv-selection-cursor-interior{stroke:#fff;stroke-width:1px}
canvas.jv-selection-brush-cursor{cursor:none!important}

/* ════════ juanva_fondos_animacion (antes juanva_fondos_animacion.css) ════════ */
/* Juanva v006 · fondos guiados y línea de tiempo. */
.jv-fondo-intro{display:grid;gap:9px;margin-bottom:15px}.jv-fondo-status{padding:11px 12px;border:1px solid var(--bd,#d8dce3);border-left:3px solid var(--zb,#19545a);border-radius:8px;font-size:12px;line-height:1.5;background:var(--w,#fff)}.jv-fondo-status strong{display:block;font-size:13px;margin-bottom:3px}.jv-fondo-status[data-opaque=true]{border-left-color:#bb8621}.jv-fondo-actions{display:flex;gap:7px;flex-wrap:wrap}.jv-fondo-actions button{flex:1;min-height:36px}.jv-fondo-preview{margin:14px 0 9px;padding:0;display:grid;gap:6px}.jv-fondo-preview figcaption{font-size:12px;font-weight:650}.jv-fondo-preview canvas{width:100%;max-height:170px;object-fit:contain;border:1px solid var(--bd,#d8dce3);border-radius:8px;background-color:#fff;background-image:conic-gradient(#e2e6e7 25%,transparent 0 50%,#e2e6e7 0 75%,transparent 0);background-size:14px 14px}.jv-fondo-note{font-size:12px;line-height:1.45;color:var(--text-mute,#617175)}.jv-fondo-toggle{display:flex;gap:8px;align-items:flex-start;font-size:12px;line-height:1.45;margin:10px 0}.jv-fondo-toggle input{margin-top:3px;accent-color:var(--zb,#19545a)}.jv-fondo-result{min-height:1.3em;font-size:12px;line-height:1.45}.jv-fondo-return{margin:12px 0;width:100%}
.jv-timeline{flex:0 0 auto;border-top:1px solid var(--bd,#d8dce3);background:var(--w,#fff);padding:8px 12px;min-width:0;color:var(--text,#213438)}.jv-timeline[hidden]{display:none!important}.jv-tl-head{display:flex;align-items:center;gap:8px;min-height:30px}.jv-tl-head strong{font-size:12px;white-space:nowrap}.jv-tl-head button{padding:5px 8px;min-height:30px;flex:0 0 auto}.jv-tl-head input[type=range]{flex:1;min-width:50px;accent-color:var(--zb,#19545a)}.jv-tl-head output{font-size:11px;font-variant-numeric:tabular-nums;min-width:63px;text-align:right}.jv-tl-head .jv-tl-open{margin-left:auto}.jv-tl-body{margin-top:7px}.jv-tl-body[hidden]{display:none!important}.jv-tl-ruler,.jv-tl-row{display:grid;grid-template-columns:minmax(80px,135px) minmax(120px,1fr);gap:10px;align-items:center}.jv-tl-ruler{font-size:10px;color:var(--text-mute,#617175);margin-bottom:3px}.jv-tl-ticks{display:flex;justify-content:space-between}.jv-tl-rows{max-height:144px;overflow:auto;padding-right:4px;scrollbar-width:thin}.jv-tl-row{min-height:30px;border-radius:4px;padding:2px 0}.jv-tl-name{border:0;background:transparent;color:inherit;font:inherit;font-size:11px;text-align:left;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;padding:6px 2px;cursor:pointer}.jv-tl-row[data-selected=true] .jv-tl-name{font-weight:750;color:var(--zb,#19545a)}.jv-tl-track{height:23px;background:var(--bg,#edf0f1);border:1px solid var(--bd,#d8dce3);border-radius:4px;position:relative;touch-action:none}.jv-tl-span{position:absolute;top:2px;bottom:2px;background:#98c7c3;border-radius:3px;min-width:5px;cursor:grab}.jv-tl-span:active{cursor:grabbing}.jv-tl-span .jv-tl-ent,.jv-tl-span .jv-tl-sal{position:absolute;top:0;bottom:0;min-width:0;background:#19545a;opacity:.7;pointer-events:none}.jv-tl-ent{left:0;border-radius:3px 0 0 3px}.jv-tl-sal{right:0;border-radius:0 3px 3px 0;background:#b98926!important}.jv-tl-handle{position:absolute;top:-1px;bottom:-1px;width:9px;padding:0;border:0;background:transparent;cursor:ew-resize;touch-action:none}.jv-tl-handle:after{content:'';position:absolute;top:4px;bottom:4px;left:3px;border-left:2px solid #fff}.jv-tl-handle[data-edge=start]{left:0}.jv-tl-handle[data-edge=end]{right:0}.jv-tl-line{position:absolute;top:-3px;bottom:-3px;width:1px;background:#df643e;left:var(--jv-time,0%);pointer-events:none;z-index:3}.jv-tl-empty{font-size:12px;color:var(--text-mute);margin:8px 0}.jv-tl-legend{font-size:10px;color:var(--text-mute);margin-top:5px}.jv-tl-controls{display:grid;gap:10px;margin:0 0 16px;padding:12px 0;border-bottom:1px solid var(--bd,#d8dce3)}.jv-tl-controls h3{font-size:14px;margin:0}.jv-tl-controls label{display:grid;gap:5px;font-size:12px;font-weight:600}.jv-tl-controls select,.jv-tl-controls input[type=number]{box-sizing:border-box;max-width:100%;min-width:0;width:100%;font:inherit;padding:7px;border:1px solid var(--bd,#d8dce3);border-radius:6px;background:var(--w,#fff);color:var(--text,#213438)}.jv-tl-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}.jv-tl-controls .jv-tl-disabled{opacity:.55;pointer-events:none}.jv-tl-controls p{margin:0;font-size:12px;line-height:1.45;color:var(--text-mute)}.jv-tl-controls .jv-tl-duration{font-size:11px;color:var(--text-mute);font-weight:400}.workspace-v2 .ws-center:has(>.jv-timeline:not([hidden])){grid-template-rows:auto minmax(0,1fr) auto auto}
@media(max-width:600px){.jv-timeline{padding:6px 8px}.jv-tl-head{gap:5px}.jv-tl-head strong{font-size:11px}.jv-tl-ruler,.jv-tl-row{grid-template-columns:85px minmax(110px,1fr);gap:6px}.jv-tl-rows{max-height:100px}.jv-tl-head output{font-size:10px;min-width:55px}.jv-tl-head .jv-tl-play-text{display:none}.jv-tl-legend{font-size:9px}.jv-tl-head .jv-tl-open{max-width:106px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

/* ════════ juanva_documentos (antes juanva_documentos.css) ════════ */
/* Juanva v006 · controles secundarios compactos, lienzo protagonista. */
body.workspace-v2 .jv-footer-button { display:inline-flex; align-items:center; gap:5px; flex:none; max-width:220px; min-height:27px; padding:4px 7px; border:1px solid var(--bd); border-radius:6px; background:var(--w); color:var(--text-soft); font:inherit; font-size:10px; cursor:pointer; white-space:nowrap; }
.jv-footer-button svg { width:14px; height:14px; flex:none; }
body.workspace-v2 #ws-footer { flex-wrap:wrap; gap:5px 9px; }
body.workspace-v2 #ws-help-hint { display:none; }
.jv-recovery-status[data-state=ok] { color:var(--success,#087443); }
.jv-recovery-status[data-state=error] { color:#b23b36; }
.jv-recovery-status[data-state=pending] { color:var(--text-soft); }
body.workspace-v2 #jv-paginas { flex:none; min-height:0; max-height:210px; padding:10px 14px 6px; border-top:1px solid var(--bd); background:var(--w); color:var(--text); }
.jv-pages-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:7px; }
.jv-pages-head > strong { font-size:12px; }
.jv-pages-head > div { display:flex; gap:5px; align-items:center; }
.jv-pages-head button { display:inline-flex; gap:5px; align-items:center; }
.jv-pages-head svg { width:14px; height:14px; }
.jv-pages-head .ws-icon-button { border:0; background:transparent; color:var(--text-soft); padding:6px; cursor:pointer; }
.jv-pages-list { display:flex; gap:9px; overflow:auto; padding:3px 2px 7px; scrollbar-width:thin; }
.jv-page { flex:0 0 126px; padding:4px; border:1px solid var(--bd); border-radius:7px; background:var(--w); }
.jv-page.active { border-color:var(--zb,#19545a); box-shadow:0 0 0 1px var(--zb,#19545a); }
.jv-page-preview { position:relative; display:flex; align-items:center; justify-content:center; width:100%; height:65px; padding:0; background:var(--ws-control-bg); border:0; border-radius:3px; cursor:pointer; }
.jv-page-preview img { max-width:100%; max-height:100%; object-fit:contain; }
.jv-page-preview svg { height:22px; width:22px; color:var(--text-mute); }
.jv-page-preview > span { position:absolute; left:3px; bottom:3px; background:var(--w); color:var(--text); border:1px solid var(--bd); padding:0 4px; border-radius:3px; font-size:9px; }
.jv-page-name { width:100%; margin:4px 0; padding:3px; border:1px solid transparent; border-radius:4px; font:11px/1.3 system-ui,sans-serif; color:var(--text); background:transparent; }
.jv-page-name:hover,.jv-page-name:focus { border-color:var(--bd); }
.jv-page-actions { display:flex; gap:2px; justify-content:space-between; }
.jv-page-actions button { border:0; padding:3px 5px; background:transparent; color:var(--text-mute); border-radius:4px; cursor:pointer; }
.jv-page-actions button:hover { background:var(--ws-control-bg); color:var(--text); }
.jv-page-actions svg { width:13px; height:13px; }
.jv-small { font-size:11px; line-height:1.55; color:var(--text-mute); }
.jv-check { display:flex; gap:9px; align-items:flex-start; line-height:1.5; font-size:13px; }
.jv-check input { flex:none; margin-top:3px; accent-color:var(--zb,#19545a); }
.jv-recovery-card { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:14px; max-width:960px; width:100%; margin:22px auto 0; padding:16px 20px; border:1px solid var(--bd); border-left:3px solid var(--zb,#19545a); border-radius:10px; text-align:left; background:var(--w); }
.jv-recovery-card strong { font-size:14px; color:var(--text); }
.jv-recovery-card p { font-size:12px; color:var(--text-mute); margin:5px 0 0; }
.jv-recovery-card > div { min-width:0; max-width:100%; }
#jv-recovery-home-text { overflow-wrap:anywhere; }
.jv-recovery-card > div:last-child { display:flex; flex-wrap:wrap; gap:7px; }
.jv-context-help { flex:none; margin:0; padding:0 16px; border-bottom:1px solid var(--bd-soft); }
.jv-context-help > summary { display:flex; gap:7px; align-items:center; cursor:pointer; padding:10px 0; color:var(--text-mute); font-size:11px; list-style:none; }
.jv-context-help > summary::after { content:'+'; margin-left:auto; font-size:15px; }
.jv-context-help[open] > summary::after { content:'−'; }
.jv-context-help svg { width:14px; height:14px; }
.jv-context-help > div { padding:2px 0 13px; font-size:12px; line-height:1.55; }
.jv-context-help strong { color:var(--text); }
.jv-context-help p { color:var(--text-soft); margin:5px 0; }
.jv-context-help small { display:block; font-size:11px; color:var(--text-mute); padding:7px 9px; background:var(--ws-control-bg); border-radius:5px; }
body.workspace-v2 .ws-rail-button { min-height:54px; }
.jv-export-box { margin-top:15px; padding:13px 12px; border:1px solid var(--bd); border-radius:8px; }
.jv-export-box h3 { margin:0 0 10px; color:var(--text); font-size:13px; }
.jv-export-box label { color:var(--text-soft); }
.jv-export-controls { display:flex; flex-direction:column; gap:10px; margin:11px 0; }
.jv-export-controls > label:not(.jv-check) { display:flex; flex-direction:column; gap:5px; font-size:12px; }
.jv-export-controls input[type=number],.jv-export-controls select { width:100%; padding:7px 9px; border:1px solid var(--bd); border-radius:6px; background:var(--w); color:var(--text); font:inherit; }
.jv-export-compare { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:10px 0; }
.jv-export-compare figure { margin:0; min-width:0; }
.jv-export-compare img { width:100%; height:100px; object-fit:contain; border:1px solid var(--bd); border-radius:5px; background:repeating-conic-gradient(#eee 0% 25%,#fff 0% 50%) 50% / 12px 12px; }
.jv-export-compare figcaption { font-size:10px; text-align:center; color:var(--text-mute); margin-top:3px; }
.jv-export-status { font-size:11px; line-height:1.5; margin-top:8px; color:var(--text-soft); }
.jv-export-status.error { color:#b23b36; }
.jv-export-page-checks { max-height:220px; overflow:auto; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin:12px 0; }
.jv-export-page-checks label { padding:8px; border:1px solid var(--bd); border-radius:6px; }
.jv-export-page-checks span { overflow-wrap:anywhere; }
@media(max-width:760px) {
 body.workspace-v2 .jv-footer-button { font-size:9px; min-height:25px; padding:3px 5px; }
 body.workspace-v2 #jv-recovery-status { max-width:165px; overflow:hidden; text-overflow:ellipsis; display:block; }
 body.workspace-v2 #ws-footer #edi-info { flex-basis:100%; order:5; }
 body.workspace-v2 #jv-paginas { max-height:185px; padding:7px 8px 3px; }
 .jv-pages-head { flex-wrap:wrap; gap:4px; }
 .jv-pages-head > div { margin-left:auto; }
 .jv-pages-head > strong { display:none; }
 .jv-page { flex-basis:104px; }
 .jv-page-preview { height:55px; }
 .jv-recovery-card { padding:12px; }
 .jv-context-help { padding-inline:12px; }
 .jv-export-page-checks { grid-template-columns:1fr; }
}
@media(max-height:600px) {
 body.workspace-v2 .ws-rail-button { min-height:43px; }
 body.workspace-v2 #jv-paginas { max-height:160px; }
 .jv-page-preview { height:43px; }
 .jv-context-help > div { max-height:105px; overflow:auto; }
}
