/* =====================================================================
   馨月纪 · 母婴健康跟踪平台 —— 设计系统 base.css
   三端共用：官网落地页 / 用户端（移动优先）/ 院方端与平台端（工作台）
   基调：现代 + 温馨（暖纸底 / 珊瑚陶主色 / 鼠尾草绿辅助 / 大圆角柔和阴影）
   ===================================================================== */
:root {
  --bg: #F6F6F7;
  --surface: #FFFFFF;
  --surface2: #F5F6F7;
  --line: #E6E7E8;
  --line2: #E2E4E7;
  --ink: #242529;
  --ink2: #66676D;
  --ink3: #ACADB3;
  --brand: #E85A78;
  --brand-deep: #C43D62;
  --brand-soft: #FDECF2;
  --sage: #2FA98C;
  --sage-deep: #1E8A72;
  --sage-soft: #E3F6F0;
  --gold: #D98A1F;
  --gold-soft: #FDF3E0;
  --rose: #D6628E;
  --rose-soft: #FBE9F1;
  --blue: #6B7080;
  --blue-soft: #EFF0F2;
  --danger: #E5484D;
  --danger-deep: #C43A40;
  --danger-soft: #FDECED;
  --ok: #18A05E;
  --ok-soft: #E3F6F0;
  --r2: 14px; --r: 10px; --r1: 8px;
  --shadow-s: none;
  --shadow-m: 0 16px 40px rgba(16, 18, 26, .12);
  --serif: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--bg);
  font-size: 13px; line-height: 1.6; min-height: 100vh;
}
.serif { font-family: var(--serif); }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: var(--ink); }
a { color: var(--brand-deep); text-decoration: none; }
::selection { background: var(--brand-soft); }
h1, h2, h3 { font-weight: 700; line-height: 1.35; }
h1 { font-size: 24px; } h2 { font-size: 17px; } h3 { font-size: 15px; }

/* ======================= 通用组件 ======================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 13px; font-size: 13px; font-weight: 600; padding: 11px 18px;
  transition: transform .12s, box-shadow .15s, background .15s; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-pri { background: var(--ink); color: #FFFFFF; border: 0.5px solid var(--ink); }
.btn-pri:hover { background: #36373A; border-color: #36373A; }
.btn-ghost { background: var(--surface); border: 0.5px solid var(--line2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); }
.btn-soft { background: var(--brand-soft); color: var(--brand-deep); }
.btn-soft:hover { background: #FDECF2; }
.btn-sage { background: var(--sage); color: #FFFFFF; }
.btn-danger { background: var(--danger-soft); color: var(--danger-deep); }
.btn-sm { padding: 7.5px 13px; font-size: 12px; border-radius: 11px; }
.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 0.5px solid var(--line); color: var(--ink2); position: relative; flex: none;
}
.icon-btn:hover { color: var(--brand-deep); border-color: var(--line2); }
.badge-dot {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 99px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg);
}

.card { background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-s); }
.card-pad { padding: 18px 18px 16px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
  padding: 3.5px 10px; border-radius: 999px; white-space: nowrap;
}
.tag-brand { background: var(--brand-soft); color: var(--brand-deep); }
.tag-sage { background: var(--sage-soft); color: var(--sage-deep); }
.tag-gold { background: var(--gold-soft); color: var(--gold); }
.tag-rose { background: var(--rose-soft); color: var(--rose); }
.tag-blue { background: var(--blue-soft); color: var(--blue); }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-danger { background: var(--danger-soft); color: var(--danger-deep); }
.tag-gray { background: var(--surface2); color: var(--ink2); }

.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { height: 0; }
.chip {
  flex: none; font-size: 13px; padding: 8px 15px; border-radius: 999px;
  background: var(--surface); border: 0.5px solid var(--line); color: var(--ink2);
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #FFFFFF; font-weight: 600; }
.chip.ghost.on { background: var(--ink); border-color: var(--ink); }

.field { margin-bottom: 15px; }
.flabel { display: flex; align-items: baseline; gap: 5px; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.flabel .req { color: var(--danger); }
.flabel .unit { font-size: 12px; color: var(--ink3); font-weight: 400; }
.fwrap { position: relative; }
.input, .select, .textarea {
  width: 100%; font-size: 13px; padding: 12px 14px; border-radius: 13px;
  border: 0.5px solid var(--line2); background: var(--surface2); outline: none; appearance: none;
  transition: border-color .15s, background .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); background: #fff; }
.input::placeholder, .textarea::placeholder { color: var(--ink2); opacity: 1; }
.input.has-unit { padding-right: 56px; }
.funit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ink3); }
.sel-arrow { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--ink3); font-size: 12px; pointer-events: none; }
.textarea { min-height: 80px; resize: vertical; }
.ferr { font-size: 12px; color: var(--danger-deep); margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.input.err, .select.err, .textarea.err { border-color: var(--danger); background: #FEF5F2; }
.fhint { font-size: 12px; color: var(--ink2); margin-top: 5px; line-height: 1.6; }

.ic { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3.5px; }
.ic-s { width: 15px; height: 15px; vertical-align: -2.5px; }
.ic-l { width: 22px; height: 22px; }

.empty { text-align: center; padding: 46px 24px 38px; }
.empty .em-ico {
  width: 76px; height: 76px; margin: 0 auto 15px; border-radius: 26px;
  background: var(--surface); border: 0.5px solid var(--line); display: flex; align-items: center; justify-content: center;
  color: var(--ink3); font-size: 30px;
}
.empty .em-ip { width: 130px; height: auto; margin: 0 auto 12px; display: block; filter: drop-shadow(0 10px 20px rgba(25,28,40,.10)); }
.empty .em-ico + .em-ip { margin-top: 8px; }
.empty h3 { font-size: 17px; font-family: var(--serif); margin-bottom: 7px; }
.empty p { font-size: 13px; color: var(--ink2); line-height: 1.85; margin-bottom: 16px; }

.disclaimer {
  margin-top: 18px; font-size: 12px; color: var(--ink3); line-height: 1.85;
  padding: 12px 14px; border-radius: var(--r1); background: var(--surface2); border: 1.5px dashed var(--line2);
}
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.muted { color: var(--ink2); } .tiny { font-size: 12px; color: var(--ink3); }
.num, .kv, .td-sub .num, .kpi-card .kv { font-variant-numeric: tabular-nums; }

/* Toast / 弹窗 */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 300;
  max-width: min(86vw, 480px); background: rgba(28, 30, 40, .93); color: #F5F6FA;
  font-size: 13px; line-height: 1.6; padding: 12px 19px; border-radius: 15px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .3); animation: toastIn .25s ease; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(22, 24, 34, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px; animation: maskIn .18s ease;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.dialog {
  width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto;
  background: var(--bg); border-radius: 22px; padding: 22px; animation: dlgIn .26s cubic-bezier(.2, .8, .25, 1);
}
.dialog.wide { max-width: 640px; }
@keyframes dlgIn { from { transform: translateY(26px) scale(.97); opacity: .4; } to { transform: none; opacity: 1; } }
.dlg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.dlg-head h3 { font-size: 17px; font-family: var(--serif); flex: 1; }
.dlg-x { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 0.5px solid var(--line); color: var(--ink2); font-size: 13px; }
.dlg-foot { display: flex; gap: 10px; margin-top: 18px; }
.dlg-foot .btn { flex: 1; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.anim { animation: fadeUp .34s ease both; }
@keyframes flashRing { 0% { box-shadow: 0 0 0 0 rgba(232, 90, 120, .5); } 100% { box-shadow: 0 0 0 18px rgba(232, 90, 120, 0); } }
.flash { animation: flashRing 1s ease 2; border-radius: var(--r); }
.pulse { animation: pulseDot 1.5s ease infinite; }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* ======================= 登录页（三端共用骨架） ======================= */
.auth {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 28px 18px;
  background:
    radial-gradient(900px 560px at 82% -8%, rgba(232, 90, 120, .13), transparent 62%),
    radial-gradient(760px 520px at 4% 104%, rgba(47, 169, 140, .08), transparent 60%),
    var(--bg);
}
.auth-card { width: 100%; max-width: 400px; }
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand-row { display: flex; align-items: center; justify-content: center; gap: 11px; }
.auth-logo {
  width: 44px; height: 44px; margin: 0; border-radius: 12px;
  background: var(--brand-deep); color: #FFF8F5;
  display: flex; align-items: center; justify-content: center; flex: none;
  box-shadow: 0 6px 16px rgba(196, 61, 98, .16);
}
.auth-logo .bm { width: 100%; height: 100%; display: block; }
.auth-brand h1 { font-size: 24px; font-family: var(--serif); letter-spacing: 1px; text-align: left; }
.auth-brand p { font-size: 12px; color: var(--ink2); margin-top: 8px; letter-spacing: .5px; }
.auth-panel { background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r2); padding: 24px 22px 20px; box-shadow: var(--shadow-m); }
.auth-err {
  display: none; font-size: 12px; color: var(--danger-deep); background: var(--danger-soft);
  border: 0.5px solid #F0D4D6; border-radius: 11px; padding: 9px 13px; margin-bottom: 13px; line-height: 1.6;
}
.auth-err.show { display: block; animation: shake .4s ease; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.demo-box { margin-top: 16px; border-top: 1.5px dashed var(--line2); padding-top: 13px; }
.demo-box .dt { font-size: 12px; font-weight: 700; color: var(--ink2); letter-spacing: 1.5px; margin-bottom: 9px; }
.demo-acc {
  width: 100%; display: flex; align-items: center; gap: 9px; text-align: left;
  background: var(--surface2); border: 0.5px solid var(--line); border-radius: 12px;
  padding: 9px 12px; margin-bottom: 7px; transition: border-color .15s;
}
.demo-acc:hover { border-color: var(--brand); }
.demo-acc .da-role { font-size: 12px; font-weight: 700; flex: none; }
.demo-acc .da-meta { font-size: 12px; color: var(--ink2); flex: 1; min-width: 0; }
.auth-foot { text-align: center; font-size: 12px; color: var(--ink2); margin-top: 17px; line-height: 1.8; }
.auth-foot a { color: var(--ink2); }

/* ======================= 用户端（家庭，移动优先） ======================= */
.f-shell {
  width: 100%; max-width: 470px; min-height: 100vh; margin: 0 auto; position: relative;
  background: var(--bg); box-shadow: 0 0 0 1px var(--line);
  display: flex; flex-direction: column;
}

/* F-series design frames are 390px wide; keep the mobile canvas centered at wider viewports. */
@media (min-width: 390px) and (max-width: 559px) {
  .f-shell, .f-nav { max-width: 390px; }
}

:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
.btn:focus-visible, .chip:focus-visible, .fn-item:focus-visible { outline-offset: 3px; }
@media (min-width: 560px) {
  body { background:
    radial-gradient(1000px 600px at 85% -5%, rgba(232, 90, 120, .12), transparent 60%),
    radial-gradient(800px 560px at 0% 105%, rgba(47, 169, 140, .07), transparent 58%),
    #F3F3F5; }
  .f-shell { box-shadow: 0 24px 70px rgba(25, 28, 40, .16); border-radius: 0; min-height: 100vh; }
}
.f-top {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 11px; background: rgba(247, 247, 251, .9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 0.5px solid var(--line);
}
.ft-title h1 { font-size: 17px; font-family: var(--serif); }
.ft-title p { font-size: 12px; color: var(--ink3); margin-top: 1px; }
.f-body { flex: 1; padding: 6px 16px 96px; }
.f-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 470px; z-index: 45;
  display: flex; padding: 7px 8px calc(12px + env(safe-area-inset-bottom));
  background: rgba(250, 250, 253, .93); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 0.5px solid var(--line);
}
@media (min-width: 560px) { .f-nav { border-radius: 0 0 0 0; } }
.fn-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink3); font-size: 12px; padding: 4px 0; min-height: 44px; justify-content: center; }
.fn-item.on { color: var(--brand-deep); font-weight: 600; }
.fn-ic { width: 46px; height: 28px; border-radius: 99px; display: flex; align-items: center; justify-content: center; }
.fn-item.on .fn-ic { background: transparent; border: 0.5px solid var(--brand-deep); }

.hero { position: relative; overflow: hidden; background: linear-gradient(150deg, #FFF, #FFF5F9); border: 0.5px solid var(--line); border-radius: var(--r2); padding: 18px 17px 15px; margin-top: 8px; box-shadow: var(--shadow-s); }
.hero::after { content: ''; position: absolute; right: -38px; top: -38px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, rgba(232, 90, 120, .15), transparent 68%); }
.hero-date { display: flex; align-items: baseline; gap: 9px; }
.hero-date h2 { font-size: 24px; font-family: var(--serif); }
.hero-date span { font-size: 12px; color: var(--ink2); }
.hero-stage { display: flex; flex-wrap: wrap; gap: 6px; margin: 11px 0 9px; }
.hero-pub { font-size: 12px; color: var(--ink3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tailor-strip { margin-top: 13px; border-radius: var(--r1); padding: 12px 13px; background: linear-gradient(140deg, #FDECF3, #FFFFFF); border: 0.5px solid #E5E6E8; }
.ts-head { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--brand-deep); font-family: var(--serif); }
.ts-body { margin-top: 6px; font-size: 12px; color: var(--ink2); line-height: 1.8; }
.ts-body b { color: var(--ink); }
.conflict-note { display: flex; gap: 10px; margin-top: 13px; padding: 12px 13px; background: var(--gold-soft); border: 0.5px solid #F1DFB4; border-radius: var(--r1); font-size: 12px; color: #8A6420; line-height: 1.75; }
.conflict-note .cn-ico { flex: none; font-size: 15px; }

.menu-sec { background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r); padding: 15px 16px 13px; margin-top: 12px; box-shadow: var(--shadow-s); }
.ms-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ms-ico { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 17px; background: var(--brand-soft); flex: none; }
.ms-head h3 { font-size: 15px; font-family: var(--serif); }
.ms-time { margin-left: auto; font-size: 12px; color: var(--ink3); background: var(--surface2); padding: 4px 10px; border-radius: 999px; }
.menu-item { display: flex; align-items: flex-start; gap: 9px; padding: 7px 0; font-size: 13px; line-height: 1.55; }
.menu-item .dot { flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); margin-top: 8.5px; }
.menu-item.hit { color: var(--danger-deep); font-weight: 600; }
.menu-item.hit .dot { background: var(--danger); }
.hit-tag { flex: none; font-size: 12px; background: var(--danger-soft); color: var(--danger-deep); border-radius: 999px; padding: 2.5px 8px; margin-top: 1.5px; font-weight: 700; }
.swap-card { margin-top: 9px; border: 1.5px dashed #EBC472; background: #FEFAF0; border-radius: var(--r1); padding: 12px 13px; }
.swap-card .sw-t { font-size: 12px; font-weight: 700; color: #94660F; display: flex; align-items: center; gap: 6px; }
.swap-card .sw-b { font-size: 12px; color: #8A6420; line-height: 1.8; margin-top: 5px; }
.swap-card .sw-b b { color: #6E4E0E; }
.care-row { display: flex; gap: 10px; align-items: flex-start; padding: 8.5px 0; font-size: 13px; border-bottom: 0.5px dashed var(--line); }
.care-row:last-child { border-bottom: none; padding-bottom: 2px; }
.care-row .ct { flex: none; font-size: 12px; font-weight: 700; color: var(--sage-deep); background: var(--sage-soft); border-radius: 8px; padding: 3.5px 8px; margin-top: 1px; }
.changelog { background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-top: 12px; }
.cl-row { display: flex; gap: 9px; font-size: 12px; line-height: 1.7; padding: 5.5px 0; }
.cl-row .cl-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-top: 7px; }
.cl-row .meta { color: var(--ink3); font-size: 12px; }

.baby-head { display: flex; align-items: center; gap: 14px; background: linear-gradient(150deg, #FFF, #FFFFFF); border: 0.5px solid var(--line); border-radius: var(--r2); padding: 16px; margin-top: 8px; box-shadow: var(--shadow-s); }
.baby-avatar {
  width: 58px; height: 58px; border-radius: 50%; flex: none;
  background: linear-gradient(145deg, #FBC0D3, #F28CAD); border: 2.5px solid #FFF;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  box-shadow: 0 6px 16px rgba(232, 90, 120, .24);
  position: relative; overflow: hidden;
}
.baby-avatar .baby-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; }
.bh-body h2 { font-size: 17px; font-family: var(--serif); }
.bh-body p { font-size: 12px; color: var(--ink2); margin-top: 3px; line-height: 1.65; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 12px; }
.stat { background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r1); padding: 11px 8px 10px; text-align: center; }
.stat .sv { font-size: 17px; font-weight: 700; }
.stat .sv small { font-size: 12px; font-weight: 600; color: var(--ink3); }
.stat .sl { font-size: 12px; color: var(--ink3); margin-top: 3px; }

.tl { padding-left: 6px; }
.tl-item { display: flex; gap: 12px; padding-bottom: 15px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; flex: none; width: 38px; }
.tl-ico { width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; border: 2px solid #FFF; box-shadow: 0 2px 8px rgba(120, 92, 55, .15); }
.tl-rail::after { content: ''; flex: 1; width: 2px; background: var(--line); margin-top: 4px; border-radius: 2px; }
.tl-item:last-child .tl-rail::after { display: none; }
.tl-body { flex: 1; min-width: 0; background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r1); padding: 12px 13px 11px; box-shadow: var(--shadow-s); }
.tl-top { display: flex; align-items: center; gap: 7px; }
.tl-top h4 { font-size: 13px; flex: 1; min-width: 0; }
.tl-time { font-size: 12px; color: var(--ink3); flex: none; }
.tl-val { font-size: 13px; color: var(--ink2); line-height: 1.7; margin-top: 4px; }
.tl-val b { color: var(--ink); font-weight: 700; }
.tl-extra { font-size: 12px; color: var(--ink3); margin-top: 3px; }
.tl-by { font-size: 12px; color: var(--ink3); margin-top: 7px; display: flex; align-items: center; gap: 4px; }
.tl-group { font-size: 12px; font-weight: 700; color: var(--ink3); letter-spacing: 2px; margin: 4px 0 11px; }
.alert-card { background: var(--danger-soft); border: 0.5px solid #F5CDD2; border-radius: var(--r1); padding: 12px 13px; margin-top: 9px; }
.alert-card .ac-t { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; font-weight: 700; color: var(--danger-deep); }
.alert-card .ac-b { font-size: 12px; color: #A03A40; line-height: 1.75; margin-top: 5px; }
.review-box { margin-top: 8px; background: var(--ok-soft); border: 0.5px solid #C5E7D6; border-radius: 10px; padding: 9px 11px; font-size: 12px; color: #1F8A57; line-height: 1.7; }
.review-box.pending { background: #FDF4EB; border-color: #EFD9A8; color: var(--gold); }
.ic-feed { background: var(--brand-soft); } .ic-sleep { background: #EBECEF; }
.ic-diaper { background: var(--sage-soft); } .ic-weight { background: var(--gold-soft); }
.ic-jaun { background: #FBF3D9; } .ic-temp { background: var(--danger-soft); }
.ic-mom { background: var(--rose-soft); } .ic-default { background: var(--surface2); }

.video-featured { position: relative; border-radius: var(--r2); overflow: hidden; border: 0.5px solid var(--line); cursor: pointer; box-shadow: var(--shadow-m); }
.v-dur { position: absolute; right: 10px; bottom: 10px; font-size: 12px; font-weight: 700; color: #FFF; background: rgba(20, 20, 30, .62); border-radius: 7px; padding: 3px 8px; letter-spacing: .5px; }
.vf-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 15px 12px; background: linear-gradient(transparent, rgba(24, 22, 34, .78)); color: #FFF; }
.vf-info h3 { font-size: 15px; font-family: var(--serif); }
.vf-info p { font-size: 12px; opacity: .85; margin-top: 3px; }
.v-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.v-card { background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r1); overflow: hidden; cursor: pointer; box-shadow: var(--shadow-s); }
.v-card h4 { font-size: 12px; line-height: 1.5; padding: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 37px; }
.vc-b { padding: 10px 11px 11px; }
.vc-m { font-size: 12px; color: var(--ink3); margin-top: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.play-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 248, 238, .93);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
.play-badge::after { content: ''; width: 14px; height: 16px; margin-left: 3px; background: var(--brand); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.v-card .play-badge { width: 34px; height: 34px; }
.v-card .play-badge::after { width: 11px; height: 13px; }
.player-poster { position: relative; border-radius: var(--r1); overflow: hidden; }
.player-poster svg { display: block; width: 100%; height: auto; }
.player-poster .big-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 62px; height: 62px; border-radius: 50%; background: rgba(255, 248, 238, .95);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.player-poster .big-play::after { content: ''; width: 20px; height: 23px; margin-left: 4px; background: var(--brand); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.player-poster.playing .big-play::after { display: none; }
.player-poster.playing .big-play i { display: flex; gap: 5px; }
.player-poster .big-play i { display: none; }
.player-poster .big-play i b { width: 6px; height: 23px; border-radius: 2px; background: var(--brand); }
.p-controls { display: flex; align-items: center; gap: 12px; margin-top: 13px; }
.pp-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #FFFFFF; font-size: 15px; display: flex; align-items: center; justify-content: center; flex: none; }
.p-track { flex: 1; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.p-bar { height: 100%; width: 0%; border-radius: 99px; background: var(--brand); transition: width .25s linear; }
.p-time { font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; flex: none; }

.msg-row { display: flex; gap: 12px; background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r1); padding: 14px; margin-bottom: 10px; cursor: pointer; position: relative; box-shadow: var(--shadow-s); }
.msg-row.unread { background: #FFFAFC; border-color: #F5D9E4; }
.n-ico { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex: none; }
.ni-pub { background: var(--sage-soft); } .ni-chg { background: var(--gold-soft); }
.ni-alert { background: var(--danger-soft); } .ni-bull { background: var(--brand-soft); }
.unread-dot { position: absolute; top: 14px; right: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

.me-profile { display: flex; align-items: center; gap: 14px; background: linear-gradient(150deg, #FFF, #FDF1F6); border: 0.5px solid var(--line); border-radius: var(--r2); padding: 17px 16px; box-shadow: var(--shadow-s); }
.me-avatar { width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(145deg, #F7A8C4, #E36F9C); display: flex; align-items: center; justify-content: center; font-size: 24px; flex: none; color: #FFF; font-family: var(--serif); font-weight: 700; }
.me-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r1); padding: 14px; margin-bottom: 10px; cursor: pointer; box-shadow: var(--shadow-s); }
.me-row:active { transform: scale(.985); }
.mr-ico { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex: none; }
.me-row h4 { font-size: 13px; flex: 1; }
.me-row p { font-size: 12px; color: var(--ink3); margin-top: 2px; }

/* ======================= 工作台骨架（院方端 / 平台端共用） ======================= */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  background: linear-gradient(180deg, #FFFFFF, #F6F6FA); border-right: 0.5px solid var(--line);
  padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; }
.sb-logo { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-deep); color: #FFF8F5; display: flex; align-items: center; justify-content: center; flex: none; }
.sb-logo .bm { width: 100%; height: 100%; display: block; }
.side-brand h1 { font-size: 15px; font-family: var(--serif); letter-spacing: .5px; }
.side-brand p { font-size: 12px; color: var(--ink3); margin-top: 1px; }
.sn-sec { font-size: 12px; font-weight: 700; color: var(--ink3); letter-spacing: 2px; padding: 12px 10px 6px; }
.sn-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  font-size: 13px; font-weight: 500; color: var(--ink2); padding: 10.5px 12px; border-radius: 12px;
  transition: background .15s, color .15s;
}
.sn-item:hover { background: rgba(232, 90, 120, .07); color: var(--ink); }
.sn-item.on { background: var(--brand-soft); color: var(--brand-deep); font-weight: 700; }
.sn-item .badge-dot { position: static; border: none; margin-left: auto; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 0.5px solid var(--line); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; }
.su-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); font-family: var(--serif); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 13px; flex: none; }
.su-body { flex: 1; min-width: 0; }
.su-body h4 { font-size: 12px; }
.su-body p { font-size: 12px; color: var(--ink3); }
.sn-logout { width: 100%; justify-content: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: var(--ink2); display: flex; gap: 11px; align-items: center; }
.sn-logout:hover { background: var(--danger-soft); color: var(--danger-deep); }

.main { min-width: 0; display: flex; flex-direction: column; }
.main-top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 15px 26px; background: rgba(247, 247, 251, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 0.5px solid var(--line);
}
.mt-title h1 { font-size: 17px; font-family: var(--serif); }
.mt-title p { font-size: 12px; color: var(--ink3); margin-top: 1px; }
.mt-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.content { padding: 22px 26px 60px; max-width: 1180px; width: 100%; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; height: auto; z-index: 50; flex-direction: column; padding: 10px 12px; border-right: none; border-bottom: 0.5px solid var(--line); }
  .side-brand { padding: 2px 6px 8px; }
  .side-nav { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 2px; }
  .side-nav::-webkit-scrollbar { height: 0; }
  .sn-sec { display: none; }
  .sn-item { flex: none; padding: 8px 13px; }
  .side-foot { display: none; }
  .main-top { padding: 12px 16px; }
  .content { padding: 16px 16px 50px; }
}

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi-card { background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r); padding: 17px 17px 14px; box-shadow: var(--shadow-s); position: relative; overflow: hidden; }
.kpi-card::after { content: ''; position: absolute; right: -22px; top: -22px; width: 76px; height: 76px; border-radius: 50%; background: var(--brand-soft); opacity: .55; }
.kpi-card .kv { font-size: 24px; font-weight: 800; font-family: var(--serif); color: var(--brand-deep); position: relative; }
.kpi-card .kl { font-size: 12px; color: var(--ink2); margin-top: 2px; position: relative; }
.kpi-card .kt { font-size: 12px; color: var(--ink3); margin-top: 6px; position: relative; }
.kpi-card.warn .kv { color: var(--danger-deep); }
.kpi-card.warn::after { background: var(--danger-soft); }
.kpi-card.calm .kv { color: var(--sage-deep); }
.kpi-card.calm::after { background: var(--sage-soft); }
.kpi-card.cool .kv { color: var(--blue); }
.kpi-card.cool::after { background: var(--blue-soft); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.grid-32 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-top: 16px; }
@media (max-width: 900px) { .grid-2, .grid-32 { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-s); }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 15px 17px 13px; border-bottom: 0.5px solid var(--line); }
.panel-h h3 { font-size: 13px; flex: 1; }
.panel-b { padding: 15px 17px; }
.panel-b.flush { padding: 6px 0; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--ink3); letter-spacing: .8px; padding: 10px 14px; border-bottom: 0.5px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 0.5px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #FAFBFD; }
.td-main { font-weight: 600; }
.td-sub { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.row-actions { display: flex; gap: 7px; justify-content: flex-end; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }

.list-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 0.5px dashed var(--line); cursor: pointer; }
.list-row:last-child { border-bottom: none; padding-bottom: 2px; }
.lr-time { flex: none; width: 54px; font-size: 12px; font-weight: 700; color: var(--danger-deep); padding-top: 2px; }
.lr-body { flex: 1; min-width: 0; }
.lr-body h4 { font-size: 12px; }
.lr-body p { font-size: 12px; color: var(--ink2); line-height: 1.7; margin-top: 3px; }
.lr-meta { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.todo-chip { font-size: 12px; background: var(--surface2); border: 0.5px solid var(--line); border-radius: 999px; padding: 7px 13px; cursor: pointer; }
.todo-chip.miss { background: var(--danger-soft); border-color: #F5CDD2; color: var(--danger-deep); font-weight: 600; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
@media (max-width: 720px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } }
.quick-tile { background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r); padding: 15px 8px 13px; text-align: center; cursor: pointer; box-shadow: var(--shadow-s); }
.quick-tile:hover { border-color: var(--brand); }
.qt-ico { width: 42px; height: 42px; margin: 0 auto 8px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.quick-tile p { font-size: 12px; color: var(--ink2); font-weight: 600; }

.drawer-mask { position: fixed; inset: 0; z-index: 180; background: rgba(22, 24, 34, .4); animation: maskIn .18s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 190; width: min(470px, 96vw);
  background: var(--bg); box-shadow: -18px 0 60px rgba(30, 32, 46, .22);
  animation: drawerIn .28s cubic-bezier(.2, .8, .25, 1); overflow-y: auto; padding: 22px 22px 40px;
}
@keyframes drawerIn { from { transform: translateX(60px); opacity: .4; } to { transform: none; opacity: 1; } }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-cell { background: var(--surface2); border: 0.5px solid var(--line); border-radius: var(--r1); padding: 10px 12px; }
.info-cell .il { font-size: 12px; color: var(--ink3); }
.info-cell .iv { font-size: 13px; font-weight: 600; margin-top: 3px; line-height: 1.5; }
.trace-row { display: flex; gap: 10px; font-size: 12px; line-height: 1.7; padding: 8px 0; border-bottom: 0.5px dashed var(--line); }
.trace-row:last-child { border-bottom: none; }
.trace-row .tr-f { flex: none; font-weight: 700; }
.trace-row .from { color: var(--ink3); text-decoration: line-through; }

.chart-wrap { padding: 8px 4px 2px; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.hbar-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 12px; }
.hbar-row .hb-name { flex: none; width: 96px; color: var(--ink2); text-align: right; }
.hbar-row .hb-track { flex: 1; height: 12px; border-radius: 99px; background: var(--surface2); overflow: hidden; }
.hbar-row .hb-bar { height: 100%; border-radius: 99px; background: var(--brand); }
.hbar-row .hb-val { flex: none; width: 40px; font-weight: 700; font-size: 12px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; vertical-align: 0; }

.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.status-dot.off i { background: var(--ink3); }
.status-dot.warn i { background: var(--gold); }

.onboard { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(140deg, #FFFFFF, #FDECF3); border: 0.5px solid #E5E6E8; border-radius: var(--r); padding: 18px; margin-bottom: 16px; }
.onboard .ob-ico { width: 46px; height: 46px; border-radius: 15px; background: #FFF; display: flex; align-items: center; justify-content: center; font-size: 24px; flex: none; box-shadow: var(--shadow-s); }
.onboard h3 { font-size: 15px; font-family: var(--serif); }
.onboard p { font-size: 12px; color: var(--gold); line-height: 1.8; margin-top: 4px; }

.invite-code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 17px; font-weight: 700;
  letter-spacing: 3px; background: var(--surface); border: 1.5px dashed var(--brand); color: var(--brand-deep);
  border-radius: var(--r1); padding: 12px 16px; text-align: center;
}
.form-line { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink2); padding: 7px 0; cursor: pointer; }
.form-line input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); }
.pub-row { display: flex; align-items: center; gap: 9px; padding: 4.5px 0; }
.pub-row .dot { flex: none; width: 4.5px; height: 4.5px; border-radius: 50%; background: var(--ink3); }
.pub-row input {
  flex: 1; min-width: 0; font-size: 13px; padding: 8.5px 12px; border-radius: 10px;
  border: 0.5px solid transparent; background: var(--surface2); outline: none; transition: border-color .15s, background .15s;
}
.pub-row input:focus { border-color: var(--brand); background: #fff; }
.pub-row input.swapped { color: var(--sage-deep); font-weight: 600; background: var(--sage-soft); }
.cp-row { padding: 10px 0; border-bottom: 0.5px dashed #EFDFB6; }
.cp-row:last-child { border-bottom: none; padding-bottom: 2px; }
.cp-top { display: flex; align-items: center; gap: 8px; }
.cp-top h5 { font-size: 12px; flex: 1; color: #6E4E0E; }
.cp-reason { font-size: 12px; color: #8A6420; line-height: 1.65; margin-top: 4px; }
.cp-suggest { font-size: 12px; color: #8A6420; margin-top: 4px; }
.cp-suggest b { color: #6E4E0E; }

/* ================= 三端切换器 ================= */
.psw { position: relative; flex: none; }
.psw-menu { position: absolute; right: 0; top: 44px; width: 236px; background: var(--surface); border: 0.5px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-m); padding: 7px; display: none; z-index: 95; }
.psw.open .psw-menu { display: block; animation: fadeUp .18s ease both; }
.psw-t { font-size: 12px; font-weight: 700; color: var(--ink3); letter-spacing: 1.5px; padding: 5px 11px 6px; }
.psw-item { display: flex; flex-direction: column; gap: 1px; padding: 8.5px 11px; border-radius: 10px; }
.psw-item:hover { background: var(--surface2); }
.psw-item.on { background: var(--brand-soft); }
.psw-item b { font-size: 12px; color: var(--ink); font-weight: 600; }
.psw-item.on b { color: var(--brand-deep); }
.psw-item span { font-size: 12px; color: var(--ink3); }

/* ================= 护理快速录入（走动模式） ================= */
.qk-shell { max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--bg); }
.qk-head { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 13px 16px; background: rgba(247, 247, 251, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 0.5px solid var(--line); }
.qk-body { padding: 14px 14px 60px; }
.qk-body .chip { padding: 10px 16px; font-size: 13px; }
.qk-body .input, .qk-body .select, .qk-body .textarea { padding: 14px 15px; font-size: 15px; }
.qk-body .btn-block { padding: 15px 18px; font-size: 15px; }

/* ================= 房间式结构化录入 ================= */
.room-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.room-card { background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r); padding: 12px; }
.rc-room { font-family: var(--serif); font-weight: 800; font-size: 17px; color: var(--brand-deep); margin-bottom: 6px; }
.rc-line { display: flex; align-items: center; gap: 6px; width: 100%; font-size: 13px; padding: 8px 9px; border-radius: 10px; background: var(--surface2); margin-bottom: 6px; text-align: left; }
.rc-line:last-child { margin-bottom: 0; }
.rc-line:hover { background: var(--brand-soft); }
.rc-line b { font-weight: 600; }
.rc-line span { margin-left: auto; font-size: 12px; color: var(--ink3); }
.room-cur { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 0.5px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 12px; }
.qtype-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.qtype { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 14px; background: var(--surface); border: 0.5px solid var(--line); font-size: 12px; color: var(--ink2); }
.qtype.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.qst { margin-bottom: 18px; }
.qst-t { font-size: 13px; font-weight: 600; margin-bottom: 9px; }
.qrow { display: flex; gap: 8px; flex-wrap: wrap; }
.qbtn { flex: 1; min-width: 68px; padding: 13px 10px; border-radius: 13px; border: 0.5px solid var(--line2); background: var(--surface2); font-size: 13px; font-weight: 600; color: var(--ink2); text-align: center; }
.qbtn.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep); }
.qbtn.big { min-width: 130px; padding: 17px 12px; font-size: 15px; }
.qbtn[disabled] { opacity: .4; pointer-events: none; }
.qstep { display: flex; align-items: center; gap: 10px; justify-content: center; background: var(--surface); border: 0.5px solid var(--line); border-radius: 16px; padding: 10px; }
.qs-btn { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-deep); font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.qs-btn:active { transform: scale(.94); }
.qs-val { font-size: 24px; font-weight: 800; font-family: var(--serif); min-width: 116px; text-align: center; }
.qs-val small { font-size: 12px; color: var(--ink3); font-weight: 600; }

/* ================= SVG 图标适配（去 emoji 后） ================= */
.ms-ico svg, .n-ico svg, .qt-ico svg, .mr-ico svg, .ob-ico svg { width: 16px; height: 16px; }
.baby-avatar svg { width: 28px; height: 28px; color: #8A6420; }
.em-ico svg { width: 34px; height: 34px; color: var(--ink3); }
.tl-ico svg { width: 16px; height: 16px; }
.qtype svg { width: 17px; height: 17px; }
.rc-line svg { width: 14px; height: 14px; color: var(--brand-deep); }
.qbtn svg { width: 15px; height: 15px; vertical-align: -3px; }
.tag svg { width: 12px; height: 12px; }
.ac-t svg, .sw-t svg, .ts-head svg { width: 14px; height: 14px; }
.pc-ico svg { width: 19px; height: 19px; }
.cn-ico svg { width: 15px; height: 15px; color: var(--gold); }
.todo-sec svg { width: 13px; height: 13px; vertical-align: -2px; color: var(--ink2); }
.ts-head svg { color: var(--brand-deep); }
.ms-ico svg, .n-ico svg { color: var(--ink); }
.panel-h h3 svg { vertical-align: -3px; color: var(--brand); }
.chip svg { width: 14px; height: 14px; vertical-align: -2.5px; }


/* ================= 专业度强化 v1.3（近单色 / hairline / 状态点） ================= */
/* 卡片全面去阴影，靠 1px hairline 分隔 */
.card, .panel, .menu-sec, .changelog, .todo-card, .form-card, .qstep, .room-card, .room-cur,
.baby-head, .me-profile, .hero, .video-featured, .v-card, .res-row, .me-row, .msg-row,
.quick-tile, .kpi-card { box-shadow: none; }

/* 语义标签 → 中性灰 + 状态色点（替代彩色药丸） */
.tag { background: var(--surface2); color: var(--ink2); border: 0.5px solid var(--line); }
.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink3); flex: none; }
.tag-brand::before { background: var(--brand); }
.tag-sage::before { background: var(--sage); }
.tag-gold::before { background: var(--gold); }
.tag-ok::before { background: var(--ok); }
.tag-danger::before { background: var(--danger); }
.tag-blue::before { background: var(--blue); }
.tag-rose::before { background: var(--rose); }
.tag-gray::before { background: var(--ink3); }
.tag svg { color: var(--ink2); }

/* 图标容器 → 中性灰（去彩色粉块） */
.ms-ico, .mr-ico, .n-ico, .qt-ico, .q-ico, .rc-ico, .fc-ico, .ls-ico, .ob-ico,
.m-ico, .fc-ico, .quick-tile .qt-ico { background: var(--surface2) !important; color: var(--ink2) !important; }

/* KPI：数值回归墨色，去装饰圆 */
.kpi-card .kv { color: var(--ink); }
.kpi-card.warn .kv { color: var(--danger-deep); }
.kpi-card::after { display: none; }

/* 侧栏 / 底栏：活动态 = 描边 + 墨色，不使用实心色块 */
.sn-item.on { background: #EEEEF0; color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.sn-item.on svg { color: var(--ink); }
.fn-item.on { color: var(--brand-deep); }
.fn-item.on .fn-ic { background: transparent; border: 0.5px solid var(--brand-deep); }

/* 家庭端 hero / 定制条 / 宝宝头卡：去粉彩渐变 */
.hero { background: var(--surface); }
.hero::after { display: none; }
.tailor-strip { background: var(--surface); border: 0.5px solid var(--line); }
.ts-head { color: var(--ink); }
.ts-head svg { color: var(--ink); }
.ts-body { color: var(--ink2); }
.ts-body b { color: var(--ink); }
.baby-head { background: var(--surface); }
.me-profile { background: var(--surface); }
.baby-avatar { background: var(--surface2); box-shadow: none; }
.baby-avatar svg { color: var(--ink2); }
.me-avatar { background: var(--surface2); color: var(--ink2); }

/* 冲突 / 替换：金色的克制用法（左侧 3px 指示条） */
.conflict-note { background: var(--surface); border: 0.5px solid #EFD9A8; color: var(--ink2); }
.conflict-note b { color: var(--ink); }
.cn-ico svg { color: var(--gold); }
.swap-card { background: var(--surface); border: 0.5px solid #EFD9A8; }
.sw-t { color: var(--ink); }
.sw-t svg { color: var(--gold); }
.sw-b { color: var(--ink2); }
.sw-b b { color: var(--ink); }
.cp-panel-calm? {}

/* 结构化点选：选中 = 墨色描边 */
.chip.on, .qtype.on, .qbtn.on { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.qtype.on svg, .qbtn.on svg { color: var(--ink); }
.btn-soft { background: var(--surface2); color: var(--ink); border: 0.5px solid var(--line2); }
.btn-soft:hover { background: var(--surface); }

/* 房间卡片 / 宫格数字回归墨色 */
.rc-room { color: var(--ink); }
.room-card:hover { border-color: var(--ink2); }
.invite-code { color: var(--ink); border-color: var(--line2); }

/* 登录 / 顶栏 / 背景：去彩色光晕 */
.auth { background: var(--bg); }
@media (min-width: 560px) {
  body { background: #F1F1F2; }
}
.f-top, .f-nav, .main-top { background: rgba(246, 247, 249, .92); }
.side { background: var(--surface); }

/* 视频封面容器去阴影 */
.video-featured { box-shadow: none; }

/* 邀请码/档案抽屉等收敛 */

/* 待办磁贴：中性 + 红点语义 */
.todo-chip { display: inline-flex; align-items: center; white-space: nowrap; background: var(--surface); border: 0.5px solid var(--line2); color: var(--ink); }
.todo-chip.miss { background: var(--surface); border-color: var(--line2); color: var(--ink); }
.todo-chip.miss::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); margin-right: 7px; }

/* =====================================================================
   IA v2 补充层（对齐设计稿 00/01/02/03/04 页）
   ===================================================================== */

/* ---- 空态四要素：原因 + 动作 + 灰阶 + 半屏 60% ---- */
.empty { min-height: 42vh; }
.empty.half { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 24px 20px; }
.empty.half .em-ico { margin: 0 auto 12px; }

/* ---- 时间轴节点三态：实心=事实（默认彩色ico） / 空心=预计 / 菱形=预警 ---- */
.tl-ico.hollow { background: var(--surface); border: 1.6px dashed var(--ink3); color: var(--ink3); }
.tl-dia { display: inline-block; width: 9px; height: 9px; background: var(--danger); transform: rotate(45deg); border-radius: 2px; }
.tl-item.plan .tl-body h4 i { font-style: italic; font-weight: 500; color: var(--ink2); }
.conflict-line { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--gold); background: var(--gold-soft); border-radius: 8px; padding: 6px 9px; margin-top: 7px; }
.conflict-line svg { width: 13px; height: 13px; flex: none; }

/* ---- 骨架屏（加载 ≥1 块） ---- */
.skel { border-radius: 12px; background: linear-gradient(100deg, #F0F0F2 40%, #F7F8FA 50%, #F0F0F2 60%); background-size: 200% 100%; animation: skel 1.2s infinite linear; }
.skel-line { height: 13px; margin-bottom: 9px; }
.skel-block { height: 86px; }
@keyframes skel { 0% { background-position: 120% 0; } 100% { background-position: -80% 0; } }

/* ---- 登录角色路由行 / 错误行 ---- */
.route-row { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; font-size: 12px; color: var(--ink2); line-height: 1.7; }
.route-row .tag { flex: none; margin-top: 1px; }
.err-line { background: var(--danger-soft); color: var(--danger-deep); font-size: 12px; border-radius: 9px; padding: 8px 12px; margin: 4px 0 10px; }

/* ---- 房间卡三态（已完成灰 / 待录琥珀 / 无待录白）与走动进度条 ---- */
.room-card { display: flex; gap: 10px; align-items: center; }
.room-card.has-miss { border-color: #E8C98A; background: #FFFCF4; }
.room-card.all-done { opacity: .68; }
.walk-bar { height: 7px; border-radius: 99px; background: var(--surface2); border: 0.5px solid var(--line); overflow: hidden; margin: 8px 0 6px; }
.walk-bar-in { height: 100%; background: var(--sage); border-radius: 99px; transition: width .4s; }

/* ---- 类型选择：必录琥珀描边 + 角标 ---- */
.qtype { position: relative; }
.qtype.required { border-color: #E8C98A; background: #FFFCF4; }
.qtype.required svg { color: var(--gold); }
.qtype .req-flag, .qtype .hint-flag { position: absolute; top: 5px; right: 6px; font-style: normal; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1.5px 5px; }
.qtype .req-flag { background: var(--gold-soft); color: var(--gold); border: 0.5px solid #EFD9A8; }
.qtype .hint-flag { background: var(--surface2); color: var(--ink3); }

/* ---- S5 预警即时反馈屏 / S6 成功页 ---- */
.alert-screen, .ok-screen { text-align: center; padding: 30px 18px 20px; }
.as-badge, .ok-badge { width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.as-badge { background: var(--danger-soft); color: var(--danger); }
.ok-badge { background: var(--sage-soft); color: var(--sage-deep); }
.as-badge svg, .ok-badge svg { width: 26px; height: 26px; }
.alert-screen h2, .ok-screen h2 { font-size: 17px; font-family: var(--serif); margin-bottom: 8px; }
.as-line { font-size: 13px; color: var(--ink2); }
.as-steps { text-align: left; font-size: 12px; color: var(--ink2); line-height: 2.1; margin-top: 9px; border-top: 0.5px dashed var(--line); padding-top: 8px; }

/* ---- tab / chip 选中态：描边变深、不换实心（设计稿 IC 使用规则） ---- */
.fn-item.on .fn-ic { color: var(--brand-deep); }
.fn-item.on span:last-child { color: var(--brand-deep); font-weight: 700; }
.chip.done { background: var(--sage-soft); border-color: var(--sage-soft); color: var(--sage-deep); }

/* ---- 消息分组红点语义：通知性不打扰 ---- */
.msg-row .unread-dot.info-dot { background: var(--ink3); }

/* ---- 数字对齐：时间戳 / 计量 tabular-nums ---- */
.num, .tl-time, .p-time, .lr-time, .kv, .sv { font-variant-numeric: tabular-nums; }

/* ---- 平台端导出进度 ---- */
.exp-steps { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.exp-step { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--ink2); }
.exp-step.on { color: var(--ink); font-weight: 600; }
.exp-step .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); flex: none; }
.exp-step.on .dot { background: var(--sage); }

/* =====================================================================
   Apple HIG：动效尊重系统「减弱动态效果」设置
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


/* =====================================================================
   C 端（用户端）视觉精修层 v2 —— 温馨 · 精致 · 大气
   原则：层级靠位置/字号/字重/留白，不堆颜色；动效只解释状态与连续性
   ===================================================================== */

/* ---- 1. 环境底色：暖纸底 + 极淡品牌晕光（仅 560px+，移动端保持纯净） ---- */
@media (min-width: 560px) {
  body {
    background:
      radial-gradient(1100px 640px at 88% -6%, rgba(232, 90, 120, .10), transparent 62%),
      radial-gradient(820px 560px at 2% 104%, rgba(47, 169, 140, .08), transparent 58%),
      #F3F4F5;
  }
  .f-shell {
    border-radius: 0;
    box-shadow: 0 32px 90px rgba(25, 28, 40, .14), 0 0 0 1px var(--line);
  }
}

/* ---- 2. 顶栏：更轻盈的玻璃 + 渐隐底边 ---- */
.f-top {
  background: rgba(248, 248, 252, .82);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 0.5px solid rgba(228, 230, 235, .7);
}
.f-top::after { content: none; }

/* ---- 3. 底栏：悬浮胶囊式 tab bar（Liquid Glass 的克制版） ---- */
.f-nav {
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: calc(100% - 24px); max-width: 458px;
  left: 50%; transform: translateX(-50%);
  border-radius: 26px;
  border: 0.5px solid rgba(228, 230, 235, .8);
  background: rgba(252, 252, 254, .86);
  backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 12px 38px rgba(25, 28, 40, .12);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
@media (min-width: 390px) and (max-width: 559px) { .f-nav { width: calc(100% - 24px); max-width: 366px; } }
.fn-item { border-radius: 18px; transition: color .18s ease, transform .18s cubic-bezier(.32,.72,0,1); }
.fn-item:active { transform: scale(.94); }
.fn-ic { transition: transform .25s cubic-bezier(.32,.72,0,1), border-color .2s, background .2s; }
.fn-item.on .fn-ic { border: 0.5px solid var(--brand-deep); background: var(--brand-soft); transform: translateY(-2px); }
.fn-item.on { color: var(--brand-deep); }

/* ---- 4. 卡片体系：统一海拔，一次光影 ---- */
.f-body .card, .menu-sec, .changelog, .tl-body, .stat, .me-row, .msg-row, .v-card {
  border: 0.5px solid rgba(228, 230, 235, .9);
  box-shadow: 0 1px 2px rgba(20, 22, 32, .04), 0 6px 18px rgba(20, 22, 32, .05);
  transition: box-shadow .25s ease, transform .25s cubic-bezier(.32,.72,0,1), border-color .2s;
}
.me-row:hover, .msg-row:hover, .v-card:hover { border-color: rgba(232, 90, 120, .35); box-shadow: 0 2px 4px rgba(20,22,32,.05), 0 12px 28px rgba(20,22,32,.08); transform: translateY(-1px); }
.me-row:active, .msg-row:active, .v-card:active { transform: scale(.985); }

/* ---- 5. Hero：柔和呼吸的晨光渐变 + 大标题字距 ---- */
.hero {
  background:
    radial-gradient(420px 200px at 92% -12%, rgba(232, 90, 120, .14), transparent 70%),
    linear-gradient(150deg, #FFFFFF 30%, #FFF6FA 78%, #F6F2FF 100%);
  border-radius: 18px;
  padding: 20px 18px 17px;
}
.hero-date h2 { letter-spacing: .01em; }

/* ---- 6. 汇总卡：数字为主角（衬线大数字 + 柔和标签），微妙渐入 ---- */
.stat { border-radius: 14px; padding: 13px 8px 11px; }
.stat .sv { font-size: 17px; font-family: var(--serif); letter-spacing: -.01em; }
.stat .sv small { font-size: 12px; }
.stat .sl { font-size: 12px; margin-top: 4px; letter-spacing: .02em; }

/* ---- 7. 时间轴：节点更精致（描边圈 + 类型色内芯），连线渐变 ---- */
.tl-ico { border: 2.5px solid #FFF; box-shadow: 0 2px 10px rgba(20, 22, 32, .12), inset 0 0 0 1px rgba(0,0,0,.04); }
.tl-rail::after { background: linear-gradient(var(--line), rgba(228,230,235,.35)); }
.tl-body { border-radius: 14px; padding: 13px 14px 12px; }
.tl-top h4 { font-weight: 700; letter-spacing: .01em; }

/* ---- 8. 预警卡：唯一的彩色时刻（danger 渐变晕光 + 呼吸点） ---- */
.alert-card {
  background: linear-gradient(135deg, #FDECED, #FDF4EB);
  border: 0.5px solid #F3CFD5;
  border-radius: 14px;
  position: relative; overflow: hidden;
}
.alert-card::before {
  content: ''; position: absolute; left: 14px; right: 14px; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--danger), rgba(229,72,77,.15) 60%, transparent); border-radius: 0 0 3px 3px;
}
.review-box { border-radius: 11px; }

/* ---- 9. 按钮：主按钮墨色 + 柔和按压；软按钮带品牌呼吸 ---- */
.f-shell .btn-pri { border-radius: 15px; box-shadow: 0 6px 18px rgba(33, 35, 46, .18); }
.f-shell .btn-pri:active { transform: scale(.97); box-shadow: 0 2px 8px rgba(33,35,46,.16); }
.f-shell .btn-soft { border-radius: 13px; }

/* ---- 10. chips：选中 = 墨底白字（对比清晰），未选中描边柔和 ---- */
.f-shell .chip { border-radius: 999px; transition: all .2s ease; }
.f-shell .chip:active { transform: scale(.95); }

/* ---- 11. 内容页：视频卡 hover 升起 + 封面微缩放 ---- */
.v-card { border-radius: 14px; overflow: hidden; }
.v-card .vf-cover, .video-featured { transition: transform .4s cubic-bezier(.32,.72,0,1); }
.video-featured { border-radius: 18px; }

/* ---- 12. 我的页：头像卡更大气（渐变 + 内高光） ---- */
.me-profile { border-radius: 18px; padding: 19px 17px; }
.me-avatar { box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 20px rgba(232,90,120,.22); }
.baby-head { border-radius: 18px; }
.baby-avatar { box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 20px rgba(232,90,120,.2); }

/* ---- 13. 消息行：未读左侧品牌点更醒目（替代仅粉底） ---- */
.msg-row.unread { background: var(--surface); border-color: rgba(232, 90, 120, .28); }
.msg-row.unread .n-ico { margin-left: 14px; }
.msg-row.unread::after {
  content: ''; position: absolute; left: 14px; top: 14px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px rgba(232, 90, 120, .13);
}
.msg-row .unread-dot { top: 12px; right: 12px; box-shadow: 0 0 0 3px rgba(229, 72, 77, .14); }

/* ---- 14. 入场动效：一次编排（hero → stats → timeline 渐次），受 reduced-motion 保护 ---- */
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.f-body > * { animation: riseIn .5s cubic-bezier(.2,.8,.25,1) both; }
.f-body > *:nth-child(1) { animation-delay: .02s; }
.f-body > *:nth-child(2) { animation-delay: .07s; }
.f-body > *:nth-child(3) { animation-delay: .12s; }
.f-body > *:nth-child(4) { animation-delay: .17s; }
.f-body > *:nth-child(n+5) { animation-delay: .22s; }

/* ---- 15. 滚动细节：顶部渐隐阴影随内容滚动（静态近似）+ 平滑滚动 ---- */
.f-body { scroll-behavior: smooth; }
.f-shell { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* ---- 16. 数字统一 tabular（时间/数值/进度） ---- */
.stat .sv, .tl-time, .p-time, .ms-time, .v-dur { font-variant-numeric: tabular-nums; }

/* ---- 17. 骨架屏更柔和 ---- */
.skel { background: linear-gradient(100deg, #EFEFF1 38%, #F8F9FB 50%, #EFEFF1 62%); background-size: 200% 100%; }

/* ---- 18. 弹窗与 toast：更轻盈的入场 ---- */
.mask { backdrop-filter: blur(6px) saturate(1.2); -webkit-backdrop-filter: blur(6px) saturate(1.2); }
.dialog { border-radius: 24px; box-shadow: 0 28px 80px rgba(16, 18, 26, .24); }


/* =====================================================================
   C 端交互精修 —— 状态反馈 / 页面切换 / 触感
   ===================================================================== */

/* ---- 19. 页面切换过渡：视图容器入场（render 重绘时触发） ---- */
.view-anim { animation: riseIn .38s cubic-bezier(.2,.8,.25,1) both; }

/* ---- 20. 列表行渐次入场（消息/内容网格，cap 总延迟） ---- */
.stagger > * { animation: riseIn .4s cubic-bezier(.2,.8,.25,1) both; }
.stagger > *:nth-child(1) { animation-delay: .03s; }
.stagger > *:nth-child(2) { animation-delay: .06s; }
.stagger > *:nth-child(3) { animation-delay: .09s; }
.stagger > *:nth-child(4) { animation-delay: .12s; }
.stagger > *:nth-child(5) { animation-delay: .15s; }
.stagger > *:nth-child(n+6) { animation-delay: .18s; }

/* ---- 21. 时间轴卡片：hover 微亮（桌面）+ 记录人徽标 ---- */
.tl-body:hover { border-color: rgba(232, 90, 120, .3); }
.tl-by { letter-spacing: .02em; }

/* ---- 22. 触感反馈：所有可点卡片统一按压缩放 ---- */
.tl-body, .menu-sec .swap-card, .stat { transition: transform .18s cubic-bezier(.32,.72,0,1), box-shadow .25s; }
.stat:active { transform: scale(.96); }

/* ---- 23. 空态插画容器：柔和浮动动画（每 4s 一次，极轻） ---- */
.empty .em-ico { animation: floatY 4s ease-in-out infinite; }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* ---- 24. 预警呼吸点（仅 pending 状态，唯一允许的持续动效） ---- */
@keyframes alertPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .35); } 50% { box-shadow: 0 0 0 6px rgba(229, 72, 77, 0); } }
.alert-card .ac-t svg, .tl-dia { animation: alertPulse 2.2s ease infinite; }

/* ---- 25. 汇总卡数值变化的高亮（配合 JS 添加 .flash-num） ---- */
.flash-num { animation: numGlow 1s ease 1; }
@keyframes numGlow { 0% { color: var(--brand-deep); } 100% { color: inherit; } }

/* ---- 26. 下拉刷新感：chips 行横向滚动惯性 + 遮罩渐隐 ---- */
.chip-row { -webkit-overflow-scrolling: touch; mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); }

/* ---- 27. 大标题排版：hero 与页面标题的衬线字距优化 ---- */
.ft-title h1 { letter-spacing: .02em; }
.f-shell h1, .f-shell h2 { text-wrap: balance; }


/* =====================================================================
   C 端实拍素材层 —— 封面照片 / hero 照片（SVG 自动兜底）
   ===================================================================== */
.poster-wrap { position: relative; display: block; overflow: hidden; }
.poster-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.poster-wrap .poster-svg { display: block; width: 100%; height: auto; }
.v-card:hover .poster-photo, .video-featured:hover .poster-photo { transform: scale(1.04); }
.v-dur, .play-badge, .vf-info { z-index: 2; }

/* 今天页 hero 照片条 */
.hero-photo-strip {
  margin-top: 12px; border-radius: 14px; overflow: hidden;
  border: 0.5px solid var(--line); position: relative; height: 118px;
}
.hero-photo-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo-strip::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(20, 22, 32, .38));
}
.hero-photo-cap {
  position: absolute; left: 13px; bottom: 10px; z-index: 2;
  color: #FFF; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  display: flex; align-items: center; gap: 6px;
  text-shadow: 0 1px 8px rgba(20, 22, 32, .45);
}
.hero-photo-cap svg { width: 14px; height: 14px; }

/* 我的页宝宝卡照片角标 */
.baby-photo {
  width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex: none;
  border: 2.5px solid #FFF; box-shadow: 0 6px 16px rgba(20, 22, 32, .16);
}
