/* Shared TV web UI (contract hoteltv/1). Drawn on a 1920×1080 stage scaled to the screen; 10-foot sizes; focus is
   always visible (remote control). Written for TV browsers from 2018 (Tizen 4, webOS 4, Android System WebView 61+):
   no CSS gap in flex rows, no :has(). */
:root { --bg: #0b1d2a; --text: #ffffff; --accent: #c8a45d; --muted: rgba(255, 255, 255, .72); --panel: rgba(8, 20, 30, .86); --focus: #ffd27a; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; background: var(--bg); color: var(--text); font-family: Inter, 'Segoe UI', Roboto, 'Noto Sans Arabic', Tahoma, Arial, sans-serif; }
body.native-video, body.native-video #stage, body.native-video .view-channel { background: transparent !important; }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; background: var(--bg); overflow: hidden; }
#video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #000; object-fit: contain; display: none; }
body.playing #video { display: block; }
body.native-video #video { display: none; }
#views { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.view { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; }
.bgimg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-size: cover; background-position: center; }
.bgimg::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .65) 100%); }

/* header: logo, greeting, clock */
.head { position: absolute; left: 96px; right: 96px; top: 64px; display: flex; align-items: center; justify-content: space-between; }
.head img.logo { max-height: 96px; max-width: 360px; }
.head > div:first-child { min-width: 0; -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; }
.greet { font-size: 56px; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock { margin-left: 32px; flex: none; }
.place { font-size: 28px; color: var(--muted); margin-top: 8px; }
.clock { text-align: right; }
.clock .t { font-size: 72px; font-weight: 600; font-variant-numeric: tabular-nums; }
.clock .d { font-size: 28px; color: var(--muted); }

/* tiles */
.tiles { position: absolute; left: 96px; right: 96px; bottom: 96px; display: flex; flex-wrap: nowrap; }
.tiles.grid { flex-wrap: wrap; bottom: auto; top: 300px; }
.tile { width: 260px; height: 220px; margin-right: 28px; margin-bottom: 28px; border-radius: 24px; background: var(--panel); border: 4px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 32px; font-weight: 600; color: var(--text); text-align: center; padding: 16px; transition: transform .12s ease; }
.tile .ic { width: 84px; height: 84px; margin-bottom: 16px; color: var(--accent); }
.tile .ic svg { width: 100%; height: 100%; }
.focus, .tile.focus, .item.focus, .btn.focus { border-color: var(--focus) !important; outline: none; transform: scale(1.06); box-shadow: 0 0 0 6px rgba(255, 210, 122, .25); }
.badge { display: inline-block; min-width: 40px; padding: 2px 12px; border-radius: 20px; background: var(--accent); color: #111; font-size: 24px; margin-left: 10px; }

/* panels (channel list, guide, sections) */
.panel { position: absolute; top: 64px; bottom: 64px; left: 64px; width: 760px; background: var(--panel); border-radius: 24px; padding: 32px; overflow: hidden; }
.panel h2 { font-size: 40px; margin: 0 0 20px; }
.list { position: absolute; top: 120px; bottom: 32px; left: 32px; right: 32px; overflow: hidden; }
.item { display: flex; align-items: center; height: 88px; padding: 0 20px; border-radius: 14px; border: 4px solid transparent; font-size: 30px; margin-bottom: 8px; background: rgba(255, 255, 255, .04); }
.item .num { width: 80px; color: var(--accent); font-variant-numeric: tabular-nums; }
.item img { width: 96px; height: 56px; object-fit: contain; margin-right: 20px; }
.item .name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .now { color: var(--muted); font-size: 24px; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cats { display: flex; margin-bottom: 16px; }
.cats .btn { font-size: 24px; padding: 6px 18px; margin-right: 10px; border-radius: 20px; border: 3px solid transparent; background: rgba(255, 255, 255, .08); }
.cats .btn.on { background: var(--accent); color: #111; }
.section { position: absolute; top: 96px; left: 96px; right: 96px; bottom: 96px; background: var(--panel); border-radius: 24px; padding: 48px; font-size: 32px; }
.section h1 { margin: 0 0 24px; font-size: 52px; }
.section p { color: var(--muted); }

/* channel banner, toasts, pop-ups */
.banner { position: absolute; left: 96px; right: 96px; bottom: 64px; height: 200px; background: var(--panel); border-radius: 24px; display: flex; align-items: center; padding: 0 40px; }
.banner .num { font-size: 72px; font-weight: 700; color: var(--accent); margin-right: 32px; font-variant-numeric: tabular-nums; }
.banner img { max-width: 200px; max-height: 120px; margin-right: 32px; }
.banner .name { font-size: 44px; font-weight: 600; }
.banner .prog { font-size: 28px; color: var(--muted); margin-top: 8px; }
.banner .bar { height: 8px; background: rgba(255, 255, 255, .2); border-radius: 4px; margin-top: 12px; width: 800px; max-width: 100%; }
.banner .bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.toast { position: absolute; top: 48px; right: 64px; max-width: 1200px; background: var(--panel); padding: 20px 32px; border-radius: 16px; font-size: 30px; }
.popup { position: absolute; z-index: 60; left: 50%; top: 50%; width: 1100px; max-width: 952px; max-width: calc(100% - 128px); max-height: 952px; max-height: calc(100% - 128px); -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); min-height: 360px; overflow: hidden; background: var(--panel); border: 3px solid var(--accent); border-radius: 24px; padding: 48px 48px 80px; font-size: 34px; overflow-wrap: break-word; word-wrap: break-word; }
.popup h2 { margin: 0 0 20px; font-size: 48px; }
.popup .hint { position: absolute; bottom: 28px; right: 40px; font-size: 24px; color: var(--muted); }

/* welcome and pairing */
.welcome { display: flex; flex-direction: column; justify-content: center; padding: 0 160px; }
.welcome h1 { font-size: 96px; margin: 0 0 32px; position: relative; }
.welcome p { font-size: 40px; max-width: 1300px; position: relative; color: var(--muted); }
.welcome img.logo { position: absolute; top: 80px; left: 160px; max-height: 120px; }
.pair { display: flex; align-items: center; justify-content: center; }
.pair .box { text-align: center; }
.pair .code { font-size: 160px; letter-spacing: 24px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.pair img { width: 320px; height: 320px; background: #fff; padding: 16px; border-radius: 16px; }
.pair p { font-size: 34px; color: var(--muted); }
.qr { position: absolute; top: 230px; right: 96px; text-align: center; font-size: 22px; color: var(--muted); width: 220px; }
.qr img { width: 200px; height: 200px; background: #fff; padding: 10px; border-radius: 12px; }
.msg { font-size: 30px; color: var(--muted); }
[dir='rtl'] .item .num, [dir='rtl'] .banner .num { direction: ltr; }
/* right-to-left (Arabic): mirrored without logical properties (older TV browsers) */
[dir='rtl'] .clock { text-align: left; }
[dir='rtl'] .tile { margin-right: 0; margin-left: 28px; }
[dir='rtl'] .badge { margin-left: 0; margin-right: 10px; }
[dir='rtl'] .panel { left: auto; right: 64px; }
[dir='rtl'] .item img { margin-right: 0; margin-left: 20px; }
[dir='rtl'] .cats .btn { margin-right: 0; margin-left: 10px; }
[dir='rtl'] .banner .num, [dir='rtl'] .banner img { margin-right: 0; margin-left: 32px; }
[dir='rtl'] .toast { right: auto; left: 64px; }
[dir='rtl'] .popup .hint { right: auto; left: 40px; }
[dir='rtl'] .welcome img.logo { left: auto; right: 160px; }
[dir='rtl'] .qr { right: auto; left: 96px; }
/* list rows are highlighted, not enlarged (the list clips its overflow) */
.item.focus { transform: none; background: rgba(255, 210, 122, .12); }
.section .list { left: 48px; right: 48px; bottom: 48px; }
/* advert overlays (contract §6): placed by position, sized by sizePct (set inline) */
.ad { position: absolute; background: rgba(0, 0, 0, .75); overflow: hidden; display: flex; align-items: center; justify-content: center; z-index: 5; }
.ad img, .ad video { width: 100%; height: 100%; object-fit: contain; }
.ad .txt { position: absolute; left: 0; right: 0; padding: 0 40px; font-size: 40px; font-weight: 600; white-space: nowrap; text-shadow: 0 2px 6px #000; }
.ad.ticker .txt { animation: ticker 18s linear infinite; }
@keyframes ticker { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

/* Emergency alerts (switch alerts.sounds): over everything, the colours come with the manifest. */
.emergency { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; text-align: center; padding: 6vmin; padding: calc(6vmin + var(--fit-safe-y, 0px)) calc(6vmin + var(--fit-safe-x, 0px)); overflow: hidden; overflow-wrap: break-word; word-wrap: break-word; color: #fff; background: #b45309; }
.emergency.critical { background: #b91c1c; }
.emergency.info { background: #0b5fff; }
.emergency h1 { font-size: 8vmin; margin: 0 0 3vmin; line-height: 1.05; }
.emergency p { font-size: 4vmin; margin: 0; line-height: 1.35; white-space: pre-wrap; }
.emergency .em-icon { font-size: 13vmin; line-height: 1; margin-bottom: 3vmin; }
.emergency.pulse { box-shadow: inset 0 0 0 2.4vmin rgba(255, 255, 255, .85); animation: em-pulse 1s infinite; }
@keyframes em-pulse { 50% { box-shadow: inset 0 0 0 2.4vmin rgba(255, 255, 255, .15); } }

/* The template kit's look (manifest look, switch screens.templateKit): colours of the kit (--k-*), its display face for
   the greeting and the welcome, eyebrows, cards and a frame with corner stars. Written for TV browsers from 2018: no gap,
   no inset, no logical properties. */
body.kitlook, body.kitlook #stage { background: var(--k-bg); color: var(--k-fg); }
.kitlook .view.home, .kitlook .view.welcome { background: linear-gradient(160deg, var(--k-bg) 0%, var(--k-bg2) 100%); }
.kitlook .korn { position: absolute; top: 0; left: 0; width: 100%; height: 100%; stroke: var(--k-accent); fill: var(--k-accent); }
.kitlook .eyebrow { font-size: 26px; letter-spacing: .18em; text-transform: uppercase; color: var(--k-accent); font-weight: 600; margin: 0 0 10px; position: relative; }
.kitlook .greet, .kitlook .welcome h1, .kitlook .clock .t { font-family: Georgia, 'Times New Roman', 'Noto Naskh Arabic', serif; font-weight: 400; letter-spacing: .01em; }
.kitlook .greet { font-size: 68px; line-height: 1.1; color: var(--k-fg); }
.kitlook .place, .kitlook .clock .d { color: var(--k-muted); }
.kitlook .tile { background: var(--k-surface); border: 3px solid var(--k-line); border-radius: 12px; color: var(--k-fg); }
.kitlook .tile .ic { color: var(--k-accent); }
.kitlook .focus, .kitlook .tile.focus { border-color: var(--k-accent) !important; box-shadow: 0 0 0 6px rgba(255, 255, 255, .18); }
.kitlook .badge { background: var(--k-accent); color: var(--k-onAccent); }
.kitlook .welcome { padding: 0 200px; }
.kitlook .welcome h1 { font-size: 112px; line-height: 1.05; margin: 0 0 28px; color: var(--k-fg); }
.kitlook .welcome .rule { display: block; position: relative; width: 180px; height: 5px; background: var(--k-accent); margin: 0 0 36px; }
.kitlook .welcome p { color: var(--k-muted); font-size: 42px; line-height: 1.4; }
.kitlook .welcome .pill { position: relative; display: inline-block; align-self: flex-start; margin-top: 36px; padding: 10px 30px; border-radius: 40px; background: var(--k-accent); color: var(--k-onAccent); font-size: 30px; font-weight: 700; }
.kitlook .qr img { border-radius: 10px; }
.kitlook .head { top: 104px; left: 128px; right: 128px; }
.kitlook .tiles { left: 128px; right: 128px; bottom: 112px; }
/* kit-look home: the middle panel (services carousel or welcome; weather and today's events beside when given) */
.kitlook .kfeat { position: absolute; left: 128px; right: 128px; top: 290px; height: 380px; display: flex; }
.kitlook .kf-main { position: relative; flex: 1; min-width: 0; }
.kitlook .kf-slide { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: none; background: var(--k-surface); border: 2px solid var(--k-line); border-radius: 12px; overflow: hidden; }
.kitlook .kf-slide.on { display: flex; }
.kitlook .kf-img { width: 520px; flex: none; background-size: cover; background-position: center; }
.kitlook .kf-body { flex: 1; min-width: 0; padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; }
.kitlook .kf-title { font-family: Georgia, 'Times New Roman', 'Noto Naskh Arabic', serif; font-size: 64px; line-height: 1.1; color: var(--k-fg); margin: 0 0 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kitlook .kf-txt { font-size: 36px; line-height: 1.35; color: var(--k-muted); max-height: 147px; overflow: hidden; }
.kitlook .kf-side { width: 420px; flex: none; margin-left: 32px; display: flex; flex-direction: column; }
.kitlook .kf-card { flex: 1; background: var(--k-surface); border: 2px solid var(--k-line); border-radius: 12px; padding: 28px 32px; margin-bottom: 20px; }
.kitlook .kf-card:last-child { margin-bottom: 0; }
.kitlook .kf-big { font-family: Georgia, 'Times New Roman', serif; font-size: 96px; line-height: 1; color: var(--k-fg); }
.kitlook .kf-ev { font-size: 32px; margin-top: 10px; color: var(--k-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kitlook .kf-ev b { color: var(--k-accent); }
[dir='rtl'] .kitlook .kf-side { margin-left: 0; margin-right: 32px; }
.kitlook .home .qr { top: 300px; right: 128px; width: 240px; color: var(--k-muted); }
.kitlook .home .qr img { width: 220px; height: 220px; }
.kitlook .kfeat.with-qr { right: 400px; }
[dir='rtl'] .kitlook .home .qr { right: auto; left: 128px; }
[dir='rtl'] .kitlook .kfeat.with-qr { right: 128px; left: 400px; }

/* Labels in several languages (switch hoteltv.languages): the TV's language first and largest, the others under it at
   about 60 % (never under 28 px on 1 080 lines), lighter; the icon under the text block. Each line keeps its own
   direction (Arabic right to left inside any tile). */
.tile .tl { display: flex; flex-direction: column; align-items: center; text-align: center; }
.tile .ml1, .tile .ml2 { display: block; unicode-bidi: isolate; }
.tile .ml1 { font-size: 40px; font-weight: 600; line-height: 1.12; }
.tile .ml2 { font-size: 28px; font-weight: 400; line-height: 1.2; opacity: .72; margin-top: 2px; }
.tile .ic { margin-bottom: 0; margin-top: 14px; width: 72px; height: 72px; }
.tiles.multi .tile { width: 250px; height: 300px; margin-right: 24px; margin-bottom: 0; padding: 18px 10px; justify-content: center; }
[dir='rtl'] .tiles.multi .tile { margin-right: 0; margin-left: 24px; }
.tiles.multi { bottom: 96px; }
.tile .badge { align-self: center; margin: 6px 0 0; }
.welcome .wl2 { position: relative; margin: -12px 0 28px; }
.welcome .wl2 .ml2 { display: block; font-size: 44px; line-height: 1.25; opacity: .72; unicode-bidi: isolate; }
.eyebrow.kf-ml .ml1, .eyebrow.kf-ml .ml2 { display: inline-block; margin-inline-end: 18px; unicode-bidi: isolate; }
.eyebrow.kf-ml .ml2 { opacity: .72; }
/* The language picker, under the greeting (home) or the welcome text */
.picker { position: absolute; display: flex; flex-wrap: wrap; }
.view.home .picker { left: 128px; top: 250px; }
[dir='rtl'] .view.home .picker { left: auto; right: 128px; }
.view.welcome .picker { position: relative; margin: 0 0 32px; }
.lang-btn { font-size: 30px; padding: 8px 26px; margin-right: 14px; margin-bottom: 8px; border-radius: 40px; border: 3px solid rgba(255, 255, 255, .25); color: inherit; unicode-bidi: isolate; }
[dir='rtl'] .lang-btn { margin-right: 0; margin-left: 14px; }
.lang-btn.on { background: var(--accent); color: #111; border-color: var(--accent); font-weight: 700; }
.kitlook .lang-btn { border-color: var(--k-line); }
.kitlook .lang-btn.on { background: var(--k-accent); color: var(--k-onAccent); border-color: var(--k-accent); }
.lang-btn.focus { border-color: var(--focus) !important; }
/* Nine languages: the row stays inside the screen and wraps; smaller buttons. */
.view.home .picker { right: 128px; }
[dir='rtl'] .view.home .picker { left: 128px; }
.picker[data-many] .lang-btn { font-size: 24px; padding: 6px 18px; margin-right: 10px; }
[dir='rtl'] .picker[data-many] .lang-btn { margin-right: 0; margin-left: 10px; }
.fit-portrait .picker[data-many] .lang-btn { font-size: 22px; padding: 4px 14px; margin-bottom: 6px; }
.kitlook .lang-btn.focus { border-color: var(--k-fg) !important; transform: scale(1.06); }
.kitlook .kfeat { top: 330px; height: 324px; }
.kitlook .tiles.multi { bottom: 92px; }
.kitlook .home .qr { top: 330px; }
.kitlook .head { top: 88px; }
[dir='rtl'] .welcome .wl2 .ml2 { text-align: right; }
[dir='ltr'] .welcome .wl2 .ml2 { text-align: left; }

/* Fit to the screen (public/js/fit.js, 20/11/2026). A text shrunk to its floor and still too long is cut with an
   ellipsis (class fit-cut). */
.fit-cut, .fit-cut .ml1, .fit-cut .ml2 { overflow: hidden; text-overflow: ellipsis; }
.tile.fit-cut .ml1, .tile.fit-cut .ml2 { white-space: nowrap; max-width: 100%; }
.welcome h1, .welcome p, .popup, .section h1 { overflow-wrap: break-word; word-wrap: break-word; }
.section h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Upright screen: the stage is 1080 × 1920 (html.fit-portrait). The same views, re-laid out for the narrow width:
   margins of 72 px, the tiles in rows of three, the middle panel taller with its side cards under it. */
.fit-portrait .head, .fit-portrait .kitlook .head { left: 72px; right: 72px; top: 96px; }
.fit-portrait .view.home .picker { left: 72px; right: 72px; top: 270px; }
[dir='rtl'] .fit-portrait .view.home .picker { left: 72px; right: 72px; }
.fit-portrait .tiles, .fit-portrait .kitlook .tiles { left: 72px; right: 72px; bottom: 92px; flex-wrap: wrap; }
.fit-portrait .tiles.grid { top: auto; bottom: 92px; }
.fit-portrait .tiles.multi .tile { width: 288px; height: 280px; margin-bottom: 24px; }
.fit-portrait .tile { width: 260px; }
.fit-portrait .tiles.multi .tile:nth-child(3n), .fit-portrait .tile:nth-child(3n) { margin-right: 0; }
[dir='rtl'] .fit-portrait .tiles.multi .tile:nth-child(3n), [dir='rtl'] .fit-portrait .tile:nth-child(3n) { margin-left: 0; }
.fit-portrait .qr { top: 360px; right: 72px; }
[dir='rtl'] .fit-portrait .qr { right: auto; left: 72px; }
.fit-portrait .kitlook .kfeat { left: 72px; right: 72px; top: 380px; height: auto; bottom: 740px; -webkit-flex-direction: column; flex-direction: column; }
.fit-portrait .kitlook .kfeat.with-qr { right: 352px; }
[dir='rtl'] .fit-portrait .kitlook .kfeat.with-qr { right: 72px; left: 352px; }
.fit-portrait .kitlook .home .qr { top: 380px; right: 72px; }
[dir='rtl'] .fit-portrait .kitlook .home .qr { right: auto; left: 72px; }
.fit-portrait .kitlook .kf-slide.on { -webkit-flex-direction: column; flex-direction: column; }
.fit-portrait .kitlook .kf-img { width: auto; height: 300px; }
.fit-portrait .kitlook .kf-body { padding: 36px 40px; }
.fit-portrait .kitlook .kf-side { width: auto; height: 200px; margin: 24px 0 0; -webkit-flex-direction: row; flex-direction: row; }
[dir='rtl'] .fit-portrait .kitlook .kf-side { margin: 24px 0 0; }
.fit-portrait .kitlook .kf-card { margin: 0 20px 0 0; }
.fit-portrait .kitlook .kf-card:last-child { margin: 0; }
.fit-portrait .panel { left: 48px; right: 48px; width: auto; }
[dir='rtl'] .fit-portrait .panel { left: 48px; right: 48px; }
.fit-portrait .section { left: 48px; right: 48px; top: 96px; bottom: 96px; }
.fit-portrait .banner { left: 48px; right: 48px; height: 240px; }
.fit-portrait .welcome { padding: 0 72px; }
.fit-portrait .kitlook .welcome { padding: 150px 80px 120px; }
.fit-wide .kitlook .welcome, .fit-wide .welcome { padding-left: 240px; padding-right: 240px; }
.fit-portrait .toast { right: 48px; max-width: 984px; }
.fit-portrait .pair .code { font-size: 128px; letter-spacing: 12px; }
.fit-portrait .pair img { width: 280px; height: 280px; }
/* The welcome: the greeting at the top, the message in a card filling the screen under it (every shape). */
.welcome, .kitlook .welcome { -webkit-justify-content: flex-start; justify-content: flex-start; padding: 96px 200px 84px; }
.welcome .wcard { position: relative; -webkit-flex: 1; flex: 1; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-justify-content: center; justify-content: center; margin-top: 8px; padding: 56px 64px; border-radius: 16px; background: var(--panel); }
.kitlook .welcome .wcard { background: var(--k-surface); border: 2px solid var(--k-line); }
.welcome .wcard p { margin: 0; }
.welcome img.logo { position: relative; top: auto; left: auto; -webkit-align-self: flex-start; align-self: flex-start; margin-bottom: 32px; }
[dir='rtl'] .welcome img.logo { left: auto; right: auto; -webkit-align-self: flex-end; align-self: flex-end; }
.fit-portrait .welcome { padding: 150px 80px 120px; }
.fit-portrait .welcome .wcard { padding: 64px 56px; }
.fit-portrait .welcome .wcard p { font-size: 52px; line-height: 1.4; margin: 0; }
.fit-portrait .kitlook .welcome h1 { font-size: 120px; }
/* without the server (switch hoteltv.offline): a small dot in the corner for the staff only, no words for the guest */
.netdot { position: absolute; bottom: 18px; right: 18px; width: 12px; height: 12px; border-radius: 50%; background: #d08a2a; opacity: .75; z-index: 50; }
[dir='rtl'] .netdot { right: auto; left: 18px; }
/* A stage wider than 16:9 (ultrawide) or taller (4:3): the rows and panels grow into it instead of leaving bars. */
.fit-wide .tiles .tile { -webkit-flex-grow: 1; flex-grow: 1; }
.fit-tall .kitlook .kfeat { height: auto; bottom: 432px; }
.fit-tall .tiles.grid { top: auto; bottom: 92px; }
/* The channel list with nothing playing behind it takes the whole width (a narrow list over a live channel). */
.panel.full, [dir='rtl'] .panel.full { left: 64px; right: 64px; width: auto; }

/* The copyright line (owner, 20/11/2026): one small, quiet line in the bottom corner of the safe area (5 % of the
   screen), on the menus only; the mirrored corner right to left; never during playback. */
.credit { position: absolute; bottom: 54px; left: 128px; max-width: 900px; font-size: 18px; line-height: 1.2; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 40; pointer-events: none; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.kitlook .credit { color: var(--k-muted, var(--muted)); text-shadow: none; }
[dir='rtl'] .credit { left: auto; right: 128px; }
body.playing .credit { display: none; }

/* Codes and functions (manifest functions, contract v1.5): function tiles with their state, the code pad, 911. A home row
   with more tiles than the screen holds scrolls to the focused tile. Written for TV browsers from 2018 (no gap). */
.tiles.scroll { overflow: hidden; padding: 20px 16px; margin: -20px -16px; }
.tiles.scroll .tile { -webkit-flex-shrink: 0; flex-shrink: 0; }
.tile .state { display: block; margin-top: 6px; font-size: 24px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tile.on { background: #7f1d1d; }
.tile.on .state, .tile.on .ic { color: #fff; }
.kitlook .tile.on { background: #7f1d1d; color: #fff; }
.view.codes .section { padding: 40px 56px; }
/* The pad's panel is painted on an opaque base (the page colour under the panel's own colour): turning the page of the
   code list repaints only part of the screen, and the translucent panel came out darker in one square of the empty area
   (Arabic, page 2; review of 21/11/2026). The same colour as before, but a second paint can no longer darken it. */
.view.codes .section { background: linear-gradient(var(--panel), var(--panel)), var(--bg); }
.pad { display: flex; height: 720px; overflow: hidden; }
.pad-l { width: 760px; display: flex; flex-direction: column; align-items: center; }
.pad-r { flex: 1; margin-left: 64px; overflow: hidden; }
[dir='rtl'] .pad-r { margin-left: 0; margin-right: 64px; }
.pad-label { font-size: 34px; color: var(--muted); margin-bottom: 16px; }
.pad-digits { display: flex; justify-content: center; margin-bottom: 18px; direction: ltr; }
.pad-digits .pd { width: 92px; height: 112px; margin: 0 8px; border-radius: 16px; border: 3px solid rgba(255, 255, 255, .3); font-size: 72px; font-weight: 700; line-height: 106px; text-align: center; font-variant-numeric: tabular-nums; }
.pad-digits .pd.full { border-color: var(--accent); color: var(--accent); }
.pad-msg { min-height: 84px; max-width: 740px; font-size: 28px; line-height: 1.3; text-align: center; color: var(--muted); margin-bottom: 16px; }
.pad-msg.ok { color: #86efac; font-weight: 600; }
.pad-msg.warn { color: #fca5a5; font-weight: 600; }
.keys { display: flex; flex-wrap: wrap; width: 516px; direction: ltr; }
.keys .key { width: 148px; height: 92px; margin: 0 12px 12px 12px; border-radius: 16px; border: 4px solid transparent; background: rgba(255, 255, 255, .08); font-size: 46px; font-weight: 600; line-height: 84px; text-align: center; }
.keys .key.ok { background: var(--accent); color: #111; font-size: 34px; }
.keys .key.del { font-size: 40px; }
.pad-r h2 { font-size: 34px; line-height: 1.2; margin: 4px 0 14px; color: var(--muted); font-weight: 600; }
.plist { border: 4px solid transparent; border-radius: 14px; padding: 4px; }
.plist .prow { display: flex; align-items: center; height: 58px; box-sizing: border-box; overflow: hidden; font-size: 30px; padding: 0 18px; margin-bottom: 8px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.plist.focus { transform: none; }
.ppage { margin-top: 6px; text-align: center; font-size: 28px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ppage .dim { opacity: .3; }
.plist .prow b { width: 96px; color: var(--accent); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
[dir='rtl'] .plist .prow b { text-align: right; margin-left: 16px; }
.plist .prow span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist .prow.sos { background: #7f1d1d; }
.plist .prow.sos b, .plist .prow.sos span { color: #fff; font-weight: 700; }
.view.sos { background: #b91c1c; color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; z-index: 50; }
.view.sos.sending { animation: sos-pulse 1.2s infinite; }
@keyframes sos-pulse { 50% { background: #7f1d1d; } }
.sos-box { max-width: 1500px; padding: 0 80px; }
.sos-code { font-size: 180px; font-weight: 800; line-height: 1; letter-spacing: 12px; }
.view.sos h1 { font-size: 88px; margin: 12px 0 24px; }
.sos-state { font-size: 48px; line-height: 1.3; margin: 0 0 20px; font-weight: 600; }
.sos-room { font-size: 40px; margin: 0 0 20px; opacity: .9; }
.sos-call { font-size: 40px; margin: 0 0 28px; }
.sos-call.big { font-size: 60px; font-weight: 700; background: rgba(0, 0, 0, .25); padding: 16px 28px; border-radius: 16px; }
.sos-call b { unicode-bidi: isolate; }
.sos-hint { font-size: 26px; opacity: .8; }
