.imagen-launch { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 7px 10px; border-radius: 7px; border: 0; background: transparent; color: var(--sp-text-2, #51515a); font: 500 12px/1.4 system-ui; cursor: pointer; text-decoration: none; }
.imagen-launch:hover { background: var(--sp-hover, #8882); color: var(--sp-text, #222); }
.imagen-launch svg { width: 15px; height: 15px; flex: none; }
.imagen-study-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.hero-content .imagen-study-tools { justify-content: center; }
.imagen-verse-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
html.zion-style .testimony-content .imagen-verse-footer .verse-version { margin: 0; min-width: 0; }
.imagen-launch--icon { flex: none; width: 34px; height: 34px; margin-inline-start: auto; padding: 8px; }
.imagen-launch--icon span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.imagen-catalog-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; }
.imagen-catalog-heading h2 { margin: 0; }
.imagen-catalog-heading > .imagen-launch { flex: none; margin-inline-start: auto; }
html.zion-style body.lector-nuevo .estudio-acciones > [data-estudio="imagen"] { grid-column: 1 / -1; background: transparent; color: var(--sp-text-2); font-weight: 500; }
html.zion-style body.lector-nuevo .estudio-acciones > [data-estudio="imagen"]:hover { background: var(--sp-hover); color: var(--sp-text); }
html.zion-style body.lector-nuevo .verse-actions .verse-actions__secondary > a[href="destacados.html"] { grid-column: auto; }
@media (pointer: coarse) {
    .imagen-launch { min-height: 44px; }
    .imagen-launch--icon { width: 44px; height: 44px; }
}
.imagen-dialog { box-sizing: border-box; width: min(1120px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid var(--sp-line-strong, #8885); border-radius: 14px; background: var(--sp-bg, #fff); color: var(--sp-text, #222); overflow: auto; overscroll-behavior: contain; }
.imagen-dialog *, .imagen-dialog *::before, .imagen-dialog *::after { box-sizing: border-box; }
.imagen-dialog::backdrop { background: #0009; backdrop-filter: blur(6px); }
.imagen-dialog [hidden] { display: none !important; }
.imagen-dialog :focus-visible, .imagen-launch:focus-visible { outline: 3px solid var(--sp-accent, #3a6cf4); outline-offset: 3px; }
.imagen-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--sp-line, #8884); }
.imagen-dialog h2 { font: 600 25px/1.2 'Zion Sans', system-ui; margin: 0; }
.imagen-dialog-head p { font: 13px/1.5 system-ui; color: var(--sp-text-2, #666); margin: 6px 0 0; }
.imagen-button { min-height: 40px; padding: 10px 15px; border: 0; border-radius: 8px; background: var(--sp-button, #ddd); color: var(--sp-text, #222); font: 600 14px/1.3 system-ui; cursor: pointer; }
.imagen-button:hover { background: var(--sp-button-hover, #ccc); }
.imagen-button:disabled { opacity: .5; cursor: default; }
.imagen-primary, .imagen-primary:hover { background: var(--sp-accent, #3a6cf4); color: #fff; }
.imagen-dialog-body { display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.imagen-controls { padding: 24px; border-right: 1px solid var(--sp-line, #8884); }
.imagen-field { display: block; margin-bottom: 18px; }
.imagen-field > span, .imagen-controls legend { display: block; margin-bottom: 8px; font: 600 13px/1.4 system-ui; }
.imagen-field select, .imagen-field input[type="text"], .imagen-field textarea { display: block; width: 100%; padding: 10px 11px; background: var(--sp-field, #fff); border: 1px solid var(--sp-field-edge, #8885); color: var(--sp-text, #222); border-radius: 7px; font: 14px/1.6 system-ui; }
.imagen-field textarea { resize: vertical; min-height: 130px; }
.imagen-field textarea[readonly] { color: var(--sp-text-2, #555); }
.imagen-hint { font: 12px/1.6 system-ui; color: var(--sp-text-2, #666); margin: 8px 0 0; }
.imagen-controls fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.imagen-themes { display: flex; gap: 8px; }
.imagen-theme { flex: 1; padding: 10px 5px; border: 2px solid transparent; border-radius: 8px; font: 500 12px system-ui; cursor: pointer; }
.imagen-theme[data-theme="paper"] { background: #f3efe5; color: #26372e; }
.imagen-theme[data-theme="ink"] { background: #17252a; color: #f5f1e5; }
.imagen-theme[data-theme="clay"] { background: #863c2c; color: #fff4e7; }
.imagen-theme[aria-pressed="true"] { outline: 2px solid var(--sp-accent, #3a6cf4); outline-offset: 2px; }
.imagen-photo-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.imagen-photo-row .imagen-button { font-size: 12px; }
.imagen-photo-tools { margin: 12px 0 4px; }
.imagen-photo-tools .imagen-field { margin-bottom: 10px; }
.imagen-photo-tools input[type="range"] { display: block; width: 100%; accent-color: var(--sp-accent, #3a6cf4); min-height: 32px; }
.imagen-preview canvas.imagen-canvas--photo { cursor: grab; touch-action: none; }
.imagen-preview canvas.imagen-canvas--photo:active { cursor: grabbing; }
.imagen-preview { padding: 24px; min-width: 0; display: flex; align-items: center; flex-direction: column; background: var(--sp-raised, #eee); }
.imagen-preview canvas { width: 100%; height: auto; max-width: 540px; max-height: 66dvh; object-fit: contain; box-shadow: 0 1px 4px #0002; }
.imagen-pages { display: flex; align-items: center; gap: 16px; justify-content: center; margin-top: 17px; font: 13px system-ui; }
.imagen-pages .imagen-button { min-width: 40px; }
.imagen-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.imagen-feedback { margin: 14px 0 0; font: 13px/1.6 system-ui; text-align: center; max-width: 520px; }
.imagen-feedback[role="alert"] { color: var(--sp-text, #222); }
.imagen-loading { padding: 25px; font: 14px/1.6 system-ui; }
.imagen-dialog .imagen-mode-row { display: flex; gap: 8px; margin-bottom: 20px; }
.imagen-mode-row button { flex: 1; }
.imagen-mode-row [aria-pressed="true"] { background: var(--sp-accent, #3a6cf4); color: #fff; }
@media(max-width: 740px) {
    .imagen-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
    .imagen-dialog-head { padding: 16px; gap: 12px; }
    .imagen-dialog h2 { font-size: 21px; }
    .imagen-dialog-body { grid-template-columns: 1fr; }
    .imagen-controls { padding: 18px; border-right: 0; }
    .imagen-field select, .imagen-field textarea, .imagen-field input[type="text"] { font-size: 16px; }
    .imagen-preview { padding: 18px; grid-row: 1; }
    .imagen-preview canvas { width: auto; max-width: 100%; max-height: 40dvh; }
    .imagen-dialog-head .imagen-button { padding: 10px 12px; }
    .imagen-study-tools { margin: 10px 0 0; }
}
@media print { .imagen-launch, .imagen-study-tools, .imagen-dialog { display: none !important; } }
