/* ZN Publi — panel del local. Es una app (barra lateral, barra superior, encabezados compactos, contenido en
   bandejas), con el lenguaje visual de la web y de Zetaene: azul noche, bandejas de 48 px, pestañas tipo carpeta en mono
   mayúscula, tarjetas de borde doble, botones píldora y grano. Va encima de zn.css y site.css. */

body.panel { min-height: 100dvh; background: var(--ground); font-size: 1rem; }
.panel [hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 10px 16px; border-radius: var(--r-pill); background: var(--light); color: var(--on-light); }
.skip:focus { left: 8px; }

/* ---------- Armado de la app ---------- */
.app { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; padding: 20px 16px 18px; background: var(--night); border-right: 2px solid var(--line-strong); }
.side .logo { padding: 6px 10px 2px; }
.side-local { position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 4px; padding: 16px 18px 18px; border-radius: 24px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink-2); text-decoration: none; transition: border-color 0.22s cubic-bezier(.22, 1, .36, 1); }
.side-local:hover, .side-local[aria-current="page"] { border-color: var(--line-hover); color: var(--ink-2); }
.side-local-grain { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.6s ease-out; }
.side-local-grain.grain-on { opacity: 0.9; }
.side-local .tag-mono { font-size: 11px; color: var(--ink-faint); }
.side-local b { font-size: 17px; font-weight: 560; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-local-plan { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); }
.local-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--warn); }
.local-dot.on { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-wash); }
.side-nav { display: grid; gap: 4px; }
.side-nav a { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 16px; border-radius: var(--r-pill); color: var(--ink-soft); font-size: 15px; font-weight: 500; text-decoration: none; transition: background-color 0.22s cubic-bezier(.22, 1, .36, 1), color 0.22s cubic-bezier(.22, 1, .36, 1); }
.side-nav a:hover { background: var(--surface-2); color: #fff; }
.side-nav a[aria-current="page"] { background: var(--surface-3); color: var(--ink); }
.side-nav a[aria-current="page"] .i { color: var(--vermilion-text); }
.side-nav em { margin-left: auto; font: 500 12px var(--font-mono); font-style: normal; color: var(--ink-faint); }
.side-foot { margin-top: auto; display: grid; gap: 12px; }
.side-store { display: grid; gap: 8px; padding: 14px 16px; border-radius: 20px; border: 2px solid var(--line); font-size: 13px; color: var(--ink-faint); }
.side-store .tag-mono { font-size: 11px; }
.side-link { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; font-size: 14px; color: var(--ink-soft); text-decoration: none; background: none; border: 0; cursor: pointer; }
.side-link:hover { color: var(--ink); }

.work { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 10px clamp(16px, 3vw, 40px); background: rgb(6 12 21 / 0.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-logo { display: none; }
.crumb { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; }
.crumb b { color: var(--ink); font-weight: 560; }
.crumb-host { color: var(--ink-faint); }
.crumb-sep { color: var(--line-hover); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar .badge { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; }
main[data-view] { width: 100%; max-width: 1340px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 40px) 72px; display: grid; gap: 32px; align-content: start; outline: none; }
main[data-view] > * { min-width: 0; }

/* ---------- Encabezado de página (compacto, con la frase en dos tonos de la web) ---------- */
.pg-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 28px; }
.pg-head-text { display: grid; gap: 10px; max-width: 780px; }
.pg-head .badge { justify-self: start; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; }
.pg-head h1 { font-size: clamp(28px, 2.6vw, 36px); font-weight: 560; letter-spacing: -0.025em; line-height: 1.1; color: var(--ink); text-wrap: balance; }
.pg-head h1 .soft, .pg-sec-title .soft { color: var(--ink-faint); }
.pg-head p { font-size: 16px; color: var(--ink-soft); line-height: 1.45; }
.pg-head p b { color: var(--ink-2); font-weight: 500; }
.pg-head .actions { gap: 12px; }

/* Tarjeta de bienvenida del inicio: el panel del héroe de la web (degradé radial y grano), con la tele al lado */
.pg-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(24px, 4vw, 56px); padding: clamp(24px, 3vw, 40px); border-radius: 48px; border: 1.5px solid transparent;
  background-image: radial-gradient(86% 70% at 2% 1%, #142134 27%, var(--night) 88%), linear-gradient(to right, rgb(255 255 255 / 0.1), rgb(255 255 255 / 0.02));
  background-clip: padding-box, border-box; background-origin: padding-box, border-box; }
.pg-hero-grain { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.9s ease-out; -webkit-mask-image: linear-gradient(to right, #000, transparent 60%); mask-image: linear-gradient(to right, #000, transparent 60%); }
.pg-hero-grain.grain-on { opacity: 1; }
.pg-hero .pg-head { display: grid; justify-items: start; align-items: start; }
.pg-hero .pg-head h1 { font-size: clamp(30px, 3.2vw, 44px); }
.pg-hero .actions { margin-top: 10px; }

/* Bloque con título chico y su bandeja */
.pg-sec { display: grid; gap: 14px; }
.pg-sec-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding: 0 10px; }
.pg-sec-title h2 { font-size: 20px; font-weight: 560; letter-spacing: -0.015em; color: var(--ink); }
.pg-sec-title a { font-size: 14.5px; }
.pg-tray { position: relative; padding: 20px; border-radius: 48px; background: var(--tray); border: 1px solid var(--line); }
.pg-tray > .folder { --fold-gap: 18px; }

/* Pestañas tipo carpeta de la web, del tamaño de una app */
.folder.big { --fold-bg: var(--bg); --fold-line: var(--line-strong); }
.folder.big .folder-tab { height: 56px; gap: 10px; background: var(--night); border-width: 2px; }
.folder.big .folder-tab[aria-selected="true"] { height: calc(56px + var(--fold-gap) + 2px); margin-bottom: -2px; border-width: 2px; }
.folder.big .folder-tab .i { width: 20px; height: 20px; stroke-width: 1.6; }
.folder-tab .ft-label { font-size: 13.5px; }
.folder-tab .ft-count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.folder.big .folder-body { border-width: 2px; border-radius: 28px; padding: clamp(16px, 2.4vw, 26px); }
.body-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 22px; }
.body-head p { color: var(--ink-soft); max-width: 66ch; font-size: 15px; }
.body-head .row { gap: 10px; }

/* ---------- Tarjetas (como .feat de la web) ---------- */
/* min(…, 100%): en un panel angosto la tarjeta se achica en vez de salirse por la derecha */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 20px; }
.cards > * { min-width: 0; }
.pcard { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; align-content: start; gap: 14px; padding: 10px 10px 18px; border-radius: 28px; border: 2px solid var(--line-strong); background: var(--surface); transition: border-color 0.22s cubic-bezier(.22, 1, .36, 1), transform 0.22s cubic-bezier(.22, 1, .36, 1); }
.pcard:hover { border-color: var(--line-hover); }
.pcard.is-off .mini { opacity: 0.4; filter: grayscale(0.7); }
.pcard.is-new { border-color: var(--ok); box-shadow: 0 0 0 4px var(--ok-wash); }
.pcard .mini { border-radius: 20px; }
.pcard-body { display: grid; gap: 6px; padding: 0 12px; }
.pcard-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard-title { min-width: 0; flex: 1; font-size: 17px; font-weight: 560; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-desc { font-size: 15px; color: var(--ink-soft); }
.pcard-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--ink-faint); }
.pcard-meta span { display: inline-flex; align-items: center; gap: 5px; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 12px 0; }
.pcard-hit { position: absolute; inset: 0; z-index: 1; border: 0; border-radius: inherit; background: none; cursor: pointer; }
.pcard-hit:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.pcard .switch, .pcard .btn, .pcard .card-menu, .pcard a { position: relative; z-index: 2; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-row .badge { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }

/* Tarjetas de acción (las .feat de la web, cliqueables) */
button.feat, a.feat { text-align: left; font: inherit; color: inherit; cursor: pointer; text-decoration: none; transition: border-color 0.22s cubic-bezier(.22, 1, .36, 1), background-color 0.22s cubic-bezier(.22, 1, .36, 1); }
button.feat:hover, a.feat:hover { border-color: var(--line-hover); background: var(--surface-2); }
button.feat:focus-visible, a.feat:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.feats.four .feat { min-height: 200px; }
.pg-tray .feat { border-radius: 28px; padding: 26px 28px 28px; }
.feat .go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; padding-top: 10px; font-size: 14.5px; color: var(--link); }
.feat.hi { border-color: rgb(224 80 76 / 0.55); background: linear-gradient(180deg, rgb(183 46 43 / 0.14), var(--surface) 60%); }
.feat.hi > .i { color: var(--vermilion-text); }

/* Números del inicio */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.kpi { display: grid; gap: 6px; padding: 22px 24px 24px; border-radius: 28px; border: 2px solid var(--line-strong); background: var(--surface); text-decoration: none; color: inherit; transition: border-color 0.22s cubic-bezier(.22, 1, .36, 1); }
a.kpi:hover { border-color: var(--line-hover); }
.kpi .tag-mono { font-size: 12px; color: var(--ink-faint); }
.kpi b { font-family: var(--font-display); font-size: clamp(28px, 3vw, 38px); font-weight: 560; letter-spacing: -0.02em; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 15px; color: var(--ink-soft); }

/* Aviso */
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 14px 20px; border-radius: 20px; border: 2px solid rgb(143 179 224 / 0.22); background: rgb(143 179 224 / 0.07); color: var(--ink-2); font-size: 15px; }
.notice .i { color: var(--link); margin-top: 2px; }
.notice b { color: var(--ink); font-weight: 560; }
.notice.warn { border-color: rgb(224 165 74 / 0.3); background: var(--warn-wash); }
.notice.warn .i { color: var(--warn-text); }
.notice.alert { border-color: rgb(224 80 76 / 0.35); background: var(--vermilion-wash); }

/* ---------- La tele simulada ---------- */
.tv-wrap { position: relative; }
.tv-wrap > .badge { position: absolute; top: -14px; right: 18px; z-index: 6; }
.tv { position: relative; aspect-ratio: 16 / 9; border-radius: 26px; padding: 10px; background: #05090f; border: 2px solid var(--line-hover); box-shadow: 0 32px 72px rgb(0 0 0 / 0.65); }
.tv-in { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 17px; background: #05090f; isolation: isolate; }
.tv-prog > svg.pitch { position: absolute; inset: 0; width: 100%; height: 100%; }
.tv-chan { position: absolute; top: 5%; right: 3%; z-index: 1; display: inline-flex; gap: 3px; align-items: center; padding: 3px 8px; border-radius: 6px; background: rgb(8 16 27 / 0.72); border: 1px solid rgb(255 255 255 / 0.22); font-family: var(--font-display); font-size: 12px; color: #fff; transition: opacity 220ms; }
.tv-chan span { color: var(--vermilion-text); font-weight: 700; }
.tv-score { position: absolute; top: 5%; left: 3%; z-index: 1; display: inline-flex; gap: 6px; padding: 3px 9px; border-radius: 6px; background: rgb(8 16 27 / 0.8); font: 600 11.5px var(--font-mono); color: #fff; }
.tv-full, .tv-zoc { position: absolute; z-index: 3; opacity: 0; transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out); pointer-events: none; }
.tv-full { inset: 0; background: #000; }
.tv-full img, .tv-full video, .tv-zoc img, .tv-zoc video { display: block; width: 100%; height: 100%; object-fit: cover; }
.tv-zoc { left: 0; right: 0; bottom: 0; height: 20%; transform: translateY(100%); box-shadow: 0 -10px 24px rgb(0 0 0 / 0.35); }
.tv-full.on { opacity: 1; }
.tv-zoc.on { opacity: 1; transform: none; }
.tv-label { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 14px; color: var(--ink-faint); }
.tv-label .bar { flex: 1; height: 5px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.tv-label .bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--vermilion-text); }

/* Zócalo de texto rápido (lo dibuja la tele; acá se imita con HTML) */
.txt-zoc { position: absolute; inset: 0; display: flex; align-items: center; gap: 4%; padding: 0 4%; font-family: var(--font-display); container-type: size; }
.txt-zoc b { font-size: 42cqh; font-weight: 800; line-height: 1; text-transform: uppercase; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txt-zoc span { font-size: 22cqh; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txt-zoc strong { margin-left: auto; padding: 0 3%; border-radius: 8px; font-size: 44cqh; font-weight: 800; line-height: 1.3; white-space: nowrap; }
.txt-zoc .txt-col { display: grid; min-width: 0; }

/* Mini tele de las tarjetas */
.mini { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; background: #173a2a; isolation: isolate; }
.mini > svg.pitch { position: absolute; inset: 0; width: 100%; height: 100%; filter: saturate(0.7) brightness(0.8); }
.mini > img.full, .mini > video.full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mini > .zoc { position: absolute; left: 0; right: 0; bottom: 0; height: 20%; overflow: hidden; box-shadow: 0 -6px 14px rgb(0 0 0 / 0.4); }
.mini > .zoc img, .mini > .zoc video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini .blank { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--ink-soft); font-size: 14px; background: var(--night); border: 2px dashed var(--line-hover); border-radius: inherit; }
.mini .blank.zoc-blank { inset: auto 0 0 0; height: 20%; border-radius: 0; border-width: 2px 0 0; background: rgb(8 16 27 / 0.86); color: var(--ink); font-weight: 560; }
.mini .blank .i { width: 30px; height: 30px; }
.mini-tag { position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); background: rgb(8 16 27 / 0.82); border: 1px solid rgb(255 255 255 / 0.14); font: 500 11px var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); }
.mini-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.mini-play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; pointer-events: none; }
.mini-play span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgb(8 16 27 / 0.7); color: #fff; }

/* ---------- Campos ---------- */
.fields { display: grid; gap: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.form-grid .full { grid-column: 1 / -1; }
.field .label, .field > label { font-size: 15px; color: var(--ink); font-weight: 500; }
/* Número a mano + atajos ("5 s · 10 s · 15 s · [ 12 ] s") */
.numf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.numf .chip { height: 38px; padding: 0 14px; font-size: 14px; border-width: 2px; }
.numf .chip[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); border-color: var(--line-hover); }
.numf-in { display: inline-flex; align-items: center; height: 44px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--night); transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.numf-in:focus-within { border-color: var(--link); box-shadow: 0 0 0 4px rgb(143 179 224 / 0.16); }
.numf-in input { width: 78px; height: 100%; padding: 0 4px 0 14px; border: 0; outline: 0; background: none; color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.numf-in input::-webkit-outer-spin-button, .numf-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.numf-in span { padding-right: 14px; color: var(--ink-faint); font-size: 14px; }
.numf-in[aria-invalid="true"] { border-color: var(--vermilion-ink); }
.numf-in button { width: 34px; height: 100%; border: 0; background: none; color: var(--ink-soft); cursor: pointer; font-size: 18px; }
.numf-in button:hover { color: var(--ink); }
.choice-list { display: grid; gap: 10px; }
.opt { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 20px; border: 2px solid var(--line-strong); background: var(--night); cursor: pointer; transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.opt:hover { border-color: var(--line-hover); }
.opt:has(input:checked) { border-color: var(--link); background: rgb(143 179 224 / 0.07); }
.opt input { margin-top: 3px; }
.opt b { display: block; color: var(--ink); font-weight: 560; }
.opt span { font-size: 14.5px; color: var(--ink-soft); }
.opts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.days-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.days-pick label { position: relative; }
.days-pick input { position: absolute; opacity: 0; inset: 0; }
.days-pick span { display: grid; place-items: center; min-width: 50px; height: 40px; padding: 0 10px; border-radius: var(--r-pill); border: 2px solid var(--line-strong); font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.days-pick input:checked + span { background: var(--surface-3); border-color: var(--line-hover); color: var(--ink); }
.days-pick input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.days { display: flex; gap: 4px; }
.days i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font: 600 11px var(--font-mono); font-style: normal; background: var(--night); color: var(--ink-faint); border: 1px solid var(--line); }
.days i.on { background: var(--surface-3); color: var(--ink); border-color: var(--line-hover); }
.colors { display: flex; gap: 10px; flex-wrap: wrap; }
.colors label { position: relative; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.colors input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.colors label:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 3px var(--bg) inset; }
.colors label:has(input:focus-visible) { outline: 2px solid var(--link); outline-offset: 2px; }
.range { width: 100%; accent-color: #8fb3e0; }

/* ---------- Diálogos (más grandes y redondos, como las tarjetas de la web) ---------- */
dialog.dlg { width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 32px); overflow: auto; border-radius: 34px; border: 2px solid var(--line-strong); background: var(--tray); }
dialog.dlg.dlg-wide { width: min(1000px, calc(100% - 24px)); }
dialog.dlg::backdrop { background: rgb(2 5 10 / 0.8); backdrop-filter: blur(2px); }
.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 30px 32px 0; }
.dlg-head h2 { font-size: 26px; font-weight: 560; letter-spacing: -0.02em; }
.dlg-head p { margin-top: 8px; color: var(--ink-soft); font-size: 15.5px; max-width: 60ch; }
.dlg-body { padding: 24px 32px; gap: 22px; }
.dlg-foot { padding: 0 32px 28px; align-items: center; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.choice { display: grid; align-content: start; gap: 8px; min-height: 150px; padding: 24px 24px 26px; border-radius: 28px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink-2); text-align: left; cursor: pointer; font: inherit; text-decoration: none; transition: border-color 0.22s cubic-bezier(.22, 1, .36, 1), background-color 0.22s cubic-bezier(.22, 1, .36, 1); }
.choice:hover { border-color: var(--line-hover); background: var(--surface-2); }
.choice > .i { width: 26px; height: 26px; margin-bottom: 6px; color: var(--link); }
.choice b { color: var(--ink); font-weight: 560; font-size: 17px; }
.choice span { font-size: 15px; color: var(--ink-soft); }
.choice.hi { border-color: rgb(224 80 76 / 0.55); }
.choice.hi > .i { color: var(--vermilion-text); }

/* Código de 8 dígitos */
.code { display: flex; justify-content: center; gap: 8px; font: 600 clamp(28px, 6vw, 46px) var(--font-mono); color: var(--ink); }
.code span { width: 1.15em; padding: 12px 0; text-align: center; border-radius: 14px; background: var(--night); border: 2px solid var(--line-strong); }
.code span:nth-child(4) { margin-right: 14px; }
.steps { display: grid; gap: 12px; counter-reset: paso; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 14px; align-items: flex-start; font-size: 15.5px; color: var(--ink-2); }
.steps li::before { counter-increment: paso; content: counter(paso); flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--night); border: 2px solid var(--line-strong); color: var(--ink); font-size: 13px; font-weight: 600; }

/* ---------- Teles ---------- */
.tvcard { display: grid; gap: 18px; align-content: start; min-height: 230px; padding: 26px 28px 28px; border-radius: 28px; border: 2px solid var(--line-strong); background: var(--surface); }
.tvcard-head { display: flex; gap: 14px; align-items: center; }
.tvcard-head > .i { width: 28px; height: 28px; color: var(--link); }
.tvcard-head b { display: block; font-size: 18px; color: var(--ink); font-weight: 560; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: 15px; }
.kv dt { color: var(--ink-faint); }
.kv dd { margin: 0; color: var(--ink-2); text-align: right; }
.slot-add { display: grid; place-items: center; align-content: center; gap: 10px; min-height: 230px; padding: 26px; border-radius: 28px; border: 2px dashed var(--line-hover); color: var(--ink-soft); background: none; cursor: pointer; font: inherit; text-align: center; transition: border-color 0.22s, color 0.22s, background-color 0.22s; }
.slot-add:hover { border-color: var(--link); color: var(--ink); background: rgb(143 179 224 / 0.04); }
.slot-add .i { width: 30px; height: 30px; }
.slot-add b { font-size: 18px; color: var(--ink); font-weight: 560; }

/* ---------- Horarios ---------- */
.day-bar { position: relative; height: 54px; border-radius: 16px; background: var(--night); border: 2px solid var(--line-strong); overflow: hidden; }
.day-bar .seg { position: absolute; top: 7px; bottom: 7px; border-radius: 10px; background: rgb(143 179 224 / 0.2); border: 1px solid rgb(143 179 224 / 0.45); color: var(--ink); font-size: 12.5px; display: flex; align-items: center; padding: 0 10px; overflow: hidden; white-space: nowrap; }
.day-bar .seg.zoc { background: rgb(224 80 76 / 0.16); border-color: rgb(224 80 76 / 0.45); }
.day-bar .now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--vermilion-text); }
.day-scale { display: flex; justify-content: space-between; margin-top: 8px; font: 12px var(--font-mono); color: var(--ink-faint); }
.franjas { display: grid; gap: 16px; margin-top: 28px; }
.franja { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px 24px; padding: 22px 26px; border-radius: 28px; border: 2px solid var(--line-strong); background: var(--surface); }
.franja.off { opacity: 0.6; }
.franja-name { display: grid; gap: 6px; min-width: 0; }
.franja-name b { font-size: 18px; color: var(--ink); font-weight: 560; }
.franja-name .hint { font-size: 14.5px; }
.franja .row { gap: 6px; }
/* Vista previa de la rotación: las filas de log de la web */
.sim { display: grid; gap: 6px; }
.sim .log { animation: none; height: auto; min-height: 44px; padding: 8px 14px; grid-template-columns: 70px 1fr auto; }
.sim .log .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sim .log .who img { width: 64px; height: 36px; object-fit: cover; border-radius: 6px; flex: none; background: var(--night); }
.sim .log .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings { display: grid; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.setting:first-child { padding-top: 4px; }
.setting:last-child { border-bottom: 0; padding-bottom: 4px; }
.setting > div:first-child { display: grid; gap: 6px; max-width: 62ch; }
.setting b { color: var(--ink); font-weight: 560; font-size: 16.5px; }
.setting p { font-size: 15px; color: var(--ink-soft); }
.lock { opacity: 0.5; pointer-events: none; }
.corner-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 220px; aspect-ratio: 16 / 9; padding: 8px; border-radius: 16px; background: #173a2a; border: 2px solid var(--line-hover); flex: none; }
.corner-pick label { position: relative; display: grid; border-radius: 8px; cursor: pointer; }
.corner-pick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.corner-pick span { display: grid; place-items: center; border-radius: 8px; border: 1px dashed rgb(255 255 255 / 0.28); font-size: 11.5px; color: rgb(255 255 255 / 0.75); }
.corner-pick input:checked + span { border: 2px solid var(--warn-text); background: rgb(224 165 74 / 0.18); color: #fff; }
.corner-pick input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 1px; }

/* ---------- Menú de tarjeta ---------- */
.menu { position: absolute; z-index: 30; min-width: 220px; padding: 8px; border-radius: 20px; background: var(--surface-2); border: 2px solid var(--line-strong); box-shadow: var(--shadow-pop); }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: var(--ink-2); font-size: 15px; text-align: left; cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: var(--surface-3); color: var(--ink); outline: none; }
.menu button.danger { color: var(--vermilion-ink); }
.menu hr { margin: 6px 0; }

/* Soltar archivos */
.drop { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; background: rgb(2 5 10 / 0.84); }
.drop.on { display: grid; }
.drop-box { display: grid; justify-items: center; gap: 14px; padding: 56px 72px; border-radius: 40px; border: 2px dashed var(--link); color: var(--ink); font-size: 20px; background: var(--tray); }
.drop-box .i { width: 44px; height: 44px; color: var(--link); }

.empty { padding: 56px 24px; }
.empty .i-lg { width: 34px; height: 34px; color: var(--link); }


/* ---------- Pestañas con la forma de la web (.ft de site.css + formaCarpeta en ui.js), con alto variable ---------- */
.pg-tray:has(> .ft) { padding: 0; background: none; border: 0; border-radius: 0; }
.ft-app { height: auto; min-width: 0; }
.ft-app .ft-grid { height: auto; grid-template-rows: 64px auto; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.ft-app .ft-tabs { gap: 20px; }
.ft-app .ft-tab { gap: 10px; padding: 0 18px; }
.ft-app .ft-ico .i { width: 22px; height: 22px; }
.ft-app .ft-label { font-size: 14px; }
.ft-app .ft-count { flex: none; font: 500 12px var(--font-mono); color: var(--ink-faint); }
.ft-app .ft-tab[aria-selected="true"] .ft-count { color: var(--ink-soft); }
.ft-app .ft-panel { overflow: visible; border-radius: 32px; padding: 26px 30px 30px; }
@media (max-width: 760px) {
  .ft-app .ft-grid { grid-template-rows: 48px auto; gap: 16px; }
  .ft-app .ft-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .ft-app .ft-tabs::-webkit-scrollbar { display: none; }
  .ft-app .ft-tab { flex: none; height: 48px; padding: 0 16px; border-color: var(--line-strong); }
  .ft-app .ft-tab[aria-selected="true"] { background: var(--surface-3); border-color: var(--line-hover); }
  .ft-app .ft-label { font-size: 12.5px; }
  .ft-app .ft-panel { padding: 18px 16px 20px; }
}


/* ---------- Banner en L: el partido achicado al 80 % arriba a la derecha ---------- */
.mini > .l-video { position: absolute; top: 0; right: 0; width: 80%; height: 80%; overflow: hidden; }
.mini > .l-video svg.pitch { position: absolute; inset: 0; width: 100%; height: 100%; }
.mini > img.full + .mini-tag, .mini > .l-video + img.full { z-index: 1; }
.mini .blank.l-blank { inset: 0; border-radius: inherit; background: rgb(8 16 27 / 0.86); color: var(--ink); font-weight: 560; place-items: end start; padding: 0 0 6% 4%; }
.tv-prog { position: absolute; inset: 0; z-index: 1; transform-origin: 100% 0; transition: transform 650ms var(--ease-out), border-radius 650ms var(--ease-out); }
.tv-prog.chico { transform: scale(0.8); border-bottom-left-radius: 10px; overflow: hidden; }
.tv-lban { position: absolute; inset: 0; z-index: 2; opacity: 0; transition: opacity 650ms var(--ease-out); pointer-events: none; }
.tv-lban.on { opacity: 1; }
.tv-lban img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Celular: sin barra lateral, barra inferior ---------- */
.tabbar { display: none; }
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-hero { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar-logo { display: inline-flex; }
  .topbar-logo img { width: 28px; height: 28px; }
  .crumb-host, .crumb-host + .crumb-sep { display: none; }
  body.panel { padding-bottom: 76px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); background: var(--night); border-top: 2px solid var(--line-strong); }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 7px 0; border-radius: 16px; color: var(--ink-faint); text-decoration: none; font-size: 11.5px; }
  .tabbar a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
  .toast-zone { bottom: 92px; }
  .split, .form-grid, .choices, .opts-grid, .feats { grid-template-columns: 1fr; }
  .franja { grid-template-columns: 1fr auto; }
}
@media (max-width: 600px) {
  .kpis, .feats.four, .cards { grid-template-columns: 1fr; }
  main[data-view] { padding-top: 20px; gap: 24px; }
  .pg-tray { padding: 12px; border-radius: 32px; }
  .pg-hero { border-radius: 32px; }
  .topbar .badge { display: none; }
  .setting { flex-direction: column; align-items: flex-start; }
  .dlg-head, .dlg-body, .dlg-foot { padding-inline: 20px; }
  .folder.big .folder-tab { height: 48px; padding: 0 14px; }
  .folder.big .folder-tab[aria-selected="true"] { height: calc(48px + var(--fold-gap) + 2px); }
  .folder-tab .ft-label { font-size: 12.5px; }
  .sim .log { grid-template-columns: 54px 1fr; }
  .sim .log time { display: none; }
}

/* Promo: no se estira más que su columna, y la línea de dónde sale */
.pcard > *, .pcard-body, .pcard-row, .pcard-foot { min-width: 0; }
.pcard .mini img, .pcard .mini video { max-width: 100%; }
.pcard-donde { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; color: var(--ok-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-donde.is-nada { color: var(--warn-text); text-decoration: none; }
.pcard-donde.is-nada:hover { text-decoration: underline; }
