/* Calm Home Screen: the live TV. Sizes inside .ctv__stage are the app's dp on a 960 x 540 TV
   (half the Kotlin's mu); the stage is scaled to the set by tv.js. Sources: KidHomeTvStyle.kt. */
:root { --room: #7c4dff; }
.ctv { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0b1428; outline: none; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; cursor: default; }
.ctv__stage { position: absolute; left: 0; top: 0; width: 960px; height: 540px; transform-origin: 0 0; font-family: "Onest", system-ui, sans-serif; color: #fff; line-height: 1; text-align: left; }
.ctv__stage canvas { position: absolute; left: 0; top: 0; width: 960px; height: 540px; }
.ctv__veil { opacity: 0; pointer-events: none; }
.ctv__screens, .scr { position: absolute; inset: 0; }
.scr { opacity: 0; transition: opacity 0.15s linear; }
.scr.is-in { opacity: 1; }
.scr[hidden] { display: none; }
.ctv button { font: inherit; color: inherit; -webkit-appearance: none; appearance: none; outline: none; margin: 0; }

/* The home: headline at 320 mu, one row of 272 x 153 mu cards 28 apart at 628 (Christmas 680), 72 mu margins. */
.h { --row-top: 314px; --fade: 23, 28, 68; }
.h-top { position: absolute; right: 36px; top: 20px; height: 44px; display: flex; align-items: center; gap: 18px; }
.h-clock { font-size: 16px; font-weight: 500; color: rgba(255, 255, 255, 0.9); font-variant-numeric: tabular-nums; }
.h-gear { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, 0.1); display: grid; place-items: center; cursor: pointer; transition: transform 0.5s cubic-bezier(0, 0, 0.2, 1), background-color 0.3s; }
.h-gear svg { width: 22px; height: 22px; }
.h-gear.is-focus { transform: scale(1.1); background: rgba(255, 255, 255, 0.22); transition-duration: 0.3s; }
.h-gear.is-focus::after { content: ""; position: absolute; inset: 0; border: 1.5px solid #fff; border-radius: 50%; }
.h-headline { position: absolute; left: 36px; right: 36px; top: 164px; height: 40px; }
.h-headline span { position: absolute; left: 0; top: 0; max-width: 100%; font-size: 36px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity 0.18s linear; }
.h-headline span.is-on { opacity: 1; }
.h-row { position: absolute; left: 0; right: 0; top: calc(var(--row-top) - 18px); height: 112.5px; overflow: hidden; }
.h-track { display: flex; gap: 14px; padding: 18px 36px; width: max-content; transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1); }
/* tv-material Card: focus 1.1x in 300 ms, back in 500 ms, press 1.04x; 3 mu white ring; glow black 0.3 / 8 mu, focused 0.6 / 20 mu. */
.tvc { flex: none; position: relative; width: 136px; height: 76.5px; border-radius: 8px; border: 0; padding: 0; background: #11172b; box-shadow: 0 0 4px rgba(0, 0, 0, 0.3); cursor: pointer; transition: transform 0.5s cubic-bezier(0, 0, 0.2, 1), box-shadow 0.5s; }
/* An app card: the look's colour and the app's name (TvCardFace: 20 x 16 mu padding, Onest 32 mu SemiBold, 1.1 line, two lines at most, at the bottom). */
.tvc--app { display: flex; align-items: flex-end; padding: 8px 10px; text-align: left; font-family: "Onest", system-ui, sans-serif; }
.tvc__name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 16px; font-weight: 600; line-height: 1.1; color: inherit; }
.tvc.is-focus { transform: scale(1.1); box-shadow: 0 0 10px rgba(0, 0, 0, 0.6); transition-duration: 0.3s; z-index: 1; }
.tvc.is-focus::after { content: ""; position: absolute; inset: 0; border: 1.5px solid #fff; border-radius: inherit; pointer-events: none; }
.tvc.is-press { transform: scale(1.04); transition-duration: 0.12s; }
.tvc--zone { background: rgba(7, 11, 24, 0.55); box-shadow: 0 0 4px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.32); display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 8px 10px; text-align: left; }
.tvc--zone.is-focus { background: rgba(7, 11, 24, 0.72); }
.tvc--zone svg { width: 24px; height: 24px; color: rgba(255, 255, 255, 0.9); }
.tvc--zone span { font-size: 16px; font-weight: 600; line-height: 1.1; }
.h-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(rgba(var(--fade), 0), rgba(var(--fade), 0.7)); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .tvc, .h-gear, .h-track, .scr, .h-headline span { transition-duration: 0.01s !important; } }

/* The page around the set. */
.demo { position: relative; overflow: hidden; padding-block: clamp(22px, 3.4vw, 40px) clamp(44px, 6vw, 76px); }
.demo__head { position: relative; z-index: 1; text-align: center; }
.demo__head h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.demo__head p { max-width: 36em; margin: 12px auto 0; color: var(--cream-soft); font-size: 1.0625rem; }
.demo__room { position: relative; z-index: 1; width: min(100% - 2 * var(--pad), 940px); margin: clamp(18px, 2.6vw, 28px) auto 0; }
.demo__room::before { content: ""; position: absolute; inset: -16% -20%; background-color: var(--room); -webkit-mask: radial-gradient(closest-side, #000, transparent); mask: radial-gradient(closest-side, #000, transparent); opacity: 0.3; transition: background-color 0.6s; pointer-events: none; }
.demo__set { position: relative; padding: clamp(5px, 1vw, 10px); border-radius: clamp(9px, 1.6vw, 18px); background: linear-gradient(#1c2027, #090b0e); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 30px 80px rgba(0, 0, 0, 0.55); transition: box-shadow 0.2s; }
.demo__set .ctv { border-radius: clamp(4px, 0.8vw, 9px); }
.demo__set:focus-within { box-shadow: 0 0 0 2px rgba(255, 221, 179, 0.5), 0 30px 80px rgba(0, 0, 0, 0.55); }
.demo__set:has(.ctv:focus-visible) { box-shadow: 0 0 0 3px var(--glow), 0 30px 80px rgba(0, 0, 0, 0.55); }
.demo__stand { position: relative; z-index: 1; width: 22%; max-width: 200px; height: 0; margin: 0 auto; border-bottom: 9px solid #0b0e11; border-left: 14px solid transparent; border-right: 14px solid transparent; }
.demo__panel { position: relative; z-index: 1; max-width: calc(940px + 2 * var(--pad)); margin-top: clamp(18px, 2.6vw, 28px); display: grid; grid-template-columns: 1fr auto; grid-template-areas: "themes remote" "say remote" "hint remote"; gap: 14px 36px; align-items: start; }
.demo__panel .scenes { grid-area: themes; margin-top: 0; justify-content: flex-start; }
.demo__say { grid-area: say; min-height: 3.2em; font-size: 1.125rem; font-weight: 500; color: var(--cream); }
.demo__hint { grid-area: hint; font-size: 0.9rem; color: var(--cream-soft); display: grid; gap: 6px; }
.hint--touch { display: none; }
@media not all and (hover: hover) and (pointer: fine) { .hint--keys { display: none; } .hint--touch { display: block; } }
.remote { grid-area: remote; display: grid; grid-template-columns: repeat(3, 54px); grid-template-rows: repeat(3, 54px) 40px; gap: 6px; padding: 14px 14px 12px; border-radius: 30px; background: rgba(255, 244, 224, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 244, 224, 0.16); }
.remote button { border: 0; border-radius: 16px; background: rgba(255, 244, 224, 0.1); color: var(--cream); font: 700 0.95rem var(--font); cursor: pointer; display: grid; place-items: center; touch-action: manipulation; }
.remote button:hover { background: rgba(255, 244, 224, 0.18); }
.remote button:active { background: rgba(255, 244, 224, 0.3); transform: scale(0.96); }
.remote svg { width: 22px; height: 22px; }
.remote [data-remote="up"] { grid-area: 1 / 2; } .remote [data-remote="left"] { grid-area: 2 / 1; } .remote [data-remote="ok"] { grid-area: 2 / 2; border-radius: 50%; background: var(--glow); color: var(--night-deep); }
.remote [data-remote="right"] { grid-area: 2 / 3; } .remote [data-remote="down"] { grid-area: 3 / 2; } .remote [data-remote="back"] { grid-area: 4 / 1 / 5 / 4; border-radius: 14px; font-weight: 600; font-size: 0.875rem; }
.demo__get { position: relative; z-index: 1; margin-top: clamp(24px, 4vw, 40px); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 22px; }
.demo__get p { color: var(--cream-soft); font-size: 0.875rem; max-width: 26em; }
.noscript { position: relative; z-index: 1; text-align: center; color: var(--cream); margin-top: 16px; }
@media (max-width: 760px) {
  .demo__room { width: calc(100% - 16px); }
  .demo__panel { grid-template-columns: 1fr; grid-template-areas: "themes" "say" "remote" "hint"; justify-items: center; text-align: center; }
  .demo__panel .scenes { justify-content: center; }
  .demo__say { min-height: 3.6em; font-size: 1.0625rem; }
  .demo__get { flex-direction: column; text-align: center; }
}
.more--solo { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.more--solo p { margin-inline: auto; }
.support-line { text-align: center; margin-top: 28px; color: var(--ink-2); }
/* The header lies over the night band (round 1's .top), so the hero starts under it. */
.demo { padding-top: clamp(84px, 9vw, 108px); }
.demo__panel .scenes__label { text-align: left; }
@media (max-width: 760px) { .demo__panel .scenes__label { text-align: center; } }
/* Keep the whole set in the first view of a laptop. */
.demo { padding-top: clamp(76px, 7vw, 90px); }
.demo__head .eyebrow { margin-bottom: 8px; }
.demo__head h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
.demo__head p { max-width: 50em; margin-top: 8px; }
.demo__room { width: min(100% - 2 * var(--pad), 900px); margin-top: clamp(14px, 2vw, 22px); }
.demo__panel { max-width: calc(900px + 2 * var(--pad)); }
@media (max-width: 760px) { .demo__room { width: calc(100% - 16px); } }
@media (max-width: 430px) { .demo__panel .scenes { gap: 8px 6px; } .demo__panel .scenes button { padding-inline: 10px; font-size: 0.8125rem; } }
