/* Blockout NoMa: marca NoMa Studio AI con paneles de vidrio sobre la vista 3D */
:root {
  --mg: #DD005D; --mg-t: #ff4b93; --pu: #8C11E4; --pl: #CC66FF; --cy: #33F5FF; --bl: #38B6FF; --gr: #73EE1B;
  --bg: #07060d; --ink: #f4f1fb; --body: #d6d0e6; --muted: #b9b2cf; --dim: #a9a2bf;
  --field: rgba(5,3,12,0.45); --field-bd: rgba(255,255,255,0.12); --hair: rgba(255,255,255,0.14);
  --glass-a: 0.5; --blur: 24px;
  --fd: 'Outfit', ui-sans-serif, system-ui, sans-serif;
  --fb: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  --fm: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --r: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 500 12.5px var(--fb); overflow: hidden; }
.mono { font-family: var(--fm); }
.muted { color: var(--dim); }
.small { font-size: 11px; }
button { font: inherit; color: inherit; }
svg { display: block; }
button svg, .tag svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
kbd { font: 500 10.5px var(--fm); opacity: .72; background: none; border: 0; padding: 0; }
input, select, textarea { font: 500 12.5px var(--fb); color: var(--ink); background: var(--field); border: 1px solid var(--field-bd); border-radius: 9px; padding: 7px 10px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pl); box-shadow: 0 0 0 3px rgba(140,17,228,0.3); }
select option { background: #15101f; }
textarea { resize: vertical; line-height: 1.4; }
input[type=color] { padding: 0; width: 34px; height: 28px; border-radius: 8px; cursor: pointer; flex: none; }
input[type=checkbox] { width: auto; accent-color: var(--pu); }
input[type=number] { font-family: var(--fm); }

/* ---------- vidrio ---------- */
.glass {
  background: linear-gradient(155deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03) 45%), rgba(16,11,30,var(--glass-a));
  backdrop-filter: blur(var(--blur)) saturate(160%); -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  border: 1px solid var(--hair); border-radius: var(--r);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.14);
}

/* ---------- fondo: 3D a sangre, viñeta y brillos de marca ---------- */
#editor-view { position: fixed; inset: 0; z-index: 0; }
#editor-view canvas { display: block; width: 100%; height: 100%; }
#fx { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
#fx .vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 48% 40%, rgba(7,6,13,0) 34%, rgba(7,6,13,0.6) 100%); }
#fx .glow { position: absolute; border-radius: 50%; }
#fx .g1 { width: 980px; height: 980px; right: -380px; top: -420px; background: radial-gradient(circle, rgba(140,17,228,0.42) 0%, rgba(140,17,228,0) 66%); }
#fx .g2 { width: 900px; height: 900px; left: -420px; bottom: -460px; background: radial-gradient(circle, rgba(221,0,93,0.34) 0%, rgba(221,0,93,0) 66%); }
#fx .g3 { width: 640px; height: 640px; right: -260px; bottom: -200px; background: radial-gradient(circle, rgba(51,245,255,0.15) 0%, rgba(51,245,255,0) 66%); }

/* ---------- estructura ---------- */
#app { position: fixed; inset: 0; z-index: 2; display: grid; grid-template-rows: auto minmax(0, 1fr) var(--bottom-h, 248px); gap: 12px; padding: 14px; pointer-events: none; }
#app > * { pointer-events: auto; }
#middle { position: relative; display: grid; grid-template-columns: var(--left-w, 300px) minmax(200px, 1fr) var(--right-w, 26%); gap: 12px; min-height: 0; pointer-events: none !important; }
#left, #right > * { pointer-events: auto; }
#free { position: relative; pointer-events: none; min-width: 0; }
#free > * { pointer-events: auto; }
#right { display: flex; flex-direction: column; min-height: 0; min-width: 0; pointer-events: none; }

/* ---------- barra superior ---------- */
#top { position: relative; z-index: 4; display: flex; align-items: center; gap: 14px; padding: 9px 12px 9px 14px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .logo { height: 28px; width: auto; filter: drop-shadow(0 0 10px rgba(140,17,228,0.55)); }
.brand .app-name { font: 700 17px var(--fd); letter-spacing: .4px; }
.vsep { width: 1px; height: 24px; background: var(--hair); flex: none; }
.proj { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
#proj-name { font: 600 15px var(--fd); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font: 600 11px var(--fb); cursor: pointer; white-space: nowrap; border: 1px solid; }
.save::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.save.ok { color: var(--gr); background: rgba(115,238,27,0.12); border-color: rgba(115,238,27,0.35); }
.save.pending { color: #ffbb33; background: rgba(255,180,0,0.12); border-color: rgba(255,180,0,0.35); }
.save.err { color: var(--mg-t); background: rgba(221,0,93,0.16); border-color: rgba(221,0,93,0.45); }
.seg { display: flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--field); border: 1px solid rgba(255,255,255,0.1); flex: none; }
.seg button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border: 0; border-radius: 9px; font: 600 12.5px var(--fb); color: var(--body); background: transparent; cursor: pointer; }
.seg button:hover { color: #fff; background: rgba(255,255,255,0.06); }
.seg button.on { color: #fff; background: linear-gradient(135deg, rgba(221,0,93,0.85), rgba(140,17,228,0.85)); }
.tb { display: flex; align-items: center; gap: 6px; flex: none; }

.btn { height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--field-bd); background: rgba(255,255,255,0.05); color: var(--ink); font: 600 12.5px var(--fb); cursor: pointer; white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.22); }
.btn:disabled, .ibtn:disabled { opacity: .38; cursor: default; }
.btn.primary { height: 38px; padding: 0 16px; border-color: rgba(255,255,255,0.28); background: linear-gradient(135deg, var(--mg), var(--pu)); color: #fff; font: 700 13px var(--fd); letter-spacing: .3px; box-shadow: 0 10px 30px rgba(221,0,93,0.35); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.accent { border-color: rgba(51,245,255,0.45); background: rgba(51,245,255,0.1); color: var(--cy); }
.btn.accent:hover { background: rgba(51,245,255,0.18); }
.btn.danger { border-color: rgba(221,0,93,0.5); background: rgba(221,0,93,0.12); color: var(--mg-t); }
.btn.danger:hover { background: rgba(221,0,93,0.22); }
.btn.ghost { background: transparent; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn.wide { width: 100%; justify-content: center; }
.btn.toggle.on, .ibtn.on { border-color: rgba(204,102,255,0.5); background: rgba(140,17,228,0.22); color: #e2c8ff; }
.ibtn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--field-bd); background: rgba(255,255,255,0.05); color: var(--ink); cursor: pointer; flex: none; }
.ibtn:hover { background: rgba(255,255,255,0.1); }
.ibtn.sm { width: 30px; height: 30px; border-radius: 9px; }
.mini { border: 1px solid var(--field-bd); background: transparent; border-radius: 6px; cursor: pointer; padding: 1px 7px; color: var(--muted); }
.mini:hover { color: var(--ink); }
.link { border: 0; background: none; color: var(--pl); cursor: pointer; padding: 0; font-weight: 600; }
.dd { position: relative; }
.menu { display: none; position: absolute; right: 0; top: 46px; z-index: 50; padding: 6px; width: 310px; border-radius: 14px; }
.menu.open { display: block; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 11px; border-radius: 9px; cursor: pointer; }
.menu button:hover { background: rgba(140,17,228,0.25); }
.menu b { display: block; font: 600 13px var(--fd); }
.menu span { color: var(--muted); font-size: 11.5px; }

/* ---------- etiquetas ---------- */
.tag { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 99px; font: 700 11px var(--fd); letter-spacing: 2px; border: 1px solid; white-space: nowrap; }
.tag.live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.tag.cyan { color: var(--cy); background: rgba(7,6,13,0.55); border-color: rgba(51,245,255,0.45); }
.tag.mag { color: var(--mg-t); background: rgba(221,0,93,0.16); border-color: rgba(221,0,93,0.5); }
.tag.violet { color: var(--pl); background: rgba(140,17,228,0.2); border-color: rgba(140,17,228,0.55); }
.cap { font: 600 11px var(--fd); letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }

/* ---------- vista 3D libre ---------- */
#free { container-type: inline-size; container-name: free; }
.free-chips .tag { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.view-tools { position: absolute; left: 50%; top: 2px; transform: translateX(-50%); display: flex; align-items: center; gap: 3px; padding: 5px; border-radius: 14px; white-space: nowrap; max-width: 100%; overflow-x: auto; }
.view-tools button { height: 32px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #e9e5f4; font: 600 12px var(--fb); cursor: pointer; }
.view-tools button:hover { background: rgba(255,255,255,0.08); }
.view-tools button.cyan { border-color: rgba(51,245,255,0.45); background: rgba(51,245,255,0.12); color: var(--cy); }
.view-tools button.cyan:hover { background: rgba(51,245,255,0.2); }
.view-tools button.mag { color: var(--mg-t); }
.free-chips { position: absolute; left: 4px; bottom: 4px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none !important; }
@container free (max-width: 1100px) { .view-tools kbd { display: none; } }
/* primero se van los textos de las herramientas de cámara; Referencias, Video y Cámara desde esta vista quedan */
@container free (max-width: 1060px) { .view-tools button:not(#vt-refs):not(#vt-take):not(#vt-vr):not(#vt-view) .lb { display: none; } .view-tools button { padding: 0 9px; } }
@container free (max-width: 690px) { .view-tools .lb { display: none; } }
.chip-glass { padding: 5px 10px; border-radius: 9px; font: 500 11px var(--fm); color: #e9e5f4; background: rgba(7,6,13,0.55); border: 1px solid var(--hair); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* ---------- columna derecha ---------- */
.card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 10px; flex: none; }
#shot-panel { flex: 0 0 var(--shot-h, 360px); padding-bottom: 14px; }
#plan-panel { flex: 1 1 180px; min-height: 160px; }
.shot-body { flex: 1; min-height: 0; display: flex; gap: 14px; padding: 0 14px; align-items: flex-start; overflow: hidden; }
.shot-wrap { flex: none; }
#shot-panel.landscape .shot-body { flex-direction: column; align-items: center; }
#shot-panel.landscape .shot-info { align-self: stretch; }
.shot-frame { position: relative; background: #000; border-radius: 6px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.shot-frame canvas { display: block; width: 100%; height: 100%; }
.thirds { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, transparent calc(33.333% - .5px), rgba(255,255,255,.3) calc(33.333% - .5px), rgba(255,255,255,.3) calc(33.333% + .5px), transparent calc(33.333% + .5px), transparent calc(66.666% - .5px), rgba(255,255,255,.3) calc(66.666% - .5px), rgba(255,255,255,.3) calc(66.666% + .5px), transparent calc(66.666% + .5px)),
  linear-gradient(to bottom, transparent calc(33.333% - .5px), rgba(255,255,255,.3) calc(33.333% - .5px), rgba(255,255,255,.3) calc(33.333% + .5px), transparent calc(33.333% + .5px), transparent calc(66.666% - .5px), rgba(255,255,255,.3) calc(66.666% - .5px), rgba(255,255,255,.3) calc(66.666% + .5px), transparent calc(66.666% + .5px)); }
.vf { position: absolute; width: 16px; height: 16px; border: 0 solid var(--cy); pointer-events: none; }
.vf.tl { left: 6px; top: 6px; border-top-width: 2px; border-left-width: 2px; }
.vf.tr { right: 6px; top: 6px; border-top-width: 2px; border-right-width: 2px; }
.vf.bl { left: 6px; bottom: 6px; border-bottom-width: 2px; border-left-width: 2px; }
.vf.br { right: 6px; bottom: 6px; border-bottom-width: 2px; border-right-width: 2px; }
.shot-info { margin: 0; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
#shot-panel.landscape .shot-info { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
.shot-info dt { font: 600 10.5px var(--fd); letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.shot-info dd { margin: 3px 0 0; font: 600 14px var(--fm); }
.shot-info dd.big { font: 800 26px/1 var(--fd); }
.shot-info dd.big small { font-size: 15px; color: var(--dim); font-weight: 600; }
.shot-info .moves { display: flex; flex-wrap: wrap; gap: 4px; font: 600 11px var(--fb); }
.shot-info .moves span { padding: 2px 8px; border-radius: 99px; color: var(--cy); background: rgba(51,245,255,0.1); border: 1px solid rgba(51,245,255,0.35); }
.plan-box { position: relative; flex: 1; min-height: 120px; margin: 0 10px 10px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); }
.view { position: absolute; inset: 0; }
.view canvas { display: block; width: 100%; height: 100%; }

/* ---------- panel izquierdo ---------- */
#left { position: relative; z-index: 3; display: flex; flex-direction: column; min-height: 0; overflow: visible; }
.left-head { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 8px 14px; flex: none; }
.popover { display: none; position: absolute; left: 10px; top: 48px; z-index: 60; width: 440px; max-height: 70vh; overflow: auto; padding: 12px; border-radius: 16px; background: linear-gradient(155deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03) 45%), rgba(16,11,30,0.82); }
.popover.open { display: block; }
.add-group + .add-group { margin-top: 12px; }
.add-title { font: 600 10.5px var(--fd); letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); margin: 0 0 6px 2px; }
.add-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.add-item { display: flex; align-items: center; gap: 7px; border: 1px solid var(--field-bd); background: rgba(255,255,255,0.04); border-radius: 9px; padding: 8px 9px; cursor: pointer; text-align: left; font-size: 12px; }
.add-item:hover { border-color: rgba(204,102,255,0.6); background: rgba(140,17,228,0.25); }
.add-ico { width: 18px; text-align: center; color: var(--pl); }
#outliner { height: var(--outliner-h, 190px); overflow: auto; padding: 0 8px 4px; flex: none; }
.out-row { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; }
.out-row:hover { background: rgba(255,255,255,0.06); }
.out-row.sel { background: linear-gradient(90deg, rgba(140,17,228,0.55), rgba(221,0,93,0.3)); border-color: rgba(204,102,255,0.45); }
.out-row.sel .out-kind { color: #ece6fb; }
.out-row .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.out-row .dot.round { border-radius: 50%; }
.out-row .dot.cam { border-radius: 50%; background: #ff3d5a; box-shadow: 0 0 8px rgba(255,61,90,0.7); }
.out-row .dot.capsule { width: 9px; height: 13px; border-radius: 5px; }
.out-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.out-kind { color: var(--dim); font-size: 11px; white-space: nowrap; }
.out-kind.mono { font-family: var(--fm); font-size: 10.5px; }
.eye { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 11px; }
.eye.off { color: #5d6779; }
.hr { height: 1px; margin: 0 14px; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.2), rgba(255,255,255,0)); flex: none; }
#insp { flex: 1; overflow: auto; padding: 2px 14px 24px; }
.sec { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sec:last-child { border-bottom: 0; }
.sec-title { font: 700 15px var(--fd); margin-bottom: 9px; color: #fff; }
.row { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: center; margin: 7px 0; }
.row.vecrow, .row.stack { grid-template-columns: 1fr; gap: 5px; }
.row .lbl, .lbl { font: 600 10.5px var(--fd); letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); }
.ctl { display: flex; gap: 6px; align-items: center; min-width: 0; }
.ctl > div { flex: 1; min-width: 0; }
.vec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; }
.axis { display: flex; align-items: center; background: var(--field); border: 1px solid var(--field-bd); border-radius: 9px; overflow: hidden; }
.axis input { border: 0; border-radius: 0; padding: 6px 4px; background: transparent; box-shadow: none !important; }
.ax { font: 700 10.5px var(--fm); padding: 0 0 0 8px; }
.ax0 { color: #ff6b8a; } .ax1 { color: var(--gr); } .ax2 { color: var(--bl); }
.chk { display: flex; align-items: center; gap: 8px; margin: 9px 0; cursor: pointer; color: var(--ink); }
.btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.btns .btn { height: 34px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 7px; }
.chip { border: 1px solid var(--field-bd); background: rgba(255,255,255,0.04); border-radius: 99px; padding: 3px 10px; cursor: pointer; font: 600 11.5px var(--fb); }
.chip:hover { border-color: rgba(204,102,255,0.6); background: rgba(140,17,228,0.22); }
.range { padding: 0; height: 6px; border: 0; background: transparent; accent-color: var(--pu); box-shadow: none !important; }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.sw { width: 24px; height: 24px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.2); cursor: pointer; padding: 0; }
.sw.on { border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(204,102,255,0.6); }
.hint { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 4px 0; }
.hint.mono { font: 500 11px/1.55 var(--fm); color: #c5bedb; white-space: pre-wrap; }
.keylist { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.keyrow { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.keyrow .muted { flex: 1; font-family: var(--fm); font-size: 11px; }

/* ---------- línea de tiempo ---------- */
#bottom { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 10px 14px 10px; gap: 8px; }
.transport { display: flex; align-items: center; gap: 8px; flex: none; }
.play { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3); background: linear-gradient(135deg, var(--mg), var(--pu)); color: #fff; box-shadow: 0 8px 24px rgba(221,0,93,0.4); cursor: pointer; }
.play:hover { filter: brightness(1.12); }
.play svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
#time-now { margin-left: 8px; font: 600 20px var(--fm); color: var(--cy); letter-spacing: .5px; }
#time-total { font: 500 13px var(--fm); color: var(--dim); margin-right: 6px; }
.hint-inline { margin-left: auto; font-size: 11.5px; color: var(--dim); }
.hint-inline b { color: #e9e5f4; }
#timeline { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; position: relative; }
#timeline canvas { display: block; }

/* ---------- modal y aviso ---------- */
.modal { position: fixed; inset: 0; background: rgba(4,3,10,0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal.hidden { display: none; }
.modal-box { width: min(780px, 94vw); max-height: 90vh; display: flex; flex-direction: column; background: linear-gradient(155deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03) 45%), rgba(16,11,30,0.86); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--hair); font: 700 16px var(--fd); }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-body p { line-height: 1.5; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--hair); }
.proj-list { display: flex; flex-direction: column; gap: 6px; }
.proj-item { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; border: 1px solid var(--field-bd); background: rgba(255,255,255,0.04); border-radius: 11px; padding: 10px 13px; cursor: pointer; }
.proj-item b { font: 600 14px var(--fd); }
.proj-item:hover, .proj-item.cur { border-color: rgba(204,102,255,0.6); background: rgba(140,17,228,0.2); }
.proj-item span { color: var(--muted); font-size: 11.5px; }
.progress { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.progress.hidden { display: none; }
.bar { flex: 1; height: 8px; background: var(--field); border-radius: 99px; overflow: hidden; border: 1px solid var(--field-bd); }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mg), var(--pu), var(--cy)); }
.result video { max-width: 100%; max-height: 52vh; display: block; margin: 8px auto; background: #000; border-radius: 8px; }
.path { color: var(--muted); font: 500 11.5px var(--fm); word-break: break-all; margin-top: 6px; }
.warns { background: rgba(255,180,0,0.1); border: 1px solid rgba(255,180,0,0.35); color: #ffd8a8; border-radius: 11px; padding: 9px 13px; margin: 10px 0; }
.warns ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.5; }
.prompt-box { width: 100%; height: 46vh; font: 500 12px/1.5 var(--fm); white-space: pre-wrap; }
.sheet-img { max-width: 100%; max-height: 62vh; display: block; margin: 0 auto; border-radius: 8px; }
.help h4 { margin: 16px 0 5px; font: 700 14px var(--fd); color: var(--pl); }
.help ul { margin: 0; padding-left: 18px; line-height: 1.65; }
.help kbd { opacity: 1; font: 600 11px var(--fm); background: rgba(255,255,255,0.08); border: 1px solid var(--field-bd); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; }
#toast { position: fixed; bottom: 270px; left: 50%; transform: translateX(-50%) translateY(16px); padding: 10px 18px; border-color: rgba(204,102,255,0.5); color: #fff; opacity: 0; transition: .2s; pointer-events: none; z-index: 200; font-weight: 600; border-radius: 12px; }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(204,102,255,0.28); border-radius: 9px; }
::-webkit-scrollbar-track { background: transparent; }

/* menús desplegables: más opacos que los paneles, para que se lean sobre cualquier cosa */
.menu.glass, .popover.glass { background: linear-gradient(155deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02) 45%), rgba(18,12,32,0.95); }
.free-chips { align-items: center; }

/* ---------- disposición: bordes arrastrables, plegar, agrandar, modo foco ---------- */
.head-btns { display: flex; align-items: center; gap: 6px; min-width: 0; }
.plan-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split { position: relative; flex: none; pointer-events: auto !important; touch-action: none; z-index: 7; }
.split i { position: absolute; border-radius: 99px; background: rgba(255,255,255,0); transition: background .15s, box-shadow .15s; }
.split:hover i, .split.drag i { background: linear-gradient(135deg, var(--pl), var(--cy)); box-shadow: 0 0 10px rgba(51,245,255,0.55); }
.split.sx { position: absolute; top: 0; bottom: 0; width: 12px; cursor: col-resize; }
.split.sx i { left: 4px; width: 4px; top: 30%; bottom: 30%; }
.split.sx-left { left: var(--left-w, 300px); }
.split.sx-right { right: var(--right-w, 26%); }
.split.sy { height: 12px; cursor: row-resize; }
.split.sy i { top: 4px; height: 4px; left: 30%; right: 30%; }
#left .split.sy { height: 10px; margin: 0 14px; }
#left .split.sy i { top: 3px; left: 0; right: 0; background: rgba(255,255,255,0.14); }
#left .split.sy:hover i, #left .split.sy.drag i { background: linear-gradient(90deg, var(--pl), var(--cy)); }
.split.sy-bottom { position: absolute; left: 14px; right: 14px; bottom: calc(14px + var(--bottom-h, 248px)); }
body.resizing, body.resizing * { user-select: none !important; }
body.resizing-x, body.resizing-x * { cursor: col-resize !important; }
body.resizing-y, body.resizing-y * { cursor: row-resize !important; }

.rail { position: absolute; top: 50%; transform: translateY(-50%); display: none; flex-direction: column; align-items: center; gap: 8px; padding: 12px 7px; border-radius: 12px; cursor: pointer; color: var(--ink); font: 600 10.5px var(--fd); letter-spacing: 1.8px; text-transform: uppercase; }
.rail span { writing-mode: vertical-rl; transform: rotate(180deg); }
.rail:hover { border-color: rgba(204,102,255,0.6); }
.rail-left { left: 0; }
.rail-right { right: 0; }
.rail-right span { transform: none; }
#app.left-off #left, #app.right-off #right { visibility: hidden; }
#app.left-off .sx-left, #app.right-off .sx-right { display: none; }
#app.left-off:not(.focus) .rail-left, #app.right-off:not(.focus) .rail-right { display: flex; }
#app.bottom-off #timeline, #app.bottom-off .sy-bottom { display: none; }
#app.bottom-off #bottom { padding-bottom: 10px; }
#app.focus #left, #app.focus #right, #app.focus #bottom, #app.focus .split { visibility: hidden; }
.focus-chip { display: none !important; }
#app.focus .focus-chip { display: inline-block !important; }
#app.focus .nav-help { display: none; }
/* VR: el botón se apaga si Chrome no ve el visor (igual se puede tocar) y aparece el aviso mientras estás adentro */
.view-tools button#vt-vr.dim { opacity: 0.55; }
.vr-chip { display: none !important; border-color: rgba(115,238,27,0.45) !important; }
body.in-vr .vr-chip { display: inline-block !important; }
body.in-vr .nav-help { display: none; }

.card.max { position: absolute; z-index: 8; top: 0; bottom: 0; right: 0; left: calc(var(--left-w, 300px) + 12px); box-shadow: 0 30px 90px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.14); }
#right:has(.card.max) .sy-shot { visibility: hidden; }
#plan-panel.max .plan-box { margin: 0 12px 12px; }

.chip-glass b { color: #ffffff; font-weight: 700; }
#fly-speed { color: var(--cy); font-weight: 600; }

/* foco de teclado visible en todo lo que se puede apretar */
button:focus-visible, .add-item:focus-visible, .out-row:focus-visible, select:focus-visible { outline: 2px solid var(--cy); outline-offset: 2px; }

/* barra superior en ventanas angostas: primero se van los textos de Abrir/Nuevo, después los de los modos */
@media (max-width: 1420px) { #top .tb .lb { display: none; } #top .tb .btn:not(.primary) { padding: 0 10px; } }
@media (max-width: 1180px) { #modes .lb { display: none; } }

/* inspector: nombre del objeto como título, con su tipo al lado */
.obj-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.obj-name { font: 700 18px var(--fd); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.obj-head .tag { letter-spacing: 1px; font-size: 10.5px; padding: 3px 9px; }

/* la lista de la escena se desvanece abajo en vez de cortarse en seco */
#outliner { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); padding-bottom: 14px; }
/* toma final agrandada: el cuadro y sus datos quedan centrados */
.card.max .shot-body { justify-content: center; align-items: center; }
.card.max:not(.landscape) .shot-info { flex: 0 0 auto; min-width: 150px; }
#shot-panel.max.landscape .shot-info { align-self: center; }

/* ---------- referencias: fichas de personaje e imágenes por plano (panel que se prende con R) ---------- */
#refs-panel { display: none; position: absolute; left: 0; top: 52px; bottom: 44px; width: var(--refs-w, 300px); max-width: calc(100% - 8px); z-index: 2; overflow: visible; }
#app.refs-on #refs-panel { display: flex; }
#app.left-off #refs-panel { left: 42px; max-width: calc(100% - 50px); }
#refs-panel.drop { border-color: var(--cy); box-shadow: 0 0 0 3px rgba(51,245,255,0.25), 0 24px 60px rgba(0,0,0,0.45); }
.view-tools button.on { border-color: rgba(204,102,255,0.5); background: rgba(140,17,228,0.22); color: #e2c8ff; }
.view-tools .count { font: 600 10.5px var(--fm); padding: 1px 6px; border-radius: 99px; background: rgba(51,245,255,0.16); color: var(--cy); }
.view-tools .count[hidden] { display: none; }
.seg.sm button { height: 26px; padding: 0 10px; font-size: 11.5px; }
.refs-filter { margin: 0 14px 10px; align-self: flex-start; }
.refs-body { flex: 1; min-height: 0; overflow: auto; padding: 0 14px 14px; display: flex; flex-direction: column; gap: 14px; }
.refs-group h5 { margin: 0 0 7px; }
.refs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.ref-item { display: flex; flex-direction: column; padding: 0; text-align: left; border: 1px solid var(--field-bd); border-radius: 12px; overflow: hidden; background: rgba(5,3,12,0.5); cursor: pointer; }
.ref-item:hover { border-color: rgba(204,102,255,0.6); }
.ref-item.hot { border-color: var(--cy); box-shadow: 0 0 0 2px rgba(51,245,255,0.22); }
.ref-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #0b0814; }
.ref-cap { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px 7px; min-width: 0; }
.ref-cap b { font: 600 12px var(--fb); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref-cap span { font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.refs-empty { display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; border: 1px dashed var(--field-bd); border-radius: 12px; line-height: 1.45; color: var(--body); }
.refs-empty b { font: 600 13px var(--fd); color: var(--ink); }
.refs-grip { position: absolute; top: 14px; bottom: 14px; right: -6px; width: 12px; cursor: ew-resize; touch-action: none; }
.refs-grip::after { content: ''; position: absolute; left: 5px; top: 50%; width: 2px; height: 44px; transform: translateY(-50%); border-radius: 2px; background: rgba(255,255,255,0.4); opacity: 0; transition: opacity .15s; }
.refs-grip:hover::after { opacity: 1; }
.modal-box.wide { width: min(1180px, 96vw); }
.ref-view { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 18px; align-items: start; }
.ref-big { display: flex; align-items: center; justify-content: center; min-height: 240px; border-radius: 12px; background: rgba(5,3,12,0.55); }
.ref-big img { max-width: 100%; max-height: 68vh; display: block; border-radius: 10px; }
.ref-form { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ref-form .row { margin: 0; }
.ref-form [hidden] { display: none; }
.ref-form a.btn { text-decoration: none; justify-content: center; }
.ref-form .path { font-size: 10.5px; color: var(--dim); word-break: break-all; }
@media (max-width: 820px) { .ref-view { grid-template-columns: 1fr; } }

/* referencias vinculadas: tira en la ficha del objeto, contador en la lista y en la toma */
.ref-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin-bottom: 2px; }
.ref-thumb { padding: 0; border: 1px solid var(--field-bd); border-radius: 9px; overflow: hidden; background: #0b0814; cursor: pointer; }
.ref-thumb:hover { border-color: var(--cy); }
.ref-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.out-refs { border: 1px solid rgba(51,245,255,0.4); background: rgba(51,245,255,0.1); color: var(--cy); border-radius: 99px; padding: 0 7px; font: 600 10.5px var(--fm); cursor: pointer; white-space: nowrap; flex: none; }
.out-refs:hover { background: rgba(51,245,255,0.2); }
.shot-info .si-refs { font: 600 11.5px var(--fb); text-align: left; }

/* ---------- consumo en USD del proyecto ---------- */
.cost { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; border: 1px solid rgba(115,238,27,0.4); background: rgba(115,238,27,0.08); color: #c9f7a6; cursor: pointer; white-space: nowrap; font: 600 11.5px var(--fb); }
.cost:hover { background: rgba(115,238,27,0.16); }
.cost b { font: 600 12px var(--fm); color: #e6ffd2; }
.cost span { color: var(--dim); font-size: 11px; }
.cost.bump { animation: costbump .9s ease-out; }
@keyframes costbump { 0% { box-shadow: 0 0 0 0 rgba(115,238,27,0.55); } 100% { box-shadow: 0 0 0 12px rgba(115,238,27,0); } }
.cost-total { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.cost-total b { font: 800 34px/1 var(--fd); }
.cost-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cost-kind { padding: 8px 12px; border-radius: 12px; border: 1px solid var(--field-bd); background: var(--field); min-width: 120px; }
.cost-kind span { display: block; font: 600 10.5px var(--fd); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.cost-kind b { display: block; font: 600 15px var(--fm); margin-top: 3px; }
.cost-kind i { font-style: normal; font-size: 11px; color: var(--dim); }
.cost-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cost-table th { text-align: left; font: 600 10.5px var(--fd); letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--hair); }
.cost-table td { padding: 7px 8px; border-bottom: 1px solid rgba(255,255,255,0.06); vertical-align: top; }
.cost-table td.n { font-family: var(--fm); text-align: right; white-space: nowrap; }
.cost-table th.n { text-align: right; }
.cost-add { display: grid; grid-template-columns: 110px 70px 100px 1fr auto; gap: 8px; margin-top: 14px; align-items: center; }
@media (max-width: 900px) { .cost span { display: none; } .cost-add { grid-template-columns: 1fr 1fr; } }

/* ---------- video generado: la toma de Seedance sincronizada con el blockout (panel que se prende con T) ---------- */
#take-panel { display: none; position: absolute; right: 0; top: 52px; bottom: 44px; width: var(--take-w, 340px); max-width: calc(100% - 8px); z-index: 3; overflow: visible; }
#app.take-on #take-panel { display: flex; }
#app.right-off #take-panel { right: 42px; max-width: calc(100% - 50px); }
#take-panel.max { left: 0; width: auto; max-width: none; box-shadow: 0 30px 90px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.14); }
#take-panel.drop { border-color: var(--gr); box-shadow: 0 0 0 3px rgba(115,238,27,0.25), 0 24px 60px rgba(0,0,0,0.45); }
.tag.green { color: var(--gr); background: rgba(115,238,27,0.1); border-color: rgba(115,238,27,0.45); }
#take-panel .card-head .tag { letter-spacing: 1.4px; }
#take-panel [data-take="mute"].on { border-color: rgba(115,238,27,0.45); background: rgba(115,238,27,0.12); color: #d6ffb8; }
.take-modes { margin: 0 14px 10px; flex: none; }
.take-modes button { flex: 1; justify-content: center; }
.take-stage { position: relative; flex: 1 1 auto; min-height: 140px; margin: 0 14px; display: flex; align-items: center; justify-content: center; }
.take-frame { position: relative; flex: none; background: #000; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); touch-action: none; }
.take-frame canvas, .take-frame video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.take-frame video { object-fit: cover; }
#take-panel:not(.has-video) .take-frame video, #take-panel[data-mode="blockout"] .take-frame video { visibility: hidden; }
#take-panel[data-mode="comparar"] .take-frame video { clip-path: inset(0 0 0 var(--wipe, 50%)); }
#take-panel[data-mode="comparar"].has-video .take-frame { cursor: ew-resize; }
.take-wipe { display: none; position: absolute; top: 0; bottom: 0; left: var(--wipe, 50%); width: 0; pointer-events: none; }
#take-panel[data-mode="comparar"].has-video .take-wipe { display: block; }
.take-wipe::before { content: ''; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 10px rgba(51,245,255,0.85); }
.take-wipe i { position: absolute; top: 50%; left: 0; width: 28px; height: 28px; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, var(--mg), var(--pu)); border: 2px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.55); }
.take-wipe svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.take-lbl { display: none; position: absolute; top: 8px; padding: 3px 7px; border-radius: 6px; font: 700 9.5px var(--fd); letter-spacing: 1.5px; background: rgba(7,6,13,0.72); color: #fff; pointer-events: none; }
.take-lbl.l { left: 8px; }
.take-lbl.r { right: 8px; color: var(--gr); }
#take-panel.has-video[data-mode="comparar"] .take-lbl, #take-panel.has-video[data-mode="blockout"] .take-lbl.l, #take-panel.has-video[data-mode="seedance"] .take-lbl.r { display: block; }
.take-empty { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: rgba(7,6,13,0.8); border: 1px dashed rgba(255,255,255,0.28); line-height: 1.45; font-size: 11.5px; color: var(--body); }
.take-empty[hidden] { display: none; }
.take-empty b { font: 600 12.5px var(--fd); color: var(--ink); }
.take-empty span { word-break: break-word; }
.take-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 14px 0; flex: none; }
.take-shot { font: 600 11.5px var(--fm); color: var(--cy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.take-line { margin: 8px 14px 0; display: flex; flex-direction: column; gap: 6px; min-height: 52px; max-height: 30%; overflow: auto; flex: none; }
.take-said { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; padding: 7px 10px 8px; border-left: 3px solid var(--mg); background: rgba(221,0,93,0.13); border-radius: 0 10px 10px 0; }
.take-said b { font: 600 11px var(--fd); color: var(--mg-t); letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.take-said i { font-style: normal; font-size: 10.5px; color: var(--dim); }
.take-said span { grid-column: 1 / -1; font: 500 12.5px/1.4 var(--fb); color: #fff; }
.take-quiet { color: var(--dim); font-size: 11.5px; padding: 8px 0; }
.take-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px 12px; flex: none; }
.take-bar select { flex: 1; min-width: 0; height: 30px; padding: 4px 8px; font-size: 12px; }
.take-bar [hidden] { display: none; }
.take-grip { position: absolute; top: 14px; bottom: 14px; left: -6px; width: 12px; cursor: ew-resize; touch-action: none; }
.take-grip::after { content: ''; position: absolute; left: 5px; top: 50%; width: 2px; height: 44px; transform: translateY(-50%); border-radius: 2px; background: rgba(255,255,255,0.4); opacity: 0; transition: opacity .15s; }
.take-grip:hover::after { opacity: 1; }
#take-panel.max .take-grip { display: none; }
/* cuadro angosto: las dos etiquetas de la cortina no entran, el selector de arriba ya dice qué es cada lado */
#take-panel[data-mode="comparar"] .take-frame.narrow .take-lbl { display: none; }
/* agrandado: el cuadro usa todo el alto y el plano, el guion y la lista pasan a una columna al costado */
#app.take-on #take-panel.max { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
#take-panel.max .card-head { grid-column: 1 / -1; grid-row: 1; }
#take-panel.max .take-stage { grid-column: 1; grid-row: 2 / 6; margin: 0 0 14px 14px; min-height: 0; }
#take-panel.max .take-modes { grid-column: 2; grid-row: 2; margin: 0 14px 4px; }
#take-panel.max .take-nav { grid-column: 2; grid-row: 3; }
#take-panel.max .take-line { grid-column: 2; grid-row: 4; max-height: none; align-self: start; }
#take-panel.max .take-bar { grid-column: 2; grid-row: 5; }
