.editor{background:#f5f5f7}.editor-header{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:20px 4vw;background:white;border-bottom:1px solid #d5d5da;font-size:.95rem}.editor main{max-width:1200px;margin:auto;padding:40px 24px 80px}.editor h1{font-size:3rem;margin-bottom:16px}.editor #status{padding:16px 20px;margin:24px 0;background:white;border-left:4px solid var(--wine);min-height:58px}.editor #status.error{border-color:#b71c26;background:#fff1f2}.editor-toolbar{display:flex;align-items:flex-end;gap:15px;flex-wrap:wrap;position:sticky;top:0;background:#f5f5f7;z-index:5;padding:18px 0;border-bottom:1px solid #ccc}.editor-toolbar label{flex:1;min-width:200px}.editor label{display:block;font-weight:600;font-size:1rem}.editor label>input,.editor label>select,.editor label>textarea{display:block;margin-top:7px}.editor textarea{min-height:110px;resize:vertical;font-weight:400}.editor .field{margin:20px 0}.editor .field label small{display:block;color:#707079;font-weight:400;margin:7px 0}.editor .help{margin:18px 0;color:#4f515a}.editor fieldset{border:1px solid #d8d8de;border-radius:6px;padding:24px;margin:24px 0;background:white;min-width:0}.editor legend{font-weight:600;color:var(--wine);padding:0 10px}.editor .row-tools{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}.editor .row-tools button{padding:9px 14px;background:white;border:1px solid #bbb;min-height:42px;border-radius:3px}.editor .check{display:flex;align-items:center;gap:12px}.editor .check input{width:22px;height:22px;min-height:0}.editor details{padding:20px;background:white;border:1px solid #ddd;margin-top:20px}.editor .photo-editor{display:grid;grid-template-columns:220px 1fr;gap:25px}.editor .photo-preview{background:#e5e4e8;height:150px;display:flex;align-items:center;justify-content:center;color:#6b5560;font:2.5rem var(--display);overflow:hidden}.editor .photo-preview img{width:100%;height:100%;object-fit:cover}.editor .photo-info input[type=file]{margin:12px 0}.editor .photo-info{min-width:0}.editor .history button{margin:8px 10px 0 0}.editor #roles-form{display:flex;align-items:flex-end;gap:15px;flex-wrap:wrap;margin:20px 0}.editor #roles-form label{flex:1;min-width:180px}.editor .order-row{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:18px 0;border-bottom:1px solid #ddd}.editor-header>a{display:inline-flex;align-items:center;min-height:44px}
/* La barra de guardado queda bajo la cabecera fija y sube con ella al ocultarse. */
.editor-toolbar{top:var(--header-h,84px);transition:transform var(--dur-3) var(--ease-out)}
.header-hidden .editor-toolbar{transform:translateY(calc(-1 * var(--header-h,84px)))}
@media(max-width:640px){.editor-header{flex-wrap:wrap;padding:16px 20px}.editor-header strong{order:-1;width:100%}.editor main{padding:30px 18px}.editor-toolbar{position:static}.editor-toolbar>*{width:100%}.editor fieldset{padding:18px 14px}.editor .photo-editor{grid-template-columns:1fr}.editor .photo-preview{height:180px}.editor h1{font-size:2.5rem}.editor .order-row{display:block}.editor .row-tools{margin-top:15px}}
/* El enlace «Volver a la web» queda justo bajo la cabecera fija: al llegar a él con el
   teclado se reserva su propio margen y el desplazamiento es instantáneo, sin quedar a medias. */
.editor-header a{scroll-margin-top:calc(var(--header-h,84px) + 24px)}
html:has(body.editor){scroll-behavior:auto}
