.rooms-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,300px);gap:20px;align-items:start}
.room-clear-selection{margin-left:auto;font-size:13px!important;flex-shrink:0}.room-metrics{display:flex;flex-wrap:wrap;gap:10px 24px;margin:12px 0}.room-metric{min-width:76px}.room-metric dt{font-size:12px;line-height:1.35;color:var(--muted);max-width:210px;overflow-wrap:anywhere}.room-metric dd{font-family:Nunito,Inter,sans-serif;font-size:22px;font-weight:800;line-height:1.25;margin:3px 0 0;color:var(--navy)}.room-device-tools{display:flex;justify-content:flex-end;margin:8px 0}.room-device-tools button{font-size:13px;padding:8px 12px}.device-grid.room-control-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:10px;margin:12px 0}.device-card.compact-control{padding:13px 15px;border-radius:12px;min-width:0}.compact-control-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.compact-control h3,.compact-control h2{font-size:16px;line-height:1.3;overflow-wrap:anywhere;margin:0}.compact-control-heading>b{font-size:13px;font-weight:600;text-align:right;flex-shrink:0;max-width:45%}.compact-control .device-controls{margin:10px 0 0;gap:8px}.compact-control .device-controls button{flex:1;min-height:44px;padding:7px 10px;font-size:14px}.compact-device-options{margin:5px 0 0}.compact-device-options>summary{font-size:12px;min-height:30px}.compact-device-options button{font-size:12px;padding:5px 8px;min-height:36px}.compact-control .card-head{margin-bottom:8px}.compact-control .device-reading{font-size:17px;margin:6px 0}.compact-control>details{font-size:12px}.compact-control>details summary{font-size:12px;min-height:32px}.compact-control>button.small{font-size:12px;padding:6px 10px;min-height:38px}.home-room-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.home-room-compact{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px;min-width:0}.home-room-compact>h3{font-size:18px}.home-room-compact .room-metrics{gap:8px 20px;margin:10px 0}.home-room-compact .room-metric dd{font-size:21px}.home-room-compact .device-grid.room-control-grid{grid-template-columns:1fr;margin-bottom:0}.home-room-compact .compact-control{background:var(--cream);border-color:#e9e2d5}.room-device-summary>.hint{margin-top:12px}
@media(max-width:600px){.home-room-grid{grid-template-columns:1fr}.device-grid.room-control-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.room-control-grid>.compact-control{min-width:0}.compact-control-heading{flex-direction:column;gap:5px}.compact-control-heading>b{text-align:left;max-width:100%}.compact-control .device-controls{flex-wrap:wrap}.compact-control .device-controls button{min-width:44px}.room-selection-heading{flex-wrap:wrap}.room-metrics{gap:10px 18px}.room-clear-selection{font-size:12px!important}}
.room-metric.media-metric{display:flex;align-items:center;gap:10px;padding:7px 10px;border:1px solid #e0e6e4;border-radius:8px;background:#f8faf9;min-width:0}
.room-metric.media-metric dt{font-size:13px;max-width:none}
.room-metric.media-metric dd{font:600 13px/1.4 Inter,sans-serif;margin:0}
.rooms-workspace .page-heading{gap:18px;flex-wrap:wrap}.room-page-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.rooms-workspace button,.room-name-form button,.room-editor-options button,.mapping-dialog .model-actions button,form[data-form="model-room-merge"] button{height:auto;min-height:44px;min-width:0;max-width:100%;white-space:normal;line-height:1.45;overflow-wrap:anywhere}
.room-page-actions button{flex:0 1 auto;padding:10px 18px}.room-plan-card{padding:24px;margin-bottom:0;min-width:0}.room-plan-card>.card-head{gap:16px;align-items:center;flex-wrap:wrap}.room-plan-card h2,.room-directory h2{font-size:24px}
.room-view-toggle{flex-shrink:0}.room-view-toggle button{min-width:56px;min-height:44px;font-size:15px}.room-plan-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:18px 0 10px}.room-plan-toolbar label{display:grid;gap:5px;flex:1;max-width:250px;font-size:14px}.room-plan-toolbar .link{padding:8px 4px}.room-plan-toolbar select{min-height:44px}
.room-plan-card .room-map{display:block;width:100%;height:390px;max-height:none;background:#fffaf3;border-radius:14px;padding:14px}.room-plan-card .room-map polygon{stroke-width:1px;vector-effect:non-scaling-stroke}.room-plan-card .room-map text{font-size:var(--map-label-size);font-weight:600;pointer-events:none}.room-plan-canvas{height:390px;margin:0;border:0;border-radius:14px;overflow:hidden}.room-plan-canvas canvas{display:block;max-width:100%;touch-action:none}
.room-directory{padding:22px;min-width:0}.room-directory-search{margin:16px 0 10px}.room-directory-search input{font-size:16px}.room-directory .room-directory-list{max-height:620px;overflow:auto;overscroll-behavior:contain;display:grid;gap:4px;padding:2px}.room-directory-row{display:flex;width:100%;align-items:center;gap:12px;justify-content:space-between;border:1px solid transparent;background:transparent;text-align:left;padding:13px 12px;border-radius:10px;font-weight:400}.room-directory-row>span:first-child{min-width:0;display:grid;gap:5px}.room-directory-row b{font-size:16px;overflow-wrap:anywhere}.room-directory-row small{font-size:13px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}.room-directory-row[aria-pressed=true]{background:var(--mist);border-color:var(--line)}.room-directory-arrow{font-size:24px;color:var(--navy);flex-shrink:0}.room-directory-row:focus-visible{outline:3px solid var(--navy);outline-offset:1px}
.rooms-workspace .room-selection-heading{align-items:center}.rooms-workspace .room-actions{gap:8px}.rooms-workspace .room-actions button{font-size:14px;padding:9px 14px}.rooms-workspace .selected-room-devices{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:12px;margin:18px 0}.rooms-workspace .device-card{padding:18px;min-width:0}.rooms-workspace .device-card h2{font-size:19px;overflow-wrap:anywhere}.rooms-workspace .device-controls{flex-wrap:wrap}.rooms-workspace .device-controls button{flex:1 1 90px}.rooms-workspace .device-card .pill{white-space:normal}
.room-more-options{border-top:1px solid var(--line);padding-top:10px}.room-more-options summary{cursor:pointer;min-height:44px;display:list-item;padding:10px 0;font-weight:600;color:var(--navy)}.room-more-options .field{margin:10px 0 16px}.room-editor-options{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.room-editor-options button{text-align:left;font-size:14px}.room-name-form input[name=name]{font-size:19px;min-height:52px}.room-name-form .row-actions,form[data-form="model-room-merge"] .row-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.room-name-form .row-actions button,form[data-form="model-room-merge"] .row-actions button{flex:1 1 120px;padding:12px 18px}.room-merge-preview{background:var(--mist);padding:14px 16px;border-radius:10px;color:var(--navy);overflow-wrap:anywhere}.room-model-settings{margin-top:20px;padding:20px 24px}.room-model-settings>summary{cursor:pointer;min-height:44px;padding:10px 0;color:var(--navy);font-weight:600;overflow-wrap:anywhere}.room-model-settings-body{display:grid;gap:16px;margin-top:16px}.room-model-settings .field{max-width:440px}.room-plan-card .map-empty{min-height:280px;display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center;padding:30px;text-align:center}.room-plan-card .viewer-status{display:flex;flex-direction:column;gap:16px;text-align:center;padding:20px}
.tablet .room-directory-row b{font-size:19px}.tablet .room-directory-row small{font-size:15px}.tablet .rooms-workspace .room-actions button{font-size:17px}
.room-map [data-room-shape],.home-floor-plan [data-room-shape]{fill:#d9e8df;stroke:#8baba0;stroke-width:1px;vector-effect:non-scaling-stroke;transition:fill .15s;stroke-linejoin:round}
.home-floor-plan .home-map-room [data-room-shape]{fill:var(--mist);stroke:#becbd5}.home-floor-plan .presence [data-room-shape],.home-floor-plan .motion [data-room-shape]{fill:#d9e8df}.home-floor-plan .alert [data-room-shape]{fill:var(--peach)}.home-floor-plan .last-known [data-room-shape]{fill:#f5e7cb}
.room-map [aria-pressed=true] [data-room-shape],.home-floor-plan .selected [data-room-shape]{fill:var(--peach);stroke:var(--navy);stroke-width:2px}.room-map [data-map-room]:focus-visible [data-room-shape],.home-floor-plan [data-map-room]:focus-visible [data-room-shape]{stroke:var(--navy);stroke-width:3px}.room-map [data-map-room],.room-directory-row{touch-action:manipulation}
.room-label{pointer-events:none}.room-label text{font-family:Inter,sans-serif;fill:var(--navy);font-weight:600;paint-order:stroke;stroke:#fffaf3;stroke-width:.035em;stroke-linejoin:round}.room-callout{pointer-events:auto;cursor:pointer;touch-action:manipulation}.room-callout text{pointer-events:none;stroke:none}.room-callout rect{fill:#fff;stroke:#c9d5d0;stroke-width:1px;vector-effect:non-scaling-stroke}.room-callout.selected rect{stroke:var(--navy);stroke-width:1.5px}.room-label-leader{fill:none;stroke:#829b90;stroke-width:1px;vector-effect:non-scaling-stroke;pointer-events:none}.room-label.selected .room-label-leader{stroke:var(--navy)}
.model-room-labels{position:absolute;inset:0;width:100%;height:100%;pointer-events:none!important}.model-room-labels *{pointer-events:none!important}
.room-area-form{display:grid;gap:18px}.room-area-form button{height:auto;min-height:44px;min-width:0;max-width:100%;white-space:normal;line-height:1.4;overflow-wrap:anywhere;padding:10px 16px}.room-area-form .row-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}.room-area-form .row-actions button{flex:1 1 130px}.room-area-form .field{min-width:0}.room-area-form .field input,.room-area-form select{width:100%;min-width:0;font-size:16px;min-height:46px}.room-location-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.room-presets{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.room-presets>span{font-size:14px;color:var(--muted);margin-right:4px}.room-presets button{background:var(--mist);font-size:14px}
.room-shape-editor{border:1px solid var(--line);border-radius:14px;padding:18px;min-width:0}.shape-heading h3{font-size:20px;margin:0 0 8px}.shape-heading h3 small,.shape-model-parts summary small{font-size:13px;font-weight:400;color:var(--muted);margin-left:5px}.shape-heading p{margin:0 0 14px}.shape-tools{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.shape-tools button{font-size:14px}.shape-tools [aria-pressed=true],.shape-area-list [aria-pressed=true]{background:var(--navy);color:#fff}.shape-canvas-wrap{position:relative;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fffaf3}.shape-canvas{display:block;width:100%;height:340px;touch-action:none;user-select:none}.shape-canvas:focus-visible{outline:3px solid var(--navy);outline-offset:-3px}.shape-canvas.cutting{cursor:crosshair}.shape-canvas [hidden]{display:none}.shape-model-reference{fill:#e8eeea;fill-opacity:.5;stroke:#9bada3;stroke-dasharray:5 4;stroke-width:1px;vector-effect:non-scaling-stroke}.shape-room-reference{fill:#d8e1db;fill-opacity:.55;stroke:#a9b8af;stroke-width:1px;vector-effect:non-scaling-stroke}.shape-canvas [data-shape-reference]{pointer-events:none}.shape-canvas [data-shape-reference] text{fill:#62766c}.shape-canvas [data-shape-outline]{fill:#f4d4b4;stroke:var(--navy);stroke-width:2px;vector-effect:non-scaling-stroke;pointer-events:none}.shape-hit-area{fill:transparent;stroke:none;cursor:move}.shape-selected-box{fill:none;stroke:var(--navy);stroke-width:1px;stroke-dasharray:4 4;vector-effect:non-scaling-stroke;pointer-events:none}.shape-canvas [data-shape-handle]{fill:#fff;stroke:var(--navy);stroke-width:2px;vector-effect:non-scaling-stroke;cursor:nwse-resize}.shape-canvas [data-shape-handle=ne],.shape-canvas [data-shape-handle=sw]{cursor:nesw-resize}.shape-canvas [data-shape-cut-preview]{fill:#d4715e;fill-opacity:.25;stroke:#aa4633;stroke-width:2px;stroke-dasharray:5 4;vector-effect:non-scaling-stroke;pointer-events:none}.shape-zoom{position:absolute;bottom:10px;right:10px;display:flex;gap:5px}.shape-zoom button{min-width:44px;padding:6px 10px;background:#fff;font-size:16px;box-shadow:0 1px 5px #183b6310}.shape-status{font-size:14px;line-height:1.5;color:var(--navy);min-height:21px;margin:10px 0}.shape-area-list{display:flex;gap:6px;flex-wrap:wrap;max-height:120px;overflow:auto}.shape-area-list button{font-size:13px;padding:7px 11px}.shape-dimensions{margin-top:12px;border-top:1px solid var(--line)}.shape-dimensions>summary,.shape-model-parts>summary{cursor:pointer;padding:13px 0;min-height:44px;font-weight:600}.shape-measures{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.shape-measures .field{font-size:13px}.shape-measures input{padding:9px!important}.shape-dimensions>small{color:var(--muted);display:block;line-height:1.5;margin-top:10px}.shape-selected-actions{display:flex;margin-top:12px}.shape-selected-actions button{font-size:14px}.shape-model-parts{border-top:1px solid var(--line)}.shape-model-parts .part-checklist{margin:12px 0}.room-area-form .editor-canvas[hidden]{display:none}
.tablet .room-area-form button{font-size:17px}.tablet .shape-canvas{height:400px}
.shape-canvas .shape-handle-hit{fill:transparent;stroke:none;pointer-events:all}
.room-area-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr);height:min(900px,94dvh);max-height:94dvh;overflow:hidden;padding:22px;width:min(960px,calc(100% - 24px))}
.room-area-dialog .dialog-head{min-width:0}.room-area-dialog .dialog-head h2{margin:0;font-size:25px}.room-area-dialog .dialog-body{min-height:0;overflow:hidden;display:flex;margin-top:14px}.room-area-dialog .room-area-form{display:flex;flex-direction:column;gap:0;width:100%;min-height:0}.room-area-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:2px 8px 12px 2px;display:grid;gap:16px;align-content:start}.room-area-dialog .room-save-actions{flex-shrink:0;margin:0;padding:14px 0 max(0px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fff;box-shadow:0 -7px 14px #183b6307}.room-area-dialog .form-error{flex-shrink:0;max-height:90px;overflow:auto;margin:8px 0}.room-area-dialog .room-save-actions button{min-height:50px}.room-area-dialog .room-shape-editor{padding:14px}.room-area-dialog .shape-canvas{height:clamp(260px,43dvh,460px)}
.shape-canvas.panning{cursor:grab}.shape-canvas [data-shape-guides]{pointer-events:none}.shape-canvas [data-shape-guides] line{stroke:#c86841;stroke-width:2px;stroke-dasharray:5 3;vector-effect:non-scaling-stroke}.shape-canvas [data-shape-handle=n],.shape-canvas [data-shape-handle=s]{cursor:ns-resize}.shape-canvas [data-shape-handle=w],.shape-canvas [data-shape-handle=e]{cursor:ew-resize}.shape-snap{position:absolute;top:9px;left:9px;display:flex;align-items:center;gap:8px;pointer-events:none}.shape-snap button{pointer-events:auto;min-height:40px;padding:6px 10px;background:#fff;font-size:13px;box-shadow:0 1px 6px #183b6318}.shape-snap [aria-pressed=true]{border-color:#327365;color:#276455}.shape-snap span{font-size:12px;background:#fff4dc;color:#864520;padding:5px 8px;border-radius:8px}.shape-selected-actions{gap:8px;flex-wrap:wrap}.shape-area-list{max-height:84px}.person-zone{margin:18px 0}.person-zone>h2{margin-bottom:8px}.person-zone>.hint{margin-bottom:16px}
@media(max-width:600px){.room-area-dialog[open]{width:calc(100% - 12px);max-height:96dvh;height:96dvh;padding:14px;border-radius:16px}.room-area-dialog .dialog-head h2{font-size:22px}.room-area-dialog .dialog-body{margin-top:10px}.room-area-scroll{padding-right:3px;gap:14px}.room-area-dialog .room-shape-editor{padding:10px}.room-area-dialog .room-save-actions{padding-top:10px}.shape-heading h3{font-size:18px}.shape-tools button{padding:9px 8px}.shape-zoom{right:8px;bottom:8px}.shape-snap span{display:none}}
.room-view-toggle button[data-kind=plan]{min-width:96px}.room-plan-card .room-map,.home-floor-plan{background-color:#fafbf9;background-image:radial-gradient(#cbd5cc55 .7px,transparent .7px);background-size:20px 20px;border:1px solid #e2e8e1}.room-map [data-room-shape],.home-floor-plan [data-room-shape]{fill:#e4ece5;stroke:#a2b3a6;stroke-width:1.4px;filter:drop-shadow(0 2px 2px #314e4510)}.room-map [data-map-room]:nth-of-type(3n+2) [data-room-shape]{fill:#e8edf4}.room-map [data-map-room]:nth-of-type(3n) [data-room-shape]{fill:#f1e9df}.room-map [aria-pressed=true] [data-room-shape],.home-floor-plan .selected [data-room-shape]{fill:#f8dfca;stroke:#254b49;stroke-width:2px}.room-map .room-label-inside text,.home-floor-plan .room-label-inside text{fill:#304d43;stroke:#fafbf9;stroke-width:.08em}.room-callout.selected rect{fill:#fffdf9;stroke:#254b49}.home-map-views button{white-space:normal;min-width:62px}
@media(max-width:600px){.room-location-fields{grid-template-columns:1fr}.room-shape-editor{padding:12px}.shape-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.shape-canvas{height:300px}.shape-measures{grid-template-columns:repeat(2,minmax(0,1fr))}.room-presets>span{width:100%}.room-presets button{flex:1 1 100px}}
@media(max-width:1000px){.rooms-layout{grid-template-columns:1fr}.room-directory .room-directory-list{grid-template-columns:repeat(2,minmax(0,1fr));max-height:420px}.room-directory{padding:20px}}
@media(max-width:600px){.room-page-actions{width:100%}.room-page-actions button{flex:1 1 110px}.room-plan-card{padding:18px 14px}.room-plan-card .room-map,.room-plan-canvas{height:310px}.room-directory .room-directory-list{grid-template-columns:1fr;max-height:390px}.room-plan-card>.card-head{gap:10px}.room-plan-card h2,.room-directory h2{font-size:22px}.room-view-toggle button{min-width:52px}.room-model-settings{padding:16px}.room-editor-options{display:grid;grid-template-columns:1fr}.room-editor-options button{width:100%}.room-name-form .row-actions button,form[data-form="model-room-merge"] .row-actions button{flex:1 1 100px}}

.model-map-shell{position:relative;min-width:0}.model-map-shell [hidden]{display:none!important}.model-map-render{position:relative;overflow:hidden;background:#fffaf3;touch-action:none;border:1px solid #e2e8e1;border-radius:14px}.model-map-render canvas{display:block;width:100%;height:100%;touch-action:none}.model-map-zoom{position:absolute;right:12px;bottom:12px;display:flex;gap:6px;z-index:3}.model-map-zoom button{width:44px;min-height:44px;padding:6px;background:#fff;border:1px solid #b9c8c0;box-shadow:0 2px 8px #183b6316;font-size:23px;line-height:1}.model-map-zoom button:focus-visible{outline:3px solid var(--navy);outline-offset:2px}

.model-map-status{display:block;margin:9px 2px 0;font-size:13px;color:var(--muted);line-height:1.5}

/* Free street tiles and the orthographic plan share one camera. */

.plan-background-map .leaflet-control-attribution{max-width:100%;margin:0;padding:4px 7px;background:#fffffff5;font-size:11px;line-height:1.4}.plan-background-map .leaflet-control-attribution a{color:#183b63;text-decoration:underline}




/* One compact media panel per room. */
.room-media{grid-column:1/-1;min-width:0;width:100%;margin:8px 0 12px;color:#183b63;--media-coral:#c84f39;--media-track:#d7e0e6}
.media-section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;margin-bottom:8px}
.media-section-heading h3{margin:0;font-size:15px;font-weight:700;color:#183b63}
.media-merge-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 12px;border:0;border-radius:12px;background:#fbece6;color:#a83d2a;font:600 12px/1.4 Inter,sans-serif}
.media-merge-button svg{width:16px;height:16px;flex:0 0 auto}
.media-card-stack{display:grid;gap:12px;min-width:0}
.media-panel{background:#f3f6f8;border:1px solid #e1e7eb;border-radius:18px;padding:15px 16px 10px;margin:0;min-width:0;color:#183b63;width:100%;box-sizing:border-box}
.media-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.media-panel-heading>b{display:flex;align-items:center;gap:7px;min-width:0;font-size:14px;overflow-wrap:anywhere}
.media-panel-heading>b svg{width:16px;height:16px;flex:0 0 auto;color:#627282}
.media-state{font-size:11px;max-width:44%;flex-shrink:0;text-align:right;color:#627282;line-height:1.4}
.media-is-playing{color:#346b54}
.media-now-playing{display:flex;align-items:center;gap:11px;margin:14px 0 0;min-width:0;line-height:1.4}
.media-art{width:46px;height:46px;flex:0 0 auto;display:grid;place-items:center;border-radius:12px;background:#183b63;color:#fff9ef}
.media-art svg{width:22px;height:22px}
.media-art-tv{background:#fbece6;color:#c84f39}
.media-now-text{flex:1;min-width:0}
.media-now-playing strong{display:block;font-size:15px;overflow-wrap:anywhere;font-weight:600}
.media-now-text>span{display:block;font-size:12px;margin-top:3px;color:#627282;overflow-wrap:anywhere}
.media-panel-controls:empty{display:none}
.media-panel .media-play{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 12px;border:1px solid #d6e0e6;border-radius:10px;background:#fff;color:#183b63;font:600 12px/1.4 Inter,sans-serif;transition:background 160ms ease,transform 160ms ease}
.media-panel .media-play svg{width:18px;height:18px;flex:0 0 auto}
.media-panel .media-play-round{width:46px;height:46px;min-width:46px;flex:0 0 auto;border:0;border-radius:50%;padding:0;background:#c84f39;color:#fff}
.media-panel .media-play-round svg{width:20px;height:20px;stroke-width:2.5}
.media-panel button:active:not(:disabled),.media-merge-button:active{transform:scale(.97)}
.media-volume-row{display:flex;align-items:center;gap:5px;min-width:0;width:100%;margin-top:8px}
.media-panel .media-mute{width:44px;min-width:44px;flex:0 0 auto;padding:0;border:0;border-radius:10px;background:transparent;color:#627282}
.media-volume{display:block;flex:1;min-width:0;font-size:12px}
.media-volume-value{min-width:36px;flex:0 0 auto;text-align:right;font-size:12px;font-variant-numeric:tabular-nums;color:#627282}
.media-volume input{appearance:none;-webkit-appearance:none;width:100%;height:44px;min-width:0;min-height:44px;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;accent-color:#c84f39;background:transparent}
.media-volume input::-webkit-slider-runnable-track{height:5px;border-radius:5px;background:linear-gradient(to right,var(--media-coral) var(--media-level),var(--media-track) var(--media-level))}
.media-volume input::-moz-range-track{height:5px;border-radius:5px;background:var(--media-track)}
.media-volume input::-moz-range-progress{height:5px;border-radius:5px;background:var(--media-coral)}
.media-volume input::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;margin-top:-5.5px;height:16px;width:16px;border:3px solid #c84f39;border-radius:50%;background:#fff}
.media-volume input::-moz-range-thumb{height:10px;width:10px;border:3px solid #c84f39;border-radius:50%;background:#fff}
.media-favourites{display:flex;flex-wrap:nowrap;gap:6px;margin-top:4px;min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;padding-bottom:4px}
.media-favourites .media-play{flex:0 0 auto;min-width:0;max-width:100%;min-height:44px;font-size:11px;padding:7px 10px;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;white-space:nowrap;color:#526174}
.media-feedback{font-size:12px;color:#526174;line-height:1.4;margin:8px 0 0}
.media-options.link{min-height:36px;font-size:11px;padding:8px 0;margin-top:1px;color:#627282}
.media-panel button:disabled,.media-panel input:disabled{opacity:.5;cursor:default}
.media-panel :focus-visible,.media-merge-button:focus-visible{outline:3px solid #c84f39;outline-offset:3px}
.media-group-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.media-group-heading>div{min-width:0}
.media-group-heading h4{margin:0;font-size:16px;overflow-wrap:anywhere}
.media-group-heading p{margin:5px 0 0;font-size:11px;color:#627282;overflow-wrap:anywhere}
.media-group-count{flex:0 0 auto;padding:4px 8px;background:#e8f2eb;color:#346b54;border-radius:8px;font-size:11px;white-space:nowrap}
.media-group-players{display:grid;gap:12px;margin:18px 0 16px}
.media-group-player{display:grid;grid-template-columns:35px minmax(0,1fr) auto;align-items:center;gap:10px;min-width:0}
.media-group-player .media-art{width:35px;height:35px;border-radius:9px}
.media-group-player .media-art svg{width:17px;height:17px}
.media-group-player>div{min-width:0}
.media-group-player b{display:block;font-size:12px;overflow-wrap:anywhere}
.media-group-player>div>span{display:block;font-size:11px;color:#627282;overflow-wrap:anywhere;margin-top:2px}
.media-group-player>.media-state{max-width:90px}
.media-shared-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:13px;border-top:1px solid #e1e7eb}
.media-shared-controls>span{font-size:12px;font-weight:600}
.media-panel .media-group-play{min-width:105px;border-color:transparent;background:#c84f39;color:#fff}
.media-shared-volume-label{margin:14px 0 0;font-size:11px;color:#627282}
.media-shared-volume-label+.media-volume-row{margin-top:0}
.media-group-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0 8px;margin-top:5px}
.media-group-actions .link{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;min-width:0;padding:8px 0;font-size:11px;color:#627282}
.media-group-actions svg{width:15px;height:15px;flex:0 0 auto}
.media-individual-controls{margin-top:8px;border-top:1px solid #e1e7eb}
.media-individual{padding:14px 0 6px}
.media-individual+.media-individual{margin-top:8px;border-top:1px solid #e1e7eb}
.media-individual-play{margin-top:9px}
.media-merge-choices{display:grid;gap:8px}
.media-merge-choice{display:flex;align-items:center;gap:12px;min-height:64px;padding:12px;border:1px solid #dce5e9;border-radius:12px;background:#f3f6f8;min-width:0}
.media-merge-choice:has(input:checked){border-color:#c84f39}
.media-merge-choice input{width:19px;height:19px;min-height:0;flex:0 0 auto;margin:0;accent-color:#c84f39}
.media-merge-choice>svg{width:20px;height:20px;flex:0 0 auto;color:#627282}
.media-merge-choice>span{min-width:0}
.media-merge-choice b{display:block;font-size:14px;overflow-wrap:anywhere}
.media-merge-choice small{display:block;font-size:11px;color:#627282;margin-top:2px}
.media-merge-form .field input{font-size:16px}
.media-merge-note{font-size:12px;color:#627282;margin:0}
.comfortable .media-panel .media-play,.comfortable .media-volume input,.comfortable .media-merge-button,.comfortable .media-group-actions .link{min-height:52px;font-size:15px}
.comfortable .media-play-round{min-width:52px;width:52px;height:52px}
.comfortable .media-panel .media-mute{width:52px;min-width:52px}
.comfortable .media-now-playing strong{font-size:17px}
.comfortable .media-state,.comfortable .media-group-player b,.comfortable .media-group-player>div>span,.comfortable .media-volume-value{font-size:14px}
.room-device-summary>.room-media{grid-column:1/-1}
.room-device-summary .room-metrics{margin-top:12px}
@media(max-width:420px){.media-panel{padding:13px 12px 9px}.media-now-playing{gap:9px}.media-art{width:39px;height:39px;border-radius:10px}.media-panel .media-play-round{width:44px;height:44px;min-width:44px}.media-now-playing strong{font-size:14px}.media-favourites{gap:5px}.media-favourites .media-play{padding:7px 8px}.comfortable .media-panel .media-play-round{width:52px;height:52px;min-width:52px}}
@media(pointer:coarse){.media-options.link{min-height:44px}}
@media(prefers-reduced-motion:reduce){.media-panel .media-play{transition:none}.media-panel button:active:not(:disabled),.media-merge-button:active{transform:none}}
.media-card-options{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:3px 12px;margin-top:6px}
.media-radio-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:7px 10px;background:#fbece6;color:#a83d2a;border:0;border-radius:10px;font:600 12px/1.4 Inter,sans-serif}
.media-radio-button svg{width:16px;height:16px;flex:0 0 auto}
.media-group-radio{margin:10px 0 5px}
.media-group-radio>.media-favourites{margin-top:8px}
.media-radio-browser{min-width:0;color:#183b63}
.media-radio-browser [hidden],.room-media [hidden]{display:none!important}
.radio-browser-heading{display:flex;align-items:center;gap:12px;margin-bottom:20px}
.radio-browser-heading b{display:block;font-size:16px}
.radio-browser-heading p{margin:3px 0 0;font-size:12px;color:#627282;overflow-wrap:anywhere}
.radio-browser-icon{display:grid;place-items:center;width:44px;height:44px;flex:0 0 auto;border-radius:13px;background:#fbece6;color:#c84f39}
.radio-browser-icon svg{width:23px;height:23px}
.radio-favourites-heading,.radio-list-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}
.radio-favourites-heading>span,.radio-list-heading>span{font-size:12px;color:#627282}
.radio-description{margin:6px 0 12px;font-size:12px;line-height:1.5;color:#627282}
.radio-search{margin:16px 0;display:grid;gap:7px}
.radio-search input{min-width:0;width:100%;font-size:16px;min-height:46px}
.radio-station-list{display:grid;gap:7px;margin-top:10px}
.radio-station{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:8px;align-items:center;min-width:0;padding:8px;border:1px solid #e1e7eb;border-radius:13px;background:#f3f6f8}
.radio-station-name{min-width:0;overflow-wrap:anywhere;font-size:13px;font-weight:600;line-height:1.45}
.radio-favourite-button,.radio-favourite-marker{display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:10px;background:transparent;color:#627282}
.radio-favourite-button svg,.radio-favourite-marker svg{width:19px;height:19px}
.radio-favourite-button[aria-pressed="true"],.radio-is-favourite .radio-favourite-marker{color:#c84f39}
.radio-favourite-button[aria-pressed="true"] svg,.radio-is-favourite .radio-favourite-marker svg{fill:currentColor}
.radio-station-play{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:8px 10px;border:0;border-radius:10px;background:#c84f39;color:#fff;font:600 12px/1.4 Inter,sans-serif}
.radio-station-play svg{width:15px;height:15px;flex:0 0 auto}
.radio-station button:disabled{opacity:.45}
.radio-setup{font-size:14px;line-height:1.6}
.radio-setup>button{display:block;margin-top:18px}
.radio-feedback,.radio-no-results{font-size:13px;line-height:1.5;margin:14px 0 0;color:#627282}
.radio-source{margin:16px 0 0}
.comfortable .media-radio-button,.comfortable .radio-station-play{min-height:52px;font-size:15px}
.comfortable .radio-station{grid-template-columns:52px minmax(0,1fr) auto}
.comfortable .radio-favourite-button,.comfortable .radio-favourite-marker{width:52px;height:52px}
.comfortable .radio-station-name{font-size:16px}

/* Architectural plan: a quiet shared treatment of each home's own geometry. */
.home-map-surface,.home-floor-plan,.room-plan-card .room-map,.model-canvas[data-view="plan"]{background:#fffefd}
.home-map-surface{border-color:#e0e4e7}
.home-map-legend{gap:10px 14px;font-size:12px}
.home-map-legend .room-area-key{width:8px;height:8px;border-radius:50%;border-width:1px}
.room-map [data-room-shape],.home-floor-plan .home-map-room [data-room-shape]{fill:#f2f1ed;stroke:#8193a0;stroke-width:1px}
.home-floor-plan .presence [data-room-shape],.home-floor-plan .motion [data-room-shape]{fill:#e6eee8}
.home-floor-plan .last-known [data-room-shape]{fill:#f2eee4}
.home-floor-plan .alert [data-room-shape]{fill:#f8e8df}
.room-map [aria-pressed="true"] [data-room-shape],.home-floor-plan .selected [data-room-shape]{fill:#f5e6dc;stroke:#193b60;stroke-width:2px}
.model-room-labels .room-plan-label rect{fill:#fffefd;fill-opacity:.97;stroke:#dbe2e6;stroke-width:1px;vector-effect:non-scaling-stroke}
.model-room-labels .room-plan-label text{fill:#193b60;stroke:none;font-weight:600}
.model-room-labels .room-plan-label.selected rect{fill:#193b60;stroke:#193b60}
.model-room-labels .room-plan-label.selected text{fill:#fffefd}
.model-room-labels .room-plan-label .room-label-leader{stroke:#748a9a}

/* Media is a dashboard destination; favourites remain one swipeable row. */
.home-media-entry{display:flex;align-items:center;gap:14px;width:100%;min-width:0;min-height:88px;padding:16px;border:1px solid var(--hk-border,#dde5e3);border-radius:16px;background:#fff;text-align:left;color:var(--hk-ink,#183b63)}
.home-media-entry-icon{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:13px;background:#edf5f1;color:#365f58}
.home-media-entry-icon svg{width:24px;height:24px}.home-media-entry>span:nth-child(2){display:grid;gap:5px;min-width:0;flex:1}.home-media-entry b{font-size:16px}.home-media-entry small{font-size:12px;line-height:1.4;color:#65727b}.home-media-entry-count{flex:none;font-size:12px;color:#65727b}
.media-hub{display:grid;gap:16px;min-width:0;max-width:760px;margin:0 auto}.media-hub>.card{margin:0;min-width:0}.media-hub-player{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.media-hub-player .field{flex:1;min-width:min(100%,220px)}.media-hub-player select{width:100%;max-width:100%}.media-hub-player>p{margin:0;font-size:13px;color:#65727b}.media-hub .radio-station-list{max-height:420px;overflow-y:auto}.media-hub .radio-station-name{min-width:0;overflow-wrap:anywhere}.media-hub-settings>.form-grid{margin-top:16px}.media-hub-settings .checkline span{display:grid;gap:4px}.media-hub-settings .checkline small{font-size:12px;line-height:1.5;color:#65727b}.media-hub .media-radio-browser{min-width:0}.media-hub .radio-station{min-width:0}
@media(max-width:420px){.home-media-entry{padding:13px;gap:10px}.home-media-entry-count{display:none}.media-hub-radio,.media-hub-settings{padding:16px}.media-hub .radio-station{gap:6px}.media-hub .radio-station-play{padding:8px;min-width:44px}.media-hub .radio-station-play>span{display:none}}
