/* www.duliyan.com 原创 */
/* [DEST: 成品目录] */
/* 全站样式：绿色健康商业风；所有媒体查询集中在本文件；颜色一律用 CSS 变量（后台可改） */

/* ===== 全站中文字体：阿里巴巴普惠体 3.0（免费商用，可商用授权） =====
   三个真实字重，本地化在 assets/fonts/ 下，禁外链 CDN：
     55 常规 → font-weight 400（正文、说明、表格内容、输入）
     65 中等 → font-weight 500（卡片标题、表单标签、表头、按钮、导航、次级数字）
     85 粗体 → font-weight 700（页面主标题、KPI 大数字、选中态、圆形序号）
   全站只用这三档字重：写了 600/800 这类没有对应字重面的数值，浏览器会拿别的字重「假粗」描边，
   中笔画会糊在一起、版面发脏，所以禁止再出现 600/800。
   设备本身装了普惠体（华为/小米等常见）时走 local() 直接命中，不下载字体文件。 */
@font-face {
  font-family: "Alibaba PuHuiTi";
  src: local("Alibaba PuHuiTi 3.0 55 Regular"), local("Alibaba PuHuiTi 55 Regular"),
       local("Alibaba PuHuiTi Regular"), local("阿里巴巴普惠体"),
       url("../fonts/AlibabaPuHuiTi-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alibaba PuHuiTi";
  src: local("Alibaba PuHuiTi 3.0 65 Medium"), local("Alibaba PuHuiTi 65 Medium"),
       local("Alibaba PuHuiTi Medium"), local("阿里巴巴普惠体 Medium"),
       url("../fonts/AlibabaPuHuiTi-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alibaba PuHuiTi";
  src: local("Alibaba PuHuiTi 3.0 85 Bold"), local("Alibaba PuHuiTi 85 Bold"),
       local("Alibaba PuHuiTi Bold"), local("阿里巴巴普惠体 Bold"),
       url("../fonts/AlibabaPuHuiTi-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* 鸿蒙字体只做「设备上已装就用」的兜底（站内没放 woff2，写 url 会 404 白跑一次请求） */
@font-face {
  font-family: "HarmonyOS Sans SC";
  src: local("HarmonyOS Sans SC"), local("HarmonyOS Sans SC Regular");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans SC";
  src: local("HarmonyOS Sans SC Medium");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HarmonyOS Sans SC";
  src: local("HarmonyOS Sans SC Bold");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --c-primary: #2E7D32;
  --c-primary-light: #4CAF50;
  --c-primary-dark: #1B5E20;
  --c-primary-soft: #E8F5E9;
  --c-primary-tint: #C8E6C9;
  --c-primary-pale: #EEF6EE;
  --c-primary-a06: rgba(46, 125, 50, .06);
  --c-primary-a10: rgba(46, 125, 50, .10);
  --c-primary-a14: rgba(46, 125, 50, .14);
  --c-primary-light-a06: rgba(76, 175, 80, .06);
  --c-bg: #F7FBF7;
  --c-text: #1F2D1F;
  --c-text-muted: var(--c-muted);
  --c-white: #ffffff;
  --c-card: #ffffff;
  --c-row-hover: #FAFDF9;
  --c-surface-2: #F0F7F0;
  --c-border: #DFE8DF;
  --c-line-strong: #CBD5E1;
  --c-muted: #5E6D5E;
  --c-danger: #C62828;
  --c-danger-soft: #FDECEA;
  --c-danger-tint: #F5C6C0;
  --c-danger-a10: rgba(198, 40, 40, .10);
  --c-warn: #EF6C00;
  --c-warn-soft: #FFF3E0;
  --c-warn-tint: #FFE0B2;
  --c-warn-line: #C77B3B;
  --c-warn-dark: #8D4A16;
  --c-info: #1565C0;
  --c-info-soft: #E8F1FB;
  --c-info-tint: #C5DCF5;
  --c-info-dark: #0D47A1;
  /* 成功绿当字用，压的却是各套配色自己的浅底/10% 品牌蒙层：#2E7D32 在玫瑰红、海洋青、葡萄紫的浅底上只剩 4.2~4.4，
     连叶子绿自己的品牌蒙层都只有 4.49。含义色不跟品牌走，所以把绿本身收到 5.26 以上，各套一致。 */
  --c-ok: #256D29;
  --c-gold: #E0A100;
  --c-gold-soft: #FFFBEB;
  --c-silver: #94A3B8;
  /* 金牌/银牌的色块本身不动，但压在上面做字的一律用这三个深色墨水：亮金亮银当字只有 2.2~2.6，看不清 */
  --c-gold-ink: #8A5A00;
  --c-gold-deep: #3D2900;
  --c-silver-ink: #55647A;
  --c-scrim: rgba(15, 30, 15, .45);
  --c-focus-ring: rgba(76, 175, 80, .15);
  --c-footer-bg: #22331F;
  --c-footer-text: #CDD8CC;
  --c-footer-muted: #93A292;
  --c-footer-icp: #B9C8B7;
  --c-footer-link: #E3ECE2;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(30, 60, 30, 0.07);
  --shadow-hover: 0 6px 20px rgba(30, 60, 30, 0.12);
  --gap-sm: 16px;
  --gap-md: 24px;
  --gap-lg: 32px;
  --font-base: 16px;
  --font-sm: 13px;
  --font-lg: 18px;
  --font-xl: 24px;
  /* 补上中间档和展示档：全站只用这一套刻度，禁再出现 14/19/26 这种一次性字号 */
  --font-xs: 12px;
  --font-md: 15px;
  --font-display: 22px;
  --font-hero: 34px;
}

/* 配色风格：右上角一键切换，选中哪套就给 <html> 打哪个 data-theme 标记。
   只换品牌色和底色氛围，报错红/提醒橙/信息蓝这类带含义的颜色所有配色保持一致。
   每一套的名字/色块小圆点在前台后台都由 lib/site_settings.php 的 theme_list() 生成，
   加一套 = 这里补一段 token + 那张表里加一行，两边必须对齐。 */
html[data-theme="sky"] {
  --c-primary: #1565C0;
  --c-primary-light: #1E88E5;
  --c-primary-dark: #0D47A1;
  --c-primary-soft: #E8F1FB;
  --c-primary-tint: #C5DCF5;
  --c-primary-pale: #F1F7FD;
  --c-primary-a06: rgba(21, 101, 192, .06);
  --c-primary-a10: rgba(21, 101, 192, .10);
  --c-primary-a14: rgba(21, 101, 192, .14);
  --c-primary-light-a06: rgba(30, 136, 229, .06);
  --c-focus-ring: rgba(30, 136, 229, .18);
  --c-bg: #F6FAFD;
  --c-row-hover: #F8FBFE;
  --c-surface-2: #EDF4FB;
  --c-border: #D9E5F1;
  --c-muted: #536B7E;
  --c-text: #1B2B3A;
  --c-scrim: rgba(10, 25, 45, .45);
  --c-footer-bg: #14273A;
  --c-footer-text: #CBDDEE;
  --c-footer-muted: #8FA6BC;
  --c-footer-icp: #A9C0D6;
  --c-footer-link: #DCE9F5;
}
html[data-theme="sun"] {
  /* 橙色天生比绿/蓝/红亮，#E65100 当字或当按钮底都只有 3.79，所有配色里只有这套压不住；
     链接、页签、按钮都吃 --c-primary，所以把主色本身收到 4.99，其余带含义的颜色不动 */
  --c-primary: #C24100;
  --c-primary-light: #F57C00;
  --c-primary-dark: #BF360C;
  --c-primary-soft: #FFF3E0;
  --c-primary-tint: #FFDDB2;
  --c-primary-pale: #FFF7EC;
  --c-primary-a06: rgba(194, 65, 0, .06);
  --c-primary-a10: rgba(194, 65, 0, .10);
  --c-primary-a14: rgba(194, 65, 0, .14);
  --c-primary-light-a06: rgba(245, 124, 0, .06);
  --c-focus-ring: rgba(245, 124, 0, .18);
  --c-bg: #FFFAF3;
  --c-row-hover: #FFFCF7;
  --c-surface-2: #FCF1E4;
  --c-border: #F0DEC9;
  --c-muted: #78644D;
  --c-text: #33251A;
  --c-scrim: rgba(40, 25, 8, .45);
  --c-footer-bg: #2E2113;
  --c-footer-text: #E6D8C3;
  --c-footer-muted: #B2A189;
  --c-footer-icp: #CDBCA3;
  --c-footer-link: #F2E7D5;
}
html[data-theme="rose"] {
  --c-primary: #C2185B;
  --c-primary-light: #D81B60;
  --c-primary-dark: #8E0E42;
  --c-primary-soft: #FCE4EC;
  --c-primary-tint: #F8BBD0;
  --c-primary-pale: #FEF2F6;
  --c-primary-a06: rgba(194, 24, 91, .06);
  --c-primary-a10: rgba(194, 24, 91, .10);
  --c-primary-a14: rgba(194, 24, 91, .14);
  --c-primary-light-a06: rgba(216, 27, 96, .06);
  --c-focus-ring: rgba(216, 27, 96, .18);
  --c-bg: #FFF7F9;
  --c-row-hover: #FFFAFB;
  --c-surface-2: #FBECEF;
  --c-border: #F2D7DE;
  --c-muted: #7A5E64;
  --c-text: #331823;
  --c-scrim: rgba(40, 10, 22, .45);
  --c-footer-bg: #33141E;
  --c-footer-text: #E8CFD6;
  --c-footer-muted: #B4909A;
  --c-footer-icp: #D0AEB7;
  --c-footer-link: #F5DEE4;
}
html[data-theme="sea"] {
  --c-primary: #00695C;
  --c-primary-light: #26A69A;
  --c-primary-dark: #004D40;
  --c-primary-soft: #E0F2F1;
  --c-primary-tint: #B2DFDB;
  --c-primary-pale: #F1F8F7;
  --c-primary-a06: rgba(0, 105, 92, .06);
  --c-primary-a10: rgba(0, 105, 92, .10);
  --c-primary-a14: rgba(0, 105, 92, .14);
  --c-primary-light-a06: rgba(38, 166, 154, .06);
  --c-focus-ring: rgba(38, 166, 154, .18);
  --c-bg: #F5FAF9;
  --c-row-hover: #F7FBFA;
  --c-surface-2: #EAF4F2;
  --c-border: #D3E6E3;
  --c-muted: #4F6B68;
  --c-text: #15292A;
  --c-scrim: rgba(6, 30, 28, .45);
  --c-footer-bg: #0F2A27;
  --c-footer-text: #CBE3E0;
  --c-footer-muted: #8FB5B1;
  --c-footer-icp: #A9CCC8;
  --c-footer-link: #DCEEEB;
}
html[data-theme="violet"] {
  --c-primary: #5E35B1;
  --c-primary-light: #7E57C2;
  --c-primary-dark: #4527A0;
  --c-primary-soft: #EDE7F6;
  --c-primary-tint: #D1C4E9;
  --c-primary-pale: #F5F2FC;
  --c-primary-a06: rgba(94, 53, 177, .06);
  --c-primary-a10: rgba(94, 53, 177, .10);
  --c-primary-a14: rgba(94, 53, 177, .14);
  --c-primary-light-a06: rgba(126, 87, 194, .06);
  --c-focus-ring: rgba(126, 87, 194, .18);
  --c-bg: #FAF8FD;
  --c-row-hover: #FBF9FD;
  --c-surface-2: #F1ECFA;
  --c-border: #E1D8F0;
  --c-muted: #63597C;
  --c-text: #241C33;
  --c-scrim: rgba(28, 18, 50, .45);
  --c-footer-bg: #241B36;
  --c-footer-text: #D8CFEA;
  --c-footer-muted: #A69BC0;
  --c-footer-icp: #BFB5D6;
  --c-footer-link: #E7E0F4;
}
/* 石墨灰：蓝灰系，比叶子绿安静、比墨黑柔和一点 */
html[data-theme="slate"] {
  --c-primary: #37474F;
  --c-primary-light: #546E7A;
  --c-primary-dark: #263238;
  --c-primary-soft: #ECEFF1;
  --c-primary-tint: #CFD8DC;
  --c-primary-pale: #F5F7F8;
  --c-primary-a06: rgba(55, 71, 79, .06);
  --c-primary-a10: rgba(55, 71, 79, .10);
  --c-primary-a14: rgba(55, 71, 79, .14);
  --c-primary-light-a06: rgba(84, 110, 122, .06);
  --c-focus-ring: rgba(84, 110, 122, .18);
  --c-bg: #F6F8F9;
  --c-row-hover: #F7F9FA;
  --c-surface-2: #E9EEF0;
  --c-border: #D7E0E4;
  --c-muted: #4A5A63;
  --c-text: #17242A;
  --c-scrim: rgba(10, 18, 22, .45);
  --c-footer-bg: #16232B;
  --c-footer-text: #D6E1E6;
  --c-footer-muted: #94A9B3;
  --c-footer-icp: #B2C4CC;
  --c-footer-link: #E4EDF1;
}
/* 墨黑：最中性的一套，品牌色压到近黑，绿色/红色含义色照样看得清 */
html[data-theme="ink"] {
  --c-primary: #212121;
  --c-primary-light: #424242;
  --c-primary-dark: #111111;
  --c-primary-soft: #F0F0F1;
  --c-primary-tint: #E0E0E0;
  --c-primary-pale: #F7F7F8;
  --c-primary-a06: rgba(33, 33, 33, .06);
  --c-primary-a10: rgba(33, 33, 33, .08);
  /* 墨黑这套的品牌色近乎纯黑，同样的透明度比其他套子糊得深，
     14% 会把成功绿压到 4.47（看不清），所以这套单独收到 10% */
  --c-primary-a14: rgba(33, 33, 33, .10);
  --c-primary-light-a06: rgba(66, 66, 66, .06);
  --c-focus-ring: rgba(66, 66, 66, .18);
  --c-bg: #F6F6F7;
  --c-row-hover: #F9F9FA;
  --c-surface-2: #EDEDEF;
  --c-border: #DCDCDE;
  --c-muted: #56565C;
  --c-text: #1A1A1E;
  --c-scrim: rgba(0, 0, 0, .45);
  --c-footer-bg: #101014;
  --c-footer-text: #E8E8EA;
  --c-footer-muted: #A8A8AE;
  --c-footer-icp: #C0C0C6;
  --c-footer-link: #F2F2F4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: var(--font-base); }

/* 浏览器给按钮/输入框自带 Arial，不写这行就会出现「正文一个字体、按钮另一个字体」 */
button, input, select, textarea { font-family: inherit; }

body {
  font-family: "Alibaba PuHuiTi", "阿里巴巴普惠体", "HarmonyOS Sans SC", "HarmonyOS Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  /* 手机浏览器地址栏收起/展开时 100vh 会比屏幕高，用 dvh 跟随可视高度；老浏览器自动落回上一行 */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); }

img { max-width: 100%; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--gap-sm); width: 100%; }

.page-main { flex: 1; padding: var(--gap-md) 0 var(--gap-lg); }

/* ===== 顶部导航 ===== */
.site-header {
  background: var(--c-white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { display: flex; align-items: center; gap: var(--gap-md); row-gap: 0; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; }
.brand-logo { height: 40px; width: auto; }
.brand-text-logo { font-size: var(--font-lg); font-weight: 700; color: var(--c-primary-dark); }
.site-nav { display: flex; align-items: center; gap: var(--gap-md); flex: 1; }
.nav-list { display: flex; list-style: none; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav-list a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--c-text); font-size: var(--font-base); font-weight: 500; white-space: nowrap;
}
.nav-list a:hover { background: var(--c-bg); color: var(--c-primary-dark); }
.nav-list a.active { background: var(--c-primary); color: var(--c-white); }
.nav-user { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--c-text); margin: 5px 0; border-radius: 2px; }

/* 用户下拉菜单 */
.user-menu { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 8px; background: none; border: 0;
  cursor: pointer; padding: 6px 10px; border-radius: var(--radius-sm); font-size: var(--font-base); color: var(--c-text);
}
.user-menu-btn:hover { background: var(--c-bg); }
.user-menu-panel {
  position: absolute; right: 0; top: calc(100% + 6px); background: var(--c-white);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-hover); min-width: 150px; padding: 6px; z-index: 120;
}
.user-menu-panel a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--c-text); }
.user-menu-panel a:hover { background: var(--c-bg); color: var(--c-primary-dark); }

/* 右上角换肤色块 */
.theme-picker { display: flex; align-items: center; gap: 2px; margin-left: 4px; flex: 0 0 auto; }
.theme-dot {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.theme-dot span {
  display: block; width: 18px; height: 18px; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); transition: transform .15s;
}
@media (hover: hover) {
  .theme-dot:hover span { transform: scale(1.22); }
}
.theme-dot.is-now span { box-shadow: 0 0 0 2px var(--c-white), 0 0 0 4px var(--c-primary); }
.theme-dot:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 1px; }
/* 色块进了深绿条就缩小一档：26 的点击框 + 16 的圆点，日期和农历才摆得下 */
@media (min-width: 768px) {
  .datetime-bar .theme-dot { width: 26px; height: 26px; }
  .datetime-bar .theme-dot span { width: 16px; height: 16px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
  /* 选中环原来是「白+品牌色」，品牌色压在深绿底上几乎看不见，外圈换成半透明白 */
  .datetime-bar .theme-dot.is-now span { box-shadow: 0 0 0 2px var(--c-white), 0 0 0 4px rgba(255, 255, 255, .5); }
  .datetime-bar .theme-dot:focus-visible { outline-color: var(--c-white); }
}

/* 头像 */
.avatar { border-radius: 50%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 64px; height: 64px; }
.avatar-lg { width: 96px; height: 96px; }
.avatar-placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-primary-dark); color: var(--c-white); font-weight: 700;
}

/* ===== 面包屑 ===== */
.breadcrumb { font-size: var(--font-sm); color: var(--c-muted); margin-bottom: var(--gap-sm); }
.breadcrumb .crumb-sep { margin: 0 6px; }
.breadcrumb .crumb-current { color: var(--c-text); }

/* ===== 卡片 ===== */
.card {
  background: var(--c-white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: var(--gap-md); margin-bottom: var(--gap-md);
}
.card-title { font-size: var(--font-lg); font-weight: 500; margin-bottom: var(--gap-sm); color: var(--c-primary-dark); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--gap-sm); }
/* 入口卡有几张跟着后台开关变（6/7/8），列数由 PHP 按张数算好后写死在 gc 类上：
   行数摆满，右下角不留空洞——原来固定 auto-fill 时 6 张摆 4 列，第二行只有两张，缺一个角 */
@media (min-width: 992px) {
  .card-grid.gc2 { grid-template-columns: repeat(2, 1fr); }
  .card-grid.gc3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid.gc4 { grid-template-columns: repeat(4, 1fr); }
}
.card-link {
  display: block; background: var(--c-white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: var(--gap-md); color: var(--c-text); transition: box-shadow .2s, transform .2s;
}
.card-link:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); color: var(--c-primary-dark); }
.card-link h3 { font-size: var(--font-base); margin-bottom: 6px; }
.card-link p { font-size: var(--font-sm); color: var(--c-muted); }

/* ===== 按钮 ===== */
.btn {
  font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: var(--font-base); cursor: pointer; transition: background .15s, box-shadow .15s;
  text-align: center; line-height: 1.4;
}
.btn-primary { background: var(--c-primary); color: var(--c-white); }
.btn-primary:hover { background: var(--c-primary-dark); color: var(--c-white); }
.btn-ghost { background: transparent; border-color: var(--c-border); color: var(--c-text); }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-danger { background: var(--c-danger); color: var(--c-white); }
.btn-danger:hover { opacity: .88; color: var(--c-white); }
.btn-sm { padding: 6px 12px; font-size: var(--font-sm); }
.btn-lg { padding: 12px 28px; font-size: var(--font-lg); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-block { display: flex; width: 100%; }

/* ===== 表单 ===== */
.form-group { margin-bottom: var(--gap-sm); }
.form-label { display: block; font-weight: 500; margin-bottom: 6px; font-size: var(--font-sm); }
.form-control {
  width: 100%; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  font-size: var(--font-base); background: var(--c-white); color: var(--c-text); font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--c-primary-light); box-shadow: 0 0 0 3px var(--c-focus-ring); }
textarea.form-control { min-height: 90px; resize: vertical; }
select.form-control { -webkit-appearance: auto; appearance: auto; }
/* 原生下拉与日期控件自带 2px 内高，和文本框并排时会各高一截（扫描实测 44 vs 46）→ 统一到同一档 */
select.form-control,
input[type="date"].form-control,
input[type="time"].form-control,
input[type="month"].form-control,
input[type="datetime-local"].form-control { height: 44px; }
/* 头像上传那种原生 file 控件自带 52px 高，和旁边的文本框差 8px */
input[type="file"].form-control { height: 44px; }
.form-hint { font-size: var(--font-sm); color: var(--c-muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-sm); }
.form-error-box {
  background: var(--c-danger-soft); border: 1px solid var(--c-danger-tint); color: var(--c-danger);
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: var(--gap-sm); font-size: var(--font-sm);
}
.form-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ===== 出生日期（公历/农历切换） ===== */
.radio-inline-group { display: flex; gap: 18px; margin: 6px 0 10px; }
.radio-inline, .checkbox-inline { display: inline-flex; align-items: center; gap: 6px; font-size: var(--font-base); cursor: pointer; }
.birth-box { margin-top: 4px; }
.birth-lunar-row { display: flex; gap: 8px; align-items: center; }
.birth-lunar-row select.form-control { flex: 1 1 0; min-width: 0; }
.birth-lunar-row .checkbox-inline { flex: 0 0 auto; white-space: nowrap; }

/* ===== 提示条 ===== */
.notice { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: var(--gap-sm); font-size: var(--font-sm); }
.notice-success { background: var(--c-primary-soft); border: 1px solid var(--c-primary-tint); color: var(--c-ok); }
.notice-error { background: var(--c-danger-soft); border: 1px solid var(--c-danger-tint); color: var(--c-danger); }
.notice-info { background: var(--c-info-soft); border: 1px solid var(--c-info-tint); color: var(--c-info); }
.notice-warn { background: var(--c-warn-soft); border: 1px solid var(--c-warn-tint); color: var(--c-warn-dark); }

/* ===== 成功浮层提示（保存/记录成功后底部弹出，自动消失） ===== */
.toast-success {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(16px);
  z-index: 1200; max-width: min(92vw, 420px);
  display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--c-text);
  border: 1px solid var(--c-primary-tint); border-left: 4px solid var(--c-primary);
  border-radius: var(--radius); box-shadow: var(--shadow-hover);
  padding: 12px 18px; font-size: var(--font-sm); line-height: 1.5;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.toast-success.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success .toast-ico {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-primary); color: #fff; font-size: 14px; font-weight: 700; line-height: 1;
}
.toast-success .toast-ico svg { width: 13px; height: 13px; display: block; }
.toast-success .toast-msg { word-break: break-word; }
@media (prefers-reduced-motion: reduce) {
  .toast-success { transition: none; transform: translateX(-50%); }
  .toast-success.is-show { transform: translateX(-50%); }
}

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: var(--font-sm); }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--c-border); text-align: left; vertical-align: middle; }
.data-table th { background: var(--c-bg); font-weight: 500; white-space: nowrap; }
.data-table tr:hover td { background: var(--c-row-hover); }

/* ===== KPI ===== */
/* auto-fit 不是 auto-fill：卡片少时把空出来的那几列真的收掉，右侧不会留一块大空洞
   （首页只有 4 张指标卡时，auto-fill 会摆出 7 列，右边 3 列空着） */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); grid-auto-rows: 1fr; gap: var(--gap-sm); }
.kpi {
  background: var(--c-white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: var(--gap-sm) var(--gap-md); text-align: center;
}
.kpi-value { font-size: var(--font-xl); font-weight: 700; color: var(--c-primary-dark); overflow-wrap: anywhere; }
.kpi-value-sm { font-size: var(--font-lg); font-weight: 500; line-height: 1.4; }
.kpi-label { font-size: var(--font-sm); color: var(--c-muted); margin-top: 2px; }
.kpi-delta { font-size: var(--font-sm); }

/* ===== 首页：今天各餐花了多少 ===== */
.today-spend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  background: var(--c-white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px var(--gap-md); margin: var(--gap-sm) 0 var(--gap-md); font-size: var(--font-sm);
}
.today-spend-label { font-weight: 500; color: var(--c-primary-dark); }
/* 每餐金额做成小胶囊：这一行只有五个短词，光秃秃排开时「左边一堆、右边一个」的空档最扎眼，
   给了底色就变成一排有节奏的标签，合计用一条竖线隔开钉在最右 */
.today-spend-item { background: var(--c-surface-2); border-radius: 999px; padding: 3px 10px; }
.today-spend-item b { color: var(--c-warn-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.today-spend-total { margin-left: auto; padding-left: var(--gap-sm); border-left: 1px solid var(--c-border); color: var(--c-muted); }
.today-spend-total b { color: var(--c-primary-dark); font-size: var(--font-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 575px) {
  .today-spend { gap: 8px 10px; }
  .today-spend-total { margin-left: 0; padding-left: 0; border-left: 0; width: 100%; border-top: 1px solid var(--c-border); padding-top: 8px; }
}
.kpi-delta.up { color: var(--c-danger); }
.kpi-delta.down { color: var(--c-ok); }
.kpi-delta.flat { color: var(--c-muted); }

/* ===== 达标速度预测（首页一句话） ===== */
.pace-line {
  background: var(--c-primary-soft); border-left: 3px solid var(--c-primary);
  border-radius: var(--radius-sm); padding: 12px var(--gap-md);
}
.pace-text { color: var(--c-text); font-size: var(--font-sm); line-height: 1.6; }
.pace-text strong { color: var(--c-primary-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.pace-note { margin-top: 6px; color: var(--c-muted); font-size: var(--font-xs); line-height: 1.5; }
@media (max-width: 575px) { .pace-line { padding: 10px 12px; border-left-width: 3px; } }

/* ===== 今日四件套清单 ===== */
[id^="slim-"] { scroll-margin-top: 76px; }
.task-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.task-title { font-size: var(--font-lg); font-weight: 500; color: var(--c-primary-dark); }
.task-count { font-size: var(--font-sm); font-weight: 700; color: var(--c-primary); background: var(--c-primary-soft); border-radius: 999px; padding: 2px 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.task-count.all { color: var(--c-white); background: var(--c-primary); }
.task-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.task-item a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-white);
  color: var(--c-text); transition: border-color .2s, background .2s;
}
.task-item a:hover { border-color: var(--c-primary); background: var(--c-primary-pale); color: var(--c-text); }
.task-box {
  flex: 0 0 18px; width: 18px; height: 18px; border: 1.6px solid var(--c-line-strong);
  border-radius: 5px; display: flex; align-items: center; justify-content: center; color: var(--c-white);
}
.task-item.is-done .task-box { background: var(--c-primary); border-color: var(--c-primary); }
.task-box svg { width: 12px; height: 12px; display: block; }
.task-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.task-label { font-size: var(--font-base); font-weight: 500; line-height: 1.35; }
.task-status { font-size: var(--font-xs); color: var(--c-muted); line-height: 1.35; overflow-wrap: break-word; }
.task-item.is-done .task-status { color: var(--c-primary-dark); }
.task-go { flex: 0 0 auto; color: var(--c-muted); font-size: var(--font-lg); line-height: 1; }
.task-note { margin-top: 8px; font-size: var(--font-xs); color: var(--c-muted); line-height: 1.5; }
@media (min-width: 768px) { .task-list { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
@media (max-width: 575px) {
  [id^="slim-"] { scroll-margin-top: 64px; }
  .task-item a { padding: 8px; gap: 8px; }
  .task-label { font-size: var(--font-sm); }
}

/* ===== 身材变化墙 ===== */
.wall-count { font-size: var(--font-sm); font-weight: 700; color: var(--c-primary-dark); background: var(--c-primary-soft); border-radius: 999px; padding: 2px 10px; margin-left: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wall-compare { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 12px; margin-top: 14px; }
.wall-shot { margin: 0; min-width: 0; }
.wall-shot a { display: block; max-width: 240px; margin: 0 auto; border: 1px solid var(--c-border); border-radius: var(--radius-sm); overflow: hidden; background: var(--c-surface-2); line-height: 0; }
.wall-shot img { width: 100%; height: auto; max-height: 320px; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.wall-shot figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 8px; max-width: 240px; margin: 8px auto 0; font-size: var(--font-sm); color: var(--c-muted); line-height: 1.45; }
.wall-shot-tag { background: var(--c-primary-soft); color: var(--c-primary-dark); border-radius: 999px; padding: 1px 9px; font-size: var(--font-xs); font-weight: 500; }
.wall-shot-date { font-weight: 500; color: var(--c-text); }
.wall-delta { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 34px 4px 0; text-align: center; }
.wall-delta strong { font-size: var(--font-md); font-weight: 700; color: var(--c-primary-dark); white-space: nowrap; }
.wall-delta span { font-size: var(--font-xs); color: var(--c-muted); white-space: nowrap; }
.wall-note { margin-top: 12px; font-size: var(--font-xs); color: var(--c-warn-dark); background: var(--c-warn-soft); border-radius: var(--radius-sm); padding: 9px 12px; line-height: 1.5; }
.wall-single { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.wall-single-img { display: block; max-width: 240px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); overflow: hidden; background: var(--c-surface-2); line-height: 0; }
.wall-single-img img { width: 100%; height: auto; display: block; }
.wall-single-tip { font-size: var(--font-sm); color: var(--c-muted); line-height: 1.55; }
.wall-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; margin-top: 14px; }
.wall-cell { margin: 0; min-width: 0; display: flex; flex-direction: column; }
.wall-cell-img { display: block; border: 1px solid var(--c-border); border-radius: var(--radius-sm); overflow: hidden; background: var(--c-surface-2); line-height: 0; }
.wall-cell-img img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.wall-cell-meta { padding-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.wall-cell-date { font-size: var(--font-sm); font-weight: 500; line-height: 1.4; }
.wall-cell-sub { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: var(--font-xs); color: var(--c-muted); line-height: 1.4; }
.wall-cell-kg { color: var(--c-primary-dark); }
.wall-cell-del { margin-top: 2px; }
.wall-del { background: none; border: 0; padding: 6px 0; color: var(--c-muted); font-size: var(--font-xs); font-family: inherit; line-height: 1.2; cursor: pointer; }
.wall-del:hover { color: var(--c-danger); text-decoration: underline; }
.wall-peek-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wall-peek-title { font-size: var(--font-lg); font-weight: 500; color: var(--c-primary-dark); }
.wall-peek-more { font-size: var(--font-sm); color: var(--c-primary-dark); white-space: nowrap; }
.wall-peek-body { display: flex; align-items: center; gap: 14px; margin-top: 12px; color: var(--c-text); }
.wall-peek-body:hover { color: var(--c-text); }
.wall-peek-thumbs { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.wall-peek-thumbs img { width: 56px; height: 72px; object-fit: cover; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface-2); display: block; }
.wall-peek-arrow { color: var(--c-muted); font-size: var(--font-lg); line-height: 1; }
.wall-peek-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wall-peek-text strong { font-size: var(--font-lg); font-weight: 700; color: var(--c-primary-dark); }
.wall-peek-text span { font-size: var(--font-sm); color: var(--c-muted); }
@media (min-width: 576px) { .wall-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 992px) { .wall-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .wall-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 575px) {
  .wall-compare { grid-template-columns: 1fr 1fr; gap: 10px; }
  .wall-delta { grid-column: 1 / -1; order: 3; flex-direction: row; justify-content: center; gap: 10px; padding-top: 2px; }
  .wall-shot img { max-height: 220px; }
  .wall-peek-body { gap: 10px; }
  .wall-peek-thumbs img { width: 48px; height: 62px; }
}

/* ===== 身体围度 ===== */
.body-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.body-field-date { grid-column: 1 / -1; }
.body-input { position: relative; }
.body-input .form-control { padding-right: 44px; }
.body-unit { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-size: var(--font-sm); color: var(--c-muted); pointer-events: none; line-height: 1; }
.body-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.body-chip { display: inline-flex; align-items: baseline; gap: 6px; background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 999px; padding: 3px 12px; font-size: var(--font-sm); color: var(--c-text); font-variant-numeric: tabular-nums; line-height: 1.6; }
.body-chip b { font-weight: 500; color: var(--c-muted); font-size: var(--font-xs); }
.body-tip { margin-top: 10px; font-size: var(--font-sm); color: var(--c-muted); line-height: 1.55; }
.body-cmp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 10px; font-size: var(--font-sm); color: var(--c-muted); }
.body-cmp-arrow { color: var(--c-muted); }
.body-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.body-part { border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--c-white); min-width: 0; }
.body-part-label { font-size: var(--font-sm); font-weight: 500; color: var(--c-text); }
.body-part-nums { margin-top: 2px; font-size: var(--font-xs); color: var(--c-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.body-part-to { color: var(--c-text); font-weight: 500; }
.body-part-delta { margin-top: 4px; font-size: var(--font-md); font-weight: 700; color: var(--c-text); white-space: nowrap; }
.body-part-delta.is-down { color: var(--c-primary-dark); }
.body-part-delta.is-up { color: var(--c-warn-dark); }
.body-whr { margin-top: 12px; font-size: var(--font-sm); color: var(--c-text); }
.body-whr b { font-weight: 500; color: var(--c-muted); margin-right: 8px; }
.body-list { margin-top: 6px; }
.body-row { padding: 12px 0; border-bottom: 1px solid var(--c-border); }
.body-row:last-child { border-bottom: 0; }
.body-row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.body-row-date { font-size: var(--font-sm); font-weight: 500; color: var(--c-text); }
.body-row-gap { font-size: var(--font-xs); color: var(--c-muted); }
.body-row-note { margin-top: 6px; font-size: var(--font-xs); color: var(--c-muted); line-height: 1.5; }
.body-row-del { margin-top: 2px; }
.body-cross { margin-top: 14px; font-size: var(--font-sm); color: var(--c-muted); }
.body-cross a { color: var(--c-primary-dark); text-decoration: underline; }
@media (min-width: 992px) { .body-form { grid-template-columns: repeat(3, minmax(0, 1fr)); } .body-parts { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 575px) { .body-parts { gap: 8px; } .body-part { padding: 8px 10px; } .body-part-delta { font-size: var(--font-base); } }

/* ===== 空状态 / 加载 ===== */
.empty-state { text-align: center; padding: var(--gap-lg); color: var(--c-muted); }
.empty-state p { margin-top: 8px; }
.loading-mask { text-align: center; padding: var(--gap-md); color: var(--c-muted); }
.spinner {
  display: inline-block; width: 20px; height: 20px; border: 3px solid var(--c-border);
  border-top-color: var(--c-primary); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 认证页 ===== */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 160px); min-height: calc(100dvh - 160px); padding: var(--gap-md) 0; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .card-title { text-align: center; font-size: var(--font-xl); }
.auth-sub { text-align: center; color: var(--c-muted); font-size: var(--font-sm); margin-bottom: var(--gap-md); }
.auth-links { text-align: center; margin-top: var(--gap-sm); font-size: var(--font-sm); }

/* ===== 页脚 ===== */
.site-footer { background: var(--c-footer-bg); color: var(--c-footer-text); margin-top: auto; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-md); }
/* 选择器多带一个 .container：原来这条被后面的 .container{padding:0 16px} 同特异性顶掉，
   页脚四栏的上/下内边距在电脑上直接变成 0，栏目标题贴死了深色块的上边线 */
.container.footer-cols { padding-top: 40px; padding-bottom: 28px; }
.footer-col h4 { color: var(--c-white); font-size: var(--font-base); margin-bottom: 12px; font-weight: 700; }
.footer-col p, .footer-col li { font-size: var(--font-sm); line-height: 1.8; }
.footer-col ul { list-style: none; }
.footer-col a { color: var(--c-footer-text); }
.footer-col a:hover { color: var(--c-white); }
.footer-company { margin-top: 6px; color: var(--c-footer-muted); }
.footer-empty { color: var(--c-footer-muted); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 28px 0 32px; text-align: center; font-size: var(--font-sm); }
.footer-bottom p { margin: 0 0 8px; line-height: 1.8; }
.footer-bottom p:last-child { margin-bottom: 0; }
.footer-bottom a { color: var(--c-footer-link); }
.footer-copy { font-weight: 500; }
.footer-sep { margin: 0 8px; color: var(--c-footer-muted); }
.footer-icp a { display: inline-block; margin: 0 8px; color: var(--c-footer-icp); border-bottom: 1px dashed rgba(255,255,255,.28); padding-bottom: 1px; }
.footer-icp a:hover { color: var(--c-white); border-bottom-color: var(--c-white); }
.footer-police-icon { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.footer-note { color: var(--c-footer-muted); font-size: var(--font-xs); max-width: 720px; margin: 0 auto 16px; }
/* 上一条的 margin 会被 .footer-bottom p{margin:0 0 8px} 同权重后者顶掉，声明块就贴在左边不居中了；多带一个 p 把它压回来 */
.footer-bottom p.footer-note { margin: 0 auto 16px; }

/* ===== 分页 ===== */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin: var(--gap-sm) 0; }
.pagination a, .pagination span {
  display: inline-block; padding: 6px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--c-border); color: var(--c-text); font-size: var(--font-sm); background: var(--c-white);
}
.pagination .current { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-white); }
.pagination .disabled { opacity: .45; pointer-events: none; }

/* ===== 徽标/标签 ===== */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: var(--font-xs); background: var(--c-bg); color: var(--c-muted); border: 1px solid var(--c-border); white-space: nowrap; align-self: center; flex: 0 0 auto; }
.badge-ok { background: var(--c-primary-soft); color: var(--c-ok); border-color: var(--c-primary-tint); }
.badge-warn { background: var(--c-warn-soft); color: var(--c-warn-dark); border-color: var(--c-warn-tint); }
.badge-danger { background: var(--c-danger-soft); color: var(--c-danger); border-color: var(--c-danger-tint); }

/* ===== 弹窗 ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: var(--c-scrim); z-index: 300;
  display: flex; align-items: flex-start; justify-content: center; padding: var(--gap-md); overflow-y: auto;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--c-white); border-radius: var(--radius); box-shadow: var(--shadow-hover);
  width: 100%; max-width: 560px; margin: 8vh 0; padding: var(--gap-md); position: relative;
}
.modal-title { font-size: var(--font-lg); font-weight: 500; color: var(--c-primary-dark); margin-bottom: var(--gap-sm); padding-right: 30px; }
.modal-close {
  position: absolute; top: 12px; right: 12px; background: none; border: 0; font-size: var(--font-display);
  line-height: 1; cursor: pointer; color: var(--c-muted); padding: 4px 8px;
}
.modal-close:hover { color: var(--c-text); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: var(--gap-sm); }
.meal-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: var(--gap-sm); }

/* ===== 餐次区块 ===== */
.meal-section { margin-bottom: var(--gap-md); }
.meal-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.meal-head h3 { font-size: var(--font-base); color: var(--c-primary-dark); }
.meal-kcal { font-size: var(--font-sm); color: var(--c-muted); }
.entry-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px dashed var(--c-border); }
.entry-row:last-child { border-bottom: 0; }
.meal-empty { padding: 8px 0; }
.entry-info { flex: 1; min-width: 0; }
.entry-name { font-weight: 500; }
.entry-meta { font-size: var(--font-xs); color: var(--c-muted); }
.entry-nums { text-align: right; font-size: var(--font-sm); white-space: nowrap; }
.entry-price { display: inline-block; margin-top: 2px; color: var(--c-warn-dark); font-weight: 500; }
.entry-price-none { display: inline-block; margin-top: 2px; color: var(--c-muted); font-size: var(--font-xs); }
.entry-actions { display: flex; flex-wrap: wrap; gap: 4px; }
/* 表格列一窄，按钮文字会被压成「看/详/情」一字一行（1280 实测 39×69px）；
   按钮不许折字，宽度不够就让整张表横向滚（.table-wrap 本来就是滚动容器） */
.entry-actions .btn { white-space: nowrap; flex: 0 0 auto; }

/* ===== 日期切换条 ===== */
.date-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.summary-strip { display: flex; gap: var(--gap-sm); flex-wrap: wrap; }
.summary-item { background: var(--c-bg); border-radius: var(--radius-sm); padding: 8px 14px; text-align: center; min-width: 90px; }
.summary-item .v { font-weight: 700; color: var(--c-primary-dark); font-size: var(--font-lg); }
.summary-item .l { font-size: var(--font-xs); color: var(--c-muted); }
.progress-bar { height: 8px; background: var(--c-border); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.progress-bar i { display: block; height: 100%; background: var(--c-primary-light); border-radius: 99px; }
.progress-bar i.over { background: var(--c-warn); }

/* 食物选择列表（弹窗内） */
.food-pick-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--c-border); border-radius: var(--radius-sm); }
.food-pick-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--c-border); cursor: pointer; }
.food-pick-item:last-child { border-bottom: 0; }
.food-pick-item:hover, .food-pick-item.selected { background: var(--c-primary-pale); }
.source-switch { display: flex; gap: 0; margin-bottom: var(--gap-sm); border: 1px solid var(--c-border); border-radius: var(--radius-sm); overflow: hidden; }
.source-switch button { flex: 1; padding: 9px; border: 0; background: var(--c-white); cursor: pointer; font-size: var(--font-sm); color: var(--c-text); }
.source-switch button.active { background: var(--c-primary); color: var(--c-white); }

/* ===== 通用工具 ===== */
.text-muted { color: var(--c-muted); }
.text-center { text-align: center; }
.mt-sm { margin-top: var(--gap-sm); }
.mt-md { margin-top: var(--gap-md); }
.mb-sm { margin-bottom: var(--gap-sm); }
.mb-md { margin-bottom: var(--gap-md); }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: var(--gap-sm); flex-wrap: wrap; }
/* ===== A5 首页：主视觉 / 落地页 / 仪表盘 ===== */
.hero {
  background: linear-gradient(135deg, var(--c-primary-dark) 0%, var(--c-primary) 55%, var(--c-primary-light) 100%);
  color: var(--c-white);
  padding: 64px 0 56px;
  margin-bottom: var(--gap-md);
}
.hero-inner { text-align: center; max-width: 760px; margin: 0 auto; }
.hero-title { font-size: var(--font-hero); line-height: 1.3; font-weight: 700; letter-spacing: 1px; margin-bottom: 14px; }
.hero-subtitle { font-size: var(--font-lg); opacity: 0.92; line-height: 1.7; margin-bottom: 26px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.btn-light { background: var(--c-white); color: var(--c-primary-dark); font-weight: 500; }
.btn-light:hover { background: var(--c-surface-2); color: var(--c-primary-dark); }
.btn-hero-ghost { background: transparent; color: var(--c-white); border: 1px solid rgba(255, 255, 255, 0.65); }
.btn-hero-ghost:hover { background: rgba(255, 255, 255, 0.14); color: var(--c-white); }
.hero-tags { list-style: none; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-tags li {
  font-size: var(--font-sm); padding: 5px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.25);
}
.section { padding: 40px 0; }
.section-alt { background: var(--c-bg); border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.section-title { text-align: center; font-size: var(--font-xl); color: var(--c-primary-dark); margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--c-muted); margin-bottom: var(--gap-md); }
/* Q1：正文与落地页色带统一受 .container 约束，与页头页脚同宽居中；色带做成圆角面板 */
.page-main > .container > .hero { border-radius: var(--radius); }
.page-main > .container > .section.section-alt { border-radius: var(--radius); border-left: 1px solid var(--c-border); border-right: 1px solid var(--c-border); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-sm); }
.feature-card {
  background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: var(--gap-md); box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s;
}
.feature-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.feature-num {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 50%; background: var(--c-primary); color: var(--c-white); font-weight: 700;
  font-size: var(--font-sm); margin-bottom: 10px;
}
.feature-card h3 { font-size: var(--font-lg); margin-bottom: 8px; color: var(--c-text); }
.feature-card p { font-size: var(--font-sm); color: var(--c-muted); line-height: 1.7; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-sm); }
.step-card { background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--gap-md); text-align: center; box-shadow: var(--shadow); }
.step-num { display: inline-block; font-size: var(--font-xs); font-weight: 700; letter-spacing: 2px; color: var(--c-primary); background: var(--c-primary-a10); border-radius: 999px; padding: 4px 14px; margin-bottom: 12px; }
.step-card h3 { font-size: var(--font-lg); margin-bottom: 8px; }
.step-card p { font-size: var(--font-sm); color: var(--c-muted); line-height: 1.7; }
.disclaimer-text { font-size: var(--font-sm); max-width: 640px; margin: 0 auto; line-height: 1.8; }
.hero-mini { border-left: 4px solid var(--c-primary); padding-left: 20px; }
.hero-mini-title { font-size: var(--font-xl); color: var(--c-primary-dark); }
.intake-progress { margin-top: var(--gap-sm); }
.intake-progress-head { display: flex; justify-content: space-between; font-size: var(--font-sm); color: var(--c-muted); margin-bottom: 6px; }
.intake-progress-head strong { color: var(--c-text); font-size: var(--font-base); }
.intake-progress-track { height: 10px; border-radius: 999px; background: var(--c-bg); border: 1px solid var(--c-border); overflow: hidden; }
.intake-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--c-primary-light), var(--c-primary)); transition: width .3s; }
.intake-progress-fill.over { background: linear-gradient(90deg, var(--c-warn), var(--c-danger)); }
.chart-box { position: relative; height: 260px; }

/* ===== AI 食物营养查询 ===== */
.food-query-input-row { display: flex; gap: 10px; }
.food-query-input-row .form-control { flex: 1 1 auto; }
.food-query-input-row .btn { flex: 0 0 auto; white-space: nowrap; }
.food-result-serving { font-size: var(--font-sm); color: var(--c-muted); margin-bottom: var(--gap-sm); }
.food-result-per100 { font-size: var(--font-sm); color: var(--c-text); background: var(--c-bg); border-radius: var(--radius-sm); padding: 8px 12px; margin-top: var(--gap-sm); }
.food-result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: var(--gap-sm); }

/* ===== 当下时间条（前后台共用） ===== */
.datetime-bar { background: var(--c-primary-dark); color: var(--c-white); font-size: var(--font-sm); }
.datetime-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 16px; }
/* ≥992px 时下面那条 .container { padding: 0 var(--gap-md) } 会把上面这行的上下内边距抹平，色块会顶死窄条上下沿；这里用两级类名压回去 */
.datetime-bar .datetime-inner { padding-top: 6px; padding-bottom: 6px; }
/* 配色块搬进这条深绿窄条后，日期靠左、色块和农历靠右，页头那一行整个留给导航 */
.datetime-solar { margin-right: auto; }
.datetime-bar .theme-picker { gap: 4px; margin-left: 0; }
.datetime-time { font-variant-numeric: tabular-nums; font-weight: 500; letter-spacing: 0.5px; }
.datetime-lunar { color: var(--c-white); white-space: nowrap; }

.hidden { display: none !important; }

/* ===== AI 每日建议：餐次计划 / 要点 / 历史 ===== */
.motivation-banner { font-size: var(--font-base); }
.meal-plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-sm); }
.meal-plan-card { border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-white); padding: 12px; display: flex; flex-direction: column; }
.meal-plan-head { font-weight: 500; color: var(--c-primary-dark); display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.meal-plan-kcal { font-size: var(--font-sm); font-weight: 500; color: var(--c-muted); }
.meal-plan-items { margin: 0 0 8px; padding-left: 18px; font-size: var(--font-sm); color: var(--c-text); }
.meal-plan-items li { margin-bottom: 3px; }
.meal-plan-log { margin-top: auto; font-size: var(--font-sm); color: var(--c-primary); text-decoration: none; }
.meal-plan-log:hover { text-decoration: underline; }
.advice-block-title { font-weight: 500; color: var(--c-primary-dark); margin-bottom: 6px; }
.advice-block p, .advice-block ul { font-size: var(--font-base); color: var(--c-text); margin: 0; }
.advice-block ul { padding-left: 20px; }
.advice-block li { margin-bottom: 4px; }
.advice-history { list-style: none; margin: 0; padding: 0; }
.advice-history li { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--c-border); }
.advice-history li:last-child { border-bottom: 0; }
.advice-history a { color: var(--c-text); text-decoration: none; font-weight: 500; }
.advice-history a:hover, .advice-history a.current { color: var(--c-primary); }
.advice-history .badge { margin-left: auto; }

/* ===== 数据对比页 / 周期报告页（A5.5 / A5.6） ===== */
.seg-group { display: inline-flex; border: 1px solid var(--c-border); border-radius: 999px; overflow: hidden; background: var(--c-bg); }
.seg { padding: 6px 16px; font-size: var(--font-sm); color: var(--c-muted); text-decoration: none; border-radius: 999px; transition: background .2s, color .2s; }
.seg:hover { color: var(--c-primary); }
.seg.active { background: var(--c-primary); color: #fff; font-weight: 500; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--c-border); }
.tab { padding: 10px 16px; font-size: var(--font-base); color: var(--c-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--c-primary); }
.tab.active { color: var(--c-primary); font-weight: 700; border-bottom-color: var(--c-primary); }
.cmp-period-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* 周期切换条里的按钮不许折字：手机上宁可整条换行，也不要出现一个 50px 的两行按钮卡在 44px 旁边 */
.cmp-period-nav .btn { white-space: nowrap; flex: 0 0 auto; }
.cmp-period-label { font-weight: 500; color: var(--c-primary-dark); min-width: 120px; text-align: center; }
.btn-disabled { opacity: .4; pointer-events: none; }
.cmp-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-sm); }
.cmp-summary-item { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.cmp-summary-label { font-size: var(--font-sm); color: var(--c-muted); margin-bottom: 6px; }
.cmp-summary-value { font-size: var(--font-xl); font-weight: 700; color: var(--c-primary-dark); line-height: 1.2; }
.cmp-summary-value small { font-size: var(--font-sm); font-weight: 500; color: var(--c-muted); }
.delta { display: inline-block; margin-top: 6px; font-size: var(--font-sm); font-weight: 500; padding: 1px 8px; border-radius: 999px; }
.delta-good { color: var(--c-ok); background: var(--c-primary-a10); }
.delta-bad { color: var(--c-danger); background: var(--c-danger-a10); }
.delta-flat { color: var(--c-muted); background: var(--c-bg); }
.text-good { color: var(--c-ok); }
.text-bad { color: var(--c-danger); }
.chart-box-tall { height: 320px; }
.kpi-unit { font-size: var(--font-sm); font-weight: 500; color: var(--c-muted); }
.macro-split-title { font-weight: 500; color: var(--c-primary-dark); margin-bottom: 8px; }
.macro-bar { display: flex; height: 26px; border-radius: 999px; overflow: hidden; background: var(--c-bg); }
.macro-seg { display: flex; align-items: center; justify-content: center; font-size: var(--font-xs); color: #fff; font-weight: 500; min-width: 0; }
.macro-protein { background: var(--c-primary); }
.macro-carbs { background: var(--c-primary-light); }
.macro-fat { background: var(--c-warn); }
.macro-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: var(--font-sm); color: var(--c-muted); }
.macro-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.meal-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.meal-row-label { flex: 0 0 48px; font-size: var(--font-sm); color: var(--c-text); font-weight: 500; }
.meal-row-bar { flex: 1 1 auto; height: 12px; background: var(--c-bg); border-radius: 999px; overflow: hidden; }
.meal-row-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--c-primary-light), var(--c-primary)); border-radius: 999px; }
.meal-row-val { flex: 0 0 auto; font-size: var(--font-sm); color: var(--c-muted); min-width: 150px; text-align: right; }
.report-head { background: linear-gradient(135deg, var(--c-primary-dark), var(--c-primary)); color: #fff; }
.report-title { font-size: var(--font-xl); font-weight: 700; }
.report-sub { font-size: var(--font-sm); opacity: .9; margin-top: 4px; }
.report-sec-title { display: flex; align-items: center; gap: 10px; font-size: var(--font-lg); font-weight: 500; color: var(--c-primary-dark); margin-bottom: var(--gap-sm); }
.report-sec-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c-primary); color: #fff; font-size: var(--font-sm); font-weight: 700; flex: 0 0 auto; }
.report-score { display: flex; align-items: center; gap: var(--gap-md); }
.report-score-ring { position: relative; flex: 0 0 auto; width: 110px; height: 110px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: conic-gradient(var(--c-primary) calc(var(--score, 0) * 1%), var(--c-border) 0); }
.report-score-ring::before { content: ''; position: absolute; inset: 10px; background: var(--c-white); border-radius: 50%; }
.report-score-val { position: relative; font-size: var(--font-hero); font-weight: 700; color: var(--c-primary-dark); line-height: 1; }
.report-score-unit { position: relative; font-size: var(--font-sm); color: var(--c-muted); }
.report-score-text { flex: 1 1 auto; }
.report-score-label { font-size: var(--font-lg); margin-bottom: 4px; }
.insight-title { font-weight: 500; margin-bottom: 6px; padding-left: 10px; border-left: 3px solid var(--c-primary); }
.insight-good { color: var(--c-ok); border-left-color: var(--c-ok); }
.insight-warn { color: var(--c-warn-dark); border-left-color: var(--c-warn); }
.insight-list { margin: 0; padding-left: 20px; }
.insight-list li { margin-bottom: 6px; line-height: 1.6; }
.tip-list li { margin-bottom: 8px; }
.report-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== 手机底部标签栏（减肥 App 的拇指导航，只在手机上出现）===== */
.tabbar-mobile { display: none; }
@media (max-width: 575px) {
  body { padding-bottom: 58px; padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .tabbar-mobile {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: var(--c-white); border-top: 1px solid var(--c-border); box-shadow: var(--shadow);
  }
  .tabbar-mobile ul { display: flex; list-style: none; margin: 0; padding: 0; }
  .tab-cell { flex: 1 1 0; min-width: 0; }
  .tab-link {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 6px 0 5px; min-height: 48px; color: var(--c-muted); text-decoration: none; font-size: var(--font-xs);
  }
  .tab-link svg { width: 22px; height: 22px; display: block; }
  .tab-label { margin-top: 2px; line-height: 1.2; }
  .tab-link.is-now { color: var(--c-primary); font-weight: 500; }
  .tab-plus {
    width: 42px; height: 42px; border-radius: 50%; margin-top: -20px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    background: var(--c-primary); color: var(--c-white); box-shadow: var(--shadow-hover);
  }
  .tab-center .tab-label { margin-top: 3px; }
  /* 成功提示原本离底 28px，正好压在拇指导航上；手机上抬到导航之上 */
  .toast-success { bottom: 64px; bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ===== 响应式：平板 576–991px ===== */
@media (min-width: 576px) and (max-width: 991px) {
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .nav-list a { padding: 8px 9px; }
  .meal-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 28px; }
  .hero { padding: 48px 0 42px; }
  .chart-box-tall { height: 280px; }
  .meal-row-val { min-width: 130px; }
}

/* ===== 响应式：平板+小笔记本 <1200px —— 导航收进抽屉，页头那一行只剩标志和菜单键 ===== */
@media (max-width: 1199px) {
  .nav-toggle { display: block; margin-left: auto; order: 2; }
  .header-inner { flex-wrap: wrap; gap: 8px; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; order: 4; }
  .site-nav.open { display: flex; }
  .nav-list { flex-direction: column; gap: 2px; }
  .nav-list a { padding: 11px 12px; }
  .nav-user { justify-content: flex-start; padding-top: 12px; border-top: 1px solid var(--c-border); flex-wrap: wrap; }
  .user-menu-panel { position: static; box-shadow: none; border: 1px solid var(--c-border); }
  .brand { order: 1; min-width: 0; }
}

/* 手机/平板：日期条一行摆不下「日期 + 八个色块 + 农历」，让色块自己占一行居中，
   上面仍是「日期 农历」一行——页头那一行只剩标志和菜单键 */
@media (max-width: 767px) {
  .datetime-inner { flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
  .datetime-solar { margin-right: 0; }
  .datetime-bar .theme-picker { flex: 1 0 100%; justify-content: center; order: 3; }
  .datetime-lunar { order: 2; }
}

/* ===== 响应式：手机 <576px ===== */
@media (max-width: 575px) {
  .theme-dot { width: 34px; height: 34px; }
  .theme-dot span { width: 20px; height: 20px; }
  .footer-cols { grid-template-columns: 1fr; padding: var(--gap-md) var(--gap-sm); }
  .form-row { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .card-link { padding: 12px; }
  .card-link h3 { font-size: var(--font-md); margin-bottom: 3px; }
  .card-link p { font-size: var(--font-xs); }
  .card { padding: var(--gap-sm); }
  .birth-lunar-row { flex-wrap: wrap; }
  .birth-lunar-row select.form-control { flex: 1 1 44%; }
  .datetime-inner { flex-wrap: wrap; justify-content: center; padding: 5px 10px; gap: 4px 12px; font-size: var(--font-xs); }
  .food-query-input-row { flex-direction: column; }
  .food-query-input-row .btn { width: 100%; }
  .food-result-actions .btn { flex: 1 1 100%; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 34px; }
  .hero-title { font-size: var(--font-xl); }
  .hero-subtitle { font-size: var(--font-base); }
  .chart-box { height: 200px; }
  .hero-mini .flex-between { flex-direction: column; align-items: stretch; gap: 10px; }
  .birth-lunar-row .checkbox-inline { flex: 0 0 auto; }
  .meal-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 中文化后营养行变长：手机上竖排，避免 nowrap 撑破屏幕 */
  .entry-row { flex-direction: column; align-items: stretch; gap: 6px; padding: 11px 0; }
  .meal-empty { padding: 2px 0 0; }
  .btn-sm { min-width: 56px; }
  .entry-nums { text-align: left; white-space: normal; }
  .entry-actions { justify-content: flex-end; }
  .summary-item { min-width: 0; flex: 1 1 44%; }
  /* 表格转卡片 */
  .data-table.responsive-cards thead { display: none; }
  .data-table.responsive-cards tr { display: block; border: 1px solid var(--c-border); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--c-white); }
  .data-table.responsive-cards td { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--c-border); }
  .data-table.responsive-cards td:last-child { border-bottom: 0; }
  .data-table.responsive-cards td::before { content: attr(data-label); font-weight: 500; color: var(--c-muted); flex-shrink: 0; }
  /* 对比页 / 报告页 手机适配 */
  .cmp-toolbar .flex-between { flex-direction: column; align-items: stretch; gap: 10px; }
  .cmp-period-nav { justify-content: space-between; }
  .cmp-period-label { min-width: 0; flex: 1 1 auto; }
  .cmp-summary { grid-template-columns: 1fr; }
  .tabs { gap: 2px; }
  .tab { padding: 8px 10px; font-size: var(--font-sm); flex: 1 1 auto; text-align: center; }
  .chart-box-tall { height: 240px; }
  .report-score { flex-direction: column; text-align: center; gap: var(--gap-sm); }
  .meal-row { flex-wrap: wrap; }
  .meal-row-label { flex: 0 0 auto; }
  .meal-row-val { min-width: 0; text-align: left; flex: 1 1 100%; }
}

/* 320 宽的小手机（iPhone SE 那一档）：八套色块按 34px 点击框摆会顶出屏幕，
   收到 32px、间距 3px 才摆得下（8×32+7×3=277 < 288），圆点本身仍是 20px 没变小 */
@media (max-width: 380px) {
  .theme-picker { gap: 3px; }
  .theme-dot { width: 32px; height: 32px; }
}

/* ===== 电脑 ≥992px ===== */
@media (min-width: 992px) {
  .container { padding: 0 var(--gap-md); }
}

/* ===== 打印样式（周期报告页）===== */
@media print {
  .site-header, .site-footer, .datetime-bar, .breadcrumb, .no-print, .notice, .toast-success { display: none !important; }
  body { background: #fff; display: block; color: #000; }
  .page-main { padding: 0; }
  .container { max-width: 100%; padding: 0; }
  .card { box-shadow: none; border: 0; border-bottom: 1px solid #e0e0e0; border-radius: 0; margin-bottom: 8px; padding: 12px 0; break-inside: avoid; page-break-inside: avoid; }
  .report-head { background: #fff !important; color: #000 !important; border-bottom: 2px solid #000; }
  .report-title { color: #000; }
  .report-sub { color: #444; opacity: 1; }
  .report-sec-title { color: #000; }
  .report-sec-num { background: #000; }
  .chart-box, .chart-box-tall { display: none !important; }
  a { color: #000; text-decoration: none; }
  .report-score-ring { background: none; border: 2px solid #000; }
  .report-score-ring::before { display: none; }
  .data-table th, .data-table td { border-color: #ccc; }
}

/* ===== Q7 趣味打卡 + 积分 ===== */
.checkin-card { border-left-width: 4px; }
.checkin-card.checkin-gold { border-left-color: var(--c-gold); background: linear-gradient(135deg, var(--c-gold-soft) 0%, #FFF 60%); }
.checkin-card.checkin-silver { border-left-color: var(--c-silver); }
.checkin-card.checkin-bronze { border-left-color: var(--c-warn-line); }
.checkin-card.checkin-new { border-left-color: var(--c-primary); }
.checkin-card.checkin-off { border-left-color: var(--c-line-strong); }
.checkin-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.checkin-badge {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; background: var(--c-bg);
}
.checkin-badge svg { width: 22px; height: 22px; display: block; }
.checkin-gold .checkin-badge { color: var(--c-gold-ink); background: var(--c-gold-soft); }
.checkin-silver .checkin-badge { color: var(--c-silver-ink); }
.checkin-bronze .checkin-badge { color: var(--c-warn-line); }
.checkin-new .checkin-badge { color: var(--c-primary); }
.checkin-off .checkin-badge { color: var(--c-muted); }
.checkin-title { font-weight: 500; font-size: var(--font-base); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.checkin-streak { font-weight: 500; font-size: var(--font-sm); color: var(--c-text-muted); }
.checkin-streak strong { color: var(--c-primary-dark); font-size: var(--font-base); }
.checkin-msg { color: var(--c-text-muted); font-size: var(--font-sm); margin-top: 2px; }
.checkin-form { margin-top: 8px; }
.checkin-form .btn { min-height: 36px; }
.checkin-points { text-align: center; flex: 0 0 auto; padding-left: 12px; }
.checkin-points-value { font-size: var(--font-xl); font-weight: 700; color: var(--c-primary-dark); line-height: 1; }
.checkin-points-label { font-size: var(--font-xs); color: var(--c-text-muted); margin-top: 2px; }
/* 虚线上下各留 12：原来是上 10、内 8，线离上一行近、离自己远，看着像贴错了行 */
.checkin-last { margin-top: 12px; font-size: var(--font-xs); color: var(--c-text-muted); border-top: 1px dashed rgba(0,0,0,.08); padding-top: 12px; }
.checkin-medal { margin-top: 8px; font-size: var(--font-sm); line-height: 1.5; }
.checkin-medal a { color: var(--c-text-muted); text-decoration: none; }
.checkin-medal .medal-link { color: var(--c-primary); white-space: nowrap; }
.medal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.medal { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px 10px; border: 1px solid var(--c-border); border-radius: var(--radius-md, 12px); background: var(--c-white); text-align: center; }
.medal-icon { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #F1F5F9; color: var(--c-muted); }
.medal-icon svg { width: 24px; height: 24px; display: block; }
.medal-name { font-size: var(--font-sm); font-weight: 500; color: var(--c-text); }
.medal-state { font-size: var(--font-xs); color: var(--c-text-muted); }
.medal-bar { width: 100%; height: 4px; border-radius: 2px; background: rgba(0,0,0,.07); overflow: hidden; }
.medal-bar i { display: block; height: 100%; background: var(--c-primary-light); border-radius: 2px; }
.medal.is-got { border-color: var(--c-gold); background: linear-gradient(180deg, var(--c-gold-soft) 0%, var(--c-white) 72%); }
.medal.is-got .medal-icon { background: var(--c-gold); color: var(--c-gold-deep); }
.medal.is-got .medal-state { color: var(--c-gold-ink); }
.medal.is-got .medal-bar i { background: var(--c-gold); }
@media (max-width: 575px) {
  .medal-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .medal { flex-direction: row; align-items: center; text-align: left; gap: 10px; padding: 10px 12px; }
  .medal-icon { width: 36px; height: 36px; flex: 0 0 auto; }
  .medal-icon svg { width: 20px; height: 20px; }
  .medal-name { font-size: var(--font-md); }
  .medal-state { flex: 1 1 auto; }
  .medal-bar { display: none; }
}
/* ===== 首页打卡热图：一周一行，手机上正好一排七个格 ===== */
.heat-box { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--c-border); }
.heat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.heat-title { font-size: var(--font-sm); font-weight: 500; color: var(--c-text); }
.heat-sum { font-size: var(--font-sm); color: var(--c-muted); }
.heat-grid { display: flex; flex-direction: column; gap: 4px; }
.heat-row { display: flex; align-items: center; gap: 4px; }
.heat-corner, .heat-label { flex: 0 0 38px; width: 38px; font-size: var(--font-xs); color: var(--c-muted); white-space: nowrap; }
.heat-wd { flex: 1 1 0; min-width: 0; text-align: center; font-size: var(--font-xs); color: var(--c-muted); line-height: 18px; }
.heat-cell { flex: 1 1 0; min-width: 0; height: 18px; border-radius: 4px; background: var(--c-bg); border: 1px solid transparent; }
.heat-cell.is-hit { background: var(--c-primary); }
.heat-cell.is-today { border-color: var(--c-primary-dark); }
.heat-cell.is-future { background: transparent; border-style: dashed; border-color: var(--c-border); }
.heat-legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: var(--font-xs); color: var(--c-muted); }
.heat-legend .heat-cell { flex: 0 0 auto; width: 14px; height: 14px; }
.heat-box-standalone { margin-top: 0; padding-top: 0; border-top: 0; }
/* ===== 打卡中心（首页搬出来的独立一页） ===== */
.task-item { display: flex; align-items: center; gap: 8px; }
.task-item > a { flex: 1 1 auto; min-width: 0; }
.task-form { flex: 0 0 auto; display: flex; align-items: center; }
.task-form .btn { min-height: 36px; }
.ck-hero-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ck-ring { position: relative; flex: 0 0 auto; width: 128px; height: 128px; display: grid; place-items: center; }
.ck-ring svg { width: 128px; height: 128px; display: block; transform: rotate(-90deg); }
.ck-ring-track { fill: none; stroke: var(--c-border); stroke-width: 10; }
.ck-ring-fill { fill: none; stroke: var(--c-primary); stroke-width: 10; stroke-linecap: round; }
.ck-ring-num { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -58%); font-variant-numeric: tabular-nums; line-height: 1; }
.ck-ring-num strong { font-size: 28px; font-weight: 700; color: var(--c-primary-dark); }
.ck-ring-num i { font-style: normal; font-size: var(--font-sm); color: var(--c-primary-dark); margin-left: 1px; }
.ck-ring-cap { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; font-size: var(--font-xs); color: var(--c-muted); white-space: nowrap; }
.ck-hero-main { flex: 1 1 240px; min-width: 0; }
.ck-hero-main .checkin-title { font-size: var(--font-lg); display: flex; align-items: center; gap: 10px; }
.ck-done { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: var(--font-sm); color: var(--c-primary-dark); }
.ck-done svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--c-primary); }
.ck-hint { margin-top: 8px; font-size: var(--font-xs); color: var(--c-muted); line-height: 1.5; }
.ck-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--c-border); }
.ck-stat { min-width: 0; text-align: center; padding: 8px 4px; border-radius: var(--radius-sm); background: var(--c-bg); }
.ck-stat-value { font-size: var(--font-xl); font-weight: 700; line-height: 1.15; color: var(--c-primary-dark); font-variant-numeric: tabular-nums; }
.ck-stat-label { font-size: var(--font-xs); color: var(--c-muted); margin-top: 2px; line-height: 1.4; }
.ck-rule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ck-rule-list li { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ck-rule-name { flex: 1 1 auto; min-width: 0; font-size: var(--font-sm); color: var(--c-text); }
.ck-rule-num { font-size: var(--font-base); font-weight: 700; color: var(--c-primary-dark); font-variant-numeric: tabular-nums; }
.ck-rule-unit { font-size: var(--font-xs); color: var(--c-muted); }
.ck-delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.ck-delta.up { color: var(--c-primary-dark); }
.ck-delta.down { color: var(--c-danger); }
.medal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.medal { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-card); min-width: 0; }
.medal.is-got { border-color: var(--c-gold); background: var(--c-gold-soft); }
.medal-icon { width: 26px; height: 26px; color: var(--c-muted); }
.medal-icon svg { width: 26px; height: 26px; display: block; }
.medal.is-got .medal-icon { color: var(--c-gold-ink); }
.medal-name { font-size: var(--font-base); font-weight: 500; line-height: 1.35; }
.medal-desc { font-size: var(--font-xs); color: var(--c-muted); line-height: 1.45; }
.medal-bar { display: block; height: 6px; border-radius: 999px; background: var(--c-primary-pale); overflow: hidden; margin-top: 2px; }
.medal-bar-fill { display: block; height: 100%; background: var(--c-primary); border-radius: 999px; }
.medal-num { font-size: var(--font-xs); color: var(--c-text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
  .ck-hero-top { gap: 12px; }
  .ck-ring { width: 104px; height: 104px; }
  .ck-ring svg { width: 104px; height: 104px; }
  .ck-ring-num strong { font-size: 22px; }
  .ck-ring-cap { bottom: 20px; }
  .ck-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
/* ===== 趣味换算：把公斤数翻译成人能想象的东西 ===== */
.fun-lead { margin-top: 2px; font-size: var(--font-md); color: var(--c-text); }
.fun-lead strong { font-size: var(--font-lg); font-weight: 700; color: var(--c-primary-dark); }
.fun-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.fun-item { min-width: 0; padding: 10px 8px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); text-align: center; }
.fun-num { display: block; font-size: var(--font-lg); font-weight: 700; color: var(--c-primary); line-height: 1.2; }
.fun-unit { font-size: var(--font-xs); color: var(--c-muted); }
.fun-name { display: block; margin-top: 4px; font-size: var(--font-xs); color: var(--c-text); overflow-wrap: break-word; }
.fun-note { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--c-border); font-size: var(--font-sm); color: var(--c-muted); }
@media (max-width: 575px) {
  .fun-list { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .heat-grid, .heat-row { gap: 3px; }
}
@media (max-width: 560px) {
  .checkin-card .flex-between { flex-direction: row; align-items: center; }
  .checkin-badge { width: 34px; height: 34px; }
  .checkin-badge svg { width: 20px; height: 20px; }
  .checkin-points { padding-left: 8px; }
  .checkin-points-value { font-size: var(--font-display); }
  .checkin-form .btn { min-height: 44px; padding-left: 18px; padding-right: 18px; }
}
@media print { .checkin-card { display: none !important; } }

/* ===== Q5 录入 AI 智能填充 ===== */
.ai-fill-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--c-primary-a06); border: 1px dashed var(--c-primary-light); border-radius: var(--radius-sm, 8px); padding: 8px 10px; margin: 4px 0 12px; }
.ai-fill-hint { font-size: var(--font-xs); color: var(--c-muted); flex: 1 1 200px; min-width: 0; }
.btn-link-sm { background: none; border: none; color: var(--c-danger); font-size: var(--font-xs); cursor: pointer; padding: 2px 6px; text-decoration: underline; }

/* ===== Q8 记录照片 ===== */
.photo-upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.photo-upload-row input[type="file"] { flex: 1 1 220px; min-width: 0; }
.photo-thumb { flex: 0 0 auto; display: inline-block; border: 1px solid var(--c-border); border-radius: var(--radius-sm, 8px); overflow: hidden; line-height: 0; }
.photo-thumb img { width: 64px; height: 64px; object-fit: cover; display: block; }

/* ===== A5.7 栏目文章 CMS ===== */
/* 内边距跟全站卡片统一成 24：原来写 18/20，同一页里卡片的文字左边缘比别处少 6px，看着像没对齐 */
.article-hero { padding: var(--gap-md); }
.article-hero-title { font-size: var(--font-display); font-weight: 700; color: var(--c-primary-dark); }
.article-hero-sub { font-size: var(--font-md); color: var(--c-text-muted); margin-top: 8px; }
.article-hero-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.article-hero-count { font-size: var(--font-sm); color: var(--c-text-muted); background: rgba(0,0,0,.04); border-radius: 999px; padding: 3px 10px; }
.article-hero { border-left: 4px solid var(--c-line-strong); }
.article-hero-eat { border-left-color: var(--c-primary); }
.article-hero-eat .article-hero-title { color: var(--c-primary-dark); }
.article-hero-slim { border-left-color: var(--c-warn-line); }
.article-hero-slim .article-hero-title { color: var(--c-warn-dark); }
.article-hero-help { border-left-color: var(--c-info); }
.article-hero-help .article-hero-title { color: var(--c-info-dark); }
.article-hero .article-search { margin-top: 12px; max-width: 520px; }
.article-search { display: flex; gap: 8px; align-items: center; }
.article-search .form-control { flex: 1 1 auto; min-width: 0; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 4px; }
.article-card { display: flex; flex-direction: column; background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius-md, 12px); overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .18s ease, transform .18s ease; }
.article-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.10); transform: translateY(-2px); }
.article-cover { display: block; aspect-ratio: 16 / 9; width: 100%; background: linear-gradient(135deg, var(--c-primary-a14), var(--c-primary-light-a06)); overflow: hidden; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-cover-empty { display: flex; align-items: center; justify-content: center; color: var(--c-primary-dark); font-weight: 700; letter-spacing: 2px; }
.article-card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1 1 auto; }
.article-card-title { font-size: var(--font-base); font-weight: 500; line-height: 1.4; color: var(--c-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card-sum { font-size: var(--font-sm); color: var(--c-text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card-meta { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; font-size: var(--font-xs); color: var(--c-text-muted); }
/* 栏目导读标签（后台栏目「SEO 关键词」那一格填的词） */
.article-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.article-chips-label { font-size: var(--font-xs); color: var(--c-muted); margin-right: 2px; }
.article-chip { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; background: var(--c-primary-a06); border: 1px solid var(--c-border); color: var(--c-text); font-size: var(--font-sm); text-decoration: none; }
.article-chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.article-chip.is-on { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-white); }
/* 栏目头条精选 */
.article-lead { display: flex; gap: var(--gap-sm); background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius-md, 12px); box-shadow: var(--shadow); padding: var(--gap-sm) var(--gap-md); margin-bottom: var(--gap-sm); text-decoration: none; color: inherit; transition: box-shadow .18s ease; }
.article-lead:hover { box-shadow: 0 8px 22px rgba(0,0,0,.10); }
.article-lead-cover { flex: 0 0 150px; align-self: stretch; border-radius: var(--radius-sm); overflow: hidden; background: linear-gradient(135deg, var(--c-primary-a14), var(--c-primary-light-a06)); display: flex; align-items: center; justify-content: center; }
.article-lead-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-lead-cover-empty { font-size: var(--font-md); font-weight: 700; color: var(--c-primary-dark); letter-spacing: 1px; }
.article-lead-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.article-lead-tag { align-self: flex-start; font-size: var(--font-xs); color: var(--c-primary-dark); background: var(--c-primary-soft); border-radius: 999px; padding: 2px 9px; }
.article-lead-title { font-size: var(--font-lg); font-weight: 700; line-height: 1.4; }
.article-lead-sum { font-size: var(--font-md); color: var(--c-muted); line-height: 1.6; }
.article-lead-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: var(--font-xs); color: var(--c-muted); margin-top: auto; padding-top: 6px; }
.article-lead-go { color: var(--c-primary); font-weight: 500; margin-left: auto; }
/* 栏目之间导流 */
.article-cross { margin-top: var(--gap-md); }
.article-cross-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.article-cross-item { display: block; border: 1px solid var(--c-border); border-left-width: 4px; border-radius: var(--radius-sm); padding: 10px 12px; text-decoration: none; color: inherit; background: var(--c-card); }
.article-cross-item:hover { background: var(--c-bg); }
.article-cross-name { display: block; font-weight: 700; font-size: var(--font-md); }
.article-cross-line { display: block; font-size: var(--font-xs); color: var(--c-muted); margin-top: 3px; line-height: 1.5; }
.article-cross-eat { border-left-color: var(--c-primary); }
.article-cross-slim { border-left-color: var(--c-warn-line); }
.article-cross-help { border-left-color: var(--c-info); }
.article-detail { padding: var(--gap-md); }
.article-detail-title { font-size: var(--font-xl); font-weight: 700; line-height: 1.35; color: var(--c-text); }
.article-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0 16px; font-size: var(--font-sm); color: var(--c-text-muted); }
.article-detail-cover { border-radius: var(--radius-md, 12px); overflow: hidden; margin-bottom: 16px; }
.article-detail-cover img { width: 100%; display: block; }
.article-detail-sum { font-size: var(--font-md); line-height: 1.7; color: var(--c-primary-dark); background: var(--c-primary-a06); border-left: 3px solid var(--c-primary); border-radius: var(--radius-sm, 8px); padding: 12px 14px; margin-bottom: 16px; }
.article-detail-body { font-size: var(--font-base); line-height: 1.9; color: var(--c-text); }
.article-detail-body p { margin: 0 0 16px; }
.article-detail-body p:last-child { margin-bottom: 0; }
.article-detail-body .article-h { font-size: var(--font-lg); font-weight: 700; color: var(--c-primary-dark); margin: 24px 0 12px; }
.article-more-list { list-style: none; margin: 0; padding: 0; }
.article-more-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px dashed rgba(0,0,0,.08); }
.article-more-list li:last-child { border-bottom: none; }
.article-more-list a { color: var(--c-text); text-decoration: none; font-size: var(--font-md); }
.article-more-list a:hover { color: var(--c-primary); }
.article-detail-foot { margin-top: 4px; }
/* 文章页转化条：游客看「免费注册」，会员看「去记一餐」 */
.article-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.article-cta-title { font-size: var(--font-lg); font-weight: 700; color: var(--c-text); }
.article-cta-line { font-size: var(--font-sm); color: var(--c-muted); margin-top: 4px; }
.article-cta-btns { display: flex; gap: 10px; flex: 0 0 auto; }
@media (max-width: 560px) { .article-cta { flex-direction: column; align-items: stretch; gap: 12px; } .article-cta-btns { display: grid; grid-template-columns: 1fr 1fr; } }
/* 文章上下篇：读完顺着往下看；手机上两格并排改成一格一格 */
.article-pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-sm); }
.article-pager-cell { min-width: 0; }
.article-pager-cell.is-right { text-align: right; }
.article-pager-link { display: block; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); text-decoration: none; transition: border-color .15s ease, background-color .15s ease; }
.article-pager-link:hover { border-color: var(--c-primary); background: var(--c-bg); }
.article-pager-tag { display: block; font-size: var(--font-xs); color: var(--c-muted); }
.article-pager-title { display: block; margin-top: 4px; font-size: var(--font-sm); font-weight: 500; color: var(--c-text); line-height: 1.5; overflow-wrap: break-word; }
.article-pager-tag.is-end { display: inline-block; padding: 10px 12px; border: 1px dashed var(--c-border); border-radius: var(--radius-sm); }
@media (max-width: 560px) { .article-pager { grid-template-columns: 1fr; } .article-pager-cell.is-right { text-align: left; } }
@media (max-width: 900px) { .article-grid { grid-template-columns: repeat(2, 1fr); } .article-detail { padding: 16px; } }
@media (max-width: 560px) { .article-grid { grid-template-columns: 1fr; } .article-hero { padding: 16px; } .article-hero-title { font-size: 20px; } }
/* 手机：文章改成「小图 + 标题」的横排列表，一屏能多看几条 */
@media (max-width: 560px) {
  .article-grid { gap: 10px; }
  .article-card { flex-direction: row; align-items: stretch; gap: 10px; padding: 10px; border-radius: 10px; }
  .article-cover { flex: 0 0 92px; width: 92px; aspect-ratio: 1 / 1; border-radius: 8px; }
  .article-cover-empty { font-size: var(--font-sm); letter-spacing: 1px; }
  .article-card-body { padding: 0; gap: 4px; justify-content: center; }
  .article-card-title { font-size: var(--font-md); }
  .article-card-sum { display: none; }
  .article-card-meta { padding-top: 2px; }
  .article-lead { flex-direction: column; gap: 10px; }
  .article-lead-cover { flex: 0 0 auto; align-self: stretch; height: 130px; }
  .article-cross-grid { grid-template-columns: 1fr; }
}

/* ===== 触屏可点区（手机/平板/微信内置浏览器，含窄窗口）：手指能点的东西一律够大 ===== */
@media (max-width: 1023px), (pointer: coarse) {
  .brand { min-height: 44px; }
  .btn-sm { min-height: 44px; }
  .article-chip { padding: 10px 15px; font-size: var(--font-md); }
  .tab { padding: 14px 18px; }
  .seg { padding: 13px 18px; }
  .breadcrumb a { display: inline-block; padding: 9px 4px; }
  .footer-col li { line-height: 1.4; }
  .footer-col li a { display: block; padding: 12px 0; }
  .footer-icp a { padding: 8px 10px; }
  .footer-copy { display: inline-block; padding: 8px 0; }
}

/* ===== 对比页：六种周期 + 今日仪表盘 + 起伏图 ===== */
.card-sub { font-size: var(--font-sm); color: var(--c-muted); line-height: 1.6; margin: -4px 0 12px; }
.cmp-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cmp-range-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.cmp-range-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 14px; padding: 3px; }
.cmp-range-seg .seg { padding: 6px 12px; font-size: var(--font-sm); line-height: 1.5; border-radius: 10px; white-space: nowrap; }
.cmp-days-form { display: flex; align-items: center; gap: 6px; font-size: var(--font-sm); color: var(--c-muted); }
.cmp-days-input { width: 78px; padding: 6px 8px; text-align: center; }
.cmp-chart-head { align-items: flex-start; gap: 10px; }
.cmp-metric-seg .seg { padding: 5px 14px; font-size: var(--font-sm); line-height: 1.5; }

.gs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-sm); }
.gs-item { text-align: center; min-width: 0; }
.gs-ring { position: relative; width: 104px; height: 104px; margin: 0 auto; display: grid; place-items: center; }
.gs-ring svg { width: 104px; height: 104px; display: block; transform: rotate(-90deg); }
.gs-track { fill: none; stroke: var(--c-border); stroke-width: 9; }
.gs-fill { fill: none; stroke: var(--c-primary); stroke-width: 9; stroke-linecap: round; animation: gs-sweep 1.1s ease-out; }
.gs-num { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-variant-numeric: tabular-nums; line-height: 1; font-size: var(--font-lg); font-weight: 700; color: var(--c-primary-dark); }
.gs-num i { font-style: normal; font-size: var(--font-xs); font-weight: 500; margin-left: 1px; }
.gs-name { margin-top: 6px; font-size: var(--font-sm); font-weight: 500; color: var(--c-text); }
.gs-line { font-size: var(--font-xs); color: var(--c-muted); line-height: 1.6; overflow-wrap: anywhere; }
.gs-item.is-over .gs-fill { stroke: var(--c-warn); }
.gs-item.is-over .gs-num { color: var(--c-warn-dark); }
.gs-item.is-behind .gs-fill { stroke: var(--c-primary-light); }
.gs-item.is-behind .gs-num { color: var(--c-muted); }
.gs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--gap-sm); }
.gs-chip { display: inline-block; padding: 6px 12px; border: 1px solid var(--c-border); border-radius: 999px; background: var(--c-bg); font-size: var(--font-sm); color: var(--c-text); }
.gs-chip-link { text-decoration: none; color: var(--c-primary-dark); border-color: var(--c-primary-tint); }
.gs-chip-link:hover { background: var(--c-primary-soft); }
@keyframes gs-sweep { from { stroke-dasharray: 0 999; } }
@media (prefers-reduced-motion: reduce) { .gs-fill { animation: none; } }

@media (max-width: 767px) {
  .gs-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 10px; }
  .cmp-toolbar { flex-direction: column; align-items: stretch; }
  .cmp-chart-head { flex-direction: column; align-items: stretch; }
}
