/* Same scale as the home screen: rem follows the screen height (16 px at 1080p). */
html { font-size: calc(100vh / 67.5 * var(--text-scale, 1)); }
html, body { height: 100%; margin: 0; overflow: hidden; user-select: none; cursor: default; }
/* Over a game: the game stays visible underneath, dimmed. */
body { background: color-mix(in srgb, var(--bg) 95%, transparent); display: flex; flex-direction: column; padding: 2.5rem 4rem; }

.icon { width: 1.5rem; height: 1.5rem; display: block; }
.glyph { font-size: 1.0625rem; }

.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 2rem; height: 2.5rem; }
/* The controller's battery: its level drawn inside the outline, and in words. */
.battery { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 1.125rem; color: var(--muted); }
.battery[hidden] { display: none; }
.battery .icon { width: 1.75rem; height: 1.75rem; }
.battery.low { color: var(--danger); }

/* Power menu: Menu opens it under the clock; one-line rows as in the other menus. */
body { position: relative; }
.power { position: absolute; top: 5.5rem; right: 4rem; width: 24rem; padding: 0.5rem; border-radius: 0.75rem; background: var(--surface); box-shadow: inset 0 0 0 var(--line) var(--ring-strong); z-index: 1; }
.power[hidden] { display: none; }
.power .row { display: flex; align-items: center; gap: 1rem; height: 3.25rem; padding: 0 1rem; border-radius: 0.5rem; font-weight: 600; font-size: 1.125rem; }
.power .row .icon { flex: none; color: var(--muted); }
.power .row > span:last-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.power .row.on { background: var(--surface-hover); box-shadow: 0 0 0 var(--focus) var(--accent); }
/* Holding A: the row fills from the left for the hold time (HOLD_MS). */
.power .row { position: relative; overflow: hidden; }
.power .row > * { position: relative; }
.power .row::before { content: ""; position: absolute; inset: 0; width: 0; background: color-mix(in srgb, var(--accent) 22%, transparent); }
.power .row.holding::before { width: 100%; transition: width 1000ms linear; }
@media (prefers-reduced-motion: reduce) { .power .row.holding::before { transition: none !important; width: 100%; } }
#clock { font-weight: 600; font-size: 1.25rem; }

main { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 2.5rem; }

/* One row of windows; it slides to keep the focused one in view. */
.windows { display: flex; gap: 1.5rem; overflow: hidden; padding: 0.375rem; margin: -0.375rem; }
/* Five fit across; more slide in as the focus moves. */
.window { flex: none; width: calc((100% - 4 * 1.5rem) / 5); border-radius: 0.75rem; background: var(--surface); overflow: hidden; }
.window.on { box-shadow: 0 0 0 var(--focus) var(--accent); }
.window .shot { position: relative; aspect-ratio: 16 / 9; background: var(--surface-hover); display: grid; place-items: center; }
/* The guide shows once its pictures are ready: no fade. */
.window .shot img.picture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.window .shot img.picture.loaded { opacity: 1; }
.window .shot .big { width: 4rem; height: 4rem; object-fit: contain; }
.window .label { display: flex; align-items: center; gap: 0.75rem; height: 3.5rem; padding: 0 1rem; }
.window .label img { width: 1.5rem; height: 1.5rem; flex: none; object-fit: contain; }
.window .label .title { min-width: 0; font-weight: 600; font-size: 1.0625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Inicio: its symbol where the windows show their picture. */
.window.home .shot { color: var(--muted); }
.window.home .shot .icon.big { width: 3.5rem; height: 3.5rem; }
.window.home .label .icon { color: var(--muted); }
.window .label .kind { margin-left: auto; flex: none; color: var(--muted); }

/* Empty: same look as the other empty states. */
.empty { display: flex; align-items: center; gap: 1.25rem; }
.empty .box { width: 3.5rem; height: 3.5rem; border-radius: 0.75rem; background: var(--surface); display: grid; place-items: center; color: var(--muted); }
.empty b { display: block; font-weight: 600; font-size: 1.25rem; }
.empty span { color: var(--muted); }

/* What is playing, with the same round buttons as the music tab. */
.music { display: flex; align-items: center; gap: 1.5rem; padding: 1rem 1.25rem; border-radius: 0.75rem; background: var(--surface); max-width: 48rem; }
.music[hidden] { display: none; }
.music .art { width: 4.5rem; height: 4.5rem; border-radius: 0.5rem; object-fit: cover; background: var(--surface-hover); flex: none; }
.music .text { min-width: 0; flex: 1; }
.music .text b { display: block; font-weight: 600; font-size: 1.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music .text span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transport { display: flex; gap: 0.75rem; flex: none; }
.transport-button { width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); color: var(--text); }
.transport-button .icon { width: 1.375rem; height: 1.375rem; fill: currentColor; }

.hints { display: flex; gap: 2rem; align-items: center; height: 2.5rem; font-weight: 600; font-size: 1.25rem; white-space: nowrap; }
.hints .hint { display: flex; align-items: center; gap: 0.625rem; }
.hints .back { margin-left: auto; }
