* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #c9ced6; background: #0c0d10; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

.room { height: 100vh; display: grid; grid-template-columns: 1fr 232px 300px; gap: 28px; padding: 24px 28px;
  background: radial-gradient(1200px 700px at 35% 30%, #23262d 0%, #121418 55%, #0a0b0d 100%); }

/* TV */
.stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; }
.tv { position: relative; display: flex; flex-direction: column; align-items: center; }
.tv__bezel { padding: 10px; border-radius: 10px; background: linear-gradient(180deg, #1b1c1f, #0d0e10); box-shadow: 0 0 0 1px #2c2e33, 0 50px 120px rgba(0,0,0,.65), 0 0 120px rgba(120,140,255,.05); }
.tv__screen { position: relative; overflow: hidden; background: #000; border-radius: 2px; }
.tv__screen iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; pointer-events: none; }
.tv__brandline { width: 60px; height: 3px; border-radius: 2px; background: #2a2c31; margin-top: 6px; }
.tv__stand { display: flex; flex-direction: column; align-items: center; }
.tv__neck { width: 70px; height: 46px; background: linear-gradient(90deg, #17181b, #2a2c31, #17181b); clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%); }
.tv__foot { width: 380px; height: 12px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #2d2f34, #121316); box-shadow: 0 18px 30px rgba(0,0,0,.6); }
.keylog { margin-top: 18px; font-size: 13px; color: #7d838d; min-height: 18px; font-variant-numeric: tabular-nums; }
.keylog b { color: #d9dde3; }

/* Simulated Smart Hub (TV system UI, outside the app) */
.hub { position: absolute; inset: 0; background: linear-gradient(180deg, #0f1b2e 0%, #0a0f18 60%, #05070a 100%); display: flex; flex-direction: column; padding: 4% 5%; color: #dfe3ea; }
.hub[hidden] { display: none; }
.hub__top { display: flex; justify-content: space-between; font-size: 1.6vh; opacity: .7; }
.hub__hero { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hub__title { font-size: 3.4vh; font-weight: 600; }
.hub__sub { font-size: 1.6vh; opacity: .7; margin-top: .6vh; }
.hub__row { display: flex; gap: 1.2vw; }
.hub__app { width: 9vw; height: 9vh; border-radius: 10px; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 1.4vh; font-weight: 600; transition: transform .15s; }
.hub__app.is-focused { background: #e9ecf1; color: #0a0c10; transform: scale(1.08); }
.hub__logo { width: 1.4vh; height: 1.4vh; border-radius: 3px; background: linear-gradient(135deg, #8ea2ff 0 45%, #333 45%); }
.osd { position: absolute; left: 4%; bottom: 8%; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 12px; background: rgba(20,22,26,.92); color: #e8ebef; font-size: 14px; }
.osd[hidden] { display: none; }
.osd__bar { width: 160px; height: 6px; border-radius: 3px; background: #3a3d44; overflow: hidden; }
.osd__bar i { display: block; height: 100%; background: #e8ebef; }
.osd__n { width: 24px; text-align: right; font-variant-numeric: tabular-nums; }
.off { position: absolute; inset: 0; background: #000; }
.off[hidden] { display: none; }

/* Remote */
.remote { display: flex; align-items: center; justify-content: center; }
.r { width: 196px; padding: 22px 18px 18px; border-radius: 46px 46px 40px 40px; background: linear-gradient(160deg, #2b2d32, #18191c 60%, #121315); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 30px 60px rgba(0,0,0,.6), 0 0 0 1px #33353b; display: flex; flex-direction: column; gap: 14px; user-select: none; }
.r__row { display: flex; justify-content: space-between; align-items: center; }
.rb { height: 34px; border-radius: 17px; background: #23252a; color: #d9dde3; font-size: 13px; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 0 #0b0c0e; transition: transform .06s, background .1s; }
.rb:active, .rb.is-press, .dp:active, .dp.is-press, .rocker button:active, .rocker button.is-press { transform: translateY(1px) scale(.96); background: #3a3d44; }
.rb--power { width: 34px; color: #ff6b6b; font-size: 16px; }
.rb--sm { padding: 0 12px; font-size: 10px; letter-spacing: .06em; }
.r__nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rb--num { height: 30px; font-size: 14px; }
.rb--ghost { font-size: 9px; letter-spacing: .06em; color: #9aa0a9; }
.r__colors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 2px; }
.rb--color { height: 16px; border-radius: 8px; background: var(--c); box-shadow: 0 2px 0 #0b0c0e; opacity: .9; }
.r__colorlabels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: 8.5px; color: #8a9099; text-align: center; margin-top: -8px; }
.dpad { position: relative; width: 150px; height: 150px; margin: 4px auto; border-radius: 50%; background: radial-gradient(circle, #1a1b1e 38%, #26282d 39%); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 3px 0 #0b0c0e; }
.dp { position: absolute; color: #c9ced6; font-size: 13px; border-radius: 12px; width: 44px; height: 44px; }
.dp--up { left: 53px; top: 4px; } .dp--down { left: 53px; bottom: 4px; } .dp--left { left: 4px; top: 53px; } .dp--right { right: 4px; top: 53px; }
.dp--ok { left: 43px; top: 43px; width: 64px; height: 64px; border-radius: 50%; background: #2a2c31; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 0 #0b0c0e; }
.rb--round { width: 44px; height: 44px; border-radius: 50%; font-size: 17px; }
.r__rockers { display: flex; justify-content: space-between; align-items: center; }
.rocker { width: 46px; border-radius: 23px; background: #23252a; display: flex; flex-direction: column; align-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 0 #0b0c0e; }
.rocker button { width: 46px; height: 40px; border-radius: 23px; font-size: 15px; color: #d9dde3; }
.rocker span { font-size: 9px; letter-spacing: .1em; color: #8a9099; }
.rb--mute { font-size: 15px; }
.r__brand { text-align: center; font-size: 8.5px; letter-spacing: .16em; color: #5e646d; margin-top: 4px; }

/* Panel */
.panel { overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 12px; }
.panel h1 { font-size: 18px; color: #eef0f3; font-weight: 650; }
.panel h1 span { color: #8ea2ff; font-weight: 500; }
.panel__intro { font-size: 12px; color: #7d838d; line-height: 1.45; }
.card { background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 12px; }
.card h2 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #7d838d; margin-bottom: 10px; font-weight: 600; }
.btns { display: flex; flex-wrap: wrap; gap: 6px; }
.btns button { font-size: 12px; padding: 7px 10px; border-radius: 8px; background: rgba(255,255,255,.06); color: #d4d8de; }
.btns button:hover { background: rgba(255,255,255,.12); }
.btns button.is-on { background: #8ea2ff; color: #0b0c10; }
.btns button.warn { color: #f0b85a; }
.status { display: grid; grid-template-columns: auto 1fr; gap: 5px 8px; font-size: 12px; }
.status dt { color: #7d838d; } .status dd { color: #e2e5ea; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.keys summary { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #7d838d; cursor: pointer; }
.keys table { margin-top: 8px; font-size: 12px; border-collapse: collapse; width: 100%; }
.keys td { padding: 3px 0; } .keys td:first-child { color: #e2e5ea; } .keys td:last-child { color: #8a9099; text-align: right; }

@media (max-width: 1200px) { .room { grid-template-columns: 1fr 220px; } .panel { display: none; } }

.rb--mic { width: 52px; height: 34px; font-size: 15px; background: #2c3140; box-shadow: inset 0 0 0 1px rgba(142,162,255,.35), 0 2px 0 #0b0c0e; }
.rb--mic.is-live { background: #8ea2ff; color: #0b0c10; animation: micpulse 1s ease-in-out infinite; }
@keyframes micpulse { 50% { box-shadow: 0 0 0 6px rgba(142,162,255,.25); } }
.hint { font-size: 12px; color: #7d838d; line-height: 1.45; margin-bottom: 8px; }
.card h2 .sub { text-transform: none; letter-spacing: 0; color: #5e646d; font-weight: 400; }
.askform { display: flex; gap: 6px; }
.askform input { flex: 1; min-width: 0; font: inherit; font-size: 12px; padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.3); color: #e2e5ea; }
.askform button { font-size: 12px; padding: 7px 12px; border-radius: 8px; background: #8ea2ff; color: #0b0c10; font-weight: 600; }

/* Couch Club: phones strip under the TV */
.room { grid-template-columns: 1fr 232px 300px; grid-template-rows: 1fr auto; }
.phones { grid-column: 1 / -1; display: flex; gap: 14px; overflow-x: auto; min-height: 0; }
.phones:empty { display: none; }
.phone { flex: none; width: 250px; height: 470px; border-radius: 30px; padding: 8px; background: #050507; box-shadow: 0 0 0 1px #2c2e33, 0 20px 40px rgba(0,0,0,.5); position: relative; }
.phone iframe { width: 390px; height: 730px; border: 0; border-radius: 24px; transform: scale(.6154); transform-origin: 0 0; }
.phone__x { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: #33353b; color: #fff; font-size: 12px; z-index: 2; }
body { overflow: auto; }
.room { height: auto; min-height: 100vh; }
.stage { min-height: 56vh; }
