:root {
  --bg: #ffffff;
  --panel: #f5f9fc;
  --line: #e3e9ef;
  --ink: #0b0b0c;
  --muted: #667085;
  --blue: #8ed1fc;        /* azul clarito de la marca */
  --blue-soft: #e8f5fe;
  --blue-deep: #3a9fd8;   /* sólo para texto/links sobre blanco */
  --err: #b42318;
  --radius: 10px;
  --display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }
.dot { color: var(--blue); }

/* ---------- barra superior ---------- */
.top { display: flex; align-items: center; gap: 14px; padding: 18px 32px; }
.brand { font: 700 24px/1 var(--display); letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.brand .dot { font-size: 1.25em; line-height: 0; }
.spacer { flex: 1; }
.health { font-size: 12.5px; color: var(--ink); background: var(--blue-soft); padding: 5px 12px; border-radius: 99px; }

main { max-width: 1320px; margin: 0 auto; padding: 28px 32px 140px; }
h1 { font: 700 clamp(32px, 4.6vw, 56px)/1.04 var(--display); letter-spacing: -0.035em; margin: 0 0 18px; max-width: 18ch; }
h2 { font: 600 17px/1.2 var(--display); margin: 0; letter-spacing: -0.01em; }
.lede { max-width: 52ch; color: var(--muted); font-size: 17px; margin: 0 0 32px; }
.hint { color: var(--muted); max-width: 60ch; }

.btn { border: 1.5px solid var(--ink); background: #fff; padding: 9px 16px; border-radius: 99px; cursor: pointer; text-decoration: none; display: inline-block; font-weight: 500; font-size: 14px; transition: background .12s, color .12s; }
.btn:hover { background: var(--blue-soft); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--blue); color: var(--ink); border-color: var(--blue); }
.btn.big { padding: 13px 30px; font-size: 16px; margin-top: 26px; }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.primary:disabled:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.link { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; font-size: 13.5px; }
.link:hover { background: var(--blue-soft); }

/* ---------- subir ---------- */
.upload-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; align-items: start; }
.source { max-width: 640px; }
.drop { display: flex; flex-direction: column; gap: 4px; padding: 40px 28px; border: 1.5px dashed #b5c3d1; border-radius: var(--radius); background: var(--panel); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--blue); background: var(--blue-soft); }
.drop.has { border-style: solid; border-color: var(--ink); background: #fff; }
.drop-main { font: 600 18px/1.25 var(--display); letter-spacing: -0.01em; }
.drop-sub { color: var(--muted); font-size: 13.5px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.path-row input { width: 100%; border: 1.5px solid var(--line); background: #fff; padding: 12px 14px; border-radius: var(--radius); }
.path-row input:focus { border-color: var(--ink); outline: none; }
.source > p { margin: 8px 2px 0; }
.opts { display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: end; margin-top: 28px; max-width: 640px; }
.opts label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink); font-weight: 500; }
.opts label .muted { font-weight: 400; }
.opts label.grow { flex: 1; min-width: 220px; }
.opts select, .opts input { border: 1.5px solid var(--line); background: #fff; padding: 9px 11px; border-radius: var(--radius); font-weight: 400; }
.opts select { min-width: 150px; }
.opts input:focus, .opts select:focus { border-color: var(--ink); outline: none; }

.recent h2 { margin-bottom: 12px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.recent ul { list-style: none; margin: 0; padding: 0; }
.recent li { display: flex; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.recent .r-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; cursor: pointer; background: none; border: 0; text-align: left; padding: 0; }
.recent .r-name:hover { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; }
.recent .r-meta { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.recent .r-del { color: var(--muted); }

/* ---------- progreso ---------- */
.stages { list-style: none; padding: 0; margin: 28px 0 18px; max-width: 520px; }
.stages li { display: grid; grid-template-columns: 16px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.stages .dot-s { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #c3cfda; }
.stages li.done { color: var(--ink); }
.stages li.done .dot-s { background: var(--ink); border-color: var(--ink); }
.stages li.active { color: var(--ink); font-weight: 600; }
.stages li.active .dot-s { border-color: var(--blue); background: var(--blue); animation: pulse 1.2s ease-in-out infinite; }
.st-pct { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 400; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(142,209,252,.35); } }
@media (prefers-reduced-motion: reduce) { .stages li.active .dot-s { animation: none; } }
.error { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--ink); background: var(--panel); max-width: 60ch; border-radius: 0 var(--radius) var(--radius) 0; }
.error p { margin: 0 0 10px; }

/* ---------- resultados ---------- */
.results { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.stage { position: sticky; top: 16px; }
.player-wrap { background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.player-wrap video { width: 100%; height: 100%; display: block; background: #000; }
.tl-head { display: flex; justify-content: space-between; margin: 18px 0 8px; gap: 12px; }
.tl-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline { position: relative; height: 44px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; overflow: hidden; }
.tl-track { position: absolute; inset: 0; }
.tl-mark { position: absolute; top: 7px; bottom: 7px; min-width: 4px; border-radius: 3px; background: #c3cfda; border: 0; padding: 0; cursor: pointer; }
.tl-mark:hover { background: #8a99a9; }
.tl-mark.hot { background: #8a99a9; }
.tl-mark.picked { background: var(--blue); }
.tl-mark.active { outline: 2px solid var(--ink); outline-offset: 1px; z-index: 2; }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); pointer-events: none; left: 0; }
.tl-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.notice { margin: 16px 0 0; padding: 10px 14px; background: var(--blue-soft); border-radius: var(--radius); font-size: 13.5px; }
.exports { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; }

.list-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.list-tools { display: flex; gap: 16px; }
.clips { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.clip { display: grid; grid-template-columns: 26px 1fr; gap: 6px 14px; padding: 18px 6px 18px 10px; border-bottom: 1px solid var(--line); position: relative; }
.clip.active { background: var(--panel); }
.clip.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue); }
.clip > :not(.clip-sel) { grid-column: 2; min-width: 0; }
.clip-sel { grid-column: 1; grid-row: 1 / span 8; padding-top: 3px; }
.clip-sel input { width: 20px; height: 20px; accent-color: var(--ink); cursor: pointer; }
.clip-top { display: flex; gap: 10px; align-items: baseline; }
.score { font: 700 13px/1 var(--display); font-variant-numeric: tabular-nums; padding: 5px 8px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); }
.score.hi { background: var(--blue); border-color: var(--blue); }
.clip-title { font: 600 16.5px/1.25 var(--display); letter-spacing: -0.01em; margin: 0; flex: 1; }
.clip-meta { display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.play { background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; color: var(--ink); font-weight: 500; }
.clip-why { margin: 0; font-size: 13.5px; }
.clip-excerpt { margin: 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clip-edit { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 4px; }
.mini { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 3px 12px; cursor: pointer; font-size: 12.5px; }
.mini:hover { border-color: var(--ink); background: var(--blue-soft); }
.mini:disabled { opacity: .4; cursor: not-allowed; }
.clip-state { margin-top: 6px; font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.prog { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 4px; width: 100%; }
.prog > i { display: block; height: 100%; background: var(--blue); width: 0; transition: width .4s; }
.state-done a { font-weight: 600; color: var(--ink); text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.state-err { color: var(--err); }
.tag-manual { font-size: 11.5px; background: var(--blue-soft); padding: 2px 8px; border-radius: 99px; color: var(--ink); }

/* ---------- controles generales ---------- */
select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 28px !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 11px center / 10px 6px; }
select:focus-visible { outline-offset: 1px; }
.sw { display: flex; align-items: center; gap: 11px; cursor: pointer; font-weight: 500; font-size: 14px; position: relative; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw i { flex: none; width: 36px; height: 21px; border-radius: 99px; background: #dbe3ea; position: relative; transition: background .15s; }
.sw i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s, background .15s; }
.sw input:checked + i { background: var(--blue); }
.sw input:checked + i::after { transform: translateX(15px); background: #000; }
.sw input:disabled + i { opacity: .45; } .sw input:disabled ~ span { color: var(--muted); }
.sw input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }
.sw.sm { font-size: 13px; font-weight: 400; }
.sw.sm i { width: 30px; height: 18px; } .sw.sm i::after { width: 12px; height: 12px; } .sw.sm input:checked + i::after { transform: translateX(12px); }

/* tarjetas de momentos */
.clip-edit { gap: 10px 12px; }
.mini.strong { background: var(--ink); color: #fff; border-color: var(--ink); padding: 4px 14px; font-weight: 500; }
.mini.strong:hover { background: var(--blue); border-color: var(--blue); color: var(--ink); }
.nudge { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; font-size: 12.5px; background: #fff; }
.nudge em { font-style: normal; color: var(--muted); padding: 3px 9px 3px 12px; }
.nudge button { border: 0; border-left: 1px solid var(--line); background: #fff; padding: 3px 10px; cursor: pointer; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.nudge button:hover:not(:disabled) { background: var(--blue-soft); }
.nudge button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- barra de acciones ---------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 32px; display: flex; justify-content: space-between; gap: 14px 22px; align-items: center; z-index: 10; }
.bar-right { display: flex; gap: 10px; align-items: center; }
.pop-wrap { position: relative; }
.pop { position: absolute; right: 0; bottom: calc(100% + 14px); width: 350px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.14); padding: 4px 20px; }
.pop section { display: flex; flex-direction: column; gap: 11px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.pop section:last-child { border-bottom: 0; }
.pop-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13.5px; color: var(--muted); }
.pop-row select { border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: 13px; color: var(--ink); max-width: 200px; }
.logo-ctl { display: inline-flex; gap: 10px; align-items: center; }
.logo-ctl img { height: 28px; max-width: 70px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 10px 10px; }

/* ---------- editor: sala oscura a pantalla completa ---------- */
dialog#editor { --e-line: #262626; --e-panel: #0f0f0f; --e-muted: #8c8c8c;
  border: 0; padding: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: #000; color: #fff; overflow: hidden; }
dialog#editor[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
dialog#editor::backdrop { background: #000; }
#editor :focus-visible { outline-color: var(--blue); }
.ed-top { display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--e-line); }
.ed-brand { font: 700 18px/1 var(--display); letter-spacing: -0.03em; }
.ed-brand .dot { font-size: 1.25em; line-height: 0; }
.ed-top h2 { font: 500 14px/1.2 var(--body); letter-spacing: 0; color: #c9c9c9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ed-dirty { color: var(--blue); font-size: 12.5px; white-space: nowrap; }
.ed-top-r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ic { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--e-line); background: transparent; color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; font: 600 14px/1 var(--display); transition: border-color .12s, background .12s; }
.ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic:hover:not(:disabled) { border-color: var(--blue); }
.ic:disabled { opacity: .28; cursor: default; }
.ic.play { width: 44px; height: 44px; background: #fff; color: #000; border: 0; }
.ic.play:hover { background: var(--blue); }
.ic.play svg .f { fill: currentColor; stroke: none; }
.ghost, .solid { border-radius: 99px; padding: 7px 15px; font-size: 13.5px; cursor: pointer; font-weight: 500; }
.ghost { background: transparent; border: 1px solid var(--e-line); color: #fff; }
.ghost:hover { border-color: #fff; }
.solid { background: var(--blue); border: 1px solid var(--blue); color: #000; font-weight: 600; padding: 7px 20px; }
.solid:hover { background: #fff; border-color: #fff; }
.solid:disabled { opacity: .5; cursor: default; }

.ed-main { display: grid; grid-template-columns: minmax(0, 1fr) auto 330px; min-height: 0; }
.ed-stage { padding: 16px 20px 8px; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ed-video { position: relative; background: #000; aspect-ratio: 16 / 9; width: min(100%, calc((100vh - 330px) * 16 / 9)); user-select: none; touch-action: none; cursor: crosshair; border-radius: 6px; overflow: hidden; }
.ed-video video { width: 100%; height: 100%; display: block; }
.ed-crop { position: absolute; border: 2px solid rgba(142,209,252,.8); background: rgba(142,209,252,.10); pointer-events: none; }
.ed-crop.on { border-color: var(--blue); background: rgba(142,209,252,.2); }
.ed-crop.b { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.07); }
.ed-crop.b.on { border-color: var(--blue); background: rgba(142,209,252,.2); }
.ed-crop.fit { border-style: dotted; background: transparent; }
.ed-crop span { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 2px #000; }
.ed-crop.fit span { display: none; }
.ed-crop em { position: absolute; left: 6px; top: 4px; font: 600 11px/1 var(--display); font-style: normal; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.9); }
.ed-ctrls { display: flex; gap: 10px; align-items: center; width: min(100%, calc((100vh - 330px) * 16 / 9)); }
#ed-time { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--e-muted); }
.ed-hint { margin: 0; font-size: 12.5px; color: var(--e-muted); width: min(100%, calc((100vh - 330px) * 16 / 9)); text-align: left; min-height: 1.4em; }

.ed-side { border-left: 1px solid var(--e-line); padding: 16px; display: flex; flex-direction: column; gap: 16px; overflow: auto; min-height: 0; }
.ed-panel { display: flex; flex-direction: column; gap: 14px; }
.ed-group { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.lay { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.lay button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px 6px; background: var(--e-panel); border: 1px solid var(--e-line); border-radius: 10px; color: var(--e-muted); cursor: pointer; font-size: 10.5px; transition: border-color .12s, color .12s; }
.lay svg { height: 36px; width: auto; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lay svg .o { fill: rgba(255,255,255,.04); }
.lay button:hover { color: #fff; border-color: #444; }
.lay button.on { color: #fff; border-color: var(--blue); background: rgba(142,209,252,.1); }
.lay button.on svg { stroke: var(--blue); } .lay button.on svg .o { fill: rgba(142,209,252,.2); }
.ed-lbl { font-weight: 500; font-size: 12.5px; color: var(--e-muted); display: flex; justify-content: space-between; }
.ed-lbl b { color: #fff; font-variant-numeric: tabular-nums; font-weight: 600; }
.seg-btns { display: flex; border: 1px solid var(--e-line); border-radius: 99px; overflow: hidden; }
.seg-btns button { flex: 1; border: 0; background: transparent; color: var(--e-muted); padding: 6px 8px; font-size: 12.5px; cursor: pointer; }
.seg-btns button + button { border-left: 1px solid var(--e-line); }
.seg-btns button:hover { color: #fff; }
.seg-btns button.on { background: #fff; color: #000; font-weight: 600; }
#editor .sw i { background: #2c2c2c; } #editor .sw input:checked + i { background: var(--blue); }
#editor .sw input:checked + i::after { background: #000; }
#editor input[type="range"] { accent-color: var(--blue); width: 100%; }
.ed-actions { display: flex; flex-wrap: wrap; gap: 6px; }
#editor .mini { background: transparent; border: 1px solid var(--e-line); color: #d6d6d6; }
#editor .mini:hover:not(:disabled) { border-color: var(--blue); background: transparent; color: #fff; }
kbd { font: 600 10.5px/1 var(--body); border: 1px solid var(--line); border-bottom-width: 2px; background: var(--panel); color: var(--ink); border-radius: 5px; padding: 2px 5px; margin-right: 2px; }
#editor kbd { background: #1a1a1a; border-color: #333; color: #fff; }

.ed-bottom { border-top: 1px solid var(--e-line); padding: 12px 20px 14px; display: flex; flex-direction: column; gap: 10px; }
.ed-tl-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ed-tl-help { font-size: 12px; color: var(--e-muted); }
.ed-zoom { display: flex; align-items: center; gap: 6px; flex: none; }
.ed-zoom b { min-width: 38px; text-align: center; font: 600 12px/1 var(--display); color: #fff; font-variant-numeric: tabular-nums; }
.ed-zoom .ic { width: 30px; height: 30px; }
.ed-zoom button:disabled { opacity: .35; cursor: default; }
.ed-zoom .ghost.sm { padding: 5px 11px; font-size: 12px; }
.ed-tl { position: relative; height: 92px; background: #0f0f0f center / 100% 100% no-repeat; border: 1px solid var(--e-line); border-radius: 10px; cursor: pointer; overflow: hidden; }
/* cada escena es un bloque propio, con su marco de color y su número; la elegida se ve limpia y con borde blanco */
.ed-tl-segs i.sc { position: absolute; top: 0; bottom: 0; margin: 0 1px; box-sizing: border-box; border: 2px solid var(--c); border-radius: 9px; overflow: hidden;
  background: color-mix(in srgb, var(--c) 30%, rgba(0,0,0,.55)); transition: background .12s, box-shadow .12s; pointer-events: auto; }
.ed-tl-segs i.sc:hover { background: color-mix(in srgb, var(--c) 16%, rgba(0,0,0,.3)); }
.ed-tl-segs i.sc.sel { background: transparent; border-color: #fff; border-width: 3px; box-shadow: 0 0 0 2px var(--c), 0 0 18px color-mix(in srgb, var(--c) 70%, transparent); z-index: 1; }
.ed-tl-segs i.sc span { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 0; height: 20px; background: var(--c); color: #0b0b0b; border-radius: 0 0 8px 0; font: 600 11px/1 var(--display); white-space: nowrap; max-width: 100%; overflow: hidden; }
.ed-tl-segs i.sc span b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; background: #0b0b0b; color: var(--c); font: 700 11px/1 var(--display); }
.ed-ruler { position: relative; height: 16px; margin-top: -4px; font: 500 10px/1 var(--body); color: var(--e-muted); pointer-events: none; overflow: hidden; }
.ed-ruler i { position: absolute; top: 0; width: 1px; height: 6px; background: #4a4a4a; }
.ed-ruler i em { position: absolute; top: 8px; left: 0; transform: translateX(-50%); font-style: normal; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ed-ov { position: relative; height: 8px; border-radius: 4px; background: #1a1a1a; cursor: pointer; touch-action: none; }
.ed-ov i { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--blue); opacity: .85; min-width: 14px; cursor: grab; }
.ed-tl-cuts i { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: rgba(255,255,255,.5); }
.ed-tl-head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.6); pointer-events: none; z-index: 3; }
.ed-key { position: absolute; top: 40%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: var(--blue); border: 2px solid #000; padding: 0; cursor: pointer; z-index: 2; }
.ed-key.sel { background: #fff; }
.ed-trim { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: 13px; color: var(--e-muted); }
.trim-row { display: flex; align-items: center; gap: 5px; }
.trim-row span { width: 44px; }
.trim-row button { border: 1px solid var(--e-line); background: transparent; color: #d6d6d6; border-radius: 99px; padding: 2px 9px; font-size: 12px; cursor: pointer; font-variant-numeric: tabular-nums; }
.trim-row button:hover { border-color: var(--blue); color: #fff; }

.ed-dur { font-variant-numeric: tabular-nums; }
.ed-sens { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ed-sens select { background-color: #0f0f0f; color: #fff; border: 1px solid var(--e-line); border-radius: 99px; padding: 4px 12px; font-size: 12.5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ed-msg { flex-basis: 100%; color: var(--blue); min-height: 0; }
.ed-msg:empty { display: none; }
.ed-helpbox { position: absolute; top: 56px; right: 18px; width: min(430px, 92vw); background: #0f0f0f; border: 1px solid #333; border-radius: 14px; padding: 14px 18px 16px; z-index: 6; box-shadow: 0 20px 60px rgba(0,0,0,.7); font-size: 12.5px; color: #c9c9c9; }
.ed-helpbox h3 { margin: 0 0 10px; font: 600 14px var(--display); color: #fff; }
.ed-helpbox ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }

@media (max-width: 980px) {
  .upload-grid, .results { grid-template-columns: 1fr; gap: 28px; }
  .stage { position: static; }
  main { padding: 20px 16px 110px; }
  .top { padding: 14px 16px; }
  .bar { padding: 10px 16px; }
  .ed-main { grid-template-columns: 1fr; overflow: auto; }
  .ed-side { border-left: 0; border-top: 1px solid var(--e-line); }
  .ed-video, .ed-ctrls, .ed-hint { width: 100%; }
  dialog#editor[open] { overflow: auto; grid-template-rows: auto auto auto; }
}


/* ================= primera pantalla (subir / procesando): negro, como el editor ================= */
body { --bg: #0b0b0c; --panel: #14171b; --line: #262b32; --ink: #f4f6f8; --muted: #8b95a1; --blue-soft: rgba(142,209,252,.12); color-scheme: dark; }
.top .brand { color: #fff; }
.health { background: #14171b; color: #aab4bf; border: 1px solid #262b32; }
main { padding-top: 12px; }
.hero { display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; min-height: calc(100vh - 140px); }
.hero-main { padding: 8px 0 24px; }
.hero h1 { color: #fff; max-width: 14ch; font-size: clamp(36px, 5.2vw, 64px); }
.hero .lede { margin-bottom: 36px; }
.hero .drop { flex-direction: row; align-items: center; gap: 18px; padding: 26px 26px; border: 1.5px dashed #34404c; background: #11151a; border-radius: 16px; }
.hero .drop:hover, .hero .drop.over { border-color: var(--blue); background: rgba(142,209,252,.07); }
.hero .drop.has { border-style: solid; border-color: var(--blue); background: rgba(142,209,252,.08); }
.drop-ic { flex: none; width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: var(--blue); stroke: #0b0b0c; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.drop-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hero .drop-main { color: #fff; font-size: 17px; }
.hero .or { margin: 16px 0; }
.hero .path-row input { background: #11151a; border: 1.5px solid #262b32; color: #fff; border-radius: 12px; padding: 14px 16px; }
.hero .path-row input::placeholder, .hero .opts input::placeholder { color: #6a7580; }
.hero .path-row input:focus { border-color: var(--blue); }
.hero .opts { margin-top: 26px; gap: 14px; align-items: stretch; }
.hero .opts label { color: #aab4bf; font-weight: 500; font-size: 12.5px; }
.hero .opts select, .hero .opts input { background-color: #11151a; border: 1.5px solid #262b32; color: #fff; border-radius: 12px; padding: 11px 13px; font-size: 14px; }
.hero .opts select:focus, .hero .opts input:focus { border-color: var(--blue); }
.hero .btn.primary { background: var(--blue); color: #0b0b0c; border-color: var(--blue); }
.hero .btn.primary:hover { background: #fff; border-color: #fff; }
.hero .btn.primary:disabled, .hero .btn.primary:disabled:hover { background: #1b2026; color: #6a7580; border-color: #1b2026; opacity: 1; }
.hero .btn.big { margin-top: 28px; padding: 15px 38px; font-size: 16px; font-weight: 600; }
.hero .recent { margin-top: 44px; max-width: 640px; }
.hero .recent h2 { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; }
.hero .recent .r-name { color: #e8edf2; }
.hero-art { display: flex; justify-content: center; align-items: center; }
.hero-art svg { width: min(100%, 520px); height: auto; }
h1 { color: #fff; }
.btn { background: #11151a; color: #fff; border-color: #34404c; }
.stages .dot-s { border-color: #34404c; }
.stages li.done .dot-s { background: var(--blue); border-color: var(--blue); }
.error { background: #14171b; border-left-color: var(--blue); }
@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-art { order: -1; }
  .hero-art svg { width: min(70%, 300px); }
}
.hero .opts select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23aab4bf' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.hero .opts select option { background: #11151a; color: #fff; }
.hero .opts select { background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 6px; }
.hero h1 { max-width: none; font-size: clamp(34px, 4.3vw, 56px); }


/* ---- editor v8: vista previa grande, botones de verdad, logo, timecodes ---- */
.ed-phone { padding: 16px 6px 12px; display: flex; align-items: flex-start; justify-content: center; min-height: 0; }
.ed-phone canvas { display: block; --h: min(660px, calc(100vh - 250px)); height: var(--h); width: calc(var(--h) * 9 / 16); border-radius: 18px; background: #0a0a0a; border: 1px solid #2a2a2a; box-shadow: 0 0 0 5px #0d0d0d, 0 18px 50px rgba(0,0,0,.6); }
.ed-side { padding: 16px 16px 16px 14px; gap: 14px; }
.ed-video, .ed-ctrls, .ed-hint { width: min(100%, calc((100vh - 300px) * 16 / 9)); }
.ed-stage { justify-content: center; }
.ed-phone { align-items: center; }
.ed-busy { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(0,0,0,.78); backdrop-filter: blur(3px); text-align: center; padding: 24px; cursor: progress; }
.ed-busy[hidden] { display: none; }
.ed-busy i { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #2a2a2a; border-top-color: var(--blue); animation: spin .9s linear infinite; }
.ed-busy b { font: 600 16px var(--display); color: #fff; }
.ed-busy small { color: #8c8c8c; font-size: 12.5px; max-width: 34ch; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ed-busy i { animation-duration: 3s; } }

/* botones: relieve, borde y hover claro; no parecen etiquetas */
.act { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 14px; border: 1px solid #3a3a3a; border-radius: 10px; background: linear-gradient(#1f1f1f, #171717); color: #fff; font: 500 13.5px var(--body); text-align: left; cursor: pointer; box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 2px 0 #000; transition: border-color .12s, background .12s, transform .05s; }
.act svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.act kbd { margin-left: auto; }
.act small { margin-left: auto; color: rgba(0,0,0,.6); font-size: 11.5px; font-weight: 500; }
.act:hover:not(:disabled) { border-color: var(--blue); background: linear-gradient(#242a30, #1a1f24); }
.act:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 0 #000; }
.act:disabled { opacity: .4; cursor: not-allowed; }
.act.primary { background: var(--blue); border-color: var(--blue); color: #000; font-weight: 600; box-shadow: 0 2px 0 #3a7ea3; }
.act.primary:hover:not(:disabled) { background: #b3e0fd; border-color: #b3e0fd; }
.act.sm { min-height: 34px; font-size: 12.5px; justify-content: center; }
.act-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.ed-actions { gap: 8px; }
.seg-btns { border-radius: 10px; background: #121212; padding: 3px; gap: 3px; border: 1px solid #2c2c2c; }
.seg-btns button { border: 0 !important; border-radius: 7px; padding: 8px 8px; }
.seg-btns button.on { background: #fff; color: #000; }
.ed-logo { border-top: 1px solid var(--e-line); padding-top: 14px; }
.ed-logo .ed-lbl small { color: #6e6e6e; font-weight: 400; }
#e-logo-ctl { display: flex; flex-direction: column; gap: 12px; }
#e-logo-ctl[hidden] { display: none; }
.e-logo-row { display: flex; gap: 14px; align-items: center; }
.e-logo-col { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.e-logo-col .seg-btns button { font-size: 12px; padding: 6px 4px; }
.corners { flex: none; position: relative; width: 62px; height: 92px; border: 1.5px solid #4a4a4a; border-radius: 9px; background: #101010; }
.corners button { position: absolute; width: 22px; height: 22px; border-radius: 6px; border: 1px solid #3c3c3c; background: #1c1c1c; cursor: pointer; padding: 0; }
.corners button:hover { border-color: var(--blue); }
.corners button.on { background: var(--blue); border-color: var(--blue); }
.corners button[data-p="si"] { left: 4px; top: 4px; } .corners button[data-p="sd"] { right: 4px; top: 4px; }
.corners button[data-p="ii"] { left: 4px; bottom: 4px; } .corners button[data-p="id"] { right: 4px; bottom: 4px; }
input.tc { width: 92px; background: #121212; border: 1px solid #2c2c2c; border-radius: 8px; color: #fff; padding: 4px 8px; margin-left: 6px; font: 600 13px var(--body); font-variant-numeric: tabular-nums; text-align: center; }
input.tc:hover { border-color: #444; } input.tc:focus { border-color: var(--blue); outline: none; background: #0a0a0a; }
@media (max-width: 1100px) { .ed-main { grid-template-columns: minmax(0, 1fr) auto; } .ed-side { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--e-line); } }
@media (max-width: 820px) { .ed-main { grid-template-columns: 1fr; } .ed-phone canvas { --h: 480px; } }

/* ---- tema oscuro en toda la app (resultados, barra, ajustes) ---- */
.btn:hover { background: #1b2026; }
.btn.primary { background: var(--blue); color: #0b0b0c; border-color: var(--blue); }
.btn.primary:hover { background: #fff; border-color: #fff; color: #0b0b0c; }
.btn.primary:disabled:hover { background: var(--blue); color: #0b0b0c; border-color: var(--blue); }
.mini { background: #14171b; color: var(--ink); border-color: #2c333b; }
.mini:hover { border-color: var(--blue); background: #1b2026; }
.mini.strong { background: var(--blue); color: #0b0b0c; border-color: var(--blue); }
.mini.strong:hover { background: #fff; border-color: #fff; }
.nudge, .nudge button { background: #14171b; color: var(--ink); }
.nudge button:hover:not(:disabled) { background: #1f262d; }
.nudge em { color: var(--muted); }
.bar { background: #0f1215; border-top-color: #262b32; }
.pop { background: #14171b; border-color: #2c333b; box-shadow: 0 18px 50px rgba(0,0,0,.6); }
select { background-color: #14171b; color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23aab4bf' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
select option { background: #14171b; color: #fff; }
.pop-row select { border-color: #2c333b; }
.sw i { background: #2c333b; } .sw input:checked + i { background: var(--blue); } .sw input:checked + i::after { background: #0b0b0c; }
.tl-mark { background: rgba(142,209,252,.55); }
.tl-mark:hover, .tl-mark.on { background: var(--blue); }
.stages .dot-s { border-color: #34404c; }
.logo-ctl img { background: repeating-conic-gradient(#2a2f36 0 25%, #1c2026 0 50%) 0 0 / 10px 10px; border-color: #2c333b; }
.timeline { background: #11151a; }
.tl-playhead { background: #fff; }
.notice { background: #14171b; color: #c4ccd5; border-color: #262b32; }
.link { color: #e8edf2; }
.clip { border-color: #262b32; }
.clip .sel, .clip input[type="checkbox"] { accent-color: var(--blue); }
#editor .sw i { background: #2c2c2c; } #editor .sw input:checked + i { background: var(--blue); }

.nudge input.tc-in { width: 84px; border: 0; border-left: 1px solid var(--line); background: #0f1215; color: var(--ink); font: 600 12.5px var(--body); font-variant-numeric: tabular-nums; text-align: center; padding: 3px 4px; }
.nudge input.tc-in:focus { outline: none; background: #05070a; box-shadow: inset 0 -2px 0 var(--blue); }
.nudge button + input.tc-in { border-left: 1px solid var(--line); }
.nudge button:last-child { border-left: 1px solid var(--line); }

/* bordes arrastrables de la línea de tiempo */
.ed-dim { position: absolute; top: 0; bottom: 0; left: 0; background: rgba(0,0,0,.66); pointer-events: none; z-index: 2; }
.ed-h { position: absolute; top: 0; bottom: 0; width: 14px; z-index: 4; cursor: ew-resize; background: var(--blue); touch-action: none; display: flex; align-items: center; justify-content: center; }
.ed-h::after { content: ""; width: 2px; height: 26px; border-radius: 2px; background: #0b0b0b; opacity: .75; }
.ed-h.l { border-radius: 8px 0 0 8px; }
.ed-h.r { border-radius: 0 8px 8px 0; }
.ed-h:hover, .ed-h:active { filter: brightness(1.12); }

/* ---- subtítulos en el editor */
.ed-tabs { flex: 0 0 auto; }
.ed-subs { display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1; }
.ed-subs[hidden], .ed-panel[hidden] { display: none; }
.subs-help { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--e-muted); }
.subs-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.subs-opts .sw { grid-column: 1 / -1; }
.subs-opts select { width: 100%; background: #121212; color: #fff; border: 1px solid #2c2c2c; border-radius: 8px; padding: 7px 8px; font-size: 12.5px; }
.subs-lines { display: flex; flex-direction: column; gap: 6px; overflow: auto; min-height: 120px; padding-right: 2px; }
.ln { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 8px; align-items: start; padding: 7px 8px; border-radius: 10px; border: 1px solid transparent; background: #111; }
.ln.now { border-color: #8ed1fc; background: #0f1a22; }
.ln .tc { border: 0; background: transparent; color: var(--e-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; text-align: left; padding: 3px 0; cursor: pointer; }
.ln .tc:hover { color: #fff; }
.ln .tx { font-size: 13.5px; line-height: 1.45; color: #f2f2f2; outline: none; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; word-break: break-word; white-space: pre-wrap; }
.ln .tx:focus { background: #1b1b1b; box-shadow: 0 0 0 1px #8ed1fc; }
.ln.saving .tx { opacity: .55; }
.subs-empty { font-size: 12.5px; color: var(--e-muted); padding: 8px 2px; }

/* exportar */
.ed-export { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.72); display: grid; place-items: center; padding: 20px; }
.ex-card { width: min(460px, 100%); background: #121212; border: 1px solid var(--e-line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.ex-card h3 { margin: 0; font: 700 22px/1.1 var(--display); color: #fff; }
.ex-lbl { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--e-muted); }
.ex-name { display: flex; align-items: center; border: 1px solid var(--e-line); border-radius: 10px; background: #0b0b0b; padding-right: 12px; }
.ex-name:focus-within { border-color: var(--blue); }
.ex-name input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font: 500 15px/1.2 var(--body); padding: 11px 12px; }
.ex-name em { font-style: normal; color: var(--e-muted); font-size: 14px; }
.ex-stat { margin: 0; font-size: 14px; color: #e8e8e8; min-height: 20px; }
.ex-card[data-state="error"] .ex-stat { color: #ff9db1; }
.ex-prog { height: 6px; border-radius: 3px; background: #262626; overflow: hidden; }
.ex-prog i { display: block; height: 100%; width: 0; background: var(--blue); transition: width .5s; }
.ex-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.ex-done { align-self: flex-start; border: 0; background: transparent; color: var(--blue); font: 600 14px/1 var(--body); padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ex-btns button:disabled { opacity: .45; cursor: default; }

/* versión de prueba */
.health.trial { top: 16px; }
.expired { position: fixed; inset: 0; z-index: 1000; background: #0a0a0a; display: grid; place-items: center; padding: 24px; text-align: center; }
.expired-card { max-width: 520px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.expired-logo { font: 800 30px/1 var(--display); color: #fff; }
.expired-logo span { color: var(--blue); }
.expired h1 { margin: 6px 0 0; font: 800 34px/1.1 var(--display); color: #fff; }
.expired p { margin: 0; font-size: 16px; line-height: 1.5; color: #b8b8b8; }

/* ---- versión web: cuenta y acceso */
body:not(.web) .acct { display: none !important; }
body.web .local-only { display: none !important; }
.acct { display: inline-flex; align-items: center; gap: 10px; }
.acct button { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.acct button:focus-visible, .auth-card button:focus-visible, .auth-card input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.auth-card { width: min(380px, 100%); }
.auth-card h1 { font-size: 28px; }
.auth-card input { width: 100%; box-sizing: border-box; padding: 13px 14px; border-radius: 10px; border: 1px solid #333; background: #141414; color: #fff; font: 500 15px var(--body, inherit); }
.auth-card input::placeholder { color: #777; }
.auth-card button[type=submit] { width: 100%; padding: 13px; border: 0; border-radius: 10px; background: var(--blue); color: #000; font: 800 15px var(--display); cursor: pointer; }
.auth-card button[type=submit]:disabled { opacity: .6; cursor: wait; }
.auth-link { all: unset; cursor: pointer; color: #b8b8b8; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.auth-err { color: #ff8a8a !important; font-size: 14px !important; }

/* ---- exportar para el editor */
.exp-link { display: block; text-align: left; margin: 8px 0; }
#exp-pop section { display: flex; flex-direction: column; gap: 2px; min-width: 260px; }

.subs-opts .sz { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #b8b8b8; }
.subs-opts .sz input { width: 110px; }

.wt { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.wt button { border: 1px solid #2c2c2c; background: #121212; color: #cfcfcf; border-radius: 99px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.wt button:hover { color: #fff; }
.wt button.on { background: #8ed1fc; border-color: #8ed1fc; color: #000; }
.wt button:disabled { opacity: .5; cursor: default; }
.subs-help.sm { font-size: 11.5px; margin-top: -2px; }
.lnk { display: block; margin-top: 4px; border: 0; background: none; padding: 0; color: #8ed1fc; font-size: 11.5px; cursor: pointer; text-decoration: underline; }
.add-sub { border: 1px dashed #3a3a3a; background: transparent; color: #8ed1fc; border-radius: 10px; padding: 8px; font-size: 12.5px; cursor: pointer; }
.add-sub:hover { border-color: #8ed1fc; background: #0f1a22; }
.ed-video-wrap.subs-drag, #ed-video-wrap.subs-drag { cursor: grab; }


/* ================= planes y precios (versión web) ================= */
.plans { position: fixed; inset: 0; z-index: 1100; background: #0a0b0c; overflow-y: auto; padding: 28px 18px 48px; }
.plans[hidden] { display: none; }
.plans-card { position: relative; max-width: 1080px; margin: 0 auto; }
.plans-x { all: unset; position: absolute; top: 0; right: 0; width: 40px; height: 40px; display: grid; place-items: center; font-size: 28px; line-height: 1; color: #aab4bf; cursor: pointer; border-radius: 10px; }
.plans-x:hover { color: #fff; background: #1a1d21; }
.plans-x:focus-visible, .plan-btn:focus-visible, .plans-foot button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.plans h1 { margin: 8px 48px 6px 0; font: 800 clamp(28px, 4vw, 40px)/1.1 var(--display); color: #fff; letter-spacing: -.02em; }
.plans-card > p { margin: 0 48px 18px 0; color: #aab4bf; font-size: 15px; max-width: 60ch; }
.plans-msg { padding: 10px 14px; border: 1px solid var(--blue); border-radius: 10px; color: #fff !important; background: rgba(142,209,252,.1); max-width: none !important; }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 8px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px 20px; border: 1px solid #262b32; border-radius: 16px; background: #101215; }
.plan.plan-pop { border-color: var(--blue); }
.plan.cur { background: #14202a; border-color: var(--blue); }
.plan-tag { position: absolute; top: -11px; left: 18px; padding: 3px 10px; border-radius: 99px; background: var(--blue); color: #000; font: 700 12px var(--display); }
.plan h2 { margin: 0; font: 800 20px var(--display); color: #fff; }
.plan-price { display: flex; align-items: baseline; gap: 6px; color: #fff; }
.plan-price b { font: 800 34px/1 var(--display); letter-spacing: -.02em; }
.plan-price span { color: #8b95a1; font-size: 14px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1; color: #c9d1d9; font-size: 14px; line-height: 1.4; }
.plan li { padding-left: 20px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 8px; height: 5px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }
.plan li.no { color: #7d8791; }
.plan li.no::before { border-color: #4b535b; }
.plan-btn { all: unset; box-sizing: border-box; text-align: center; padding: 12px 14px; border-radius: 10px; background: var(--blue); color: #000; font: 800 15px var(--display); cursor: pointer; }
.plan-btn:hover { filter: brightness(1.08); }
.plan-btn[disabled], .plan-btn.ghost { background: #1a1d21; color: #aab4bf; cursor: default; filter: none; border: 1px solid #262b32; }
.plan-btn[aria-busy=true] { opacity: .6; cursor: wait; }
.plans-foot { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: #8b95a1; font-size: 13.5px; align-items: center; }
.plans-foot button { all: unset; cursor: pointer; color: #aab4bf; text-decoration: underline; text-underline-offset: 3px; }
.plans-foot button:hover { color: #fff; }
.plans-foot:empty { display: none; }
@media (max-width: 560px) { .plans-card > p, .plans h1 { margin-right: 44px; } .plan { padding: 20px 16px; } }
@media (prefers-reduced-motion: no-preference) { .plans:not([hidden]) .plan { animation: plan-in .22s ease-out both; } .plans:not([hidden]) .plan:nth-child(2) { animation-delay: .04s; } .plans:not([hidden]) .plan:nth-child(3) { animation-delay: .08s; } .plans:not([hidden]) .plan:nth-child(4) { animation-delay: .12s; } }
@keyframes plan-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- página de inicio pública ---------- */
body.is-landing { background: #0a0b0c; color: #fff; }
body.is-landing > main { display: none; }
body.is-landing > header.top { padding: 0; }
body.is-landing > header.top > .brand, body.is-landing > header.top > .spacer, body.is-landing > header.top > .health { display: none; }
.landing { color: #fff; background: #0a0b0c; min-height: 100vh; scroll-behavior: smooth; }
html:has(body.is-landing) { scroll-behavior: smooth; color-scheme: dark; }
.landing a { color: inherit; }
.landing :focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.l-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 14px max(20px, calc((100vw - 1140px) / 2)); background: rgba(10,11,12,.86); backdrop-filter: blur(12px); border-bottom: 1px solid #1b1f24; }
.l-brand { font: 700 22px/1 var(--display); letter-spacing: -.03em; text-decoration: none; }
.l-brand span { color: var(--blue); font-size: 1.25em; line-height: 0; }
.l-links { display: flex; gap: 26px; margin: 0 auto; }
.l-links a { color: #aab4bf; text-decoration: none; font-size: 14.5px; }
.l-links a:hover { color: #fff; }
.l-ghost, .l-pill { all: unset; cursor: pointer; box-sizing: border-box; padding: 9px 16px; border-radius: 99px; font: 600 14px var(--display); }
.l-ghost { color: #d5dce3; }
.l-ghost:hover { color: #fff; }
.l-pill { background: #fff; color: #0a0b0c; }
.l-pill:hover { background: var(--blue); }

.l-hero { max-width: 1140px; margin: 0 auto; padding: clamp(64px, 11vw, 140px) 20px 72px; text-align: center; }
.l-badge { display: inline-block; margin: 0 0 26px; padding: 7px 16px; border: 1px solid #252b32; border-radius: 99px; background: #101316; color: var(--blue); font-size: 13.5px; }
.l-hero h1 { max-width: none; margin: 0 auto 22px; font: 700 clamp(44px, 8.4vw, 104px)/.98 var(--display); letter-spacing: -.045em; color: #fff; }
.l-hero h1 em { font-style: normal; color: var(--blue); }
.l-sub { max-width: 58ch; margin: 0 auto 34px; color: #aab4bf; font-size: clamp(16px, 2vw, 19px); line-height: 1.55; }
.l-cta { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.l-main { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; padding: 17px 34px; border-radius: 99px; background: var(--blue); color: #04121b; font: 700 17px var(--display); transition: transform .15s, filter .15s; }
.l-main:hover { filter: brightness(1.07); transform: translateY(-1px); }
.l-main svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.l-sec { color: #d5dce3 !important; text-decoration: none; padding: 17px 20px; font: 600 16px var(--display); }
.l-sec:hover { color: #fff !important; text-decoration: underline; text-underline-offset: 4px; }
.l-note { margin: 18px 0 0; color: #7d8791; font-size: 13.5px; }

.l-demo { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2.4vw, 28px); margin: clamp(48px, 7vw, 84px) auto 0; max-width: 880px; }
.l-wide { flex: 1.5; aspect-ratio: 16/9; border-radius: 14px; border: 1px solid #252b32; background: linear-gradient(135deg, #16202a, #0e1318 70%); position: relative; overflow: hidden; }
.l-wide::before { content: ""; position: absolute; left: 36%; top: 22%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: #243342; }
.l-wide::after { content: ""; position: absolute; left: 28%; top: 52%; width: 38%; height: 70%; border-radius: 50% 50% 0 0; background: #243342; }
.l-wide span { position: absolute; left: 12px; bottom: 10px; z-index: 1; font-size: 12px; color: #8b95a1; }
.l-arrow { width: 40px; flex: none; fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.l-clips { flex: 1.5; display: flex; gap: clamp(6px, 1.2vw, 12px); }
.l-clip { flex: 1; aspect-ratio: 9/16; border-radius: 12px; border: 1px solid #252b32; background: linear-gradient(170deg, #1a2733, #0e1318); position: relative; overflow: hidden; }
.l-clip.c2 { background: linear-gradient(170deg, #20303a, #0e1318); }
.l-clip.c3 { background: linear-gradient(170deg, #17222e, #0c1015); }
.l-clip i { position: absolute; left: 50%; top: 24%; width: 38%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: #2c3e50; box-shadow: 0 48px 0 14px #2c3e50; }
.l-clip b { position: absolute; left: 6%; right: 6%; bottom: 9%; font: 700 clamp(9px, 1.25vw, 13px)/1.2 var(--display); text-align: center; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.8); }

.l-sec-wrap { max-width: 1140px; margin: 0 auto; padding: 72px 20px; scroll-margin-top: 56px; }
.l-sec-wrap h2 { font: 700 clamp(28px, 4.2vw, 44px)/1.08 var(--display); letter-spacing: -.03em; margin: 0 0 14px; color: #fff; max-width: 22ch; }
.l-lead { margin: 0 0 34px; color: #aab4bf; max-width: 56ch; font-size: 17px; }
.l-steps { list-style: none; margin: 38px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.l-steps li { padding: 24px; border: 1px solid #1f252b; border-radius: 16px; background: #0f1215; }
.l-steps b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #04121b; font: 700 16px var(--display); margin-bottom: 18px; }
.l-steps h3, .l-feats h3 { margin: 0 0 8px; font: 650 19px/1.2 var(--display); letter-spacing: -.015em; color: #fff; }
.l-steps p, .l-feats p { margin: 0; color: #aab4bf; font-size: 15px; line-height: 1.55; }
.l-feats { margin-top: 38px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); border-top: 1px solid #1f252b; }
.l-feats article { padding: 26px 24px 26px 0; border-bottom: 1px solid #1f252b; }
.l-plans { margin-top: 10px; }
.l-plans .plan h3 { margin: 0; font: 800 20px var(--display); color: #fff; }
.l-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1140px; margin: 0 auto; padding: 36px 20px 56px; border-top: 1px solid #1b1f24; color: #7d8791; font-size: 13.5px; }
.auth-x { all: unset; position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; display: grid; place-items: center; font-size: 28px; line-height: 1; color: #aab4bf; cursor: pointer; border-radius: 10px; }
.auth-x:hover { color: #fff; background: #1a1d21; }
.auth-x:focus-visible { outline: 2px solid var(--blue); }
@media (max-width: 720px) {
  .l-links { display: none; }
  .l-nav .l-ghost { margin-left: auto; }
  .l-demo { flex-direction: column; }
  .l-arrow { transform: rotate(90deg); }
  .l-wide, .l-clips { width: 100%; flex: none; }
  .l-clips { max-width: 340px; }
}
@media (prefers-reduced-motion: reduce) { .landing, html:has(body.is-landing) { scroll-behavior: auto; } .l-main { transition: none; } }

.plan-btn.ghost { background: transparent; border: 1px solid #3a424b; color: #fff; }
.plan-btn.ghost:hover { border-color: var(--blue); filter: none; }
