/* Applied from the user-invoked Apple Design guide. Wondr Home keeps its own palette. */
:root { font-size: 100%; --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
body { font-family: var(--font); font-size: .9375rem; font-optical-sizing: auto; }
button { transform: scale(var(--motion-scale,1)); transform-origin: center; }
.button, .button:not(:disabled):active { transform: scale(var(--motion-scale,1)); transition: background 100ms, color 100ms, border-color 100ms; }
button:not(:disabled):active { filter: brightness(.96); }
.device-frame { display: block; isolation: isolate; }
.app-header { position: absolute; z-index: 20; left: 0; right: 0; top: 0; min-height: 87px; padding: 12px 21px 13px; border: 0; background: rgba(247,248,243,.87); backdrop-filter: blur(24px) saturate(110%); -webkit-backdrop-filter: blur(24px) saturate(110%); box-shadow: 0 8px 18px #f7f8f35c; }
.home-name-button { font-size: 1.75rem; font-weight: 680; letter-spacing: -.035em; line-height: 1.15; }
.app-subtitle { font-size: .6875rem; letter-spacing: .012em; }
.header-actions { justify-content: center; }
.concept-indicator { color: var(--muted); font-size: .5625rem; letter-spacing: .025em; line-height: 1.5; }
.header-actions .demo-clock { margin-top: 4px; font-size: .75rem; font-weight: 550; }
.demo-badge { background: transparent; padding: 0; min-height: 44px; min-width: 50px; }
.demo-badge > span { display: block; padding: 5px 10px; border: 1px solid #d6dfcc; border-radius: 16px; background: var(--sage-soft); color: var(--sage-dark); font-size: .6875rem; font-weight: 600; letter-spacing: .02em; }
.demo-clock { margin-top: -2px; font-family: var(--font); font-size: .6875rem; font-variant-numeric: tabular-nums; letter-spacing: .015em; }
.page-scroll { position: absolute; inset: 0; padding: calc(var(--header-height,90px) + var(--run-height,0px) + 13px) 19px calc(var(--nav-height,74px) + 33px + env(safe-area-inset-bottom)); }
.run-banner { position: absolute; z-index: 18; top: var(--header-height,90px); left: 0; right: 0; padding: 0 19px 8px; background: rgba(247,248,243,.94); }
.run-banner > button { font-size: .6875rem; line-height: 1.5; }
.bottom-nav { position: absolute; z-index: 22; left: 12px; right: 12px; bottom: 9px; min-height: 68px; padding: 6px; gap: 3px; border: 1px solid #ffffffd9; border-radius: 23px; background: rgba(250,252,246,.88); backdrop-filter: blur(22px) saturate(110%); -webkit-backdrop-filter: blur(22px) saturate(110%); box-shadow: 0 4px 24px #26302612, inset 0 0 0 1px #e3e9dc80; }
.bottom-nav button { position: relative; z-index: 1; gap: 5px; min-height: 54px; padding: 7px 0; font-size: .6875rem; letter-spacing: .005em; border-radius: 17px; }
.bottom-nav button[aria-current=page] { background: transparent; color: var(--sage-dark); font-weight: 650; }
.bottom-nav button svg { width: 21px; height: 21px; }
.nav-selection { position: absolute; z-index: 0; top: 6px; left: 0; border-radius: 17px; background: #e0e8d8; transform: translate3d(var(--motion-x,0px),0,0); pointer-events: none; }
.eyebrow { font-family: var(--font); font-size: .625rem; font-weight: 600; letter-spacing: .1em; line-height: 1.6; }
.page-title h1 { font-size: 1.625rem; font-weight: 650; line-height: 1.16; letter-spacing: -.03em; }
.entity-intro h1 { font-size: 1.75rem; font-weight: 650; line-height: 1.15; letter-spacing: -.03em; }
.page-title > p:not(.eyebrow) { font-size: .8125rem; line-height: 1.7; }
.section-heading h2 { font-size: 1.1875rem; font-weight: 650; letter-spacing: -.025em; }
.section-heading > span { font-family: var(--font); font-size: .625rem; font-weight: 550; letter-spacing: .07em; }
.all-good { min-height: 36px; padding-bottom: 13px; gap: 7px; font-size: .75rem; line-height: 1.5; }
.attention h2 { font-size: .8125rem; }
.attention button { min-height: 44px; font-size: .75rem; }
.attention.is-update { border-color: #d6dfcd; background: var(--sage-soft); }
.attention.is-update h2, .attention.is-update button { color: var(--sage-dark); }
.home-hero { height: 190px; border-radius: 22px; }
.home-hero-copy { top: 19px; left: 20px; }
.hero-shade { background: linear-gradient(180deg,rgba(24,35,26,.72),rgba(24,35,26,.48) 55%,rgba(24,35,26,.12)); }
.home-hero-copy small { font-family: var(--font); font-size: .5625rem; font-weight: 600; letter-spacing: .12em; }
.home-hero-copy strong { margin-top: 10px; font-size: 1.5rem; letter-spacing: -.035em; line-height: 1.14; }
.environment-pills { left: 16px; right: 16px; bottom: 15px; gap: 9px; }
.environment-pills > span { min-height: 41px; padding: 9px 11px; border: 0; background: #fffffff2; border-radius: 13px; }
.environment-pills strong { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.025em; }
.environment-pills small { font-size: .625rem; }
.page-section { margin-top: 27px; }
.quick-scenes { gap: 9px; }
.scene-quick { min-height: 88px; padding: 14px 11px; border-radius: 17px; }
.scene-quick span { font-size: .6875rem; font-weight: 600; letter-spacing: -.01em; }
.scene-quick svg { width: 23px; height: 23px; }
.device-card { border-radius: 21px; box-shadow: 0 1px 2px #26302602; }
.device-open { min-height: 0; padding: 15px 13px 0; }
.device-title { position: relative; display: block; min-width: 0; width: 100%; margin-bottom: 9px; overflow: hidden; line-height: 1.35; }
.device-card-body { display: grid; grid-template-columns: minmax(0,1fr) 48px; align-items: center; gap: 8px; width: 100%; min-height: 62px; }
.device-card-meta { display: grid; grid-template-rows: auto auto; row-gap: 4px; min-width: 0; }
.device-card-meta .device-room, .device-card-meta .device-status { margin: 0; overflow-wrap: anywhere; }
.device-status-primary, .device-status-secondary { display: block; line-height: 1.5; }
.device-status-secondary { display: flex; align-items: center; gap: 4px; margin-top: 3px; color: var(--muted); font-size: .6875rem; font-weight: 500; white-space: nowrap; }
.device-status-secondary svg { width: 12px; height: 12px; stroke-width: 1.7; }
.device-open:focus-visible { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.device-title-static { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: var(--motion-title-static,1); }
.device-title-motion { position: absolute; left: 0; top: 0; display: block; width: max-content; white-space: nowrap; opacity: var(--motion-title-active,0); user-select: none; pointer-events: none; }
.device-art { position: relative; display: flex; width: 48px; height: 62px; align-items: center; justify-content: flex-end; margin: 0; }
.device-card.is-selected { border-color: var(--sage-dark); box-shadow: inset 0 0 0 1px var(--sage-dark); }
.device-thumbnail { display: block; width: 88px; height: 88px; flex-shrink: 0; background-image: url('../assets/images/device-thumbnails.png'); background-repeat: no-repeat; background-size: 300% 300%; background-position: var(--product-x) var(--product-y); mix-blend-mode: multiply; }
.device-command-status { position: absolute; right: 0; top: 0; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--stone); color: var(--muted); }
.device-command-status svg { width: 13px; height: 13px; }
.is-offline .device-thumbnail { opacity: .45; }
html[data-reduced-motion=true] .device-title-static { opacity: 1 !important; }
html[data-reduced-motion=true] .device-title-motion { opacity: 0 !important; }
.device-symbol { width: 34px; height: 34px; margin-bottom: 12px; border-radius: 11px; }
.device-name { font-size: .875rem; font-weight: 620; line-height: 1.35; letter-spacing: -.02em; }
.device-room { font-size: .625rem; letter-spacing: .015em; line-height: 1.5; }
.device-status { margin-top: 8px; font-size: .75rem; line-height: 1.5; }
.device-card.is-offline, .is-offline .device-status { color: var(--muted); }
.device-quick { min-height: 52px; padding-inline: 13px; }
.quick-pill, .read-only { font-size: .6875rem; }
.inline-device-error { font-size: .6875rem; }
.device-countdown { font-size: .6875rem; }
.device-countdown small { font-size: .625rem; }
.device-detail-arrow { font-size: 18px; }
.text-button { font-size: .75rem; }
.room-card { border-radius: 20px; }
.room-card strong { font-size: 1.1875rem; font-weight: 600; letter-spacing: -.025em; }
.room-card small { font-size: .6875rem; }
.room-card-overlay, .room-detail-hero > span { background: linear-gradient(0deg,rgba(24,35,26,.85),rgba(24,35,26,.7) 50%,rgba(24,35,26,0)); }
.room-overview { font-size: .6875rem; }
.room-detail-hero h1 { font-size: 1.875rem; }
.room-detail-hero p { font-size: .6875rem; }
.list-card, .automation-card { border-radius: 21px; }
.list-card-main { min-height: 87px; padding: 19px; }
.list-card-main strong { font-size: .9375rem; letter-spacing: -.02em; }
.list-card-main small { font-size: .6875rem; }
.scene-list-card > p { padding-inline: 19px; padding-bottom: 14px; font-size: .75rem; }
.scene-run-link { min-height: 49px; font-size: .8125rem; }
.automation-open strong { font-size: 1.0625rem; letter-spacing: -.025em; }
.automation-open p { font-size: .8125rem; line-height: 1.65; }
.automation-open small { font-size: .6875rem; }
.rule-block { border-radius: 17px; }
.rule-block strong, .rule-block > p:not(.eyebrow) { font-size: .8125rem; }
.action-summary { font-size: .75rem; }
.test-actions > p { font-size: .6875rem; line-height: 1.75; }
.target-list strong, .history-row strong { font-size: .8125rem; }
.target-list small, .history-row small { font-size: .6875rem; }
.history-row time { font-family: var(--font); font-size: .6875rem; font-variant-numeric: tabular-nums; }
.sheet { background: rgba(248,250,244,.97); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); transform: translate3d(0,var(--motion-sheet-y,0px),0); will-change: transform; box-shadow: 0 -8px 35px #23311e0d; }
.sheet::backdrop { background: #25301f66; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.sheet-grip { width: 100%; height: 20px; margin: 0; background: none; position: relative; border-radius: 0; touch-action: none; cursor: grab; }
.sheet-grip::after { content: ''; position: absolute; top: 7px; left: calc(50% - 17px); width: 34px; height: 4px; border-radius: 10px; background: #c1cabc; }
.sheet-header { border-bottom: 0; padding-top: 1px; padding-bottom: 13px; touch-action: none; cursor: grab; }
.sheet-header h2 { font-size: 1.4375rem; letter-spacing: -.03em; }
.sheet-header .eyebrow { font-size: .5625rem; }
.sheet-scroll { border-top: 1px solid #e1e7d9; }
.sheet-intro, .control-hint { font-size: .75rem; line-height: 1.75; }
.control-hint { font-size: .6875rem; }
.device-panel-summary { font-size: .8125rem; }
.range-control strong { font-size: .8125rem; font-weight: 550; }
.range-control output { font-size: .9375rem; font-variant-numeric: tabular-nums; }
.range-ends small { font-size: .625rem; }
input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(to right,var(--sage) 0 var(--range-fill,50%),#dbe2d3 var(--range-fill,50%) 100%); }
.control-row > span { font-size: .875rem; }
.segmented button { font-size: .6875rem; }
.segmented { flex-wrap: wrap; }
.segmented button { min-width: 44px; }
.curtain-buttons button { font-size: .8125rem; }
.device-model { font-size: .6875rem; }
.device-model small { font-size: .625rem; }
.sample-footage-label { font-size: .625rem; }
.field-label, form label, .panel-section > label { font-size: .8125rem; }
input:not([type=range]), select, textarea { font-size: .9375rem; border-radius: 12px; }
.field-error { font-size: .75rem; }
.target-editor summary strong, .rule-editor-item strong { font-size: .8125rem; }
.target-editor summary small { font-size: .6875rem; }
.availability-list strong { font-size: .75rem; line-height: 1.45; }
.availability-list small { font-size: .6875rem; }
.panel-section > p:not(.control-hint) { font-size: .75rem; }
.time-presets span { font-size: .6875rem; }
.run-step strong { font-size: .8125rem; line-height: 1.65; }
.run-step small { font-size: .6875rem; }
.run-overview > p { font-size: .75rem; }
.toast { bottom: calc(var(--nav-height,70px) + 24px + env(safe-area-inset-bottom)); font-size: .8125rem; background: #2d4026f2; border: 1px solid #ffffff29; }
.confirm-dialog { background: #fcfdf9; }
.confirm-dialog p { font-size: .8125rem; }
.confirm-actions .button { font-size: .75rem; }
@media (max-width:500px) {
  .app-header { padding-top: max(12px,env(safe-area-inset-top)); }
  .bottom-nav { bottom: max(9px,calc(env(safe-area-inset-bottom) + 4px)); padding-bottom: 6px; }
  .page-scroll { padding-bottom: calc(var(--nav-height,74px) + 33px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-transparency:reduce) {
  .app-header, .bottom-nav, .sheet { background: var(--page); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sheet::backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast:more) {
  .app-header, .bottom-nav, .sheet { background: var(--page); backdrop-filter: none; -webkit-backdrop-filter: none; border: 1px solid var(--ink); }
  .device-card, .list-card, .automation-card, .rule-block { border-color: var(--muted); }
}
