:root {
  color-scheme: light;
  --parchment: #f7f4ed;
  --paper: #fbf9f5;
  --paper-deep: #eee8dc;
  --ink: #2c2c2c;
  --muted: #706b62;
  --faint: #958e82;
  --line: #d8d0c2;
  --line-strong: #aaa08e;
  --olive: #68704c;
  --olive-deep: #435244;
  --clay: #9a654d;
  --ochre: #b58a48;
  --serif: "Iowan Old Style", "Palatino Linotype", "Noto Serif CJK SC", "Songti SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    repeating-linear-gradient(0deg, rgba(83, 67, 45, 0.018) 0, rgba(83, 67, 45, 0.018) 1px, transparent 1px, transparent 4px),
    var(--parchment);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 18px;
  top: -80px;
  z-index: 30;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
}

.skip-link:focus {
  top: 18px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 249, 245, 0.96);
}

.nav-inner,
main,
footer {
  width: min(100% - 64px, 1280px);
  margin-inline: auto;
}

.nav-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--clay);
  border-radius: 50%;
  color: var(--clay);
  font-size: 19px;
  font-weight: 700;
}

.brand-name {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.nav-links a {
  text-decoration: none;
  transition: color 180ms ease;
}

.nav-links a:hover,
.nav-links .is-current {
  color: var(--clay);
}

.nav-links a + a::before {
  content: "·";
  display: inline-block;
  margin: 0 14px;
  color: var(--line-strong);
}

.nav-links .nav-qr-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.nav-links .nav-qr-link::before {
  content: none;
  display: none;
}

.nav-qr-link img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  background: var(--paper);
}

main {
  padding: 76px 0 96px;
}

.page-intro {
  padding-bottom: 54px;
  border-bottom: 1px solid var(--line-strong);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--olive);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  max-width: 10em;
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.05;
  text-wrap: balance;
}

.weather-section {
  padding-top: 42px;
  scroll-margin-top: 126px;
}

.place-switcher {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.place-tab {
  position: relative;
  margin: 0;
  padding: 0 0 13px;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-family: var(--serif);
  font-size: 17px;
  cursor: pointer;
  transition: color 180ms ease;
}

.place-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
}

.place-tab:hover,
.place-tab.is-active {
  color: var(--ink);
}

.place-tab.is-active::after {
  background: var(--clay);
}

.weather-stage {
  --stage-bg: #43584d;
  --stage-accent: #d5c29c;
  position: relative;
  overflow: hidden;
  min-height: 700px;
  border: 1px solid rgba(44, 44, 44, 0.28);
  border-radius: 18px;
  background: var(--stage-bg);
  color: #f7f4ed;
}

.weather-stage.condition-sun {
  --stage-bg: #625f43;
  --stage-accent: #e2bd72;
}

.weather-stage.condition-cloud {
  --stage-bg: #566052;
  --stage-accent: #c8cbb8;
}

.weather-stage.condition-rain,
.weather-stage.condition-drizzle {
  --stage-bg: #405a50;
  --stage-accent: #86c1c2;
}

.weather-stage.condition-storm {
  --stage-bg: #464b40;
  --stage-accent: #d4a66c;
}

.weather-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.13), transparent 28%),
    repeating-linear-gradient(106deg, transparent 0, transparent 46px, rgba(255, 255, 255, 0.055) 47px, transparent 49px);
}

.weather-stage-inner {
  position: relative;
  z-index: 1;
  min-height: 700px;
  display: grid;
  grid-template-columns: minmax(280px, 0.76fr) minmax(520px, 1.24fr);
  gap: clamp(52px, 7vw, 108px);
  padding: clamp(42px, 6vw, 76px);
}

.current-column {
  display: flex;
  flex-direction: column;
}

.place-heading p {
  margin: 0 0 14px;
  color: var(--stage-accent);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.place-heading h2 {
  margin: 0;
  font-size: clamp(38px, 4vw, 56px);
  font-weight: 500;
  line-height: 1.1;
}

.current-weather {
  margin-top: 42px;
}

.current-temp {
  font-size: clamp(112px, 14vw, 184px);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.075em;
  line-height: 0.78;
}

.current-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 34px;
}

.current-copy strong {
  font-size: 30px;
  font-weight: 500;
}

.current-copy span,
.weather-updated {
  color: rgba(247, 244, 237, 0.76);
  font-size: 17px;
  line-height: 1.6;
}

.weather-updated {
  margin: 22px 0 0;
}

.weather-model {
  margin: 8px 0 0;
  color: rgba(247, 244, 237, 0.58);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: auto 0 0;
  border-top: 1px solid rgba(247, 244, 237, 0.25);
  border-bottom: 1px solid rgba(247, 244, 237, 0.25);
}

.metric-grid div {
  padding: 16px 14px 17px 0;
}

.metric-grid div:nth-child(even) {
  padding-left: 14px;
  border-left: 1px solid rgba(247, 244, 237, 0.22);
}

.metric-grid div:nth-child(-n + 2) {
  border-bottom: 1px solid rgba(247, 244, 237, 0.22);
}

.metric-grid dt {
  color: rgba(247, 244, 237, 0.58);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.metric-grid dd {
  margin: 5px 0 0;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.forecast-column {
  min-width: 0;
}

.weather-summary {
  min-height: 100px;
  margin: 0;
  padding: 5px 0 28px;
  border-bottom: 1px solid rgba(247, 244, 237, 0.25);
  color: rgba(247, 244, 237, 0.88);
  font-size: 18px;
  line-height: 1.9;
  text-wrap: pretty;
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0 14px;
}

.panel-heading h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.panel-heading span {
  color: rgba(247, 244, 237, 0.5);
  font-family: var(--sans);
  font-size: 10px;
}

.hourly-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(82px, 1fr);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-top: 1px solid rgba(247, 244, 237, 0.22);
  border-bottom: 1px solid rgba(247, 244, 237, 0.22);
  scrollbar-color: rgba(247, 244, 237, 0.35) transparent;
}

.hourly-item {
  min-height: 142px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 16px 8px;
  border-right: 1px solid rgba(247, 244, 237, 0.18);
  color: rgba(247, 244, 237, 0.86);
  font-family: var(--sans);
  font-size: 12px;
  text-align: center;
}

.hourly-item:last-child {
  border-right: 0;
}

.weather-glyph {
  min-height: 32px;
  display: grid;
  place-items: center;
  color: var(--stage-accent);
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
}

.hour-rain {
  color: rgba(247, 244, 237, 0.48);
  font-size: 10px;
}

.precip-strip {
  height: 38px;
  display: grid;
  grid-template-columns: repeat(24, minmax(6px, 1fr));
  align-items: end;
  gap: 4px;
  padding-top: 8px;
}

.precip-bar {
  min-height: 2px;
  background: rgba(247, 244, 237, 0.18);
}

.precip-bar[data-level="1"] { background: rgba(134, 193, 194, 0.52); }
.precip-bar[data-level="2"] { background: #86c1c2; }
.precip-bar[data-level="3"] { background: var(--stage-accent); }
.precip-bar[data-level="4"] { background: #d4a66c; }

.daily-heading {
  margin-top: 25px;
}

.forecast-list {
  border-bottom: 1px solid rgba(247, 244, 237, 0.22);
}

.forecast-day {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 46px minmax(110px, 0.8fr) auto;
  align-items: center;
  gap: 15px;
  border-top: 1px solid rgba(247, 244, 237, 0.22);
  font-size: 17px;
}

.forecast-day small {
  display: block;
  margin-top: 3px;
  color: rgba(247, 244, 237, 0.52);
  font-family: var(--sans);
  font-size: 10px;
}

.temp-bar {
  height: 5px;
  background: rgba(247, 244, 237, 0.14);
}

.temp-bar span {
  display: block;
  width: 72%;
  height: 100%;
  background: var(--stage-accent);
}

.forecast-temp {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.weather-empty {
  min-height: 110px;
  display: grid;
  place-items: center;
  color: rgba(247, 244, 237, 0.62);
  font-family: var(--sans);
  font-size: 12px;
}

.weather-footnote {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 13px;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 30px 0 38px;
  border-top: 1px solid var(--line-strong);
  color: var(--faint);
  font-family: var(--sans);
  font-size: 11px;
}

.beian-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.beian-links a {
  text-underline-offset: 4px;
}

@media (max-width: 980px) {
  .nav-inner,
  main,
  footer {
    width: min(100% - 44px, 1280px);
  }

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

  .weather-stage-inner {
    gap: 58px;
  }

  .metric-grid {
    margin-top: 38px;
  }
}

@media (max-width: 680px) {
  .nav {
    padding: 8px 0;
  }

  .nav-inner,
  main,
  footer {
    width: min(100% - 28px, 1280px);
  }

  .nav-inner {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 13px 0 15px;
  }

  .brand-name {
    font-size: 18px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 10px;
  }

  .nav-links a + a::before {
    margin: 0 9px;
  }

  .nav-links .nav-qr-link {
    margin-left: 12px;
    padding-left: 12px;
  }

  .nav-qr-link img {
    width: 40px;
    height: 40px;
  }

  main {
    padding: 54px 0 72px;
  }

  .page-intro {
    padding-bottom: 42px;
  }

  h1 {
    font-size: clamp(44px, 14vw, 64px);
  }

  .weather-section {
    padding-top: 32px;
    scroll-margin-top: 150px;
  }

  .weather-stage,
  .weather-stage-inner {
    min-height: 0;
  }

  .weather-stage {
    border-radius: 12px;
  }

  .weather-stage-inner {
    padding: 30px 20px 34px;
    gap: 48px;
  }

  .current-temp {
    font-size: clamp(104px, 37vw, 152px);
  }

  .metric-grid {
    margin-top: 34px;
  }

  .weather-summary {
    min-height: 0;
    font-size: 16px;
  }

  .panel-heading span {
    display: none;
  }

  .hourly-list {
    display: flex;
  }

  .hourly-item {
    min-width: 78px;
  }

  .forecast-day {
    grid-template-columns: 1fr 36px auto;
    gap: 9px;
    font-size: 15px;
  }

  .forecast-day .temp-bar {
    display: none;
  }

  .weather-footnote,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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