  /* ===== 基础重置 ===== */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
    color: #1F2937;
    background: #EAF3FC;
    background-image: linear-gradient(180deg, #D9E9F7 0%, #EAF3FC 30%, #EAF3FC 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background 0.6s ease;
  }

  /* ===== 主容器 ===== */
  .app {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 56px;
    display: flex;
    flex-direction: column;
    gap: 28px;
  }

  /* ===== 顶部栏 ===== */
  .topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
  }
  .search {
    flex: 0 1 auto;
    width: 460px;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
  }
  .search-wrap {
    flex: 1 1 100%;
    min-width: 0;
  }
  .search-title {
    margin: 0 0 10px;
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #1F2937;
    letter-spacing: 0.5px;
  }
  .search-desc {
    margin: 0 0 22px;
    text-align: center;
    font-size: 13px;
    color: #6B7280;
  }
  .search input {
    width: 100%;
    height: 44px;
    border: 1px solid #E5E9F0;
    outline: none;
    border-radius: 22px;
    background: #fff;
    color: #1F2937;
    font-size: 14px;
    padding: 0 46px 0 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: border-color .2s, box-shadow .2s;
  }
  .search input::placeholder { color: #9CA3AF; }
  .search input:focus {
    border-color: #0078D4;
    box-shadow: 0 0 0 3px rgba(0,120,212,0.12);
  }
  .search .ico {
    position: absolute; right: 14px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: #6B7280; pointer-events: none;
  }
  .suggest {
    position: absolute; top: 50px; left: 0; right: 0;
    background: #fff;
    border: 1px solid #E5E9F0;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    max-height: 260px; overflow-y: auto; z-index: 50;
    display: none;
  }
  .suggest.show { display: block; }
  .suggest-item {
    padding: 11px 18px; cursor: pointer; font-size: 14px; color: #1F2937;
    transition: background .15s;
  }
  .suggest-item:hover, .suggest-item.active { background: #F3F5F9; }
  .suggest-empty { padding: 14px 18px; font-size: 13px; color: #6B7280; }

  .clock {
    color: #1F2937; font-size: 14px;
    letter-spacing: 0.3px; text-align: right;
    min-width: 130px;
    font-variant-numeric: tabular-nums;
  }
  .clock small { display:block; font-size: 12px; color: #6B7280; margin-top: 2px; }
  @media (min-width: 760px) {
    .clock {
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
    }
  }
  .hot {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
  }
  .hot button {
    border: 1px solid #E5E9F0;
    background: #fff;
    color: #374151;
    padding: 7px 20px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: border-color .2s, color .2s, background .2s;
  }
  .hot button:hover { border-color: #0078D4; color: #0078D4; }
  .hot button.active { border-color: #0078D4; color: #0078D4; background: #F2F8FD; }

  /* ===== 导航栏 ===== */
  .nav-bar { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
  .nav {
    display: flex; align-items: center; gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px;
  }
  .nav-logo {
    display: flex; align-items: center; gap: 8px;
    font-size: 18px; font-weight: 700; color: #1F2937;
    cursor: pointer; user-select: none;
  }
  .nav-logo svg { width: 24px; height: 24px; color: #0078D4; }
  .nav-menu { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .nav-item {
    position: relative;
    display: flex; align-items: center; gap: 4px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 14px; color: #374151;
    text-decoration: none;
    cursor: pointer; user-select: none;
    transition: background .2s, color .2s;
  }
  .nav-item:hover { background: #F3F4F6; color: #1F2937; }
  .nav-item.active { background: #E8F2FC; color: #0078D4; font-weight: 600; }
  .nav-item .caret { width: 12px; height: 12px; color: #9CA3AF; transition: transform .2s; }
  .nav-item.open .caret { transform: rotate(180deg); }
  .nav-drop-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    min-width: 190px;
    background: #fff;
    border: 1px solid #E5E9F0;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s, transform .18s, visibility .18s;
    z-index: 60;
  }
  .nav-item.open .nav-drop-menu {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
  .nav-drop-menu > div {
    padding: 8px 12px;
    font-size: 13px; color: #374151;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
  }
  .nav-drop-menu > div:hover { background: #F3F6FA; color: #0078D4; }
  .flash { animation: aqiFlash 1.6s ease; }
  @keyframes aqiFlash {
    0%, 100% { box-shadow: none; }
    30% { box-shadow: 0 0 0 3px rgba(0,120,212,0.25); }
  }

  /* ===== 卡片通用 ===== */
  .card {
    background: #fff;
    border: 1px solid #E5E9F0;
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  }

  /* ===== Hero 当前天气 ===== */
  .hero {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    min-height: 200px;
  }
  .hero-left {}
  .city-line { display:flex; align-items:center; gap:10px; flex-wrap: wrap; }
  .city-name { font-size: 24px; font-weight: 600; color: #1F2937; }
  .city-tag {
    font-size: 12px; padding: 3px 10px; border-radius: 10px;
    background: #EFF4FA; color: #0078D4;
    border: 1px solid #D6E4F0;
  }
  .date-line { font-size: 13px; color: #6B7280; margin-top: 6px; }
  .temp-line { display:flex; align-items:flex-start; gap: 6px; margin-top: 14px; }
  .temp {
    font-size: 96px; font-weight: 600; line-height: 1;
    color: #1F2937;
    font-variant-numeric: tabular-nums; letter-spacing: -3px;
  }
  .temp-unit { font-size: 32px; font-weight: 600; margin-top: 14px; color: #4B5563; }
  .weather-name { font-size: 19px; color: #374151; margin-top: 6px; font-weight: 500; }
  .feel-line { font-size: 13px; color: #6B7280; margin-top: 8px; }
  .dual-source {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 10px; font-size: 12px; color: #6B7280;
    background: #F5F7FA; border: 1px solid #E5E9F0;
    padding: 5px 12px; border-radius: 8px;
  }
  .dual-source b { color: #0078D4; font-weight: 600; }
  .dual-source .sep { color: #D1D5DB; }

  .hero-right { display: flex; align-items: center; justify-content: center; }
  .w-icon { width: 150px; height: 150px; }
  .w-icon svg { width: 100%; height: 100%; }

  /* ===== 详细信息分组（重铸：4 列网格 + 分组标题） ===== */
  .detail-groups { display: flex; flex-direction: column; gap: 4px; }
  .detail-group {
    border-bottom: 1px solid #EFF1F4;
    padding: 4px 0;
  }
  .detail-group:last-child { border-bottom: none; }
  .detail-group-head {
    font-size: 11px; color: #9CA3AF;
    text-transform: uppercase; letter-spacing: 0.6px;
    padding: 8px 4px 6px;
  }
  .metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }
  .metric {
    padding: 12px 14px;
    border-right: 1px solid #EFF1F4;
    transition: background .15s;
  }
  .metric:last-child { border-right: none; }
  .metric:hover { background: #FAFBFD; }
  .metric .label {
    font-size: 12px; color: #6B7280;
    display: flex; align-items: center; gap: 6px;
  }
  .metric .value {
    font-size: 20px; font-weight: 500; color: #1F2937;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
  }
  .metric .sub { font-size: 11px; color: #9CA3AF; margin-top: 2px; }

  /* ===== 区块标题 ===== */
  .section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin: 2px 4px 14px;
  }
  .section-head h2 { font-size: 15px; font-weight: 600; letter-spacing: 0.4px; color: #1F2937; }
  .section-head .meta { font-size: 12px; color: #6B7280; }

  /* ===== 24 小时趋势（重铸：温度曲线 + 横滚卡片） ===== */
  .hourly-chart {
    margin: 0 -4px 12px;
    overflow-x: auto;
    padding: 0 4px 4px;
    -webkit-overflow-scrolling: touch;
  }
  .hourly-chart::-webkit-scrollbar { height: 0; }
  .hourly-chart svg { display: block; }
  .hourly-wrap { overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
  .hourly-wrap::-webkit-scrollbar { height: 6px; }
  .hourly-wrap::-webkit-scrollbar-thumb { background: #E5E9F0; border-radius: 3px; }
  .hourly {
    display: flex; gap: 6px; min-width: max-content;
  }
  .hour {
    flex: 0 0 64px;
    background: #F8FAFC;
    border: 1px solid #EEF1F4;
    border-radius: 12px;
    padding: 12px 6px;
    text-align: center;
    transition: transform .15s, border-color .15s;
  }
  .hour.now { background: #EAF3FB; border-color: #0078D4; }
  .hour:hover { transform: translateY(-2px); }
  .hour .t { font-size: 12px; color: #6B7280; }
  .hour .ico { width: 30px; height: 30px; margin: 6px auto; }
  .hour .ico svg { width: 100%; height: 100%; }
  .hour .v { font-size: 15px; font-weight: 600; color: #1F2937; font-variant-numeric: tabular-nums; }
  .hour .p { font-size: 11px; color: #3B82F6; margin-top: 3px; }
  .hour .p.dim { color: #9CA3AF; }

  /* ===== 空气质量 + 日出日落（新版块） ===== */
  .duo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .sub-card {
    background: #F8FAFC;
    border: 1px solid #EEF1F4;
    border-radius: 12px;
    padding: 18px 20px;
  }
  .sub-card h3 {
    font-size: 13px; color: #9CA3AF;
    text-transform: uppercase; letter-spacing: 0.6px;
    margin-bottom: 14px;
  }
  /* AQI */
  .aqi-block { display: flex; align-items: center; gap: 16px; }
  .aqi-num {
    font-size: 48px; font-weight: 200; line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .aqi-meta { display: flex; flex-direction: column; gap: 4px; }
  .aqi-level { font-size: 16px; font-weight: 600; }
  .aqi-desc { font-size: 12px; color: #6B7280; line-height: 1.5; margin-top: 14px; }
  .aqi-bar {
    margin-top: 14px;
    height: 6px; border-radius: 3px;
    background: linear-gradient(90deg, #4CAF50, #FFC107, #FF9800, #F44336, #9C27B0, #616161);
    position: relative;
  }
  .aqi-bar .pin {
    position: absolute; top: -4px; width: 4px; height: 14px;
    background: #1F2937; border-radius: 2px;
    transform: translateX(-2px);
  }
  .aqi-trend { margin-top: 12px; }
  .aqi-trend svg { display: block; width: 100%; height: auto; }

  /* 日出日落弧 */
  .sun-arc { display: flex; align-items: flex-end; justify-content: center; }
  .sun-arc svg { display: block; width: 100%; max-width: 420px; height: auto; }
  .sun-times {
    display: flex; justify-content: space-between;
    margin-top: 10px; font-size: 13px; color: #6B7280;
  }
  .sun-times b { color: #1F2937; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }

  /* ===== 7 天预报（重铸：列表 + 温度条） ===== */
  .week { display: flex; flex-direction: column; gap: 0; }
  .day {
    display: grid;
    grid-template-columns: 100px 36px 1fr 130px;
    align-items: center;
    gap: 14px;
    padding: 12px 4px;
    border-bottom: 1px solid #EFF1F4;
    transition: background .15s;
  }
  .day:last-child { border-bottom: none; }
  .day:hover { background: #FAFBFD; }
  .day .dname { font-size: 14px; color: #1F2937; font-weight: 500; }
  .day .dname small { display:block; font-size: 11px; color: #9CA3AF; margin-top: 2px; font-weight: 400; }
  .day .dico { width: 32px; height: 32px; }
  .day .dico svg { width: 100%; height: 100%; }
  .day .dwn { font-size: 12px; color: #6B7280; line-height: 1.4; }
  .day .dwn .pop { color: #3B82F6; }
  .day .dbar-wrap {
    display: flex; align-items: center; gap: 10px;
    font-variant-numeric: tabular-nums;
  }
  .day .dlow  { font-size: 13px; color: #6B7280; width: 28px; text-align: right; }
  .day .dbar { position: relative; flex: 1; height: 5px; background: #F0F2F5; border-radius: 3px; }
  .day .dbar .fill {
    position: absolute; top:0; bottom:0; border-radius:3px;
    background: linear-gradient(90deg, #0072C6, #FFD580, #F7630C);
  }
  .day .dhigh { font-size: 14px; font-weight: 600; color: #1F2937; width: 32px; }

  /* ===== 未来天预报：折叠/展开 ===== */
  .week-extra {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .32s ease;
  }
  .week-extra.open { grid-template-rows: 1fr; }
  .week-extra > .week-extra-inner { overflow: hidden; }
  .week-extra .day:last-child { border-bottom: 1px solid #EFF1F4; }
  .week-toggle {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; padding: 11px 0 3px;
    font-size: 12px; color: #6B7280;
    background: none; border: none; cursor: pointer;
    transition: color .2s;
  }
  .week-toggle:hover { color: #0078D4; }
  .week-toggle .arrow {
    display: inline-block; width: 0; height: 0;
    border-left: 5px solid transparent; border-right: 5px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform .32s ease;
    transform: rotate(0deg);
  }
  .week-toggle.open .arrow { transform: rotate(180deg); }
  .week-toggle .count {
    background: #EFF6FF; color: #1D4ED8;
    padding: 1px 8px; border-radius: 10px; font-weight: 500;
  }
  .week-toggle.open .count { background: #F3F4F6; color: #6B7280; }

  /* ===== 15 天温度走势 ===== */
  .f15 { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .f15::-webkit-scrollbar { display: none; }
  .f15-inner { margin: 0 auto; }
  .f15-inner svg { display: block; }
  .f15-days { display: flex; }
  .f15-day { width: var(--cellW, 64px); flex: 0 0 var(--cellW, 64px); text-align: center; padding: 2px 0 4px; }
  .f15-day .n { font-size: 12px; font-weight: 600; color: #1F2937; }
  .f15-day .dt { font-size: 11px; color: #9CA3AF; margin-top: 1px; }
  .f15-day .ico { height: 28px; display: flex; align-items: center; justify-content: center; }
  .f15-day .ico svg { width: 26px; height: 26px; }
  .f15-day .wt { font-size: 11px; color: #374151; margin-top: 2px; line-height: 1.35; }
  .f15-day .wd { font-size: 11px; color: #9CA3AF; margin-top: 1px; line-height: 1.35; }

  /* ===== 生活指数 ===== */
  .zhishu { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 12px; }
  .z-item {
    background: #F8FAFC;
    border: 1px solid #EEF1F4;
    border-radius: 12px;
    padding: 14px 16px;
    transition: background .15s;
  }
  .z-item:hover { background: #FAFBFD; }
  .z-item .zname { font-size: 12px; color: #6B7280; text-transform: uppercase; letter-spacing: 0.4px; }
  .z-item .zval { font-size: 16px; font-weight: 600; color: #1F2937; margin-top: 4px; }
  .z-item .ztip { font-size: 12px; color: #6B7280; margin-top: 6px; line-height: 1.55; }

  /* ===== 加载/错误 ===== */
  .state {
    text-align: center; padding: 80px 20px; color: #4B5563;
  }
  .state .spinner {
    width: 38px; height: 38px; margin: 0 auto 18px;
    border: 3px solid #E5E9F0; border-top-color: #0078D4;
    border-radius: 50%; animation: spin 0.9s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  .state .msg { font-size: 14px; color: #6B7280; }
  .state .retry {
    margin-top: 16px; border: 1px solid #0078D4;
    background: #fff; color: #0078D4;
    padding: 9px 22px; border-radius: 18px;
    font-size: 13px; cursor: pointer;
    transition: background .2s, color .2s;
  }
  .state .retry:hover { background: #0078D4; color: #fff; }

  .hidden { display: none !important; }

  /* ===== 页脚 ===== */
  .foot {
    margin-top: 28px; border-top: 1px solid #EDF0F5; background: #fff;
  }
  .fl-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
  .fl-row {
    display: flex; align-items: baseline; text-align: left;
    padding: 13px 0; font-size: 13px; border-bottom: 1px solid #F3F5F8;
  }
  .fl-label { color: #9CA3AF; flex-shrink: 0; }
  .fl-row a { margin-right: 26px; white-space: nowrap; }
  .fl-row a:last-child { margin-right: 0; }
  .fl-links a { color: #0078D4; text-decoration: none; }
  .fl-links a:hover { text-decoration: underline; }
  .brand { padding: 16px 20px 20px; text-align: center; font-size: 12px; color: #6B7280; line-height: 1.9; }
  .brand svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; color: #F59E0B; }
  .brand a { color: #0078D4; }
  .brand a:hover { text-decoration: underline; }
  .icp { color: #9CA3AF; }

  /* ===== 响应式 ===== */
  @media (max-width: 720px) {
    .metrics-row { grid-template-columns: repeat(2, 1fr); }
    .fl-row { flex-wrap: wrap; row-gap: 6px; }
    .metric:nth-child(2n) { border-right: none; }
    .duo-grid { grid-template-columns: 1fr; }
    .day { grid-template-columns: 88px 30px 1fr 110px; gap: 10px; padding: 11px 4px; }
    .day .dwn { display: none; }
  }
  @media (max-width: 480px) {
    .app { padding: 14px 12px 40px; gap: 20px; }
    .hero { grid-template-columns: 1fr; min-height: 0; }
    .hero-right { justify-content: flex-start; }
    .city-name { font-size: 22px; }
    .temp { font-size: 76px; }
    .temp-unit { font-size: 26px; margin-top: 10px; }
    .w-icon { width: 112px; height: 112px; }
    .card { padding: 16px 14px; border-radius: 12px; }
    .metric { padding: 10px 12px; }
    .clock { text-align: left; min-width: 0; }
    .search-title { font-size: 20px; }
    .search-desc { font-size: 12px; margin-bottom: 16px; }
    .hot { gap: 8px; margin-top: 14px; }
    .hot button { padding: 6px 14px; font-size: 12px; }
    .nav { gap: 14px; padding: 8px 12px; }
    .nav-logo { font-size: 16px; }
    .nav-item { padding: 6px 10px; font-size: 13px; }
    .nav-drop-menu { min-width: 160px; }
    .aqi-num { font-size: 40px; }
  }
