html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #000;
}

:root {
    --layout-text-tone: #995c37;
}

html {
    font-size: 16px;
}

#player-wrapper {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#player-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

#offline-indicator {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 9999;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(130, 0, 0, 0.84);
    color: #fff;
    font: 700 11px/1 Arial, Helvetica, sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

#offline-indicator::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff2e2e;
    box-shadow: 0 0 0 3px rgba(255, 46, 46, 0.22);
}

#offline-indicator.is-cached,
#offline-indicator.is-stale {
    background: rgba(155, 22, 22, 0.9);
}

.layout-menu-footer {
    position: absolute;
    left: 3.1rem;
    right: 3.1rem;
    bottom: 2.55rem;
    transform: none;
    z-index: 12;
    width: calc(100% - 6.2rem);
    max-width: none;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #995c37;
    font-size: 0.92rem;
    line-height: 1.15;
    font-weight: 700;
    font-family: Arial, Helvetica, sans-serif;
    text-align: left;
    box-shadow: none;
    text-shadow: none;
    pointer-events: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 260ms ease;
}

.layout-menu-footer:not(.has-right) {
    display: block;
    width: auto;
    right: auto;
}

.layout-menu-footer.is-visible {
    opacity: 1;
}

.layout-menu-footer-left,
.layout-menu-footer-right {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.95);
    paint-order: stroke fill;
    text-shadow:
        -1px 0 0 rgba(255, 255, 255, 0.95),
        1px 0 0 rgba(255, 255, 255, 0.95),
        0 -1px 0 rgba(255, 255, 255, 0.95),
        0 1px 0 rgba(255, 255, 255, 0.95);
}

.layout-menu-footer-left {
    text-align: left;
    justify-self: start;
}

.layout-menu-footer-right {
    text-align: right;
    justify-self: end;
}

#media-stage {
    position: relative;
    overflow: hidden;
    background: #000;
    transform-origin: center center;
    z-index: 1;
}

#video-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    z-index: 2;
    pointer-events: none;
}

#video-layer:empty {
    display: none;
}

.stage-rotate-90,
.video-layer-rotate-90 {
    transform: rotate(90deg);
}

.stage-rotate-270,
.video-layer-rotate-270 {
    transform: rotate(270deg);
}

.media-node {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(1);
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.media-image,
.media-video,
.media-layered-bg,
.media-layered-fg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Video must NOT create its own transform layer or parent stage rotation breaks on many TVs */
.media-video {
    display: block;
    transform: none !important;
    will-change: opacity;
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
}

.media-image {
    display: block;
}

.media-layered {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.media-layered-bg,
.media-layered-fg {
    position: absolute;
    inset: 0;
}

.media-layered-bg { z-index: 1; }
.media-layered-fg { z-index: 2; }

.media-layout-root {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.media-layout-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.media-layout-zones {
    position: absolute;
    /* Legacy Firefox TV fallback for inset: 0. */
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--layout-text-tone);
}

.layout-zone {
    position: absolute;
    overflow: hidden;
}

.layout-price-table {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 600;
    color: var(--layout-text-tone);
}

.layout-table-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.15rem;
    padding-left: 0.625rem;
    border-left: 0.1875rem solid var(--layout-text-tone);
}

.layout-table-header {
    display: grid;
    grid-template-columns: 1.5fr 0.25fr 0.25fr;
    align-items: end;
    gap: 0.45rem;
    padding-bottom: 0.2rem;
}

.layout-table-header.layout-table-header-single {
    grid-template-columns: 1.5fr 0.4fr;
}

.layout-table-category {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--layout-text-tone);
}

.layout-table-category-size {
    font-size: 0.65em;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.02em;
    opacity: 0.75;
}

.layout-table-col-label {
    text-align: right;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.85;
    color: var(--layout-text-tone);
}

.layout-table-header:not(.layout-table-header-single) .layout-table-col-label:last-child {
    border-left: 1px solid rgba(153, 92, 55, 0.5);
    padding-left: 0.45rem;
}

.layout-table-row {
    display: grid;
    grid-template-columns: 1.5fr 0.25fr 0.25fr;
    align-items: start;
    gap: 0.45rem;
}

.layout-table-row.layout-table-row-single {
    grid-template-columns: 1.5fr 0.4fr;
}

.layout-table-name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.08rem;
    overflow: hidden;
    color: var(--layout-text-tone);
}

.layout-table-name-main {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
}

.layout-table-name-main > span:first-child {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.layout-table-desc {
    width: 100%;
    font-size: calc(0.68rem * var(--tv-description-scale, 1));
    line-height: 1.15;
    opacity: 0.82;
    color: var(--layout-text-tone);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layout-table-new-badge {
    flex-shrink: 0;
    background: #e60000;
    color: #fff;
    border-radius: 0.5rem;
    padding: 0.12rem 0.35rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.1;
}

.layout-table-calories {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    opacity: 0.7;
    white-space: nowrap;
    color: var(--layout-text-tone);
}

.layout-table-price {
    text-align: right;
    letter-spacing: 0.02em;
    color: var(--layout-text-tone);
    white-space: nowrap;
}

.layout-price-currency {
    font-size: 0.65em;
    font-weight: 600;
    opacity: 0.75;
    margin-left: 0.1em;
}

.layout-table-row:not(.layout-table-row-single) .layout-table-price:last-child {
    border-left: 1px solid rgba(153, 92, 55, 0.35);
    padding-left: 0.45rem;
}

.layout-carousel-wrap {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.layout-carousel-shell {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.layout-carousel-title {
    flex: 0 0 auto;
    color: var(--layout-text-tone);
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.05rem;
}

.layout-carousel-layer {
    position: absolute;
    /* Legacy Firefox TV fallback for inset: 0. */
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-evenly;
    gap: 1.2rem;
    padding-top: 0.625rem;
    opacity: 0;
    transition: opacity 200ms linear;
    pointer-events: none;
}

.layout-carousel-layer.is-active {
    opacity: 1;
}

.layout-carousel-wrap.layout-carousel-single .layout-carousel-layer {
    justify-content: center;
}

.layout-carousel-wrap.layout-carousel-single .layout-carousel-item {
    width: 100%;
}

.layout-carousel-item {
    width: 22%;
    min-width: 0;
    text-align: center;
}

.layout-carousel-image {
    width: 100%;
    aspect-ratio: 1 / 1.2;
    object-fit: contain;
    margin-bottom: 0.25rem;
}

.layout-carousel-name {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--layout-text-tone);
}

.layout-carousel-sub {
    font-size: calc(0.78rem * var(--tv-description-scale, 1));
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--layout-text-tone);
}

.layout-carousel-price {
    margin-top: 0.1rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--layout-text-tone);
    white-space: nowrap;
}

.layout-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0.65;
    color: var(--layout-text-tone);
}

.layout-showcase-vertical-shell {
    position: absolute;
    left: 6%;
    right: 6%;
    top: 7%;
    bottom: 8%;
    display: grid;
    grid-template-columns: calc((100% - 4%) / 2) calc((100% - 4%) / 2);
    column-gap: 4%;
    box-sizing: border-box;
    z-index: 2;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--layout-text-tone);
    pointer-events: none;
}

.layout-showcase-vertical-left {
    --layout-vertical-base-gap: 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: var(--layout-vertical-base-gap);
    min-height: 0;
}

.layout-showcase-vertical-table {
    flex: 0 0 auto;
    min-height: 0;
}

.layout-showcase-vertical-table .layout-price-table {
    height: auto;
    gap: 0.25rem;
}

.layout-showcase-vertical-table .layout-table-body {
    gap: 0.32rem;
}

.layout-showcase-vertical-right {
    min-width: 0;
    min-height: 0;
    display: flex;
}

.layout-showcase-vertical-carousel {
    width: 100%;
    height: 100%;
}

.layout-vertical-grid-shell {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.layout-vertical-grid-title {
    flex: 0 0 auto;
    color: var(--layout-text-tone);
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layout-vertical-grid-list {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 0.38rem 0.9rem;
}

.layout-vertical-grid-item {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    overflow: visible;
}

.layout-vertical-grid-item.is-empty {
    justify-content: center;
    border: 1px dashed rgba(153, 92, 55, 0.15);
    border-radius: 0.75rem;
}

.layout-vertical-grid-media {
    width: 100%;
    flex: 0 0 58%;
    min-height: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.layout-vertical-grid-image {
    width: 112%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.layout-vertical-grid-name {
    margin-top: 0.22rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--layout-text-tone);
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.layout-vertical-grid-sub {
    margin-top: 0.05rem;
    font-size: calc(0.7rem * var(--tv-description-scale, 1));
    opacity: 0.85;
    color: var(--layout-text-tone);
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.layout-vertical-grid-price {
    margin-top: 0.1rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--layout-text-tone);
    white-space: nowrap;
}

.layout-vertical-3-shell {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.layout-vertical-3-grid-top {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 0.7rem 0.8rem;
}

.layout-vertical-3-bottom {
    flex: 0 0 32%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding-top: 0.1rem;
}

.layout-vertical-3-bottom-title {
    flex: 0 0 auto;
    color: var(--layout-text-tone);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.layout-vertical-3-grid-bottom {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: start;
}

.layout-vertical-3-item {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.layout-vertical-3-item.is-empty {
    justify-content: center;
    border: 1px dashed rgba(153, 92, 55, 0.15);
    border-radius: 0.75rem;
}

.layout-vertical-3-item.is-bottom {
    display: grid;
    grid-template-rows: 8rem 1.9rem 0.85rem 0.85rem;
    align-content: start;
    overflow: visible;
}

.layout-vertical-3-media {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layout-vertical-3-item.is-bottom .layout-vertical-3-media {
    height: 8rem;
    flex: 0 0 auto;
}

.layout-vertical-3-image {
    width: 108%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.layout-vertical-3-name {
    margin-top: 0.12rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--layout-text-tone);
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.08;
}

.layout-vertical-3-item.is-bottom .layout-vertical-3-name {
    min-height: 1.9rem;
    align-self: end;
}

.layout-vertical-3-sub {
    margin-top: 0.04rem;
    font-size: calc(0.66rem * var(--tv-description-scale, 1));
    opacity: 0.85;
    color: var(--layout-text-tone);
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.layout-vertical-3-item.is-bottom .layout-vertical-3-sub {
    min-height: 0.9rem;
}

.layout-vertical-3-price {
    margin-top: 0.08rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--layout-text-tone);
    white-space: nowrap;
}

.layout-vertical-3-item.is-bottom .layout-vertical-3-price {
    min-height: 0.9rem;
}

.media-video::-webkit-media-controls,
.media-video::-webkit-media-controls-enclosure {
    display: none !important;
}

#emergency-screen {
    width: 100vw;
    height: 100vh;
    background-color: #e74c3c;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
}

#emergency-screen h1 {
    font-size: 5rem;
    margin-bottom: 1.25rem;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

#emergency-screen p {
    font-size: 1.8rem;
}

#progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 0.5rem;
    background-color: #8d6e63;
    width: 0;
    z-index: 999;
}
