/* Chronicle PWA — iOS 分组列表手感,手机优先,深色模式跟随系统 */

:root {
  --bg: #f2f2f7;
  --card: #ffffff;
  --text: #1c1c1e;
  --text2: #8e8e93;
  --sep: #e5e5ea;
  --accent: #007aff;
  --red: #ff3b30;
  --orange: #ff9500;
  --yellow: #ffcc00;
  --green: #34c759;
  --blue: #007aff;
  --purple: #af52de;
  --pink: #ff2d55;
  --gray: #8e8e93;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --text: #f2f2f7;
    --text2: #8e8e93;
    --sep: #38383a;
    --red: #ff453a;
    --orange: #ff9f0a;
    --yellow: #ffd60a;
    --green: #30d158;
    --blue: #0a84ff;
    --purple: #bf5af2;
    --pink: #ff375f;
    --gray: #8e8e93;
    --accent: #0a84ff;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.4;
  /* 2026-09-05 壳内滚动改造:body 不滚,只有 .content 滚——iOS 上整页滚动会带动 fixed 底栏 */
  height: 100%;
  overflow: hidden;
}

[hidden] { display: none !important; }

/* ── token 首屏 ─────────────────────────────── */

.token-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.token-card {
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
}
.token-icon { width: 72px; height: 72px; border-radius: 16px; }
.token-card h1 { font-size: 24px; margin: 12px 0 4px; }
.token-hint { color: var(--text2); font-size: 14px; margin: 0 0 20px; }
.token-card input {
  width: 100%;
  font-size: 17px;
  padding: 12px 14px;
  border: 1px solid var(--sep);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.token-card input:focus { border-color: var(--accent); }
.token-error { color: var(--red); font-size: 14px; margin: 10px 0 0; }
.btn-primary {
  width: 100%;
  margin-top: 16px;
  font-size: 17px;
  font-weight: 600;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
}
.btn-primary:active { opacity: 0.8; }

/* ── 主壳 ───────────────────────────────────── */

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

.topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: var(--bg);
  border-bottom: 0.5px solid var(--sep);
}
.topbar h1 { font-size: 28px; font-weight: 700; margin: 0; }
.refresh-btn {
  font-size: 24px;
  line-height: 1;
  border: none;
  background: none;
  color: var(--accent);
  padding: 8px;
}
.refresh-btn:active { opacity: 0.5; }
.refresh-btn.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 16px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.tabbar {
  flex-shrink: 0;
  display: flex;
  background: var(--card);
  border-top: 0.5px solid var(--sep);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1;
  border: none;
  background: none;
  color: var(--text2);
  font-size: 11px;
  padding: 7px 0 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tab .tab-ico { font-size: 20px; line-height: 1; }
.tab.active { color: var(--accent); }

/* ── 分组列表 ───────────────────────────────── */

.section { margin-bottom: 24px; }
.section-title {
  font-size: 13px;
  color: var(--text2);
  text-transform: uppercase;
  margin: 0 0 6px 16px;
}
.section-foot { font-size: 13px; color: var(--text2); margin: 6px 16px 0; }
.card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  min-height: 48px;
}
.row + .row { border-top: 0.5px solid var(--sep); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 17px; overflow-wrap: anywhere; }
.row-sub { font-size: 14px; color: var(--text2); margin-top: 2px; overflow-wrap: anywhere; }
.row-side { flex-shrink: 0; text-align: right; color: var(--text2); font-size: 14px; }

.empty {
  padding: 20px 16px;
  color: var(--text2);
  font-size: 15px;
  text-align: center;
}
.loading, .error-box {
  padding: 32px 16px;
  text-align: center;
  color: var(--text2);
}
.error-box { color: var(--red); }
.error-box button {
  margin-top: 10px;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 15px;
}

/* ── 徽章 / 胶囊 / 圆点 ─────────────────────── */

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.green  { color: var(--green);  background: color-mix(in srgb, var(--green) 15%, transparent); }
.badge.yellow { color: var(--orange); background: color-mix(in srgb, var(--orange) 15%, transparent); }
.badge.red    { color: var(--red);    background: color-mix(in srgb, var(--red) 15%, transparent); }
.badge.blue   { color: var(--blue);   background: color-mix(in srgb, var(--blue) 15%, transparent); }
.badge.gray   { color: var(--gray);   background: color-mix(in srgb, var(--gray) 15%, transparent); }
.badge.purple { color: var(--purple); background: color-mix(in srgb, var(--purple) 15%, transparent); }

.dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.c-red    { background: var(--red); }
.dot.c-orange { background: var(--orange); }
.dot.c-yellow { background: var(--yellow); }
.dot.c-green  { background: var(--green); }
.dot.c-blue   { background: var(--blue); }
.dot.c-purple { background: var(--purple); }
.dot.c-pink   { background: var(--pink); }
.dot.c-none   { background: var(--sep); }

/* ── 任务行(只读勾选样式) ───────────────────── */

.task-check {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--sep);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
}
.task-check.done { background: var(--green); border-color: var(--green); }
.task-done .row-title { color: var(--text2); text-decoration: line-through; }
.task-pin { color: var(--orange); font-size: 13px; }
.sub-progress { font-size: 13px; color: var(--text2); }

/* ── 培养卡片 ───────────────────────────────── */

.prep-card { padding: 14px 16px; }
.prep-card + .prep-card { border-top: 0.5px solid var(--sep); }
.prep-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.prep-id { font-weight: 600; font-size: 17px; }
.prep-div { font-size: 26px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.prep-meta { font-size: 14px; color: var(--text2); margin-top: 2px; overflow-wrap: anywhere; }
.prep-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text2);
}
.feed-pill {
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}
.feed-pill.red    { color: #fff; background: var(--red); }
.feed-pill.yellow { color: #fff; background: var(--orange); }
.feed-pill.green  { color: var(--green); background: color-mix(in srgb, var(--green) 15%, transparent); }
.feed-pill.gray   { color: var(--gray); background: color-mix(in srgb, var(--gray) 15%, transparent); }

/* ── 日历 ───────────────────────────────────── */

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cal-nav button {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 17px;
  padding: 8px 14px;
}
.cal-title { font-size: 17px; font-weight: 600; }
.cal-today-btn { font-size: 14px !important; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-dow {
  text-align: center;
  font-size: 12px;
  color: var(--text2);
  padding: 6px 0;
}
.cal-day {
  position: relative;
  min-height: 52px;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 16px;
  padding: 5px 0 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cal-day.other { color: var(--sep); }
.cal-day.today .cal-num {
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
}
.cal-day.selected { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cal-day.planned-overdue .cal-num { color: var(--red); font-weight: 700; }
.cal-num {
  width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-dots {
  position: absolute;
  bottom: 4px;
  display: flex;
  gap: 3px;
  height: 6px;
}
.cal-dots i {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: block;
}
.cal-dots i.hollow { background: none; border: 1.5px solid; }
.cal-legend { font-size: 12px; color: var(--text2); margin-top: 8px; line-height: 1.8; }
.cal-legend i {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin: 0 4px 0 10px;
}
.cal-legend i.hollow { background: none; border: 1.5px solid; }

/* 日历详情明细组 */
.mark-group { padding: 10px 16px; }
.mark-group + .mark-group { border-top: 0.5px solid var(--sep); }
.mark-group-title { font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 4px; }
.mark-item { font-size: 15px; padding: 2px 0; overflow-wrap: anywhere; }
.mark-item.overdue { color: var(--red); }

/* ── 病毒 ───────────────────────────────────── */

.batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.batch-name { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.batch-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text2);
}
.batch-stats b { color: var(--text); font-weight: 600; }

/* ── 搜索 ───────────────────────────────────── */

.search-box {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 4px 0 10px;
  background: var(--bg);
}
.search-box input {
  width: 100%;
  font-size: 17px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  outline: none;
}

/* ── Episome 课题看板 ───────────────────────── */

.kb-proj { margin-bottom: 12px; }
.kb-proj > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 4px;
  cursor: pointer;
  list-style: none;
}
.kb-proj > summary::-webkit-details-marker { display: none; }
.kb-proj-name { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.kb-proj-stats { font-size: 13px; color: var(--text2); margin-left: auto; }

.kb-pl { border-top: 0.5px solid var(--sep); }
.kb-pl:first-child { border-top: none; }
.kb-pl > summary { padding: 10px 16px; cursor: pointer; list-style: none; }
.kb-pl > summary::-webkit-details-marker { display: none; }
.kb-pl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.kb-pl-name { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }

.kb-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.kb-chip {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.kb-chip b { font-weight: 600; margin-right: 3px; }
.kb-chip.st-ok      { color: var(--green);  background: color-mix(in srgb, var(--green) 15%, transparent); }
.kb-chip.st-partial { color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, transparent); }
.kb-chip.st-fail    { color: var(--red);    background: color-mix(in srgb, var(--red) 13%, transparent); }
.kb-chip.st-pending { color: var(--text2);  background: color-mix(in srgb, var(--gray) 12%, transparent); }
.kb-chip.st-na      { color: var(--text2);  background: color-mix(in srgb, var(--gray) 7%, transparent); opacity: 0.75; }
.kb-chip.st-none    { color: var(--text2);  background: none; border-color: var(--sep); opacity: 0.6; }

.kb-next { font-size: 13px; color: var(--text2); margin-top: 6px; }
.kb-next.urgent { color: var(--red); font-weight: 600; }

.kb-detail { padding: 4px 16px 12px; }
.kb-detail-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  font-size: 13px;
}
.kb-detail-row .kb-chip { flex-shrink: 0; min-width: 52px; text-align: center; }
.kb-detail-text { color: var(--text2); overflow-wrap: anywhere; }

/* ── Murine Phase 2 可编辑(触控目标 ≥44px) ── */
.murine-row {
  display: flex;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  min-height: 44px;
  align-items: center;
}
.murine-back {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 16px;
  padding: 8px 0;
  min-height: 44px;
  cursor: pointer;
}
.murine-form { padding: 10px 0; border-top: 0.5px solid var(--sep); }
.murine-form:first-child { border-top: none; }
.murine-form-title { font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.murine-form-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.murine-form-row input, .murine-form-row select,
.murine-geno-row select, #murine-cage, #murine-note {
  font-size: 16px;              /* iOS ≥16px 输入框不自动缩放 */
  padding: 8px 10px;
  min-height: 44px;
  border: 0.5px solid var(--sep);
  border-radius: 8px;
  background: var(--card);
  color: inherit;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}
.murine-form-row input[type="number"] { flex: 0 0 70px; }
.murine-btn {
  font-size: 15px;
  font-weight: 600;
  min-height: 44px;
  padding: 8px 16px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.murine-btn.secondary { background: color-mix(in srgb, var(--gray) 18%, transparent); color: inherit; }
.murine-msg { font-size: 13px; min-height: 18px; }
.murine-msg.ok { color: var(--green); }
.murine-msg.err { color: var(--red); }
.murine-geno-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}
.murine-geno-gene { font-family: ui-monospace, monospace; font-size: 15px; min-width: 80px; }
.murine-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.murine-status-btn {
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--sep);
  border-radius: 10px;
  background: none;
  color: inherit;
  cursor: pointer;
}
.murine-status-btn.cur { background: var(--accent); border-color: var(--accent); color: #fff; }
.murine-sex { min-width: 76px; }

/* ── Murine v2 笼中心化(勾选批量 / 交配笼 / 批量条) ── */
.murine-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px 8px;
}
.murine-check { width: 22px; color: var(--accent); font-size: 15px; flex-shrink: 0; }
.murine-row.sel { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.murine-btn.danger { background: var(--red); }
.murine-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 16px 10px;
}
.murine-subnav-btn {
  font-size: 15px;
  padding: 8px 14px;
  min-height: 40px;
  border: 0.5px solid var(--sep);
  border-radius: 20px;
  background: var(--card);
  color: inherit;
}
.murine-subnav-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.murine-badge {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.murine-batchbar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--card);
  border-top: 0.5px solid var(--sep);
  z-index: 5;
}
.murine-batchbar select {
  font-size: 15px;
  min-height: 44px;
  padding: 6px 10px;
  border: 0.5px solid var(--sep);
  border-radius: 8px;
  background: var(--card);
  color: inherit;
}
.murine-batchbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-basis: 100%;
}
.murine-batchbar-row input[type="date"] {
  font-size: 15px;
  min-height: 44px;
  padding: 6px 10px;
  border: 0.5px solid var(--sep);
  border-radius: 8px;
  background: var(--card);
  color: inherit;
}
.murine-cage { border-top: 0.5px solid var(--sep); }
.murine-cage:first-child { border-top: none; }
.murine-cage > summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 16px 4px;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
}
.murine-cage > summary::-webkit-details-marker { display: none; }
.murine-cage-name { font-size: 16px; font-weight: 600; }
.murine-cage-body { padding: 0 16px 10px; }
.murine-litter { border-top: 0.5px solid var(--sep); padding: 6px 0; }
.murine-pup-row input { flex: 1; }
#murine-cage-sel {
  font-size: 16px;
  min-height: 44px;
  padding: 8px 10px;
  border: 0.5px solid var(--sep);
  border-radius: 8px;
  background: var(--card);
  color: inherit;
  width: 100%;
  box-sizing: border-box;
}

/* ── Murine 批量登记(Add Mice) ── */
.murine-addmice > summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
}
.murine-addmice > summary::-webkit-details-marker { display: none; }
.murine-addmice .murine-form { padding: 0 16px 10px; border-top: none; }
.murine-addmice textarea {
  font-size: 16px;
  font-family: ui-monospace, monospace;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 0.5px solid var(--sep);
  border-radius: 8px;
  background: var(--card);
  color: inherit;
  resize: vertical;
}
.murine-addmice input[type="date"] {
  font-size: 15px;
  min-height: 44px;
  padding: 6px 10px;
  border: 0.5px solid var(--sep);
  border-radius: 8px;
  background: var(--card);
  color: inherit;
}

/* ── Murine 笼位合并 + 筛选条 ── */
.murine-kind {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  min-height: 28px;
  border: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  cursor: pointer;
}
.murine-kind[data-kind="mating"] {
  background: color-mix(in srgb, #ff2d55 15%, transparent);
  color: #ff2d55;
}
.murine-toolbar select {
  font-size: 14px;
  min-height: 36px;
  padding: 4px 8px;
  border: 0.5px solid var(--sep);
  border-radius: 8px;
  background: var(--card);
  color: inherit;
  max-width: 34vw;
}
.murine-toolbar input[type="text"], .murine-toolbar input:not([type]) {
  font-size: 14px;
  min-height: 36px;
  padding: 4px 10px;
  border: 0.5px solid var(--sep);
  border-radius: 8px;
  background: var(--card);
  color: inherit;
  min-width: 120px;
}
.murine-toolbar input[type="checkbox"] { width: 18px; height: 18px; }

/* ── Murine Ask AI 聊天面板 ── */
.murine-chat {
  max-height: 260px;
  overflow-y: auto;
  padding: 4px 0 8px;
}
.murine-bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 14px;
  margin: 6px 0;
  font-size: 15px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.murine-bubble.me {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.murine-bubble.ai {
  margin-right: auto;
  background: color-mix(in srgb, var(--gray) 14%, transparent);
  border-bottom-left-radius: 4px;
}
.murine-chips { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.murine-chip {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
}
.murine-chip.ok  { color: var(--green); background: color-mix(in srgb, var(--green) 15%, transparent); }
.murine-chip.err { color: var(--red);   background: color-mix(in srgb, var(--red) 13%, transparent); }

/* ── Murine 审核箱 + 变动日志 ── */
.murine-log-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  font-size: 13px;
}
.murine-log-ts { color: var(--text2); font-family: ui-monospace, monospace; font-size: 12px; flex-shrink: 0; }
.murine-log-detail { overflow-wrap: anywhere; }

/* ── Murine chat 确定性落款 ── */
.murine-staged {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}

/* ── Murine v3:待确认徽标 + 写入高亮 + chat 重置 ── */
.murine-unconf {
  color: var(--orange);
  background: color-mix(in srgb, var(--yellow) 25%, transparent);
  font-weight: 600;
}
@keyframes murineFlash {
  0%   { box-shadow: 0 0 0 2px var(--green); background: color-mix(in srgb, var(--green) 18%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent;    background: transparent; }
}
.murine-flash {
  animation: murineFlash 0.9s ease-out 3;
  border-radius: 10px;
}
.murine-reset {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 13px;
  padding: 6px 4px;
  min-height: 32px;
  cursor: pointer;
}

/* ── Murine 审核笼架(2026-09-05):笼架栅格 + 问题挂格 ── */
.rack-grid { overflow-x: auto; padding: 4px; }
.rack-row { display: flex; gap: 6px; margin-bottom: 6px; }
.rack-cell {
  flex: 1 0 72px;
  min-width: 72px;
  max-width: 110px;
  min-height: 64px;
  border-radius: 10px;
  border: 1px solid var(--sep);
  background: var(--bg);
  padding: 6px;
  font-size: 12px;
  text-align: left;
}
button.rack-cell { cursor: pointer; color: inherit; }
.rack-cell.rack-empty {
  color: var(--text2);
  opacity: 0.45;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rack-cage .rack-pos { font-weight: 700; font-size: 13px; }
.rack-cage .rack-strain {
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rack-cage .rack-count { margin-top: 2px; }
.rack-cage.sel { outline: 2px solid var(--accent); }
.rack-cage.rack-alert {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px var(--orange);
  background: color-mix(in srgb, var(--orange) 10%, var(--bg));
}
.rack-badges { margin-top: 3px; display: flex; gap: 4px; }
.rack-badge { font-size: 11px; }
.rack-q.done .row-title { color: var(--text2); font-weight: 400; }
.rack-q input { flex: 1; min-width: 0; }

/* 缓存徽标(2026-09-07 手机端 GET 缓存) */
.cache-badge {
  font-size: 11px;
  color: #8e8e93;
  background: #e5e5ea;
  border-radius: 8px;
  padding: 2px 8px;
  margin-right: 6px;
  white-space: nowrap;
}

/* ── LabChat 记录 tab(2026-09-11):气泡/输入行复用 murine chat 类,只补缺的 ── */
.pending-card {
  border: 1px solid var(--orange);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 6px 0;
}
.pending-summary { margin-bottom: 6px; font-size: 14px; }
.pending-btns { display: flex; gap: 8px; }
.pending-ok { color: var(--green); }
.pending-no { color: var(--red); }
.labchat-pending-title { font-weight: 600; margin: 4px 0; }
.labchat-action { font-size: 12px; margin: 4px 0 0; }
.labchat-action.ok { color: var(--green); }
.labchat-action.err { color: var(--red); }
