  :root {
    --bg: #0d1117;
    --bg2: #161b22;
    --bg3: #21262d;
    --border: #30363d;
    --text: #e6edf3;
    --muted: #8b949e;
    --green: #3fb950;
    --yellow: #d29922;
    --red: #f85149;
    --blue: #58a6ff;
    --orange: #f0883e;
    --purple: #bc8cff;
    --wind: #58a6ff;
    --accent: #1f6feb;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 1rem;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
  }

  .header {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  .station-id {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.03rem;
  }
  .station-name {
    font-size: 0.6875rem;
    color: var(--muted);
    margin-top: 0.0625rem;
  }
  .header-right {
    display: flex;
    align-items: center;
    gap: 0.625rem;
  }
  .status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--muted);
    transition: background 0.3s;
    flex-shrink: 0;
  }
  .status-dot.live { background: var(--green); box-shadow: 0 0 0.375rem var(--green); }
  .status-dot.stale { background: var(--yellow); }
  .status-dot.error { background: var(--red); }
  .status-label { font-size: 0.6875rem; color: var(--muted); }
  .update-time { font-size: 0.6875rem; color: var(--muted); }

  .content {
    padding: 0.75rem;
    max-width: 37.5rem;
    margin: 0 auto;
  }

  .card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.625rem;
  }
  .card-label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
  }

  .wind-card {
    background: linear-gradient(135deg, #0d1b2a 0%, #1a2942 100%);
    border-color: #1f3a5c;
  }
  .wind-main { display: flex; align-items: center; gap: 1.25rem; }
  .wind-arrow-wrap {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }
  .wind-compass { width: 5rem; height: 5rem; position: relative; }
  .wind-compass svg { width: 5rem; height: 5rem; }
  .wind-dir-label { font-size: 0.6875rem; color: var(--muted); text-align: center; }
  .wind-speeds { flex: 1; }
  .wind-speed-main {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--wind);
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .wind-speed-unit { font-size: 1.125rem; font-weight: 400; color: var(--muted); margin-left: 0.25rem; }
  .wind-speed-label { font-size: 0.6875rem; color: var(--muted); margin-bottom: 0.375rem; }
  .wind-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(88, 166, 255, 0.15);
  }
  .wind-detail { display: flex; flex-direction: column; gap: 0.125rem; }
  .wind-detail-val {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
  }
  .wind-detail-label {
    font-size: 0.625rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03rem;
  }
  .calm-indicator { font-size: 1.75rem; font-weight: 600; color: var(--green); letter-spacing: 0.125rem; }

  .conditions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
  }
  .cond-item { background: var(--bg3); border-radius: 0.5rem; padding: 0.75rem; }
  .cond-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 0.1875rem;
  }
  .cond-value .unit { font-size: 0.875rem; font-weight: 400; color: var(--muted); }
  .cond-label {
    font-size: 0.625rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03rem;
    margin-top: 0.25rem;
  }
  .trend-arrow { font-size: 0.75rem; margin-left: 0.1875rem; transition: all 0.5s; }
  .trend-up { color: var(--orange); }
  .trend-down { color: var(--blue); }
  .trend-flat { color: var(--muted); }

  .da-card { background: var(--bg3); border-radius: 0.5rem; padding: 0.75rem; }
  .da-value {
    font-size: 1.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 0.1875rem;
  }
  .da-value .unit { font-size: 0.875rem; font-weight: 400; color: var(--muted); }
  .da-label { font-size: 0.625rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03rem; margin-top: 0.25rem; }
  .da-positive { color: var(--orange); }
  .da-negative { color: var(--green); }
  .da-neutral  { color: var(--text); }

  .rain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .rain-item { text-align: center; }
  .rain-value { font-size: 1.375rem; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
  .rain-label { font-size: 0.625rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03rem; margin-top: 0.1875rem; }

  .info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .info-item { text-align: center; }
  .info-value { font-size: 1.125rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
  .info-label { font-size: 0.625rem; color: var(--muted); opacity: 0.6; text-transform: uppercase; letter-spacing: 0.03rem; margin-top: 0.125rem; }

  /* ---- Forecast panel ---- */
  .forecast-source-label {
    font-size: 0.5625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
    color: var(--muted);
    opacity: 0.7;
    margin-top: 0.25rem;
  }
  .data-age {
    font-size: 0.625rem;
    color: var(--muted);
    opacity: 0.6;
    margin-bottom: 0.625rem;
  }

  .forecast-7day {
    display: flex;
    gap: 0.375rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .forecast-7day::-webkit-scrollbar { display: none; }
  .forecast-day {
    flex: 0 0 4.5rem;
    background: var(--bg3);
    border-radius: 0.5rem;
    padding: 0.5rem 0.375rem;
    text-align: center;
  }
  .forecast-day-name {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03rem;
    margin-bottom: 0.25rem;
  }
  .forecast-day-icon { font-size: 1.125rem; margin-bottom: 0.25rem; line-height: 1.2; }
  .forecast-day-temp {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
  }
  .forecast-day-high { color: var(--orange); font-weight: 600; }
  .forecast-day-low  { color: var(--blue); }
  .forecast-day-short {
    font-size: 0.5625rem;
    color: var(--muted);
    margin-top: 0.25rem;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .hourly-chart {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    align-items: flex-end;
  }
  .hourly-chart::-webkit-scrollbar { display: none; }
  .hourly-col { flex: 0 0 2.75rem; text-align: center; }
  .hourly-bar-wrap {
    height: 2.5rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 0.1875rem;
  }
  .hourly-bar { width: 0.875rem; min-height: 3px; border-radius: 3px 3px 0 0; background: var(--wind); opacity: 0.7; }
  .hourly-wind-val { font-size: 0.625rem; color: var(--text); font-variant-numeric: tabular-nums; }
  .hourly-temp-val { font-size: 0.625rem; color: var(--orange); font-variant-numeric: tabular-nums; }
  .hourly-time { font-size: 0.5625rem; color: var(--muted); margin-top: 0.1875rem; white-space: nowrap; }

  .aviation-block { margin-bottom: 0.625rem; }
  .aviation-block:last-child { margin-bottom: 0; }
  .aviation-station-id { font-size: 0.6875rem; font-weight: 700; color: var(--blue); margin-bottom: 0.125rem; }
  .aviation-distance { font-size: 0.625rem; color: var(--muted); margin-bottom: 0.25rem; }
  .aviation-raw {
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 0.625rem;
    color: var(--text);
    background: var(--bg3);
    border-radius: 0.375rem;
    padding: 0.5rem 0.625rem;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
  }

  .not-found {
    text-align: center;
    padding: 3.75rem 1.25rem;
    color: var(--muted);
  }
  .not-found h2 { font-size: 1.5rem; color: var(--text); margin-bottom: 0.75rem; }
  .not-found p { font-size: 0.875rem; margin-bottom: 1.25rem; }
  .not-found a { color: var(--blue); text-decoration: none; }

  .webcam-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 0.625rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
  }
  .webcam-card img {
    width: 100%;
    display: block;
  }
  .webcam-card-footer {
    padding: 0.5rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .webcam-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
  }
  .webcam-age {
    font-size: 0.6875rem;
    color: var(--muted);
  }

  .webcam-card img { cursor: pointer; }
  .webcam-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .webcam-lightbox.active { display: flex; }
  .webcam-lightbox.zoomed {
    display: block;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    cursor: default;
  }
  .webcam-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-in;
  }
  .webcam-lightbox.zoomed img {
    max-width: none;
    max-height: none;
    cursor: zoom-out;
  }

  .disclaimer {
    text-align: center;
    font-size: 0.625rem;
    color: var(--muted);
    padding: 0.5rem 1rem 1.25rem;
    line-height: 1.5;
  }

  .loading { text-align: center; padding: 2.5rem 1.25rem; color: var(--muted); }
  .loading-dots span { animation: blink 1.4s infinite both; font-size: 1.5rem; }
  .loading-dots span:nth-child(2) { animation-delay: 0.2s; }
  .loading-dots span:nth-child(3) { animation-delay: 0.4s; }
  @keyframes blink {
    0%, 80%, 100% { opacity: 0.2; }
    40% { opacity: 1; }
  }

  .data-view { display: none; }
  .data-view.visible { display: block; }

  @media (min-width: 30rem) {
    .wind-speed-main { font-size: 4rem; }
    .conditions-grid { grid-template-columns: repeat(3, 1fr); }
  }
