/* El editor de capturas (captura_editor.js). Mismo diseño en la web y en la extensión (copia en alona-chrome/captura.css). */
.ce-capa { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(10, 12, 16, .55); padding: 24px; }
.ce-capa.ventana { background: var(--panel); padding: 0; }
.ce { width: min(1040px, 100%); height: min(680px, 100%); display: flex; flex-direction: column; background: var(--panel); color: var(--ink);
  border-radius: 16px; box-shadow: 0 0 0 1px var(--line), 0 40px 80px -24px rgba(0, 0, 0, .6); overflow: hidden; }
.ce-capa.ventana .ce { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.ce-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px 10px; flex: none; }
.ce-h h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.ce-s { font-size: 13px; color: var(--ink-3); display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.ce-s .mono { font-family: var(--font-mono, ui-monospace, monospace); color: var(--accent-text); }
.ce-x { width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--ink-3); display: grid; place-items: center; cursor: pointer; }
.ce-x:hover { background: var(--sunken); color: var(--ink); }
.ce-cuerpo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; padding: 0 18px 16px; }
.ce-izq { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.ce-herr { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--sunken); align-self: flex-start; margin-bottom: 10px; flex-wrap: wrap; }
.ce-herr button { height: 34px; padding: 0 10px; border-radius: 9px; border: 0; background: none; display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.ce-herr button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.ce-herr button.col { width: 24px; height: 34px; padding: 0; justify-content: center; }
.ce-herr button.col::after { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--c); }
.ce-herr button.col[aria-pressed="true"]::after { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--ink); }
.ce-herr .sep { width: 1px; height: 22px; background: var(--line-2); align-self: center; margin: 0 2px; }
.ce-herr button:focus-visible, .ce-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ce-lienzo { flex: 1; min-height: 200px; background: var(--sunken); border-radius: 12px; padding: 14px; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.ce-lienzo canvas { display: block; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); touch-action: none; cursor: crosshair; background: #fff; }
.ce-der { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; overflow-y: auto; }
.ce-lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ce-nota { border: 1.5px solid var(--line-2); border-radius: 12px; padding: 9px 11px; font: inherit; font-size: 14px; line-height: 1.45; min-height: 76px;
  resize: vertical; background: var(--panel); color: var(--ink); outline: none; }
.ce-nota:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--sunken); }
.ce-ocr { border-radius: 12px; background: var(--bg); box-shadow: 0 0 0 1px var(--line); padding: 10px 12px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.ce-ocr .h { display: flex; gap: 6px; align-items: center; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.ce-ocr .lee { margin-left: auto; color: var(--ink-3); font-size: 12px; font-weight: 500; }
.ce-inf { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--bg); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.ce-inf input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ce-sw { width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; margin-top: 1px; transition: background .15s; }
.ce-sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.ce-inf input:checked + .ce-sw { background: var(--ok); }
.ce-inf input:checked + .ce-sw::after { left: 19px; }
.ce-inf input:focus-visible + .ce-sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.ce-inf b { display: block; font-size: 13.5px; }
.ce-inf small { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.ce-err { padding: 9px 11px; border-radius: 10px; background: var(--err-soft); color: var(--err-text); font-size: 13px; }
.ce-pie { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; }
.ce-pie .btn { height: 40px; }
@media (max-width: 760px) {
  .ce-capa { padding: 0; }
  .ce { width: 100%; height: 100%; border-radius: 0; }
  .ce-cuerpo { grid-template-columns: 1fr; overflow-y: auto; gap: 12px; padding: 0 16px 14px; }
  .ce-herr button span { display: none; }
  .ce-lienzo { min-height: 240px; flex: none; }
  .ce-der { overflow: visible; }
}
