/**
 * 控制台首页皮肤
 *
 * 类名与版式 1:1 对齐 /前端demo：
 *   pages/console.html（DOM 结构）+ assets/css/base/console.css（数值）
 *   - bento 7fr/3fr、欢迎条 34/36 + 80px 头像、四宫格 18/20 + 32px 数值
 *   - 安全仪表盘 100×58 半圆、资源表 --status、右栏 5 卡
 *
 * 三条约束：
 *   1) 颜色一律用 theme-vars 令牌，不写第二套配色；
 *   2) 作用域全部挂在 .home-main 下（首页独占文件）；
 *   3) 侧栏/顶栏不在此文件重定义 —— 它们来自 clientarea 的 theme-ui.css。
 */

/* 内容区背景（网格）
 *
 * 选择器必须写成 html .el-main.home-main，不能只写 .home-main。
 * 原因：外壳 theme-ui.css 有一条 html .el-main { padding: …!important;
 * background: var(--bg-color) }，优先级 (0,1,1)，高于 .home-main 的 (0,1,0)，
 * 而且 background 简写会把 background-image 重置成 none。
 * 只写 .home-main 的话网格一直不渲染——之前柔光版的径向光晕也是这样被吃掉的。
 *
 * padding 不在这里写：它由外壳的 !important 接管，页面回写是死代码。
 *
 * 底纹：20px 点阵
 *   2px 直径圆点 / 18% 主色——淡蓝颗粒，与侧栏底色同一色相，
 *   整页看起来是「一张淡蓝的纸」，而不是灰底上撒了点
 *   background-attachment: fixed —— 纹理钉在视口上，页面滚动时不动，
 *   只有卡片在纹理上滑过；否则长列表滚到底时纹理跟着走，会显得「纸在动」
 * 底色带 fallback：--bg-color 若未定义会让底色透明，点阵浮在白底上更难看清。
 */
html .el-main.home-main {
  background-color: var(--bg-color, #f4f5f7);
  background-image: radial-gradient(circle, rgba(37, 99, 235, .18) 1px, transparent 1px);
  background-size: 20px 20px;
  background-attachment: fixed;
}

/* ===== 外层栅格：demo console.css:291-303 ===== */
.console-bento {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(260px, 3fr);
  gap: var(--space-20);
  align-items: start;
}
.console-bento-main,
.console-bento-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

/* ===== 一、欢迎条：demo console.css:151-225 =====
   demo 用 banner-1.png 位图 + rgba(10,12,28,.45) 遮罩，此处 1:1 还原 */
/* 圆角按容器尺寸分档，不是随机不同：
   XL 欢迎条 180px 高 → 20px（占 11%）
   L  标准卡片 110px+ → 14px（占 13%）
   M  图标方块 36px   → 10px
   S  内嵌小格 60px   → 8px
   XS 小标签 20px     → 6px
   Pill 状态胶囊      → 999px
   统一成 14px 的话，欢迎条会显得「硬」，小标签会显得「圆」。 */
.welcome-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-24);
  padding: 34px var(--space-36);
  /* 钉死高度：内容列在「骨架 / 真实」两态下差 7px（179 / 186，实测），
     会让下方所有卡片整体上下移动，所以钉在加载后的真实高度 186。
     box-sizing 必须显式写 border-box：本元素拿不到全局的 border-box
     （外壳那条 html .el-main > * 只作用于 .el-main 的直接子元素，也就是
     .console-bento），默认 content-box 下 min-height 不含 34×2 的 padding，
     写 187 实际渲染成 255 —— 欢迎条被凭空撑高 69px。 */
  box-sizing: border-box;
  min-height: 186px;
  border-radius: 12px;
  /* 位图本身很重，投影用中性色不用主色——染蓝会让图片看起来在发蓝光 */
  box-shadow: 0 2px 4px rgba(16, 24, 40, .08), 0 12px 28px rgba(16, 24, 40, .10);
  overflow: hidden;
  background-image: url('../img/banner-1.png');
  background-size: cover;
  background-position: center;
}
.welcome-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 12, 28, .45);
  pointer-events: none;
}
.welcome-avatar {
  position: relative;
  z-index: 1;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
  font-size: var(--fs-32);
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.welcome-info {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}
.welcome-greeting {
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  /* demo 未设 line-height（继承 normal），body 的 1.5 会放大行高 → 显式归位 */
  line-height: normal;
  color: rgba(255, 255, 255, .55);
}
.welcome-name {
  margin-bottom: 6px;
  font-size: var(--fs-26);
  font-weight: 900;
  /* demo 无 line-height，normal = 26×~1.2 ≈ 31px（此前 --lh-heading 1.3 偏高） */
  line-height: normal;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.welcome-level {
  font-size: var(--fs-13);
  font-weight: 700;
  cursor: pointer;
}
.welcome-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-16);
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  line-height: normal; /* 同 demo：无显式行高 */
  color: rgba(255, 255, 255, .5);
}
.welcome-binds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 12px;
}
.welcome-bind {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  font-size: var(--fs-13);
  font-weight: 700;
  line-height: normal; /* demo 徽章高 27 = 5+17+5 */
  white-space: nowrap;
  background: rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .9);
}
.welcome-bind--off {
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .4);
}
.welcome-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.welcome-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px var(--space-20);
  font-size: var(--fs-14);
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--motion-base), color var(--motion-base);
}
.welcome-btn--white {
  background: #ffffff;
  color: var(--brand-blue);
}
.welcome-btn--white:hover {
  background: rgba(255, 255, 255, .9);
}
.welcome-btn--glass {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #ffffff;
}
.welcome-btn--glass:hover {
  background: rgba(255, 255, 255, .22);
}

/* ===== 二、四宫格统计：demo console.css:228-288 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-16);
}

/* ===== 通知条：后台「站务管理 → 首页通知条」下发，四宫格正下方 =====
   单行展示：内容超宽用省略号截断，全文放 title 里，避免把卡片行高撑起来。
   配色比商品页分组简介更淡一档——首页底纹本身带蓝色点阵，同色相叠加过多会发灰。 */
.home-notice {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  /* 抵消容器 gap(22px) 的一部分：通知条是扁条，上下各留 12px 更紧凑，
     其他板块的间距不受影响 */
  margin: -10px 0;
  padding: 10px var(--space-16);
  border: 1px solid var(--brand-blue-tint-15);
  border-radius: 12px;
  background: var(--brand-blue-tint-08);
  color: var(--brand-blue);
  font-size: var(--fs-13);
  line-height: 1.6;
}
.home-notice-icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  opacity: .9;
}
.home-notice-text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-theme="dark"] .home-notice {
  border-color: rgba(96, 165, 250, .28);
  background: rgba(96, 165, 250, .12);
  color: var(--brand-blue-light);
}
.stat-card {
  padding: 18px var(--space-20);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  /* 数值行在骨架态比真实态矮 2px（0 台 / 4 条 与实际字高不同），钉住。
     border-box：让 min-height 表示含 padding 的总高，别被 18×2 再叠加一次。 */
  box-sizing: border-box;
  min-height: 100px;
  cursor: default;
}
.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}
.stat-card-label {
  font-size: var(--fs-13);
  font-weight: 600;
  line-height: normal; /* demo 无显式行高（17px），body 1.5 会变 19.5 */
  color: var(--text-4);
}
.stat-card-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.stat-card-icon .ss-icon,
.stat-card-icon svg {
  width: 16px;
  height: 16px;
}
.stat-card-icon--blue { background: var(--brand-blue-tint-10); color: var(--brand-blue); }
.stat-card-icon--green { background: rgba(34, 197, 94, .1); color: var(--success); }
.stat-card-icon--amber { background: rgba(245, 158, 11, .1); color: var(--warning); }
.stat-card-icon--red { background: rgba(225, 29, 72, .1); color: var(--danger-bright); }
.stat-card-value {
  font-family: var(--font-numbers);
  font-size: var(--fs-32);
  font-weight: 500;
  line-height: var(--lh-compact);
  letter-spacing: -.5px;
  color: var(--text-main);
}
.stat-card-value .unit {
  margin-left: 6px;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--text-4);
}
.stat-card-value--success { color: var(--success); }
.stat-card-value--danger { color: var(--danger-vivid); }
.stat-card-footer {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--divider);
}
.stat-card-link {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  color: var(--text-5);
  cursor: pointer;
}
.stat-card-link:hover { color: var(--brand-blue); }
.stat-card-link--accent { color: var(--brand-blue); }

/* ===== 三、卡片基类：demo .cy-card console.css:314-330 ===== */
/* 卡片 / 卡头 / 分区标记 / 表格的定义已收口到 ss-ui.css 第 13 节
   （.ss-card ∪ .cy-card 共用一份），这里只留首页自己的卡内元素。 */
.cy-card-link {
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-5);
  cursor: pointer;
  transition: color var(--motion-fast);
}
.cy-card-link:hover { color: var(--brand-blue); }

/* ===== 并排行：demo .bento-row console.css:306-311（3fr/7fr） =====
   安全卡有 132px 仪表 + 16px 间距 + 右侧状态文案，最小内容宽度约 272px；
   低于这个阈值仪表会把状态文案压成逐字竖排。给安全卡 320px 最小列宽，
   不足时优先压缩活动列，而不是压缩安全卡内容。 */
.bento-row {
  display: grid;
  grid-template-columns: minmax(320px, 3fr) minmax(0, 7fr);
  gap: var(--space-20);
  /* 原来是 start：两卡各算各的高度（账号安全 199 / 最近活动 240），并排看
     底边错开一截。改成 stretch 让同一行的卡等高——矮的那张被拉齐，
     而不是去砍高那张的内容（日志条数是数据给的，砍了就永远对不齐）。 */
  align-items: stretch;
}

/* ===== 账号安全卡（bento-row 左侧 3fr）=====
   半圆仪表：弧线用 pathLength="100" 归一化，缺口百分比由 js 的 gaugeStyle 直接给，
   不再按弧长换算——半径一改就得重算系数，是上一个版本最容易错的地方。 */
.cy-card--security {
  display: flex;
}
/* 竖向 flex：图例用 margin-top:auto 钉在卡底，卡片被同行拉高时也不悬空 */
.cy-card--security .cy-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}
.cy-security-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}
.cy-security-head h3 {
  margin: 0;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--text-main);
}
.cy-security-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--fs-12);
  color: var(--text-4);
  text-decoration: none;
}
.cy-security-link:hover { color: var(--brand-blue); }
.cy-security-link svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cy-security-content {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  margin-top: var(--space-12);
}
.cy-security-gauge {
  position: relative;
  flex: 0 0 auto;
  width: 132px;
  height: 74px;
}
.cy-security-gauge--loading {
  display: flex;
  align-items: center;
  justify-content: center;
}
.cy-security-gauge--loading .sk-block {
  width: 118px;
  height: 58px;
  border-radius: 8px;
}
.cy-gauge-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.cy-gauge-track {
  fill: none;
  stroke: var(--divider);
  stroke-width: 10;
  stroke-linecap: round;
}
.cy-gauge-fill {
  fill: none;
  stroke: var(--success);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--motion-base) ease;
}
.cy-security-score {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}
.cy-security-score strong {
  font-family: var(--font-numbers);
  font-size: 30px;
  line-height: 1;
  color: var(--text-main);
}
.cy-security-score span {
  font-size: var(--fs-11);
  color: var(--text-4);
}
.cy-security-summary { min-width: 0; }
.cy-security-level {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--success);
}
.cy-security-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.cy-security-desc {
  margin: 6px 0 0;
  font-size: var(--fs-12);
  line-height: 1.6;
  color: var(--text-4);
}
/* 图例：通栏灰底，贴在卡片底边。
   左右/下负外边距抵消 .cy-card-body 的 20px 24px 内距，才能铺到卡边；
   margin-top:auto 在竖向 flex 里把它推到最底。 */
.cy-security-legend {
  --sec-legend-bg: rgba(15, 23, 42, .04);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-20);
  margin: auto -24px -20px;
  padding: 11px 24px;
  background: var(--sec-legend-bg);
  font-size: var(--fs-12);
  line-height: 1.5;
}
[data-theme="dark"] .cy-security-legend {
  --sec-legend-bg: rgba(255, 255, 255, .05);
}
.cy-security-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-3);
}
.cy-security-legend-item small {
  font-family: var(--font-numbers);
  font-size: var(--fs-11);
  color: var(--text-4);
}
.cy-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.cy-legend-dot--low { background: var(--danger-vivid); }
.cy-legend-dot--medium { background: var(--warning); }
.cy-legend-dot--high { background: var(--success); }
/* 分级配色：安全绿 / 中等琥珀 / 极低红，仪表与状态行同色 */
.cy-card--security.is-medium .cy-security-level { color: var(--warning); }
.cy-card--security.is-low .cy-security-level { color: var(--danger-vivid); }
.cy-card--security.is-medium .cy-gauge-fill { stroke: var(--warning); }
.cy-card--security.is-low .cy-gauge-fill { stroke: var(--danger-vivid); }

/* ===== 账号安全卡 · 三列统计条 =====
   flex:1 吃掉竖向 flex 的剩余高度并垂直居中，填充中部整宽留白。
   三列均分（flex:1 1 0），hairline 竖线分隔；每列两层：图标+标签(11px 提示灰)、
   数值(数字 18px / 文本 14px，中灰)。未实名用琥珀警示，是唯一语义色。
   同行活动卡拉高卡片时不悬空。 */
.cy-security-stats {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}
.cy-sec-stat {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0 var(--space-8);
}
.cy-sec-stat + .cy-sec-stat {
  border-left: 1px solid var(--divider);
}
.cy-sec-stat-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-11);
  line-height: 1.5;
  color: var(--text-4);
  white-space: nowrap;
}
.cy-sec-stat-value {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  line-height: 1;
  white-space: nowrap;
}
.cy-sec-stat-value b {
  font-family: var(--font-numbers);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-2);
}
.cy-sec-stat-value.is-text {
  font-family: var(--font-numbers);
  font-size: 14px;
  color: var(--text-2);
}
.cy-sec-stat-value.is-warn {
  color: var(--warning);
}

/* ===== 情绪问候卡 · 台钟式版式 =====
   上一版把 40px 问候语压在数码管上方，视线先撞到一句寒暄，再往下才看
   到时间；而且时钟下方叠了「轨迹 / LOCAL TIME / 说明 / 日期」四层，
   高度一拉长就成了资讯条。
   现在按台钟来组织：
     眉标（问候 + 日期 + LIVE）—— 一行小字交代处境
     数码管                    —— 绝对主体，占掉一半高度
     日出日落轨道              —— 贴在时钟底座，当日升日落的指示窗
     提示语                    —— 一句收尾
   层次只有一条主轴：小 → 大 → 细 → 小。 */
.cy-card--mood {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* 数码管三色只在时钟内使用，就地定义不下沉到 theme-vars：
     那是全站共享令牌，为一个卡片加三个变量会污染其它端的语义。 */
  --clock-on: #1f2937;
  --clock-off: rgba(31, 41, 55, .07);
  --clock-accent: #2563eb;
  /* 天体与轨迹的配色也按卡片主题走，不新增全站令牌 */
  --sky-glow: #f59e0b;
  --sky-trail: #f59e0b;
  --sky-moon: #64748b;
}
[data-theme="dark"] .cy-card--mood {
  --clock-on: #e8ecf6;
  --clock-off: rgba(255, 255, 255, .08);
  --clock-accent: #60a5fa;
  --sky-glow: #fbbf24;
  --sky-trail: #fbbf24;
  --sky-moon: #cbd5e1;
}
.cy-card--mood::after {
  content: "";
  position: absolute;
  top: -56px;
  right: -56px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, var(--mood-glow) 0%, rgba(255, 255, 255, 0) 70%);
  /* 10 秒一轮的极缓呼吸：不动的时候像静态，盯着看才发现它在起伏 */
  animation: mood-breathe 10s ease-in-out infinite;
}
@keyframes mood-breathe {
  0%, 100% { opacity: .82; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.07); }
}
.cy-card--mood.is-late { --mood-glow: rgba(99, 102, 241, .16); }
.cy-card--mood.is-morning { --mood-glow: rgba(245, 158, 11, .16); }
.cy-card--mood.is-noon { --mood-glow: rgba(37, 99, 235, .13); }
.cy-card--mood.is-evening { --mood-glow: rgba(139, 92, 246, .15); }
/* 暗色底上同样的 alpha 会显得发灰，换亮一档的色号并把透明度抬高 */
[data-theme="dark"] .cy-card--mood.is-late { --mood-glow: rgba(129, 140, 248, .28); }
[data-theme="dark"] .cy-card--mood.is-morning { --mood-glow: rgba(251, 191, 36, .24); }
[data-theme="dark"] .cy-card--mood.is-noon { --mood-glow: rgba(96, 165, 250, .24); }
[data-theme="dark"] .cy-card--mood.is-evening { --mood-glow: rgba(167, 139, 250, .26); }
.cy-card--mood .cy-card-body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  /* 三块按 space-between 分布：眉标顶住上沿、提示语压住下沿，
     时钟自然居中。卡片被拉到 240px 高时不会被全挤在上半截。 */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

/* ----- 眉标：两行网格。上排「问候 + LIVE」，下排「日期」 -----
   这张卡最窄时只有 206px（1280 视口、3fr 网格），三段信息排一行必然折字——
   上一版就把「夜深了」挤成了「夜深 / 了」。改成 2×2 网格后，
   问候和日期各自独占一行，宽度再窄也只是缩小字号，不会断字。 */
.cy-mood-head {
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr;
  grid-template-areas:
    "greet live"
    "date  date";
  align-items: center;
  column-gap: 10px;
  row-gap: 3px;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  line-height: 1.3;
  letter-spacing: .12em;
  color: var(--text-5);
}
.cy-mood-greet {
  grid-area: greet;
  /* 从 40px 主体降为眉标：它只是「此刻是清晨还是深夜」的注脚，
     真正的主角是下面那排数字 */
  font-size: var(--fs-13);
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  color: var(--text-main);
  /* 去掉渐变裁剪：小字号 + 渐变会让笔画边缘发虚 */
  background: none;
  -webkit-text-fill-color: currentColor;
}
.cy-mood-date {
  grid-area: date;
  white-space: nowrap;
}
/* LIVE 靠右，与问候同一行 */
.cy-mood-live {
  grid-area: live;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: var(--clock-accent);
}
.cy-mood-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: mood-live 2s ease-in-out infinite;
}
@keyframes mood-live {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}

/* ----- 提示语：一句收尾，压住下沿 ----- */
.cy-mood-note {
  font-size: var(--fs-13);
  line-height: 1.6;
  color: var(--text-4);
}

/* ===== 七段数码管时钟 =====
   六位（时 分 秒）画在同一张 SVG 里，冒号和数字共享坐标系——
   这正是上一版冒号歪斜的根因：数字是独立 <svg>，冒号是 flex 子项，
   两者各自算垂直居中，字号一变就对不上。现在只有一张图，位置写死。

   叠放关系：数字是底层背景，轨迹压在上面。
   用 grid 把两个 <svg> 塞进同一格，它们就天然重叠，不用绝对定位算高度。 */
.cy-clock {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  justify-items: start;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  /* 字宽推到 26px：数字越大越像一台真的台钟 */
  --clock-digit-w: 26px;
}
.cy-clock > * {
  /* 同一格重叠：这是数字做背景、轨迹压上面的关键 */
  grid-area: 1 / 1;
}
/* 刻度行单独占第二行，不参与叠放 */
.cy-clock-marks {
  grid-area: 2 / 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  /* 数字底部到刻度之间留出呼吸：贴太近会被读成数字的一部分 */
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--text-5);
  opacity: .85;
}
/* 六位数字的宽高比 268:56。--clock-digit-w 是「一个字的宽度」，
   整图宽度 = 字宽 × 268/32，高度由 viewBox 推导。
   任何容器宽度下都等比缩放，不会裁切也不会折行。 */
.cy-clock-svg {
  display: block;
  width: calc(var(--clock-digit-w) * 268 / 32);
  max-width: 100%;
  height: auto;
  cursor: pointer;
  border-radius: 6px;
  outline-offset: 4px;
  /* 数字退成背景：整体压低不透明度，让它成为一层纹理而不是标语。
     0.34 是实测的平衡点——再淡就只剩一团灰、读不出几点，
     再浓就又把轨迹压回去了。 */
  opacity: .34;
  z-index: 1;
  transition: opacity .3s ease;
}
/* 悬停时提亮，兼顾「想看清时间」的场景：需要读的时候鼠标一放就亮 */
.cy-clock:hover .cy-clock-svg { opacity: .58; }
/* 12 小时制的 AM/PM 贴在数字右上角，不参与布局 */
.cy-clock-meridiem {
  position: absolute;
  top: 0;
  right: 0;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--clock-accent);
  pointer-events: none;
}
.cy-clock-svg:focus-visible {
  outline: 2px solid var(--clock-accent);
}
/* 数字退成背景纹理后，熄灭段一律不画。
   保留它们会得到「淡色点亮段 + 极淡熄灭段」= 一片灰玻璃，深色底上尤其脏；
   只画点亮段，留下的是一排干净的剪影，作为底纹才成立。 */
.cy-clock-svg polygon:not(.is-on),
.cy-clock-dot:not(.is-on) {
  display: none;
}
.cy-clock-svg polygon {
  fill: var(--clock-on);
  transition: opacity var(--motion-fast) ease;
}
.cy-clock-svg polygon.is-on {
  fill: var(--clock-on);
}
[data-theme="dark"] .cy-clock-svg polygon.is-on {
  /* 暗色底不再加辉光：数字已经退成背景，发光会把它重新推成主角 */
  filter: none;
}
/* 冒号：与数字同款的切角方点，颜色跟点亮的段一致，不另起一种色。 */
.cy-clock-dot {
  fill: var(--clock-on);
  transition: opacity var(--motion-fast) ease;
}
.cy-clock-dot.is-on {
  fill: var(--clock-on);
}

/* ===== 日出日落轨道 =====
   压在数字上面的一层。数字已经退成背景纹理，这条弧线才是卡片的主角：
   太阳按时段沿弧线走，日落后换成月亮落到地平线下方。
   两者同格重叠（见 .cy-clock 的 grid），弧线穿过数字中段，
   像一道划过字面的天际线。 */
.cy-sky {
  display: block;
  width: calc(var(--clock-digit-w) * 264 / 32);
  max-width: 100%;
  height: auto;
  overflow: visible;
  /* 覆盖层：数字 z-index 1，这里 2 */
  z-index: 2;
  /* 纯粹是图形，不该吃掉数字那层的点击（点数字切 12/24 小时制） */
  pointer-events: none;
  /* 上移，让地平线落在数字下缘附近，弧顶穿过数字中段 */
  margin-top: -10px;
  /* 轨迹要压得住数字，所以整层略提一点不透明度，别被灰底吃掉 */
  opacity: 1;
}
.cy-sky-horizon {
  stroke: var(--divider);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}
/* 轨迹底色：整条弧都留着，白天走暖色，夜里只剩这条淡线。
   这条线是「此刻在一天中的位置」的唯一指示，太淡就等于没画，
   所以比分隔线略深一档，但不至于抢数码管。 */
.cy-sky-arc {
  fill: none;
  stroke: var(--divider);
  stroke-width: 1.8;
  stroke-linecap: round;
}
[data-theme="dark"] .cy-sky-arc { stroke: rgba(255, 255, 255, .13); }
/* 已走过的部分：暖色实线。
   这里不写 stroke，颜色由内联 style 给——CSS 的 stroke 会压过 SVG 呈现属性，
   属性写法会被算成底色灰，亮线根本出不来。 */
.cy-sky-arc.is-traversed {
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke-dasharray .9s linear;
}
/* 夜间月亮轨迹：地平线下方的小弧，比太阳轨迹更淡 */
.cy-sky-moonpath {
  fill: none;
  stroke: var(--divider);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 2 4;
}
/* 夜间走过的一段：冷色实线，让轨迹在夜里也不断线。
   比太阳段细一档是错的——夜里数字同样很淡，太细的线读不出来。 */
.cy-sky-moonpath.is-traversed {
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: none;
  transition: stroke-dasharray .9s linear;
}
/* 天体：白天是太阳（暖色实心），夜里是月牙（冷色）
   月牙靠 mask 挖掉一块实现，mask 内的圆跟着天体坐标走。 */
.cy-sky-body {
  fill: var(--sky-glow);
  transition: fill .5s ease;
}
.cy-sky.is-night .cy-sky-body {
  fill: var(--sky-moon);
}
.cy-sky-glow {
  opacity: .9;
  transition: opacity .5s ease;
}
/* 太阳的呼吸：极缓，像一点光晕在流动；夜里收掉，月亮不该发光 */
@keyframes sky-sun-pulse {
  0%, 100% { opacity: .75; }
  50% { opacity: 1; }
}
.cy-sky-glow { animation: sky-sun-pulse 6s ease-in-out infinite; }
.cy-sky.is-night .cy-sky-glow {
  opacity: .35;
  animation: none;
}

/* ===== 最近活动：demo .cy-log console.css:663-680 ===== */
.cy-log-list,
.cy-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* 时间轴：左边一条竖线 + 节点，时间移到右端。
   普通列表里时间和内容挤在同一行，扫读时两种信息互相干扰；
   时间右对齐后，左列是「发生了什么」，右列是「什么时候」，各读各的。 */
.cy-log {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0 9px 16px;
}
.cy-log::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--divider);
}
/* 首尾不画全高，线只在节点之间延伸 */
.cy-log:first-child::before { top: 15px; }
.cy-log:last-child::before { bottom: calc(100% - 16px); }
.cy-log::after {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 7px;
  height: 7px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid #b9c9ea;
}
.cy-log-time {
  order: 2;
  flex-shrink: 0;
  margin-left: auto;
  font-family: var(--font-numbers);
  font-size: var(--fs-11);
  color: var(--text-5);
  white-space: nowrap;
}
.cy-log-text {
  order: 1;
  flex: 1;
  font-size: var(--fs-13);
  line-height: var(--lh-base);
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cy-empty {
  padding: var(--space-24) 0;
  font-size: var(--fs-13);
  color: var(--text-5);
  text-align: center;
}
.cy-card--activity .cy-card-body {
  max-height: 200px;
  overflow: hidden;
}
.cy-news-scroll {
  /* 限高 180 = 5 行，超出仍可滚（鼠标滚轮 / 触控板 / 键盘都能滚），只是不画
     滚动条：这条滚动条太窄、颜色又淡，挂在卡片右侧更像一道划痕。 */
  max-height: 180px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cy-news-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* 到期列：原来只有一个日期，看不出还有几天。
   倒计时给「多少天」，3px 条给「紧迫到什么程度」——扫一列就能找到该续费的。
   条的宽度不是「已用时长」，而是 30 天兜底期的消耗度：越接近 100% 越紧急。 */
.cy-due-text {
  font-family: var(--font-numbers);
  font-size: var(--fs-12);
  color: var(--text-3);
  white-space: nowrap;
}
.cy-due-text.is-warn { color: var(--warning); }
.cy-due-text.is-danger { color: var(--danger); font-weight: 600; }
.cy-due-bar {
  width: 56px;
  height: 3px;
  margin: 5px 0 0 auto;
  border-radius: 2px;
  background: var(--divider);
  overflow: hidden;
}
.cy-due-bar > span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--brand-blue);
  transition: width .4s ease;
}
.cy-due-bar > span.is-warn { background: var(--warning); }
.cy-due-bar > span.is-danger { background: var(--danger); }

/* ===== 资源表：demo .cy-table console.css:448-527 ===== */
.cy-table-wrap {
  width: 100%;
  overflow-x: auto;
  max-height: 380px;
}
/* 表格基类同样在 ss-ui.css 第 13 节，这里只留本页的列宽/对齐修饰 */
.cy-table--status { min-width: 820px; }
.cy-table th.cy-th-center { text-align: center; }
.cy-table th.cy-th-right { text-align: right; }
.cy-table td.cy-td-strong { font-weight: 700; }
.cy-table td.cy-td-mono { font-family: var(--font-mono); }
.cy-table td.cy-td-center { text-align: center; }
.cy-table td.cy-td-date {
  text-align: right;
  font-family: var(--font-mono);
}
.cy-table td.cy-td-strong.cy-td-date { color: var(--warning); }
.cy-td-link {
  color: var(--text-main);
  font-weight: 700;
}
.cy-td-link:hover { color: var(--brand-blue); }
.cy-st-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: var(--fs-11);
  font-weight: 500;
  white-space: nowrap;
}
.cy-st-tag--ok {
  background: rgba(34, 197, 94, .1);
  color: var(--success);
}
.cy-st-tag--warn {
  background: rgba(245, 158, 11, .1);
  color: var(--warning);
}
.cy-empty-box {
  /* 与骨架表（thead + 4 行 = 220px）等高，切换过去时整卡不跳。
     220 是含上下 48px padding 的总高，所以必须 border-box；
     content-box 下原来的 246 实际渲染成 342，空态卡比骨架态高 122px。 */
  box-sizing: border-box;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-48) var(--space-20);
  text-align: center;
}
.cy-empty-box h2 {
  margin-bottom: var(--space-8);
  font-size: var(--fs-15);
  font-weight: 700;
  color: var(--text-main);
}
.cy-empty-box p {
  margin-bottom: var(--space-16);
  font-size: var(--fs-13);
  color: var(--text-5);
}

/* ===== 余额 / 按钮：demo console.css:352-374 + 529-566 ===== */
.cy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--space-8) 18px;
  font-size: var(--fs-12);
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--motion-base), color var(--motion-base);
}
.cy-btn--blue {
  background: var(--brand-blue);
  color: #ffffff;
}
.cy-btn--blue:hover { background: var(--brand-blue-dark); }
.cy-btn--ghost {
  background: var(--accent-tint);
  border: 1px solid var(--card-border);
  color: var(--text-3);
}
.cy-btn--ghost:hover {
  color: var(--brand-blue);
  border-color: var(--brand-blue);
  background: var(--brand-blue-tint-06);
}
.cy-btn--sm {
  padding: 5px 12px;
  font-size: var(--fs-11);
}
.cy-balance-label {
  margin-bottom: 6px;
  font-size: var(--fs-13);
  color: var(--text-4);
}
.cy-balance-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.cy-balance-value {
  font-family: var(--font-numbers);
  font-size: var(--fs-28);
  font-weight: 500;
  line-height: var(--lh-solid);
  color: var(--text-main);
}
.cy-balance-value--flat { letter-spacing: 0; }
.cy-balance-yen {
  margin-right: 2px;
  font-size: var(--fs-14);
  color: var(--accent, var(--brand-blue));
  font-weight: 500;
}
/* ===== 余额 / 按钮：demo console.css:352-374 + 529-566 ===== */
.cy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--space-8) 18px;
  font-size: var(--fs-12);
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--motion-base), color var(--motion-base);
}
.cy-btn--blue {
  background: var(--brand-blue);
  color: #ffffff;
}
.cy-btn--blue:hover { background: var(--brand-blue-dark); }
.cy-btn--ghost {
  background: var(--accent-tint);
  border: 1px solid var(--card-border);
  color: var(--text-3);
}
.cy-btn--ghost:hover {
  color: var(--brand-blue);
  border-color: var(--brand-blue);
  background: var(--brand-blue-tint-06);
}
.cy-btn--sm {
  padding: 5px 12px;
  font-size: var(--fs-11);
}
.cy-balance-label {
  margin-bottom: 6px;
  font-size: var(--fs-13);
  color: var(--text-4);
}
.cy-balance-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.cy-balance-value {
  font-family: var(--font-numbers);
  font-size: var(--fs-28);
  font-weight: 500;
  line-height: var(--lh-solid);
  color: var(--text-main);
}
.cy-balance-value--flat { letter-spacing: 0; }
.cy-balance-yen {
  margin-right: 2px;
  font-size: var(--fs-14);
  color: var(--accent, var(--brand-blue));
  font-weight: 500;
}
.cy-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.cy-mini-card {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent-tint);
}
.cy-mini-label {
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  color: var(--text-5);
}
.cy-mini-val {
  font-family: var(--font-numbers);
  font-size: var(--fs-20);
  font-weight: 500;
  color: var(--text-main);
}

/* KV 行 / 提示行 */
.cy-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
}
.cy-kv:last-child { border-bottom: none; }
.cy-kv-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-13);
  color: var(--text-4);
}
.cy-kv-val {
  font-family: var(--font-numbers);
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
}

/* ===== 财务总览：demo .cy-finance console.css:552-558 ===== */
/* 原来是两行「标签 空格 数值」，读起来像表格行，不像卡片。
   改成左右两段指标：标签在上、数值在下，中间一条竖分隔。 */
.cy-finance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  /* 加载后数值行含「环比」胶囊，比纯骨架高 4px —— 钉住，避免把下面两张卡推走 */
  box-sizing: border-box;
  min-height: 40px;
  margin-top: 6px;
}
.cy-finance-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.cy-finance-row + .cy-finance-row {
  padding-left: 14px;
  border-left: 1px solid var(--divider);
}
.cy-finance-label {
  font-size: var(--fs-12);
  color: var(--text-5);
  white-space: nowrap;
}
.cy-finance-amount {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  /* 骨架态这一行只有 16px 的金额（line-height:1），真实态多一枚「环比」胶囊
     （fs-12 + padding 1px → 20px），整行从 16 长到 20，把整张卡和下面的卡
     一起推下去 4px。钉住行高，两态都是 20。—— 注意是钉行盒不是钉 grid：
     grid 的 min-height 只能兜住「内容比它矮」，兜不住「内容比它高」。 */
  min-height: 20px;
}
.cy-finance-value {
  font-family: var(--font-numbers);
  font-size: var(--fs-16);
  font-weight: 600;
  letter-spacing: -.3px;
  line-height: var(--lh-solid);
  color: var(--text-main);
}
.cy-trend {
  font-family: var(--font-numbers);
  font-size: var(--fs-12);
  font-weight: 700;
  padding: 1px 6px;
}
.cy-trend--up {
  color: var(--success);
  background: rgba(34, 197, 94, .08);
}
.cy-trend--down {
  color: var(--danger-bright);
  background: rgba(225, 29, 72, .08);
}

/* ===== API 信息：demo .cy-api console.css:683-692 ===== */
.cy-api {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
}
.cy-api:last-child { border-bottom: none; }
/* 未激活时整行转「引导态」：虚线框 + 下方一行说明。
   原状只是一行灰字，用户扫过去不会意识到这里缺东西。 */
.cy-api.is-off {
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px dashed var(--card-border);
  border-radius: 10px;
  background: var(--surface-muted);
}
.cy-api-hint {
  margin: 8px 0 0;
  font-size: var(--fs-12);
  line-height: 1.6;
  color: var(--text-5);
}
.cy-api-name {
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--text-main);
}
.cy-api-st {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  font-weight: 700;
}
.cy-api-st--on { color: var(--success); }
.cy-api-st--off { color: var(--danger-bright); }

/* ===== 新闻 / 公告：demo .cy-news console.css:694-707 ===== */
/* 日期移到左侧当「日期戳」：左列对齐成一条时间轴，标题在右列自由伸展。
   原来是「标签 + 标题 + 日期」三件挤一行，窄栏里必然折行。 */
.cy-news {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: baseline;
  gap: 0 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
}
.cy-news:last-child { border-bottom: none; }
.cy-news:hover .cy-news-text { color: var(--brand-blue); }
.cy-news-text {
  font-size: var(--fs-13);
  line-height: var(--lh-base);
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cy-news-date {
  font-family: var(--font-numbers);
  font-size: var(--fs-11);
  color: var(--text-5);
  white-space: nowrap;
}
.cy-news-pin {
  width: fit-content;
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 800;
  color: #ffffff;
}
.cy-news-pin--top { background: var(--brand-blue); }
.cy-news-pin--new { background: var(--brand-cyan); }
.cy-news-pin--normal { background: var(--text-5); }

/* ===== 动态卡：新闻 / 公告两组 ===== */
.cy-feed-group + .cy-feed-group {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--divider);
}
.cy-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  margin-bottom: 2px;
}
.cy-feed-title {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: .02em;
}

/* ===== 微信公众号浮标 ===== */
.wx-code {
  position: fixed;
  top: 50%;
  right: 3px;
  z-index: 100;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card);
  transform: translateY(50%);
  cursor: pointer;
}
.wx-code .wx-img {
  width: 40px;
  height: 40px;
  background: url('../img/wx.svg') no-repeat;
  background-size: 100% 100%;
}
.wx-code:hover .wx-img {
  background: url('../img/wx_hover.svg') no-repeat;
  background-size: 100% 100%;
}
.wx-box {
  text-align: center;
}
.wx-box .tit {
  margin-bottom: var(--space-8);
  font-size: var(--fs-13);
  color: var(--text-main);
}
.wx-box .img {
  width: 200px;
  height: 200px;
}

/* ===== 响应式：demo console.css:739-755 ===== */
/* ============================================================
   首屏骨架
   目标不是「好看」，是让卡片在数据到达前就占住最终尺寸。
   三条规则保证不抖：
   1) 内联骨架高度用 em，跟着所在元素的字号走 —— 行盒高度不变
   2) 列表/表格骨架的行高与真实行一致（同样的 padding + 同样的条高）
   3) 骨架与真实内容包在同一个定高容器里，切换只换子节点
   ============================================================ */
.sk {
  display: inline-block;
  border-radius: 4px;
  background: linear-gradient(90deg, #e9eef7 25%, #f4f8fe 37%, #e9eef7 63%);
  background-size: 400% 100%;
  animation: sk-shimmer 1.5s ease infinite;
}
@keyframes sk-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
/* 文字骨架的字面高度
 *
 * 之前统一 .68em + vertical-align: middle —— 两个问题：
 *   1) .68em 对数字偏矮（DINPro / 雅黑的数字 cap height 约 .72em）
 *   2) middle 是把「条的垂直中点」对齐到「基线 + 半个 x-height」，
 *      条底并不落在基线上，和数字下缘错开
 *
 * 现在按字面高度分两档，并统一 vertical-align: baseline ——
 * 无内容的 inline-block 以「下外边距边」作为基线，正好贴在文字基线上，
 * 数字的下缘就在基线，两者对齐。
 *
 *   数字 / 拉丁文字：.76em（cap height 上限，略高于 .72 是留一点呼吸）
 *   中文：.88em（微软雅黑汉字字面约占 .88em）
 */
.sk-text {
  height: .76em;
  vertical-align: baseline;
}
/* 中文：字面高 .90em，且下缘低于基线约 .08em —— 无内容的 inline-block
   以底部作基线，只靠 baseline 对齐会让条底停在基线上，比汉字下缘高 3px。
   实测（26px 用户名）：文字墨迹 138..161，条需要 137..161，
   故 height .90em + top .08em。 */
.sk-text--cjk {
  height: .90em;
  position: relative;
  top: .08em;
}
/* 金额：￥ 是等高符号，比纯数字高一档（实测 16px 下 13px vs 12px） */
.sk-text--money {
  height: .82em;
}
.sk-block { display: block; }
/* 深色底上的骨架：欢迎条压在深色位图上，浅灰条会像贴纸，
   换成白色低透明度，读起来是「这块还没加载」而不是「这块坏了」 */
.sk--on-dark {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, .10) 25%,
    rgba(255, 255, 255, .24) 37%,
    rgba(255, 255, 255, .10) 63%
  );
  background-size: 400% 100%;
}
/* 徽章占位：尺寸与 .welcome-bind 一致（高 27 = 5 + 17 + 5，方角无圆角） */
.sk-pill {
  width: 86px;
  height: 27px;
  border-radius: 3px;
}
/* 头像位：直接给圆形底做微光，比在里面塞一根横条自然 */
.welcome-avatar.is-sk {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, .12) 25%,
    rgba(255, 255, 255, .26) 37%,
    rgba(255, 255, 255, .12) 63%
  );
  background-size: 400% 100%;
  animation: sk-shimmer 1.5s ease infinite;
}
/* 大块（图表、表格行）用整体呼吸，不做扫光——扫光在大面积上会晃眼 */
.cy-table tbody .sk {
  animation: sk-pulse 1.6s ease-in-out infinite;
}
@keyframes sk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
/* 真实内容替换进来时淡入，避免硬切 */
@keyframes boot-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cy-log-list,
.cy-news-list,
.cy-table tbody {
  animation: boot-in .28s ease both;
}
@media (prefers-reduced-motion: reduce) {
  .sk,
  .cy-table tbody .sk { animation: none; }
  .cy-log-list,
  .cy-news-list,
  .cy-table tbody { animation: none; }
}

@media (max-width: 1400px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* 安全卡最小列 320px 时，三列统计每列可用约 75px；
     上次登录的 MM-DD HH:mm 用 13px 才能与标签同宽稳定放下。 */
  .cy-sec-stat-value.is-text {
    font-size: 13px;
  }
  .cy-security-legend {
    gap: var(--space-12);
  }
}
@media (max-width: 1200px) {
  /* 窄屏下横幅位图在可视区域中的占比更高，浅色云层会直接压低白字对比度；
     只加深遮罩，不改布局与配色令牌。 */
  .welcome-banner::before {
    background: rgba(10, 12, 28, .56);
  }
  .console-bento {
    grid-template-columns: minmax(0, 1fr);
  }
  .console-bento-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}
@media (max-width: 900px) {
  .welcome-banner {
    flex-direction: column;
    text-align: center;
    padding: 28px 24px;
  }
  .welcome-avatar { margin: 0 auto; }
  .welcome-binds,
  .welcome-actions,
  .welcome-meta { justify-content: center; }
  .welcome-actions { flex-wrap: wrap; }
  .welcome-info { width: 100%; }
  .bento-row { grid-template-columns: minmax(0, 1fr); }
  /* 单列时卡片宽到 600px 以上，六位数码管若还按 26px 字宽就只是左边一小条，
     右边一大片空。放大到 40px（整图约 335px 宽）让它撑起整张卡片。
     同时取消居中：宽卡里居中的表盘会和左对齐的眉标、提示语脱节，
     同一左基线看起来才是一整块内容。 */
  .cy-clock {
    --clock-digit-w: 40px;
    margin: 0;
  }
  .cy-card--mood .cy-card-body { gap: 18px; }
  .cy-mood-head { font-size: var(--fs-13); }
}
@media (max-width: 700px) {
  .console-bento-side { grid-template-columns: minmax(0, 1fr); }
  .stats-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ===== 调试面板：召唤提示条（仅首页，?nodebug 隐藏） ===== */
/* 开发期用来比对五种配色与出入场动画，不属于产品界面。
   做成右下角一颗虚线小胶囊，默认收起、颜色压到最淡，
   不点它几乎看不见；点击后在它上方展开五个按钮。 */
.cy-debug {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2900;                  /* 低于提示条（3000），点了才看得到提示盖在它上面 */
  display: flex;
  flex-direction: column-reverse; /* 面板向上展开，不会越过窗口底边 */
  align-items: flex-end;
  gap: 8px;
}
.cy-debug-toggle {
  height: 28px;
  padding: 0 12px;
  border: 1px dashed var(--card-border);
  border-radius: 999px;
  background: var(--surface, #fff);
  color: var(--text-5);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.cy-debug-toggle:hover,
.cy-debug.is-open .cy-debug-toggle {
  color: var(--text-main);
  border-color: var(--text-4);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
}
.cy-debug-panel {
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 136px;
  padding: 6px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--surface, #fff);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
}
.cy-debug.is-open .cy-debug-panel { display: flex; }
.cy-debug-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  font-size: var(--fs-12);
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease;
}
.cy-debug-item:hover { background: var(--surface-muted, #f7fafe); }
/* 小圆点跟提示条同色，一眼对上是哪一种 */
.cy-debug-item i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cy-debug-item[data-toast="success"] i { background: var(--success-deep); }
.cy-debug-item[data-toast="info"] i { background: #1e3a8a; }
.cy-debug-item[data-toast="warning"] i { background: #78350f; }
.cy-debug-item[data-toast="error"] i { background: #7f1d1d; }
.cy-debug-item[data-toast="default"] i { background: var(--text-4); }
.cy-debug-meta {
  margin-top: 4px;
  padding: 6px 10px 2px;
  border-top: 1px solid var(--divider);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--text-5);
}
.cy-debug-meta:empty { display: none; }

/* ============================================================
   情绪问候卡 · 氛围
   这一节是全文件唯一一处定义情绪卡柔光与渐变文字的地方。
   过去同一个选择器在后面被反复覆盖，@keyframes 同名重定义，
   层叠顺序反过来还让「减弱动态效果」失效——现在只留一份。
     1) 右上主光 260px + 左下互补光 280px，两者周期不同形成错位呼吸
     2) 问候语渐变文字，从正文色过渡到主色
     3) 正文铺一层按时段走的径向柔光
   ============================================================ */
.cy-card--mood::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(1px);
  background: radial-gradient(circle, var(--mood-glow) 0%, rgba(255, 255, 255, 0) 70%);
  animation: mood-breathe 9s ease-in-out infinite;
}
@keyframes mood-breathe {
  0%, 100% { opacity: .62; transform: scale(1); }
  50% { opacity: .9; transform: scale(1.08); }
}
/* 左下互补光：与主光错开一个周期，两团光不会同时到位 */
.cy-card--mood::before {
  content: "";
  position: absolute;
  left: -100px;
  bottom: -110px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, var(--mood-glow-2) 0%, rgba(255, 255, 255, 0) 70%);
  animation: mood-breathe-2 13s ease-in-out infinite;
}
@keyframes mood-breathe-2 {
  0%, 100% { opacity: .45; transform: scale(1); }
  50% { opacity: .75; transform: scale(1.1); }
}
.cy-card--mood.is-late { --mood-glow-2: rgba(139, 92, 246, 0.17); }
.cy-card--mood.is-morning { --mood-glow-2: rgba(251, 113, 133, 0.17); }
.cy-card--mood.is-noon { --mood-glow-2: rgba(14, 165, 233, 0.16); }
.cy-card--mood.is-evening { --mood-glow-2: rgba(99, 102, 241, 0.18); }
[data-theme="dark"] .cy-card--mood.is-late { --mood-glow-2: rgba(167, 139, 250, 0.28); }
[data-theme="dark"] .cy-card--mood.is-morning { --mood-glow-2: rgba(251, 113, 133, 0.26); }
[data-theme="dark"] .cy-card--mood.is-noon { --mood-glow-2: rgba(56, 189, 248, 0.26); }
[data-theme="dark"] .cy-card--mood.is-evening { --mood-glow-2: rgba(129, 140, 248, 0.28); }

/* 正文一层按时段走的斜向柔光 */
.cy-card--mood .cy-card-body {
  background: radial-gradient(120% 110% at 100% 0%, var(--mood-glow) 0%, rgba(255, 255, 255, 0) 62%);
}

/* 问候语渐变文字 */
.cy-mood-greet {
  background: linear-gradient(118deg, var(--text-main) 28%, var(--brand-blue) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="dark"] .cy-mood-greet {
  background: linear-gradient(118deg, var(--text-main) 24%, var(--brand-blue-light) 96%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* 「减弱动态效果」：柔光、LIVE 点、太阳呼吸全部停下，时钟本身继续走字 */
@media (prefers-reduced-motion: reduce) {
  .cy-card--mood::before,
  .cy-card--mood::after,
  .cy-mood-live i,
  .cy-sky-glow { animation: none; }
  .cy-sky-arc.is-traversed { transition: none; }
}

/* ============================================================
   卡片质感：一层接触阴影 + 一层极淡主色染色
   早期版本叠过三层阴影 + 内高光 + 渐变底，每张卡都在抢视线，看久了累；
   立体感靠这两层就够，多了就是噪音。
   ============================================================ */
.cy-card {
  background: var(--surface);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 3px 10px rgba(37, 99, 235, 0.04);
}
[data-theme="dark"] .cy-card {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.24),
    0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 欢迎条头像：QQ 头像铺满圆形（原样式是首字母文字，容器已 overflow:hidden） */
.welcome-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ===== 活动弹窗 =====
   形态沿用 clientarea 已成型的那套自定义弹窗（common.css 里的
   .credit-notice-dialog / .security-dialog）：压掉 Element 自带的
   el-dialog__header（它带 border-bottom，没有标题时会留下一根空线），
   body 归零内边距，标题 / 正文 / 按钮三段自己排。
   圆角、阴影、移动端满宽仍由 theme-ui.css §9 提供，颜色全走 theme-vars。 */
.activity-dialog .el-dialog__header { display: none; }
.activity-dialog .el-dialog__body { padding: 0; }

.activity-popup-title {
  padding: 16px 24px;
  border-bottom: 1px solid var(--divider);
  font-size: var(--fs-18);
  font-weight: 800;
  line-height: 1.4;
  color: var(--text-main);
}
.activity-popup-body {
  padding: 24px;
  max-height: 52vh;
  overflow-y: auto;
  font-size: var(--fs-14);
  line-height: 1.8;
  color: var(--text-2);
  word-break: break-word;
}
/* 后台富文本输出的块级元素自带默认外边距，统一收敛，避免首尾多出空白 */
.activity-popup-body p { margin: 0 0 10px; }
.activity-popup-body > :first-child { margin-top: 0; }
.activity-popup-body > :last-child { margin-bottom: 0; }
.activity-popup-body img { max-width: 100%; height: auto; border-radius: 6px; }
.activity-popup-body a { color: var(--brand-blue); text-decoration: underline; }
.activity-popup-body ul,
.activity-popup-body ol { margin: 0 0 10px; padding-left: 20px; }
/* 引用块：富文本里常用来包命令、摘录。浏览器默认左缩进 40px 且无任何样式，
   在弹窗里像排版事故；收敛成主题里的引用样式，顺带给命令加等宽字体 */
.activity-popup-body blockquote {
  margin: 0 0 10px;
  padding: 10px 14px;
  border-left: 3px solid var(--brand-blue-tint-30);
  border-radius: 0 var(--ss-radius-sm) var(--ss-radius-sm) 0;
  background: var(--surface-muted);
}
.activity-popup-body blockquote > :last-child { margin-bottom: 0; }
.activity-popup-body pre,
.activity-popup-body code { font-family: var(--font-mono); }

.activity-popup-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 24px;
}
.activity-popup-footer .el-button { margin-left: 0; }
/* 次要按钮的描边色与 .credit-footer .cancel-btn 保持一致 */
.activity-popup-footer .activity-popup-snooze { border-color: var(--divider); }
