/* ============================================================
   营运参谋三页样式（批一九五）：天气 .we- / 营销日历 .mc- / 竞调参谋 .rv-
   独立成文件避让 app.css 战区（price.css / seasonal.css 同款理由），
   必须排在 app.css 之后。三页类名前缀互不相撞，也不碰 .adv-（浮层）。
   色彩一律 tokens.css 变量，零裸色值（pc-price ⑪ 同款纪律）。
   ============================================================ */

/* ==================== 天气（#/weather · .we-） ====================
   批一八一重构：预警置顶 → 今天主卡三区 → 七天七列 → 生活指数两列 → 溯源。
   旧版的 .we-day（竖列表）/ .we-cross（hero 右侧孤句）/ .we-advices（建议独立段落）
   全部作废；温区带的 left/width 仍只吃服务端 pct，样式不参与计算。 */
.we-skel { background: var(--card-2); border: 1px solid var(--line); animation: we-pulse 1.2s ease-in-out infinite; }
@keyframes we-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ① 预警横幅：置顶，压过常规信息 */
.we-alerts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.we-alert { background: var(--danger-tint); border: 1px solid var(--danger-soft); border-left: 3px solid var(--danger); border-radius: var(--r-m); padding: 12px 16px; }
.we-alert b { font-size: var(--t-body); color: var(--danger); }
.we-alert p { margin: 6px 0 0; font-size: var(--t-aux); color: var(--text-2); line-height: var(--lh); }
.we-alert-t { display: block; margin-top: 6px; font-size: var(--t-weak); color: var(--t3); }

/* ② 今天主卡：实况 ｜ 实况 chips ｜ 今天怎么办（结论位） */
.we-hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(280px, 420px);
  align-items: center; gap: 28px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px 28px;
}
/* 窄屏三区改竖排——横向挤成三根面条不如竖着给（与 mc-cols 同款断点） */
@media (max-width: 1100px) { .we-hero { grid-template-columns: 1fr; gap: 18px; align-items: start; } }
.we-now { min-width: 150px; }
.we-temp { font-size: 52px; font-weight: 700; line-height: 1.05; color: var(--text); font-variant-numeric: var(--num); }
.we-temp i { font-style: normal; font-size: 22px; font-weight: 600; color: var(--t3); margin-left: 2px; }
.we-now-t { margin-top: 8px; font-size: var(--t-card); font-weight: 600; color: var(--text); }
/* 两列网格 + justify-items: start：列只管对齐，chip 宽度随内容——
   不写就会把「湿度 80%」拉成一条半行宽的空胶囊（跟 hero 右侧孤句一个病） */
.we-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; justify-items: start; }
/* 只有一枚 chip 时不许撑成半行孤块 */
.we-chip:only-child { grid-column: 1 / -1; }
.we-chip {
  display: flex; align-items: baseline; gap: 7px; min-width: 0;
  background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 7px 12px;
}
.we-chip-k { font-size: var(--t-weak); color: var(--t3); }
.we-chip b { font-size: var(--t-body); color: var(--text); font-variant-numeric: var(--num); }
.we-chip b i { font-style: normal; font-size: var(--t-weak); font-weight: 400; color: var(--t3); }

.we-todo { background: var(--brand-soft); border-radius: var(--r-m); padding: 14px 16px; }
.we-todo-t { font-size: var(--t-aux); font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.we-todo-i {
  position: relative; padding-left: 13px; margin-top: 6px;
  font-size: var(--t-aux); color: var(--text); line-height: var(--lh);
}
.we-todo-i:first-child { margin-top: 0; }
.we-todo-i::before {
  content: ''; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand);
}
/* 降级/无建议时的占位话术：明说不出，不拿假话填格子 */
.we-todo-na { font-size: var(--t-aux); color: var(--t3); line-height: var(--lh); }

.we-sec-t { margin: 28px 0 12px; font-size: var(--t-card); font-weight: 700; color: var(--text); }
.we-sec-d { margin-top: -6px; margin-bottom: 12px; font-size: var(--t-weak); color: var(--t3); line-height: var(--lh); }

/* ③ 七天走势：横向七列卡，**可点选**（批一八二：点谁选中谁，下方详情联动）
   卡片是 <button>——天然可聚焦、可回车、可方向键，不用自己造 tabindex。
   注意 button 要重置 font/color/text-align，否则继承 UA 的居中粗体一套。 */
.we-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .we-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.we-dcol {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 14px 8px 12px; min-width: 0;
  font: inherit; color: inherit; text-align: center; cursor: pointer;
}
.we-dcol:hover { border-color: var(--line-strong); }
.we-dcol:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.we-dcol.today { border-color: var(--brand); }
.we-dcol.sel { border-color: var(--brand); background: var(--brand-soft); }
.we-dcol.sel .we-dband-seg { opacity: 1; }
.we-dw { font-size: var(--t-body); font-weight: 700; color: var(--text); }
.we-dcol.today .we-dw, .we-dcol.sel .we-dw { color: var(--brand); }
.we-dd { font-size: var(--t-weak); color: var(--t3); font-variant-numeric: var(--num); }
.we-dt { font-size: var(--t-aux); color: var(--text-2); text-align: center; }
.we-dband { position: relative; width: 100%; height: 6px; border-radius: 3px; background: var(--hover); overflow: hidden; display: block; }
.we-dband-seg { position: absolute; top: 0; height: 100%; border-radius: 3px; background: var(--brand); opacity: .55; }
.we-dhi { font-size: var(--t-body); color: var(--t3); font-variant-numeric: var(--num); white-space: nowrap; }
.we-dhi b { color: var(--text); font-weight: 700; }
/* 降水角标：有量才标（页面不给没数的日子摆空角标） */
.we-drain {
  position: absolute; top: 6px; right: 6px;
  font-size: var(--t-weak); font-weight: 600; line-height: 1.5;
  background: var(--link-soft); color: var(--link-wechat);
  border-radius: 999px; padding: 1px 7px; white-space: nowrap;
}
/* 温差小标：相对今天的高温差，相等不画 */
.we-dgap { font-size: var(--t-weak); color: var(--t3); font-variant-numeric: var(--num); }

/* 选中日详情条：只复述服务端字段，不下结论 */
.we-det {
  margin-top: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-m); padding: 14px 18px 16px;
}
.we-det-t { font-size: var(--t-aux); font-weight: 700; color: var(--text); margin-bottom: 12px; }
.we-det-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 14px 18px; }
.we-det-i { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.we-det-k { font-size: var(--t-weak); color: var(--t3); }
.we-det-v { font-size: var(--t-body); font-weight: 600; color: var(--text); font-variant-numeric: var(--num); }

/* ④ 生活指数：两列网格 + 类型图标 + 级别徽标着色（旧版只有名称+级别，太薄） */
.we-idx { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .we-idx { grid-template-columns: 1fr; } }
.we-idx-c { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; min-width: 0; }
.we-idx-h { display: flex; align-items: center; gap: 10px; }
.we-idx-h b { flex: 1 1 auto; min-width: 0; font-size: var(--t-body); color: var(--text); }
/* 徽标与图标只上色，不带盒子属性（状态类名家规：一带就污染所有消费方） */
.we-badge {
  flex: none; font-size: var(--t-weak); font-weight: 600; line-height: 1.6;
  border-radius: 999px; padding: 1px 10px; white-space: nowrap;
  background: var(--hover); color: var(--t3);
}
.we-idx-ic {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; background: var(--card-2); color: var(--t3);
}
.we-idx-svg { width: 19px; height: 19px; display: block; }
.we-idx-c[data-tone="good"] .we-idx-ic, .we-idx-c[data-tone="good"] .we-badge { background: var(--brand-soft); color: var(--brand); }
.we-idx-c[data-tone="mid"] .we-idx-ic, .we-idx-c[data-tone="mid"] .we-badge { background: var(--gold-soft); color: var(--on-gold); }
.we-idx-c[data-tone="warn"] .we-idx-ic, .we-idx-c[data-tone="warn"] .we-badge { background: var(--warn-soft); color: var(--on-warn); }
.we-idx-c p { margin: 9px 0 0; font-size: var(--t-aux); color: var(--text-2); line-height: var(--lh); }

/* ⑤ 溯源三件套 */
.we-foot { margin-top: 26px; font-size: var(--t-weak); color: var(--t3); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.we-foot-r { flex-basis: 100%; color: var(--t3); line-height: var(--lh); }
.we-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.we-dot.ok { background: var(--brand); }
.we-dot.warn { background: var(--warn); }

.we-err { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 26px 28px; font-size: var(--t-body); color: var(--text-2); line-height: 1.8; }
.we-retry { margin-top: 16px; }

/* ==================== 营销日历（#/calendar · .mc-） ====================
   批一九八重构：日历查看器 → **备稿排期台**。四段：
     ① KPI 四格（下一个节点 / 已进备稿期 / 本月剩余 / 今年还剩）
     ② 备稿队列——按 leadDays 算出的「该动手」先后排序，不是日历先后
     ③ 全年密度条——哪几个月忙，颜色深浅一眼看完
     ④ 月历网格（今天/已过/选中三态）+ 右侧选中日详情（提前量/区间/强度/关联卡）
   旧版 .mc-up / .mc-up-c / .mc-cd / .mc-side-14d 全部作废。
   纪律：色彩一律 tokens.css 变量，零裸色值；着色走 data-tone/data-lv 属性选择器，
   不用 .today/.due 这类通用状态词类名（它们是公共语义位，带盒子属性必污染消费方）。 */

/* ① KPI 四格 */
.mc-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1100px) { .mc-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mc-kpi-c { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; }
.mc-kpi-warn { background: var(--warn-soft); border-color: var(--warn); }
.mc-kpi-l { font-size: var(--t-weak); color: var(--t3); }
.mc-kpi-v { margin-top: 5px; font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: var(--num); line-height: 1.3; }
.mc-kpi-warn .mc-kpi-v { color: var(--on-warn); }
.mc-kpi-s { margin-top: 4px; font-size: var(--t-weak); color: var(--t3); line-height: var(--lh); }
.mc-kpi-warn .mc-kpi-s { color: var(--on-warn); }

/* 主体两栏：左=排期内容流，右=选中日详情（选中才有用，不占宽） */
.mc-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .mc-cols { grid-template-columns: 1fr; } }
.mc-main { min-width: 0; }
.mc-side { min-width: 0; }

.mc-sec { margin-bottom: 20px; }
.mc-sec-t { font-size: var(--t-card); font-weight: 700; color: var(--text); }
.mc-sec-d { margin-top: 4px; margin-bottom: 12px; font-size: var(--t-aux); color: var(--t3); line-height: var(--lh); }

/* ② 备稿队列：一行一个节点，横排信息，右侧永远挂着行动入口 */
.mc-queue { display: flex; flex-direction: column; gap: 8px; }
.mc-row {
  display: grid; grid-template-columns: 68px minmax(120px, 1.4fr) auto minmax(96px, auto) minmax(0, 1.6fr) auto;
  align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 11px 14px; font-size: var(--t-aux); color: var(--text-2);
}
.mc-row[data-tone="due"] { border-color: var(--warn); background: var(--warn-soft); }
.mc-row[data-tone="today"] { border-color: var(--brand); background: var(--brand-soft); }
.mc-row[data-tone="past"] { background: var(--card-2); color: var(--t3); }
.mc-row-tag { font-size: var(--t-weak); font-weight: 600; border-radius: 999px; padding: 3px 10px; text-align: center; background: var(--hover); color: var(--t3); white-space: nowrap; }
.mc-row[data-tone="due"] .mc-row-tag { background: var(--warn-soft); color: var(--on-warn); }
.mc-row[data-tone="today"] .mc-row-tag { background: var(--brand); color: var(--card); }
.mc-row[data-tone="soon"] .mc-row-tag { background: var(--gold-soft); color: var(--on-gold); }
.mc-row[data-tone="past"] .mc-row-tag { background: var(--card-2); color: var(--t3); }
.mc-row-name { font-size: var(--t-body); font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-row[data-tone="past"] .mc-row-name { color: var(--t3); font-weight: 400; }
.mc-row-d { font-variant-numeric: var(--num); white-space: nowrap; }
.mc-row-lead { font-size: var(--t-weak); color: var(--t3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-row-act { font-size: var(--t-aux); color: var(--brand); cursor: pointer; user-select: none; white-space: nowrap; }
.mc-row-act:hover { text-decoration: underline; }
.mc-row-type { font-size: var(--t-weak); padding: 1px 5px; border-radius: 4px; white-space: nowrap; }

/* 折叠区：已过 / 30 天以外，默认收起，点开才铺开 */
.mc-fold { margin-top: 10px; border: 1px dashed var(--line-strong); border-radius: var(--r-m); background: var(--card-2); }
.mc-fold-h { padding: 11px 14px; font-size: var(--t-aux); color: var(--t3); cursor: pointer; user-select: none; }
.mc-fold-h:hover { color: var(--text-2); }
.mc-fold.open .mc-fold-h { border-bottom: 1px dashed var(--line); color: var(--text-2); }
.mc-fold > .mc-queue { padding: 10px 12px; }

/* ③ 全年密度条：12 个月，深浅=当月节点多少 */
.mc-year { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 1100px) { .mc-year { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.mc-ym { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 9px 4px; text-align: center; cursor: pointer; user-select: none; }
.mc-ym b { display: block; font-size: var(--t-weak); color: var(--text-2); }
.mc-ym i { display: block; margin-top: 3px; font-size: var(--t-weak); font-style: normal; color: var(--t3); font-variant-numeric: var(--num); }
.mc-ym[data-lv="1"] { background: var(--brand-soft); border-color: var(--brand); }
.mc-ym[data-lv="1"] b { color: var(--brand); }
.mc-ym[data-lv="2"] { background: var(--gold-soft); border-color: var(--on-gold); }
.mc-ym[data-lv="2"] b { color: var(--on-gold); }
.mc-ym[data-lv="3"] { background: var(--warn-soft); border-color: var(--warn); }
.mc-ym[data-lv="3"] b { color: var(--on-warn); }
.mc-ym[data-cur="1"] { outline: 2px solid var(--brand); outline-offset: 1px; }
.mc-ym:hover { border-color: var(--text-2); }

/* ④ 月历网格 */
.mc-grid { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px 20px; }
.mc-mhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mc-mhead b { font-size: var(--t-card); color: var(--text); }
.mc-mhead-r { display: flex; align-items: center; gap: 8px; }
.mc-nav {
  width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--card-2);
  color: var(--text-2); cursor: pointer; font-size: var(--t-body); line-height: 1;
}
.mc-nav:hover { background: var(--hover); color: var(--text); }
.mc-nav:focus-visible, .mc-today:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mc-today {
  border: 1px solid var(--line); border-radius: 8px; background: var(--card-2);
  color: var(--text-2); cursor: pointer; font-size: var(--t-weak); padding: 6px 12px;
}
.mc-today:hover { background: var(--hover); color: var(--text); }
.mc-wrow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 4px; }
.mc-wrow i { font-style: normal; text-align: center; font-size: var(--t-weak); color: var(--t3); padding: 4px 0; }
.mc-drow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mc-dim { background: transparent; }
.mc-d {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 6px 5px 7px;
  border: 1px solid transparent; border-radius: 8px; background: var(--card-2); cursor: pointer; overflow: hidden;
}
.mc-d:hover { border-color: var(--line-strong); }
.mc-d.has-node { background: var(--card); border-color: var(--line); }
.mc-d.today { border-color: var(--brand); }
.mc-d.today .mc-dd { color: var(--brand); font-weight: 700; }
.mc-d.sel { outline: 2px solid var(--brand); outline-offset: 0; }
.mc-d.past { background: transparent; opacity: .55; }
.mc-dd { font-size: var(--t-aux); color: var(--text-2); font-variant-numeric: var(--num); }
.mc-ns { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mc-n {
  font-size: var(--t-weak); line-height: 1.35; padding: 1px 5px; border-radius: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mc-n-fest { background: var(--gold-soft); color: var(--on-gold); }
.mc-n-solar { background: var(--brand-soft); color: var(--brand); }
.mc-n-mkt { background: var(--link-soft); color: var(--link-wechat); }
.mc-n-more { font-size: var(--t-weak); color: var(--t3); padding-left: 5px; }

.mc-legend { display: flex; gap: 18px; margin-top: 14px; font-size: var(--t-weak); color: var(--t3); flex-wrap: wrap; }
.mc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mc-legend i { width: 10px; height: 10px; border-radius: 3px; }
.mc-legend i.mc-n-fest { background: var(--gold-soft); border: 1px solid var(--on-gold); }
.mc-legend i.mc-n-solar { background: var(--brand-soft); border: 1px solid var(--brand); }
.mc-legend i.mc-n-mkt { background: var(--link-soft); border: 1px solid var(--link-wechat); }
.mc-legend i.mc-sw-today { background: var(--card); border: 1px solid var(--brand); }
.mc-legend i.mc-sw-past { background: var(--card-2); border: 1px solid var(--line-strong); }

/* 右侧选中日详情 */
.mc-det { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 18px; }
.mc-det-d { font-size: var(--t-card); font-weight: 700; color: var(--text); margin-bottom: 10px; }
.mc-det-c { border-top: 1px dashed var(--line); padding: 13px 0 2px; }
.mc-det-c:first-of-type { border-top: 0; padding-top: 0; }
.mc-det-h { display: flex; align-items: center; gap: 8px; }
.mc-det-h b { font-size: var(--t-body); color: var(--text); }
.mc-det-r { display: flex; gap: 10px; margin-top: 6px; font-size: var(--t-aux); line-height: var(--lh); }
.mc-det-r span { flex: none; width: 68px; color: var(--t3); }
.mc-det-r i { font-style: normal; color: var(--text-2); min-width: 0; word-break: break-word; }
.mc-det-act { margin-top: 10px; font-size: var(--t-aux); color: var(--brand); cursor: pointer; user-select: none; }
.mc-det-act:hover { text-decoration: underline; }
.mc-det-empty { font-size: var(--t-aux); color: var(--t3); line-height: var(--lh); }

.mc-foot { margin-top: 14px; font-size: var(--t-weak); color: var(--t3); display: flex; align-items: center; gap: 7px; }
.mc-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.mc-dot.ok { background: var(--brand); }
.mc-dot.warn { background: var(--warn); }
.mc-empty { background: var(--card); border: 1px dashed var(--line-strong); border-radius: var(--r-m); padding: 18px 16px; font-size: var(--t-aux); color: var(--t3); line-height: var(--lh); }
.mc-err { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 26px 28px; font-size: var(--t-body); color: var(--text-2); line-height: 1.8; }

/* ==================== 竞调参谋（#/rival · .rv-） ==================== */
.rv-badge {
  display: inline-block; vertical-align: 4px; margin-left: 10px;
  font-size: var(--t-weak); font-weight: 600; color: var(--on-warn);
  background: var(--warn-soft); border-radius: 999px; padding: 3px 11px; letter-spacing: .05em;
}
.rv-pos, .rv-plan { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; margin-bottom: 16px; }
.rv-pos-t, .rv-plan-t { font-size: var(--t-card); font-weight: 700; color: var(--text); margin-bottom: 10px; }
.rv-pos-d { font-size: var(--t-body); color: var(--text-2); line-height: 1.8; }
.rv-plan { padding-bottom: 8px; }
.rv-plan-c { border-top: 1px solid var(--line); padding: 13px 0; }
.rv-plan-c:first-of-type { border-top: 0; padding-top: 2px; }
.rv-plan-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rv-plan-h b { font-size: var(--t-body); color: var(--text); }
.rv-st { font-size: var(--t-weak); font-weight: 600; color: var(--on-warn); background: var(--warn-soft); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.rv-plan-c p { margin: 7px 0 0; font-size: var(--t-aux); color: var(--text-2); line-height: var(--lh); }
.rv-note {
  font-size: var(--t-aux); color: var(--t3); line-height: 1.8;
  background: var(--card-2); border: 1px dashed var(--line-strong); border-radius: var(--r-m); padding: 13px 16px;
}
.rv-note b { color: var(--text-2); }
