/* ============================================================
   天气·气象·全自动系统  ——  样式表
   设计取向：Windows 7 Aero 玻璃质感 / 三色按钮 / 拟物气象面板
   严禁紫色、渐变发光文字、emoji、过度毛玻璃
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
[hidden] { display: none !important; }   /* 覆盖 loading-mask 的 display:flex，避免 [hidden] 失效 */
body {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 13px;
  color: #1c2733;
  background:
    radial-gradient(1200px 700px at 20% -10%, #d6e3f1 0%, transparent 60%),
    radial-gradient(900px 600px at 110% 10%, #e1ebd6 0%, transparent 55%),
    linear-gradient(180deg, #eef3f8 0%, #cdd9e3 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ----------- 主框架 ----------- */
.desktop {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* ----------- 玻璃描边（复用工具类） ----------- */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(244,248,252,0.92));
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -1px 0 rgba(120,150,180,0.18),
    0 1px 2px rgba(40,70,100,0.08),
    0 2px 6px rgba(40,70,100,0.06);
  border-radius: 6px;
}

/* ----------- 标题栏 ----------- */
.titlebar {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.85) 0%,
    rgba(225,234,243,0.85) 50%,
    rgba(200,215,230,0.85) 100%);
  border-bottom: 1px solid rgba(120,150,180,0.45);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.6);
}
.brand { display: flex; align-items: center; gap: 8px; min-width: 260px; }
.brand-mark {
  width: 18px; height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #fff 0%, #6cb8e6 40%, #1c6aa6 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.6), 0 1px 2px rgba(0,0,0,0.2);
}
.brand-text {
  font-weight: 600;
  font-size: 13px;
  color: #10243d;
  letter-spacing: 0.5px;
}
.topnav {
  display: flex; gap: 4px; flex: 1; justify-content: center;
}
.topnav a {
  padding: 6px 14px;
  font-size: 12px;
  color: #2c3e50;
  text-decoration: none;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.topnav a:hover { background: rgba(28,141,212,0.10); }
.topnav a.active {
  color: #fff;
  background: linear-gradient(180deg, #5fb7e9 0%, #2a8fc8 50%, #1a6ca0 100%);
  border: 1px solid #145580;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 -1px 0 rgba(0,0,0,0.15);
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}

/* IP 查询视图 */
.ip-toolbar {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 18px;
}
.ip-mine {
  flex: 1;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(180deg, #f4f8fc 0%, #d6e2ec 100%);
  border: 1px solid #6f8ba0;
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -1px 0 rgba(0,0,0,0.05);
}
.ip-mine-lbl {
  font-size: 11px;
  color: #4a5a6b;
  letter-spacing: 0.5px;
  border-right: 1px solid #b6c2cf;
  padding-right: 12px;
}
.ip-mine code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  color: #10243d;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.ip-mine-loc {
  font-size: 11px;
  color: #1a3a5c;
  margin-left: auto;
  letter-spacing: 0.3px;
}

.ip-input { display: flex; gap: 6px; align-items: stretch; }
.ip-input input {
  width: 360px;
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-family: Consolas, "Courier New", monospace;
  color: #1c2733;
  background: linear-gradient(180deg, #ffffff, #eef3f8);
  border: 1px solid #6f8ba0;
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
  outline: none;
}
.ip-input input:focus {
  border-color: #1c8fd4;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08), 0 0 0 2px rgba(28,141,212,0.22);
}
.ip-input button {
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid #6f8ba0;
  background: linear-gradient(180deg, #f4f7fa, #d0dae2);
  color: #10243d;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 1px 1px rgba(0,0,0,0.1);
}
.ip-input button.primary {
  background: linear-gradient(180deg, #5fb7e9 0%, #2a8fc8 50%, #1a6ca0 100%);
  color: #fff;
  border-color: #145580;
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.ip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ip-cell {
  background: linear-gradient(180deg, #ffffff 0%, #f1f6fa 100%);
  border: 1px solid #c2d0dc;
  border-radius: 4px;
  padding: 10px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.ip-cell-l {
  font-size: 10px;
  color: #6c7a89;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ip-cell-v {
  font-size: 13px;
  color: #10243d;
  font-weight: 500;
  word-break: break-all;
  line-height: 1.4;
}
.ip-cell-v.mono {
  font-family: Consolas, "Courier New", monospace;
  letter-spacing: 0.3px;
}
.ip-cell-v.big {
  font-size: 16px;
  font-weight: 600;
  color: #1a3a5c;
  font-family: Consolas, "Courier New", monospace;
  letter-spacing: 0.5px;
}
.ip-cell-v.is-empty { color: #aab2bb; font-style: italic; }

.ip-badge-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 2px;
  letter-spacing: 0.5px;
}
.ip-badge-tag.v4 {
  background: linear-gradient(180deg, #dff0d4, #aedc8a);
  color: #1d4010;
  border: 1px solid #3e7a22;
}
.ip-badge-tag.v6 {
  background: linear-gradient(180deg, #cfe7f5, #88c4e2);
  color: #103e5a;
  border: 1px solid #2a8fc8;
}

.ip-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #8a99a8;
  font-size: 12px;
  background: repeating-linear-gradient(45deg, #f4f8fc, #f4f8fc 8px, #eaeff4 8px, #eaeff4 16px);
  border: 1px dashed #b6c2cf;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .ip-grid { grid-template-columns: repeat(2, 1fr); }
  .ip-toolbar { flex-direction: column; }
  .ip-input input { width: 100%; flex: 1; }
}

/* 整点报时托盘按钮 */
.chime-tray {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 10px;
  margin: 0 4px;
  background: linear-gradient(180deg, #f4f8fc 0%, #d6e2ec 100%);
  border: 1px solid #6f8ba0;
  border-radius: 11px;
  color: #1a3a5c;
  font-size: 11px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -1px 0 rgba(0,0,0,0.05),
    0 1px 1px rgba(0,0,0,0.08);
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  transition: all .15s;
}
.chime-tray:hover { filter: brightness(1.06); }
.chime-tray:active { transform: translateY(1px); }
.chime-tray .chime-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #8a99a8;
  box-shadow: 0 0 0 2px rgba(138,153,168,0.18);
  flex-shrink: 0;
}
.chime-tray.is-on {
  background: linear-gradient(180deg, #dff0d4 0%, #aedc8a 100%);
  border-color: #3e7a22;
  color: #1d4010;
}
.chime-tray.is-on .chime-dot {
  background: #2f8a14;
  box-shadow: 0 0 0 2px rgba(47,138,20,0.22);
  animation: chime-pulse 1.6s ease-in-out infinite;
}
@keyframes chime-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(47,138,20,0.22), 0 0 0 0 rgba(47,138,20,0.5); }
  50%      { box-shadow: 0 0 0 2px rgba(47,138,20,0.22), 0 0 0 5px rgba(47,138,20,0); }
}
#chimeNext {
  font-size: 10px;
  color: #4a5a6b;
  letter-spacing: 0.3px;
  font-family: Consolas, monospace;
  margin: 0 4px;
}

/* 整点报时浮窗 */
.chime-toast {
  position: fixed;
  right: 24px;
  bottom: 48px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #e8eef5 100%);
  border: 1px solid #6f8ba0;
  border-radius: 6px;
  box-shadow:
    0 6px 24px rgba(20,40,60,0.28),
    inset 0 1px 0 rgba(255,255,255,0.8);
  font-size: 12px;
  color: #10243d;
  min-width: 200px;
  animation: chime-toast-in .3s ease-out;
}
@keyframes chime-toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.chime-toast .ct-bars {
  display: flex; align-items: flex-end; gap: 2px;
  height: 22px;
}
.chime-toast .ct-bars span {
  width: 3px; background: #2f8a14; border-radius: 1px;
  animation: chime-bar 1s ease-in-out infinite;
}
.chime-toast .ct-bars span:nth-child(1) { height: 30%; animation-delay: 0s; }
.chime-toast .ct-bars span:nth-child(2) { height: 60%; animation-delay: .15s; }
.chime-toast .ct-bars span:nth-child(3) { height: 90%; animation-delay: .3s; }
.chime-toast .ct-bars span:nth-child(4) { height: 60%; animation-delay: .15s; }
.chime-toast .ct-bars span:nth-child(5) { height: 30%; animation-delay: 0s; }
@keyframes chime-bar {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}
.chime-toast .ct-info b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #10243d;
  letter-spacing: 0.5px;
}
.chime-toast .ct-info span {
  font-size: 10px;
  color: #6c7a89;
  letter-spacing: 0.5px;
}

.titlebar-right { display: flex; align-items: center; gap: 8px; min-width: 260px; justify-content: flex-end; }
.clock { font-family: "Consolas", monospace; font-size: 12px; color: #14304d; }
.dot-sep { color: #7a8b9b; }
.report-tag {
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 3px;
  background: linear-gradient(180deg, #f4f7fa, #d8e0e8);
  border: 1px solid #b6c2cf;
  color: #2c3e50;
}

/* ----------- 城市选择条 ----------- */
.citybar {
  display: flex; align-items: center; gap: 18px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(232,240,247,0.78));
  border-bottom: 1px solid rgba(120,150,180,0.4);
  flex-wrap: wrap;
}
.citybar-left { display: flex; align-items: baseline; gap: 8px; }
.lbl { font-size: 11px; color: #5a6770; }
#curCity { font-size: 18px; color: #10243d; }
#curAdcode { font-size: 11px; color: #7a8b9b; font-family: Consolas, monospace; }
.ip-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #fff;
  background: linear-gradient(180deg, #5fb7e9 0%, #2a8fc8 50%, #1a6ca0 100%);
  border: 1px solid #145580;
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
  position: relative;
  top: -2px;
}
.ip-badge::before {
  content: "●";
  color: #b8e6a3;
  margin-right: 4px;
  font-size: 8px;
  vertical-align: middle;
}
.citybar-search { position: relative; flex: 1; min-width: 320px; max-width: 560px; }
.citybar-search input {
  width: 100%;
  height: 32px;
  padding: 0 30px 0 12px;
  font-size: 13px;
  color: #1c2733;
  background:
    linear-gradient(180deg, #ffffff, #eef3f8);
  border: 1px solid #6f8ba0;
  border-radius: 3px;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.6);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.citybar-search::after {
  content: "Q";
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  border: 1.6px solid #1a3a5c;
  border-radius: 50%;
  color: #1a3a5c;
  font-family: "Times New Roman", serif;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.citybar-search::before {
  content: "";
  position: absolute;
  right: 7px; top: 50%;
  width: 8px; height: 1.6px;
  background: #1a3a5c;
  transform: translate(8px, 6px) rotate(45deg);
  z-index: 1;
  pointer-events: none;
}
.citybar-search input:focus {
  border-color: #1c8fd4;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.08),
    0 0 0 2px rgba(28,141,212,0.22);
}
.suggest {
  position: absolute; top: 36px; left: 0; right: 0;
  background: #ffffff;
  border: 1px solid #6f8ba0;
  border-radius: 3px;
  box-shadow: 0 8px 24px rgba(20,40,60,0.22);
  max-height: 380px; overflow-y: auto;
  z-index: 50;
}
.suggest-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eef2f6;
}
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover,
.suggest-item.is-active { background: #e6f2fb; }
.suggest-item .sg-main {
  display: flex; align-items: center; gap: 8px; margin-bottom: 2px;
}
.suggest-item .sg-name { font-size: 13px; color: #10243d; font-weight: 600; }
.suggest-item .sg-lv {
  font-size: 10px; padding: 1px 6px; border-radius: 2px;
  background: #dfe9f0; color: #1a3a5c; border: 1px solid #b8c8d4;
  letter-spacing: 0.3px;
}
.suggest-item .sg-sub {
  display: flex; justify-content: space-between;
  font-size: 11px; color: #6c7a89;
}
.suggest-item .adcode { font-family: Consolas, monospace; color: #1a3a5c; }
.suggest-empty { padding: 14px 12px; color: #7a8b9b; text-align: center; font-size: 11px; line-height: 1.6; }
.citybar-quick { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.citybar-quick .lbl { margin-right: 4px; }

/* ----------- 三色按钮 ----------- */
button, .citybar-quick button, .topnav a {
  font-family: inherit;
}
button {
  height: 26px;
  padding: 0 12px;
  font-size: 12px;
  color: #10243d;
  background: linear-gradient(180deg, #fbfdfe 0%, #e2ecf3 50%, #c8d6e0 100%);
  border: 1px solid #6f8ba0;
  border-radius: 3px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.85),
    inset 0 -1px 0 rgba(60,90,120,0.18);
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  transition: filter .12s;
}
button:hover { filter: brightness(1.05); }
button:active {
  background: linear-gradient(180deg, #c8d6e0 0%, #dde7ef 50%, #eef3f8 100%);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}
button.primary {
  color: #fff;
  background: linear-gradient(180deg, #5fb7e9 0%, #2a8fc8 50%, #1a6ca0 100%);
  border-color: #145580;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}
button.danger {
  color: #fff;
  background: linear-gradient(180deg, #eaa14a 0%, #d0661f 50%, #9b3f0a 100%);
  border-color: #7a2d05;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}

/* ----------- 视图容器 ----------- */
.viewport {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}
.view { display: none; }
.view.active { display: block; }

/* ----------- 卡片 ----------- */
.card {
  background: linear-gradient(180deg, #ffffff 0%, #f5f9fc 100%);
  border: 1px solid #b6c6d4;
  border-radius: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 1px 2px rgba(30,55,80,0.06),
    0 2px 8px rgba(30,55,80,0.05);
  overflow: hidden;
  margin-bottom: 14px;
}
.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 8px 14px;
  background: linear-gradient(180deg, #f1f6fa 0%, #dfe9f0 100%);
  border-bottom: 1px solid #c2d0dc;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.6);
}
.card-head h2 { font-size: 13px; font-weight: 600; color: #1a3a5c; letter-spacing: 0.4px; }
.card-sub { font-size: 11px; color: #6c7a89; }
.card-body { padding: 14px; }
.card-foot {
  padding: 6px 14px;
  font-size: 11px;
  color: #6c7a89;
  background: #f4f8fb;
  border-top: 1px solid #e2eaf0;
  display: flex; justify-content: space-between;
}
.card-foot i { font-style: normal; font-family: Consolas, monospace; }

/* ----------- 网格布局 ----------- */
.grid { display: grid; gap: 14px; }
.grid-main {
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-auto-rows: minmax(160px, auto);
}
.grid-main .card-live  { grid-column: 1 / 2; grid-row: 1 / 3; }
.grid-main .card-aqi   { grid-column: 2 / 3; grid-row: 1 / 2; }
.grid-main .card-sunmoon{grid-column: 3 / 4; grid-row: 1 / 2; }
.grid-main .card-warn  { grid-column: 2 / 4; grid-row: 2 / 3; }
.grid-main .card-trend { grid-column: 1 / 3; grid-row: 3 / 4; }
.grid-main .card-mini  { grid-column: 3 / 4; grid-row: 3 / 4; }

@media (max-width: 1100px) {
  .grid-main { grid-template-columns: 1fr 1fr; }
  .grid-main .card-live  { grid-column: 1 / 3; grid-row: 1; }
  .grid-main .card-aqi   { grid-column: 1 / 2; grid-row: 2; }
  .grid-main .card-sunmoon{grid-column: 2 / 3; grid-row: 2; }
  .grid-main .card-warn  { grid-column: 1 / 3; grid-row: 3; }
  .grid-main .card-trend { grid-column: 1 / 3; grid-row: 4; }
  .grid-main .card-mini  { grid-column: 1 / 3; grid-row: 5; }
}

/* ----------- 实况卡 ----------- */
.live-body { display: flex; gap: 18px; align-items: center; }
.live-icon { width: 140px; height: 140px; flex: none; }
.live-icon svg { width: 100%; height: 100%; }
.big-temp { font-size: 56px; font-weight: 200; color: #1a3a5c; line-height: 1; }
.big-temp em { font-size: 20px; font-style: normal; color: #4a5a6b; margin-left: 4px; }
.live-cond { font-size: 16px; color: #2c3e50; margin: 6px 0 12px; }
.live-line { display: flex; flex-wrap: wrap; gap: 6px 16px; color: #4a5a6b; font-size: 12px; }
.live-line b { color: #1a3a5c; font-weight: 600; margin-left: 4px; }

/* ----------- AQI 环 ----------- */
.aqi-body { display: flex; gap: 18px; align-items: center; }
.aqi-ring { width: 120px; height: 120px; position: relative; flex: none; }
.aqi-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #e2eaf0; stroke-width: 10; }
.ring-fg { fill: none; stroke: #4a8c2a; stroke-width: 10; stroke-linecap: round;
           stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .6s, stroke .4s; }
.aqi-num { position: absolute; inset: 0; display: flex; flex-direction: column;
           align-items: center; justify-content: center; }
.aqi-num span { font-size: 30px; color: #1a3a5c; font-weight: 300; }
.aqi-num em { font-size: 11px; color: #4a5a6b; font-style: normal; }
.aqi-list { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: 12px; }
.aqi-list li { display: flex; justify-content: space-between; color: #4a5a6b; padding: 2px 0;
               border-bottom: 1px dashed #e2eaf0; }
.aqi-list b { color: #1a3a5c; font-weight: 600; }

/* ----------- 日出日落 ----------- */
.sun-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sun-cell {
  background: linear-gradient(180deg, #fbfdfe, #eaf2f8);
  border: 1px solid #c8d6e0;
  border-radius: 4px;
  padding: 10px 8px;
  text-align: center;
}
.sun-cell i { display: block; margin: 0 auto 4px; width: 26px; height: 26px; }
.sun-cell span { display: block; font-size: 11px; color: #6c7a89; margin-bottom: 2px; }
.sun-cell b { font-family: Consolas, monospace; font-size: 14px; color: #1a3a5c; }

.ico-sun-up, .ico-sun-down, .ico-moon, .ico-moon-down {
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.ico-sun-up    { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d8612a'><circle cx='12' cy='12' r='4.5'/><g stroke='%23d8612a' stroke-width='1.6' stroke-linecap='round'><line x1='12' y1='2' x2='12' y2='5'/><line x1='12' y1='19' x2='12' y2='22'/><line x1='2' y1='12' x2='5' y2='12'/><line x1='19' y1='12' x2='22' y2='12'/><line x1='4.5' y1='4.5' x2='6.5' y2='6.5'/><line x1='17.5' y1='17.5' x2='19.5' y2='19.5'/><line x1='4.5' y1='19.5' x2='6.5' y2='17.5'/><line x1='17.5' y1='6.5' x2='19.5' y2='4.5'/></g></svg>"); }
.ico-sun-down  { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M2 18 H22' stroke='%23d8612a' stroke-width='1.6' stroke-linecap='round'/><path d='M3 16 L9 16' stroke='%23d8612a' stroke-width='1.4' stroke-linecap='round' opacity='.6'/><path d='M12 16 L18 16' stroke='%23d8612a' stroke-width='1.4' stroke-linecap='round' opacity='.6'/><path d='M19 16 L21 16' stroke='%23d8612a' stroke-width='1.4' stroke-linecap='round' opacity='.6'/></svg>"); }
.ico-moon      { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z' fill='%23f4c95d' stroke='%23a37a18' stroke-width='0.8'/></svg>"); }
.ico-moon-down { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z' fill='%23a3b6c2' stroke='%236c7a89' stroke-width='0.8'/></svg>"); }

.moon-strip {
  margin-top: 10px;
  padding: 6px 10px;
  font-size: 12px;
  background: #f4f8fb;
  border: 1px solid #d8e1ea;
  border-radius: 3px;
  display: flex; gap: 10px; align-items: baseline;
}
.moon-strip b { color: #1a3a5c; }
.moon-strip .muted { color: #7a8b9b; font-size: 11px; }

/* ----------- 预警 ----------- */
.warn-list { list-style: none; }
.warn-list li {
  padding: 8px 10px;
  border-bottom: 1px dashed #e2eaf0;
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12px;
}
.warn-list li:last-child { border-bottom: 0; }
.warn-list .tag {
  flex: none; min-width: 56px; text-align: center;
  padding: 2px 6px; border-radius: 2px; font-size: 11px;
  color: #fff; font-weight: 600;
  background: #4a8c2a;
  letter-spacing: 0.5px;
}
.warn-list .tag.yellow { background: #d8a62a; color: #4a3708; }
.warn-list .tag.orange { background: #d8612a; }
.warn-list .tag.red    { background: #b81c1c; }
.warn-list .tag.blue   { background: #2f7a9d; }
.warn-list .meta { color: #6c7a89; font-size: 11px; margin-top: 2px; }
.warn-empty { color: #6c7a89; padding: 18px; text-align: center; }

/* ----------- 趋势 SVG ----------- */
.card-trend .card-body { padding: 10px; }
#trendSvg { width: 100%; height: 200px; display: block; }

/* ----------- 地面要素 mini 网格 ----------- */
.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}
.mini-grid > div {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 4px;
  border-bottom: 1px dashed #e2eaf0;
  font-size: 12px;
}
.mini-grid span { color: #6c7a89; }
.mini-grid b { color: #1a3a5c; font-weight: 600; font-family: Consolas, monospace; }

/* ----------- 逐时条 ----------- */
.hourly-strip {
  display: flex; gap: 4px; overflow-x: auto; padding: 4px 0;
}
.hour-cell {
  flex: none;
  width: 78px;
  text-align: center;
  padding: 10px 4px;
  border-right: 1px dashed #e2eaf0;
}
.hour-cell:last-child { border-right: 0; }
.hour-cell .h-time { font-size: 11px; color: #6c7a89; font-family: Consolas, monospace; }
.hour-cell .h-ico  { width: 36px; height: 36px; margin: 6px auto; }
.hour-cell .h-ico svg { width: 100%; height: 100%; }
.hour-cell .h-temp { font-size: 16px; color: #1a3a5c; font-weight: 600; }
.hour-cell .h-wind { font-size: 11px; color: #4a5a6b; margin-top: 4px; }
.hour-cell.now { background: linear-gradient(180deg, #e6f2fb, #d6e6f0); border-radius: 3px; }
.hour-cell.now .h-time { color: #1a6ca0; font-weight: 600; }

/* ----------- 七天趋势 ----------- */
.daily-list { display: flex; flex-direction: column; }
.daily-row {
  display: grid;
  grid-template-columns: 90px 80px 1fr 200px 90px;
  align-items: center;
  gap: 14px;
  padding: 10px 4px;
  border-bottom: 1px dashed #e2eaf0;
}
.daily-row:last-child { border-bottom: 0; }
.daily-row .d-date  { font-size: 12px; color: #1a3a5c; font-weight: 600; }
.daily-row .d-date small { display: block; color: #7a8b9b; font-weight: 400; font-size: 11px; }
.daily-row .d-ico   { width: 40px; height: 40px; }
.daily-row .d-ico svg { width: 100%; height: 100%; }
.daily-row .d-cond  { font-size: 12px; color: #2c3e50; }
.daily-row .d-cond small { color: #7a8b9b; display: block; font-size: 11px; }
.daily-row .d-bar {
  position: relative; height: 8px; background: #eef2f6; border-radius: 4px; overflow: hidden;
}
.daily-row .d-bar-fill {
  position: absolute; top: 0; bottom: 0;
  background: linear-gradient(90deg, #4a8c2a, #d8a62a 50%, #b81c1c);
}
.daily-row .d-bar-mark {
  position: absolute; top: -3px; width: 2px; height: 14px; background: #1a3a5c;
}
.daily-row .d-temp  { text-align: right; font-family: Consolas, monospace; font-size: 13px; color: #1a3a5c; }
.daily-row .d-temp .lo { color: #2f7a9d; }
.daily-row .d-temp .hi { color: #b81c1c; }
.daily-row .d-wind  { font-size: 11px; color: #6c7a89; text-align: right; }

/* ----------- 生活指数 ----------- */
.indices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.idx-card {
  background: linear-gradient(180deg, #ffffff, #f4f8fc);
  border: 1px solid #c2d0dc;
  border-radius: 5px;
  padding: 12px;
  display: flex; gap: 10px; align-items: flex-start;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
.idx-card .idx-ico {
  width: 36px; height: 36px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #e6f2fb; border: 1px solid #b8d3e3; border-radius: 4px;
}
.idx-card h4 { font-size: 13px; color: #1a3a5c; margin-bottom: 4px; }
.idx-card .idx-lv { font-size: 11px; padding: 1px 6px; border-radius: 2px; color: #fff; display: inline-block; margin-left: 6px; }
.idx-card .idx-lv.l1 { background: #4a8c2a; }
.idx-card .idx-lv.l2 { background: #d8a62a; }
.idx-card .idx-lv.l3 { background: #d8612a; }
.idx-card .idx-lv.l4 { background: #b81c1c; }
.idx-card p { font-size: 12px; color: #4a5a6b; line-height: 1.55; }

/* ----------- 站点表 ----------- */
.station-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.station-table th, .station-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #e2eaf0;
  text-align: left;
}
.station-table th {
  background: #f1f6fa;
  color: #1a3a5c;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #c2d0dc;
}
.station-table tr:hover td { background: #f8fbfd; }
.station-table .empty { text-align: center; color: #7a8b9b; padding: 30px 0; }
.station-table .ok   { color: #4a8c2a; }
.station-table .warn { color: #d8612a; }

/* ----------- 状态条 ----------- */
.statusbar {
  display: flex; gap: 18px; align-items: center;
  height: 24px;
  padding: 0 14px;
  background: linear-gradient(180deg, #d6e1ec, #b8c6d4);
  border-top: 1px solid rgba(255,255,255,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
  font-size: 11px;
  color: #1a3a5c;
}
.status-cell { display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-green { background: #4a8c2a; box-shadow: 0 0 4px #4a8c2a; }
.dot-red   { background: #b81c1c; box-shadow: 0 0 4px #b81c1c; }

/* ----------- 加载遮罩 ----------- */
.loading-mask {
  position: fixed; inset: 0;
  background: rgba(20,30,45,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.loading-box {
  background: linear-gradient(180deg, #ffffff, #eef3f8);
  border: 1px solid #b6c6d4;
  border-radius: 6px;
  padding: 22px 32px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.loading-spin {
  width: 36px; height: 36px;
  margin: 0 auto 10px;
  border: 3px solid #d8e1ea;
  border-top-color: #1c8fd4;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.loading-box p { color: #1a3a5c; font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----------- Toast ----------- */
.toast {
  position: fixed; left: 50%; top: 64px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ffffff, #f0f4f8);
  border: 1px solid #b81c1c;
  color: #7a1010;
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  z-index: 200;
}

/* ----------- 杂项 ----------- */
.muted { color: #7a8b9b; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #b6c6d4; border-radius: 4px; }
::-webkit-scrollbar-track { background: #eef2f6; }
