/* The game-test viewer (lkviewer.js, wu-0105a19e): the shared tiles, one per box, in whatever host a mode gives it (.as-tests). The
   host sets the colours through --tv-* (defaults below are Inside's glass); the tiles keep a 16:9 screen each, side by side, or one
   large with the others as thumbnails under it (.focus). A full-screen tile fills the browser's full screen by itself. */
.as-tests { --tv-line: var(--line-2, rgba(255, 255, 255, 0.12)); --tv-ink: var(--text, #e8e8ec); --tv-dim: var(--muted, rgba(232, 232, 236, 0.6)); --tv-live: var(--green, #6fd38a); --tv-bg: rgba(0, 0, 0, 0.35); display: flex; flex-direction: column; min-height: 0; }
/* flex: none: the host is a flex column that scrolls; the grid keeps its own height there (shrunk to the host, its auto rows would
   share the host's height and squeeze each tile's screen under its caption, which a 390 px phone showed: three tiles with no names) */
.as-tests .tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-content: start; flex: none; }
.as-tests .tile { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--tv-line); border-radius: 10px; overflow: hidden; background: var(--tv-bg); cursor: pointer; outline-offset: 2px; }
.as-tests .tile:focus-visible { outline: 2px solid var(--tv-live); }
.as-tests .screen { position: relative; aspect-ratio: 16 / 9; background: #000; }
.as-tests .screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.as-tests .tile:not([data-st="live"]) .screen video { visibility: hidden; }
.as-tests .say { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; color: var(--tv-dim); font-size: 0.95em; }
.as-tests .say[hidden] { display: none; }
.as-tests .tile[data-st="waiting"] .say::before, .as-tests .tile[data-st="connecting"] .say::before, .as-tests .tile[data-st="reconnecting"] .say::before { content: ""; position: absolute; left: 50%; top: calc(50% - 26px); width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--tv-dim); animation: as-tests-blink 1.6s ease-in-out infinite; }
@keyframes as-tests-blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.as-tests .tile[data-st="off"] .say, .as-tests .tile[data-st="failed"] .say, .as-tests .tile[data-st="noviewer"] .say { color: var(--amber-2, #ffb000); }
.as-tests .cap { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; font-size: 0.85em; color: var(--tv-ink); min-height: 34px; }
.as-tests .cap b { font-weight: 600; white-space: nowrap; }
.as-tests .cap .game, .as-tests .cap .run { color: var(--tv-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.as-tests .cap .game:empty, .as-tests .cap .run:empty { display: none; }
.as-tests .tile[data-st="live"] .cap b::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--tv-live); box-shadow: 0 0 6px var(--tv-live); vertical-align: 1px; }
.as-tests .cap button { margin-left: auto; width: 30px; height: 30px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 8px; border: 1px solid var(--tv-line); background: transparent; color: var(--tv-ink); cursor: pointer; }
/* the keys sit at the right: the first shown one takes the room (the sound key hides outside a live tile; a hidden sibling still counts for +) */
.as-tests .cap .sound:not([hidden]) + .full { margin-left: 0; }
.as-tests .cap button:disabled { opacity: 0.35; cursor: default; }
.as-tests .cap button[hidden] { display: none; }
.as-tests .cap button svg { width: 16px; height: 16px; }
.as-tests .sound[aria-pressed="false"] .w { display: none; }
.as-tests .sound[aria-pressed="true"] .x { display: none; }
.as-tests .sound[aria-pressed="false"] { opacity: 0.6; }
.as-tests audio { display: none; }
/* one large, the rest as thumbnails under it */
.as-tests.focus .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.as-tests.focus .tile.large { grid-column: 1 / -1; }
.as-tests.focus .tile.thumb .cap { font-size: 0.78em; min-height: 28px; }
.as-tests.focus .tile.thumb .cap button { width: 26px; height: 26px; }
/* the browser's full screen: the tile alone, its screen filling it */
.as-tests .tile.fullscreen, .as-tests .tile:fullscreen { background: #000; border: 0; border-radius: 0; cursor: default; }
.as-tests .tile:fullscreen .screen { aspect-ratio: auto; flex: 1; }
.as-tests .tile:fullscreen .cap { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.55); color: #fff; }
@media (max-width: 699px) { .as-tests .tiles, .as-tests.focus .tiles { grid-template-columns: 1fr; } .as-tests .cap button { width: 44px; height: 44px; } .as-tests .cap { min-height: 48px; } }
