:root {
  --ink: #143c3a;
  --muted: #69817f;
  --line: rgba(20, 60, 58, .12);
  --paper: rgba(255, 255, 255, .82);
  --teal: #087f76;
  --teal-dark: #08645f;
  --mint: #dff4ee;
  --sun: #f4b452;
  --blue: #5a98bd;
  --danger: #b85248;
  --state: #e89e3e;
  --shadow: 0 24px 70px rgba(30, 78, 74, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(145deg, #f9fbf5, #edf8f5 52%, #f8f3e7);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .23;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}

body[data-level="cold"] { --state: #639abc; }
body[data-level="mild"] { --state: #38a178; }
body[data-level="warm"] { --state: #e89e3e; }
body[data-level="hot"] { --state: #d85f4f; }

button, input { font: inherit; }
button { color: inherit; }
button, a, summary, input[type="range"] { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(8, 127, 118, .25);
  outline-offset: 2px;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}

.ambient-one {
  top: -18rem;
  left: -12rem;
  background: rgba(152, 225, 210, .33);
}

.ambient-two {
  right: -17rem;
  bottom: -20rem;
  background: rgba(244, 180, 82, .16);
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 24px;
  align-items: center;
  padding: 24px 0;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  border-radius: 13px;
  background: var(--teal);
  box-shadow: 0 8px 20px rgba(8, 127, 118, .2);
}

.brand-mark svg { width: 21px; }

.view-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  max-width: 510px;
  margin: 0 auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.52);
  backdrop-filter: blur(18px);
}

.view-switcher button {
  display: flex;
  min-width: 0;
  height: 52px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.view-switcher button[aria-pressed="true"] {
  color: var(--teal-dark);
  background: #fff;
  box-shadow: 0 5px 16px rgba(25, 71, 67, .1);
}

.view-switcher svg {
  width: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.view-switcher button:first-child svg { fill: currentColor; stroke: none; }
.view-switcher span { min-width: 0; text-align: left; }
.view-switcher strong, .view-switcher small { display: block; white-space: nowrap; }
.view-switcher strong { font-size: 12px; }
.view-switcher small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 600; }

.global-units {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.mini-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.48);
}

.mini-switch button {
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.mini-switch button.active {
  color: var(--teal-dark);
  background: #fff;
  box-shadow: 0 3px 9px rgba(20,60,58,.1);
}

.wind-switch button { min-width: 42px; }

main { min-height: calc(100vh - 180px); }
.view-panel { padding: 50px 0 32px; animation: panel-in .35s ease both; }
.view-panel[hidden] { display: none !important; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 15px;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 25px;
  height: 1px;
  background: currentColor;
}

.surface {
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 27px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.section-heading > div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.section-heading h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -.02em;
}

.step {
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.live-badge {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.live-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #27a978;
  box-shadow: 0 0 0 4px rgba(39,169,120,.1);
}

/* Quick view */

.quick-view { padding-top: 38px; }

.quick-intro {
  max-width: 680px;
  margin: 0 auto 34px;
  text-align: center;
}

.quick-intro .eyebrow { justify-content: center; }

.quick-intro h1 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(44px, 5.3vw, 68px);
  font-weight: 500;
  letter-spacing: -.065em;
  line-height: 1.05;
}

.quick-intro h1 em { color: var(--teal); font-style: normal; }

.quick-intro > p:last-child {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.quick-layout {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 18px;
  max-width: 940px;
  margin: 0 auto;
}

.quick-inputs,
.quick-result { padding: 28px; }

.input-grid {
  display: grid;
  gap: 12px;
  margin-top: 25px;
}

.input-grid.two { grid-template-columns: 1fr 1fr; }

.field > span:first-child,
.label-row > span:first-child {
  display: block;
  margin: 0 0 8px 2px;
  color: #58706d;
  font-size: 11px;
  font-weight: 800;
}

.input-box {
  display: flex;
  height: 58px;
  align-items: center;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.75);
}

.input-box:focus-within,
.pro-input:focus-within {
  border-color: rgba(8,127,118,.48);
  box-shadow: 0 0 0 4px rgba(8,127,118,.07);
}

.input-box input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 780;
  border: 0;
  outline: 0;
  background: transparent;
}

input[type="number"]::-webkit-inner-spin-button { appearance: none; }

.input-box b {
  color: #78908d;
  font-size: 11px;
  white-space: nowrap;
}

.wind-block { margin-top: 20px; }

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.wind-reading {
  display: flex;
  gap: 5px;
  align-items: baseline;
  color: var(--ink);
  font-size: 13px;
}

.wind-reading em {
  margin-right: 4px;
  color: var(--teal);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.wind-reading i {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.wind-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.wind-presets button {
  min-height: 38px;
  padding: 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.54);
  cursor: pointer;
}

.wind-presets button.active {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.range {
  width: 100%;
  height: 4px;
  margin: 20px 0 4px;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal) var(--range-pct, 10%), rgba(20,60,58,.11) var(--range-pct, 10%));
  cursor: pointer;
}

.range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  appearance: none;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 2px 8px rgba(20,60,58,.25);
}

.range::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 2px 8px rgba(20,60,58,.25);
}

.validation-message {
  min-height: 16px;
  margin: 9px 0 0;
  color: var(--danger);
  font-size: 10px;
  line-height: 1.5;
}

.level-pill {
  padding: 7px 11px;
  color: var(--state);
  font-size: 10px;
  font-weight: 850;
  border-radius: 999px;
  background: color-mix(in srgb, var(--state) 13%, white);
}

.hero-result {
  margin-top: 25px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.hero-result > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .07em;
}

.hero-result output {
  display: block;
  margin: 5px 0 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px;
  line-height: 1;
  letter-spacing: -.055em;
}

output small {
  margin-left: 4px;
  color: var(--muted);
  font-family: Inter, sans-serif;
  font-size: .32em;
  font-weight: 750;
  letter-spacing: 0;
}

.hero-result p,
.gauge-delta {
  margin: 0;
  color: var(--state);
  font-size: 11px;
  font-weight: 800;
}

.comfort-scale { margin-top: 20px; }

.scale-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.scale-track {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #78a9c6, #83c6a4 42%, #efc05f 72%, #dc6b55);
}

.scale-track i {
  position: absolute;
  top: 50%;
  left: var(--scale-position, 68%);
  width: 15px;
  height: 15px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--state);
  box-shadow: 0 2px 8px rgba(20,60,58,.25);
  transform: translate(-50%, -50%);
  transition: left .3s ease;
}

.quick-secondary {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
}

.quick-secondary div {
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.quick-secondary span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.quick-secondary strong {
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 500;
}

.quick-secondary p {
  margin: 0;
  color: #4f6d69;
  font-size: 10px;
  line-height: 1.65;
}

.method {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.method summary {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.method p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

/* Dashboard */

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 30px;
}

.panel-heading h1 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(36px, 4.5vw, 54px);
  font-weight: 500;
  letter-spacing: -.05em;
}

.panel-heading > p {
  max-width: 310px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: right;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 16px;
}

.gauge-card {
  display: flex;
  grid-row: span 2;
  min-height: 510px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 35px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--state) 13%, white), transparent 48%),
    var(--paper);
}

.gauge {
  display: grid;
  width: min(310px, 82%);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from 225deg, var(--state) 0 var(--gauge-pct, 64%), rgba(20,60,58,.07) var(--gauge-pct, 64%) 75%, transparent 75%);
  transition: background .3s ease;
}

.gauge::before {
  content: "";
  position: absolute;
}

.gauge-inner {
  display: grid;
  width: 78%;
  aspect-ratio: 1;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: rgba(255,255,255,.86);
  box-shadow: inset 0 0 30px rgba(20,60,58,.04);
}

.gauge-inner > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.gauge-inner output {
  margin: 7px 0 9px;
  font-family: Georgia, serif;
  font-size: clamp(43px, 5vw, 61px);
  letter-spacing: -.06em;
}

.gauge-inner b { color: var(--state); font-size: 11px; }
.gauge-delta { margin-top: 22px; }

.meter-row {
  display: grid;
  width: min(310px, 82%);
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 28px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.meter-row div {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20,60,58,.09);
}

.meter-row i {
  display: block;
  width: var(--scale-position, 68%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #78a9c6, #83c6a4, #efc05f, #dc6b55);
}

.dashboard-controls { padding: 28px 30px; }

.slider-field {
  display: block;
  margin-top: 24px;
}

.slider-field > span {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.slider-field b { font-size: 11px; }

.slider-field output {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.slider-field output i { font-style: normal; }
.slider-field output small { color: var(--muted); font-size: 9px; }
.slider-field .range { margin-top: 13px; }

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.insight {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px 1fr;
  gap: 11px;
  align-items: center;
  padding: 18px;
  border-radius: 20px;
  box-shadow: 0 14px 35px rgba(30,78,74,.08);
}

.insight-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--teal);
  font-family: Georgia, serif;
  font-size: 23px;
  border-radius: 13px;
  background: var(--mint);
}

.dew-insight .insight-icon { color: #b87927; background: #fbefd5; }
.wind-insight .insight-icon { color: #477e9c; background: #e3f1f7; }
.advice-insight .insight-icon { color: #8e6d39; background: #f5eddd; }

.insight small, .insight strong, .insight p { display: block; }
.insight small { color: var(--muted); font-size: 8px; font-weight: 800; }
.insight strong { margin-top: 3px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.insight p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

/* Professional */

.formula-badge {
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.55);
}

.formula-badge span, .formula-badge strong { display: block; }
.formula-badge span { margin-bottom: 3px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.formula-badge strong { font-family: ui-monospace, monospace; font-size: 11px; }

.pro-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 16px;
}

.pro-input-card,
.pro-results,
.calculation-card,
.formula-card { padding: 28px; }

.reset-button {
  min-height: 32px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.6);
  cursor: pointer;
}

.pro-field {
  display: grid;
  grid-template-columns: 1fr 145px;
  gap: 20px;
  align-items: center;
  margin-top: 20px;
}

.pro-field > span:first-child b,
.pro-field > span:first-child small { display: block; }
.pro-field > span:first-child b { font-size: 11px; }
.pro-field > span:first-child small { margin-top: 3px; color: var(--muted); font-size: 8px; }

.pro-input {
  display: flex;
  height: 46px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.74);
}

.pro-input input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  border: 0;
  outline: 0;
  background: transparent;
}

.pro-input i {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  color: #26946c;
  font-family: ui-monospace, monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
}

.status-dot::before {
  content: "●";
  margin-right: 6px;
}

.pro-primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.pro-primary > div {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.5);
}

.pro-primary span { color: var(--muted); font-size: 9px; font-weight: 750; }
.pro-primary output { display: block; margin-top: 7px; font-family: Georgia, serif; font-size: 38px; letter-spacing: -.04em; }

.pro-delta {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 15px;
  padding: 13px 15px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--state) 10%, white);
}

.pro-delta span { color: var(--muted); font-size: 9px; font-weight: 750; }
.pro-delta strong { color: var(--state); font-family: ui-monospace, monospace; font-size: 11px; }
.pro-delta p { margin: 0; color: #546e6b; font-size: 9px; text-align: right; }

.calculation-card { grid-column: 1 / 2; }
.formula-card { grid-column: 2 / 3; }

.data-table { margin-top: 19px; border-top: 1px solid var(--line); }

.data-table > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 2px;
  font-size: 9px;
  border-bottom: 1px solid var(--line);
}

.data-table span { color: var(--muted); }
.data-table i { font-family: Georgia, serif; }
.data-table strong { font-family: ui-monospace, monospace; font-size: 9px; }

.formula {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 17px;
}

.formula span { color: var(--muted); font-size: 9px; font-weight: 750; }

.formula code {
  padding: 11px 13px;
  overflow-x: auto;
  color: var(--teal-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  border: 1px solid rgba(8,127,118,.1);
  border-radius: 10px;
  background: rgba(223,244,238,.55);
  white-space: nowrap;
}

.formula-card > p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.wind-reference {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 22px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 15px 45px rgba(30,78,74,.08);
  backdrop-filter: blur(20px);
}

.wind-reference summary {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  list-style: none;
  cursor: pointer;
}

.wind-reference summary::-webkit-details-marker { display: none; }

.wind-reference summary::after {
  content: "+";
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--teal);
  font-size: 17px;
  border-radius: 50%;
  background: var(--mint);
}

.wind-reference[open] summary::after { content: "−"; }

.wind-reference summary > span:first-child {
  display: flex;
  gap: 12px;
  align-items: center;
}

.wind-reference summary i {
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .09em;
}

.wind-reference summary strong { font-size: 13px; }

.current-wind {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}

.current-wind b { color: var(--state); }

.wind-table-wrap {
  padding: 0 24px;
  overflow-x: auto;
}

.wind-reference table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.wind-reference th {
  padding: 11px 12px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .05em;
  text-align: left;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(240,247,244,.55);
}

.wind-reference td {
  padding: 10px 12px;
  color: #536d69;
  border-bottom: 1px solid rgba(20,60,58,.07);
}

.wind-reference td:first-child,
.wind-reference td:nth-child(3),
.wind-reference td:nth-child(4) {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 750;
}

.wind-reference tr.active td {
  color: var(--teal-dark);
  background: rgba(223,244,238,.72);
}

.wind-reference tr.active td:first-child {
  box-shadow: inset 3px 0 0 var(--teal);
}

.reference-note {
  margin: 0;
  padding: 14px 25px 18px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.65;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
  padding: 22px 0 28px;
  color: #78908d;
  font-size: 9px;
  border-top: 1px solid var(--line);
}

footer p { margin: 0; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .view-switcher { grid-row: 2; grid-column: 1 / -1; width: min(100%, 520px); }
  .global-units { grid-column: 2; }
  .quick-layout { max-width: 850px; }
}

@media (max-width: 760px) {
  .site-header, main, footer { width: min(100% - 24px, 1180px); }
  .site-header { gap: 14px; padding: 15px 0 10px; }
  .brand { font-size: 13px; }
  .brand-mark { width: 36px; height: 36px; }
  .global-units { gap: 4px; }
  .view-switcher { order: 3; max-width: none; }
  .view-switcher button { min-height: 48px; padding: 0 8px; }
  .view-switcher button span { text-align: center; }
  .view-switcher svg, .view-switcher small { display: none; }
  .view-switcher strong { font-size: 11px; }

  .view-panel { padding: 26px 0 10px; }
  .quick-view { padding-top: 22px; }
  .quick-intro { margin-bottom: 22px; }
  .quick-intro .eyebrow { margin-bottom: 9px; }
  .quick-intro h1 { font-size: 39px; line-height: 1; }
  .quick-intro > p:last-child { margin-top: 10px; font-size: 11px; }
  .quick-layout { grid-template-columns: 1fr; gap: 12px; }
  .quick-inputs, .quick-result { padding: 22px 18px; border-radius: 23px; }
  .input-grid { margin-top: 19px; }
  .input-box { height: 54px; }
  .wind-block { margin-top: 16px; }
  .range { margin-top: 17px; }
  .validation-message:empty { min-height: 0; margin: 0; }
  .hero-result { display: grid; grid-template-columns: 1fr auto; align-items: center; margin-top: 19px; padding-bottom: 16px; }
  .hero-result > span { grid-column: 1; }
  .hero-result output { grid-row: 1 / 3; grid-column: 2; margin: 0; font-size: 45px; }
  .hero-result p { grid-column: 1; margin-top: 5px; }
  .comfort-scale { margin-top: 15px; }
  .quick-secondary { margin-top: 17px; }
  .method { margin-top: 14px; }

  .panel-heading { display: block; margin-bottom: 22px; }
  .panel-heading h1 { font-size: 37px; }
  .panel-heading > p { margin-top: 10px; text-align: left; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 12px; }
  .gauge-card { grid-row: auto; min-height: 0; padding: 27px 20px; border-radius: 23px; }
  .gauge { width: min(235px, 70vw); }
  .gauge-inner output { font-size: 47px; }
  .gauge-delta { margin-top: 14px; }
  .meter-row { margin-top: 20px; }
  .dashboard-controls { padding: 23px 19px; border-radius: 23px; }
  .slider-field { margin-top: 20px; }
  .insight-grid { grid-template-columns: 1fr; gap: 8px; }
  .insight { padding: 13px 16px; }

  .pro-heading { display: flex; align-items: flex-end; }
  .pro-heading h1 { font-size: 36px; }
  .formula-badge { display: none; }
  .pro-grid { grid-template-columns: 1fr; gap: 12px; }
  .pro-input-card, .pro-results, .calculation-card, .formula-card { grid-column: 1; padding: 22px 18px; border-radius: 23px; }
  .pro-field { grid-template-columns: 1fr 135px; margin-top: 17px; }
  .pro-primary output { font-size: 32px; }
  .pro-delta { grid-template-columns: auto 1fr; }
  .pro-delta p { grid-column: 1 / -1; text-align: left; }
  .formula { grid-template-columns: 1fr; gap: 6px; }

  .wind-reference { margin-top: 16px; border-radius: 18px; }
  .wind-reference summary { min-height: 62px; padding: 0 17px; }
  .wind-reference summary > span:first-child { display: block; }
  .wind-reference summary i { display: block; margin-bottom: 4px; }
  .wind-reference summary strong { font-size: 12px; }
  .current-wind { font-size: 9px; }
  .wind-table-wrap { padding: 0 12px; overflow: visible; }
  .wind-reference thead { display: none; }
  .wind-reference tbody { display: grid; gap: 8px; }
  .wind-reference tr {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255,255,255,.46);
  }
  .wind-reference td {
    min-width: 0;
    padding: 9px 8px;
    font-size: 9px;
    border: 0;
  }
  .wind-reference td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-family: Inter, sans-serif;
    font-size: 7px;
    font-weight: 750;
  }
  .wind-reference td:last-child {
    grid-column: 1 / -1;
    padding-top: 7px;
    border-top: 1px solid var(--line);
  }
  .wind-reference tr.active td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
  .reference-note { padding: 13px 15px 16px; }

  footer { margin-top: 20px; }
}

@media (max-width: 390px) {
  .brand > span:last-child { font-size: 12px; }
  .mini-switch button { min-width: 32px; }
  .quick-intro h1 { font-size: 36px; }
  .quick-secondary { grid-template-columns: 95px 1fr; gap: 14px; }
  .quick-secondary div { padding-right: 14px; }
}

@media (max-width: 350px) {
  .brand > span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Focused quick-view revision */

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  color: var(--ink);
  text-align: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(188, 233, 223, .86), transparent 23rem),
    linear-gradient(145deg, #f9fbf5, #e7f6f3 55%, #f8f3e7);
  animation: splash-leave .42s ease .9s forwards;
}

.splash-screen p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
}

.splash-screen strong {
  color: var(--teal);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(58px, 9vw, 92px);
  font-weight: 500;
  letter-spacing: -.07em;
}

@keyframes splash-leave {
  0% { opacity: 1; transform: scale(1); visibility: visible; }
  99% { opacity: 0; transform: scale(1.025); visibility: visible; }
  100% { opacity: 0; transform: scale(1.025); visibility: hidden; }
}

.site-header {
  grid-template-columns: 1fr auto;
}

.global-units { grid-column: 2; }

.quick-view { padding-top: 18px; }

.quick-layout {
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 680px;
}

.quick-result {
  order: -1;
  padding: 30px;
}

.quick-inputs { padding: 28px 30px; }

.quick-secondary {
  grid-template-columns: minmax(150px, .55fr) 1fr;
  gap: 12px;
}

.quick-secondary div {
  padding: 16px 18px;
  border: 0;
  border-radius: 16px;
  background: rgba(225, 246, 240, .8);
}

.quick-secondary span {
  margin-bottom: 7px;
  color: var(--teal-dark);
  font-size: 10px;
}

.quick-secondary strong {
  color: var(--teal-dark);
  font-size: 32px;
}

.quick-secondary p {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 15px 17px;
  border-radius: 16px;
  background: rgba(248, 240, 219, .76);
}

.input-box { padding-right: 10px; }

.number-stepper,
.wind-stepper {
  display: grid;
  width: 32px;
  height: 44px;
  flex: 0 0 auto;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
}

.number-stepper { margin: 0 9px 0 5px; }
.wind-stepper {
  margin: 0;
  border-width: 0 0 0 1px;
  border-radius: 0 10px 10px 0;
}

.number-stepper button,
.wind-stepper button {
  display: grid;
  width: 100%;
  height: 22px;
  padding: 0;
  place-items: center;
  color: var(--teal-dark);
  font-size: 8px;
  line-height: 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.number-stepper button:first-child,
.wind-stepper button:first-child { border-bottom: 1px solid var(--line); }

.number-stepper button:hover,
.wind-stepper button:hover {
  background: var(--mint);
}

.label-row { align-items: center; }
.wind-reading { align-items: center; }

.wind-value-control {
  display: flex;
  height: 46px;
  gap: 5px;
  align-items: center;
  padding-left: 11px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.7);
}

.footer-views {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
}

.footer-views button {
  padding: 0;
  color: var(--muted);
  font-size: 9px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}

.footer-views button:hover,
.footer-views button[aria-pressed="true"] {
  color: var(--teal-dark);
  border-bottom-color: currentColor;
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 14px 0 8px;
  }

  .view-panel { padding-top: 18px; }
  .quick-view { padding-top: 12px; }
  .quick-layout { gap: 10px; }
  .quick-result { order: -1; padding: 21px 18px; }
  .quick-inputs { padding: 22px 18px; }

  .hero-result output { font-size: 54px; }

  .quick-secondary {
    grid-template-columns: 118px 1fr;
    gap: 9px;
  }

  .quick-secondary div { padding: 13px 14px; }
  .quick-secondary strong { font-size: 28px; }
  .quick-secondary p { padding: 12px 13px; }

  .wind-reading em { display: none; }
  .number-stepper { margin-right: 7px; }

  footer {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 12px;
    align-items: center;
  }

  .footer-views {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: center;
  }

  footer p { text-align: right; }
}

@media (min-width: 761px) {
  .hero-result {
    padding-bottom: 28px;
    text-align: center;
  }

  .hero-result output {
    margin-top: 8px;
    font-size: 72px;
  }

  .hero-result p { margin-top: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .splash-screen { display: none; }
}

/* Shenzhen precipitation radar */
.radar-preview-card {
  display: grid;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1.25fr);
  gap: 28px;
  align-items: center;
  margin: 18px auto 0;
  padding: 24px;
  overflow: hidden;
}
.radar-preview-copy { padding: 4px 4px 4px 8px; }
.radar-kicker,
.radar-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
}
.radar-kicker i,
.radar-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 5px rgba(16, 185, 129, .12);
}
.radar-preview-copy h2 { margin: 12px 0 8px; font-size: 22px; letter-spacing: -.035em; }
.radar-preview-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.radar-detail-button {
  display: inline-flex;
  height: 40px;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 0 15px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border: 0;
  border-radius: 12px;
  background: var(--teal);
  box-shadow: 0 7px 18px rgba(8, 126, 117, .18);
  cursor: pointer;
}
.radar-detail-button svg { width: 15px; }
.radar-preview-map {
  position: relative;
  display: block;
  min-height: 210px;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border: 0;
  border-radius: 18px;
  background: #dfeceb;
  box-shadow: inset 0 0 0 1px rgba(23, 62, 58, .08);
  cursor: pointer;
}
.radar-preview-map .radar-map { position: absolute; inset: 0; height: 100%; }
.radar-preview-map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, rgba(10, 43, 47, .34));
}
.radar-preview-location,
.radar-preview-source,
.radar-preview-time {
  position: absolute;
  z-index: 4;
  bottom: 14px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .28);
}
.radar-preview-location { left: 15px; display: inline-flex; align-items: center; gap: 7px; }
.radar-preview-source { left: 50%; transform: translateX(-50%); font-size: 7px; opacity: .82; white-space: nowrap; }
.radar-preview-location i { width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #1d80df; box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.radar-preview-time { right: 15px; }

.radar-heading { align-items: end; }
.radar-updated-card {
  min-width: 150px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.64);
  text-align: right;
}
.radar-updated-card span { display: block; color: var(--muted); font-size: 8px; font-weight: 750; }
.radar-updated-card strong { display: block; margin-top: 5px; font-size: 11px; }
.radar-detail-grid { display: grid; grid-template-columns: minmax(0, 2.35fr) minmax(250px, .65fr); gap: 18px; align-items: start; }
.radar-detail-card { padding: 18px; }
.radar-map-toolbar { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 2px 14px; }
.radar-map-toolbar > div:first-child strong { display: block; margin-top: 5px; font-size: 12px; }
.radar-zoom-controls { display: inline-grid; grid-template-columns: 38px auto 38px; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); }
.radar-zoom-controls button { width: 38px; height: 36px; padding: 0; color: var(--ink); font-size: 18px; border: 0; background: transparent; cursor: pointer; }
.radar-zoom-controls button:disabled { color: #9bacaa; cursor: default; opacity: .55; }
.radar-zoom-controls span { min-width: 54px; color: var(--muted); font-size: 9px; font-weight: 800; text-align: center; }
.radar-map {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: #dfeceb;
  isolation: isolate;
}
.radar-map-detail { height: clamp(390px, 55vw, 560px); border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(23, 62, 58, .08); }
.radar-map-stage {
  --radar-scale: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 512px;
  height: 512px;
  transform: translate(-50%, -50%) scale(var(--radar-scale));
  transform-origin: center;
}
.radar-base-layer,
.radar-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.radar-base-layer img { position: absolute; width: 256px; height: 256px; user-select: none; }
.radar-overlay { z-index: 2; opacity: 0; max-width: none; object-fit: cover; image-rendering: auto; transition: opacity .25s ease; }
.radar-ready .radar-overlay { opacity: .78; }
.radar-shenzhen-marker {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 7px;
  transform: translate(-8px, -8px) scale(var(--radar-inverse-scale));
  transform-origin: 8px 8px;
  pointer-events: none;
}
.radar-shenzhen-marker i { width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: #277ee8; box-shadow: 0 2px 7px rgba(20, 60, 58, .34); }
.radar-shenzhen-marker b { padding: 3px 7px; color: #173e3a; font-size: 10px; white-space: nowrap; border-radius: 7px; background: rgba(255,255,255,.86); box-shadow: 0 2px 8px rgba(20,60,58,.14); }
.radar-loading { position: absolute; z-index: 5; top: 50%; left: 50%; color: #607a76; font-size: 10px; font-weight: 750; transform: translate(-50%, -50%); }
.radar-ready > .radar-loading { display: none; }
.radar-timeline { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; padding: 16px 4px 2px; }
.radar-play { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; color: #fff; border: 0; border-radius: 50%; background: var(--teal); cursor: pointer; }
.radar-play svg { width: 19px; }
.radar-pause-icon { display: none; }
.radar-play.playing .radar-play-icon { display: none; }
.radar-play.playing .radar-pause-icon { display: block; }
.radar-timeline-track input { width: 100%; margin: 0; accent-color: var(--teal); }
.radar-timeline-track > div { display: flex; justify-content: space-between; margin-top: 5px; color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.radar-timeline-track strong { color: var(--ink); }
.radar-map-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 4px 0; }
.radar-map-footer p { margin: 0; color: var(--muted); font-size: 7px; }
.radar-map-footer a { color: inherit; }
.radar-legend { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.radar-legend i { display: block; width: 92px; height: 6px; border-radius: 99px; background: linear-gradient(90deg, #72b2ff, #0091ca, #4bd39c, #ffe25c, #ee5968); }
.radar-info-card { padding: 22px; }
.radar-refresh { height: 34px; padding: 0 12px; color: var(--teal); font-size: 9px; font-weight: 800; border: 1px solid rgba(8,126,117,.18); border-radius: 10px; background: var(--teal-soft); cursor: pointer; }
.radar-info-list { margin: 20px 0 0; }
.radar-info-list div { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; border-bottom: 1px solid var(--line); }
.radar-info-list dt { color: var(--muted); font-size: 9px; }
.radar-info-list dd { margin: 0; font-size: 10px; font-weight: 800; text-align: right; }
.radar-note { margin-top: 18px; padding: 14px; border-radius: 12px; background: var(--teal-soft); }
.radar-note.muted { background: var(--soft); }
.radar-note strong { font-size: 10px; }
.radar-note p { margin: 7px 0 0; color: #55706c; font-size: 9px; line-height: 1.7; }
.radar-error { margin: 14px 0 0; color: var(--danger); font-size: 9px; line-height: 1.6; }
body[data-view="rain"] .wind-reference { display: none; }

@media (max-width: 980px) {
  .radar-detail-grid { grid-template-columns: 1fr; }
  .radar-info-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
  .radar-info-card .section-heading, .radar-info-list, .radar-error { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .radar-preview-card { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
  .radar-preview-copy { padding: 0; }
  .radar-preview-copy h2 { font-size: 18px; }
  .radar-preview-map { min-height: 188px; }
  .radar-heading { align-items: start; }
  .radar-updated-card { width: 100%; box-sizing: border-box; text-align: left; }
  .radar-detail-card { padding: 12px; }
  .radar-map-detail { height: min(58vh, 470px); min-height: 360px; border-radius: 13px; }
  .radar-map-toolbar { padding: 2px 2px 12px; }
  .radar-map-toolbar > div:first-child strong { font-size: 11px; }
  .radar-timeline { grid-template-columns: 44px 1fr; gap: 10px; padding-top: 14px; }
  .radar-map-footer { align-items: flex-start; flex-direction: column; gap: 9px; }
  .radar-info-card { display: block; padding: 20px; }
}

@media (max-width: 390px) {
  .radar-preview-card { padding: 17px; }
  .radar-preview-map { min-height: 170px; }
  .radar-map-detail { min-height: 330px; }
  .radar-legend i { width: 74px; }
}


/* Dew point comfort and quick-estimate references */
.dew-value-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-secondary .dew-value-row strong { flex: 0 0 auto; }

.dew-value-row em {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  color: var(--teal-dark);
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
}

.quick-secondary .dew-summary > small {
  display: block;
  margin-top: 8px;
  color: #58706d;
  font-size: 8px;
  line-height: 1.55;
}

.dew-reference td:first-child {
  width: 15%;
  white-space: nowrap;
}

.dew-reference td:nth-child(2) {
  width: 18%;
  color: var(--ink);
  font-weight: 750;
  white-space: nowrap;
}

.dew-reference td:nth-child(3) {
  font-family: inherit;
  font-weight: 500;
}

.dew-rule-content {
  display: grid;
  grid-template-columns: minmax(180px, .65fr) 1.35fr;
  gap: 18px;
  padding: 2px 24px 18px;
  border-top: 1px solid var(--line);
}

.dew-rule-lead {
  padding: 20px 18px;
  border-radius: 15px;
  background: rgba(223,244,238,.62);
}

.dew-rule-lead strong {
  font-size: 14px;
}

.dew-rule-lead p {
  margin: 9px 0 0;
  color: #55706c;
  font-size: 9px;
  line-height: 1.75;
}

.dew-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--line);
}

.dew-rule-grid div {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  background: rgba(255,255,255,.72);
}

.dew-rule-grid b {
  color: var(--teal-dark);
  font-size: 10px;
  white-space: nowrap;
}

.dew-rule-grid span {
  color: #536d69;
  font-size: 9px;
  text-align: right;
}

@media (max-width: 760px) {
  .quick-secondary .dew-summary { padding-bottom: 14px; }
  .dew-value-row { justify-content: space-between; }
  .dew-rule-reference .current-wind { display: none; }
  .dew-rule-content { grid-template-columns: 1fr; padding: 0 15px 15px; }
  .dew-rule-grid { grid-template-columns: 1fr; }
  .dew-reference td:first-child,
  .dew-reference td:nth-child(2) { width: auto; }
}


.insight-value-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.insight-value-row strong { min-width: 0; }

.insight-value-row em,
.pro-dew-comfort {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 0 7px;
  color: var(--teal-dark);
  font-size: 7px;
  font-style: normal;
  font-weight: 850;
  border-radius: 999px;
  background: var(--teal-soft);
  white-space: nowrap;
}

.pro-dew-comfort { margin-top: 8px; }


/* Shared live weather defaults */
.weather-source {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  margin: 10px auto 0;
  padding: 14px 17px;
  overflow: hidden;
}

.weather-source::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--teal);
}

.weather-source-main {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
}

.weather-source-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--teal);
  border-radius: 13px;
  background: var(--mint);
}

.weather-source-icon svg { width: 22px; }
.weather-source-kicker { display: block; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.weather-source-main strong { display: block; margin-top: 3px; font-size: 13px; }
.weather-source-main p { margin: 3px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }

.weather-source-values {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 5px;
}

.weather-source-values span {
  min-width: 76px;
  padding: 8px 10px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.52);
}

.weather-source-values b,
.weather-source-values small { display: block; }
.weather-source-values b { font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.weather-source-values small { margin-top: 2px; color: var(--muted); font-size: 7px; }

.weather-source-actions { display: flex; gap: 6px; }
.weather-source-actions button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--teal-dark);
  font-size: 9px;
  font-weight: 800;
  border: 1px solid rgba(8,127,118,.17);
  border-radius: 10px;
  background: var(--teal-soft);
  cursor: pointer;
  white-space: nowrap;
}
.weather-source-actions button:last-child { color: var(--muted); border-color: var(--line); background: rgba(255,255,255,.58); }
.weather-source-actions button:disabled { cursor: wait; opacity: .52; }
.weather-source-note {
  position: absolute;
  right: 17px;
  bottom: 4px;
  margin: 0;
  color: #829491;
  font-size: 6px;
}
.weather-source-note a { color: inherit; }
.weather-source.loading::before { animation: weather-pulse 1s ease-in-out infinite alternate; }
.weather-source.error::before { background: var(--danger); }
@keyframes weather-pulse { to { opacity: .28; } }

body[data-view="quick"] .weather-source,
body[data-view="quick"] .radar-preview-card,
body[data-view="quick"] .dew-reference,
body[data-view="quick"] .dew-rule-reference,
body[data-view="quick"] .wind-scale-reference {
  width: 100%;
  max-width: 680px;
  margin-right: auto;
  margin-left: auto;
}

body[data-view="rain"] .weather-source,
body[data-view="rain"] .radar-preview-card { display: none; }

@media (max-width: 900px) {
  .weather-source { grid-template-columns: minmax(220px, 1fr) auto; }
  .weather-source-actions { grid-column: 2; grid-row: 1; }
  .weather-source-values { grid-column: 1 / -1; }
  .weather-source-note { bottom: 6px; }
}

@media (max-width: 760px) {
  .weather-source {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 6px;
    padding: 14px 15px 18px;
    border-radius: 18px;
  }
  .weather-source-main { padding-right: 0; }
  .weather-source-icon { width: 36px; height: 36px; }
  .weather-source-values { grid-column: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .weather-source-values span { min-width: 0; padding: 8px 5px; }
  .weather-source-actions { grid-row: auto; grid-column: auto; }
  .weather-source-actions button { min-height: 40px; flex: 1; }
  .weather-source-note { position: static; text-align: center; }
  body[data-view="quick"] .dew-reference,
  body[data-view="quick"] .dew-rule-reference,
  body[data-view="quick"] .wind-scale-reference { max-width: none; }
}

/* Combined radar history and HKO SWIRLS nowcast */
.radar-forecast-layer {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  filter: saturate(1.08) blur(.35px);
  transition: opacity .24s ease;
}
.radar-mode-forecast .radar-overlay { opacity: 0; }
.radar-mode-forecast .radar-forecast-layer { opacity: .9; }
.radar-mode-forecast .radar-shenzhen-marker b { color: #4f2f78; background: rgba(249,245,255,.9); }
.radar-forecast-loading .radar-forecast-layer { opacity: .2; }
.radar-map-kind {
  position: absolute;
  z-index: 6;
  top: 13px;
  left: 13px;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  color: #fff;
  font-size: 9px;
  font-weight: 850;
  border-radius: 999px;
  background: rgba(10,52,58,.68);
  box-shadow: 0 4px 14px rgba(8,30,34,.18);
  backdrop-filter: blur(10px);
}
body[data-radar-period="future"] .radar-map-kind { background: rgba(101,57,153,.82); }
.radar-live.past { color: #5c7d92; }
.radar-live.current { color: var(--teal); }
.radar-live.future { color: #7550a5; }
.radar-live.past i { background: #7594a6; box-shadow: 0 0 0 5px rgba(117,148,166,.13); }
.radar-live.current i { background: #10b981; box-shadow: 0 0 0 5px rgba(16,185,129,.12); }
.radar-live.future i { background: #8b5cf6; box-shadow: 0 0 0 5px rgba(139,92,246,.13); }
.radar-period-strip {
  display: grid;
  min-height: 27px;
  margin: 14px 4px -4px 64px;
  overflow: hidden;
  color: #fff;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .04em;
  border-radius: 8px;
}
.radar-period-strip span { display: grid; place-items: center; min-width: 0; }
.radar-period-strip .past { background: #7895a5; }
.radar-period-strip .current { background: var(--teal); }
.radar-period-strip .future { background: #8059ad; }
.radar-timeline-track input {
  --radar-current-pct: 50%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7895a5 0 var(--radar-current-pct), #8059ad var(--radar-current-pct) 100%);
  appearance: none;
}
.radar-timeline-track input::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: transparent; }
.radar-timeline-track input::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 2px 8px rgba(20,60,58,.3);
  appearance: none;
}
.radar-timeline-track input::-moz-range-track { height: 6px; border: 0; border-radius: 999px; background: transparent; }
.radar-timeline-track input::-moz-range-thumb { width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: var(--teal); }
body[data-radar-period="future"] .radar-timeline-track input::-webkit-slider-thumb { background: #8059ad; }
body[data-radar-period="future"] .radar-timeline-track input::-moz-range-thumb { background: #8059ad; }
.radar-note.forecast-note { background: rgba(239,232,250,.72); }
.radar-note.forecast-note strong { color: #67458f; }

/* Keep all reference cards aligned with the compact quick view. */
.wind-reference { width: 100%; box-sizing: border-box; }
body[data-view="quick"] .wind-reference {
  width: 100%;
  max-width: 680px;
  margin-right: auto;
  margin-left: auto;
}

@media (max-width: 760px) {
  .radar-period-strip { margin-left: 58px; }
  .radar-map-kind { top: 10px; left: 10px; }
  body[data-view="quick"] .wind-reference { max-width: none; }
}

/* Rain source tabs: local radar and the official Caiyun share page. */
.rain-source-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(231, 239, 236, .72);
}
.rain-source-tabs button {
  min-width: 176px;
  min-height: 48px;
  padding: 7px 14px;
  color: var(--muted);
  text-align: left;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.rain-source-tabs button strong,
.rain-source-tabs button span { display: block; }
.rain-source-tabs button strong { font-size: 11px; font-weight: 850; }
.rain-source-tabs button span { margin-top: 3px; font-size: 8px; font-weight: 650; }
.rain-source-tabs button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 3px 12px rgba(20, 60, 58, .1);
}
.rain-source-tabs button:focus-visible {
  outline: 3px solid rgba(8, 126, 117, .2);
  outline-offset: 2px;
}
.rain-source-panel[hidden] { display: none !important; }
.caiyun-source-panel { padding: 18px; }
.caiyun-source-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 2px 2px 15px;
}
.caiyun-source-heading h2 { margin: 8px 0 4px; font-size: 18px; letter-spacing: -.025em; }
.caiyun-source-heading p,
.caiyun-source-note { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.caiyun-source-heading a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 13px;
  color: var(--teal);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid rgba(8, 126, 117, .18);
  border-radius: 10px;
  background: var(--teal-soft);
}
.caiyun-frame-shell {
  position: relative;
  height: clamp(560px, 72vh, 780px);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #dfeceb;
}
.caiyun-frame-shell iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.caiyun-frame-loading {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  color: var(--ink);
  background: linear-gradient(145deg, #edf5f3, #dfeceb);
  transition: opacity .22s ease, visibility .22s ease;
}
.caiyun-frame-loading strong { font-size: 12px; }
.caiyun-frame-loading span { color: var(--muted); font-size: 9px; }
.caiyun-frame-shell.loaded .caiyun-frame-loading { visibility: hidden; opacity: 0; }
.caiyun-frame-shell.slow .caiyun-frame-loading span { color: #7b5b2a; }
.caiyun-source-note { padding: 12px 3px 1px; }

@media (max-width: 760px) {
  .rain-source-tabs { display: grid; width: 100%; box-sizing: border-box; }
  .rain-source-tabs button { min-width: 0; min-height: 52px; padding: 7px 10px; text-align: center; }
  .rain-source-tabs button span { font-size: 7px; }
  .caiyun-source-panel { padding: 12px; }
  .caiyun-source-heading { align-items: flex-start; flex-direction: column; gap: 10px; padding: 2px 2px 12px; }
  .caiyun-source-heading h2 { font-size: 16px; }
  .caiyun-source-heading a { min-height: 40px; }
  .caiyun-frame-shell { height: min(72vh, 680px); min-height: 520px; border-radius: 13px; }
}
.caiyun-source-actions { display: inline-flex; align-items: center; gap: 8px; }
.caiyun-source-actions button,
.caiyun-source-actions a {
  display: inline-flex;
  min-height: 38px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  cursor: pointer;
  appearance: none;
  transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.caiyun-source-actions button:hover,
.caiyun-source-actions a:hover {
  color: var(--teal-dark);
  border-color: rgba(8, 126, 117, .22);
  background: var(--teal-soft);
}
.caiyun-source-actions button:focus-visible,
.caiyun-source-actions a:focus-visible {
  outline: 3px solid rgba(8, 126, 117, .16);
  outline-offset: 2px;
}
.caiyun-source-note strong { color: #7b5b2a; }
@media (max-width: 760px) {
  .caiyun-source-actions { width: 100%; }
  .caiyun-source-actions > * { justify-content: center; flex: 1; }
}


/* Quick result: primary dew point + compact comfort insights */
.quick-secondary {
  grid-template-columns: minmax(0, 1.08fr) minmax(190px, .92fr);
  grid-template-areas:
    "dew status"
    "advice advice";
  gap: 12px;
  align-items: stretch;
}

.quick-secondary .quick-dew-card {
  grid-area: dew;
  display: flex;
  min-width: 0;
  min-height: 178px;
  flex-direction: column;
  justify-content: center;
  padding: 22px 24px;
  border: 1px solid rgba(8, 126, 117, .08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255,255,255,.72), transparent 34%),
    linear-gradient(145deg, rgba(218, 247, 240, .94), rgba(235, 250, 246, .72));
}

.quick-secondary .quick-card-label,
.quick-secondary .quick-status-card > span {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .07em;
}

.quick-secondary .dew-value-row {
  display: flex;
  margin: 0;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-secondary .dew-value-row strong {
  color: var(--teal-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5vw, 48px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.045em;
}

.quick-secondary .dew-value-row em {
  min-height: 28px;
  margin-bottom: 3px;
  padding: 0 11px;
  font-size: 9px;
  box-shadow: 0 5px 14px rgba(31, 109, 99, .08);
}

.quick-secondary .quick-dew-card > small {
  display: block;
  max-width: 30ch;
  margin-top: 15px;
  color: #58706d;
  font-size: 9px;
  line-height: 1.6;
}

.quick-secondary .quick-status-stack {
  grid-area: status;
  display: grid;
  min-width: 0;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.quick-secondary .quick-status-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 15px 18px;
  border: 1px solid rgba(20, 60, 58, .07);
  border-radius: 16px;
  background: rgba(255,255,255,.66);
}

.quick-secondary .temperature-status {
  background: color-mix(in srgb, var(--state) 10%, white);
}

.quick-secondary .moisture-status {
  background: rgba(245, 239, 220, .68);
}

.quick-secondary .quick-status-card > strong {
  color: var(--ink);
  font-family: inherit;
  font-size: 20px;
  font-weight: 850;
  line-height: 1.2;
}

.quick-secondary .temperature-status > strong { color: var(--state); }
.quick-secondary .moisture-status > strong { color: var(--teal-dark); }

.quick-secondary .moisture-status > small {
  display: block;
  margin-top: 5px;
  color: #607572;
  font-size: 8px;
  line-height: 1.5;
}

.quick-secondary .quick-advice {
  grid-area: advice;
  display: grid;
  min-width: 0;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 17px;
  border: 1px solid rgba(8, 126, 117, .08);
  border-radius: 16px;
  background: rgba(242, 248, 244, .78);
}

.quick-secondary .quick-advice-icon {
  display: grid;
  width: 36px;
  height: 36px;
  margin: 0;
  place-items: center;
  color: var(--teal);
  font-size: 19px;
  font-weight: 500;
  border-radius: 12px;
  background: var(--mint);
}

.quick-secondary .quick-advice > div {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.quick-secondary .quick-advice small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .07em;
}

.quick-secondary .quick-advice strong {
  display: inline;
  color: var(--ink);
  font-family: inherit;
  font-size: 11px;
  font-weight: 850;
}

.quick-secondary .quick-advice p {
  display: inline;
  margin: 0 0 0 7px;
  padding: 0;
  color: #55706c;
  font-size: 9px;
  line-height: 1.65;
  border-radius: 0;
  background: transparent;
}

@media (max-width: 760px) {
  .quick-secondary {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }

  .quick-secondary .quick-status-stack {
    order: 1;
    grid-template-rows: auto;
    gap: 9px;
  }

  .quick-secondary .quick-status-card {
    min-height: 72px;
    padding: 13px 15px;
  }

  .quick-secondary .quick-dew-card {
    order: 2;
    min-height: 0;
    padding: 18px;
  }

  .quick-secondary .quick-advice {
    order: 3;
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 13px 14px;
  }

  .quick-secondary .quick-advice-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .quick-secondary .quick-advice strong,
  .quick-secondary .quick-advice p { display: block; }
  .quick-secondary .quick-advice p { margin: 4px 0 0; }
}

@media (max-width: 390px) {
  .quick-secondary .dew-value-row strong { font-size: 38px; }
  .quick-secondary .quick-status-card > strong { font-size: 18px; }
}

/* Rain view: prioritize the radar itself; controls and metadata stay below it. */
body[data-view="rain"] .radar-view {
  padding-top: 12px;
}

.rain-accessible-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body[data-view="rain"] .caiyun-source-panel {
  padding: 10px;
  border-radius: 24px;
}

body[data-view="rain"] .caiyun-frame-shell {
  height: clamp(620px, 82vh, 860px);
  min-height: 620px;
  border-radius: 18px;
}

.caiyun-source-footer {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 4px 0;
}

.caiyun-source-footer > p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rain-source-tabs-bottom {
  margin: 14px 0 0;
}

@media (max-width: 760px) {
  body[data-view="rain"] .radar-view { padding-top: 6px; }
  body[data-view="rain"] .caiyun-source-panel { padding: 6px; border-radius: 18px; }
  body[data-view="rain"] .caiyun-frame-shell {
    height: calc(100dvh - 190px);
    min-height: 520px;
    max-height: 760px;
    border-radius: 14px;
  }
  .caiyun-source-footer {
    min-height: 40px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 9px 4px 2px;
  }
  .caiyun-source-footer > p {
    width: 100%;
    white-space: normal;
  }
  .caiyun-source-actions { width: 100%; }
  .rain-source-tabs-bottom { margin-top: 10px; }
}
