:root {
  --ios-frost: #f4f7fc;
  --ios-glass: rgba(255, 255, 255, 0.62);
  --ios-glass-strong: rgba(255, 255, 255, 0.82);
  --ios-ink: #10233d;
  --ios-muted: #667085;
  --ios-blue: #0a84ff;
  --ios-blue-soft: rgba(10, 132, 255, 0.12);
  --ios-green: #30d158;
  --ios-red: #ff453a;
  --ios-yellow: #ffd60a;
  --ios-purple: #7d6bf2;
  --ios-line: rgba(255, 255, 255, 0.78);
  --ios-hairline: rgba(16, 35, 61, 0.1);
  --ios-shadow: 0 24px 70px rgba(42, 63, 95, 0.12);
  --ios-shadow-small: 0 12px 32px rgba(42, 63, 95, 0.09);
  --ios-radius-xl: 40px;
  --ios-radius-lg: 32px;
  --ios-radius-md: 24px;
  --ios-radius-sm: 18px;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
  --font-data: SFMono-Regular, Menlo, Monaco, monospace;
}

html {
  background: var(--ios-frost);
  color-scheme: light;
  scroll-behavior: smooth;
}

body.ios-glass-theme {
  min-height: 100vh;
  color: var(--ios-ink);
  background:
    radial-gradient(circle at 10% -8%, rgba(10, 132, 255, 0.22), transparent 34rem),
    radial-gradient(circle at 94% 16%, rgba(125, 107, 242, 0.18), transparent 32rem),
    linear-gradient(155deg, #f9fbff 0%, var(--ios-frost) 50%, #eef3fb 100%);
  background-attachment: fixed;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body.ios-glass-theme::before,
body.ios-glass-theme::after {
  position: fixed;
  z-index: -1;
  content: "";
  border-radius: 999px;
  filter: blur(18px);
  pointer-events: none;
}

body.ios-glass-theme::before {
  top: 18vh;
  left: -10rem;
  width: 25rem;
  height: 25rem;
  background: rgba(63, 190, 255, 0.12);
}

body.ios-glass-theme::after {
  right: -8rem;
  bottom: 6vh;
  width: 21rem;
  height: 21rem;
  background: rgba(139, 92, 246, 0.1);
}

.ios-glass-theme .page-atmosphere {
  display: none;
}

.ios-glass-theme h1,
.ios-glass-theme h2,
.ios-glass-theme h3,
.ios-glass-theme strong {
  color: var(--ios-ink);
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}

.ios-glass-theme p,
.ios-glass-theme small,
.ios-glass-theme span {
  text-wrap: pretty;
}

.ios-glass-theme .masthead,
.ios-glass-theme main,
.ios-glass-theme footer {
  width: min(1380px, calc(100% - 56px));
}

.ios-glass-theme .masthead {
  grid-template-columns: minmax(250px, 0.7fr) minmax(560px, 1.3fr);
  gap: 28px;
  align-items: center;
  padding: 34px 0 22px;
}

.ios-glass-theme .brand-block {
  gap: 15px;
}

.ios-glass-theme .season-seal {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 19px;
  color: #fff;
  background: linear-gradient(145deg, #43a5ff, #0875e3 68%, #5556df);
  box-shadow: 0 14px 28px rgba(10, 132, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 720;
  line-height: 1;
  transform: none;
}

.ios-glass-theme .eyebrow,
.ios-glass-theme .section-kicker,
.ios-glass-theme .primary-overline {
  margin-bottom: 6px;
  color: var(--ios-blue);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ios-glass-theme h1 {
  margin: 0 0 3px;
  font-size: clamp(29px, 3vw, 43px);
  font-weight: 720;
  letter-spacing: -0.045em;
}

.ios-glass-theme .brand-note {
  color: var(--ios-muted);
  font-size: 13px;
}

.ios-glass-theme .connection-bar,
.ios-glass-theme .panel,
.ios-glass-theme .primary-tabs {
  border: 1px solid var(--ios-line);
  background: var(--ios-glass);
  box-shadow: var(--ios-shadow-small);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
}

.ios-glass-theme .connection-bar {
  min-height: 72px;
  padding: 12px 14px 12px 18px;
  border-radius: 26px;
}

.ios-glass-theme .status-cluster {
  gap: 7px;
}

.ios-glass-theme .status-pill {
  min-height: 32px;
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  color: var(--ios-muted);
  background: rgba(118, 118, 128, 0.1);
  font-size: 12px;
  font-weight: 650;
}

.ios-glass-theme .status-pill[data-state="online"],
.ios-glass-theme .status-pill[data-state="ready"],
.ios-glass-theme .status-pill[data-state="real"] {
  color: #137b31;
  background: rgba(48, 209, 88, 0.14);
}

.ios-glass-theme .status-pill[data-state="error"],
.ios-glass-theme .status-pill[data-state="offline"] {
  color: #b72b25;
  background: rgba(255, 69, 58, 0.12);
}

.ios-glass-theme .frame-time {
  color: var(--ios-muted);
  font-family: var(--font-data);
  font-size: 11px;
}

.ios-glass-theme .button,
.ios-glass-theme button,
.ios-glass-theme select,
.ios-glass-theme input {
  border-radius: 14px;
}

.ios-glass-theme .button,
.ios-glass-theme button {
  min-height: 42px;
  border: 1px solid rgba(16, 35, 61, 0.08);
  color: var(--ios-ink);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 5px 16px rgba(42, 63, 95, 0.06);
  font-weight: 650;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, opacity 160ms ease;
}

.ios-glass-theme .button:hover:not(:disabled),
.ios-glass-theme button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(42, 63, 95, 0.11);
}

.ios-glass-theme .button:active:not(:disabled),
.ios-glass-theme button:active:not(:disabled) {
  transform: scale(0.985);
}

.ios-glass-theme .button-primary,
.ios-glass-theme button[aria-pressed="true"] {
  border-color: transparent;
  color: #fff;
  background: var(--ios-blue);
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.24);
}

.ios-glass-theme .button-primary:disabled,
.ios-glass-theme button[aria-pressed="true"]:disabled {
  color: #fff;
  background: var(--ios-blue);
  opacity: 0.82;
}

.ios-glass-theme button:focus-visible,
.ios-glass-theme a:focus-visible,
.ios-glass-theme input:focus-visible,
.ios-glass-theme select:focus-visible {
  outline: 4px solid rgba(10, 132, 255, 0.22);
  outline-offset: 2px;
}

.ios-glass-theme .primary-tabs {
  top: 12px;
  z-index: 30;
  gap: 4px;
  margin-bottom: 22px;
  padding: 6px;
  border-radius: 22px;
}

.ios-glass-theme .primary-tabs button {
  min-height: 43px;
  border: 0;
  border-radius: 16px;
  color: var(--ios-muted);
  background: transparent;
  box-shadow: none;
}

.ios-glass-theme .primary-tabs button.is-active {
  color: var(--ios-ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(42, 63, 95, 0.09);
}

.ios-glass-theme .panel {
  border-radius: var(--ios-radius-lg);
}

.ios-glass-theme .primary-task-board .panel {
  border: 1px solid var(--ios-line);
  background: var(--ios-glass);
  box-shadow: var(--ios-shadow-small);
}

.ios-glass-theme .primary-hero {
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: clamp(26px, 5vw, 72px);
  min-height: 360px;
  padding: clamp(30px, 5vw, 68px);
  border-radius: var(--ios-radius-xl);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.83), rgba(255, 255, 255, 0.48)),
    radial-gradient(circle at 84% 18%, rgba(10, 132, 255, 0.12), transparent 21rem);
  box-shadow: var(--ios-shadow);
}

.ios-glass-theme .primary-hero::before {
  display: none;
}

.ios-glass-theme .primary-hero-copy {
  align-self: center;
}

.ios-glass-theme .primary-hero h2 {
  max-width: 760px;
  color: var(--ios-ink);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.6vw, 5.25rem);
  font-weight: 760;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.ios-glass-theme .primary-hero-copy > p:not(.primary-overline) {
  max-width: 610px;
  margin-top: 22px;
  color: var(--ios-muted);
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
  line-height: 1.65;
}

.ios-glass-theme .primary-task-state {
  width: min(100%, 282px);
  aspect-ratio: 1;
  min-height: 0;
  margin: auto;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 50%;
  color: var(--ios-ink);
  background: rgba(226, 232, 240, 0.7);
  box-shadow: 0 26px 62px rgba(70, 89, 119, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
}

.ios-glass-theme .primary-task-state[data-color="green"] {
  background: radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.9), rgba(48, 209, 88, 0.4) 58%, rgba(48, 209, 88, 0.65));
}

.ios-glass-theme .primary-task-state[data-color="red"] {
  background: radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.9), rgba(255, 69, 58, 0.38) 58%, rgba(255, 69, 58, 0.62));
}

.ios-glass-theme .primary-task-state[data-color="yellow"] {
  background: radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.92), rgba(255, 214, 10, 0.42) 58%, rgba(255, 214, 10, 0.67));
}

.ios-glass-theme .primary-task-state[data-color="blue"] {
  background: radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.9), rgba(10, 132, 255, 0.38) 58%, rgba(10, 132, 255, 0.62));
}

.ios-glass-theme .primary-task-state[data-state="safety"] {
  background: radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.9), rgba(255, 69, 58, 0.42) 58%, rgba(255, 69, 58, 0.72));
}

.ios-glass-theme .primary-state-orbit {
  inset: 13px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  animation: none;
}

.ios-glass-theme .primary-task-state strong {
  margin: 8px 0 5px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.ios-glass-theme .primary-task-state small,
.ios-glass-theme .primary-task-state p {
  color: rgba(16, 35, 61, 0.66);
}

.ios-glass-theme .primary-step-line {
  margin: 18px 0;
  padding: 10px 18px;
  border: 0;
  border-radius: 18px;
  color: var(--ios-muted);
  background: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.ios-glass-theme .primary-step-line b {
  color: var(--ios-blue);
  background: var(--ios-blue-soft);
}

.ios-glass-theme .primary-step-line i {
  background: rgba(10, 132, 255, 0.18);
}

.ios-glass-theme .primary-sensor-grid,
.ios-glass-theme .primary-result-grid,
.ios-glass-theme .color-card-rail,
.ios-glass-theme .threshold-grid,
.ios-glass-theme .actuator-test-grid {
  gap: 16px;
}

.ios-glass-theme .primary-sensor-card,
.ios-glass-theme .primary-result-card,
.ios-glass-theme .primary-card-lab,
.ios-glass-theme .primary-proof-note {
  border-radius: 30px;
}

.ios-glass-theme .primary-sensor-card {
  min-height: 250px;
  padding: 24px;
}

.ios-glass-theme .primary-sensor-card header {
  align-items: center;
}

.ios-glass-theme .sensor-avatar {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 15px;
  color: var(--ios-blue);
  background: var(--ios-blue-soft);
}

.ios-glass-theme .sensor-color .sensor-avatar {
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.55);
}

.ios-glass-theme .sensor-number strong {
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 5vw, 4.2rem);
  font-weight: 730;
}

.ios-glass-theme .primary-sensor-card p,
.ios-glass-theme .primary-sensor-card footer,
.ios-glass-theme .primary-result-card p,
.ios-glass-theme .color-command-card p {
  color: var(--ios-muted);
}

.ios-glass-theme .primary-card-lab {
  margin-top: 16px;
  padding: 26px;
}

.ios-glass-theme .color-command-card {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--ios-hairline);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

.ios-glass-theme .color-command-card::before {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.ios-glass-theme .card-green { box-shadow: inset 0 3px 0 var(--ios-green); }
.ios-glass-theme .card-red { box-shadow: inset 0 3px 0 var(--ios-red); }
.ios-glass-theme .card-yellow { box-shadow: inset 0 3px 0 var(--ios-yellow); }
.ios-glass-theme .card-blue { box-shadow: inset 0 3px 0 var(--ios-blue); }

.ios-glass-theme .primary-result-grid {
  margin-top: 16px;
}

.ios-glass-theme .primary-result-card {
  min-height: 132px;
  padding: 22px;
}

.ios-glass-theme .primary-proof-note {
  margin-top: 16px;
  padding: 18px 22px;
  color: var(--ios-muted);
  background: rgba(255, 255, 255, 0.44);
}

.ios-glass-theme .alert-notice,
.ios-glass-theme .adaptive-overview-main,
.ios-glass-theme .adaptive-control-hub,
.ios-glass-theme .house-card,
.ios-glass-theme .season-card,
.ios-glass-theme .data-panel,
.ios-glass-theme .dynamic-panel,
.ios-glass-theme .control-panel,
.ios-glass-theme .device-panel,
.ios-glass-theme .threshold-panel,
.ios-glass-theme .history-panel,
.ios-glass-theme .actuator-test-panel,
.ios-glass-theme .voice-panel,
.ios-glass-theme .log-panel {
  border-radius: var(--ios-radius-lg);
  background: var(--ios-glass);
  box-shadow: var(--ios-shadow-small);
}

.ios-glass-theme .alert-notice {
  padding: 24px;
  border-left: 1px solid var(--ios-line);
}

.ios-glass-theme .alert-notice.is-alert,
.ios-glass-theme .alert-notice[data-state="alert"] {
  border-color: rgba(255, 69, 58, 0.25);
  background: rgba(255, 241, 240, 0.76);
}

.ios-glass-theme .alert-symbol {
  border-radius: 18px;
  color: var(--ios-blue);
  background: var(--ios-blue-soft);
}

.ios-glass-theme .adaptive-overview,
.ios-glass-theme .hero-grid,
.ios-glass-theme .operation-grid {
  gap: 18px;
}

.ios-glass-theme .adaptive-metric-grid article,
.ios-glass-theme .metric,
.ios-glass-theme .room,
.ios-glass-theme .strategy-row,
.ios-glass-theme .device-row,
.ios-glass-theme .dynamic-slot-card,
.ios-glass-theme .threshold-card,
.ios-glass-theme .actuator-test-card,
.ios-glass-theme .voice-guide details {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--ios-radius-md);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 8px 24px rgba(42, 63, 95, 0.05);
}

.ios-glass-theme .adaptive-metric-grid article {
  padding: 18px;
}

.ios-glass-theme .adaptive-metric-grid strong,
.ios-glass-theme .metric strong {
  font-family: var(--font-data);
  letter-spacing: -0.04em;
}

.ios-glass-theme .adaptive-scene-actions,
.ios-glass-theme .segmented-control,
.ios-glass-theme .device-strategy-actions {
  gap: 4px;
  padding: 4px;
  border-radius: 18px;
  background: rgba(118, 118, 128, 0.1);
}

.ios-glass-theme .adaptive-scene-actions button,
.ios-glass-theme .segmented-control button,
.ios-glass-theme .device-strategy-actions button {
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
}

.ios-glass-theme .adaptive-scene-actions button[aria-pressed="true"],
.ios-glass-theme .segmented-control button[aria-pressed="true"],
.ios-glass-theme .device-strategy-actions button[aria-pressed="true"] {
  color: var(--ios-ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 5px 16px rgba(42, 63, 95, 0.1);
}

.ios-glass-theme .house-shell {
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background: rgba(245, 248, 253, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.ios-glass-theme .room {
  border-color: rgba(16, 35, 61, 0.08);
  background: rgba(255, 255, 255, 0.66);
}

.ios-glass-theme .room.is-mode-active {
  border-color: rgba(10, 132, 255, 0.32);
  background: rgba(10, 132, 255, 0.09);
}

.ios-glass-theme .room.is-alert {
  border-color: rgba(255, 69, 58, 0.5);
  background: rgba(255, 69, 58, 0.1);
}

.ios-glass-theme .season-card {
  color: var(--ios-ink);
  background: linear-gradient(145deg, rgba(24, 48, 82, 0.94), rgba(44, 73, 112, 0.9));
}

.ios-glass-theme .season-card h2,
.ios-glass-theme .season-card strong {
  color: #fff;
}

.ios-glass-theme .season-card p,
.ios-glass-theme .season-card small {
  color: rgba(255, 255, 255, 0.7);
}

.ios-glass-theme select,
.ios-glass-theme input[type="text"],
.ios-glass-theme input[type="number"] {
  min-height: 44px;
  border: 1px solid rgba(16, 35, 61, 0.11);
  color: var(--ios-ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ios-glass-theme input[type="range"] {
  accent-color: var(--ios-blue);
}

.ios-glass-theme .threshold-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ios-glass-theme .threshold-card,
.ios-glass-theme .actuator-test-card {
  padding: 22px;
}

.ios-glass-theme .threshold-card-retired {
  opacity: 0.56;
}

.ios-glass-theme .device-strategy-bar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.48);
}

.ios-glass-theme .device-strategy-bar p {
  margin: 4px 0 0;
  color: var(--ios-muted);
  font-size: 13px;
}

.ios-glass-theme .device-strategy-actions {
  display: flex;
  flex: 0 0 auto;
}

.ios-glass-theme .actuator-test-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ios-glass-theme [data-actuator-card="relay"] { order: 1; }
.ios-glass-theme [data-actuator-card="buzzer"] { order: 2; }
.ios-glass-theme [data-actuator-card="rgb"] { order: 3; }
.ios-glass-theme [data-actuator-card="fan"] { order: 4; }
.ios-glass-theme [data-actuator-card="curtain"] { order: 5; }

.ios-glass-theme .actuator-test-card[data-control="manual"] {
  border-color: rgba(10, 132, 255, 0.3);
  background: rgba(240, 248, 255, 0.72);
}

.ios-glass-theme .actuator-actions {
  gap: 7px;
}

.ios-glass-theme .actuator-actions button {
  min-height: 38px;
  padding-inline: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: none;
}

.ios-glass-theme .actuator-test-footer {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(118, 118, 128, 0.08);
}

.ios-glass-theme .voice-panel {
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 8%, rgba(125, 107, 242, 0.18), transparent 22rem),
    var(--ios-glass);
}

.ios-glass-theme .voice-panel::after {
  display: none;
}

.ios-glass-theme .voice-orb {
  border-radius: 50%;
  background: linear-gradient(145deg, #49a8ff, #7d6bf2);
  box-shadow: 0 18px 44px rgba(72, 96, 214, 0.25);
}

.ios-glass-theme .history-chart-shell,
.ios-glass-theme .telemetry-output,
.ios-glass-theme .run-log {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.44);
}

.ios-glass-theme .run-log {
  font-family: var(--font-data);
}

.ios-glass-theme footer {
  color: var(--ios-muted);
}

@supports not (backdrop-filter: blur(1px)) {
  .ios-glass-theme .connection-bar,
  .ios-glass-theme .panel,
  .ios-glass-theme .primary-tabs,
  .ios-glass-theme .primary-task-state {
    background: rgba(255, 255, 255, 0.96);
  }
}

@media (max-width: 1080px) {
  .ios-glass-theme .masthead {
    grid-template-columns: 1fr;
  }

  .ios-glass-theme .primary-hero {
    grid-template-columns: 1fr minmax(230px, 0.56fr);
  }

  .ios-glass-theme .actuator-test-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ios-glass-theme .masthead,
  .ios-glass-theme main,
  .ios-glass-theme footer {
    width: min(100% - 28px, 1380px);
  }

  .ios-glass-theme .masthead {
    padding-top: 20px;
  }

  .ios-glass-theme .connection-bar,
  .ios-glass-theme .device-strategy-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .ios-glass-theme .connection-actions,
  .ios-glass-theme .device-strategy-actions {
    width: 100%;
  }

  .ios-glass-theme .connection-actions > *,
  .ios-glass-theme .device-strategy-actions > * {
    flex: 1 1 0;
  }

  .ios-glass-theme .primary-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ios-glass-theme .primary-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    text-align: center;
  }

  .ios-glass-theme .primary-hero-copy > p:not(.primary-overline) {
    margin-inline: auto;
  }

  .ios-glass-theme .primary-hero-actions {
    justify-content: center;
  }

  .ios-glass-theme .primary-task-state {
    width: 240px;
  }

  .ios-glass-theme .primary-step-line {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ios-glass-theme .primary-step-line i {
    display: none;
  }

  .ios-glass-theme .threshold-grid,
  .ios-glass-theme .actuator-test-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .ios-glass-theme .masthead,
  .ios-glass-theme main,
  .ios-glass-theme footer {
    width: min(100% - 20px, 1380px);
  }

  .ios-glass-theme .brand-block {
    align-items: center;
  }

  .ios-glass-theme .season-seal {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .ios-glass-theme h1 {
    font-size: 30px;
  }

  .ios-glass-theme .connection-bar {
    padding: 12px;
    border-radius: 22px;
  }

  .ios-glass-theme .status-cluster {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ios-glass-theme .status-pill {
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ios-glass-theme .frame-time {
    grid-column: 1 / -1;
    text-align: center;
  }

  .ios-glass-theme .connection-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ios-glass-theme .button-studio {
    display: none;
  }

  .ios-glass-theme .primary-tabs {
    top: 6px;
    margin-bottom: 12px;
    padding: 4px;
    border-radius: 18px;
  }

  .ios-glass-theme .primary-tabs button {
    min-height: 38px;
    padding: 7px 5px;
    border-radius: 13px;
    font-size: 13px;
  }

  .ios-glass-theme .primary-hero {
    padding: 28px 20px;
    border-radius: 34px;
  }

  .ios-glass-theme .primary-hero h2 {
    font-size: clamp(2.35rem, 13vw, 3.6rem);
  }

  .ios-glass-theme .primary-task-state {
    width: min(220px, 78vw);
  }

  .ios-glass-theme .primary-step-line {
    gap: 4px;
    padding: 8px 6px;
    font-size: 10px;
  }

  .ios-glass-theme .primary-step-line span {
    justify-content: center;
    white-space: normal;
  }

  .ios-glass-theme .primary-step-line b {
    display: none;
  }

  .ios-glass-theme .primary-sensor-card,
  .ios-glass-theme .primary-card-lab,
  .ios-glass-theme .primary-result-card,
  .ios-glass-theme .threshold-card,
  .ios-glass-theme .actuator-test-card {
    padding: 19px;
    border-radius: 24px;
  }

  .ios-glass-theme .device-strategy-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  .ios-glass-theme .primary-hero h2 {
    font-size: 2.55rem;
  }

  .ios-glass-theme .sensor-number strong {
    font-size: 3rem;
  }

  .ios-glass-theme .color-card-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ios-glass-theme *,
  .ios-glass-theme *::before,
  .ios-glass-theme *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
