/* 智能小屋：iOS 冰蓝毛玻璃紧凑主题。
 * 只覆盖视觉，不改变任何脚本依赖的 DOM、状态属性或交互合同。
 */

:root {
  --moon: #f2f6fc;
  --paper: rgba(255, 255, 255, 0.82);
  --ink: #1d1d1f;
  --ink-soft: #667085;
  --celadon: #30a46c;
  --celadon-pale: #e7f6ee;
  --sunlight: #ff9f0a;
  --sunlight-pale: #fff3dc;
  --wire: #0a84ff;
  --wire-pale: #e9f3ff;
  --danger: #ff453a;
  --danger-pale: #ffe8e6;
  --line: rgba(124, 145, 170, 0.22);
  --line-strong: rgba(93, 116, 145, 0.36);
  --shadow: 0 16px 48px rgba(54, 78, 110, 0.1);
  --radius: 18px;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-data: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --ios-glass: rgba(255, 255, 255, 0.62);
  --ios-glass-strong: rgba(255, 255, 255, 0.78);
  --ios-glass-soft: rgba(246, 250, 255, 0.58);
  --ios-blue: #0a84ff;
  --ios-indigo: #5e5ce6;
}

html {
  background: #eaf1fb;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 2%, rgba(10, 132, 255, 0.18), transparent 31rem),
    radial-gradient(circle at 94% 13%, rgba(94, 92, 230, 0.14), transparent 28rem),
    linear-gradient(180deg, #f4f8fe 0%, #edf3fb 55%, #f6f8fc 100%);
  background-attachment: fixed;
  background-size: auto;
  font-family: var(--font-body);
  line-height: 1.42;
}

.page-atmosphere::before,
.page-atmosphere::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  filter: blur(28px);
  opacity: 0.72;
}

.page-atmosphere::before {
  top: 11rem;
  left: -10rem;
  width: 26rem;
  height: 26rem;
  background: rgba(87, 188, 255, 0.14);
}

.page-atmosphere::after {
  right: -9rem;
  bottom: 16rem;
  width: 24rem;
  height: 24rem;
  background: rgba(123, 97, 255, 0.1);
}

.season-orbit {
  display: none;
}

.masthead,
main,
footer {
  width: min(1440px, calc(100% - 32px));
}

.masthead {
  grid-template-columns: minmax(260px, 0.72fr) minmax(620px, 1.28fr);
  gap: 16px;
  padding: 20px 0 12px;
}

.brand-block {
  gap: 12px;
}

.season-seal {
  flex-basis: 54px;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 17px;
  color: var(--ios-blue);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 30px rgba(10, 132, 255, 0.13), inset 0 0 0 1px rgba(10, 132, 255, 0.08);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.25;
  transform: none;
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.eyebrow,
.section-kicker {
  margin-bottom: 3px;
  color: var(--ios-blue);
  font-size: 10px;
  letter-spacing: 0.12em;
}

h1 {
  margin-bottom: 2px;
  font-family: var(--font-display);
  font-size: clamp(28px, 2.65vw, 40px);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

h1 span {
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.42em;
  font-weight: 620;
  letter-spacing: 0.02em;
}

.brand-note {
  color: var(--ink-soft);
  font-size: 12px;
}

.connection-bar {
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 12px 36px rgba(42, 70, 105, 0.1), inset 0 0 0 1px rgba(112, 139, 170, 0.08);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.status-cluster,
.connection-actions,
.plain-actions,
.segmented-control,
.select-action {
  gap: 6px;
}

.status-pill {
  min-height: 28px;
  padding: 4px 9px;
  border-color: rgba(112, 139, 170, 0.2);
  color: #667085;
  background: rgba(246, 249, 253, 0.76);
  font-size: 10px;
}

.frame-time {
  font-size: 10px;
}

.button,
.connection-actions a,
.connection-actions button,
.control-group button {
  min-height: 36px;
  border-color: rgba(92, 116, 145, 0.3);
  border-radius: 10px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 14px rgba(55, 80, 113, 0.04);
  font-size: 11px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button-primary,
.segmented-control button[aria-pressed="true"] {
  color: #fff;
  border-color: var(--ios-blue);
  background: linear-gradient(180deg, #2997ff 0%, #0878e6 100%);
  box-shadow: 0 7px 18px rgba(10, 132, 255, 0.23);
}

.button-studio {
  color: #4d49c7;
  border-color: rgba(94, 92, 230, 0.28);
  background: rgba(239, 238, 255, 0.78);
}

.button:not(:disabled):hover,
.connection-actions a:hover,
.connection-actions button:not(:disabled):hover,
.control-group button:not(:disabled):hover {
  border-color: var(--ios-blue);
  box-shadow: 0 7px 18px rgba(10, 132, 255, 0.12);
}

main {
  gap: 14px;
  padding-bottom: 22px;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: var(--radius);
  background: var(--ios-glass);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(112, 139, 170, 0.07);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.house-card,
.season-card,
.data-panel,
.control-panel,
.device-panel,
.threshold-panel,
.actuator-test-panel,
.voice-panel,
.log-panel {
  padding: 16px;
}

.alert-notice {
  min-height: 88px;
  gap: 12px;
  padding: 14px 17px;
  border-left-width: 4px;
}

.alert-symbol {
  width: 44px;
  height: 44px;
  border-color: rgba(93, 116, 145, 0.3);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 760;
}

.alert-copy h2 {
  font-size: 17px;
}

.alert-copy > p:last-of-type {
  font-size: 12px;
}

.alert-notice.is-safe {
  border-left-color: var(--celadon);
  background: linear-gradient(100deg, rgba(229, 249, 238, 0.72), rgba(255, 255, 255, 0.66));
}

.alert-notice.is-danger {
  border-color: rgba(255, 69, 58, 0.38);
  border-left-color: var(--danger);
  background: linear-gradient(100deg, rgba(255, 232, 230, 0.88), rgba(255, 255, 255, 0.72));
  box-shadow: 0 16px 44px rgba(255, 69, 58, 0.14);
}

.hero-grid,
.operation-grid {
  gap: 14px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.48fr) minmax(360px, 0.72fr);
}

.operation-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.overview-column {
  gap: 14px;
}

.section-heading h2,
.season-copy h2 {
  font-size: 19px;
  letter-spacing: -0.025em;
}

.compact-heading,
.house-heading {
  margin-bottom: 12px;
}

.mode-badge,
.control-lock,
.truth-note,
.live-dot,
.voice-support {
  padding: 4px 8px;
  border-color: rgba(112, 139, 170, 0.22);
  background: rgba(247, 250, 254, 0.7);
  font-size: 9px;
}

.house-shell,
.house-plan {
  min-height: 470px;
}

.house-shell {
  border-color: rgba(112, 139, 170, 0.26);
  border-radius: 16px;
  background:
    linear-gradient(rgba(10, 132, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 132, 255, 0.035) 1px, transparent 1px),
    rgba(246, 250, 255, 0.62);
  background-size: 28px 28px;
}

.house-plan {
  gap: 7px;
  padding: 12px;
}

.room,
.metric,
.device,
.control-group,
.threshold-card,
.fixed-rule-card,
.actuator-test-card,
.voice-action-card,
.voice-text-card,
.command-status,
.voice-status {
  border-color: rgba(112, 139, 170, 0.2);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(15px) saturate(135%);
  -webkit-backdrop-filter: blur(15px) saturate(135%);
}

.room {
  gap: 2px 8px;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(48, 74, 108, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.room-icon,
.device-icon,
.voice-orb {
  color: var(--ios-blue);
  background: rgba(10, 132, 255, 0.1);
}

.room.is-mode-active {
  border-color: rgba(10, 132, 255, 0.4);
  background: rgba(228, 241, 255, 0.76);
  box-shadow: 0 8px 24px rgba(10, 132, 255, 0.11);
}

.room.is-alert {
  border-color: var(--danger);
  background: rgba(255, 235, 232, 0.9);
}

.house-heart {
  border-color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(145deg, var(--ios-blue), var(--ios-indigo));
  box-shadow: 0 10px 26px rgba(10, 132, 255, 0.28);
}

.house-legend {
  gap: 12px;
  margin-top: 9px;
  font-size: 9px;
}

.season-card {
  border-color: rgba(255, 255, 255, 0.54);
  background:
    linear-gradient(145deg, rgba(10, 132, 255, 0.91), rgba(94, 92, 230, 0.84)),
    rgba(10, 132, 255, 0.8);
  box-shadow: 0 16px 42px rgba(41, 91, 175, 0.22);
}

.season-card .section-kicker,
.strategy-grid dt {
  color: rgba(255, 255, 255, 0.72);
}

.season-copy h2 {
  color: #fff;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 740;
}

.season-copy > p:last-child {
  color: rgba(255, 255, 255, 0.77);
  font-size: 11px;
}

.season-name {
  width: 58px;
  height: 72px;
  border-color: rgba(255, 255, 255, 0.32);
  border-radius: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-family: var(--font-body);
  font-size: 30px;
  font-weight: 720;
}

.strategy-grid {
  gap: 6px;
}

.strategy-grid div {
  padding: 8px;
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
}

.metric-grid,
.device-grid,
.threshold-grid,
.actuator-test-grid,
.fixed-rule-grid,
.control-groups,
.voice-layout {
  gap: 9px;
}

.metric {
  padding: 10px;
  border-radius: 13px;
}

.metric-code {
  color: rgba(10, 132, 255, 0.24);
  font-size: 17px;
}

.metric p {
  margin-bottom: 6px;
}

.metric strong {
  font-size: clamp(17px, 1.75vw, 24px);
}

.control-group,
.threshold-card,
.actuator-test-card {
  padding: 12px;
  border-radius: 13px;
}

.control-group legend {
  color: var(--ios-blue);
}

.select-action select,
.threshold-editor input[type="number"],
.voice-text-action input {
  border-color: rgba(93, 116, 145, 0.3);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 2px rgba(45, 67, 95, 0.04);
}

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

.threshold-editor button,
.threshold-extra button {
  border-color: var(--ios-blue);
  color: #fff;
  background: var(--ios-blue);
}

.threshold-extra button {
  color: var(--ios-blue);
  background: transparent;
}

.threshold-conclusion {
  border-left-color: var(--ios-blue);
  background: rgba(10, 132, 255, 0.06);
}

.fixed-rule-heading {
  margin-top: 16px;
  padding-top: 14px;
}

.fixed-rule-card {
  border-color: rgba(255, 69, 58, 0.2);
  background: rgba(255, 250, 250, 0.66);
}

.actuator-test-intro,
.threshold-intro {
  margin-bottom: 12px;
  font-size: 10px;
}

.actuator-actions button {
  border-color: rgba(93, 116, 145, 0.3);
  background: rgba(255, 255, 255, 0.75);
}

.actuator-actions button[data-actuator-auto] {
  color: var(--ios-blue);
  border-color: rgba(10, 132, 255, 0.5);
}

.voice-panel::after,
.season-card::after {
  border-color: rgba(255, 255, 255, 0.14);
}

.voice-layout {
  margin-top: 12px;
}

.voice-orb {
  width: 44px;
  height: 44px;
}

.voice-status,
.command-status {
  padding: 10px 12px;
}

.log-panel {
  min-height: 160px;
}

.run-log {
  max-height: 220px;
}

.run-log li {
  padding: 7px 0;
  border-color: rgba(112, 139, 170, 0.18);
}

.log-type {
  color: var(--ios-blue);
  background: rgba(10, 132, 255, 0.09);
}

footer {
  padding-bottom: 20px;
  color: #778399;
  font-size: 10px;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline-color: rgba(10, 132, 255, 0.5);
}

@media (max-width: 1120px) {
  .masthead {
    grid-template-columns: 1fr;
  }

  .hero-grid,
  .operation-grid {
    grid-template-columns: 1fr;
  }

  .overview-column {
    gap: 12px;
  }
}

@media (max-width: 760px) {
  .masthead,
  main,
  footer {
    width: min(100% - 20px, 1440px);
  }

  .masthead {
    gap: 10px;
    padding-top: 12px;
  }

  .connection-bar {
    gap: 9px;
  }

  .house-shell,
  .house-plan {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .masthead,
  main,
  footer {
    width: min(100% - 14px, 1440px);
  }

  .brand-block {
    align-items: flex-start;
  }

  .season-seal {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  h1 {
    font-size: 27px;
  }

  h1 span {
    margin-top: 3px;
    font-size: 12px;
  }

  .connection-bar,
  .alert-notice,
  .house-card,
  .season-card,
  .data-panel,
  .control-panel,
  .device-panel,
  .threshold-panel,
  .actuator-test-panel,
  .voice-panel,
  .log-panel {
    border-radius: 15px;
  }

  .house-card,
  .season-card,
  .data-panel,
  .control-panel,
  .device-panel,
  .threshold-panel,
  .actuator-test-panel,
  .voice-panel,
  .log-panel {
    padding: 13px;
  }

  .connection-actions > *,
  .plain-actions button,
  .segmented-control button,
  .select-action select,
  .select-action button,
  .actuator-actions button,
  .threshold-editor button,
  .voice-actions button,
  .voice-text-action input,
  .voice-text-action button {
    min-height: 44px;
  }

  .alert-notice {
    gap: 8px;
  }

  .house-plan {
    gap: 7px;
    padding: 8px;
  }

  .room {
    min-height: 96px;
  }

  .metric {
    min-height: 108px;
  }

  .strategy-grid div {
    padding: 7px 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
