/* Palette Stories 营运网页（Cloudflare 版）的样式。第十八版 legacy/Index.html 的 <style> 原样搬过来，对话 5 加的放最后。 */
/* Layout: phone-first single column (max 680px), sticky top bar, segmented tabs per event, fixed bottom nav */
:root {
  --bg: #F7F4F4; --surface: #FFFFFF; --sunk: #EFE9EA; --line: #E4DADC; --fg: #2B2224; --fg2: #4F4446; --muted: #76696B;
  --accent: #8C5A60; --accent-ink: #FFFFFF; --accent-soft: #F2E5E7;
  --ok: #2E6A49; --ok-bg: #E3F0E8; --warn: #8E5B0C; --warn-bg: #F7ECD8; --bad: #A3392A; --bad-bg: #F8E4E0;
  --display: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --r: 12px; --r-sm: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171314; --surface: #211C1D; --sunk: #2A2324; --line: #3A3032; --fg: #F2ECEC; --fg2: #D6CBCD; --muted: #A7999B;
    --accent: #D4A2A8; --accent-ink: #2A1B1E; --accent-soft: #3A2A2D;
    --ok: #8FCCA8; --ok-bg: #1D3127; --warn: #E8B96B; --warn-bg: #382B16; --bad: #F09A8B; --bad-bg: #3D231F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171314; --surface: #211C1D; --sunk: #2A2324; --line: #3A3032; --fg: #F2ECEC; --fg2: #D6CBCD; --muted: #A7999B;
  --accent: #D4A2A8; --accent-ink: #2A1B1E; --accent-soft: #3A2A2D;
  --ok: #8FCCA8; --ok-bg: #1D3127; --warn: #E8B96B; --warn-bg: #382B16; --bad: #F09A8B; --bad-bg: #3D231F;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--bg); color: var(--fg); }
body { margin: 0; font: 15px/1.55 var(--body); -webkit-text-size-adjust: 100%; font-variant-numeric: tabular-nums;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
body.no-nav { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
body.locked { overflow: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 760px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 8px; min-height: 56px; }
.top-title { flex: 1; min-width: 0; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title.brand { font-family: var(--display); font-size: 19px; letter-spacing: .02em; color: var(--accent); }
.top-r { display: flex; align-items: center; gap: 4px; }
.who { font-size: 12px; color: var(--muted); white-space: nowrap; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--fg); }
.icon-btn:hover { background: var(--sunk); }
.icon-btn svg { display: block; }

main { padding-block: 16px 8px; display: flex; flex-direction: column; gap: 16px; }
.note { margin: 0; font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); font-size: 13px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); }
.loading { padding: 48px 0; text-align: center; color: var(--muted); }
.fail { padding: 20px; border-radius: var(--r); background: var(--bad-bg); color: var(--bad); }
.list { display: flex; flex-direction: column; gap: 12px; }

/* chips, pills */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; background: var(--sunk); color: var(--fg); white-space: nowrap; }
.chip b { font-weight: 600; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.zero { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.st, .al { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 12px; line-height: 1.6; white-space: nowrap; }
.st.n { background: var(--sunk); color: var(--muted); }
.st.warn, .al.warn { background: var(--warn-bg); color: var(--warn); }
.st.acc { background: var(--accent-soft); color: var(--accent); }
.st.ok, .al.ok { background: var(--ok-bg); color: var(--ok); }
.st.off { background: transparent; color: var(--muted); text-decoration: line-through; border: 1px solid var(--line); }
.al.bad, .st.bad { background: var(--bad-bg); color: var(--bad); }
.st.zero { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.sync { font-size: 12px; color: var(--accent); white-space: nowrap; margin-right: 4px; }
.syncing { color: var(--accent); font-size: 12px; white-space: nowrap; }
.row.tmp, .tmp { opacity: .72; }
/* 窄的手机：同步中的时候先不显示「谁 · 角色」，活动名才放得下 */
@media (max-width: 400px) { .sync:not([hidden]) + .who { display: none; } }
/* 第十二版：画面先变、表格还在算的格子 */
.recalc { color: var(--muted); font-size: 12px; font-weight: 400; white-space: nowrap; }
.hcard-h .recalc { margin-left: 8px; }
.st.recalc { background: transparent; color: var(--muted); border: 1px dashed var(--line); }
.help { font-size: 13px; color: var(--muted); }
.help summary { cursor: pointer; color: var(--accent); width: fit-content; }
.help ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.6; }
.help b { color: var(--fg); font-weight: 600; }
.pkd { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 12px; white-space: nowrap; }
.pkd svg { width: 13px; height: 13px; }
.rdy { color: var(--ok); font-size: 12px; white-space: nowrap; }
.mny { color: var(--accent); font-size: 12px; white-space: nowrap; }
.amt { margin-left: auto; font-weight: 600; white-space: nowrap; font-size: 14px; }
.money-line { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.money-line b { color: var(--fg); font-weight: 600; }
.money-line .owe b { color: var(--warn); }
.sum { display: flex; flex-direction: column; gap: 12px; }
.sum-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.sum-top span, .sum-grid span { display: block; font-size: 12px; color: var(--muted); }
.sum-top b { display: block; font-size: 19px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.sum-top small { font-size: 12px; color: var(--muted); margin-left: 4px; }
.sum-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; font-size: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.pos { color: var(--ok); } .neg { color: var(--bad); }
.empty-row { padding: 12px 14px; color: var(--muted); font-size: 13px; }
.grp-h.static .btn, .grp-h.static .link-btn { margin-left: 6px; }
.danger { color: var(--bad); }
.wbtn { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; text-align: left; }
.ro-note { margin: 0; font-size: 13px; color: var(--muted); }
.tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: 11px; border: 1px solid var(--line); color: var(--muted); }

/* event cards */
.card { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
button.card:hover { border-color: var(--accent); }
.ev-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ev-name { font-family: var(--display); font-size: 18px; line-height: 1.35; min-width: 0; }
.days { font-size: 13px; color: var(--accent); white-space: nowrap; font-weight: 600; }
.past .days { color: var(--muted); font-weight: 400; }
.ev-sub { font-size: 13px; color: var(--muted); margin: 2px 0 10px; }
.next { margin-top: 10px; font-size: 13.5px; }
.next span { color: var(--muted); }

/* event head */
.ev-head { display: flex; flex-direction: column; gap: 6px; }
.ev-title { margin: 0; font-family: var(--display); font-size: 24px; line-height: 1.3; text-wrap: balance; }
.ev-meta { margin: 0; color: var(--muted); font-size: 14px; }
.lock { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.nextbox { background: var(--accent-soft); border-radius: var(--r); padding: 10px 14px; font-size: 14px; }
.nextbox .k { font-size: 12px; color: var(--accent); font-weight: 600; letter-spacing: .04em; }

/* tabs */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--sunk); border-radius: 10px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 8px 4px; border-radius: 7px; font-size: 14px; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* bars and buttons */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--muted); }
.fchip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 16px; font-size: 14px; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary.bad { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.btn.primary.bad:disabled { opacity: .45; }
.why { margin: 0 0 14px; padding-left: 20px; font-size: 14.5px; line-height: 1.6; }
.why li + li { margin-top: 6px; }
.arch { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.arch .muted { display: block; margin-top: 4px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.link-btn { border: 0; background: transparent; padding: 4px 0; color: var(--accent); font-size: 13px; }

/* groups and rows */
.grp { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.grp-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 0; background: transparent; text-align: left; }
.grp-h.static { cursor: default; background: var(--sunk); padding: 8px 14px; }
.grp-n { flex: 1; min-width: 0; font-weight: 600; }
.grp-c { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.grp-c b { color: var(--warn); font-weight: 600; }
.grp-h svg { transition: transform .15s; color: var(--muted); flex: none; }
.grp-h[aria-expanded="true"] svg { transform: rotate(90deg); }
/* 活动页抬头（第六版）：资料两行大字、时间线卡、要处理清单 */
.facts { display: flex; flex-direction: column; gap: 4px; }
.facts .f1 { display: flex; align-items: center; gap: 8px; font-size: 17px; line-height: 1.35; }
.facts .f1 b { font-weight: 600; min-width: 0; }
.facts .f2 { display: flex; align-items: center; gap: 6px; font-size: 16px; color: var(--fg2); flex-wrap: wrap; line-height: 1.4; }
.facts svg { color: var(--accent); flex: none; }
/* 第十一版：搭建、拆场不在活动当天时，资料多一行 */
.facts .su { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; line-height: 1.45; color: var(--fg2); }
.facts .su svg { margin-top: 3px; }
.facts .su b { color: var(--fg); font-weight: 600; }
.facts .sep { color: var(--muted); }
.facts .link-btn { align-self: flex-start; padding: 0; }
.cdot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid #CFC3C5; flex: none; }
.cdot + .cdot { margin-left: -6px; }
.hcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tlc { padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 10px; }
.cd-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cd-n { font-size: 34px; font-weight: 700; line-height: 1; color: var(--accent); white-space: nowrap; }
.cd-n span { font-size: 14px; font-weight: 600; margin-left: 4px; color: var(--fg2); }
.cd-n.past { color: var(--muted); }
.cd-nx { text-align: right; font-size: 13.5px; line-height: 1.45; min-width: 0; }
.cd-nx .k { color: var(--muted); font-size: 12px; margin-right: 4px; }
.cd-nx .d { color: var(--muted); font-size: 12px; }
/* 第八版：横条两头各留 18px，第一个和最后一个点的字也能置中；上面一行是点和点之间隔几天 */
.tl { padding: 2px 18px 0; }
.tl-g { position: relative; height: 14px; margin-bottom: 3px; font-size: 10.5px; color: var(--muted); }
.tl-g span { position: absolute; transform: translateX(-50%); white-space: nowrap; opacity: .85; }
.tl-l span b { display: block; font-weight: 600; font-size: 11.5px; color: var(--fg2); }
.tl-l span.late b { color: var(--warn); }
.tl-l span { font-size: 10.5px; }
.tl-bar { position: relative; height: 6px; background: var(--sunk); border-radius: 3px; }
.tl-bar i { position: absolute; inset: 0 auto 0 0; background: #CBB3B6; border-radius: 3px; }
.tl-bar .m { position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2px solid #B9A6A9; transform: translate(-50%, -50%); }
.tl-bar .m.done { background: #B9A6A9; }
.tl-bar .m.late { border-color: var(--warn); background: var(--warn-bg); }
.tl-bar .m.end { border-color: var(--accent); }
.tl-bar .m.ev { border-color: var(--accent); background: var(--accent); }
.tl-bar .me { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--accent); transform: translate(-50%, -50%); }
.tl-l { position: relative; height: 32px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.tl-l span { position: absolute; transform: translateX(-50%); text-align: center; line-height: 1.3; white-space: nowrap; }
.tl-l span.l0 { transform: none; text-align: left; }
.tl-l span.l1 { transform: translateX(-100%); text-align: right; }
.tl-l span.late { color: var(--warn); font-weight: 600; }
.tl-l span.today { color: var(--accent); font-weight: 700; }
.tl-l span.end b, .tl-l span.ev b { color: var(--accent); }
/* 七个点（提前搭、第二天拆）在很窄的手机上字小一点，免得叠在一起 */
@media (max-width: 359px) { .tl.many .tl-l span { font-size: 9.5px; } .tl.many .tl-l span b { font-size: 10.5px; } }
.lockw { display: flex; align-items: center; gap: 6px; font-size: 13px; border-radius: 8px; padding: 6px 10px; }
.lockw span { flex: 1; min-width: 0; }
.lockw.warn { color: var(--warn); background: var(--warn-bg); }
.lockw.warn .link-btn { color: var(--warn); font-weight: 600; text-decoration: underline; }
.lockw.plain { color: var(--muted); padding: 0 2px; }
.lockw.ok { color: var(--ok); padding: 0 2px; }
.hcard-h { font-size: 13px; font-weight: 600; padding: 8px 14px 6px; color: var(--fg2); border-bottom: 1px solid var(--line); }
.todo { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px 9px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.todo:hover { background: var(--sunk); }
.todo .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.todo.bad .dot { background: var(--bad); }
.todo.warn .dot { background: #D39A2C; }
.todo .t { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; }
.todo .t small { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 6px; }
.todo b { font-size: 19px; font-weight: 700; line-height: 1; white-space: nowrap; }
.todo.bad b { color: var(--bad); }
.todo.warn b { color: var(--warn); }
.todo b small { font-size: 12px; font-weight: 500; margin-left: 2px; color: var(--muted); }
.todo svg { color: var(--muted); flex: none; }
.todo-none { font-size: 13px; color: var(--ok); padding: 9px 14px; border-bottom: 1px solid var(--line); }
.pgrow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 9px 14px 11px; }
.pgrow.one { grid-template-columns: 1fr; }
.pg-t { display: flex; justify-content: space-between; gap: 6px; font-size: 12.5px; color: var(--fg2); }
.pg-t b { font-weight: 600; white-space: nowrap; }
.pbar { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; margin-top: 4px; }
.pbar i { display: block; height: 100%; background: var(--accent); }
/* 笔记 */
.nline { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--accent-soft); border: 0; border-radius: 10px; padding: 8px 12px; color: var(--accent); }
.nline.empty { background: transparent; border: 1px dashed var(--line); color: var(--muted); padding: 7px 12px; }
.nline svg { flex: none; }
.nl-t { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.nl-t b { font-size: 14px; white-space: nowrap; flex: none; }
.nl-t span { font-size: 13px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notes { display: flex; flex-direction: column; gap: 8px; }
.nt-card { display: flex; flex-direction: column; gap: 5px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; }
button.nt-card:hover { border-color: var(--accent); }
.nt-text { font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.nt-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.nt-mgr { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
/* 人手页：按人看 */
.wfil { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 0; }
.wfil select { width: auto; min-width: 0; max-width: 60%; }
.rate { display: flex; justify-content: space-between; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.rate .rk { font-weight: 600; }
.rate .rk small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.rate .rv { text-align: right; white-space: nowrap; }
.rate .rv small { display: block; font-size: 12px; color: var(--muted); }
/* 第十三版：月结文字 */
.wtext { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.45; min-height: 300px; white-space: pre; overflow-x: auto; }
.payto { color: var(--warn); font-weight: 600; }
/* 第十四版：加工资表单——上面日期、人、代收人，下面一组一组项目（项目、金额、其他、按钮） */
.wgs { display: flex; flex-direction: column; gap: 10px; }
.wg { display: flex; flex-direction: column; gap: 10px; padding: 10px 10px 12px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.wg-h { display: flex; align-items: center; gap: 4px; }
.wg-h select { flex: 1; font-weight: 600; }
.wg-h .icon-btn { flex: none; width: 36px; height: 36px; color: var(--muted); }
.tgs { display: flex; flex-wrap: wrap; gap: 6px; }
.tg { position: relative; }
.tg input { position: absolute; opacity: 0; pointer-events: none; }
.tg span { display: inline-block; min-width: 42px; text-align: center; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--fg2); background: var(--surface); }
.tg input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.wg-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wg-sum { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.wg-sum b { font-size: 16px; color: var(--fg); font-weight: 700; margin-left: 6px; }
.ename b { font-weight: 600; color: var(--fg2); }
/* 第十六版：加一笔时，月结文字里这一笔会写成什么 */
.wpre { display: flex; flex-direction: column; gap: 2px; padding: 7px 10px; border-radius: 8px; background: var(--sunk); font-size: 12.5px; color: var(--muted); }
.wpre b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; font-weight: 600; color: var(--fg); white-space: pre-wrap; overflow-wrap: anywhere; }
/* 第十六版：首页最下面、设定页的版本号 */
.ver { margin: 6px 0 0; text-align: center; font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
/* 第十五版：改名前问一次 */
.rn-ask { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); font-size: 14px; }
.rn-ask p { margin: 0; font-size: 13px; color: var(--fg2); }
.rn-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.grp-hw { display: flex; align-items: stretch; }
.grp-hw .grp-h { flex: 1; min-width: 0; }
.grp-add { flex: none; width: 48px; display: grid; place-items: center; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--accent); }
.grp-add:hover { background: var(--accent-soft); }
.rows { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.rows > :last-child { border-bottom: 0; }
.row:hover { background: var(--sunk); }
.row > svg { color: var(--muted); flex: none; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-t { display: flex; align-items: center; gap: 8px; }
.row-name { font-weight: 600; min-width: 0; }
.qty { color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.row-t .st { margin-left: auto; }
.row-s { font-size: 13px; line-height: 1.45; color: var(--muted); }
.row-s .spec { color: var(--fg2); }
.row-s .inote { color: var(--accent); }
.row-s .al { margin-left: 2px; }
.row.cancel .row-name { text-decoration: line-through; color: var(--muted); }

/* big items */
.big { display: flex; flex-direction: column; gap: 6px; }
.big-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.big-n { font-weight: 600; }
.big-p { font-size: 13.5px; }
.big-note { font-size: 13px; color: var(--muted); }

/* packing */
.prog { display: flex; flex-direction: column; gap: 6px; }
.prog-t { font-size: 14px; color: var(--muted); }
.prog-t b { color: var(--fg); font-size: 18px; }
.prog-bar { height: 8px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.prog-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.sw { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.sw input { width: 18px; height: 18px; accent-color: var(--accent); }
.pk { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; min-height: 52px; }
.box, .box-btn { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; border: 2px solid var(--line); color: transparent; background: var(--surface); }
.box-btn { padding: 0; }
.pk[aria-checked="true"] .box, .box-btn[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pk-t { font-weight: 600; }
.pk-t b { font-weight: 400; color: var(--muted); margin-left: 4px; }
.pk-s { font-size: 12.5px; color: var(--muted); }
.pk[aria-checked="true"] .pk-t { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }

/* diary */
.dy { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dy-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.dy-d { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dy-t { font-weight: 600; }
.dy.done .dy-t { color: var(--muted); }
.dy-a { font-size: 13.5px; background: var(--sunk); border-radius: var(--r-sm); padding: 4px 8px; }
/* 日程的日期总表（第八版）：左边日期和还剩几天，右边那天要做的事；物料下单日有袋子图案 */
.dl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.dl-g { padding: 6px 14px; font-size: 12.5px; font-weight: 600; color: var(--warn); background: var(--warn-bg); }
.dl-now { display: flex; align-items: center; gap: 8px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-top: 1px solid var(--line); }
.dl-now::after { content: ""; flex: 1; height: 1px; background: var(--accent); opacity: .4; }
.dl > .dl-now:first-child { border-top: 0; }
.dl-more { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; padding: 7px 14px; border: 0; border-top: 1px solid var(--line); background: transparent; font-size: 13px; color: var(--muted); }
.dl-more svg { transition: transform .15s; width: 15px; height: 15px; }
.dl-more[aria-expanded="true"] svg { transform: rotate(-90deg); }
.dl-c { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; padding: 9px 10px 9px 14px; border-top: 1px solid var(--line); }
.dl > .dl-c:first-child { border-top: 0; }
.dl-d { font-size: 13.5px; font-weight: 600; line-height: 1.3; padding-top: 2px; white-space: nowrap; }
.dl-d small { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.dl-d.late small { color: var(--warn); font-weight: 600; }
.dl-d.soon small { color: var(--bad); font-weight: 600; }
.dl-l { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dl-i { display: flex; align-items: flex-start; gap: 8px; width: 100%; border: 0; background: transparent; padding: 0; text-align: left; font-size: 14px; line-height: 1.4; }
.dl-i .box-btn { width: 22px; height: 22px; border-radius: 6px; margin-top: 1px; }
.dl-i .box-btn svg { width: 14px; height: 14px; }
.dl-b { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 4px; border: 0; background: transparent; padding: 2px 0; text-align: left; }
.dl-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-tx small { font-size: 12px; color: var(--muted); }
.dl-tx b { font-weight: 600; }
.dl-tx .dy-a { font-size: 13px; padding: 2px 8px; }
.dl-b > svg, .dl-i.mat > svg { color: var(--muted); flex: none; }
.dl-i.done .dl-tx { color: var(--muted); }
.dl-i.mat { padding: 2px 0; }
.dl-ic { flex: none; width: 22px; display: grid; place-items: center; color: var(--accent); padding-top: 2px; }
.dl-ic svg { color: var(--accent); }
.dl-tx small.acc { color: var(--accent); }
.dl-i.evd { padding: 2px 0; }
.dl-i.evd .dl-tx { color: var(--accent); font-weight: 600; }
.batch-h { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; color: var(--fg2); }
.batch-h > svg { flex: none; color: var(--accent); margin-top: 2px; }
.batch-h span { flex: 1; min-width: 0; }
.batch-h .link-btn { padding: 0; white-space: nowrap; }

/* inventory */
.inv-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.inv-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 8px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
button.inv-row:hover { background: var(--sunk); }
.inv-row > svg { color: var(--muted); flex: none; }
.inv-main { flex: 1; min-width: 0; }
.inv-n { font-weight: 600; }
.inv-note { font-size: 12.5px; color: var(--muted); }
.inv-q { white-space: nowrap; font-size: 14px; text-align: right; }

/* forms */
input[type="text"], input[type="search"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 15px; }
textarea { resize: vertical; min-height: 64px; }
/* 第八版：iPhone 的日期框有自己的最小宽度，会撑出卡片和两栏格子。拿掉原生外观，宽度就照 100% 算；
   空的日期框在 iPhone 会塌成 0 高，所以给最小高度；日期字靠左，跟其他输入框一样 */
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; max-width: 100%; min-height: 43px; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.field { display: flex; flex-direction: column; gap: 5px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-size: 13px; color: var(--muted); padding: 0; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.radios { display: flex; flex-wrap: wrap; gap: 6px; }
.radio input { position: absolute; opacity: 0; pointer-events: none; }
.radio span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13.5px; background: var(--surface); }
.radio input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.calc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding: 10px 12px; border-radius: 10px; background: var(--sunk); font-size: 13px; }
.calc div span { color: var(--muted); display: block; font-size: 12px; }
.calc .cap { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.err { margin: 0; min-height: 1em; color: var(--bad); font-size: 13.5px; }
/* 第十一版：搭建、拆场两排按钮，下面一行写算出来的日期 */
.su-box { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.su-f legend b { color: var(--fg); font-weight: 600; font-size: 14px; margin-right: 6px; }
.su-f input[type="date"] { margin-top: 2px; }
.when { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--fg2); background: var(--sunk); border-radius: 8px; padding: 6px 10px; }
.when b { font-size: 14px; color: var(--fg); }
.when.bad { background: var(--bad-bg); color: var(--bad); }

/* sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(20, 12, 14, .45); }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: calc(100% - 40px - env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; background: var(--bg); border-radius: 16px 16px 0 0; }
.sheet-h { display: flex; align-items: center; gap: 8px; padding: 10px 8px 6px 18px; }
.sheet-h h2 { flex: 1; margin: 0; font-size: 17px; }
.sheet-b { overflow-y: auto; padding: 6px 18px 12px; display: flex; flex-direction: column; gap: 14px; }
.sheet-f { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
@media (min-width: 600px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 16px; } }

/* nav and toast */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.nav .wrap { display: flex; }
.nav button { flex: 1; border: 0; background: transparent; padding: 8px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); }
.nav button[aria-current="page"] { color: var(--accent); font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); background: var(--fg); color: var(--bg); padding: 9px 16px; border-radius: 10px; font-size: 14px; }
.toast.bad { background: var(--bad); color: var(--surface); }
/* 首页（第七版）：左边日期小卡，右边名字和倒数、迷你时间线、要处理；办过的活动收在下面 */
.hm-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hm-h h2 { margin: 0; font-size: 16px; font-weight: 600; }
.hm-h h2 span, .past-t span { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }
.rev { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 13px; line-height: 1.45; }
.rev svg { flex: none; }
.rev span { flex: 1; min-width: 0; }
.rev .link-btn { color: var(--warn); font-weight: 600; text-decoration: underline; padding: 0; white-space: nowrap; }
.evc { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 14px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 14px 12px; }
button.evc:hover { border-color: var(--accent); }
.stub { display: flex; flex-direction: column; align-items: center; padding: 7px 0 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); align-self: start; line-height: 1.1; }
.stub b { font-family: var(--display); font-size: 25px; font-weight: 600; }
.stub span { font-size: 12px; font-weight: 600; margin-top: 3px; }
.stub small { font-size: 11px; color: var(--muted); margin-top: 3px; }
.stub em { font-style: normal; font-size: 11px; font-weight: 600; margin-bottom: 3px; padding: 0 6px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); }
.evc-su { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg2); margin-top: -4px; }
.evc-su svg { color: var(--accent); flex: none; }
.evc-su b { font-weight: 600; color: var(--fg); }
.evc-main { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.evc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.evc-name { font-family: var(--display); font-size: 18px; line-height: 1.3; min-width: 0; }
.evc-venue { font-size: 13px; color: var(--muted); margin-top: -7px; }
.cdn { white-space: nowrap; font-size: 12.5px; color: var(--fg2); }
.cdn b { font-size: 22px; font-weight: 700; color: var(--accent); margin-right: 2px; }
.cdn.soon b, .cdn.now { color: var(--bad); }
.cdn.now { font-weight: 700; font-size: 14px; }
.rail-w { padding: 4px 5px 0; }
.rail { position: relative; height: 4px; background: var(--sunk); border-radius: 2px; }
.rail i { position: absolute; inset: 0 auto 0 0; background: #CBB3B6; border-radius: 2px; }
.rail .m { position: absolute; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid #B9A6A9; transform: translate(-50%, -50%); }
.rail .m.done { background: #B9A6A9; }
.rail .m.late { border-color: #D39A2C; background: var(--warn-bg); }
.rail .m.ok { border-color: var(--ok); background: var(--ok); }
.rail .m.end { border-color: var(--accent); }
.rail .me { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--accent); transform: translate(-50%, -50%); }
.rail-l { position: relative; height: 15px; margin-top: 4px; font-size: 10.5px; color: var(--muted); }
.rail-l span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.rail-l span.l0 { transform: none; }
.rail-l span.l1 { transform: translateX(-100%); }
.rail-l span.late { color: var(--warn); font-weight: 600; }
.att { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.att .a { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--fg2); }
.att .a i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.att .a.bad i { background: var(--bad); }
.att .a.warn i { background: #D39A2C; }
.att .a b { font-weight: 700; }
.att .a.bad b { color: var(--bad); }
.att .a.warn b { color: var(--warn); }
.att .ok { color: var(--ok); }
.evc-next { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 13.5px; }
.evc-next .k { color: var(--muted); font-size: 12px; }
.evc-pk { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--fg2); white-space: nowrap; }
.evc-pk .pbar { flex: 1; margin: 0; }
.evc-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 10px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 13.5px; font-weight: 600; }
.evc-money span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.evc-money .owe { grid-column: 1 / -1; font-size: 12.5px; font-weight: 400; color: var(--warn); }
.past-t { display: flex; align-items: center; gap: 4px; border: 0; background: transparent; padding: 4px 0; font-size: 16px; font-weight: 600; color: var(--fg); }
.past-t svg { transition: transform .15s; color: var(--muted); }
.past-t[aria-expanded="true"] svg { transform: rotate(90deg); }
.pstub { flex: none; width: 48px; font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.3; }
/* 大项的方案进度（第七版） */
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--sunk); border-radius: 10px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 8px 4px; border-radius: 7px; font-size: 14px; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg-hint { margin: 0; font-size: 12.5px; color: var(--muted); }
.pst { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.pst span { padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.pst span.gone { border-color: transparent; color: var(--fg2); background: var(--sunk); }
.pst span.on { border-color: transparent; font-weight: 600; }
.pst span.on.p0 { background: var(--accent-soft); color: var(--accent); }
.pst span.on.p1 { background: var(--warn-bg); color: var(--warn); }
.pst span.on.p2 { background: var(--ok-bg); color: var(--ok); }
.pst i { width: 8px; height: 1px; background: var(--line); flex: none; }
/* 设定页（第七版） */
.setc { display: flex; flex-direction: column; gap: 8px; }
.set-h { margin: 0; font-size: 16px; font-weight: 600; }
.setb { display: flex; flex-direction: column; gap: 10px; }
.tlrow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.hcard > .tlrow:last-child { border-bottom: 0; }
.tl-k { flex: 1; min-width: 0; }
.tl-k b { display: block; font-weight: 600; font-size: 14.5px; }
.tl-k small { display: block; font-size: 12px; color: var(--muted); line-height: 1.45; }
.dayin { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; color: var(--muted); }
.dayin input[type="number"] { width: 64px; text-align: right; padding: 7px 8px; }
.src-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.src-grid .tlrow { padding: 8px 12px; }
.src-grid .tlrow:nth-child(odd) { border-right: 1px solid var(--line); }
.src-grid .tl-k b { font-weight: 400; font-size: 14px; white-space: nowrap; }
.src-grid .dayin input[type="number"] { width: 54px; }
.set-save { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: flex-end; padding: 8px 0; background: linear-gradient(to bottom, transparent, var(--bg) 35%); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- 对话 5（Cloudflare 版）加的 ---------- */
/* 右上角三种状态：同步中（玫瑰色）/ 离线待送（黄）/ 没存进去（红，可以点开看清单） */
.sync.off { color: var(--warn); }
button.sync { border: 0; background: var(--bad-bg); color: var(--bad); border-radius: 999px; padding: 2px 9px; font-weight: 600; cursor: pointer; }
/* 网页有新版本的提示条 */
.verbar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 7px 16px; background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.verbar .link-btn { color: var(--warn); font-weight: 600; text-decoration: underline; padding: 0; }
/* 设定页「谁能用网页」的颜色点 */
.udot { width: 12px; height: 12px; border-radius: 50%; flex: none; border: 1px solid rgba(0,0,0,.08); }
.hm-h .set-h { margin: 0; }
.rn-btns .btn { flex: 1; }

/* 对话 6：设定页「速度」 */
table.speed{width:100%;border-collapse:collapse;font-size:13px}
table.speed th,table.speed td{padding:6px 4px;text-align:right;border-bottom:1px solid var(--line, #eee);white-space:nowrap}
table.speed th:first-child,table.speed td:first-child{text-align:left;white-space:normal}
table.speed th{font-weight:600;color:var(--muted)}

/* ---------- 对话 6b：打包链接、首页列表 ---------- */
/* 用打包链接进来的：上方一条 */
.lk-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 13px; line-height: 1.45; }
.lk-bar svg { flex: none; }
.lk-bar b { font-weight: 600; }
/* 活动页抬头（管理）：打包链接一段 */
.lk-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lk-h small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.lk-none { margin: 0; padding: 9px 14px 11px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.lk-row { border-bottom: 1px solid var(--line); }
.hcard.lk > .lk-row:last-child { border-bottom: 0; }
.lk-old { display: flex; align-items: center; gap: 4px; width: 100%; padding: 8px 14px; border: 0; background: transparent; text-align: left; font-size: 12.5px; color: var(--muted); }
.lk-old svg { transition: transform .15s; }
.lk-old[aria-expanded="true"] svg { transform: rotate(90deg); }
.lk-wa { display: flex; margin-top: 10px; text-decoration: none; color: var(--fg); }
.lk-meta { margin: 0 0 4px; }
/* 首页：列表（默认）/ 卡片 */
.hm-r { display: flex; align-items: center; gap: 8px; }
.seg2 { display: inline-flex; padding: 3px; background: var(--sunk); border-radius: 9px; }
.seg2 button { border: 0; background: transparent; padding: 4px 10px; border-radius: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.seg2 button[aria-pressed="true"] { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.list.lrows { gap: 8px; }
.lrow-w { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.lrow-w.open { border-color: var(--accent); }
.lrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 8px 8px 10px; border: 0; background: transparent; text-align: left; }
.lrow:hover { background: var(--sunk); }
.lrow > svg { color: var(--muted); flex: none; transition: transform .15s; }
.lrow[aria-expanded="true"] > svg { transform: rotate(90deg); }
.stub.sm { flex: none; width: 42px; padding: 4px 0 5px; align-self: center; }
.stub.sm b { font-size: 19px; }
.stub.sm span { font-size: 11px; margin-top: 1px; }
.lrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lrow-t { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.lrow-name { font-family: var(--display); font-size: 15.5px; line-height: 1.3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdn.sm { font-size: 12px; }
.cdn.sm b { font-size: 15px; }
.cdn.sm.now { font-size: 12.5px; }
.lrow-s { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.lrow-s .sep { width: 1px; height: 10px; background: var(--line); flex: none; }
.lrow-s .a { display: inline-flex; align-items: center; gap: 4px; color: var(--fg2); }
.lrow-s .a i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.lrow-s .a.bad i { background: var(--bad); }
.lrow-s .a.warn i { background: #D39A2C; }
.lrow-s .a b { font-weight: 700; }
.lrow-s .a.bad b { color: var(--bad); }
.lrow-s .a.warn b { color: var(--warn); }
.lpk { color: var(--fg2); }
.dots { display: inline-flex; align-items: center; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid #B9A6A9; background: transparent; box-sizing: border-box; }
.dots i.done { background: #B9A6A9; }
.dots i.cur { border-color: var(--accent); background: var(--accent-soft); }
.dots i.ok { background: var(--ok); border-color: var(--ok); }
.dots i.late { border-color: #D39A2C; background: var(--warn-bg); }
.dots em { font-style: normal; margin-left: 3px; color: var(--fg2); }
.dots em.late { color: var(--warn); font-weight: 600; }
/* 展开在一行底下的卡片：没有左边日期小卡、没有外框 */
.lrow-w .evc.in-row { border: 0; border-top: 1px dashed var(--line); border-radius: 0; grid-template-columns: minmax(0, 1fr); padding: 12px 14px; }
.lrow-w .evc.in-row .evc-venue.first { margin-top: 0; }
.evc-open { display: flex; align-items: center; justify-content: flex-end; gap: 2px; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.evc-open svg { width: 16px; height: 16px; }
@media (max-width: 380px) { .hm-h h2 span { display: none; } }

/* ---------- 对话 6c：没有钥匙时贴上链接（主画面开的网页跟 Safari 分开记钥匙） ---------- */
.keybox { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.keybox .kb-why { margin: 0; font-weight: 600; color: var(--bad); }
.keybox .muted { margin: 0; line-height: 1.55; }
.keybox .muted b { color: var(--fg2); font-weight: 600; }
.keybox .err { margin: 0; min-height: 0; }
.keybox .btn { align-self: flex-start; }
