/* Factory weather panel — SymbiOS feature modal (CropMap-style + 3D building) */
#featureModal {
  --cm-weather-scroll-max-h: min(72vh, 680px);
  --cm-weather-scroll-min-h: 360px;
  --cm-weather-dialog-min-h: min(78vh, 740px);
}

#featureModal .modal-dialog {
  width: min(760px, 96vw);
}

#featureModal:has(#weather.tab-pane.active) .modal-dialog,
#featureModal:has(#weather.tab-pane.active) .modal-content {
  min-height: var(--cm-weather-dialog-min-h);
  max-height: min(88vh, 820px);
}

#featureModal:has(#weather.tab-pane.active) .tab-content {
  min-height: min(68vh, 640px);
}

#featureModal .modal-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden !important;
  max-height: none !important;
}

#featureModal .nav-tabs {
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
  margin-bottom: 0;
  overflow-x: auto;
  overflow-y: hidden !important;
  max-height: none !important;
}

#featureModal #tablist > li > a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

#featureModal .tab-content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

#featureModal .tab-content > .tab-pane {
  display: none !important;
  flex: 1 1 auto;
  min-height: 0;
}

#featureModal .tab-content > .tab-pane.active {
  display: flex !important;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#weather.tab-pane,
#weather {
  padding: 4px 2px 8px;
}

#featureModal #weather.tab-pane.active {
  overflow: hidden;
}

#featureModal #feature-info.tab-pane.active,
#featureModal #offers-tab.tab-pane.active,
#featureModal #saved-offers-tab.tab-pane.active {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

#featureModal #weather.tab-pane.active .cm-weather-scroll-host {
  flex: 1 1 auto;
  min-height: var(--cm-weather-scroll-min-h);
  width: 100%;
  max-height: var(--cm-weather-scroll-max-h);
}

#featureModal #weather.tab-pane.active .cm-weather {
  width: 100%;
  min-height: min-content;
}

#weather .container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.cm-weather {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cm-weather-notify {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8d7da;
  color: #721c24;
  font-size: 13px;
  font-weight: 600;
}

#weather.is-loading .cm-weather-preview,
#weather.is-loading .cm-weather-hero,
#weather.is-loading .cm-weather-metrics {
  opacity: 0.55;
  pointer-events: none;
}

.cm-weather-stage {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 12px;
  align-items: stretch;
}

.cm-weather-preview {
  min-height: 340px;
  border-radius: 16px;
  /* Default = day clear; overridden by [data-tod]/[data-fx] below */
  background:
    radial-gradient(ellipse at 82% 6%, rgba(255, 236, 160, 0.55), transparent 42%),
    linear-gradient(180deg, #6eb6ff 0%, #a8d4ff 42%, #d7ecff 78%, #eef6ff 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  position: relative;
  transition: background 0.45s ease;
}

/* —— Day skies —— */
.cm-weather-preview[data-tod="day"][data-fx="sun"],
.cm-weather-preview[data-tod="day"]:not([data-fx]) {
  background:
    radial-gradient(ellipse at 84% 4%, rgba(255, 245, 180, 0.7), transparent 38%),
    linear-gradient(180deg, #4aa3ff 0%, #87c5ff 38%, #c9e6ff 72%, #eef7ff 100%);
  border-color: rgba(255, 255, 255, 0.35);
}

.cm-weather-preview[data-tod="day"][data-fx="clouds"] {
  background:
    radial-gradient(ellipse at 70% 0%, rgba(255, 255, 255, 0.45), transparent 45%),
    linear-gradient(180deg, #7aa8c9 0%, #a8c4d8 45%, #cfdde8 100%);
}

.cm-weather-preview[data-tod="day"][data-fx="rain"],
.cm-weather-preview[data-tod="day"][data-fx="storm"] {
  background:
    linear-gradient(180deg, #5a738c 0%, #7a91a8 40%, #9aafc0 100%);
}

.cm-weather-preview[data-tod="day"][data-fx="snow"] {
  background:
    linear-gradient(180deg, #9eb6cc 0%, #c5d6e6 48%, #e8eef5 100%);
}

.cm-weather-preview[data-tod="day"][data-fx="fog"] {
  background:
    linear-gradient(180deg, #aebcc8 0%, #c8d2db 50%, #dde3e8 100%);
}

/* —— Night skies —— */
.cm-weather-preview[data-tod="night"],
.cm-weather-preview[data-fx="clear-night"],
.cm-weather-preview[data-fx$="-night"] {
  background:
    radial-gradient(ellipse at 68% 12%, rgba(160, 180, 255, 0.18), transparent 42%),
    linear-gradient(180deg, #0b1024 0%, #171b3a 48%, #1a1628 100%);
  border-color: rgba(255, 255, 255, 0.08);
}

.cm-weather-preview[data-tod="night"][data-fx="clouds-night"] {
  background:
    linear-gradient(180deg, #12182e 0%, #1c2340 50%, #1a1a2e 100%);
}

.cm-weather-preview[data-tod="night"][data-fx="rain-night"],
.cm-weather-preview[data-tod="night"][data-fx="storm-night"] {
  background:
    linear-gradient(180deg, #0a0e1a 0%, #141c30 45%, #1a2030 100%);
}

.cm-weather-preview[data-tod="night"][data-fx="snow-night"] {
  background:
    linear-gradient(180deg, #101828 0%, #1a2438 50%, #222836 100%);
}

.cm-weather-preview[data-tod="night"][data-fx="fog-night"] {
  background:
    linear-gradient(180deg, #151a28 0%, #222836 55%, #2a303c 100%);
}

.cm-weather-preview-3d {
  height: 100%;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.cm-weather-preview-title {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 6;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.cm-weather-preview[data-tod="day"] .cm-weather-preview-title {
  color: rgba(20, 40, 70, 0.88);
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.55);
}

.cm-weather-preview[data-tod="day"][data-fx="rain"] .cm-weather-preview-title,
.cm-weather-preview[data-tod="day"][data-fx="storm"] .cm-weather-preview-title {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.cm-wx-sky {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.cm-weather-fx--sky {
  width: 100%;
  height: 100%;
}

/* Precipitation sits above the factory so rain/snow reads on the building */
.cm-wx-precip {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  overflow: hidden;
}

.cm-wx-ground {
  position: relative;
  width: 108%;
  height: 108%;
  transform: rotateX(52deg) rotateZ(-26deg) scale(1.08);
  transform-origin: 50% 58%;
  transform-style: preserve-3d;
  overflow: visible;
}

.cm-wx-ground--building {
  transform: rotateX(58deg) rotateZ(-28deg) scale(1.05);
  transform-origin: 50% 62%;
}

.cm-wx-scene {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  perspective: 1200px;
  perspective-origin: 50% 42%;
  z-index: 2;
  padding: 28px 4px 18px;
  overflow: visible;
}

.cm-weather-building-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.35));
}

.cm-weather-building-wall {
  stroke: rgba(0, 0, 0, 0.12);
  stroke-width: 0.6;
}

.cm-weather-building-roof {
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 1.6;
}

.cm-weather-building-ground {
  opacity: 0.55;
}

.cm-weather-building-chimney {
  stroke: rgba(0, 0, 0, 0.2);
  stroke-width: 0.5;
}

.cm-wx-crop-badge {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%) rotateZ(24deg) rotateX(-48deg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 6px;
  box-sizing: border-box;
  border-radius: 50%;
  background: rgba(8, 12, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  z-index: 5;
  backdrop-filter: blur(3px);
  overflow: visible;
  pointer-events: none;
}

.cm-wx-crop-badge--overlay {
  left: 50%;
  top: auto;
  bottom: 22%;
  transform: translateX(-50%);
  z-index: 8;
}

.cm-wx-crop-icon {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 28px;
  max-height: 28px;
  object-fit: contain;
  object-position: center;
}

.cm-wx-field-fx {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 28%;
  bottom: 18%;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  border-radius: 8px;
}

.cm-weather-fx {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.cm-wx-drop {
  position: absolute;
  width: 2.5px;
  height: 22px;
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    rgba(200, 230, 255, 0),
    rgba(210, 235, 255, 0.95) 40%,
    rgba(255, 255, 255, 0.85)
  );
  box-shadow: 0 0 3px rgba(180, 220, 255, 0.35);
  transform: rotate(28deg);
  animation-name: cm-wx-fall-diag;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

.cm-wx-precip .cm-wx-drop {
  width: 3px;
  height: 26px;
}

.cm-wx-flake {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
  animation-name: cm-wx-snow-diag;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

.cm-wx-flash {
  position: absolute;
  inset: 0;
  background: rgba(220, 240, 255, 0.4);
  opacity: 0;
  animation: cm-wx-flash 3.2s ease-in-out infinite;
  z-index: 2;
}

.cm-wx-precip .cm-wx-flash {
  background: rgba(230, 245, 255, 0.5);
}

.cm-wx-sun-wrap {
  position: absolute;
  top: 6%;
  right: 6%;
  width: 150px;
  height: 210px;
  pointer-events: none;
  z-index: 3;
}

.cm-wx-sun-wrap--soft {
  opacity: 0.55;
  filter: saturate(0.85);
}

.cm-wx-sun-wrap--soft .cm-wx-sun-core {
  width: 38px;
  height: 38px;
  right: 22px;
  box-shadow: 0 0 22px rgba(255, 200, 60, 0.55);
  animation: none;
}

.cm-wx-sun-core {
  position: absolute;
  top: 0;
  right: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8c4, #ffcc33 52%, #ff9800 100%);
  box-shadow:
    0 0 28px rgba(255, 200, 60, 0.85),
    20px 0 0 -16px rgba(255, 200, 70, 0.95),
    -20px 0 0 -16px rgba(255, 200, 70, 0.95),
    0 20px 0 -16px rgba(255, 200, 70, 0.95),
    0 -20px 0 -16px rgba(255, 200, 70, 0.95),
    14px 14px 0 -16px rgba(255, 180, 50, 0.85),
    -14px 14px 0 -16px rgba(255, 180, 50, 0.85),
    14px -14px 0 -16px rgba(255, 180, 50, 0.85),
    -14px -14px 0 -16px rgba(255, 180, 50, 0.85);
  animation: cm-wx-sun-spin 14s linear infinite;
  z-index: 2;
}

.cm-wx-beam {
  position: absolute;
  top: 38px;
  right: 36px;
  width: 3px;
  height: 150px;
  border-radius: 2px;
  transform-origin: top center;
  background: linear-gradient(
    to bottom,
    rgba(255, 230, 140, 0.85),
    rgba(255, 210, 90, 0.35) 45%,
    rgba(255, 200, 80, 0)
  );
  filter: blur(0.4px);
  z-index: 1;
}

.cm-wx-beam.b1 { transform: rotate(32deg); height: 168px; opacity: 0.95; }
.cm-wx-beam.b2 { transform: rotate(42deg); height: 175px; opacity: 0.72; width: 2.5px; }
.cm-wx-beam.b3 { transform: rotate(52deg); height: 158px; opacity: 0.55; }
.cm-wx-beam.b4 { transform: rotate(24deg); height: 140px; opacity: 0.4; width: 2px; }

.cm-wx-moon {
  position: absolute;
  top: 10%;
  left: 64%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f8fafc, #cbd5e1);
  box-shadow: 0 0 18px rgba(200, 220, 255, 0.45);
  z-index: 3;
}

.cm-wx-moon--soft {
  opacity: 0.55;
  width: 28px;
  height: 28px;
  box-shadow: 0 0 12px rgba(200, 220, 255, 0.3);
}

.cm-weather-fx--clouds-night .cm-wx-moon,
.cm-weather-fx--rain-night .cm-wx-moon,
.cm-weather-fx--storm-night .cm-wx-moon,
.cm-weather-fx--snow-night .cm-wx-moon,
.cm-weather-fx--fog-night .cm-wx-moon {
  left: 70%;
}

.cm-wx-star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  animation: cm-wx-twinkle 2.4s ease-in-out infinite;
}

.cm-wx-cloud {
  position: absolute;
  height: 28px;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.58);
  filter: blur(0.2px);
  animation: cm-wx-drift 10s linear infinite;
}

.cm-wx-cloud.c1 { top: 18%; left: -20%; width: 78px; opacity: 0.75; }
.cm-wx-cloud.c2 { top: 34%; left: -30%; width: 96px; opacity: 0.55; animation-duration: 14s; }
.cm-wx-cloud.c3 { top: 48%; left: -25%; width: 70px; opacity: 0.65; animation-duration: 12s; animation-delay: -3s; }

.cm-weather-fx--clouds .cm-wx-cloud {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 2px 8px rgba(80, 120, 160, 0.15);
}

.cm-weather-fx--clouds-night .cm-wx-cloud {
  background: rgba(180, 190, 210, 0.45);
}

.cm-wx-fog {
  position: absolute;
  left: -8%;
  width: 116%;
  height: 38%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(220, 230, 235, 0.55),
    rgba(200, 214, 220, 0.35),
    transparent
  );
  filter: blur(6px);
  animation: cm-wx-fog 6s ease-in-out infinite;
}

.cm-wx-fog.f1 { top: 8%; opacity: 0.75; }
.cm-wx-fog.f2 { top: 36%; animation-delay: -2.2s; opacity: 0.85; height: 44%; }
.cm-wx-fog.f3 { top: 58%; animation-delay: -4s; opacity: 0.55; height: 36%; }

@keyframes cm-wx-fall-diag {
  from { transform: translate(0, 0) rotate(28deg); opacity: 0; }
  8% { opacity: 1; }
  85% { opacity: 0.85; }
  to { transform: translate(-70px, 380px) rotate(28deg); opacity: 0.05; }
}

@keyframes cm-wx-snow-diag {
  from { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  80% { opacity: 0.9; }
  to { transform: translate(-56px, 360px); opacity: 0.08; }
}

@keyframes cm-wx-flash {
  0%, 88%, 100% { opacity: 0; }
  90% { opacity: 0.85; }
  92% { opacity: 0.15; }
  94% { opacity: 0.7; }
}

@keyframes cm-wx-sun-spin {
  to { transform: rotate(360deg); }
}

@keyframes cm-wx-twinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

@keyframes cm-wx-drift {
  from { transform: translateX(0); }
  to { transform: translateX(360px); }
}

@keyframes cm-wx-fog {
  0%, 100% { transform: translateX(0); opacity: 0.4; }
  50% { transform: translateX(14px); opacity: 0.85; }
}

.cm-weather-hero {
  border-radius: 16px;
  background: var(--cm-surface, #fff);
  border: 1px solid var(--cm-border, rgba(0, 0, 0, 0.08));
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
}

.cm-weather-icon img {
  width: 84px;
  height: 84px;
  display: block;
}

.cm-weather-temp {
  margin: 0;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  color: var(--cm-primary-dark, #5568d3);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.cm-weather-temp span {
  font-size: 0.45em;
  font-weight: 700;
  margin-left: 2px;
}

.cm-weather-desc {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--cm-text, #1a1a2e);
  text-transform: capitalize;
}

.cm-weather-loc {
  margin: 0;
  font-size: 12px;
  color: var(--cm-text-muted, #667);
}

.cm-weather-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.cm-weather-metric {
  background: var(--cm-surface, #fff);
  border: 1px solid var(--cm-border, rgba(0, 0, 0, 0.08));
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cm-weather-metric-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cm-text-muted, #667);
}

.cm-weather-metric-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--cm-text, #1a1a2e);
  font-variant-numeric: tabular-nums;
}

.cm-weather-metric-hint {
  font-size: 11px;
  color: var(--cm-primary, #667eea);
  font-weight: 600;
}

.cm-weather-sunrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cm-weather-sunitem {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--cm-accent-start, #667eea) 12%, transparent),
    color-mix(in srgb, var(--cm-accent-end, #764ba2) 10%, transparent)
  );
  border: 1px solid color-mix(in srgb, var(--cm-primary, #667eea) 22%, transparent);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cm-weather-sunitem span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--cm-text-muted, #667);
}

.cm-weather-sunitem strong {
  font-size: 18px;
  color: var(--cm-primary-dark, #5568d3);
  font-variant-numeric: tabular-nums;
}

.cm-weather-forecast {
  border-radius: 14px;
  overflow: visible;
  padding: 2px 0 6px;
}

.cm-weather-forecast-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cm-text-muted, #667);
  margin: 0 0 12px;
  text-align: center;
}

.cm-weather-forecast-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 2px 4px 6px;
  box-sizing: border-box;
}

.cm-weather-day {
  background: var(--cm-surface, #fff);
  border: 1px solid var(--cm-border, rgba(0, 0, 0, 0.08));
  border-radius: 12px;
  padding: 12px 6px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.cm-weather-day img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.cm-weather-day-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--cm-text-muted, #667);
}

.cm-weather-day strong {
  font-size: 15px;
  color: var(--cm-primary-dark, #5568d3);
}

.cm-weather-day-desc {
  font-size: 10px;
  color: var(--cm-text-muted, #667);
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-theme="dark"] .cm-weather-hero,
[data-theme="dark"] .cm-weather-metric,
[data-theme="dark"] .cm-weather-day {
  background: var(--cm-surface, #1a1625);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .cm-weather-temp,
[data-theme="dark"] .cm-weather-metric-value,
[data-theme="dark"] .cm-weather-day strong,
[data-theme="dark"] .cm-weather-sunitem strong {
  color: #c7d2fe;
}

[data-theme="dark"] .cm-weather-desc {
  color: var(--cm-text, #e8eaf6);
}

@media (max-width: 768px) {
  #featureModal {
    --cm-weather-scroll-max-h: none;
    --cm-weather-scroll-min-h: 280px;
    --cm-weather-dialog-min-h: min(62vh, 580px);
  }

  #featureModal:has(#weather.tab-pane.active) .modal-dialog,
  #featureModal:has(#weather.tab-pane.active) .modal-content {
    min-height: var(--cm-weather-dialog-min-h);
    max-height: calc(100dvh - 8px) !important;
  }

  #featureModal:has(#weather.tab-pane.active) .tab-content {
    min-height: min(54vh, 480px);
  }

  #featureModal #weather.tab-pane.active .cm-weather-scroll-host {
    max-height: none;
    flex: 1 1 auto;
    min-height: var(--cm-weather-scroll-min-h);
  }

  .cm-weather-stage {
    grid-template-columns: 1fr;
  }

  .cm-weather-preview,
  .cm-weather-preview-3d {
    min-height: 320px;
  }

  .cm-wx-scene {
    min-height: 260px;
    padding: 18px 10px 42px;
    box-sizing: border-box;
  }

  .cm-wx-ground,
  .cm-wx-ground--building {
    width: 100%;
    height: 100%;
    max-width: 92%;
    max-height: 92%;
    margin: 0 auto;
    transform: rotateX(54deg) rotateZ(-24deg) scale(0.9);
    transform-origin: 50% 54%;
  }

  .cm-wx-crop-badge--overlay {
    bottom: 20%;
    width: 42px;
    height: 42px;
    padding: 7px;
  }

  .cm-wx-crop-icon {
    max-width: 26px;
    max-height: 26px;
  }

  .cm-weather-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cm-weather-temp {
    font-size: 36px;
  }
}

@media (max-width: 520px) {
  .cm-weather-forecast-row {
    gap: 6px;
    max-width: none;
    padding: 2px 0 6px;
  }

  .cm-weather-day {
    padding: 10px 4px 12px;
  }

  .cm-weather-day img {
    width: 34px;
    height: 34px;
  }

  .cm-weather-day-name {
    font-size: 10px;
  }

  .cm-weather-day strong {
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .cm-weather-preview,
  .cm-weather-preview-3d {
    min-height: 300px;
  }

  .cm-wx-scene {
    min-height: 248px;
    padding-bottom: 46px;
  }

  .cm-wx-ground,
  .cm-wx-ground--building {
    max-width: 88%;
    max-height: 88%;
    transform: rotateX(54deg) rotateZ(-24deg) scale(0.84);
    transform-origin: 50% 56%;
  }
}
