.shell [hidden] { display: none !important; }

:root {
  color-scheme: light;
  --wine: #780000;
  --red: #c1121f;
  --cream: #fdf0d5;
  --navy: #003049;
  --blue: #669bbc;
  --ink: var(--navy);
  --muted: #669bbc;
  --forest: var(--navy);
  --mint: var(--blue);
  --paper: var(--cream);
  --glass-line: rgba(255, 255, 255, .56);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  isolation: isolate;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse at 8% 3%, rgba(193, 18, 31, .14), transparent 34rem),
    radial-gradient(ellipse at 92% 18%, rgba(102, 155, 188, .3), transparent 30rem),
    radial-gradient(ellipse at 50% 100%, rgba(253, 240, 213, .86), transparent 38rem),
    linear-gradient(145deg, #fffaf0 0%, var(--cream) 52%, #e9f0f0 100%);
  content: '';
}

.shell { width: min(100% - 36px, 700px); margin: 0 auto; padding: 42px 0 32px; }
.topbar { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.74); border-radius: 23px; background: rgba(255,255,255,.43); box-shadow: 0 8px 30px rgba(40,65,54,.06), inset 0 1px rgba(255,255,255,.8); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
.brand-mark { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.82); border-radius: 15px; background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(231,243,236,.66)); box-shadow: 0 3px 12px rgba(29,61,46,.08), inset 0 1px rgba(255,255,255,.9); }
.brand-mark img { width: 25px; height: 25px; }
.eyebrow { margin: 0 0 5px; color: #91a39a; font-size: 9px; font-weight: 750; letter-spacing: .16em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; color: #22332b; font-size: 19px; font-weight: 720; letter-spacing: -.045em; }
.topbar h1 { overflow-wrap: anywhere; line-height: 1.08; }
.topbar > div:nth-child(2) { min-width: 0; flex: 1; }
.refresh { display: grid; width: 40px; height: 40px; margin-left: auto; place-items: center; border: 1px solid rgba(255,255,255,.82); border-radius: 50%; color: #315a46; background: rgba(255,255,255,.64); box-shadow: 0 2px 8px rgba(33,62,48,.06), inset 0 1px rgba(255,255,255,.95); font-size: 23px; cursor: pointer; transition: transform .25s, background .2s, box-shadow .2s; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.refresh:hover { background: rgba(255,255,255,.9); box-shadow: 0 5px 16px rgba(33,62,48,.12); }
.refresh:active { transform: rotate(35deg) scale(.96); }

.hero-card { position: relative; overflow: hidden; padding: 27px; border: 1px solid rgba(255,255,255,.42); border-radius: 33px; color: #f7fbf7; background: linear-gradient(145deg, rgba(44,82,65,.88), rgba(22,48,39,.84) 58%, rgba(24,43,40,.86)); box-shadow: 0 28px 70px rgba(32,67,50,.18), inset 0 1px 0 rgba(255,255,255,.38), inset 0 -1px 0 rgba(255,255,255,.06); backdrop-filter: blur(34px) saturate(155%); -webkit-backdrop-filter: blur(34px) saturate(155%); }
.hero-card::before { position: absolute; top: -170px; left: -85px; width: 440px; height: 310px; border-radius: 50%; background: radial-gradient(ellipse, rgba(194,239,209,.19), transparent 70%); content: ''; pointer-events: none; }
.hero-card::after { position: absolute; top: -118px; right: -88px; width: 285px; height: 285px; border: 1px solid rgba(225,249,229,.13); border-radius: 50%; content: ''; box-shadow: 0 0 0 26px rgba(225,249,229,.035), 0 0 0 56px rgba(225,249,229,.025); pointer-events: none; }
.card-topline, .card-footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.device-status-stack { display: flex; width: 100%; flex-direction: row; align-items: center; justify-content: space-between; gap: 9px; }
.stove-power-toggle { display: inline-flex; min-width: 78px; height: 30px; align-items: center; justify-content: center; gap: 5px; padding: 4px 9px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; font: inherit; font-size: 10px; font-weight: 750; cursor: pointer; transition: background .22s, color .22s, box-shadow .22s, border-color .22s, transform .14s; }
.stove-power-toggle.is-off { color: rgba(244,249,245,.72); background: rgba(14,31,23,.4); border-color: rgba(255,255,255,.18); box-shadow: inset 0 1px rgba(255,255,255,.06); }
.stove-power-toggle.is-on { color: #123b27; background: linear-gradient(145deg, #e6ffea, #99e3a9); border-color: rgba(233,255,235,.95); box-shadow: 0 0 0 2px rgba(161,240,174,.15), 0 0 16px rgba(144,237,160,.55), inset 0 1px white; }
.power-toggle-icon { font-size: 14px; line-height: 1; }
.stove-power-toggle:active:not(:disabled) { transform: scale(.96); }
.stove-power-toggle:disabled { cursor: not-allowed; }
.stove-power-toggle:focus-visible { outline: 3px solid rgba(194,240,203,.65); outline-offset: 3px; }
.online-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: rgba(245,250,246,.88); background: rgba(255,255,255,.09); box-shadow: inset 0 1px rgba(255,255,255,.1); font-size: 10px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.online-pill i { width: 7px; height: 7px; border-radius: 50%; background: #f2c779; box-shadow: 0 0 0 3px rgba(242,199,121,.16), 0 0 10px rgba(242,199,121,.55); }
.online-pill.online i { background: #9ee6a9; box-shadow: 0 0 0 3px rgba(158,230,169,.16), 0 0 10px rgba(158,230,169,.6); }
.online-pill.offline i { background: #f18e82; box-shadow: 0 0 0 3px rgba(241,142,130,.16), 0 0 10px rgba(241,142,130,.5); }
.status-block { position: relative; z-index: 1; display: flex; align-items: center; gap: 15px; margin: 36px 0 32px; }
.status-block .eyebrow, .temperature-block .eyebrow { color: rgba(218,237,223,.66); }
.status-icon { display: grid; width: 49px; height: 49px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 17px; color: #c7f0cb; background: linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.055)); box-shadow: inset 0 1px rgba(255,255,255,.19), 0 8px 20px rgba(8,27,19,.1); font-size: 24px; }
h2 { margin: 0; font-size: clamp(22px, 5.7vw, 29px); font-weight: 700; letter-spacing: -.05em; }
.temperature-overview { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.temperature-block { position: relative; z-index: 1; display: flex; min-width: 0; align-items: center; gap: 11px; padding: 13px; border: 1px solid rgba(255,255,255,.22); border-radius: 21px; background: linear-gradient(120deg, rgba(255,255,255,.13), rgba(255,255,255,.055)); box-shadow: inset 0 1px rgba(255,255,255,.16), 0 10px 26px rgba(8,27,19,.08); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.target-reading-block { padding-left: 17px; }
.temperature-symbol { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.66); border-radius: 13px; color: #204633; background: linear-gradient(145deg, rgba(226,255,231,.96), rgba(167,224,184,.82)); box-shadow: inset 0 1px 2px white, 0 7px 18px rgba(4,25,14,.15); font-size: 28px; font-weight: 500; line-height: 1; }
.temperature-block .eyebrow { margin-bottom: 5px; }
.temperature-value { display: flex; align-items: flex-start; gap: 3px; font-size: clamp(30px, 8vw, 45px); font-weight: 700; letter-spacing: -.075em; line-height: .94; font-variant-numeric: tabular-nums; }
.temperature-value .unit { padding-top: 4px; font-size: 16px; font-weight: 500; letter-spacing: -.04em; }

.readings { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 13px 0 5px; }
.control-group { position: relative; z-index: 1; display: grid; gap: 10px; margin-top: 15px; padding: 17px; border: 1px solid rgba(255,255,255,.24); border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.065)); box-shadow: inset 0 1px rgba(255,255,255,.16), 0 9px 24px rgba(8,27,19,.07); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.control-group-heading { padding: 0 2px 2px; }
.control-group-heading .eyebrow { margin-bottom: 5px; color: rgba(218,237,223,.63); }
.control-group-heading h3 { margin: 0; color: #f7fbf7; font-size: 18px; font-weight: 700; letter-spacing: -.035em; }
.temperature-readings { margin: 0; }
.temperature-readings .reading { min-height: 62px; }
.control-group .relax-control, .control-group .fan-controls { margin-top: 0; }
.control-group .setpoint-control { padding: 14px 15px 13px; }
.mode-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mode-switches .mode-option { min-width: 0; margin: 0; padding: 13px 12px; }
.mode-option h3 { font-size: 14px; }
.mode-option .relax-description { font-size: 9px; line-height: 1.35; }
.mode-option .mode-switch { width: 46px; height: 28px; }
.mode-option .mode-switch span { width: 20px; height: 20px; }
.mode-option .mode-switch.enabled span { transform: translateX(18px); }
.stepper { display: grid; grid-template-columns: 54px minmax(75px, 1fr) 54px; align-items: center; gap: 14px; margin: 13px auto 10px; max-width: 280px; }
.stepper output { color: #f8fbf8; text-align: center; font-size: clamp(25px, 7vw, 34px); line-height: 1; font-weight: 750; font-variant-numeric: tabular-nums; }
.stepper button { width: 54px; height: 54px; border: 1px solid rgba(255,255,255,.62); border-radius: 18px; color: #17422f; background: linear-gradient(145deg, #e5f8e8, #addfb7); box-shadow: inset 0 1px white, 0 5px 13px rgba(4,25,14,.14); font: inherit; font-size: 28px; line-height: 1; font-weight: 500; cursor: pointer; transition: transform .14s, opacity .14s; }
.stepper button:active:not(:disabled) { transform: scale(.94); }
.stepper button:disabled { opacity: .38; cursor: not-allowed; }
.stepper button:focus-visible { outline: 3px solid rgba(194,240,203,.65); outline-offset: 3px; }
.fan-stepper { grid-template-columns: 34px minmax(20px, 1fr) 34px; gap: 4px; max-width: 230px; margin: 8px auto 2px; }
.fan-stepper output { font-size: 21px; }
.fan-stepper button { width: 34px; height: 34px; border-radius: 11px; font-size: 21px; }
.reading { display: flex; min-height: 74px; flex-direction: column; justify-content: center; gap: 8px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: linear-gradient(145deg, rgba(255,255,255,.115), rgba(255,255,255,.055)); box-shadow: inset 0 1px rgba(255,255,255,.1), 0 5px 17px rgba(8,27,19,.05); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.reading-label { color: rgba(218,237,223,.62); font-size: 8px; font-weight: 750; letter-spacing: .13em; }
.reading strong { color: #f7fbf7; font-size: 19px; line-height: 1; font-variant-numeric: tabular-nums; }
.reading small { margin-left: 4px; color: rgba(231,244,233,.73); font-size: 11px; font-weight: 500; }
.fan-controls { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px; margin-top: 13px; }
.fan-control { min-width: 0; padding: 10px 9px 9px; border: 1px solid rgba(255,255,255,.19); border-radius: 16px; background: linear-gradient(130deg, rgba(255,255,255,.13), rgba(255,255,255,.055)); box-shadow: inset 0 1px rgba(255,255,255,.12), 0 6px 18px rgba(8,27,19,.06); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.fan-control-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fan-control-heading .reading-label { margin: 0; color: rgba(218,237,223,.72); }
.fan-control-heading strong { color: #f7fbf7; font-size: 13px; font-weight: 650; }
.fan-control-heading output { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.32); border-radius: 12px; color: #183e2d; background: linear-gradient(145deg, #e0f7e2, #a8dfb2); box-shadow: inset 0 1px white; font-size: 16px; font-weight: 750; }
.fan-controls > .fan-help { grid-column: 1 / -1; }
.fan-control input[type="range"] { width: 100%; height: 5px; margin: 15px 0 11px; accent-color: #a7e8b2; cursor: pointer; }
.fan-control input[type="range"]:disabled { opacity: .45; cursor: not-allowed; }
.fan-apply { width: 100%; padding: 9px 12px; border: 1px solid rgba(255,255,255,.27); border-radius: 12px; color: #f2f8f2; background: rgba(255,255,255,.1); box-shadow: inset 0 1px rgba(255,255,255,.09); font: inherit; font-size: 10px; font-weight: 680; cursor: pointer; transition: background .18s, transform .15s; }
.fan-apply:hover:not(:disabled) { background: rgba(255,255,255,.18); }
.fan-apply:active:not(:disabled) { transform: scale(.99); }
.fan-apply:disabled { opacity: .42; cursor: not-allowed; }
.fan-help { margin: 0 3px; color: rgba(65,89,74,.75); font-size: 10px; line-height: 1.5; }
.relax-control { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 13px; padding: 16px 17px; border: 1px solid rgba(255,255,255,.19); border-radius: 20px; background: linear-gradient(130deg, rgba(255,255,255,.13), rgba(255,255,255,.055)); box-shadow: inset 0 1px rgba(255,255,255,.12), 0 6px 18px rgba(8,27,19,.06); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.relax-control .eyebrow { margin-bottom: 5px; color: rgba(218,237,223,.61); }
.relax-control h3 { margin: 0; color: #f7fbf7; font-size: 15px; letter-spacing: -.025em; }
.relax-description { margin: 4px 0 0; color: rgba(231,242,233,.69); font-size: 10px; }
.mode-switch { position: relative; width: 52px; height: 31px; flex: 0 0 auto; padding: 0; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(15,31,24,.48); box-shadow: inset 0 1px 3px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.08); cursor: pointer; transition: background .22s, border-color .22s; }
.mode-switch span { position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; background: linear-gradient(145deg, #fff, #e4eee7); box-shadow: 0 2px 5px rgba(0,0,0,.2), inset 0 1px white; transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.mode-switch.enabled { border-color: rgba(189,241,198,.75); background: linear-gradient(120deg, #74c78c, #a2e4a9); }
.mode-switch.enabled span { transform: translateX(21px); }
.mode-switch:disabled { opacity: .48; cursor: wait; }
.mode-switch:focus-visible { outline: 3px solid rgba(194,240,203,.65); outline-offset: 3px; }

.pellet-card { position: relative; z-index: 1; margin-top: 15px; padding: 19px; border: 1px solid rgba(255,255,255,.22); border-radius: 24px; background: linear-gradient(145deg, rgba(11,34,25,.31), rgba(255,255,255,.075)); box-shadow: inset 0 1px rgba(255,255,255,.13), 0 10px 24px rgba(8,27,19,.08); backdrop-filter: blur(22px) saturate(130%); -webkit-backdrop-filter: blur(22px) saturate(130%); }
.pellet-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pellet-heading .eyebrow { color: rgba(218,237,223,.61); }
.pellet-heading h3 { margin: 0; font-size: 16px; font-weight: 680; letter-spacing: -.03em; }
.pellet-percent { color: #c4f0c9; font-size: 25px; font-variant-numeric: tabular-nums; }
.pellet-track { height: 8px; overflow: hidden; margin: 16px 0 9px; border: 1px solid rgba(255,255,255,.09); border-radius: 999px; background: rgba(255,255,255,.14); box-shadow: inset 0 1px 3px rgba(0,0,0,.15); }
.pellet-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #83dca0, #d0f0a5); box-shadow: 0 0 12px rgba(150,231,163,.42); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.pellet-amount, .consumption-line, .pellet-help { margin: 0; color: rgba(231,242,233,.72); font-size: 10px; }
.consumption-line { margin-top: 5px; color: rgba(237,247,237,.89); }
.pellet-label { display: block; margin-top: 17px; color: rgba(245,250,246,.93); font-size: 10px; font-weight: 650; }
.slider-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.slider-row input { width: 100%; height: 5px; accent-color: #a7e8b2; cursor: pointer; }
.slider-row output { min-width: 42px; color: #c4f0c9; font-size: 12px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.save-level { width: 100%; margin-top: 11px; padding: 11px 14px; border: 1px solid rgba(255,255,255,.6); border-radius: 14px; color: #173d2d; background: linear-gradient(180deg, rgba(221,255,226,.96), rgba(179,232,191,.9)); box-shadow: 0 5px 14px rgba(3,24,13,.12), inset 0 1px rgba(255,255,255,.9); font: inherit; font-size: 11px; font-weight: 720; cursor: pointer; transition: transform .15s, filter .15s, box-shadow .15s; }
.save-level:hover { filter: brightness(1.035); box-shadow: 0 7px 18px rgba(3,24,13,.18), inset 0 1px rgba(255,255,255,.95); }
.save-level:active { transform: scale(.99); }
.save-level:disabled { opacity: .6; cursor: wait; }
.pellet-help { margin-top: 10px; line-height: 1.55; }
.card-footer { padding-top: 17px; color: rgba(226,239,228,.62); font-size: 10px; }
.card-footer time { color: rgba(247,251,247,.9); font-weight: 650; font-variant-numeric: tabular-nums; }
.notice { min-height: 18px; margin: 14px 5px 0; color: #75847b; font-size: 11px; }
.notice.error { color: #a5473d; }
.page-footer { display: flex; justify-content: center; gap: 8px; margin-top: 23px; color: #89958e; font-size: 10px; }
.footer-dot { color: #b0bbb4; }
.loading { animation: pulse 1.4s ease-in-out infinite; }

/* SmartEK63 palette: wine, signal red, warm cream, deep navy and steel blue. */
body { color: var(--navy); }
.topbar { border-color: rgba(102,155,188,.32); background: rgba(253,240,213,.58); box-shadow: 0 8px 30px rgba(0,48,73,.08), inset 0 1px rgba(255,255,255,.85); }
.brand-mark { border-color: rgba(102,155,188,.34); background: linear-gradient(145deg, #fffaf0, #f5dfcf); }
.eyebrow { color: var(--blue); }
h1 { color: var(--navy); }
.refresh { color: var(--navy); border-color: rgba(102,155,188,.4); background: rgba(253,240,213,.78); }
.hero-card { border-color: rgba(102,155,188,.5); background: linear-gradient(145deg, rgba(0,48,73,.97), rgba(0,48,73,.92) 58%, rgba(0,35,54,.97)); box-shadow: 0 28px 70px rgba(0,48,73,.24), inset 0 1px 0 rgba(253,240,213,.22), inset 0 -1px 0 rgba(102,155,188,.13); }
.hero-card::before { background: radial-gradient(ellipse, rgba(102,155,188,.25), transparent 70%); }
.hero-card::after { border-color: rgba(102,155,188,.2); box-shadow: 0 0 0 26px rgba(102,155,188,.06), 0 0 0 56px rgba(102,155,188,.035); }
.stove-power-toggle.is-off { color: rgba(253,240,213,.8); background: rgba(120,0,0,.42); border-color: rgba(253,240,213,.2); }
.stove-power-toggle.is-on { color: #fffaf0; background: linear-gradient(145deg, var(--red), var(--wine)); border-color: rgba(253,240,213,.65); box-shadow: 0 0 0 2px rgba(193,18,31,.2), 0 0 18px rgba(193,18,31,.5), inset 0 1px rgba(255,255,255,.28); }
.online-pill i { background: #e6b85c; box-shadow: 0 0 0 3px rgba(230,184,92,.16), 0 0 10px rgba(230,184,92,.5); }
.online-pill.online i { background: #8dc5d8; box-shadow: 0 0 0 3px rgba(102,155,188,.2), 0 0 10px rgba(102,155,188,.65); }
.online-pill.offline i { background: #f05c62; box-shadow: 0 0 0 3px rgba(193,18,31,.2), 0 0 10px rgba(193,18,31,.55); }
.status-icon { color: #b6d7e8; }
.temperature-symbol { color: var(--navy); background: linear-gradient(145deg, #fffaf0, var(--cream)); }
.stepper button, .fan-control-heading output { color: var(--navy); background: linear-gradient(145deg, #fffaf0, #e6d9c1); border-color: rgba(102,155,188,.55); }
.mode-switch.enabled { border-color: rgba(102,155,188,.8); background: linear-gradient(120deg, var(--navy), var(--blue)); }
.pellet-card { border-color: rgba(102,155,188,.34); background: linear-gradient(145deg, rgba(0,48,73,.22), rgba(102,155,188,.14)); }
.pellet-percent, .slider-row output { color: #b6d7e8; }
.pellet-track span { background: linear-gradient(90deg, var(--blue), #b6d7e8); box-shadow: 0 0 12px rgba(102,155,188,.5); }
.save-level { color: #fffaf0; border-color: rgba(253,240,213,.45); background: linear-gradient(180deg, var(--red), var(--wine)); box-shadow: 0 5px 14px rgba(0,20,34,.22), inset 0 1px rgba(255,255,255,.2); }
.save-level:hover { filter: brightness(1.12); }
.notice { color: #4c7183; }
.notice.error { color: var(--red); }
.page-footer { color: #4c7183; }
/* Keep secondary copy readable over the translucent navy cards. */
.status-block .eyebrow, .temperature-block .eyebrow,
.control-group-heading .eyebrow, .relax-control .eyebrow,
.reading-label, .fan-control-heading .reading-label,
.pellet-heading .eyebrow, .card-footer,
.pellet-amount, .consumption-line, .pellet-help,
.pellet-label, .relax-description, .fan-help {
  color: #fdf0d5;
  opacity: .96;
}
.reading small { color: #fdf0d5; }
.control-group-heading h3, .relax-control h3, .pellet-heading h3,
.fan-control-heading strong, .stepper output { color: #fffaf0; }
.online-pill { color: #fffaf0; background: rgba(0,20,34,.62); border-color: rgba(253,240,213,.52); }
.stove-power-toggle.is-off { color: #fffaf0; border-color: rgba(253,240,213,.48); }
.pellet-card { background: linear-gradient(145deg, rgba(0,48,73,.96), rgba(0,48,73,.9)); }
.notice { color: #003049; font-weight: 650; }
.page-footer { color: #003049; font-weight: 600; }
@keyframes pulse { 50% { opacity: .48; } }

@media (max-width: 480px) {
  .shell { width: min(100% - 26px, 700px); padding-top: max(22px, env(safe-area-inset-top)); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .topbar { margin-bottom: 15px; border-radius: 20px; }
  .hero-card { padding: 19px; border-radius: 28px; }
  .status-block { margin: 29px 0 20px; }
  .temperature-block { gap: 9px; padding: 11px; border-radius: 19px; }
  .temperature-overview { gap: 8px; }
  .temperature-value { font-size: clamp(27px, 7.4vw, 36px); }
  .temperature-value .unit { font-size: 14px; }
  .readings { gap: 7px; }
  .reading { min-height: 68px; padding: 11px 12px; border-radius: 16px; }
  .relax-control { padding: 14px; border-radius: 18px; }
  .pellet-card { padding: 16px; border-radius: 21px; }
  .page-footer { flex-wrap: wrap; margin-top: 18px; }
}

@media (max-width: 360px) {
  .hero-card { padding: 16px; }
  .temperature-overview { gap: 6px; }
  .temperature-block { gap: 7px; padding: 9px 8px; }
  .temperature-symbol { width: 30px; height: 30px; border-radius: 10px; font-size: 22px; }
  .temperature-value { font-size: clamp(23px, 7vw, 29px); }
  .temperature-value .unit { font-size: 12px; }
  .fan-control { padding: 9px 7px 8px; }
  .fan-stepper { grid-template-columns: 30px minmax(16px, 1fr) 30px; gap: 3px; }
  .fan-stepper button { width: 30px; height: 30px; font-size: 19px; }
}

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .topbar { background: rgba(255,255,255,.88); }
  .hero-card { background: linear-gradient(145deg, #315b48, #183328); }
  .reading, .pellet-card { background: rgba(24,54,41,.93); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.shell [hidden] { display: none !important; }

.logout-form { margin: 0; }
.logout-button { padding: 9px 11px; border: 1px solid rgba(0,48,73,.24); border-radius: 999px; color: var(--navy); background: rgba(253,240,213,.88); font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.logout-button:focus-visible, .login-form button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.login-page { display: grid; min-height: 100vh; place-items: center; padding: 20px; }
.login-shell { width: min(100%, 420px); }
.login-card { padding: 30px; border: 1px solid rgba(102,155,188,.55); border-radius: 28px; color: #fffaf0; background: linear-gradient(145deg, #003049, #002336); box-shadow: 0 24px 65px rgba(0,48,73,.25); }
.login-brand { display: grid; width: 54px; height: 54px; margin-bottom: 20px; place-items: center; border: 1px solid rgba(253,240,213,.6); border-radius: 17px; background: var(--cream); }
.login-brand img { width: 32px; height: 32px; }
.login-card .eyebrow { margin-bottom: 7px; color: #b6d7e8; }
.login-card h1 { margin: 0 0 10px; color: #fffaf0; font-size: 27px; letter-spacing: -.04em; }
.login-description { margin: 0 0 22px; color: #fdf0d5; font-size: 13px; line-height: 1.55; }
.login-error { margin: 0 0 16px; padding: 11px 12px; border: 1px solid rgba(255,160,160,.65); border-radius: 12px; color: #fff; background: rgba(120,0,0,.5); font-size: 12px; }
.login-form { display: grid; gap: 9px; }
.login-form label { margin-top: 5px; color: #fffaf0; font-size: 12px; font-weight: 700; }
.login-form input { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid rgba(253,240,213,.72); border-radius: 12px; color: var(--navy); background: #fffaf0; font: inherit; font-size: 16px; }
.login-form input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.login-form button { min-height: 47px; margin-top: 12px; border: 1px solid rgba(253,240,213,.7); border-radius: 13px; color: #fffaf0; background: linear-gradient(145deg, var(--red), var(--wine)); font: inherit; font-size: 14px; font-weight: 750; cursor: pointer; }

@media (max-width: 480px) {
  .login-page { padding: 16px; }
  .login-card { padding: 24px; border-radius: 24px; }
}
