:host {
  display: block;
  color: #eff8f3;
  font: 400 14px/1.5 system-ui, sans-serif;
  color-scheme: dark;
  --accent: #91efaa;
  --muted: #a9c4b7;
  --line: #305143;
}
*, *::before, *::after { box-sizing: border-box; }
.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #0c1c16;
  box-shadow: 0 16px 38px #0004;
}
header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.panel > header, .body { padding: clamp(15px, 4%, 24px); }
.controller-header {
  align-items: center;
  margin-bottom: 11px;
  padding: 15px 17px;
  border: 1px solid #274324;
  border-radius: 22px;
  background:
    radial-gradient(circle at 78% 18%, #f0bc4714, transparent 28%),
    radial-gradient(circle at 16% 82%, #70f35f17, transparent 30%),
    linear-gradient(180deg, #0a140c, #030804);
  box-shadow: 0 10px 28px #0003;
}
.controller-lockup { display: flex; align-items: center; gap: 13px; min-width: 0; }
.controller-lockup img { display: block; flex: 0 0 auto; object-fit: contain; border-radius: 14px; }
.controller-brand { color: #fff; font-size: 16px; font-weight: 900; line-height: 1.05; margin-bottom: 4px; }
.controller-eyebrow { color: #70f35f; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.controller-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; }
.controller-title h2 { color: #eef7ef; font-size: 27px; font-weight: 900; line-height: 1.08; }
.controller-name { color: #f0bc47; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.controller-subtitle { color: #b6c9b7; font-size: 12px; margin-top: 3px; }
.controller-header + .panel .scene { border-top: 0; }
@media (max-width: 560px) {
  .controller-header { flex-wrap: wrap; padding: 12px; }
  .controller-lockup { gap: 10px; }
  .controller-lockup img { width: 46px; height: 46px; }
  .controller-title h2 { font-size: 22px; }
}
h2, p { margin: 0; }
h2 { font-size: clamp(1.35rem, 5vw, 1.85rem); line-height: 1.18; overflow-wrap: anywhere; }
.brand { color: #f0c876; font-size: .72rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 5px; }
.pill { border: 1px solid var(--line); border-radius: 99px; background: #183428; padding: 5px 10px; font-size: .75rem; color: var(--accent); white-space: nowrap; }
.pill[data-online="false"] { color: #f0c876; }
.scene {
  padding: 17px clamp(15px, 4%, 24px);
  border-block: 1px solid var(--line);
  background: radial-gradient(ellipse at 20% 0%, #2b5946, transparent 76%), linear-gradient(140deg, #183d31, #102820);
}
.readings { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.readings strong { font-size: 1.1rem; overflow-wrap: anywhere; }
.countdown { color: #baf4fa; white-space: nowrap; font-variant-numeric: tabular-nums; }
progress { display: block; width: 100%; height: 6px; margin: 10px 0 16px; accent-color: #82e0df; }
.manifold { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: 11px; }
.branch { position: relative; text-align: center; border-top: 2px solid #639380; padding: 12px 3px 0; color: var(--muted); font-size: .73rem; overflow-wrap: anywhere; }
.branch::before { content: ""; position: absolute; top: 0; left: calc(50% - 1px); width: 2px; height: 9px; background: #639380; }
.branch i { display: block; width: 11px; height: 11px; border: 2px solid #639380; border-radius: 50%; margin: 0 auto 5px; background: #17382e; }
.branch.active { color: #c3fbff; }
.branch.active i { border-color: #a2f4fa; background: #a2f4fa; box-shadow: 0 0 13px #85ecfd; }
.branch.excluded { opacity: .58; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
button, input {
  min-height: 37px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #172e24;
  color: inherit;
  font: inherit;
}
button { padding: 6px 11px; cursor: pointer; font-weight: 650; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid #baf4fa; outline-offset: 2px; }
button:disabled, input:disabled { opacity: .52; cursor: default; }
.start { color: #12251a; background: var(--accent); border-color: var(--accent); }
.stop { color: #ffd5ca; background: #39231f; border-color: #805046; }
.zones { display: grid; gap: 6px; }
.zone { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 9px; border: 1px solid var(--line); border-radius: 11px; background: #12271e; }
.zone.active { border-color: #78cfd2; }
.zone p { overflow-wrap: anywhere; font-weight: 675; }
.zone small, .feedback, .settings small { color: var(--muted); }
.feedback { min-height: 0; margin-top: 9px; }
.feedback:empty { display: none; }
details { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 10px; }
summary { cursor: pointer; font-weight: 675; color: var(--accent); }
.settings { display: grid; gap: 8px; margin-top: 10px; }
.settings fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 9px; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 8px; }
.settings legend { color: var(--muted); padding-inline: 4px; }
.settings label { display: grid; gap: 3px; font-size: .78rem; min-width: 0; flex: 1 1 88px; }
.settings input { padding: 5px 8px; width: 100%; }
.settings input[type="checkbox"] { width: 19px; min-height: 19px; accent-color: var(--accent); }
.setting-text { flex-basis: 140px !important; }
.setting-check { flex: 0 1 auto !important; align-items: center; }
.settings button { align-self: end; }
