/* Laguna — iOS-style interface. Light and dark follow the phone setting. */

@font-face {
  font-family: "InterVar";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #F2F2F7;
  --bg-elev: #FFFFFF;
  --bg-elev-2: #F2F2F7;
  --fill: rgba(120, 120, 128, 0.12);
  --fill-strong: rgba(120, 120, 128, 0.20);
  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.78);
  --label-3: rgba(60, 60, 67, 0.30);
  --sep: rgba(60, 60, 67, 0.29);
  --tint: #0066D6;
  --tint-ink: #0055B3;
  --orange-ink: #9E4500;
  --green-ink: #17702F;
  --red-ink: #B80018;
  --teal-ink: #0B6676;
  --green: #34C759;
  --orange: #FF9500;
  --red: #FF3B30;
  --teal: #30B0C7;
  --indigo: #5856D6;
  --yellow: #FFCC00;
  --bar: rgba(249, 249, 249, 0.82);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --radius: 14px;
  --font: -apple-system, "SF Pro Text", "InterVar", system-ui, "Segoe UI", Roboto, sans-serif;
  --display: -apple-system, "SF Pro Display", "InterVar", system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elev: #1C1C1E;
    --bg-elev-2: #2C2C2E;
    --fill: rgba(118, 118, 128, 0.24);
    --fill-strong: rgba(118, 118, 128, 0.36);
    --label: #FFFFFF;
    --label-2: rgba(235, 235, 245, 0.60);
    --label-3: rgba(235, 235, 245, 0.30);
    --sep: rgba(84, 84, 88, 0.65);
    --tint: #0B6FE0;
    --tint-ink: #409CFF;
    --orange-ink: #FF9F0A;
    --green-ink: #30D158;
    --red-ink: #FF6961;
    --teal-ink: #5AC8E0;
    --green: #30D158;
    --orange: #FF9F0A;
    --red: #FF453A;
    --bar: rgba(22, 22, 24, 0.80);
    --shadow: none;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--label); }
body {
  font-family: var(--font);
  font-size: 17px; line-height: 1.29; letter-spacing: -0.41px;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  overscroll-behavior-y: none;
  user-select: none; -webkit-user-select: none;
}
input, textarea, select, button { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- screens ---------- */
#app { height: 100%; }
.screen {
  position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 0 calc(96px + env(safe-area-inset-bottom));
  display: none;
}
.screen.active { display: block; animation: fade .22s ease-out; }
@keyframes fade { from { opacity: .0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.navbar {
  position: sticky; top: 0; z-index: 20;
  padding: calc(env(safe-area-inset-top) + 6px) 16px 0;
  background: transparent; transition: background .2s, border-color .2s;
  border-bottom: .5px solid transparent;
}
.navbar.scrolled { background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-color: var(--sep); }
.navbar .row { height: 38px; display: flex; align-items: center; justify-content: space-between; }
.navbar .small-title { font-weight: 600; font-size: 17px; opacity: 0; transition: opacity .2s; }
.navbar.scrolled .small-title { opacity: 1; }
.navbar .action { color: var(--tint-ink); font-size: 17px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; }
.navbar .action.right { justify-content: flex-end; }
.large-title { font-family: var(--display); font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: .37px; padding: 2px 16px 8px; }
.subtitle { color: var(--label-2); font-size: 15px; padding: 0 16px 14px; margin-top: -4px; }

/* ---------- grouped lists ---------- */
.section-header { color: var(--label-2); font-size: 13px; text-transform: uppercase; letter-spacing: -.08px; padding: 22px 32px 7px; }
.section-footer { color: var(--label-2); font-size: 13px; letter-spacing: -.08px; padding: 7px 32px 0; line-height: 1.38; }
.group { background: var(--bg-elev); margin: 0 16px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cell {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 11px 16px; width: 100%; text-align: left;
}
.cell + .cell::before { content: ""; position: absolute; top: 0; right: 0; left: var(--inset, 16px); height: .5px; background: var(--sep); }
.cell.icon-cell { --inset: 60px; }
.cell:active.tap { background: var(--fill); }
a.cell { color: inherit; text-decoration: none; }
.cell input#del-confirm { border: 0; background: transparent; outline: none; color: var(--label); font: inherit; }
.cell .grow { flex: 1; min-width: 0; }
.cell .title { font-size: 17px; }
.cell .sub { color: var(--label-2); font-size: 15px; margin-top: 2px; }
.cell .value { color: var(--label-2); white-space: nowrap; }
.cell .chev { width: 8px; height: 14px; flex: none; opacity: .3; }
.cell input[type="text"], .cell input[type="password"], .cell input[type="number"], .cell input[type="month"] {
  border: 0; background: transparent; outline: none; text-align: right; color: var(--label-2); min-width: 0; width: 50%;
  user-select: text; -webkit-user-select: text;
}
.cell input.left { text-align: left; color: var(--label); width: 100%; }
.cell select { position: absolute; inset: 0; opacity: 0; width: 100%; }
.badge-icon { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; flex: none; color: #fff; }
.badge-icon svg { width: 18px; height: 18px; }
.destructive { color: var(--red-ink); }
.tint { color: var(--tint-ink); }

/* switch */
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 31px; background: var(--fill-strong); transition: background .25s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .25s cubic-bezier(.3,1.4,.6,1); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }

/* stepper */
.stepper { display: inline-flex; background: var(--fill); border-radius: 8px; height: 32px; }
.stepper button { width: 46px; display: grid; place-items: center; font-size: 22px; color: var(--label); }
.stepper button + button { border-left: .5px solid var(--sep); }

/* segmented control */
.segmented { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; margin: 0 16px; position: relative; }
.segmented button { flex: 1; min-width: 0; min-height: 28px; padding: 3px 4px; line-height: 1.15; overflow-wrap: anywhere; border-radius: 7px; font-size: 13px; font-weight: 500; position: relative; z-index: 1; }
.segmented button.on { background: var(--bg-elev); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); font-weight: 600; }
@media (prefers-color-scheme: dark) { .segmented button.on { background: #636366; } }

/* buttons */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 14px; font-weight: 600; font-size: 17px; width: calc(100% - 32px); margin: 0 16px; }
.btn.filled { background: var(--tint); color: #fff; }
.btn.tinted { background: color-mix(in srgb, var(--tint) 15%, transparent); color: var(--tint-ink); }
.btn.plain { color: var(--tint-ink); }
.btn:active { opacity: .7; }
.btn svg { width: 20px; height: 20px; }

/* ---------- hero card (Today) ---------- */
.hero {
  margin: 4px 16px 0; border-radius: 22px; overflow: hidden; position: relative; color: #fff;
  padding: 18px 18px 16px; min-height: 250px;
  background: linear-gradient(165deg, #2F80ED 0%, #56CCF2 100%);
  box-shadow: 0 10px 30px rgba(30, 90, 200, .25);
}
.hero.dawn  { background: linear-gradient(165deg, #6A5ACD 0%, #FF9A8B 100%); box-shadow: 0 10px 30px rgba(160, 90, 160, .25); }
.hero.dusk  { background: linear-gradient(165deg, #3A2E6E 0%, #F2994A 100%); box-shadow: 0 10px 30px rgba(120, 70, 90, .3); }
.hero.night { background: linear-gradient(165deg, #0B1026 0%, #2B3A67 100%); box-shadow: 0 10px 30px rgba(10, 16, 38, .35); }
.hero .place { font-size: 15px; font-weight: 600; opacity: .92; display: flex; align-items: center; gap: 6px; }
.hero .temp { font-family: var(--display); font-size: 64px; font-weight: 200; line-height: 1; margin-top: 6px; letter-spacing: -1px; }
.hero .cond { font-size: 15px; font-weight: 500; opacity: .92; margin-top: 4px; }
.hero .hilo { font-size: 15px; opacity: .85; }
.hero svg.arc { position: absolute; right: 0; bottom: 0; width: 100%; height: 120px; }
.hero .chip { position: absolute; top: 16px; right: 16px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.22); padding: 4px 9px; border-radius: 20px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin: 12px 16px 0; }   /* 0.6.90: three across, two or one at large text */
.stat { background: var(--bg-elev); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); min-width: 0; overflow-wrap: anywhere; }
.stat .k { font-size: 12px; color: var(--label-2); font-weight: 500; text-transform: uppercase; letter-spacing: .2px; }
.stat .v { font-family: var(--display); font-size: 22px; font-weight: 600; margin-top: 4px; letter-spacing: .35px; }
.stat .u { font-size: 13px; color: var(--label-2); font-weight: 500; }

/* ---------- action timeline ---------- */
.action-cell { align-items: flex-start; }
.action-cell .time { width: 52px; flex: none; font-size: 13px; font-weight: 600; color: var(--label-2); padding-top: 3px; }
.action-cell .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; }
.action-cell .dot svg { width: 16px; height: 16px; }
.action-cell.done .title { text-decoration: line-through; color: var(--label-2); }
.action-cell .save { font-size: 13px; color: var(--green-ink); font-weight: 600; margin-top: 4px; }
.check { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--label-3); flex: none; display: grid; place-items: center; margin-top: 2px; transition: all .2s; }
.check.on { background: var(--tint); border-color: var(--tint); }
.check svg { width: 14px; height: 14px; color: #fff; opacity: 0; }
.check.on svg { opacity: 1; }
.why { display: none; margin-top: 8px; font-size: 14px; color: var(--label-2); line-height: 1.45; }
.why.open { display: block; }
.why li { margin: 2px 0; }
.why ul { margin: 0; padding-left: 18px; }
.why-btn { color: var(--tint-ink); font-size: 14px; margin-top: 6px; }

/* ---------- room cards ---------- */
.room-card { display: flex; align-items: center; gap: 12px; }
.compass-glyph { width: 44px; height: 44px; flex: none; }
.heatstrip { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; margin-top: 8px; height: 10px; }
.heatstrip i { border-radius: 2px; background: var(--fill); }
.hours-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--label-2); margin-top: 4px; }
.conn-st { display: flex; flex-wrap: wrap; align-items: flex-end; column-gap: 2px; }
.conn-st .sub { margin-top: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--fill); color: var(--label-2); margin: 6px 6px 0 0; }

/* ---------- charts ---------- */
.chart-card { background: var(--bg-elev); margin: 0 16px; border-radius: var(--radius); padding: 14px 14px 10px; box-shadow: var(--shadow); }
.chart-card .h { font-size: 13px; color: var(--label-2); font-weight: 500; }
.chart-card .big { font-family: var(--display); font-size: 28px; font-weight: 600; margin: 2px 0 8px; }
.chart-card svg { width: 100%; display: block; }
.chart-card text { fill: var(--label-2); font-size: 10px; font-family: var(--font); }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; padding: 6px 4px calc(env(safe-area-inset-bottom) + 4px);
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--sep);
}
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #999; font-size: 10px; font-weight: 500; letter-spacing: .1px; padding-top: 2px; }
.tabbar button svg { width: 26px; height: 26px; }
.tabbar button.on { color: var(--tint-ink); }

/* ---------- sheets ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .3s; }
.backdrop.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: calc(100% - env(safe-area-inset-top) - 12px); height: calc(100% - env(safe-area-inset-top) - 12px);
  background: var(--bg); border-radius: 12px 12px 0 0; transform: translateY(105%);
  transition: transform .42s cubic-bezier(.32,.72,0,1); display: flex; flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0,0,0,.2);
}
.sheet.on { transform: none; }
.sheet .grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--label-3); margin: 6px auto 0; flex: none; }
.sheet .sheet-nav { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px; height: 50px; flex: none; }
.sheet .sheet-nav .t { font-weight: 600; }
.sheet .sheet-nav button { color: var(--tint-ink); min-width: 64px; min-height: 44px; }
.sheet .sheet-nav button.done { font-weight: 600; text-align: right; }
.sheet .sheet-body { overflow-y: auto; flex: 1; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }

/* ---------- banners, toasts, empty states ---------- */
.banner { margin: 12px 16px 0; padding: 12px 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--orange) 14%, var(--bg-elev)); font-size: 15px; display: flex; gap: 10px; align-items: flex-start; }
.banner svg { width: 20px; height: 20px; color: var(--orange-ink); flex: none; margin-top: 1px; }
.banner.info { background: color-mix(in srgb, var(--tint) 12%, var(--bg-elev)); }
.banner.info svg { color: var(--tint-ink); }
.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 10px); transform: translate(-50%, -140%); background: var(--bg-elev); color: var(--label); padding: 10px 16px; border-radius: 22px; box-shadow: 0 8px 30px rgba(0,0,0,.18); font-size: 15px; font-weight: 600; z-index: 80; transition: transform .45s cubic-bezier(.32,.72,0,1); display: flex; gap: 8px; align-items: center; white-space: nowrap; max-width: calc(100% - 32px); }
.toast.long { white-space: normal; border-radius: 16px; }
.toast.on { transform: translate(-50%, 0); }
/* 0.6.82: limits — which limit and the seconds left; stays until the wait is over */
.limitbar { position: fixed; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 92px); margin: 0 auto; max-width: 480px; background: var(--bg-elev); color: var(--label); border-left: 4px solid var(--orange-ink); padding: 10px 14px; border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.18); font-size: 15px; font-weight: 600; z-index: 81; transform: translateY(160%); opacity: 0; transition: transform .35s cubic-bezier(.32,.72,0,1), opacity .2s; pointer-events: none; font-variant-numeric: tabular-nums; }
.limitbar.on { transform: none; opacity: 1; }
.limitbar.done { border-left-color: var(--green-ink); }
html[data-motion="reduce"] .limitbar { transition: none; }
.empty { text-align: center; padding: 40px 32px 16px; color: var(--label-2); }
.empty svg { width: 64px; height: 64px; color: var(--label-3); margin-bottom: 10px; }
.empty h3 { color: var(--label); font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.spacer { height: 20px; }

/* floor plan */
.plan { background: var(--bg-elev); margin: 0 16px; border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); }
.plan svg { width: 100%; height: 240px; display: block; }

/* ---------- AR overlay ---------- */
#ar-overlay { display: none; position: fixed; inset: 0; z-index: 100; color: #fff; font-family: var(--font); pointer-events: none; }
#ar-overlay.on { display: block; }
#ar-overlay .ar-top { position: absolute; top: 0; left: 0; right: 0; padding: calc(env(safe-area-inset-top) + 12px) 16px 14px; background: linear-gradient(rgba(0,0,0,.55), transparent); pointer-events: auto; }
#ar-overlay .ar-step { font-size: 20px; font-weight: 700; letter-spacing: .3px; }
#ar-overlay .ar-hint { font-size: 15px; opacity: .85; margin-top: 4px; }
#ar-overlay .ar-count { font-size: 13px; opacity: .75; margin-top: 8px; }
#ar-overlay .ar-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 10px calc(env(safe-area-inset-bottom) + 14px); background: linear-gradient(transparent, rgba(0,0,0,.6)); pointer-events: auto; }
#ar-overlay .ar-bottom { transition: padding-bottom .4s ease; }
#ar-overlay.ar-lift .ar-bottom { padding-bottom: calc(env(safe-area-inset-bottom) + 118px); }
#ar-overlay .ar-tools { display: flex; gap: 8px; overflow-x: auto; padding: 0 6px 12px; }
#ar-overlay .ar-tools button { flex: none; padding: 9px 14px; border-radius: 20px; background: rgba(255,255,255,.18); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: #fff; font-size: 14px; font-weight: 600; }
#ar-overlay .ar-tools button.on { background: #fff; color: #000; }
#ar-overlay .ar-actions { display: flex; gap: 10px; padding: 0 6px; }
#ar-overlay .ar-actions button { flex: 1; height: 48px; border-radius: 14px; background: rgba(255,255,255,.18); color: #fff; font-weight: 600; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
#ar-overlay .ar-actions button.primary { background: #0A84FF; }
#ar-overlay .ar-reticle-hint { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 2px solid #fff; opacity: .7; }
#ar-overlay label.hf { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; padding: 0 6px 10px; }
.sheet.compact { height: auto; max-height: 70%; }
.sheet.compact .sheet-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

/* ---------- charts (Stats) — palette validated with the dataviz validator ---------- */
:root { --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #8e4fc4; --cool: #2a78d6; --mid: #c3c2b7; --warm: #e34948; --cmuted: #b9b8b0;
  --grid: #e1e0d9; --axis: #c3c2b7; --ink-2: #52514e; --ink-3: #6b6a65; --surface: #ffffff; }
@media (prefers-color-scheme: dark) { :root { --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #a77be0; --cool: #3987e5; --mid: #5d5c57; --warm: #e66767; --cmuted: #4a4a46;
  --grid: #2c2c2a; --axis: #383835; --ink-2: #c3c2b7; --ink-3: #a3a29b; --surface: #1c1c1e; } }
.viz { width: 100%; display: block; overflow: visible; }
.viz .tick { fill: var(--ink-3); font-size: 10px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.viz [data-tip] { cursor: pointer; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 2px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px; }
.chart-head .t { min-width: 0; }
.chart-head .t { font-size: 15px; font-weight: 600; }
.chart-head button { color: var(--tint-ink); font-size: 13px; }
.chart-note { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.4; }
.vtable { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; margin-top: 6px; }
.vtable th, .vtable td { text-align: right; padding: 5px 4px; border-bottom: .5px solid var(--sep); }
.vtable th:first-child, .vtable td:first-child { text-align: left; }
.vtable th { color: var(--ink-3); font-weight: 500; }
.vtip { position: fixed; z-index: 90; pointer-events: none; background: var(--bg-elev); color: var(--label); font-size: 13px; padding: 7px 10px; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.18); max-width: 240px; opacity: 0; transition: opacity .12s; }
.vtip.on { opacity: 1; }
.hero-figure { font-size: 48px; font-weight: 700; letter-spacing: -.5px; line-height: 1.05; }
.flow { display: grid; grid-template-columns: 1fr 18px 1fr 18px 1fr; align-items: center; gap: 0; font-size: 12px; }
.flow .col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.flow .node { background: var(--fill); border-radius: 10px; padding: 7px 8px; min-width: 0; overflow-wrap: anywhere; }
.flow .node b { display: block; font-size: 14px; color: var(--label); }
.flow .node span { color: var(--ink-3); }
.flow .arrow { text-align: center; color: var(--ink-3); font-size: 14px; }
#s-stats .chart-card + .chart-card, #s-stats .group + .chart-card { margin-top: 12px; }
#s-stats .stats { margin-top: 12px; }
.viz { --surface: var(--bg-elev); }
.eu-row { margin-top: 9px; }
.eu-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--label); }
.eu-top em { font-style: normal; color: var(--ink-3); font-size: 11px; }
.eu-top .num { color: var(--ink-2); font-variant-numeric: tabular-nums; flex: none; }
.eu-track { height: 8px; border-radius: 4px; background: var(--fill); margin-top: 4px; overflow: hidden; }
.eu-track i { display: block; height: 100%; border-radius: 4px; }
#s-energy .eu-row, #s-stats .eu-row { cursor: pointer; }
.eu-row.sub { padding-left: 14px; }

/* ---------- company mark and its motion ---------- */
:root { --k-ink: #1B1B19; --k-dot: #C9471B; --k-paper: #F3F0E8; --k-b0: #1A2430; --k-b1: #22232A; --k-b2: #2B2123; --k-b3: #33201D; --k-wave: #F3F0E8; }
@media (prefers-color-scheme: dark) { :root { --k-ink: #F3F0E8; --k-dot: #D9562A; --k-paper: #1B1B19; --k-b0: #CBD8E4; --k-b1: #D9D8DC; --k-b2: #E3D5D1; --k-b3: #EBD3CB; --k-wave: #1B1B19; } }
.kmark { display: block; flex: none; overflow: visible; }
.kmark .k-ring { stroke: var(--k-ink); }
.kmark .k-core { fill: none; }
.kmark .k-b0 { fill: var(--k-b0); } .kmark .k-b1 { fill: var(--k-b1); } .kmark .k-b2 { fill: var(--k-b2); } .kmark .k-b3 { fill: var(--k-b3); }
.kmark .k-wave { stroke: var(--k-wave); }
.kmark .a-core { fill: var(--k-ink); }
.kmark .k-dot { fill: var(--k-dot); }
/* Spark path (user units, relative to the dot's resting centre 75.5,24.5):
   tangent point (27.06,72.94) → bounce → along the ring through left (14,50) and top (50,14) → rest. */
@keyframes kspark {
  0%   { transform: translate(-48.44px, 48.44px) scale(.25); opacity: 0; }
  8%   { transform: translate(-48.44px, 48.44px) scale(.55); opacity: 1; }
  20%  { transform: translate(-48.44px, 36px) scale(.55); }
  30%  { transform: translate(-48.44px, 48.44px) scale(.6); }
  48%  { transform: translate(-61.5px, 25.5px) scale(.7); }
  62%  { transform: translate(-51px, 0px) scale(.8); }
  78%  { transform: translate(-25.5px, -10.5px) scale(.9); }
  92%  { transform: translate(0, 0) scale(1.12); }
  100% { transform: translate(0, 0) scale(1); opacity: 1; }
}
.kmark.play .k-dot { animation: kspark 1.25s cubic-bezier(.33,.0,.2,1) both; transform-origin: 75.5px 24.5px; }
.kmark.play .k-core { animation: kcore 1.25s ease-out both; transform-origin: 41.2px 58.8px; }
@keyframes kcore { 0% { transform: scale(.96); } 30% { transform: scale(1.03); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .kmark.play .k-dot, .kmark.play .k-core { animation: none; } }
.title-row { display: flex; align-items: center; justify-content: space-between; padding-right: 16px; }
.title-row .large-title { flex: 1; min-width: 0; }
.title-row button { padding: 4px; margin-top: -4px; }
#splash { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--k-paper); transition: opacity .35s; }
#splash.out { opacity: 0; pointer-events: none; }
/* Stretch light-path stage: always dark, like the object */
#splash { background: #0b0b0e; }
#stretch-pop { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 95; width: 148px; height: 148px; margin-left: -74px;
  display: grid; place-items: center; border-radius: 34px; background: #0b0b0e; box-shadow: 0 12px 40px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(16px) scale(.92); transition: opacity .25s, transform .3s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
#stretch-pop.on { opacity: 1; transform: none; }
.stretch-stage { display: grid; place-items: center; background: #0b0b0e; border-radius: 22px; margin: 14px 16px 0; padding: 14px 0; }
#splash { grid-template-rows: auto auto; align-content: center; gap: 10px; }
#splash .splash-time { color: rgba(255,255,255,.55); font-size: 15px; font-variant-numeric: tabular-nums; text-align: center; }

.air-warn { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: 13px; line-height: 1.35; color: var(--label-2); }
.air-warn svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--orange-ink); }
.air-warn.closed { color: var(--red-ink); } .air-warn.closed svg { color: var(--red-ink); }
.air-warn.caution { color: var(--label); }
.fb-pill { font-size: 14px; font-weight: 600; color: var(--tint-ink); background: color-mix(in srgb, var(--tint) 13%, transparent); padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.proto-tag { display: inline-block; vertical-align: middle; margin-left: 8px; font-family: var(--font); font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--orange-ink); background: color-mix(in srgb, var(--orange) 14%, transparent); padding: 3px 7px; border-radius: 6px; position: relative; top: -4px; }
body.simple .detail, body.simple .why-btn[data-act="why"], body.simple .why { display: none !important; }
#tour { position: fixed; inset: 0; z-index: 150; }
#tour .tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); transition: all .25s ease; pointer-events: none; }
#tour .tour-tip { position: fixed; left: 16px; right: 16px; background: var(--bg-elev); color: var(--label); border-radius: 16px; padding: 14px 16px 10px; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
#tour .tour-tip .t { font-weight: 700; font-size: 17px; }
#tour .tour-tip .x { font-size: 15px; color: var(--label-2); margin-top: 4px; line-height: 1.4; }
#tour .tour-tip .row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--label-3); }
#tour .tour-tip .row button { color: var(--label-3); font-size: 14px; }
#tour .tour-tip .row .go { color: #fff; background: var(--tint); padding: 7px 16px; border-radius: 999px; font-weight: 600; }
#splash .splash-name { color: rgba(255,255,255,.85); font-size: 15px; font-weight: 600; letter-spacing: 4px; text-align: center; }

/* search */
.search-btn { width: 30px; height: 30px; border-radius: 15px; background: var(--fill); color: var(--label); display: inline-flex; align-items: center; justify-content: center; padding: 6px; }
.search-btn svg { width: 18px; height: 18px; }
.title-row .proto-tag { display: block; width: max-content; margin: 2px 0 0; top: 0; }   /* 0.6.144: the tag under the title, so "Home care" fits on one line beside the header buttons */
.search-btn.on { background: var(--tint); color: #fff; }   /* 0.6.144: Settings or Stats is the page shown */
.search-box { width: 100%; box-sizing: border-box; font: inherit; font-size: 17px; padding: 10px 14px; border-radius: 12px; border: 0; background: var(--fill); color: var(--label); }
#search-list .cell.sel { background: var(--fill); }
.section-header.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 60% { color: var(--tint-ink); } 100% { color: inherit; } }

/* main things first */
.more-btn { display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); box-sizing: border-box; margin: 22px 16px 6px; padding: 14px 16px; border-radius: var(--radius); background: var(--bg-elev); box-shadow: var(--shadow); color: var(--label); text-align: left; font: inherit; }
.more-btn .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.more-btn .grow b { font-size: 16px; color: var(--tint-ink); }
.more-btn .grow span { font-size: 13px; color: var(--label-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.more-btn svg { width: 10px; height: 16px; flex: none; color: var(--label-3); }

/* sun on the rooms: open bar with the closed-coverings bar inside it */
.sun-track { position: relative; }
.sun-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.sun-track i:first-child { opacity: .35; }

/* temperature focus */
.tempbtn { flex: 1; height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; border-radius: 14px; font: inherit; font-size: 17px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.tempbtn.on { background: var(--c); color: #fff; }
.temp-card .tmp-room svg { width: 8px; height: 13px; }
body.tempfocus .action-cell .save { display: none; }

.tempbtn small { font-size: 12px; font-weight: 500; opacity: .85; }

/* live house: rooms as tiles showing sun, blinds, fan and air now */
.live-house { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0 16px; }
.lh-tile { position: relative; overflow: hidden; min-height: 92px; text-align: left; padding: 10px 12px; border-radius: 14px; font: inherit; color: var(--label);
  background: var(--bg-elev); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.lh-sun { position: absolute; inset: -30% -30% auto auto; width: 120%; height: 120%; pointer-events: none;
  background: radial-gradient(circle at 85% 15%, rgba(255, 159, 10, calc(var(--glow) * .55)), rgba(255, 204, 0, calc(var(--glow) * .18)) 40%, transparent 70%); }
.lh-tile.sunny .lh-sun { animation: lh-breathe 6s ease-in-out infinite; }
@keyframes lh-breathe { 50% { opacity: .7; transform: scale(1.04); } }
.lh-name { position: relative; font-weight: 600; font-size: 15px; }
.lh-temp { position: relative; font-size: 22px; font-weight: 700; line-height: 1.1; }
.lh-icons { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 2px; min-height: 18px; color: var(--label-2); }
.lh-blinds { display: inline-flex; flex-direction: column; gap: 2px; width: 16px; }
.lh-blinds i { display: block; height: 2px; border-radius: 1px; background: currentColor; transition: transform .4s ease, opacity .4s; transform-origin: left; }
.lh-blinds:not(.closed) i { transform: scaleX(.35); }
.lh-fan { width: 18px; height: 18px; color: var(--teal-ink); animation: lh-spin 1.6s linear infinite; }
@keyframes lh-spin { to { transform: rotate(360deg); } }
.lh-air { display: inline-flex; gap: 2px; }
.lh-air i { width: 4px; height: 10px; border-radius: 2px; background: var(--tint); opacity: .25; animation: lh-flow 1.2s ease-in-out infinite; }
.lh-air i:nth-child(2) { animation-delay: .2s; } .lh-air i:nth-child(3) { animation-delay: .4s; }
.lh-air.boost i { animation-duration: .7s; } .lh-air.less i { animation: none; opacity: .15; }
@keyframes lh-flow { 50% { opacity: 1; transform: translateY(-3px); } }
.lh-who { font-size: 11px; font-weight: 700; color: #fff; background: var(--indigo, #5856D6); border-radius: 9px; padding: 1px 6px; letter-spacing: 1px; }
.lh-do { position: relative; font-size: 12px; color: var(--orange-ink); font-weight: 600; margin-top: 2px; }
body.calm *, body.calm *::before, body.calm *::after { animation: none !important; transition: none !important; }
body.calm .kmark.play .k-dot, body.calm .kmark.play .k-core { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .lh-tile.sunny .lh-sun, .lh-fan, .lh-air i { animation: none; } }

/* ---------- accessibility ---------- */
h1.large-title { margin: 0; }
.sheet .sheet-nav h2.t { margin: 0; font-size: 17px; font-weight: 600; outline: none; text-align: center; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar button { color: var(--label-2); }
:focus-visible { outline: 3px solid var(--tint-ink); outline-offset: 2px; border-radius: 8px; }
.cell:focus-visible, .cell input:focus-visible, .cell select:focus-visible { outline-offset: -3px; }
.switch input:focus-visible + span { outline: 3px solid var(--tint-ink); outline-offset: 2px; }
.cell select:focus-visible { opacity: 1; background: transparent; color: transparent; }
/* the open list takes its text colour from the select; keep the choices readable when the select itself is see-through */
select option, select optgroup { color: CanvasText; background-color: Canvas; }
.read-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--tint-ink); background: color-mix(in srgb, var(--tint) 13%, transparent); }
.read-btn svg { width: 19px; height: 19px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Text size: the whole interface scales, and layouts reflow to the narrower width. */
html:not([data-text="1"]) .screen, html:not([data-text="1"]) .sheet, html:not([data-text="1"]) .tabbar, html:not([data-text="1"]) .toast { zoom: var(--zoom, 1); }

/* Reduce motion: the phone setting or the app setting. */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }

/* Higher contrast: the phone setting or the app setting. */
html[data-contrast="more"] { --label-2: var(--label); --label-3: rgba(60, 60, 67, .75); --sep: rgba(60, 60, 67, .7); --fill: rgba(120, 120, 128, .22); --fill-strong: rgba(80, 80, 88, .55); --bar: var(--bg-elev); --tint: #0040A0; --tint-ink: #003A92; --orange-ink: #7A3500; --green-ink: #0F5523; --red-ink: #8E0012; }
@media (prefers-color-scheme: dark) { html[data-contrast="more"] { --label-3: rgba(235, 235, 245, .7); --sep: rgba(235, 235, 245, .55); --fill: rgba(118, 118, 128, .4); --fill-strong: rgba(170, 170, 180, .6); --tint: #409CFF; --tint-ink: #8CC4FF; --orange-ink: #FFC266; --green-ink: #7AE89A; --red-ink: #FF9C95; } }
html[data-contrast="more"] .group, html[data-contrast="more"] .chart-card, html[data-contrast="more"] .card, html[data-contrast="more"] .banner { outline: 1.5px solid var(--sep); outline-offset: -1.5px; }
html[data-contrast="more"] .navbar, html[data-contrast="more"] .navbar.scrolled, html[data-contrast="more"] .tabbar { -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-contrast="more"] .switch span { box-shadow: inset 0 0 0 1.5px var(--label-2); }
html[data-contrast="more"] .switch input:checked + span { box-shadow: none; background: var(--green-ink); }
html[data-contrast="more"] .fb-pill, html[data-contrast="more"] .read-btn, html[data-contrast="more"] .stepper, html[data-contrast="more"] .segmented { box-shadow: inset 0 0 0 1.5px currentColor; }
html[data-contrast="more"] a { text-decoration: underline; }
html[data-contrast="more"] .cell .chev { opacity: .8; }
@media (prefers-contrast: more) { :root { --label-2: rgba(60, 60, 67, .9); --sep: rgba(60, 60, 67, .6); } }
@media (prefers-contrast: more) and (prefers-color-scheme: dark) { :root { --label-2: rgba(235, 235, 245, .9); --sep: rgba(235, 235, 245, .5); } }
@media (forced-colors: active) { .switch span { border: 2px solid CanvasText; } .switch input:checked + span { background: Highlight; } .badge-icon { forced-color-adjust: none; } }

/* Larger buttons: rows, buttons and switches grow; spacing between them grows. */
html[data-targets="big"] .cell { min-height: 60px; padding-top: 14px; padding-bottom: 14px; }
html[data-targets="big"] .stepper { height: 48px; }
html[data-targets="big"] .stepper button { width: 60px; font-size: 26px; }
html[data-targets="big"] .stepper button + button { margin-left: 6px; }
html[data-targets="big"] .segmented button { height: 44px; font-size: 15px; }
html[data-targets="big"] .switch { transform: scale(1.2); margin: 0 6px; }
html[data-targets="big"] .navbar .action, html[data-targets="big"] .sheet .sheet-nav button { min-height: 52px; min-width: 72px; }
html[data-targets="big"] .sheet .sheet-nav { height: 60px; }
html[data-targets="big"] .tabbar { padding-top: 10px; }
html[data-targets="big"] .tabbar button { font-size: 12px; min-height: 56px; }
html[data-targets="big"] .tabbar button svg { width: 30px; height: 30px; }
html[data-targets="big"] .fb-pill { padding: 12px 16px; }
html[data-targets="big"] .read-btn, html[data-targets="big"] .search-btn { width: 48px; height: 48px; }
html[data-targets="big"] button:not(.cell):not(.tabbar button) { min-height: 44px; }
html[data-targets="big"] .screen { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }

.sheet .sheet-nav .nav-sp { min-width: 64px; }
html:not([data-text="1"]) .sheet .sheet-nav { height: auto; min-height: 50px; }
html:not([data-text="1"]) .sheet .sheet-nav h2.t { white-space: normal; overflow: visible; line-height: 1.15; }
html:not([data-text="1"]) .sheet .sheet-nav .nav-sp { min-width: 0; }
/* Largest text sizes: three columns no longer fit, so the Stats flow runs top to bottom, and a label beside a
   segmented control goes above it. */
html[data-text="1.5"] .flow, html[data-text="1.75"] .flow { grid-template-columns: 1fr; gap: 4px; }
html[data-text="1.5"] .flow .arrow, html[data-text="1.75"] .flow .arrow { transform: rotate(90deg); }
html[data-text="1.5"] .cell:has(> .segmented), html[data-text="1.75"] .cell:has(> .segmented) { flex-wrap: wrap; }
html[data-text="1.5"] .cell > .segmented, html[data-text="1.75"] .cell > .segmented { flex-basis: 100%; }

.why-btn { min-height: 24px; }

/* ---------------------------------------------------------------- 0.6.0 layout: a status card first, sections with "View all ›"
   (structure after well-known device apps: the thing's state at a glance, a row of big numbers, then sections). */
.status-card { margin: 4px 16px 6px; padding: 16px; border-radius: 18px; background: var(--bg-elev); display: grid; gap: 14px; }
.sc-head { display: flex; align-items: center; gap: 12px; }
.sc-head .kmark { flex: none; }
.sc-head b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.sc-state { display: block; font-size: 15px; font-weight: 600; margin-top: 1px; }
.sc-go { width: 32px; height: 32px; display: grid; place-items: center; color: var(--label-3); }
.sc-go svg { width: 9px; height: 15px; }
.sc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: .5px solid var(--sep); padding-top: 14px; }
.sc-tile { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 0 4px; min-width: 0; overflow-wrap: anywhere; }
.sc-tile + .sc-tile { border-left: .5px solid var(--sep); }
.sc-ic { width: 22px; height: 22px; color: var(--label-3); }
.sc-ic svg { width: 22px; height: 22px; }
.sc-v { font-size: 32px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.sc-v small { font-size: 14px; font-weight: 500; color: var(--label-2); margin-left: 1px; letter-spacing: 0; }
.sc-l { font-size: 12px; color: var(--label-2); line-height: 1.25; }
.sc-todo { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--fill); font-size: 16px; color: var(--label); text-align: left; }
.sc-todo b { color: var(--orange-ink); font-weight: 700; }
.sc-todo span { width: 8px; height: 13px; color: var(--label-3); display: grid; }
.sc-todo .sc-first { width: auto; height: auto; display: inline; color: var(--label); font-weight: 600; }   /* 0.6.144: the first thing to do, named */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sec-link { text-transform: none; font-size: 15px; color: var(--tint-ink); letter-spacing: 0; padding: 4px 0; min-height: 28px; }
.more-info { margin: 6px 32px 0; color: var(--label-2); font-size: 13px; }
.more-info summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--label-3); min-height: 32px; }
.more-info summary::-webkit-details-marker { display: none; }
.more-info summary svg { width: 15px; height: 15px; }
.more-info[open] summary { color: var(--label-2); }
.more-info > div { padding: 2px 0 6px; line-height: 1.4; }
.lh-sunw { position: relative; font-size: 13px; font-weight: 600; color: var(--label-2); }
.lh-tile.sunny .lh-sunw { color: var(--orange-ink); }
.proto-tag { color: var(--label-2); background: var(--fill); font-weight: 600; letter-spacing: .3px; line-height: 1.5; padding: 1px 7px; border-radius: 999px; top: -8px; font-size: 10px; }
.fb-pill { font-size: 13px; padding: 4px 10px; }
.sc-todo em { font-style: normal; }

/* Activity timeline (0.6.1) */
.act-row { align-items: flex-start; gap: 12px; }
.act-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); margin-top: 1px; }
.act-ic svg { width: 18px; height: 18px; }
.act-filters { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 2px; scrollbar-width: none; }
.act-filters::-webkit-scrollbar { display: none; }
.act-filters .tag { margin: 0; padding: 8px 14px; font-size: 14px; white-space: nowrap; }
.act-filters .tag[aria-pressed="true"] { background: color-mix(in srgb, var(--tint) 18%, transparent); color: var(--tint-ink); }
.sc-go.sc-act svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- 0.6.2 look: slate widget surfaces, light large numbers, room tiles as device
   tiles (icon top-left, › top-right, name and state bottom-left), a forecast strip with thin dividers. */
:root { --slate: #E9ECF2; --slate-2: #FFFFFF; --slate-ink: var(--label); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --slate: #262A33; --slate-2: #353A46; } }
:root[data-theme="dark"] { --slate: #262A33; --slate-2: #353A46; }
.status-card { background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 10%, var(--bg-elev)), var(--bg-elev) 55%); border-radius: 26px; padding: 18px 18px 16px; }
.sc-v { font-weight: 300; font-size: 40px; letter-spacing: -.04em; }
.sc-v small { font-weight: 400; }
.sc-head b { font-weight: 600; }
.widget { margin: 18px 16px 4px; padding: 14px; border-radius: 26px; background: var(--slate); }
.widget-head { display: flex; align-items: center; gap: 10px; padding: 2px 4px 12px; font-size: 17px; font-weight: 600; }
.widget-ic { width: 24px; height: 24px; color: var(--tint-ink); display: grid; }
.widget-ic svg { width: 24px; height: 24px; }
.widget .live-house { margin: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 340px) { .widget .live-house { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.widget .lh-tile { min-height: 132px; border-radius: 20px; background: var(--slate-2); box-shadow: none; padding: 12px; justify-content: space-between; gap: 6px; }
.lh-top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.lh-top .lh-icons { margin: 0; flex-wrap: wrap; row-gap: 4px; }
.lh-ic { width: 20px; height: 20px; display: grid; color: var(--label-2); }
.lh-ic svg { width: 20px; height: 20px; }
.lh-chev { width: 8px; height: 13px; color: var(--label-3); display: grid; margin-top: 3px; }
.lh-bottom { position: relative; display: grid; gap: 1px; min-width: 0; }
.widget .lh-name { font-size: 15px; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lh-status { font-size: 13px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget .lh-temp { display: inline; font-size: 13px; font-weight: 600; color: var(--label); }
.widget .lh-sunw { font-size: 13px; font-weight: 500; }
.widget .lh-do { font-size: 12px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lh-tile.quiet .lh-name, .lh-tile.quiet .lh-status { color: var(--label-2); }
.lh-tile.quiet .lh-ic, .lh-tile.quiet .lh-blinds { opacity: .6; }
.fc-strip { margin: 12px 16px 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 22px; padding: 12px 4px; background: linear-gradient(180deg, color-mix(in srgb, #3A86D6 26%, var(--bg-elev)), color-mix(in srgb, #3A86D6 12%, var(--bg-elev))); }
.fc-day { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 0 4px; }
.fc-day + .fc-day { border-left: .5px solid color-mix(in srgb, var(--label) 18%, transparent); }
.fc-l { font-size: 13px; color: var(--label-2); }
.fc-t { font-size: 15px; font-weight: 300; letter-spacing: -.01em; }
.fc-t b { font-weight: 600; }
.fc-i { width: 26px; height: 26px; color: var(--orange-ink); display: grid; }
.fc-i svg { width: 26px; height: 26px; }

.sc-v.none, .tn-none { color: var(--label-3); font-weight: 200; }
.widget-head .grow { flex: 1; min-width: 0; }

.widget-head .grow { flex: 1; min-width: 0; }
/* Backdrop (0.6.2): the lagoon illustration or the person's photo behind every screen, with a scrim for legibility. */
#app-bg { position: fixed; inset: 0; z-index: -1; background: center 62% / cover no-repeat; pointer-events: none; }
/* Plain: a soft sky-blue wash at the top fading to the usual grey (after the Smart Life app) */
#app-bg.plain { background: linear-gradient(180deg, #D6E7F8 0%, #E6EEF7 22%, #F2F2F7 48%); }
#app-bg.plain::after { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #app-bg.plain { background: linear-gradient(180deg, #17243A 0%, #0E141F 26%, #000 52%); } }
:root[data-theme="dark"] #app-bg.plain { background: linear-gradient(180deg, #17243A 0%, #0E141F 26%, #000 52%); }
#app-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(242, 242, 247, .42) 0%, rgba(242, 242, 247, .5) 38%, rgba(242, 242, 247, .64) 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #app-bg::after { background: linear-gradient(180deg, rgba(0, 0, 0, .12) 0%, rgba(0, 0, 0, .3) 38%, rgba(0, 0, 0, .45) 100%); } }
:root[data-theme="dark"] #app-bg::after { background: linear-gradient(180deg, rgba(0, 0, 0, .12) 0%, rgba(0, 0, 0, .3) 38%, rgba(0, 0, 0, .45) 100%); }
html[data-contrast="more"] #app-bg { display: none; }
body.has-bg, body.has-bg #app { background: transparent; }
/* Text that sits straight on the backdrop gets a little more weight. */
body.has-bg .section-header, body.has-bg .section-footer, body.has-bg .more-info { text-shadow: 0 1px 2px color-mix(in srgb, var(--bg) 70%, transparent); }
body.has-bg .section-header { color: var(--label); font-weight: 600; }
body.has-bg .widget { background: color-mix(in srgb, var(--slate) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* House at a glance (0.6.3): summaries and rooms by floor, after Home Assistant's Overview */
.sec-plain{text-transform:none;font-size:20px;font-weight:600;letter-spacing:0;color:var(--label);margin-top:22px}
.floor-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.floor-head svg{width:22px;height:22px;flex:none}
.sum-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 16px}
.sum-tile{display:flex;align-items:center;gap:12px;text-align:left;padding:14px;border:1px solid var(--sep);border-radius:16px;background:var(--slate-2);color:var(--label);font:inherit;min-height:68px}
.sum-tile b{display:block;font-size:16px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sum-tile .grow{min-width:0}
.sum-tile .grow>span{display:block;font-size:14px;color:var(--label-2);margin-top:2px;line-height:1.25}
.sum-ic{width:28px;height:28px;flex:none}
.area-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 16px}
.area-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;height:112px;padding:10px 6px;border:1px solid var(--sep);border-radius:16px;background:var(--slate-2);color:var(--label);font:inherit;text-align:center}
.area-tile b{font-size:15px;font-weight:600;line-height:1.2}
.area-tile .area-sub{font-size:13px;color:var(--label-2);min-height:16px}
.area-ic{width:34px;height:34px;color:var(--tint)}
.area-ic svg,.sum-ic svg{width:100%;height:100%}
.area-tile.add{border-style:dashed;background:transparent}
.area-tile.add .area-ic{color:var(--label-2)}
body.has-bg .sum-tile,body.has-bg .area-tile:not(.add){-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}

/* Sensor cards (0.6.3), after the Smart Life device card */
.dev-list{display:grid;gap:10px;margin:0 16px}
.dev-card{display:block;text-align:left;width:100%;padding:16px;border:1px solid var(--sep);border-radius:18px;background:var(--slate-2);color:var(--label);font:inherit}
.dev-head{display:flex;align-items:center;gap:12px}
.dev-head b{display:block;font-size:17px;font-weight:600}
.dev-ic{width:44px;height:44px;border-radius:12px;background:var(--fill);display:grid;place-items:center;flex:none;color:var(--label-2)}
.dev-ic svg{width:24px;height:24px}
.dev-when{display:block;font-size:14px;color:var(--label-2);margin-top:2px}
.dev-when.warn{color:var(--orange)}
.dev-off{border-color:var(--orange)}
.dev-off .dev-ic{color:var(--orange)}
.dev-vals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:14px;text-align:center}
.dev-vals>span{display:flex;flex-direction:column;align-items:center;gap:4px}
.dev-vals i{width:24px;height:24px;color:var(--label-2)}
.dev-vals i svg{width:100%;height:100%}
.dev-vals b{font-size:20px;font-weight:600}
.dev-vals small{font-size:12px;color:var(--label-2)}
.dev-badge{font-size:13px;font-weight:600;color:#fff;background:var(--orange);border-radius:999px;padding:2px 9px;margin-left:4px}
body.has-bg .dev-card{-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
/* One clear action on an empty screen */
.pill-btn{display:block;margin:18px auto 0;padding:13px 30px;border:0;border-radius:999px;background:var(--label);color:var(--bg, #fff);font:inherit;font-size:17px;font-weight:600}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .pill-btn{background:#fff;color:#000}}
:root[data-theme="dark"] .pill-btn{background:#fff;color:#000}

/* Your house in the sun (0.6.8) */
.lh3d-card{margin:0 16px;border-radius:20px;overflow:hidden;background:var(--slate-2);border:1px solid var(--sep)}
.lh3d-slot{position:relative;height:300px;background:linear-gradient(#8fc3ea,#cfe6f4 60%,#5cc6d6 61%,#2a8fc4)}
.lh3d-view{position:absolute;inset:0;touch-action:none}
.lh3d-view canvas{display:block;width:100%;height:100%}
.lh3d-bar{display:flex;align-items:center;gap:10px;padding:10px 12px 4px}
.lh3d-bar input[type=range]{flex:1;accent-color:var(--orange)}
.lh3d-btn{min-width:44px;height:36px;border-radius:999px;border:1px solid var(--sep);background:var(--fill);color:var(--label);font:inherit;font-weight:600;padding:0 12px}
.lh3d-btn.now.on{background:var(--tint);color:#fff;border-color:transparent}
.lh3d-row{display:flex;align-items:center;gap:8px;padding:2px 12px 10px}
.lh3d-note{flex:1;font-size:14px;color:var(--label-2);line-height:1.3}
.lh3d-row input[type=date]{font:inherit;font-size:14px;color:var(--label);background:var(--fill);border:0;border-radius:10px;padding:6px 8px}
.lh3d-plan{border-top:1px solid var(--sep);border-radius:0;background:transparent}
.fp-wrap{margin:0 16px;background:var(--slate-2);border-radius:16px;border:1px solid var(--sep);padding:8px}
.fp-svg{width:100%;height:auto;max-height:60vh;display:block;touch-action:none;user-select:none}
.fp-room{fill:rgba(10,132,255,.10);stroke:var(--tint);stroke-width:3.5;cursor:move}
.fp-below{fill:none;stroke:var(--label-3);stroke-width:2.5;stroke-dasharray:10 8}
.fp-win{stroke:#0a84ff;stroke-width:9;stroke-linecap:round}
.fp-name{font-size:19px;font-weight:600;fill:var(--label);text-anchor:middle;pointer-events:none}
.fp-dim{font-size:14px;fill:var(--label-2);text-anchor:middle;pointer-events:none}
.fp-handle{fill:var(--tint);cursor:nwse-resize}
.fp-north path{fill:var(--orange)} .fp-north text{font-size:18px;font-weight:700;fill:var(--label);text-anchor:middle}

.lh3d-btn.on{background:var(--tint);color:#fff;border-color:transparent}
.lh3d-chip{position:absolute;left:10px;right:10px;bottom:10px;display:flex;align-items:center;gap:10px;padding:10px 12px;border:0;border-radius:14px;background:rgba(255,255,255,.9);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);color:#1c1c1e;font:inherit;text-align:left;box-shadow:0 4px 16px rgba(0,0,0,.18)}
.lh3d-chip b{display:block;font-size:16px}
.lh3d-chip .grow>span{display:block;font-size:13px;color:#545458}
.lh3d-chip-ic{width:30px;height:30px;color:var(--tint);flex:none}
.lh3d-chip-ic svg,.lh3d-chip svg{width:100%;height:100%}
.lh3d-chip>svg{width:14px;height:14px;flex:none;color:#8e8e93}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .lh3d-chip{background:rgba(44,44,46,.9);color:#f2f2f7}:root:not([data-theme="light"]) .lh3d-chip .grow>span{color:#aeaeb2}}
:root[data-theme="dark"] .lh3d-chip{background:rgba(44,44,46,.9);color:#f2f2f7}

/* Compact weather card (0.6.9): frosted over the background, which itself shows the sun */
.wx{margin:4px 16px 0;padding:16px 18px;border-radius:22px;display:flex;gap:14px;align-items:flex-end;justify-content:space-between;
  background:rgba(255,255,255,.62);-webkit-backdrop-filter:blur(18px) saturate(1.3);backdrop-filter:blur(18px) saturate(1.3);border:1px solid rgba(255,255,255,.5);color:var(--label)}
.wx .place{font-size:15px;font-weight:600;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.wx .chip{font-size:12px;font-weight:600;background:var(--fill);padding:2px 8px;border-radius:20px}
.wx-temp{font-family:var(--display);font-size:56px;font-weight:200;line-height:1;margin-top:4px;letter-spacing:-1px}
.wx .cond{font-size:15px;font-weight:500;margin-top:2px}
.wx-side{text-align:right;font-size:14px;color:var(--label-2);line-height:1.55}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .wx{background:rgba(28,28,30,.6);border-color:rgba(255,255,255,.08)}}
:root[data-theme="dark"] .wx{background:rgba(28,28,30,.6);border-color:rgba(255,255,255,.08)}
/* sunrise and sunset light over the background (backdrop.js sets --golden 0..1) */
#app-bg::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,150,80,.0) 0%,rgba(255,140,70,.55) 45%,rgba(255,120,90,.25) 100%);opacity:var(--golden,0);mix-blend-mode:soft-light;pointer-events:none}

/* Messages that lead somewhere: a chevron, and the whole message is tappable */
.toast.go{cursor:pointer;padding-right:12px}
.toast .toast-msg{min-width:0}
.toast-go{display:inline-flex;align-items:center;gap:4px;margin-left:6px;color:var(--tint);font-weight:600;flex:none}
.toast-go svg{width:14px;height:14px}
.toast{touch-action:none}
.toast-btn{all:unset;display:flex;gap:8px;align-items:center;cursor:pointer;min-width:0}
.toast-btn:focus-visible{outline:2px solid var(--tint);outline-offset:4px;border-radius:12px}
/* room video: full-screen camera and the frames kept */
.rv { position: fixed; inset: 0; z-index: 200; background: #000; color: #fff; display: flex; flex-direction: column; }
.rv video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rv-top { position: relative; padding: calc(env(safe-area-inset-top) + 14px) 16px 10px; background: linear-gradient(180deg, rgba(0,0,0,.6), transparent); display: grid; gap: 8px; }
.rv-tip { font-size: 15px; line-height: 1.35; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.rv-ring { justify-self: start; font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.45); }
.rv-ring:empty { display: none; }
.rv-bar { position: relative; margin-top: auto; padding: 18px 24px calc(env(safe-area-inset-bottom) + 22px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: linear-gradient(0deg, rgba(0,0,0,.6), transparent); }
.rv-cancel { justify-self: start; color: #fff; font-size: 17px; }
.rv-time { justify-self: end; font-size: 17px; }
.rv-rec { width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; }
.rv-rec span { width: 56px; height: 56px; border-radius: 50%; background: #FF3B30; transition: all .2s; }
.rv-rec.on span { width: 28px; height: 28px; border-radius: 6px; }
.rv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 16px 0; }
.rv-grid figure { margin: 0; position: relative; }
.rv-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.rv-grid figcaption { position: absolute; left: 4px; bottom: 4px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(0,0,0,.55); padding: 1px 5px; border-radius: 5px; }
/* House: ways to add a room, side by side on wide screens, stacked on phones, same size */
.add-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin: 14px 16px 0; }
.hero.add-card { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0; text-align: left; min-height: 112px; padding: 18px; border: 0; font: inherit; color: #fff; box-shadow: 0 10px 30px rgba(10,132,255,.25); }
.add-card .add-ic { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.2); display: grid; place-items: center; flex: none; }
.add-card .add-ic span { width: 30px; height: 30px; display: block; }
.add-card .add-tx { flex: 1; display: grid; gap: 3px; }
.add-card .add-tx b { font-size: 20px; letter-spacing: .2px; }
.add-card .add-tx span { font-size: 14.5px; opacity: .92; line-height: 1.3; }
.add-card .add-chev { width: 10px; height: 16px; opacity: .8; flex: none; }
.qr-box { margin: 12px auto 0; width: min(78vw, 300px); aspect-ratio: 1; background: #fff; border-radius: 16px; padding: 6px; }
.qr-box svg { width: 100%; height: 100%; display: block; }
/* an icon placed straight in a row (the tick on a chosen option, Already installed, a set location) */
.cell > svg:not(.chev) { width: 20px; height: 20px; flex: none; color: var(--tint-ink); }
.fp-door{stroke:#8A5A44;stroke-width:11;stroke-linecap:butt}
.fp-door.in{stroke-dasharray:8 6}
.fp-win{cursor:grab}
[data-fp].sel .fp-room{fill:rgba(10,132,255,.24);stroke-width:5}
.read-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 16px; }
.read-row .btn { margin: 0; width: 100%; height: 48px; font-size: 15px; gap: 6px; padding: 0 6px; }
.read-row .btn svg { width: 18px; height: 18px; flex: none; }
.segmented.home-ask button { height: 40px; font-size: 16px; font-weight: 600; }
.segmented.home-ask button.on { background: var(--tint); color: #fff; }
/* House: a short question card (rooms added; outside not read yet) */
.ask-card { display: flex; gap: 14px; margin: 14px 16px 0; padding: 16px; border-radius: 20px; background: var(--bg-elev); box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--tint) 22%, transparent); }
.ask-card .ask-ic { width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #0E9F8E, #0A84FF); }
.ask-card .ask-ic svg { width: 24px; height: 24px; }
.ask-card .ask-tx { flex: 1; min-width: 0; display: grid; gap: 4px; }
.ask-card .ask-tx b { font-size: 17px; }
.ask-card .ask-tx > span { font-size: 14px; color: var(--label-2); line-height: 1.35; }
.ask-card .ask-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ask-card .ask-btns button { height: 36px; padding: 0 16px; border-radius: 18px; font-size: 15px; font-weight: 600; background: var(--fill); color: var(--tint-ink); }
.ask-card .ask-btns button.main { background: var(--tint); color: #fff; }
/* House tab folds */
.fold-row .fold-chev { width: 8px; height: 14px; opacity: .45; transition: transform .2s; display: inline-flex; }
.fold-row.open .fold-chev { transform: rotate(90deg); }
.fold-row .sub .warn { color: var(--orange-ink); font-weight: 600; }
.fold-body { margin-top: 4px; }
.fold-body > .section-header:first-child, .fold-body > .sec-plain:first-child { display: none; }
.sc-todo span svg { transition: transform .2s; }
.sc-todo.open span svg { transform: rotate(90deg); }
.sc-todo + .sc-todo { margin-top: 8px; }
.lh3d-cloud{font-size:13px;color:var(--label-2);line-height:1.35;padding:0 12px 12px}
.lh3d-cloud b{color:var(--label);font-weight:600}
.lh3d-cloud span{display:block;margin-top:3px}
.lh3d-cloud details{margin-top:4px;color:var(--label-2)}
.lh3d-cloud summary{cursor:pointer;color:var(--label-2);text-decoration:underline;min-height:24px}
/* "?" explanations (0.6.37) */
.qtip { display: inline-grid; place-items: center; width: 20px; height: 20px; min-width: 20px; border-radius: 50%; border: 1.5px solid currentColor; color: var(--tint-ink); background: transparent; font: 700 12px/1 -apple-system, system-ui, sans-serif; vertical-align: middle; margin-left: 4px; padding: 0; cursor: pointer; text-transform: none; letter-spacing: 0; position: relative; }
.qtip::after { content: ''; position: absolute; inset: -12px; }   /* a 44-px tap target around the small circle */
.qtip[aria-expanded="true"] { background: var(--tint-ink); color: var(--bg-elev, #fff); }
.tip-pop { position: absolute; z-index: 9000; background: var(--bg-elev, #fff); color: var(--label); border-radius: 14px; padding: 12px 14px; box-shadow: 0 8px 30px rgba(0,0,0,.28); font-size: 14px; line-height: 1.4; }
.tip-pop b { display: block; margin-bottom: 4px; font-size: 15px; }
.tip-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
/* Energy page (0.6.38): status card at the top, daily bars, tiles for the rest */
.en-hero { background: linear-gradient(160deg, color-mix(in srgb, var(--orange) 14%, var(--bg-elev)), color-mix(in srgb, var(--tint) 8%, var(--bg-elev)) 45%, var(--bg-elev) 75%); }
.en-spark { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 4px; height: 56px; padding: 0 2px; }
.en-bar { height: var(--h); border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--orange), color-mix(in srgb, var(--orange) 55%, var(--tint))); opacity: .75; transform-origin: bottom; animation: en-grow .7s cubic-bezier(.2,.8,.2,1) both; }
.en-bar.last { opacity: 1; box-shadow: 0 0 0 2px color-mix(in srgb, var(--orange) 35%, transparent); }
.en-bar:nth-child(n) { animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes en-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.en-spark-l { display: flex; justify-content: space-between; font-size: 11px; color: var(--label-2); margin-top: -8px; }
.en-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.en-tile { position: relative; overflow: hidden; display: grid; align-content: start; gap: 4px; min-height: 104px; padding: 12px; border-radius: 18px; text-align: left; font: inherit; color: var(--label); background: var(--bg-elev); border: 0; }
.en-tile::before { content: ''; position: absolute; inset: auto -30% -55% auto; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c1) 38%, transparent), transparent 70%); pointer-events: none; }
.en-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); margin-bottom: 4px; }
.en-ic svg { width: 19px; height: 19px; }
.en-t { font-size: 15px; font-weight: 600; line-height: 1.2; }
.en-v { font-size: 13px; color: var(--label-2); line-height: 1.25; }
.en-tile.open { box-shadow: inset 0 0 0 2px var(--tint); }
.en-open { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .en-bar { animation: none; } }
.en-hero .sc-go svg { width: 20px; height: 20px; }
/* attached homes (0.6.39): the unit outline, the space not measured, shared walls */
.fp-unit { stroke: var(--label-2); stroke-width: 3; stroke-dasharray: 10 6; }
.fp-hatch-bg { fill: var(--fill); }
.fp-hatch-ln { stroke: var(--label-3); stroke-width: 3; }
.fp-um { font-size: 20px; font-weight: 600; fill: var(--label-2); }
.fp-shared { stroke: var(--label); stroke-width: 9; stroke-linecap: square; }
/* compared with other homes (0.6.39) */
.en-cmp-head { font-size: 17px; padding: 0 4px 10px; color: var(--label-2); }
.en-cmp-head b { color: var(--label); font-weight: 700; }
.en-cmp-head b.more { color: var(--orange-ink); } .en-cmp-head b.less { color: var(--green-ink); }
.en-cmp-rows { display: grid; gap: 8px; padding: 0 4px; }
.en-cmp-row { display: grid; grid-template-columns: minmax(0, 42%) 1fr auto; align-items: center; gap: 8px; font-size: 13px; color: var(--label-2); }
.en-cmp-l { line-height: 1.2; }
.en-cmp-bar { height: 10px; border-radius: 5px; background: var(--fill); overflow: hidden; }
.en-cmp-bar i { display: block; height: 100%; width: var(--w); border-radius: 5px; background: var(--label-3); transform-origin: left; animation: en-grow-x .8s cubic-bezier(.2,.8,.2,1) both; }
.en-cmp-row.you { color: var(--label); font-weight: 600; } .en-cmp-row.you .en-cmp-bar { height: 14px; border-radius: 7px; } .en-cmp-row.you .en-cmp-bar i { background: linear-gradient(90deg, var(--orange), color-mix(in srgb, var(--orange) 50%, var(--tint))); }
.en-cmp-row.like .en-cmp-bar i { background: var(--tint); }
.en-cmp-v { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.en-cmp-f { font-size: 12px; color: var(--label-2); padding: 10px 4px 2px; line-height: 1.35; }
@keyframes en-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .en-cmp-bar i { animation: none; } }
/* things that don't line up (0.6.39) */
.lh3d-conf { border-top: .5px solid var(--sep); }
.lh3d-conf-ic { width: 26px; height: 26px; border-radius: 50%; background: var(--red, #FF3B30); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; margin-right: 10px; }
.lh3d-conf .sub { color: var(--label-2); }
.lh3d-conf.open .fold-chev { transform: rotate(90deg); }
.lh3d-conf .fold-chev { width: 8px; height: 14px; opacity: .45; transition: transform .2s; display: inline-flex; }
.lh3d-conf-list { border-top: .5px solid var(--sep); }
/* thermostat control (0.6.40) */
.tc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 12px 0 4px; }
.tc-modes button { font-size: 14px; }
.tc-sets { display: flex; gap: 10px; }
.tc-set { flex: 1; display: grid; justify-items: center; gap: 4px; padding: 8px; border-radius: 14px; background: var(--fill); }
.tc-l { font-size: 13px; font-weight: 600; }
.tc-row { display: flex; align-items: center; gap: 14px; }
.tc-b { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-elev); color: var(--label); font-size: 24px; font-weight: 500; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.tc-v { font-size: 34px; font-weight: 300; min-width: 64px; text-align: center; letter-spacing: -.03em; }
.tc-state { min-height: 16px; text-align: center; }
/* 0.6.90: fits at every text size: the mode buttons fill the card (no side margin) and wrap their words; the Heat to and
   Cool to boxes sit side by side when there is room and stack when there is not */
.tc-modes { margin: 0; }
.tc-modes button { min-width: 0; height: auto; min-height: 32px; padding: 4px 2px; line-height: 1.15; white-space: normal; overflow-wrap: normal; }
.tc-sets { flex-wrap: wrap; }
.tc-set { flex: 1 1 150px; min-width: 0; }
.tc-row { gap: 8px; justify-content: center; width: 100%; }
.tc-b { flex: none; }
.tc-v { min-width: 0; font-size: clamp(26px, 8vw, 34px); }
/* electricity price (0.6.43) */
.en-parts { display: grid; gap: 8px; padding: 0 4px; }
.en-part { display: grid; gap: 1px; font-size: 13px; color: var(--label-2); line-height: 1.35; }
.en-part b { font-size: 14px; color: var(--label); font-weight: 600; }
.en-billtab { display: grid; font-size: 13px; margin-top: 6px; background: var(--bg-elev); border-radius: 12px; overflow: hidden; }
.en-bt-h, .en-bt-r { display: grid; grid-template-columns: 1.4fr .7fr 1.3fr .9fr; gap: 6px; padding: 7px 10px; align-items: baseline; }
.en-bt-h { color: var(--label-2); font-weight: 600; font-size: 12px; border-bottom: .5px solid var(--sep); }
.en-bt-r + .en-bt-r { border-top: .5px solid var(--sep); }
.en-bt-r small { display: block; color: var(--label-2); font-size: 11px; }
.en-bt-r.low span:last-child { color: var(--orange-ink); font-weight: 600; }
.en-price .fold-row { background: var(--bg-elev); }
/* what's missing (0.6.43) */
.miss { margin: 10px 16px; padding: 10px 12px; border-radius: 18px; background: var(--bg-elev); border: 1px dashed var(--sep); }
.miss-h { font-size: 13px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .03em; padding: 2px 0 6px; }
.miss-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.miss-row + .miss-row { border-top: .5px solid var(--sep); }
.miss-ic { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--tint) 16%, transparent); color: var(--tint-ink); font-weight: 700; }
.miss-row b { display: block; font-size: 15px; font-weight: 600; }
.miss-g { display: block; font-size: 13px; color: var(--label-2); line-height: 1.35; margin-top: 1px; }
.widget .miss, .fold-body .miss { margin: 10px 0; }
/* checking a reading; comparing readings (0.6.44) */
.rvw-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; scroll-snap-type: x proximity; }
.rvw-strip figure { margin: 0; flex: none; width: 46vw; max-width: 220px; scroll-snap-align: start; }
.rvw-img { position: relative; border-radius: 12px; overflow: hidden; background: var(--fill); }
.rvw-img img { display: block; width: 100%; height: auto; }
.rvw-strip figcaption { font-size: 12px; color: var(--label-2); text-align: center; margin-top: 3px; }
.rvw-dot { position: absolute; transform: translate(-50%, -50%); min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--tint); color: #fff; font: 700 12px/22px -apple-system, system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.4); }
.rvw-dot.k-door { background: #A2845E; } .rvw-dot.k-register { background: #30B0C7; } .rvw-dot.k-fireplace { background: #FF453A; } .rvw-dot.k-thermostat { background: #5E5CE6; }
.rvw-dot.off { background: #8E8E93; text-decoration: line-through; opacity: .8; }
.rvw-dot.sel { outline: 3px solid #FFD60A; }
.rvw-item { align-items: flex-start; gap: 10px; }
.rvw-item.off .grow { opacity: .55; }
.rvw-item.sel { background: color-mix(in srgb, var(--tint) 10%, transparent); }
.rvw-n { width: 24px; height: 24px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--tint); color: #fff; font-weight: 700; font-size: 12px; margin-top: 4px; }
.rvw-n.k-door { background: #A2845E; } .rvw-n.k-register { background: #30B0C7; } .rvw-n.k-fireplace { background: #FF453A; } .rvw-n.k-thermostat { background: #5E5CE6; } .rvw-n.k-fan { background: #8E8E93; }
.rvw-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rvw-row select, [data-rvwaf], [data-rvwak] { font: inherit; font-size: 15px; color: var(--label); background: var(--fill); border: 0; border-radius: 10px; padding: 6px 8px; }
.rd-card { margin: 0 16px; padding: 10px 12px; border-radius: 16px; background: var(--bg-elev); overflow-x: auto; }
.rd-head, .rd-row { display: grid; grid-template-columns: minmax(96px, 1.4fr) repeat(4, 28px) 34px 34px 34px minmax(80px, 1.2fr); gap: 4px; align-items: baseline; font-size: 13px; min-width: 460px; }
.rd-head { color: var(--label-2); font-size: 11px; font-weight: 600; text-transform: uppercase; padding-bottom: 4px; border-bottom: .5px solid var(--sep); }
.rd-row { padding: 6px 0; border-bottom: .5px solid var(--sep); }
.rd-row.now { font-weight: 600; }
.rd-row .diff, .rd-doors.diff { color: var(--orange-ink); font-weight: 700; }
.rd-l { color: var(--label); }
.rd-doors { font-size: 12px; color: var(--label-2); }
.rd-frames { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0; }
.rd-frames img { height: 72px; width: auto; border-radius: 8px; flex: none; background: var(--fill); }
.rd-acts { display: flex; justify-content: space-between; padding-bottom: 8px; }
.cell select.rvw-sel, .cell select.rvw-sel:focus-visible { position: static; inset: auto; opacity: 1; width: auto; max-width: 100%; color: var(--label); background: var(--fill); appearance: auto; }
.ai-line { display: flex; align-items: center; gap: 8px; margin: 10px 16px 0; padding: 8px 12px; border-radius: 12px; background: var(--fill); font-size: 13px; color: var(--label-2); }
.ai-line svg { width: 16px; height: 16px; flex: none; }
.ai-line b { color: var(--label); }
.ai-line.low { background: color-mix(in srgb, var(--orange) 16%, var(--bg-elev)); }

/* window sky view: crosshair over the camera */
.sky-cross { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; pointer-events: none; }
.sky-cross::before, .sky-cross::after { content: ''; position: absolute; background: #fff; box-shadow: 0 0 2px rgba(0,0,0,.8); }
.sky-cross::before { left: 31px; top: 0; width: 2px; height: 64px; }
.sky-cross::after { top: 31px; left: 0; height: 2px; width: 64px; }

.lh3d-place { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--label-2); }
.lh3d-place select { font: inherit; color: var(--label); background: var(--fill); border: 0; border-radius: 10px; padding: 6px 10px; }

/* measure in a photo */
.ms-scroll { margin: 8px 16px 0; overflow: auto; border-radius: 12px; background: #000; max-height: 70vh; }
.ms-wrap { position: relative; min-width: 100%; }
.ms-img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.ms-cv { position: absolute; left: 0; top: 0; touch-action: none; }
.ms-loupe { position: fixed; top: 80px; left: 16px; width: 120px; height: 120px; border-radius: 60px; border: 3px solid #fff; box-shadow: 0 4px 16px rgba(0,0,0,.4); z-index: 300; pointer-events: none; }

/* "About this": a long explanation behind a small button (06-tiles.js) */
.xp-hide { display: none !important; }
.xp-btn { display: inline-flex; align-items: center; gap: 6px; margin: 8px 20px 2px; padding: 6px 12px 6px 6px; min-height: 32px; border-radius: 16px; border: 0; background: var(--fill); color: var(--tint-ink); font: 600 13px/1 -apple-system, system-ui, sans-serif; cursor: pointer; }
.xp-btn .xp-q { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 12px; }
.xp-btn[aria-expanded="true"] .xp-q { background: var(--tint-ink); color: var(--bg-elev, #fff); }
.chart-card .xp-btn { margin: 8px 0 0; }
.fold-body[hidden] { display: none !important; }
/* chart choices (06-tiles.js) */
.cp-open { margin-left: auto; padding: 4px 10px; border-radius: 12px; border: 0; background: var(--fill); color: var(--tint-ink); font: 600 13px/1.2 -apple-system, system-ui, sans-serif; cursor: pointer; min-height: 28px; }
.cp-row { display: grid; gap: 8px; margin: 8px 0 6px; padding: 10px; border-radius: 14px; background: var(--fill); }
.cp-set { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cp-l { font-size: 12px; font-weight: 600; color: var(--label-2); min-width: 64px; }
.cp-chip { padding: 5px 10px; min-height: 30px; border-radius: 15px; border: 1px solid var(--separator, rgba(128,128,128,.35)); background: transparent; color: var(--label); font: 500 13px/1.1 -apple-system, system-ui, sans-serif; cursor: pointer; }
.cp-chip.on { background: var(--tint); border-color: var(--tint); color: #fff; }
.chart-card .h-row { display: flex; align-items: center; gap: 8px; }

/* dream home (58-dream.js) */
.dv-wrap { position: relative; margin: 8px 16px 0; border-radius: 18px; overflow: hidden; background: #0b0d10; }
.dv-mount { height: min(58vh, 520px); }
.dv-view, .dv-view canvas { width: 100%; height: 100%; display: block; }
.dv-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 6px; padding: 10px; overflow-x: auto; background: linear-gradient(transparent, rgba(0,0,0,.55)); scrollbar-width: none; }
.dv-chip { flex: none; padding: 7px 12px; min-height: 34px; border-radius: 17px; border: 0; background: rgba(255,255,255,.18); color: #fff; font: 600 13px/1.1 -apple-system, system-ui, sans-serif; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; }
.dv-chip.on { background: #fff; color: #111; }
.dv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 16px; }
.dv-chips .dv-chip { background: var(--fill); color: var(--label); backdrop-filter: none; }
.dv-status { position: absolute; top: 10px; left: 12px; right: 12px; color: #fff; font-size: 13px; text-shadow: 0 1px 3px #000; pointer-events: none; }
.dv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 16px; }
.dv-tile { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; border: 0; padding: 0; overflow: hidden; background-color: var(--c, #333); color: #fff; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.dv-tile.sim { background-image: radial-gradient(120% 90% at 20% 0%, rgba(255,255,255,.35), transparent 60%), linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 45%, #000)); }
.dv-tile.space { background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent), radial-gradient(1px 1px at 45% 60%, #fff, transparent), radial-gradient(120% 90% at 80% 100%, var(--c), #05060a 70%); }
.dv-tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; font: 600 12.5px/1.2 -apple-system, system-ui, sans-serif; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.dv-tile small { display: block; font-weight: 500; font-size: 11px; opacity: .85; }
.dv-tile.on { box-shadow: inset 0 0 0 3px var(--tint), 0 0 0 2px var(--tint); }

.lh-win { position: absolute; z-index: 3; left: 0; right: 0; top: 0; display: flex; gap: 6px; align-items: center; padding: 8px 10px; overflow-x: auto; scrollbar-width: none; background: linear-gradient(rgba(0,0,0,.4), transparent); pointer-events: auto; }
.lh-win-l { flex: none; color: #fff; font: 600 12px/1 -apple-system, system-ui, sans-serif; text-shadow: 0 1px 2px #000; }
.lh-win .dv-chip { min-height: 30px; padding: 5px 10px; font-size: 12.5px; }
.lh3d-card { position: relative; }
/* the site from above (49-site.js) */
.st-map { margin: 0 16px; border-radius: 14px; overflow: hidden; aspect-ratio: 1; background: #3a3f36; touch-action: none; }
.st-map .st-svg { width: 100%; height: 100%; display: block; }
.st-map.adding { outline: 2px solid var(--green, #34C759); }
.st-map [data-stt], .st-map [data-sb] { cursor: pointer; }
.st-map .st-house { cursor: grab; }
.st-status { margin: 6px 16px 0; font-size: 13px; color: var(--label-2); min-height: 1em; }
.st-step { min-width: 40px; min-height: 36px; border-radius: 10px; border: 0; background: var(--fill); color: var(--label); font: 600 18px/1 system-ui; }
/* 0.6.65: floor plan walls to drag (steps them in or out, new corners) and a selected room's corners */
.fp-wall{stroke:transparent;stroke-width:16;pointer-events:stroke;stroke-linecap:butt}
.fp-wall.ns{cursor:ns-resize} .fp-wall.ew{cursor:ew-resize}
[data-fp].sel .fp-wall{stroke:rgba(10,132,255,.14)}
.fp-corner{fill:#fff;stroke:var(--tint);stroke-width:4;cursor:move}
.fp-door{cursor:grab}

/* Explore (0.6.75) */
.exp-group { margin: 0 16px 10px; }
.exp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.exp-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 16px; border: 1px solid var(--sep); background: var(--bg-elev); color: var(--label); font: inherit; font-size: 14px; }
.exp-chip.on { border-color: var(--chip, var(--tint)); border-width: 2px; padding: 3px 11px; font-weight: 600; }
.exp-chip i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.exp-entry { margin-bottom: 12px; }

/* My phone on the Wi-Fi (0.6.77) */
.wm-card { margin-bottom: 12px; }
.wm-card .btn { width: auto; margin: 0; height: 40px; flex: 1; font-size: 15px; padding: 0 10px; }

/* Home and away card (0.6.78) */
.ha-btn { width: auto; margin: 0; height: 36px; font-size: 15px; padding: 0 12px; flex: none; }
.btn:disabled, .btn[disabled] { opacity: .4; cursor: not-allowed; }   /* 0.6.88: a step that needs something first (Your data and security) */
.status-card > * { min-width: 0; }   /* 0.6.90: the card's rows shrink with large text instead of spilling out */
.sc-head > span, .sc-head > div { min-width: 0; overflow-wrap: anywhere; }

/* 0.6.93: how to fix a thing that does not line up */
.cf-item + .cf-item { border-top: .5px solid var(--sep); }
.cf-body { padding: 0 16px 14px; display: grid; gap: 10px; }
.cf-step { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--fill); }
.cf-step.off { opacity: .7; }
.cf-h { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.cf-n { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--tint-ink); color: var(--tint-ink); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; box-sizing: border-box; }
.cf-off { color: var(--orange-ink); }
.cf-go { justify-self: start; margin-top: 4px; }

/* weather care (0.6.96) */
.care-do { margin: 2px 0 2px 18px; padding: 0; font-size: 15px; line-height: 1.35; color: var(--label); }
.care-do li + li { margin-top: 3px; }
/* thermostat chart labels (0.6.97) */
.chart-card svg text.tc-t { fill: var(--red-ink); font-size: 11px; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--bg-elev); stroke-width: 3px; }
.chart-card svg text.tc-g { fill: var(--label-3); font-size: 9px; }
/* 0.6.98: the 3D house controls fit at every text size; the place's credit sits under the dropdown */
.lh3d-bar { flex-wrap: wrap; }
.lh3d-bar input[type=range] { flex: 1 1 120px; min-width: 0; }
.lh3d-row { flex-wrap: wrap; }
.lh3d-row .lh3d-note { flex: 1 1 160px; min-width: 0; }
.lh3d-placerow { flex-direction: column; align-items: stretch; gap: 6px; }
.lh3d-placerow .lh3d-place { display: flex; width: 100%; }
.lh3d-placerow .lh3d-place select { flex: 1; min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.lh3d-placerow .lh3d-note { flex: none; font-size: 13px; color: var(--label-2); overflow-wrap: anywhere; }
.sum-tile { min-width: 0; }
html[data-text="1.5"] .sum-grid, html[data-text="1.75"] .sum-grid { grid-template-columns: minmax(0, 1fr); }
/* 0.6.98: a chevron outside a .cell row (Explore your data, other card buttons) is the row size, not the card's */
.chart-card > .chev, .hero > .chev { width: 8px; height: 14px; flex: none; opacity: .3; }
.lh3d-days { display: inline-flex; gap: 6px; }
.lh3d-clock { padding: 0 12px 10px; font-size: 14px; line-height: 1.4; color: var(--label-2); }
.lh3d-clock p { margin: 0 0 6px; }
.lh3d-clock p.lead { color: var(--label); font-weight: 600; font-size: 15px; }
.lh3d-orbit { padding: 0 12px 4px; color: var(--label-2); }
.lh3d-orbit:empty { display: none; }
.lh3d-orbit .ov { width: 100%; max-width: 420px; display: block; margin: 0 auto; }
.lh3d-orbit .ov-h { fill: var(--label); font-size: 10px; font-weight: 600; }
.lh3d-orbit .ov-l { fill: var(--label-2); font-size: 8.5px; }
/* 0.6.103: show inside walls, furniture and appliances in the 3D house */
.lh3d-show { gap: 6px; flex-wrap: wrap; justify-content: flex-start; }
.lh3d-show .lh3d-tog { font-size: 13px; padding: 6px 10px; height: 34px; }
.lh3d-show .lh3d-tog:not(.on) { color: var(--label-2); }
.rvw-dot.k-thing, .rvw-n.k-thing { background: #7A5A3A; }
.lh3d-show .lh3d-note { flex: 0 0 auto; }
.lh3d-focus { font-size: 14px; color: var(--label-2); } .lh3d-focus[hidden] { display: none; }
/* 0.6.105: dream home plan, rooms laid out by hand */
.dvp-wrap { margin: 0 16px; border-radius: 12px; background: var(--card, var(--bg-2)); overflow: hidden; touch-action: none; }
.dvp { display: block; width: 100%; height: auto; max-height: 62vh; }
.dvp-grid line { stroke: var(--sep); stroke-width: 0.06; }
.dvp-below { fill: none; stroke: var(--label-3); stroke-width: 0.15; stroke-dasharray: 0.6 0.4; }
.dvp-room rect:first-child { fill: color-mix(in srgb, var(--tint) 12%, var(--card, #fff)); stroke: var(--label-2); stroke-width: 0.22; cursor: grab; }
.dvp-room.sel rect:first-child { fill: color-mix(in srgb, var(--tint) 26%, var(--card, #fff)); stroke: var(--tint); stroke-width: 0.35; }
.dvp-room text { text-anchor: middle; fill: var(--label); font-weight: 600; pointer-events: none; }
.dvp-room text.dvp-sz { fill: var(--label-2); font-weight: 400; }
.dvp-h { fill: var(--tint); stroke: #fff; stroke-width: 0.2; cursor: nwse-resize; }
.dvp-front { text-anchor: middle; fill: var(--label-2); }
/* 0.6.107: no compass: which way the person faced at the start of a room video */
.rv-ask { position: absolute; left: 12px; right: 12px; bottom: 110px; background: rgba(0,0,0,.72); border-radius: 16px; padding: 12px; color: #fff; }
.rv-ask .rv-tip { position: static; margin-bottom: 10px; }
.rv-dirs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rv-dirs button { min-height: 44px; border-radius: 12px; background: rgba(255,255,255,.18); color: #fff; font: inherit; font-weight: 600; border: 0; }

/* 0.6.114: a figure in other units, beside the app's own (02-units.js) */
.uconv { color: var(--label-2, #8e8e93); font-weight: 400; white-space: nowrap; }

/* 0.6.115: arrange each page (03-arrange.js) */
[data-arrhidden] { display: none !important; }
.arr-foot { display: flex; justify-content: center; margin: 22px 16px 4px; }
.arr-foot .btn { gap: 6px; }

/* 0.6.116: Google search links */
.gsearch { display: inline-flex; align-items: center; gap: 4px; color: var(--tint-ink); font-weight: 500; }
.gsearch svg, .gsearch-row .badge-icon svg { width: 16px; height: 16px; }
.gsearch-row .badge-icon { color: #fff; }

/* 0.6.118: the exact thing a notice is about */
.cell.attn { box-shadow: inset 4px 0 0 var(--orange); background: color-mix(in srgb, var(--orange) 10%, var(--card, #fff)); }
.attn-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 600; vertical-align: 2px; }
.attn-banner { border: 1.5px solid var(--orange); }
@keyframes attnPulse { 0%, 100% { background: color-mix(in srgb, var(--orange) 10%, var(--card, #fff)); } 50% { background: color-mix(in srgb, var(--orange) 32%, var(--card, #fff)); } }
.cell.attn.attn-pulse { animation: attnPulse 0.9s ease-in-out 3; }
@media (prefers-reduced-motion: reduce) { .cell.attn.attn-pulse { animation: none; } }
.attn-words { color: var(--orange); }
.fp-door.front{stroke:#C0392B}
.fp-door.half{stroke:#B08A72;stroke-dasharray:3 3}
.fp-door.glass{stroke:#5AC8FA}

/* 0.6.146: the welcome */
.wel-prog { display: flex; gap: 6px; margin: 14px 16px 0; }
.wel-prog span { flex: 1; height: 4px; border-radius: 2px; background: var(--fill); }
.wel-prog span.on { background: var(--tint); }
.wel-head { margin: 14px 20px 6px; }
.wel-head h3 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: .2px; }
.wel-head p { margin: 6px 0 0; color: var(--label-2); font-size: 15px; line-height: 1.4; }
.wel-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 16px; }
.wel-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 22px; background: var(--card, var(--bg-2, #fff)); border: 1.5px solid var(--sep, rgba(0,0,0,.12)); font: 600 15px var(--font); color: var(--label); min-height: 44px; }
.wel-chip.on { border-color: var(--tint); background: color-mix(in srgb, var(--tint) 12%, transparent); }
.wel-ok { color: var(--tint-ink); display: inline-flex; width: 22px; height: 22px; flex: none; }
.wel-add { display: flex; gap: 8px; margin: 10px 16px 0; }
.wel-add input { flex: 1 1 auto; width: 100%; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--sep, rgba(0,0,0,.12)); background: var(--card, var(--bg-2, #fff)); color: var(--label); font: 16px var(--font); box-sizing: border-box; }
.wel-add .btn { margin: 0; flex: none; width: auto; height: 44px; padding: 0 16px; }

/* 0.6.147: picture guides */
.pg-head { display: flex; align-items: center; gap: 12px; margin: 12px 16px 6px; }
.pg-title { font-family: var(--display); font-size: 20px; font-weight: 700; line-height: 1.2; }
.pg-speak { width: 44px; height: 44px; border-radius: 22px; background: var(--label); color: var(--bg); display: grid; place-items: center; flex: none; }
.pg-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 16px 8px; }
.pg-tools span { padding: 4px 10px; border-radius: 999px; background: var(--fill); font-size: 13px; font-weight: 600; }
.pg-flow { list-style: none; margin: 6px 16px 0; padding: 0; }
.pg-flow li { display: flex; flex-direction: column; align-items: center; }
.pg-arrow { color: var(--label-3); margin: 3px 0; }
.pg-step { width: 100%; box-sizing: border-box; display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 18px; background: var(--card, var(--bg-2, #fff)); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.pg-ic { width: 58px; height: 58px; border-radius: 14px; background: color-mix(in srgb, var(--tint) 14%, transparent); color: var(--tint-ink); display: grid; place-items: center; flex: none; }
.pg-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pg-t b { font-size: 17px; line-height: 1.25; }
.pg-t span { font-size: 13px; color: var(--label-2); line-height: 1.3; }
.pg-n { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--label-3); flex: none; }
.pg-safety { background: color-mix(in srgb, var(--red) 12%, var(--card, #fff)); box-shadow: inset 0 0 0 2px var(--red); }
.pg-safety .pg-ic { background: var(--red); color: #fff; }
.pg-safety .pg-t b, .pg-safety .pg-n { color: var(--red-ink, var(--red)); }
.pg-check { background: color-mix(in srgb, var(--green) 12%, var(--card, #fff)); }
.pg-check .pg-ic { background: var(--green); color: #fff; }
.pg-check .pg-t b, .pg-check .pg-n { color: var(--green-ink, var(--green)); }
.pg-branch { display: flex; align-items: center; gap: 10px; margin: 14px 16px 0; padding: 10px 14px; border-radius: 16px; border: 2px dashed var(--sep-strong, rgba(0,0,0,.2)); font-size: 14px; line-height: 1.3; }
.pg-pro { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--label); color: var(--bg); font-size: 14px; font-weight: 600; flex: none; }
.pg-foot { margin: 10px 20px 0; font-size: 12px; color: var(--label-2); text-align: center; }
.pg-due { margin: 12px 16px 0; padding: 16px; border-radius: 20px; background: var(--card, var(--bg-2, #fff)); box-shadow: 0 1px 2px rgba(0,0,0,.06); display: flex; flex-direction: column; gap: 12px; }
.pg-due-top { display: flex; justify-content: space-between; align-items: baseline; }
.pg-due-k { font-size: 13px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--orange-ink); }
.pg-due-row { display: flex; gap: 14px; align-items: center; }
.pg-due-row b { display: block; font-family: var(--display); font-size: 19px; line-height: 1.25; }
.pg-due-ic { width: 56px; height: 56px; border-radius: 16px; background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange-ink); display: grid; place-items: center; flex: none; }
.pg-due-btn { width: 100%; height: 50px; margin: 0; display: flex; align-items: center; justify-content: center; gap: 10px; }

/* 0.6.152: the home screen leads with one colour (red needs fixing, orange attention, blue to do, green all good) */
.status-card.lvl { background: linear-gradient(160deg, color-mix(in srgb, var(--lvl) 26%, var(--bg-elev)), color-mix(in srgb, var(--lvl) 8%, var(--bg-elev)) 70%); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--lvl) 45%, transparent); }
.sc-level { display: flex; align-items: center; gap: 8px; margin: -4px -6px 0; padding: 8px 12px; border-radius: 14px; background: var(--lvl); color: #fff; }
.sc-level b { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.sc-dot { display: grid; place-items: center; width: 22px; height: 22px; }
.sc-dot svg { width: 20px; height: 20px; }
.sc-lvl-sub { font-size: 13px; opacity: .9; }
.status-card.lvl-todo .sc-level, .status-card.lvl-ok .sc-level { background: color-mix(in srgb, var(--lvl) 88%, #000); }
.sc-later-link { justify-self: start; background: none; border: 0; padding: 0; color: var(--tint-ink, var(--tint)); font: inherit; font-size: 14px; font-weight: 600; }
.attn-list { display: grid; gap: 8px; margin: 10px 16px 12px; }
.attn-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 12px 12px 14px; border: 0; border-radius: 16px; text-align: left; font: inherit; color: var(--label);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 16%, var(--bg-elev)), var(--bg-elev) 60%); box-shadow: inset 4px 0 0 var(--c); cursor: pointer; }
.attn-row:active { transform: scale(.985); }
.attn-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--c); color: #fff; }
.attn-ic svg { width: 20px; height: 20px; }
.attn-row b { display: block; font-size: 16px; font-weight: 600; line-height: 1.25; }
.attn-row small { display: block; font-size: 13.5px; color: var(--label-2); line-height: 1.3; margin-top: 2px; }
.attn-go { flex: none; padding: 7px 14px; border-radius: 99px; background: var(--c); color: #fff; font-size: 14px; font-weight: 700; }
.attn-more { justify-self: center; background: none; border: 0; color: var(--tint-ink, var(--tint)); font: inherit; font-size: 15px; font-weight: 600; padding: 6px 12px; }
.today-more { display: flex; align-items: center; gap: 8px; width: calc(100% - 32px); margin: 10px 16px; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--bg-elev); font: inherit; color: var(--label); text-align: left; }
.today-more span { font-size: 16px; font-weight: 600; }
.today-more small { flex: 1; font-size: 13px; color: var(--label-2); }
.today-more svg { width: 14px; height: 14px; color: var(--label-3); transition: transform .2s; }
.today-more[aria-expanded="true"] svg { transform: rotate(90deg); }
#tabbar button[data-lvl="fix"], #tabbar button[data-lvl="attention"] { position: relative; }
#tabbar button[data-lvl="fix"]::after, #tabbar button[data-lvl="attention"]::after { content: ''; position: absolute; top: 4px; left: calc(50% + 8px); width: 10px; height: 10px; border-radius: 50%; background: var(--lvl); box-shadow: 0 0 0 2px var(--bar, #fff); }
@media (prefers-reduced-motion: reduce) { .attn-row:active { transform: none; } }
.jump-bar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; scrollbar-width: none; }
.jump-bar::-webkit-scrollbar { display: none; }
.jump-bar button { flex: none; padding: 8px 14px; border: 0; border-radius: 99px; background: var(--bg-elev); color: var(--tint-ink, var(--tint)); font: inherit; font-size: 14px; font-weight: 600; box-shadow: 0 0 0 .5px var(--sep); }
.money-status { margin: 4px 16px 10px; display: grid; gap: 0; }
.money-status .sc-level { margin: 0; }
.money-status .attn-list { margin: 8px 0 0; }
/* 0.6.156: who wrote each history entry */
.hist-by { flex: none; min-width: 52px; text-align: center; padding: 2px 6px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin-top: 2px; }
.hist-owner { background: var(--fill); color: var(--label-2); } .hist-pro { background: color-mix(in srgb, var(--green) 22%, transparent); color: var(--green-ink, var(--green)); }
.hist-sensor { background: color-mix(in srgb, var(--tint) 18%, transparent); color: var(--tint-ink, var(--tint)); } .hist-app { background: color-mix(in srgb, var(--orange) 20%, transparent); color: var(--orange-ink, var(--orange)); }
/* 0.6.158: inspector entries, confirmed by the pro */
.hist-inspector { background: color-mix(in srgb, var(--purple, #8e5bd8) 20%, transparent); color: var(--purple-ink, var(--purple, #7a45c9)); }
.hist-ok { color: var(--green-ink, var(--green)); font-weight: 600; }

/* 0.6.161: --card and --bg-2 were never defined, so cards fell back to white in dark mode (white text on white).
   They follow the raised background, light or dark. */
:root { --card: var(--bg-elev); --bg-2: var(--bg-elev); }
.pg-t b { color: var(--label); }
/* 0.6.163: size, direction and layout */
.lay-chip { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 700; vertical-align: 2px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.lay-top { margin: 12px 16px 8px; } .lay-bar { height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; } .lay-bar i { display: block; height: 8px; background: var(--green); }
.lay-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0 16px; }
.lay-room { min-height: 56px; border-radius: 14px; border: 0; background: var(--bg-elev); color: var(--label); font: inherit; font-weight: 600; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.lay-room.on { background: color-mix(in srgb, var(--green) 18%, var(--bg-elev)); } .lay-room small { font-size: 12px; color: var(--green-ink, var(--green)); font-weight: 700; }
