:root {
  color-scheme: light;
  --ink: #11242c;
  --muted: #697981;
  --soft: rgba(255, 255, 255, 0.74);
  --line: rgba(26, 55, 69, 0.11);
  --blue: #5aa9f6;
  --green: #7dd1bb;
  --coral: #ff9f86;
  --shadow: 0 24px 70px rgba(62, 91, 108, 0.2);
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(125, 209, 187, 0.42), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(90, 169, 246, 0.32), transparent 32%),
    linear-gradient(145deg, #f7fcff 0%, #eef7f5 46%, #fff7f3 100%);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  overflow: hidden;
}

.screen {
  min-height: 100vh;
  padding: max(22px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}

.hidden {
  display: none !important;
}

.login-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.75;
  pointer-events: none;
}

.ambient-a {
  width: 220px;
  height: 220px;
  right: -80px;
  top: 50px;
  background: rgba(90, 169, 246, 0.28);
}

.ambient-b {
  width: 190px;
  height: 190px;
  left: -80px;
  bottom: 120px;
  background: rgba(255, 159, 134, 0.24);
}

.brand-lockup {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 430px;
  margin: 0 auto;
  width: 100%;
}

.app-mark {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffffff, #dff7ff);
  box-shadow: 0 14px 34px rgba(79, 149, 184, 0.22);
}

.app-mark span {
  width: 34px;
  height: 20px;
  display: block;
  border-radius: 20px;
  background:
    radial-gradient(circle at 74% 45%, #7dd1bb 0 6px, transparent 7px),
    linear-gradient(90deg, #5aa9f6, #7dd1bb);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(34px, 12vw, 48px);
  line-height: 0.98;
  max-width: 330px;
}

.login-panel {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

input {
  width: 100%;
  border: 1px solid rgba(28, 61, 75, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  min-height: 46px;
  padding: 0 13px;
  outline: none;
}

input:focus {
  border-color: rgba(90, 169, 246, 0.9);
  box-shadow: 0 0 0 4px rgba(90, 169, 246, 0.16);
}

.primary-button {
  min-height: 50px;
  border: 0;
  border-radius: var(--radius);
  color: white;
  font-weight: 760;
  background: linear-gradient(135deg, #2489ed, #52c6aa);
  box-shadow: 0 14px 28px rgba(56, 149, 198, 0.24);
}

.primary-button:disabled {
  opacity: 0.66;
}

.form-error {
  margin: 0;
  color: #b23b36;
  font-size: 13px;
  min-height: 18px;
}

.remember-row {
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(28, 61, 75, 0.09);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.54);
}

.remember-row input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  accent-color: var(--blue);
}

.remember-row strong,
.remember-row small {
  display: block;
}

.remember-row strong {
  color: var(--ink);
  font-size: 13px;
}

.remember-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.25;
}

.security-note {
  margin: -2px 2px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.35;
}

.settings-screen {
  max-width: 720px;
  margin: 0 auto;
}

.dashboard-screen {
  width: 100%;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar h2 {
  font-size: 34px;
}

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

.menu-wrap {
  position: relative;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(54, 82, 98, 0.12);
}

.toolbar-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.25;
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: min(232px, calc(100vw - 36px));
  padding: 7px;
  border: 1px solid rgba(26, 55, 69, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(40, 65, 78, 0.2);
  backdrop-filter: blur(18px);
}

.menu-item {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 9px;
  text-align: left;
  font-size: 14px;
  font-weight: 720;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: rgba(90, 169, 246, 0.11);
  outline: none;
}

.menu-item-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #315967;
}

.settings-topbar {
  align-items: flex-start;
}

.settings-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-panel {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 16px 50px rgba(61, 89, 104, 0.13);
  backdrop-filter: blur(20px);
}

.settings-panel + .settings-panel {
  margin-top: 14px;
}

.settings-heading {
  margin-bottom: 16px;
}

.settings-heading h3 {
  font-size: 24px;
  line-height: 1.1;
}

.settings-heading p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.language-options,
.interface-options {
  display: grid;
  gap: 9px;
}

.interface-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(28, 61, 75, 0.11);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
}

.language-option {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr 28px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(28, 61, 75, 0.11);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 247, 249, 0.88));
  color: var(--ink);
  padding: 0 12px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.language-option strong,
.language-option small {
  display: block;
}

.language-option strong {
  font-size: 15px;
  font-weight: 780;
}

.language-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.language-option-check {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: transparent;
}

.language-option.is-active {
  border-color: rgba(36, 137, 237, 0.52);
  background:
    linear-gradient(180deg, #ffffff, #e2f5fd);
  color: #0e5f99;
  box-shadow: 0 10px 24px rgba(70, 147, 188, 0.16);
}

.language-option.is-active .language-option-check {
  background: rgba(36, 137, 237, 0.12);
  color: #0e5f99;
}

.interface-option {
  min-width: 0;
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 760;
}

.interface-option span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.interface-option-check {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: transparent;
}

.interface-option.is-active {
  background: #ffffff;
  color: #0e5f99;
  box-shadow: 0 8px 20px rgba(70, 147, 188, 0.15);
}

.interface-option.is-active .interface-option-check {
  background: rgba(36, 137, 237, 0.12);
  color: #0e5f99;
}

.summary-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.summary-band > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(18px);
}

.summary-band p,
.temperature-row p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.summary-band strong {
  font-size: 19px;
}

.device-list {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.device-card {
  width: 100%;
  max-width: 390px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(42, 70, 79, 0.16);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(235, 241, 243, 0.96));
  box-shadow:
    0 20px 44px rgba(46, 70, 82, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.device-card.has-device-error {
  border-color: rgba(190, 64, 44, 0.38);
}

.remote-display {
  border: 1px solid rgba(29, 63, 68, 0.17);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(145deg, rgba(227, 239, 237, 0.96), rgba(198, 216, 213, 0.96));
  box-shadow:
    inset 0 2px 9px rgba(41, 70, 75, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.82);
}

.remote-display-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.device-status {
  margin: 0 0 5px;
  color: #4d6468;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.device-name {
  max-width: 210px;
  overflow-wrap: anywhere;
  color: #172f33;
  font-size: 20px;
  line-height: 1.08;
}

.device-alert {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(190, 64, 44, 0.25);
  border-radius: 6px;
  background: rgba(255, 241, 235, 0.84);
  color: #7e3021;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.device-alert-icon {
  display: grid;
  place-items: center;
  color: #b9432e;
}

.alert-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.35;
}

.device-alert-text {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.25;
}

.power-toggle {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(139, 43, 43, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(180deg, #ffffff, #f3f6f7);
  color: #8e3434;
  box-shadow:
    0 8px 16px rgba(47, 68, 77, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.power-toggle.is-on {
  border-color: rgba(199, 49, 47, 0.34);
  background:
    linear-gradient(180deg, #fff7f6, #f2dfdd);
  color: #bf2d2b;
  box-shadow:
    0 10px 18px rgba(191, 45, 43, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.power-toggle:active {
  transform: scale(0.96);
}

.power-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.45;
}

.temperature-row {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 8px;
  margin: 12px 0 0;
}

.temperature-row > div {
  min-width: 0;
  min-height: 78px;
  display: grid;
  align-content: center;
  padding: 11px;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(248, 253, 251, 0.72), rgba(211, 228, 225, 0.62));
  border: 1px solid rgba(31, 66, 70, 0.11);
  box-shadow: inset 0 1px 5px rgba(31, 66, 70, 0.08);
}

.temperature-row strong {
  font-family: ui-monospace, "SF Mono", "Roboto Mono", monospace;
  font-size: clamp(28px, 9vw, 40px);
  letter-spacing: 0;
  line-height: 1;
}

.target-cell strong {
  font-size: clamp(34px, 11vw, 48px);
}

.remote-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.remote-status-grid > div {
  min-width: 0;
  min-height: 42px;
  padding: 7px;
  border: 1px solid rgba(31, 66, 70, 0.1);
  border-radius: 6px;
  background: rgba(247, 252, 250, 0.58);
}

.remote-status-grid span {
  display: block;
  margin-bottom: 3px;
  color: #607579;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.remote-status-grid strong {
  display: block;
  overflow: hidden;
  color: #1d3d42;
  font-size: 11px;
  font-weight: 780;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.temp-stepper {
  display: grid;
  grid-template-areas:
    "up set"
    "down set";
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: 64px 64px;
  gap: 8px 10px;
  align-items: stretch;
  padding: 2px;
}

.temp-stepper button {
  min-height: 0;
  border: 1px solid rgba(42, 70, 79, 0.14);
  border-radius: 999px;
  background:
    linear-gradient(180deg, #ffffff, #e9eef0);
  color: #1f4650;
  font-size: 34px;
  font-weight: 820;
  box-shadow:
    0 9px 18px rgba(50, 72, 82, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.temp-stepper button:active {
  transform: scale(0.97);
}

.temp-up {
  grid-area: up;
}

.temp-down {
  grid-area: down;
}

.temp-input-frame {
  grid-area: set;
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(31, 66, 70, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(230, 238, 240, 0.88));
  box-shadow: inset 0 1px 8px rgba(46, 70, 82, 0.09);
}

.temp-input-frame span {
  color: #607579;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.temp-input {
  max-width: 148px;
  min-height: 60px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: #15353c;
  font-family: ui-monospace, "SF Mono", "Roboto Mono", monospace;
  font-size: 44px;
  text-align: center;
  font-weight: 820;
  line-height: 1;
}

.temp-input::-webkit-inner-spin-button,
.temp-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.temp-input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(90, 169, 246, 0.13);
}

.night-panel {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(42, 70, 79, 0.11);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(249, 252, 253, 0.94), rgba(233, 242, 245, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.night-panel-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  align-items: center;
  gap: 10px;
}

.night-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.night-kicker,
.night-options label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.night-status {
  overflow: hidden;
  color: #173b45;
  font-size: 16px;
  font-weight: 820;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.night-detail {
  min-height: 30px;
  color: #5f747c;
  font-size: 12px;
  font-weight: 620;
  line-height: 1.25;
}

.night-toggle {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(28, 61, 75, 0.13);
  border-radius: 999px;
  background:
    linear-gradient(180deg, #ffffff, #edf3f5);
  color: #254f67;
  box-shadow:
    0 8px 16px rgba(48, 70, 80, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.night-toggle.is-active {
  border-color: rgba(54, 106, 151, 0.38);
  background:
    linear-gradient(180deg, #ffffff, #dcecf5);
  color: #124f7d;
  box-shadow: 0 10px 22px rgba(70, 147, 188, 0.16);
}

.night-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.25;
}

.night-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.night-options label {
  min-width: 0;
  gap: 5px;
}

.night-options select {
  width: 100%;
  min-height: 42px;
  min-width: 0;
  border: 1px solid rgba(28, 61, 75, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff, #eef3f5);
  color: #1f4650;
  padding: 0 8px;
  outline: none;
  font-size: 13px;
  font-weight: 740;
}

.night-options select:focus {
  border-color: rgba(90, 169, 246, 0.9);
  box-shadow: 0 0 0 3px rgba(90, 169, 246, 0.14);
}

.night-options select:disabled {
  color: #71838a;
  opacity: 0.72;
}

.remote-controls {
  display: grid;
  gap: 10px;
}

.control-block {
  padding: 10px;
  border: 1px solid rgba(42, 70, 79, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(250, 252, 253, 0.92), rgba(239, 244, 246, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.hidden-control {
  display: none !important;
}

.control-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.control-heading span,
.vane-group > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.icon-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  gap: 7px;
}

.mode-options,
.fan-options {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 5px;
}

.mode-button,
.fan-button,
.vane-button {
  min-width: 0;
  border: 1px solid rgba(28, 61, 75, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff, #eef3f5);
  color: #244b5b;
  display: grid;
  place-items: center;
  gap: 5px;
  box-shadow:
    0 6px 12px rgba(48, 70, 80, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.mode-button:active,
.fan-button:active,
.vane-button:active {
  transform: scale(0.98);
}

.mode-button.is-active,
.fan-button.is-active,
.vane-button.is-active {
  background:
    linear-gradient(180deg, #ffffff, #dff3fc);
  border-color: rgba(36, 137, 237, 0.54);
  box-shadow: 0 10px 24px rgba(70, 147, 188, 0.16);
  color: #0e5f99;
}

.button-caption {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-align: center;
}

.mode-options .button-caption,
.fan-options .button-caption {
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mode-button {
  min-height: 62px;
  padding: 6px 2px;
}

.icon-shell {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.mode-options .icon-shell,
.fan-options .icon-shell {
  width: 32px;
  height: 32px;
}

.standard-icon {
  display: block;
  stroke-width: 2.15;
  vector-effect: non-scaling-stroke;
}

.mode-cool .mode-icon {
  color: #1877d4;
}

.mode-heat .mode-icon {
  color: #d66a3d;
}

.mode-dry .mode-icon {
  color: #49747f;
}

.mode-fan-only .mode-icon {
  color: #2e8f75;
}

.fan-button {
  min-height: 60px;
  padding: 6px 1px;
}

.fan-icon {
  stroke-width: 2.1;
}

.fan-level-0 {
  color: #5e7c86;
}

.fan-level-1 {
  color: #77a7bb;
}

.fan-level-2 {
  color: #5b9fc2;
}

.fan-level-3 {
  color: #3f92ce;
}

.fan-level-4,
.fan-level-5 {
  color: #227fca;
}

.vane-grid {
  display: grid;
  gap: 10px;
}

.vane-group {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.vane-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  gap: 6px;
}

.vane-button {
  min-height: 60px;
  padding: 6px 3px;
}

.vane-pictogram {
  position: relative;
  width: 40px;
  height: 38px;
  display: block;
  color: #2d6f85;
}

.vane-unit {
  position: absolute;
  top: 6px;
  left: 5px;
  right: 5px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.58);
}

.vane-vent {
  position: absolute;
  top: 12px;
  left: 11px;
  right: 11px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.58;
}

.vane-slat {
  position: absolute;
  left: 10px;
  top: 24px;
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(var(--vane-angle, 0deg));
  transform-origin: center;
}

.vane-pictogram-horizontal .vane-slat {
  width: 18px;
}

.vane-slat-swing {
  opacity: 0.34;
}

.vane-slat-swing:nth-of-type(4) {
  opacity: 0.88;
}

.vane-slat-split {
  width: 17px;
  opacity: 0.82;
}

.vane-slat-split:nth-of-type(3) {
  left: 6px;
}

.vane-slat-split:nth-of-type(4) {
  left: 17px;
}

.vane-auto-label {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  color: currentColor;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
}

.empty-state {
  padding: 22px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

.empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 10;
  max-width: 420px;
  margin: 0 auto;
  padding: 13px 14px;
  border-radius: var(--radius);
  background: rgba(16, 35, 43, 0.9);
  color: white;
  box-shadow: 0 18px 42px rgba(16, 35, 43, 0.25);
  backdrop-filter: blur(16px);
}

@media (min-width: 700px) {
  .login-screen {
    align-items: center;
  }

  .brand-lockup,
  .login-panel {
    margin-left: 0;
    margin-right: 0;
  }

  .device-list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
    justify-content: center;
  }
}

@media (min-width: 980px) {
  .dashboard-screen {
    padding-left: clamp(24px, 3vw, 48px);
    padding-right: clamp(24px, 3vw, 48px);
  }

  .device-list {
    gap: 18px;
  }
}

.compact-display {
  display: none;
}

.compact-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: start;
  gap: 8px;
}

.compact-heading {
  min-width: 0;
}

.compact-status {
  margin: 0 0 4px;
  overflow: hidden;
  color: #597078;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.compact-name {
  overflow-wrap: anywhere;
  color: #17343b;
  font-size: 17px;
  line-height: 1.08;
}

.compact-device-alert {
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 6px;
  margin-top: 0;
  padding: 7px 8px;
}

.compact-device-alert .device-alert-text {
  font-size: 11px;
  line-height: 1.2;
}

.compact-power-toggle {
  width: 38px;
  height: 38px;
}

.compact-power-toggle .power-icon {
  width: 18px;
  height: 18px;
}

.compact-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.compact-metrics > div {
  min-width: 0;
  min-height: 52px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid rgba(31, 66, 70, 0.1);
  border-radius: 6px;
  background: rgba(247, 252, 250, 0.68);
}

.compact-metrics span {
  overflow: hidden;
  color: #607579;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.compact-metrics strong {
  overflow: hidden;
  color: #15353c;
  font-family: ui-monospace, "SF Mono", "Roboto Mono", monospace;
  font-size: 25px;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-controls {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 6px;
  align-items: center;
}

.compact-controls button {
  min-width: 0;
  min-height: 38px;
  border: 1px solid rgba(42, 70, 79, 0.14);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #e9eef0);
  color: #1f4650;
  font-size: 22px;
  font-weight: 820;
  line-height: 1;
  box-shadow:
    0 7px 14px rgba(50, 72, 82, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.compact-temp-input {
  min-width: 0;
  min-height: 38px;
  padding: 0 4px;
  border: 1px solid rgba(31, 66, 70, 0.11);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  color: #15353c;
  font-family: ui-monospace, "SF Mono", "Roboto Mono", monospace;
  font-size: 24px;
  font-weight: 820;
  line-height: 1;
  text-align: center;
}

.compact-temp-input::-webkit-inner-spin-button,
.compact-temp-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.compact-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.compact-meta span {
  min-width: 0;
  min-height: 28px;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 0 7px;
  border: 1px solid rgba(31, 66, 70, 0.09);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.52);
  color: #345b65;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-screen[data-interface-mode="compact"] .summary-band {
  margin-bottom: 10px;
}

.dashboard-screen[data-interface-mode="compact"] .device-list {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  justify-items: stretch;
  gap: 10px;
}

.dashboard-screen[data-interface-mode="compact"] .device-card {
  max-width: none;
  gap: 0;
  padding: 8px;
  box-shadow:
    0 12px 28px rgba(46, 70, 82, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.dashboard-screen[data-interface-mode="compact"] .remote-display,
.dashboard-screen[data-interface-mode="compact"] .temp-stepper,
.dashboard-screen[data-interface-mode="compact"] .night-panel,
.dashboard-screen[data-interface-mode="compact"] .remote-controls {
  display: none;
}

.dashboard-screen[data-interface-mode="compact"] .compact-display {
  display: grid;
  gap: 8px;
}

@media (min-width: 700px) {
  .dashboard-screen[data-interface-mode="compact"] .device-list {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  }
}

@media (min-width: 1180px) {
  .dashboard-screen[data-interface-mode="compact"] .device-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}
