:root {
  --fondo: #0d0b10; --tinta: #f6efe2; --suave: #b9ae9c; --oro: #c9a14a; --vino: #6d1220;
  --borde: rgba(201, 161, 74, .28); --panel: #16121a;
  --display: "Archivo Black", "Arial Black", Impact, sans-serif; --texto: "Inter", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); color: var(--tinta); font-family: var(--texto); }
a { color: inherit; }

.barra { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--borde); position: sticky; top: 0; z-index: 5; background: rgba(13, 11, 16, .92); backdrop-filter: blur(6px); }
.marca { font-family: var(--display); letter-spacing: .04em; text-decoration: none; color: #ff3b3b; font-size: 20px; }
.sello { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--oro); border: 1px solid var(--borde); padding: 3px 8px; border-radius: 99px; }
.barra nav { margin-left: auto; display: flex; gap: 14px; font-size: 14px; }
.barra nav a { text-decoration: none; color: var(--suave); }
.barra nav .contacto { color: #fff; background: #d72638; padding: 7px 14px; border-radius: 99px; font-weight: 600; }

main { max-width: 1180px; margin: 0 auto; padding: 16px; }
.escenario { margin: 0 0 12px; }
.lienzo { position: relative; aspect-ratio: 16 / 9; background: #07060a; border-radius: 10px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 0 0 1px var(--borde); }
@media (max-width: 720px) { .lienzo { aspect-ratio: 4 / 5; } }
#teatro { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fundido { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.alarma { --alarma: 0; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 calc(80px * var(--alarma)) calc(18px * var(--alarma)) rgba(255, 30, 20, calc(.55 * var(--alarma))); animation: latido 1s steps(2) infinite; }
@media (prefers-reduced-motion: reduce) { .alarma { animation: none; } }
:root[data-movimiento="reducido"] .alarma { animation: none; }
@keyframes latido { 50% { opacity: .55; } }
.cartel { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; background: radial-gradient(circle at 50% 40%, #3b0d13, #0a0709 70%); }
.cartel[hidden] { display: none; }
.cartel-titulo { font-family: var(--display); font-size: clamp(26px, 5vw, 48px); color: #e6c56f; margin: 0 0 8px; }
.cartel-nota { color: var(--suave); max-width: 46ch; margin: 8px auto 0; }
.rotulo { min-height: 1.5em; margin: 10px 2px 0; font-size: 17px; font-weight: 600; color: #fff4dc; }

.mandos { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; padding: 12px; display: grid; gap: 10px; }
.fila { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.b { appearance: none; border: 1px solid var(--borde); background: #221a24; color: var(--tinta); padding: 9px 14px; border-radius: 8px; font: 600 14px var(--texto); cursor: pointer; }
.b:hover { border-color: var(--oro); }
.b:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid #e6c56f; outline-offset: 2px; }
.b.primario { background: var(--vino); min-width: 52px; }
.tiempo { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--suave); font-size: 14px; }
.linea { position: relative; overflow: hidden; }
html, body { overflow-x: clip; }
main { min-width: 0; }
#barra { width: 100%; accent-color: #d72638; }
.marcas { position: relative; height: 16px; font-size: 11px; color: var(--suave); }
.marcas span { position: absolute; top: 0; transform: translateX(-2px); border-left: 2px solid var(--oro); padding-left: 4px; white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.opciones label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--suave); }
.opciones select { background: #221a24; color: var(--tinta); border: 1px solid var(--borde); border-radius: 6px; padding: 6px 8px; font: 14px var(--texto); }
.check input { width: 18px; height: 18px; accent-color: #d72638; }

.ficha { margin-top: 14px; display: grid; gap: 10px; }
.ficha details { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; padding: 10px 14px; }
.ficha summary { cursor: pointer; font-weight: 800; }
.ficha p { color: var(--suave); line-height: 1.55; max-width: 75ch; }
.ficha table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.ficha th, .ficha td { text-align: left; padding: 5px 6px; border-bottom: 1px solid rgba(255, 255, 255, .06); vertical-align: top; }
.ficha th { color: var(--oro); font-weight: 600; }
.ficha .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--suave); }
.ficha .meta b { color: var(--tinta); }
.ficha .error { color: #ff8a80; }
.ficha tr.activa td { color: #fff; background: rgba(215, 38, 56, .14); }
@media (max-width: 720px) { .tiempo { margin-left: 0; width: 100%; } .barra .sello { display: none; } }

/* ?embed=1 — el teatro dentro de un artículo (<iframe>): sin barra ni ficha, márgenes mínimos. */
:root[data-embed="1"], :root[data-embed="1"] body { background: transparent; }
/* Sin barra de desplazamiento propia: la página madre ajusta la altura del <iframe> a la del contenido. */
:root[data-embed="1"] { overflow: hidden; }
:root[data-embed="1"] .barra, :root[data-embed="1"] .ficha { display: none; }
:root[data-embed="1"] main { max-width: none; padding: 0; }
:root[data-embed="1"] .escenario { margin: 0 0 8px; }
:root[data-embed="1"] .lienzo { box-shadow: inset 0 0 0 1px var(--borde); }
:root[data-embed="1"] .rotulo { margin: 0; padding: 8px 12px; min-height: 2.6em; font-size: 15px; background: var(--fondo); border-radius: 8px; }
:root[data-embed="1"] .mandos { padding: 10px; gap: 8px; }
@media (max-width: 720px) { :root[data-embed="1"] .rotulo { line-height: 1.35; min-height: calc(2 * 1.35em + 16px); } }
