/* ══════════════════════════════════════════
   BASE — body es un grid de 2 filas
   La grilla calcula alturas, sin calc(100vh)
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
    display: grid;
    grid-template-columns: 62fr 38fr;   /* izq | der — panel derecho a altura completa */
    overflow: hidden;
    font-family: 'Arial Rounded MT Bold', 'Segoe UI', Arial, sans-serif;
    background: #f0f4ff;
}

/* Columna izquierda: header arriba + panel izquierdo abajo */
.guia-left {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 0;
    overflow: hidden;
}

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
.guia-header {
    background: #1a3a7a;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6vh 1.5vw;
    min-height: 64px;
}

.logo-empresa-header {
    height: clamp(40px, 6vh, 70px);
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.empresa-nombre {
    flex: 1;
    text-align: center;
    font-size: clamp(1.2rem, 2.8vw, 2.2rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reloj-header {
    font-size: clamp(0.9rem, 2vw, 1.6rem);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════
   PANEL IZQUIERDO — canal + programación
══════════════════════════════════════════ */
.panel-izquierdo {
    display: grid;
    grid-template-rows: 1fr;
    padding: 1vh 1.5vw;
    min-height: 0;
    overflow: hidden;
    background: linear-gradient(180deg, #0d1525 0%, #0a1020 100%);
}

/* Cuando hay video: 58% canales / 42% video — sin gap para que el grid toque el video */
.panel-izquierdo.con-video {
    grid-template-rows: 58fr 42fr;
    gap: 0;
}

/* Wrapper que contiene todos los canal-slides */
.canales-container {
    display: grid;
    grid-template-rows: 1fr;
    min-height: 0;
    overflow: hidden;
}

/* Cada canal: sub-grid auto (header) + 1fr (tabla) */
.canal-slide {
    display: none;
    grid-template-rows: auto 1fr;
    min-height: 0;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 6px 28px rgba(0,0,0,0.5);
}
.canal-slide.activo { display: grid; }

/* ── Bloque inferior: video 16:9 izquierda + avisos derecha ── */
.bloque-video {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.6vw;
    min-height: 0;
    overflow: hidden;
    background: transparent;
}

.video-frame {
    height: 100%;
    width: auto;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.canal-header {
    display: flex;
    align-items: center;
    gap: 1vw;
    padding: 0.7vh 1.2vw;
    background: linear-gradient(135deg, #0d1f4a 0%, #1a3a7a 60%, #1e4494 100%);
    border-radius: 14px 14px 0 0;
    border-bottom: 2px solid rgba(245, 208, 96, 0.4);
    flex-shrink: 0;
}

.logo-canal {
    height: clamp(38px, 7vh, 80px);
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.canal-nombre {
    font-size: clamp(1.1rem, 2.4vw, 2.1rem);
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* ══════════════════════════════════════════
   TABLA DE PROGRAMACIÓN — tema oscuro premium
══════════════════════════════════════════ */
.tabla-prog-wrapper {
    min-height: 0;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    background: #08111f;
    position: relative;
}

.tabla-prog-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3.5rem;
    background: linear-gradient(transparent, #08111f);
    pointer-events: none;
    border-radius: 0 0 14px 14px;
}

.tabla-prog {
    flex: 1;
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(1.05rem, 2.1vw, 1.9rem);
    font-weight: 700;
    background: transparent;
}

.tabla-prog tbody {
    display: table-row-group;
    height: 100%;
}

.tabla-prog tbody tr {
    height: 1%;
}

/* Encabezado — gold accent */
.tabla-prog thead tr {
    background: linear-gradient(90deg, #c8971a 0%, #f5d060 50%, #c8971a 100%);
}

.tabla-prog th {
    padding: 0.5vh 1vw;
    text-align: left;
    font-size: clamp(0.85rem, 1.6vw, 1.4rem);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0a1628;
}

.tabla-prog th:first-child { width: clamp(100px, 12vw, 160px); }

/* Primera fila — programa en curso */
.tabla-prog tbody tr:first-child {
    background: linear-gradient(90deg, rgba(39,174,96,0.22) 0%, rgba(39,174,96,0.06) 100%);
    border-left: 4px solid #2ecc71;
}

.tabla-prog tbody tr:first-child .celda-hora {
    color: #2ecc71;
    text-shadow: 0 0 12px rgba(46,204,113,0.6);
}

.tabla-prog tbody tr:first-child .celda-prog {
    color: #afffcf;
}

.tabla-prog tbody tr:first-child .celda-hora::before {
    content: "▶";
    font-size: 0.65em;
    margin-right: 0.4em;
    color: #2ecc71;
    vertical-align: middle;
    animation: parpadeo 1.8s ease-in-out infinite;
}

@keyframes parpadeo {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* Filas siguientes */
.tabla-prog tbody tr:not(:first-child) {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tabla-prog tbody tr:not(:first-child):nth-child(odd)  { background: rgba(255,255,255,0.05); }
.tabla-prog tbody tr:not(:first-child):nth-child(even) { background: rgba(255,255,255,0.02); }

.tabla-prog td {
    padding: 0.5vh 1vw;
}

.celda-hora {
    white-space: nowrap;
    color: #f5d060;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    border-right: 1px solid rgba(255,255,255,0.08);
    letter-spacing: 0.02em;
}

.celda-prog {
    color: rgba(255,255,255,0.88);
    font-weight: 600;
}

/* ══════════════════════════════════════════
   PANEL DERECHO — clima / logo / avisos
   Tres filas proporcionales, nunca se empalman
══════════════════════════════════════════ */
.panel-derecho {
    display: grid;
    /* reloj(auto) | logo(auto, colapsa si vacío) | clima(1.6fr) | carrusel(2fr) */
    grid-template-rows: auto auto minmax(0, 1.6fr) minmax(0, 2fr);
    padding: 1vh 1vw;
    gap: 0.5vh;
    min-height: 0;
    overflow: hidden;
}

/* ══════════════════════════════════════════
   CARRUSEL DESTACADOS — Próximos programas
══════════════════════════════════════════ */
.bloque-destacados {
    min-height: 0;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
}

.dest-card {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: linear-gradient(155deg, #0a1628 0%, #1a3a7a 100%);
    border-radius: 10px;
    overflow: hidden;
    color: #fff;
}

.dest-card.activo {
    display: flex;
    animation: fadeIn 0.45s ease-in-out;
}

.dest-canal-bar {
    display: flex;
    align-items: center;
    gap: 0.6vw;
    background: rgba(255,255,255,0.1);
    padding: 0.5vh 0.8vw;
    flex-shrink: 0;
}

.dest-logo {
    height: clamp(20px, 3.5vh, 36px);
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.dest-num {
    font-size: clamp(0.7rem, 1.2vw, 1rem);
    font-weight: 700;
    opacity: 0.7;
    white-space: nowrap;
}

.dest-canal-nombre {
    font-size: clamp(0.8rem, 1.5vw, 1.3rem);
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dest-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.8vh 0.8vw;
    text-align: center;
    gap: 0.5vh;
}

.dest-label {
    font-size: clamp(0.6rem, 1vw, 0.85rem);
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dest-hora {
    font-size: clamp(1.8rem, 3.8vw, 3.4rem);
    font-weight: 900;
    color: #f5d060;
    line-height: 1;
}

.dest-programa {
    font-size: clamp(0.9rem, 1.8vw, 1.6rem);
    font-weight: 700;
    line-height: 1.3;
    opacity: 0.95;
}

/* ══════════════════════════════════════════
   CARRUSEL DE EXTRAS — Horóscopo + Cotización
══════════════════════════════════════════ */
.bloque-extras {
    min-height: 0;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
}

.extra-card {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: clamp(0.4rem, 1.2vh, 1.2rem) clamp(0.4rem, 1vw, 1rem);
    border-radius: 10px;
    text-align: center;
    box-sizing: border-box;
    gap: 0.4vh;
}

.extra-card.activo {
    display: flex;
    animation: fadeIn 0.5s ease-in-out;
}

.extra-card.tipo-horoscopo {
    background: linear-gradient(155deg, #0f0c29 0%, #302b63 55%, #24243e 100%);
    color: #fff;
}

.extra-card.tipo-dolar {
    background: linear-gradient(155deg, #0a3d1a 0%, #145a2e 60%, #1a7a3a 100%);
    color: #fff;
}

.extra-emoji {
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    line-height: 1;
}

.extra-titulo {
    font-size: clamp(1.3rem, 2.8vw, 2.6rem);
    font-weight: 900;
    letter-spacing: 0.07em;
    line-height: 1;
}

.extra-subtitulo {
    font-size: clamp(0.8rem, 1.4vw, 1.2rem);
    opacity: 0.65;
    letter-spacing: 0.03em;
}

.extra-contenido {
    font-size: clamp(0.95rem, 1.8vw, 1.6rem);
    font-weight: 600;
    line-height: 1.45;
    opacity: 0.92;
}

/* Dólar: número central grande y dorado */
.extra-card.tipo-dolar .extra-contenido {
    font-size: clamp(2rem, 4.5vw, 3.8rem);
    font-weight: 900;
    color: #f5d060;
    opacity: 1;
    line-height: 1;
}

.extra-dolar-detalle {
    font-size: clamp(0.7rem, 1.2vw, 1rem);
    opacity: 0.8;
    letter-spacing: 0.04em;
}

/* ── Bloque Clima Live ── */
.bloque-clima {
    background: linear-gradient(135deg, #0a1f3d 0%, #1a3a6e 100%);
    border-radius: 10px;
    padding: 0.6vh 0.8vw;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.clima-cargando {
    color: rgba(255,255,255,0.4);
    text-align: center;
    padding: 1rem 0;
    font-size: 0.85rem;
}

.clima-live-slide {
    display: none;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}
.clima-live-slide.activo { display: flex; }

.cl-ciudad {
    font-size: clamp(1.1rem, 2.2vw, 2rem);
    font-weight: 900;
    color: #f5d060;
    text-align: center;
    letter-spacing: 0.04em;
    line-height: 1.25;
    max-height: 2.6em;
    overflow: hidden;
    word-break: break-word;
}

.cl-current {
    display: flex;
    align-items: center;
    gap: 0.8vw;
    flex: 1;
    min-height: 0;
}

.cl-icono-grande {
    height: clamp(60px, 12vh, 110px);
    width: auto;
    flex-shrink: 0;
}

.cl-current-info { flex: 1; min-width: 0; }

.cl-temp-big {
    font-size: clamp(2.4rem, 4.5vw, 4.5rem);
    font-weight: 900;
    color: #fff;
    line-height: 1;
}
.cl-deg {
    font-size: 0.45em;
    color: #aac4ff;
    vertical-align: super;
}

.cl-condicion {
    font-size: clamp(0.9rem, 1.6vw, 1.4rem);
    color: #aac4ff;
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cl-sensacion {
    font-size: clamp(0.75rem, 1.2vw, 1.1rem);
    color: rgba(255,255,255,0.6);
    margin-top: 0.1rem;
}

.cl-detalles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.8rem;
    margin-top: 0.35rem;
    font-size: clamp(0.7rem, 1.1vw, 1rem);
    color: rgba(255,255,255,0.75);
}

.cl-pronostico {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 0.3vh;
    flex-shrink: 0;
}

.cl-dia {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    flex: 1;
}

.cl-dia-nombre {
    font-size: clamp(0.6rem, 0.95vw, 0.88rem);
    font-weight: 700;
    color: #f5d060;
    text-transform: uppercase;
}

.cl-dia-icono {
    height: clamp(22px, 3.8vh, 36px);
    width: auto;
}

.cl-dia-temp {
    font-size: clamp(0.55rem, 0.9vw, 0.8rem);
}
.cl-max { color: #ff9d4d; font-weight: 700; }
.cl-min { color: #7ab8ff; }

.cl-dia-lluvia {
    font-size: clamp(0.5rem, 0.8vw, 0.72rem);
    color: rgba(255,255,255,0.6);
}

/* ── Logo empresa grande ── */
.bloque-logo-empresa {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
    overflow: hidden;
}

.logo-empresa-grande {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* ── Reloj grande ── */
.bloque-reloj {
    background: linear-gradient(135deg, #0d1f4a 0%, #1a3a7a 100%);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    gap: 0.2vh;
}

.rp-hora {
    font-size: clamp(2.2rem, 5.5vw, 5.5rem);
    font-weight: 900;
    color: #f5d060;
    letter-spacing: 0.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.rp-fecha {
    font-size: clamp(0.95rem, 1.9vw, 1.9rem);
    font-weight: 700;
    color: rgba(255,255,255,0.82);
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

/* ── Avisos ── */
.bloque-avisos {
    min-height: 0;    /* crítico: permite encogerse en el grid */
    overflow: hidden;
    border-radius: 8px;
}

.aviso-slide {
    display: none;
    width: 100%;
    height: 100%;
}
.aviso-slide.activo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.aviso-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* ══════════════════════════════════════════
   CARRUSEL UNIFICADO — Programas TV + Mensajes ISP
   .dest-card base maneja display:none / display:flex
══════════════════════════════════════════ */

/* ── Tarjeta de programa TV: info 40% izq · póster 60% der ── */
.prog-card {
    background: linear-gradient(160deg, #0a1628 0%, #1a3060 100%);
    flex-direction: row !important;
    padding: 0;
}

.prog-info {
    width: 40%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6vh;
    padding: 1.2vh 1.1vw;
    overflow: hidden;
    border-right: 2px solid rgba(255,255,255,0.1);
}


.prog-etiqueta {
    font-size: clamp(0.6rem, 1vw, 0.85rem);
    font-weight: 700;
    color: #f5d060;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
}

.prog-poster {
    flex: 1;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    background: #0f1e40;
    display: block;
}

.prog-canal-nombre {
    font-size: clamp(0.8rem, 1.4vw, 1.2rem);
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.prog-hora {
    font-size: clamp(1.4rem, 2.6vw, 2.4rem);
    font-weight: 900;
    color: #f5d060;
    line-height: 1;
}

.prog-titulo {
    font-size: clamp(0.9rem, 1.65vw, 1.45rem);
    font-weight: 700;
    color: rgba(255,255,255,0.92);
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.prog-siguiente {
    font-size: clamp(0.65rem, 1.05vw, 0.92rem);
    color: rgba(255,255,255,0.5);
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 0.4vh;
    margin-top: 0.2vh;
}

/* ── Tarjeta de imagen subida por el ISP ── */
.img-card {
    background: #000;
    padding: 0 !important;
    align-items: center;
    justify-content: center;
}

.img-card-foto {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ── Tarjeta de mensaje del ISP ── */
.msg-card {
    background: linear-gradient(155deg, #7b0000 0%, #c0392b 55%, #e74c3c 100%) !important;
    justify-content: center;
    align-items: center;
    gap: 1.2vh;
    padding: 1.5vh 1.2vw;
    text-align: center;
}

.msg-icono {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    line-height: 1;
    animation: pulso 2.5s ease-in-out infinite;
}

.msg-texto {
    font-size: clamp(0.75rem, 1.9vw, 1.7rem);
    font-weight: 900;
    line-height: 1.35;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

/* ══════════════════════════════════════════
   Transición suave
══════════════════════════════════════════ */
.canal-slide.activo,
.clima-live-slide.activo,
.aviso-slide.activo {
    animation: fadeIn 0.45s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ══════════════════════════════════════════
   Overlay de inicio de audio
   Aparece solo cuando el navegador bloquea
   el autoplay. Un clic lo desbloquea.
══════════════════════════════════════════ */
.overlay-audio {
    display: none;                /* JS lo muestra si autoplay falla */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.btn-iniciar-audio {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    background: #1a3a7a;
    color: #fff;
    border: 3px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    width: clamp(120px, 16vw, 180px);
    height: clamp(120px, 16vw, 180px);
    font-size: clamp(0.9rem, 1.8vw, 1.3rem);
    font-weight: 800;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s;
    animation: pulso 2s ease-in-out infinite;
}

.btn-iniciar-audio:hover {
    background: #2a5cbf;
    transform: scale(1.06);
}

.btn-play-icono {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1;
}

@keyframes pulso {
    0%, 100% { box-shadow: 0 0 0 0 rgba(26,58,122,0.5); }
    50%       { box-shadow: 0 0 0 18px rgba(26,58,122,0); }
}

.overlay-contenido {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.overlay-nombre-radio {
    color: rgba(255,255,255,0.85);
    font-size: clamp(0.85rem, 1.4vw, 1.1rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    margin: 0;
}

/* ══════════════════════════════════════════
   Botón regresar
══════════════════════════════════════════ */
.btn-regresar {
    position: fixed;
    bottom: 14px;
    left: 14px;
    background: rgba(26, 58, 122, 0.75);
    color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    text-decoration: none;
    transition: background 0.2s;
    z-index: 100;
}
.btn-regresar:hover { background: #1a3a7a; color: #fff; }

.btn-cerrar-kiosk {
    position: fixed;
    bottom: 14px;
    right: 14px;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s;
    z-index: 100;
    line-height: 1;
    padding: 0;
}
.btn-cerrar-kiosk:hover {
    background: rgba(200, 30, 30, 0.85);
    color: #fff;
    border-color: transparent;
    transform: scale(1.1);
}

/* ══════════════════════════════════════════
   CELULARES (la TV no los cumple: sus pantallas son de 720 px de alto o más, o de más de 1000 px de ancho en vertical)
══════════════════════════════════════════ */

/* Celular horizontal: sin clima, video ni horóscopo, para ver completa la programación */
@media (orientation: landscape) and (max-height: 520px) {
    #bloque-clima-live,
    .bloque-video,
    .bloque-extras,
    .btn-cerrar-kiosk { display: none; }
    .panel-izquierdo.con-video { grid-template-rows: 1fr; }
    .panel-derecho { grid-template-rows: auto auto minmax(0, 1fr); }
}

/* Celular vertical: programación a todo lo ancho; abajo solo el carrusel de próximos programas y avisos.
   Sin clima, video, horóscopo, reloj grande ni logo grande (el reloj sigue en el encabezado). */
@media (orientation: portrait) and (max-width: 1000px) {
    body {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 58fr) minmax(0, 42fr);
    }
    .guia-header { gap: 0.6rem; padding: 0.5vh 3vw; min-height: 52px; }
    .logo-empresa-header { height: 34px; }
    .empresa-nombre { font-size: clamp(1rem, 3.4vw, 1.9rem); white-space: normal; line-height: 1.1; }
    .reloj-header { font-size: clamp(0.8rem, 2.6vw, 1.4rem); }
    .panel-izquierdo.con-video { grid-template-rows: 1fr; }
    .panel-izquierdo { padding: 1vh 3vw; }
    .logo-canal { height: 36px; }
    .canal-header { padding: 0.5vh 3vw; gap: 3vw; }
    .canal-nombre { font-size: clamp(1rem, 3.2vw, 1.8rem); }
    .bloque-video,
    .bloque-reloj,
    .bloque-logo-empresa,
    #bloque-clima-live,
    .btn-cerrar-kiosk { display: none; }
    .panel-derecho { grid-template-rows: minmax(0, 1fr); padding: 1vh 3vw 1.5vh; }
}

/* Celular (horizontal o vertical): la flecha de regresar, chica y en la esquina inferior derecha */
@media (orientation: landscape) and (max-height: 520px), (orientation: portrait) and (max-width: 1000px) {
    .btn-regresar {
        left: auto; right: 8px; bottom: 8px;
        width: 30px; height: 30px; font-size: 1rem;
        opacity: 0.55;
    }
}
