.studio-overlay{position:fixed;inset:0;z-index:2500;background:rgba(19,14,36,.74);overflow:auto;padding:12px}.studio-panel{background:var(--card-custom,#fff);color:var(--ink,#262237);max-width:1480px;min-height:95vh;margin:0 auto;border-radius:16px;padding:14px}.studio-top{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:3px 10px 10px}.studio-top h2{margin:0;font-size:clamp(17px,2vw,25px)}.studio-layout{display:grid;grid-template-columns:minmax(250px,290px) minmax(0,1fr);gap:16px;align-items:start}.studio-sidebar{position:sticky;top:12px;max-height:calc(100vh - 80px);overflow:auto;border:1px solid #d5d3dc;padding:15px;border-radius:12px;background:var(--card-custom,#fff)}.studio-sidebar h3{font-size:15px;margin:12px 0 8px}.studio-sidebar label{display:grid;gap:4px;font-size:12px;font-weight:600;margin:9px 0}.studio-sidebar input:not([type=file]),.studio-sidebar select{max-width:100%;min-height:36px;padding:6px;border:1px solid #b8b7c3;border-radius:6px;background:white;color:#222}.studio-sidebar input[type=file]{max-width:100%;font-size:12px}.studio-sidebar small{display:block;line-height:1.5;margin:10px 0}.studio-format{display:flex;flex-wrap:wrap;gap:5px;margin:6px 0}.studio-format button{font-size:12px;padding:7px 9px;min-height:32px;border-radius:7px}.studio-image-controls{border:2px solid #bbb1d5;border-radius:9px;padding:9px;margin-top:10px}.studio-image-controls[hidden]{display:none}.studio-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px}.studio-work{min-width:0}.studio-tip{margin:6px auto;padding:8px;font-size:13px;color:var(--ink,#222)}.studio-paper-scroll{background:#dddee4;padding:18px;max-height:calc(100vh - 170px);overflow:auto;border-radius:12px;text-align:left}.studio-paper{position:relative;display:block;width:210mm;min-height:297mm;max-width:none!important;box-sizing:border-box;padding:24mm 17mm 20mm;background:white!important;color:#202020!important;font:12pt/1.5 Arial;box-shadow:0 2px 20px #0003;overflow-wrap:anywhere;margin:0 auto;text-align:left}.studio-paper h1{margin:0 0 10mm;font-size:18pt}.studio-paper .studio-object{position:absolute;display:block;max-width:none!important;max-height:none!important;object-fit:contain;z-index:5;cursor:grab;user-select:none;touch-action:none;border:1px solid transparent}.studio-paper .studio-object.is-selected{border:2px dashed #6a37c9;outline:3px solid #dbcdf4;cursor:grabbing}.studio-paper .studio-object.studio-watermark{z-index:0;opacity:.13;pointer-events:auto}.studio-content{position:relative;z-index:2;min-height:450px;outline:none;white-space:normal}.studio-content:focus{outline:1px dashed #bdadd9;outline-offset:8px}.studio-paper .studio-meta{font-size:10pt;color:#444;margin-bottom:12mm;max-width:440px}.studio-paper .studio-rule{border:0;border-top:1px solid #c5c4ce;margin:10px 0 18px}.studio-actions{display:flex;align-items:center;flex-wrap:wrap;gap:9px;padding:14px 0}.studio-actions #studioStatus{flex:1;min-width:180px;font-size:13px}.studio-actions button{white-space:nowrap}@media(max-width:950px){.studio-layout{grid-template-columns:1fr}.studio-sidebar{position:static;max-height:none;display:block}.studio-paper-scroll{max-height:75vh}.studio-overlay{padding:3px}.studio-panel{padding:8px}.studio-actions{justify-content:flex-end}}@media print{.studio-paper{width:210mm!important;min-height:297mm!important;margin:0!important;box-shadow:none!important;overflow:visible!important}.studio-paper .studio-object{border:none!important;outline:none!important}}
/* Entrevistas: redacción en una hoja A4 central, con el membrete a la derecha. */
.interview-overlay{background:rgba(20,17,30,.78)!important}.interview-document{width:min(100%,210mm)!important;max-width:210mm!important;min-height:297mm!important;max-height:none!important;margin:0 auto!important;border-radius:0!important;padding:22mm 17mm 19mm!important;box-shadow:0 8px 32px #0003!important;color:#252032!important;background:#fff!important}.interview-document .qa-card{background:#fff;border:1px solid #ddd;border-radius:7px;margin:12px 0;padding:12px}.interview-letterhead{display:flex;justify-content:flex-end;min-height:55px;margin-bottom:12px}.interview-letterhead img{width:130px;height:65px;object-fit:contain}.interview-document .button-row{flex-wrap:wrap}.interview-document h2{margin:5px 0 12px}@media(max-width:650px){.interview-document{padding:14mm 8mm!important}.interview-letterhead img{width:100px;height:55px}}@page{size:A4;margin:0}

.interview-logo-control{display:flex;justify-content:flex-end;gap:12px;align-items:center;font-size:12px;color:#554b67;margin:0 0 12px}.interview-logo-control input{width:135px}.interview-document .form-grid{gap:12px}
/* Misma escala del membrete en edición y vista previa; evita logos de página completa. */
.studio-paper .studio-object[data-kind="logo"]{max-width:210px!important;max-height:125px!important;object-fit:contain!important}
@media print{.studio-paper .studio-object[data-kind="logo"]{max-width:210px!important;max-height:125px!important}}

/* Resize handle: visible only in the editor, never in the saved design or PDF. */
.studio-paper .studio-resize-handle{position:absolute;z-index:20;display:block;width:15px;height:15px;background:#fff;border:2px solid #6a37c9;border-radius:4px;box-shadow:0 1px 4px #0004;cursor:nwse-resize;touch-action:none;user-select:none}
.studio-paper .studio-resize-handle:hover{background:#e8dfff}
@media print{.studio-resize-handle{display:none!important}}
/* Editor visual: los tres bloques de texto pueden editarse directamente en A4. */
.studio-paper #studioTitle[contenteditable], .studio-paper #studioMeta[contenteditable], .studio-paper #studioBody[contenteditable]{cursor:text}
.studio-paper #studioTitle[contenteditable]:focus, .studio-paper #studioMeta[contenteditable]:focus{outline:1px dashed #9f7fe5;outline-offset:4px}
.studio-paper .studio-object[data-kind="logo"]{object-fit:contain!important;object-position:center center}
@media print{.studio-paper #studioTitle,.studio-paper #studioMeta,.studio-paper #studioBody{outline:none!important}}

/* Entrevistas extensas: el documento debe crecer y paginar sin perder preguntas. */
#studioPaper.studio-paper{height:auto!important;max-height:none!important;overflow:visible!important}
#studioPaper .studio-content{height:auto!important;max-height:none!important;overflow:visible!important;min-height:0}
#studioPaper .studio-qa{break-inside:avoid;page-break-inside:avoid;padding-bottom:7px}
#studioPaper .studio-qa-question{margin-bottom:5px!important}
#studioPaper .studio-qa-answer{white-space:pre-wrap;overflow-wrap:anywhere}
@media print{.studio-paper,.studio-content{height:auto!important;max-height:none!important;overflow:visible!important}.studio-qa{break-inside:avoid;page-break-inside:avoid}}

/* Entrevistas extensas: evitar desbordamiento horizontal y permitir corte por páginas. */
#studioPaper .studio-content, #studioPaper .studio-content *{min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word}
#studioPaper .studio-qa{break-inside:auto;page-break-inside:auto}
#studioPaper .studio-qa-question{break-after:avoid;page-break-after:avoid}
#studioPaper .studio-qa-answer{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-all}
