/* Sync Home: the customer app, after Apple Home on a plain ground. Uses the Sync look's type, forms and switch; adds
   its own tiles, category buttons, grouped lists, controls card, sidebar (wide screens) and tab bar (phones). */
/* colours: every token comes from the theme (sync-themes.css, docs/sync-themes.md) */
[hidden] { display: none !important }
/* colour on state (calm, never a red fill): one tone per kind, solid when on or active, a soft tint for readings */
.t-amber { --t: var(--amber) } .t-green { --t: var(--green) } .t-blue { --t: var(--blue) } .t-orange { --t: var(--orange) } .t-teal { --t: var(--teal) }
.t-indigo { --t: var(--indigo) } .t-cyan { --t: var(--cyan) } .t-red { --t: var(--red) }
[class*=" t-"] > .ti, .ci[class*=" t-"] { background: color-mix(in srgb, var(--t) 17%, transparent); color: var(--t) }
.solid > .ti { background: var(--t) !important; color: var(--on-tone) !important; box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--t) 70%, transparent) }
.tile.solid:not(.on) .ts { color: var(--t); font-weight: 600 }
.tile.on.solid .ts { color: color-mix(in srgb, var(--t) 62%, var(--on-tile)); font-weight: 600 }
.cbig[class*=" t-"] .bigctl.on i, .cbig[class*=" t-"] .bigctl.slider i { background: linear-gradient(180deg, color-mix(in srgb, var(--t) 80%, var(--top)), var(--t)) }
.cbig[class*=" t-"] .bigctl.on svg { color: var(--on-tone) }
.cbig[class*=" t-"] .modes button[aria-pressed=true] { background: var(--t); color: var(--on-tone) }
.cbig[class*=" t-"] .readout b { color: var(--t) }
body { background: var(--hb); color: var(--hi) }
body::before, body::after { display: none }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
a { color: inherit }

/* sidebar (iPad / Mac) and tab bar (phone) */
.hs { position: fixed; top: 12px; left: 12px; bottom: 12px; width: 248px; z-index: 20; display: flex; flex-direction: column; gap: 2px; padding: 16px 10px 12px; overflow-y: auto; scrollbar-width: none;
  border-radius: 24px; background: var(--side-bg); box-shadow: 0 0 0 1px var(--hline); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px) }
.hbrand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 14px; font-size: 17px; font-weight: 700; min-width: 0 } .hbrand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.hbrand .sync-mark { width: 26px; height: 26px; background: var(--hi) } .hbrand img.wl { width: 26px; height: 26px; border-radius: var(--r-sm); object-fit: contain; flex: none }
.signin .powered { margin: -6px 0 4px }
.hs .nav { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 10px; border-radius: 12px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--hi) }
.hs .nav span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap } .hs .nav svg { width: 20px; height: 20px; flex: none; color: var(--hi2) }
.hs .nav:hover { background: var(--toff) } .hs .nav[aria-current] { background: var(--toff); font-weight: 650 }
.hs .sec { font-size: 12.5px; font-weight: 600; color: var(--hi3); padding: 16px 10px 4px } .grow1 { flex: 1; min-height: 12px }
main#main { margin-left: 272px; padding: 30px 36px 64px; max-width: 1320px }
.tabbar { display: none }
@media (max-width: 900px) {
  .hs { display: none } main#main { margin-left: 0; padding: max(14px, env(safe-area-inset-top)) 16px 120px }
  .tabbar { display: flex; position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); gap: 2px; padding: 6px; border-radius: 999px;
    background: var(--side-bg); box-shadow: var(--sh-float); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px) }
  .tabbar a { display: grid; justify-items: center; gap: 2px; min-width: 72px; min-height: 52px; padding: 6px 10px 4px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--hi3); text-decoration: none }
  .tabbar a svg { width: 24px; height: 24px } .tabbar a[aria-current] { color: var(--hi); background: var(--toff) }
}

/* page head */
.top { margin-bottom: 18px } .tl { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.top h1 { font-size: 34px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; margin: 0; min-width: 0; overflow-wrap: anywhere }
.up { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin-left: -8px; padding-right: 8px; font-size: 17px; color: var(--hi2); text-decoration: none } .up svg { width: 22px; height: 22px }
.tbtn { display: flex; gap: 8px; flex: none }
.round { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--toff); color: var(--hi); cursor: pointer; flex: none }
.round svg { width: 20px; height: 20px } @media (pointer: coarse) { .round { width: 44px; height: 44px } }
.none { padding: 30px 2px; color: var(--hi3); font-size: 15px }

/* category buttons */
.cats { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 26px; padding: 2px 16px }
.cats::-webkit-scrollbar { display: none }
.cat { flex: none; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 18px 8px 9px; border-radius: 16px; background: var(--grp); box-shadow: 0 0 0 1px var(--hline); text-decoration: none; color: var(--hi) }
.cat:active { transform: scale(.97) }
.ci { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--toff); color: var(--hi) } .ci svg { width: 21px; height: 21px }
.cm { display: grid; line-height: 1.25 } .cm b { font-size: 15px; font-weight: 650 } .cm small { font-size: 13.5px; color: var(--hi3) } .cm small.warn { color: var(--amber-txt); font-weight: 600 }

/* rooms and accessory tiles */
.room { margin-bottom: 28px }
.room h2 { margin: 0 2px 12px; font-size: 21px; font-weight: 700; letter-spacing: -.015em }
.room h2 a { display: inline-flex; align-items: center; gap: 2px; text-decoration: none; min-height: 32px } .room h2 svg { width: 20px; height: 20px; color: var(--hi3); stroke-width: 2.4 }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px }
.tile { position: relative; display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 0 12px 0 11px; border-radius: 16px; background: var(--toff); color: var(--hi); transition: background .2s, transform .12s, box-shadow .2s }
.tile:active { transform: scale(.975) }
.ti { width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--icoff); color: var(--hi2); transition: background .2s, color .2s }
button.ti { cursor: pointer } .ti svg { width: 22px; height: 22px }
.tx { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 10px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer }
.tn { font-size: 14.5px; font-weight: 600; line-height: 1.22; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }
.ts { font-size: 13px; color: var(--hi3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums }
.tile.on { background: var(--ton); color: var(--on-tile); box-shadow: var(--tonshadow) } .tile.on .ts { color: var(--on-tile2) }
.tile.on .ti { background: color-mix(in srgb, var(--on-tile) 8%, transparent); color: var(--on-tile) } .tile.on.light .ti { background: var(--amber-bg); color: var(--amber-ic) }
.tile.alert .ti { background: var(--amber-bg); color: var(--amber-ic) } .tile.alert .ts, .tile.alert.solid:not(.on) .ts { color: var(--amber-txt); font-weight: 600 }
.tile.off { opacity: .5 }

/* cameras: a row to swipe on phones, a grid on wide screens */
.cams { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-bottom: 28px }
.cams.big { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)) }
.cam { position: relative; display: block; padding: 0; border: 0; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 16px; cursor: pointer; background: var(--toff) }
.cam img { width: 100%; height: 100%; object-fit: cover; display: block }
.cn { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 20px); padding: 5px 12px; border-radius: 999px;
  background: var(--media-scrim); color: var(--media-ink); font-size: 13.5px; font-weight: 600; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px) }
.cn em, .vt em { font-style: normal; font-weight: 600; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--media-warn-bg); color: var(--media-warn) }
.room .cams { margin-bottom: 0 }
@media (max-width: 700px) {
  .cams:not(.big) { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px }
  .cams:not(.big) .cam { scroll-snap-align: center } .cams.big { grid-template-columns: 1fr }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px } .tile { min-height: 68px; padding: 0 10px 0 9px; gap: 9px } .ti { width: 38px; height: 38px } .tn { font-size: 13.5px; -webkit-line-clamp: 3 }
  .top h1 { font-size: 32px }
}

/* the controls card */
body.viewing { overflow: hidden }
/* behind a sheet: the page dimmed to the theme's ground, a light blur and its colour drained, so nothing glows through */
:root { --veil: color-mix(in srgb, var(--ground, #0b0b0c) 62%, transparent) } html[data-lite] { --veil: color-mix(in srgb, var(--ground, #0b0b0c) 74%, transparent) }
.scrim { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: var(--veil); -webkit-backdrop-filter: blur(3px) saturate(35%); backdrop-filter: blur(3px) saturate(35%); animation: fade .18s }
.sheet { width: min(440px, 100%); max-height: min(90vh, 820px); overflow-y: auto; padding: 18px 16px 18px; border-radius: 28px; background: var(--sheet-bg); color: var(--hi); box-shadow: var(--sh-sheet); animation: rise .22s var(--ease) }
.ch { display: flex; align-items: center; gap: 12px; padding: 0 2px 4px } .cht { flex: 1; min-width: 0 } .ch h2 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.2 } .ch small { font-size: 15px; color: var(--hi3) }
.ch .ti { width: 46px; height: 46px }
.cbig { display: grid; place-items: center; padding: 26px 0 30px }
.bigctl { position: relative; width: 136px; height: 300px; border: 0; border-radius: 42px; overflow: hidden; background: var(--toff); color: var(--hi3); cursor: pointer; touch-action: none; outline-offset: 4px }
.bigctl i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--f, 0%); background: var(--fill); transition: height .18s var(--ease) }
.bigctl.slider i { transition: none } .bigctl svg { position: absolute; left: 50%; bottom: 24px; width: 34px; height: 34px; transform: translateX(-50%); stroke-width: 2 }
.bigctl.on svg { color: var(--fill-ink) } .bigctl { background: var(--icoff) }
.thermo { display: grid; gap: 26px; justify-items: center; width: 100% }
.modes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px }
.modes button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--toff); color: var(--hi); font: inherit; font-weight: 550; cursor: pointer }
.modes button[aria-pressed=true] { background: var(--hi); color: var(--hb) }
.readout { display: flex; gap: 40px; justify-content: center; text-align: center } .readout b { display: block; font-size: 52px; font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums } .readout small { color: var(--hi3); font-size: 14px }
.more { margin-top: 4px } .more summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; color: var(--hi3); font-size: 14px; font-weight: 600; cursor: pointer }
.more summary::-webkit-details-marker { display: none } .more summary svg { width: 16px; height: 16px; transform: rotate(90deg); transition: transform .2s; stroke-width: 2.4 } .more[open] summary svg { transform: rotate(-90deg) }
.cfoot { text-align: center; color: var(--hi3); font-size: 13px; padding-top: 4px }
@keyframes fade { from { opacity: 0 } } @keyframes rise { from { transform: translateY(18px) scale(.98); opacity: 0 } }

/* grouped lists (as in iOS Settings) */
.group { background: var(--grp); border-radius: 16px; overflow: hidden; margin: 0 0 18px; box-shadow: 0 0 0 1px var(--hline) }
.sheet .group { margin-bottom: 8px }
.grow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 14px 8px 16px; border: 0; border-top: 1px solid var(--hline); background: none; color: var(--hi); font: inherit; text-align: left; text-decoration: none; cursor: pointer }
.grow:first-child { border-top: 0 } .grow.static { cursor: default } button.grow:hover, a.grow:hover { background: var(--toff) }
.gm { flex: 1; min-width: 0; display: grid } .gm b { font-size: 15.5px; font-weight: 500 } .gm small { font-size: 13px; color: var(--hi3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.grow > svg { width: 18px; height: 18px; color: var(--hi3); flex: none; stroke-width: 2.2 } .v { font-weight: 500; color: var(--hi2); white-space: nowrap; font-variant-numeric: tabular-nums }
.grow.out b { color: var(--soft-red) } .gempty { padding: 16px; color: var(--hi3) }
.av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--toff); font-size: 13px; font-weight: 650 }
.gh { margin: 24px 16px 7px; font-size: 13px; font-weight: 500; color: var(--hi3) }
.gform { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px } .gform input { flex: 1; min-width: 0; height: 44px; padding: 0 10px; border: 0; background: none; color: var(--hi); font: inherit; font-size: 16px; outline: none }
.seg.wide { display: flex; width: 100%; margin-bottom: 18px; background: var(--toff) } .seg.wide button { flex: 1; min-height: 40px; font-size: 14px }
.sel { height: 40px; padding: 0 10px; border-radius: 12px; border: 0; background: var(--toff); color: var(--hi); font: inherit; max-width: 52vw }
.range { width: min(200px, 44vw); height: 40px; accent-color: var(--hi) }
.numin { width: min(160px, 44vw); min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--toff); color: var(--hi); font: inherit; font-size: 17px; font-weight: 650; text-align: right }
.step { display: flex; align-items: center; gap: 6px } .step b { min-width: 58px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600 }
.step button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--toff); color: var(--hi); display: grid; place-items: center; cursor: pointer }

/* forms (people, password, sign-in) */
.card { background: var(--grp); border-radius: 16px; box-shadow: 0 0 0 1px var(--hline) }
.form.card { padding: 18px; margin-bottom: 18px } .pform { max-width: 780px }
.field input, .field select { background: var(--toff); border-color: transparent; color: var(--hi); height: 44px }
.field .seg { justify-self: start; margin-top: 4px; background: var(--toff) } .field .seg button { min-height: 38px; padding: 0 18px; font-size: 14px }
.picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px }
.pick { position: relative } .pick input { position: absolute; opacity: 0; pointer-events: none }
.pick span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--toff); color: var(--hi); font-size: 14px; font-weight: 500; cursor: pointer }
.pick input:checked + span { background: var(--hi); color: var(--hb) } .pick input:focus-visible + span { outline: 2px solid var(--hi); outline-offset: 2px }
.pgroup { margin-top: 8px } .pgroup small { color: var(--hi3) }
.acts { display: flex; flex-wrap: wrap; gap: 8px } .acts .btn { height: 44px } .btn.danger { color: var(--soft-red) } .muted { color: var(--hi3) }
.signin { min-height: 100vh; display: grid; place-items: center; padding: 20px } .signin .card { width: min(380px, 100%); padding: 28px; display: grid; gap: 14px } .signin h1 { font-size: 26px } .signin .btn { justify-content: center; height: 46px }

/* camera viewer */
.viewer { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: var(--media-bg); color: var(--media-ink) }
.vbar { display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 14px 10px }
.viewer .round { background: rgba(255, 255, 255, .12); color: var(--media-ink) }
.vt { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px } .vt b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.viewer .seg { background: rgba(255, 255, 255, .1) } .viewer .seg button { color: var(--media-ink2); min-height: 36px }
.viewer .seg button[aria-pressed=true] { background: rgba(255, 255, 255, .22); color: var(--media-ink); box-shadow: none }
.vstage { flex: 1; min-height: 0; display: grid; place-items: center } .vstage video, .vstage img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain }
.vstage video { opacity: 0; transition: opacity .2s } .vstage video.live { opacity: 1 } .vstage img.gone { visibility: hidden }
.vctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 0 auto max(14px, env(safe-area-inset-bottom)); padding: 8px; border-radius: 28px; max-width: calc(100% - 24px); background: var(--media-panel) }
.vb { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .12); color: var(--media-ink); font: inherit; font-weight: 600; cursor: pointer }
.vb svg { width: 19px; height: 19px } .vb[aria-pressed=true] { background: var(--media-ink); color: var(--media-bg) }
.vc { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--media-ink2); padding-left: 6px }
.viewer .sel { background: rgba(255, 255, 255, .12); color: var(--media-ink) } .viewer .sel option { color: initial }
.verr { text-align: center; font-size: 14px; color: var(--media-alert); padding: 0 16px 10px } .verr:empty { display: none } .verr a { color: var(--media-ink) }

/* toast and connection */
.toast { position: fixed; z-index: 80; left: 50%; top: max(14px, env(safe-area-inset-top)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 24px);
  padding: 8px 8px 8px 18px; border-radius: 24px; background: var(--sheet-bg); color: var(--hi); box-shadow: var(--sh-sheet); animation: rise .2s var(--ease) }
.toast span { font-weight: 600 } .toast .btn { height: 40px }
.lostbar { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: 96px; padding: 8px 16px; border-radius: 999px; background: var(--grp); color: var(--hi2); font-size: 13px; font-weight: 600; box-shadow: 0 0 0 1px var(--hline) }
@media (min-width: 901px) { .lostbar { bottom: 20px } }

@media (max-width: 700px) {
  .scrim { place-items: end stretch; padding: 0 } .sheet { width: 100%; max-height: 92vh; border-radius: 28px 30px 0 0; padding-bottom: max(18px, env(safe-area-inset-bottom)) }
  .two { grid-template-columns: 1fr }
}
@media (prefers-reduced-motion: reduce) { .tile, .scrim, .sheet, .toast, .bigctl i { animation: none; transition: none } }
.more .gm small { font-weight: 400 }
.bigpick .sel { height: 52px; min-width: 240px; font-size: 17px; border-radius: 12px }
.vset { position: absolute; right: 14px; top: calc(max(10px, env(safe-area-inset-top)) + 58px); z-index: 2; display: grid; gap: 10px; max-width: min(360px, calc(100% - 28px)); padding: 14px 16px;
  border-radius: 20px; background: var(--media-panel); color: var(--media-ink) } .vset .pick span { background: rgba(255, 255, 255, .12); color: var(--media-ink) } .vset .pick input:checked + span { background: var(--media-ink); color: var(--media-bg) }

/* energy: power flow, today, graphs */
.ewrap { display: grid; grid-template-columns: minmax(380px, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 8px } .epf { height: 222px }
.ecard { background: var(--grp); border-radius: 24px; box-shadow: 0 0 0 1px var(--hline); padding: 14px }
.ecol .eh2:first-child { margin-top: 0 }
.eh2 { margin: 26px 2px 12px; font-size: 21px; font-weight: 700; letter-spacing: -.015em }
button.etile { width: 100%; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer } button.etile:disabled { cursor: default } button.etile:not(:disabled):hover { background: var(--toff) }
.emore { margin-top: 18px } .emore summary { justify-content: flex-start; font-size: 17px; color: var(--hi); font-weight: 700 } .emore .tiles { margin-top: 10px }
.etiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px }
.etile { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 10px 14px; border-radius: 16px; background: var(--grp); box-shadow: 0 0 0 1px var(--hline) }
.etile .ti { background: color-mix(in srgb, var(--t) 17%, transparent); color: var(--t) } .etile span:last-child { display: grid; min-width: 0 }
.etile b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums } .etile small { font-size: 12.5px; color: var(--hi3) }
.egraph { padding: 14px 14px 10px }
@media (max-width: 760px) { .ewrap { grid-template-columns: 1fr } }

.etile b { white-space: nowrap }
@media (max-width: 520px) { .etiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px } .etile { gap: 9px; padding: 10px 11px } .etile .ti { width: 34px; height: 34px } .etile b { font-size: 17px } }
.estat i { width: 8px; height: 8px; border-radius: 50%; background: var(--t, var(--hi3)) }
@media (max-width: 600px) { .flow .fval { font-size: 27px } .flow .flab { font-size: 17px } }

/* sidebar folded to an icon rail; full screen for wall tablets */
.hfold { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 12px; background: none; color: var(--hi3); display: grid; place-items: center; cursor: pointer; flex: none }
.hfold:hover { background: var(--toff) } .hfold svg { width: 18px; height: 18px }
.hs button.nav { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer }
body.hs-min .hs { width: 68px; padding: 14px 8px 12px; align-items: center } body.hs-min .hs .nav { justify-content: center; padding: 0; width: 46px }
body.hs-min .hs .nav span, body.hs-min .hbrand > span, body.hs-min .hs .sec { display: none } body.hs-min .hbrand { flex-direction: column; padding: 2px 0 10px; gap: 6px }
body.hs-min .hfold { margin: 0 } body.hs-min .hfold svg { transform: scaleX(-1) } body.hs-min main#main { margin-left: 92px; max-width: none }
.kexit { display: none } body.kiosk .hs, body.kiosk .tabbar { display: none } body.kiosk main#main { margin-left: 0; max-width: none; padding: 24px 28px }
body.kiosk .kexit { display: grid; position: fixed; z-index: 50; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; place-items: center; background: var(--side-bg); color: var(--hi2); box-shadow: 0 0 0 1px var(--hline); opacity: .35; cursor: pointer }
body.kiosk .kexit:hover { opacity: 1 } .kexit svg { width: 18px; height: 18px }
@media (min-width: 1500px) { main#main { max-width: 1480px } }

/* dashboards: views as tabs, sections packed like masonry into page columns, cards on a 12-column grid per column */
.dtabs { display: flex; gap: 2px; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin: -6px 0 22px; padding: 3px; border-radius: 999px; background: var(--toff) }
.dtabs::-webkit-scrollbar { display: none }
.dtabs a, .dtab-x { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 15px 0 12px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--hi2); text-decoration: none; cursor: pointer; transition: background .2s, color .2s }
.dtabs a svg, .dtab-x svg { width: 18px; height: 18px } .dtab-x { padding: 0 11px }
.dtabs a[aria-current] { background: var(--top); color: var(--hi); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 4px 12px -6px rgba(0, 0, 0, .2) }
.dtop { display: flex; align-items: center; gap: 10px; margin: 0 0 4px } .dtop .dtabs { margin: 0; flex: 0 1 auto } .dtop .round { margin-left: auto }
.dtop:has(.dtabs) + .dpage, .dtabs.bare + .dpage { margin-top: 18px }
/* dashboards (docs/sync-home-design.md): sections are full-width bands, each a bento grid of modules (2 grid columns
   per module, so a row can be shared out in half modules); every card one family: a calm opaque sheet, a header row
   (icon disc, title, one small action), one big value, one supporting visual. Colour only as a small accent. */
:root { --row: 94px; --gap: 14px }
@media (max-width: 599px) { :root { --row: 92px; --gap: 12px } }
.t-ink { --t: var(--hi) } .t-amber { --at: var(--a-amber) } .t-green { --at: var(--a-green) } .t-blue { --at: var(--a-blue) } .t-red { --at: var(--a-red) } .t-ink { --at: var(--hi) }
.a-amber { color: var(--a-amber) } .a-green { color: var(--a-green) } .a-blue { color: var(--a-blue) } .a-red { color: var(--a-red) !important }
.dpage { display: flex; flex-direction: column; gap: 28px }
.dsec { display: flex; flex-direction: column; gap: 12px; min-width: 0 }
.dsec-t { margin: 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -.016em; line-height: 1.2 }
.dgrid { display: grid; grid-template-columns: repeat(calc(var(--cols, 6) * 2), minmax(0, 1fr)); grid-auto-rows: var(--row); gap: var(--gap) }
.dcard { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; border-radius: 24px; background: var(--card); box-shadow: var(--cardsh); overflow: hidden; container-type: size; transition: transform .15s var(--ease) }
.dcard > :first-child:not(.dce) { flex: 1; min-height: 0 }
.dcard:has(> [role=button]:active, > .tl2 > .tx2:active) { transform: scale(.985) }
/* what a tap opens inside a card: a pointer, and a light press */
.dcard [data-open], .dcard [data-go], .dcard [data-cam] { cursor: pointer; -webkit-tap-highlight-color: transparent }
.dcard :not(.dcard) > [role=button]:is([data-open], [data-go]):active, .dcard button.ct:active, .nt-i:active, .mr .mr-t:active, .na:active { opacity: .62 }
.al2 .ch2[data-go] .chev, .tu .ct { color: var(--hi3) } .al2 .ch2[data-go] .chev svg { width: 15px; height: 15px; stroke-width: 2.4 } .tu button.ct { color: var(--hi2) }
.dcard.flash { box-shadow: var(--cardsh), 0 0 0 2px color-mix(in srgb, var(--hi) 55%, transparent); transition: box-shadow .3s var(--ease) }
.dc-welcome, .dc-categories, .dc-heading { background: none; box-shadow: none; overflow: visible; container-type: normal }
.dc-camera { background: var(--toff) }
/* the parts every card shares */
.ci2 { width: 36px; height: 36px; flex: none; border: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--toff); color: var(--hi2); transition: background .2s, color .2s }
.ci2 svg { width: 19px; height: 19px } button.ci2 { cursor: pointer; position: relative } button.ci2::after { content: ''; position: absolute; inset: -4px; border-radius: 50% } /* 44 px to touch */ button.ci2:active { transform: scale(.94) }
.ci2[class*=" t-"] { background: color-mix(in srgb, var(--t) 16%, transparent); color: var(--t) }
.ch2 { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 36px }
.ct { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--hi2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; background: none; padding: 0; text-align: left; font-family: inherit; cursor: inherit }
button.ct { cursor: pointer; min-height: 36px }
.bv { display: block; font-size: 28px; font-weight: 650; letter-spacing: -.025em; line-height: 1.05; color: var(--hi); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.bv small { margin-left: 3px; font-size: .55em; font-weight: 600; letter-spacing: 0; color: var(--hi3) }
.bv.zero { color: var(--hi3) }
.pill2 { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--toff); color: var(--hi2); font-size: 12.5px; font-weight: 650 }
.pill2[class*=" t-"] { background: color-mix(in srgb, var(--t) 14%, transparent); color: var(--at) }
.chev { flex: none; color: var(--hi3); display: grid } .chev svg { width: 16px; height: 16px; stroke-width: 2.4 }
.tx2 { flex: 1; min-width: 0; display: grid; gap: 1px; align-content: end; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer }
.tx2 b { font-size: 15px; font-weight: 600; line-height: 1.22; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.tx2 small { font-size: 13px; color: var(--hi3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums }
/* tile: small, the icon above and the name and state at the foot; wide, a row */
.tl2 { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; height: 100%; padding: 13px 14px 12px }
.tl2.on .tx2 small { color: var(--at); font-weight: 600 } .tl2.off { opacity: .55 }
.w2 .tl2, .w4 .tl2 { flex-direction: row; align-items: center; gap: 12px } .w2 .tl2 .tx2, .w4 .tl2 .tx2 { align-content: center }
.h2 .tl2 .tx2 b, .h3 .tl2 .tx2 b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }
/* light group (and a dimmable light drawn wide): the fill is the brightness, a drag across sets it */
.lg2 { position: relative; display: flex; align-items: center; gap: 12px; height: 100%; padding: 0 16px 0 14px; overflow: hidden }
.lg2.dims { touch-action: pan-y; cursor: ew-resize } .lg2 > :not(.lg-f) { position: relative }
.lg-f { position: absolute; left: 0; top: 0; bottom: 0; width: var(--f, 0%); background: color-mix(in srgb, var(--amber) 14%, transparent); transition: width .25s var(--ease) } .lg2.sliding .lg-f { transition: none }
.lg2:not(.on) .lg-f { width: 0 } .lg2.on .tx2 small { color: var(--a-amber); font-weight: 600 }
.lg2 .tx2 { align-content: center } .lg-p { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums } .lg-p small { font-size: 13px; color: var(--hi3); margin-left: 1px }
.w1 .lg2 { flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 13px 14px 12px; gap: 6px } .w1 .lg2 .tx2 { align-self: stretch; align-content: end } .w1 .lg-p { display: none }
/* air conditioner: wide, a row with − set +; large, the dial */
.cl2 { display: flex; align-items: center; gap: 12px; height: 100%; padding: 0 12px 0 14px } .cl2 .tx2 { align-content: center } .cl2.idle .cl-set { color: var(--hi3) }
.cl-q { display: flex; align-items: center; gap: 2px; flex: none } .cl-set { min-width: 50px; text-align: center; font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.cl-q .cl-b { width: 40px; height: 40px }
@container (max-width: 300px) { .cl2 .tx2 small { display: none } .cl-set { min-width: 40px; font-size: 19px } .cl-q .cl-b { width: 36px; height: 36px } }
.dc-climate .cl { padding: 12px 14px 10px; gap: 0 } .dc-climate .cl-m { display: none } .dc-climate .cl-d { min-height: 0 } .dc-climate .cl-dial { flex-basis: 170px }
.dc-climate .cl-n b { font-size: 36px } .dc-climate .cl-b { width: 42px; height: 42px }
@container (max-height: 180px) { .dc-climate .cl-n small { display: none } }
/* statistic: name, the figure, the last day */
.st2 { display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: 12px 14px; cursor: pointer; min-width: 0; position: relative }
.st2 .ci2 { width: 30px; height: 30px } .st2 .ci2 svg { width: 16px; height: 16px } .st2 .ch2 { min-height: 30px; gap: 8px }
.sp2 { display: block; height: 38px; margin: 0 -14px -12px } .sp2 svg { display: block; width: 100%; height: 100% }
.sp-l { fill: none; stroke: var(--t, var(--hi2)); stroke-width: 1.8; vector-effect: non-scaling-stroke } .sp-a { fill: color-mix(in srgb, var(--t, var(--hi2)) 8%, transparent); stroke: none }
.w2.h1 .st2 { display: grid; grid-template-columns: minmax(0, 1fr) 46%; grid-template-rows: auto 1fr; column-gap: 12px; align-items: end }
.w2.h1 .st2 .ch2 { grid-column: 1 } .w2.h1 .st2 .bv { grid-column: 1; grid-row: 2 } .w2.h1 .sp2 { grid-column: 2; grid-row: 1 / 3; height: calc(100% - 10px); align-self: end; margin: 0 -14px -12px 0 }
.h2 .st2 .bv, .h3 .st2 .bv { font-size: 40px; font-weight: 600; margin-top: auto; padding-bottom: 6px } .h2 .sp2, .h3 .sp2 { height: 64px }
/* lists: summary (doors, windows, motion) and status lists */
.ls2 { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 12px 14px; cursor: pointer; min-width: 0 }
.ls2 .bv { font-size: 34px } .ls2 .bv small { font-size: 15px; color: var(--hi2); margin-left: 6px }
.lsm { display: grid; gap: 8px } .lbar { display: flex; gap: 3px; height: 6px } .lbar i { flex: 1; border-radius: 4px; background: var(--toff) } .lbar i[class*="t-"] { background: var(--t) }
.lmore { color: var(--hi3); font-weight: 600; padding-left: 16px }
.lrows { flex: 1; min-height: 0; display: grid; grid-auto-rows: min-content; gap: 6px 18px; overflow: hidden; align-content: start }
.lr { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 13.5px; line-height: 1.25 }
.ldot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--hi3) 55%, transparent) } .lr[class*=" t-"] .ldot { background: var(--t); box-shadow: 0 0 0 3px color-mix(in srgb, var(--t) 18%, transparent) }
.ln { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500 } .ls { flex: none; color: var(--hi3); font-variant-numeric: tabular-nums } .lr[class*=" t-"] .ls { color: var(--at); font-weight: 600 }
.w4 .ls2:not(.one) .lrows { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.h1 .ls2 { flex-direction: row; align-items: center; gap: 14px } .h1 .ls2 .ch2 { flex: none; max-width: 40% } .h1 .ls2 .bv { flex: none } .h1 .ls2 .lrows { align-self: stretch; align-content: center }
.dc-chips.h1 .ls2 .ch2 { display: none }
.ls2.one { flex-direction: row; align-items: center; gap: 12px; padding: 0 14px } .ls2.one .lsm { flex: none; gap: 1px; max-width: 40% } .lsm .bv { font-size: 26px } .lsm .bv small { font-size: 13.5px }
.lsm > small { font-size: 12.5px; font-weight: 600; color: var(--hi3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap } .ls2.one .lrows { align-self: center; max-height: 72px; gap: 4px }
.w4.h2 .ls2 { display: grid; grid-template-columns: 36% 1fr; grid-template-rows: auto 1fr; gap: 6px 22px } .w4.h2 .ls2 .ch2 { grid-column: 1 } .w4.h2 .ls2 .lsm { grid-column: 1; align-self: end; gap: 12px } .w4.h2 .ls2 .bv { font-size: 44px } .w4.h2 .lrows { grid-column: 2; grid-row: 1 / 3; align-content: center }
/* tank: the vessel and its level */
.tk { display: flex; gap: 16px; height: 100%; padding: 14px; cursor: pointer }
.tk-v { position: relative; flex: none; width: 54px; border-radius: 12px 14px 16px 16px; background: var(--toff); overflow: hidden; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hi) 6%, transparent) }

.tk-m { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between } .tk-m .bv { font-size: 34px } .tk-l { font-size: 13px; color: var(--hi3); font-variant-numeric: tabular-nums }
.tk-m .ch2 { min-height: 0 } .h1 .tk { padding: 12px 14px; gap: 14px } .h1 .tk-v { width: 30px; border-radius: 12px } .h1 .tk-m { justify-content: center; gap: 2px } .h1 .tk-m .bv { font-size: 24px } .h1 .tk-l { display: none }
/* scenes: round buttons with their names */
.scn2 { display: flex; align-items: center; justify-content: space-around; gap: 4px; height: 100%; padding: 6px 8px; overflow-x: auto; scrollbar-width: none }
.sb2 { flex: 1 1 0; min-width: 64px; max-width: 120px; display: grid; justify-items: center; gap: 5px; padding: 4px 2px; border: 0; background: none; color: var(--hi); font: inherit; cursor: pointer }
.sb2 .ci2 { width: 44px; height: 44px } .sb2 .ci2 svg { width: 21px; height: 21px } .sb2 span:last-child { font-size: 12.5px; font-weight: 600; color: var(--hi2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.sb2:active .ci2 { transform: scale(.92) } .sb2.done .ci2 { background: color-mix(in srgb, var(--amber) 22%, transparent); color: var(--amber) }
/* gate: a second tap opens it; the one opened shows how far, with a bar */
.gt { position: relative; display: flex; align-items: center; gap: 14px; height: 100%; padding: 0 16px 0 14px }
.gt-b { flex: none; width: 56px; height: 56px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--toff); color: var(--hi); cursor: pointer; transition: background .2s, box-shadow .2s, transform .12s }
.gt-b svg { width: 26px; height: 26px } .gt-b:active { transform: scale(.94) }
.gt-m { flex: 1; min-width: 0; display: grid; gap: 1px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer }
.gt-m b { font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap } .gt-m small { font-size: 13.5px; color: var(--hi3) }
.gt.arm .gt-b { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); box-shadow: inset 0 0 0 2px var(--amber) } .gt.arm .gt-m small { color: var(--a-amber); font-weight: 600 }
.gt.busy .gt-b { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green) }
.gt.open .gt-b { background: color-mix(in srgb, var(--amber) 18%, transparent); color: var(--amber) } .gt.open .gt-m small { color: var(--a-amber); font-weight: 650 }
.gt-w { position: absolute; left: 16px; right: 16px; bottom: 12px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--amber) 18%, transparent); overflow: hidden }
.gt-w i { display: block; height: 100%; border-radius: inherit; background: var(--amber) }
.h1 .gt.open { padding-bottom: 8px }
.h2 .gt { flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 16px 16px 22px } .h2 .gt-b { width: 72px; height: 72px } .h2 .gt-b svg { width: 32px; height: 32px }
.h2 .gt-m { align-self: stretch } .h2 .gt-m b { font-size: 20px } .h2 .gt-m small { font-size: 15px }
/* room */
.rm2 { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; height: 100%; padding: 12px 12px 12px 14px; cursor: pointer }
.rm2 .ct { color: var(--hi); font-size: 15px } .rm-l { width: 40px; height: 40px }
.pdot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--hi3); opacity: .5 } .rm-p.a-green { font-weight: 600 } .rm-p.a-green .pdot { background: var(--green); opacity: 1 }
.rm-f { display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: 13px; color: var(--hi3); font-variant-numeric: tabular-nums } .rm-f span { display: inline-flex; align-items: center; gap: 3px } .rm-f svg { width: 13px; height: 13px }
.rm-f .a-amber { font-weight: 600 } .h2 .rm2 .bv { font-size: 40px; font-weight: 600 }
/* alarm: the state with its colour on the figure, then the modes */
.al2 { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; height: 100%; padding: 12px 14px 14px }
.al-s { display: grid; gap: 2px } .al2 .bv { font-size: 32px } .al2[class*=" t-"] .bv { color: var(--at) } .al-s small { font-size: 13px; color: var(--hi3) }
.al2 .al-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); gap: 3px; padding: 3px; border-radius: 16px; background: var(--toff) }
.al2 .al-b { min-height: 40px; border: 0; border-radius: 12px; background: none; color: var(--hi2); font: inherit; font-size: 14px; font-weight: 550; cursor: pointer }
.al2 .al-b[aria-pressed=true] { background: var(--top); color: var(--hi); font-weight: 650; box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 3px 8px -4px rgba(0, 0, 0, .2) }
.al2 .al-b { padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .h2 .al-s small, .h3 .al-s small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
/* one row high: the state and what is open on the left, the buttons side by side on the right (never wrapped); narrow, the buttons under it */
.h1 .al2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr; align-items: center; gap: 12px; padding: 0 12px 0 16px } .h1 .al2 .ch2 { display: none } .h1 .al2 .bv { font-size: 22px }
.h1 .al-s { min-width: 0 } .h1 .al-s small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.h1 .al2 .al-btns { display: flex; padding: 2px; border-radius: 12px } .h1 .al2 .al-b { flex: none; min-height: 44px; padding: 0 14px; overflow: visible }
.h1.w4 .al2 { grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px } .h1.w4 .al2 .ch2 { display: flex }
@container (max-width: 340px) and (min-height: 90px) {
  .h1 .al2 { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; gap: 6px; padding: 8px 10px 8px 14px }
  .h1 .al-s { display: flex; align-items: baseline; gap: 0 } .h1 .al2 .bv { flex: none; font-size: 20px } .h1 .al-s small { min-width: 0 } .h1 .al-s small::before { content: '·'; margin: 0 6px }
  .h1 .al2 .al-b { flex: 1 1 0; min-width: 0; padding: 0 8px; overflow: hidden }
}
@container (max-width: 340px) and (max-height: 89.9px) { .h1 .al2 { gap: 8px; padding: 0 8px 0 12px } .h1 .al2 .bv { font-size: 17px } .h1 .al-s small { display: none } .h1 .al2 .al-b { padding: 0 9px; font-size: 13.5px } }
/* power flow */
.pf { position: relative; height: 100%; padding: 12px 14px }
.pf-l { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none } /* the lines never take a tap meant for a part (a phone lays the parts out under them) */
.pf-t { fill: none; stroke: color-mix(in srgb, var(--hi3) 30%, transparent); stroke-width: 2; vector-effect: non-scaling-stroke } .pf-t.on { stroke: color-mix(in srgb, var(--c) 32%, transparent); stroke-width: 2.5 }
.pf-d { fill: none; stroke: var(--c); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 5 95; animation: pfd var(--d) linear infinite }
@keyframes pfd { from { stroke-dashoffset: 100 } to { stroke-dashoffset: 0 } }
.pf-n { position: absolute; display: flex; align-items: center; gap: 10px; width: 25%; max-width: 230px; min-width: 0; padding: 0; border: 0; background: none; color: var(--hi); font: inherit; text-align: left; cursor: pointer }
.pf-n:disabled { cursor: default } .pf-s { left: 14px; top: 12px } .pf-g { left: 14px; bottom: 12px } .pf-h { right: 14px; top: 12px; flex-direction: row-reverse; text-align: right } .pf-b { right: 14px; bottom: 12px; flex-direction: row-reverse; text-align: right }
.pf-m { min-width: 0; display: grid; gap: 0 } .pf-m small { font-size: 12.5px; font-weight: 600; color: var(--hi3) } .pf-m b { font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap }
.pf-m em { font-style: normal; font-size: 12.5px; color: var(--hi3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .pf-n.on .pf-m em { color: var(--at) }
.pf-bar { display: block; height: 4px; margin-top: 5px; border-radius: 2px; background: var(--toff); overflow: hidden } .pf-bar i { display: block; height: 100%; margin-left: auto; border-radius: inherit; background: var(--green) }
.pf-hub { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--hi2); box-shadow: 0 0 0 1px color-mix(in srgb, var(--hi) 10%, transparent), 0 6px 16px -8px rgba(0, 0, 0, .3); cursor: pointer }
.pf-hub svg { width: 21px; height: 21px } .pf-hub i { position: absolute; right: 1px; top: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--hi3); box-shadow: 0 0 0 2px var(--card) } .pf-hub[class*=" t-"] i { background: var(--t) }
.pf-off { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); font-size: 12.5px; font-weight: 600; color: var(--hi3) }
/* the card itself narrow (a phone, or beside a sidebar): a cross, Solar above the inverter, Grid left, Home right, Battery
   below, straight lines between (dash.js lines reads display: grid as this form) */
@container (max-width: 560px) {
  .pf { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); grid-template-rows: auto 1fr auto; align-items: center; column-gap: 30px; row-gap: 12px; padding: 12px 14px }
  .pf-n, .pf-s, .pf-g, .pf-h, .pf-b { position: static; width: auto; max-width: 100%; gap: 8px }
  .pf-n .ci2 { display: none }
  .pf-s { grid-area: 1 / 1 / 2 / 4; justify-self: center } .pf-b { grid-area: 3 / 1 / 4 / 4; justify-self: center; flex-direction: row; text-align: left }
  .pf-g { grid-area: 2 / 1; justify-self: start } .pf-h { grid-area: 2 / 3; justify-self: end }
  .pf-hub { position: relative; left: auto; top: auto; margin: 0; grid-area: 2 / 2; width: 44px; height: 44px }
  .pf-s .pf-m, .pf-b .pf-m { grid-template-columns: auto auto; grid-template-areas: "v l" "v f" "r r"; column-gap: 9px; align-items: center }
  .pf-s .pf-m b, .pf-b .pf-m b { grid-area: v } .pf-s .pf-m small, .pf-b .pf-m small { grid-area: l; align-self: end } .pf-s .pf-m em, .pf-b .pf-m em { grid-area: f; align-self: start } .pf-b .pf-bar { grid-area: r; margin-top: 4px } .pf-b .pf-bar i { margin-left: 0 }
  .pf-m b { font-size: 21px } .pf-m small { font-size: 12px; line-height: 1.25 } .pf-m em { font-size: 11.5px; line-height: 1.25 }
  .pf-off { left: auto; right: 14px; top: 12px; bottom: auto; transform: none }
}
@container (max-width: 560px) and (min-height: 230px) { .pf { row-gap: 18px; padding: 16px } :is(.pf-s, .pf-b) .ci2 { display: grid } .pf-m b { font-size: 24px } .pf-hub { width: 48px; height: 48px } }
@container (min-width: 900px) { .pf-n { width: 22% } .pf-m b { font-size: 28px } }
@media (prefers-reduced-motion: reduce) { .pf-d { animation: none; stroke-dasharray: none; opacity: .6 } }
/* graph */
.gr { display: flex; flex-direction: column; height: 100%; padding: 12px 14px 10px; gap: 6px; min-width: 0 }
.gr-p { display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--toff); flex: none }
.gr-p button { min-height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--hi3); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer }
.gr-p button[aria-pressed=true] { background: var(--top); color: var(--hi); box-shadow: 0 1px 2px rgba(0, 0, 0, .1) }
.dc-graph .gr-c.chart { flex: 1; min-height: 60px; height: auto }
.gr-k { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12px; color: var(--hi2) } .gr-k span { display: inline-flex; align-items: center; gap: 6px } .gr-k i { width: 8px; height: 8px; border-radius: 50% }
.k-ink { background: var(--hi) } .k-amber { background: var(--amber) } .k-blue { background: var(--blue) } .k-green { background: var(--green) } .k-grey { background: var(--hi3) }
.w2 .gr-p button { padding: 0 7px }
/* gauge, clock, big control, room devices, heading */
.wgauge { display: flex; flex-direction: column; height: 100%; padding: 12px 14px; cursor: pointer; text-align: center } .wgauge svg { flex: 1; min-height: 0; width: 100%; margin-top: 4px }
.wgauge .gtrack { fill: none; stroke: var(--toff); stroke-width: 9; stroke-linecap: round } .wgauge .gval { fill: none; stroke: var(--t, var(--hi)); stroke-width: 9; stroke-linecap: round } .wgauge .bv { margin-top: -18px }
.w1.h1 .wgauge svg { display: none } .w1.h1 .wgauge { text-align: left; justify-content: space-between } .w1.h1 .wgauge .bv { margin: 0 }
.wclock { display: grid; place-content: center; height: 100%; text-align: center } .wclock b { font-size: 40px; font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums } .wclock small { color: var(--hi3) }
.h1 .wclock b { font-size: 30px }
.wctl { display: flex; flex-direction: column; height: 100%; padding: 12px 14px } .wctl .cbig { flex: 1; padding: 8px 0 0; min-height: 0 } .wctl .bigctl { height: min(100%, 240px); width: 104px; border-radius: 28px } .wctl .readout b { font-size: 40px }
.st-o { width: 36px; height: 36px; border: 0; border-radius: 50%; display: grid; place-items: center; background: none; color: var(--hi3); cursor: pointer } .st-o svg { width: 16px; height: 16px; stroke-width: 2.4 }
.arl { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); grid-auto-rows: 64px; gap: 2px 8px; padding: 6px; overflow-y: auto } .arl .tl2 { padding: 8px }
.dhead { margin: 0 4px; align-self: end; font-size: 15px; font-weight: 650; color: var(--hi2) }
.dc-categories .cats { margin: 0 -16px; padding: 2px 16px; height: 100%; align-items: stretch }
.dc-camera .cam { flex: 1; height: 100%; aspect-ratio: auto; border-radius: 0; background: none }
/* the welcome: the time and greeting on the ground, then the figures that matter now, a row of small cards */
.wel { display: grid; grid-template-rows: 1fr var(--row); gap: var(--gap); height: 100%; min-width: 0 }
.wel-t { display: flex; align-items: center; gap: 18px; min-width: 0; padding: 0 4px }
.wel-t > b { font-size: 60px; font-weight: 250; letter-spacing: -.045em; line-height: .95; font-variant-numeric: tabular-nums }
.wel-t span { display: grid; gap: 2px; min-width: 0 } .wel-t strong { font-size: 24px; font-weight: 700; letter-spacing: -.02em } .wel-t small { font-size: 15px; color: var(--hi3) }
.wel-s { min-width: 0; display: flex; gap: var(--gap); overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px } .wel-s::-webkit-scrollbar { display: none }
.kpi { flex: 1 0 140px; max-width: 260px; display: flex; flex-direction: column; justify-content: space-between; padding: 12px 14px; border-radius: 24px; background: var(--card); box-shadow: var(--cardsh); color: var(--hi); text-decoration: none }
button.kpi { border: 0; font: inherit; text-align: left; cursor: pointer; transition: transform .12s var(--ease) } button.kpi:active { transform: scale(.97) }
.kpi:hover { text-decoration: none } .kpi .ci2 { width: 30px; height: 30px } .kpi .ci2 svg { width: 16px; height: 16px }
.kpi > span:last-child { display: grid; min-width: 0 } .kpi b { font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.kpi small { font-size: 12.5px; color: var(--hi3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .kpi[class*=" t-"] b { color: var(--at) } .kpi.zero b { color: var(--hi3) } .kpi.word b { font-size: 18px; letter-spacing: -.01em }
@media (max-width: 599px) { .wel-t { gap: 14px } .wel-t > b { font-size: 46px } .wel-t strong { font-size: 18px } .wel-t small { font-size: 13.5px } .kpi { flex-basis: 112px; padding: 10px 12px } .kpi b { font-size: 19px } }
.dmiss { flex: 1; display: grid; place-content: center; justify-items: center; gap: 4px; min-height: 0; border-radius: 24px; border: 1.5px dashed color-mix(in srgb, var(--hi3) 40%, transparent); color: var(--hi3); font-size: 13px; font-weight: 600 } .dmiss svg { width: 22px; height: 22px }
/* pop-up */
.dpop { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 16px; background: var(--veil); -webkit-backdrop-filter: blur(3px) saturate(35%); backdrop-filter: blur(3px) saturate(35%); animation: fade .18s }
.dpop-s { width: min(520px, 100%); background: var(--hb) } .dpop-s .dgrid { margin-top: 14px }
@media (max-width: 700px) { .dpop { place-items: end stretch; padding: 0 } .dpop-s { width: 100%; max-height: 92vh; border-radius: 28px 30px 0 0; padding-bottom: max(18px, env(safe-area-inset-bottom)) } }
/* editing: sections in dashed frames, the free cells of a grid as dashed slots, each card with its tools */
.dpage.editing .dsec { padding: 8px 10px 12px; border-radius: 24px; border: 1.5px dashed color-mix(in srgb, var(--hi3) 38%, transparent); background: color-mix(in srgb, var(--hi) 2%, transparent) }
.dsec.pop { border-style: solid !important; border-color: color-mix(in srgb, var(--hi3) 55%, transparent) !important }
.dsec-e { display: flex; align-items: center; gap: 6px; min-height: 46px; cursor: grab; touch-action: none; user-select: none }
.dsec-e b { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap } .dsec-e .dsp { flex: 1 }
.dsec-e em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--hi3); padding: 3px 8px; border-radius: 8px; background: var(--toff) }
.dsec-e button { width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--toff); color: var(--hi); cursor: pointer } .dsec-e button svg { width: 17px; height: 17px }
.grip { width: 14px; height: 22px; flex: none; background: radial-gradient(circle, var(--hi3) 1.6px, transparent 1.8px) 0 0 / 7px 7px; opacity: .7 }
.dhole { border-radius: 24px; border: 1.5px dashed color-mix(in srgb, var(--hi3) 30%, transparent) }
.dce { position: absolute; inset: 0; z-index: 3; border-radius: 24px; border: 1.5px dashed color-mix(in srgb, var(--hi3) 50%, transparent); background: color-mix(in srgb, var(--hb) 35%, transparent); cursor: grab; touch-action: none }
.dce-t { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px } .dce-t button { width: 32px; height: 32px; border: 0; border-radius: 12px; display: grid; place-items: center; background: var(--card); color: var(--hi); box-shadow: 0 0 0 1px var(--hline), 0 2px 6px -2px rgba(0, 0, 0, .2); cursor: pointer }
.dce-t button svg { width: 15px; height: 15px }
.dce-n { position: absolute; left: 8px; bottom: 7px; padding: 2px 7px; border-radius: 8px; background: var(--card); box-shadow: 0 0 0 1px var(--hline); font-size: 10.5px; font-weight: 700; color: var(--hi3); letter-spacing: .04em; text-transform: uppercase; pointer-events: none }
.dce-z { position: absolute; right: 0; bottom: 0; width: 28px; height: 28px; cursor: nwse-resize; touch-action: none; border-radius: 0 0 20px 0;
  background: linear-gradient(135deg, transparent 52%, var(--hi3) 52%, var(--hi3) 59%, transparent 59%, transparent 70%, var(--hi3) 70%, var(--hi3) 77%, transparent 77%) }
.dcard.dim > :not(.dce), .dsec.dim .dgrid { opacity: .42 }
.dcard.dragging, .dsec.dragging { opacity: .3 } .dcard.sizing .dce { border-style: solid; border-color: var(--hi) }
.dghost { position: fixed; z-index: 90; margin: 0; pointer-events: none; opacity: .94; border-radius: 24px; box-shadow: 0 26px 60px -18px rgba(0, 0, 0, .5); transition: none }
.dghost .dce { border-style: solid; border-color: var(--hi) }
.dadd { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1.5px dashed color-mix(in srgb, var(--hi3) 40%, transparent); border-radius: 999px; background: none; color: var(--hi2); font: inherit; font-weight: 600; cursor: pointer } .dadd svg { width: 18px; height: 18px }
.dnewsec { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border: 1.5px dashed color-mix(in srgb, var(--hi3) 40%, transparent); border-radius: 24px; background: none; color: var(--hi2); font: inherit; font-weight: 600; cursor: pointer } .dnewsec svg { width: 20px; height: 20px }
/* air conditioner: a dial */
.cl { display: flex; flex-direction: column; height: 100%; padding: 10px 12px 12px }
.cl-h { display: flex; align-items: center; gap: 10px } .cl-h .tx { padding: 2px 0 }
.cl-h.solid .ti { background: var(--t); color: var(--on-tone) }
.cl-d { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 4px }
.cl-dial { position: relative; flex: 0 1 196px; min-width: 0; max-height: 100%; aspect-ratio: 200 / 172 }
.cl-dial svg { display: block; width: 100%; height: 100% } .cl-tr { fill: none; stroke: var(--toff); stroke-width: 13; stroke-linecap: round }
.cl-v { fill: none; stroke: var(--t); stroke-width: 13; stroke-linecap: round; filter: drop-shadow(0 3px 6px color-mix(in srgb, var(--t) 35%, transparent)) }
.cl-k { fill: var(--grp); stroke: var(--t); stroke-width: 3.5 } .cl.idle .cl-k { stroke: var(--hi3) }
.cl-n { position: absolute; inset: 0 0 8% 0; display: grid; place-content: center; justify-items: center; gap: 2px; text-align: center }
.cl-n b { font-size: 44px; font-weight: 300; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums } .cl.idle .cl-n b { color: var(--hi3) }
.cl-n small { display: inline-flex; align-items: center; gap: 3px; font-size: 13.5px; color: var(--hi3); font-variant-numeric: tabular-nums } .cl-n small svg { width: 14px; height: 14px }
.cl-b { flex: none; width: 46px; height: 46px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--toff); color: var(--hi); cursor: pointer } .cl-b svg { width: 22px; height: 22px }
.cl-b:active { background: var(--icoff) }
.cl-m { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; padding-top: 6px }
.cl-m button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--toff); color: var(--hi2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer }
.cl-m button[aria-pressed=true] { background: var(--t); color: var(--on-tone) } .cl.idle .cl-m button[aria-pressed=true] { background: var(--hi); color: var(--hb) }
/* the dial in the controls card */
.cbig .cl-big { width: 100%; height: auto; padding: 0; gap: 18px } .cl-big .cl-dial { flex-basis: 250px } .cl-big .cl-n b { font-size: 58px }
.cl-big .cl-b { width: 52px; height: 52px } .cl-big .cl-m { gap: 8px } .cl-big .cl-m button { min-height: 44px; padding: 0 18px }
.dbar { position: sticky; top: 12px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; padding: 10px 12px; border-radius: 20px; background: var(--side-bg); box-shadow: var(--sh-float); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px) }
.dbar b { font-size: 16px; padding-left: 6px } .dsp { flex: 1 } .dbar .btn { height: 40px } .dbar .btn svg, .tbtn .btn svg { width: 16px; height: 16px }
.tbtn .btn { height: 40px }
.dsheet { width: min(640px, 100%) } .wcat { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; padding: 6px 2px 4px }
.wcat-i { display: grid; align-content: start; gap: 8px; padding: 8px 8px 10px; border: 0; border-radius: 16px; background: var(--grp); box-shadow: 0 0 0 1px var(--hline); color: var(--hi); font: inherit; text-align: left; cursor: pointer }
.wcat-i:hover { box-shadow: 0 0 0 2px var(--hi3) } .wcat-i b { font-size: 14px; padding: 0 4px }
.pv { position: relative; display: block; overflow: hidden; border-radius: 12px; background: var(--hb); pointer-events: none }
.pv-in { position: absolute; left: 8px; top: 8px; transform-origin: 0 0; display: flex }
.szpv { display: grid; place-items: center; padding: 4px 0 12px } .szpv .pv { width: 100%; max-width: 332px }
.szs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px }
.szs button { display: grid; justify-items: center; gap: 4px; min-width: 88px; min-height: 44px; padding: 10px 12px 8px; border: 0; border-radius: 16px; background: var(--toff); color: var(--hi); font: inherit; cursor: pointer }
.szs button[aria-checked=true] { background: var(--hi); color: var(--hb) } .szs button span { font-size: 13.5px; font-weight: 650 } .szs button small { font-size: 11.5px; color: inherit; opacity: .7 }
.szg { display: grid; grid-template-columns: repeat(var(--w), 7px); grid-auto-rows: 5px; gap: 2px } .szg i { border-radius: 1.5px; background: currentColor; opacity: .55 }
.wsearch { width: 100%; height: 44px; margin: 0 0 8px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--toff); color: var(--hi); font: inherit; outline: none }
.wlist { max-height: 52vh; overflow-y: auto } .wlist .grow[hidden] { display: none } .wtick { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--hline); flex: none }
.wlist [aria-pressed=true] .wtick { position: relative; background: var(--hi); box-shadow: none }
.wlist [aria-pressed=true] .wtick::after { content: ""; position: absolute; inset: 3px; background: var(--hb); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / contain no-repeat }
.wlist [aria-pressed=true] { background: var(--toff) }
.gpad { display: grid; gap: 12px; padding: 14px } .icons2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin-bottom: 14px }
.icons2 button { height: 44px; border: 0; border-radius: 12px; background: var(--toff); color: var(--hi2); display: grid; place-items: center; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600 }
.icons2 button svg { width: 20px; height: 20px } .icons2 button[aria-pressed=true] { background: var(--hi); color: var(--hb) }
.eform .acts, .dsheet .acts { margin-top: 12px } .dnew { max-width: 560px }
.pickbtn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; margin-top: 4px; padding: 0 12px 0 14px; border: 0; border-radius: 12px; background: var(--toff); color: var(--hi); font: inherit; font-weight: 500; text-align: left; cursor: pointer }
.pickbtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap } .pickbtn svg { width: 16px; height: 16px; flex: none; color: var(--hi3); stroke-width: 2.4 }
.dsheet .field select { width: 100% } .dsheet .elist { margin: 6px 0 0 } .elist .grow { flex-wrap: wrap; gap: 8px }
.elist select, .cond select, .cond input, .elist input.bt { height: 40px; padding: 0 10px; border: 0; border-radius: 12px; background: var(--toff); color: var(--hi); font: inherit; font-size: 14px; max-width: 100% } .elist input.bt { width: 72px }
.cond .pickbtn { width: auto; flex: 1 1 160px; margin: 0; min-height: 40px } .cond .picks { margin: 0; flex: 1 }
.round.sm { width: 34px; height: 34px } .round.sm svg { width: 16px; height: 16px }
.bcfg { margin: 8px 0; background: var(--grp); border-radius: 16px; box-shadow: 0 0 0 1px var(--hline) } .bcfg .btn.sm { justify-self: start }
.tones { display: flex; gap: 8px; margin-top: 6px } .tones button { width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; background: none; cursor: pointer }
.tones i { width: 28px; height: 28px; border-radius: 50%; background: var(--t) } .tones button[aria-pressed=true] { box-shadow: inset 0 0 0 2px var(--hi) }
#dpick { z-index: 65 }
body.kiosk .dtop, body.kiosk .dtabs { margin-top: 0 }
/* phones and tablets: every button at least 44 px */
@media (pointer: coarse) { .step button { width: 44px; height: 44px } .viewer .seg button, .field .seg button, .seg.wide button { min-height: 44px } }
.grow .mi { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--icoff); color: var(--hi2); flex: none } .grow .mi svg { width: 18px; height: 18px }
/* the alarm card at the top of Home and its code keypad: calm, the state colour on a dot and the text, never a red fill */
.alarm { background: var(--grp); box-shadow: 0 0 0 1px var(--hline); border-radius: 24px; padding: 14px 14px 12px; margin: 0 0 22px; display: grid; gap: 12px }
.al-head { display: flex; align-items: center; gap: 10px; min-width: 0 } .al-head b { font-size: 17px; font-weight: 600 }
.al-st { margin-left: auto; font-size: 15px; color: var(--hi2); text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums }
.al-st.warn { color: var(--soft-red); font-weight: 600 } .al-st.on { color: var(--hi) }
.al-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--icoff) }
.al-dot.on { background: var(--green) } .al-dot.wait { background: transparent; box-shadow: inset 0 0 0 2px var(--green) } .al-dot.warn { background: var(--soft-red) }
.al-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 3px; padding: 3px; border-radius: 16px; background: var(--toff) }
.al-b { min-height: 44px; border: 0; border-radius: 12px; background: none; color: var(--hi2); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer }
.al-b[aria-pressed=true] { background: var(--grp); color: var(--hi); font-weight: 600; box-shadow: var(--tonshadow) }
.akp { width: min(380px, 100%); display: grid; gap: 10px }
.akp-h { display: flex; align-items: center; justify-content: space-between } .akp-h b { font-size: 20px; font-weight: 600 }
.akp-dots { min-height: 28px; display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--hi3); font-size: 15px }
.akp-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--hi) }
.akp-err { min-height: 20px; text-align: center; color: var(--soft-red); font-size: 14px }
.akp-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px; justify-items: center; padding: 4px 8px 6px }
.akp-keys button { width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--toff); color: var(--hi); cursor: pointer; display: grid; place-content: center; font: inherit; touch-action: manipulation }
.akp-keys button b { font-size: 30px; font-weight: 400; line-height: 1 } .akp-keys button small { font-size: 10px; letter-spacing: .14em; color: var(--hi2); min-height: 12px }
.akp-keys button:active { background: var(--icoff) } .akp-keys .akp-fn { background: none } .akp-keys .akp-fn svg { width: 26px; height: 26px }
.akp-keys .akp-ok { font-size: 18px; font-weight: 600 }
@media (max-width: 700px) { .akp { width: 100% } }
@media (max-width: 380px) { .akp-keys button { width: 68px; height: 68px } }
body.kiosk .dtop { padding-right: 50px } body.kiosk .top .tl { padding-right: 50px }

@media (max-width: 600px) { .dtabs { margin-left: -2px } .dbar .btn span { display: none } .dsec-t { font-size: 19px } }
@media (pointer: coarse) { .dtabs a, .dtab-x, .gr-p button { min-height: 44px } .dce-t button { width: 40px; height: 40px } .round.sm { width: 44px; height: 44px } .cl-q .cl-b { width: 44px; height: 44px } .al2 .al-b { min-height: 44px } }
/* 0.28 craft: a soft lit ground; cards with a lit top edge and depth; an active card tinted like glass in its accent
   (amber light or open gate, green running or armed, blue cooling or water, soft red low or alarm), never a solid fill */
body { background: radial-gradient(1200px 700px at 18% -10%, color-mix(in srgb, var(--card) 55%, transparent), transparent 70%), var(--hb); background-attachment: fixed }
:root[data-theme=midnight][data-mode=dark] body { background: var(--hb) }
.dcard:not(.dc-welcome):not(.dc-categories):not(.dc-heading):not(.dc-camera):not(.dc-notices) { background: linear-gradient(180deg, color-mix(in srgb, var(--card) 82%, var(--top)) 0%, var(--card) 46%) }
.act[class*=" t-"], .act[class^="t-"] { background: radial-gradient(130% 120% at 0% 0%, color-mix(in srgb, var(--t) 12%, transparent), color-mix(in srgb, var(--t) 3%, transparent) 55%, transparent 80%) }
.dcard:has(> .act[class*=" t-"]) { box-shadow: var(--cardsh), inset 0 0 0 1px color-mix(in srgb, var(--t, transparent) 0%, transparent) }
.dcard:has(> .act.t-amber) { box-shadow: var(--cardsh), inset 0 0 0 1px color-mix(in srgb, var(--amber) 22%, transparent) }
.dcard:has(> .act.t-green) { box-shadow: var(--cardsh), inset 0 0 0 1px color-mix(in srgb, var(--green) 22%, transparent) }
.dcard:has(> .act.t-blue) { box-shadow: var(--cardsh), inset 0 0 0 1px color-mix(in srgb, var(--blue) 22%, transparent) }
.dcard:has(> .act.t-red) { box-shadow: var(--cardsh), inset 0 0 0 1px color-mix(in srgb, var(--red) 26%, transparent) }
.dcard:has(> .tl2.on.t-amber), .dcard:has(> .tl2.on.t-green), .dcard:has(> .tl2.on.t-blue), .dcard:has(> .tl2.on.t-red) { box-shadow: var(--cardsh) }
/* icon discs: a soft gradient, brighter when active */
.ci2 { background: linear-gradient(160deg, color-mix(in srgb, var(--hi) 5%, transparent), color-mix(in srgb, var(--hi) 10%, transparent)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5) }
:root[data-mode=dark] .ci2 { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08) }
.ci2[class*=" t-"] { background: linear-gradient(150deg, color-mix(in srgb, var(--t) 30%, transparent), color-mix(in srgb, var(--t) 12%, transparent)); color: var(--t) }
.ci2.t-ink { background: linear-gradient(150deg, color-mix(in srgb, var(--hi) 16%, transparent), color-mix(in srgb, var(--hi) 7%, transparent)) }
.gt.open .gt-b, .gt.arm .gt-b { background: linear-gradient(150deg, color-mix(in srgb, var(--amber) 34%, transparent), color-mix(in srgb, var(--amber) 14%, transparent)) }
.gt-b { background: linear-gradient(160deg, color-mix(in srgb, var(--hi) 5%, transparent), color-mix(in srgb, var(--hi) 11%, transparent)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 6px 14px -10px rgba(0, 0, 0, .35) }
/* statistics: the figure with its day's trend; a percentage as a ring */
.st-v { display: grid; gap: 2px; min-width: 0 } .trend { font-size: 12.5px; font-weight: 600; color: var(--hi3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .trend:empty { display: none }
.h1 .st2 .trend { display: none } .w2.h1 .st2 .st-v { grid-column: 1; grid-row: 2 }
.h2 .st2 .st-v .bv, .h3 .st2 .st-v .bv { font-size: 40px; font-weight: 600; margin: 0; padding: 0 }
.h2 .st2 .st-v { margin-top: auto; padding-bottom: 6px }
.sp-e { fill: var(--t, var(--hi2)); stroke: var(--card); stroke-width: 1.5; vector-effect: non-scaling-stroke }
.st2.ring .rg { position: absolute; right: 14px; top: 50%; width: min(46%, 120px); aspect-ratio: 1; transform: translateY(-38%) rotate(-90deg) }
.rg-t { fill: none; stroke: var(--toff); stroke-width: 9 } .rg-v { fill: none; stroke: var(--t, var(--hi)); stroke-width: 9; stroke-linecap: round; filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--t, var(--hi)) 35%, transparent)) }
/* camera: the picture edge to edge, its name and a live dot on glass, the doorbell's actions */
.cm2 { position: relative; height: 100%; overflow: hidden; background: var(--toff) }
.cm2 img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block }
.cm2::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .42)); pointer-events: none }
.cm-o { position: absolute; inset: 0; z-index: 1; border: 0; padding: 0; background: none; cursor: pointer }
.cm-n { position: absolute; z-index: 2; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); padding: 6px 12px 6px 10px; border-radius: 999px; background: var(--media-scrim); color: var(--media-ink); font-size: 13.5px; font-weight: 600; -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); pointer-events: none }
.cm-live { width: 7px; height: 7px; border-radius: 50%; background: var(--media-live); box-shadow: 0 0 0 3px rgba(62, 196, 99, .25) }
.cm-n em { font-style: normal; font-weight: 600; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--media-warn-bg); color: var(--media-warn) }
.cm-a { position: absolute; z-index: 2; right: 12px; bottom: 12px; display: flex; gap: 8px }
.cm-b { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 13px; border: 0; border-radius: 999px; background: var(--media-scrim); color: var(--media-ink); font: inherit; font-size: 14.5px; font-weight: 650; cursor: pointer; -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18) }
.cm-b svg { width: 19px; height: 19px } .cm-b.arm { box-shadow: inset 0 0 0 2px var(--media-arm); color: var(--media-warn) } .cm-b.busy { background: rgba(62, 196, 99, .45) }
.h4 .cm-n { left: 16px; bottom: 16px; font-size: 15px } .h4 .cm-a { right: 16px; bottom: 16px }
/* the welcome in one row: time and greeting, then the figures beside them */
.wel.one { display: flex; align-items: stretch; gap: var(--gap) } .wel.one .wel-t { flex: none } .wel.one .wel-s { flex: 1; margin: 0; padding: 0 } .wel.one .wel-s > :first-child { margin-left: auto }
.wel.one .wel-t > b { font-size: 52px } .wel.one .wel-t strong { font-size: 20px } .wel.one .kpi { flex: 0 1 150px; min-width: 108px; padding: 11px 12px } .wel.one .kpi b { font-size: 20px } .wel.one .kpi.word b { font-size: 16px }
@media (max-width: 899px) { .wel.one { display: grid; grid-template-rows: auto 1fr } .wel.one .wel-t > b { font-size: 34px } .wel.one .wel-s > :first-child { margin-left: 0 } }
.kpi:not(.zero)[class*=" t-"] { background: radial-gradient(130% 120% at 0% 0%, color-mix(in srgb, var(--t) 14%, transparent), transparent 70%), var(--card); box-shadow: var(--cardsh), inset 0 0 0 1px color-mix(in srgb, var(--t) 18%, transparent) }
.gt-w.shut { background: var(--toff) } .h2 .gt-w { height: 6px; border-radius: 4px; left: 16px; right: 16px; bottom: 16px }
/* tank: two states for a float switch (filled to its mark, or the bottom band), a fill only for a measured level */
.tk-v .tk-f { position: absolute; left: 0; right: 0; bottom: 0; transition: height .5s var(--ease) }
.tk.high .tk-f { height: 78%; background: color-mix(in srgb, var(--blue) 26%, transparent); border-top: 2px solid color-mix(in srgb, var(--blue) 70%, transparent) }
.tk.low .tk-f { height: 14%; background: color-mix(in srgb, var(--red) 18%, transparent); border-top: 2px solid color-mix(in srgb, var(--red) 55%, transparent) }
.tk.lvl .tk-f { background: color-mix(in srgb, var(--blue) 26%, transparent); border-top: 2px solid color-mix(in srgb, var(--blue) 70%, transparent) }
.tk-mk { position: absolute; left: 6px; right: 6px; top: 22%; height: 0; border-top: 1.5px dashed color-mix(in srgb, var(--hi3) 60%, transparent); z-index: 1 }
.tk.high .bv { color: var(--a-blue) } .tk-l:empty { display: none } .h1 .tk-l { display: block; font-size: 12px }
/* the front gate: the doorbell live, the gates built in */
/* the card is the theme's own card surface (only the picture is dark); the gate buttons are the theme's tiles, in its text and status tones */
.dc-door { container-type: size }
.dr { position: relative; height: 100%; display: flex; flex-direction: column; color: var(--hi) }
.dr-v { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--media-bg) }
.dr-v img, .dr-v video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block }
.dr-v video { opacity: 0; transition: opacity .3s } .dr-v video.on { opacity: 1 }
.dr-v::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .28), transparent 22%, transparent 55%, rgba(0, 0, 0, .55)); pointer-events: none }
.dr .cm-n { top: 14px; bottom: auto; left: 14px; font-size: 15px }
.dr-t { position: absolute; z-index: 2; right: 14px; top: 14px; display: flex; gap: 8px } .cm-b.ic { width: 44px; padding: 0; justify-content: center }
/* the gates sit beside the picture (side) or under it (below), never over it; the picture is whole, in its own shape */
.dr-v img, .dr-v video { object-fit: contain }
.dr-ctl { position: relative; z-index: 2; display: flex; gap: 10px; padding: 12px }
.dr-ctl:empty { display: none }
.dr.gl-side { flex-direction: row } .gl-side .dr-v { flex: 0 1 auto; height: 100%; aspect-ratio: var(--ar, 16 / 9) }
.gl-side .dr-ctl { order: -1; flex: 1 1 0; min-width: 176px; flex-direction: column; justify-content: center; padding: 14px 12px 14px 14px }
.gl-side .drg { flex: 0 1 132px; min-height: 76px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; padding: 12px 14px 14px }
.gl-below .dr-ctl { flex: none; padding: 10px 12px 12px } .gl-below .drg { flex: 1 1 0 }
.drg { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 16px 8px 10px; border: 0; border-radius: 16px; background: var(--toff); color: var(--hi); font: inherit; text-align: left; cursor: pointer; overflow: hidden; transition: background .2s, transform .12s }
.drg:active { transform: scale(.98) } .drg > svg { flex: none; width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: color-mix(in srgb, var(--hi) 8%, transparent); color: var(--hi) }
.drg span { display: grid; min-width: 0; max-width: 100% } .drg b { font-size: 16.5px; font-weight: 650 } .drg small { font-size: 13px; color: var(--hi3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.drg.arm { background: color-mix(in srgb, var(--warn) 12%, var(--card)); box-shadow: inset 0 0 0 2px var(--amber) } .drg.arm > svg { background: var(--amber); color: var(--on-tone) } .drg.arm small { color: var(--warn); font-weight: 650 }
.drg.busy > svg { background: color-mix(in srgb, var(--green) 30%, transparent) } .drg.open > svg { background: color-mix(in srgb, var(--amber) 30%, transparent) } .drg.open small { color: var(--warn); font-weight: 650 }
.drg-w { position: absolute; left: 10px; right: 10px; bottom: 5px; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--hi) 10%, transparent); overflow: hidden } .drg-w i { display: block; height: 100%; background: var(--amber); border-radius: inherit }
.dr.ring { box-shadow: inset 0 0 0 3px var(--amber) } .dr.ring .cm-n em { background: var(--media-arm); color: var(--media-bg) }
/* where the picture meets the gate buttons it fades into the card, no hard edge or square corner (side: the left edge; below: the bottom) */
/* the picture's dark bed (before the first frame, and round a picture that keeps its own shape) is its own layer, so it fades with it */
.gl-side .dr-v, .gl-below .dr-v { background: transparent }
.gl-side .dr-v::before, .gl-below .dr-v::before { content: ""; position: absolute; inset: 0; background: var(--media-bg); pointer-events: none }
.gl-side .dr-v :is(img, video), .gl-side .dr-v::after, .gl-side .dr-v::before { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 84px); mask-image: linear-gradient(90deg, transparent 0, #000 84px) }
.gl-below .dr-v :is(img, video), .gl-below .dr-v::after, .gl-below .dr-v::before { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 56px), transparent) }
/* narrow (a phone): the picture on top, the gates under it */
@container (max-width: 520px) {
  .dr.gl-side { flex-direction: column } .dr-v, .gl-side .dr-v { flex: none; width: 100%; height: auto; aspect-ratio: var(--ar, 16 / 10) }
  .dr-ctl, .gl-side .dr-ctl { order: 0; flex: 1; min-width: 0; flex-direction: column; justify-content: center; padding: 10px } .gl-side .drg { flex: 0 1 auto; flex-direction: row; align-items: center; padding: 8px 16px 8px 10px }
  .gl-side .dr-v :is(img, video), .gl-side .dr-v::after, .gl-side .dr-v::before { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 56px), transparent) }
  .drg { min-height: 56px } .dr .cm-n { font-size: 13.5px } .dr-t .cm-b span { display: none } .dr-t .cm-b { width: 44px; padding: 0; justify-content: center }
}
/* full screen: the front gate over everything (a tap on the picture, or a ring) */
.dpop-door { position: relative; width: min(1180px, calc(100vw - 32px)); height: min(calc(100vh - 32px), calc((100vw - 32px) * .62)); animation: rise .22s var(--ease) }
.dpop-door .dcard { width: 100%; height: 100%; border-radius: 28px } .dpop-door .dr-t [data-drfull] { display: none }
.dpop-x { position: absolute; z-index: 5; right: 14px; top: 14px; background: var(--media-scrim); color: var(--media-ink); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px) }
.dpop-door .dr-t { right: 70px } .dpop-door .drg { min-height: 76px } .dpop-door .drg b { font-size: 19px }
@media (max-width: 700px), (orientation: portrait) { .dpop:has(.dpop-door) { place-items: center; padding: 12px } .dpop-door { width: 100%; height: min(calc(100vh - 24px), 760px) } }
@media (max-width: 599px) { .epf { height: 300px } } @media (min-width: 600px) and (max-width: 1300px) { .epf { height: 260px } }
/* add to a number: the balance large and read-only, the amount bought and Add (a second tap confirms) */
.tu { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; height: 100%; padding: 12px 14px 14px; min-width: 0 }
.tu .st-v .bv { font-size: 40px; font-weight: 600 } .tu .trend { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }
.tu-f { display: flex; gap: 8px } .tu-f input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--toff); color: var(--hi); font: inherit; font-size: 16px; font-variant-numeric: tabular-nums; outline: none }
.tu-f input:focus { box-shadow: inset 0 0 0 2px var(--hi3) }
.tu-b { flex: none; min-width: 84px; height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--hi); color: var(--hb); font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; white-space: nowrap }
.tu-b:disabled { opacity: .6 } .tu.arm .tu-b { background: var(--amber); color: var(--on-tone) } .tu.arm .tu-f input { box-shadow: inset 0 0 0 2px var(--amber) }
.w4 .tu { display: grid; grid-template-columns: 1fr minmax(0, 300px); grid-template-rows: auto 1fr; column-gap: 20px } .w4 .tu .ch2 { grid-column: 1 } .w4 .tu .st-v { grid-column: 1; align-self: end } .w4 .tu .tu-f { grid-column: 2; grid-row: 1 / 3; align-self: end }
/* a wall panel (a shared screen read from across the room): figures and names a size up, the welcome as one band */
body.panel { padding: 0 } /* not the console's .panel box (sync-look.css): a wall panel's page starts where every dashboard does */
body.panel .tx2 b, body.panel .gt-m b { font-size: 16.5px } body.panel .tx2 small { font-size: 14px } body.panel .ct { font-size: 14.5px }
body.panel .bv { font-size: 31px } body.panel .wel.one .wel-t > b { font-size: 56px } body.panel .kpi b { font-size: 22px }
body.panel.kiosk main#main { padding: 18px 24px 24px } body.panel .dpage { gap: 22px } body.panel .dtop + .dpage, body.panel .dtabs.bare + .dpage { margin-top: 14px }
.tu-x { flex: none; min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--toff); color: var(--hi2); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer } .tu.fix .tu-x { background: var(--hi); color: var(--hb) }
@media (pointer: coarse) { .tu-x { min-height: 44px; padding: 0 14px } }
.tu.fix .tu-b { background: var(--hi2) } .tu.fix.arm .tu-b { background: var(--amber); color: var(--on-tone) }
/* an air conditioner's effect on the room: the room line, the set temperature stepped, the runs shaded */
.acc { display: grid; gap: 8px; padding-top: 4px } .acc-h { display: flex; justify-content: flex-start } .acc-p { background: var(--toff) } .acc-p button { min-height: 34px; padding: 0 14px; font-size: 13.5px }
.acc-c { display: block; width: 100%; height: auto; overflow: visible } .acc-g { stroke: var(--hline); stroke-width: 1 }
.acc-y, .acc-x { fill: var(--hi3); font-size: 11px; font-family: var(--font); stroke: none } .acc-y { text-anchor: end } .acc-x { text-anchor: middle } .acc-x.end { text-anchor: end }
.acc-run { stroke: none; opacity: .16 } .acc-run.k-blue { fill: var(--blue) } .acc-run.k-orange { fill: var(--orange) } .acc-run.k-grey { fill: var(--hi3) }
.acc-t { fill: none; stroke: var(--hi); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round } .acc-e { fill: var(--hi); stroke: var(--sheet-bg); stroke-width: 2 }
.acc-set { fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-dasharray: 5 4 }
.acc-k { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--hi2) } .acc-k span { display: inline-flex; align-items: center; gap: 6px }
.acc-kt { width: 14px; height: 2.5px; border-radius: 2px; background: var(--hi) } .acc-ks { width: 14px; height: 0; border-top: 2px dashed var(--blue) }
.acc-kr { width: 12px; height: 10px; border-radius: 4px; opacity: .35 } .acc-kr.k-blue { background: var(--blue) } .acc-kr.k-orange { background: var(--orange) } .acc-kr.k-grey { background: var(--hi3) }
.acc-s { display: grid; gap: 2px; padding: 10px 14px; border-radius: 12px; background: var(--grp); box-shadow: 0 0 0 1px var(--hline) } .acc-s b { font-size: 15px } .acc-s span { font-size: 14px; color: var(--hi2) }
.acc-a { margin-top: 2px }
/* media: the TV and the room speakers, one row each: switch or play, name and what plays, volume */
/* media (0.32.2): rows, a room's player, the full player. The play glyph is a media control (solid, no switch disc);
   the volume a thin line on the dashboard and a slider once opened */
.md2 { display: flex; flex-direction: column; justify-content: space-evenly; gap: 2px; height: 100%; padding: 6px 12px }
.md-ps { display: flex; gap: 6px; justify-content: flex-end }
.mr { display: flex; align-items: center; gap: 11px; min-height: 46px; min-width: 0 }
.mart { position: relative; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--toff); color: var(--hi2) }
.mart > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover } .mart > svg { width: 20px; height: 20px }
.mr-a { width: 40px; height: 40px; border-radius: 12px }
.mr.on .mart:not(:has(img)) { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green) }
.mr-t { flex: 1; min-width: 0; display: grid; gap: 1px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer }
.mr-t b { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; line-height: 1.22; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.mr-t small { font-size: 13px; color: var(--hi3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .mr.on .mr-t small { color: var(--hi2) }
.mr.off { opacity: .55 }
.mvl { flex: 0 1 64px; min-width: 36px; height: 4px; border-radius: 2px; background: var(--toff); overflow: hidden } .mvl > i { display: block; height: 100%; border-radius: 2px; background: var(--hi3) }
.mr.on .mvl > i { background: var(--hi2) }
.mr-vs { flex: 0 1 38%; min-width: 80px; height: 44px; margin: 0; accent-color: var(--hi); background: none; cursor: pointer }
.mp-b { flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--hi); cursor: pointer }
.mp-b .gly { width: 24px; height: 24px; fill: currentColor; stroke: none } .mp-b:active:not(:disabled) { transform: scale(.9); opacity: .7 } .mp-b:disabled { opacity: .35 }
.mp-b.pw svg { width: 21px; height: 21px } .mp-b.pw { color: var(--hi3) } .mp-b.pw.on { color: var(--a-amber) }
/* playing: three still bars (no animation: a wall tablet draws nothing while nothing changes) */
.meq { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; flex: none } .meq i { width: 3px; height: 60%; border-radius: 1px; background: var(--a-green) }
.meq i:nth-child(2) { height: 100% } .meq i:nth-child(3) { height: 40% }
@container (max-width: 300px) { .md2 .mvl { display: none } .mr { gap: 9px } }
/* a player card: Small is one row; Medium the picture with the title, then the transport and the volume */
.mpl { height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 8px 12px } .mpl.sm { padding: 0 8px 0 12px }
.mpm { height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; padding: 6px 2px }
.mpm-h { display: flex; gap: 12px; align-items: center; min-width: 0 } .mpm-a { width: 64px; height: 64px; border-radius: 12px } .mpm-a > svg { width: 28px; height: 28px }
.mpm-t { min-width: 0; display: grid; gap: 2px } .mpm-t b { font-size: 16.5px; font-weight: 650; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.mpm-t small { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--hi3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .mpm-t small:first-child { font-weight: 600; color: var(--hi2) }
.mpm-c { display: flex; align-items: center; gap: 2px } .mpm-c .mp-b.big .gly { width: 30px; height: 30px } .mpm-c .mp-b .gly { width: 22px; height: 22px }
.mpm-v { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--hi3); min-width: 0 } .mpm-v svg { width: 17px; height: 17px; flex: none } .mpm-v .mvl { flex: 0 1 110px }
.mpm.off { opacity: .6 }
@container (min-width: 420px) { .mpm-a { width: 92px; height: 92px; border-radius: 16px } .mpm-t b { font-size: 19px } }
@container (max-height: 150px) { .mpm-a { width: 48px; height: 48px; border-radius: 12px } .mpm { gap: 4px } }
.mpl-auto { position: relative; height: 196px } .mpl-o { position: absolute; inset: 0; border: 0; background: none; cursor: pointer; border-radius: inherit }
.mpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; margin: 0 0 14px }
/* the full player (a media device's opened card) */
.mpf { display: grid; gap: 14px; padding: 4px 2px 6px }
.mpf-top { display: flex; gap: 16px; align-items: center; min-width: 0 } .mpf-a { width: 112px; height: 112px; border-radius: 16px } .mpf-a > svg { width: 40px; height: 40px }
.mpf-t { min-width: 0; display: grid; gap: 3px } .mpf-t b { font-size: 21px; font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.mpf-t span { font-size: 15.5px; color: var(--hi2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .mpf-t small { font-size: 13.5px; color: var(--hi3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.mpf-tp { display: flex; align-items: center; justify-content: space-between; max-width: 380px; width: 100%; margin: 0 auto }
.mpf-b { position: relative; width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--hi); cursor: pointer }
.mpf-b svg { width: 22px; height: 22px } .mpf-b .gly { width: 28px; height: 28px; fill: currentColor; stroke: none } .mpf-b:active { transform: scale(.92) }
.mpf-b[aria-pressed=false] { color: var(--hi3) } .mpf-b[aria-pressed=true] { color: var(--a-green); background: color-mix(in srgb, var(--green) 14%, transparent) }
.mpf-b small { position: absolute; right: 9px; bottom: 9px; font-size: 10px; font-weight: 800 }
.mpf-b.play { width: 68px; height: 68px; background: var(--ink-fill, var(--hi)); color: var(--on-ink, var(--card)) } .mpf-b.play .gly { width: 32px; height: 32px }
.mpf-sp { width: 48px }
.mpf-vol { display: flex; align-items: center; gap: 8px } .mpf-ic { width: 48px; display: grid; place-items: center; color: var(--hi3) } .mpf-ic svg { width: 20px; height: 20px }
.mpf-r { flex: 1; min-width: 0; height: 44px; margin: 0; accent-color: var(--hi); background: none } .mpf-n { width: 34px; text-align: right; font-variant-numeric: tabular-nums; color: var(--hi3); font-size: 14px }
.sheet .group .mpf-r { flex: 0 1 55% }
.mpf-ch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px }
.mpf-c { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: var(--toff); color: var(--hi); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer }
.mpf-c svg { width: 18px; height: 18px; color: var(--hi3) } .mpf-c[aria-pressed=true] { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--a-green) } .mpf-c[aria-pressed=true] svg { color: var(--a-green) }
.mpf-c:disabled { opacity: .5 }
@media (max-width: 600px) { .mpf-a { width: 88px; height: 88px } .mpf-t b { font-size: 19px } }
.md-s { flex: none; min-height: 34px; padding: 0 11px; border: 0; border-radius: 999px; background: var(--toff); color: var(--hi2); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; position: relative }
.md-s::after { content: ''; position: absolute; inset: -5px 0 } .md-s[aria-pressed=true] { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--a-green) }
/* notices: only while something needs attention; pale pills with a dot, never a solid fill */
.nt2 { display: flex; align-items: center; gap: 10px; height: 100%; padding: 0 12px; overflow-x: auto; scrollbar-width: none } .nt2::-webkit-scrollbar { display: none }
.nt-i { flex: none; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--t, var(--hi3)) 12%, transparent);
  color: var(--at, var(--hi)); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap }
.nt-i .ldot { background: var(--t); box-shadow: 0 0 0 3px color-mix(in srgb, var(--t) 18%, transparent) }
.al2 .al-b { min-height: 44px }
.dcard.dc-notices { background: none; box-shadow: none; border-radius: 0 } .dc-notices .nt2 { padding: 0 } .dc-notices .nt-i { background: color-mix(in srgb, var(--t, var(--hi3)) 13%, var(--card)); box-shadow: var(--cardsh) }
.dsec:has(> .dgrid > .dc-notices:only-child) > .dgrid { grid-auto-rows: 48px }
body.panel.kiosk main#main { padding: 12px 22px 12px } body.panel.kiosk .dpage { gap: 14px } body.panel.kiosk .dtop + .dpage, body.panel.kiosk .dtabs.bare + .dpage { margin-top: 10px }
body.panel .wel.one .kpi { padding: 9px 12px; gap: 2px } body.panel .wel.one .kpi .ci2 { width: 26px; height: 26px } body.panel .wel.one .kpi .ci2 svg { width: 15px; height: 15px }
body.panel .wel.one .kpi b { font-size: 20px }
/* camera strip: small pictures in a row, swiped on a phone; the card itself is the ground, each picture its own tile */
.dcard.dc-cams { background: none !important; box-shadow: none; border-radius: 0; overflow: visible }
.cs2 { display: flex; gap: var(--gap); height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px } .cs2::-webkit-scrollbar { display: none }
.cs-t { position: relative; flex: 0 0 auto; height: 100%; aspect-ratio: 16 / 10; max-width: 78vw; scroll-snap-align: start; overflow: hidden; border: 0; padding: 0; border-radius: 24px; background: var(--toff); box-shadow: var(--cardsh); cursor: pointer }
.cs-t img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block }
.cs-t::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .42)); pointer-events: none }
.cs-t:active { transform: scale(.98) } .cs-t.ring { box-shadow: var(--cardsh), 0 0 0 2px var(--amber) }
@media (min-width: 900px) { .cs2 { margin: 0; padding: 0 } .cs-t { flex: 1 1 0; min-width: 150px; aspect-ratio: auto } }
.cs-t .cm-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex } .cs-t .cm-n > :not(i) { overflow: hidden; text-overflow: ellipsis }
.cs-t .cm-live { flex: none }
@media (min-width: 900px) { body.panel .wel.one .wel-t span { display: none } body.panel .wel.one .kpi { flex: 1 1 0; min-width: 0; max-width: 200px } }
/* a phone: in the card two gates sit side by side so both fit under the picture; full screen the sheet is as tall as the picture
   and the gates (no dark band round the picture), the gates one under the other */
@container (max-width: 520px) { .dr-ctl:has(> .drg + .drg) { flex-direction: row; align-items: stretch } .dr-ctl:has(> .drg + .drg) .drg { flex: 1 1 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; padding: 8px 12px 8px 8px } .dr-ctl:has(> .drg + .drg) .drg > svg { width: 40px; height: 40px; padding: 9px }
  .dpop-door .dr-v { flex: none; aspect-ratio: var(--ar, 4 / 3) } .dpop-door .dr-ctl, .dpop-door .dr-ctl:has(> .drg + .drg) { flex: none; flex-direction: column; padding-bottom: 14px } .dpop-door .drg, .dpop-door .dr-ctl:has(> .drg + .drg) .drg { flex: none; flex-direction: row; align-items: center; justify-content: center; gap: 12px; min-height: 72px; padding: 8px 16px 8px 10px } .dpop-door .dr-ctl:has(> .drg + .drg) .drg > svg { width: 46px; height: 46px; padding: 11px } }
@media (max-width: 599px) { .dpop-door { height: auto; max-height: calc(100vh - 24px) } .dpop-door .dcard { height: auto } .dpop-door .dc-door { container-type: inline-size } }
@container (max-width: 520px) { .dpop-door .dr-v img, .dpop-door .dr-v video { object-fit: contain } }
/* 0.29 phones first: safe areas (an iPhone app on the home screen), the views as a tab bar at the bottom, pop-ups as sheets */
:root { --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px) }
@media (max-width: 900px) {
  main#main { padding: max(14px, var(--sat)) max(16px, var(--sar)) calc(104px + var(--sab)) max(16px, var(--sal)) }
  .tabbar { bottom: max(12px, var(--sab)) } .lostbar { bottom: calc(96px + var(--sab)) }
}
.toast { top: max(14px, var(--sat)) } .vbar { padding-top: max(10px, var(--sat)) } .vctl { margin-bottom: max(14px, var(--sab)) }
@media (max-width: 700px) { .sheet, .dpop-s { padding-bottom: max(18px, var(--sab)) } }
body.docked .tabbar { display: none }
.dtabs.dock { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: max(10px, var(--sab)); width: min(calc(100% - 24px), 520px); max-width: none; margin: 0; display: flex; gap: 2px; padding: 5px; overflow: visible;
  border-radius: 999px; background: var(--side-bg); box-shadow: var(--sh-float); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px) }
.dtabs.dock a, .dtabs.dock .dock-m { flex: 1 1 0; min-width: 0; display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 52px; padding: 4px 2px; border: 0; border-radius: 999px; background: none; box-shadow: none;
  color: var(--hi3); font: inherit; font-size: 11px; font-weight: 600; text-decoration: none; cursor: pointer }
.dtabs.dock svg { width: 23px; height: 23px } .dtabs.dock span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.dtabs.dock [aria-current] { color: var(--hi); background: var(--toff); box-shadow: none }
:root[data-mode=dark] .dtabs.dock a[aria-current] { background: var(--toff) }
.dsheet, .dpop-s, .sheet { overscroll-behavior: contain } .cs2, .nt2, .dtabs, .wel-s { overscroll-behavior-x: contain }
.dpop-s { transition: transform .22s var(--ease) }
@media (max-width: 700px) {
  .dpop-s > .ch { touch-action: none; padding-top: 10px; cursor: grab }
  .dpop-s::before { content: ''; display: block; width: 38px; height: 5px; margin: -6px auto 2px; border-radius: 4px; background: var(--hi3); opacity: .45 }
}
/* a card's look (its settings): icon size, tinted or flat, an accent from the palette, a style, parts hidden */
.dcard { --acc: var(--hi) } .ac-amber { --acc: var(--amber) } .ac-green { --acc: var(--green) } .ac-blue { --acc: var(--blue) } .ac-ink { --acc: var(--hi) }
.ac-amber :is(.t-amber, .t-green, .t-blue, .t-ink, .t-orange, .t-teal, .t-indigo, .t-cyan) { --t: var(--amber); --at: var(--a-amber) }
.ac-green :is(.t-amber, .t-green, .t-blue, .t-ink, .t-orange, .t-teal, .t-indigo, .t-cyan) { --t: var(--green); --at: var(--a-green) }
.ac-blue :is(.t-amber, .t-green, .t-blue, .t-ink, .t-orange, .t-teal, .t-indigo, .t-cyan) { --t: var(--blue); --at: var(--a-blue) }
.ac-ink :is(.t-amber, .t-green, .t-blue, .t-ink, .t-orange, .t-teal, .t-indigo, .t-cyan) { --t: var(--hi); --at: var(--hi) }
.dcard[class*=" ac-"]:has(> .act[class*=" t-"]:not(.t-red)) { box-shadow: var(--cardsh), inset 0 0 0 1px color-mix(in srgb, var(--acc) 22%, transparent) }
.dcard.lk-tint { background: radial-gradient(130% 120% at 0% 0%, color-mix(in srgb, var(--acc) 14%, var(--card)), var(--card) 78%) !important; box-shadow: var(--cardsh), inset 0 0 0 1px color-mix(in srgb, var(--acc) 18%, transparent) }
.dcard.lk-flat { background: transparent !important; box-shadow: inset 0 0 0 1px var(--hline) !important }
.dcard.lk-flat.dc-buttons, .dcard.lk-flat.dc-chips { box-shadow: none !important }
.dcard.isz-s .ci2 { width: 30px; height: 30px } .dcard.isz-s .ci2 svg { width: 16px; height: 16px } .dcard.isz-s button.ci2::after { inset: -7px }
.dcard.isz-l .ci2 { width: 46px; height: 46px } .dcard.isz-l .ci2 svg { width: 24px; height: 24px }
.dcard.isz-s .gt-b { width: 44px; height: 44px } .dcard.isz-s .gt-b svg { width: 21px; height: 21px }
.dcard.isz-l .gt-b { width: 68px; height: 68px } .dcard.isz-l .gt-b svg { width: 31px; height: 31px }
.dcard.isz-s .sb2 .ci2 { width: 36px; height: 36px } .dcard.isz-l .sb2 .ci2 { width: 56px; height: 56px } .dcard.isz-l .sb2 .ci2 svg { width: 26px; height: 26px }
.dcard.isz-l.dc-stat .st2 .ci2 { width: 38px; height: 38px } .dcard.isz-l.dc-stat .st2 .ci2 svg { width: 20px; height: 20px }
.no-name :is(.tx2 b, .ch2 > .ct, .gt-m b, .sb2 > span:last-child, .tk-m .ch2) { display: none }
.no-state :is(.tx2 small, .gt-m small, .rm-f, .al-s small, .lsm > small, .trend, .tk-l, .lg-p) { display: none !important }
.no-graph :is(.sp2, .rg, .trend, .lbar) { display: none !important }
.sy-centred .tl2 { align-items: center; justify-content: center; text-align: center } .sy-centred .tl2 .tx2 { flex: none; justify-items: center; align-content: center; text-align: center; max-width: 100% }
.sy-centred.w2 .tl2, .sy-centred.w4 .tl2 { justify-content: center }
.sy-pill .scn2 { justify-content: flex-start; gap: 8px; padding: 0 12px } .sy-pill .sb2 { flex: none; max-width: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 5px; border-radius: 999px; background: var(--toff) }
.sy-pill .sb2 .ci2 { width: 34px; height: 34px; background: var(--card); box-shadow: none } .sy-pill .sb2 span:last-child { font-size: 14px; color: var(--hi) }
.lr .lic { flex: none; display: grid; color: var(--hi3) } .lr .lic svg { width: 15px; height: 15px } .lr[class*=" t-"] .lic { color: var(--t) }
/* a gate and a tank as small cards; the camera strip one row high */
.w1 .gt { gap: 10px; padding: 0 12px } .w1 .gt-b { width: 50px; height: 50px } .w1 .gt-b svg { width: 24px; height: 24px } .w1 .gt-m b { font-size: 15px } .w1 .gt-w { left: 12px; right: 12px; bottom: 9px }
.tk-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .w1.h1 .tk { gap: 10px; padding: 12px } .w1.h1 .tk-m .bv { font-size: 21px }
.dc-cams.h1 .cs-t { border-radius: 16px } .dc-cams.h1 .cm-n { left: 8px; bottom: 8px; gap: 6px; padding: 4px 10px 4px 8px; font-size: 12.5px } .dc-cams.h1 .cm-live { width: 6px; height: 6px }
.dc-cams.h1 .cs-t::after { inset: 45% 0 0 }
/* compact views: lower rows and less space, small cards drawn as rows */
.dpage.dense { --row: 84px; --gap: 10px; gap: 22px } @media (max-width: 599px) { .dpage.dense { --row: 80px; --gap: 9px } }
.dense .dcard { border-radius: 16px } .dense .dsec { gap: 9px }
.dense .w1 .tl2, .dense .w1 .lg2 { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; padding: 0 10px 0 12px } .dense .w1 .tl2 .tx2, .dense .w1 .lg2 .tx2 { align-content: center }
.dense .tx2 b { font-size: 14px } .dense .rm2, .dense .st2 { padding: 10px 12px } .dense .st2 .bv { font-size: 24px } .dense .ls2 { padding: 10px 12px }
.dense .gt-b { width: 48px; height: 48px } .dense .al2 { gap: 6px; padding: 10px 12px 12px } .dense .al2 .bv { font-size: 26px } .dense .tu { padding: 10px 12px 12px } .dense .tu .st-v .bv { font-size: 32px }
.dense .h2 .st2 .st-v .bv { font-size: 32px }
/* the editor on a phone: a long press picks a card up, a swipe scrolls */
@media (pointer: coarse) { .dce, .dsec-e { touch-action: pan-y; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none } }
.tones .tauto { background: conic-gradient(var(--amber), var(--green), var(--blue), var(--hi3), var(--amber)) }
.ipv { display: inline-flex; align-items: center; gap: 10px; min-width: 0 } .ipv svg { width: 20px; height: 20px; color: var(--hi) }
.ipick { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); max-height: 56vh; overflow-y: auto; padding: 2px } .ipick button[hidden] { display: none }
.elist .gm .cnm { height: 36px; margin-top: 4px; padding: 0 10px; border: 0; border-radius: 12px; background: var(--toff); color: var(--hi); font: inherit; font-size: 14px; width: 100%; min-width: 0 }
.mvs .acts { margin-top: 0 } .lk { justify-self: start; margin-top: 4px; background: var(--toff) } .lk button { min-height: 38px; padding: 0 16px; font-size: 14px }
@media (pointer: coarse) { .lk button { min-height: 44px } .dsec-e button { width: 44px; height: 44px } }
@media (max-width: 600px) { .dsec-e { gap: 4px } .dsec-e .grip { display: none } }
.scn-n { flex: 0 1 auto; max-width: 30%; padding: 0 4px 0 6px; font-size: 13.5px; font-weight: 650; color: var(--hi2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.w1 .rm2 { padding: 10px 10px 10px 14px; gap: 4px } .w1 .rm2 .rm-f { gap: 2px 10px; max-height: 34px; overflow: hidden }
.w1 .gt { gap: 10px; padding: 0 10px } .w1 .gt-b { width: 46px; height: 46px }
.w1 .rm2 { padding: 9px 9px 8px 14px } .w1 .rm2 .rm-l { width: 36px; height: 36px } .w1 .rm2 .rm-f { line-height: 16px; max-height: 34px }
/* editing on a phone: the bar on one line, the app's tab bar out of the way */
body.editing .tabbar { display: none }
@media (max-width: 600px) { .dbar { flex-wrap: nowrap; gap: 6px; padding: 8px } .dbar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 4px } .dbar .dsp { display: none }
  .dbar .btn { height: 44px; padding: 0 12px; flex: none } .dbar #dset, .dbar #dundo { width: 44px; padding: 0; justify-content: center } }
.mvs .btn svg { width: 16px; height: 16px }
/* 44 px to touch: a name that opens its card reaches a little past its text, the AC's − and + full size */
.tx2, button.ct { position: relative } .tx2::after, button.ct::after { content: ''; position: absolute; inset: -4px 0 }
.dc-climate .cl-b { width: 44px; height: 44px }
html:has(body.docked) { scroll-padding: max(14px, var(--sat)) 0 calc(96px + var(--sab)) } /* what scrolls into view stays clear of the tab bar */
/* 0.29.1 rows that scroll sideways (status figures, notices, cameras, scenes): snap item by item, the first flush with the
   page edge and the next peeking; a soft fade on the side where more lies; dots under the row follow the swipe (dash.js swipes) */
@property --fl { syntax: '<length>'; inherits: false; initial-value: 0px }
@property --fr { syntax: '<length>'; inherits: false; initial-value: 0px }
.hsw { -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent); mask-image: linear-gradient(to right, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent); transition: --fl .25s var(--ease), --fr .25s var(--ease) }
.wel-s { scroll-snap-type: x mandatory; scroll-padding-inline: 16px } .wel-s > * { scroll-snap-align: start } .wel.one .wel-s { scroll-padding-inline: 0 }
.nt2 { scroll-snap-type: x mandatory } .nt2 > * { scroll-snap-align: start } .scn2.hsw { scroll-snap-type: x mandatory; justify-content: flex-start } .scn2 > .sb2 { scroll-snap-align: start }
.wel, .dc-notices, .dc-cams, .dc-buttons { position: relative }
.hdots { position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; pointer-events: none }
.hdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--hi3); opacity: .32; transition: opacity .25s var(--ease) } .hdots i.on { opacity: .85 }
.hdots.bar { width: 44px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--hi3) 26%, transparent); overflow: hidden; display: block }
.hdots.bar i { display: block; height: 100%; border-radius: inherit; background: var(--hi2); opacity: .75 }
.dc-buttons > .hdots { bottom: 3px } .dense .hdots { bottom: -11px }
@media (max-width: 900px) { .dcard.dc-notices { overflow: visible } .dc-notices .nt2 { margin: 0 -16px; padding: 0 16px; scroll-padding-inline: 16px } }
/* 0.31.7 a row keeps its tiles' shadows and rounded tops: room above and below inside the row, given back outside */
.wel-s, .wel.one .wel-s, .cs2, .dc-notices .nt2 { padding-block: 10px 30px; margin-block: -10px -30px } .cs2, .dc-notices .nt2 { height: calc(100% + 40px) } .dcard.dc-notices { overflow: visible }
/* 0.31.9 on the dashboard surface the alarm, media and top-up cards open on a tap: their inputs do not act there (dash.js dashOpenCard) */
:is(#main, .dpop-s:not(.dpop-card)) :is(.dc-alarm, .dc-media, .dc-topup) :is(input, select) { pointer-events: none }
@media (prefers-reduced-motion: reduce) { .hsw { transition: none } .hdots i { transition: none } }
/* a camera's next picture fades in over the last one (home.js freshSnap): never a blank frame */
.snap-in { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .3s var(--ease); pointer-events: none } .snap-in.on { opacity: 1 }
@media (prefers-reduced-motion: reduce) { .snap-in { transition: none } }
body.editing [data-dedit] { display: none }
/* 0.30.3 a short card (one row high) whose name and state would be stacked: one line, "Indoor siren · Off", the state in its
   own colour after a dot, the name shortened first; too low for the icon above it, the icon beside it. Decided by the height
   the card is drawn at, for every tile and light group; two rows and more keep the two lines */
@container (max-height: 108px) {
  .w1 :is(.tl2, .lg2) { gap: 4px; padding: 11px 13px 11px }
  .w1 :is(.tl2, .lg2) .tx2 { flex: none; display: flex; align-items: baseline; min-width: 0; max-width: 100% }
  .w1 :is(.tl2, .lg2) .tx2 b { flex: 0 1 auto; min-width: 0 }
  .w1 :is(.tl2, .lg2) .tx2 small { flex: 0 0 auto; max-width: 50% }
  .w1 :is(.tl2, .lg2) .tx2 small::before { content: '·'; margin: 0 5px; color: var(--hi3); font-weight: 400 }
  .no-name .tx2 small::before { content: none !important }
  .sy-centred .tl2 .tx2 { justify-content: center }
}
@container (max-height: 83.9px) {
  .w1 :is(.tl2, .lg2) { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; padding: 0 12px }
  .w1 :is(.tl2, .lg2) .tx2 { flex: 1 1 auto; align-self: center }
  .sy-centred.w1 .tl2 { justify-content: center } .sy-centred.w1 .tl2 .tx2 { flex: 0 1 auto }
}

/* the licence notice for the home's owner and admins (core/licence.js): small, an amber dot, never a red fill */
.hlic { font-size: 13px !important; color: var(--hi2) } .hlic i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn, #b7791f); flex: none; margin: 0 6px }
.hlic span { white-space: normal !important; line-height: 1.3 } .group .hlic .gm b { font-weight: 500; font-size: 14px }

/* 0.31.2 Compact style (style: chip) for a tile, light group or gate: a short chip, the icon beside the name and state; a
   grid row of chips only is drawn at --chip (dash.js gridHtml), so sirens, gas, locks and gates take a third of a card's height */
:root { --chip: 58px } .dpage.dense { --chip: 54px }
.dcard.sy-chip { border-radius: 16px }
.sy-chip :is(.tl2, .lg2, .gt) { flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; gap: 9px !important; padding: 0 10px 0 10px !important; text-align: left }
.sy-chip :is(.tl2, .lg2) .tx2 { flex: 1 1 auto !important; display: grid !important; grid-template-columns: minmax(0, 1fr); align-content: center !important; align-self: center !important; gap: 0; max-width: none !important; justify-items: stretch !important; text-align: left !important }
.sy-chip :is(.tl2, .lg2) .tx2 small::before { content: none !important }
.sy-chip :is(.tl2, .lg2) .tx2 small { max-width: 100% !important }
.sy-chip .tx2 b, .sy-chip .gt-m b { font-size: 14.5px; font-weight: 600 } .sy-chip .tx2 small, .sy-chip .gt-m small { font-size: 12.5px }
.sy-chip :is(.tl2, .lg2) > .ci2 { width: 36px; height: 36px } .sy-chip .lg-p { display: none }
.sy-chip .gt-b { width: 44px !important; height: 44px !important } .sy-chip .gt-b svg { width: 21px !important; height: 21px !important }
.sy-chip .gt-m { align-self: center; grid-template-columns: minmax(0, 1fr) } .sy-chip .gt-w { left: 12px; right: 12px; bottom: 5px; height: 3px }
.sy-chip.h2 :is(.tl2, .lg2, .gt) { padding: 12px !important }
/* one tap opens a card, a double tap on its icon switches (home.js TAPS): no double-tap zoom, no text picked, a press on the icon */
#main, .dpop, .dsheet { touch-action: manipulation }
.ci2, .ti, .sb2, .bigctl, .rm2, .tl2, .lg2, .tile { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent }
.tapped { animation: tapd .28s ease-out }
@keyframes tapd { 0% { transform: scale(.84) } 100% { transform: scale(1) } }
@media (prefers-reduced-motion: reduce) { .tapped { animation: none; outline: 2px solid var(--hi3); outline-offset: 2px } }
/* the front gate shown after a ring: closing by itself 5 s after the gate shut (dash.js ringWatch) */
#dpop.ring-cd::after { content: ''; position: fixed; left: 0; top: 0; height: 3px; width: 100%; background: var(--hi3); opacity: .7; transform-origin: left; animation: ringcd 5s linear forwards; z-index: 5; pointer-events: none }
@keyframes ringcd { from { transform: scaleX(1) } to { transform: scaleX(0) } }
@media (prefers-reduced-motion: reduce) { #dpop.ring-cd::after { animation: none } }

/* the notice strip (0.32.2): beside the view tabs on a wall tablet or a wide screen, above the page on a phone; short chips
   with a dot, three at most and +N; nothing when all is well */
.nstrip { flex: 1 1 0; min-width: 0; display: flex; justify-content: flex-end; align-items: center; gap: 8px; overflow: hidden }
.nstrip:not(.on) { display: none }
.na { flex: 0 1 auto; min-width: 0; max-width: 300px; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px 0 13px; border: 0; border-radius: 999px;
  background: color-mix(in srgb, var(--t, var(--hi3)) 12%, var(--card)); color: var(--hi); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--cardsh) }
.na > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap } .na .ldot { background: var(--t, var(--hi3)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--t, var(--hi3)) 20%, transparent) }
.na.t-ink { --t: var(--hi3) } .na.more { flex: none; padding: 0 14px; color: var(--hi2); background: var(--card) }
.nstrip.solo { justify-content: flex-start; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain } .nstrip.solo::-webkit-scrollbar { display: none }
.nstrip.solo .na { flex: none; max-width: min(78vw, 320px) }
@media (max-width: 600px) { .nstrip.solo .na { padding: 0 13px 0 11px; font-size: 13.5px } .nstrip.solo { gap: 6px; margin: 0 -16px 12px; padding: 2px 16px 6px } }
@media (pointer: coarse) { .na { min-height: 44px } }
.dtop .nstrip + .round { margin-left: 0 }
.na-r .ldot { width: 8px; height: 8px; flex: none; margin: 0 6px 0 2px; border-radius: 50%; background: var(--t, var(--hi3)) } .na-r.t-ink { --t: var(--hi3) }
html[data-wall] .na { background: color-mix(in srgb, var(--t, var(--hi3)) 12%, var(--sheet-bg)) } html[data-wall] .na.more { background: var(--sheet-bg) }
@media (max-width: 760px) { .dtop:has(.nstrip.on) { flex-wrap: wrap; row-gap: 10px } .dtop .nstrip { flex: 1 0 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none } .dtop .nstrip .na { flex: none } }
#dform .grow [name=aml] { flex: 1 1 160px; min-width: 0; max-width: 240px; margin-left: auto }
/* room sheet: what is going on, then lights, air conditioning, media, switches, sensors, power; rows act on one tap */
.dpop-room .rs-h { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 2px 0 14px; font-size: 14px; color: var(--hi2); font-variant-numeric: tabular-nums }
.dpop-room .rs-h span { display: inline-flex; align-items: center; gap: 4px } .dpop-room .rs-h svg { width: 14px; height: 14px }
.rs-s { margin: 0 0 14px } .rs-s .group { margin: 0 }
.rs-r { display: flex; align-items: center; gap: 4px; min-height: 56px; padding: 4px 4px 4px 10px; border-top: 1px solid var(--hline) } .rs-r:first-child { border-top: 0 }
.rs-x { flex: 1; min-width: 0; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; color: var(--hi); font: inherit; text-align: left; cursor: pointer }
.rs-x[disabled] { cursor: default; opacity: .55 } .rs-r .ci2 { width: 40px; height: 40px; flex: none }
.rs-o { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; background: none; color: var(--hi3); cursor: pointer } .rs-o svg { width: 16px; height: 16px }
.rs-ac .cl-q { flex: none } .rs-pw { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--toff); color: var(--hi3); cursor: pointer }
.rs-pw svg { width: 20px; height: 20px } .rs-pw.on { background: color-mix(in srgb, var(--blue) 18%, transparent); color: var(--a-blue) }
.rs-m { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px } .rs-m .dcard { min-height: 150px } .rs-s > .group + .rs-m:empty { display: none }
@media (max-width: 420px) { .rs-m { grid-template-columns: 1fr } }
.rs-t { display: flex; align-items: center; min-height: 28px; margin: 0 2px 6px } .rs-t b { font-size: 15px; color: var(--hi) }
.rs-sc { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px } .rs-scn { justify-content: center }
.rs-scn { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px 0 12px; border: 0; border-radius: 24px; background: var(--grp); box-shadow: 0 0 0 1px var(--hline); color: var(--hi); font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer }
.rs-scn svg { width: 18px; height: 18px; color: var(--hi2) } .rs-scn.done { background: color-mix(in srgb, var(--amber) 16%, transparent) }
.rs-f { margin-top: 6px }
.rs-go { width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 16px; border: 0; border-radius: 16px; background: var(--grp); box-shadow: 0 0 0 1px var(--hline); color: var(--hi); font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer }
.rs-go svg { width: 16px; height: 16px; color: var(--hi3) }
/* load distribution: each metered device, biggest first, its share of the house's load */
.ld { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 12px 14px; overflow: hidden }
.ld .ch2 { display: flex; align-items: baseline; justify-content: space-between } .ld-t { font-size: 22px; font-weight: 600; color: var(--hi); font-variant-numeric: tabular-nums }
.ld-l { display: grid; gap: 8px; overflow: auto } .ld-r { display: flex; align-items: center; gap: 10px }
.ld-n { flex: 1; min-width: 0; display: grid; gap: 3px } .ld-n b { font-size: 14px; font-weight: 500; color: var(--hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.ld-n small { font-size: 12.5px; color: var(--hi3); font-variant-numeric: tabular-nums }
.ld-b { display: block; height: 4px; border-radius: 2px; background: var(--toff); overflow: hidden } .ld-b > i { display: block; height: 100%; border-radius: inherit; background: var(--hi2) }
.ld-u .ld-b > i { background: var(--hi3); opacity: .5 } .ld-u b { color: var(--hi2) }
.ld-s { min-width: 64px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 24px; background: var(--toff); color: var(--hi3); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer }
.ld-s.on { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--a-green) } .ld-s.arm { background: color-mix(in srgb, var(--soft-red) 16%, transparent); color: var(--soft-red) }
/* a room tab's status band */
.rst { display: flex; align-items: center; height: 100%; padding: 0 16px; overflow: hidden } .rst .rs-h { margin: 0; font-size: 15px; gap: 4px 18px } .rst .rs-h svg { width: 15px; height: 15px }
.rs-r .ci2 .gly { width: 16px; height: 16px; fill: currentColor }
/* a page that could not open: what happened, and the way on */
.rcv { display: grid; gap: 8px; justify-items: start } .rcv b { color: var(--hi); font-size: 17px } .rcv small { color: var(--hi3); font-size: 13px; font-family: ui-monospace, monospace }
.rcv-b { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px } .rcv-b .btn { min-height: 44px }
