.hc-toolbar{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}.hc-toolbar .cc-search{flex:1;min-width:220px}.hc-toolbar select{min-width:160px}.hc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(265px,1fr));gap:12px;max-height:62vh;overflow:auto;overscroll-behavior:contain;padding:4px 4px 12px}.hc-device{display:flex;align-items:center;text-align:left;gap:14px;border:1px solid var(--border,#333b43);background:linear-gradient(145deg,rgba(57,70,80,.3),rgba(19,26,32,.4));border-radius:20px;min-height:108px;padding:17px;color:inherit;transition:transform .2s cubic-bezier(.2,.8,.2,1),border-color .2s,box-shadow .2s;position:relative;overflow:hidden}.hc-device:hover{transform:translateY(-3px);border-color:var(--accent,#a4d9d0);box-shadow:0 8px 26px rgba(0,0,0,.14)}.hc-device:active{transform:scale(.98)}.hc-device-icon{width:48px;height:48px;flex-shrink:0;display:grid;place-items:center;border-radius:16px;background:rgba(143,199,191,.1);color:var(--accent,#a4d9d0)}.hc-device-icon svg{width:26px;height:26px}.hc-device-copy{display:grid;gap:5px;min-width:0}.hc-device-copy strong{font-size:14px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.hc-device-copy small{font-size:10px;opacity:.62}.hc-device-copy>span{font-size:12px;opacity:.8}.hc-device-edge{margin-left:auto;color:var(--accent,#a4d9d0);font-size:13px}.hc-device-edge svg{width:17px;height:17px}.hc-is-on{border-color:rgba(128,216,201,.45);background:radial-gradient(ellipse at 0 0,rgba(81,180,170,.14),transparent 75%),linear-gradient(145deg,rgba(57,70,80,.3),rgba(19,26,32,.4))}.hc-is-on .hc-device-icon{box-shadow:0 0 23px rgba(127,221,202,.12)}.hc-unavailable{opacity:.6}.hc-fan-running svg{animation:hc-spin 4s linear infinite}.hc-device-hero{display:flex;gap:20px;align-items:center;padding:22px;border:1px solid var(--border,#333b43);border-radius:22px;margin-bottom:18px}.hc-device-hero .hc-device-icon{width:64px;height:64px}.hc-device-hero h2{margin:4px 0 8px;font-size:22px}.hc-device-hero small{opacity:.65}.hc-controls{display:grid;gap:12px;margin:20px 0}.hc-power-buttons{display:flex;gap:10px}.hc-setting{display:flex;align-items:end;gap:16px;padding:15px;border:1px solid var(--border,#333b43);border-radius:15px;background:rgba(127,170,164,.035)}.hc-setting label{display:grid;gap:10px;flex:1;min-width:0;font-size:13px}.hc-setting output{color:var(--accent,#a4d9d0)}.hc-setting input[type=range]{width:100%;accent-color:var(--accent,#a4d9d0);cursor:pointer}.hc-setting input[type=color]{width:80px;height:38px;border:0;background:transparent}.hc-setting button{font-size:12px;white-space:nowrap}.hc-attributes summary{cursor:pointer;padding:14px 0}.hc-confirm{display:grid;gap:14px;margin:20px 0}.hc-confirm code{white-space:normal;overflow-wrap:anywhere;border:1px solid var(--border,#333b43);border-radius:12px;padding:14px;font-size:13px}.hc-confirm input{width:100%}.hc-detail .cc-dialog-body{max-width:850px}@keyframes hc-spin{to{transform:rotate(360deg)}}@media(max-width:600px){.hc-grid{grid-template-columns:1fr;max-height:58vh}.hc-toolbar select{flex:1;min-width:110px}.hc-setting{flex-direction:column;align-items:stretch}.hc-power-buttons button{flex:1}.hc-device-hero{padding:16px}.hc-device-hero h2{font-size:18px}}@media(prefers-reduced-motion:reduce){.hc-fan-running svg{animation:none}.hc-device{transition:none}}body[data-motion="reduced"] .hc-fan-running svg{animation:none}

/* Separate, generous power target: never nests interactive buttons. */
.hc-device{flex-wrap:wrap}.hc-control-status{flex:1 0 100%;margin:0;padding:0 17px 14px;font-size:12px;line-height:1.55;color:var(--muted);overflow-wrap:anywhere}.hc-control-success{color:var(--green,#72e3b5)}.hc-control-warning,.hc-control-error{color:var(--amber,#f4bc6b)}.hc-control-pending{color:var(--accent,#a4d9d0)}
.hc-device{padding:0;gap:0}.hc-device-main{display:flex;align-items:center;gap:14px;flex:1;min-width:0;align-self:stretch;padding:17px;background:transparent;border:0;color:inherit;text-align:left;cursor:pointer;border-radius:20px 0 0 20px}.hc-power-toggle{flex:0 0 48px;width:48px;height:48px;margin:12px;border:1px solid var(--border);border-radius:16px;background:rgba(100,120,140,.08);color:var(--muted);display:grid;place-items:center;cursor:pointer;transition:transform .18s cubic-bezier(.2,.9,.2,1),background .2s,box-shadow .2s}.hc-power-toggle svg{width:23px;height:23px}.hc-is-on .hc-power-toggle{color:var(--accent);background:rgba(108,215,189,.14);border-color:rgba(108,215,189,.4);box-shadow:0 0 20px rgba(100,215,190,.1)}.hc-power-toggle:hover:not(:disabled){transform:scale(1.08);box-shadow:0 0 22px rgba(100,215,190,.2)}.hc-power-toggle:active:not(:disabled){transform:scale(.9)}.hc-power-toggle:disabled{cursor:default;opacity:.5}.hc-power-pending{opacity:1!important}.hc-device-main:focus-visible,.hc-power-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.hc-device-edge{margin:12px}.hc-device-copy{flex:1}@media(prefers-reduced-motion:reduce){.hc-power-toggle{transition:none}}body[data-motion="reduced"] .hc-power-toggle{transition:none}
