/* ============================================================ Tokens */
:root {
  --bg-0: #0c0d10;        /* fondo de la app, huecos entre paneles */
  --bg-1: #14161a;        /* paneles */
  --bg-2: #1a1d22;        /* cabeceras, superficies elevadas */
  --bg-3: #22252c;        /* hover */
  --bg-4: #2a2e36;        /* activo */
  --field: #0f1013;       /* campos de texto */
  --line: #23262d;
  --line-2: #2e323b;
  --text: #e6e8ec;
  --text-2: #a4a9b4;
  --text-3: #6b717d;
  --text-dim: var(--text-2);
  --accent: #5b8def;
  --accent-hi: #74a0f7;
  --accent-bg: rgba(91, 141, 239, .14);
  --accent-line: rgba(91, 141, 239, .45);
  --danger: #ef5a5a;
  --danger-bg: rgba(239, 90, 90, .14);
  --ok: #3fb26b;
  --x: #e5534b;
  --y: #4fb35c;
  --z: #4f86e8;
  --key-cam: #f5a524;
  --key-obj: #5b8def;
  --playhead: #f2545b;
  --tl-bg: #111215;
  --tl-ruler: #16181c;
  --tl-row-a: #131418;
  --tl-row-b: #15171b;
  --tl-row-sel: #1d2638;
  --border: var(--line);
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: var(--bg-0); color: var(--text);
  font: 12px/1.45 var(--font); letter-spacing: .1px;
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr) 168px 24px;
  grid-template-columns: minmax(0, 1fr) var(--agent-w, 380px);
  gap: 1px;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
body.no-agent { grid-template-columns: minmax(0, 1fr) 0; }
::selection { background: var(--accent-bg); }
/* En los campos de texto la selección se ve clara (para seleccionar todo y borrar). */
input::selection, textarea::selection { background: var(--accent); color: #fff; }
.hidden { display: none !important; }
.spacer { flex: 1; }

svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Scrollbars finas */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a2d34; border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #3a3e47; background-clip: content-box; border: 3px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================ Controles */
button {
  font: inherit; color: var(--text-2); background: transparent; border: 1px solid transparent;
  border-radius: var(--radius); cursor: pointer; white-space: nowrap; transition: background .12s, color .12s, border-color .12s;
}
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 28px; padding: 0 11px; color: var(--text); background: var(--bg-3); border-color: var(--line-2); font-weight: 500;
}
.btn:hover { background: var(--bg-4); border-color: #3a3f4a; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--bg-3); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn.primary:disabled { opacity: .5; cursor: default; }
.btn.active { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent-hi); }
.btn.grow { flex: 1; }
.btn kbd { margin-left: 2px; background: rgba(255, 255, 255, .14); border: none; color: inherit; }
.btn svg { width: 15px; height: 15px; }

.ib {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; color: var(--text-2);
}
.ib:hover { background: var(--bg-3); color: var(--text); }
.ib.active { background: var(--accent-bg); color: var(--accent-hi); }
.ib.sm { width: 24px; height: 24px; }
.ib.sm svg { width: 15px; height: 15px; }
.ib.danger { border-color: var(--line-2); width: 28px; height: 28px; }
.ib.danger:hover { background: var(--danger-bg); color: var(--danger); border-color: rgba(239, 90, 90, .4); }

input, select, textarea {
  font: inherit; color: var(--text); background: var(--field);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  height: 26px; padding: 0 8px; min-width: 0; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
input:hover, select:hover { border-color: #3a3f4a; }
input:focus, textarea:focus, select:focus-visible { /* select: solo con teclado; con el ratón no se queda marcado */ border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 141, 239, .15); }
input:disabled { color: var(--text-2); background: var(--bg-2); cursor: default; }
input[type=number] { font-family: var(--mono); font-size: 11.5px; }
input[type=number]::-webkit-inner-spin-button { display: none; }
select {
  appearance: none; padding-right: 24px; cursor: pointer;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b919c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 9px center;
}
select option { background: #1b1e24; color: var(--text); }
input[type=color] { padding: 2px; width: 100%; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: none; border-radius: 2px; }

kbd {
  display: inline-block; min-width: 18px; padding: 1px 5px; text-align: center;
  font: 500 10.5px/1.4 var(--font); color: var(--text-2);
  background: var(--bg-3); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px;
}

/* Interruptor */
.toggle { display: flex; align-items: center; gap: 10px; padding: 5px 0; cursor: pointer; color: var(--text); }
.toggle input { display: none; }
.toggle .sw { position: relative; width: 28px; height: 16px; border-radius: 10px; background: var(--bg-4); transition: background .15s; flex: none; }
.toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #c9cdd5; transition: transform .15s; }
.toggle input:checked + .sw { background: var(--accent); }
.toggle input:checked + .sw::after { transform: translateX(12px); background: #fff; }
.toggle input:disabled + .sw { opacity: .4; }
.toggle small { color: var(--text-3); margin-left: 4px; }

/* ============================================================ Barra superior */
#toolbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 6px;
  /* A la derecha quedan los botones de la ventana (minimizar, maximizar, cerrar) que dibuja el sistema. */
  padding: 0 calc(100vw - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100vw) + 10px) 0 12px;
  background: var(--bg-1); border-bottom: 1px solid var(--line);
  -webkit-app-region: drag; /* arrastrar mueve la ventana; doble clic la maximiza */
}
#toolbar button, #toolbar select, #toolbar input, #toolbar a, #toolbar .project-chip { -webkit-app-region: no-drag; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .2px; margin-right: 10px; }
.brand .logo { width: 22px; height: 22px; object-fit: contain; }
.brand b { color: var(--text-2); font-weight: 500; }
.tb-group { display: flex; align-items: center; gap: 2px; }
.tb-sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; }
.project-chip {
  display: flex; align-items: center; gap: 8px; margin-left: 12px; padding: 0 10px; height: 28px;
  border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  max-width: 340px;
}
#projName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.badge {
  font: 600 10.5px var(--font); color: var(--accent-hi); background: var(--accent-bg);
  padding: 2px 6px; border-radius: 4px; letter-spacing: .3px;
}
.agent-toggle.active { color: var(--accent-hi); background: var(--accent-bg); }

/* ============================================================ Paneles */
#main { grid-column: 1; display: grid; grid-template-columns: 228px minmax(0, 1fr) 316px; gap: 1px; min-height: 0; background: var(--bg-0); }
.panel { background: var(--bg-1); overflow-y: auto; min-height: 0; }
.panel-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  height: 36px; padding: 0 8px 0 12px; background: var(--bg-1); border-bottom: 1px solid var(--line);
}
.panel-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--text-2); }
.panel-title svg { width: 14px; height: 14px; color: var(--text-3); }

/* Outliner */
#objList { list-style: none; margin: 0; padding: 6px; }
#objList li {
  position: relative; display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text);
}
#objList li:hover { background: var(--bg-3); }
#objList li.sel { background: var(--accent-bg); box-shadow: inset 2px 0 0 var(--accent); }
#objList li .ico { display: flex; color: var(--text-3); }
#objList li .ico svg { width: 15px; height: 15px; }
#objList li.sel .ico { color: var(--accent-hi); }
#objList li.cam .ico { color: var(--key-cam); }
#objList li .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#objList li .badge { color: var(--key-obj); background: rgba(91, 141, 239, .12); font-family: var(--mono); font-weight: 500; }
#objList li.cam .badge { color: var(--key-cam); background: rgba(245, 165, 36, .12); }
#objList li .badge:empty { display: none; }
#objList li.sep-after { margin-bottom: 9px; }
#objList li.sep-after::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -5px; height: 1px; background: var(--line); }
#objList .empty-scene { padding: 18px 10px; color: var(--text-3); text-align: center; line-height: 1.6; }

/* Inspector */
.sec { border-bottom: 1px solid var(--line); }
.sec-h {
  display: flex; align-items: center; gap: 6px; margin: 0; height: 34px; padding: 0 12px 0 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--text-2);
  cursor: pointer; background: var(--bg-1);
}
.sec-h:hover { color: var(--text); }
.sec-h .chev { width: 14px; height: 14px; color: var(--text-3); transition: transform .15s; }
.sec.collapsed .chev { transform: rotate(-90deg); }
.sec.collapsed .sec-body { display: none; }
.sec-h .key-dot { width: 10px; height: 10px; color: var(--key-obj); margin-left: auto; }
.sec-body { padding: 2px 12px 12px; display: flex; flex-direction: column; gap: 6px; }

.row { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 8px; color: var(--text-2); }
.row > input, .row > select, .row > .unit-input { width: 100%; }
.unit-input { position: relative; display: block; }
.unit-input input { width: 100%; padding-right: 22px; }
.unit-input em { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--text-3); pointer-events: none; }

.vec { display: grid; grid-template-columns: 72px repeat(3, minmax(0, 1fr)); gap: 4px; align-items: center; color: var(--text-2); }
.vec > span { padding-right: 4px; }
.axis { position: relative; display: block; }
.axis i {
  position: absolute; left: 1px; top: 1px; bottom: 1px; width: 15px; display: flex; align-items: center; justify-content: center;
  font: 600 9.5px var(--font); font-style: normal; color: #fff; border-radius: 3px 0 0 3px; cursor: ew-resize; opacity: .85;
}
.axis.x i { background: var(--x); } .axis.y i { background: var(--y); } .axis.z i { background: var(--z); }
.axis i:hover { opacity: 1; }
.axis input { width: 100%; padding: 0 3px 0 19px; font-size: 11px; letter-spacing: -.2px; }
body.scrubbing, body.scrubbing * { cursor: ew-resize !important; }

.buttons { display: flex; gap: 6px; margin-top: 6px; }
.note { margin: 2px 0; padding: 8px 10px; font-size: 11.5px; color: var(--text-2); background: var(--bg-2); border-radius: var(--radius); border: 1px solid var(--line); }
.shortcuts { gap: 5px; }
.shortcuts div { display: flex; align-items: center; gap: 3px; color: var(--text-2); }
.shortcuts span { margin-left: auto; text-align: right; }

/* ============================================================ Visor */
#viewport { position: relative; min-width: 0; min-height: 0; background: #08090b; overflow: hidden; }
#viewport.panning, #viewport.panning * { cursor: grabbing !important; }
#zoomBadge {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 600;
  background: rgba(20, 22, 26, .82); backdrop-filter: blur(8px); color: var(--text); border: 1px solid rgba(255, 255, 255, .08);
  font-variant-numeric: tabular-nums;
}
#zoomBadge:hover { background: var(--bg-4); }
#view { position: absolute; display: block; outline: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 10px 40px rgba(0, 0, 0, .55); }
.vp-tools, .vp-switch {
  position: absolute; display: flex; gap: 2px; padding: 3px;
  background: rgba(20, 22, 26, .82); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .06); border-radius: 9px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}
.vp-tools { top: 12px; left: 12px; flex-direction: column; }
.vp-tools .ib { width: 32px; height: 32px; border-radius: 6px; }
.vp-sep { height: 1px; margin: 3px 4px; background: var(--line-2); }
.vp-switch { top: 12px; left: 50%; transform: translateX(-50%); }
.vp-switch button { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; color: var(--text-2); border-radius: 6px; font-weight: 500; }
.vp-switch button:hover { color: var(--text); background: var(--bg-3); }
.vp-switch button.active { color: var(--text); background: var(--bg-4); box-shadow: inset 0 0 0 1px var(--line-2); }
.vp-switch #btnCamView.active { color: #ffd08a; background: rgba(245, 165, 36, .16); box-shadow: inset 0 0 0 1px rgba(245, 165, 36, .4); }
.vp-switch svg { width: 15px; height: 15px; }
#viewLabel {
  position: absolute; bottom: 12px; left: 12px; padding: 4px 9px; border-radius: 6px;
  background: rgba(20, 22, 26, .75); backdrop-filter: blur(8px); color: var(--text-2); font-size: 11px; pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .05); transition: opacity .3s;
}
#viewLabel.cam { color: #ffd08a; }
body.playing:not(.working) #viewLabel, body.playing .vp-tools { opacity: 0; pointer-events: none; }
/* Con un proceso en marcha (Whisper, traducción): el rótulo con un círculo que gira */
body.working #viewLabel { display: flex; align-items: center; gap: 7px; color: var(--text); font-variant-numeric: tabular-nums; }
body.working #viewLabel::before { content: ''; width: 9px; height: 9px; flex: none; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
#frameBox { position: absolute; pointer-events: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 10px 40px rgba(0, 0, 0, .55); }
body.cam-view .vp-tools .ib[data-mode] { opacity: .35; pointer-events: none; }
#dropHint {
  position: absolute; inset: 14px; display: none; align-items: center; justify-content: center; pointer-events: none;
  border: 1.5px dashed var(--accent); border-radius: 12px; background: rgba(15, 30, 60, .55); backdrop-filter: blur(4px);
}
#dropHint > div { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-2); }
#dropHint svg { width: 34px; height: 34px; color: var(--accent-hi); }
#dropHint b { color: var(--text); font-size: 15px; }
#viewport.drop #dropHint { display: flex; }

/* ============================================================ Timeline */
#bottom { grid-column: 1; display: grid; grid-template-rows: 44px minmax(0, 1fr); background: var(--bg-1); min-height: 0; }
#transport { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 10px; border-bottom: 1px solid var(--line); }
.tr-left, .tr-right { display: flex; align-items: center; gap: 6px; }
.tr-right { justify-content: flex-end; }
#previewQuality { height: 28px; font-size: 12px; color: var(--text-2); }
.tr-center { display: flex; align-items: center; gap: 2px; }
#transport .play {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin: 0 4px;
  border-radius: 50%; background: var(--text); color: #0c0d10;
}
#transport .play:hover { background: #fff; transform: scale(1.04); }
#transport .play svg { width: 15px; height: 15px; margin-left: 2px; }
body.playing #transport .play svg { margin-left: 0; }
.timecode {
  display: flex; align-items: baseline; gap: 6px; margin-left: 12px; padding: 4px 10px; min-width: 200px;
  font: 500 13px var(--mono); color: var(--text); background: var(--field); border: 1px solid var(--line); border-radius: var(--radius);
}
.timecode span { color: var(--text-3); font-size: 11.5px; }
.timecode em { font-style: normal; margin-left: auto; padding-left: 10px; color: var(--accent-hi); font-size: 11.5px; }
.btn.key-cam { color: #ffd08a; background: rgba(245, 165, 36, .1); border-color: rgba(245, 165, 36, .3); }
.btn.key-cam:hover { background: rgba(245, 165, 36, .2); border-color: rgba(245, 165, 36, .55); }
#btnAutoKey svg { color: var(--text-3); }
#btnAutoKey.active { background: var(--danger-bg); border-color: rgba(239, 90, 90, .45); color: #ff9b9b; }
#btnAutoKey.active svg { color: var(--danger); animation: pulse 1.4s infinite; }
#timeline { width: 100%; height: 100%; display: block; min-height: 0; }

/* ============================================================ Barra de estado */
#statusbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 12px;
  background: var(--bg-1); border-top: 1px solid var(--line); color: var(--text-3); font-size: 11px;
}
#statusbar > span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
#statusbar svg { width: 13px; height: 13px; }
#stGpu.gpu-ok svg { color: var(--ok); }

/* ============================================================ Menús, tooltips, toasts */
.dropdown { position: relative; }
.menu {
  position: fixed; z-index: 30; display: flex; flex-direction: column; min-width: 220px; max-height: 70vh; overflow-y: auto; padding: 5px;
  background: #1b1e23; border: 1px solid var(--line-2); border-radius: 9px; box-shadow: var(--shadow);
}
.menu button { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px; text-align: left; color: var(--text); border-radius: 5px; }
.menu button svg { color: var(--text-3); }
.menu button small { margin-left: auto; color: var(--text-3); font-size: 11px; }
.menu button:hover { background: var(--accent); color: #fff; }
.menu button:hover svg, .menu button:hover small { color: rgba(255, 255, 255, .85); }
.menu-label { padding: 8px 10px 4px; font-size: 10px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; color: var(--text-3); }

#tooltip {
  position: fixed; z-index: 60; pointer-events: none; padding: 5px 8px; max-width: 280px;
  font-size: 11.5px; color: var(--text); background: #25282f; border: 1px solid var(--line-2); border-radius: 5px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4); opacity: 0; transition: opacity .12s;
}
#tooltip.show { opacity: 1; }

#toast {
  position: fixed; bottom: 44px; left: 50%; z-index: 50; transform: translate(-50%, 10px);
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 8px;
  background: #22252c; border: 1px solid var(--line-2); box-shadow: var(--shadow); color: var(--text);
  opacity: 0; transition: .2s; pointer-events: none; max-width: 560px;
}
#toast::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { border-color: rgba(239, 90, 90, .4); }
#toast.err::before { background: var(--danger); }

/* ============================================================ Diálogos */
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(5, 6, 8, .6); backdrop-filter: blur(3px); }
.dialog { width: 560px; padding: 22px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); }
.dialog-head { margin-bottom: 18px; }
.dialog h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.dialog .sub { margin: 0; color: var(--text-2); }
.dialog .grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; }
.dialog .grid > * { min-width: 0; }
.dialog .grid input:not([type=checkbox]), .dialog .grid select { width: 100%; }
.dialog .grid label { display: flex; flex-direction: column; gap: 5px; color: var(--text-2); font-weight: 500; }
.dialog .grid .range { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.dialog .grid .toggle { flex-direction: row; grid-column: 1 / -1; color: var(--text); font-weight: 400; }
.dialog .buttons { justify-content: flex-end; margin-top: 20px; }
.dialog .buttons .btn { height: 32px; padding: 0 16px; }
#expGpu { margin-top: 16px; padding: 9px 12px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); font-size: 11.5px; }
#expGpu b { color: var(--text); font-weight: 600; }
#expGpu b.ok { color: var(--ok); }
#expProgress { margin-top: 14px; }
.bar { height: 6px; background: var(--field); border-radius: 6px; overflow: hidden; }
#expBar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); border-radius: 6px; transition: width .1s; }
#expStatus { margin-top: 8px; color: var(--text-2); font: 11.5px var(--mono); white-space: pre-wrap; max-height: 120px; overflow: auto; user-select: text; }

.aspect-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.aspect-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 12px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); white-space: normal; color: var(--text);
}
.aspect-card:hover { border-color: #3d424d; background: var(--bg-3); }
.aspect-card.sel { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 0 0 3px rgba(91, 141, 239, .12); }
.aspect-card .frame { height: 60px; display: flex; align-items: center; justify-content: center; }
.aspect-card .frame i { display: block; border: 1.5px solid var(--text-3); border-radius: 4px; }
.aspect-card.sel .frame i { border-color: var(--accent-hi); background: rgba(91, 141, 239, .18); }
.aspect-card b { font-size: 14px; }
.field-label { margin-bottom: 8px; color: var(--text-2); font-size: 12px; }
.style-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.style-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; text-align: left; white-space: normal; min-width: 0;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--text); cursor: pointer;
}
.style-card:hover { border-color: #3d424d; background: var(--bg-3); }
.style-card.sel { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 0 0 3px rgba(91, 141, 239, .12); }
.style-card b { font-size: 13px; }
.style-card small { color: var(--text-2); font-size: 11px; line-height: 1.35; }
.aspect-card small { color: var(--text-2); font-size: 11px; text-align: center; line-height: 1.35; }

/* ============================================================ Asistente */
#agent { grid-column: 2; grid-row: 2 / 4; position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--bg-1); }
body.no-agent #agent { display: none; }
#agentResize { position: absolute; left: -3px; top: 0; bottom: 0; width: 6px; cursor: ew-resize; z-index: 3; }
#agentResize:hover { background: var(--accent); opacity: .6; }
.agent-head { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--line); }
.agent-title { flex: 1; display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13px; }
.agent-avatar {
  display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px;
  background: linear-gradient(135deg, #6f8cff, #a46bff); color: #fff;
}
.agent-avatar svg { width: 14px; height: 14px; }
.agent-head select { width: 124px; height: 28px; }
.agent-head #agentEffort { width: 96px; }
.agent-head #agentModel { width: 150px; }
.key-notes { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 12px; line-height: 1.5; display: flex; flex-direction: column; gap: 4px; }
.key-notes b { color: var(--text); font-weight: 600; }
.key-notes code { font-family: var(--mono); font-size: 11.5px; color: var(--text); }
.dialog .buttons .grow { flex: 1; }

#agentLog { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 14px; user-select: text; }
.msg { line-height: 1.55; overflow-wrap: anywhere; font-size: 12.5px; }
.msg.user { align-self: flex-end; max-width: 86%; padding: 8px 12px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 12px 12px 4px 12px; }
.msg.assistant { display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.msg .text h4 { margin: 8px 0 2px; font-size: 12.5px; }
.msg ul, .msg ol { margin: 4px 0; padding-left: 18px; }
.msg li { margin: 2px 0; }
.msg code { background: var(--field); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font: 11.5px var(--mono); }
.msg pre { background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin: 4px 0; overflow-x: auto; font: 11.5px/1.45 var(--mono); white-space: pre; }
.tool { border: 1px solid var(--line); border-radius: 7px; background: var(--bg-2); font-size: 11.5px; overflow: hidden; }
.tool-head { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; cursor: pointer; }
.tool-head:hover { background: var(--bg-3); }
.tool-head .lbl { font-weight: 600; color: var(--text); }
.tool-head .det { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.tool .st { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.tool.running .st { background: var(--key-cam); box-shadow: 0 0 0 3px rgba(245, 165, 36, .18); animation: pulse 1s infinite; }
.tool.ok .st { background: var(--ok); }
.tool.error .st { background: var(--danger); }
.tool-body { margin: 0 !important; border: none !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important; max-height: 260px; overflow: auto; white-space: pre-wrap !important; color: var(--text-2); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 5px; }
.thumbs img { width: 100%; border-radius: 6px; border: 1px solid var(--line-2); cursor: zoom-in; display: block; transition: border-color .12s; }
.thumbs img:hover { border-color: var(--accent); }
.msg .err { color: #ffb1b1; background: var(--danger-bg); border: 1px solid rgba(239, 90, 90, .3); border-radius: 7px; padding: 8px 10px; white-space: pre-wrap; font-size: 11.5px; }
.msg .meta { color: var(--text-3); font-size: 11px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg .meta button { height: 22px; padding: 0 8px; font-size: 11px; color: var(--text-2); background: var(--bg-3); border: 1px solid var(--line-2); }
.msg .meta button:hover { color: var(--text); background: var(--bg-4); }
.tool-group { border: 1px solid var(--line); border-radius: 7px; background: var(--bg-2); font-size: 11.5px; overflow: hidden; }
.tool-group .chev { width: 12px; height: 12px; flex: none; color: var(--text-3); transform: rotate(-90deg); transition: transform .15s; }
.tool-group.open .chev { transform: none; }
.tool-group .tool-head.has-error .lbl { color: #ffb1b1; }
.group-body { display: flex; flex-direction: column; gap: 5px; }
.group-body:not(:empty) { padding: 6px; border-top: 1px solid var(--line); }
.agent-status { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); font-size: 12px; }
.agent-status .spin { width: 12px; height: 12px; flex: none; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.agent-status .as-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.agent-status .as-meta { flex: none; font: 11px var(--mono); color: var(--text-3); }
.typing { display: flex; gap: 4px; padding: 6px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: pulse 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

.empty { margin: auto 0; display: flex; flex-direction: column; gap: 8px; }
.empty .hello { font-size: 18px; font-weight: 600; letter-spacing: -.2px; }
.empty p { color: var(--text-2); margin: 0 0 8px; }
.suggest {
  text-align: left; white-space: normal; line-height: 1.45; padding: 9px 12px; color: var(--text-2);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px;
}
.suggest:hover { color: var(--text); border-color: var(--accent-line); background: var(--bg-3); }
.show-older { display: block; margin: 0 auto 12px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer; }
.show-older:hover { color: var(--text); border-color: var(--accent-line); }

.agent-input { padding: 10px 12px 12px; }
.composer { border: 1px solid var(--line-2); border-radius: 10px; background: var(--field); transition: border-color .12s, box-shadow .12s; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 141, 239, .14); }
.composer textarea {
  display: block; width: 100%; resize: none; height: auto; min-height: 40px; max-height: 220px;
  padding: 10px 12px 4px; border: none; background: transparent; box-shadow: none !important; line-height: 1.5;
}
.composer-foot { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 6px 12px; }
.composer-foot .hint { color: var(--text-3); font-size: 10.5px; }
.composer-foot .foot-left { display: flex; align-items: center; gap: 4px; margin-left: -8px; min-width: 0; }
.plan-bar { margin-bottom: 8px; padding: 6px 8px 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); }
.plan-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); }
.plan-row > svg { width: 14px; height: 14px; color: var(--accent-hi); flex: none; }
.plan-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.plan-row .btn { height: 24px; padding: 0 8px; font-size: 11px; }
.plan-row .ib { width: 24px; height: 24px; }
.plan-bar .bar { height: 4px; margin-top: 6px; }
.plan-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); border-radius: 4px; transition: width .3s; }
.attach-chip { display: flex; align-items: center; gap: 6px; margin: 8px 8px 0; padding: 4px 4px 4px 9px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-3); font-size: 11.5px; }
.attach-chip > svg { width: 14px; height: 14px; color: var(--accent-hi); flex: none; }
.attach-chip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip .ib { width: 22px; height: 22px; }
#agent.drop .composer { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 141, 239, .25); }
.audio-chip { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--text-2); font-size: 11.5px; }
.audio-chip svg { width: 14px; height: 14px; color: var(--accent-hi); flex: none; }
.whisper-grid { margin: 4px 0 6px; }
.ib.cc { width: auto; padding: 0 6px; font: 700 10.5px var(--mono); letter-spacing: .5px; }
.ib.cc.active { color: #f0abfc; }
.dialog.wide-subs { width: 640px; }
.subs-actions { grid-column: 1 / -1; display: flex; gap: 6px; justify-content: flex-end; }
.subs-actions .btn { height: 30px; }
.subs-list { margin-top: 14px; max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); padding-top: 10px; }
.subs-row { display: grid; grid-template-columns: 70px 70px minmax(0, 1fr) 28px; gap: 6px; align-items: center; }
.subs-row input { height: 28px; min-width: 0; font-variant-numeric: tabular-nums; }
.subs-row.now input[type=text] { border-color: #e879f9; }
.subs-empty { color: var(--text-2); font-size: 12px; padding: 8px 0; }
.dialog .grid .full { grid-column: 1 / -1; }
.whisper-state { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; color: var(--text-2); font-size: 11.5px; }
.whisper-state .ok { color: var(--ok); }
.whisper-state .btn { height: 28px; }
.dl-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.dl-row b { color: var(--text); }
#wmBar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); border-radius: 6px; transition: width .15s; }
#wmError { margin: 10px 0 0; }
.composer-foot kbd { font-size: 9.5px; padding: 0 4px; }
.send { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; }
.send:hover { background: var(--accent-hi); }
.send.danger { background: var(--danger); }
.send svg { width: 16px; height: 16px; stroke-width: 2.2; }

#lightbox { position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .82); cursor: zoom-out; }
#lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 8px; box-shadow: var(--shadow); }
#projName.dirty::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-radius: 50%; background: var(--key-cam); vertical-align: middle; }

/* ---------- Proyectos ---------- */
.project-chip { padding-right: 3px; }
.project-chip .ib.sm { width: 22px; height: 22px; }
.project-chip .ib.sm svg { width: 13px; height: 13px; }
.field-full { display: flex; flex-direction: column; gap: 5px; color: var(--text-2); font-weight: 500; margin-bottom: 14px; }
.field-full input, .field-full select { width: 100%; height: 32px; font-size: 13px; }
.form-error { margin: -6px 0 12px; color: #ff9b9b; font-size: 11.5px; }
.dialog.wide { width: 860px; max-width: calc(100vw - 40px); }
.dialog.narrow { width: 420px; }
/* Biblioteca de canciones desde el editor */
.lib-dialog { width: 620px; max-width: calc(100vw - 40px); }
.lib-dialog #libSearch { width: 100%; height: 34px; font-size: 13px; margin-bottom: 10px; }
.lib-list { height: min(56vh, 520px); overflow-y: auto; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-0, var(--bg-2)); }
.lib-artist { display: flex; align-items: center; gap: 10px; padding: 10px 12px 6px; position: sticky; top: 0; background: var(--bg-1); border-bottom: 1px solid var(--line-2); z-index: 1; }
.lib-artist b { font-size: 13px; }
.lib-artist small { color: var(--text-2); }
.lib-av { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--bg-3); font-size: 11px; font-weight: 700; color: var(--text-2); }
.lib-av img { width: 100%; height: 100%; object-fit: cover; }
.lib-song { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; width: 100%; padding: 8px 12px 8px 48px; background: none; border: 0; border-bottom: 1px solid var(--line-1, rgba(255,255,255,.04)); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.lib-song:hover { background: var(--bg-2); }
.lib-song .t { min-width: 0; }
.lib-song .t span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-song .t small { display: block; color: var(--text-2); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-song .tag { font-size: 11px; padding: 2px 7px; border-radius: 99px; background: var(--bg-3); color: var(--text-2); white-space: nowrap; }
.lib-song .tag.ok { background: rgba(70, 190, 120, .16); color: #6fd39a; }
.lib-song .tag.no { background: rgba(240, 160, 60, .14); color: #f0b060; }
.lib-song .dur { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 12px; }
.lib-empty { padding: 40px 20px; text-align: center; color: var(--text-2); }
.dialog.narrow > input { width: 100%; height: 32px; font-size: 13px; }
.dialog .path { font-family: var(--mono); font-size: 11px; color: var(--text); user-select: text; }
.dialog .buttons.split { justify-content: space-between; }
.dialog .buttons.split > div { display: flex; gap: 6px; }

/* ---------- Pestañas del panel izquierdo ---------- */
.tabbar { display: flex; gap: 2px; height: 100%; }
.tab { display: flex; align-items: center; gap: 6px; padding: 0 9px; height: 100%; border-radius: 0; color: var(--text-3); font-weight: 600; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; border-bottom: 2px solid transparent; }
.tab svg { width: 14px; height: 14px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
#outliner .panel-head { padding-left: 4px; }
#outliner.sounds-tab #addWrap, #outliner.music-tab #addWrap { display: none; }

/* ---------- Panel de sonidos ---------- */
.snd-pane { display: flex; flex-direction: column; height: calc(100% - 36px); }
.snd-tools { padding: 8px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); }
.snd-tools input { width: 100%; height: 28px; }
.seg { display: flex; padding: 2px; gap: 2px; background: var(--field); border: 1px solid var(--line); border-radius: 6px; }
.seg button { flex: 1; height: 24px; font-size: 11px; font-weight: 600; color: var(--text-3); border-radius: 4px; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--bg-4); color: var(--text); }
.snd-list { flex: 1; overflow-y: auto; padding: 4px 6px 8px; }
.snd-cat { padding: 10px 6px 4px; font-size: 10px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; color: var(--text-3); }
.snd-row { display: flex; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 5px; cursor: grab; }
.snd-row:hover { background: var(--bg-3); }
.snd-row .snd-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.snd-row b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snd-row small { color: var(--text-3); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snd-row .snd-play { color: var(--teal, #2ec4b6); }
.snd-row .snd-play svg { width: 12px; height: 12px; }
.snd-row .snd-add { opacity: 0; }
.snd-row:hover .snd-add { opacity: 1; }
.snd-empty { padding: 22px 8px; text-align: center; color: var(--text-3); line-height: 1.7; }
/* Pestaña Música: la canción del video arriba (volumen y quitar) y la biblioteca debajo. */
.mus-now { padding: 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.mus-now .mus-cur { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; }
.mus-now .mus-cur svg.mus-ico { width: 14px; height: 14px; color: #2ec4b6; flex: none; }
.mus-now .mus-cur .snd-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.mus-now .mus-cur b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mus-now small { color: var(--text-3); font-size: 10.5px; }
.mus-now .mus-vol { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-2); }
.mus-now .mus-vol input { flex: 1; }
.mus-now .mus-vol span { width: 38px; text-align: right; font-family: var(--mono); font-size: 11px; }
.snd-row.mus-row { cursor: default; }
.snd-row .btn.sm { height: 22px; padding: 0 8px; font-size: 11px; }
.rt-music { display: flex; gap: 6px; align-items: center; }
.rt-music select { flex: 1; min-width: 0; }
.snd-row.mus-row.on b { color: #2ec4b6; }
.snd-row .mus-use { opacity: 0; }
.snd-row:hover .mus-use, .snd-row .mus-use.on { opacity: 1; }
.snd-row .mus-del { opacity: 0; }
.snd-row:hover .mus-del { opacity: .7; }
.snd-mix { padding: 8px 10px 0; border-top: 1px solid var(--line); gap: 8px; }
.snd-mix small { color: var(--text-3); margin-left: auto; }
.snd-foot { padding: 8px; border-top: 1px solid var(--line); display: flex; }
.fs-setup { margin: 8px 4px; padding: 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); display: flex; flex-direction: column; gap: 8px; color: var(--text-2); line-height: 1.5; }
.fs-setup b { color: var(--text); font-size: 13px; }
.fs-setup p, .fs-setup ol { margin: 0; }
.fs-setup ol { padding-left: 18px; }
.fs-setup a { color: var(--accent-hi); }
.fs-setup input { width: 100%; height: 28px; }

/* ---------- Inspector: sonido ---------- */
.sec-h .snd-dot { width: 13px; height: 13px; color: #2ec4b6; margin-left: auto; }
.snd-info { display: flex; flex-direction: column; padding: 6px 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; }
.snd-info b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snd-info small { color: var(--text-3); font-size: 11px; }
.range-row { display: flex; align-items: center; gap: 8px; }
.range-row em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--text-2); min-width: 44px; text-align: right; }
input[type=range] { flex: 1; height: 26px; padding: 0; background: transparent; border: none; box-shadow: none !important; -webkit-appearance: none; appearance: none; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--bg-4); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #e6e8ec; border: 2px solid var(--accent); }
#btnMute.active { color: var(--danger); background: var(--danger-bg); }

/* ============================================================ Pantalla de inicio (canales y proyectos) */
#home {
  position: fixed; inset: 44px 0 0 0; z-index: 30; display: grid; grid-template-columns: 252px minmax(0, 1fr);
  gap: 1px; background: var(--bg-0);
}
body.home #main, body.home #bottom, body.home #statusbar, body.home #agent { visibility: hidden; }
body.home #toolbar .tb-group:not(:first-of-type), body.home #toolbar [data-action="new"], body.home #toolbar [data-action="open"],
body.home #toolbar [data-action="save"], body.home #toolbar [data-action="import"], body.home .project-chip,
body.home #toolbar .tb-sep, body.home #btnAgent { display: none; }
body.home #toolbar [data-action="home"] { color: var(--accent-hi); background: var(--accent-bg); }

.home-side { display: flex; flex-direction: column; min-height: 0; background: var(--bg-1); }
.home-nav { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.home-nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; text-align: left; color: var(--text-2);
}
.home-nav button:hover { background: var(--bg-3); color: var(--text); }
.home-nav button.sel { background: var(--bg-4); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.home-nav button.create { color: var(--accent-hi); }
.home-nav button.create:hover { background: var(--accent-bg); }
.home-nav .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.home-nav .ct { color: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.home-nav .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.home-nav .lbl { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 4px; color: var(--text-3); font-size: 10.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.home-side-foot { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.home-side-foot small { color: var(--text-3); font-size: 10.5px; }
.home-side-foot .path { font-family: var(--mono); font-size: 10.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: text; }
.home-foot-btns { display: flex; gap: 4px; margin-top: 6px; }
.home-foot-btns .btn { flex: 1; height: 26px; padding: 0 8px; }

.home-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg-0); }
.home-head { display: flex; align-items: center; gap: 16px; padding: 22px 28px 18px; }
.home-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.home-title h1 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: .1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-title p { margin: 0; color: var(--text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-actions { display: flex; align-items: center; gap: 6px; }
.home-actions .btn { height: 32px; padding: 0 14px; }

.home-tools { display: flex; align-items: center; gap: 8px; padding: 0 28px 14px; border-bottom: 1px solid var(--line); }
.home-search {
  display: flex; align-items: center; gap: 8px; width: 300px; height: 30px; padding: 0 10px;
  background: var(--field); border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--text-3);
}
.home-search:focus-within { border-color: var(--accent-line); }
.home-search input { flex: 1; min-width: 0; height: 28px; border: 0; background: transparent; padding: 0; outline: none; }
#homeSort { height: 30px; }

.home-grid {
  flex: 1; overflow-y: auto; padding: 18px 28px 28px; display: grid; gap: 16px; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(208px, 1fr));
  /* Filas a la altura de su tarjeta: con overflow: hidden la tarjeta no tiene alto mínimo y, si no caben todas,
     el grid aplastaba las filas en vez de dejar hacer scroll. */
  grid-auto-rows: max-content;
}
.home-card {
  position: relative; display: flex; flex-direction: column; padding: 0; text-align: left; overflow: hidden;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.home-card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 141, 239, .12); }
.home-card.current { border-color: var(--accent-line); }
.home-card .thumb {
  position: relative; aspect-ratio: 16 / 9; background: #0b0c0f center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--text-3);
}
.home-card .thumb.tall { background-size: contain; }
.home-card .thumb > svg { width: 30px; height: 30px; opacity: .7; }
.home-card .tags .badge { background: rgba(12, 13, 16, .82); }
.home-card .tags .badge.style { color: #ffd9a8; background: rgba(40, 26, 10, .85); }
/* Arriba a la izquierda; a la derecha queda sitio para el botón de más opciones. */
.home-card .top { position: absolute; left: 8px; right: 40px; top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.home-card .tags .open-tag { background: var(--accent); color: #fff; }
.home-card .more {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  background: rgba(12, 13, 16, .78); border: 1px solid var(--line-2); color: var(--text); opacity: 0;
}
.home-card:hover .more, .home-card .more.on { opacity: 1; }
.home-card .more:hover { background: var(--bg-4); }
.home-card .meta { padding: 10px 12px 11px; display: flex; flex-direction: column; gap: 3px; }
.home-card .meta b { font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-card .meta small { color: var(--text-3); font-size: 11px; display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; }
.home-card.new {
  align-items: center; justify-content: center; gap: 10px; min-height: 180px; color: var(--text-2);
  background: transparent; border: 1px dashed var(--line-2);
}
.home-card.new svg { width: 20px; height: 20px; }
.home-card.new:hover { color: var(--accent-hi); background: var(--accent-bg); }
.home-empty { grid-column: 1 / -1; padding: 60px 0; text-align: center; color: var(--text-3); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.home-empty b { color: var(--text); font-size: 15px; font-weight: 600; }
.home-empty svg { width: 40px; height: 40px; color: var(--text-3); }
.home-empty .btn { height: 32px; padding: 0 16px; }

.home-menu {
  position: fixed; z-index: 35; min-width: 196px; padding: 5px; background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.home-menu button { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; color: var(--text); text-align: left; }
.home-menu button:hover { background: var(--bg-4); }
.home-menu button:disabled { color: var(--text-3); cursor: default; background: transparent; }
.home-menu button.danger { color: #ff9b9b; }
.home-menu kbd { margin-left: auto; padding: 0 5px; border-radius: 4px; background: var(--bg-4); color: var(--text-3); font-size: 10.5px; }
#tlMenu { z-index: 60; min-width: 270px; }
.home-menu button.danger:hover { background: var(--danger-bg); }
.home-menu .sep { height: 1px; background: var(--line-2); margin: 4px 2px; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 8px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.swatches button.sel { border-color: var(--text); }
.ch-gap { margin-top: 16px; }
.dialog .grid .span { grid-column: 1 / -1; }
.danger-text { color: #ff9b9b; }
.danger-text:hover { background: var(--danger-bg); color: var(--danger); }
.new-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 14px; } /* el canal es el del inicio: solo el nombre */
.new-top select { width: 100%; height: 32px; font-size: 13px; }

/* Logo redondo de canal: imagen recortada o color con iniciales */
.ch-av {
  flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: center / cover no-repeat; color: #fff; font-weight: 700; letter-spacing: .3px; position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
}
/* Logo de la plataforma del canal (YouTube / TikTok) en la esquina del avatar. Son logos a color: sin el contorno
   que llevan los iconos de la interfaz. */
.ch-plat svg, .ch-platform svg, .plat-pill svg, .plat-logo svg { stroke: none; }
.ch-plat { position: absolute; right: -3px; bottom: -2px; width: 44%; height: 44%; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.ch-plat svg, .ch-av.lg .ch-plat svg { width: 100%; height: 100%; }
.ch-av.sm .ch-plat { width: 58%; height: 58%; right: -5px; bottom: -4px; }
.ch-avatar { position: relative; }
.ch-avatar .ch-plat { width: 34%; height: 34%; right: 0; bottom: 2px; }
.ch-platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.ch-platform {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.ch-platform svg { width: 30px; height: 30px; }
.ch-platform:hover { color: var(--text); border-color: var(--line-2); }
.ch-platform.sel { color: var(--text); border-color: var(--accent); background: var(--bg-3); box-shadow: 0 0 0 1px var(--accent) inset; }
.plat-pill { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 3px 9px 3px 6px; border-radius: 999px; background: var(--bg-3); color: var(--text-2); font-size: 12px; font-weight: 600; vertical-align: middle; }
.plat-pill svg { width: 18px; height: 18px; }
.ch-av.sm { width: 22px; height: 22px; font-size: 9px; }
.ch-av.lg { width: 60px; height: 60px; font-size: 20px; }
.ch-av.lg svg { width: 26px; height: 26px; }
.home-nav button { height: 38px; }

/* Botón grande de nuevo canal */
.home-side-top { padding: 12px 10px 6px; }
.home-new-channel {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; text-align: left; color: var(--text);
  background: linear-gradient(135deg, rgba(91, 141, 239, .2), rgba(91, 141, 239, .06)); border: 1px solid var(--accent-line); border-radius: 10px;
}
.home-new-channel:hover { background: linear-gradient(135deg, rgba(91, 141, 239, .32), rgba(91, 141, 239, .12)); border-color: var(--accent); color: #fff; }
.home-new-channel .plus {
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex: none;
  box-shadow: 0 4px 14px rgba(91, 141, 239, .35);
}
.home-new-channel .plus svg { width: 16px; height: 16px; stroke-width: 2.2; }
.home-new-channel b { display: block; font-weight: 600; font-size: 12.5px; }
.home-new-channel small { display: block; color: var(--text-2); font-size: 11px; }

/* Botones de la cabecera del canal */
.btn.soft { background: var(--bg-2); border-color: var(--line-2); color: var(--text); }
.btn.soft:hover { background: var(--bg-3); border-color: #3a3f4a; }
.home-actions .btn.primary { box-shadow: 0 4px 16px rgba(91, 141, 239, .28); }
.home-empty .btn.primary { height: 38px; padding: 0 20px; font-size: 13px; box-shadow: 0 4px 16px rgba(91, 141, 239, .28); }
.home-card.new .plus-c { width: 44px; height: 44px; border-radius: 50%; border: 1px dashed currentColor; display: flex; align-items: center; justify-content: center; }

/* Diálogo de canal */
.ch-dialog { width: 520px; }
.ch-identity { display: flex; gap: 20px; align-items: center; margin-bottom: 18px; padding: 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.ch-avatar {
  width: 96px; height: 96px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  background: center / cover no-repeat; color: #fff; font-size: 32px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 6px 20px rgba(0,0,0,.35);
}
.ch-logo-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ch-logo-side .field-label { margin: 0; color: var(--text); font-weight: 600; }
.ch-logo-side .hint { margin: -4px 0 0; color: var(--text-3); font-size: 11.5px; line-height: 1.4; }
.ch-logo-btns { display: flex; gap: 6px; }
.swatches button { border-radius: 50%; width: 24px; height: 24px; }
.swatches.dim { opacity: .45; }
.sky-presets { margin: -2px 0 2px 80px; }

/* Recorte del logo */
.crop-dialog { width: 440px; }
.crop-stage { display: flex; justify-content: center; margin: 4px 0 14px; }
.crop-stage canvas { width: 360px; height: 360px; border-radius: 10px; cursor: grab; touch-action: none; background: #0b0c0f; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-zoom { display: flex; align-items: center; gap: 10px; padding: 0 30px; color: var(--text-3); }
.crop-zoom svg { width: 14px; height: 14px; }
.crop-zoom svg.big { width: 20px; height: 20px; }
.crop-zoom input { flex: 1; }

/* Estilo del canal */
.style-dialog { width: 600px; }
.style-learned { padding: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.style-learned .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
.style-learned .fact { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.style-learned .fact small { color: var(--text-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; }
.style-learned .fact b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.style-row { display: flex; align-items: center; gap: 12px; }
.style-row > small { width: 78px; flex: none; color: var(--text-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; }
.style-row .pal { display: flex; gap: 6px; flex-wrap: wrap; }
.style-row .pal i { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.style-row .pal i.acc { border-radius: 50%; margin-left: 6px; }
.style-row .chips { display: flex; gap: 5px; flex-wrap: wrap; }
.style-row .chips span { padding: 2px 8px; border-radius: 10px; background: var(--bg-4); color: var(--text); font-size: 11px; }
.style-foot, .style-empty { color: var(--text-3); font-size: 11.5px; }
.style-guide-label small { color: var(--text-3); font-weight: 400; }
.style-guide-label textarea { width: 100%; resize: vertical; min-height: 140px; padding: 9px 10px; font: 12px/1.5 var(--font); color: var(--text); background: var(--field); border: 1px solid var(--line-2); border-radius: var(--radius); user-select: text; }
.style-guide-label textarea:focus { outline: none; border-color: var(--accent-line); }
.learned-note { margin: -6px 0 12px; padding: 7px 10px; border-radius: var(--radius); background: var(--accent-bg); color: var(--accent-hi); font-size: 11.5px; }

/* Resumen del canal: videos totales, este mes, último editado */
.home-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; padding: 0 28px 16px; }
.home-stats .stat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-width: 0; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; }
.home-stats .ico { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: var(--accent-bg); color: var(--accent-hi); }
.home-stats .stat > div { min-width: 0; display: flex; flex-direction: column; }
.home-stats small { color: var(--text-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; }
.home-stats b { font-size: 18px; font-weight: 650; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-stats .stat:last-child b { font-size: 13.5px; line-height: 1.6; }
.home-stats em { font-style: normal; color: var(--text-2); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.home-card .num {
  padding: 2px 7px; border-radius: 4px; font: 700 11px var(--font);
  color: #fff; background: rgba(12, 13, 16, .82); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
}

/* Diálogo de proyecto nuevo, compacto */
#newModal .dialog { width: 540px; padding: 18px 20px; }
#newModal .dialog-head { margin-bottom: 12px; }
#newModal .field-full { margin-bottom: 10px; }
#newModal .field-full input, #newModal .new-top select { height: 30px; font-size: 12.5px; }
#newModal .field-label { margin-bottom: 6px; font-size: 11.5px; }
#newModal .aspect-cards { gap: 8px; margin-bottom: 12px; }
#newModal .aspect-card { flex-direction: row; justify-content: flex-start; align-items: center; gap: 12px; padding: 8px 12px; min-height: 0; text-align: left; }
#newModal .aspect-card .frame { width: 34px; height: 34px; flex: none; }
#newModal .aspect-card span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#newModal .aspect-card b { font-size: 12.5px; }
#newModal .aspect-card small { text-align: left; font-size: 10.5px; }
#newModal .style-cards { gap: 8px; margin-bottom: 12px; }
#newModal #styleCards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#newModal .style-card { padding: 8px 10px; gap: 2px; }
#newModal .style-card b { font-size: 12px; }
#newModal .style-card small { font-size: 10.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rt-style-pick { display: flex; flex-direction: column; gap: 8px; }
#rtForm .rt-style-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
#rtForm .style-card { padding: 8px 10px; gap: 3px; }
#rtForm .style-card b { font-size: 12px; }
#rtForm .style-card small { font-size: 10.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#rtForm .rt-style-cards.tall { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
#rtForm .rt-style-cards.tall .style-card { padding: 8px; }
#rtForm .rt-style-cards.tall .style-card img, #rtForm .rt-style-cards.tall .rt-style-auto { aspect-ratio: 9 / 16; }
#rtForm .rt-style-cards.tall .style-card b { font-size: 12.5px; line-height: 1.25; }
#rtForm .rt-style-cards.tall .style-card small { display: none; }
.rt-style-auto { width: 100%; aspect-ratio: 16 / 9; border-radius: 4px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--bg-3), var(--accent-bg)); color: var(--accent-hi); }
.rt-style-auto svg { width: 26px; height: 26px; }
#newModal .learned-note { margin: -2px 0 10px; padding: 5px 9px; font-size: 11px; }
#newModal .buttons { margin-top: 14px; }
#newModal .dialog .grid .toggle small { display: none; }

/* Pestaña Personajes */
.char-h { padding: 8px 6px 4px; color: var(--text-3); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.char-row { cursor: pointer; }
.char-row .ico { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bg-3); color: var(--text-2); flex: none; }
.char-row .ico svg { width: 14px; height: 14px; }
.char-help { margin: 6px 8px; padding: 10px 11px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); font-size: 11px; line-height: 1.45; }
.char-help b { color: var(--text); }
.char-help ol { margin: 6px 0; padding-left: 16px; }
.char-help span { color: var(--text-3); }
#mxPacks .toggle small { margin-left: auto; }
#mxProgress { margin-top: 14px; }
#mxBar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); border-radius: 6px; transition: width .2s; }
#mxStatus { margin-top: 8px; color: var(--text-2); font-size: 11.5px; }

/* Apertura de proyecto con modelos */
#loadingModal { z-index: 45; }
.loading-dialog { width: 420px; }
.load-bar { height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; margin-bottom: 12px; }
.load-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.load-list { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.load-list li { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12px; }
.load-list .st { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
.load-list li.ok { color: var(--text); }
.load-list li.ok .st { animation: none; border-color: #3fbf7f; background: #3fbf7f; }
.load-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 2D: siempre por la cámara de plano (sin selector Editor/Cámara) */
body.dim-2d .vp-switch, body.dim-2d .vp-tools, body.dim-2d #outliner .tab[data-tab="chars"], body.dim-2d #outliner .tab[data-tab="scene"] { display: none; }

/* Pantalla completa del visor: solo el cuadro final */
#viewport:fullscreen { background: #000; }
#viewport:fullscreen .vp-tools, #viewport:fullscreen .vp-switch, #viewport:fullscreen #viewLabel { display: none; }

/* ---------- Inicio: panel general ---------- */
.home-date { color: var(--text-3); font-size: 11.5px; font-weight: 500; letter-spacing: .2px; }
.home-dash { flex: 1; overflow-y: auto; padding: 0 28px 28px; display: flex; flex-direction: column; gap: 18px; }
.home-dash h3 { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--text); }
.dash-sec { display: flex; flex-direction: column; gap: 10px; }
.plat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plat-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-align: left; overflow: hidden;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.plat-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--pc); }
.plat-card:hover { border-color: var(--line-2); background: var(--bg-2); }
.plat-logo { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; }
.plat-logo svg { width: 36px; height: 36px; }
.plat-info { flex: 1; display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 6px; }
.plat-info small { grid-column: 1 / -1; color: var(--text-2); font-size: 11.5px; font-weight: 500; }
.plat-info b { font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.plat-info em { font-style: normal; color: var(--text-3); font-size: 12px; }
.plat-side { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; z-index: 1; }
.plat-side b { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.plat-side small { color: var(--text-3); font-size: 11px; }
.plat-side i { font-style: normal; color: var(--text-3); font-size: 10.5px; margin-top: 3px; white-space: nowrap; }
.plat-side i.add { color: var(--accent-hi); }
.kpi-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpi { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-width: 0; background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; }
.kpi .ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent-bg); color: var(--accent-hi); }
.kpi .ico svg { width: 17px; height: 17px; }
.kpi > div { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.kpi small { color: var(--text-2); font-size: 11.5px; }
.kpi b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi em { font-style: normal; color: var(--text-3); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi em.up { color: #3fbf7f; } .kpi em.down { color: #ff8a8a; }
.dash-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
.dash-card { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; min-width: 0; background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; }
.dc-head { display: flex; flex-direction: column; gap: 2px; }
.dc-head small { color: var(--text-3); font-size: 11px; }
.act-chart { flex: 1; min-height: 120px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; }
.act-chart .wk { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.act-chart .wk i { width: 100%; max-width: 26px; border-radius: 4px 4px 2px 2px; background: var(--accent); opacity: .85; }
.act-chart .wk:last-child i { opacity: 1; box-shadow: 0 0 0 1px var(--accent-hi); }
.act-chart .wk span { height: 12px; overflow: visible; color: var(--text-3); font-size: 9.5px; white-space: nowrap; }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbars .row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 22px; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-2); }
.hbars .row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbars .track { height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; }
.hbars .track i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.hbars .row b { text-align: right; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.dash-none { color: var(--text-3); font-size: 11.5px; }
.ch-table { display: flex; flex-direction: column; background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ch-row { display: grid; grid-template-columns: 30px minmax(0, 1.6fr) 1fr 70px 80px 1fr; align-items: center; gap: 10px; padding: 9px 16px; text-align: left; color: var(--text); border-bottom: 1px solid var(--line); font-size: 12px; }
.ch-row:last-child { border-bottom: 0; }
.ch-row:not(.head):hover { background: var(--bg-2); }
.ch-row.head { color: var(--text-3); font-size: 10.5px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; padding-top: 10px; padding-bottom: 8px; }
.ch-row .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-row .pl, .ch-row .when { color: var(--text-2); }
.ch-row .n { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 1150px) { .dash-cols { grid-template-columns: 1fr 1fr; } .dash-card.wide { grid-column: 1 / -1; } .kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.home-nav .lbl .ct { padding: 1px 7px; border-radius: 9px; background: var(--bg-3); color: var(--text-2); font-size: 10.5px; letter-spacing: 0; }

/* ---------- Sección Canales ---------- */
.ch-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ch-filter { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 17px; background: var(--bg-1); border: 1px solid var(--line-2); color: var(--text-2); font-weight: 500; }
.ch-filter svg { width: 18px; height: 18px; stroke: none; }
.ch-filter b { min-width: 20px; padding: 1px 6px; border-radius: 9px; background: var(--bg-3); color: var(--text-2); font-size: 11px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.ch-filter:hover { background: var(--bg-3); color: var(--text); }
.ch-filter.sel { background: var(--accent-bg); border-color: var(--accent); color: var(--text); }
.ch-filter.sel b { background: var(--accent); color: #fff; }
.ch-search { margin-left: auto; width: 240px; flex: none; }
/* Rutina: clave de ElevenLabs, una tarjeta por canal (configuración, producir, paso en curso e historial). */
.rt-wrap { display: flex; flex-direction: column; gap: 14px; }
.rt-hint { margin: 0; color: var(--text-3); font-size: 12px; }
.home-actions .rt-gear { flex: none; width: 34px; padding: 0; justify-content: center; }
.home-actions .rt-gear svg { width: 17px; height: 17px; margin: 0; }
.rts-sec { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; font-weight: 600; color: var(--text); padding-top: 6px; }
.rts-sec:not(:first-child) { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.rts-sec small { font-weight: 400; color: var(--text-3); font-size: 11.5px; }
.rt-grid .span { grid-column: 1 / -1; }
.rt-set-dialog { width: 520px; max-width: calc(100vw - 40px); max-height: 88vh; display: flex; flex-direction: column; }
.rt-set-dialog .rt-grid { overflow-y: auto; min-height: 0; padding-right: 4px; }
.rts-help { font-size: 11.5px; color: var(--text-2); line-height: 1.5; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; }
.rts-help summary { cursor: pointer; color: var(--text); font-weight: 550; }
.rts-help ol { margin: 8px 0; padding-left: 18px; }
.rts-help p { margin: 6px 0 8px; color: var(--text-3); }
.rts-help b { color: var(--text); }
.rt-yt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.rt-yt .st { flex: 1; min-width: 180px; }
.rt-yt .st b { color: var(--text); }
/* Rutina: guardar en una carpeta (sin subir) en vez de Upload-Post. */
.rt-local { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.rt-local .st { flex: 1; min-width: 180px; word-break: break-all; }
.rt-local .st b { color: var(--text); }
.rt-local small { flex-basis: 100%; color: var(--text-3); }
.rt-off { display: none !important; }
.rt-checks { display: flex; flex-direction: column; gap: 4px; }
.rt-row .yt-up { color: var(--ok); }
.rt-set-dialog .rt-grid { border-top: none; margin-bottom: 14px; }
.rt-set-dialog .rt-grid label { padding-top: 0; }
.rt-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: rgba(245, 165, 36, .1); border: 1px solid rgba(245, 165, 36, .35); color: var(--text); font-size: 12.5px; }
.rt-banner svg { width: 16px; height: 16px; color: #ffd08a; flex: none; }
.rt-banner span { flex: 1; }
.rt-list { display: flex; flex-direction: column; gap: 12px; }
.rt-card { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; }
.rt-card.running { border-color: var(--accent-line); }
.rt-card-top { display: flex; align-items: center; gap: 12px; }
.rt-card-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rt-card-name b { font-size: 14px; font-weight: 650; }
.rt-card-name small { color: var(--text-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-card-name .warn { color: #ffb86b; }
.rt-card .btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; }
.rt-card .btn svg { width: 14px; height: 14px; }
.btn.danger { background: var(--danger-bg); border-color: rgba(239, 90, 90, .45); color: #ffb1b1; }
.btn.danger:hover { background: rgba(239, 90, 90, .22); }
.rt-card.on { border-color: rgba(63, 178, 107, .35); }
.rt-card.on.running { border-color: var(--accent-line); }
.rt-add-dialog { width: 460px; max-width: calc(100vw - 40px); }
.rt-add-search { width: 100%; height: 34px; margin-bottom: 10px; }
.rt-add-search svg { width: 15px; height: 15px; flex: none; }
.rt-add-search input, .rt-add-search input:focus, .rt-add-search input:hover { height: 32px; border: 0; box-shadow: none; }
.rt-add-list { display: flex; flex-direction: column; gap: 6px; height: min(340px, 50vh); overflow-y: auto; padding-right: 4px; margin-bottom: 14px; }
.rt-add-list .rt-hint { padding: 14px 4px; }
.rt-add-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.rt-add-item:hover { border-color: var(--accent-line); background: var(--bg-3); }
.rt-add-item .nm { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-add-item .add { width: 16px; height: 16px; color: var(--text-3); }
.rt-add-item:hover .add { color: var(--accent-hi); }
.rt-today { display: flex; flex-direction: column; align-items: flex-end; padding: 0 6px; line-height: 1.2; }
.rt-today b { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rt-today small { color: var(--text-3); font-size: 11px; }
.rt-toggle { padding: 0 4px 0 8px; font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.rt-toggle input:checked + .sw { background: #3fb26b; }
.rt-toggle input:checked ~ span:last-child { color: #5fd08a; }
.rt-state { padding: 7px 12px; border-radius: 8px; background: var(--bg-2); color: var(--text-2); font-size: 12px; }
/* La cabecera y los botones quedan fijos; solo se desplaza el formulario. */
.rt-dialog { width: 640px; max-width: calc(100vw - 40px); max-height: 88vh; display: flex; flex-direction: column; }
.rt-dialog .rt-grid { border-top: none; padding: 0 4px 2px 0; margin-bottom: 14px; flex: 1; min-height: 0; overflow-y: auto; }
.rt-dialog .rt-grid label { padding-top: 0; }
.rt-step { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: var(--bg-2); font-size: 12.5px; color: var(--text); }
.rt-spin { width: 12px; height: 12px; flex: none; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 16px; padding-top: 4px; border-top: 1px solid var(--line); }
.rt-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-2); padding-top: 10px; }
.rt-grid label.span { grid-column: 1 / -1; }
.rt-grid label small { color: var(--text-3); font-size: 11px; }
.rt-grid textarea { width: 100%; height: auto; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.rt-log-head { display: flex; align-items: center; gap: 8px; align-self: flex-start; height: 28px; padding: 0 10px 0 6px; border-radius: 7px; background: none; border: none; color: var(--text-2); font: inherit; font-size: 12px; font-weight: 550; cursor: pointer; }
.rt-log-head:hover { background: var(--bg-2); color: var(--text); }
.rt-log-head .chev { width: 14px; height: 14px; transform: rotate(-90deg); transition: transform .15s; }
.rt-log-head.open .chev { transform: none; }
.rt-log-head b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bg-3); color: var(--text); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.rt-log { display: flex; flex-direction: column; gap: 4px; margin-top: -6px; }
.rt-row { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 2px 8px; border-radius: 7px; font-size: 12px; }
.rt-row:hover { background: var(--bg-2); }
.rt-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.rt-row.ok .dot { background: var(--ok); }
.rt-row.error .dot { background: var(--danger); }
.rt-row .t { color: var(--text); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }
.rt-row small { flex: 1; min-width: 0; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ch-cards .home-empty { grid-column: 1 / -1; }
.ch-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; text-align: left; color: var(--text); background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px; }
.ch-card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 141, 239, .12); }
.ch-card-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ch-card-name { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.ch-card-name b { font-size: 15px; font-weight: 650; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-card-name .plat-pill { margin: 0; }
.ch-card-desc { margin: 0; color: var(--text-2); font-size: 12px; line-height: 1.45; height: 35px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ch-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.ch-card-stats div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ch-card-stats b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ch-card-stats b.t { font-size: 12.5px; font-weight: 600; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-card-stats small { color: var(--text-3); font-size: 11px; }
.home-nav button.more-ch { color: var(--accent-hi); }
.home-nav button.more-ch:hover { background: var(--accent-bg); }

/* Artistas: biblioteca de canciones */
.ar-sub { color: var(--text-3); font-size: 12px; }
.ar-tags { display: flex; flex-wrap: wrap; gap: 5px; min-height: 22px; }
.ar-tag { padding: 2px 8px; border-radius: 10px; background: var(--accent-bg); color: var(--accent-hi); font-size: 11px; font-weight: 550; }
.ar-none { color: var(--text-3); font-size: 11.5px; }
.ar-wrap { border-radius: 12px; }
.ar-dropzone { display: none; position: fixed; inset: 14px; z-index: 30; pointer-events: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 2px dashed var(--accent); border-radius: 16px; background: rgba(10, 12, 18, .82); backdrop-filter: blur(2px); color: var(--text-2); font-size: 12px; }
.ar-dropzone svg { width: 34px; height: 34px; color: var(--accent-hi); }
.ar-dropzone b { color: var(--text); font-size: 16px; }
#home.ar-dropping .ar-dropzone { display: flex; }
.ar-head { display: flex; align-items: center; gap: 14px; }
.ar-head .home-title { flex: 1; min-width: 0; }
.ar-head .home-title h1 { margin: 0; font-size: 20px; }
.ar-head .home-title p { margin: 2px 0 0; color: var(--text-3); font-size: 12px; }
.ar-head svg.back { transform: rotate(90deg); }
.ar-photo { position: relative; flex: none; border-radius: 50%; }
.ar-photo .ch-av { background-size: cover; background-position: center; }
.ar-photo-edit { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .15s; }
.ar-photo-edit svg { width: 22px; height: 22px; }
.ar-photo:hover .ar-photo-edit { opacity: 1; }
.ar-photo-x { position: absolute; top: -2px; right: -2px; width: 22px; height: 22px; padding: 0; border-radius: 11px; background: var(--bg-3); color: var(--text-2); border: 1px solid var(--line-2); opacity: 0; }
.ar-photo:hover .ar-photo-x { opacity: 1; }
.ar-photo-x:hover { color: var(--text); background: var(--danger); }
.ar-sec { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; font-weight: 650; font-size: 13px; }
.ar-sec small { color: var(--text-3); font-weight: 400; font-size: 11.5px; }
.ar-linkbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ar-count { color: var(--text-3); font-size: 12px; margin-right: 4px; }
.ar-chips { display: contents; }
.ar-chip { padding: 2px 9px; border-radius: 10px; background: var(--bg-3); color: var(--text-2); font-size: 11px; font-weight: 550; }
.ar-linkbtn { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; color: var(--text-3); font-size: 11px; border: 1px dashed var(--line-2); }
.ar-lang { height: 22px; padding: 0 6px; font-size: 11px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); width: auto; }
.ar-songlang { height: 26px; font-size: 11.5px; padding: 0 4px; background: transparent; border: 1px solid transparent; color: var(--text-3); }
.ar-songlang.own { color: var(--text); }
.ar-song:hover .ar-songlang { border-color: var(--line-2); }
.ar-linkbtn:hover { color: var(--text); border-color: var(--text-3); }
.ar-linkbtn svg { width: 12px; height: 12px; }
.ar-links { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; }
.ar-links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 14px; }
.ar-links-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ar-links-foot small { color: var(--text-3); font-size: 11.5px; }
.ar-links label { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 8px; color: var(--text-2); font-size: 12px; }
.ar-table { background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ar-thead, .ar-song { display: grid; grid-template-columns: 34px minmax(200px, 1.5fr) minmax(160px, 1.3fr) 128px 124px 64px 36px; align-items: center; gap: 12px; padding: 0 14px; }
.ar-thead { height: 34px; color: var(--text-3); font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.ar-thead .r, .ar-dur { text-align: right; }
.ar-songs { display: flex; flex-direction: column; }
.ar-song { min-height: 58px; border-bottom: 1px solid var(--line); }
.ar-song:last-child { border-bottom: 0; }
.ar-song:hover { background: var(--bg-2); }
.ar-n { color: var(--text-3); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.ar-tcell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ar-cover { flex: none; width: 40px; height: 40px; padding: 0; border-radius: 5px; background: var(--bg-3) center/cover no-repeat; color: var(--text-3); display: flex; align-items: center; justify-content: center; }
.ar-cover svg { width: 16px; height: 16px; }
.ar-cover:hover { box-shadow: 0 0 0 2px var(--accent); }
.ar-title { flex: 1; min-width: 0; height: 30px; font-weight: 600; font-size: 13px; color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 0 6px; }
.ar-title:hover { border-color: var(--line-2); }
.ar-title:focus { background: var(--bg-0); border-color: var(--accent); }
.ar-tagcell { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; }
.ar-tagcell .ar-tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 4px 2px 9px; }
.ar-tag button { width: 16px; height: 16px; padding: 0; border-radius: 8px; color: inherit; opacity: .6; font-size: 13px; line-height: 1; }
.ar-tag button:hover { opacity: 1; background: rgba(255, 255, 255, .1); }
.ar-addtag { height: 22px; padding: 0 8px; border-radius: 11px; color: var(--text-3); font-size: 11px; border: 1px dashed var(--line-2); opacity: 0; }
.ar-song:hover .ar-addtag, .ar-tagcell .ar-addtag:only-child { opacity: 1; }
.ar-addtag:hover { color: var(--text); border-color: var(--text-3); }
.ar-taginput { width: 120px; height: 24px; font-size: 12px; }
.ar-lycell { display: flex; align-items: center; gap: 2px; }
.ar-ly { height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11px; font-weight: 550; color: var(--text-3); background: var(--bg-3); }
.ar-ly.on { color: #4fd18b; background: rgba(79, 209, 139, .12); }
.ar-ly.lyr { color: var(--accent-hi); background: var(--accent-bg); }
.ar-ly:hover { filter: brightness(1.25); }
.ar-ly-x { width: 18px; height: 18px; padding: 0; border-radius: 9px; color: var(--text-3); opacity: 0; }
.ar-song:hover .ar-ly-x { opacity: 1; }
.ar-ly-x:hover { color: var(--text); background: var(--bg-3); }
.ar-dur { color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.ar-del { opacity: 0; }
.ar-song:hover .ar-del { opacity: 1; }
.ar-empty { padding: 28px; text-align: center; color: var(--text-3); }
.ar-drop-hint { margin: 0; color: var(--text-3); font-size: 11.5px; text-align: center; }
.rt-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-grid .rt-pick label, .rt-pick label { flex-direction: row; padding-top: 3px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12px; cursor: pointer; }
.rt-pick label:has(input:checked) { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-hi); }
.rt-pick input { display: none; }
.rt-pick[data-pick] { max-height: 132px; overflow-y: auto; align-content: flex-start; padding: 2px; }
.rt-pick label.hidden { display: none; }
.rt-grid label.rt-pick-search { flex-direction: row; align-items: center; gap: 7px; height: 30px; max-width: 280px; padding: 0 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; }
.rt-pick-search svg { width: 14px; height: 14px; color: var(--text-3); flex: none; }
.rt-pick-search input { flex: 1; min-width: 0; height: 100%; padding: 0; background: transparent; border: 0; outline: none; }
.rt-pick small { color: var(--text-3); font-size: 10.5px; }
.rt-lib { display: flex; flex-direction: column; gap: 8px; }
.rt-lib-count { color: var(--text-2); font-size: 11.5px; }

/* Canales: estado vacío */
.ch-empty { grid-column: 1 / -1; margin-top: 8px; padding: 44px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: var(--bg-1); border: 1px dashed var(--line-2); border-radius: 14px; }
.ch-empty-ico { width: 56px; height: 56px; margin-bottom: 6px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--bg-3); color: var(--text-2); }
.ch-empty-ico svg { width: 24px; height: 24px; }
.ch-empty-ico.logo { background: transparent; }
.ch-empty-ico.logo svg { width: 52px; height: 52px; stroke: none; }
.ch-empty b { font-size: 15px; font-weight: 650; color: var(--text); }
.ch-empty p { margin: 0 0 10px; color: var(--text-3); font-size: 12.5px; }
.ch-empty-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px 0 12px; border-radius: 10px;
  background: var(--accent); border: 1px solid var(--accent); color: #fff; font-weight: 600; font-size: 12.5px; box-shadow: 0 4px 14px rgba(91, 141, 239, .25); }
.ch-empty-btn svg { width: 15px; height: 15px; stroke-width: 2.2; }
.ch-empty-btn:hover { filter: brightness(1.08); box-shadow: 0 6px 18px rgba(91, 141, 239, .35); }
.home-empty .btn svg { width: 15px; height: 15px; color: inherit; stroke-width: 2.2; }

/* ---------- Guiones: tarjeta en el chat y ventana ---------- */
.script-card { display: flex; align-items: center; gap: 12px; margin: 6px 0; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); }
.script-card .sc-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent-bg); color: var(--accent-hi); }
.script-card .sc-ico svg { width: 18px; height: 18px; }
.script-card .sc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.script-card .sc-info b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.script-card .sc-info small { color: var(--text-3); font-size: 11px; }
.script-card .btn { height: 30px; padding: 0 14px; flex: none; }
.script-dialog { width: min(760px, 92vw); max-height: 86vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.script-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; }
.script-head h2 { margin: 0 0 3px; font-size: 17px; }
.script-head .sub { font-size: 12px; color: var(--text-3); }
.script-tabs { display: flex; gap: 4px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.script-tabs button { height: 34px; padding: 0 12px; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; border-radius: 0; }
.script-tabs button:hover { color: var(--text); }
.script-tabs button.sel { color: var(--text); border-bottom-color: var(--accent); }
.script-body { flex: 1; overflow-y: auto; padding: 18px 22px; font-size: 14px; line-height: 1.7; color: var(--text); user-select: text; }
.script-body .sec { border: 0; padding: 0; margin: 14px 0 4px; color: var(--accent-hi); font-size: 11px; font-weight: 700; letter-spacing: .6px; }
.script-body .sec:first-child { margin-top: 0; }
.script-body .note { color: var(--text-3); font-style: italic; font-size: 12.5px; background: none; border: 0; padding: 0; margin: 2px 0; }
.script-body .gap { height: 10px; }
.script-body .alts { margin-top: 18px; padding-top: 10px; border-top: 1px dashed var(--line-2); color: var(--text-2); }
.script-body.tts { white-space: pre-wrap; font-size: 15px; line-height: 1.75; }
.script-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--line); background: var(--bg-2); }
#scriptCount { color: var(--text-3); font-size: 11.5px; }
.script-foot .btn { height: 32px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; }
.script-foot .btn svg { width: 15px; height: 15px; }
.script-btns { display: flex; gap: 8px; }
.script-head { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.script-body { min-height: 0; overscroll-behavior: contain; scrollbar-gutter: stable; }
/* Barra de scroll con el diseño de la app: guiones largos y cuadrícula de canales/proyectos del inicio. */
.script-body::-webkit-scrollbar, .home-grid::-webkit-scrollbar, .rt-add-list::-webkit-scrollbar { width: 12px; }
.script-body::-webkit-scrollbar-track, .home-grid::-webkit-scrollbar-track, .rt-add-list::-webkit-scrollbar-track { background: var(--bg-2); border-left: 1px solid var(--line); }
.rt-add-list::-webkit-scrollbar-track { border-radius: 6px; }
.script-body::-webkit-scrollbar-thumb, .home-grid::-webkit-scrollbar-thumb, .rt-add-list::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); border-radius: 6px; border: 3px solid var(--bg-2); background-clip: padding-box; min-height: 40px; }
.script-body::-webkit-scrollbar-thumb:hover, .home-grid::-webkit-scrollbar-thumb:hover, .rt-add-list::-webkit-scrollbar-thumb:hover { background: var(--accent-hi); border: 3px solid var(--bg-2); background-clip: padding-box; }
.rt-grid label.toggle { flex-direction: row; padding-top: 0; color: var(--text); }
.rt-checks label.toggle small { margin-left: 6px; }
/* Exportar: publicar al terminar (Upload-Post). */
.exp-pub { margin-top: 14px; padding: 10px 12px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.exp-pub-head { font-size: 12.5px; font-weight: 600; color: var(--text); display: flex; flex-direction: column; gap: 2px; }
.exp-pub-head small { font-weight: 400; color: var(--text-3); font-size: 11.5px; }
.exp-pub-plats { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.exp-pub-plats .toggle small { margin-left: 4px; }
.exp-pub-fields { display: flex; flex-direction: column; gap: 8px; }
.exp-pub-fields label { display: flex; flex-direction: column; gap: 5px; color: var(--text-2); font-weight: 500; font-size: 12px; }
.exp-pub-fields input, .exp-pub-fields textarea, .exp-pub-fields select { width: 100%; }
#exportModal .dialog { max-height: 92vh; overflow-y: auto; }
.rt-freq { display: flex; gap: 8px; }
.rt-freq input { width: 80px; flex: none; }
.rt-freq select { flex: 1; }
.rt-plan { font-size: 12px; color: var(--text-2); background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.rt-plan b { color: var(--text); }
.rt-plan small { color: var(--text-3); font-size: 11.5px; }

/* ============================================================ ORBX Music Studio: canción, letra y aspecto */
.tab-pane { min-height: 0; }
.song-pane, .lyr-pane, .thumb-pane { display: flex; flex-direction: column; gap: 8px; padding: 10px; height: calc(100% - 36px); overflow-y: auto; }
.song-cover {
  aspect-ratio: 1; width: 100%; border-radius: 8px; background: var(--bg-2) center/cover no-repeat; border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text-3); cursor: pointer;
}
.song-cover svg { width: 30px; height: 30px; }
.song-cover.has svg, .song-cover.has span { display: none; }
.song-cover:hover { border-color: var(--line-2); }
.song-cover-btns, .song-btns, .lyr-tools { display: flex; gap: 6px; }
.song-btns { flex-direction: column; }
.song-pane .row input { width: 100%; }
.song-info { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; min-height: 34px; }
.song-info b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-info small { color: var(--text-3); font-size: 11px; }
.lyr-trans { display: flex; gap: 6px; }
.lyr-trans select { flex: 1; min-width: 0; }
.lyr-shift { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; color: var(--text-3); font-size: 11px; }
.lyr-shift span { width: 100%; margin-bottom: 2px; }
.lyr-shift .btn { flex: 1; }
.btn.sm { height: 22px; padding: 0 7px; font-size: 11px; }
#outliner .tab { padding: 0 8px; }
#outliner .tab svg { display: none; }
.thumb-big { width: 100%; border-radius: 8px; background: var(--bg-2) center/cover no-repeat; border: 1px solid var(--line); cursor: pointer; flex: none; }
.thumb-big:hover { border-color: var(--line-2); }
.thumb-view { flex-direction: column; gap: 10px; cursor: zoom-out; background: rgba(5, 6, 8, .85); }
.thumb-view img { max-width: 92vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.thumb-view span { color: var(--text-3); font-size: 12px; }
.thumb-h { margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--text-3); }
.thumb-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.thumb-list.tall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.thumb-list button { position: relative; padding: 0; border-radius: 6px; overflow: hidden; border: 2px solid transparent; background: var(--bg-2) center/cover no-repeat; }
.thumb-list button:hover { border-color: var(--line-2); }
.thumb-list button.sel { border-color: var(--accent); }
.thumb-list button span { position: absolute; left: 3px; bottom: 3px; padding: 1px 5px; border-radius: 4px; background: rgba(0,0,0,.65); color: #fff; font-size: 10px; font-variant-numeric: tabular-nums; }
.lyr-state { font-size: 11px; color: var(--text-3); min-height: 15px; }
.lyr-state.busy { color: var(--accent-hi); }
.lyr-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; margin: 0 -4px; }
.lyr-row { display: flex; align-items: center; gap: 4px; padding: 2px 4px; border-radius: 5px; }
.lyr-row:hover { background: var(--bg-3); }
.lyr-row.sel { background: var(--accent-bg); }
.lyr-row.now .lyr-time { color: #3dd6b5; }
.lyr-time { flex: none; width: 46px; text-align: left; font: 500 10.5px var(--mono); color: var(--text-3); padding: 2px 0; }
.lyr-time:hover { color: var(--text); }
.lyr-text { flex: 1; min-width: 0; height: 24px; background: transparent; border-color: transparent; padding: 0 5px; }
.lyr-text:hover { border-color: var(--line-2); }
.lyr-del { opacity: 0; }
.lyr-row:hover .lyr-del { opacity: .7; }
.lyr-add { margin: 6px 4px; justify-content: flex-start; }
.lyrics-text { width: 100%; min-height: 320px; resize: vertical; font: 13px/1.5 var(--font); padding: 10px 12px; }
.look-styles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 4px; }
.look-style { display: flex; flex-direction: column; gap: 4px; padding: 4px 4px 6px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); }
.look-style img, .style-card img { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 4px; background: #000; object-fit: cover; }
.look-style:hover { border-color: var(--line-2); color: var(--text); }
.look-style.sel { background: var(--accent-bg); border-color: var(--accent); color: var(--text); }
.color-row { display: flex; align-items: center; gap: 6px; }
.color-row input { flex: 1; }
#lkAccentAuto.active { color: var(--accent-hi); border-color: var(--accent); }
.line-now { color: var(--text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.lyr-timeline { cursor: pointer; }
#viewLabel:empty { display: none; }

/* Rutina · ventana «Artistas» de la tarjeta: tarjetas de artista, etiquetas en píldoras y resumen abajo. */
.rta-dialog { width: 820px; max-width: calc(100vw - 40px); max-height: 88vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.rta-head { display: flex; align-items: center; gap: 14px; padding: 22px 24px 18px; background: linear-gradient(180deg, var(--accent-bg), transparent); border-bottom: 1px solid var(--line); }
.rta-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(91, 141, 239, .35); }
.rta-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.rta-title { flex: 1; min-width: 0; }
.rta-title h2 { margin: 0; font-size: 18px; }
.rta-title .sub { margin: 3px 0 0; font-size: 12.5px; color: var(--text-2); }
.rta-search { width: 220px; flex: none; }
.rta-body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 24px 18px; }
.rta-sec { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 10px; }
.rta-sec b { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text); }
.rta-sec small { color: var(--text-3); font-size: 12px; }
.rta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.rta-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-2); cursor: pointer; transition: border-color .15s, background .15s, transform .15s, box-shadow .15s; }
.rta-card:hover { background: var(--bg-3); transform: translateY(-1px); }
.rta-card input { display: none; }
.rta-card .ch-av.lg { width: 52px; height: 52px; font-size: 18px; flex: none; box-shadow: 0 0 0 2px var(--bg-1); }
.rta-all-icon { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(from 200deg, #5b8def, #b06cf0, #ef6c9a, #f2a65a, #5b8def); color: #fff; }
.rta-all-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.rta-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rta-info b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rta-info small { color: var(--text-3); font-size: 12px; }
.rta-mini { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rta-mini i { font-style: normal; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: var(--bg-4); color: var(--text-2); }
.rta-check { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--bg-1); transition: all .15s; }
.rta-card:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 0 0 1px var(--accent), 0 8px 22px rgba(0, 0, 0, .25); }
.rta-card:has(input:checked) .rta-check { background: var(--accent); border-color: var(--accent); }
.rta-card:has(input:checked) .rta-check::after { content: ''; position: absolute; left: 6px; top: 2.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.rta-card.hidden, .rta-tag.hidden { display: none; }
.rta-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.rta-tag { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line-2); cursor: pointer; font-size: 13px; color: var(--text-2); transition: all .15s; }
.rta-tag:hover { background: var(--bg-3); color: var(--text); }
.rta-tag input { display: none; }
.rta-tag small { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--bg-4); color: var(--text-3); font-size: 11px; text-align: center; }
.rta-tag:has(input:checked) { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-hi); }
.rta-tag:has(input:checked) small { background: var(--accent); color: #fff; }
.rta-foot { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--bg-2); }
.rta-sum { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.rta-faces { display: flex; }
.rta-faces .ch-av.lg { width: 32px; height: 32px; font-size: 11px; margin-left: -8px; box-shadow: 0 0 0 2px var(--bg-2); }
.rta-faces .ch-av.lg:first-child { margin-left: 0; }
.rta-n { font-size: 22px; margin-right: 6px; color: var(--text); }
.rta-what { color: var(--text-2); font-size: 13px; }

/* Rutina de TikTok e Instagram · ventana «Canciones»: portadas cuadradas, hasta 5 elegidas. */
.rts-artist { align-items: center; }
.rts-artist .ch-av.lg { width: 26px; height: 26px; font-size: 10px; }
.rts-artist b { text-transform: none; letter-spacing: 0; font-size: 14px; }
.rts-cover { width: 52px; height: 52px; border-radius: 10px; flex: none; background-size: cover; background-position: center; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.rta-faces .rts-cover { width: 32px; height: 32px; border-radius: 7px; font-size: 11px; margin-left: -6px; box-shadow: 0 0 0 2px var(--bg-2); }
.rta-faces .rts-cover:first-child { margin-left: 0; }
.rts-card.rts-off { opacity: .4; cursor: not-allowed; }
.rts-card.rts-off:hover { transform: none; background: var(--bg-2); }
.rts-grid.hidden, .rts-artist.hidden { display: none; }
.rts-note { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--accent-bg); border: 1px solid var(--accent); }
.rts-note small { color: var(--text-2); }

/* ---------- Modo Mix (proyecto nuevo, pestaña Canción, letra) ---------- */
.mode-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 10px; }
.mode-card {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); white-space: normal; color: var(--text);
}
.mode-card svg { width: 20px; height: 20px; flex: none; color: var(--text-3); }
.mode-card span { display: flex; flex-direction: column; gap: 2px; }
.mode-card b { font-size: 14px; }
.mode-card small { color: var(--text-3); font-size: 11px; }
.mode-card:hover:not(:disabled) { border-color: #3d424d; background: var(--bg-3); }
.mode-card.sel { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 0 0 3px rgba(91, 141, 239, .12); }
.mode-card.sel svg { color: var(--accent-hi); }
.mode-card:disabled { opacity: .45; cursor: default; }
.mix-head { display: flex; align-items: center; gap: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.mix-head .mh { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mix-list { display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow-y: auto; }
.mix-row { display: flex; align-items: center; gap: 6px; padding: 4px 4px; border-radius: 5px; cursor: pointer; }
.mix-row:hover { background: var(--bg-3); }
.mix-row.now { background: var(--accent-bg); }
.mix-row .n { flex: none; width: 18px; text-align: right; color: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.mix-row .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mix-row .t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-row .t small { color: var(--text-3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-row .tag { margin-right: 5px; font-size: 10px; padding: 0 6px; border-radius: 99px; background: var(--bg-3); color: var(--text-2); white-space: nowrap; }
.mix-row .tag.ok { background: rgba(70, 190, 120, .16); color: #6fd39a; }
.mix-row .tag.no { background: rgba(240, 160, 60, .14); color: #f0b060; }
.mix-row .acts { display: none; flex: none; gap: 1px; }
.mix-row:hover .acts { display: flex; }
.mix-row .arrow.up svg { transform: rotate(180deg); }
.lyr-track { flex: none; margin: 8px 2px 2px; padding: 3px 6px; border-left: 2px solid #e0a84f; color: #e0a84f; font-size: 11px; font-weight: 600; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lyr-track:first-child { margin-top: 0; }
.lyrics-track { width: 100%; margin-bottom: 8px; }
.song-pane > * { flex-shrink: 0; }
.song-pane.mix .song-cover { aspect-ratio: auto; height: 96px; }

/* Proyecto nuevo: cabe en la pantalla (tipo y formato en una fila, estilos en 5 columnas sin descripción —va en el
   tooltip—); si aun así no cabe, solo los estilos tienen scroll y los botones quedan siempre a la vista. */
#newModal .dialog { width: 820px; max-width: calc(100vw - 40px); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
#newModal .dialog > * { flex: none; }
#newModal .new-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
#newModal .new-row .mode-cards { margin: 0; gap: 8px; }
#newModal .new-row .aspect-cards { margin: 0; }
#newModal .mode-card { padding: 8px 10px; gap: 8px; }
#newModal .mode-card svg { width: 18px; height: 18px; }
#newModal .mode-card b { font-size: 12.5px; }
#newModal .mode-card small { font-size: 10.5px; line-height: 1.3; }
#newModal #styleCards { flex: 1 1 auto; min-height: 120px; overflow-y: auto; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 3px; margin: -3px -3px 0; align-content: start; }
#newModal #styleCards .style-card { padding: 6px; gap: 4px; }
#newModal #styleCards .style-card small { display: none; }
@media (max-width: 760px) { #newModal #styleCards { grid-template-columns: repeat(3, minmax(0, 1fr)); } #newModal .new-row { grid-template-columns: minmax(0, 1fr); } }

/* Guardado automático: «Guardando…» mientras escribe y «Guardado» un momento después. */
.proj-saved { font-size: 11px; color: var(--text-3); white-space: nowrap; transition: opacity .4s; }
.proj-saved:empty { display: none; }
.proj-saved.ok { color: #6fd39a; }
.proj-saved.err { color: #f07070; }
.proj-saved.fade { opacity: 0; }

/* Ventanal: las zonas pintadas encima del visor */
.win-box { display: flex; flex-direction: column; gap: 6px; padding: 8px 0 2px; border-top: 1px solid var(--line); margin-top: 4px; }
#zoneView { position: absolute; z-index: 2; cursor: none; touch-action: none; }
#zoneView.pen { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cg transform='translate%281 1%29' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M3 21l2.8-8.6 5.8-5.8 5.8 5.8-5.8 5.8z' fill='%23000' stroke='%23fff' stroke-width='1.6'/%3E%3Cpath d='M11.6 6.6l2.8-2.8 5.8 5.8-2.8 2.8' fill='%23000' stroke='%23fff' stroke-width='1.6'/%3E%3Cpath d='M3 21l6.3-6.3' stroke='%23fff' stroke-width='1.2'/%3E%3Ccircle cx='10.4' cy='13.6' r='1.3' fill='%23fff'/%3E%3C/g%3E%3C/svg%3E") 4 22, crosshair; }
#zoneView.pen.pen-close { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cg transform='translate%281 1%29' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M3 21l2.8-8.6 5.8-5.8 5.8 5.8-5.8 5.8z' fill='%23000' stroke='%23fff' stroke-width='1.6'/%3E%3Cpath d='M11.6 6.6l2.8-2.8 5.8 5.8-2.8 2.8' fill='%23000' stroke='%23fff' stroke-width='1.6'/%3E%3Cpath d='M3 21l6.3-6.3' stroke='%23fff' stroke-width='1.2'/%3E%3Ccircle cx='10.4' cy='13.6' r='1.3' fill='%23fff'/%3E%3Ccircle cx='19.5' cy='19.5' r='2.6' fill='none' stroke='%23000' stroke-width='3'/%3E%3Ccircle cx='19.5' cy='19.5' r='2.6' fill='none' stroke='%23fff' stroke-width='1.4'/%3E%3C/g%3E%3C/svg%3E") 4 22, crosshair; }
#winMode button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
#winMode button svg { width: 14px; height: 14px; }
body.painting #viewport .vp-tools, body.painting #viewport .vp-switch { pointer-events: none; opacity: .35; }

/* ============================================================ Video de fondo (pestaña Canción) */
.bgv { display: flex; flex-direction: column; gap: 6px; }
.bgv-list { display: flex; flex-direction: column; gap: 4px; }
.bgv-item { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 8px; border-radius: 6px; background: var(--field); border: 1px solid var(--line); font-size: 11.5px; }
.bgv-item span { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.bgv-item span b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bgv-item span em { font-style: normal; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bgv-item .ib { width: 22px; height: 22px; }
.bgv-item .ib svg { width: 13px; height: 13px; }
.bgv-progress { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-2); }
.bgv-pbar { height: 4px; border-radius: 2px; background: var(--field); overflow: hidden; }
.bgv-pbar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
#bgvTotal { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text-3); }
