/* Ported StudioM4 WX dashboard, scoped to .wxdash */
.wxdash {
  --bg: #07110e;
  --bg-2: #0c1a16;
  --panel: rgba(14, 32, 27, 0.78);
  --panel-solid: #10241e;
  --line: rgba(126, 176, 150, 0.22);
  --line-strong: rgba(184, 149, 108, 0.45);
  --moss: #3f7a58;
  --moss-hi: #6dad86;
  --cedar: #c4a06a;
  --cedar-dim: #8a6d42;
  --fog: #c9d6cf;
  --fog-dim: #8aa198;
  --strait: #7eb0c4;
  --strait-dim: #3d6d80;
  --ember: #e8c56a;
  --rain: #8ec4d4;
  --forecast: #e03a3a;
  --server: #9b6bff;
  --indoor: #5cb8a8;
  --warn: #e07a5f;
  --ok: #7dca9a;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --sans: "Liberation Sans", "DejaVu Sans", "Nimbus Sans", ui-sans-serif, system-ui, sans-serif;
  --serif: "URW Bookman", "Liberation Serif", "DejaVu Serif", "Nimbus Roman", Palatino, serif;
  --mono: "DejaVu Sans Mono", "Liberation Mono", "Nimbus Mono PS", ui-monospace, monospace;
}
.wxdash * { box-sizing: border-box; }
.wxdash {
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  max-height: 100dvh;
  overflow: hidden; 
}
.wxdash { background: var(--bg); }
.wxdash {
  margin: 0;
  color: var(--fog);
  font-family: var(--sans);
  background:
    radial-gradient(1200px 520px at 18% -10%, rgba(90, 140, 120, 0.16), transparent 60%),
    radial-gradient(900px 480px at 100% 0%, rgba(70, 110, 140, 0.14), transparent 55%),
    linear-gradient(180deg, #0a1612 0%, var(--bg) 42%, #08140f 100%);
  min-height: 100%;
  min-height: 100dvh;
}
.wxdash .wrap {
  position: relative;
  z-index: 1;
  width: min(1280px, 100%);
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  max-height: 100dvh;
  margin: 0 auto;
  padding: 6px 12px 4px;
  display: grid;
  
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 6px;
  overflow: hidden;
  min-height: 0;
}
.wxdash .top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.wxdash .kicker {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cedar);
  font-weight: 700;
}
.wxdash h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.01em;
  color: #eef4ef;
  line-height: 1.05;
}
.wxdash .where {
  margin-top: 1px;
  color: var(--fog-dim);
  font-size: 11px;
}
.wxdash .where span { color: var(--fog); }
.wxdash .livebox {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.wxdash .live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ok);
  border: 1px solid rgba(125, 202, 154, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(125, 202, 154, 0.08);
}
.wxdash .live.err {
  color: var(--warn);
  border-color: rgba(224, 122, 95, 0.4);
  background: rgba(224, 122, 95, 0.08);
}
.wxdash .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(125, 202, 154, 0.7);
  animation: ping 2.2s ease-out infinite;
}
.wxdash .live.err .pulse { background: var(--warn); animation: none; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(125, 202, 154, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(125, 202, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(125, 202, 154, 0); }
}
.wxdash .clock {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fog);
}
.wxdash .obs {
  font-size: 11px;
  color: var(--fog-dim);
}
.wxdash .hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 6px;
  min-height: 0;
}
.wxdash .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}
.wxdash .card::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 160, 106, 0.35), transparent);
}
.wxdash .temp-card {
  padding: 10px 14px 8px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  align-items: center;
  background:
    linear-gradient(160deg, rgba(196, 160, 106, 0.08), transparent 42%),
    var(--panel);
  min-height: 0;
}
.wxdash .temp-label {
  grid-column: 1 / -1;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cedar);
}
.wxdash .temp-num {
  font-family: var(--serif);
  font-size: 72px;
  line-height: 0.85;
  color: var(--ember);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.wxdash .temp-num small {
  font-size: 26px;
  color: var(--cedar);
  margin-left: 2px;
}
.wxdash #tempin {
  font-family: var(--serif);
  font-size: 72px; 
  line-height: 0.85;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--indoor);
}
.wxdash .mini .v:has(#tempin) {
  line-height: 0.9;
}
.wxdash .mini .v:has(#tempin) em {
  font-size: 26px; 
  color: var(--cedar);
  margin-left: 2px;
}
.wxdash .vs-yest {
  grid-column: 1;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cedar);
  letter-spacing: 0.01em;
  min-height: 1.1em;
}
.wxdash .vs-yest.warmer { color: var(--ember); }
.wxdash .vs-yest.cooler { color: #4ea1ff; }
.wxdash .vs-yest.same { color: var(--fog-dim); }
.wxdash .meta-col {
  grid-column: 2;
  grid-row: 2 / 4;
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: 0;
}
.wxdash .stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
}
.wxdash .stat:last-child { border-bottom: 0; padding-bottom: 0; }
.wxdash .stat .k {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fog-dim);
}
.wxdash .stat .v {
  font-family: var(--serif);
  font-size: 20px;
  color: #eef4ef;
}
.wxdash .stat .v em {
  font-style: normal;
  font-size: 12px;
  color: var(--fog-dim);
  margin-left: 3px;
  font-family: var(--sans);
}
.wxdash .hum-bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 2px;
}
.wxdash .hum-bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--strait-dim), var(--moss-hi));
  border-radius: 99px;
  transition: width 0.6s ease;
}
.wxdash .side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  min-height: 0;
}
.wxdash .wind, .wxdash .radar {
  padding: 8px 10px;
  min-height: 0;
}
.wxdash .card h2 {
  margin: 0 0 4px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cedar);
  font-weight: 700;
}
.wxdash .compass {
  width: 88px;
  height: 88px;
  margin: 0 auto;
  position: relative;
}
.wxdash .compass svg { width: 100%; height: 100%; display: block; }
.wxdash .wind-read {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
  margin-top: 4px;
  font-size: 11px;
}
.wxdash .wind-read b {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  color: #eef4ef;
  font-weight: 600;
}
.wxdash .wind-read span { color: var(--fog-dim); letter-spacing: 0.08em; text-transform: uppercase; font-size: 10px; }
.wxdash .press-inline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--fog-dim);
  margin-top: -2px;
  margin-bottom: 2px;
}
.wxdash .press-inline span {
  letter-spacing: 0.04em;
}
.wxdash .wind-state {
  margin-top: 4px;
  text-align: center;
  font-size: 10px;
  color: var(--fog-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wxdash .radar {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.wxdash .radar-frame {
  flex: 1 1 auto;
  min-height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #07110e;
  border: 1px solid var(--line);
}
.wxdash .radar-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #07110e;
}
.wxdash .radar-meta {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fog-dim);
  letter-spacing: 0.02em;
}
.wxdash .chart-card {
  padding: 6px 10px 4px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.wxdash .chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 4px;
}
.wxdash .legend {
  display: flex;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fog-dim);
}
.wxdash .legend i {
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.wxdash .legend .t { background: var(--ember); }
.wxdash .legend .i { background: var(--indoor); }
.wxdash .legend .s { background: var(--server); }
.wxdash .legend .h { background: var(--strait); }
.wxdash .legend .p { background: var(--strait); }
.wxdash .legend .r { background: var(--ember); }
.wxdash .legend .tf {
  height: 3px;
  border-top: none;
  background: var(--forecast);
  border-radius: 2px;
}
.wxdash .legend .rf {
  width: 14px;
  height: 10px;
  border: 1px solid var(--forecast);
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 2px,
    rgba(224, 58, 58, 0.9) 2px,
    rgba(224, 58, 58, 0.9) 3px
  );
  border-radius: 2px;
}
.wxdash .charts {
  display: grid;
  grid-template-rows: minmax(90px, 1fr) minmax(160px, 1.15fr);
  gap: 6px;
  min-height: 0;
  overflow: hidden;
}
.wxdash .rain-chart-card {
  padding: 6px 10px 4px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.wxdash #rain-chart {
  width: 100%;
  height: 100%;
  min-height: 56px;
  max-height: 110px;
  flex: 0 1 auto;
}
.wxdash #chart {
  width: 100%;
  height: 100%;
  min-height: 90px;
  flex: 1;
}
.wxdash .row {
  display: grid;
  grid-template-columns: 1.15fr 0.7fr 0.95fr 0.65fr 2fr;
  gap: 6px;
  min-height: 0;
}
.wxdash .row .card { padding: 8px 10px 8px; }
.wxdash .rain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 8px;
}
.wxdash .rain-grid .cell .k, .wxdash .mini .k {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog-dim);
}
.wxdash .rain-grid .cell .v, .wxdash .mini .v {
  font-family: var(--serif);
  font-size: 18px;
  color: #eef4ef;
}
.wxdash .rain-grid .cell .v em, .wxdash .mini .v em {
  font-style: normal;
  font-size: 12px;
  color: var(--fog-dim);
  font-family: var(--sans);
  margin-left: 3px;
}
.wxdash .last-rain {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--fog-dim);
  border-top: 1px solid var(--line);
  padding-top: 4px;
  margin-top: 2px;
}
.wxdash .last-rain strong { color: var(--fog); font-weight: 600; }
.wxdash .batt {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wxdash .batt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.wxdash .pill {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.wxdash .pill.ok { color: var(--ok); border-color: rgba(125,202,154,0.4); background: rgba(125,202,154,0.08); }
.wxdash .pill.low { color: var(--warn); border-color: rgba(224,122,95,0.45); background: rgba(224,122,95,0.1); }
.wxdash .mini .k[style*="margin-top"] {
  margin-top: 6px !important;
}
.wxdash footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: var(--fog-dim);
  letter-spacing: 0.04em;
  padding: 0 2px 2px;
  min-height: 0;
}
.wxdash footer a { color: var(--cedar); text-decoration: none; }
.wxdash .errbar {
  display: none;
  color: var(--warn);
  font-size: 12px;
}
.wxdash .errbar.show { display: block; }
@media (max-width: 1100px) {
.wxdash .hero, .wxdash .row { grid-template-columns: 1fr 1fr; }
.wxdash .row .river { grid-column: 1 / -1; min-height: 150px; }
.wxdash .temp-num { font-size: 64px; }
.wxdash #tempin { font-size: 64px; }
.wxdash .wrap { grid-template-rows: auto auto minmax(0, 1fr) auto auto; }
.wxdash, .wxdash .wrap { overflow: auto; max-height: none; height: auto; }
}
@media (max-width: 720px) {
.wxdash .hero, .wxdash .side, .wxdash .row, .wxdash .top { grid-template-columns: 1fr; }
.wxdash .livebox { text-align: left; align-items: flex-start; }
.wxdash .charts { grid-template-rows: 160px minmax(220px, auto); }
.wxdash .legend { flex-wrap: wrap; gap: 6px 10px; }
.wxdash h1 { font-size: 20px; }
.wxdash .forecast-days { grid-template-columns: 1fr 1fr; }
.wxdash .fc-day:last-child { grid-column: 1 / -1; }
.wxdash, .wxdash .wrap { overflow: auto; max-height: none; height: auto; }
}
.wxdash .forecast-card {
  padding: 6px 10px 8px;
  min-height: 0;
}
.wxdash .forecast-days {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  padding-top: 2px;
}
.wxdash .fc-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px 8px;
  background:
    linear-gradient(180deg, rgba(196, 160, 106, 0.07), transparent 48%),
    rgba(16, 36, 30, 0.45);
  min-width: 0;
}
.wxdash .fc-dow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cedar);
  font-weight: 700;
}
.wxdash .fc-hl {
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.05;
  color: #eef4ef;
}
.wxdash .fc-hl b {
  color: var(--ember);
  font-weight: 600;
}
.wxdash .fc-hl span {
  color: var(--strait);
  font-size: 18px;
}
.wxdash .fc-text {
  margin-top: 2px;
  font-size: 11px;
  color: var(--fog);
  line-height: 1.2;
}
.wxdash .fc-rain {
  margin-top: 2px;
  font-size: 10px;
  color: var(--fog-dim);
}
.wxdash .fc-empty {
  color: var(--fog-dim);
  font-size: 13px;
  padding: 12px 4px;
}
.wxdash .rain-chart-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
  overflow: hidden; 
}
.wxdash .rain-forecast-strip {
  border-top: 1px solid var(--line);
  margin-top: 0;
  padding-top: 4px;
  flex: 0 0 auto;
  min-height: 0;
}
.wxdash .rain-fc-head {
  margin-bottom: 0;
}
.wxdash .rain-fc-head h2 {
  font-size: 11px;
  letter-spacing: 0.08em;
}
.wxdash .fc-icon {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 2px;
  height: 28px;
}
.wxdash .fc-icon-svg {
  width: 28px;
  height: 28px;
  display: block;
}
.wxdash .fc-day {
  display: flex;
  flex-direction: column;
}
.wxdash .rain-chart-card .forecast-days {
  padding-top: 2px;
}
.wxdash .rain-chart-card .fc-day {
  padding: 5px 7px 6px;
  background:
    linear-gradient(180deg, rgba(126, 176, 150, 0.08), transparent 50%),
    rgba(16, 36, 30, 0.55);
}
.wxdash .rain-chart-card .fc-hl {
  font-size: 15px;
  margin-top: 2px;
}
.wxdash .rain-chart-card .fc-hl span {
  font-size: 13px;
}
.wxdash .rain-chart-card .fc-text {
  font-size: 11px;
}
.wxdash .row .river {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 8px 10px 6px;
  background:
    linear-gradient(160deg, rgba(126, 176, 196, 0.07), transparent 50%),
    var(--panel);
}
.wxdash .river-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.wxdash .river-head .river-legend { margin-right: auto; }
.wxdash .river-head h2 { white-space: nowrap; }
.wxdash .river-upd {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fog-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wxdash .river.stale .river-upd { color: var(--warn); }
.wxdash .river-body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
}
.wxdash .river-stats {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 78px;
}
.wxdash .river-k {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog-dim);
}
.wxdash .river-v {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 0.95;
  font-weight: 600;
  color: var(--strait);
  letter-spacing: -0.02em;
}
.wxdash .river-v em, .wxdash .river-flow em {
  font-style: normal;
  font-size: 12px;
  color: var(--fog-dim);
  font-family: var(--sans);
  margin-left: 3px;
  letter-spacing: 0;
}
.wxdash .river.stale .river-v { color: var(--fog-dim); }
.wxdash .river-trend {
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fog-dim);
  white-space: nowrap;
}
.wxdash .river-trend.rising { color: var(--ember); }
.wxdash .river-trend.falling { color: var(--rain); }
.wxdash .river-trend.steady { color: var(--ok); }
.wxdash .river-flow {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1;
  font-weight: 600;
  color: var(--moss-hi);
}
.wxdash .river.stale .river-flow { color: var(--fog-dim); }
.wxdash .river-k.rk2 { margin-top: 3px; }
.wxdash .river-k i, .wxdash .river-legend i {
  display: inline-block;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}
.wxdash .rk-h { background: var(--strait); }
.wxdash .rk-q { background: var(--moss-hi); }
.wxdash .rk-m { color: var(--cedar); font-weight: 400; margin-right: 4px; }
.wxdash .river-legend {
  display: flex;
  flex: 0 1 auto;
  gap: 6px;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fog-dim);
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}
.wxdash .river-plot {
  position: relative;
  min-height: 0;
  min-width: 0;
}
.wxdash #river-chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.wxdash .river.stale .river-legend { display: none; }
.wxdash .river.stale .river-trend { color: var(--fog-dim); }
.wxdash #radar-img:not([src]) { visibility: hidden; }

/* paper overrides: no kiosk sizing, document scroll, rounded panel */
.wxdash { height:auto !important; max-height:none !important; overflow:visible !important; border-radius:14px; margin:0 0 18px; padding:2px 0; }
.wxdash .wrap { height:auto !important; max-height:none !important; overflow:visible !important; grid-template-rows:auto !important; padding:10px 12px 8px; gap:10px; }
.wxdash .charts { display:grid; grid-template-rows:auto auto !important; gap:10px; }
.wxdash #chart { width:100%; height:auto; min-height:180px; }
.wxdash #rain-chart { width:100%; height:auto; min-height:110px; max-height:none; }
.wxdash .rain-chart-card { overflow:visible; }
.wxdash h1, .wxdash h2 { border:0; }
.wxdash .wxd-note { font-size:11px; color:var(--fog-dim); }
@media (max-width: 720px) {
  .wxdash .temp-num { font-size:56px; }
  .wxdash #chart { min-height:150px; }
  .wxdash .row { grid-template-columns:1fr 1fr; }
  .wxdash .row .river, .wxdash .row > .card:first-child { grid-column:1 / -1; }
  .wxdash footer { flex-direction:column; }
  .wxdash .temp-card { grid-template-columns:1fr !important; }
  .wxdash .temp-card .meta-col { min-width:0; }
  .wxdash .rain-chart-card .forecast-days, .wxdash .forecast-days { grid-template-columns:1fr 1fr !important; }
  .wxdash .chart-card, .wxdash .rain-chart-card { overflow-x:auto !important; -webkit-overflow-scrolling:touch; }
  .wxdash #chart, .wxdash #rain-chart { min-width:760px; }
  .wxdash .chart-card::after { content:"swipe ↔ for full 72h + 72h"; display:block; font-size:10px; color:var(--fog-dim); }
}
