@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&display=swap");
:root {
  --bg: #f5efe6;
  --surface: #fffcf6;
  --text: #273e32;
  --text-muted: #71776b;
  --border: #dddcd0;
  --accent: #273e32;
  --accent-fg: #fffaf1;
  --primary-action: var(--accent);
  --primary-action-fg: var(--accent-fg);
  --radius: 22px;
  --font: "Figtree", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --peach: #e9ccb0;
  --pale: #e8ecdf;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #aa6939;
  outline-offset: 4px;
}
button {
  border: 0;
  background: none;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
}
h1 {
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -1px;
}
h2 {
  font-size: 24px;
  line-height: 1.3;
}
h3 {
  font-size: 19px;
}
small,
.muted {
  color: var(--text-muted);
}
small {
  font-size: 12px;
}
svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  vertical-align: middle;
}
.layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}
.sidebar {
  padding: 36px 24px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  width: 232px;
  height: 100dvh;
  background: #f7f2e9;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 45px 7px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--accent);
  color: var(--accent-fg);
  display: grid;
  place-items: center;
}
.brand-name {
  font: 28px var(--serif);
  letter-spacing: -1px;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.3px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border-radius: 13px;
  text-align: left;
  font-weight: 500;
  color: #687164;
}
.nav button.active {
  background: var(--accent);
  color: var(--accent-fg);
}
.nav button:not(.active):hover {
  background: #e9e7dc;
}
.sidebar-bottom {
  margin-top: auto;
}
.demo-note {
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 15px;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.demo-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}
.sidebar-bottom > a {
  display: block;
  font-size: 11px;
  text-align: center;
  color: var(--text-muted);
}
main {
  grid-column: 2;
  min-width: 0;
  max-width: 1440px;
  width: 100%;
  margin: auto;
  padding: 31px 46px 55px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 33px;
  gap: 15px;
}
.home-label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.home-label > span {
  background: #e8e7db;
  border-radius: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}
.home-label b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.home-label small {
  display: block;
  font-size: 11px;
}
.mode-switch {
  display: flex;
  background: #eae5da;
  padding: 4px;
  border-radius: 24px;
  font-size: 12px;
}
.mode-switch button {
  padding: 6px 15px;
  border-radius: 22px;
}
.mode-switch .active {
  background: var(--surface);
  box-shadow: 0 2px 5px #273e3210;
}
.mode-switch .active:before,
.status-dot:before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #68836c;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: 2px;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 15px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.7px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 9px;
}
.page-title p {
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 25px;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid #cfcfc1;
}
.btn.soft {
  background: var(--pale);
  color: var(--text);
}
.btn.danger {
  background: #8f4637;
  color: white;
}
.btn.small {
  padding: 6px 12px;
  min-height: 32px;
  font-size: 12px;
}
.btn:hover {
  filter: brightness(1.09);
}
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 24px;
}
.hero {
  background: var(--accent);
  border-radius: var(--radius);
  color: #f8f4e9;
  min-height: 236px;
  display: flex;
  overflow: hidden;
  position: relative;
}
.hero-copy {
  padding: 30px 32px;
  z-index: 1;
  max-width: 62%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero h2 {
  font-size: 29px;
  line-height: 1.22;
  margin: 15px 0 10px;
}
.hero small {
  color: #bfcdbb;
  font-size: 11px;
  letter-spacing: 0.3px;
}
.hero p {
  font-size: 13px;
  color: #d6dfcc;
  line-height: 1.6;
  max-width: 235px;
}
.hero .chip {
  background: #ffffff12;
  border: 1px solid #ffffff19;
  color: #e8eedd;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 20px;
}
.hero-art {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 220px;
  height: 215px;
  overflow: hidden;
}
.arch {
  position: absolute;
  width: 130px;
  height: 190px;
  right: 30px;
  top: 0;
  background: #3c5542;
  border-radius: 80px 80px 0 0;
  border: 8px solid #49614a;
  box-shadow: inset 0 0 0 2px #314b39;
}
.moon {
  position: absolute;
  top: 31px;
  right: 52px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dccb9f;
  box-shadow: 0 0 40px #d3c59526;
}
.window-line {
  position: absolute;
  right: 90px;
  top: 2px;
  width: 2px;
  height: 190px;
  background: #49614a;
}
.table-art {
  position: absolute;
  bottom: -10px;
  right: -5px;
  width: 178px;
  height: 62px;
  background: #ad8058;
  border-radius: 8px;
  transform: skewY(-3deg);
}
.lamp-stem {
  position: absolute;
  bottom: 53px;
  right: 82px;
  width: 5px;
  height: 70px;
  background: #ccb38b;
}
.lamp-base {
  position: absolute;
  bottom: 49px;
  right: 61px;
  width: 47px;
  height: 8px;
  background: #d1b98e;
  border-radius: 50%;
}
.lamp-shade {
  position: absolute;
  bottom: 112px;
  right: 44px;
  width: 83px;
  height: 53px;
  background: #e2ba7e;
  clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%);
  border-radius: 6px;
}
.plant {
  position: absolute;
  bottom: 39px;
  right: 157px;
  background: #e9d9bb;
  width: 30px;
  height: 30px;
  border-radius: 2px 2px 12px 12px;
}
.leaf {
  position: absolute;
  bottom: 63px;
  right: 170px;
  width: 17px;
  height: 43px;
  border-radius: 70% 0 70% 0;
  background: #7b9464;
  transform: rotate(-23deg);
}
.leaf.two {
  right: 151px;
  bottom: 63px;
  transform: rotate(35deg);
  height: 35px;
  background: #9aa978;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 27px 0 15px;
}
.section-head h2 {
  font-size: 21px;
}
.section-head small {
  font-size: 11px;
}
.scene-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.scene {
  border-radius: 17px;
  background: var(--surface);
  padding: 17px 15px;
  text-align: left;
  border: 1px solid #ffffff50;
  transition: transform 0.15s;
}
.scene:hover {
  transform: translateY(-3px);
  border-color: #b7c5a8;
}
.scene svg {
  margin-bottom: 13px;
  width: 21px;
  height: 21px;
}
.scene strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.scene small {
  font-size: 10px;
}
.scene:nth-child(2) {
  background: #eee1cf;
}
.scene:nth-child(3) {
  background: #e7ebde;
}
.room-filters {
  display: flex;
  gap: 7px;
  overflow: auto;
  padding: 2px 2px 7px;
  margin-bottom: 13px;
  scrollbar-width: none;
}
.room-filters button {
  white-space: nowrap;
  border: 1px solid #d8d9cb;
  border-radius: 25px;
  padding: 7px 15px;
  font-size: 12px;
  color: #6e7669;
}
.room-filters .active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.devices-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.device {
  background: var(--surface);
  border: 1px solid #e7e4da;
  border-radius: 19px;
  padding: 19px;
  min-width: 0;
  transition: border-color 0.15s;
}
.device.on {
  border-color: #bfc9b4;
}
.device-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.device-open {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: 0;
  min-width: 0;
}
.device-icon {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  flex-shrink: 0;
  border-radius: 13px;
  background: #eeeee4;
  color: #8b9281;
}
.on .device-icon {
  background: #e7ecdc;
  color: var(--accent);
}
.device-name {
  display: block;
  font-weight: 600;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.device-open small {
  display: block;
  font-size: 11px;
  margin-top: 2px;
}
.toggle {
  width: 35px;
  height: 21px;
  border-radius: 20px;
  background: #d9dccf;
  padding: 3px;
  flex-shrink: 0;
  position: relative;
  margin-top: 3px;
}
.toggle:after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fffaf0;
  transition: transform 0.2s;
}
.toggle[aria-checked="true"] {
  background: var(--accent);
}
.toggle[aria-checked="true"]:after {
  transform: translateX(14px);
}
.device-footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #dfe1d3;
  border-radius: 20px;
  padding: 2px 7px;
  font-size: 9px;
  color: #6e7865;
}
.badge.retro {
  background: #f5e9d9;
  border-color: #e7d4bc;
  color: #946b46;
}
.brightness-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.brightness-mini svg {
  width: 15px;
  height: 15px;
}
.brightness-mini output {
  font-size: 11px;
  min-width: 32px;
  text-align: right;
}
input[type="range"] {
  accent-color: var(--accent);
  height: 5px;
  width: 100%;
  cursor: pointer;
  margin: 8px 0;
}
.side-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 23px;
  background: #faf7ef;
}
.assistant-teaser {
  background: #ecebdd;
  border-color: transparent;
}
.assistant-teaser .sparkle {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #dce2ce;
  display: grid;
  place-items: center;
  margin-bottom: 19px;
}
.assistant-teaser h2 {
  font-size: 23px;
  margin-bottom: 10px;
}
.assistant-teaser p {
  font-size: 12px;
  line-height: 1.7;
  color: #74806b;
  margin-bottom: 20px;
}
.assistant-teaser .btn {
  width: 100%;
}
.hint {
  font-size: 10px;
  line-height: 1.6;
  color: #858b7b;
  margin-top: 13px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 17px;
}
.panel-head h2 {
  font-size: 19px;
}
.text-link {
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.activity-item {
  display: flex;
  gap: 11px;
  padding: 13px 0;
  border-bottom: 1px solid #e6e5da;
}
.activity-item:last-child {
  border-bottom: 0;
}
.activity-icon {
  background: #e9eddf;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.activity-icon svg {
  width: 13px;
  height: 13px;
}
.activity-item p {
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.activity-item time {
  font-size: 10px;
  color: var(--text-muted);
}
.quiet {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}
.guide {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 4px;
}
.guide p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 7px;
}
.guide h3 {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
}
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: #8a8e80;
  margin-top: 34px;
  padding-top: 17px;
  border-top: 1px solid var(--border);
}
.footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.room-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.room-card {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 18px;
}
.room-card .device-icon {
  width: 57px;
  height: 57px;
}
.room-card h2 {
  font-size: 22px;
  margin-bottom: 4px;
}
.room-card .arrow {
  margin-left: auto;
}
.room-card:hover {
  border-color: #889b7d;
}
.room-section {
  margin-bottom: 30px;
}
.back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin-bottom: 22px;
  font-size: 12px;
  color: var(--text-muted);
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
}
.device-detail {
  background: var(--surface);
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.light-display {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 17px;
  background: #f0eee3;
  margin: 22px 0;
}
.glow {
  position: absolute;
  width: 135px;
  height: 135px;
  background: var(--light-color, #ffc07b);
  filter: blur(33px);
  opacity: var(--light-opacity, 0.6);
  border-radius: 50%;
  transition: all 0.25s;
}
.big-bulb {
  width: 80px;
  height: 90px;
  z-index: 1;
  color: var(--accent);
  stroke-width: 1;
}
.control {
  margin-top: 25px;
}
.control label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 10px;
}
.control output {
  font-size: 12px;
  font-weight: 600;
}
.control small {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
}
.control input[type="range"] {
  height: 8px;
}
.temperature {
  background: linear-gradient(90deg, #e6ac6e, #edece4, #a9c5eb);
  border-radius: 10px;
  accent-color: var(--accent);
}
.colour-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.swatch {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--swatch);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px #cfd2c3;
}
.swatch.selected {
  box-shadow: 0 0 0 2px var(--accent);
}
input[type="color"] {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  cursor: pointer;
}
.callout {
  padding: 14px 16px;
  border-radius: 14px;
  background: #ecefdf;
  font-size: 12px;
  line-height: 1.7;
  margin: 18px 0;
  color: #5e6f52;
}
.callout.warm {
  background: #f3e6d4;
  color: #88613d;
}
.schedule-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.schedule-item b {
  font-size: 13px;
  display: block;
}
.schedule-item small {
  font-size: 11px;
  display: block;
  margin: 4px 0;
}
.schedule-item button {
  padding: 6px;
  font-size: 11px;
  text-decoration: underline;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.settings-grid .panel {
  background: var(--surface);
}
.settings-grid h2 {
  margin-bottom: 16px;
}
.settings-grid p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 17px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 18px;
  font-size: 12px;
}
.field input,
.field select,
.field textarea {
  border: 1px solid #d3d7c8;
  background: #fffcf6;
  padding: 11px 13px;
  border-radius: 11px;
  min-width: 0;
  width: 100%;
}
.field textarea {
  resize: vertical;
  min-height: 75px;
}
.field small {
  line-height: 1.6;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
.settings-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  font-size: 12px;
  gap: 12px;
}
.settings-row:last-child {
  border: 0;
}
.settings-row span {
  color: var(--text-muted);
}
.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 22px;
}
.chat-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 560px;
  max-height: calc(100dvh - 220px);
}
.chat-header {
  padding: 18px 23px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 11px;
  align-items: center;
}
.chat-header .device-icon {
  width: 35px;
  height: 35px;
}
.chat-header strong {
  font-size: 13px;
  display: block;
}
.chat-header small {
  font-size: 10px;
}
.messages {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 160px;
  scroll-behavior: smooth;
}
.message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 19px;
  gap: 5px;
}
.message.user {
  align-items: flex-end;
}
.bubble {
  background: #ecefe3;
  border-radius: 3px 17px 17px 17px;
  padding: 13px 16px;
  max-width: 94%;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.user .bubble {
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 17px 3px 17px 17px;
}
.message small {
  font-size: 9px;
  margin: 0 4px;
}
.trace {
  font-size: 10px;
  color: #64715a;
  max-width: 100%;
  margin-top: 3px;
}
.trace pre {
  font: 10px/1.6 monospace;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f1f0e9;
  padding: 12px;
  border-radius: 8px;
}
.trace summary {
  cursor: pointer;
}
.prompts {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 0 20px 13px;
}
.prompts button {
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 15px;
  font-size: 10px;
  text-align: left;
}
.chat-form {
  display: flex;
  gap: 9px;
  margin: 0 19px 12px;
  border: 1px solid #c9d0bd;
  border-radius: 16px;
  padding: 8px 9px 8px 14px;
  align-items: center;
}
.chat-form input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  font-size: 13px;
  padding: 5px 0;
}
.chat-form button {
  background: var(--accent);
  color: var(--accent-fg);
  width: 34px;
  height: 34px;
  border-radius: 11px;
  flex-shrink: 0;
}
.chat-disclaimer {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 15px 14px;
}
.assistant-light .device {
  padding: 0;
  border: 0;
  background: none;
}
.assistant-light h2 {
  margin-bottom: 18px;
  font-size: 19px;
}
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.activity-page {
  max-width: 760px;
}
.activity-page .activity-item {
  padding: 18px 0;
}
.activity-page .activity-item p {
  font-size: 14px;
}
.activity-page .activity-icon {
  width: 36px;
  height: 36px;
}
.schedule-list {
  margin-top: 20px;
}
.loading {
  display: grid;
  place-items: center;
  min-height: 90dvh;
  font-family: var(--serif);
}
#toast {
  position: fixed;
  bottom: 27px;
  left: calc(50% + 110px);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 12px 22px;
  box-shadow: 0 8px 28px #273e3226;
  border-radius: 15px;
  max-width: min(90vw, 460px);
  z-index: 100;
  font-size: 13px;
}
#toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}
dialog {
  border: 1px solid var(--border);
  padding: 28px;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  width: min(480px, calc(100% - 32px));
  max-height: 85dvh;
  overflow: auto;
  box-shadow: 0 25px 90px #273e3230;
}
dialog::backdrop {
  background: #162c2366;
  backdrop-filter: blur(4px);
}
.modal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 11px;
}
.modal-title h2 {
  font-size: 26px;
}
.close {
  font-size: 24px;
  line-height: 1;
  padding: 5px;
  color: var(--text-muted);
}
dialog > p,
dialog form > p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}
.choice {
  display: block;
  text-align: left;
  width: 100%;
  border: 1px solid var(--border);
  padding: 17px;
  border-radius: 14px;
  margin-top: 13px;
}
.choice strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.choice small {
  font-size: 11px;
  line-height: 1.7;
  display: block;
}
.choice:hover {
  border-color: #7e9770;
}
.mobile-brand {
  display: none;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin: 0 15px 15px;
  color: #8a907f;
}
.room-devices {
  margin-top: 22px;
}
.error {
  color: #a04735;
  font-size: 12px;
}
.inline-icon {
  display: flex;
  align-items: center;
  gap: 7px;
}
.wide {
  width: 100%;
}
.hidden {
  display: none !important;
}
.spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1400px) {
  main {
    padding-left: 60px;
    padding-right: 60px;
  }
  .home-grid {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  .hero-copy {
    padding: 32px 35px;
  }
  .hero-art {
    right: 15px;
  }
}
@media (max-width: 1190px) {
  main {
    padding: 26px;
  }
  .layout {
    grid-template-columns: 195px minmax(0, 1fr);
  }
  .sidebar {
    width: 195px;
    padding: 30px 17px;
  }
  .home-grid {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 18px;
  }
  .hero-copy {
    padding: 26px 22px;
  }
  .hero-art {
    right: -35px;
    opacity: 0.8;
  }
  .hero h2 {
    font-size: 25px;
  }
  .hero-copy {
    max-width: 68%;
  }
  .device {
    padding: 16px;
  }
  .device-name {
    font-size: 12px;
  }
  .device-icon {
    width: 34px;
    height: 34px;
  }
  .chat-layout,
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  #toast {
    left: calc(50% + 97px);
  }
}
@media (max-width: 1020px) {
  .home-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .side-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .side-column .guide {
    grid-column: 1/-1;
  }
  .hero-art {
    right: 22px;
    opacity: 1;
  }
  .hero-copy {
    max-width: 62%;
  }
  .hero h2 {
    font-size: 30px;
  }
  .hero {
    min-height: 230px;
  }
  .chat-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .chat-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .chat-side .panel {
    margin: 0 !important;
  }
  .chat-shell {
    max-height: none;
    min-height: 530px;
  }
  .messages {
    max-height: 380px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .room-card {
    padding: 22px 18px;
  }
  .room-card h2 {
    font-size: 20px;
  }
}
@media (max-width: 700px) {
  .layout {
    display: block;
  }
  .sidebar {
    height: auto;
    width: 100%;
    bottom: 0;
    left: 0;
    padding: 8px 8px calc(9px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--border);
    background: #fffcf6f5;
    backdrop-filter: blur(10px);
  }
  .sidebar .brand,
  .sidebar-bottom,
  .nav-label {
    display: none;
  }
  .nav {
    flex-direction: row;
    gap: 0;
    justify-content: space-around;
  }
  .nav button {
    flex: 1;
    flex-direction: column;
    gap: 4px;
    padding: 7px 1px 3px;
    border-radius: 12px;
    font-size: 9px;
    background: none !important;
    color: #858d7b;
  }
  .nav button.active {
    color: var(--accent);
    font-weight: 700;
  }
  .nav button.active svg {
    background: #e5eadb;
    box-sizing: content-box;
    padding: 4px 16px;
    border-radius: 20px;
    margin-top: -4px;
    margin-bottom: -4px;
  }
  .nav svg {
    width: 20px;
    height: 20px;
  }
  main {
    padding: 22px 20px 108px;
  }
  .topbar {
    margin-bottom: 27px;
  }
  .home-label {
    display: none;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .mobile-brand .brand-name {
    font-size: 26px;
  }
  .mobile-brand .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .mobile-brand svg {
    width: 18px;
    height: 18px;
  }
  .mode-switch {
    font-size: 11px;
  }
  .mode-switch button {
    padding: 5px 12px;
  }
  h1 {
    font-size: 30px;
  }
  .page-title {
    margin-bottom: 20px;
    align-items: flex-start;
  }
  .page-title p {
    font-size: 12px;
    max-width: 230px;
    margin-top: 8px;
  }
  .page-title .btn {
    padding: 9px 12px;
    font-size: 0;
    min-height: 37px;
  }
  .page-title .btn svg {
    width: 18px;
    height: 18px;
  }
  .hero {
    min-height: 218px;
  }
  .hero-copy {
    padding: 25px;
    max-width: 67%;
  }
  .hero h2 {
    font-size: 27px;
  }
  .hero p {
    font-size: 11px;
  }
  .hero-art {
    right: -17px;
    transform: scale(0.88);
    transform-origin: right bottom;
  }
  .hero .chip {
    font-size: 9px;
  }
  .devices-grid {
    gap: 10px;
  }
  .device {
    padding: 14px 12px;
    border-radius: 16px;
  }
  .device-top {
    gap: 5px;
  }
  .device-open {
    gap: 8px;
    flex-direction: column;
    align-items: flex-start;
  }
  .device-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }
  .device-name {
    font-size: 12px;
  }
  .device-open small {
    font-size: 10px;
  }
  .device-footer {
    font-size: 9px;
    gap: 5px;
  }
  .badge {
    font-size: 8px;
    padding: 2px 5px;
  }
  .toggle {
    width: 33px;
    height: 21px;
  }
  .toggle[aria-checked="true"]:after {
    transform: translateX(12px);
  }
  .scene-list {
    gap: 9px;
  }
  .scene {
    padding: 15px 12px;
  }
  .scene strong {
    font-size: 11px;
  }
  .scene small {
    font-size: 9px;
  }
  .scene svg {
    margin-bottom: 11px;
    width: 18px;
    height: 18px;
  }
  .section-head {
    margin-top: 24px;
  }
  .section-head h2 {
    font-size: 21px;
  }
  .room-filters {
    margin-right: -20px;
  }
  .side-column {
    display: flex;
  }
  .assistant-teaser {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 0 15px;
  }
  .assistant-teaser .sparkle {
    grid-row: 1/3;
    margin: 0;
  }
  .assistant-teaser h2 {
    font-size: 20px;
    margin: 0 0 6px;
  }
  .assistant-teaser p {
    font-size: 11px;
    margin: 0 0 15px;
  }
  .assistant-teaser .btn {
    grid-column: 1/-1;
  }
  .assistant-teaser .hint {
    grid-column: 1/-1;
  }
  .panel {
    padding: 21px;
  }
  .guide {
    display: none;
  }
  .footer {
    font-size: 9px;
    align-items: flex-start;
    line-height: 1.7;
  }
  .footer span {
    max-width: 180px;
  }
  #toast {
    bottom: 95px;
    left: 50%;
    width: max-content;
    font-size: 12px;
    max-width: calc(100vw - 32px);
  }
  .room-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .room-card {
    padding: 22px;
  }
  .room-card h2 {
    font-size: 24px;
  }
  .room-card .device-icon {
    width: 52px;
    height: 52px;
  }
  .chat-side {
    display: block;
  }
  .chat-side > .panel:not(:first-child) {
    margin-top: 15px !important;
  }
  .chat-shell {
    min-height: 480px;
    max-height: none;
  }
  .chat-header {
    padding: 15px 18px;
  }
  .messages {
    padding: 20px 15px;
    max-height: 390px;
  }
  .bubble {
    font-size: 12px;
    padding: 12px 14px;
  }
  .chat-form {
    margin: 0 12px 12px;
    padding-left: 10px;
  }
  .chat-form input {
    font-size: 12px;
  }
  .prompts {
    padding: 0 13px 11px;
    gap: 6px;
  }
  .prompts button {
    font-size: 9px;
  }
  .chat-disclaimer {
    font-size: 9px;
  }
  .device-detail {
    padding: 23px;
  }
  .colour-row {
    gap: 10px;
  }
  .swatch {
    width: 27px;
    height: 27px;
  }
  .detail-layout {
    gap: 18px;
  }
  .back {
    margin-bottom: 17px;
  }
  .settings-grid .panel {
    padding: 22px;
  }
  .settings-row {
    font-size: 11px;
  }
  .activity-page .activity-item p {
    font-size: 12px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .chat-layout {
    gap: 18px;
  }
  .brightness-mini {
    gap: 5px;
  }
  .brightness-mini output {
    font-size: 10px;
    min-width: 29px;
  }
  .brightness-mini svg {
    display: none;
  }
}
.camera-launcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}
.camera-launcher h2 {
  font-size: 21px;
}
.camera-launcher p {
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-muted);
}
.camera-launcher button {
  flex-shrink: 0;
}
.layout:has(.camera-page) main {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.layout:has(.camera-page) .topbar {
  flex-shrink: 0;
  margin-bottom: 16px;
}
.layout:has(.camera-page) .footer {
  display: none;
}
.camera-page {
  flex: 1;
  min-height: 0;
}
.live-notice {
  margin: 0 0 18px;
  flex-shrink: 0;
}
.camera-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
}
@media (max-width: 700px) {
  .camera-launcher {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .nav button.active svg {
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
