/* Sodak skin - homepage */
/* Now */
.now { display: flex; flex-direction: column; }
.now-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.big-temp { font-size: 112px; font-weight: 300; letter-spacing: -0.06em; line-height: 0.9; margin: 4px 0 0 -6px; }
.big-temp .dec { font-size: 44px; letter-spacing: -0.03em; color: var(--muted); vertical-align: top; position: relative; top: 10px; margin-left: 4px; }
.big-temp .deg { font-size: 52px; color: var(--faint); vertical-align: top; position: relative; top: 4px; font-weight: 300; }
.now-icon { width: 76px; height: 76px; color: var(--text); flex: none; margin-top: 4px; }
.cond { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; margin-top: 18px; }
.feels { color: var(--muted); margin-top: 2px; font-size: 14px; }
.hilo { display: flex; gap: 22px; margin-top: 14px; font-size: 13.5px; }
.hilo b { font-weight: 500; }
.hilo span.muted { font-size: 12.5px; margin-left: 4px; }
.arrow { color: var(--faint); margin-right: 4px; }
.now-spark { margin-top: auto; padding-top: 20px; }
.now-spark svg { width: 100%; height: 56px; }
.now-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); margin: 16px -20px -20px; }
.now-stats > div { padding: 14px 20px; min-width: 0; }
.now-stats > div + div { border-left: 1px solid var(--border); }
.now-stats .k { font-size: 12px; color: var(--muted); }
.now-stats .v { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; margin-top: 2px; white-space: nowrap; }
.now-stats .v small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 3px; }

/* Chart */
.chart-tile { display: flex; flex-direction: column; }
.seg { display: inline-flex; background: var(--track); border-radius: 9px; padding: 2px; }
.seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 500;
  padding: 4px 12px; border-radius: 7px; cursor: pointer; transition: all .15s; }
.seg button.on { background: var(--tile-solid); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--border); }
.chart-stats { display: flex; gap: 28px; margin-bottom: 6px; flex-wrap: wrap; }
.cs .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.cs .v { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.cs .v small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; letter-spacing: 0; }
.sw { width: 10px; height: 2px; border-radius: 2px; background: var(--accent); }
.sw.dew { background: var(--dew); }
.sw.fc { background: repeating-linear-gradient(90deg, var(--accent) 0 3px, transparent 3px 5px); }
#chart { flex: 1; min-height: 270px; margin: 0 -6px -8px -4px; }

/* Hourly */
.hourly { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.hour { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 2px; position: relative; }
.hour + .hour::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--border); }
.hour .t { font-size: 12.5px; color: var(--muted); }
.hour.first .t { color: var(--text); font-weight: 500; }
.hour svg { width: 28px; height: 28px; color: var(--text); }
.hour .temp { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.hour .pop { font-size: 11.5px; color: var(--accent); font-family: var(--mono); height: 15px; display: flex; align-items: center; gap: 3px; }
.hour .pop.none { color: var(--faint); }
.hour .pop svg { width: 8px; height: 8px; color: var(--accent); }

/* Radar */
.radar { display: flex; flex-direction: column; }
.map-box { position: relative; flex: 1; min-height: 380px; margin: 0 -20px -20px; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden;
  border-top: 1px solid var(--border); background: var(--track); }
#map { position: absolute; inset: 0; background: transparent; font-family: var(--sans); }
.legend { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.legend .ramp { width: 96px; height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, #04e9e7, #019ff4, #02fd02, #01c501, #fdf802, #fd9500, #fd0000, #bc0000, #f800fd); }
.map-msg { position: absolute; inset: 0; display: none; place-items: center; text-align: center; padding: 24px; z-index: 500;
  color: var(--muted); font-size: 13.5px; background: var(--tile); }
.map-msg b { display: block; color: var(--text); font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.map-box.failed .map-msg { display: grid; }
.radar-note { position: absolute; left: 12px; bottom: 12px; z-index: 450; display: none; font-size: 12px; padding: 4px 9px; border-radius: 8px;
  background: var(--tile-solid); color: var(--muted); box-shadow: 0 0 0 1px var(--border); }
.map-box.no-radar .radar-note { display: block; }
.stn { position: relative; width: 16px; height: 16px; }
.stn i { position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2.5px #fff, 0 2px 6px rgba(0,0,0,.35); }
.stn::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: var(--accent); opacity: .25; animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.4); opacity: .45; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .stn::before { animation: none; } }
.stn-label { font-family: var(--sans); font-size: 12px; font-weight: 600; color: #121316; white-space: nowrap;
  background: rgba(255,255,255,.92); padding: 2px 7px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.18); transform: translate(14px, -50%); }
.leaflet-container .leaflet-control-attribution { font-family: var(--sans); font-size: 10.5px; background: color-mix(in srgb, var(--tile-solid) 85%, transparent); color: var(--muted); }
.leaflet-container .leaflet-control-attribution a { color: var(--muted); text-decoration: underline; }
.leaflet-bar { border: 0 !important; box-shadow: 0 0 0 1px var(--border), 0 2px 8px rgba(0,0,0,.12) !important; border-radius: 10px !important; overflow: hidden; }
.leaflet-bar a { background: var(--tile-solid) !important; color: var(--text) !important; border-bottom-color: var(--border) !important; width: 30px !important; height: 30px !important; line-height: 30px !important; }

/* 7 day */
.days { display: flex; flex-direction: column; }
.day { display: grid; grid-template-columns: 60px 30px 40px 32px minmax(40px, 1fr) 32px; align-items: center; gap: 12px; height: 54px; }
.day + .day { border-top: 1px solid var(--border); }
.day .dn { font-weight: 500; font-size: 14px; }
.day .dn small { display: block; font-weight: 400; color: var(--faint); font-size: 11.5px; margin-top: -1px; }
.day svg { width: 26px; height: 26px; color: var(--text); }
.day .pp { font-family: var(--mono); font-size: 11.5px; color: var(--accent); }
.day .pp.none { color: var(--faint); }
.day .lo { color: var(--muted); text-align: right; font-size: 14px; }
.day .hi { font-weight: 500; font-size: 14px; }
.bar { position: relative; height: 6px; border-radius: 6px; background: var(--track); }
.bar i { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, var(--accent-mid), var(--accent)); }
.bar b { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--tile-solid); border: 2px solid var(--text); transform: translate(-50%, -50%); }

/* Metric tiles */
.metric { display: flex; flex-direction: column; min-height: 176px; padding: 18px; }
.metric .t-head { margin-bottom: 10px; }
.ms { font-size: 12.5px; color: var(--muted); margin-top: 5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.scale { position: relative; height: 6px; display: flex; gap: 2px; }
.scale span { flex: 1; border-radius: 2px; background: var(--track); }
.scale span.on { background: var(--accent); }
.scale .pin { position: absolute; top: -4px; width: 2px; height: 14px; border-radius: 2px; background: var(--text); box-shadow: 0 0 0 2px var(--tile-solid); }
.scale-l { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); margin-top: 7px; font-family: var(--mono); }
.trend { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 1px 8px 1px 6px; border-radius: 999px; background: var(--track); color: var(--muted); }
.badge { display: inline-flex; align-items: center; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); font-weight: 500; }

/* Sun & Moon */
.sun svg { width: 100%; height: auto; overflow: visible; }
.sun-l { display: flex; justify-content: space-between; margin-top: 6px; }
.sun-l .k { font-size: 12px; color: var(--muted); }
.sun-l .v { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.sun-l .r { text-align: right; }
.moon { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 150px); align-items: center; gap: 16px;
  border-top: 1px solid var(--border); margin-top: 18px; padding-top: 16px; }
.moon svg { width: 52px; height: 52px; }
.moon-name { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.moon-ill { font-size: 12.5px; color: var(--muted); }

/* Records */
.rec-tile { display: flex; flex-direction: column; }
.recs { display: flex; flex-direction: column; flex: 1; justify-content: space-around; }
.rec { display: grid; grid-template-columns: 84px 92px minmax(0, 1fr) 92px; align-items: center; gap: 18px; padding: 15px 0; }
.rec + .rec { border-top: 1px solid var(--border); }
.rec .name { font-weight: 500; font-size: 14px; }
.rec .name small { display: block; font-weight: 400; color: var(--faint); font-size: 11.5px; }
.rec .v { font-size: 22px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; }
.rec .w { font-size: 11.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; }
.rec .lo { text-align: right; }
.rec .bar { height: 6px; }
.rec .bar b { width: 2px; height: 14px; border-radius: 2px; border: 0; background: var(--text); box-shadow: 0 0 0 2px var(--tile-solid); }
.rec-axis { display: grid; grid-template-columns: 84px 92px minmax(0, 1fr) 92px; gap: 18px; font-family: var(--mono); font-size: 10.5px; color: var(--faint); padding-top: 4px; }
.rec-axis span { display: flex; justify-content: space-between; grid-column: 3; }

/* Quake */
.quake { display: flex; align-items: center; gap: 14px; padding: 14px 20px; font-size: 13.5px; }
.quake .mag { font-family: var(--mono); font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 6px; background: var(--track); white-space: nowrap; }
.quake .place { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quake .q-right { margin-left: auto; color: var(--muted); white-space: nowrap; font-size: 12.5px; display: flex; gap: 16px; }
.metric.wind .compass { width: 48px; height: 48px; color: var(--faint); flex: none; }
.wind-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.now-cond-wrap:empty { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .big-temp { font-size: 96px; }
  .big-temp .dec { font-size: 36px; }
  .big-temp .deg { font-size: 44px; }
  .now-icon { width: 64px; height: 64px; }
  .now-stats { margin: 16px -16px -16px; }
  .now-stats > div { padding: 12px 14px; }
  .now-stats .v { font-size: 15.5px; }
  .hilo { gap: 16px; flex-wrap: wrap; }
  #chart { min-height: 230px; }
  .chart-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  .cs .v { font-size: 19px; }
  .hourly { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 10px; }
  .hour:nth-child(7)::before { display: none; }
  .hour:nth-child(n+7) { border-top: 1px solid var(--border); padding-top: 14px; }
  .hour:nth-child(n+7)::before { top: 22px; }
  .map-box { min-height: 320px; margin: 0 -16px -16px; }
  .day { grid-template-columns: 50px 26px 36px 28px minmax(30px, 1fr) 28px; gap: 10px; height: 50px; }
  .metric { min-height: 160px; padding: 16px; }
  .moon { grid-template-columns: auto minmax(0, 1fr); }
  .moon .kvs { grid-column: 1 / -1; }
  .rec { grid-template-columns: 64px minmax(0, 1fr) 64px; grid-template-areas: "n n n" "lo bar hi"; gap: 8px 12px; }
  .rec .name { grid-area: n; display: flex; justify-content: space-between; align-items: baseline; }
  .rec .name small { display: inline; }
  .rec .lo { grid-area: lo; text-align: left; } .rec .bar { grid-area: bar; } .rec .hi { grid-area: hi; text-align: right; }
  .rec .v { font-size: 19px; }
  .rec .w { font-size: 11px; }
  .rec-axis { grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 12px; }
  .rec-axis span { grid-column: 2; }
  .quake { flex-wrap: wrap; gap: 6px 10px; padding: 14px 16px; }
  .quake .place { flex: 1 1 calc(100% - 80px); }
  .quake .q-right { margin-left: 0; width: 100%; }
  .metric.wind .compass { width: 36px; height: 36px; }
}
