/* 家裡平面圖（claude-smarthome-20261118）。版面照運算節點：頂部狀態卡、calm 列、sheet；顏色只用既有 token。 */
.hm-page{display:flex;flex-direction:column;gap:14px}
.hm-top{display:flex;flex-direction:column;gap:10px}
.hm-summary{margin:0}
.hm-summary.hm-bad .calm-summary-title{color:#c73b3b}
:root[data-theme=dark] .hm-summary.hm-bad .calm-summary-title{color:#f78484}
.hm-actions{display:flex;flex-wrap:wrap;gap:8px}
.hm-actions .choice-button{min-height:40px;padding:8px 16px}
.hm-floors{margin:0;align-self:flex-start}
.hm-body{display:flex;flex-direction:column;gap:14px;min-width:0}
.hm-body.hm-wide{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,340px);align-items:start}
.hm-map{position:relative;min-width:0}
.hm-map .ck-viewport{width:100%;height:auto;aspect-ratio:var(--hm-ar,1.43);min-height:260px;max-height:62vh}
.hm-wide .hm-map .ck-viewport{max-height:clamp(420px,calc(100dvh - 240px),900px);min-height:360px}
.hm-wide .hm-tray{margin-bottom:14px}
.hm-side{min-width:0}
.hm-side>.calm-section:first-child{margin-top:0}
.hm-wide .hm-side{max-height:calc(100dvh - 220px);overflow-y:auto;padding-right:2px}
.hm-empty{padding:8px 4px}
.hm-plan-card{border:1px dashed var(--line);border-radius:18px;padding:20px;display:flex;flex-direction:column;gap:6px}
.hm-plan-card p{margin:0}
.hm-plan-acts{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
/* 標記：圓形圖示＋一行短字。固定螢幕大小（CanvasKit 預設），燈號用狀態色。 */
.hm-mk{display:flex;flex-direction:column;align-items:center;gap:3px;pointer-events:auto}
.hm-dot{position:relative;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--bg);border:2px solid var(--line);box-shadow:0 1px 4px #0000001f;transition:background-color .15s,border-color .15s,transform .12s}
.hm-dot svg,.hm-li svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.hm-lab{font-size:12px;line-height:1.25;padding:1px 6px;border-radius:8px;background:var(--bg);color:var(--ink);white-space:nowrap;box-shadow:0 0 0 1px var(--line);max-width:150px;overflow:hidden;text-overflow:ellipsis}
.ck-marker:active .hm-dot{transform:scale(.92)}
.hm-t-ok .hm-dot{border-color:#3fa66b}
.hm-t-warn .hm-dot{border-color:#d9822b;color:#b75a08}
.hm-t-warn .hm-lab{color:#b75a08}
.hm-t-bad .hm-dot{border-color:#c73b3b;background:#c73b3b;color:#fff}
.hm-t-off .hm-dot{border-color:var(--line);color:var(--muted);background:var(--surface)}
.hm-t-off .hm-lab{color:var(--muted)}
.hm-on .hm-dot,.hm-t-on .hm-dot{background:var(--hm-c,#f5b83d);border-color:var(--hm-c,#f5b83d);color:#3b2a00}
.hm-k-switch.hm-on .hm-dot,.hm-k-plug.hm-on .hm-dot{background:#3fa66b;border-color:#3fa66b;color:#fff}
.hm-k-motion.hm-t-on .hm-dot{background:#5b8def;border-color:#5b8def;color:#fff;animation:hm-pulse 1.6s ease-out 1}
:root[data-theme=dark] .hm-t-warn .hm-dot,:root[data-theme=dark] .hm-t-warn .hm-lab{color:#f5a35d}
:root[data-theme=dark] .hm-t-ok .hm-dot{border-color:#62c991}
.hm-bat{position:absolute;right:-3px;bottom:-3px;width:12px;height:12px;border-radius:50%;background:#d9822b;border:2px solid var(--bg)}
.hm-spin{position:absolute;inset:-4px;border-radius:50%;border:2px solid transparent;border-top-color:var(--ink);animation:hm-rot .7s linear infinite}
@keyframes hm-rot{to{transform:rotate(360deg)}}
@keyframes hm-pulse{0%{box-shadow:0 0 0 0 #5b8def88}100%{box-shadow:0 0 0 14px #5b8def00}}
/* 清單與詳情 */
.hm-li{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--surface);color:var(--ink);flex:none}
.hm-li svg{width:17px;height:17px}
.hm-li.hm-on{background:var(--hm-c,#f5b83d);color:#3b2a00}
.hm-li.hm-t-warn{color:#b75a08}.hm-li.hm-t-off{color:var(--muted)}.hm-li.hm-t-bad{background:#c73b3b;color:#fff}
.hm-sw{margin-left:6px}
.hm-dialog{width:min(520px,calc(100vw - 24px))}
.hm-dbody{display:flex;flex-direction:column;gap:12px}
.hm-big{display:flex;align-items:center;gap:12px;font-size:22px}
.hm-big .hm-li{width:48px;height:48px}.hm-big .hm-li svg{width:24px;height:24px}
.hm-facts{margin:0}
.hm-ctl{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.hm-ctl-col{flex-direction:column;align-items:stretch}
.hm-range{width:100%;accent-color:var(--ink);height:36px}
.hm-swatches{display:flex;flex-wrap:wrap;gap:10px}
.hm-swatch{width:40px;height:40px;border-radius:50%;border:2px solid var(--line);padding:0;cursor:pointer}
.hm-swatch[aria-pressed=true]{box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--ink)}
.hm-pick{background:conic-gradient(red,yellow,lime,aqua,blue,magenta,red);-webkit-appearance:none;appearance:none}
.hm-pick::-webkit-color-swatch{border:0;border-radius:50%;opacity:0}
.hm-chart{display:flex;flex-direction:column;gap:2px}
.hm-spark{width:100%;height:72px}
.hm-spark path{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.hm-spark-temperature path{stroke:#d9822b}.hm-spark-humidity path{stroke:#5b8def}
.hm-spark-cap{margin:6px 0 0}
.hm-cam{display:flex;flex-direction:column;gap:10px;align-items:flex-start}
.hm-snap{width:100%;border-radius:12px;background:#000;aspect-ratio:16/9;object-fit:contain}
.hm-snap-wait{width:100%;aspect-ratio:16/9;border-radius:12px;background:var(--surface);display:grid;place-items:center}
.hm-cam-acts,.hm-tail{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;width:100%}
.hm-danger{color:#c73b3b}
:root[data-theme=dark] .hm-danger{color:#f78484}
.hm-danger-fill{background:#c73b3b!important;color:#fff!important}
.hm-input{display:block;width:100%;border:1px solid var(--line);border-radius:12px;padding:12px;color:var(--ink);background:var(--bg);font:inherit;font-size:16px;min-height:46px;box-sizing:border-box}
.hm-results{margin-top:8px}.hm-results:empty{display:none}
/* 編輯 */
.hm-toolbar{display:flex;flex-wrap:nowrap;gap:8px;align-items:center;position:sticky;top:0;z-index:7;background:var(--bg);padding:6px 0}
.hm-toolbar>.choice-button{flex:none}
.hm-toolbar .primary{min-height:40px;padding:8px 18px;width:auto;margin-top:0;flex:none}
.hm-tools{display:flex;gap:8px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none;padding:2px;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);padding-right:24px}.hm-tools::-webkit-scrollbar{display:none}.hm-tools>*{flex:none}
.hm-toolbar .choice-button{min-height:40px;padding:8px 14px}
.hm-toolbar [aria-pressed=true]{background:var(--surface);border-color:var(--ink)}
.hm-tray{display:flex;flex-direction:column;gap:6px}
.hm-tray-head{margin:0}
.hm-chips{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 6px;scrollbar-width:thin}
.hm-chip{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:999px;background:var(--bg);color:var(--ink);padding:5px 12px 5px 5px;min-height:42px;white-space:nowrap;cursor:grab;touch-action:none;font:inherit;font-size:14px}
.hm-chip.hm-picked{border-color:var(--ink);background:var(--surface)}
.hm-ghost{position:fixed;z-index:1000;pointer-events:none;transform:translate(-50%,-50%);opacity:.9;box-shadow:0 8px 24px #0003}
.hm-unplace{align-self:flex-start;border:0;background:none;padding:6px 0;text-decoration:underline;cursor:pointer}
/* 新增設備表單 */
.hm-form{display:flex;flex-direction:column;gap:14px}
.hm-field{display:flex;flex-direction:column;gap:6px;font-size:14px}
.hm-check{flex-direction:row;align-items:center;gap:10px}
.hm-err{color:#c73b3b;margin:0}
:root[data-theme=dark] .hm-err{color:#f78484}
.hm-desc{white-space:pre-line}
.hm-done{font-size:17px}
@media(max-width:600px){.hm-dialog{position:fixed;margin:auto auto 12px;max-height:88dvh;border-radius:24px}.hm-lab{font-size:11px}}
@media(prefers-reduced-motion:reduce){.hm-dot{transition:none}.hm-spin{animation:none}.hm-k-motion.hm-t-on .hm-dot{animation:none}.ck-marker:active .hm-dot{transform:none}}
.hm-dialog .hm-tail .primary{width:auto;margin-top:0;min-width:96px}

.hm-actions[hidden]{display:none}
#settings:has(>.settings-subpage[data-section=home]) .settings-nav{display:none}
#settings:has(>.settings-subpage[data-section=home]){padding-left:max(24px,calc((100% - 1200px)/2));padding-right:max(24px,calc((100% - 1200px)/2))}   /* 平面圖頁可以比一般設定頁寬 */
/* 來源「中樞（Tapo 通知）」（claude-hometapo-20261120）：只知道有發通知的狀態。標記外框虛線＝不是即時連線；超過 24 小時淡化。 */
.hm-src-notify .hm-dot{border-style:dashed}
.hm-k-camera.hm-src-notify.hm-t-on .hm-dot{background:#5b8def;border-color:#5b8def;color:#fff;animation:hm-pulse 1.6s ease-out 1}
.hm-k-lock.hm-src-notify .hm-dot{border-style:dashed}
.hm-stale .hm-dot,.hm-stale .hm-lab,.hm-li.hm-stale,.hm-big.hm-stale .hm-li{opacity:.55}
.hm-big.hm-stale strong{color:var(--muted)}
.hm-note{margin:0;color:var(--muted)}
.hm-caps{display:flex;flex-wrap:wrap;gap:6px}
.hm-cap{display:inline-flex;align-items:center;min-height:28px;padding:3px 10px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:13px;line-height:1.3}
.hm-openapp{align-self:flex-start;min-height:40px;padding:8px 16px;text-decoration:none;display:inline-flex;align-items:center}
.hm-openapp-note{margin:0}
.hm-cap-line{margin:0}
.hm-modes:empty{display:none}
.hm-modes-note{margin:4px 4px 0}
@media(prefers-reduced-motion:reduce){.hm-k-camera.hm-src-notify.hm-t-on .hm-dot{animation:none}}
/* 設定 › 通知 › 家裡的提醒、亮度 chips (settings-leaf 20261121) */
.hm-alerts .hm-alert-row{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px}
.hm-alerts .hm-alert-row .calm-text small{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.5}
.hm-alerts .hm-alert-row .segmented{margin:0;width:auto}
.hm-alert-note{margin:12px 2px 0;line-height:1.6}
@media (max-width:560px){.hm-alerts .hm-alert-row{grid-template-columns:minmax(0,1fr)}.hm-alerts .hm-alert-row .segmented{width:100%}}
.hm-bright{margin-top:6px}
/* 還沒放上平面圖的設備（claude-homefix-20261124） */
.hm-place-card{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:7;width:min(320px,calc(100% - 32px));box-sizing:border-box;background:var(--bg);border:1px solid var(--line);border-radius:18px;padding:16px 18px;display:flex;flex-direction:column;gap:6px;box-shadow:0 6px 24px #0000001f;text-align:center;align-items:center}
.hm-place-card p{margin:0}
.hm-place-card .primary{width:auto;margin-top:8px;min-height:44px;padding:10px 22px}
.hm-unplaced{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:2px 2px}
.hm-unplaced .fine{flex:1 1 200px;min-width:0}
.hm-unplaced .choice-button{min-height:40px;padding:8px 16px;flex:none}

/* ---------------------------------------------------------------- 好用度巡頁第 3 批 records 組（claude-uxpatrol-3-20261125）：家裡、通話、記憶、檔案庫的第一層
   （放在這一份是因為它在每一頁都載入、這一組的頁都在這裡；共用的 ux-home.css 不動） */
.hm-more{margin-top:4px}
.hm-body:not(.hm-wide) .hm-side.hm-side-ux{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));column-gap:16px;align-items:start;container-type:inline-size}
.hm-body:not(.hm-wide) .hm-side.hm-side-ux>.calm-section{margin-top:0;min-width:0}
.calls-ux{margin:4px 0 12px}
.calls-ux .call-day{margin:12px 2px 8px}
.calls-ux-rows .call-channel-icon,.ux-lp-block .call-channel-icon{width:32px;height:32px;border-radius:10px}
.ux-lrow.call-ux-short{min-height:40px;padding-top:6px;padding-bottom:6px}
.ux-lrow.call-ux-short .call-channel-icon{width:26px;height:26px;opacity:.75}
.ux-lrow.call-ux-short .ux-lrow-title{font-size:14.5px}
.calls-ux-rows .ux-lrow.selected{background:var(--hover)}
.calls-ux-more,.memory-ux-more,.library-ux-more{margin-top:6px}
.memory-ux-cards{margin-top:8px}
.memory-ux-cards>.memory-card{height:100%;box-sizing:border-box}
.memory-ux-topics{margin-top:12px}
.library-ux .ux-status{margin:4px 0 10px}
.library-ux-foot:empty{display:none}
.library-ux-row{display:flex;align-items:center;border-top:1px solid var(--line)}
.ux-lp-block>.library-ux-row:first-child{border-top:0}
.library-ux-row>.ux-lrow{border-top:0;flex:1;min-width:0}
.library-ux-row>.icon{flex:none;margin-right:6px}
.library-ux-row .library-file-icon{flex:none}
.hm-chip>span:last-child{max-width:180px;overflow:hidden;text-overflow:ellipsis}   /* App 全面稽核 11/25：長名字不撐破膠囊 */
/* 好用度巡頁第 4 批（claude-uxp4-b-20261126）：地圖下面「Tapo 模式與自動化」｜「設定」——一欄時跟原本一樣（同 hm-page 的 14 px 間距），格子夠寬（uxWide）並排；沒有模式＝設定佔整列 */
.hm-tail{display:flex;flex-direction:column;gap:14px;min-width:0}
.hm-tail.ux-wide[data-cols="2"]{row-gap:14px}
.hm-tail.ux-wide[data-cols="2"]:has(>.hm-modes:empty)>*{grid-column:1/-1}
.hm-tail.ux-wide[data-cols="2"]>*>.calm-section:first-child,.hm-tail.ux-wide[data-cols="2"]>.calm-section{margin-top:0}
/* 第 4 批（claude-uxp4-b-20261126）：通話的狀態一句不是手機時在最上面（搜尋框上面、跨左右兩欄） */
.calls-top:empty{display:none}
.calls-top>.ux-status{margin:16px 0 0}
