/* ============================================================
   宝宝工作台 · 复古森林绿主题
   ============================================================ */
:root {
  --green: #6b8f71;
  --green-dark: #4a6b52;
  --green-deep: #37543f;
  --green-light: #a3c9a8;
  --green-pale: #dce8da;
  --paper: #f4f1e8;
  --card: #fbf9f0;
  --card-2: #f6f2e4;
  --ink: #3d3a34;
  --ink-soft: #837d70;
  --gold: #c9a86a;
  --gold-deep: #a8863f;
  --red: #c96a6a;
  --red-pale: #f3dede;
  --blue: #7a9cc0;
  --line: #ccd8c6;
  --radius: 16px;
  --shadow: 0 3px 0 rgba(74, 107, 82, 0.14);
  --font-serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --font-kai: "Kaiti SC", "KaiTi", "STKaiti", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(107, 143, 113, 0.08) 1px, transparent 1.4px);
  background-size: 22px 22px;
  min-height: 100vh;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--green-light); }

/* ---------- 漂浮装饰 ---------- */
#decor { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
#decor span {
  position: absolute;
  opacity: 0;
  will-change: transform, opacity;
  animation: fl-drift var(--dur, 18s) ease-in-out var(--delay, 0s) infinite alternate;
}
#decor span.fl-butterfly { animation: fl-drift var(--dur, 18s) ease-in-out var(--delay, 0s) infinite alternate, fl-wing 0.9s ease-in-out infinite alternate; }
@keyframes fl-drift {
  0%   { transform: translate(0, 0) rotate(-6deg); opacity: 0; }
  12%  { opacity: var(--op, 0.55); }
  50%  { transform: translate(var(--dx, 26px), var(--dy, -34px)) rotate(8deg); }
  88%  { opacity: var(--op, 0.55); }
  100% { transform: translate(calc(var(--dx, 26px) * 0.4), var(--dy2, -12px)) rotate(-4deg); opacity: 0; }
}
@keyframes fl-wing { 0% { filter: hue-rotate(0); } 100% { filter: hue-rotate(24deg); } }

/* ---------- 左侧导航栏 ---------- */
#sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: 64px; z-index: 60;
  background: linear-gradient(180deg, var(--green-dark) 0%, var(--green) 130%);
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  box-shadow: 2px 0 10px rgba(55, 84, 63, 0.25);
}
.nav-logo {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--card); color: var(--green-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 8px;
  border: 2px dashed rgba(247, 243, 230, 0.7);
  flex: none;
}
.nav-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; width: 100%; display: flex; flex-direction: column; align-items: center; scrollbar-width: none; }
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-item {
  position: relative;
  width: 100%; padding: 7px 0 6px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; color: rgba(247, 243, 230, 0.82);
  font-size: 9.5px; letter-spacing: 0.5px;
  transition: background 0.15s;
}
.nav-item .ni { font-size: 19px; line-height: 1.2; filter: saturate(0.9); }
.nav-item.active { color: var(--green-dark); }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px;
  background: var(--card); border-radius: 0 4px 4px 0;
}
.nav-item .nl { white-space: nowrap; }
.nav-item:active { background: rgba(255, 255, 255, 0.08); }

/* ---------- 主区域 / Header ---------- */
#main { margin-left: 64px; min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 2; }
#header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px calc(10px);
  padding-top: calc(10px + env(safe-area-inset-top));
  background: rgba(244, 241, 232, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 2px dashed var(--line);
}
.hd-left { flex: none; min-width: 86px; }
.hd-time { font-family: var(--font-serif); font-weight: 700; font-size: 25px; color: var(--green-deep); line-height: 1.05; letter-spacing: 0.5px; }
.hd-date { font-size: 10.5px; color: var(--ink-soft); margin-top: 1px; }
.hd-quote {
  flex: 1; text-align: center; overflow: hidden;
  font-family: var(--font-kai);
  font-size: 13px; color: var(--green-dark);
  white-space: nowrap; text-overflow: ellipsis;
  padding: 0 2px;
}
.hd-refresh {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: #fff;
  border: 1.5px solid var(--green-dark);
  font-size: 19px; line-height: 1;
  box-shadow: 0 2px 0 rgba(55, 84, 63, 0.35);
  transition: transform 0.15s;
}
.hd-refresh:active { transform: translateY(2px); box-shadow: none; }
.hd-refresh.spinning { animation: spin 0.6s ease; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

#content { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 14px 14px calc(28px + env(safe-area-inset-bottom)); }
.page { animation: fadeUp 0.25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  background: var(--card);
  border: 1.5px solid #cfdcc9;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 14px;
}
.card.taped::before {
  content: ""; position: absolute; top: -9px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 84px; height: 17px;
  background: rgba(163, 201, 168, 0.5);
  border-left: 2px dashed rgba(255, 255, 255, 0.8);
  border-right: 2px dashed rgba(255, 255, 255, 0.8);
}
.card-title {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-serif); font-weight: 700;
  font-size: 15.5px; color: var(--green-deep);
  margin-bottom: 11px;
}
.card-title .ct-sub { font-family: var(--font-body); font-weight: 400; font-size: 11px; color: var(--ink-soft); }
.card-title::after { content: ""; flex: 1; border-top: 2px dotted var(--line); margin-left: 4px; }

.sec-title {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--font-serif); font-weight: 700; font-size: 14.5px;
  color: var(--green-deep); margin: 18px 2px 10px;
}
.sec-title small { font-family: var(--font-body); font-weight: 400; font-size: 11px; color: var(--ink-soft); }
.sec-title::after { content: ""; flex: 1; border-top: 2px dashed var(--line); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 40px; padding: 8px 15px;
  background: var(--green); color: #fff;
  border: 1.5px solid var(--green-dark);
  border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: 0 2.5px 0 rgba(55, 84, 63, 0.4);
  transition: transform 0.12s, box-shadow 0.12s;
  user-select: none;
}
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn.ghost { background: var(--card); color: var(--green-dark); border-color: var(--green); box-shadow: 0 2.5px 0 rgba(107, 143, 113, 0.25); }
.btn.gold { background: var(--gold); border-color: var(--gold-deep); box-shadow: 0 2.5px 0 rgba(168, 134, 63, 0.4); }
.btn.warn { background: var(--red); border-color: #a35252; box-shadow: 0 2.5px 0 rgba(163, 82, 82, 0.4); }
.btn.big { width: 100%; min-height: 48px; font-size: 15.5px; }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: 12px; border-radius: 9px; }
.btn.sq { width: 40px; min-height: 40px; padding: 0; font-size: 16px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn .em { font-size: 16px; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; }
.chip {
  min-height: 32px; padding: 5px 13px;
  border-radius: 999px; font-size: 12.5px;
  background: transparent; color: var(--green-dark);
  border: 1.5px dashed var(--green);
  transition: all 0.15s; white-space: nowrap;
}
.chip.on { background: var(--green); color: #fff; border-style: solid; border-color: var(--green-dark); box-shadow: 0 2px 0 rgba(55, 84, 63, 0.3); }
.chip.gray { border-color: var(--line); color: var(--ink-soft); }

/* ---------- 统计网格 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.stat {
  background: var(--card-2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 9px 6px 8px;
  text-align: center;
}
.stat .s-em { font-size: 16px; line-height: 1; }
.stat .s-val { font-family: var(--font-serif); font-size: 17px; font-weight: 700; color: var(--green-deep); margin-top: 3px; }
.stat .s-val small { font-size: 10.5px; font-weight: 400; color: var(--ink-soft); margin-left: 1px; }
.stat .s-lab { font-size: 10.5px; color: var(--ink-soft); margin-top: 2px; }

/* ---------- 列表行 ---------- */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px;
  border-bottom: 1.5px dashed var(--line);
}
.list-row:last-child { border-bottom: none; }
.lr-icon {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  background: var(--green-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.lr-main { flex: 1; min-width: 0; }
.lr-title { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.lr-sub { font-size: 11px; color: var(--ink-soft); margin-top: 1px; line-height: 1.4; }
.lr-side { flex: none; text-align: right; }
.lr-time { font-family: var(--font-serif); font-size: 13px; color: var(--green-dark); font-weight: 700; }
.lr-act { display: flex; gap: 6px; margin-top: 3px; justify-content: flex-end; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 9px;
  border: 1.5px solid var(--line); background: var(--card);
  color: var(--ink-soft); font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:active { background: var(--green-pale); }
.icon-btn.danger { color: var(--red); border-color: #dfc2c2; }

.date-group-h {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--font-serif); font-weight: 700;
  color: var(--green-deep); font-size: 14px;
  margin: 14px 2px 4px;
}
.date-group-h small { font-family: var(--font-body); font-weight: 400; color: var(--ink-soft); font-size: 11px; }
.date-group-h::after { content: ""; flex: 1; border-top: 2px dashed var(--line); }

/* ---------- 时间线 ---------- */
.tl { position: relative; padding-left: 18px; }
.tl::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; border-left: 2px dotted var(--green-light); }
.tl-item { position: relative; display: flex; gap: 9px; padding: 5px 0; align-items: baseline; }
.tl-item::before {
  content: ""; position: absolute; left: -17px; top: 12px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--green);
}
.tl-time { flex: none; font-family: var(--font-serif); font-size: 12px; font-weight: 700; color: var(--green-dark); width: 44px; }
.tl-txt { font-size: 13px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--green-dark); font-weight: 600; margin-bottom: 5px; }
.field label small { color: var(--ink-soft); font-weight: 400; }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border: 1.5px solid var(--line); border-radius: 11px;
  background: #fffdf6; font-size: 14px; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(163, 201, 168, 0.35); }
textarea { min-height: 76px; resize: vertical; }
.frow { display: flex; gap: 9px; }
.frow .field { flex: 1; }
.seg { display: flex; border: 1.5px solid var(--green); border-radius: 11px; overflow: hidden; }
.seg button {
  flex: 1; min-height: 40px; border: none; background: var(--card);
  font-size: 13px; color: var(--green-dark);
  border-right: 1.5px solid var(--green);
}
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--green); color: #fff; font-weight: 600; }
.hint { font-size: 11px; color: var(--ink-soft); line-height: 1.5; }
.hint.warn { color: var(--red); }

/* ---------- 弹窗 / 底部抽屉 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(61, 58, 52, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: maskIn 0.18s ease;
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 620px;
  max-height: 88vh; overflow-y: auto;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  border: 1.5px solid #cfdcc9; border-bottom: none;
  padding: 6px 16px calc(18px + env(safe-area-inset-bottom));
  animation: sheetUp 0.24s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes sheetUp { from { transform: translateY(40%); opacity: 0.5; } to { transform: none; opacity: 1; } }
.sheet-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 6px auto 10px; }
.sheet-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-serif); font-weight: 700; font-size: 16px;
  color: var(--green-deep); margin-bottom: 13px;
}
.sheet-title::after { content: ""; flex: 1; border-top: 2px dotted var(--line); }
.sheet-title .close-x {
  margin-left: auto; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--card-2);
  color: var(--ink-soft); font-size: 14px; line-height: 1;
}
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; }
.sheet-actions .btn { flex: 1; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--green-deep); color: #f7f3e6;
  padding: 10px 18px; border-radius: 999px;
  font-size: 13px; z-index: 200; opacity: 0;
  pointer-events: none; max-width: 86vw; text-align: center;
  border: 1.5px solid rgba(247, 243, 230, 0.35);
  transition: all 0.22s;
  box-shadow: 0 4px 14px rgba(55, 84, 63, 0.4);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 徽章 / 进度 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2.5px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; white-space: nowrap;
}
.badge.ok { background: var(--green-pale); color: var(--green-deep); border: 1px solid var(--green-light); }
.badge.warn { background: #f6ecd8; color: var(--gold-deep); border: 1px solid var(--gold); }
.badge.bad { background: var(--red-pale); color: #a35252; border: 1px solid #dfc2c2; }
.badge.muted { background: #eee9db; color: var(--ink-soft); border: 1px solid var(--line); }
.progress { height: 10px; border-radius: 999px; background: var(--green-pale); border: 1px solid var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--green-light), var(--green)); border-radius: 999px; transition: width 0.4s; }

/* ---------- 折叠面板 ---------- */
.acc { display: flex; flex-direction: column; gap: 10px; }
.acc-item { background: var(--card); border: 1.5px solid #cfdcc9; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.acc-head {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 13px 14px; background: none; border: none;
  font-family: var(--font-serif); font-size: 15px; font-weight: 700; color: var(--green-deep);
  text-align: left;
}
.acc-head .ah-em { font-size: 18px; }
.acc-head .ah-sub { font-family: var(--font-body); font-weight: 400; font-size: 11px; color: var(--ink-soft); margin-left: -3px; }
.acc-head .arrow { margin-left: auto; font-size: 12px; color: var(--green-dark); transition: transform 0.25s; }
.acc-item.open .arrow { transform: rotate(90deg); }
.acc-body { display: none; padding: 0 14px 13px; }
.acc-item.open .acc-body { display: block; animation: fadeUp 0.22s ease; }

/* ---------- 日历 ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-family: var(--font-serif); font-weight: 700; font-size: 14.5px; color: var(--green-deep); }
.cal-nav { display: flex; gap: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wk { text-align: center; font-size: 10.5px; color: var(--ink-soft); padding: 3px 0; }
.cal-cell {
  position: relative; min-height: 42px;
  border-radius: 10px; border: 1.5px solid transparent;
  background: var(--card-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--ink);
  padding: 2px 0;
}
.cal-cell.dim { opacity: 0.32; }
.cal-cell.today { border-color: var(--green); border-style: dashed; font-weight: 700; color: var(--green-deep); }
.cal-cell .cal-dots { display: flex; gap: 2px; margin-top: 2px; height: 5px; }
.cal-cell .cal-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.cal-cell .cal-dots i.g { background: var(--gold); }
.cal-cell .cal-num-mark { position: absolute; top: 2px; right: 3px; font-size: 8.5px; font-weight: 700; color: var(--green-dark); }
.cal-cell.on { background: var(--green); color: #fff; border-color: var(--green-dark); }
.cal-cell.on .cal-dots i { background: rgba(255,255,255,0.9); }
.cal-cell.clickable:active { background: var(--green-pale); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 26px 10px; color: var(--ink-soft); }
.empty .e-em { font-size: 34px; opacity: 0.7; }
.empty .e-txt { font-size: 12.5px; margin-top: 8px; }

/* ---------- 横幅提示 ---------- */
.banner {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--green-pale);
  border: 1.5px dashed var(--green);
  border-radius: 13px;
  padding: 10px 12px; font-size: 12px; color: var(--green-deep);
  line-height: 1.55; margin-bottom: 13px;
}
.banner .b-em { font-size: 17px; line-height: 1.2; }
.banner.gold { background: #f8f1e0; border-color: var(--gold); color: #7c6534; }
.banner.red { background: var(--red-pale); border-color: #dfc2c2; color: #a35252; }

/* ---------- 键值对 ---------- */
.kv { display: flex; justify-content: space-between; align-items: center; padding: 7px 2px; border-bottom: 1.5px dashed var(--line); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--ink-soft); }
.kv .v { color: var(--ink); font-weight: 600; text-align: right; }

/* ---------- 迷你播放条 ---------- */
#playerbar {
  position: fixed; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 80; display: flex; align-items: center; gap: 8px;
  background: var(--green-deep); color: #f7f3e6;
  border-radius: 999px; padding: 8px 12px 8px 14px;
  box-shadow: 0 5px 16px rgba(55, 84, 63, 0.5);
  font-size: 12.5px; max-width: 72vw;
  border: 1.5px solid rgba(247, 243, 230, 0.3);
  animation: fadeUp 0.3s ease;
}
#playerbar .pb-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#playerbar .pb-eq { display: flex; align-items: flex-end; gap: 2px; height: 13px; }
#playerbar .pb-eq i { width: 2.5px; background: var(--green-light); border-radius: 2px; animation: eq 0.8s ease-in-out infinite; }
#playerbar .pb-eq i:nth-child(1) { height: 6px; animation-delay: 0s; }
#playerbar .pb-eq i:nth-child(2) { height: 11px; animation-delay: 0.2s; }
#playerbar .pb-eq i:nth-child(3) { height: 8px; animation-delay: 0.4s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1.2); } }
#playerbar button {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: rgba(247, 243, 230, 0.18); color: #f7f3e6; font-size: 13px;
}
#playerbar.hidden { display: none; }

/* ---------- 睡眠计时大卡片 ---------- */
.sleep-card { text-align: center; padding: 20px 14px 16px; }
.sleep-time { font-family: var(--font-serif); font-size: 44px; font-weight: 700; color: var(--green-deep); letter-spacing: 1px; line-height: 1.1; text-shadow: 0 2px 0 rgba(163, 201, 168, 0.5); }
.sleep-time.running { color: var(--green-dark); }
.sleep-sub { font-size: 11.5px; color: var(--ink-soft); margin: 5px 0 14px; }
.moon-row { font-size: 21px; letter-spacing: 7px; margin-bottom: 6px; }

/* ---------- 快捷入口网格 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.quick {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 2px 8px;
  background: var(--card-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  font-size: 11px; color: var(--ink);
  transition: transform 0.12s;
}
.quick:active { transform: scale(0.94); }
.quick .q-em { font-size: 22px; line-height: 1.2; }
.quick.done { border-color: var(--green); background: var(--green-pale); }
.quick.done .q-em::after { content: "✓"; font-size: 10px; color: var(--green-dark); vertical-align: top; }

/* ---------- SVG 图表 ---------- */
.chart-wrap { width: 100%; overflow: hidden; }
.chart-wrap svg { width: 100%; height: auto; display: block; }

/* ---------- 英语口语 ---------- */
.en-sent {
  padding: 11px 2px; border-bottom: 1.5px dashed var(--line);
  display: flex; gap: 10px; align-items: center;
}
.en-sent:last-child { border-bottom: none; }
.en-main { flex: 1; min-width: 0; }
.en-text { font-family: var(--font-serif); font-size: 14.5px; color: var(--ink); line-height: 1.45; }
.en-cn { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.speak-btn {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--green); border: 1.5px solid var(--green-dark);
  color: #fff; font-size: 15px;
  box-shadow: 0 2px 0 rgba(55, 84, 63, 0.35);
}
.speak-btn:active { transform: translateY(2px); box-shadow: none; }
.speak-btn.playing { animation: pulse 0.9s ease infinite; }
.speak-btn[disabled] { opacity: 0.4; pointer-events: none; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(107, 143, 113, 0.5); } 50% { box-shadow: 0 0 0 7px rgba(107, 143, 113, 0); } }

/* ---------- 里程碑 ---------- */
.ms-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1.5px dashed var(--line); }
.ms-row:last-child { border-bottom: none; }
.ms-info { flex: 1; min-width: 0; }
.ms-name { font-size: 13.5px; font-weight: 600; }
.ms-ref { font-size: 11px; color: var(--ink-soft); }
.ms-ref b { color: var(--green-dark); }
.ms-do { flex: none; }

/* ---------- 疫苗 ---------- */
.vax-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1.5px dashed var(--line); }
.vax-row:last-child { border-bottom: none; }
.vax-info { flex: 1; min-width: 0; }
.vax-name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vax-sub { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }

/* ---------- 工具类 ---------- */
.mt8 { margin-top: 8px; } .mt10 { margin-top: 10px; } .mt14 { margin-top: 14px; }
.mb8 { margin-bottom: 8px; } .mb10 { margin-bottom: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: 11.5px; }
.flex1 { flex: 1; min-width: 0; }
.link-btn { background: none; border: none; color: var(--green-dark); font-size: 12.5px; text-decoration: underline dotted; padding: 4px; }
.hidden { display: none !important; }

/* ---------- 窄屏微调 ---------- */
@media (max-width: 360px) {
  .hd-time { font-size: 21px; }
  .hd-quote { font-size: 11.5px; }
  .quick-grid { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .quick .q-em { font-size: 19px; }
}
