/* 工具对话框与设置卡的排版层。
   结构一律走「分组列表 + 开关 + 分段控件 + 主次按钮」这套成熟形状：
   原来每个动作都是同一颗绿色描边胶囊，五颗排下去既没有层级也没有分组，
   机主实拍直接说"丑得离谱"。 */

/* ---------- 对话框外壳：标题与操作区固定，中间滚动 ---------- */
.tool-dialog:not([open]){display:none}
/* 全局 reset 里那条 `* { margin:0 }` 把 <dialog> 自带的 margin-inline:auto 抹掉了，
   于是 showModal() 弹出来的框贴在左上角。居中要显式写回来，别指望 UA 样式。 */
.tool-dialog{position:fixed;inset:0;margin:auto;box-sizing:border-box;display:flex;flex-direction:column;width:min(94vw,560px);max-height:88dvh;border:0;border-radius:18px;padding:0;background:#fff;color:#0F172A;font-size:15px;overflow:hidden;box-shadow:0 18px 48px rgba(15,23,42,.22)}
.tool-dialog::backdrop{background:rgba(15,23,42,.55)}
.tool-dialog>header{display:flex;align-items:flex-start;gap:12px;padding:18px 18px 14px;border-bottom:1px solid #EEF2F6;flex:0 0 auto}
.tool-dialog>header h2{margin:0;font-size:17px;font-weight:800;letter-spacing:-.01em;line-height:1.4;flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.tool-dialog .td-close{flex:0 0 auto;width:34px;height:34px;min-height:0;padding:0;border:1px solid #E2E8F0;border-radius:10px;background:#F8FAFC;color:#64748B;font-size:17px;line-height:1;cursor:pointer}
/* min-height:0 是这套封顶能生效的关键：flex 项默认 min-height:auto，
   正文比壳子高时它拒绝收缩，88dvh 的壳 + overflow:hidden 会把底栏直接切掉。 */
.td-body{padding:16px 18px 18px;overflow:auto;flex:1 1 auto;min-height:0;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.td-lead{margin:0 0 14px;color:#64748B;font-size:13.5px;line-height:1.65}
.td-note{margin:10px 0 0;color:#64748B;font-size:12.5px;line-height:1.6}
.td-empty{padding:26px 12px;text-align:center;color:#94A3B8;font-size:14px;border:1px dashed #E2E8F0;border-radius:14px}
.td-status{margin:12px 0 0;overflow-wrap:anywhere;font-size:13.5px;line-height:1.6;color:#047857;overflow-wrap:anywhere}
.td-status[data-err="1"]{color:#B91C1C}

/* ---------- 分组列表 ---------- */
.td-group{margin:0 0 14px;border:2px solid #E2E8F0;border-radius:14px;background:#fff;overflow:hidden}
.td-group+.td-group-label,.td-group-label{margin:0 0 8px;font-size:12px;font-weight:700;letter-spacing:.04em;color:#94A3B8;text-transform:uppercase}
.td-row{display:flex;align-items:center;gap:12px;padding:11px 14px;border-top:1px solid #EEF2F6;min-height:52px}
.td-row:first-child{border-top:0}
.td-row-main{flex:1 1 auto;min-width:0}
.td-row-title{display:block;font-size:15px;font-weight:600;line-height:1.35;color:#0F172A;overflow-wrap:anywhere}
.td-row-hint{display:block;margin-top:2px;font-size:12px;line-height:1.5;color:#64748B;overflow-wrap:anywhere}
.td-row-value{flex:0 0 auto;font-size:13.5px;font-weight:700;color:#0F172A;font-variant-numeric:tabular-nums}

/* ---------- 开关：appearance 归零的 checkbox，键盘与读屏照旧可用 ---------- */
.td-switch{appearance:none;-webkit-appearance:none;flex:0 0 auto;position:relative;width:46px;height:27px;margin:0;border:0;border-radius:999px;background:#CBD5E1;cursor:pointer;transition:background .16s ease}
.td-switch::after{content:"";position:absolute;top:3px;left:3px;width:21px;height:21px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.3);transition:transform .16s ease}
.td-switch:checked{background:#10B981}
.td-switch:checked::after{transform:translateX(19px)}
.td-switch:disabled{background:#E2E8F0;cursor:not-allowed}

/* ---------- 分段控件（历史记录的类型切换） ---------- */
.td-seg{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:3px;margin:0 0 14px;padding:3px;border:1px solid #E2E8F0;border-radius:12px;background:#F1F5F9}
.td-seg button{min-height:44px;padding:0 6px;border:0;border-radius:9px;background:transparent;color:#64748B;font:inherit;font-size:14px;font-weight:600;cursor:pointer;overflow-wrap:anywhere}
.td-seg button[aria-selected="true"]{background:#fff;color:#065F46;box-shadow:0 1px 4px rgba(15,23,42,.14)}

/* ---------- 按钮：主、次、行内、危险四档，不许同权重 ---------- */
.tool-dialog button,.account-tools button,#public-view button{font:inherit;cursor:pointer;min-height:44px;border-radius:12px}
.td-btn{flex:1 1 0;min-width:0;padding:11px 16px;border:0;background:linear-gradient(135deg,#10B981,#059669);color:#fff;font-weight:700;font-size:15px;line-height:1.3}
.td-btn:active{transform:scale(.99)}
.td-btn-quiet{flex:1 1 0;min-width:0;padding:11px 16px;border:2px solid #CBD5E1;background:#fff;color:#334155;font-weight:600;font-size:15px;line-height:1.3}
.td-btn-danger{flex:1 1 0;min-width:0;padding:11px 16px;border:2px solid #FECACA;background:#FEF2F2;color:#B91C1C;font-weight:600;font-size:15px;line-height:1.3}
.td-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:10px}
/* 弹窗动作按钮按内容收窄：以前 flex:1 会把"上传头像/保存忌口"拉成整行巨块。
   机主第二轮还是嫌大，再收一档：64×34 / 13 字，描边统一 2px 让主次两颗一样重
   （1.5px 会被浏览器归整成 1px，等于没加粗）。 */
.td-actions>.td-btn,.td-actions>.td-btn-quiet,.td-actions>.td-btn-danger{flex:0 1 auto;min-width:64px;min-height:34px;padding:6px 13px;font-size:13px;line-height:1.25;border-radius:999px;border-width:2px;border-style:solid}
/* 组内那排按钮要和上面输入框右缘对齐：输入框在 .td-field-row 里左右各缩 14px，
   动作区原来贴着组的边框，等于比输入框多出 14px 直接顶到边线上。 */
.td-group .td-actions{padding:0 14px;margin-top:12px}
.td-group>.td-actions:last-child,.td-group>.td-status:last-child{padding-bottom:12px}
.td-group .td-status,.td-group .td-note{padding-left:14px;padding-right:14px}
.td-group .td-note{padding-bottom:12px}
.td-actions[hidden]{display:none}
.td-actions .td-btn[aria-pressed="true"]{background:#F1F5F9;color:#475569;font-weight:600;box-shadow:inset 0 0 0 1px #CBD5E1}
.td-mini{flex:0 0 auto;min-height:36px;padding:6px 12px;border:1px solid #CBD5E1;border-radius:9px;background:#fff;color:#065F46;font-size:13px;font-weight:600}
.td-mini:disabled{opacity:.45;cursor:default}

/* ---------- 记录条目 ---------- */
.td-items{margin:0;padding:0;list-style:none}
.td-item{display:flex;align-items:flex-start;gap:10px;padding:12px 0;border-top:1px solid #EEF2F6}
.td-item:first-child{border-top:0;padding-top:2px}
.td-item-main{flex:1 1 auto;min-width:0}
.td-item-title{display:block;font-size:14.5px;font-weight:600;line-height:1.45;color:#0F172A;overflow-wrap:anywhere}
.td-item-meta{display:block;margin-top:3px;font-size:12.5px;line-height:1.5;color:#64748B;overflow-wrap:anywhere}
.td-chip{display:inline-block;padding:1px 8px;border-radius:999px;background:#F1F5F9;color:#475569;font-size:11.5px;font-weight:600;vertical-align:middle}
.td-item-acts{display:flex;flex-direction:row;gap:6px;flex:0 0 auto}
.td-pager{display:flex;align-items:center;gap:10px;margin-top:14px;padding-top:12px;border-top:1px solid #EEF2F6}
.td-pager-pos{flex:1 1 auto;min-width:0;text-align:center;font-size:12.5px;color:#64748B;font-variant-numeric:tabular-nums}

/* ---------- 表单 ---------- */
.td-field-row{display:block;padding:11px 14px;border-top:1px solid #EEF2F6}
.td-field-row:first-child{border-top:0}
.td-field-row>.td-field-label{margin:0 0 6px}
.td-field-row .td-field-hint{display:block;margin:4px 0 0;font-size:12px;line-height:1.5;color:#64748B}
.td-field{display:block;margin:0 0 12px}
.td-field-label{display:block;margin-bottom:6px;font-size:13px;font-weight:600;color:#334155}
.td-field input:not([type=checkbox]),.td-row input:not([type=checkbox]),.td-row select,.td-row textarea,.td-field-row input:not([type=checkbox]),.td-field-row select,.td-field-row textarea,.tool-dialog input[type=number],.tool-dialog input[type=date],.tool-dialog input[type=time],.tool-dialog select,.tool-dialog textarea{display:block;box-sizing:border-box;width:100%;min-height:46px;padding:10px 12px;border:2px solid #CBD5E1;border-radius:11px;background:#fff;color:#0F172A;font:inherit;font-size:15px}
.td-field input[type=number]{font-variant-numeric:tabular-nums}
.td-inline{display:flex;align-items:center;gap:10px}
.td-inline input{flex:0 0 96px;width:96px}
.td-row input[type=number],.td-row input[type=time]{flex:0 0 auto;width:112px}

/* ---------- 仪表盘顶部那张设置卡 ---------- */
.account-tools{padding:0!important;overflow:hidden}
.account-tools h3{margin:0;padding:14px 16px 10px;font-size:15px;font-weight:800;color:#0F172A;border-bottom:1px solid #EEF2F6}
.account-tools nav{display:block}
.account-tools .td-row{width:100%;border:0;border-top:1px solid #EEF2F6;background:#fff;text-align:left;padding:11px 16px;min-height:52px;border-radius:0;cursor:pointer}
.account-tools .td-row:first-of-type{border-top:0}
.account-tools .td-row:active{background:#F8FAFC}
.td-glyph{display:grid;flex:0 0 auto;place-items:center;width:30px;height:30px;border-radius:9px;background:#ECFDF5;color:#047857;font-size:15px;font-weight:700}
.td-chevron{flex:0 0 auto;width:8px;height:8px;border-top:2px solid #CBD5E1;border-right:2px solid #CBD5E1;transform:rotate(45deg)}
.account-tools .td-foot{padding:10px 16px 12px;border-top:1px solid #EEF2F6;background:#F8FAFC}
.account-tools .td-foot .field-hint{margin:8px 0 0}
.td-badge{display:inline-block;min-width:20px;padding:0 6px;border-radius:999px;background:#FEF2F2;color:#B91C1C;font-size:11.5px;font-weight:700;line-height:18px;text-align:center}
.td-badge[data-empty="1"]{background:#F1F5F9;color:#64748B}

/* ---------- 其余既有规则 ---------- */
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #0284C7;outline-offset:2px}
.public-readonly>header,.public-readonly>#app-main,.public-readonly>.bottom-nav,.public-readonly>.floating-dl-btn,.public-readonly>.modal-overlay{display:none!important}
#public-view{max-width:760px;margin:0 auto;padding:24px 16px;font-size:16px;line-height:1.6}
#public-view header{margin-bottom:20px}#public-view h1{font-size:25px}#public-view dt{color:#64748b}#public-view dd{font-weight:700;font-size:22px;margin:0 0 14px}
#public-view button{padding:11px 16px;border:1px solid #CBD5E1;background:#fff;color:#065F46;font-weight:600}
.ai-engine-bar{flex-wrap:wrap;max-width:100%}
.ai-engine-bar .eng-why{min-width:0;overflow-wrap:anywhere}
.shared-photo{max-width:100%;max-height:520px;object-fit:contain}
.history-row{padding:14px 0;border-bottom:1px solid #cbd5e1;overflow-wrap:anywhere}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Let fixed header controls wrap instead of enlarging narrow WebView viewports. */
@media(max-width:380px){
 /* 顶栏不再换行：机主实拍指的就是"品牌在上、账号入口掉到下面一行"。
    账号入口改成可收缩带下限（见 style.css 的 .account-chip），齿轮已删掉重复入口，
    320 档量过最窄一行仍放得下，不需要靠换行腾地方。 */
 .header-mode-bar{flex-wrap:wrap}
 .mode-btn{min-width:0;flex:1 1 120px;white-space:normal}
 .water-cups-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 .water-cup-btn{min-width:0;min-height:44px}
 .tool-dialog{width:96vw;border-radius:16px}
 .td-body{padding:14px 14px 16px}
 .td-item-acts{flex-direction:column}
 .td-actions{flex-wrap:wrap}
 /* 四列统计在 320 档每格只有 60px，获赞数四位就被省略号截掉；改 2×2。
    复用既有断点而不是新开一档，免得又多一条没人测过的宽度区间。 */
 .me-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* 餐食核对弹窗的头部：原文是主角，匹配说明退成一行小字 */
.td-meal-head{padding:12px 14px;margin:0 0 14px;border:1px solid #E2E8F0;border-radius:14px;background:#F8FAFC}
.td-meal-name{font-size:16px;font-weight:700;line-height:1.45;color:#0F172A;overflow-wrap:anywhere}
.td-meal-why{margin-top:5px;font-size:12.5px;line-height:1.6;color:#64748B;overflow-wrap:anywhere}
.td-meal-why .td-chip{margin-right:6px}
.td-ai-row{margin:0 0 6px}
.td-ai-row .td-btn-quiet{flex:0 0 auto;font-size:14px;padding:9px 14px}
/* 在线/本机模型估算的出处说明，退一行小字 */
.td-meal-src{margin:6px 0 0;font-size:12px;line-height:1.6;color:#64748B;overflow-wrap:anywhere}

/* ============ 个人中心与推荐：头像、点单顺序卡 ============ */
/* 头像左边、身份信息右边并排；原来头像右边只剩一个文件选择行，
   机器主嫌"旁边啥都没有"——这里补昵称/登录名/轻塑号/加入时间/签名。 */
.td-identity{display:flex;align-items:flex-start;gap:12px;padding:12px 14px}
.td-avatar-cell{flex:0 0 auto;display:flex}
.td-identity-main{flex:1 1 auto;min-width:0}
.td-identity-name{font-size:16px;font-weight:800;line-height:1.35;color:#0F172A;overflow-wrap:anywhere}
.td-identity-meta{margin-top:4px;font-size:12px;line-height:1.55;color:#64748B;overflow-wrap:anywhere}
.td-identity-meta b{color:#334155;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:.3px}
.td-identity-bio{margin-top:5px;font-size:12.5px;line-height:1.55;color:#475569;overflow-wrap:anywhere}
.td-id-tag{display:inline-block;margin-right:6px;padding:1px 7px;border:1px solid #E2E8F0;border-radius:999px;background:#F8FAFC;
  font-size:10.5px;font-weight:700;letter-spacing:.03em;color:#94A3B8;vertical-align:1px}
.td-id-tag-warn{border-color:#FDE68A;background:#FFFBEB;color:#B45309}
.td-id-login{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:#334155;overflow-wrap:anywhere}
.td-avatar{width:64px;height:64px;border-radius:50%;object-fit:cover;border:2px solid #E2E8F0;background:#F1F5F9;flex:0 0 auto}
.td-avatar-empty{display:flex;align-items:center;justify-content:center;font-size:11px;color:#94A3B8;width:64px;height:64px}
.tav-meta{font-size:12.5px;color:#475569;background:#F8FAFC;border:1px solid #E2E8F0;border-radius:8px;padding:6px 10px;margin-bottom:8px}
.tav-group{font-size:12px;font-weight:800;color:#047857;margin:10px 0 2px}
.tav-group-clash{color:#B45309}
.tav-item{display:flex;align-items:flex-start;gap:10px;padding:9px 0;border-top:1px solid #EEF2F6}
.tav-item:first-of-type{border-top:0}
.tav-item-main{flex:1 1 auto;min-width:0}
.tav-item-title{font-size:14px;font-weight:600;color:#0F172A;line-height:1.45;overflow-wrap:anywhere}
.tav-item-meta{margin-top:2px;font-size:12px;color:#64748B;line-height:1.5;overflow-wrap:anywhere}
.tav-sub{margin-top:4px;font-size:12px;color:#475569;line-height:1.55;overflow-wrap:anywhere}
.tav-bad .tav-item-title{color:#B45309}
.tav-tag{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;background:#ECFDF5;border:1px solid #A7F3D0;color:#047857;font-size:10.5px;font-weight:700;vertical-align:1px}
.tav-empty{font-size:12.5px;color:#64748B;line-height:1.6;margin:4px 0}
.tav-foot{margin:10px 0 0;font-size:11.5px;color:#94A3B8;line-height:1.6}
.takeout-advisor-card .tav-item-acts{display:flex;flex-direction:row;gap:6px;flex:0 0 auto}
/* 窄屏下这颗「复制替代项」挤不动菜名时整组换行。用 flex-wrap 而不是再加一条
   @media 断点：多一个断点就多一条没人测过的宽度区间，
   真机那条「断点全覆盖」判据正是为此而红过一次。 */
.tav-item{flex-wrap:wrap}

/* ============================================================
   r149 社区 / 私信 / 我的主页
   颜色、圆角、字号一律沿用上面那套令牌：#0F172A 主文、#64748B 次文、
   #065F46 主色、#E2E8F0 描边、#F1F5F9 底，触控目标最小 44px。
   ============================================================ */
.tool-strip{display:flex;gap:6px;overflow-x:auto;margin:-2px 0 10px;padding:2px 0 4px;scrollbar-width:none}
.tool-strip::-webkit-scrollbar{display:none}
.tool-strip[hidden]{display:none}
.ts-chip{flex:0 0 auto;min-height:36px;padding:0 12px;border:1px solid #E2E8F0;border-radius:999px;background:#fff;color:#475569;font:inherit;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap}
.ts-chip[aria-selected="true"]{border-color:#A7F3D0;background:#ECFDF5;color:#047857}
.ts-chip.ts-back{border-style:dashed;color:#64748B}
.nav-item{position:relative;border:0;background:none;font:inherit;cursor:pointer;padding:6px 2px 4px}
.nav-badge{position:absolute;top:4px;right:calc(50% - 22px);min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:#DC2626;color:#fff;font-size:10.5px;font-weight:800;line-height:17px}
.nav-badge[hidden]{display:none}

.cm-head{padding:12px 14px}
.cm-search{display:flex;gap:8px}
.cm-search input{flex:1 1 auto;min-width:0;min-height:44px;padding:0 12px;border:1px solid #CBD5E1;border-radius:11px;background:#fff;font:inherit;font-size:15px}
.cm-search .td-btn-quiet{flex:0 0 auto}
.cm-results{margin-top:10px;border-top:1px solid #EEF2F6;padding-top:4px}
.cm-results[hidden]{display:none}

.cm-compose{padding:12px 14px}
.cm-compose-collapsed{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:0;border:0;background:none;font:inherit;color:#64748B;font-size:15px;text-align:left;cursor:pointer}
.cm-compose-hint{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cm-compose-open textarea{display:block;box-sizing:border-box;width:100%;min-height:96px;padding:10px 12px;border:1px solid #CBD5E1;border-radius:11px;background:#fff;font:inherit;font-size:15px;resize:vertical}
/* 标题框：比正文高一点、字更重，一眼看出这是"那行标题"而不是又一个输入框 */
.cm-compose-open input#cm-post-title,.pd-editor input#pd-edit-title{display:block;box-sizing:border-box;width:100%;
  min-height:46px;margin:0 0 8px;padding:10px 12px;border:2px solid #CBD5E1;border-radius:11px;background:#fff;
  font:inherit;font-size:16px;font-weight:700;color:#0F172A}
.cm-compose-open input#cm-post-title::placeholder,.pd-editor input#pd-edit-title::placeholder{font-weight:600;color:#94A3B8}
.cm-compose-foot{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}
.cm-count{font-size:12px;color:#64748B;font-variant-numeric:tabular-nums}
.cm-err{flex:1 1 auto;min-width:0;font-size:12.5px;color:#B91C1C}
.cm-compose-acts{display:flex;gap:8px;margin-left:auto}
.cm-thumbs{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.cm-thumb{position:relative;width:64px;height:64px;border-radius:10px;overflow:hidden;background:#F1F5F9}
.cm-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.cm-thumb button{position:absolute;top:2px;right:2px;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:rgba(15,23,42,.62);color:#fff;font-size:12px;line-height:18px;cursor:pointer}

/* r160：广场卡片照小红书重排成双列卡——封面在上、标题两行、底下一行作者与点赞。
   以前是"头像昵称在最上 + 整段正文 + 九宫格"，一屏只容得下两条，像时间线不像广场。 */
.cm-feed{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}
.cm-card{display:flex;flex-direction:column;min-width:0;background:#fff;border:1px solid #E2E8F0;border-radius:14px;overflow:hidden;padding:0;box-shadow:0 1px 3px rgba(15,23,42,.05)}
.cm-cover{position:relative;display:block;width:100%;padding:0;border:0;background:#F1F5F9;font:inherit;cursor:pointer;line-height:0}
.cm-cover img{display:block;width:100%;aspect-ratio:3/4;object-fit:cover;background:#EDF1F5}
/* 没配图的帖子占位：给一块浅色文字卡，比留白或灰框好看，也不假装是图 */
.cm-cover-none{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:4/3;padding:12px;
  background:linear-gradient(150deg,#ECFDF5 0%,#F1F5F9 100%);color:#334155;font-size:13.5px;font-weight:600;
  line-height:1.6;text-align:center;overflow:hidden}
.cm-cover-more{position:absolute;right:7px;bottom:7px;padding:2px 7px;border-radius:999px;background:rgba(15,23,42,.62);
  color:#fff;font-size:11px;font-weight:700;line-height:1.5}
.cm-card-main{display:flex;flex-direction:column;gap:8px;flex:1 1 auto;min-width:0;padding:9px 10px 10px}
.cm-title{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  padding:0;border:0;background:none;text-align:left;font:inherit;font-size:14px;font-weight:700;
  line-height:1.4;color:#0F172A;cursor:pointer;overflow-wrap:anywhere}
.cm-card-foot{display:flex;align-items:center;gap:6px;margin-top:auto}
.cm-avatar{flex:0 0 34px;width:34px;height:34px;border-radius:50%;object-fit:cover;background:#ECFDF5;color:#047857;font-size:14px;font-weight:800;display:flex;align-items:center;justify-content:center;overflow:hidden}
.cm-avatar.sm{flex-basis:30px;width:30px;height:30px;font-size:13px}
.cm-avatar img{width:100%;height:100%;object-fit:cover;display:block}
/* 卡片底部的作者行要更轻：头像小一号、名字退成次级色，视觉重心留给封面和标题 */
.cm-card-foot .cm-avatar{flex-basis:22px;width:22px;height:22px;font-size:10px}
.cm-card-foot .cm-name{font-size:12px;font-weight:600;color:#64748B}
.cm-card-foot .cm-act{margin-left:auto}
.cm-who-btn{display:flex;align-items:center;gap:9px;flex:1 1 auto;min-width:0;border:0;background:none;font:inherit;padding:0;cursor:pointer;text-align:left;color:inherit}
.cm-who{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}
.cm-name{display:block;font-size:14px;font-weight:700;color:#0F172A;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cm-sub{display:block;font-size:11.5px;color:#94A3B8;margin-top:1px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cm-follow{flex:0 0 auto;min-height:30px;padding:0 12px;border:1px solid #A7F3D0;border-radius:999px;background:#ECFDF5;color:#047857;font:inherit;font-size:12.5px;font-weight:700;cursor:pointer}
.cm-follow[aria-pressed="true"]{border-color:#E2E8F0;background:#F1F5F9;color:#64748B}
.cm-act{display:inline-flex;align-items:center;gap:5px;border:0;background:none;font:inherit;font-size:13px;color:#64748B;cursor:pointer;padding:2px 0;min-height:30px}
.cm-act[aria-pressed="true"]{color:#DC2626;font-weight:700}
.cm-act b{font-variant-numeric:tabular-nums;font-weight:700}
/* 双击封面那一下的心：纯装饰，不改变任何数字 */
.cm-hearted{position:relative}
.cm-hearted::after{content:"❤";position:absolute;left:50%;top:50%;font-size:46px;line-height:1;color:#EF4444;
  opacity:0;transform:translate(-50%,-50%) scale(.5);animation:cmHeart .68s ease-out}
@keyframes cmHeart{0%{opacity:.95;transform:translate(-50%,-50%) scale(.5)}
  70%{opacity:.8;transform:translate(-50%,-50%) scale(1.25)}
  100%{opacity:0;transform:translate(-50%,-50%) scale(1.5)}}
.cm-state{margin:14px 0 2px;text-align:center;font-size:13px;color:#64748B;overflow-wrap:anywhere}
.cm-state:empty{display:none}
.cm-more{display:block;width:100%;margin-top:4px}
.cm-more[hidden]{display:none}

.cm-list{display:grid;gap:8px}
.cm-row{display:flex;align-items:flex-start;gap:10px;width:100%;text-align:left;background:#fff;border:1px solid #E2E8F0;border-radius:14px;padding:12px 14px;font:inherit;cursor:pointer;min-height:60px}
.cm-row-main{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}
.cm-row-title{display:block;font-size:14.5px;font-weight:700;color:#0F172A;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cm-row-meta{display:block;margin-top:3px;font-size:12.5px;line-height:1.5;color:#64748B;overflow-wrap:anywhere}
.cm-row-side{flex:0 0 auto;text-align:right;font-size:11.5px;color:#94A3B8}

.cm-ws-state{margin:8px 0 0;font-size:12px;color:#64748B;text-align:right}
.cm-ws-state:empty{display:none}
.cm-thread{margin-top:10px;border:1px solid #E2E8F0;border-radius:14px;background:#fff;overflow:hidden}
.cm-thread[hidden]{display:none}
.cm-thread-head{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #EEF2F6;background:#F8FAFC}
.cm-back{flex:0 0 auto;border:0;background:none;font:inherit;font-size:14px;font-weight:700;color:#047857;cursor:pointer;padding:6px 8px 6px 0;min-height:36px}
.cm-thread-head .td-mini[aria-pressed="true"]{border-color:#FECACA;background:#FEF2F2;color:#B91C1C}
.cm-thread-name{flex:1 1 auto;min-width:0;font-size:14.5px;font-weight:700;color:#0F172A;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cm-thread-sub{flex:0 0 auto;font-size:11.5px;color:#94A3B8}
.cm-bubbles{max-height:52vh;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:8px;background:#FCFDFE}
/* 整页里的聊天要撑满可用高度，52vh 那个上限是给旧的内嵌线程用的 */
.pl-body.chat{display:flex;flex-direction:column;overflow:hidden;padding:0}
.cm-bubbles.page{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;background:#F1F5F9;padding:14px 12px;display:flex;flex-direction:column;justify-content:flex-end}
.cm-bubble{max-width:78%;padding:9px 12px;border-radius:14px;font-size:14.5px;line-height:1.55;overflow-wrap:anywhere;white-space:pre-wrap}
.cm-bubble.them{align-self:flex-start;background:#F1F5F9;color:#0F172A;border-bottom-left-radius:5px}
.cm-bubble.me{align-self:flex-end;background:#065F46;color:#fff;border-bottom-right-radius:5px}
.cm-bubble time{display:block;margin-top:4px;font-size:10.5px;opacity:.72;font-variant-numeric:tabular-nums}
.cm-composer{display:flex;gap:8px;padding:10px 12px;border-top:1px solid #EEF2F6}
.cm-composer input{flex:1 1 auto;min-width:0;min-height:44px;padding:0 12px;border:1px solid #CBD5E1;border-radius:11px;font:inherit;font-size:15px}
.cm-composer .td-btn{flex:0 0 auto}

.me-hero{display:flex;gap:12px;align-items:flex-start}
.me-avatar{flex:0 0 56px;width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,#10B981 0%,#059669 100%);color:#fff;font-size:22px;font-weight:800;display:flex;align-items:center;justify-content:center;overflow:hidden}
.me-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.me-hero-main{flex:1 1 auto;min-width:0}
.me-name{font-size:18px;font-weight:800;color:#0F172A;overflow-wrap:anywhere}
/* 登录名要和昵称在形状上就分开：昵称是大字，登录名是等宽小标签，
   以前两者都往 me-name 这一个位置塞，看着像"用户名改不掉"。 */
.me-line .me-login-name{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;font-weight:600;
  color:#475569;background:#F8FAFC;border:1px solid #E2E8F0;border-radius:7px;padding:1px 6px;overflow-wrap:anywhere}
.me-line{margin-top:3px;font-size:12.5px;color:#64748B;overflow-wrap:anywhere}
.me-line b{font-variant-numeric:tabular-nums;color:#0F172A;letter-spacing:.4px}
.me-copy{margin-left:6px;border:1px solid #E2E8F0;background:#F8FAFC;border-radius:7px;font:inherit;font-size:11.5px;color:#475569;padding:1px 7px;cursor:pointer;min-height:24px}
.me-bio{margin-top:6px;font-size:13.5px;line-height:1.55;color:#334155;overflow-wrap:anywhere}
.me-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:12px 8px}

@media(min-width:760px){
 .cm-feed{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .cm-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* 底部导航与桌面顶栏里的"我的"用头像点，不用通用小人图标——
   机主嫌的就是那个蓝色剪影，同一个软件里不该两种人格符号并存。 */
.nav-avatar,.dnav-avatar{border-radius:50%;background:linear-gradient(135deg,#10B981 0%,#059669 100%);color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;overflow:hidden;flex:0 0 auto}
.nav-avatar{width:26px;height:26px;font-size:12px;line-height:1}
.dnav-avatar{width:18px;height:18px;font-size:10px;display:inline-flex;vertical-align:-3px}
.nav-avatar img,.dnav-avatar img{width:100%;height:100%;object-fit:cover;display:block}

/* r159：底部五项对齐。emoji 和头像点各按自己的字高排，导航栏又是 align-items:center，
   五项高度不同 → 标签一行上跳一行下掉；active 那颗还额外 scale(1.15)，更乱。
   收成同一个 26px 图标盒 + 等高格子，选中态只变色，不放大。 */
.bottom-nav{align-items:stretch}
.bottom-nav .nav-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:8px 2px 6px}
.bottom-nav .nav-item .nav-icon{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:26px;height:26px;
  margin-bottom:0;font-size:18px;line-height:1}
.bottom-nav .nav-item>span:not(.nav-icon){line-height:1.15}
.nav-item.active .nav-icon{transform:none}

/* ============================================================
   r150 机主实拍第二轮：形状统一、弹窗居中、文本可选中、整页跳转
   ============================================================ */

/* ---------- 按钮统一 ----------
   原来同一屏里白底的、绿描边的、渐变填充的、8px 方角的、14px 方角的、胶囊的混在一起
   （图一点名了搜索/配图/发布，图二点名了打卡/确认今天记完整了/算一下）。
   统一成一套形状与一套 hover 反馈，只保留"主/次"两档权重：
   次按钮=浅绿底→hover 深绿底白字，主按钮=深绿渐变→hover 更深。
   分段控件（mode-btn / td-seg / plan-tab / gender-mini / dining-mode）不动，
   它们是"当前选中哪一项"的指示器，不是动作按钮，压成胶囊会丢掉选中态。 */
.td-btn,.td-btn-quiet,.td-mini,.cm-follow,.btn-primary,.btn-secondary,.btn-outline,
.btn-log-meal,.btn-upload-photo,.btn-web-action,.btn-copy-remark,.btn-copy-url,
.btn-cheer-chip,.header-download-btn,.btn-exd-ctl,.cm-compose-collapsed,.me-copy{border-radius:999px}
.td-btn-quiet,.td-mini,.btn-secondary,.btn-outline,.me-copy{background:#ECFDF5;color:#047857;border:2px solid #A7F3D0}
.td-btn.td-btn-quiet{background:#ECFDF5;color:#047857;border:2px solid #A7F3D0}
.td-btn-quiet:hover,.td-btn.td-btn-quiet:hover,.td-mini:hover,.btn-secondary:hover,.btn-outline:hover,.me-copy:hover,
.td-btn:hover,.btn-primary:hover,.btn-log-meal:hover,.btn-upload-photo:hover,.btn-web-action:hover,
.btn-copy-remark:hover,.btn-copy-url:hover,.cm-follow:hover,.header-download-btn:hover{
  background:#059669;border-color:#059669;color:#fff}
.td-btn,.btn-primary,.btn-log-meal,.btn-upload-photo,.btn-web-action{
  background:linear-gradient(135deg,#10B981,#059669);border:2px solid transparent;color:#fff}
.td-btn:hover,.btn-primary:hover,.btn-log-meal:hover,.btn-upload-photo:hover,.btn-web-action:hover{
  background:linear-gradient(135deg,#059669,#047857)}
.td-btn:active,.btn-primary:active,.btn-secondary:active,.td-mini:active{transform:scale(.98)}
/* 选中/关闭态不能被 hover 规则带走，权重要更高 */
.cm-follow[aria-pressed="true"],.td-actions .td-btn[aria-pressed="true"],
.cm-thread-head .td-mini[aria-pressed="true"],.ts-chip[aria-selected="true"]{
  background:#F1F5F9;border-color:#E2E8F0;color:#475569;box-shadow:none}
.cm-thread-head .td-mini[aria-pressed="true"]{background:#FEF2F2;border-color:#FECACA;color:#B91C1C}
.cm-follow[aria-pressed="true"]:hover,.td-actions .td-btn[aria-pressed="true"]:hover{
  background:#E2E8F0;border-color:#CBD5E1;color:#334155}
.cm-thread-head .td-mini[aria-pressed="true"]:hover{background:#FEE2E2;border-color:#FCA5A5;color:#991B1B}
button:disabled,.td-mini:disabled,.btn-primary:disabled,.btn-secondary:disabled{
  background:#F1F5F9;border-color:#E2E8F0;color:#94A3B8;cursor:not-allowed;transform:none}

/* ---------- 文本要能选中复制 ----------
   全局 `* { user-select:none }` 是为了防长按误选，但它把聊天气泡和帖子正文
   一起锁死了——机主原话"对话框不能鼠标复制文本"。凡是读的东西都放开。 */
.cm-bubble,.cm-body,.cm-row-meta,.pd-text,.td-item-title,.td-item-meta,.me-bio,
.tav-item-title,.tav-item-meta,.history-row,.td-meal-name,.td-meal-why{
  user-select:text;-webkit-user-select:text}

/* ---------- 整页跳转的页面层（用户主页 / 帖子详情 / 私信会话 / 统计列表） ----------
   机主："小红书都是直接跳转页面的，弹窗放那里丑死了"。
   结构：固定顶栏（返回 + 标题 + 右侧动作）+ 可滚动正文 + 可选固定底栏。 */
.page-layer{position:fixed;inset:0;z-index:900;display:flex;flex-direction:column;background:#F1F5F9;color:#0F172A;font-size:15px}
.page-layer[hidden]{display:none}
/* 页面层开着的时候不许滚背景，否则转轮/惯性滚动会把底下的面板挪走，返回后位置对不上 */
body.qs-page-open{overflow:hidden}
.pl-head{display:flex;align-items:center;gap:10px;flex:0 0 auto;padding:10px 14px;background:#fff;border-bottom:1px solid #EEF2F6}
.pl-back{flex:0 0 auto;display:inline-flex;align-items:center;gap:2px;min-height:40px;padding:6px 12px 6px 4px;border:0;background:none;font:inherit;font-size:15px;font-weight:700;color:#047857;cursor:pointer}
.pl-back:hover{color:#059669}
.pl-title{flex:1 1 auto;min-width:0;margin:0;font-size:16.5px;font-weight:800;line-height:1.3;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.pl-slot{flex:0 0 auto;display:flex;align-items:center;gap:8px}
.pl-body{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:14px}
.pl-foot{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:10px 12px;background:#fff;border-top:1px solid #EEF2F6}
.pl-foot[hidden]{display:none}
.pl-foot input,.pl-foot textarea{flex:1 1 auto;min-width:0;min-height:44px;padding:10px 12px;border:1px solid #CBD5E1;border-radius:999px;font:inherit;font-size:15px;background:#fff;color:#0F172A}
.pl-foot .td-btn{flex:0 0 auto;min-height:44px;padding:10px 20px}
/* r157 私聊输入区：表情与更多面板（照小红书的三段式：工具栏 + 面板 + 输入） */
.pl-foot.dm-foot{flex-direction:column;align-items:stretch;padding:8px 10px 10px;gap:8px}
.dm-tools{display:flex;align-items:center;gap:6px}
.dm-input-slot{position:relative;flex:1 1 auto;min-width:0;display:flex}
.dm-input-slot input{flex:1 1 auto;min-width:0;padding-right:38px}
.dm-input-mic{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:28px;height:28px;padding:0;border:0;border-radius:50%;background:transparent;color:#94A3B8;display:grid;place-items:center}
.dm-input-mic svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.dm-input-mic[hidden]{display:none}
.dm-hold-bar{flex:1 1 auto;min-height:40px;border:1px solid #E2E8F0;border-radius:999px;background:#fff;color:#0F172A;font:inherit;font-size:14.5px;font-weight:600;touch-action:none;user-select:none;-webkit-user-select:none}
.dm-hold-bar[hidden]{display:none}
.dm-hold-bar.holding{background:#ECFDF5;border-color:#A7F3D0;color:#047857}
.dm-hold-bar.cancel{background:#FEF2F2;border-color:#FECACA;color:#B91C1C}
.dm-tools .dm-send[hidden]{display:none}
.dm-tool{flex:0 0 auto;width:36px;height:36px;min-height:36px;padding:0;border:0;border-radius:50%;background:#F1F5F9;color:#334155;font-size:20px;line-height:1}
.dm-tool[aria-expanded="true"]{background:#DCFCE7;color:#047857}
.dm-tools input{flex:1 1 auto;min-width:0}
.dm-tools .dm-send{min-height:40px;padding:8px 18px;font-size:14px}
.dm-panel{border-top:1px solid #EEF2F6;padding:10px 2px 2px;max-height:min(62vh,520px);overflow-y:auto;overscroll-behavior:contain}
.dm-panel[hidden]{display:none}
.dm-emoji-group{margin:0 0 8px}
.dm-emoji-group h4{margin:0 0 3px;font-size:11px;font-weight:700;color:#94A3B8}
.dm-emoji-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:2px}
.dm-emoji{min-height:36px;padding:0;border:0;border-radius:9px;background:transparent;font-size:23px;line-height:1}
.dm-emoji:active{background:#F1F5F9}
.dm-plus-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.dm-plus-tile{display:flex;flex-direction:column;align-items:center;gap:5px;padding:10px 4px;border:0;border-radius:12px;background:#F8FAFC;color:#475569;font-size:12px;font-weight:600;min-height:64px}
.dm-plus-tile .ico{font-size:23px;line-height:1.1}
.dm-plus-tile[disabled]{opacity:.42}
.dm-lock-hint{margin:8px 0 0;font-size:12px;color:#B45309}
.dm-phrases{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.dm-phrases[hidden]{display:none}
.dm-phrases button{padding:6px 11px;border:1px solid #E2E8F0;border-radius:999px;background:#fff;color:#334155;font:inherit;font-size:12.5px;min-height:32px}
.dm-tool{display:grid;place-items:center}
#dm-hold-bar{touch-action:none;user-select:none;-webkit-user-select:none}
.dm-tool svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dm-sticker-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding:3px;background:#F3F7F4;border-radius:12px;margin-bottom:10px}
.dm-sticker-tabs button{flex:none;white-space:nowrap;border:0;border-radius:9px;background:transparent;padding:7px 2px;color:#64748B;font:inherit;font-size:12px;min-height:34px;font-weight:600}
.dm-sticker-tabs button[aria-selected="true"]{background:#fff;color:#047857;font-weight:800;box-shadow:0 1px 3px rgba(15,23,42,.12)}
.dm-sticker-search{display:block;margin-bottom:8px}
.dm-source-row{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.dm-source-row[hidden]{display:none}
.dm-source-row label{flex:0 0 auto;font-size:11.5px;color:#94A3B8}
.dm-select-wrap{position:relative;flex:1;min-width:0}
.dm-select-wrap::after{content:"";position:absolute;right:12px;top:50%;width:7px;height:7px;border-right:1.5px solid #64748B;border-bottom:1.5px solid #64748B;transform:translateY(-65%) rotate(45deg);pointer-events:none}
.dm-sticker-search select{display:block;width:100%;height:38px;appearance:none;-webkit-appearance:none;border:1px solid #E2E8F0;border-radius:11px;background:#fff;padding:0 32px 0 12px;font:inherit;font-size:12.5px;color:#0F172A}
.dm-search-row{display:flex;gap:8px}
.dm-search-row input{flex:1;min-width:0;height:38px;border:1px solid #E2E8F0;border-radius:999px;background:#F7FAF8;padding:0 14px;font:inherit;font-size:13px;color:#0F172A}
.dm-search-btn{flex:0 0 auto;height:38px;padding:0 13px;border:0;border-radius:999px;background:#047857;color:#fff;font:inherit;font-size:12px;font-weight:700;display:inline-flex;align-items:center;gap:5px}
.dm-search-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.dm-search-btn:disabled{opacity:.5}
.dm-voice-actions button,.dm-draft button{border:1px solid #CBD5E1;border-radius:9px;background:#fff;padding:8px 10px;min-height:34px;color:#334155;font:inherit;font-size:12px}
.dm-sticker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.dm-sticker-tile{min-width:0;border:0;border-radius:8px;background:#F8FAFC;padding:3px;color:#475569;font:inherit;font-size:11px}
.dm-sticker-tile img{width:100%;height:65px;object-fit:contain;display:block}
.dm-sticker-tile span{display:block;padding-bottom:4px}
.dm-panel-note{font-size:12px;line-height:1.5;color:#64748B;margin:5px 0 8px;overflow-wrap:anywhere}
.dm-network-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.dm-network-item{display:flex;flex-direction:column;min-width:0;background:#fff;border:1px solid #E8EEF0;border-radius:14px;overflow:hidden;font-size:12px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.dm-network-thumb{position:relative;aspect-ratio:1;background:#F8FAFC;overflow:hidden}
.dm-network-thumb img{width:100%;height:100%;object-fit:contain;display:block}
.dm-network-source{position:absolute;left:7px;top:7px;padding:2px 7px;border-radius:999px;background:rgba(15,23,42,.62);color:#fff;font-size:9.5px;line-height:1.5}
.dm-network-body{display:flex;flex-direction:column;gap:4px;padding:8px 9px 9px;min-width:0}
.dm-network-body b{font-size:12.5px;font-weight:700;line-height:1.3;color:#0F172A;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dm-network-item .dm-license{font-size:10px;color:#94A3B8;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.35}
.dm-network-item a{font-size:10.5px;color:#047857;text-decoration:none;font-weight:600}
.dm-network-body button{width:100%;min-height:33px;margin-top:2px;border:1px solid #CFE9DC;border-radius:9px;background:#ECFDF5;color:#047857;font:inherit;font-size:11.5px;font-weight:700}
.dm-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:16px 12px 14px;border:1px dashed #DCE7E1;border-radius:14px;background:#FAFDFB}
.dm-empty-icon{width:42px;height:42px;border-radius:50%;background:#E9F8F1;display:grid;place-items:center;color:#047857}
.dm-empty-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.dm-empty b{font-size:13.5px;color:#0F172A}
.dm-empty p{margin:0;font-size:11.5px;color:#64748B;line-height:1.6;max-width:280px}
.dm-suggest{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.dm-suggest button{border:1px solid #E2E8F0;border-radius:999px;background:#fff;color:#475569;padding:6px 12px;font:inherit;font-size:11.5px;min-height:30px}
.dm-generate-btn{border:0;border-radius:999px;background:#047857;color:#fff;padding:9px 16px;font:inherit;font-size:12.5px;font-weight:700;min-height:36px}
.dm-results-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 8px;margin:0 0 8px}
.dm-results-head .dm-panel-note{margin:0;font-size:11px}
.dm-generate-link{border:0;background:transparent;color:#047857;font:inherit;font-size:11.5px;font-weight:700;padding:4px 0;white-space:nowrap}
.dm-search-loading{display:flex;align-items:center;gap:8px;padding:14px 10px;font-size:12px;color:#64748B}
.dm-spinner{width:14px;height:14px;border:2px solid #D1E7DC;border-top-color:#047857;border-radius:50%;animation:dmspin .8s linear infinite}
@keyframes dmspin{to{transform:rotate(360deg)}}
.dm-local-sticker{display:flex;flex-direction:column;align-items:center;gap:8px;padding:18px 12px;border:1.5px dashed #D6E4DC;border-radius:14px;background:#F8FCFA}
.dm-local-sticker button{display:flex;align-items:center;gap:6px;border:0;border-radius:999px;background:#047857;color:#fff;padding:9px 16px;font:inherit;font-size:12.5px;font-weight:700;min-height:36px}
.dm-local-sticker svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dm-license,.dm-attribution{display:block;font-size:10px;color:#64748B;overflow-wrap:anywhere;line-height:1.4}
.dm-attribution{max-width:170px;margin-top:4px}
.dm-sticker-img{display:block;width:120px;max-width:100%;max-height:160px;object-fit:contain}
.dm-voice-head,.dm-voice-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px}
.dm-voice-actions .dm-confirm{background:#047857;color:white;border-color:#047857}
.dm-voice-panel audio{width:100%;height:42px;margin:8px 0}
.dm-draft{display:flex;align-items:center;gap:8px;padding:8px;background:#F1F5F9;border-radius:10px;min-width:0}
.dm-quote-bar{display:flex;align-items:center;gap:8px;margin:2px 2px 0;padding:7px 10px;border-left:3px solid #10B981;border-radius:8px;background:#F1F5F9;font-size:12px;color:#475569}
.dm-quote-bar[hidden]{display:none}
.dm-quote-main{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dm-quote-main b{color:#047857}
.dm-quote-bar button{border:0;background:transparent;color:#64748B;font-size:18px;line-height:1;padding:2px 4px}
.dm-quote-inline{display:block;max-width:220px;margin:0 0 6px;padding:6px 8px;border-left:3px solid #10B981;border-radius:6px;background:#F1F5F9;color:#475569;font:inherit;font-size:11.5px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cm-bubble.me .dm-quote-inline{background:rgba(255,255,255,.24);border-left-color:rgba(255,255,255,.7);color:#fff}
.dm-quote-flash{animation:dmQuoteFlash .9s ease}
@keyframes dmQuoteFlash{0%{background:#FEF3C7}100%{background:transparent}}
.dm-more-wrap{display:flex;justify-content:center;padding:10px 0 4px}
.dm-more-btn{border:1px solid #A7F3D0;border-radius:999px;background:#ECFDF5;color:#047857;font:inherit;font-size:12.5px;font-weight:700;padding:8px 18px;min-height:36px}
.dm-more-btn:disabled{opacity:.6}
.dm-end-note{text-align:center;margin:8px 0 2px}
/* 自定义单选卡片：替代原生 select 弹层（原生弹层和 App 设计不统一） */
.choice-list{display:flex;flex-direction:column;gap:8px}
.choice-card{display:flex;align-items:center;gap:10px;width:100%;padding:11px 12px;border:1.5px solid #E2E8F0;border-radius:12px;background:#fff;text-align:left;font:inherit;color:#0F172A}
.choice-card.active{border-color:#10B981;background:#F0FDF4;box-shadow:0 0 0 2px rgba(16,185,129,.12)}
.choice-emoji{flex:0 0 auto;font-size:20px;line-height:1}
.choice-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.choice-body b{font-size:15px;font-weight:700;color:#0F172A;line-height:1.3}
.choice-body small{font-size:12px;color:#64748B;line-height:1.35}
.choice-card.active .choice-body b{color:#065F46}
.seg-toggle{display:flex;gap:6px;background:#F1F5F9;border-radius:10px;padding:3px}
.seg-toggle button{flex:1;min-height:38px;border:0;border-radius:8px;background:transparent;color:#475569;font:inherit;font-size:14px;font-weight:600}
.seg-toggle button.active{background:#fff;color:#047857;box-shadow:0 1px 3px rgba(15,23,42,.12)}
/* 登录 / 注册弹窗：与软件统一的卡片、分段条与输入规格 */
.auth-card{max-width:430px}
.auth-card .modal-header h2{font-size:17px}
.auth-card .modal-body{padding:18px 20px 22px}
.auth-tabs{display:flex;gap:6px;background:#F1F5F9;border-radius:12px;padding:4px;margin-bottom:16px}
.auth-tab{flex:1;min-height:40px;border:0;border-radius:9px;background:transparent;color:#475569;font:inherit;font-size:13.5px;font-weight:600}
.auth-tab.active{background:#fff;color:#047857;box-shadow:0 1px 4px rgba(15,23,42,.12)}
.auth-card .form-group{margin-bottom:12px}
.auth-card .form-label{font-size:13px;color:#334155;font-weight:600;margin-bottom:6px}
.auth-card .input-control{min-height:46px;font-size:16px;line-height:1.35}
.auth-card .btn-primary{min-height:46px;font-size:15px;border-radius:12px}
.auth-card .link-like{font-size:12px}
.auth-card .auth-foot{font-size:12px;color:#64748B;text-align:center;margin-top:12px;line-height:1.8}
/* 输入框：长值/大字号下不裁字 */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.input-control{line-height:1.35}
.td-field-row input{min-width:0;width:100%;font-size:15px;line-height:1.35}
.dm-draft[hidden]{display:none}
.dm-draft>img,.dm-draft>video{width:62px;height:62px;object-fit:contain;flex-shrink:0}
.dm-draft>div{flex:1;min-width:0;font-size:12px;overflow-wrap:anywhere}
.dm-draft p{margin:3px 0;font-size:11px;color:#64748B}
.dm-audio-wx{display:flex;align-items:center;gap:8px;min-width:118px;max-width:220px;min-height:40px;padding:8px 12px;border-radius:14px;background:#fff;color:#0F172A;font-size:13px;cursor:pointer;user-select:none;-webkit-user-select:none}
.dm-audio-play{display:grid;place-items:center;width:22px;height:22px;color:currentColor}
.dm-audio-play svg{width:20px;height:20px;fill:currentColor}
.dm-audio-wave{display:flex;align-items:center;gap:2px;height:18px}
.dm-audio-wave i{display:block;width:3px;border-radius:999px;background:currentColor;opacity:.55}
.dm-audio-wave i:nth-child(1){height:8px}
.dm-audio-wave i:nth-child(2){height:16px}
.dm-audio-wave i:nth-child(3){height:11px}
.dm-audio-wx.playing .dm-audio-wave i{animation:dmwave .8s infinite ease-in-out}
.dm-audio-wx.playing .dm-audio-wave i:nth-child(2){animation-delay:.15s}
.dm-audio-wx.playing .dm-audio-wave i:nth-child(3){animation-delay:.3s}
@keyframes dmwave{0%,100%{transform:scaleY(.6)}50%{transform:scaleY(1.25)}}
.dm-audio-time{margin-left:auto;font-size:12px;opacity:.85}
.dm-audio-wx.pending{opacity:.72;cursor:default}
.dm-audio-spin{display:block;width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:dmspin .8s linear infinite}
.dm-hold-layer{position:fixed;inset:0;z-index:1350;display:flex;flex-direction:column;justify-content:flex-end;background:rgba(15,23,42,.58);touch-action:none;user-select:none;-webkit-user-select:none;overscroll-behavior:contain}
.dm-hold-layer[hidden]{display:none}
.dm-hold-bubble{position:absolute;top:76px;right:22px;display:flex;align-items:center;gap:10px;min-width:132px;max-width:220px;padding:16px 18px;border-radius:18px;background:#fff;color:#334155;box-shadow:0 12px 32px rgba(0,0,0,.28)}
.dm-hold-bubble::after{content:'';position:absolute;right:-7px;top:24px;width:16px;height:16px;border-radius:3px;background:#fff;transform:rotate(45deg)}
.dm-hold-wave{display:flex;align-items:center;gap:3px;height:24px}
.dm-hold-wave i{display:block;width:3px;border-radius:999px;background:currentColor;height:10px;animation:dmHoldWave .9s infinite ease-in-out}
.dm-hold-wave i:nth-child(2){height:18px;animation-delay:.1s}
.dm-hold-wave i:nth-child(3){height:13px;animation-delay:.2s}
.dm-hold-wave i:nth-child(4){height:22px;animation-delay:.3s}
.dm-hold-wave i:nth-child(5){height:15px;animation-delay:.4s}
.dm-hold-wave i:nth-child(6){height:20px;animation-delay:.5s}
.dm-hold-wave i:nth-child(7){height:12px;animation-delay:.6s}
.dm-hold-wave i:nth-child(8){height:17px;animation-delay:.7s}
.dm-hold-sec{margin-left:auto;font-size:13px;font-variant-numeric:tabular-nums;color:#475569}
@keyframes dmHoldWave{0%,100%{transform:scaleY(.55)}50%{transform:scaleY(1.15)}}
.dm-hold-layer.starting .dm-hold-wave i{animation-play-state:paused;opacity:.45}
.dm-hold-layer.cancel .dm-hold-bubble{color:#DC2626}
.dm-hold-pills{display:flex;gap:14px;padding:0 18px 14px}
.dm-hold-pill{flex:1;display:flex;align-items:center;justify-content:center;min-height:56px;padding:0 18px;border:0;border-radius:16px;background:rgba(255,255,255,.16);color:#fff;font:inherit;font-size:16px;font-weight:600}
.dm-hold-pill.is-hint{background:rgba(255,255,255,.09);color:rgba(255,255,255,.72);font-weight:500}
.dm-hold-sheet{display:flex;flex-direction:column;gap:8px;padding:16px 22px calc(20px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;background:#F5F6F8;color:#0F172A;text-align:center}
.dm-hold-sheet-top{display:flex;align-items:center;justify-content:space-between;font-size:12.5px;color:#64748B;font-variant-numeric:tabular-nums}
.dm-hold-live{display:inline-flex;align-items:center;gap:6px;font-weight:700;color:#B91C1C}
.dm-hold-live::before{content:'';width:8px;height:8px;border-radius:50%;background:#DC2626;animation:dmHoldBlink 1.1s infinite}
@keyframes dmHoldBlink{0%,100%{opacity:1}50%{opacity:.25}}
.dm-hold-sheet b{font-size:20px;letter-spacing:.04em}
.dm-hold-layer.cancel .dm-hold-sheet b{color:#B91C1C}
.cm-bubble.me.media .dm-audio-wx{background:#10B981;color:#fff}
.cm-bubble.them.media .dm-audio-wx{background:#fff;color:#0F172A}
.dm-asr{margin:6px 0 0;max-width:230px;padding:8px 10px;border-radius:10px;background:#fff;color:#0F172A;font-size:13px;line-height:1.45;text-align:left;overflow-wrap:anywhere;user-select:text;-webkit-user-select:text}
.dm-asr.pending{color:#64748B}
.dm-asr.failed{color:#B91C1C}
.cm-bubble.me .dm-asr{background:#ECFDF5;color:#065F46}
.cm-bubble.me .dm-asr.pending{color:#047857}
.cm-bubble.me .dm-asr.failed{color:#B91C1C}
.dm-asr-btn{margin:5px 0 0 2px;padding:2px 0;border:0;background:transparent;color:#047857;font:inherit;font-size:12px;font-weight:600}
.dm-bubble .dm-audio-wx{margin:0}
.dm-audio audio{display:block;width:100%;height:42px;margin-top:5px}
.dm-call-layer{position:fixed;inset:0;z-index:1400;display:flex;align-items:stretch;justify-content:center;background:#065F46}
.dm-call-layer[hidden]{display:none}
.dm-call-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-between;width:100%;height:100%;margin:0;padding:56px 26px 42px;border-radius:0;background:linear-gradient(180deg,#0B3B2E 0%,#065F46 55%,#064E3B 100%);color:#fff;text-align:center;box-shadow:none}
.dm-call-top{display:flex;flex-direction:column;align-items:center;gap:8px}
.dm-call-avatar .cm-avatar{width:96px;height:96px;flex-basis:96px;font-size:34px;border:4px solid rgba(255,255,255,.25)}
.dm-call-card h2{margin:6px 0 0;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:24px;color:#fff}
.dm-call-kicker{margin:0;font-size:12.5px;letter-spacing:.08em;color:#A7F3D0;font-weight:700}
.dm-call-sub{margin:0;min-height:18px;font-size:13px;color:rgba(255,255,255,.72)}
.dm-call-timer{margin:0;font-size:30px;font-weight:800;color:#fff;font-variant-numeric:tabular-nums}
.dm-call-page-actions{display:flex;align-items:flex-end;justify-content:center;gap:26px}
.dm-call-round{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:64px;padding:0;border:0;background:transparent;color:#fff;font:inherit;font-size:12px}
.dm-call-round svg{box-sizing:border-box;width:58px;height:58px;padding:16px;border-radius:50%;background:rgba(255,255,255,.16);fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dm-call-round.active svg{background:#fff;stroke:#065F46}
.dm-call-round.accept svg{background:#10B981}
.dm-call-round.reject svg,.dm-call-round.hang svg{background:#DC2626}
.dm-call-down{position:absolute;top:20px;right:20px;display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:18px;line-height:1}
.dm-call-mini{position:fixed;top:12px;left:50%;z-index:1390;display:flex;align-items:center;gap:8px;max-width:calc(100% - 24px);padding:7px 8px 7px 14px;border-radius:999px;background:#065F46;color:#fff;box-shadow:0 8px 24px rgba(6,20,15,.35);transform:translateX(-50%)}
.dm-call-mini[hidden]{display:none}
.dm-call-mini-main{display:flex;align-items:center;gap:8px;max-width:230px;overflow:hidden;border:0;background:transparent;color:#fff;font:inherit;font-size:13px}
.dm-call-mini-dot{width:9px;height:9px;border-radius:50%;background:#10B981;box-shadow:0 0 0 4px rgba(16,185,129,.25)}
.dm-call-mini-main b{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dm-call-mini-hang{padding:7px 12px;border:0;border-radius:999px;background:#DC2626;color:#fff;font:inherit;font-size:12px;font-weight:700}
.dm-message{width:100%}
@media(max-width:360px){.dm-tools{gap:3px}.dm-tool{width:30px;height:34px;min-height:34px}.dm-tools .dm-send{padding:8px;font-size:12px}.dm-sticker-tabs button{font-size:11px;padding:7px 4px}.dm-audio{width:175px}.dm-audio-wx{min-width:104px;max-width:180px}}
.dm-media-img{display:block;max-width:min(62vw,230px);max-height:300px;border-radius:12px;object-fit:cover;cursor:zoom-in}
.dm-media-video{display:block;width:min(62vw,240px);max-height:300px;border-radius:12px;background:#000}
.dm-media-wait{display:inline-block;padding:20px 16px;color:#64748B;font-size:13px}
.cm-bubble.media,.cm-bubble.media.me,.cm-bubble.media.them{background:transparent;border:0;box-shadow:none;padding:0}
.cm-bubble.media time{color:#94A3B8;opacity:1}
.cm-bubble.sticker{background:transparent;border:0;box-shadow:none;padding:0 2px}
.cm-bubble.sticker.them,.cm-bubble.sticker.me{background:transparent;border:0}
.cm-bubble .dm-sticker{display:block;font-size:46px;line-height:1.15}
.cm-bubble.sticker time{color:#94A3B8;opacity:.9}

/* ---------- 帖子详情：照微博的形状（正文大、配图独立一块、时间与操作分开） ---------- */
.pd-post{background:#fff;border-radius:14px;padding:14px;border:1px solid #E2E8F0}
.pd-who{display:flex;align-items:center;gap:10px}
.pd-text{margin:12px 0 0;font-size:16.5px;line-height:1.72;color:#0F172A;white-space:pre-wrap;overflow-wrap:anywhere}
.pd-imgs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.pd-imgs img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:12px;background:#F1F5F9;display:block;cursor:zoom-in}
.pd-imgs.one{grid-template-columns:minmax(0,1fr)}
.pd-imgs.one img{aspect-ratio:auto;max-height:60vh;object-fit:contain;cursor:zoom-in}
.pd-meta{margin-top:12px;padding-top:10px;border-top:1px solid #EEF2F6;font-size:12.5px;color:#94A3B8}
/* 5 颗操作按钮在 393px 下会挤出卡片；允许换行，最后一行自然落在下面 */
.pd-acts{display:flex;align-items:center;flex-wrap:wrap;gap:7px 8px;margin-top:10px}
.pd-acts-extra{display:flex;align-items:center;gap:8px;margin-left:auto}
.pd-sec{margin:16px 0 8px;font-size:12.5px;font-weight:800;letter-spacing:.03em;color:#64748B}
.pd-cmt{display:flex;gap:10px;align-items:flex-start;padding:12px 0;border-top:1px solid #EEF2F6;background:none;border-left:0;border-right:0;border-bottom:0;width:100%;text-align:left;font:inherit;cursor:pointer}
.pd-cmt:first-of-type{border-top:0}
.pd-danger{background:#FEF2F2;border-color:#FECACA;color:#B91C1C}
.pd-danger:hover{background:#DC2626;border-color:#DC2626;color:#fff}
.pd-cmt-main{flex:1 1 auto;min-width:0}
.pd-cmt-name{font-size:13.5px;font-weight:700;color:#0F172A}
.pd-cmt-text{margin-top:3px;font-size:15px;line-height:1.6;color:#0F172A;white-space:pre-wrap;overflow-wrap:anywhere}
.pd-cmt-sub{margin-top:4px;font-size:11.5px;color:#94A3B8;display:flex;align-items:center;gap:10px}
.pd-reply{margin-left:auto;min-height:30px;padding:0 12px;border:1px solid #A7F3D0;border-radius:999px;background:#ECFDF5;color:#047857;font:inherit;font-size:12.5px;font-weight:700;cursor:pointer}
.pd-reply:hover{background:#059669;border-color:#059669;color:#fff}

/* ---------- 聊天：长按/右键菜单 + 气泡装扮 ---------- */
.bubble-menu{position:fixed;z-index:1200;display:flex;gap:2px;padding:4px;border-radius:999px;background:rgba(15,23,42,.92);box-shadow:0 8px 24px rgba(15,23,42,.3)}
.bubble-menu[hidden]{display:none}
.bubble-menu button{min-height:34px;padding:0 12px;border:0;border-radius:999px;background:none;color:#fff;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.bubble-menu button:hover{background:rgba(255,255,255,.18)}
.cm-bubble{cursor:default}
.cm-bubble.recalled{align-self:center;max-width:100%;background:none;color:#94A3B8;font-size:12.5px;text-align:center;padding:4px 0}
.cm-bubble[data-t="blue"].me{background:#1D4ED8}
.cm-bubble[data-t="rose"].me{background:#BE185D}
.cm-bubble[data-t="ink"].me{background:#0F172A}
.cm-bubble[data-t="amber"].me{background:#B45309}
.theme-dots{display:flex;gap:8px;align-items:center}
.theme-dot{width:26px;height:26px;padding:0;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #CBD5E1;cursor:pointer}
.theme-dot[aria-pressed="true"]{box-shadow:0 0 0 2px #059669}
.theme-dot[data-t="green"]{background:#065F46}
.theme-dot[data-t="blue"]{background:#1D4ED8}
.theme-dot[data-t="rose"]{background:#BE185D}
.theme-dot[data-t="ink"]{background:#0F172A}
.theme-dot[data-t="amber"]{background:#B45309}

/* ---------- 统计格要能点：给出手型与按压反馈 ---------- */
.me-stat{text-align:center;min-width:0;border:0;background:none;font:inherit;cursor:pointer;padding:8px 2px;border-radius:12px}
.me-stat:hover{background:#F8FAFC}
.me-stat:active{background:#ECFDF5}
.me-stat b{display:block;font-size:18px;font-weight:800;color:#0F172A;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.me-stat span{display:block;margin-top:2px;font-size:11.5px;color:#64748B;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ── r152：私信按小红书整行排（头像+气泡，自己靠右）──────────────────
   上一版只靠 align-self，对方气泡和聊天背景都是 #F1F5F9，
   看起来就是"没有气泡、全在左边"——机主截图里正是这个样子。 */
.cm-bubbles.page{background:#EDEDED;gap:14px;padding:16px 12px;justify-content:flex-start}
.dm-row{display:flex;align-items:flex-start;gap:8px;width:100%}
.dm-row.them{justify-content:flex-start}
.dm-row.me{justify-content:flex-end}
.dm-avatar{width:34px;height:34px;flex:0 0 34px;font-size:13px}
.dm-row .cm-bubble{max-width:70%}
.cm-bubble.them{background:#fff;color:#0F172A;border:1px solid #E3E6EA;border-bottom-left-radius:6px}
.cm-bubble.me{background:#0A7A56;color:#fff;border-bottom-right-radius:6px}
.dm-recall{align-self:center;color:#8A8F96;font-size:12px;padding:2px 10px;background:#E3E3E3;border-radius:999px}

/* 输入框：去掉浏览器默认的蓝色聚焦框，跟整站一个形状 */
.pl-foot input,.pl-foot textarea{border:0;outline:none;border-radius:999px;background:#F5F7F6;padding:10px 14px;font:inherit;color:#0F172A}
.pl-foot input:focus,.pl-foot textarea:focus{outline:none;box-shadow:inset 0 0 0 1px #CFE9DC}

/* ── r152：评论照小红书（头像+昵称+正文+小号文字操作，不做卡片不做大胶囊）── */
.pd-cmt{padding:12px 0;border-top:0;border-bottom:1px solid #F1F3F5;gap:10px;cursor:default}
.pd-cmt:last-of-type{border-bottom:0}
.pd-cmt .cm-avatar.sm{width:34px;height:34px;flex:0 0 34px;font-size:13px}
.pd-cmt-profile{flex:0 0 34px;width:34px;height:34px;padding:0;border:0;background:none;cursor:pointer}
.pd-cmt-name{display:block;padding:0;border:0;background:none;font:inherit;font-size:13px;font-weight:600;color:#334155;text-align:left;cursor:pointer}
.pd-cmt-name:hover,.pd-reply-target:hover{color:#0A7A56;text-decoration:underline}
.pd-cmt-content{margin-top:2px;line-height:1.62;overflow-wrap:anywhere}
.pd-cmt-text{font-size:15px;line-height:1.62;white-space:pre-wrap;overflow-wrap:anywhere}
.pd-cmt-meta{margin-top:6px;font-size:12px;color:#94A3B8;display:flex;align-items:center;gap:14px}
.pd-cmt-time{margin-right:auto}
.pd-cmt-act{background:none;border:0;padding:0;font:inherit;font-size:12.5px;color:#64748B;cursor:pointer}
.pd-cmt-act:hover{color:#0A7A56}
.pd-cmt-act.pd-cmt-del{color:#B3261E}
.pd-cmt-replies{margin:6px 0 0 36px;padding-left:12px;border-left:2px solid #E2E8F0}
.pd-cmt-replies .pd-cmt{padding:8px 0;border-bottom:0}
.pd-cmt-replies .cm-avatar.sm{width:28px;height:28px;flex-basis:28px;font-size:11px}
.pd-cmt-replies .pd-cmt-profile{flex-basis:28px;width:28px;height:28px}
.pd-reply-prefix{color:#64748B;font-size:13px}
.pd-reply-target{padding:0;border:0;background:none;font:inherit;color:#64748B;cursor:pointer}
.pl-title-profile{display:inline-flex;align-items:center;gap:8px;max-width:100%;padding:0;border:0;background:none;color:inherit;font:inherit;font-size:inherit;font-weight:inherit;cursor:pointer}
.pl-title-profile .cm-avatar{width:28px;height:28px;flex-basis:28px}
.pl-title-profile>span:last-child{overflow:hidden;text-overflow:ellipsis}
.pd-reply{display:none}

/* 详情页内联编辑 */
.pd-editor{margin-top:12px}
.pd-editor textarea{width:100%;min-height:120px;border:1px solid #DDE5E0;border-radius:12px;padding:10px 12px;font:inherit;font-size:16px;line-height:1.7;resize:vertical;background:#fff;color:#0F172A;outline:none}
.pd-editor textarea:focus{box-shadow:inset 0 0 0 1px #CFE9DC}
.pd-editor-acts{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}


/* ── r153：按钮语言与遮挡收口 ───────────────────────────────── */
/* 动作按钮统一胶囊：弹窗里原来单独一套 12px 方角，和页面上的胶囊对不上 */
.tool-dialog button,.account-tools button,#public-view button{border-radius:999px}
.td-btn,.td-btn-quiet,.td-mini,.me-copy,.btn-outline,.btn-secondary,
.btn-log-meal,.btn-cheer-chip,.btn-copy-url,.btn-direct-download,.btn-exd-ctl{border-radius:999px}
.td-close{border-radius:50%}
/* 分段控件：同一套控件在弹窗里 12px、页面上 9px，收成 10px（选中态靠底色，不靠圆角） */
.td-seg button{border-radius:10px}
/* 文件选择：不把浏览器原生控件露给用户 */
.file-hidden{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.td-file-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px}
.td-file-line .td-btn{flex:0 0 auto;min-width:0;min-height:32px;padding:5px 12px;font-size:12.5px;line-height:1.25;border-radius:999px}
.td-file-name{font-size:13px;color:#64748B;overflow-wrap:anywhere}
/* 徽标语义色：已开启是好事，不该用危险红 */
.td-badge[data-tone="on"]{background:#ECFDF5;color:#047857}
.td-badge[data-tone="off"]{background:#F1F5F9;color:#64748B}
/* 悬浮下载胶囊不再压页面内容：整页打开时、在「我的」页时都藏起来 */
body.qs-page-open #floating-dl-btn{display:none}
body[data-tab="me"] #floating-dl-btn{display:none}
#panel-me{padding-bottom:20px}
/* 评论昵称统一深灰（原来会被上层链接色染绿） */
.pd-cmt-name{color:#334155}

/* r153：悬浮下载在手机上会压住卡片（监控页的周期数字、我的页的意见类型）。
   顶栏已经有「下载App」，窄屏直接不要这个浮层；桌面保留。 */
@media (max-width:760px){ #floating-dl-btn{display:none !important} }
.tool-dialog .td-close{border-radius:50%}
@media (max-width:480px){ .brand-tag{display:none} }

/* r153：宽屏（未切电脑版）时内容不再横向拉满，居中限宽更耐看 */
@media (min-width:900px){
  body:not(.desktop-view) main,
  body:not(.desktop-view) nav{max-width:960px;margin-left:auto;margin-right:auto}
  body:not(.desktop-view) .me-stats,body:not(.desktop-view) .td-seg{max-width:780px}
}

/* r154：收藏与举报 */
.cm-act[aria-pressed="true"],.td-mini[aria-pressed="true"]{color:#B45309}
.pd-report{color:#B3261E;border-color:#FCA5A5;background:#FEF2F2}
.pd-report:hover{background:#B3261E;color:#fff}
#report-reasons .td-seg-btn[aria-selected="true"]{background:#fff;color:#065F46;font-weight:700}
/* 320px 下四个原因挤在一行会把"垃圾广告"折成两行，改成两列并禁止词内换行 */
@media (max-width:380px){
  #report-reasons{grid-auto-flow:row;grid-template-columns:1fr 1fr}
  #report-reasons .td-seg-btn{white-space:nowrap}
}

/* r155：个人资料与全站弹层收尾。短操作也有可点高度，窄屏/键盘弹出时弹层可滚动到底。 */
.me-line{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px}
.me-copy{min-height:38px;padding:6px 12px;font-size:13px;line-height:1.2}
.modal-overlay{box-sizing:border-box;width:100vw;max-width:100vw;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}
.modal-card{box-sizing:border-box;width:100%;min-width:0;max-width:min(420px,calc(100vw - 24px));max-height:90vh;max-height:min(90dvh,840px);overscroll-behavior:contain}
body.desktop-view .modal-card{max-width:min(480px,calc(100vw - 24px))}
body.desktop-view #profile-modal .modal-card{max-width:min(520px,calc(100vw - 24px))}
body.desktop-view .download-modal-card{max-width:min(460px,calc(100vw - 24px))}
body.desktop-view .ex-detail{max-width:min(500px,calc(100vw - 24px))}
.modal-body{overflow-wrap:anywhere}
.modal-close-btn{min-height:40px}
.td-btn,.td-btn-quiet,.td-btn-danger,.td-mini,.me-copy,.btn-primary,.btn-secondary,
.btn-outline,.btn-log-meal,.btn-upload-photo,.btn-web-action{touch-action:manipulation}
.tool-dialog .td-close{width:40px;height:40px;min-width:40px;min-height:40px}

/* ============================================================
   r160：评论区的表情 / @ / 配图 / 动图，帖子标题，@ 定位
   ============================================================ */
/* 宽屏三列必须写在 r149 那条 @media(min-width:760px) 的两列规则之后：
   两条选择器权重相同，谁在后面谁说话——放在上面会被静默盖掉（浏览器实测抓出来的）。 */
@media (min-width:900px){.cm-feed{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}}
/* 评论输入区是竖排（待发条 + 工具行 + 面板 + 输入行），跟私信一个形状 */
.pl-foot.cmt-foot{flex-direction:column;align-items:stretch;padding:8px 10px 10px;gap:8px}
.cmt-tools{display:flex;align-items:center;gap:8px}
.cmt-tools .dm-tool{font-size:17px;font-weight:700}
.cmt-input-row{display:flex;align-items:center;gap:8px}
.cmt-input-row input{flex:1 1 auto;min-width:0;min-height:40px;padding:8px 12px;border:2px solid #E2E8F0;
  border-radius:999px;background:#F8FAFC;font:inherit;font-size:15px;color:#0F172A}
.cmt-input-row input:focus{outline:none;border-color:#A7F3D0;background:#fff}
.cmt-input-row .td-btn{flex:0 0 auto;min-width:64px;min-height:38px;padding:7px 15px;font-size:13.5px}
.cmt-draft{display:flex;flex-wrap:wrap;gap:7px}
.cmt-draft[hidden]{display:none}
.cmt-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 6px 4px 10px;border:1px solid #A7F3D0;
  border-radius:999px;background:#ECFDF5;color:#047857;font-size:12.5px;font-weight:700}
.cmt-chip button{width:18px;height:18px;padding:0;border:0;border-radius:50%;background:rgba(4,120,87,.14);
  color:#047857;font-size:11px;line-height:17px;cursor:pointer}
.cmt-draft .cmt-thumb img[data-gif="1"]{outline:2px solid #A7F3D0;outline-offset:-2px}
.cmt-at-list{display:flex;flex-direction:column;gap:2px}
.cmt-at-row{display:flex;align-items:center;gap:9px;width:100%;min-height:46px;padding:6px 4px;border:0;
  border-bottom:1px solid #F1F5F9;background:none;font:inherit;text-align:left;cursor:pointer;color:inherit}
.cmt-at-row:last-child{border-bottom:0}
.cmt-at-row:hover{background:#F8FAFC}
.cmt-at-row .cm-avatar{flex:0 0 30px;width:30px;height:30px;font-size:12px}
.cmt-at-name{flex:1 1 auto;min-width:0;font-size:14px;font-weight:700;color:#0F172A;overflow:hidden;
  white-space:nowrap;text-overflow:ellipsis}
.cmt-at-sub{flex:0 0 auto;font-size:11.5px;color:#94A3B8}
.cmt-gif-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.cmt-gif{padding:0;border:1px solid #E2E8F0;border-radius:11px;background:#F8FAFC;overflow:hidden;cursor:pointer;line-height:0}
.cmt-gif img{display:block;width:100%;aspect-ratio:1;object-fit:cover}
.cmt-gif:active{border-color:#A7F3D0}

/* 帖子标题：详情页大一号（编辑框的样式在发帖器那一节里一起给了） */
.pd-title{margin:12px 0 0;font-size:19px;font-weight:800;line-height:1.4;color:#0F172A;overflow-wrap:anywhere}

/* 评论里的 @ 与配图 */
.pd-at{display:inline;border:0;background:none;padding:0;font:inherit;font-weight:700;color:#047857;cursor:pointer}
.pd-at:hover{text-decoration:underline}
.pd-cmt-imgs{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}
.pd-cmt-imgs img{width:96px;height:96px;object-fit:cover;border-radius:10px;border:1px solid #E2E8F0;
  background:#F1F5F9;display:block;cursor:zoom-in}
.pd-cmt-like[aria-pressed="true"]{color:#DC2626;font-weight:700}
/* 从通知点进来要能看出"就是这条"：亮两秒再退回常态。
   用 inset 阴影描边而不是加 padding/边框——那两种都会让这一行在亮起的瞬间抖一下。 */
.pd-cmt-flash{background:#FFFBEB;border-radius:10px;box-shadow:inset 0 0 0 2px #FDE68A}
.cmt-pop{animation:cmtPop .34s ease-out}
@keyframes cmtPop{0%{transform:scale(.985)}45%{transform:scale(1.012)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.cmt-pop,.cm-hearted::after{animation:none}}
/* Period summaries and opt-in shared goals. */
.period-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.period-stats div{padding:12px;background:#f1f8f3;border-radius:12px}.period-stats dt{font-size:12px;color:#526359}.period-stats dd{margin:6px 0 0;font-weight:700;font-size:18px}.period-table{max-height:40vh;overflow:auto}.period-table table{width:100%;border-collapse:collapse;font-size:13px}.period-table th,.period-table td{text-align:left;padding:9px 5px;border-bottom:1px solid #e2ebe4}.goal-card{padding:16px;border:1px solid #d7e3da;border-radius:14px;margin-top:12px}.goal-card p{font-size:13px}.goal-card strong{float:right}.td-field input,.td-field select{max-width:100%;box-sizing:border-box}

/* 训练计划：目标身材 × 训练场景，两个维度共同决定动作与时长 */
.workout-context-card{padding:14px}
.workout-context-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.workout-context-kicker{font-size:10.5px;font-weight:800;letter-spacing:.08em;color:#7C3AED;text-transform:uppercase}
.workout-context-title{margin-top:3px;font-size:16px;font-weight:800;color:#0F172A;line-height:1.35;overflow-wrap:anywhere}
.plan-x{color:#A78BFA;font-weight:700;padding:0 2px}
.mini-link{border:0;background:transparent;color:#047857;font:inherit;font-size:12px;font-weight:700;padding:4px 0;white-space:nowrap;cursor:pointer}
.scene-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:11px}
.scene-btn{display:flex;align-items:center;gap:8px;min-height:48px;padding:8px 10px;border:1.5px solid #E2E8F0;border-radius:12px;background:#fff;color:#0F172A;text-align:left;font:inherit;cursor:pointer}
.scene-btn.active{border-color:#10B981;background:#F0FDF4;box-shadow:0 0 0 2px rgba(16,185,129,.12)}
.scene-ico{font-size:19px;line-height:1;flex:0 0 auto}
.scene-name{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.scene-name b{font-size:12.5px;font-weight:800;color:#0F172A}
.scene-name small{font-size:10.5px;color:#64748B;margin-top:2px}
.workout-context-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.plan-meta-pill{display:inline-flex;align-items:center;gap:3px;font-size:10.5px;line-height:1.35;padding:3px 8px;border-radius:99px;background:#F8FAFC;border:1px solid #E2E8F0;color:#475569;max-width:100%;overflow-wrap:anywhere}
.plan-combo-preview{margin-top:9px;padding:10px 11px;border:1px dashed #C7D2FE;border-radius:12px;background:#F5F3FF}
.plan-combo-title{font-size:12.5px;font-weight:800;color:#4C1D95;line-height:1.35;margin-bottom:4px;overflow-wrap:anywhere}
.plan-combo-title span{color:#8B5CF6;padding:0 2px}
.plan-combo-line{font-size:11px;line-height:1.55;color:#475569;overflow-wrap:anywhere}
.form-group > .field-hint{margin:4px 0 8px}
#panel-workout .timer-controls{flex-wrap:wrap;row-gap:8px}
#panel-workout .timer-btn{padding:8px 14px}
#btn-complete-workout{line-height:1.45;padding:12px 10px;height:auto}
@media (min-width:640px){.scene-switch{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* ============================================================
   r179 B10：对话框底栏、窄屏与 200% 字号下的弹窗行为
   ============================================================ */
/* 底栏是 flex 列里的一项，默认 0 1 auto = 可以被压缩。长内容一挤，
   「提交举报」就先被压扁再被挤出 88dvh 的壳子。这里钉成不许压缩、可以换行。 */
.tool-dialog>footer,.tool-dialog>.td-foot{
  flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;gap:8px;
  padding:12px 18px calc(12px + env(safe-area-inset-bottom));
  border-top:1px solid #EEF2F6;background:#fff}
.tool-dialog>footer>.td-btn,.tool-dialog>footer>.td-btn-quiet,.tool-dialog>footer>.td-btn-danger{min-height:44px}
/* toolDialog 只有 header + body，按钮写在正文里时同样要滚得到：给最后一行留出自下限。 */
.tool-dialog .td-actions{flex-wrap:wrap}

/* 320px / 200% 字号：弹窗优先保可视高度与左右留白，正文继续在自己的层里滚。 */
@media(max-width:320px){
 .tool-dialog{width:calc(100vw - 12px);max-height:94dvh}
 .tool-dialog>header{padding:14px 14px 10px}
 .td-body{padding:14px 14px 16px}
 .tool-dialog>footer,.tool-dialog>.td-foot{padding:10px 14px calc(10px + env(safe-area-inset-bottom))}
 /* 整页层在窄屏下靠 .pl-body 滚（它已经是 min-height:0 + overflow-y:auto），
    底栏同样不许被压：私信输入行在 320 档曾被键盘顶掉半个按钮。 */
 .pl-foot{flex:0 0 auto}
 .pl-foot .td-btn{min-width:64px}
}

/* 减少动态效果：features.css 的通配符那条管全站，这里点名弹层，
   免得将来谁给对话框写了带 !important 的动画就悄悄绕过。 */
@media(prefers-reduced-motion:reduce){
 .tool-dialog,.tool-dialog>header,.td-body,.td-foot,.page-layer,.pl-head,.pl-foot,
 .bubble-menu,.dm-hold-layer,.dm-call-layer,.dm-call-mini,.pub-cheer-toast{
  animation:none!important;transition:none!important}
 .td-switch,.td-switch::after{transition:none!important}
}
/* 份量快捷选择（B03）：点一下只改上面那格数字，手改这条路永远保留。
   按钮一排自动换行、各自最小 44px 高，320 窄屏与 200% 字号都能按到。 */
.td-portion-row{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 4px;padding:0 14px}
.td-portion{flex:1 1 84px;min-height:44px;padding:8px 10px;font-size:13.5px;line-height:1.25;
 font-family:inherit;border:1.5px solid #CBD5E1;border-radius:999px;background:#fff;color:#334155;cursor:pointer}
.td-portion.is-on{background:#ECFDF5;border-color:#059669;color:#047857;font-weight:700}
.td-portion:active{transform:translateY(1px)}
.td-meal-origin{margin:0 0 12px;padding:0 14px;font-size:12.5px;line-height:1.6;color:#475569;
 background:#F8FAFC;border-left:3px solid #94A3B8;border-radius:0 8px 8px 0;overflow-wrap:anywhere}
#meal-portion-note{padding-left:14px;padding-right:14px}
@media(prefers-reduced-motion:reduce){.td-portion,.td-portion:active{transform:none!important;animation:none!important;transition:none!important}}
/* 权限中心（B09）：读不到/被拒这类"不确定"要有自己的颜色，
   不能跟"已关闭"共用一套灰色，否则界面看起来像是真的读到了 off。 */
.td-badge[data-tone="warn"]{background:#FFFBEB;color:#92400E}
.td-mini{min-height:40px}
