/* Thermostatkarte. Dieselbe blau-graue Designsprache wie die Gerätekarten.
   Ausschließlich darstellungsspezifische CSS-Regeln, kein Core-Styling. */
.dashboard-grid.grouped .dashboard-grid-group > .dashboard-tile.dashboard-template-climate-overview,
.dashboard-grid.kiosk-gridstack .grid-stack-item-content > .dashboard-tile.dashboard-template-climate-overview,
.dashboard-grid.grouped .dashboard-grid-group > .dashboard-tile.dashboard-template-climate-compact,
.dashboard-grid.kiosk-gridstack .grid-stack-item-content > .dashboard-tile.dashboard-template-climate-compact,
.app-card-size-preview > .dashboard-tile.dashboard-template-climate-compact[data-card-scalable] {
    box-sizing:border-box;height:100%;min-height:0;overflow:hidden;gap:0;padding:13px 15px;
    color:var(--card-text-color,#f0f4fb);background:var(--card-background,linear-gradient(150deg,#182639 0%,#101c2d 58%,#0b1726 100%));
    border:1px solid #415775;border-radius:16px;
    box-shadow:inset 0 1px 0 rgba(188,211,244,.08),0 9px 24px rgba(0,0,0,.16)
}
.dashboard-grid.grouped .dashboard-grid-group > .dashboard-tile.dashboard-template-climate-overview {
    height:580px;min-height:580px
}
.dashboard-grid.grouped .dashboard-grid-group > .dashboard-tile.dashboard-template-climate-compact {
    height:auto;min-height:0;padding:12px 14px
}
.dashboard-template-climate-overview [data-dashboard-template-body] {height:100%;min-width:0;min-height:0}
.dashboard-template-climate-overview .climate-card-layout {
    box-sizing:border-box;display:flex;flex-direction:column;height:100%;min-height:0;min-width:0;gap:9px;
    container:climate-card / inline-size
}
.dashboard-template-climate-overview .climate-card-header {
    display:flex;align-items:center;gap:10px;flex:none;min-height:43px;padding:1px 5px 10px;
    border-bottom:1px solid #3e516a
}
.dashboard-template-climate-overview .climate-card-header-icon {
    flex:none;display:flex;align-items:center;justify-content:center;color:#ffad46;width:30px;height:34px
}
.dashboard-template-climate-overview .climate-card-header-icon svg {width:30px;height:32px}
.dashboard-template-climate-overview .climate-card-header h3 {margin:0;color:var(--card-title-color,#f4f7ff);font-weight:750;font-size:clamp(17px,2.5cqi,21px);line-height:1.17;overflow-wrap:anywhere}
.dashboard-template-climate-overview .climate-card-header p {margin:3px 0 0;color:#bdd0e4;font-size:clamp(10px,1.5cqi,12px);line-height:1.18}
.dashboard-template-climate-overview .climate-card-body {
    flex:1 1 auto;min-height:0;min-width:0;display:grid;grid-template-columns:minmax(0,51%) minmax(0,49%);gap:9px
}
.dashboard-template-climate-overview .climate-card-dial-panel,
.dashboard-template-climate-overview .climate-card-metric {
    box-sizing:border-box;border:1px solid #40556f;border-radius:17px;
    background:linear-gradient(155deg,#1c2d43,#142235)
}
.dashboard-template-climate-overview .climate-card-dial-panel {
    display:flex;flex-direction:column;min-height:0;min-width:0;padding:8px;justify-content:center
}
.dashboard-template-climate-overview .climate-card-dial-wrap {position:relative;min-width:0;min-height:0;flex:1 1 auto;display:flex;align-items:center;justify-content:center}
.dashboard-template-climate-overview .climate-card-dial {display:block;width:100%;max-height:100%;min-width:0;overflow:visible;cursor:grab;user-select:none}
.dashboard-template-climate-overview .climate-card-dial:active {cursor:grabbing}
.dashboard-template-climate-overview .climate-card-dial[aria-disabled="true"] {cursor:default}
.dashboard-template-climate-overview .climate-card-dial:focus-visible {outline:2px solid #5dbeda;outline-offset:-2px;border-radius:50%}
.dashboard-template-climate-overview .climate-card-track {
    stroke:#5587a8;stroke-width:20;stroke-linecap:round;fill:none
}
.dashboard-template-climate-overview .climate-card-fill {
    stroke:#61de81;stroke-width:20;stroke-linecap:round;fill:none
}
.dashboard-template-climate-overview .climate-card-handle {
    fill:#55ec8b;stroke:#effff5;stroke-width:7;filter:drop-shadow(0 1px 4px #398d65)
}
.dashboard-template-climate-overview .climate-card-dial-readout {
    position:absolute;left:50%;top:47%;transform:translate(-50%,-50%);
    display:flex;flex-direction:column;align-items:center;gap:3px;white-space:nowrap;pointer-events:none
}
.dashboard-template-climate-overview .climate-card-heat-icon {font-size:clamp(18px,4.8cqi,33px);line-height:1;color:#7feb96}
.dashboard-template-climate-overview .climate-card-dial-readout strong {font-size:clamp(24px,5cqi,43px);line-height:1.1;color:#f4f7ff;font-weight:760}
.dashboard-template-climate-overview .climate-card-dial-readout>span:last-child {font-size:clamp(10px,1.55cqi,13px);color:#c6d5e8}
.dashboard-template-climate-overview .climate-card-steps {
    display:grid;grid-template-columns:repeat(2,minmax(0,85px));justify-content:center;gap:12px;flex:none;margin-top:-14px;z-index:1
}
.dashboard-template-climate-overview .climate-card-steps button {
    box-sizing:border-box;display:flex;align-items:center;justify-content:center;min-width:0;height:42px;border-radius:14px;
    background:var(--card-button-color,linear-gradient(145deg,#263f5a,#1d324b));border:1px solid #5a9fc0;color:var(--card-text-color,#5ee1fa);cursor:pointer
}
.dashboard-template-climate-overview .climate-card-steps button svg {height:21px;width:21px;stroke-width:3}
.dashboard-template-climate-overview button:disabled {opacity:.48;cursor:default}
.dashboard-template-climate-overview button:not(:disabled):hover {background:var(--card-button-color,#2b4864)}
.dashboard-template-climate-overview .climate-card-metrics {min-width:0;min-height:0;display:grid;grid-template-rows:repeat(4,minmax(0,1fr));gap:8px}
.dashboard-template-climate-overview .climate-card-metric {
    display:flex;align-items:center;gap:11px;min-width:0;min-height:0;padding:8px 10px
}
.dashboard-template-climate-overview .climate-card-metric-icon {
    display:flex;align-items:center;justify-content:center;flex:none;width:38px;height:37px;
    border-right:1px solid #7190ab;color:#83d8ef
}
.dashboard-template-climate-overview .climate-card-metric-icon svg {width:24px;height:24px}
.dashboard-template-climate-overview .climate-card-metric-good {color:#7feb96}
.dashboard-template-climate-overview .climate-card-metric>div {min-width:0;display:flex;flex-direction:column;gap:3px}
.dashboard-template-climate-overview .climate-card-metric>div>span {font-size:clamp(10px,1.5cqi,12px);color:#c6d5e8;line-height:1.2}
.dashboard-template-climate-overview .climate-card-metric strong {font-size:clamp(13px,2.1cqi,19px);font-weight:750;color:#f2f6ff;line-height:1.2;overflow-wrap:anywhere}
.dashboard-template-climate-overview .climate-card-metric .climate-card-green {color:#7feb96}
.dashboard-template-climate-overview .climate-card-actions {
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-width:0;flex:none
}
.dashboard-template-climate-overview .climate-card-actions>button,
.dashboard-template-climate-overview .climate-card-relay {
    box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:8px;
    min-width:0;min-height:60px;padding:8px 7px;border:1px solid #506985;border-radius:16px;
    background:var(--card-button-color,linear-gradient(145deg,#243a54,#1c2d45));color:var(--card-text-color,#f0f4fc);
    font-family:inherit;font-weight:750;font-size:clamp(12px,1.85cqi,15px);line-height:1.2
}
.dashboard-template-climate-overview .climate-card-actions button {cursor:pointer}
.dashboard-template-climate-overview .climate-card-actions svg {flex:none;width:24px;height:24px;color:#83d8ef}
.dashboard-template-climate-overview .climate-card-mode.active {
    background:var(--card-button-color,linear-gradient(155deg,#11603e,#0c4533));border-color:#55d881;color:var(--card-text-color,#f1fff5)
}
.dashboard-template-climate-overview .climate-card-mode.active svg {color:#7feb96}
.dashboard-template-climate-overview .climate-card-relay {cursor:pointer;justify-content:space-between}
.dashboard-template-climate-overview .climate-card-relay>span:nth-child(2) {overflow-wrap:anywhere}
.dashboard-template-climate-overview .climate-card-switch {display:flex;align-items:center;flex:none;position:relative;width:44px;height:26px}
.dashboard-template-climate-overview .climate-card-switch input {position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.dashboard-template-climate-overview .climate-card-switch input:disabled {cursor:default}
.dashboard-template-climate-overview .climate-card-switch-track {
    box-sizing:border-box;display:block;width:44px;height:26px;background:#42556d;border-radius:999px;
    border:1px solid #607b99;position:relative;transition:background .14s
}
.dashboard-template-climate-overview .climate-card-switch-track:before {
    content:"";position:absolute;width:20px;height:20px;border-radius:50%;top:2px;left:2px;background:#e5eefa;transition:transform .14s
}
.dashboard-template-climate-overview .climate-card-switch input:checked + .climate-card-switch-track {background:#178557;border-color:#5cde89}
.dashboard-template-climate-overview .climate-card-switch input:checked + .climate-card-switch-track:before {transform:translateX(18px);background:#f5fffa}
.dashboard-template-climate-overview .climate-card-switch input:focus-visible + .climate-card-switch-track {outline:2px solid #7ac5ef;outline-offset:3px}
.dashboard-template-climate-overview .climate-card-switch input:disabled + .climate-card-switch-track {opacity:.5}
.dashboard-template-climate-overview .climate-card-footer {
    box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:9px;
    min-height:34px;padding:5px;border:1px solid #415775;border-radius:14px;
    background:linear-gradient(145deg,#20364c,#182b41);color:#c8ddec;font-size:clamp(11px,1.5cqi,13px);flex:none
}
.dashboard-template-climate-overview .climate-card-link-icon {display:flex;color:#7feb96}
.dashboard-template-climate-overview .climate-card-link-icon svg {width:18px;height:18px}
.dashboard-template-climate-overview .climate-card-error {font-size:11px;color:#ffc2b3;margin:0;max-height:38px;overflow:auto}
.dashboard-template-climate-overview .climate-card-error[hidden] {display:none}
.dashboard-grid.editing .dashboard-template-climate-overview:hover {background:var(--card-background,linear-gradient(150deg,#182639 0%,#101c2d 58%,#0b1726 100%))}
@container climate-card (max-width:620px) {
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-body {grid-template-columns:minmax(0,45%) minmax(0,55%);gap:7px}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-metric {gap:6px;padding:6px}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-metric-icon {width:30px;height:30px}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-metric-icon svg {width:20px;height:20px}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-actions>button,
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-relay {min-height:53px;gap:5px}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-actions svg {width:20px;height:20px}
}
@container climate-card (max-width:410px) {
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-body {grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-dial-panel {min-height:165px}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-dial-wrap {height:135px;max-height:135px}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-dial {height:135px}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-steps {margin-top:-16px}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-steps button {height:32px}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-metrics {grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-metric-icon {display:none}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-actions>button,
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-relay {font-size:11px;min-height:46px;padding:5px}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-actions svg {display:none}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-switch {width:35px;height:22px}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-switch-track {width:35px;height:22px}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-switch-track:before {height:16px;width:16px;top:2px;left:2px}
    .dashboard-template-climate-overview:not([data-card-scalable]) .climate-card-switch input:checked + .climate-card-switch-track:before {transform:translateX(13px)}
}

/* The catalog uses an inert, scaled copy of the actual thermostat renderer. */
.dashboard-compact-catalog .climate-catalog-preview-frame {
    box-sizing:border-box;position:relative;width:min(100%,310px);height:290px;
    flex:none;overflow:hidden;pointer-events:none
}
.dashboard-compact-catalog .climate-catalog-preview-frame > .dashboard-template-climate-overview {
    box-sizing:border-box;display:block;position:absolute;top:0;left:0;
    width:620px;height:580px;min-width:620px;min-height:580px;
    max-width:none;max-height:none;padding:13px 15px;overflow:hidden;gap:0;
    color:#f0f4fb;border:1px solid #415775;border-radius:16px;
    background:linear-gradient(150deg,#182639 0%,#101c2d 58%,#0b1726 100%);
    transform:scale(.5);transform-origin:top left
}


/* Kompakte neutrale Thermostatkarte */
.dashboard-template-climate-compact [data-dashboard-template-body]{height:auto;min-width:0;min-height:0}
.dashboard-template-climate-compact .climate-compact-layout{box-sizing:border-box;display:flex;flex-direction:column;height:auto;min-height:0;min-width:0;gap:10px;container:climate-compact-card / inline-size}
.dashboard-template-climate-compact .climate-card-compact-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:1px 2px 7px;border-bottom:1px solid #3e516a;min-width:0}
.dashboard-template-climate-compact .climate-card-compact-title{display:flex;align-items:center;gap:10px;min-width:0}
.dashboard-template-climate-compact .climate-card-header-icon{flex:none;display:flex;align-items:center;justify-content:center;color:#ffad46;width:27px;height:30px}
.dashboard-template-climate-compact .climate-card-header-icon svg{width:26px;height:28px}
.dashboard-template-climate-compact h3{margin:0;color:#f4f7ff;font-weight:750;font-size:clamp(16px,2.6cqi,20px);line-height:1.16;overflow-wrap:anywhere}
.dashboard-template-climate-compact p{margin:2px 0 0;color:var(--card-text-color,#bdd0e4);font-size:clamp(10px,1.35cqi,12px);line-height:1.15}
.dashboard-template-climate-compact .climate-card-compact-status{flex:none;display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:14px;border:1px solid #415775;background:linear-gradient(145deg,#20364c,#182b41);color:#c8ddec;font-size:clamp(11px,1.45cqi,13px);font-weight:700;white-space:nowrap}
.dashboard-template-climate-compact .climate-card-compact-status.is-online{background:linear-gradient(155deg,#124b39,#103728);border-color:#2c7657;color:#87eca8}
.dashboard-template-climate-compact .climate-card-compact-status-dot{width:11px;height:11px;border-radius:50%;background:#8aa1bc;box-shadow:0 0 0 2px rgba(255,255,255,.05)}
.dashboard-template-climate-compact .climate-card-compact-status.is-online .climate-card-compact-status-dot{background:#6fe190}
.dashboard-template-climate-compact .climate-card-compact-main{display:grid;grid-template-columns:minmax(0,46%) minmax(0,54%);gap:10px;min-height:0;min-width:0;align-items:stretch}
.dashboard-template-climate-compact .climate-card-compact-target,.dashboard-template-climate-compact .climate-card-compact-metric,.dashboard-template-climate-compact .climate-card-compact-actions>button,.dashboard-template-climate-compact .climate-card-compact-relay{box-sizing:border-box;border:1px solid #40556f;border-radius:16px;background:linear-gradient(155deg,#1c2d43,#142235)}
.dashboard-template-climate-compact .climate-card-compact-target{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 13px;min-width:0}
.dashboard-template-climate-compact .climate-card-compact-target-main{display:flex;align-items:center;gap:10px;min-width:0}
.dashboard-template-climate-compact .climate-card-compact-reading{display:flex;flex-direction:column;gap:2px;min-width:0}
.dashboard-template-climate-compact .climate-card-compact-reading strong{font-size:clamp(26px,4.6cqi,41px);line-height:1.02;color:var(--card-text-color,#f4f7ff);font-weight:760;white-space:nowrap}
.dashboard-template-climate-compact .climate-card-compact-reading span{font-size:clamp(10px,1.35cqi,12px);color:var(--card-text-color,#c6d5e8)}
.dashboard-template-climate-compact .climate-card-heat-icon{font-size:clamp(22px,3.5cqi,31px);line-height:1;color:#7feb96;flex:none}
.dashboard-template-climate-compact .climate-card-compact-steps{display:grid;grid-template-columns:repeat(2,minmax(0,48px));gap:10px;flex:none}
.dashboard-template-climate-compact .climate-card-compact-steps button{box-sizing:border-box;display:flex;align-items:center;justify-content:center;height:44px;border-radius:14px;background:var(--card-button-color,linear-gradient(145deg,#263f5a,#1d324b));border:1px solid #5a9fc0;color:var(--card-text-color,#5ee1fa);cursor:pointer}
.dashboard-template-climate-compact .climate-card-compact-steps button svg{height:20px;width:20px;stroke-width:3}
.dashboard-template-climate-compact button:disabled{opacity:.48;cursor:default}
.dashboard-template-climate-compact button:not(:disabled):hover{background:var(--card-button-color,#2b4864)}
.dashboard-template-climate-compact .climate-card-compact-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-width:0;min-height:0}
.dashboard-template-climate-compact .climate-card-compact-metric{display:flex;align-items:center;gap:8px;padding:10px 9px;min-width:0}
.dashboard-template-climate-compact .climate-card-compact-icon{display:flex;align-items:center;justify-content:center;flex:none;color:#83d8ef;width:24px;height:24px}
.dashboard-template-climate-compact .climate-card-compact-icon svg{width:22px;height:22px}
.dashboard-template-climate-compact .climate-card-compact-icon-good{color:#7feb96}
.dashboard-template-climate-compact .climate-card-compact-metric>div{min-width:0;display:flex;flex-direction:column;gap:2px}
.dashboard-template-climate-compact .climate-card-compact-metric span:last-child,.dashboard-template-climate-compact .climate-card-compact-metric>div>span{font-size:11px;color:var(--card-text-color,#c6d5e8);line-height:1.15}
.dashboard-template-climate-compact .climate-card-compact-metric strong{font-size:clamp(13px,1.85cqi,18px);font-weight:750;color:var(--card-text-color,#f2f6ff);line-height:1.15;overflow-wrap:anywhere}
.dashboard-template-climate-compact .climate-card-green{color:#7feb96}
.dashboard-template-climate-compact .climate-card-compact-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-width:0}
.dashboard-template-climate-compact .climate-card-compact-actions>button,.dashboard-template-climate-compact .climate-card-compact-relay{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:48px;padding:8px 10px;border:1px solid #506985;border-radius:16px;background:linear-gradient(145deg,#243a54,#1c2d45);color:var(--card-text-color,#f0f4fc);font-family:inherit;font-weight:750;font-size:clamp(12px,1.6cqi,15px);line-height:1.2}
.dashboard-template-climate-compact .climate-card-compact-actions button{cursor:pointer;background:var(--card-button-color,linear-gradient(145deg,#243a54,#1c2d45))}
.dashboard-template-climate-compact .climate-card-compact-actions svg{flex:none;width:22px;height:22px;color:#83d8ef}
.dashboard-template-climate-compact .climate-card-mode.active{background:var(--card-button-color,linear-gradient(155deg,#11603e,#0c4533));border-color:#55d881;color:var(--card-text-color,#f1fff5)}
.dashboard-template-climate-compact .climate-card-mode.active svg{color:#7feb96}
.dashboard-template-climate-compact .climate-card-compact-relay{cursor:pointer;justify-content:space-between}
.dashboard-template-climate-compact .climate-card-compact-relay>span:nth-child(2){overflow-wrap:anywhere}
.dashboard-template-climate-compact .climate-card-switch{display:flex;align-items:center;flex:none;position:relative;width:42px;height:25px}
.dashboard-template-climate-compact .climate-card-switch input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.dashboard-template-climate-compact .climate-card-switch input:disabled{cursor:default}
.dashboard-template-climate-compact .climate-card-switch-track{box-sizing:border-box;display:block;width:42px;height:25px;background:var(--card-switch-track-color,#42556d);border-radius:999px;border:1px solid #607b99;position:relative;transition:background .14s}
.dashboard-template-climate-compact .climate-card-switch-track:before{content:"";position:absolute;width:19px;height:19px;border-radius:50%;top:2px;left:2px;background:#e5eefa;transition:transform .14s}
.dashboard-template-climate-compact .climate-card-switch input:checked + .climate-card-switch-track{background:var(--card-switch-track-color,#178557);border-color:#5cde89}
.dashboard-template-climate-compact .climate-card-switch input:checked + .climate-card-switch-track:before{transform:translateX(17px);background:#f5fffa}
.dashboard-template-climate-compact .climate-card-switch input:focus-visible + .climate-card-switch-track{outline:2px solid #7ac5ef;outline-offset:3px}
.dashboard-template-climate-compact .climate-card-switch input:disabled + .climate-card-switch-track{opacity:.5}
.dashboard-template-climate-compact .climate-card-error{font-size:11px;color:#ffc2b3;margin:0;max-height:28px;overflow:auto}
.dashboard-template-climate-compact .climate-card-error[hidden]{display:none}
.dashboard-grid.editing .dashboard-template-climate-compact:hover{background:linear-gradient(150deg,#182639 0%,#101c2d 58%,#0b1726 100%)}
@container climate-compact-card (max-width:680px){
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-main{grid-template-columns:minmax(0,1fr);gap:8px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@container climate-compact-card (max-width:470px){
    /* Keep the compact buttons on one row even on narrow dashboards. */
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-header{align-items:center;gap:5px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-title{gap:5px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-status{padding:5px 7px;font-size:10px;gap:5px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-target{padding:9px;gap:5px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-target-main{gap:5px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-heat-icon{font-size:20px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-reading strong{font-size:clamp(20px,6cqi,27px)}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-steps{grid-template-columns:repeat(2,32px);gap:5px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-steps button{height:34px;border-radius:10px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-metric{padding:7px 5px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-icon{display:none}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-metric strong{font-size:13px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-actions>button,
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-relay{min-height:42px;padding:5px 3px;gap:3px;font-size:11px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-actions svg{display:none}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-compact-relay{grid-column:auto}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-switch,
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-switch-track{width:32px;height:20px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-switch-track:before{width:14px;height:14px}
    .dashboard-template-climate-compact:not([data-card-scalable]) .climate-card-switch input:checked + .climate-card-switch-track:before{transform:translateX(12px)}
}
.dashboard-compact-catalog .climate-catalog-preview-compact{box-sizing:border-box;position:relative;width:min(100%,310px);height:145px;flex:none;overflow:hidden;pointer-events:none}
.dashboard-compact-catalog .climate-catalog-preview-compact > .dashboard-template-climate-compact{box-sizing:border-box;display:block;position:absolute;top:0;left:0;width:620px;height:auto;min-width:620px;min-height:0;max-width:none;max-height:none;padding:12px 14px;overflow:hidden;gap:0;color:#f0f4fb;border:1px solid #415775;border-radius:16px;background:linear-gradient(150deg,#182639 0%,#101c2d 58%,#0b1726 100%);transform:scale(.5);transform-origin:top left}

/* Large thermostat: shared appearance and size contract; legacy geometry stays intact. */
.dashboard-tile.dashboard-template-climate-overview {
    --card-title-default:#f4f7ff;
    --card-switch-track-off:#42556d;
    --card-switch-track-on:#178557;
}
.dashboard-grid.grouped .dashboard-grid-group > .dashboard-tile.dashboard-template-climate-overview,
.dashboard-grid.kiosk-gridstack .grid-stack-item-content > .dashboard-tile.dashboard-template-climate-overview {
    background:var(--card-background,linear-gradient(150deg,#182639 0%,#101c2d 58%,#0b1726 100%));
    color:var(--card-text-color,#f0f4fb);
}
.dashboard-template-climate-overview .climate-card-header p {color:var(--card-text-color,#bdd0e4)}
.dashboard-template-climate-overview .climate-card-dial-readout strong {color:var(--card-text-color,#f4f7ff)}
.dashboard-template-climate-overview .climate-card-dial-readout>span:last-child,
.dashboard-template-climate-overview .climate-card-metric>div>span {color:var(--card-text-color,#c6d5e8)}
.dashboard-template-climate-overview .climate-card-metric strong:not(.climate-card-green) {color:var(--card-text-color,#f2f6ff)}
.dashboard-template-climate-overview .climate-card-relay {color:var(--card-text-color,#f0f4fc)}
.dashboard-template-climate-overview .climate-card-footer {color:var(--card-text-color,#c8ddec)}
.dashboard-template-climate-overview .climate-card-steps {
    --card-action-background:linear-gradient(145deg,#263f5a,#1d324b);
    --card-action-text:#5ee1fa;--card-action-hover:#2b4864;
}
.dashboard-template-climate-overview .climate-card-actions {
    --card-action-background:linear-gradient(145deg,#243a54,#1c2d45);
    --card-action-text:#f0f4fc;--card-action-hover:#2b4864;
}
.dashboard-template-climate-overview .climate-card-mode.active {
    --card-action-background:linear-gradient(155deg,#11603e,#0c4533);--card-action-text:#f1fff5;
}
.dashboard-template-climate-overview .climate-card-switch-track {background:var(--card-switch-track-color,#42556d)}
.dashboard-template-climate-overview .climate-card-switch input:checked + .climate-card-switch-track {background:var(--card-switch-track-color,#178557)}
.dashboard-grid.grouped .dashboard-grid-group > .dashboard-tile.dashboard-template-climate-overview[data-card-scalable],
.dashboard-grid.kiosk-gridstack .grid-stack-item-content > .dashboard-tile.dashboard-template-climate-overview[data-card-scalable],
.app-card-size-preview > .dashboard-tile.dashboard-template-climate-overview[data-card-scalable] {
    box-sizing:border-box;width:100%;height:var(--card-height);min-height:0;max-height:none;min-width:0;max-width:none;
    display:block;overflow:auto;gap:0;padding:13px 15px;
    color:var(--card-text-color,#f0f4fb);background:var(--card-background,linear-gradient(150deg,#182639 0%,#101c2d 58%,#0b1726 100%));
    border:1px solid #415775;border-radius:16px;
    box-shadow:inset 0 1px 0 rgba(188,211,244,.08),0 9px 24px rgba(0,0,0,.16);
}
.dashboard-template-climate-overview[data-card-scalable] .climate-card-layout {
    min-height:400px;height:100%;
}

.dashboard-template-climate-overview {--card-content-padding:13px 15px;--card-content-justify:flex-start;}

/* Native compact layout; the shared content host supplies the only zoom. */
.dashboard-template-climate-compact {--card-content-padding:13px 15px;--card-content-justify:flex-start;--card-title-default:#f4f7ff;--card-switch-track-off:#42556d;--card-switch-track-on:#178557;}

/* Fixed-size layouts retain their native arrangement during content zoom. */
.dashboard-template-climate-overview[data-card-scalable] .climate-card-body {grid-template-columns:minmax(0,51fr) minmax(0,49fr);}
.dashboard-template-climate-compact[data-card-scalable] .climate-card-compact-main {grid-template-columns:minmax(0,1fr);gap:8px;}
