/*!
 * 天气卡片模块 weather.css v1.0.0
 * ------------------------------------------------------------------
 * 与 weather.js 配套。所有样式都收在 .wx-weather 作用域内，
 * 颜色/圆角/阴影走 --wx-* 变量：宿主不定义也能正常显示（默认暗色）；
 * 需要浅色时给根节点加 .wx-light（或让 <html data-theme="light"> 让模块自动跟随）。
 *
 * 想和宿主配色统一，只要覆盖变量即可：
 *   .wx-weather { --wx-panel: #1b2233; --wx-accent: #4e6ef2; }
 * ------------------------------------------------------------------ */

/* ---------------- 主题变量（默认暗色） ---------------- */
.wx-weather {
  --wx-bg: #0b1020;
  --wx-bg-soft: #0d1424;
  --wx-panel: #131a2e;
  --wx-panel-2: #0f1526;
  --wx-line: rgba(255, 255, 255, .12);
  --wx-text: #e8eefc;
  --wx-muted: #8fa0c4;
  --wx-accent: #4e6ef2;
  --wx-accent-2: #7c4dff;
  --wx-pending: #cf8a2e;
  --wx-radius: 14px;
  --wx-shadow: 0 10px 28px rgba(0, 0, 0, .35);
  color: var(--wx-text);
  font-size: 13px;
  line-height: 1.4;
}
.wx-weather.wx-light,
[data-theme="light"] .wx-weather:not(.wx-dark) {
  --wx-bg: #eef2f9;
  --wx-bg-soft: #e6ecf6;
  --wx-panel: #ffffff;
  --wx-panel-2: #e8eef8;
  --wx-line: #d8e0ee;
  --wx-text: #1f2a44;
  --wx-muted: #5d6b8c;
  --wx-pending: #cf8a2e;
  --wx-shadow: 0 10px 28px rgba(30, 45, 90, .10);
}

/* ---------------- 卡片外壳 ---------------- */
.wx-card {
  background: linear-gradient(180deg, var(--wx-panel), var(--wx-bg-soft));
  border: 1px solid var(--wx-line); border-radius: var(--wx-radius);
  padding: 10px 12px 8px; box-shadow: var(--wx-shadow);
  display: flex; flex-direction: column; gap: 7px; min-width: 0;
}
/* 头部：标题 + 城市 chips + 默认显示 + 刷新/关闭，同一行，窄屏自动换行 */
.wx-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wx-head .wx-chips { flex: 1; min-width: 0; }
.wx-title { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.wx-refresh {
  background: transparent; border: 1px solid var(--wx-line); color: var(--wx-muted);
  border-radius: 8px; padding: 3px 9px; font-size: 12px; cursor: pointer; transition: .15s;
}
.wx-refresh:hover { color: var(--wx-text); border-color: var(--wx-accent); }

.wx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wx-chip {
  background: var(--wx-panel-2); color: var(--wx-muted); border: 1px solid var(--wx-line);
  border-radius: 999px; padding: 2px 8px; font-size: 11.5px; cursor: pointer;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: .15s;
}
.wx-chip:hover { color: var(--wx-text); }
.wx-chip.active {
  color: #fff; background: linear-gradient(180deg, var(--wx-accent), var(--wx-accent-2));
  border-color: transparent;
}
.wx-chip-add { border-style: dashed; }
.wx-chip-del { border-left: 1px dashed var(--wx-line); }

.wx-add { display: none; gap: 6px; }
.wx-add.open { display: flex; }
.wx-add input {
  flex: 1; min-width: 0; background: var(--wx-panel-2); border: 1px solid var(--wx-line);
  color: var(--wx-text); border-radius: 8px; padding: 6px 9px; font-size: 12.5px; outline: none;
}
.wx-add input:focus { border-color: var(--wx-accent); }

/* ---------------- 当前天气块 ---------------- */
.wx-now { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wx-now-main { min-width: 0; }
.wx-ico { font-size: 34px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25)); }
.wx-weather.wx-light .wx-ico,
[data-theme="light"] .wx-weather .wx-ico { filter: none; }
.wx-temp {
  font-size: 26px; font-weight: 800; letter-spacing: -.5px;
  font-variant-numeric: tabular-nums; line-height: 1.2;
  display: flex; align-items: baseline; gap: 8px; min-width: 0;
}
.wx-temp small { font-size: 14px; font-weight: 600; color: var(--wx-muted); }
.wx-cond {
  font-size: 12.5px; color: var(--wx-muted); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wx-cond b { color: var(--wx-text); font-weight: 700; }
.wx-nowdesc { font-size: 11.5px; color: var(--wx-muted); line-height: 1.5; }
.wx-nowdesc b { color: var(--wx-text); font-weight: 600; }

/* 默认显示城市下拉 */
.wx-defsel {
  flex: none; max-width: 130px; background: var(--wx-panel-2); color: var(--wx-muted);
  border: 1px solid var(--wx-line); border-radius: 8px; padding: 3px 6px;
  font-size: 11.5px; outline: none; cursor: pointer;
}
.wx-defsel:focus { border-color: var(--wx-accent); }
.wx-star { color: var(--wx-pending); font-size: 11px; }
.wx-chip.active .wx-star { color: #fff; }

/* 夜晚：真实月相 SVG（亮面随 illuminations 变化），有云/降水时叠一朵云 */
.wx-moon { position: relative; display: inline-block; line-height: 0; }
.wx-moon svg { filter: drop-shadow(0 4px 12px rgba(242, 230, 192, .18)); }
.wx-moon .wx-cloud {
  position: absolute; right: -7px; bottom: -3px; font-size: 19px; line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3));
}
/* 月亮信息行（旧纯文字版，已由下面的胶囊取代，保留仅为兼容） */
.wx-moonline { display: none; }
/* 天文胶囊：头部月相 + 当前天气块右侧太阳时间，两处共用同一套外观 */
/* 日出（左）+ 月亮（右）同行靠右，两个胶囊上下边缘严格对齐 */
.wx-astro-row {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  margin-left: auto; flex-wrap: wrap; min-width: 0;
}
.wx-astro-row .wx-astro-slot, .wx-astro-row .wx-astro { flex: 0 0 auto; min-width: 0; }
/* 桌面/中屏：太阳与月亮两个胶囊等长等宽（窄屏放不下，交给换行规则） */
@media (min-width: 621px) {
  .wx-weather .wx-astro-row .wx-astro { min-width: 306px; }
}
.wx-astro {
  display: inline-flex; align-items: center; gap: 7px; vertical-align: middle;
  padding: 2px 10px 2px 3px; border-radius: 999px;
  background: rgba(16, 22, 40, .72); border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 4px 14px rgba(0, 0, 0, .22);
  color: var(--wx-text); font-size: 10.5px; line-height: 1.35; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.wx-astro .a-ico { flex: none; width: 26px; height: 26px; display: block; line-height: 0; }
.wx-astro .a-ico svg { display: block; filter: drop-shadow(0 1px 4px rgba(242, 230, 192, .18)); }
.wx-astro .a-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.wx-weather.wx-light .wx-astro,
[data-theme="light"] .wx-weather .wx-astro {
  background: #fff; border-color: var(--wx-line); box-shadow: var(--wx-shadow);
}
/* 头部按钮组：刷新 + 关闭 */
.wx-head-btns { display: flex; gap: 6px; align-items: center; }
.wx-close {
  background: transparent; border: 1px solid var(--wx-line); color: var(--wx-muted);
  border-radius: 8px; width: 26px; height: 26px; font-size: 13px; cursor: pointer;
  line-height: 1; transition: .15s;
}
.wx-close:hover { color: #ff6b6b; border-color: #ff6b6b; }
/* 刷新中保留旧内容：整体轻微降透明提示在更新（不清空闪烁） */
.wx-updating .wx-card-body { opacity: .72; transition: opacity .2s; }
/* 关闭后的恢复条 */
.wx-reopen {
  width: 100%; padding: 10px 12px; border-radius: var(--wx-radius);
  background: var(--wx-panel); border: 1px dashed var(--wx-line); color: var(--wx-muted);
  font-size: 12px; cursor: pointer; text-align: left; transition: .15s;
}
.wx-reopen:hover { color: var(--wx-text); border-color: var(--wx-accent); }

/* ---------------- 面板（10 天 / 当天逐时） ---------------- */
.wx-panel {
  background: var(--wx-panel-2); border: 1px solid var(--wx-line); border-radius: 12px;
  padding: 7px 10px 5px; min-width: 0;   /* 宽度随卡片走，两块面板自然左右对齐 */
}
.wx-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--wx-text); margin-bottom: 2px; flex-wrap: wrap;
}
.wx-panel-head .wx-hint { font-size: 10.5px; color: var(--wx-muted); }
/* 图例行同时承载压缩后的小结：最高 / 最低 / 温差 / 雨日，右侧不再单独占位 */
.wx-legend {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-size: 11px; color: var(--wx-muted);
}
.wx-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; flex: none; }
.wx-legend .lg-hi { background: #ff9a42; }
.wx-legend .lg-lo { background: #4fc3ff; margin-left: 6px; }
.wx-legend .lg-today { background: #34d399; margin-left: 6px; }
.wx-legend i.lg-gap { width: 1px; height: 10px; background: var(--wx-line); border-radius: 0; margin: 0 3px; }
.wx-legend b { color: var(--wx-text); font-variant-numeric: tabular-nums; }
.wx-legend b.s-hi { color: #ff9a42; }
.wx-legend b.s-lo { color: #4fc3ff; }

/* ---------------- 今天 + 未来 10 天折线 ---------------- */
/* 右侧小结块已删除，.wx-chart-wrap 占满整宽；小结压缩进顶部图例行 */
.wx-chart-wrap { min-width: 0; position: relative; }
/* 绘图区：SVG / Y 轴刻度 / 现在气温气泡 / 小时刻度同一个定位上下文，
   高度由 .wx-chart 撑开（190px），各处百分比坐标因此与 SVG 的 viewBox 严格对应 */
.wx-plot { position: relative; }
/* 悬浮对齐线（吸附到当天折线点/日期列的 X 坐标）+ 高低温浮层 */
.wx-chart-cursor {
  position: absolute; top: 0; bottom: 0; width: 1px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 154, 93, .75), rgba(93, 169, 255, .55));
  box-shadow: 0 0 6px rgba(255, 154, 93, .35);
}
.wx-chart-cursor::before {
  content: ""; position: absolute; top: -2px; left: -2.5px; width: 6px; height: 6px;
  border-radius: 50%; background: #ff9a5d;
}
.wx-chart-tip {
  position: absolute; top: -2px; z-index: 3; pointer-events: none;
  padding: 3px 8px; border-radius: 7px; white-space: nowrap;
  background: rgba(16, 22, 40, .95); border: 1px solid var(--wx-line);
  box-shadow: var(--wx-shadow); font-size: 11.5px; color: var(--wx-text);
  font-variant-numeric: tabular-nums;
}
.wx-chart-tip b { font-weight: 700; }
.wx-chart-tip .t-ico { color: var(--wx-muted); }
.wx-chart-tip .t-hi { color: #ff9a42; font-weight: 700; margin-left: 4px; }
.wx-chart-tip .t-lo { color: #4fc3ff; font-weight: 700; margin-left: 4px; }
.wx-chart-tip .t-today { color: #34d399; font-weight: 700; margin-left: 4px; }
.wx-chart-tip .t-pp { color: var(--wx-accent); margin-left: 4px; }
.wx-weather.wx-light .wx-chart-tip,
[data-theme="light"] .wx-weather .wx-chart-tip { background: #fff; }
.wx-cday.active { background: rgba(255, 255, 255, .07); }
.wx-weather.wx-light .wx-cday.active,
[data-theme="light"] .wx-weather .wx-cday.active { background: rgba(0, 0, 0, .05); }

/* Y 轴刻度：叠在折线左侧空白里，跟随数据 */
.wx-chart-axis {
  position: absolute; left: 0; top: 0; height: 190px; width: 4.4%;
  pointer-events: none; z-index: 1;
}
.wx-chart-axis span {
  position: absolute; right: 3px; transform: translateY(-50%);
  font-size: 10px; color: var(--wx-muted); font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* 折线固定高度（preserveAspectRatio=none），高度与 viewBox 160 成比例，圆点才不会被拉扁 */
.wx-chart { display: block; width: 100%; height: 190px; }
/* 网格/分隔虚线用 currentColor，浅色主题下才看得见（RGB 写死在 SVG 里会隐没在白底上） */
.wx-chart { color: #fff; }
.wx-weather.wx-light .wx-chart,
[data-theme="light"] .wx-weather .wx-chart { color: #1f2a44; }

.wx-cdays {
  display: grid; grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 0; margin-top: 1px;
  /* 固定日期行高度：图标上移、温度字号加大后，整张卡片宽高仍保持不变 */
  height: 31px; align-items: stretch;
  /* 列数与左右留白由 JS 写入（与折线绘图区同一套几何），保证日期列中心正对折线点位 */
  padding-left: 4.6%; padding-right: 1.2%;
}
/* 全天小时刻度：定位基准是绘图区（.wx-plot），left/width/top 由 JS 按折线几何写入 */
.wx-taxis { position: absolute; top: 0; pointer-events: none; }
.wx-taxis .ta-line {
  position: relative; display: block; width: 100%; height: 12px;
  border-top: 1px dashed var(--wx-line);
}
.wx-taxis .ta-line i {
  position: absolute; top: 0; transform: translateX(-50%); font-style: normal;
  font-size: 8.5px; line-height: 12px; color: var(--wx-muted); font-variant-numeric: tabular-nums;
}
.wx-taxis .ta-line i.now { color: #34d399; font-weight: 700; }

/* 「现在 09:00 · 27°」气泡 + 倒三角指针（尖端对准当前小时的点；HTML 层做，避免 SVG 缩放拉变形）
   JS 会按点位位置追加 .at-l / .at-r（贴住左右边缘）和 .below（点位靠上时翻到点下方） */
.wx-nowmark {
  position: absolute; z-index: 3; display: flex; flex-direction: column; align-items: center;
  pointer-events: none; transform: translate(-50%, calc(-100% - 2px));
}
.wx-nowmark.at-l { transform: translate(-5px, calc(-100% - 2px)); align-items: flex-start; }
.wx-nowmark.at-r { transform: translate(calc(-100% + 5px), calc(-100% - 2px)); align-items: flex-end; }
.wx-nowmark.below { transform: translate(-50%, 2px); flex-direction: column-reverse; }
.wx-nowmark.below.at-l { transform: translate(-5px, 2px); align-items: flex-start; }
.wx-nowmark.below.at-r { transform: translate(calc(-100% + 5px), 2px); align-items: flex-end; }
.wx-nowpin {
  width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 10px solid #34d399;
}
.wx-nowmark.below .wx-nowpin { border-top: 0; border-bottom: 10px solid #34d399; }
.wx-nowtag {
  pointer-events: none; white-space: nowrap; margin-bottom: 2px;
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  color: #34d399; background: rgba(16, 22, 40, .92);
  border: 1px solid rgba(52, 211, 153, .45); font-variant-numeric: tabular-nums;
}
.wx-nowmark.below .wx-nowtag { margin-bottom: 0; margin-top: 2px; }
.wx-weather.wx-light .wx-nowtag,
[data-theme="light"] .wx-weather .wx-nowtag { background: #fff; }

/* 日期行：星期+日期 / 图标 + 高低温 + 降水 */
.wx-cday {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  padding: 0 1px; border-radius: 6px; text-align: center; min-width: 0; height: 100%;
}
/* 前三天标签：黄底胶囊浮在折线点上方，下缘的尖角正对该天「最高温」橙点；
   left/top 由 JS 按 SVG 同一套几何写入，HTML 层实现避免 SVG 横向缩放把文字拉变形 */
.wx-daytag {
  position: absolute; z-index: 2; transform: translate(-50%, calc(-100% - 9px));
  padding: 2px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none;
  background: #ffd25e; color: #2a2000; font-size: 10px; font-weight: 700; line-height: 1.35;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
}
.wx-daytag::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%);
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 6px solid #ffd25e;
}
/* 「今天」用绿色，与 00–24 时绿线呼应；其余三天保持黄色 */
.wx-daytag.is-today { background: #34d399; color: #073024; }
.wx-daytag.is-today::after { border-top-color: #34d399; }
.wx-cday:hover { background: rgba(255, 255, 255, .04); }
.wx-weather.wx-light .wx-cday:hover,
[data-theme="light"] .wx-weather .wx-cday:hover { background: rgba(0, 0, 0, .04); }
.wx-cday .c-name { font-size: 10.5px; color: var(--wx-text); white-space: nowrap; line-height: 1.2; }
/* 日期用正文亮色，暗黑模式下不再灰成一片（字号不变） */
.wx-cday .c-name em { font-style: normal; font-size: 12px; color: var(--wx-text); }
/* 日期条只放日期：今天高亮、昨天略暗，字号比原来大一些（腾出的「周X」空间给日期） */
.wx-cday .c-date { font-weight: 600; letter-spacing: .2px; }
.wx-cday .c-date.c-today { color: #ffd25e; font-weight: 700; }
.wx-cday .c-date.c-yest { color: var(--wx-muted, #8aa0bd); }
/* 天气图标带：绘图区底部、小时刻度下方、日期行上方（JS 按同一套几何写入 left/width/top/grid） */
.wx-dayicos {
  position: absolute; display: grid; align-items: center;
  pointer-events: none; z-index: 1;
}
/* 天气图标放大一倍；仍是绝对定位层，不占文档流，卡片高宽不变 */
.wx-dayicos .di { display: block; text-align: center; font-size: 32px; line-height: 32px; }
/* 第 1 列是「今天」：与黄色胶囊同色系，一眼能认出当天的橙/蓝点 */
.wx-cday .c-today { color: #ffd25e; font-weight: 700; }
.wx-cday .c-row {
  display: flex; align-items: center; gap: 3px; font-size: 13px;
  white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.2;
}
.wx-cday .c-hi { color: #ff9a42; font-weight: 700; }
.wx-cday .c-lo { color: #4fc3ff; font-style: normal; }
/* 亮色在白底上偏淡，浅色主题下加深一档（字号不变） */
.wx-weather.wx-light .wx-cday .c-hi,
.wx-weather.wx-light .wx-legend b.s-hi,
.wx-weather.wx-light .wx-chart-tip .t-hi,
[data-theme="light"] .wx-weather .wx-cday .c-hi,
[data-theme="light"] .wx-weather .wx-legend b.s-hi,
[data-theme="light"] .wx-weather .wx-chart-tip .t-hi { color: #d9640a; }
.wx-weather.wx-light .wx-cday .c-lo,
.wx-weather.wx-light .wx-legend b.s-lo,
.wx-weather.wx-light .wx-chart-tip .t-lo,
[data-theme="light"] .wx-weather .wx-cday .c-lo,
[data-theme="light"] .wx-weather .wx-legend b.s-lo,
[data-theme="light"] .wx-weather .wx-chart-tip .t-lo { color: #0b7ec9; }
.wx-cday .c-pp { font-style: normal; font-size: 9px; color: var(--wx-accent); }

/* ---------------- 当天逐时条（标题行取消：小标签 + 图标带 + 温度行） ---------------- */
.wx-hours-wrap { position: relative; min-width: 0; }
/* 左侧「今天」竖排标签：高度 = 图标带 + 温度行的总高 − 2px，并在其中垂直居中 */
.wx-hours-label {
  position: absolute; left: 0; top: 1px; width: 4.6%;
  height: calc(100% - 2px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; line-height: 1.05; color: #ffd25e;
}
.wx-hours-label i { font-style: normal; }
.wx-weather.wx-light .wx-hours-label,
[data-theme="light"] .wx-weather .wx-hours-label { color: #b57f00; }
.wx-hours-axis { position: relative; }
.wx-hicons { position: relative; height: 22px; margin-left: 4.6%; width: 94.2%; }
.wx-hi-ico {
  position: absolute; top: 0; transform: translateX(-50%);
  font-size: 16px; line-height: 22px; white-space: nowrap;
}
.wx-hi-ico.now { filter: drop-shadow(0 0 5px rgba(52, 211, 153, .75)); }
/* 逐时悬浮：绿色竖直对齐线 + 浮层（与上面 10 天图同一套观感） */
.wx-hcursor {
  position: absolute; top: -22px; bottom: 0; width: 1px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(52, 211, 153, .85), rgba(52, 211, 153, .2));
  box-shadow: 0 0 6px rgba(52, 211, 153, .3);
}
.wx-hcursor::before {
  content: ""; position: absolute; top: -2px; left: -2.5px; width: 6px; height: 6px;
  border-radius: 50%; background: #34d399;
}
.wx-htip {
  position: absolute; top: -2px; z-index: 3; pointer-events: none;
  padding: 3px 8px; border-radius: 7px; white-space: nowrap;
  background: rgba(16, 22, 40, .95); border: 1px solid var(--wx-line);
  box-shadow: var(--wx-shadow); font-size: 11.5px; color: var(--wx-text);
  font-variant-numeric: tabular-nums;
}
.wx-htip b { font-weight: 700; }
.wx-htip .t-ico { color: var(--wx-muted); }
.wx-htip .t-today { color: #34d399; font-weight: 700; margin-left: 4px; }
.wx-htip .t-pp { color: var(--wx-accent); margin-left: 4px; }
.wx-weather.wx-light .wx-htip,
[data-theme="light"] .wx-weather .wx-htip { background: #fff; }
.wx-hc.active { background: rgba(255, 255, 255, .07); }
.wx-weather.wx-light .wx-hc.active,
[data-theme="light"] .wx-weather .wx-hc.active { background: rgba(0, 0, 0, .05); }
.wx-hours-h { position: relative; height: 16px; margin-left: 4.6%; width: 94.2%; }
.wx-hc {
  position: absolute; top: 0; transform: translateX(-50%); width: 26px;
  display: flex; align-items: baseline; justify-content: center; gap: 0;
  padding: 1px 0; border-radius: 5px; border: 1px solid transparent; line-height: 1.4;
}
.wx-hc:hover { background: rgba(255, 255, 255, .04); }
.wx-weather.wx-light .wx-hc:hover,
[data-theme="light"] .wx-weather .wx-hc:hover { background: rgba(0, 0, 0, .04); }
.wx-hc .hc-t { font-size: 11px; font-weight: 700; color: var(--wx-text); font-variant-numeric: tabular-nums; }
.wx-hc .hc-deg { font-size: 8px; color: var(--wx-muted); }
.wx-hc.past { opacity: .5; }
.wx-hc.now { background: var(--wx-panel); border-color: var(--wx-accent); }
/* 时间轴说明 / 更新时间挪到头部空白（原逐时面板标题行） */
.wx-now-hint { font-size: 10px; color: var(--wx-muted); white-space: nowrap; }

/* ---------------- 状态文案 ---------------- */
.wx-err { font-size: 12.5px; color: var(--wx-pending); line-height: 1.6; }
.wx-err a { color: var(--wx-accent); }
.wx-loading { color: var(--wx-muted); font-size: 12.5px; padding: 6px 0; }

/* ---------------- 响应式 ---------------- */
/* 中窄屏 10 天列变窄，先收起降水概率，避免压字（悬浮提示与 title 里仍有） */
@media (max-width: 1100px) {
  .wx-weather .wx-cday .c-pp { display: none; }
}
@media (max-width: 980px) {
  .wx-weather .wx-panel { padding: 8px 8px 6px; }
  .wx-weather .wx-chart-wrap { max-width: none; }
  .wx-weather .wx-chart-axis { font-size: 8.5px; width: 4.6%; }
  .wx-weather .wx-chart-axis span { right: 1px; font-size: 8.5px; }
}
/* 手机窄屏：10 天列只有 ~29px，图标/日期/高低温横排必然互相压字 → 改为「周六 / 29° / 23°」三行 */
@media (max-width: 620px) {
  .wx-weather .wx-cdays { height: 39px; }
  /* 17 列时每列约 33px：「11/13」必须压到 8px 且收紧字距才不重叠。
     注意 .c-date 自身带 font-size，不继承父级，必须直接命中它。 */
  .wx-weather .wx-cday .c-name { white-space: nowrap; }
  .wx-weather .wx-cday .c-date { font-size: 8px; letter-spacing: -.4px; font-weight: 600; }
  .wx-weather .wx-cday .c-row { flex-direction: column; gap: 0; line-height: 1.05; }
  .wx-weather .wx-cday .c-pp { display: none; }
  .wx-weather .wx-dayicos .di { font-size: 26px; line-height: 26px; }
  /* 图标隐藏后温度独占两行，字号放大但行高压紧，日期行总高不变 */
  .wx-weather .wx-cday .c-hi, .wx-weather .wx-cday .c-lo { font-size: 11.5px; }
  /* 11 列时列宽只有 ~26px：标签压到最小，奇数位翻到点位下方、尖角朝上，
     上下交替后同侧两个标签相隔 2 列（>52px），任意数据下四个胶囊都不会互压 */
  .wx-weather .wx-daytag { font-size: 7.5px; padding: 0 3px; }
  .wx-weather .wx-daytag.alt { transform: translate(-50%, 9px); }
  .wx-weather .wx-daytag.alt::after {
    bottom: auto; top: -5px; border-top: 0; border-bottom: 6px solid #ffd25e;
  }
  /* 全天刻度每 3 小时一格，窄屏约 36px 间距仍可读 */
  .wx-weather .wx-taxis .ta-line i { font-size: 8px; }
  .wx-weather .wx-nowtag { font-size: 10px; padding: 1px 6px; }
  .wx-weather .wx-legend { font-size: 10px; gap: 3px; }
  .wx-weather .wx-legend i { width: 8px; }
  .wx-weather .wx-legend i.lg-gap { margin: 0 2px; }
  /* 窄屏 25 格只留「小图标 + 温度数字」，不再需要隐藏格子 */
  .wx-weather .wx-now-hint, .wx-weather .wx-hours-label { display: none; }
  .wx-weather .wx-hicons { height: 15px; }
  .wx-weather .wx-hi-ico { font-size: 10px; line-height: 15px; }
  .wx-weather .wx-hcursor { top: -15px; }
  .wx-weather .wx-hours-h { height: 13px; }
  .wx-weather .wx-hc { width: 12px; }
  .wx-weather .wx-hc .hc-t { font-size: 8px; }
  .wx-weather .wx-hc .hc-deg { display: none; }
  /* 窄屏：城市 chips 独占一行（否则会被下拉/按钮挤成竖排） */
  .wx-weather .wx-head .wx-chips { flex: 1 1 100%; }
  /* 两个胶囊整组换行；放不下并排时再各自换行，左边缘仍对齐 */
  .wx-weather .wx-astro-row { flex-basis: 100%; margin-left: 0; justify-content: flex-start; }
  /* 换行后两个胶囊都占满整行，窄屏下也保持等长等宽 */
  .wx-weather .wx-astro-row .wx-astro,
  .wx-weather .wx-astro-row .wx-astro-slot { width: 100%; min-width: 0; }
  .wx-weather .wx-astro { font-size: 9.5px; }
}

/* ===== lulu 宿主适配：升级 UI 后锁定原有宽高与位置 =====
   新版默认 1080x436 / top24，这里精确回到 1080x433 / top20
   （矮屏 1048x406）。偏大的浮层图标按比例略收，避免挤住日期行。 */
#wxBox{margin-top:0 !important}
#wxBox .wx-card{padding-bottom:7px}
#wxBox .wx-astro .a-ico{width:24px;height:24px}
#wxBox .wx-dayicos .di{font-size:29px;line-height:29px}
#wxBox .wx-hi-ico{font-size:15px}

/* ===== 信息区整合：天气块 + 更新提示 + 日月胶囊同一行 =====
   原来胶囊另占一行（90px），整合后只占 48px，整卡降低 42px；
   折线图 / 日期行 / 逐时条的尺寸完全不动。 */
#wxBox .wx-now{flex-wrap:nowrap;align-items:center;gap:10px}
#wxBox .wx-now-main{flex:0 0 auto}
#wxBox .wx-astro-row{margin-left:auto !important;flex-wrap:nowrap}
@media (max-width:760px){
  #wxBox .wx-now{flex-wrap:wrap}
  #wxBox .wx-astro-row{flex-basis:100%;margin-left:0 !important;flex-wrap:wrap}
}

/* ===== 浅色主题细节修正（天气卡） =====
   城市 chip / 默认城市下拉文字过淡；「现在」气泡只改了背景没改亮绿字 */
[data-theme="light"] .wx-weather .wx-chip,
[data-theme="light"] .wx-weather .wx-defsel{color:#3B4A63}
[data-theme="light"] .wx-weather .wx-chip:hover{color:#16233A}
[data-theme="light"] .wx-weather .wx-nowtag{
  background:#fff;color:#0f7a58;border-color:rgba(15,122,88,.38);
  box-shadow:0 2px 10px rgba(20,60,45,.12);
}

/* ===== 浅色月相：暗面原为 #10162e（黑圆），浅底上突兀 =====
   用属性选择器精确匹配月相 SVG，避免改到太阳图标的 #ffd25e 圆 */
[data-theme="light"] .wx-weather svg circle[fill="#10162e"]{
  fill:#C8D3E6; stroke:rgba(40,60,95,.32);
}
[data-theme="light"] .wx-weather svg path[fill="#f2e6c0"]{ fill:#FFF4CE; }

/* ================= 星空模式：天气卡 ================= */
[data-theme="star"] .wx-weather{
  --wx-bg:#050C20; --wx-bg-soft:#0A1734;
  --wx-panel:rgba(9,22,50,.66); --wx-panel-2:rgba(12,30,66,.58);
  --wx-line:rgba(132,176,255,.22);
  --wx-text:#EAF2FF; --wx-muted:#9DB6E0;
  --wx-accent:#8CC8FF; --wx-pending:#F3C77A;
  --wx-shadow:0 12px 40px rgba(0,8,30,.55);
}
[data-theme="star"] .wx-weather .wx-card{
  background:linear-gradient(180deg,rgba(10,24,56,.72),rgba(6,16,40,.66));
  border-color:rgba(132,176,255,.24);
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  box-shadow:0 12px 40px rgba(0,8,30,.5),inset 0 1px 0 rgba(160,200,255,.08);
}
[data-theme="star"] .wx-weather .wx-astro{
  background:rgba(10,26,58,.66);border-color:rgba(132,176,255,.24);
  box-shadow:inset 0 1px 0 rgba(160,200,255,.08);
}
[data-theme="star"] .wx-weather .wx-chip,
[data-theme="star"] .wx-weather .wx-defsel{
  background:rgba(20,42,88,.6);color:#B6CBE8;border-color:rgba(132,176,255,.24);
}
[data-theme="star"] .wx-weather .wx-chip.active{color:#EAF2FF;border-color:rgba(160,210,255,.6)}
[data-theme="star"] .wx-weather .wx-chart-tip,
[data-theme="star"] .wx-weather .wx-htip{background:rgba(8,20,48,.94)}
[data-theme="star"] .wx-weather .wx-cday.active,
[data-theme="star"] .wx-weather .wx-hc.active{background:rgba(120,170,255,.16)}
[data-theme="star"] .wx-weather .wx-nowtag{background:rgba(8,20,48,.9);color:#5EE9B5}
[data-theme="star"] .wx-weather svg circle[fill="#10162e"]{
  fill:#263C6E;stroke:rgba(150,190,255,.42);
}
[data-theme="star"] .wx-weather svg path[fill="#f2e6c0"]{fill:#FFF1CE}

/* 星空下暗月别像黑洞：提亮暗面、加冷色光晕 */
[data-theme="star"] .wx-weather svg circle[fill="#10162e"]{
  fill:#3B5896;stroke:rgba(176,208,255,.58);
}
[data-theme="star"] .wx-weather .wx-moon svg,
[data-theme="star"] .wx-weather .a-ico svg{
  filter:drop-shadow(0 0 10px rgba(140,180,255,.5));
}

/* ================= 某天逐时气温弹层 ================= */
.wx-cday{cursor:pointer}
.wx-cday:hover{background:rgba(127,170,255,.10)}
.wx-dmask{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;
  padding:20px;background:rgba(3,8,20,.76);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
  animation:wx-dfade .18s ease}
@keyframes wx-dfade{from{opacity:0}to{opacity:1}}
.wx-dmodal{width:min(720px,100%);border-radius:16px;padding:16px 18px 12px;
  background:linear-gradient(180deg,var(--wx-panel),var(--wx-bg-soft));
  border:1px solid var(--wx-line);box-shadow:0 24px 70px rgba(0,0,0,.55);
  color:var(--wx-text);font-size:12px}
.wx-dhead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.wx-dtitle{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.wx-dtitle b{font-size:14px;color:var(--wx-text)}
.wx-dbullet{color:var(--wx-accent);font-size:12px}
.wx-dmeta{color:var(--wx-muted);font-size:11.5px}
.wx-dclose{flex:none;width:26px;height:26px;border-radius:8px;border:1px solid var(--wx-line);
  background:transparent;color:var(--wx-muted);font-size:13px;cursor:pointer;line-height:1}
.wx-dclose:hover{color:var(--wx-text);border-color:var(--wx-accent)}
.wx-dchart{position:relative;height:220px;color:var(--wx-text)}
.wx-dsvg{position:absolute;inset:0;width:100%;height:100%;display:block}
.wx-dyl{position:absolute;left:0;transform:translateY(-50%);font-size:10px;color:var(--wx-muted);
  pointer-events:none}
.wx-dxl{position:absolute;bottom:-2px;transform:translateX(-50%);font-size:10px;
  color:var(--wx-muted);pointer-events:none}
.wx-ddot{position:absolute;width:5px;height:5px;margin:-2.5px 0 0 -2.5px;border-radius:50%;
  background:#34d399;pointer-events:none}
.wx-dcursor{position:absolute;top:0;bottom:0;width:1px;background:rgba(52,211,153,.65);
  pointer-events:none}
.wx-dhot{position:absolute;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;
  background:#34d399;border:2px solid var(--wx-panel);box-shadow:0 0 10px rgba(52,211,153,.8);
  pointer-events:none}
.wx-dxmark{position:absolute;bottom:2px;transform:translateX(-50%);min-width:20px;
  padding:1px 4px;border-radius:5px;background:#34d399;color:#06202a;font-size:9px;
  font-weight:700;text-align:center;pointer-events:none}
.wx-dtip{position:absolute;top:6px;z-index:2;white-space:nowrap;padding:5px 9px;border-radius:8px;
  background:rgba(8,16,34,.94);border:1px solid var(--wx-line);color:var(--wx-text);
  font-size:11.5px;box-shadow:0 6px 20px rgba(0,0,0,.4);pointer-events:none}
.wx-dtip b{color:var(--wx-text)}
.wx-dtip .t-ico{color:var(--wx-muted)}
.wx-dtip .t-today{color:#34d399;font-weight:700}
.wx-dtip .t-pp{color:var(--wx-muted)}
.wx-dhours{position:relative;height:44px;margin:10px 0 4px;border-top:1px solid var(--wx-line)}
.wx-dhour{position:absolute;top:6px;transform:translateX(-50%);text-align:center;
  min-width:20px;line-height:1.25;pointer-events:auto}
.wx-dhour i{display:block;font-style:normal;font-size:14px}
.wx-dhour b{display:block;font-size:10px;font-weight:600;color:var(--wx-muted)}
.wx-dfoot{text-align:center;font-size:10.5px;color:var(--wx-muted);opacity:.8;margin-top:2px}
[data-theme="light"] .wx-weather .wx-dtip{background:#fff}
[data-theme="light"] .wx-weather .wx-dmask{background:rgba(20,32,58,.42)}
[data-theme="light"] .wx-weather .wx-dmodal{box-shadow:0 24px 70px rgba(20,40,80,.28)}
[data-theme="star"] .wx-weather .wx-dtip{background:rgba(8,20,48,.94)}
@media (max-width:620px){
  .wx-dmodal{padding:12px 10px 10px}
  .wx-dchart{height:180px}
  .wx-dhour i{font-size:11px}
  .wx-dhour b{font-size:9px}
  .wx-dmeta{display:none}
}

/* ===== 图表翻屏：12 列内容按 9 列宽显示，箭头横向翻一屏 ===== */
.wx-chart-scroll{overflow-x:auto;overflow-y:hidden;scrollbar-width:none;
  -ms-overflow-style:none;scroll-behavior:smooth}
.wx-chart-scroll::-webkit-scrollbar{display:none}
/* 每屏 9 列：内容宽度按总列数换算（12 列 = 133%，17 列 = 189%） */
.wx-chart-scroll .wx-plot,.wx-chart-scroll .wx-cdays{
  width:calc(100% * var(--wx-cols, 12) / 9)}
.wx-pager{display:inline-flex;gap:4px;margin-left:10px;vertical-align:middle}
.wx-pager button{width:20px;height:20px;padding:0;line-height:18px;text-align:center;
  border-radius:6px;border:1px solid var(--wx-line,rgba(120,160,220,.3));
  background:rgba(255,255,255,.06);color:inherit;font-size:13px;cursor:pointer}
.wx-pager button:hover{border-color:var(--wx-accent,#7facff)}
.wx-pager button:disabled{opacity:.3;cursor:default}

/* ===== 逐时：00–24 点刻度 ===== */
.wx-hours-tick{position:relative;height:13px;margin:0 0 1px;width:100%}
.wx-hours-tick i{position:absolute;top:0;font-style:normal;font-size:9px;line-height:1;
  color:var(--wx-muted,#8aa0bd);transform:translateX(-50%);letter-spacing:.02em}
.wx-hours-tick i:first-child{transform:none}
.wx-hours-tick i:last-child{transform:translateX(-100%)}
