:root {
  --bg: #e6e6e6;
  --card: #f5f5f5;
  --text: #151515;
  --muted: #5e5e5e;
  --accent: #151515;
  --ok: #22c55e;
  --line: #333333;
  --panel: #ebebeb;
  --panel-soft: #dedede;
  --palette-blue: #0DC1F2;
  --palette-red: #F2240D;
  --palette-orange: #F2690D;
  --palette-yellow: #F2B50D;
  --palette-purple: #7e22ce;
}

* { box-sizing: border-box; }
html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg) !important;
  min-height: 100vh;
}

.app {
  width: min(96vw, 1280px);
  margin: 0 auto;
  padding: 24px clamp(14px, 2vw, 32px) 40px;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 2.6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
}

section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 16px;
  margin-top: 14px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}

.content-grid section {
  margin-top: 0;
}

@media (orientation: landscape) and (min-width: 900px), (min-width: 1200px) {
  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #daily,
  #modelCharts,
  #photo,
  #models {
    grid-column: 1 / -1;
  }
}

@media (orientation: landscape) and (min-width: 1400px), (min-width: 1700px) {
  .content-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #current,
  #fun,
  #hourly,
  #foehn {
    grid-column: span 1;
  }

  #daily,
  #modelCharts,
  #photo,
  #models {
    grid-column: 1 / -1;
  }
}

.search-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

input {
  width: 100%;
  border-radius: 0;
  border: 1px solid #333333;
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
}

.suggest-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  background: var(--panel);
  z-index: 5;
}

.suggest-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 0;
  padding: 10px 12px;
  font-weight: 500;
  display: grid;
  gap: 2px;
}

.suggest-item:last-child {
  border-bottom: 0;
}

.suggest-item:hover,
.suggest-item.active {
  background: var(--panel-soft);
}

.suggest-main {
  font-size: 0.95rem;
  line-height: 1.2;
}

.suggest-meta {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.2;
}

button {
  border: 0;
  border-radius: 0;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
  color: #f7f4ec;
  background: var(--accent);
}

button.ghost {
  color: var(--text);
  background: var(--panel-soft);
}

.status { color: var(--muted); margin: 8px 0 0; }

.dashboard-card {
  padding: 0;
  overflow: hidden;
}

.dashboard-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  overflow-x: auto;
}

.dashboard-tabs a {
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  padding: 14px 22px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}

.dashboard-tabs a.active {
  background: var(--card);
  box-shadow: inset 0 -4px 0 #1f9ed6;
}

.dashboard-tabs [data-settings-toggle] {
  margin-left: auto;
  border-left: 1px solid var(--line);
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--panel-soft);
}

.dashboard-tabs [data-settings-toggle].active {
  background: var(--card);
}

.dashboard-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.settings-group {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-group:last-child {
  border-right: 0;
}

.settings-group strong {
  width: 100%;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.settings-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.settings-group input {
  width: auto;
  accent-color: #1f9ed6;
}

.dashboard-main {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 0;
  min-height: 310px;
}

.dashboard-current {
  padding: 24px;
  border-right: 1px solid var(--line);
}

.dashboard-place small,
.dashboard-place p {
  color: var(--muted);
  font-weight: 600;
}

.dashboard-place h2 {
  margin: 4px 0;
  font-size: clamp(1.45rem, 2.2vw, 2.55rem);
  line-height: 1.05;
}

.dashboard-place p {
  margin: 0;
}

.dashboard-now {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  margin-top: 24px;
}

.temp-ring {
  position: relative;
  width: 240px;
  height: 240px;
  overflow: hidden;
}

.weather-badge-values {
  position: absolute;
  inset: 0;
  z-index: 1;
  --badge-line-offset: 40px;
  text-align: center;
  color: var(--muted);
  pointer-events: none;
}

.weather-badge-highlow,
.weather-badge-temp,
.weather-badge-feels {
  position: absolute;
  left: 50%;
  z-index: 1;
  width: 70%;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

.weather-badge-highlow {
  top: calc(50% - var(--badge-line-offset));
  transform: translate(-50%, -50%);
  font-size: 1rem;
  color: var(--muted);
}

.weather-badge-temp {
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 3.15rem;
  line-height: 0.86;
  color: #f47b2a;
  letter-spacing: 0;
}

.weather-badge-feels {
  top: calc(50% + var(--badge-line-offset));
  transform: translate(-50%, -50%);
  font-size: 0.92rem;
  color: var(--muted);
}

.temp-ring-icon {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.temp-ring .temp-ring-icon {
  z-index: 0;
}

.temp-ring-icon,
.trend-temp-icon {
  pointer-events: none;
  user-select: none;
}

.now-facts {
  display: grid;
  gap: 8px;
  font-size: 1.05rem;
}

.now-facts strong {
  font-size: 1.35rem;
}

.now-facts span {
  display: block;
  width: fit-content;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 6px 8px;
  font-weight: 700;
}

.condition-head {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

.windrose-wrap {
  display: inline-flex;
  width: 66px;
  height: 66px;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.windrose {
  position: relative;
  display: block;
  width: 62px;
  height: 62px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(21, 21, 21, 0.36) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(0deg, transparent calc(50% - 0.5px), rgba(21, 21, 21, 0.36) 50%, transparent calc(50% + 0.5px)),
    var(--card);
}

.windrose-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(21, 21, 21, 0.24);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.windrose-ring.outer {
  width: 48px;
  height: 48px;
}

.windrose-ring.mid {
  width: 34px;
  height: 34px;
}

.windrose-ring.inner {
  width: 19px;
  height: 19px;
  background: var(--panel);
}

.windrose-cardinal {
  position: absolute;
  font-style: normal;
  font-size: 0.48rem;
  font-weight: 900;
  color: var(--muted);
  line-height: 1;
}

.windrose-cardinal.n { left: 50%; top: 3px; transform: translateX(-50%); }
.windrose-cardinal.e { right: 3px; top: 50%; transform: translateY(-50%); }
.windrose-cardinal.s { left: 50%; bottom: 3px; transform: translateX(-50%); }
.windrose-cardinal.w { left: 3px; top: 50%; transform: translateY(-50%); }

.windrose-needle {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 27px;
  background: #d62828;
  transform: translateX(-50%) rotate(var(--wind-angle, 0deg));
  transform-origin: 50% 24px;
  clip-path: polygon(50% 0, 100% 35%, 65% 35%, 65% 100%, 35% 100%, 35% 35%, 0 35%);
  z-index: 2;
}

.windrose strong {
  position: absolute;
  left: 50%;
  top: 50%;
  min-width: 22px;
  height: 16px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 0.62rem;
  line-height: 1;
  z-index: 3;
}

.windrose-wrap.half .windrose {
  border-width: 2px;
}

.windrose-wrap.strong .windrose {
  border-width: 2px;
  box-shadow: inset 0 0 0 2px rgba(214, 40, 40, 0.18);
}

.condition-mark {
  font-size: 3.3rem;
  line-height: 1;
}

.dashboard-map-mount {
  min-height: 310px;
  background: var(--panel);
}

.dashboard-map-mount .map-card {
  margin: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.dashboard-map-mount .weather-map-head {
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--line);
}

.dashboard-map-mount .overview-map,
.dashboard-map-mount .weather-map-canvas {
  height: 255px;
  border: 0;
}

.dashboard-map-mount .weather-map-meta,
.dashboard-map-mount small {
  padding: 6px 10px;
}

.dashboard-forecast {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.dashboard-forecast-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.dashboard-forecast-tile:nth-child(2) {
  background: var(--panel-soft);
}

.dashboard-forecast-tile:last-child {
  border-right: 0;
}

.tile-icon {
  grid-row: span 4;
  font-size: 2.7rem;
  line-height: 1;
}

.dashboard-forecast-tile strong {
  text-transform: uppercase;
}

.dashboard-forecast-tile small,
.tile-meta {
  color: var(--muted);
  font-weight: 700;
}

.tile-temp {
  font-size: 1.15rem;
  font-weight: 900;
}

.tile-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.tile-strip span {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 4px 6px;
  font-size: 0.78rem;
}

@media (max-width: 900px) {
  .dashboard-main,
  .dashboard-forecast {
    grid-template-columns: 1fr;
  }

  .dashboard-tabs a {
    padding: 13px 18px;
    font-size: 0.74rem;
  }

  .dashboard-tabs [data-settings-toggle] {
    margin-left: 0;
  }

  .dashboard-settings {
    grid-template-columns: 1fr;
  }

  .settings-group {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
  }

  .settings-group:last-child {
    border-bottom: 0;
  }

  .dashboard-current {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px;
  }

  .dashboard-place h2 {
    font-size: 1.55rem;
  }

  .dashboard-now {
    grid-template-columns: 172px minmax(0, 1fr);
    gap: 16px;
    margin-top: 18px;
    align-items: start;
  }

  .temp-ring {
    width: 172px;
    height: 172px;
  }

  .temp-ring .weather-badge-values {
    --badge-line-offset: 28px;
  }

  .weather-badge-temp {
    font-size: 2.45rem;
  }

  .now-facts {
    gap: 6px;
    font-size: 0.95rem;
  }

  .now-facts strong {
    font-size: 1.18rem;
  }

  .now-facts span {
    padding: 5px 7px;
  }

  .condition-mark {
    font-size: 2.45rem;
  }

  .dashboard-map-mount {
    min-height: 0;
  }

  .dashboard-map-mount .weather-map-head {
    align-items: flex-start;
  }

  .dashboard-map-mount .overview-map,
  .dashboard-map-mount .weather-map-canvas {
    height: 220px;
  }

  .dashboard-forecast-tile {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 13px 14px;
  }

  .tile-icon {
    font-size: 2.25rem;
  }
}

@media (max-width: 430px) {
  .dashboard-tabs a {
    padding: 13px 11px;
  }

  .dashboard-tabs [data-settings-toggle] {
    min-width: 46px;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
  }

  .settings-tab-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .dashboard-now {
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 12px;
  }

  .temp-ring {
    width: 148px;
    height: 148px;
  }

  .temp-ring .weather-badge-values {
    --badge-line-offset: 24px;
  }

  .weather-badge-temp {
    font-size: 2.05rem;
  }

  .weather-badge-highlow,
  .weather-badge-feels {
    font-size: 0.72rem;
  }
}

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

.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
}

.kpi .label { color: var(--muted); font-size: 0.86rem; }
.kpi .value { font-size: 1.2rem; font-weight: 700; margin-top: 4px; }

.hidden { display: none; }

.light-band-panel {
  margin-top: 14px;
  padding: 0 2px 54px;
  position: relative;
}

.hourly-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
}

.hour-item {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 8px;
  text-align: center;
  background: var(--panel);
}

.light-band {
  margin: 0;
  padding: 2px 0 0;
}

.light-band-track {
  position: relative;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: visible;
  background: #d7d2c7;
}

.light-icon {
  position: absolute;
  top: 15px;
  transform: translateX(-50%);
  width: 36px;
  height: 24px;
  opacity: 0.82;
  filter: none;
}

.light-icon span {
  position: absolute;
  left: 50%;
  top: 25px;
  transform: translateX(-50%);
  color: #b8c7df;
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.light-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 6px;
  height: 3px;
  border-radius: 0;
  background: #6b7592;
  box-shadow: none;
}

.light-icon::after {
  content: "";
  position: absolute;
  left: 10px;
  bottom: 8px;
  width: 16px;
  height: 11px;
  border-radius: 0;
  background: #facc15;
  box-shadow: none;
}

.light-icon i {
  position: absolute;
  left: 12px;
  width: 12px;
  height: 19px;
  z-index: 3;
}

.light-icon i::before {
  content: "";
  position: absolute;
  left: 5px;
  width: 2px;
  height: 14px;
  border-radius: 0;
  background: #f8fafc;
  box-shadow: none;
}

.light-icon i::after {
  content: "";
  position: absolute;
  left: 0;
  width: 10px;
  height: 10px;
  border-left: 2px solid #f8fafc;
  border-top: 2px solid #f8fafc;
  filter: none;
}

.light-icon.sunrise i {
  top: -2px;
}

.light-icon.sunrise i::after {
  top: 0;
  transform: rotate(45deg);
}

.light-icon.sunset i {
  top: 4px;
}

.light-icon.sunset i::before {
  top: -4px;
}

.light-icon.sunset i::after {
  bottom: 0;
  transform: rotate(225deg);
}

.light-time-scale {
  position: relative;
  height: 34px;
  margin-top: 35px;
}

.light-time-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  color: #8fa2c3;
  font-size: 0.62rem;
  line-height: 1;
  white-space: nowrap;
}

.light-time-tick::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -8px;
  width: 1px;
  height: 5px;
  background: rgba(148, 163, 184, 0.45);
}

.light-time-tick.minor {
  color: transparent;
}

.light-time-tick.minor::before {
  height: 3px;
  background: rgba(148, 163, 184, 0.24);
}

.light-time-tick.major::before {
  height: 7px;
  background: rgba(212, 212, 212, 0.42);
}

.light-hour-timeline {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 8px;
}

.light-hour {
  min-width: 0;
  min-height: 38px;
  border: 1px solid rgba(64, 64, 64, 0.9);
  border-left: 0;
  border-radius: 0;
  background: rgba(20, 20, 20, 0.9);
  padding: 5px 4px 4px;
  text-align: center;
  line-height: 1.05;
}

.light-hour:first-child {
  border-left: 1px solid rgba(64, 64, 64, 0.9);
  border-radius: 0;
}

.light-hour:not(:first-child):not(:last-child) {
  border-radius: 0;
}

.light-hour:last-child {
  border-radius: 0;
}

.light-hour b {
  display: block;
  margin-top: 0;
  font-size: 1rem;
  font-weight: 600;
}

.light-hour strong {
  display: block;
  margin-top: 1px;
  font-size: 0.82rem;
}

.light-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  opacity: 0.72;
  overflow: hidden;
}

.light-seg.blue {
  background: rgba(56, 189, 248, 0.42);
}

.light-seg.gold {
  background: rgba(250, 204, 21, 0.48);
}

.light-marker {
  position: absolute;
  top: 1px;
  bottom: 1px;
  width: 1px;
  transform: translateX(-0.5px);
  opacity: 0.85;
}

.light-marker.sun {
  background: rgba(255, 255, 255, 0.55);
}

.light-marker.now {
  width: 2px;
  transform: translateX(-1px);
  background: rgba(248, 250, 252, 0.9);
  box-shadow: none;
}

.photocast-card {
  margin-top: 14px;
}

.photocast-card h2 {
  margin-top: 0;
}

.photocast-plot {
  position: relative;
  height: 178px;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  background: var(--panel);
}

.photocast-light-layer,
.photocast-light-seg {
  position: absolute;
  inset: 0;
}

.photocast-light-seg {
  right: auto;
  overflow: hidden;
}

.photocast-light-seg.night {
  background: #3a3a3a;
}

.photocast-light-seg.astro {
  background: #4a4656;
}

.photocast-light-seg.nautical {
  background: #59747b;
}

.photocast-light-seg.blue {
  background: #78a5ad;
}

.photocast-light-seg.early-gold {
  background: #d6b25e;
}

.photocast-light-seg.gold {
  background: #d89b37;
}

.photocast-light-seg.late-gold {
  background: #d6b25e;
}

.photocast-light-seg.soft-morning {
  background: linear-gradient(90deg, #d6b25e 0%, #d9c98e 55%, #e8e4da 100%);
}

.photocast-light-seg.soft-evening {
  background: linear-gradient(90deg, #e8e4da 0%, #d9c98e 45%, #d6b25e 100%);
}

.photocast-light-seg.hard-day {
  background: #e8e4da;
}

.photocast-point {
  position: absolute;
  width: 38px;
  transform: translateX(-50%);
  text-align: center;
  color: #111111;
  line-height: 1.05;
  text-shadow: none;
}

.photocast-point span {
  display: block;
  font-size: 0.98rem;
}

.photocast-point strong {
  display: block;
  font-size: 0.76rem;
}

.photocast-point small {
  display: inline-block;
  margin-top: 2px;
  color: #111111;
  font-size: 0.65rem;
}

.photocast-point .photocast-light-score {
  min-width: 2.2em;
  padding: 1px 4px;
  border-radius: 0;
  background: rgba(241, 238, 230, 0.72);
  color: #111111;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: none;
}

.photocast-point .photocast-light-score.medium {
  background: rgba(232, 228, 218, 0.72);
}

.photocast-point .photocast-light-score.low {
  background: rgba(170, 170, 164, 0.45);
  color: #262626;
}

.photocast-point .photocast-light-score.crisp {
  background: #fff7cc;
  box-shadow: none;
}

.photocast-sun-event {
  position: absolute;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  width: 34px;
  opacity: 1;
  z-index: 8;
  pointer-events: none;
}

.photocast-sun-event::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 22px;
  width: 1px;
  transform: translateX(-50%);
  border-radius: 0;
  background: #111111;
  box-shadow: none;
}

.photocast-sun-event::after {
  display: none;
}

.photocast-sun-event .sun-disc {
  display: none;
}

.photocast-sun-event i {
  display: none;
}

.photocast-sun-event .sun-time {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  color: #111111;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  padding: 2px 4px;
  border-radius: 0;
  background: rgba(232, 228, 218, 0.94);
  box-shadow: none;
  text-shadow: none;
}

.photocast-axis {
  position: relative;
  height: 28px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0;
  background: var(--panel);
}

.photocast-time {
  position: absolute;
  top: 7px;
  transform: translateX(-50%);
  color: #7a766e;
  font-size: 0.58rem;
  white-space: nowrap;
}

.photocast-time::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -8px;
  width: 1px;
  height: 7px;
  background: rgba(94, 94, 90, 0.45);
}

.photocast-time.quarter {
  color: transparent;
}

.photocast-time.half {
  top: 3px;
  color: #8b867c;
  font-size: 0.46rem;
  font-weight: 600;
}

.photocast-time.quarter::before {
  height: 3px;
  background: rgba(94, 94, 90, 0.22);
}

.photocast-time.half::before {
  top: -4px;
  height: 4px;
  background: rgba(94, 94, 90, 0.32);
}

.photocast-phase-label-layer,
.photocast-phase-label {
  position: absolute;
  inset: 0;
}

.photocast-phase-label {
  top: 0;
  bottom: 0;
  right: auto;
  overflow: hidden;
}

.photocast-phase-label b {
  position: absolute;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%) rotate(-90deg);
  transform-origin: center;
  white-space: nowrap;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0.72;
  text-shadow: none;
}

.photocast-phase-label.night b { color: #d6d3cc; }
.photocast-phase-label.astro b { color: #cdc8dc; }
.photocast-phase-label.nautical b { color: #d2e0e2; }
.photocast-phase-label.blue b { color: #134f5c; }
.photocast-phase-label.early-gold b { color: #62450b; }
.photocast-phase-label.gold b { color: #5f3b08; }
.photocast-phase-label.late-gold b { color: #62450b; }
.photocast-phase-label.soft-morning b,
.photocast-phase-label.soft-evening b { color: #6f5a16; }
.photocast-phase-label.hard-day b { color: #8b867c; }

.map-card {
  margin-top: 14px;
}

.map-card h2 {
  margin-top: 0;
}

.weather-map-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.weather-map-head h2 {
  margin: 0;
}

.weather-map-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.weather-layer {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 7px 9px;
  font-size: 0.82rem;
}

.weather-layer.active {
  background: var(--accent);
  color: #f7f4ec;
}

.weather-layer:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.overview-map {
  width: 100%;
  height: 360px;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  background: var(--panel);
}

.map-card iframe.overview-map,
.weather-map-canvas {
  display: block;
}

.dwd-radar-panel {
  border: 1px solid var(--line);
  border-top: 0;
  padding: 8px;
  background: rgba(247, 244, 236, 0.64);
}

.dwd-radar-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
  font-size: 0.82rem;
}

.dwd-radar-panel-head strong {
  margin-right: auto;
}

.dwd-radar-panel-head label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}

.dwd-radar-panel-head select {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 4px 6px;
  font: inherit;
}

.radar-play {
  padding: 5px 10px;
}

.radar-frame-track {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.radar-frame-dot {
  flex: 0 0 auto;
  border: 1px solid rgba(21, 21, 21, 0.2);
  background: rgba(255, 255, 255, 0.38);
  color: var(--muted);
  min-width: 42px;
  padding: 4px 5px;
  font-size: 0.68rem;
  line-height: 1;
}

.radar-frame-dot.active {
  background: var(--accent);
  color: #f7f4ec;
  border-color: var(--accent);
}

.weather-map-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.leaflet-container {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.leaflet-control-attribution {
  font-size: 10px;
}

.precip-field-overlay {
  position: absolute;
  inset: 0;
  z-index: 440;
  pointer-events: none;
  overflow: hidden;
}

.precip-field-dot {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--precip-size, 14px);
  height: var(--precip-size, 14px);
  border-radius: 999px;
  border: 1px solid rgba(4, 70, 118, 0.28);
  background: rgba(67, 158, 212, 0.42);
  color: #07324d;
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(67, 158, 212, 0.12), 0 2px 5px rgba(0, 0, 0, 0.12);
}

.precip-field-dot.light {
  background: rgba(49, 138, 210, 0.5);
}

.precip-field-dot.moderate {
  background: rgba(36, 106, 214, 0.62);
  color: #ffffff;
}

.precip-field-dot.heavy {
  background: rgba(43, 75, 176, 0.72);
  color: #ffffff;
}

.precip-field-dot.extreme {
  background: rgba(94, 45, 156, 0.78);
  color: #ffffff;
}

.daily-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.daily-row:last-child { border-bottom: 0; }

.fun-big {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ok);
}

small { color: var(--muted); }

.models-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.models-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.models-table th,
.models-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
}

.models-table th {
  color: var(--muted);
  font-weight: 600;
}

.badge-ok {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 0;
  background: #0f2a1f;
  color: #86efac;
  font-size: 0.8rem;
}

.unified-calendar-classic {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
}

.uc-head {
  padding: 8px 6px;
  font-weight: 700;
  font-size: 0.82rem;
  text-align: center;
  background: #ded9ce;
  border-right: 1px solid var(--line);
}
.uc-head:last-child { border-right: 0; }
.uc-head.weekend { background: #d5d0c5; color: #151515; }

.uc-cell {
  min-height: 120px;
  padding: 6px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #f1eee6;
}
.uc-cell:nth-child(7n) { border-right: 0; }
.uc-cell.weekend { background: #e9e4da; }
.uc-cell.out { opacity: 0.45; }

.uc-date-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.uc-daynum { font-weight: 800; font-size: 0.95rem; }
.uc-holiday { color: #fca5a5; font-size: 0.66rem; text-align: right; }
.uc-weather { margin-top: 4px; font-size: 0.84rem; }
.uc-pop { color: var(--muted); font-size: 0.70rem; margin-top: 2px; line-height: 1.2; }
.uc-src { color: #64748b; font-size: 0.64rem; margin-top: 2px; text-transform: uppercase; }
.uc-photo { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 6px; }
.uc-photo-item { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; }
.uc-photo-pct { font-size: 0.58rem; color: #94a3b8; line-height: 1; }
.uc-chip { font-size: 0.66rem; border: 1px solid #3a3a3a; border-radius: 0; padding: 0 5px; }
.uc-chip-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-color: color-mix(in oklab, var(--chip), #3a3a3a 45%);
  background: color-mix(in oklab, var(--chip), #f1eee6 70%);
  font-size: 12px;
}
.uc-none { color: #64748b; font-size: 0.8rem; }

body.trend-only .app {
  width: min(100vw, 980px);
  padding: 18px clamp(12px, 3vw, 24px) 34px;
}

body.trend-only header {
  margin-bottom: 10px;
}

body.trend-only h1 {
  font-size: clamp(1.35rem, 5vw, 2.1rem);
}

body.trend-only .subtitle {
  font-size: 0.92rem;
}

body.trend-only .search-card {
  padding: 10px;
  margin-top: 10px;
}

body.trend-only .search-card label,
body.trend-only #searchBtn,
body.trend-only .status {
  display: none !important;
}

body.trend-only .search-row {
  display: block;
  margin-top: 0;
}

body.trend-only .search-input-wrap {
  min-width: 0;
  width: 100%;
}

body.trend-only #cityInput {
  padding-right: 48px;
}

body.trend-only #geoBtn {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 41px;
  height: calc(100% - 2px);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-left: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

body.trend-only #geoBtn:hover,
body.trend-only #geoBtn:focus-visible {
  background: var(--text);
  color: var(--bg);
  outline: 0;
}

body.trend-only #geoBtn.loading {
  color: transparent;
  pointer-events: none;
}

body.trend-only #geoBtn.loading::after {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid var(--line);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

body.trend-only footer,
body.trend-only .content-grid,
body.trend-only #dashboard,
body.trend-only #current,
body.trend-only #hourly,
body.trend-only #fun,
body.trend-only #daily,
body.trend-only #modelCharts,
body.trend-only #models,
body.trend-only #foehn,
body.trend-only #photoCast,
body.trend-only #mapPanel,
body.trend-only #unifiedCalendar {
  display: none !important;
}

body.trend-only #overviewChart {
  display: block;
  margin-top: 12px;
}

body.trend-only #thunderstorm {
  display: block;
  margin-top: 12px;
}

.thunderstorm-card h2 { margin: 2px 0 0; font-size: clamp(1.25rem, 3vw, 1.7rem); }
.thunder-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.thunder-kicker { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.thunder-place { margin: 8px 0 14px; font-weight: 750; }
.thunder-state { border: 1px solid var(--line); padding: 5px 8px; font-size: .75rem; font-weight: 850; text-transform: uppercase; white-space: nowrap; }
.thunder-state.level-blue, .thunder-score.level-blue { background: var(--palette-blue); }
.thunder-state.level-yellow, .thunder-score.level-yellow { background: var(--palette-yellow); }
.thunder-state.level-orange, .thunder-score.level-orange { background: var(--palette-orange); }
.thunder-state.level-red, .thunder-score.level-red { background: var(--palette-red); color: #fff; }
.thunder-state.is-planned { background: var(--panel-soft); }
.thunder-summary { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); background: var(--panel); }
.thunder-summary p { margin: 3px 0 0; color: var(--muted); }
.thunder-score { width: 74px; height: 74px; flex: 0 0 74px; display: grid; place-content: center; text-align: center; border: 1px solid var(--line); }
.thunder-score strong { font-size: 1.7rem; line-height: 1; }
.thunder-score span { font-size: .7rem; font-weight: 750; }
.thunder-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.thunder-metric { padding: 10px; border: 1px solid var(--line); background: var(--panel); }
.thunder-metric > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; }
.thunder-meter { height: 7px; margin-top: 9px; background: var(--panel-soft); border: 1px solid var(--line); }
.thunder-meter i { display: block; height: 100%; background: var(--palette-yellow); }
.thunder-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.thunder-columns > div { display: grid; gap: 3px; padding: 10px; border-left: 4px solid var(--palette-blue); background: var(--panel); }
.thunder-columns span, .thunder-columns small, .thunder-note { color: var(--muted); }
.thunder-method { margin-top: 12px; font-size: .8rem; }
.thunder-method summary { cursor: pointer; font-weight: 750; }
.thunder-method p { line-height: 1.45; }
.thunder-loading { color: var(--muted); font-weight: 700; }

@media (max-width: 620px) {
  .thunder-metrics, .thunder-columns { grid-template-columns: 1fr; }
  .thunder-head { align-items: center; }
  .thunder-summary { align-items: flex-start; }
}

body.trend-only .trend-location {
  margin: 4px 0 14px;
  color: var(--text);
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
}

body.trend-only .trend-current {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 14px;
  color: var(--text);
}

body.trend-only .trend-current-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

body.trend-only .trend-current-icon {
  font-size: 1.35rem;
  line-height: 1;
}

body.trend-only .trend-temp-ring {
  position: relative;
  width: clamp(118px, 13vw, 138px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: var(--muted);
  flex: 0 0 auto;
  overflow: hidden;
}

:is(.trend-temp-icon, .temp-ring-icon) {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.86;
  color: #e3c24e;
}

:is(.trend-temp-icon, .temp-ring-icon)::before,
:is(.trend-temp-icon, .temp-ring-icon)::after {
  content: none;
  position: absolute;
  display: block;
}

:is(.trend-temp-icon, .temp-ring-icon).trend-weather-sun {
  inset: 7%;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, currentColor 0 45%, transparent 46%),
    repeating-conic-gradient(currentColor 0deg 12deg, transparent 12deg 24deg);
}

:is(.trend-temp-icon, .temp-ring-icon).trend-weather-cloud::before,
:is(.trend-temp-icon, .temp-ring-icon).trend-weather-rain::before,
:is(.trend-temp-icon, .temp-ring-icon).trend-weather-snow::before,
:is(.trend-temp-icon, .temp-ring-icon).trend-weather-storm::before {
  left: 7%;
  right: 7%;
  bottom: 24%;
  height: 38%;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    18px -18px 0 8px currentColor,
    42px -12px 0 10px currentColor;
}

:is(.trend-temp-icon, .temp-ring-icon).trend-weather-cloud,
:is(.trend-temp-icon, .temp-ring-icon).trend-weather-rain,
:is(.trend-temp-icon, .temp-ring-icon).trend-weather-storm {
  color: #b9c0c3;
}

:is(.trend-temp-icon, .temp-ring-icon).trend-weather-rain::after {
  left: 20%;
  right: 16%;
  bottom: 3%;
  height: 34%;
  background: repeating-linear-gradient(110deg, transparent 0 12px, #78a8bb 12px 15px, transparent 15px 24px);
}

:is(.trend-temp-icon, .temp-ring-icon).trend-weather-snow {
  color: #c6d8df;
}

:is(.trend-temp-icon, .temp-ring-icon).trend-weather-snow::after {
  left: 17%;
  right: 13%;
  bottom: 3%;
  height: 32%;
  background:
    radial-gradient(circle, #d8e7ec 0 3px, transparent 4px) 0 0 / 22px 18px,
    radial-gradient(circle, #d8e7ec 0 2px, transparent 3px) 11px 8px / 24px 20px;
}

:is(.trend-temp-icon, .temp-ring-icon).trend-weather-fog {
  inset: 17% 8% 12%;
  color: #b8c0bf;
  background:
    linear-gradient(currentColor 0 0) 8% 24% / 76% 5px no-repeat,
    linear-gradient(currentColor 0 0) 21% 43% / 72% 5px no-repeat,
    linear-gradient(currentColor 0 0) 5% 62% / 82% 5px no-repeat,
    linear-gradient(currentColor 0 0) 24% 81% / 58% 5px no-repeat;
  border-radius: 999px;
}

:is(.trend-temp-icon, .temp-ring-icon).trend-weather-storm::after {
  left: 38%;
  top: 38%;
  width: 24%;
  height: 45%;
  background: #d2b43f;
  clip-path: polygon(38% 0, 100% 0, 66% 38%, 100% 38%, 24% 100%, 44% 53%, 0 53%);
}

.trend-temp-ring {
  position: relative;
  width: clamp(118px, 13vw, 138px);
  aspect-ratio: 1;
  color: var(--muted);
  flex: 0 0 auto;
  overflow: hidden;
}

.trend-temp-ring .weather-badge-highlow {
  font-size: clamp(0.6rem, 0.72vw, 0.68rem);
}

.trend-temp-ring .weather-badge-values {
  --badge-line-offset: 23px;
}

.trend-temp-ring .weather-badge-temp {
  top: 50%;
  font-size: clamp(1.52rem, 1.95vw, 1.88rem);
  color: var(--palette-orange);
}

.trend-temp-ring .weather-badge-feels {
  min-height: 1em;
  font-size: clamp(0.57rem, 0.68vw, 0.64rem);
}

body.trend-only .trend-condition {
  font-size: 1rem;
  font-weight: 700;
}

body.trend-only .trend-current-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
}

body.trend-only .trend-warning {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  flex-basis: 100%;
  padding-left: calc(clamp(118px, 13vw, 138px) + 14px);
}

body.trend-only .trend-warning.is-active {
  color: var(--muted);
}

body.trend-only .trend-warning.is-active.level-1,
body.trend-only .trend-warning.is-active.level-2 {
  color: var(--palette-yellow);
}

body.trend-only .trend-warning.is-active.level-3 {
  color: var(--palette-orange);
}

body.trend-only .trend-warning.is-active.level-4 {
  color: var(--palette-red);
}

body.trend-only .trend-warning.is-active.level-5 {
  color: var(--palette-purple);
}

body.trend-only .trend-current-meta-mobile {
  display: none;
}

.calendar-shell {
  border: 1px solid var(--line);
  background: var(--card);
}

.calendar-topline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.calendar-topline h2 {
  margin: 0;
  font-size: clamp(1.1rem, 3.6vw, 1.65rem);
}

.calendar-topline p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.week-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.week-controls span {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.week-controls button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 7px 9px;
  font-size: 0.82rem;
}

.week-controls button:disabled {
  opacity: 0.42;
  cursor: default;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.day-tab {
  position: relative;
  display: grid;
  min-height: 98px;
  align-content: start;
  gap: 4px;
  padding: 9px 7px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.day-tab:last-child {
  border-right: 0;
}

.day-tab.weekend {
  background: #e6dfd2;
}

.day-tab.holiday {
  box-shadow: inset 0 4px 0 #d62828;
}

.day-tab.active {
  background: #f7f4ec;
  box-shadow: inset 0 -4px 0 #1f9ed6;
}

.day-name {
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.day-date {
  font-size: 0.86rem;
  font-weight: 700;
}

.day-weather {
  margin-top: 4px;
  font-size: 0.9rem;
}

.day-signal {
  position: absolute;
  right: 7px;
  bottom: 7px;
  font-size: 1rem;
}

.day-holiday {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #b91c1c;
  font-size: 0.62rem;
  white-space: nowrap;
}

.day-detail {
  min-height: clamp(260px, 42vh, 520px);
  padding: clamp(16px, 4vw, 34px);
  background: #f7f4ec;
}

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

.day-detail-head span {
  color: var(--muted);
  font-size: 0.88rem;
}

.day-detail h3 {
  margin: 3px 0 0;
  font-size: clamp(2.1rem, 10vw, 4.8rem);
  line-height: 0.95;
}

.day-detail-weather {
  max-width: 42%;
  text-align: right;
  font-size: clamp(1rem, 4vw, 1.8rem);
  font-weight: 800;
}

.event-list {
  display: grid;
  gap: 10px;
  max-width: 560px;
}

.event-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--event), #f7f4ec 78%);
  padding: 12px;
}

.event-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: #f7f4ec;
  font-size: 1.25rem;
}

.event-card strong {
  display: block;
  font-size: 1rem;
}

.event-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.empty-day {
  color: var(--muted);
  font-size: clamp(1.05rem, 4vw, 1.45rem);
  font-weight: 700;
}

@media (max-width: 1000px) {
  .unified-calendar-classic {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    border-radius: 0;
    border: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  body.trend-only .trend-current {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
  }

  body.trend-only .trend-current-main {
    gap: 7px;
  }

  body.trend-only .trend-current-icon {
    font-size: 1.2rem;
  }

  body.trend-only .trend-temp-ring {
    width: 118px;
  }

  body.trend-only .trend-condition {
    font-size: 0.92rem;
  }

  body.trend-only .trend-current-meta {
    font-size: 0.82rem;
  }

  body.trend-only .trend-warning {
    padding-left: 0;
    font-size: 0.8rem;
  }

  body.trend-only .trend-current-meta-desktop {
    display: none;
  }

  body.trend-only .trend-current-meta-mobile {
    display: block;
  }

  .calendar-topline {
    align-items: stretch;
    flex-direction: column;
  }

  .week-controls {
    justify-content: space-between;
  }

  .week-strip {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .day-tab {
    min-height: 88px;
    padding: 8px 5px;
  }

  .day-name {
    font-size: 0.66rem;
  }

  .day-date,
  .day-weather {
    font-size: 0.74rem;
  }

  .day-holiday {
    display: none;
  }

  .day-detail-head {
    display: block;
  }

  .day-detail-weather {
    max-width: none;
    margin-top: 10px;
    text-align: left;
  }
}

@media (max-width: 430px) {
  body.trend-only .search-row {
    display: block;
  }

  body.trend-only .search-input-wrap {
    min-width: 0;
  }

  .week-controls button {
    padding: 7px 6px;
    font-size: 0.74rem;
  }

  .week-controls span {
    order: -1;
    width: 100%;
    text-align: center;
  }
}

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

.photo-item {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
  background: var(--panel);
}

.photo-item .title {
  color: var(--muted);
  font-size: 0.85rem;
}

.photo-item .score {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 4px;
}

.phenomena-stack {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.phenomenon-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
}

.phenomenon-main {
  font-size: 1.02rem;
  font-weight: 700;
}

.phenomenon-prob {
  font-size: 1.15rem;
  font-weight: 800;
  color: #bae6fd;
}

.phenomenon-row.none .phenomenon-main {
  color: var(--muted);
}

.phenomenon-row.none .phenomenon-prob {
  color: var(--muted);
}

.foehn-strong { color: #93c5fd; font-weight: 700; }
.foehn-good { color: #86efac; font-weight: 700; }
.foehn-weak { color: #fca5a5; font-weight: 700; }

.mode-toggle {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 10px;
}

.mode-toggle button {
  background: var(--panel-soft);
  color: var(--text);
}

.mode-toggle button.active {
  background: var(--accent);
  color: #f7f4ec;
}

.aurora-box {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 10px;
  background: var(--panel);
  font-size: 0.9rem;
}

.aurora-box summary {
  cursor: pointer;
  font-size: 0.86rem;
}

.aurora-muted {
  color: #97a3b8;
  border-color: #293245;
}

.aurora-warn {
  color: #c7d2fe;
  border-color: #475569;
}

.aurora-hot {
  color: #fde68a;
  border-color: #f59e0b;
  box-shadow: none;
}

.model-chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.model-chart-block {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 8px;
  background: var(--panel);
  overflow-x: hidden;
}

.model-chart-block h3 {
  margin: 0 0 6px 0;
  font-size: 0.95rem;
  color: #cbd5e1;
}

.model-chart-svg {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.overview-chart-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  padding: 6px;
}

.trend-source-details {
  margin: -2px 0 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.trend-source-details summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.trend-source-details summary::-webkit-details-marker {
  display: none;
}

.trend-source-details summary span {
  width: 16px;
  height: 16px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 800;
}

.trend-source-details p {
  margin: 5px 0 0 22px;
  line-height: 1.4;
}

.overview-chart-svg {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.model-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
}

.model-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cbd5e1;
  font-size: 0.85rem;
}

.model-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 0;
  display: inline-block;
}

.icon-credit {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.icon-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 980px) {
  .models-table {
    font-size: 0.88rem;
  }

  .models-table th,
  .models-table td {
    padding: 6px 6px;
    white-space: nowrap;
  }
}

.hour-row {
  display: grid;
  grid-template-columns: 72px 72px 170px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.85rem;
}

.hourly-list { display: grid; gap: 2px; }
