/* 云筑：设计师主导的装修项目交付协同平台
   视觉：深蓝色系（参考 Inspire AI 模版配色）；图纸的图签与比例尺、文书的印章；手机优先 */
:root {
  --paper: #f4f8fd;      /* 浅底 */
  --sheet: #ffffff;
  --ink: #111111;        /* 正文 */
  --ink-2: #33415c;
  --mute: #5b6472;       /* 辅助灰 */
  --line: #c6d7ea;       /* 描边 */
  --line-2: #e3ecf6;
  --navy: #052a66;       /* 主色 */
  --navy-deep: #071541;  /* 小标题、深底 */
  --green: #052a66;      /* 主操作色（沿用变量名） */
  --green-2: #eaf2fb;
  --brass: #0070c0;      /* 强调蓝 */
  --brass-2: #e6f1fa;
  --num: #0b55d9;        /* 序号蓝 */
  --cyan: #00a8e8;       /* 点缀青 */
  --warn: #b4690e;       /* 等待、关口 */
  --warn-2: #fdf3e3;
  --seal: #c0392b;       /* 拦截、不一致、不合格 */
  --seal-2: #fbe9e7;
  --ok: #0070c0;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Heiti SC",
    "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
  --serif: var(--sans);
  --numfont: "Century Gothic", "Avenir Next", "Futura", var(--sans);
  --r: 6px;
  --tab-h: 62px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.6 var(--sans);
  font-variant-numeric: tabular-nums;
}
a { color: var(--green); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--navy-deep); }
.serif { font-family: var(--serif); font-weight: 600; color: var(--navy-deep); }
.mute { color: var(--mute); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.hstack { display: flex; align-items: center; gap: 8px; }
.hstack.wrap { flex-wrap: wrap; }
.vstack { display: flex; flex-direction: column; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- 外框 */
.app { max-width: 760px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px); }
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff;
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  border-bottom: 2px solid var(--brass);
}
.topbar h1 { font-size: 18px; letter-spacing: .02em; color: #fff; }
.topbar .back { border: 0; background: none; padding: 4px 8px 4px 0; color: #fff; font-size: 15px; cursor: pointer; }
.topbar .topsub { font-size: 12px; color: #a9c3e2; }
.topbar a, .topbar .mute { color: #dbe8f6; }
.page { padding: 14px 16px 24px; }
.section { margin-top: 22px; }
.section > .head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.section > .head h2 { font-size: 16px; padding-left: 9px; border-left: 3px solid var(--brass); line-height: 1.2; }
.section > .head .act { font-size: 14px; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--sheet); border-top: 1px solid var(--line);
  display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom);
}
.tabs .inner { display: flex; width: 100%; max-width: 760px; }
.tabs a {
  flex: 1; height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--mute); font-size: 12px; position: relative;
}
.tabs a svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.tabs a.on { color: var(--navy); font-weight: 600; }
.tabs a.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; background: var(--brass); }
.tabs .dot { position: absolute; top: 9px; left: calc(50% + 8px); min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--seal); color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; }

/* ---------------------------------------------------------------- 图签：项目抬头 */
.titleblock { border: 1.5px solid var(--navy); background: var(--sheet); display: grid; grid-template-columns: 1fr auto; border-radius: 4px; overflow: hidden; }
.titleblock .name { padding: 12px 14px 10px; border-right: 1px solid var(--line); min-width: 0; }
.titleblock .name h2 { font-size: 21px; line-height: 1.3; }
.titleblock .name .sub { font-size: 12px; color: var(--mute); margin-top: 2px; }
.titleblock .cells { display: grid; grid-template-rows: 1fr 1fr; background: var(--paper); }
.titleblock .cell { padding: 6px 12px; min-width: 112px; }
.titleblock .cell + .cell { border-top: 1px solid var(--line); }
.titleblock .cell .k { font-size: 11px; color: var(--mute); }
.titleblock .cell .v { font-size: 15px; font-weight: 600; color: var(--navy); }
.titleblock .stage { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 10px 14px 12px; }

/* 主线比例尺：十个阶段 */
.scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 0; border: 1px solid var(--navy); height: 12px; }
.scale i { display: block; border-left: 1px solid var(--line); background: var(--sheet); }
.scale i:first-child { border-left: 0; }
.scale i.done { background: var(--navy); }
.scale i.cur { background: repeating-linear-gradient(135deg, var(--cyan) 0 3px, var(--brass-2) 3px 6px); }
.scale i.design:not(.done):not(.cur) { background: var(--paper); }
.scale-labels span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk-only { display: none; }
.scale-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--mute); margin-top: 4px; }
.stage-now { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.stage-now .num { font-family: var(--numfont); font-size: 28px; font-weight: 700; line-height: 1; color: var(--num); }
.stage-now .num small { font-size: 14px; color: var(--mute); }
.stage-now .nm { font-size: 17px; font-weight: 600; color: var(--navy-deep); }

/* ---------------------------------------------------------------- 状态与印章 */
.st { display: inline-block; font-size: 12px; line-height: 18px; padding: 0 7px; border-radius: 3px; background: var(--line-2);
  color: var(--ink-2); white-space: nowrap; }
.st.go { background: var(--brass-2); color: #005a9c; }
.st.wait { background: var(--warn-2); color: var(--warn); }
.st.bad { background: var(--seal-2); color: var(--seal); }
.st.done { background: transparent; color: var(--mute); border: 1px solid var(--line); line-height: 16px; }
.stamp { display: inline-block; border: 2px solid currentColor; padding: 1px 9px; font-weight: 700; font-size: 15px;
  letter-spacing: .18em; transform: rotate(-3deg); border-radius: 3px; white-space: nowrap; }
.stamp.ok { color: var(--ok); }
.stamp.bad { color: var(--seal); }
.stamp.brass { color: var(--warn); }
.rule { display: inline-block; font-size: 11px; line-height: 17px; padding: 0 5px; border-radius: 3px; border: 1px solid #8fb4dc;
  color: #005a9c; background: #f4f8fd; white-space: nowrap; cursor: help; font-family: var(--numfont); }
.rule.bad { border-color: var(--seal); color: var(--seal); }

/* ---------------------------------------------------------------- 列表与面板 */
.panel { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); }
.panel.pad { padding: 12px 14px; }
.rows { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row { display: flex; gap: 10px; padding: 11px 14px; align-items: flex-start; color: inherit; position: relative; }
.row + .row { border-top: 1px solid var(--line-2); }
.row:active { background: var(--brass-2); }
.row .main { flex: 1; min-width: 0; }
.row .t { font-size: 15px; line-height: 1.45; }
.row .m { font-size: 12px; color: var(--mute); margin-top: 2px; }
.row .side { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row.strong::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--seal); }
.row.gate::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--warn); }
.row.mine::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--brass); }
.code { font-size: 12px; color: var(--num); letter-spacing: .02em; font-family: var(--numfont); }
.kv { display: grid; grid-template-columns: 7.5em 1fr; gap: 6px 12px; font-size: 14px; }
.kv .k { color: var(--mute); }
.empty { padding: 26px 16px; text-align: center; color: var(--mute); font-size: 14px; }
.notice { padding: 10px 12px; border-radius: var(--r); background: var(--brass-2); color: #0b3a75; font-size: 13px; border-left: 3px solid var(--brass); }
.notice.bad { background: var(--seal-2); color: var(--seal); border-left-color: var(--seal); }
.notice.go { background: #e8f4ff; color: var(--navy); border-left-color: var(--navy); }
.seg { display: flex; gap: 4px; background: var(--line-2); padding: 3px; border-radius: 8px; overflow-x: auto; }
.seg button { flex: 1; border: 0; background: none; padding: 6px 10px; border-radius: 6px; font-size: 14px; color: var(--ink-2);
  white-space: nowrap; cursor: pointer; }
.seg button.on { background: var(--navy); color: #fff; box-shadow: none; }

/* 关口 */
.gates { display: flex; flex-direction: column; gap: 6px; }
.gate-item { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.gate-item .mark { width: 18px; height: 18px; flex: none; border: 1.5px solid var(--ink-2); border-radius: 2px; margin-top: 2px;
  display: grid; place-items: center; font-size: 12px; }
.gate-item.ok .mark { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------------------------------------------------------------- 会话 */
.msg { display: flex; gap: 10px; padding: 12px 0; }
.msg + .msg { border-top: 1px dashed var(--line); }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 14px;
  background: var(--navy); color: #fff; font-weight: 600; }
.avatar.r-业主, .avatar.r-家人 { background: var(--brass); color: #fff; }
.avatar.r-监理 { background: #00739e; color: #fff; }
.avatar.r-班组, .avatar.r-供应商 { background: #dfe7f1; color: var(--ink-2); }
.msg .who { font-size: 13px; color: var(--ink-2); }
.msg .who b { color: var(--ink); font-weight: 600; }
.msg .text { font-size: 15px; margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.thumbs a, .thumbs .t { width: 84px; height: 84px; border-radius: 4px; overflow: hidden; background: var(--line-2); flex: none;
  display: grid; place-items: center; font-size: 11px; color: var(--mute); text-align: center; padding: 4px; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.req { margin-top: 8px; border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 4px; padding: 8px 10px;
  background: #fffcf6; }
.req.done { border-left-color: var(--navy); background: var(--sheet); }
.req .lab { font-size: 11px; color: var(--warn); letter-spacing: .05em; }
.req.done .lab { color: var(--navy); }
.req .refined { font-size: 15px; font-weight: 600; margin: 2px 0 6px; }
.composer { position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); background: var(--paper);
  padding: 10px 0 6px; border-top: 1px solid var(--line); margin-top: 12px; }

/* ---------------------------------------------------------------- 表单与按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--green); background: var(--green);
  color: #fff; border-radius: var(--r); padding: 9px 16px; font-size: 15px; cursor: pointer; white-space: nowrap; }
.btn.ghost { background: var(--sheet); color: var(--navy); border-color: #8fb4dc; }
.btn.brass { background: var(--brass); border-color: var(--brass); }
.btn.bad { background: transparent; border-color: var(--seal); color: var(--seal); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 13px; color: var(--ink-2); }
.field > span em { color: var(--seal); font-style: normal; }
.input, select.input, textarea.input { width: 100%; border: 1px solid #b8cde4; background: #fff; border-radius: var(--r);
  padding: 9px 11px; font-size: 16px; }
textarea.input { min-height: 84px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.check input { width: 18px; height: 18px; accent-color: var(--brass); }
.icon-btn { border: 1px solid var(--line); background: var(--sheet); border-radius: var(--r); width: 42px; height: 42px; display: grid;
  place-items: center; cursor: pointer; flex: none; color: var(--ink-2); }
.icon-btn svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.icon-btn.rec { border-color: var(--seal); color: var(--seal); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { background: var(--seal-2); } }
@media (prefers-reduced-motion: reduce) { .icon-btn.rec { animation: none; } .sheet { animation: none !important; } }

/* 底部弹出层 */
.backdrop { position: fixed; inset: 0; background: rgba(7, 21, 65, .45); z-index: 50; display: flex; align-items: flex-end;
  justify-content: center; }
.sheet { background: var(--sheet); width: 100%; max-width: 760px; max-height: 88vh; overflow: auto; border-radius: 14px 14px 0 0;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); animation: up .18s ease-out; }
.sheet h3 { font-size: 17px; margin-bottom: 12px; }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + 24px); z-index: 60;
  background: var(--navy-deep); color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 14px; max-width: 90vw; }
.toast.bad { background: var(--seal); }
.block-msg { display: flex; gap: 8px; align-items: flex-start; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; color: var(--mute); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; }
.bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brass); }
.bar.bad i { background: var(--seal); }

/* 登录 */
.login-bg { min-height: 100vh; background: radial-gradient(120% 70% at 85% 0%, #0b3f8f 0%, var(--navy) 45%, var(--navy-deep) 100%); }
.login { max-width: 420px; margin: 0 auto; padding: calc(12vh + env(safe-area-inset-top)) 24px 40px; color: #fff; }
.login .mark { font-size: 46px; font-weight: 700; letter-spacing: .32em; color: #fff; line-height: 1.1; }
.login .mark::after { content: ""; display: block; width: 44px; height: 4px; background: var(--cyan); margin-top: 14px; }
.login .tag { color: #b9cfe9; margin: 14px 0 30px; font-size: 14px; display: block; white-space: normal; padding: 0;
  line-height: 1.6; background: none; border-radius: 0; }  /* 不受筑园记里小标签 .tag 的样式影响 */
.login .tenant-hint { margin-top: -6px; color: var(--mute); }
.login .tb { padding: 20px 16px; background: var(--sheet); border-radius: 10px; color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.login p a { color: #8fd3f4; }
.login p.mute, .login .small.mute { color: #b9cfe9; }

/* 项目卡 */
.proj { display: block; border: 1px solid var(--line); border-top: 3px solid var(--navy); border-radius: 6px; background: var(--sheet);
  color: inherit; margin-bottom: 12px; overflow: hidden; }
.proj .top { padding: 12px 14px; display: flex; justify-content: space-between; gap: 10px; }
.proj h2 { font-size: 18px; }
.proj .bottom { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr 1fr; font-size: 13px; background: var(--paper); }
.proj .bottom div { padding: 6px 12px; }
.proj .bottom div + div { border-left: 1px solid var(--line); }
.bignum { font-family: var(--numfont); font-size: 26px; font-weight: 700; color: var(--num); line-height: 1.1; }
.proj .bottom .k { color: var(--mute); font-size: 11px; display: block; }

/* 报表页框 */
.report-frame { width: 100%; height: calc(100vh - 140px); border: 1px solid var(--line); background: #fff; border-radius: var(--r); }

@media (min-width: 960px) {
  .app { max-width: 900px; padding-left: 96px; padding-bottom: 32px; }
  .tabs { top: 0; bottom: 0; right: auto; width: 84px; border-top: 0; border-right: 1px solid var(--line); flex-direction: column;
    justify-content: flex-start; padding-top: 80px; }
  .tabs .inner { flex-direction: column; }
  .tabs a { height: 72px; flex: none; }
  .tabs a.on::before { top: 20%; bottom: 20%; left: 0; right: auto; width: 2px; height: auto; }
  .composer { bottom: 0; }
  .toast { bottom: 32px; }
  .desk-only { display: block; }
  .mobile-only { display: none; }
}

/* 电脑上：设计师、设计助理在大屏幕上工作，内容区放宽，侧栏显示文字 */
@media (min-width: 1200px) {
  .app { max-width: 1180px; margin: 0 auto 0 164px; padding-left: 28px; padding-right: 28px; }
  .tabs { width: 164px; }
  .tabs a { flex-direction: row; justify-content: flex-start; gap: 12px; padding-left: 24px; height: 56px; font-size: 15px; }
  .report-frame { height: calc(100vh - 120px); }
}

/* ---------------------------------------------------------------- 看图（页面内打开，不开新窗口） */
.viewer { position: fixed; inset: 0; z-index: 80; background: #050b1a; color: #fff; display: flex; flex-direction: column; }
.viewer-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top));
  background: rgba(5, 42, 102, .92); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.viewer-btn { border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; border-radius: 6px; padding: 6px 12px;
  font-size: 14px; cursor: pointer; white-space: nowrap; }
.viewer-name { font-size: 13px; color: #c6d7ea; }
.viewer-count { font-size: 13px; color: #c6d7ea; font-family: var(--numfont); }
.viewer-body { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; touch-action: pinch-zoom; }
.viewer-body.zoom { overflow: auto; display: block; -webkit-overflow-scrolling: touch; }
.viewer-body.zoom img { max-width: none; max-height: none; cursor: zoom-out; }
.viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.viewer-body video { max-width: 100%; max-height: 100%; }
.viewer-other { text-align: center; color: #c6d7ea; line-height: 2.2; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 64px; border: 0; border-radius: 6px;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 30px; cursor: pointer; }
.viewer-nav.prev { left: 8px; }
.viewer-nav.next { right: 8px; }
.viewer-tip { text-align: center; font-size: 12px; color: #8ea6c4; padding: 6px 12px calc(8px + env(safe-area-inset-bottom)); }

/* ---------------------------------------------------------------- 作品（工作室空间） */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.case-card { display: block; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: inherit; }
.case-card img, .case-card .noimg { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--line-2); }
.case-card .noimg { display: grid; place-items: center; color: var(--mute); font-size: 13px; }
.case-card .b { padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.case-card .t { font-weight: 600; }
.case-card .m { font-size: 12px; color: var(--mute); }

/* ---------------------------------------------------------------- 会话：像微信一样的聊天流 */
.snap-btn { height: 50px; font-size: 16px; background: var(--brass); border-color: var(--brass); }
.snap-btn svg, .btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.chatrow { align-items: center; }
.av-sq { width: 44px; height: 44px; flex: none; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 16px; font-weight: 600; }
.av-grp { background: var(--navy); }
.av-in { background: var(--warn); }
.av-dm { background: #33415c; }
.av-topic { background: #dfe7f1; color: var(--navy); }
.badge-n { min-width: 20px; height: 20px; border-radius: 10px; background: var(--seal); color: #fff; font-size: 12px; display: inline-grid;
  place-items: center; padding: 0 6px; box-sizing: border-box; font-family: var(--numfont); }
.linkish { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font-family: inherit; line-height: 1.5; }
.chat { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.cm { display: flex; gap: 8px; align-items: flex-start; }
.cm.me { flex-direction: row-reverse; }
.cm .col { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; max-width: min(80%, 540px); min-width: 0; }
.cm.me .col { align-items: flex-end; }
.cm .who { font-size: 12px; color: var(--mute); }
.cm .req { width: 100%; box-sizing: border-box; }
.bub { background: var(--sheet); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 11px; font-size: 15px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word; max-width: 100%; box-sizing: border-box; }
.cm.me .bub { background: #d7e8fa; border-color: #b7d3f0; }
.bub .thumbs { margin-top: 6px; }
.avatar.av-bot { background: var(--brass); }
.sysline { align-self: center; font-size: 12px; color: var(--mute); background: var(--line-2); border-radius: 4px; padding: 3px 10px; }
.daysep { align-self: center; font-size: 12px; color: var(--mute); }
.askcard { border: 1px solid #e3bd84; background: var(--warn-2); border-radius: 8px; padding: 8px 10px; width: 100%; max-width: 380px; box-sizing: border-box; }
.askcard.done { border-color: var(--line); background: var(--sheet); }
.botcard { border: 1px solid var(--brass); background: var(--sheet); border-radius: 8px; padding: 10px 12px; max-width: 420px; box-sizing: border-box; }
.recall-btn { border: 0; background: none; color: var(--brass); font-size: 12px; padding: 2px 0; cursor: pointer; }
.cbar { display: flex; gap: 6px; align-items: flex-end; }
.cbar textarea { min-height: 42px; resize: none; }
.cbar .at-btn { font-size: 18px; font-weight: 600; color: var(--navy); }
.cbar .send-btn { height: 42px; padding: 0 14px; }
.plus-panel { padding-bottom: 8px; }
.row.pick { width: 100%; text-align: left; border: 0; background: var(--sheet); font: inherit; color: inherit; cursor: pointer; }
.rows .row.pick + .row.pick { border-top: 1px solid var(--line-2); }

/* ================================================================ 筑园记：业主和家人的空间（暖色，一看就回到家）
   只在 #/home/… 下生效（html[data-theme="home"]）；项目里同各方沟通的页面保持深蓝。
   筑思堂（工作室）用 html[data-theme="studio"]，在文件最后。 */
html[data-theme="home"] {
  --paper: #f3f5f3; --sheet: #ffffff; --ink: #1c2320; --ink-2: #33403a; --mute: #55625c;
  --line: #d6ddd9; --line-2: #e8ecea; --navy: #9e4f1b; --navy-deep: #1c2320; --green: #9e4f1b; --green-2: #f4e7dd;
  --brass: #9e4f1b; --brass-2: #f4e7dd; --num: #9e4f1b; --cyan: #d9a27d; --warn: #8a5a00; --warn-2: #fbf0d9;
  --seal: #b3261e; --seal-2: #fbe9e7; --ok: #2e6b3a; --ok-2: #e4f1e6;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --numfont: var(--serif);
}
html[data-theme="home"] body { background: var(--paper); }
html[data-theme="home"] .btn.ghost { border-color: var(--line); }
html[data-theme="home"] .input, html[data-theme="home"] select.input, html[data-theme="home"] textarea.input { border-color: var(--line); }
html[data-theme="home"] .backdrop { background: rgba(28, 35, 32, .45); }
html[data-theme="home"] .toast { background: var(--ink); }
html[data-theme="home"] .notice { background: var(--brass-2); color: #6f3712; }
html[data-theme="home"] .st.go { background: var(--brass-2); color: var(--navy); }
html[data-theme="home"] .row:active { background: var(--brass-2); }
html[data-theme="home"] .rule { border-color: #d9a27d; color: var(--navy); background: #fbf6f1; }

.htop { position: sticky; top: 0; z-index: 20; background: var(--sheet); display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); border-bottom: 2px solid var(--navy); }
.htop .brand { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--navy); letter-spacing: .12em; }
.htop .sub { font-size: 12px; color: var(--mute); }
.htop a { color: var(--navy); font-size: 14px; }
.hback { white-space: nowrap; }
.plate { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.plate .eyebrow { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; letter-spacing: .08em; color: var(--mute); }
.plate h1 { font-family: var(--serif); font-size: 30px; line-height: 1.2; font-weight: 700; color: var(--ink); }
.plate .stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--mute); }
.plate .stats b { color: var(--ink); }
.plate .stats b.acc { color: var(--navy); }
.segs { display: grid; gap: 3px; margin-top: 4px; }
.segs i { height: 5px; border-radius: 3px; background: var(--line); display: block; }
.segs i.done { background: var(--navy); }
.segs i.cur { background: var(--cyan); }
.hsec { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.hsec > .hh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hsec h2 { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.hsec .hh a { font-size: 13px; }
.hcard { background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex;
  flex-direction: column; gap: 8px; color: inherit; }
a.hcard:active { background: var(--brass-2); }
.hcard .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--mute); }
.hcard h3 { font-size: 16px; line-height: 1.4; color: var(--ink); font-weight: 700; margin: 0; }
.hkv { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); gap: 5px 10px; font-size: 14px; }
.hkv .k { color: var(--mute); }
.hbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.hbtns .btn { flex: 1; min-height: 44px; font-size: 15px; }
.hbtns .btn.sm { flex: 0 0 auto; min-height: 36px; }
.hnote { font-size: 12px; color: var(--mute); margin: 0; }
.hask { display: flex; align-items: center; gap: 8px; background: var(--sheet); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px 6px 6px 12px; }
.hask input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; min-width: 0; padding: 6px 0; }
.hask .btn { padding: 7px 14px; }
.tag { display: inline-block; font-size: 12px; line-height: 18px; padding: 0 7px; border-radius: 4px; white-space: nowrap;
  background: var(--line-2); color: var(--ink-2); }
.tag.ok { background: var(--ok-2, #e4f1e6); color: var(--ok, #2e6b3a); }
.tag.wait { background: var(--warn-2); color: var(--warn); }
.tag.bad { background: var(--seal-2); color: var(--seal); }
.tag.acc { background: var(--brass-2); color: var(--navy); }
.tag.line { background: transparent; border: 1px solid var(--cyan); color: var(--navy); line-height: 16px; }
.wk { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.wk div { display: flex; gap: 8px; }
.wk b { white-space: nowrap; }
.wk b.g { color: var(--ok, #2e6b3a); }
.wk b.a { color: var(--navy); }
.att { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-2); border-radius: 8px; padding: 8px 10px; font-size: 13px; color: inherit; }
.att b { color: var(--warn); white-space: nowrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line); background: var(--sheet);
  color: var(--ink); cursor: pointer; white-space: nowrap; }
.chip.on { border-color: var(--navy); background: var(--brass-2); color: var(--navy); font-weight: 700; }
.mtx { display: grid; gap: 3px; font-size: 12px; text-align: center; align-items: center; }
.mtx .rh { text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.mtx .ch { color: var(--mute); font-size: 11.5px; line-height: 1.3; }
.mtx button { border: 0; border-radius: 4px; padding: 3px 0; font-size: 12px; cursor: pointer; background: transparent; color: var(--line); }
.mtx button.ok { background: var(--ok-2, #e4f1e6); color: var(--ok, #2e6b3a); }
.mtx button.miss { background: var(--warn-2); color: var(--warn); font-weight: 700; }
.mtx button.wait { background: var(--paper); color: var(--mute); }
.hbar { position: relative; height: 26px; }
.hbar .track { position: absolute; left: 0; right: 0; top: 6px; height: 10px; border-radius: 5px; background: var(--paper); border: 1px solid var(--line); }
.hbar .fill { position: absolute; left: 0; top: 6px; height: 10px; border-radius: 5px 0 0 5px; background: var(--navy); }
.hbar .pend { position: absolute; top: 6px; height: 10px; background: #d9a23b; min-width: 3px; }
.hbar .mark { position: absolute; top: 0; width: 2px; height: 22px; background: var(--ink); }
.hbar .mark.warn { background: var(--seal); }
.big { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1.1; color: var(--ink); }
.pkbar { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; }
.pkbar i { display: block; height: 8px; border-radius: 4px; background: var(--cyan); }
.tl { position: relative; padding-left: 20px; display: flex; flex-direction: column; }
.tl::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--cyan); }
.tl .m { position: relative; padding-bottom: 14px; display: flex; flex-direction: column; gap: 3px; }
.tl .m::before { content: ""; position: absolute; left: -19px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--navy); border: 2px solid var(--paper); box-sizing: border-box; }
.tl .m.k-定下::before { background: var(--cyan); }
.tl .m.k-家人::before { background: #c9b28e; }
.tl .d { font-size: 12px; color: var(--mute); }
.tl .t { font-size: 15px; font-weight: 700; }
.tl .x { font-size: 13px; color: var(--mute); }
.stat3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; text-align: center; }
.stat3 > div { background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; padding: 6px 0; }
.stat3 b { display: block; font-family: var(--serif); font-size: 22px; color: var(--ink); }
.stat3 span { font-size: 12px; color: var(--mute); }
.wl { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.wl + .wl { border-top: 1px solid var(--line-2); }
.cmt { font-size: 13px; display: flex; gap: 6px; align-items: baseline; }
.cmt > b:first-child, .cmt > .tag { white-space: nowrap; flex: none; }
.cite { color: var(--navy); font-size: 12px; vertical-align: super; }
.answer { font-size: 15px; white-space: pre-wrap; line-height: 1.7; }
.qbub { align-self: flex-end; max-width: 82%; background: var(--navy); color: #fff; border-radius: 14px 14px 4px 14px; padding: 8px 12px; font-size: 15px; }
.home-entry { display: inline-flex; align-items: center; gap: 4px; background: #f4e7dd; color: #9e4f1b !important; border-radius: 999px;
  padding: 3px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.proj .home-row { border-top: 1px solid var(--line); padding: 8px 14px; display: flex; justify-content: space-between; align-items: center;
  background: #fbf6f1; color: #9e4f1b; font-size: 14px; font-weight: 600; cursor: pointer; }
.proj .home-row small { color: #55625c; font-weight: 400; }
.clamp2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; }
html[data-theme="home"] .page { overflow-wrap: anywhere; }

/* ================================================================ 筑思堂：工作室沉淀知识、内部商量的空间（松烟墨绿、铜金、宣纸底）
   只在 #/studio/… 和筑思堂里的记录详情生效；项目里同各方沟通的页面保持深蓝。 */
html[data-theme="studio"] {
  --paper: #f5f4ef; --sheet: #ffffff; --ink: #1d2422; --ink-2: #33403b; --mute: #5a6460;
  --line: #d5dcd6; --line-2: #e7ece8; --navy: #2c5a4f; --navy-deep: #1f3f37; --green: #2c5a4f; --green-2: #e3ede8;
  --brass: #a9863f; --brass-2: #f3ecdc; --num: #2c5a4f; --cyan: #7fa898; --ok: #2c5a4f;
  --serif: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", "STSong", "Noto Serif SC", serif;
}
html[data-theme="studio"] body { background: var(--paper); }
html[data-theme="studio"] .topbar { background: var(--navy); border-bottom-color: var(--brass); }
html[data-theme="studio"] .topbar h1 { font-family: var(--serif); letter-spacing: .1em; font-size: 20px; }
html[data-theme="studio"] .topbar .topsub { color: #c9dcd4; }
html[data-theme="studio"] .topbar a, html[data-theme="studio"] .topbar .mute { color: #e3ede8; }
html[data-theme="studio"] .titleblock { border-color: var(--navy); }
html[data-theme="studio"] .titleblock .name h2 { font-family: var(--serif); }
html[data-theme="studio"] .section > .head h2 { font-family: var(--serif); font-size: 17px; }
html[data-theme="studio"] .btn.ghost { border-color: #b9cbc3; }
html[data-theme="studio"] .input, html[data-theme="studio"] select.input, html[data-theme="studio"] textarea.input { border-color: #c4d0ca; }
html[data-theme="studio"] .notice { background: var(--green-2); color: #234a40; border-left-color: var(--navy); }
html[data-theme="studio"] .st.go { background: var(--green-2); color: var(--navy); }
html[data-theme="studio"] .rule { border-color: #b9cbc3; color: var(--navy); background: #f2f6f4; }
html[data-theme="studio"] .row:active { background: var(--green-2); }
html[data-theme="studio"] .backdrop { background: rgba(31, 63, 55, .45); }
html[data-theme="studio"] .toast { background: var(--navy-deep); }

/* 图纸批注与版本对比（B02） */
.mk .viewer-btn.on { background: #fff; color: #052a66; }
.mk .viewer-btn:disabled { opacity: .4; }
.mk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(5, 42, 102, .75); }
.mk-body { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; padding: 10px; text-align: center; }
.mk-wrap { position: relative; display: inline-block; vertical-align: top; text-align: left; max-width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.mk-wrap img { display: block; max-width: 100%; height: auto; background: #fff; }
.mk-wrap.zoom { width: 220%; max-width: none; }
.mk-wrap.zoom img { width: 100%; max-width: none; }
.mk-wrap.pan { touch-action: pan-x pan-y pinch-zoom; cursor: grab; }
.rd-box { position: absolute; background: repeating-linear-gradient(45deg, rgba(20,20,20,.55) 0 8px, rgba(80,80,80,.55) 8px 16px); border: 2px solid #d62828; color: #fff; font-size: 13px; display: flex; align-items: flex-start; justify-content: flex-start; padding: 2px 4px; pointer-events: none; }
.mk-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mk-panel { background: var(--sheet, #fff); color: var(--ink, #1a2433); padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  max-height: 38vh; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.mk-item { display: flex; align-items: center; gap: 8px; }
.mk-item .input { flex: 1; }
.mk-no { flex: 0 0 24px; height: 24px; border-radius: 12px; background: #d62828; color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; }

/* 设备标签（B04）：打印时每行两个 */
.labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.label-card { display: flex; gap: 10px; align-items: center; border: 1px dashed var(--line); border-radius: 8px; padding: 10px; background: #fff; break-inside: avoid; }
.label-card img { width: 108px; height: 108px; flex: 0 0 108px; }
.label-card .t { font-weight: 600; }
.label-card .m { font-size: 12px; color: var(--mute); }
@media print {
  .no-print, .topbar, .tabbar, nav { display: none !important; }
  .labels { grid-template-columns: repeat(2, 1fr); }
  body { background: #fff; }
}

/* 通知中心（B01） */
.bell { position: relative; display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; color: inherit; }
.bell svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bell b { position: absolute; top: -2px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--seal, #c0392b);
  color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }
.row.unread .t { font-weight: 600; }
.row .dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: var(--seal, #c0392b); margin-right: 6px; vertical-align: middle; }

/* 案例公开前的授权和脱敏（B21） */
.go-text { color: var(--ok); }
.rd-step { gap: 6px; border-left: 3px solid var(--warn); }
.rd-step.ok { border-left-color: var(--ok); }
.rd-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.rd-photo { position: relative; width: 88px; height: 66px; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; cursor: pointer; }
.rd-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rd-photo span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(5, 42, 102, .78); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
/* 筑园记首页四块（B54）：资料齐全度、需要留意放在「更多」里 */
.hmore { border-top: 1px solid var(--line); padding-top: 10px; }
.hmore > summary { cursor: pointer; font-size: 14px; color: var(--navy); list-style: none; }
.hmore > summary::-webkit-details-marker { display: none; }
.hmore > summary::before { content: "▸ "; }
.hmore[open] > summary::before { content: "▾ "; }
