/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * Copyright © 2026 Marcel Rymenhout and IniqDash contributors */
/* ==========================================================================
   Climate — the reference CLIMATE CONTROL widget (widgets/default/climate/climate.js).
   The composition is the shared REGIONS (components/controls: nine regions + three lines); the controls are the shared BUTTON and
   SEGMENTED control (their looks are theirs — here only their automatic sizes and caps per MaisonFit size); the information items are
   the shared IniqInfo items. This file draws the card, its picture, the title and the thermostat DIAL in its four designs.
   STATE: data-tone = heat | cool | idle — from what Home Assistant says the device is DOING (hvac_action), never from its mode alone.
   Colours: --cw-heat · --cw-cool · --cw-idle (the configured token / #rrggbb, set inline), else the theme's.
   ========================================================================== */
.cw {
  --cw-heat: var(--accent-hot, #ff6b2c);
  --cw-cool: var(--info, #3fa9ff);
  --cw-idle: #8f939d;
  --cw-mid: #e9e2d6;
  --cw-tone: var(--cw-idle);
  --cw-pad: clamp(12px, 4cqmin, 22px);
  --cw-plate-hi: #2b2d34; --cw-plate-lo: #111216;
  --cw-face-hi: color-mix(in srgb, var(--cw-tone) 78%, #fff); --cw-face-lo: color-mix(in srgb, var(--cw-tone) 82%, #000);
  /* the controls' automatic sizes and their cap at this size */
  --cw-bsz: 44px; --iqc-max: min(120px, 26cqmin); --cw-sh: 40px;
  position: relative; container: cw / size; min-width: 0; min-height: 72px; overflow: hidden; isolation: isolate; box-sizing: border-box;
  border-radius: var(--radius-device); color: var(--text-primary); font-family: var(--font);
  background: var(--device-surface); box-shadow: var(--device-shadow); -webkit-tap-highlight-color: transparent;
}
.cw[data-tone="heat"] { --cw-tone: var(--cw-heat); }
.cw[data-tone="cool"] { --cw-tone: var(--cw-cool); }
.cw[data-off="true"] { --cw-tone: color-mix(in srgb, var(--cw-idle) 70%, transparent); }
/* the card itself, warmed / cooled a little by what it is doing (a soft pool of the state colour) */
.cw::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(70% 60% at 50% 45%, color-mix(in srgb, var(--cw-tone) 18%, transparent), transparent 72%); }
.cw:is([data-tone="heat"], [data-tone="cool"])::before { opacity: 1; }

/* ---------------------------------------------------------------- the picture (Climate's own image library) */
.cw__media { position: absolute; inset: 0; z-index: 0; display: none; overflow: hidden; }
.cw[data-image] .cw__media { display: block; }
.cw[data-image] { background: #0d0c0b; }
.cw__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; --cw-fx: ; --cw-sfx: ; filter: var(--cw-fx) var(--cw-sfx); transition: filter .6s ease; }
.cw[data-treatment="dim"] .cw__img { --cw-fx: brightness(.68); }
.cw[data-treatment="dark"] .cw__img { --cw-fx: brightness(.48); }
.cw[data-treatment="grayscale"] .cw__img { --cw-fx: grayscale(1) brightness(.8); }
/* STATE-AWARE: heating warms and lights the picture, cooling cools it, idle / off rests it (the ACTION, never the mode) */
.cw[data-react="on"]:not([data-tone="heat"]):not([data-tone="cool"]) .cw__img { --cw-sfx: saturate(.55) brightness(.8); }
.cw[data-react="on"][data-tone="heat"] .cw__img { --cw-sfx: saturate(1.15) brightness(1.04); }
.cw[data-react="on"][data-tone="cool"] .cw__img { --cw-sfx: saturate(.8) hue-rotate(-14deg) brightness(.95); }
.cw__shade { position: absolute; inset: 0; pointer-events: none; --cw-ov: .55;
  background: linear-gradient(180deg, rgba(6, 6, 8, calc(var(--cw-ov) * .9)) 0%, rgba(6, 6, 8, calc(var(--cw-ov) * .35)) 34%, rgba(6, 6, 8, calc(var(--cw-ov) * .45)) 62%, rgba(6, 6, 8, calc(var(--cw-ov) * 1.25)) 100%); }
.cw[data-overlay="none"] .cw__shade { --cw-ov: 0; }
.cw[data-overlay="light"] .cw__shade { --cw-ov: .32; }
.cw[data-overlay="strong"] .cw__shade { --cw-ov: .78; }
.cw__shade::after { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; mix-blend-mode: soft-light; background: radial-gradient(80% 70% at 62% 60%, var(--cw-tone), transparent 70%); }
.cw[data-react="on"]:is([data-tone="heat"], [data-tone="cool"]) .cw__shade::after { opacity: .55; }

/* ---------------------------------------------------------------- the composition (shared regions) */
.cw__in { position: absolute; inset: 0; z-index: 3; box-sizing: border-box; padding: var(--cw-pad); pointer-events: none; }
/* the ring dial's ANCHORED LAYER (the card's content box): climate.js places the dial at its anchor, size and offset (logical px) */
.cw__dlayer { position: absolute; inset: var(--cw-pad); z-index: 2; pointer-events: none; }
.cw__dlayer > .iqdl { position: absolute; width: var(--cw-dpx, 0px); height: var(--cw-dpx, 0px); max-width: none; pointer-events: auto; }
.cw .iqc-region:has(> .cw__fact) { gap: var(--cw-igap, var(--iqc-rgap, 10px)); }
.cw .iqc-line[data-line="bottom"] { justify-content: center; }

/* the title: the name and what it is doing (its action · its mode) */
.cw__id { min-width: 0; }
.cw__name { margin: 0; font-size: clamp(15px, 4.4cqmin, 21px); font-weight: var(--iq-fw-title); line-height: 1.2; letter-spacing: -.005em; white-space: nowrap; overflow: clip visible; text-overflow: ellipsis; min-width: 0; }
.cw__state { display: flex; align-items: center; gap: 6px; margin: 3px 0 0; font-size: max(11.5px, 3.2cqmin); font-weight: var(--iq-fw-status); color: var(--text-secondary); line-height: 1.25; min-width: 0; }
.iqc-region[data-place$="-center"] .cw__state { justify-content: center; }
.iqc-region[data-place$="-right"] .cw__state { justify-content: flex-end; }
.cw__state-ic { display: grid; flex: none; width: 1.25em; height: 1.25em; color: var(--cw-tone); }
.cw__state-ic > svg { width: 100%; height: 100%; }
.cw__state-t { white-space: nowrap; overflow: clip visible; text-overflow: ellipsis; min-width: 0; }
.cw:is([data-tone="heat"], [data-tone="cool"]) .cw__state { color: color-mix(in srgb, var(--cw-tone) 75%, var(--text-primary)); }
.cw[data-image] .cw__name { text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }

/* ---------------------------------------------------------------- the controls: automatic sizes / caps per MaisonFit size (the look is the shared one) */
.cw .cw__btn { --iqc-size: var(--cw-bsz); }
.cw .cw__seg { --iqc-h: var(--cw-sh); }
.cw[data-fit-arr="large"] { --cw-bsz: 54px; --cw-sh: 46px; }
.cw[data-fit-arr="compact"] { --cw-bsz: 40px; --cw-sh: 34px; --iqc-max: min(52px, calc(100cqh - var(--cw-pad) * 2)); }
.cw[data-fit-arr="micro"] { --cw-bsz: 34px; --cw-sh: 30px; --iqc-max: min(40px, calc(100cqh - var(--cw-pad) * 2)); --cw-pad: 10px; }
/* over a picture a quiet surface keeps the controls readable */
.cw[data-image] :is(.iqc-btn[data-style="outline"], .iqc-btn[data-style="bare"], .iqc-seg[data-inactive="minimal"]) { background: rgba(10, 9, 8, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cw__choice { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.cw__choice-k { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.cw__sel { height: 32px; min-width: 0; max-width: 100%; border: 0; border-radius: 16px; padding: 0 28px 0 12px; font: 600 12.5px var(--font); color: var(--text-primary);
  background: var(--control-well, #16171b); box-shadow: var(--control-well-shadow, inset 0 1px 3px rgba(0, 0, 0, .5)); }
.cw__sel:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.cw__sel:disabled { opacity: .5; }
.cw__stp { display: inline-flex; align-items: center; gap: 8px; }
.cw__stp-v { min-width: 3.2em; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.cw__range { display: inline-flex; flex-wrap: wrap; gap: 8px 16px; }

/* ---------------------------------------------------------------- the DIAL: the shared IniqDial (components/dial) — Climate maps its own
   state colours onto it (its tone follows the climate's ACTION) and simplifies it by the card's own size */
.cw .iqdl[data-design] { --iqdl-tone: var(--cw-tone); --iqdl-warm: var(--cw-heat); --iqdl-cool: var(--cw-cool); --iqdl-idle: var(--cw-idle); --iqdl-mid: var(--cw-mid);
  --iqdl-plate-hi: var(--cw-plate-hi); --iqdl-plate-lo: var(--cw-plate-lo); }
.cw[data-fit-arr="micro"] .iqdl__dinfo { display: none; }
.iqdl__dslot .cw__fact { max-width: 100%; }

/* ---------------------------------------------------------------- MaisonFit: the dial SIMPLIFIES (never a tiny copy of the large one) */
.cw[data-fit-arr="compact"] .iqdl :is(.iqdl__mm, .iqdl__tlab, .iqdl__clab, .iqdl__label) { display: none; }
.cw[data-fit-arr="compact"] .iqdl .iqdl__tick:not(.iqdl__tick--major) { display: none; }
.cw[data-fit-arr="micro"] .iqdl :is(.iqdl__ticks, .iqdl__mm, .iqdl__tlab, .iqdl__clab, .iqdl__label, .iqdl__room, .iqdl__act-t, .iqdl__fico, .iqdl__cmark, .iqdl__knob) { display: none; }
.cw[data-fit-arr="micro"] .iqdl:not([data-design="bare"]) .iqdl__target { font-size: min(var(--iqdl-vsz, 26cqw), 30cqw); }
.cw[data-fit-arr="micro"] .cw__state { font-size: 11px; }
.cw[data-fit-arr="micro"] .cw__name { font-size: 13.5px; }

@media (prefers-reduced-motion: reduce) { .cw::before, .cw__img, .cw__shade::after, .cw__seg { transition: none; } }

/* ---- ARTWORK: the picture beside the state, the room temperature, the target and the information items */
.cw--art { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; }
.cw--art .cw__id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cw__abody { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; }
.cw__apic { position: relative; height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; }
.cw__apic[hidden] { display: none; }
.cw__apic .cw__aimg { display: block; width: 100%; height: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .45)); }
.cw--art[data-tone="heat"] .cw__apic::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 140, 40, .35), transparent); pointer-events: none; }
.cw__aside { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; gap: 2px; }
.cw__ast { display: flex; align-items: center; gap: 9px; margin: 0 0 6px; font-size: 16px; font-weight: 500; color: var(--text-primary); }
.cw__adot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-muted); }
.cw--art[data-tone="heat"] .cw__adot, .cw--art[data-tone="cool"] .cw__adot { background: var(--success); }
.cw__acur { font-size: clamp(22px, 9cqi, 30px); font-weight: 500; line-height: 1.1; color: var(--text-primary); }
.cw__atgt { font-size: 15px; color: var(--text-secondary); }
.cw__afacts { align-self: stretch; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, .1)); display: flex; flex-direction: column; gap: 6px; }
.cw__afacts[hidden] { display: none; }
.cw--art { container-type: inline-size; }
.cw__afacts .iqf { background: none; box-shadow: none; padding: 0; }

/* ================================================================ CARD (variant 'card') — the thermostat card: status pill · power, the
   scale dial between − and +, name and range, the information strip; over the device picture (IniqDeviceBg) */
.cw-card { position: relative; isolation: isolate; box-sizing: border-box; height: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 18px 14px; overflow: hidden; color: #fff; font-family: var(--mai-font, var(--font)); border-radius: 18px; border: 1px solid rgba(255, 255, 255, .06);
  background: radial-gradient(70% 60% at 50% 38%, rgba(255, 138, 43, .09), transparent 70%), linear-gradient(180deg, #22252e 0%, #1f222a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 6px 16px rgba(0, 0, 0, .25); }
.cw-card > :not(.idb) { position: relative; z-index: 1; }
.cwc__top { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.cwc__status { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 990px; background: #282b35; color: #c9ccd4; font-size: 10px; font-weight: 500; }
.cwc__status.is-on { color: #3a1d06; background: linear-gradient(160deg, #ffa244 0%, #ff8a2b 50%, #f5751f 100%); box-shadow: 0 0 14px rgba(255, 138, 43, .45); }
.cwc__status[data-action="cooling"].is-on { color: #06263a; background: linear-gradient(160deg, #8ee4ff 0%, #33b8ff 55%, #1c8ce8 100%); box-shadow: 0 0 14px rgba(47, 192, 255, .45); }
.cwc__power { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; cursor: pointer; color: #858a97; border: 1px solid rgba(255, 255, 255, .09); background: #282b35; padding: 0; }
.cwc__power.is-on { color: #3a1d06; border-color: transparent; background: linear-gradient(160deg, #ffa244 0%, #ff8a2b 50%, #f5751f 100%); box-shadow: 0 0 14px rgba(255, 138, 43, .5); }
.cwc__row { display: grid; grid-template-columns: auto minmax(0, max(270px, var(--cwc-dial, 238px))) auto; align-items: center; justify-content: center; gap: 20px; width: 100%; margin-top: -22px; }
.cwc__slot { width: 100%; max-width: var(--cwc-dial, 238px); justify-self: center; container-type: inline-size; }
.cwc__step { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #fff; cursor: pointer; padding: 0; border: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(180deg, #282b35 0%, #252831 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 6px 16px rgba(0, 0, 0, .25); transition: color .2s, border-color .2s; }
.cwc__step:hover:not(:disabled) { border-color: rgba(255, 138, 43, .65); color: #ffb347; }
.cwc__step:active:not(:disabled) { transform: scale(.94); }
.cwc__step:disabled { opacity: .35; cursor: not-allowed; }
.cwc__meta { text-align: center; min-width: 0; }
.cwc__meta b { display: block; font-size: 11px; font-weight: 600; line-height: 17px; }
.cwc__meta small { display: block; font-size: 9px; line-height: 14px; color: #8b909c; }
.cwc__strip { align-self: stretch; margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); border-top: 1px solid rgba(255, 255, 255, .09); padding-top: 12px; }
.cw-card .cwc__hs { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 2px 6px; min-width: 0; max-width: none; height: 36px; box-sizing: border-box; }
.cw-card .cwc__hs + .cwc__hs { border-left: 1px solid rgba(255, 255, 255, .055); }
.cw-card .cwc__hs .iqf__ic { font-size: 15px; width: auto; height: auto; color: #858a97; background: none; }
.cw-card .cwc__hs .iqf__ic .bi { font-size: 15px; color: #858a97; }
.cw-card .cwc__hs .iqf__v { font-size: 11.5px; font-weight: 600; line-height: 16px; color: #c9ccd4; white-space: nowrap; }
.cw-card .cwc__hs .iqf__l { font-size: 8.5px; font-weight: 400; line-height: 11px; color: #8b909c; white-space: nowrap; margin: 0; opacity: 1; }
.cw-card .cwc__hs:first-child .iqf__v { font-size: 15px; line-height: 20px; color: #fff; }
.cw-card .cwc__hs .iqf__lv i { background: #2f323c; }
.cw-card .cwc__hs .iqf__lv i.is-on { background: #ff8a2b; }
/* the SCALE DIAL */


/* ================================================================ THERMOSTAT CARD (variant 'thermo') */
.cw.cw-thermo { position: relative; isolation: isolate; box-sizing: border-box; height: 100%; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 16px 18px; overflow: hidden;
  border-radius: 20px; background: linear-gradient(180deg, #1f2028 0%, #1c1d24 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); border: 0; color: #fff; font-family: var(--mai-font, var(--font)); }
.cw-thermo > .idb { border-radius: 20px; }
.cw-thermo > :not(.idb) { position: relative; z-index: 1; }
.cw-thermo[data-state="unavailable"] { opacity: .6; }
.cwt__head, .cwt__foot { display: flex; align-items: center; gap: 10px; }
.cwt__orb { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 15px; background: #282b35; color: #ffb347; }
.cw-thermo.is-heating .cwt__orb { color: #fff; background: radial-gradient(circle at 35% 30%, #ffcf86 0%, #ff8a2b 55%, #e8611c 100%); box-shadow: 0 3px 10px rgba(255, 138, 43, .4); }
.cwt__text { min-width: 0; display: flex; flex-direction: column; }
.cwt__text b { font-size: 10.5px; font-weight: 600; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cwt__text small, .cwt__now small, .cwt__target small, .cwt__foot small { font-size: 8px; line-height: 11px; color: #8b909c; white-space: nowrap; }
.cwt__status { margin-left: auto; display: inline-flex; font-size: 7.5px; font-weight: 600; letter-spacing: .04em; line-height: 10px; text-transform: uppercase; padding: 2px 7.5px; border-radius: 99px; background: #282b35; color: #b7bbc5; white-space: nowrap; }
.cwt__status.is-on { background: rgba(255, 138, 43, .16); color: #ffb347; }
.cwt__status.is-na { background: rgba(241, 60, 60, .12); color: #ff8a8a; }
.cwt__body { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.cwt__now { display: flex; flex-direction: column; }
.cwt__val { font-size: 42px; font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cwt__val sup { font-size: .4em; font-weight: 500; vertical-align: top; position: relative; top: -1px; margin-left: 2px; color: #b7bbc5; letter-spacing: 0; }
.cwt__target { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.cwt__step { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 99px; background: #13161d; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .45); }
.cwt__step output { min-width: 56px; text-align: center; font-size: 15px; font-weight: 600; line-height: 20px; color: #ffb347; font-variant-numeric: tabular-nums; }
.cwt__btn { width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 0; display: grid; place-items: center; font-size: 13px; color: #e3e5ea; background: #282b35; cursor: pointer; transition: background .2s; }
.cwt__btn:hover:not(:disabled) { background: #30333e; }
.cwt__btn:disabled { opacity: .35; cursor: not-allowed; }
.cwt__foot .cwt__modes { margin-left: auto; }
.cw-thermo .cwp__modes { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 99px; background: #13161d; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .45); }
.cw-thermo .cwp__mode { width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 0; display: grid; place-items: center; background: transparent; color: #4f5361; font-size: 14px; cursor: pointer; }
.cw-thermo .cwp__mode:disabled { opacity: .45; cursor: not-allowed; }
.cw-thermo .cwp__mode[data-m="heat"].is-active { color: #fff; background: radial-gradient(circle at 35% 30%, #ffcf86 0%, #ff8a2b 55%, #e8611c 100%); box-shadow: 0 0 12px rgba(255, 138, 43, .7); }
.cw-thermo .cwp__mode[data-m="off"].is-active { color: #fff; background: radial-gradient(circle at 35% 30%, #8ee4ff 0%, #33b8ff 55%, #1c8ce8 100%); box-shadow: 0 0 12px rgba(47, 192, 255, .7); }
/* ================================================================ CAPSULE (variant 'capsule') — a heater as an orange-pink tile with a thermometer */
.cw.cw-capsule { position: relative; box-sizing: border-box; height: 100%; display: flex; flex-direction: column; padding: 16px 18px; border-radius: 14px; overflow: hidden; color: #fff; border: 0; box-shadow: none;
  font-family: var(--mai-font, var(--font)); background: radial-gradient(120% 70% at 100% 0%, #ffcf5c, transparent 50%), linear-gradient(155deg, #ff8a3d, #ff3d6e 70%, #c4206a); }
.cw-capsule::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1.2px); background-size: 12px 12px; mask: linear-gradient(135deg, #000, transparent 55%); }
.cw-capsule[data-state="off"] { background: linear-gradient(155deg, #3a3f52, #232736); }
.cw-capsule > * { position: relative; z-index: 1; }
.cwc__h { display: flex; align-items: center; }
.cwc__t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.cwc__fl { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .22); font-size: 16px; }
.cwc__body { flex: 1; min-height: 0; display: grid; grid-template-columns: 66px 1fr; gap: 16px; margin-top: 14px; }
.cwc__caps { position: relative; border-radius: 34px; background: rgba(0, 0, 0, .22); box-shadow: inset 0 4px 12px rgba(0, 0, 0, .3); overflow: hidden; }
.cwc__lv { position: absolute; left: 6px; right: 6px; bottom: 6px; border-radius: 28px; background: linear-gradient(0deg, rgba(255, 255, 255, .2), #fff); box-shadow: 0 0 20px rgba(255, 255, 255, .6); transition: height .6s ease; }
.cwc__tg { position: absolute; left: -2px; right: -2px; height: 2px; background: #2a0b18; box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
.cwc__sc { position: absolute; right: 8px; top: 10px; bottom: 10px; display: flex; flex-direction: column; justify-content: space-between; font-size: 8px; font-weight: 800; color: rgba(255, 255, 255, .55); }
.cwc__sc b { font-weight: 800; }
.cwc__read { display: flex; flex-direction: column; min-width: 0; }
.cwc__lab { font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.cwc__big { font-size: clamp(32px, 21cqi, 56px); font-weight: 800; letter-spacing: -.05em; line-height: .9; margin-top: 6px; font-variant-numeric: tabular-nums; }
.cwc__big sup { font-size: 20px; opacity: .75; vertical-align: top; position: relative; top: 6px; }
.cwc__room { color: rgba(255, 255, 255, .82); font-weight: 600; margin-top: 6px; }
.cwc__plab { margin-top: 16px; }
.cwc__lvls { display: flex; gap: 3px; margin-top: 6px; } .cwc__lvls i { flex: 1; height: 16px; border-radius: 4px; background: rgba(255, 255, 255, .22); } .cwc__lvls i.on { background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .6); }
.cwc__facts { margin-top: auto; display: grid; gap: 6px; }
.cwc__facts span { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 9px; background: rgba(0, 0, 0, .18); font-weight: 700; font-size: 11px; }
.cwc__facts em { font-style: normal; color: rgba(255, 255, 255, .72); font-weight: 600; }
.cwc__ctl { display: grid; grid-template-columns: 46px 1fr 46px; gap: 8px; margin-top: 14px; }
.cwc__btn { height: 46px; border: 0; border-radius: 12px; display: grid; place-items: center; background: rgba(0, 0, 0, .2); color: #fff; font-size: 18px; cursor: pointer; }
.cwc__btn:disabled { opacity: .45; cursor: not-allowed; }
.cwc__tv { height: 46px; border-radius: 12px; display: grid; place-content: center; text-align: center; background: rgba(255, 255, 255, .22); font-weight: 800; font-size: 15px; }
.cwc__tv small { font-size: 8px; letter-spacing: .14em; opacity: .75; }
/* a narrow capsule (a laptop's middle column): a slimmer thermometer, tighter gaps */
@container cw (max-width: 300px) { .cw-capsule { padding: 14px; } .cwc__body { grid-template-columns: 46px 1fr; gap: 12px; } .cwc__ctl { grid-template-columns: 40px 1fr 40px; gap: 6px; } .cwc__btn, .cwc__tv { height: 42px; } }
