/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * Copyright © 2026 Marcel Rymenhout and IniqDash contributors */
.iq-rt { container: iq-rt / size; position: relative; isolation: isolate; overflow: hidden; height: 100%; box-sizing: border-box; padding: 14px 16px 16px; display: grid; grid-template-rows: auto 1fr auto;
  border-radius: var(--radius-device, 22px); color: #ffffff; background: #121318; }
.iq-rt__pic { position: absolute; inset: 0; z-index: -2; background: center / cover no-repeat; transition: transform .5s ease; }
.iq-rt:hover .iq-rt__pic { transform: scale(1.04); }
.iq-rt__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 9, 12, .25) 0%, rgba(8, 9, 12, .05) 35%, rgba(8, 9, 12, .55) 70%, rgba(8, 9, 12, .9) 100%); }
.iq-rt__top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.iq-rt__chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 8px; border-radius: 999px; background: rgba(14, 15, 20, .62); backdrop-filter: blur(6px); font-size: 14px; }
.iq-rt__chip[hidden] { display: none; }
.iq-rt__chip b { font-weight: 600; }
.iq-rt__chip > span svg { width: 17px; height: 17px; }
.iq-rt__chip[data-k="humidity"] > span { color: #57c8ff; }
.iq-rt__chip[data-k="lights"] > span { color: #8a8f9c; }
.iq-rt__chip[data-k="lights"][data-on="true"] > span { color: #ffcb42; filter: drop-shadow(0 0 6px rgba(255, 203, 66, .7)); }
.iq-rt__chip[data-k="lights"] { margin-left: auto; }
.iq-rt__temp { align-self: center; justify-self: center; font-size: clamp(26px, 13cqi, 42px); font-weight: 700; letter-spacing: -.02em; text-shadow: 0 2px 14px rgba(0, 0, 0, .55); }
.iq-rt__foot { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-width: 0; }
.iq-rt__ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--rt-c); color: #ffffff; box-shadow: 0 6px 18px color-mix(in srgb, var(--rt-c) 45%, transparent); }
.iq-rt__ic svg { width: 24px; height: 24px; }
.iq-rt__tx { display: flex; flex-direction: column; min-width: 0; }
.iq-rt__name { font-size: 16px; font-weight: 700; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.iq-rt__sub { font-size: 12.5px; color: rgba(255, 255, 255, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iq-rt__go { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(14, 15, 20, .62); border: 1px solid rgba(255, 255, 255, .1); }
.iq-rt__go svg { width: 18px; height: 18px; }
@container iq-rt (max-width: 230px) { .iq-rt__ic { width: 38px; height: 38px; } .iq-rt__go { display: none; } }
@media (prefers-reduced-motion: reduce) { .iq-rt__pic { transition: none; } }
.iq-rt[data-photo="false"] .iq-rt__pic { background: radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--rt-c) 42%, transparent), transparent 60%),
  linear-gradient(160deg, color-mix(in srgb, var(--rt-c) 22%, #1a1b22), #121318 75%); }
.iq-rt__big { position: absolute; z-index: -2; right: -6%; top: 4%; width: 58%; aspect-ratio: 1; color: var(--rt-c); opacity: .18; pointer-events: none; }
.iq-rt__big span, .iq-rt__big svg { display: block; width: 100%; height: 100%; }
.iq-rt[data-photo="true"] .iq-rt__big { display: none; }
/* QUICK ACTIONS: round glass buttons along the bottom (a toggle lights up in the accent when on) */
.iq-rt__acts { display: flex; gap: 8px; align-self: end; min-width: 0; overflow: hidden; }
.iq-rt__acts[hidden] { display: none; }
.iq-rt__act { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12); background: rgba(20, 24, 34, .55);
  color: #fff; backdrop-filter: blur(8px); padding: 0; cursor: default; }
button.iq-rt__act { cursor: pointer; }
.iq-rt__act svg { width: 20px; height: 20px; }
.iq-rt__act[data-on="true"] { background: color-mix(in srgb, var(--accent, #f69a2e) 34%, rgba(20, 24, 34, .6)); border-color: color-mix(in srgb, var(--accent, #f69a2e) 55%, transparent); color: var(--accent, #f69a2e); }
.iq-rt__act[data-na="true"] { opacity: .45; }
button.iq-rt__act:focus-visible { outline: 2px solid var(--accent, #f69a2e); outline-offset: 2px; }

/* ================================================================ OVERVIEW (variant "scene"): the room large, its devices animated */
.iq-rt__hero[hidden], .iq-rt__devs[hidden] { display: none; }
.iq-rt[data-variant="scene"] { padding: clamp(14px, 3cqi, 26px); grid-template-rows: auto 1fr auto auto; row-gap: 10px; border-radius: var(--radius-device, 26px); }
.iq-rt[data-variant="scene"] .iq-rt__temp, .iq-rt[data-variant="scene"] .iq-rt__go { display: none; }
/* the photo drifts — slowly, endlessly (a gentle Ken Burns); hover no longer zooms it */
.iq-rt[data-variant="scene"] .iq-rt__pic { inset: -4%; animation: iq-rt-drift 26s ease-in-out infinite alternate; transition: none; }
.iq-rt[data-variant="scene"]:hover .iq-rt__pic { transform: none; }
@keyframes iq-rt-drift { from { transform: scale(1.02) translate3d(-1.2%, .6%, 0); } to { transform: scale(1.1) translate3d(1.4%, -1%, 0); } }
.iq-rt[data-variant="scene"] .iq-rt__shade { background:
  radial-gradient(90% 70% at 15% 55%, rgba(6, 7, 10, .55), transparent 70%),
  linear-gradient(180deg, rgba(6, 7, 10, .45) 0%, rgba(6, 7, 10, .05) 30%, rgba(6, 7, 10, .35) 62%, rgba(6, 7, 10, .88) 100%); }
/* the head: the chips (humidity, lights on) on the left; the room's icon and name above them when shown (showName) — a layout of its own,
   stronger than a design collection's photo-card rules */
.iq-rt.iq-rt[data-variant="scene"] { grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); }
.iq-rt.iq-rt[data-variant="scene"] .iq-rt__foot { grid-row: 1; position: static; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 0; }
.iq-rt.iq-rt[data-variant="scene"][data-name="false"] .iq-rt__foot { display: none; }
.iq-rt.iq-rt[data-variant="scene"] .iq-rt__top { grid-row: 2; display: flex; justify-content: flex-start; gap: 8px; }
.iq-rt.iq-rt[data-variant="scene"] .iq-rt__chip { margin: 0; height: 36px; padding: 0 14px 0 10px; border-radius: 999px; background: rgba(14, 15, 20, .55); border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 14px; }
.iq-rt.iq-rt[data-variant="scene"] .iq-rt__chip > span svg { width: 18px; height: 18px; }
.iq-rt.iq-rt[data-variant="scene"] .iq-rt__chip[data-k="lights"][data-on="true"] { background: color-mix(in srgb, #ffc24a 22%, rgba(14, 15, 20, .55)); border-color: color-mix(in srgb, #ffc24a 45%, transparent); }
.iq-rt.iq-rt[data-variant="scene"] .iq-rt__chip[data-k="lights"][data-on="true"] > span { color: #ffc24a; }
.iq-rt.iq-rt[data-variant="scene"] .iq-rt__temp, .iq-rt.iq-rt[data-variant="scene"] .iq-rt__go, .iq-rt.iq-rt[data-variant="scene"] .iq-rt__acts { display: none; }
.iq-rt.iq-rt[data-variant="scene"] .iq-rt__ic { width: 40px; height: 40px; border-radius: 13px; }
.iq-rt.iq-rt[data-variant="scene"] .iq-rt__name { font-size: clamp(18px, 3.2cqi, 26px); font-weight: 650; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the BIG temperature */
.iq-rt.iq-rt[data-variant="scene"] .iq-rt__hero { grid-row: 3; align-self: center; min-height: max-content; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.iq-rt__hv { font-size: clamp(44px, 12cqi, 92px); font-weight: 700; line-height: 1.02; margin-bottom: 2px; letter-spacing: -.035em; text-shadow: 0 4px 30px rgba(0, 0, 0, .55); font-variant-numeric: tabular-nums; }
.iq-rt__hl { font-size: clamp(12px, 2cqi, 15px); color: rgba(255, 255, 255, .78); letter-spacing: .02em; }
.iq-rt__hl[hidden] { display: none; }
.iq-rt__hs { margin-top: 8px; align-self: flex-start; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: rgba(14, 15, 20, .55); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .1); }
.iq-rt__hs:empty { display: none; }
/* the DEVICE BUBBLES: glass cards in a row (they wrap into a second row on a narrow card; never a scrollbar) */
.iq-rt.iq-rt[data-variant="scene"] .iq-rt__devs { grid-row: 4; display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(96px, 17cqi, 132px), 1fr)); gap: clamp(8px, 1.6cqi, 12px); min-width: 0; }
.iq-rt__dev { position: relative; display: grid; grid-template-rows: auto auto auto; justify-items: start; gap: 2px; min-width: 0; padding: 10px 12px 11px; border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .12); background: linear-gradient(160deg, rgba(30, 33, 44, .62), rgba(14, 15, 20, .62)); backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); color: #fff; font: inherit; text-align: left; cursor: default; overflow: hidden; isolation: isolate;
  transition: border-color .35s ease, background .35s ease, box-shadow .35s ease, transform .2s ease; }
button.iq-rt__dev { cursor: pointer; }
button.iq-rt__dev:hover { transform: translateY(-2px); }
button.iq-rt__dev:active { transform: scale(.97); }
button.iq-rt__dev:focus-visible { outline: 2px solid var(--accent, #f69a2e); outline-offset: 2px; }
.iq-rt__da { width: clamp(40px, 7cqi, 54px); aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 4px; filter: grayscale(.85) brightness(.75); opacity: .78;
  transition: filter .4s ease, opacity .4s ease; }
.iq-rt__da > .iqan-host { width: 100%; height: 100%; display: block; }
.iq-rt__di svg { width: 26px; height: 26px; }
.iq-rt__dn { max-width: 100%; font-size: 13px; font-weight: 650; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iq-rt__ds { max-width: 100%; font-size: 11.5px; color: rgba(255, 255, 255, .66); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ON: the bubble lights up in the device's own colour, with a soft glow behind its animation */
.iq-rt__dev { --dc: var(--accent, #f69a2e); }
.iq-rt__dev[data-kind="light"] { --dc: #ffc24a; }
.iq-rt__dev[data-kind="climate"], .iq-rt__dev[data-kind="water_heater"] { --dc: #ff7a3d; }
.iq-rt__dev[data-heat="cooling"] { --dc: #4fc3ff; }
.iq-rt__dev[data-kind="media_player"] { --dc: #b07cff; }
.iq-rt__dev[data-kind="fan"], .iq-rt__dev[data-kind="humidifier"] { --dc: #5fd6c8; }
.iq-rt__dev[data-on="true"] { border-color: color-mix(in srgb, var(--dc) 55%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--dc) 26%, rgba(30, 33, 44, .6)), rgba(14, 15, 20, .62));
  box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--dc) 70%, transparent); }
.iq-rt__dev[data-on="true"]::before { content: ""; position: absolute; z-index: -1; left: 4px; top: 2px; width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--dc) 55%, transparent), transparent 70%); animation: iq-rt-breathe 3.2s ease-in-out infinite; }
@keyframes iq-rt-breathe { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.06); } }
.iq-rt__dev[data-on="true"] .iq-rt__da { filter: none; opacity: 1; }
.iq-rt__dev[data-on="true"] .iq-rt__ds { color: color-mix(in srgb, var(--dc) 70%, #fff); }
.iq-rt__dev[data-na="true"] { opacity: .45; }
/* a NARROW overview (a phone): a smaller temperature, two bubbles a row */
@container iq-rt (max-width: 520px) {
  .iq-rt.iq-rt[data-variant="scene"] .iq-rt__devs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iq-rt__hv { font-size: clamp(44px, 18cqi, 72px); }
}
@media (prefers-reduced-motion: reduce) { .iq-rt[data-variant="scene"] .iq-rt__pic { animation: none; } .iq-rt__dev[data-on="true"]::before { animation: none; } }

/* ---------------------------------------------------------------- the OVERVIEW THERMOSTAT: a glass panel at the right — a glowing 270° gauge */
.iq-rt__th[hidden] { display: none; }
.iq-rt.iq-rt[data-variant="scene"][data-th="true"] { grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(12px, 2.4cqi, 24px); }
.iq-rt.iq-rt[data-variant="scene"][data-th="true"] .iq-rt__foot,
.iq-rt.iq-rt[data-variant="scene"][data-th="true"] .iq-rt__top,
.iq-rt.iq-rt[data-variant="scene"][data-th="true"] .iq-rt__hero { grid-column: 1; }
.iq-rt.iq-rt[data-variant="scene"][data-th="true"] .iq-rt__devs { grid-column: 1 / -1; }
.iq-rt__th { grid-column: 2; grid-row: 1 / 4; align-self: center; position: relative; display: grid; justify-items: center; width: clamp(190px, 26cqi, 270px); container: iq-rt-th / inline-size;
  padding: 14px 14px 16px; border-radius: 28px; border: 1px solid rgba(255, 255, 255, .14); isolation: isolate;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 140, 70, .16), transparent 60%), linear-gradient(170deg, rgba(28, 31, 42, .72), rgba(10, 11, 16, .72));
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .08); }
.iq-rt__tg { width: 100%; aspect-ratio: 1; display: block; overflow: visible; }
.iq-rt__tk line { stroke: rgba(255, 255, 255, .22); stroke-width: 1.6; stroke-linecap: round; }
.iq-rt__tt { stroke: rgba(255, 255, 255, .09); }
.iq-rt__ta { transition: d .45s cubic-bezier(.2, .8, .2, 1); }
.iq-rt__ta--glow { opacity: .75; animation: iq-rt-glow 2.8s ease-in-out infinite; }
@keyframes iq-rt-glow { 0%, 100% { opacity: .45; } 50% { opacity: .95; } }
.iq-rt__tn { fill: #fff; filter: drop-shadow(0 0 8px rgba(255, 150, 90, .95)); transition: cx .45s cubic-bezier(.2, .8, .2, 1), cy .45s cubic-bezier(.2, .8, .2, 1); }
.iq-rt__tc { fill: #7fd6ff; filter: drop-shadow(0 0 6px rgba(127, 214, 255, .9)); }
.iq-rt__tv { position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 1; display: grid; place-content: center; justify-items: center; text-align: center; pointer-events: none; padding: 14px; }
.iq-rt__tl { font-size: 4.6cqi; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.iq-rt__tx2 { font-size: 17cqi; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; text-shadow: 0 0 24px rgba(255, 140, 70, .45); }
.iq-rt__ts { margin-top: 2px; font-size: 5.6cqi; font-weight: 600; color: #ffb27a; }
.iq-rt__th[data-act="idle"] .iq-rt__ts { color: rgba(255, 255, 255, .7); }
.iq-rt__th[data-act="cooling"] .iq-rt__ts { color: #7fd6ff; }
.iq-rt__tb { display: flex; gap: 12px; margin-top: -18px; position: relative; }
.iq-rt__tbtn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07); color: #fff; font-family: inherit; font-size: 26px; font-weight: 500; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding: 0; transition: background .2s, transform .15s, box-shadow .2s; }
.iq-rt__tbtn:hover { background: rgba(255, 140, 70, .22); box-shadow: 0 0 22px -4px rgba(255, 140, 70, .7); }
.iq-rt__tbtn:active { transform: scale(.92); }
.iq-rt__tbtn:focus-visible { outline: 2px solid var(--accent, #f69a2e); outline-offset: 2px; }
.iq-rt__tbtn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.iq-rt__th[data-off="true"] .iq-rt__ta, .iq-rt__th[data-off="true"] .iq-rt__tn { opacity: .25; }
.iq-rt__th[data-off="true"] .iq-rt__ta--glow { animation: none; opacity: 0; }
.iq-rt__th[data-off="true"] .iq-rt__tx2 { text-shadow: none; color: rgba(255, 255, 255, .55); }
@container iq-rt (max-width: 560px) {
  .iq-rt.iq-rt[data-variant="scene"][data-th="true"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto auto; row-gap: 14px; }
  .iq-rt.iq-rt[data-variant="scene"][data-th="true"] .iq-rt__hero { grid-row: 3; }
  .iq-rt.iq-rt[data-variant="scene"][data-th="true"] .iq-rt__th { grid-column: 1; grid-row: 4; width: min(100%, 210px); justify-self: center; min-height: max-content; }
  .iq-rt.iq-rt[data-variant="scene"][data-th="true"] .iq-rt__devs { grid-row: 5; }
}
@media (prefers-reduced-motion: reduce) { .iq-rt__ta--glow { animation: none; } }

/* ================================================================ ACTIVE NOW (variant "active"): the room popup's first tab — a heading,
   how many devices are on, and a card per device that is on (its animation glowing in a tile, its name and state, its control) */
.iq-rt__now[hidden], .iq-rt__ne[hidden], .iq-rt__np[hidden] { display: none; }
.iq-rt.iq-rt[data-variant="active"] { display: block; padding: 4px 2px; background: none; box-shadow: none; overflow: visible; color: var(--text-primary, #fff); }
.iq-rt.iq-rt[data-variant="active"] :is(.iq-rt__pic, .iq-rt__big, .iq-rt__shade, .iq-rt__top, .iq-rt__temp, .iq-rt__acts, .iq-rt__foot, .iq-rt__hero, .iq-rt__devs, .iq-rt__th) { display: none !important; }
.iq-rt__nh { margin: 0 0 14px; }
.iq-rt__nt { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.iq-rt__ns { margin: 3px 0 0; font-size: 13px; color: var(--text-secondary, rgba(255, 255, 255, .62)); }
.iq-rt__ng { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.iq-rt__ne { margin: 8px 0 0; padding: 22px; border-radius: 18px; text-align: center; font-size: 14px; color: var(--text-secondary, rgba(255, 255, 255, .62)); border: 1px dashed var(--border-subtle, rgba(255, 255, 255, .12)); }
.iq-rt__nc { --dc: var(--accent, #f69a2e); position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 86px; padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--dc) 8%, var(--surface-secondary, #23252d)), var(--surface-primary, #1c1e25));
  border: 1px solid color-mix(in srgb, var(--dc) 18%, var(--border-subtle, rgba(255, 255, 255, .08))); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .7);
  animation: iq-rt-in .35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes iq-rt-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.iq-rt__nc[data-kind="light"] { --dc: #ffc24a; }
.iq-rt__nc:is([data-kind="climate"], [data-kind="water_heater"]) { --dc: #ff7a3d; }
.iq-rt__nc[data-heat="cooling"] { --dc: #4fc3ff; }
.iq-rt__nc[data-kind="media_player"] { --dc: #b07cff; }
.iq-rt__nc:is([data-kind="fan"], [data-kind="humidifier"]) { --dc: #5fd6c8; }
.iq-rt__ni { position: relative; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; padding: 6px; box-sizing: border-box;
  background: color-mix(in srgb, var(--dc) 16%, rgba(14, 15, 20, .6)); border: 1px solid color-mix(in srgb, var(--dc) 45%, transparent);
  box-shadow: 0 0 26px -6px color-mix(in srgb, var(--dc) 70%, transparent), inset 0 0 18px -8px var(--dc); color: var(--dc); }
.iq-rt__ni > .iqan-host { width: 100%; height: 100%; display: block; }
.iq-rt__ni svg { width: 26px; height: 26px; }
.iq-rt__nx { display: flex; flex-direction: column; min-width: 0; }
.iq-rt__nn { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iq-rt__nst { font-size: 12.5px; color: var(--text-secondary, rgba(255, 255, 255, .62)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the switch (on: the accent pill) */
.iq-rt__sw { position: relative; width: 58px; height: 32px; border-radius: 999px; border: 0; padding: 0; cursor: pointer; background: var(--accent, #f69a2e);
  box-shadow: 0 6px 18px -6px var(--accent, #f69a2e); transition: background .2s, box-shadow .2s; }
.iq-rt__sw i { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: right .2s; }
.iq-rt__sw:focus-visible { outline: 2px solid var(--accent, #f69a2e); outline-offset: 3px; }
/* the thermostat pill: − target + */
.iq-rt__np { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 4px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--dc) 55%, transparent);
  background: color-mix(in srgb, var(--dc) 10%, transparent); }
.iq-rt__npb { width: 32px; height: 32px; border-radius: 50%; border: 0; background: none; color: var(--dc); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.iq-rt__npb:hover { background: color-mix(in srgb, var(--dc) 18%, transparent); }
.iq-rt__npb:focus-visible { outline: 2px solid var(--dc); outline-offset: 1px; }
.iq-rt__npv { min-width: 44px; text-align: center; font-size: 15px; font-weight: 700; color: var(--dc); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .iq-rt__nc { animation: none; } }


/* ================================================================ SPOTLIGHT (variant 'spot') — one room over its photo, a brightness rail on it */
.iq-rspot { position: relative; box-sizing: border-box; height: 100%; overflow: hidden; border-radius: 14px; border: 1px solid rgba(120, 200, 255, .12); background: #0e121c; color: #fff; font-family: var(--mai-font, var(--font)); isolation: isolate; }
.iq-rspot__img { position: absolute; inset: 0; z-index: -2; background: center 55% / cover no-repeat; transition: filter .6s ease; }
.iq-rspot.is-dark .iq-rspot__img { filter: brightness(.55) saturate(.6); }
.iq-rspot__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(9, 11, 18, .85), rgba(9, 11, 18, .15) 60%, rgba(9, 11, 18, .4)), linear-gradient(0deg, rgba(9, 11, 18, .7), transparent 40%); }
.iq-rspot__tabs { position: absolute; left: 16px; top: 16px; display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: rgba(9, 11, 18, .7); border: 1px solid rgba(120, 200, 255, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); max-width: calc(100% - 110px); overflow: hidden; }
.iq-rspot__tabs button { border: 0; background: none; padding: 6px 10px; border-radius: 7px; font: inherit; font-weight: 700; font-size: 11px; color: #9ea5b8; cursor: pointer; white-space: nowrap; }
.iq-rspot__tabs button.on { background: rgba(34, 224, 224, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(34, 224, 224, .5); }
.iq-rspot__info { position: absolute; left: 18px; top: 84px; right: 100px; max-width: 260px; }
.iq-rspot__k { font-size: 9.5px; font-weight: 800; letter-spacing: .16em; color: #22e0e0; }
.iq-rspot__name { margin: 6px 0 0; font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.iq-rspot__say { margin: 8px 0 0; color: #c4cbdc; font-weight: 500; line-height: 1.5; font-size: 12px; }
.iq-rspot__stats { display: flex; gap: 8px; margin-top: 16px; }
.iq-rspot__stats div { padding: 8px 10px; border-radius: 10px; background: rgba(9, 11, 18, .6); border: 1px solid rgba(120, 200, 255, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.iq-rspot__stats b { display: block; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; } .iq-rspot__stats small { color: #7c8499; font-weight: 600; font-size: 9.5px; }
.iq-rspot__btns { position: absolute; left: 18px; bottom: 18px; right: 96px; display: flex; flex-wrap: wrap; gap: 8px; }
.iq-rspot__btns button { display: flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 10px; font: inherit; font-weight: 700; font-size: 12px; color: #fff; cursor: pointer;
  background: rgba(9, 11, 18, .7); border: 1px solid rgba(120, 200, 255, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.iq-rspot__btns button .bi { color: var(--ac, #22e0e0); }
.iq-rspot__btns button:first-child, .iq-rspot__btns button.is-run { background: linear-gradient(140deg, color-mix(in srgb, var(--ac, #ff8a3d) 70%, #fff), var(--ac, #ff8a3d)); border-color: transparent; color: #1f0d00; box-shadow: 0 8px 20px -8px var(--ac, #ff8a3d); }
.iq-rspot__btns button:first-child .bi, .iq-rspot__btns button.is-run .bi { color: #1f0d00; }
.iq-rspot__btns button.ev .bi { color: #22e0e0; }
.iq-rspot__rail { position: absolute; right: 16px; top: 16px; bottom: 16px; width: 58px; border-radius: 14px; background: rgba(9, 11, 18, .6); border: 1px solid rgba(120, 200, 255, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  overflow: hidden; display: flex; flex-direction: column; align-items: center; cursor: ns-resize; touch-action: none; }
.iq-rspot__fill { position: absolute; left: 4px; right: 4px; bottom: 4px; max-height: calc(100% - 8px); border-radius: 11px; background: linear-gradient(0deg, #ff8a3d, #ffd23f); box-shadow: 0 0 24px rgba(255, 180, 60, .5); }
.iq-rspot__fill::after { content: ""; position: absolute; left: 14px; right: 14px; top: 7px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .8); }
.iq-rspot__pct { position: relative; margin-top: 10px; font-weight: 800; font-size: 12px; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.iq-rspot__bulb { position: relative; margin-top: auto; margin-bottom: 8px; width: 42px; height: 42px; border: 0; border-radius: 12px; background: rgba(0, 0, 0, .18); color: #2a1400; font-size: 18px; cursor: pointer; display: grid; place-items: center; }
.iq-rspot.is-dark .iq-rspot__bulb { color: #fff; background: rgba(255, 255, 255, .08); }
