/* ════════════════════════════════════════════════════════════════════════
   Thermostat web app — "Ember & Frost" theme.
   A calm, premium climate-instrument aesthetic: warm-charcoal surfaces, the
   heat(ember)/cool(frost) duality as the core color language, a serif display
   face (Fraunces) over a refined grotesque body (Hanken Grotesk), subtle
   thermal gradients + grain for atmosphere, and a quiet staggered load.
   ════════════════════════════════════════════════════════════════════════ */

/* Self-hosted fonts (woff2 under /static/fonts/) — no Google Fonts request, so
   the app renders correctly offline and leaks no requests off-device. */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/static/fonts/fraunces-400.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("/static/fonts/fraunces-500.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("/static/fonts/fraunces-600.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/static/fonts/hanken-grotesk-400.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("/static/fonts/hanken-grotesk-500.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("/static/fonts/hanken-grotesk-600.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("/static/fonts/hanken-grotesk-700.woff2") format("woff2");
}

:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --bg: #131110;
  --card: #1d1a17;
  --card-2: #272320;
  --card-alt: #272320;        /* alias kept for existing selectors */
  --border: #36312b;
  --border-soft: #2a2622;
  --text: #f1ece3;
  --muted: #9b948a;

  --heat: #ef7d49;            /* ember — heating */
  --cool: #57b6e6;            /* frost — cooling */
  --accent: #57b6e6;          /* frost is the primary accent */
  --ok: #5fd0a8;             /* "now" / current reading */
  --warn: #e3a740;
  --danger: #e2624a;

  --purge: #2c2519;
  --purge-stripe: #3a3120;
  --idle: #211f1d;

  --chip-bg: rgba(16, 14, 12, 0.78);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Atmosphere: a warm ember glow up top fading to a cool hint below, + grain. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(125% 55% at 50% -12%, rgba(239, 125, 73, 0.12), transparent 62%),
    radial-gradient(110% 50% at 50% 114%, rgba(87, 182, 230, 0.07), transparent 60%),
    var(--bg);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Header ── */
.app-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px;
  background: rgba(19, 17, 16, 0.78);
  backdrop-filter: blur(12px) saturate(120%);
  border-bottom: 1px solid var(--border-soft);
}
.app-header::after {  /* thermal accent line: cool → ember */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--cool), var(--heat));
  opacity: 0.8;
}
.app-header .title {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: 0.2px;
}
.header-right { display: flex; gap: 8px; align-items: center; }

main {
  max-width: 740px; margin: 0 auto; padding: 20px 16px 48px;
  display: flex; flex-direction: column; gap: 18px;
}

.notice {
  padding: 18px; border-radius: var(--radius);
  background: var(--card); color: var(--muted); text-align: center;
}
.notice-error { color: var(--danger); border: 1px solid var(--danger); }

.cards { display: flex; flex-direction: column; gap: 18px; }

.card {
  position: relative;
  background: linear-gradient(180deg, var(--card), #191714);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.card h2 {
  margin: 0 0 14px; font-family: var(--font-display);
  font-size: 1.18rem; font-weight: 600; letter-spacing: 0.2px;
}

/* Quiet staggered reveal of the top-level sections on load (persistent nodes,
   so it won't replay when inner content re-renders during interaction). */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
#content > * { animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
#content > *:nth-child(1) { animation-delay: 0.03s; }
#content > *:nth-child(2) { animation-delay: 0.09s; }
#content > *:nth-child(3) { animation-delay: 0.15s; }
#content > *:nth-child(4) { animation-delay: 0.21s; }
#content > *:nth-child(5) { animation-delay: 0.27s; }
#content > *:nth-child(6) { animation-delay: 0.33s; }

/* ── Zone cards ── */
.zone-card .zone-head {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px;
}
.zone-card .zone-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.zone-card .zone-temp {
  font-family: var(--font-display); font-size: 2.1rem; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: -0.5px; line-height: 1;
}
.zone-card .zone-temp .unit { font-size: 0.85rem; color: var(--muted); margin-left: 1px; }
.zone-card .zone-meta {
  color: var(--muted); font-size: 0.84rem; margin-bottom: 14px; font-variant-numeric: tabular-nums;
}
/* Idle indicator — the unit is at rest, so its parked setpoint isn't shown. */
.zone-card .zone-meta .at-rest { font-style: italic; opacity: 0.85; }

.shift-control { margin: 10px 0 14px; }
.shift-labels {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: var(--muted); margin-bottom: 2px;
}
.shift-value { font-weight: 600; color: var(--cool); font-variant-numeric: tabular-nums; }

/* Range inputs — a slim track with a thermal tint. */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 26px; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 5px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(87, 182, 230, 0.5), rgba(239, 125, 73, 0.5));
}
input[type="range"]::-moz-range-track {
  height: 5px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(87, 182, 230, 0.5), rgba(239, 125, 73, 0.5));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; margin-top: -6.5px; border-radius: 50%;
  background: #fbf7f0; border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fbf7f0; border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.zone-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Buttons ── */
.btn {
  background: var(--card-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 15px; font-family: var(--font-body); font-size: 0.9rem; font-weight: 500;
  cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.06s;
}
.btn:hover { border-color: var(--cool); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cool); color: #07151d; border-color: var(--cool); font-weight: 600; }
.btn-danger { color: var(--danger); border-color: rgba(226, 98, 74, 0.55); }
.btn.active { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: var(--border-soft); color: var(--muted); padding: 6px 12px; font-size: 0.82rem; }
.btn-ghost:hover { color: var(--text); }

/* ── Login view ── */
.login-view { display: flex; justify-content: center; padding-top: 6vh; }
.login-view[hidden] { display: none; } /* explicit display:flex would otherwise beat [hidden] */
.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.login-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; }
.login-sub { margin: 0; color: var(--muted); font-size: 0.92rem; }
.login-field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.login-label { font-size: 0.82rem; color: var(--muted); }
.login-card input[type="password"] {
  background: var(--card-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; font-family: var(--font-body); font-size: 1rem;
}
.login-card input[type="password"]:focus { outline: none; border-color: var(--cool); }
.login-submit { width: 100%; padding: 11px 15px; font-size: 0.95rem; }
.login-error { padding: 11px 13px; font-size: 0.88rem; }

select {
  background: var(--card-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 11px; font-family: var(--font-body); font-size: 0.9rem; cursor: pointer;
}
select:hover { border-color: var(--cool); }

/* ── Rows / labels ── */
.row { display: flex; align-items: center; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
.row > label:first-child { min-width: 130px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.8rem; margin: 8px 0 0; line-height: 1.45; }

/* ── Toggle switch ── */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider-track {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: 26px; transition: 0.22s;
}
.slider-track:before {
  content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: var(--muted); border-radius: 50%; transition: 0.22s;
}
.switch input:checked + .slider-track { background: rgba(95, 208, 168, 0.26); border-color: var(--ok); }
.switch input:checked + .slider-track:before { transform: translateX(20px); background: var(--ok); }

/* ── Badges ── */
.badge {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
  background: var(--card-2); border: 1px solid var(--border); color: var(--muted);
}
.badge-ok { color: var(--ok); border-color: rgba(95, 208, 168, 0.5); background: rgba(95, 208, 168, 0.1); }
.badge-warn { color: var(--warn); border-color: rgba(227, 167, 64, 0.5); background: rgba(227, 167, 64, 0.1); }
.badge-danger { color: var(--danger); border-color: var(--danger); }

/* ── Intro / context card ── */
.intro-card {
  background: linear-gradient(180deg, rgba(239, 125, 73, 0.06), rgba(87, 182, 230, 0.04)), var(--card);
}
.intro-card p { margin: 0 0 9px; font-size: 0.92rem; line-height: 1.55; color: var(--text); }
.intro-card p:last-child { margin-bottom: 0; }
.intro-card strong { color: var(--heat); font-weight: 600; }
.intro-card p:last-child strong { color: var(--cool); }

/* ── Macro adjustment (per-zone shift) ── */
.macro-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.macro-title { font-weight: 600; font-size: 0.95rem; }
.macro-desc { margin: 8px 0 0; font-size: 0.78rem; color: var(--muted); line-height: 1.5; }

/* ── Advanced controls (bottom) ── */
.advanced-divider {
  border: none; height: 1px; margin: 6px 6px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.advanced-card { background: linear-gradient(180deg, #1a1815, #161412); }
.advanced-card h2 { color: var(--muted); font-size: 1.02rem; }
.advanced-card select { min-width: 160px; }

/* ── Detail editor (TOP) — graphical band editor ── */
.detail-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.detail-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.detail-time {
  margin: 0 0 10px; font-size: 0.86rem; font-weight: 600; color: var(--cool);
  font-variant-numeric: tabular-nums;
}
.detail-desc { margin: 0 0 14px; font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.detail-block-pick { margin: 0 0 16px; }
.detail-block-pick > label:first-child { min-width: auto; font-weight: 600; }
.detail-block-pick select { text-transform: capitalize; }
.detail-block-pick .muted { font-size: 0.8rem; }
.detail-head .band-name { font-weight: 600; font-size: 1.05rem; text-transform: capitalize; }
.detail-zone-toggle { display: flex; gap: 6px; margin-left: auto; }
.zone-tab { padding: 6px 15px; }
.zone-tab.active-tab { background: var(--cool); color: #07151d; border-color: var(--cool); font-weight: 600; }
.band-name { font-weight: 600; font-size: 1rem; }

.detail-toggles { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; flex-wrap: wrap; }
.seg-toggle { display: flex; align-items: center; gap: 8px; }
.seg-toggle .seg-label { font-size: 0.85rem; color: var(--muted); }
.zoom-toggle { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); cursor: pointer; }
.zoom-toggle input { accent-color: var(--cool); }

/* Y-axis range sliders — set the visible temperature window for both plots. */
.axis-range {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-size: 0.85rem; color: var(--muted);
}
.axis-range input[type="range"] { flex: 1; min-width: 60px; }
.axis-range .range-val {
  font-weight: 600; color: var(--cool); min-width: 32px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.axis-range .range-dash { color: var(--muted); }

/* The graphical temperature axis: a tall thermal track, warm at top, cool low. */
.detail-plot {
  position: relative; height: 430px; border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(239, 125, 73, 0.07), rgba(87, 182, 230, 0.06)),
    #17150f;
  border: 1px solid var(--border-soft);
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.35);
  margin: 4px 0 12px; user-select: none; touch-action: none; overflow: hidden;
}
.detail-plot.inverted { box-shadow: inset 0 0 0 2px var(--danger); }

/* Gridlines + labels (shared between detail + schedule plots). */
.grid-line { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(155, 148, 138, 0.2); pointer-events: none; }
.grid-label {
  position: absolute; left: 6px; top: -8px;
  font-size: 0.68rem; color: var(--muted); font-variant-numeric: tabular-nums;
  background: var(--chip-bg); padding: 0 4px; border-radius: 4px;
}

/* Shaded heat/cool band regions — soft thermal glows. */
.band-region, .sp-region { position: absolute; left: 0; right: 0; pointer-events: none; }
.heat-region { background: rgba(239, 125, 73, 0.22); box-shadow: inset 0 0 22px rgba(239, 125, 73, 0.12); }
.cool-region { background: rgba(87, 182, 230, 0.2); box-shadow: inset 0 0 22px rgba(87, 182, 230, 0.1); }

/* Current-temperature marker line — label CENTERED so it clears the edge
   readouts (heat left / cool right). */
.cur-temp-line { position: absolute; left: 0; right: 0; border-top: 2px dotted var(--ok); pointer-events: none; z-index: 6; }
.cur-temp-label {
  position: absolute; left: 50%; transform: translateX(-50%); top: -9px;
  font-size: 0.7rem; font-weight: 600; color: var(--ok); font-variant-numeric: tabular-nums;
  background: var(--chip-bg); padding: 1px 7px; border-radius: 999px; white-space: nowrap;
}

/* Draggable threshold handles (visual-only; the plot owns pointerdown). */
.band-handle {
  position: absolute; left: 0; right: 0; margin-top: -11px; height: 22px;
  display: flex; align-items: center; cursor: ns-resize; z-index: 5; pointer-events: none;
}
.detail-plot:not(.readonly) { cursor: ns-resize; }
.band-handle .handle-line { position: absolute; left: 0; right: 0; top: 11px; height: 0; }
.band-handle.heat .handle-line { border-top: 2px solid var(--heat); box-shadow: 0 0 10px rgba(239, 125, 73, 0.45); }
.band-handle.cool .handle-line { border-top: 2px solid var(--cool); box-shadow: 0 0 10px rgba(87, 182, 230, 0.45); }
.band-handle .handle-readout {
  position: relative; z-index: 2;
  font-size: 0.76rem; font-variant-numeric: tabular-nums; color: var(--text);
  background: var(--chip-bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 2px 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.band-handle .handle-readout.left { margin-right: auto; margin-left: 8px; }
.band-handle .handle-readout.right { margin-left: auto; margin-right: 8px; }
.band-handle.heat .handle-readout strong { color: var(--heat); }
.band-handle.cool .handle-readout strong { color: var(--cool); }
.band-handle.readonly { cursor: not-allowed; opacity: 0.55; }
.band-handle.active-edge .handle-readout { border-color: var(--text); box-shadow: 0 0 0 1px var(--text), 0 2px 8px rgba(0, 0, 0, 0.4); }

/* ── Precise edge editor (tap a handle) ── */
.edge-editor {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 12px;
  background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.edge-editor[hidden], .time-editor[hidden] { display: none; }  /* `hidden` wins over display:flex */
.edge-editor.heat { border-left: 3px solid var(--heat); }
.edge-editor.cool { border-left: 3px solid var(--cool); }
.edge-editor .ee-label { font-size: 0.85rem; font-weight: 600; min-width: 56px; }
.edge-editor .ee-unit { font-size: 0.8rem; color: var(--muted); }
.edge-editor .ee-step { padding: 4px 13px; font-size: 1.05rem; line-height: 1; }
.edge-editor .ee-input {
  width: 74px; background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 8px; font-size: 0.95rem; text-align: center; font-variant-numeric: tabular-nums;
}
.edge-editor .ee-close { margin-left: auto; padding: 4px 11px; color: var(--muted); }

/* Off / at-rest note. */
.off-note {
  background: rgba(155, 148, 138, 0.1); border: 1px solid var(--border-soft); color: var(--muted);
  border-radius: var(--radius-sm); padding: 15px 16px; font-size: 0.85rem; margin: 4px 0 12px; line-height: 1.5;
}

/* ── Schedule plot (BOTTOM) ── */
.schedule-plot {
  position: relative; height: 158px; border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(239, 125, 73, 0.05), rgba(87, 182, 230, 0.045)), #17150f;
  border: 1px solid var(--border-soft); box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden; user-select: none; touch-action: none;
}
.sp-block { position: absolute; top: 0; bottom: 0; overflow: hidden; border-right: 1px solid rgba(0, 0, 0, 0.4); }
.sp-block.selectable { cursor: pointer; }
.sp-block.idle { background: var(--idle); }
.sp-block.purge {
  background: repeating-linear-gradient(45deg, var(--purge), var(--purge) 6px, var(--purge-stripe) 6px, var(--purge-stripe) 12px);
}
.sp-block.now { box-shadow: inset 0 0 0 2px var(--ok); z-index: 2; }
.sp-block.selected { box-shadow: inset 0 0 0 2px var(--cool); z-index: 3; }
.sp-label {
  position: absolute; top: 3px; left: 4px; font-size: 0.66rem; font-weight: 500; color: var(--text);
  white-space: nowrap; pointer-events: none; z-index: 4; text-transform: capitalize;
  background: var(--chip-bg); padding: 1px 5px; border-radius: 5px;
}
.sp-off { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.66rem; color: var(--muted); pointer-events: none; }

.sp-divider {
  position: absolute; top: 0; bottom: 0; width: 18px; margin-left: -9px;
  cursor: ew-resize; z-index: 6; display: flex; align-items: center; justify-content: center;
}
.sp-divider:after { content: ""; width: 2px; height: 100%; background: var(--cool); opacity: 0.85; }
.sp-divider:hover:after { opacity: 1; box-shadow: 0 0 8px var(--cool); }
.sp-divider.locked { cursor: not-allowed; }
.sp-divider.locked:after { background: var(--muted); opacity: 0.45; box-shadow: none; }
.sp-divider.active-divider:after { width: 3px; background: var(--text); box-shadow: 0 0 8px rgba(241, 236, 227, 0.5); }

/* ── Precise time editor (tap a divider) — mirrors .edge-editor ── */
.time-editor {
  display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 12px;
  background: var(--card-2); border: 1px solid var(--border); border-left: 3px solid var(--cool);
  border-radius: var(--radius-sm);
}
.time-editor .te-label { font-size: 0.85rem; font-weight: 600; text-transform: capitalize; }
.time-editor .te-step { padding: 4px 13px; font-size: 1.05rem; line-height: 1; }
.time-editor .te-input {
  background: var(--card); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 8px; font-size: 0.95rem; font-variant-numeric: tabular-nums;
}
.time-editor .te-close { margin-left: auto; padding: 4px 11px; color: var(--muted); }

.axis {
  display: flex; justify-content: space-between; margin-top: 7px;
  color: var(--muted); font-size: 0.72rem; font-variant-numeric: tabular-nums;
}

.band-warning {
  background: rgba(227, 167, 64, 0.1); border: 1px solid rgba(227, 167, 64, 0.45); color: var(--warn);
  border-radius: var(--radius-sm); padding: 8px 11px; font-size: 0.78rem; margin-bottom: 12px;
}
.band-warning ul { margin: 6px 0 0; padding-left: 18px; }
.band-warning li { margin: 2px 0; }
.share-details summary { cursor: pointer; list-style: revert; }
.share-details summary strong { color: var(--warn); }
.share-details .share-note { margin-top: 6px; color: var(--muted); }

/* ── Schedule block chips (reliable tap target for tiny blocks) ── */
.schedule-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.schedule-chips .chip {
  background: var(--card-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px; font-size: 0.78rem; font-weight: 500;
  cursor: pointer; text-transform: capitalize; transition: border-color 0.15s, color 0.15s;
}
.schedule-chips .chip:hover { border-color: var(--cool); }
.schedule-chips .chip.selected { border-color: var(--cool); color: var(--cool); box-shadow: 0 0 0 1px var(--cool); }
.schedule-chips .chip.now { border-color: var(--ok); color: var(--ok); }

.band-editor-actions { display: flex; gap: 8px; }

/* ── Responsive ── */
@media (max-width: 480px) {
  main { padding: 16px 12px 40px; }
  .row > label:first-child { min-width: auto; }
  .zone-card .zone-temp { font-size: 1.85rem; }
  .detail-zone-toggle { margin-left: 0; }
  .detail-plot { height: 370px; }
  .schedule-plot { height: 138px; }
  .sp-label { font-size: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
