:root {
  color-scheme: dark;
  /* Marca HeLi / HELIA sobre fondo azul marino */
  --bg: #040c1f; --surface: #0b1733; --surface-2: #10204a; --surface-3: #182c5c; --surface-4: #21397a; --line: #22376a;
  --text: #eef3fb; --muted: #93a6c6;
  --primary: #187bd8; --primary-2: #1569bb; --accent: #48c5c5; --danger: #e5484d; --ok: #2db34f; --warn: #f2a900;
  --radius: 16px; --radius-sm: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Montserrat", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: #7db8ff; }

button {
  font: inherit; color: var(--text); background: var(--surface-3); border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 12px 16px; min-height: 48px; cursor: pointer; touch-action: manipulation;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, border-color .15s, transform .08s, opacity .15s;
}
button:hover { background: var(--surface-4); }
button:active:not(:disabled) { transform: scale(.97); }
button:disabled { opacity: .4; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
button.primary { background: var(--primary); }
button.primary:hover { background: var(--primary-2); }
button.danger { background: transparent; border-color: rgba(229,72,77,.5); color: #ff9a9d; }
button.danger:hover { background: rgba(229,72,77,.12); }
button.secondary { background: transparent; border-color: var(--line); }
button.secondary:hover { background: var(--surface-2); }
button.ghost { background: transparent; }
button.ghost:hover { background: var(--surface-2); }
button.small { min-height: 34px; padding: 6px 12px; font-size: 14px; }
button.big { font-size: 22px; padding: 18px 32px; min-height: 64px; border-radius: 14px; }

input[type=text], select { font: inherit; color: var(--text); background: #06112a; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; min-height: 48px; }
input[type=text] { flex: 1; min-width: 0; }
input[type=range] { flex: 1; min-width: 0; accent-color: var(--primary); height: 32px; margin: 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; background: var(--surface-3); white-space: nowrap; }
.pill.on::before, .pill.off::before, .pill.warn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pill.on { background: rgba(47,163,107,.16); color: #74dcab; } .pill.on::before { background: var(--ok); }
.pill.off { background: rgba(229,72,77,.16); color: #ff9a9d; } .pill.off::before { background: var(--danger); }
.pill.warn { background: rgba(240,160,32,.16); color: #ffc66b; } .pill.warn::before { background: var(--warn); }
.muted { color: var(--muted); }
.small-text { font-size: 14px; }
.eyebrow { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---------- Avisos ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); z-index: 50;
  background: rgba(233,237,245,.96); color: #0c0e12; padding: 12px 20px; border-radius: 999px; font-weight: 500; font-size: 14px; backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }
.banner { max-width: 1400px; margin: 12px auto 0; padding: 12px 16px; border-radius: 12px; font-size: 15px; border: 1px solid; width: calc(100% - 32px); }
.banner.error { background: rgba(229,72,77,.12); border-color: rgba(229,72,77,.4); color: #ffb3b5; }
.banner.warn { background: rgba(240,160,32,.1); border-color: rgba(240,160,32,.35); color: #ffd28a; }
.banner.info { background: rgba(59,123,255,.1); border-color: rgba(59,123,255,.35); color: #b8ceff; }

/* ---------- Visor ---------- */
.viewer #stage, .monitor #stage { position: fixed; inset: 0; }
.viewer-ui { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px 16px 80px; overflow: auto; background: linear-gradient(180deg, rgba(4,12,31,.72) 0%, rgba(4,12,31,.9) 60%, var(--bg) 100%), url(/img/fondo-olas.webp) center / cover no-repeat var(--bg); z-index: 2; }
.welcome { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; max-width: 520px; }
.welcome .logo { width: 200px; height: auto; margin-bottom: 4px; filter: drop-shadow(0 6px 24px rgba(0,0,0,.35)); }
.welcome .eyebrow, .home .eyebrow { color: var(--accent); }
.welcome h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
.welcome .lead { color: var(--muted); font-size: 16px; margin: 0 0 10px; max-width: 38ch; line-height: 1.5; }
.welcome-actions { display: flex; flex-direction: column; gap: 10px; width: min(100%, 320px); }
.welcome-actions .secondary { border-radius: 999px; min-height: 48px; color: var(--muted); }
.welcome-actions .secondary:hover { color: var(--text); }
.viewer-status { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.viewer-status .pill { background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.viewer-status .pill.on { color: #74dcab; border-color: rgba(47,163,107,.4); }
.viewer-status .pill.warn { color: #ffc66b; border-color: rgba(240,160,32,.4); }
.welcome #now-label { margin: 0; font-size: 13px; }
.compat { margin: 6px 0 0; font-size: 11px; color: var(--muted); letter-spacing: .02em; opacity: .8; }
.logo { width: 220px; height: auto; }
.hint { color: #ffc66b; min-height: 1.4em; margin: 0; font-size: 14px; }
.menu-btn { position: fixed; top: 14px; left: 14px; z-index: 3; background: rgba(10,12,16,.55); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; color: rgba(255,255,255,.85); font-size: 13px; font-weight: 500; letter-spacing: .02em; backdrop-filter: blur(10px); }
.menu-btn:hover { background: rgba(10,12,16,.75); }
.menu-btn.primary { background: rgba(59,123,255,.85); border-color: transparent; color: #fff; }
.gyro-btn { left: auto; right: 14px; }

/* ---------- Monitor ---------- */
.hud { position: fixed; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; pointer-events: none; }
.hud .pill, .hud-title { background-color: rgba(10,12,16,.72); backdrop-filter: blur(6px); }
.hud-title { font-weight: 600; padding: 4px 12px; border-radius: 999px; font-size: 14px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud #hud-time { margin-left: auto; font-variant-numeric: tabular-nums; }
.progress { position: fixed; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.12); }
.progress > i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .25s linear; }
#minimap { position: fixed; right: 12px; bottom: 16px; width: 320px; max-width: 45vw; height: auto; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; background: #000; cursor: zoom-in; box-shadow: 0 8px 24px rgba(0,0,0,.45); transition: width .2s; }
#minimap.large { width: 640px; max-width: 70vw; cursor: zoom-out; }
.monitor-actions { position: fixed; left: 12px; bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; transition: opacity .3s; max-width: calc(55vw - 24px); }
.monitor-actions button { background: rgba(10,12,16,.72); border-color: rgba(255,255,255,.15); backdrop-filter: blur(6px); }
body.idle .monitor-actions { opacity: 0; pointer-events: none; }
body.monitor.idle { cursor: none; }
.center-msg { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; padding: 16px; }
.center-msg > div { background: rgba(10,12,16,.72); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 24px 32px; text-align: center; max-width: 520px; backdrop-filter: blur(12px); }
.center-msg h2 { font-size: 22px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.center-msg p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
body.embed .monitor-actions { display: none; }
body.embed .hud { top: 8px; left: 8px; right: 8px; }
body.embed #minimap { width: 200px; }

/* ---------- Panel ---------- */
.ico { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
.ctl-header { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; background: rgba(4,12,31,.88); backdrop-filter: blur(10px); }
.ctl-header h1 { font-size: 17px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.logo-sm { height: 34px; width: auto; }
.muted-btn { color: var(--muted); }

/* Tira de gafas */
.rooms { display: flex; align-items: center; gap: 8px; padding: 10px 16px 0; max-width: 1400px; margin: 0 auto; }
.rooms-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; padding-bottom: 2px; }
.rooms-strip::-webkit-scrollbar { display: none; }
.room-chip { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 14px 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; white-space: nowrap; flex: none; transition: border-color .15s, background .15s; min-width: 120px; }
.room-chip:hover { border-color: #3a4357; background: var(--surface-2); }
.room-chip.active { border-color: var(--primary); background: rgba(59,123,255,.1); }
.room-chip .dot { grid-row: 1 / span 2; width: 9px; height: 9px; border-radius: 50%; background: #3a4357; }
.room-chip .dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(47,163,107,.2); }
.room-chip b { font-size: 14px; font-weight: 600; }
.room-chip small { grid-column: 3; grid-row: 1 / span 2; font-size: 12px; color: var(--muted); margin-left: 6px; font-variant-numeric: tabular-nums; }
.room-chip small.warn { color: #ffc66b; }
.room-sub { grid-column: 2; font-size: 12px; color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.room-add { flex: none; color: var(--muted); border: 1px dashed var(--line); min-height: 44px; }

.ctl { display: grid; gap: 16px; padding: 16px; grid-template-columns: minmax(0, 1fr); max-width: 1400px; margin: 0 auto; }
@media (min-width: 960px) {
  .ctl { grid-template-columns: minmax(0, 1.5fr) minmax(340px, 1fr); grid-template-areas: "now orient" "monitor msg" "videos queue" "links log"; align-items: start; }
  .area-now { grid-area: now; } .area-orient { grid-area: orient; } .area-msg { grid-area: msg; } .area-queue { grid-area: queue; }
  .area-videos { grid-area: videos; } .area-monitor { grid-area: monitor; } .area-links { grid-area: links; } .area-log { grid-area: log; }
}
@media (max-width: 600px) {
  .ctl-header { gap: 10px; }
  .ctl-header h1 { font-size: 16px; }
  .rooms { padding: 10px 12px 0; }
  .ctl { padding: 12px; gap: 12px; }
  .card { padding: 14px; }
  .transport { grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; }
  .transport button { font-size: 15px; }
  .banner { width: calc(100% - 24px); }
  .sub-actions { width: 100%; }
  .sub-actions button { flex: 1; }
}
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px 14px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 15px; font-weight: 600; flex: 1; white-space: nowrap; letter-spacing: 0; }
.count { font-size: 12px; color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 2px 8px; font-weight: 500; margin-left: 4px; font-family: var(--font); }

/* Ahora */
.now-media { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.now-thumb { width: 176px; aspect-ratio: 2/1; border-radius: 10px; background: #000; flex: none; object-fit: cover; }
.empty-thumb { display: grid; place-items: center; color: var(--muted); font-size: 13px; border: 1px dashed var(--line); background: var(--surface-2); }
.now-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.now-info h2 { font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.now-info .muted { font-size: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 520px) { .now-media { flex-direction: column; align-items: stretch; } .now-thumb { width: 100%; } }

.time-row { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.end-info { margin: 6px 0 0; font-size: 13px; min-height: 1.3em; font-variant-numeric: tabular-nums; }
.seek { -webkit-appearance: none; appearance: none; background: transparent; --pos: 0%; --buf: 0%; }
.seek::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--primary) var(--pos), rgba(255,255,255,.28) var(--pos), rgba(255,255,255,.28) var(--buf), var(--surface-3) var(--buf)); }
.seek::-moz-range-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--primary) var(--pos), rgba(255,255,255,.28) var(--pos), rgba(255,255,255,.28) var(--buf), var(--surface-3) var(--buf)); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.seek::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; }
.seek:disabled { opacity: .4; }

.transport { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 10px; margin: 14px 0; }
.transport button { min-height: 64px; font-size: 16px; white-space: nowrap; padding: 12px 8px; border-radius: 14px; }
.transport .skip { font-variant-numeric: tabular-nums; font-weight: 500; }
.play-btn { font-size: 18px !important; font-weight: 600; }
.play-btn .ico { width: 1.4em; height: 1.4em; }
.play-btn.playing { background: var(--surface-3); }
.play-btn.playing:hover { background: var(--surface-4); }
.sub-row { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; }
.volume-row { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 220px; }
.volume-row output { width: 44px; text-align: right; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.sub-actions { display: flex; gap: 8px; margin-left: auto; }
.sub-actions .small { min-height: 40px; }
.icon-btn { min-width: 44px; padding: 8px; }
.icon-btn .ico { width: 1.35em; height: 1.35em; }

/* Orientación */
.orient-body { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.compass { width: 140px; height: 140px; flex: none; }
.compass .ring { fill: #06112a; stroke: var(--line); stroke-width: 2; }
.compass .tick { fill: var(--muted); font-size: 8px; text-anchor: middle; dominant-baseline: middle; font-family: var(--font); }
.compass .tick.front { fill: #ff6b6b; font-weight: 700; }
.compass .fov { fill: rgba(59,123,255,.35); stroke: var(--primary); stroke-width: 1.5; }
.compass .me { fill: #fff; }
.orient-side { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 6px; }
.gaze-label { font-weight: 600; font-size: 17px; }
.btn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }

/* Mensajes */
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.btn-row > button { flex: 1 1 auto; }
form.btn-row > button { flex: 0 0 auto; }
.quick { margin-top: 10px; }
.quick button { font-size: 14px; min-height: 42px; }
.quick.editing button { border: 1px dashed rgba(229,72,77,.5); color: #ffb3b5; gap: 6px; }
.quick.editing button .ico { width: 1em; height: 1em; }
.quick-add { margin-top: 10px; }
.quick-add input { min-height: 42px; }
.overlay-now { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.overlay-now b { color: var(--text); font-weight: 600; }

/* Catálogo */
.search { display: flex; align-items: center; gap: 8px; background: #06112a; border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; color: var(--muted); min-width: 180px; }
.search input { border: 0; background: transparent; min-height: 38px; padding: 0; flex: 1; width: 100%; color: var(--text); font: inherit; font-size: 14px; }
.search input:focus { outline: 0; }
.search:focus-within { border-color: var(--primary); }
.catalog-hint { margin: -6px 0 12px; }
.catalog-hint b { color: var(--text); font-weight: 500; }
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.video-card { display: flex; flex-direction: column; background: var(--surface-2); border: 2px solid transparent; border-radius: 14px; overflow: hidden; transition: border-color .15s; }
.video-card.active { border-color: var(--primary); }
.video-card.queued { border-color: rgba(255,255,255,.18); }
.vc-main { flex: 1; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px; padding: 0 0 10px; background: transparent; border-radius: 0; text-align: left; }
.vc-main:hover { background: rgba(255,255,255,.03); }
.vc-main:active:not(:disabled) { transform: none; }
.vc-main b, .vc-main small { padding: 0 12px; }
.vc-main b { margin-top: 4px; font-weight: 600; }
.vc-main small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.vc-thumb { position: relative; display: block; aspect-ratio: 2/1; background: #000; }
.vc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.72); font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 6px; letter-spacing: .04em; }
.badge.dur { left: auto; right: 8px; font-variant-numeric: tabular-nums; }
.vc-live { position: absolute; bottom: 8px; left: 8px; background: var(--primary); font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; display: none; }
.video-card.active .vc-live { display: block; }
.vc-queued { position: absolute; bottom: 8px; right: 8px; background: rgba(255,255,255,.9); color: #0c0e12; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; }
.vc-queued:empty { display: none; }
.vc-actions { display: flex; gap: 8px; padding: 0 12px 12px; }
.vc-play { flex: 1; min-height: 40px; font-size: 14px; }
.vc-queue { min-height: 40px; font-size: 14px; }

/* Cola */
.queue { display: flex; flex-direction: column; gap: 8px; }
.q-item { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--surface-2); border-radius: 12px; }
.q-n { width: 22px; text-align: center; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.q-item img { width: 72px; aspect-ratio: 2/1; object-fit: cover; border-radius: 6px; background: #000; flex: none; }
.q-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.q-info b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-info small { color: var(--muted); font-size: 12px; }
.q-item .icon-btn { min-width: 38px; min-height: 38px; }

/* Actividad */
.log { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow: auto; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.log li { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.log li:last-child { border-bottom: 0; }
.log time { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; font-size: 13px; }
.log li.warn span { color: #ffc66b; }
.log li.ok span { color: #74dcab; }

/* Monitor embebido y links */
.monitor-frame { display: block; width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 12px; background: #000; }
.link-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.card-head + .link-row { border-top: 0; padding-top: 0; }
.link-row span { width: 70px; color: var(--muted); font-size: 14px; }
.link-row code { flex: 1; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.kbd-hint { color: var(--muted); font-size: 13px; text-align: center; margin: 0; padding: 0 16px 24px; }
kbd { background: var(--surface-3); border-radius: 4px; padding: 1px 6px; font-size: 12px; font-family: inherit; }
@media (hover: none) { .kbd-hint { display: none; } }

/* Diálogo */
.dlg { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); padding: 22px 22px 18px; width: min(92vw, 420px); box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.dlg::backdrop { background: rgba(5,6,8,.65); backdrop-filter: blur(4px); }
.dlg form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.dlg h2 { font-size: 18px; }
.dlg p { margin: 0; font-size: 14px; line-height: 1.45; }
.dlg input { width: 100%; font-size: 18px; letter-spacing: .04em; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ---------- Inicio ---------- */
.home { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px 16px 90px; min-height: 100vh; text-align: center; background: linear-gradient(180deg, rgba(4,12,31,.72) 0%, rgba(4,12,31,.9) 60%, var(--bg) 100%), url(/img/fondo-olas.webp) center / cover no-repeat fixed var(--bg); }
.home .logo { width: 220px; height: auto; margin-bottom: 4px; filter: drop-shadow(0 6px 24px rgba(0,0,0,.35)); }
.home h1 { font-size: 28px; }
.home > p { margin: 0; }
.home-room { display: flex; gap: 10px; align-items: center; width: min(560px, 100%); margin-top: 8px; }
.home-room label { color: var(--muted); }
.home-links { display: grid; gap: 12px; width: min(560px, 100%); }
.home-link { display: flex; align-items: center; gap: 16px; padding: 18px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color .15s, background .15s; }
.home-link:hover { border-color: var(--primary); background: var(--surface-2); }
.home-link .ico { font-size: 32px; }
.home-link b { display: block; font-size: 18px; }
.home-link small { color: var(--muted); font-size: 14px; }

/* ---------- Marca ---------- */
.consent { margin: 4px 0 0; font-size: 12px; color: var(--muted); max-width: 44ch; line-height: 1.5; }
.brand-foot { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 12px; letter-spacing: .02em; pointer-events: none; }
.brand-foot img { height: 30px; width: auto; opacity: .9; }
.brand-foot.static { position: static; padding: 8px 16px 12px; }
.hud-logo { height: 24px; width: auto; opacity: .92; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); margin-right: 4px; }
body.embed .hud-logo { display: none; }
.warn-badge { top: auto; bottom: 8px; left: auto; right: 8px; background: rgba(242,169,0,.92); color: #1a1200; }
.video-card.active .warn-badge, .video-card.queued .warn-badge { bottom: 34px; }
.now-warning { margin: 2px 0 0; font-size: 13px; color: #ffd27a; line-height: 1.4; }
.now-warning::before { content: "⚠ "; }

/* ---------- Filtro por dimensión ---------- */
.cat-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 12px; }
.chip { min-height: 34px; padding: 4px 12px; border-radius: 999px; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); gap: 6px; }
.chip small { font-size: 11px; opacity: .7; }
.chip.on { background: rgba(24,123,216,.18); border-color: var(--primary); color: var(--text); }
.cat-badge { top: auto; bottom: 8px; left: 8px; background: rgba(72,197,197,.9); color: #04202a; }
.video-card.active .cat-badge { display: none; }
.video-card.queued .cat-badge { bottom: 34px; }


/* ---------- Tarjetas horizontales: video a la izquierda, descripción completa a la derecha ---------- */
.catalog { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.video-card { display: grid; grid-template-columns: minmax(150px, 44%) 1fr; grid-template-rows: 1fr auto; }
.video-card .vc-main { display: contents; }
.video-card .vc-thumb { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: auto; min-height: 150px; height: 100%; }
.video-card .vc-main > b, .video-card .vc-main > small { grid-column: 2; padding: 0 14px; }
.video-card .vc-main > b { padding-top: 12px; align-self: start; }
.video-card .vc-main > small { display: block; overflow-wrap: anywhere; }
.video-card .vc-actions { grid-column: 2; padding: 10px 14px 12px; align-self: end; }
.video-card .vc-text { grid-column: 2; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 0; min-width: 0; }
@media (max-width: 520px) { .video-card { grid-template-columns: 1fr; } .video-card .vc-thumb { grid-row: auto; aspect-ratio: 2/1; min-height: 0; } .video-card .vc-text, .video-card .vc-actions { grid-column: 1; } }
.video-card .vc-text { cursor: pointer; }
