:root {
  --bg: #eef6f5;
  --card: rgba(255, 255, 255, 0.88);
  --card-strong: #ffffff;
  --ink: #102029;
  --muted: #5a6f79;
  --brand: #0f766e;
  --brand-deep: #0a4c52;
  --accent: #f59e0b;
  --line: rgba(16, 32, 41, 0.08);
  --shadow: 0 20px 60px rgba(9, 30, 34, 0.12);
  --radius: 22px;
  --water: #1597e5;
  --electric: #f97316;
  --hvac: #2563eb;
  --copper: #be6a15;
  --condensate: #06b6d4;
  --roof: #b45309;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 24%),
    linear-gradient(180deg, #f7fbfb 0%, #e8f2f0 100%);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

body {
  padding: 24px;
}

.app-shell {
  max-width: 1620px;
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 20px;
  margin-bottom: 20px;
}

.hero-copy,
.hero-card,
.panel {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 28px;
}

.hero-card {
  padding: 28px;
  background:
    linear-gradient(160deg, rgba(15, 118, 110, 0.1), rgba(255, 255, 255, 0.95)),
    var(--card-strong);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  letter-spacing: 0.18em;
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
}

.hero-text {
  margin: 16px 0 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.metric {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.08);
}

.metric strong {
  display: block;
  font-size: 24px;
  margin-bottom: 4px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.plain-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.toolbar-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-btn,
.chip {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand-deep);
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(16, 32, 41, 0.08);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.toolbar-btn:hover,
.chip:hover {
  transform: translateY(-1px);
}

.toolbar-btn.active,
.chip.active {
  background: var(--brand);
  color: #ffffff;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
  gap: 20px;
}

.visual-stack,
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.legend,
.mini-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.legend-swatch.roof {
  background: var(--roof);
}

.legend-swatch.water {
  background: var(--water);
}

.legend-swatch.electric {
  background: var(--electric);
}

.legend-swatch.copper {
  background: var(--copper);
}

.legend-swatch.condensate {
  background: var(--condensate);
}

.scene3d {
  min-height: 640px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(201, 240, 255, 0.88) 0%, rgba(233, 247, 243, 0.94) 46%, rgba(229, 239, 232, 1) 100%);
  border: 1px solid rgba(16, 32, 41, 0.08);
}

.view-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.orientation-banner {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 13px;
}

.plan-wrap {
  min-height: 720px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #fdfefe 0%, #f4fbfb 100%);
  border: 1px solid rgba(16, 32, 41, 0.08);
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.sun-cards,
.detail-cards,
.room-cards,
.guide-grid {
  display: grid;
  gap: 12px;
}

.sun-card,
.detail-card,
.room-card,
.info-card,
.guide-card {
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
}

.room-card {
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.room-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.35);
}

.room-card.active {
  border-color: rgba(15, 118, 110, 0.7);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.14);
}

.room-card h3,
.detail-card h3,
.sun-card h3,
.info-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.room-meta,
.small-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
  line-height: 1.7;
}

.info-panel {
  display: grid;
  gap: 12px;
}

.sticky-panel {
  position: sticky;
  top: 20px;
}

.plan-svg {
  width: 100%;
  height: auto;
  display: block;
}

.plan-room {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.plan-room:hover {
  opacity: 0.88;
}

.line-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  cursor: pointer;
}

.line-water {
  stroke: var(--water);
}

.line-electric {
  stroke: var(--electric);
}

.line-hvac {
  stroke: var(--hvac);
}

.line-copper {
  stroke: var(--copper);
}

.line-condensate {
  stroke: var(--condensate);
}

.overlay-hidden {
  opacity: 0.08;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.section-grid strong {
  display: block;
  font-size: 18px;
}

.guide-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.guide-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  color: var(--brand-deep);
}

.guide-card p {
  margin: 0;
}

.footer-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 1280px) {
  .main-grid,
  .hero,
  .split-panel {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  body {
    padding: 14px;
  }

  .hero-copy,
  .hero-card,
  .panel {
    padding: 16px;
  }

  .scene3d {
    min-height: 420px;
  }

  .plan-wrap {
    min-height: 520px;
  }

  .toolbar {
    align-items: stretch;
  }
}
