html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    color: #fff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tv-stage {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 12%, rgba(15, 118, 110, .22), transparent 30%),
        linear-gradient(135deg, rgba(2, 6, 23, .98), rgba(7, 16, 20, .96));
}

.zone {
    position: absolute;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #020617;
}

.zone-main { left: 0; top: 0; width: 100%; height: calc(100% - 58px); }
.zone-side { right: 0; top: 0; width: 0; height: 0; }
.zone-banner { left: 0; top: 0; width: 0; height: 0; background: #020617; }
.zone-extra { left: 0; top: 0; width: 0; height: 0; }

.zone video,
.zone img,
.zone iframe,
.youtube-holder {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.youtube-holder {
    position: relative;
    display: block;
    min-width: 100%;
    min-height: 100%;
    background: #000;
}

.youtube-holder iframe {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.zone-content {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    transform: scale(1.015);
    filter: brightness(.92);
    transition: opacity .65s ease, transform .65s ease, filter .65s ease;
    will-change: opacity, transform;
}

.zone-content.is-visible {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
}

.zone-content.is-exiting,
.zone-title.is-exiting {
    opacity: 0;
    pointer-events: none;
}

.zone-content.is-exiting {
    z-index: 0;
    transform: scale(.99);
    filter: brightness(.86);
}

.zone-title {
    position: absolute;
    left: 50%;
    top: 0;
    z-index: 25;
    transform: translateX(-50%);
    width: 100%;
    max-width: 100%;
    height: 88px;
    padding: 8px 18px;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, .88), rgba(2, 6, 23, .68));
    color: #fff;
    font-size: clamp(.86rem, 1.08vw, 1.18rem);
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
    transition: opacity .45s ease, transform .45s ease;
}

.zone-title-side {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    align-content: center;
}

.zone-side.has-zone-title .zone-content {
    height: calc(100% - 88px);
    margin-top: 88px;
}

.zone-side.has-zone-title .instagram-frame,
.zone-side.has-zone-title .youtube-holder {
    height: calc(100% - 88px);
    margin-top: 88px;
}

.zone-banner img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain !important;
    object-position: center center !important;
    background: #020617;
}

/* El banner muestra imágenes completas por defecto */
/* El inline style del JS sobreescribe estos valores cuando el usuario elige algo distinto */

.zone .pdf-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.brand-bug {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(2, 6, 23, .62);
    backdrop-filter: blur(10px);
    font-weight: 800;
    text-shadow: 0 1px 8px rgba(0,0,0,.4);
}

.brand-bug img {
    max-width: 34px;
    max-height: 34px;
}

.ticker {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 58px;
    z-index: 30;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--ticker-bg);
    border-top: 4px solid var(--brand-secondary);
}

.ticker::before {
    content: var(--ticker-label, "INFORMA");
    z-index: 2;
    display: grid;
    place-items: center;
    align-self: stretch;
    padding: 0 22px;
    background: var(--brand-primary);
    font-weight: 900;
    letter-spacing: 0;
}

.ticker-track {
    white-space: nowrap;
    display: inline-flex;
    gap: 56px;
    padding-left: 100%;
    animation: ticker 36s linear infinite;
    font-size: clamp(1rem, 1.5vw, 1.35rem);
    font-weight: 700;
}

.ticker-track span::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 14px;
    border-radius: 50%;
    background: var(--brand-secondary);
}

.placeholder {
    text-align: center;
    padding: 28px;
    color: rgba(255,255,255,.78);
}

.placeholder strong {
    display: block;
    font-size: clamp(1.5rem, 4vw, 3rem);
}

.audio-prompt {
    position: absolute;
    left: 50%;
    bottom: 84px;
    z-index: 120;
    transform: translateX(-50%);
    min-height: 54px;
    padding: 0 28px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    color: #102027;
    font-size: 1.15rem;
    font-weight: 900;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .34);
    cursor: pointer;
}

.audio-prompt:hover {
    background: #f8fafc;
}

.emergency-layer {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 5vw;
    background: linear-gradient(135deg, rgba(127, 29, 29, .98), rgba(15, 23, 42, .96));
    text-align: center;
}

.emergency-card {
    width: min(1080px, 100%);
}

.emergency-card h1 {
    font-size: clamp(2.8rem, 8vw, 7rem);
    margin: 0 0 22px;
    font-weight: 900;
}

.emergency-card p {
    font-size: clamp(1.4rem, 3vw, 2.5rem);
    font-weight: 700;
}

.instagram-media {
    max-width: 100% !important;
    min-width: 0 !important;
}

.instagram-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

@keyframes ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@media (max-aspect-ratio: 4 / 3) {
    .brand-bug { top: 10px; right: 10px; }
    .ticker { height: 52px; }
    .zone-main { height: calc(100% - 52px); }
}
