body { min-height: 100vh; display: flex; flex-direction: column; }
.barra { display: flex; justify-content: space-between; align-items: center; padding: 14px 28px; background: var(--deep); color: #fff; }
.marca { display: flex; gap: 10px; align-items: center; }
.marca img { width: auto; height: 26px; border-radius: 0; }
.marca h1 { font-size: 17px; }
.estado { margin: 0; color: #C9E6EA; font-size: 13px; }
.editor { flex: 1; display: grid; grid-template-columns: 1fr 360px; gap: 24px; padding: 24px 28px; max-width: 1400px; width: 100%; margin: 0 auto; }
.escena { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.marco { position: relative; flex: 1; min-height: 420px; display: grid; place-items: center; background: var(--deep); border-radius: 18px; padding: 18px; }
#lienzo { max-width: 100%; max-height: 68vh; border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.35); background: #000; }
.controles { display: flex; align-items: center; gap: 12px; }
.redondo { width: 42px; height: 42px; padding: 0; font-size: 15px; }
.linea { position: relative; flex: 1; height: 34px; }
.linea input { position: absolute; inset: 0; width: 100%; margin: 0; z-index: 2; accent-color: var(--primary); }
.recorte { position: absolute; left: 0; right: 0; top: 13px; height: 8px; border-radius: 4px; background: var(--border); }
.recorte span { position: absolute; top: 0; bottom: 0; background: rgba(11,44,56,.35); }
#r-ini { left: 0; border-radius: 4px 0 0 4px; }
#r-fin { right: 0; border-radius: 0 4px 4px 0; }
.marcas { position: absolute; inset: 0; pointer-events: none; }
.zoom-marca { position: absolute; top: 3px; width: 12px; height: 28px; margin-left: -6px; padding: 0; border: 0; border-radius: 6px; background: var(--accent);
  pointer-events: auto; cursor: pointer; z-index: 3; box-shadow: 0 0 0 2px #fff; }
.zoom-marca:hover { transform: scaleY(1.12); }
.zoom-marca--manual { background: var(--primary); }
.zoom-marca--apagada { background: #fff; box-shadow: inset 0 0 0 2px var(--accent); opacity: .8; }
.tiempo { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 92px; text-align: right; }
.cortes { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; font-size: 13px; color: var(--muted); }
.cortes label { display: flex; gap: 8px; align-items: center; }
.cortes input { width: 200px; accent-color: var(--primary); }
.largo { font-weight: 600; color: var(--ink); }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 20px; align-self: start; box-shadow: 0 8px 24px rgba(18,59,74,.08); }
.panel h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); margin: 4px 0 12px; }
.panel h2:not(:first-child) { margin-top: 20px; }
.panel small { color: var(--muted); font-size: 12px; }
.info { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.grande { width: 100%; padding: 13px; font-size: 15px; margin-bottom: 8px; }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.progreso { position: relative; height: 26px; border-radius: 999px; background: var(--ice); overflow: hidden; margin-bottom: 12px; }
#barra { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #123B4A, #087E8B 70%, #39C6D6); transition: width .2s; }
#progreso-texto { position: relative; display: block; text-align: center; line-height: 26px; font-size: 12px; font-weight: 600; color: #fff; mix-blend-mode: difference; }
.pie--editor { justify-content: center; padding: 14px; }
@media (max-width: 980px) { .editor { grid-template-columns: 1fr; } }
#lienzo { cursor: pointer; }
.gran-play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border: 0; border-radius: 50%;
  background: rgba(8,126,139,.92); color: #fff; font-size: 30px; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .15s, background .15s; }
.gran-play span { display: inline-block; transform: translateX(3px); }
.gran-play:hover { transform: scale(1.06); background: #066A75; }
.fondos { display: flex; gap: 8px; }
.fondos button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; padding: 0; }
.fondos button[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 2px; }
.centro { text-align: center; margin-top: 8px; }
.panel .grande { margin-bottom: 8px; }

/* Recortar */
.ancho { width: 100%; margin-bottom: 12px; }
.marco.recortando { overflow: hidden; }
.marco.recortando #lienzo { cursor: default; }
.caja-recorte { position: absolute; box-sizing: border-box; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); cursor: move; touch-action: none;
  background: transparent; box-shadow: 0 0 0 9999px rgba(11,44,56,.6); }
.caja-recorte .rejilla { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, transparent 33.2%, rgba(255,255,255,.55) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255,255,255,.55) 66.6%, transparent 66.8%),
              linear-gradient(to bottom, transparent 33.2%, rgba(255,255,255,.55) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255,255,255,.55) 66.6%, transparent 66.8%); }
.caja-recorte i { position: absolute; width: 16px; height: 16px; background: #fff; border: 2px solid var(--primary); border-radius: 4px; box-sizing: border-box; }
.caja-recorte i[data-h="no"] { left: -8px; top: -8px; cursor: nwse-resize; }
.caja-recorte i[data-h="ne"] { right: -8px; top: -8px; cursor: nesw-resize; }
.caja-recorte i[data-h="se"] { right: -8px; bottom: -8px; cursor: nwse-resize; }
.caja-recorte i[data-h="so"] { left: -8px; bottom: -8px; cursor: nesw-resize; }
.caja-recorte i[data-h="n"] { left: calc(50% - 8px); top: -8px; cursor: ns-resize; }
.caja-recorte i[data-h="s"] { left: calc(50% - 8px); bottom: -8px; cursor: ns-resize; }
.caja-recorte i[data-h="e"] { right: -8px; top: calc(50% - 8px); cursor: ew-resize; }
.caja-recorte i[data-h="o"] { left: -8px; top: calc(50% - 8px); cursor: ew-resize; }
.caja-recorte b { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); background: rgba(11,44,56,.8); color: #fff; font: 600 12px Inter, sans-serif; padding: 3px 8px; border-radius: 999px; pointer-events: none; }
.barra-recorte { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.barra-recorte .seg { flex: 1; min-width: 280px; }
.f-oceano { background: linear-gradient(135deg, #0B2C38, #087E8B 60%, #39C6D6); }
.f-aurora { background: linear-gradient(135deg, #2B1B5A, #5B3FD1 50%, #3FC6C0); }
.f-atardecer { background: linear-gradient(135deg, #FF7A59, #F5B14A 55%, #FFD8A8); }
.f-grafito { background: linear-gradient(135deg, #111827, #374151); }
.f-teal { background: #0B2C38; } .f-niebla { background: #F3F8F9; } .f-blanco { background: #fff; }
.fondos { flex-wrap: wrap; }
.panel { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding-bottom: 0; }
.acciones { position: sticky; bottom: 0; background: #fff; padding: 12px 0 14px; margin-top: 8px; border-top: 1px solid var(--border); }
.campo small { color: var(--muted); font-size: 12px; }
.marco { min-height: 340px; }
#lienzo { max-height: calc(100vh - 290px); }
.fila-cam { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; }
.fila-cam label { display: grid; gap: 4px; font-weight: 600; font-size: 13px; }
.fila-cam .seg button { padding: 6px 6px; font-size: 12px; }
.marco.apuntando #lienzo { cursor: crosshair; }
.apuntar-aviso { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); margin: 0; background: var(--primary); color: #fff; font-weight: 600; font-size: 14px;
  padding: 8px 16px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.25); z-index: 4; pointer-events: none; }
.hecho-por { margin: 6px 0 0; font-size: 12.5px; text-align: center; color: var(--muted); }
.hecho-por a { color: var(--primary); font-weight: 600; }
.tarjetas-marca { display: grid; gap: 8px; margin-bottom: 14px; }
.tarjetas-marca input[type=text] { padding: 8px 10px; font-size: 13.5px; }
.logo-fila { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mini-btn { padding: 8px 14px; font-size: 13px; cursor: pointer; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-top: 4px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.enlace { border: 0; background: none; color: var(--error); font: 600 12.5px Inter, sans-serif; cursor: pointer; padding: 0; }
.subs-fila { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 4px; }
.subs-fila select { padding: 8px; font-size: 13px; }
.subs-lista { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.subs-lista li { display: grid; grid-template-columns: auto 1fr; gap: 6px; align-items: center; }
.subs-lista input { padding: 6px 8px; font-size: 13px; }
.subs-t { border: 0; background: var(--ice); color: var(--primary); font: 600 12px Inter, sans-serif; border-radius: 6px; padding: 5px 7px; cursor: pointer; }

/* Pestañas del editor */
.pestanas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 14px; position: sticky; top: -20px; background: #fff; padding: 6px 0 8px; z-index: 2; }
.pestanas button { display: grid; justify-items: center; gap: 2px; border: 1px solid var(--border); background: var(--mist); border-radius: 12px; padding: 8px 4px; cursor: pointer; color: var(--muted); font: 600 12.5px Inter, sans-serif; }
.pestanas button span { font-size: 18px; }
.pestanas button[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.pestana h2:first-of-type { margin-top: 4px; }
.lead { font-size: 13px; margin: 0 0 12px; }
.pasos-editor { background: var(--ice); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-size: 13.5px; }
.pasos-editor ol { margin: 6px 0 6px; padding-left: 18px; }
.enlace-guia { border: 0; background: var(--primary); color: #fff; border-radius: 999px; padding: 6px 14px; font: 600 12.5px Inter, sans-serif; cursor: pointer; }

/* ---- Look profesional: menos texto, íconos de línea ---- */
.etiqueta-ed { font: 600 11px/1 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #9FD4D9;
  border: 1px solid rgba(159,212,217,.35); border-radius: 999px; padding: 4px 8px; margin-left: 8px; vertical-align: 2px; }
.pestanas { grid-template-columns: repeat(3, 1fr); gap: 0; padding: 3px; background: var(--mist); border: 1px solid var(--border); border-radius: 12px; top: -20px; }
.pestanas button { display: flex; justify-content: center; align-items: center; gap: 6px; border: 0; background: none; border-radius: 9px; padding: 8px 6px; font: 600 13px Inter, sans-serif; }
.pestanas button[aria-selected="true"] { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(18,59,74,.15); border: 0; }
.pestanas svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.panel .campo > span, .fila-cam label > span:first-child { font: 600 11px/1.2 Inter, sans-serif; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.panel h2 { font-size: 11px; letter-spacing: .07em; color: var(--muted); }
.panel .campo { margin-bottom: 16px; }
.enlace-descartar { display: block; margin: 2px auto 0; border: 0; background: none; color: var(--muted); font: 500 13px Inter, sans-serif; cursor: pointer; padding: 6px; }
.enlace-descartar:hover { color: #B42318; text-decoration: underline; }
.candado::before { content: "🔒 "; }

/* Editor web (celular) */
.inicio-web { max-width: 460px; margin: 40px auto; padding: 32px 24px; text-align: center; background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 14px 32px rgba(18,59,74,.12); }
.inicio-web img { margin: 0 auto 10px; border-radius: 16px; }
.inicio-web h2 { margin: 0 0 8px; }
.inicio-web .grande { width: 100%; padding: 14px; font-size: 16px; margin: 12px 0; cursor: pointer; }
@media (max-width: 700px) {
  .barra { padding: 12px 16px; } .estado { display: none; }
  .editor { padding: 12px; gap: 14px; }
  .marco { min-height: 0; padding: 8px; } #lienzo { max-height: 62vh; }
  .panel { position: static; max-height: none; overflow: visible; }
  .acciones { position: sticky; bottom: 0; }
  .cortes input { width: 120px; }
  .seg button { padding: 8px 6px; }
}
