/* Un solo tono (--h), oscuro, sin esquinas redondeadas. Toda la paleta sale
   de variar luminosidad y saturación de ese tono. */
:root {
  --h: 214;
  --bg0: hsl(var(--h) 24% 5%);
  --bg1: hsl(var(--h) 22% 8%);
  --bg2: hsl(var(--h) 20% 11%);
  --bg3: hsl(var(--h) 19% 15%);
  --bg4: hsl(var(--h) 18% 21%);
  --line: hsl(var(--h) 20% 14%);
  --line2: hsl(var(--h) 18% 26%);
  --tx0: hsl(var(--h) 40% 95%);
  --tx1: hsl(var(--h) 18% 72%);
  --tx2: hsl(var(--h) 14% 50%);
  --ac: hsl(var(--h) 92% 64%);
  --ac2: hsl(var(--h) 80% 48%);
  --ac-bg: hsl(var(--h) 70% 20%);
  --ac-tx: hsl(var(--h) 60% 6%);
  --lib-w: 320px;
  --insp-w: 340px;
  --tl-h: 300px;
  --th: 58px;
  --head-w: 168px;
  --font: 'Inter', system-ui, 'Segoe UI', sans-serif;
  --mono: 'Roboto Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { background: var(--bg0); color: var(--tx1); font: 12px/1.4 var(--font); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; }
body.dragging { cursor: grabbing; }
body.dragging * { cursor: inherit !important; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.ic { display: block; flex: none; }
.ic-w { display: inline-flex; flex: none; }
.dim { color: var(--tx2); }
.grow { flex: 1; }
.sep { width: 1px; align-self: stretch; margin: 6px 4px; background: var(--line2); flex: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg1); }
::-webkit-scrollbar-thumb { background: var(--bg4); border: 2px solid var(--bg1); }
::-webkit-scrollbar-thumb:hover { background: var(--line2); }
::-webkit-scrollbar-corner { background: var(--bg1); }
* { scrollbar-width: thin; scrollbar-color: var(--bg4) var(--bg1); }
:focus-visible { outline: 1px solid var(--ac); outline-offset: 0; }

/* ---- botones y campos ---------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; min-width: 28px; padding: 0 6px; border: 1px solid transparent; background: transparent; color: var(--tx1); cursor: pointer; flex: none; white-space: nowrap; transition: background .08s, color .08s, border-color .08s; }
.btn:hover { background: var(--bg3); color: var(--tx0); }
.btn:active { background: var(--bg4); transform: translateY(1px); }
.btn.active { background: var(--ac-bg); color: var(--ac); border-color: var(--ac2); }
.btn:disabled { opacity: .3; pointer-events: none; }
.btn span { font-weight: 500; }
.btn.sm { height: 22px; min-width: 22px; padding: 0 3px; }
.btn.primary { background: var(--ac); color: var(--ac-tx); padding: 0 12px; font-weight: 600; }
.btn.primary:hover { background: hsl(var(--h) 100% 74%); color: var(--ac-tx); }
.btn.ghost { border-color: var(--line2); padding: 0 12px; }
.btn.wide { width: 100%; }

.inp { height: 24px; min-width: 0; padding: 0 6px; background: var(--bg0); border: 1px solid var(--line2); color: var(--tx0); outline: none; transition: border-color .08s, background .08s; }
.inp:hover { border-color: var(--tx2); }
.inp:focus { border-color: var(--ac); background: hsl(var(--h) 30% 4%); }
select.inp { padding: 0 2px; cursor: pointer; width: 100%; }
select.inp.sm { height: 22px; width: auto; max-width: 150px; font-size: 11px; }
select option { background: var(--bg1); color: var(--tx0); }
.inp.area { height: auto; width: 100%; padding: 6px; resize: vertical; font-size: 13px; line-height: 1.35; user-select: text; -webkit-user-select: text; }
.inp.num { width: 100%; text-align: right; font-family: var(--mono); font-size: 11px; padding-right: 4px; -moz-appearance: textfield; appearance: textfield; }
.inp.num::-webkit-inner-spin-button, .inp.num::-webkit-outer-spin-button { -webkit-appearance: none; }
.num-wrap { display: flex; align-items: center; width: 74px; flex: none; position: relative; }
.num-wrap .unit { position: absolute; left: 5px; color: var(--tx2); font-size: 10px; pointer-events: none; }
.inp.hex { width: 72px; font-family: var(--mono); font-size: 11px; text-transform: lowercase; }
input, textarea { user-select: text; -webkit-user-select: text; }

.slider { -webkit-appearance: none; appearance: none; flex: 1; min-width: 40px; height: 18px; margin: 0; background: transparent; cursor: pointer; --fill: 0%; }
.slider::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(to right, var(--ac2) var(--fill), var(--bg4) var(--fill)); }
.slider::-moz-range-track { height: 4px; background: linear-gradient(to right, var(--ac2) var(--fill), var(--bg4) var(--fill)); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 8px; height: 14px; margin-top: -5px; background: var(--tx0); border: 0; }
.slider::-moz-range-thumb { width: 8px; height: 14px; background: var(--tx0); border: 0; }
.slider:hover::-webkit-slider-thumb { background: var(--ac); }
.slider.zoom { flex: none; width: 110px; }
.slider.vol { flex: none; width: 70px; }

.color { -webkit-appearance: none; appearance: none; width: 28px; height: 24px; padding: 0; border: 1px solid var(--line2); background: none; cursor: pointer; flex: none; }
.color::-webkit-color-swatch-wrapper { padding: 2px; }
.color::-webkit-color-swatch { border: 0; }
.color::-moz-color-swatch { border: 0; }
.check { width: 18px; height: 18px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--bg0); border: 1px solid var(--line2); color: var(--ac-tx); cursor: pointer; flex: none; }
.check:hover { border-color: var(--tx2); }
.check.on { background: var(--ac); border-color: var(--ac); }
kbd { font: 10px var(--mono); padding: 1px 5px; background: var(--bg3); border: 1px solid var(--line2); color: var(--tx1); white-space: nowrap; }
.timecode { font: 500 12px var(--mono); color: var(--tx0); letter-spacing: .02em; white-space: nowrap; }
.timecode span { color: var(--tx2); font-weight: 400; }
.badge { padding: 1px 6px; background: var(--ac-bg); color: var(--ac); font: 600 10px var(--mono); }
.note { padding: 6px 2px; color: var(--tx2); font-size: 11px; line-height: 1.5; }

/* ---- estructura ---------------------------------------------------------- */
#app { display: grid; grid-template-rows: 44px minmax(0, 1fr) 5px min(var(--tl-h), 52dvh); height: 100dvh; }
#topbar { display: flex; align-items: center; gap: 4px; padding: 0 10px; background: var(--bg1); border-bottom: 1px solid var(--line); min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 4px; margin-right: 6px; background: none; border: 1px solid transparent; color: var(--tx0); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; cursor: pointer; flex: none; transition: background .08s, border-color .08s; }
.brand:hover { background: var(--bg3); border-color: var(--line2); }
.brand:active { background: var(--bg4); }
.brand-logo { display: block; width: 26px; height: 26px; object-fit: contain; }
.brand-chev { display: flex; color: var(--tx2); }
.brand:hover .brand-chev { color: var(--ac); }
.tb-res { display: flex; align-items: center; gap: 6px; color: var(--tx2); }
.tb-res select.inp.sm { max-width: 250px; height: 26px; }
.tb-name { width: 200px; background: transparent; border-color: transparent; font-weight: 500; }
.saved { color: var(--tx2); font-size: 11px; margin-right: 8px; display: flex; gap: 5px; align-items: center; white-space: nowrap; }
.only-narrow { display: none; }

#main { display: grid; grid-template-columns: var(--lib-w) 5px minmax(0, 1fr) 5px var(--insp-w); min-height: 0; }
.panel { background: var(--bg1); display: flex; min-width: 0; min-height: 0; overflow: hidden; }
#inspector { flex-direction: column; }
.split { background: var(--bg0); position: relative; z-index: 2; transition: background .1s; touch-action: none; }
.split.v { cursor: col-resize; }
.split.h { cursor: row-resize; }
.split:hover, .split.on { background: var(--ac2); }

.panel-head { display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 36px; border-bottom: 1px solid var(--line); color: var(--tx0); flex: none; }
.panel-head.col { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
.panel-head h2 { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.insp-title { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.inp.name { flex: 1; background: transparent; border-color: transparent; font-weight: 600; font-size: 13px; }
.tabs { display: flex; border-top: 1px solid var(--line); }
.tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 4px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--tx2); cursor: pointer; white-space: nowrap; overflow: hidden; }
.tab:hover { color: var(--tx0); background: var(--bg2); }
.tab.on { color: var(--ac); border-bottom-color: var(--ac); background: var(--bg2); }
.insp-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: 24px; }
.insp-body > .quick, .insp-body > .note { margin: 10px; }

/* ---- secciones y filas del inspector ------------------------------------- */
.sec { border-bottom: 1px solid var(--line); }
.sec-head { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px 0 6px; cursor: pointer; color: var(--tx0); background: var(--bg2); }
.sec-head:hover { background: var(--bg3); }
.sec-head h3 { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-chev { display: flex; color: var(--tx2); transition: transform .1s; }
.sec.closed .sec-chev { transform: rotate(-90deg); }
.sec.closed .sec-body { display: none; }
.sec-actions { display: flex; align-items: center; gap: 2px; }
.sec-body { padding: 6px 10px 10px; }
.sec.off .sec-body { opacity: .4; }
.sec.off h3 { color: var(--tx2); text-decoration: line-through; }
.row { padding: 2px 0; }
.row-main { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 6px; min-height: 26px; }
.row.wide .row-main { grid-template-columns: minmax(0, 1fr) auto; }
.row.wide .row-label { display: none; }
.row.block .row-main { grid-template-columns: minmax(0, 1fr) auto; }
.row.block .row-ctl { grid-column: 1 / -1; grid-row: 2; }
.crv-wrap { position: relative; width: 100%; }
.crv { display: block; width: 100%; aspect-ratio: 260 / 170; border: 1px solid var(--line2); cursor: crosshair; touch-action: none; }
.crv-wrap .btn { position: absolute; left: 4px; top: 4px; background: hsl(var(--h) 24% 5% / .8); }
.lib-h.pro { color: var(--ac); }
.lib-h.big.first { margin-top: 8px; border-top: 0; padding-top: 0; }
.aa.fxp { position: relative; }
.hint-link { margin-left: 6px; padding: 0; background: none; border: 0; color: var(--ac); cursor: pointer; text-decoration: underline; font: inherit; }
.hint-link:hover { color: var(--tx0); }
.fx-ex { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.fx-ex-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; align-items: center; gap: 10px; padding: 6px 8px; background: var(--bg2); border-left: 2px solid var(--ac2); }
.fx-ex-row b { display: block; color: var(--tx0); font-weight: 600; }
.fx-ex-row small { color: var(--tx2); font-size: 10.5px; }
.fx-ex-row code { font: 11px var(--mono); color: var(--ac); word-break: break-word; user-select: text; -webkit-user-select: text; }
.fx-dl { grid-template-columns: 150px minmax(0, 1fr); }
.fx-dl dt { font-family: var(--mono); text-transform: none; letter-spacing: 0; color: var(--ac); }
@media (max-width: 560px) { .fx-ex-row { grid-template-columns: minmax(0, 1fr); } }
.fxp-ic { position: absolute; right: -14px; top: -4px; display: flex; color: var(--ac); }
.seg { display: flex; margin: 6px 0 2px; border: 1px solid var(--line2); background: var(--bg0); }
.seg-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 6px; background: none; border: 0; color: var(--tx2); cursor: pointer; white-space: nowrap; overflow: hidden; }
.seg-btn span { overflow: hidden; text-overflow: ellipsis; }
.seg-btn:hover { color: var(--tx0); background: var(--bg2); }
.seg-btn.on { background: var(--ac-bg); color: var(--ac); box-shadow: inset 0 -2px 0 var(--ac); }
.lib-h.big { margin-top: 22px; font-size: 11px; color: var(--tx1); border-top: 1px solid var(--line2); padding-top: 12px; }
.tabs.many .tab { gap: 3px; }
.tab-n { font: 600 9.5px var(--mono); color: inherit; opacity: .85; }
.speed-q .btn { min-width: 0; padding: 0 6px; }
.kf-quick { margin: 4px 10px 8px; }
.lang-list { display: grid; gap: 6px; margin-top: 10px; }
.lang-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; background: var(--bg2); border: 1px solid var(--line2); color: var(--tx0); cursor: pointer; text-align: left; font-size: 14px; }
.lang-opt:hover { border-color: var(--ac2); background: var(--bg3); }
.lang-opt.on { border-color: var(--ac); background: var(--ac-bg); }
.lang-opt b { flex: 1; font-weight: 600; }
.lang-opt .ic-w { color: var(--ac); }
.lang-code { font: 600 11px var(--mono); color: var(--ac); padding: 2px 6px; border: 1px solid var(--line2); }
.kfp-h { display: flex; align-items: center; gap: 6px; margin: 14px 0 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--tx0); }
.kfp-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.kfp-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--bg2); border-left: 2px solid var(--ac2); cursor: pointer; }
.kfp-item b { color: var(--tx0); font-weight: 600; }
.kfp-item.off { opacity: .5; cursor: default; }
.kfp-modes { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.kfp-mode { display: flex; gap: 8px; align-items: flex-start; padding: 7px 9px; background: var(--bg2); border: 1px solid var(--line); cursor: pointer; }
.kfp-mode:has(input:checked) { border-color: var(--ac); background: var(--ac-bg); }
.kfp-mode input { margin-top: 2px; accent-color: var(--ac); }
.kfp-mode span { display: flex; flex-direction: column; gap: 2px; }
.kfp-mode b { color: var(--tx0); font-weight: 600; }
.kfp-mode small { color: var(--tx2); font-size: 11px; line-height: 1.45; }
.row-label { color: var(--tx1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-label.scrub { cursor: ew-resize; touch-action: none; }
.row-label.scrub:hover { color: var(--ac); }
.row-ctl { display: flex; align-items: center; gap: 6px; min-width: 0; }
.row-anim { display: flex; gap: 2px; min-width: 0; }
.row.has-sub { background: var(--bg2); margin: 2px -6px; padding: 2px 6px 6px; border-left: 2px solid var(--ac2); }
.kf-btn { width: 20px; height: 22px; padding: 0; display: grid; place-items: center; background: none; border: 0; color: var(--tx2); cursor: pointer; opacity: .55; }
.kf-btn:hover { opacity: 1; color: var(--tx0); background: var(--bg3); }
.kf-btn.has { opacity: 1; color: var(--ac); }
.kf-btn.at svg { fill: currentColor; }
.kf-strip { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.kf-rail { position: relative; flex: 1; height: 18px; background: var(--bg0); border: 1px solid var(--line2); margin: 0 5px; }
.kf-track { position: absolute; inset: 0; }
.kf-head { position: absolute; top: -2px; bottom: -2px; width: 1px; background: var(--tx0); pointer-events: none; }
.kf-dot { position: absolute; top: 50%; width: 9px; height: 9px; padding: 0; margin: -4.5px 0 0 -4.5px; background: var(--ac2); border: 1px solid var(--bg0); transform: rotate(45deg); cursor: ew-resize; touch-action: none; }
.kf-dot:hover, .kf-dot.on { background: var(--tx0); }
.al-row { display: flex; align-items: flex-end; gap: 5px; margin-top: 6px; color: var(--ac); }
.al-row > .ic-w { padding-bottom: 5px; }
.al-row select.inp.sm { flex: 1; min-width: 0; }
.al-f { display: flex; flex-direction: column; gap: 1px; width: 54px; flex: none; }
.al-f span { font-size: 9px; color: var(--tx2); text-transform: uppercase; letter-spacing: .06em; }
.quick { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.quick .btn { background: var(--bg3); border-color: var(--line2); padding: 0 8px; }
.quick .btn:hover { background: var(--bg4); }
.quick .btn.primary { background: var(--ac); border-color: var(--ac); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; }

/* ---- biblioteca ---------------------------------------------------------- */
.lib-tabs { display: flex; flex-direction: column; width: 62px; flex: none; background: var(--bg0); border-right: 1px solid var(--line); }
.lib-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 56px; background: none; border: 0; border-left: 2px solid transparent; color: var(--tx2); cursor: pointer; font-size: 9.5px; letter-spacing: .02em; }
.lib-tab:hover { color: var(--tx0); background: var(--bg2); }
.lib-tab.on { color: var(--ac); border-left-color: var(--ac); background: var(--bg1); }
.lib-body { flex: 1; min-width: 0; overflow-y: auto; padding: 10px; }
.lib-h { margin: 14px 0 6px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--tx2); }
.lib-h:first-child { margin-top: 0; }
.lib-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 12px; text-align: center; border: 1px dashed var(--line2); margin-top: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
.card { background: var(--bg2); border: 1px solid var(--line); cursor: grab; touch-action: none; transition: border-color .08s, background .08s; min-width: 0; }
.card:hover { border-color: var(--ac2); background: var(--bg3); }
.card:active { border-color: var(--ac); }
.card-thumb { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; background: var(--bg0) center / cover no-repeat; color: var(--tx2); overflow: hidden; }
.card.small .card-thumb { aspect-ratio: 16 / 9; color: var(--tx0); }
.card-tag { position: absolute; left: 3px; bottom: 3px; display: flex; align-items: center; gap: 4px; padding: 1px 4px; background: hsl(var(--h) 24% 5% / .85); color: var(--tx0); font: 10px var(--mono); }
.card-x { position: absolute; top: 2px; right: 2px; background: hsl(var(--h) 24% 5% / .85); opacity: 0; }
.card:hover .card-x { opacity: 1; }
.card-miss { position: absolute; inset: 0; display: grid; place-items: center; padding: 6px; text-align: center; background: hsl(var(--h) 24% 5% / .88); color: var(--tx0); font-size: 10px; }
.card.missing { border-style: dashed; cursor: default; }
.card-name { padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; color: var(--tx1); }
.aa { font-size: 26px; line-height: 1; }
.chips { display: flex; flex-direction: column; gap: 3px; }
.chip { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; background: var(--bg2); border: 1px solid var(--line); color: var(--tx1); cursor: grab; text-align: left; touch-action: none; transition: border-color .08s, background .08s, color .08s; }
.chip > span:not(.ic-w) { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip:hover { border-color: var(--ac2); background: var(--bg3); color: var(--tx0); }
.chip.split button { height: 22px; padding: 0 6px; background: var(--bg4); border: 1px solid transparent; font-size: 10px; cursor: pointer; color: var(--tx1); }
.chip.split button:hover { background: var(--ac); color: var(--ac-tx); }
.search { display: flex; align-items: center; gap: 6px; padding: 0 8px; background: var(--bg0); border: 1px solid var(--line2); margin-bottom: 4px; }
.search:focus-within { border-color: var(--ac); }
.search .inp { flex: 1; border: 0; background: none; height: 26px; padding: 0; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 100; padding: 4px 10px; background: var(--ac); color: var(--ac-tx); font-weight: 600; pointer-events: none; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- vista previa -------------------------------------------------------- */
#preview { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg0); }
.pv-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; overflow: hidden; touch-action: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 24px 24px; background-position: center; }
.pv-stage.drop-hot { outline: 2px solid var(--ac); outline-offset: -2px; }
.pv-frame { position: relative; box-shadow: 0 0 0 1px var(--line2), 0 12px 40px hsl(var(--h) 40% 2% / .8); background: #000; }
.pv-frame canvas { display: block; width: 100%; height: 100%; }
.pv-frame.guide-x::before, .pv-frame.guide-y::after { content: ''; position: absolute; background: var(--ac); z-index: 3; pointer-events: none; }
.pv-frame.guide-x::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.pv-frame.guide-y::after { top: 50%; left: 0; right: 0; height: 1px; }
.gizmo { position: absolute; border: 1px solid var(--ac); cursor: move; z-index: 4; }
.g-h { position: absolute; width: 11px; height: 11px; background: var(--tx0); border: 1px solid var(--ac2); }
.g-h.nw { left: -6px; top: -6px; cursor: nwse-resize; } .g-h.se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.g-h.ne { right: -6px; top: -6px; cursor: nesw-resize; } .g-h.sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.g-rot { position: absolute; left: 50%; top: -30px; width: 11px; height: 11px; margin-left: -6px; background: var(--ac); cursor: grab; transform: rotate(45deg); }
.g-rot::after { content: ''; position: absolute; left: 12px; top: 12px; width: 15px; height: 1px; background: var(--ac); transform-origin: 0 0; transform: rotate(45deg); }
.pv-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; color: var(--tx1); pointer-events: none; z-index: 5; }
.pv-empty p { max-width: 340px; }
.pv-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; height: 42px; padding: 0 10px; background: var(--bg1); border-top: 1px solid var(--line); flex: none; }
.pv-mid, .pv-right, .pv-left { display: flex; align-items: center; gap: 2px; min-width: 0; }
.pv-right { justify-content: flex-end; gap: 6px; }
.btn.play { width: 40px; height: 30px; background: var(--ac); color: var(--ac-tx); margin: 0 4px; }
.btn.play:hover { background: hsl(var(--h) 100% 74%); color: var(--ac-tx); }
.btn.play.active { border-color: var(--tx0); }
.btn.play svg { fill: currentColor; }
.meter { width: 60px; height: 6px; background: var(--bg4); overflow: hidden; flex: none; }
.meter-fill { display: block; height: 100%; background: var(--ac); transform-origin: 0 50%; transform: scaleX(0); }

/* ---- línea de tiempo ----------------------------------------------------- */
.tl { display: flex; flex-direction: column; min-height: 0; background: var(--bg1); }
.tl-bar { display: flex; align-items: center; gap: 2px; height: 36px; padding: 0 8px; border-bottom: 1px solid var(--line); flex: none; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tl-bar::-webkit-scrollbar { display: none; }
.tl-bar .timecode { min-width: 96px; padding: 0 4px; color: var(--ac); font-size: 13px; }
.tl-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--head-w) minmax(0, 1fr); grid-template-rows: 26px minmax(0, 1fr); }
.tl-corner { display: flex; align-items: center; padding: 0 6px; background: var(--bg2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tl-ruler { background: var(--bg2); border-bottom: 1px solid var(--line); cursor: ew-resize; touch-action: none; overflow: hidden; }
.tl-ruler-cv { display: block; width: 100%; height: 100%; }
.tl-heads { overflow: hidden; background: var(--bg2); border-right: 1px solid var(--line); }
.tl-heads-in { padding-bottom: 40px; }
.th { height: var(--th); display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 6px; border-bottom: 1px solid var(--line); }
.th-name { width: 100%; height: 20px; padding: 0 3px; background: transparent; border: 1px solid transparent; color: var(--tx0); font-weight: 500; font-size: 11px; outline: none; }
.th-name:hover { border-color: var(--line2); }
.th-name:focus { border-color: var(--ac); background: var(--bg0); }
.th-btns { display: flex; gap: 1px; }
.tl-scroll { overflow: auto; position: relative; background: var(--bg0); }
.tl-content { position: relative; min-height: 100%; }
.tl-track { position: relative; height: var(--th); border-bottom: 1px solid var(--line); background: var(--bg1); }
.tl-track:nth-child(even) { background: hsl(var(--h) 22% 7%); }
.tl-track.hidden .clip, .tl-track.muted .clip.t-audio { opacity: .35; }
.tl-track.locked { background-image: repeating-linear-gradient(135deg, transparent 0 8px, var(--line) 8px 9px); }
.tl-track.drop-hot { background: var(--ac-bg); }
.tl-newtrack { position: absolute; left: 0; right: 0; height: var(--th); display: none; align-items: center; gap: 8px; padding: 0 14px; border: 1px dashed var(--line2); color: var(--tx2); font-size: 11px; pointer-events: none; }
body.lib-dragging .tl-newtrack { display: flex; }
.tl-newtrack.drop-hot { border-color: var(--ac); color: var(--ac); background: var(--ac-bg); }
/* pista con color propio: mismo esquema que la predeterminada con otro tono */
.th.tc { background: hsl(var(--h) 30% 14%); box-shadow: inset 3px 0 0 hsl(var(--h) 70% 56%); }
.th.tc .th-name { color: hsl(var(--h) 60% 92%); }
.tl-track.tc { background: hsl(var(--h) 26% 8.5%); }
.tl-track.tc:nth-child(even) { background: hsl(var(--h) 24% 7.5%); }
.tl-track.tc.drop-hot { background: hsl(var(--h) 60% 18%); }
.menu-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 4px 8px 8px; }
.swatch { width: 100%; aspect-ratio: 1; min-width: 22px; border: 1px solid hsl(0 0% 100% / .14); cursor: pointer; padding: 0; }
.swatch:hover { border-color: var(--tx0); }
.swatch.on { outline: 2px solid var(--tx0); outline-offset: 1px; }
.tl-playhead { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--ac); pointer-events: none; z-index: 6; will-change: transform; }
.tl-snap { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--tx0); box-shadow: 0 0 0 1px hsl(var(--h) 90% 64% / .35); pointer-events: none; z-index: 5; }
.tl.razor .clip { cursor: crosshair; }

.clip { position: absolute; top: 3px; bottom: 3px; overflow: hidden; background: var(--c, var(--bg4)); border: 1px solid hsl(var(--h) 40% 60% / .28); cursor: grab; touch-action: none; transition: filter .08s; }
.clip:hover { filter: brightness(1.18); }
.clip.sel { border-color: var(--tx0); box-shadow: inset 0 0 0 1px var(--tx0); z-index: 2; }
.clip.locked { cursor: not-allowed; }
.clip.missing { background-image: repeating-linear-gradient(135deg, transparent 0 6px, hsl(var(--h) 20% 4% / .6) 6px 12px); }
.clip.drop-hot { box-shadow: inset 0 0 0 2px var(--ac); }
.clip.t-video { --c: hsl(var(--h) 46% 24%); }
.clip.t-image { --c: hsl(var(--h) 36% 32%); }
.clip.t-audio { --c: hsl(var(--h) 30% 16%); }
.clip.t-text { --c: hsl(var(--h) 66% 40%); }
.clip.t-shape { --c: hsl(var(--h) 24% 36%); }
.clip.t-solid { --c: hsl(var(--h) 20% 28%); }
.clip.t-spectrum { --c: hsl(var(--h) 80% 30%); }
.clip.t-adjustment { --c: hsl(var(--h) 16% 22%); background-image: repeating-linear-gradient(90deg, transparent 0 10px, hsl(var(--h) 30% 70% / .09) 10px 11px); }
.clip-thumbs { position: absolute; inset: 15px 0 0 0; background: left center / auto 100% repeat-x; opacity: .7; pointer-events: none; }
.clip-wave { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.clip-label { position: absolute; left: 0; right: 0; top: 0; height: 15px; display: flex; align-items: center; gap: 4px; padding: 0 5px; color: var(--tx0); font-size: 10px; font-weight: 500; background: hsl(var(--h) 30% 6% / .5); pointer-events: none; white-space: nowrap; overflow: hidden; }
.clip-name { overflow: hidden; text-overflow: ellipsis; }
.clip-badge { display: inline-flex; align-items: center; gap: 2px; padding: 0 3px; background: hsl(var(--h) 30% 6% / .6); color: var(--ac); font: 9px var(--mono); flex: none; }
.clip-tr { position: absolute; top: 15px; bottom: 0; pointer-events: none; min-width: 3px; }
.clip-tr.in { left: 0; background: linear-gradient(to top right, hsl(var(--h) 90% 80% / .75) 49.5%, transparent 50.5%); }
.clip-tr.out { right: 0; background: linear-gradient(to top left, hsl(var(--h) 90% 80% / .75) 49.5%, transparent 50.5%); }
.clip-kf { position: absolute; bottom: 3px; width: 7px; height: 7px; margin-left: -3.5px; background: var(--tx0); border: 1px solid var(--bg0); transform: rotate(45deg); pointer-events: none; }
.clip-h { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 3; }
.clip-h.l { left: 0; } .clip-h.r { right: 0; }
.clip:hover .clip-h, .clip.sel .clip-h { background: hsl(var(--h) 40% 95% / .4); }
.clip-h:hover { background: var(--tx0) !important; }

.tl-join { position: absolute; top: 18px; bottom: 3px; z-index: 4; cursor: pointer; min-width: 10px;
  background: linear-gradient(to bottom right, transparent 49%, hsl(var(--h) 100% 88% / .95) 49% 51%, transparent 51%), linear-gradient(to top right, transparent 49%, hsl(var(--h) 100% 88% / .95) 49% 51%, transparent 51%), hsl(var(--h) 90% 70% / .28);
  border: 1px solid hsl(var(--h) 100% 85% / .8); }
.tl-join:hover, .tl-join.sel { background-color: hsl(var(--h) 90% 70% / .55); border-color: var(--tx0); }
.chip.split button { min-width: 22px; font-weight: 600; }
optgroup { background: var(--bg0); color: var(--tx2); font-style: normal; }

/* ---- menú, avisos, modal ------------------------------------------------- */
.menu { position: fixed; z-index: 200; min-width: 200px; max-height: min(70vh, 520px); overflow-y: auto; padding: 4px; background: var(--bg2); border: 1px solid var(--line2); box-shadow: 0 10px 30px hsl(var(--h) 40% 2% / .8); }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; height: 26px; padding: 0 8px; background: none; border: 0; color: var(--tx1); cursor: pointer; text-align: left; }
.menu-item span:nth-child(2) { flex: 1; }
.menu-item:hover { background: var(--ac); color: var(--ac-tx); }
.menu-item:hover kbd { background: transparent; border-color: transparent; color: inherit; }
.menu-item:disabled { opacity: .35; pointer-events: none; }
.menu-sep { height: 1px; margin: 4px 0; background: var(--line2); }
.menu-head { padding: 6px 8px 2px; font-size: 9.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--tx2); }
.toasts { position: fixed; left: 50%; bottom: calc(var(--tl-h) + 18px); transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--bg3); border: 1px solid var(--line2); border-left: 3px solid var(--ac); color: var(--tx0); box-shadow: 0 8px 24px hsl(var(--h) 40% 2% / .7); animation: rise .14s ease-out; max-width: min(90vw, 460px); }
.toast.warn, .toast.error { border-left-color: var(--tx0); background: var(--bg4); }
.toast.out { opacity: 0; transition: opacity .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.modal-wrap { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; background: hsl(var(--h) 30% 3% / .78); overflow: hidden; }
.modal { width: min(460px, 100%); max-height: min(86dvh, calc(100dvh - 32px)); min-height: 0; display: flex; flex-direction: column; background: var(--bg1); border: 1px solid var(--line2); box-shadow: 0 20px 60px hsl(var(--h) 40% 2% / .9); }
.modal-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 14px; height: 40px; border-bottom: 1px solid var(--line); color: var(--tx0); }
.modal-head h2 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.modal-body { padding: 14px; overflow-y: auto; min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; }
.modal-body .row-main { grid-template-columns: 120px minmax(0, 1fr); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.progress { height: 10px; background: var(--bg4); margin: 12px 0 8px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--ac); transition: width .15s linear; }
.summary { padding: 8px 10px; margin-top: 10px; background: var(--bg2); border-left: 2px solid var(--ac2); color: var(--tx1); line-height: 1.6; }
.summary b { color: var(--tx0); font-weight: 600; }
.drop-veil { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: hsl(var(--h) 60% 10% / .85); border: 2px dashed var(--ac); color: var(--tx0); font-size: 16px; font-weight: 600; pointer-events: none; }

/* ---- adaptación a pantallas pequeñas ------------------------------------- */
@media (max-width: 1180px) {
  :root { --lib-w: 270px; --insp-w: 300px; --head-w: 150px; }
  .tb-name { width: 140px; }
}
@media (max-width: 900px) {
  :root { --tl-h: 40dvh; --head-w: 112px; --th: 50px; }
  #main { grid-template-columns: minmax(0, 1fr); }
  #main > .split { display: none; }
  #library, #inspector { position: fixed; top: 44px; bottom: 0; z-index: 40; width: min(90vw, 360px); transition: transform .16s ease-out; box-shadow: 0 0 40px hsl(var(--h) 40% 2% / .9); }
  #library { left: 0; transform: translateX(-102%); border-right: 1px solid var(--line2); }
  #inspector { right: 0; transform: translateX(102%); border-left: 1px solid var(--line2); }
  body.show-lib #library, body.show-insp #inspector { transform: none; }
  .only-narrow { display: inline-flex; }
  .hide-narrow, #topbar .btn span, .saved span { display: none; }
  .tb-name { flex: 1; width: auto; min-width: 40px; }
  .brand b { display: none; }
  .pv-bar { grid-template-columns: auto 1fr auto; }
  .pv-right .slider.vol, .pv-right .meter, .pv-right > .ic-w { display: none; }
  .th-btns .btn:last-child { display: none; }
  .tl-bar .btn span { display: none; }
}
@media (max-width: 520px) {
  .pv-right select, .pv-left .timecode span { display: none; }
  .slider.zoom { width: 70px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ==== ampliación: keyframes visibles, curvas, expresiones, ruedas ========= */
.kf-btn { opacity: .9; border: 1px solid var(--line2); width: 22px; color: var(--tx1); }
.kf-btn:hover { border-color: var(--ac); color: var(--ac); }
.kf-btn.has { background: var(--ac-bg); border-color: var(--ac2); }
.note.hint { margin: 8px 10px 4px; padding: 5px 8px; background: var(--bg2); border-left: 2px solid var(--ac2); display: flex; align-items: center; flex-wrap: wrap; gap: 3px; }
.hint-ic { display: inline-flex; color: var(--ac); margin-left: 4px; }
.ex-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--ac); }
.ex-inp { flex: 1; font-family: var(--mono); font-size: 11px; }
.ex-msg { font: 10px var(--mono); color: var(--tx2); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-msg.bad { color: var(--tx0); background: var(--bg4); padding: 1px 4px; }
.wheel { cursor: crosshair; touch-action: none; border: 1px solid var(--line2); }
.quick.tight { margin: 0; }
.quick.pad { margin: 10px; }
.lut-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.curve-cv { display: block; border: 1px solid var(--line2); touch-action: none; cursor: crosshair; }
.curve-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 10px; }
.curve-bar .al-f { width: 80px; }
.curve-bar .al-f.wide { width: 170px; }
.curve-bar .al-f.wide select { width: 100%; max-width: none; }
.curve-bar .quick { margin: 0; flex: 1; }
/* ==== editor de curvas de animación (ventana flotante) ==================== */
.kf-win { position: fixed; z-index: 120; display: flex; flex-direction: column; min-width: 440px; min-height: 320px; max-width: calc(100vw - 4px); max-height: calc(100dvh - 4px); background: var(--bg1); border: 1px solid var(--line2); box-shadow: 0 18px 50px hsl(var(--h) 40% 2% / .85); resize: both; overflow: hidden; outline: none; }
.kf-win:focus, .kf-win:focus-within { border-color: var(--ac2); }
.kfw-head { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 4px 0 10px; background: var(--bg2); border-bottom: 1px solid var(--line); color: var(--tx0); cursor: move; flex: none; touch-action: none; }
.kfw-head b { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.kfw-head .btn { cursor: pointer; }
.kfw-clip { color: var(--tx2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kf-win .grow { flex: 1; }
.kfw-bar { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-bottom: 1px solid var(--line); flex: none; flex-wrap: wrap; }
.kfw-bar .sep { margin: 4px; }
.kfw-path { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; background: var(--bg3); border: 1px solid var(--line2); color: var(--tx0); cursor: pointer; max-width: 100%; min-width: 0; }
.kfw-path span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kfw-path .ic-w:first-child { color: var(--ac); }
.kfw-path:hover { border-color: var(--ac); }
.kfw-time { color: var(--ac); min-width: 92px; padding: 0 6px; }
.kfw-hint { font-size: 10px; }
.kfw-plot { position: relative; flex: 1; min-height: 120px; overflow: hidden; }
.kfw-cv { position: absolute; left: 0; top: 0; display: block; touch-action: none; }
.kfw-legend { position: absolute; right: 18px; top: 30px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font: 10px var(--mono); pointer-events: none; text-shadow: 0 0 3px #000; }
.kf-win .curve-bar { padding: 8px 10px; margin: 0; border-top: 1px solid var(--line); flex: none; }
.btn.play.sm { width: 32px; height: 24px; margin: 0 2px; }
.modal-wrap.float { background: none; pointer-events: none; place-items: end center; padding-bottom: 12px; }
.modal-wrap.float .modal { pointer-events: auto; width: min(680px, 100%); }

/* ==== línea de tiempo ===================================================== */
.tl-markers { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.tl-marker { position: absolute; top: 0; bottom: 0; width: 1px; background: hsl(var(--h) 40% 95% / .55); }
.tl-marker.beat { background: hsl(var(--h) 30% 80% / .16); }
.tl-marquee { position: absolute; border: 1px solid var(--ac); background: hsl(var(--h) 92% 64% / .14); pointer-events: none; z-index: 7; }
.clip-strip { position: absolute; left: 0; top: 15px; width: 100%; height: calc(100% - 15px); opacity: .8; pointer-events: none; }
.clip.grouped { border-bottom: 3px solid var(--tx0); }
.clip.t-comp { --c: hsl(var(--h) 55% 34%); background-image: repeating-linear-gradient(135deg, transparent 0 12px, hsl(var(--h) 60% 80% / .1) 12px 13px); }
.clip.t-camera { --c: hsl(var(--h) 14% 26%); background-image: repeating-linear-gradient(90deg, transparent 0 5px, hsl(var(--h) 30% 70% / .1) 5px 6px); }
.clip.t-particles { --c: hsl(var(--h) 70% 36%); }
.btn.crumb { background: var(--ac); color: var(--ac-tx); padding: 0 10px; margin-right: 6px; font-weight: 600; }
.btn.crumb:hover { background: hsl(var(--h) 100% 74%); color: var(--ac-tx); }

/* ==== vista previa: guías, recorte, máscaras, medidores =================== */
.guides { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.guide { position: absolute; background: var(--ac); }
.guide.v { top: 0; bottom: 0; width: 1px; }
.guide.h { left: 0; right: 0; height: 1px; }
.pv-thirds, .pv-safe { position: absolute; pointer-events: none; display: none; z-index: 2; }
.pv-frame.thirds .pv-thirds { display: block; inset: 0; background: linear-gradient(to right, transparent calc(33.33% - .5px), hsl(var(--h) 40% 95% / .5) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), hsl(var(--h) 40% 95% / .5) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)), linear-gradient(to bottom, transparent calc(33.33% - .5px), hsl(var(--h) 40% 95% / .5) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), hsl(var(--h) 40% 95% / .5) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)); }
.pv-frame.safe .pv-safe { display: block; inset: 5%; border: 1px solid hsl(var(--h) 40% 95% / .6); }
.crop-box { position: absolute; border: 1px dashed var(--tx0); background: hsl(var(--h) 92% 64% / .08); pointer-events: none; display: none; }
.g-c { position: absolute; background: var(--tx0); border: 1px solid var(--ac2); display: none; }
.g-c.n, .g-c.s { left: 50%; width: 26px; height: 9px; margin-left: -13px; cursor: ns-resize; }
.g-c.e, .g-c.w { top: 50%; width: 9px; height: 26px; margin-top: -13px; cursor: ew-resize; }
.g-c.n { top: -5px; } .g-c.s { bottom: -5px; } .g-c.w { left: -5px; } .g-c.e { right: -5px; }
.pv-frame[data-mode="crop"] .g-c, .pv-frame[data-mode="crop"] .crop-box { display: block; }
.pv-frame[data-mode="crop"] .g-h, .pv-frame[data-mode="crop"] .g-rot, .pv-frame[data-mode="mask"] .g-h, .pv-frame[data-mode="mask"] .g-rot { display: none; }
.pv-frame[data-mode="mask"] .gizmo { cursor: copy; border-style: dashed; }
.mask-layer { position: absolute; inset: 0; display: none; }
.pv-frame[data-mode="mask"] .mask-layer { display: block; }
.mask-svg, .mask-svg svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.mask-svg polygon { fill: hsl(var(--h) 92% 64% / .18); stroke: var(--tx0); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.mask-pt { position: absolute; width: 13px; height: 13px; margin: -7px 0 0 -7px; background: var(--tx0); border: 2px solid var(--ac2); cursor: grab; touch-action: none; z-index: 2; }
.mask-pt:hover { background: var(--ac); }
.scopes { position: absolute; left: 8px; bottom: 8px; z-index: 6; padding: 4px; background: hsl(var(--h) 24% 5% / .92); border: 1px solid var(--line2); pointer-events: none; }
.scopes canvas { display: block; width: 374px; max-width: 46vw; height: auto; }
.pv-mode { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 12px; background: var(--bg3); border: 1px solid var(--ac2); color: var(--tx0); white-space: nowrap; max-width: 96%; overflow: hidden; }

/* ==== grabación, colaboración ============================================ */
.rec-live { display: block; width: 100%; max-height: 240px; background: #000; margin-bottom: 10px; }
.rec-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-dot { width: 12px; height: 12px; background: var(--tx0); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }
.rec-clock { font-size: 18px; }
.rec-follow { display: flex; align-items: center; gap: 6px; color: var(--tx1); cursor: pointer; }
.room-code { font: 700 34px var(--mono); letter-spacing: .25em; color: var(--ac); text-align: center; padding: 14px 0; user-select: text; -webkit-user-select: text; }
.btn.live { color: var(--ac); border-color: var(--ac2); }
.card-tag.right { left: auto; right: 3px; color: var(--ac); }

/* ==== avisos de privacidad ================================================ */
.consent { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; margin: 12px 0 4px; padding: 10px; background: var(--bg2); border-left: 2px solid var(--ac2); line-height: 1.5; }
.consent dt { color: var(--tx2); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding-top: 2px; }
.consent dd { color: var(--tx0); }
.consent dd div { font-family: var(--mono); font-size: 11px; }
.modal-wrap.wide .modal { width: min(640px, 100%); }
.consent-item { padding: 12px 0; border-top: 1px solid var(--line); }
.consent-item header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.consent-item h3 { font-size: 12px; color: var(--tx0); letter-spacing: .06em; text-transform: uppercase; }
.consent-item .quick .btn.active { background: var(--ac); color: var(--ac-tx); border-color: var(--ac); }
@media (max-width: 520px) { .consent { grid-template-columns: minmax(0, 1fr); } }

/* ==== selector de fuentes ================================================= */
.font-btn { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; cursor: pointer; text-align: left; }
.font-cur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.font-cats { display: flex; margin: 8px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.font-cats .tab { flex: none; padding: 0 12px; }
.font-list { height: min(52vh, 460px); overflow-y: auto; border: 1px solid var(--line); padding: 6px; background: var(--bg0); }
.font-list .lib-h { margin: 10px 4px 6px; }
.font-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 38px; padding: 0 10px; background: none; border: 1px solid transparent; color: var(--tx0); cursor: pointer; text-align: left; }
.font-item:hover { background: var(--bg3); border-color: var(--line2); }
.font-item.on { border-color: var(--ac); background: var(--ac-bg); }
.font-name { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.font-tag { flex: none; font: 10px var(--mono); color: var(--tx2); text-transform: uppercase; letter-spacing: .06em; }

.font-row { display: flex; align-items: stretch; }
.font-row .font-item { flex: 1; min-width: 0; }
.font-row .btn { height: 38px; }
.font-import { margin: 10px 0 0; }

/* ==== avisos de funciones en beta ========================================= */
.beta-warn { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 9px 11px; background: hsl(38 70% 14%); border: 1px solid hsl(38 80% 40%); border-left-width: 3px; color: hsl(40 90% 88%); line-height: 1.5; font-size: 11.5px; }
.beta-warn b { color: hsl(42 100% 70%); letter-spacing: .06em; }
.beta-warn .ic-w { color: hsl(42 100% 62%); flex: none; margin-top: 1px; }
.sec-body > .beta-warn { margin: 8px 0; }
