
/* 版面：左側欄（我／工作／團隊空間）＋中間內容＋右側滑出的工作面板；手機上側欄是抽屜、面板全螢幕 */
:root {
  --bg: #ffffff; --side: #f6f6fb; --hover: #ececf6; --panel: #ffffff; --soft: #f3f3fa;
  --ink: #12152a; --ink-2: #4a4f68; --ink-3: #737992; --line: #e4e5f0;
  --brand: #4f46e5; --brand-soft: #eef0ff; --brand-ink: #4338ca;
  --ai: #7c3aed; --ai-soft: #f3edff;
  --backlog: #b7bbcc; --todo: #8a90a8; --doing: #2f6fdb; --review: #c27a12; --done: #0f9f6e; --bad: #d14343;
  --ins: #e3f7ec; --ins-ink: #0b6b45; --del: #fde8e8; --del-ink: #a32121;
  --shadow: 0 12px 40px rgba(18, 21, 42, 0.14);
  --sans: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #15161d; --side: #1b1c25; --hover: #262836; --panel: #1d1e28; --soft: #222431;
  --ink: #ecedf5; --ink-2: #b4b8cc; --ink-3: #8b90a7; --line: #2d2f3e;
  --brand: #8b8cf8; --brand-soft: #262850; --brand-ink: #a5a6ff;
  --ai: #b28cff; --ai-soft: #2c2346;
  --backlog: #5b5f73; --todo: #8b90a7; --doing: #6b9cf0; --review: #e0a542; --done: #3ccf97; --bad: #f07070;
  --ins: #133628; --ins-ink: #7fe0b2; --del: #3d1c1f; --del-ink: #f5a3a3;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #15161d; --side: #1b1c25; --hover: #262836; --panel: #1d1e28; --soft: #222431;
  --ink: #ecedf5; --ink-2: #b4b8cc; --ink-3: #8b90a7; --line: #2d2f3e;
  --brand: #8b8cf8; --brand-soft: #262850; --brand-ink: #a5a6ff;
  --ai: #b28cff; --ai-soft: #2c2346;
  --backlog: #5b5f73; --todo: #8b90a7; --doing: #6b9cf0; --review: #e0a542; --done: #3ccf97; --bad: #f07070;
  --ins: #133628; --ins-ink: #7fe0b2; --del: #3d1c1f; --del-ink: #f5a3a3;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.6 var(--sans); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
/* 側欄寬度是 --side-w（拖右邊的把手改、記在 localStorage）；html.side-hidden 把側欄整個收起來（☰ 或 ⌘\ 切換） */
:root { --side-w: 260px; }
/* 整個 app 固定在視窗裡：頁首與側欄不動，只有 .content 捲（min-height: 0 讓格子不被內容撐高） */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100%; position: relative; overflow: hidden; transition: grid-template-columns 0.15s; }
@media (prefers-reduced-motion: reduce) { .app { transition: none; } }
.app > * { min-height: 0; }
html.side-hidden .app { grid-template-columns: minmax(0, 1fr); }
html.side-hidden .side, html.side-hidden .side-grip { display: none; }
.side-grip { position: absolute; top: 0; bottom: 0; left: calc(var(--side-w) - 3px); width: 7px; cursor: col-resize; z-index: 5; }
.side-grip::after { content: ""; position: absolute; inset: 0 2px; background: var(--brand); opacity: 0; transition: opacity 0.15s; }
.side-grip:hover::after, html.side-resizing .side-grip::after { opacity: 0.5; }
html.side-resizing { cursor: col-resize; user-select: none; }
/* 偷看：收起來的側欄滑到左邊緣浮出來 */
.side-peek { display: none; position: fixed; left: 0; top: 0; bottom: 0; width: 10px; z-index: 29; }
html.side-hidden .side-peek { display: block; }
html.side-hidden .side.peek { display: flex; position: fixed; left: 0; top: 52px; bottom: 16px; width: var(--side-w); z-index: 31; border: 1px solid var(--line); border-left: 0; border-radius: 0 12px 12px 0; box-shadow: var(--shadow); }
/* 右鍵選單 */
.ctx-menu { position: fixed; z-index: 60; width: auto; min-width: 180px; }
.ctx-menu .danger { color: var(--bad); }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 2px; }
/* 側欄頁列：改名時標題換成輸入框 */
.nav.pg .pg-rename { flex: 1; min-width: 0; border: 1px solid var(--brand); border-radius: 5px; padding: 1px 6px; font: inherit; background: var(--bg); color: var(--ink); }

.side { background: var(--side); border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 8px 24px max(8px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 2px; }
.ws { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; font-weight: 700; }
.ws-logo { width: 26px; height: 26px; border-radius: 7px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 13px; flex: none; }
.ws small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; line-height: 1.2; }
.nav { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; text-align: left; padding: 5px 8px; border-radius: 7px; color: var(--ink-2); min-height: 32px; }
.nav:hover { background: var(--hover); }
.nav.on { background: var(--hover); color: var(--ink); font-weight: 500; }
.nav .ic { width: 18px; text-align: center; color: var(--ink-3); flex: none; font-size: 13px; }
.nav .badge { margin-left: auto; background: var(--brand); color: #fff; font-size: 11px; border-radius: 9px; padding: 0 6px; line-height: 18px; }
.nav .tag { margin-left: auto; font-size: 11px; color: var(--ai); white-space: nowrap; }
.nav .tag.later { color: var(--ink-3); }
.sec { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.06em; padding: 14px 8px 4px; }
button.sec { border: 0; background: none; text-align: left; width: 100%; display: flex; align-items: center; gap: 6px; border-radius: 6px; font: inherit; font-size: 11.5px; cursor: pointer; }
button.sec .sec-caret { margin-left: auto; opacity: 0; font-size: 10px; }
button.sec:hover { color: var(--ink); } button.sec:hover .sec-caret, button.sec.folded .sec-caret { opacity: 1; }
.side .sec.admin { margin-top: auto; }   /* 設定、垃圾桶固定在側欄最底（內容短的時候） */
.palette .menu button.sel { background: var(--hover); }
.nav.sub { padding-left: 26px; }
.nav.sub2 { padding-left: 44px; }

.main { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.top { display: flex; align-items: center; gap: 10px; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px 16px; border-bottom: 1px solid var(--line); min-height: 48px; }
.menu-btn { border: 0; background: none; font-size: 18px; padding: 4px 6px; color: var(--ink-3); border-radius: 6px; }
.menu-btn:hover { background: var(--hover); color: var(--ink); }
.crumb { color: var(--ink-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumb b { color: var(--ink); font-weight: 500; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.faces { display: flex; }
.face { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; border: 2px solid var(--bg); margin-left: -6px; flex: none; }
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 7px; padding: 4px 12px; min-height: 30px; }
.btn:hover { background: var(--hover); }
.btn.sm { min-height: 24px; padding: 0 8px; font-size: 12px; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.proto { font-size: 11px; color: var(--ink-3); border: 1px dashed var(--line); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--ink-3); }
.content { flex: 1; overflow-y: auto; padding: 28px max(16px, env(safe-area-inset-right, 0px)) 80px max(16px, env(safe-area-inset-left, 0px)); }
.doc { max-width: 760px; margin: 0 auto; }
.wide { max-width: 1180px; margin: 0 auto; }
h1 { font-size: 30px; line-height: 1.3; margin: 6px 0 4px; text-wrap: balance; }
h2 { font-size: 18px; margin: 26px 0 8px; }
h3 { font-size: 15px; margin: 18px 0 6px; }
p { margin: 0 0 10px; }
.meta { color: var(--ink-3); font-size: 13px; margin-bottom: 18px; }
.muted { color: var(--ink-3); }
.later-note { font-size: 12px; color: var(--ink-3); border: 1px dashed var(--line); border-radius: 8px; padding: 6px 10px; margin-bottom: 14px; }

.callout { display: flex; gap: 10px; background: var(--soft); border-radius: 8px; padding: 12px 14px; margin: 10px 0; }
.todo-b { display: flex; gap: 8px; align-items: baseline; }
.todo-b input { accent-color: var(--brand); }
.cursor { position: relative; border-left: 2px solid #e8590c; }
.cursor::before { content: attr(data-who); position: absolute; top: -17px; left: -2px; background: #e8590c; color: #fff; font-size: 10.5px; padding: 0 5px; border-radius: 3px 3px 3px 0; white-space: nowrap; }
ins { background: var(--ins); color: var(--ins-ink); text-decoration: none; border-radius: 3px; padding: 0 2px; }
del { background: var(--del); color: var(--del-ink); border-radius: 3px; padding: 0 2px; }
.sugg { border: 1px solid var(--ai); background: var(--ai-soft); border-radius: 10px; padding: 12px 14px; margin: 0 0 18px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.sugg > div { flex: 1 1 280px; min-width: 0; }
.sugg b { color: var(--ai); }
.ai-read { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: var(--ai); background: var(--ai-soft); border-radius: 10px; padding: 0 8px; }

.db-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 10px; }
.summary { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 8px 0 4px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.summary b { font-size: 17px; color: var(--ink); margin-right: 4px; }
.summary .late b { color: var(--bad); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 12px 0 10px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 7px 12px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.on { color: var(--ink); border-color: var(--ink); font-weight: 500; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; align-items: center; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 2px 10px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.chip.on { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
.bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--ink); color: var(--bg); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.bulk .btn { background: transparent; color: var(--bg); border-color: rgba(127, 127, 127, 0.5); }
.wv .bulk { position: sticky; top: 0; z-index: 3; }
.bulk select, .bulk input { background: transparent; color: var(--bg); border: 1px solid rgba(127, 127, 127, 0.5); border-radius: 6px; padding: 3px 6px; font: inherit; font-size: 13px; max-width: 170px; color-scheme: dark; }
.bulk select option { color: var(--ink); background: var(--bg); }
.bulk .sp { flex: 1; }
.card.sel, .li.sel { box-shadow: inset 0 0 0 2px var(--brand); }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.scroll.more-right { box-shadow: inset -32px 0 24px -24px rgba(0, 0, 0, 0.35); }
.to-top { position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 20; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 18px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); cursor: pointer; }
.to-top:hover { background: var(--hover); }
.to-top[hidden] { display: none; }
.panel-open .to-top { display: none; }
table { border-collapse: collapse; width: 100%; min-width: 900px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
th { font-weight: 500; color: var(--ink-3); font-size: 12.5px; background: var(--side); }
td.ck, th.ck { width: 34px; padding-right: 0; }
td.ck input, th.ck input { accent-color: var(--brand); }
tr.grp td { background: var(--soft); font-weight: 700; font-size: 13px; }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--hover); }
tr.row.sel td { background: var(--brand-soft); }
td.title { white-space: normal; min-width: 260px; font-weight: 500; }
.key { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-right: 6px; }
.type { font-size: 11px; border-radius: 4px; padding: 0 5px; margin-right: 6px; background: var(--soft); color: var(--ink-2); }
.type.epic { background: var(--brand-soft); color: var(--brand-ink); }
.type.bug { background: var(--del); color: var(--del-ink); }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; border-radius: 12px; padding: 1px 9px 1px 7px; background: var(--soft); white-space: nowrap; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.who { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.who .face { width: 20px; height: 20px; font-size: 9.5px; margin: 0; border: 0; }
.ai-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--ai-soft); color: var(--ai); border-radius: 12px; padding: 1px 9px; font-size: 12.5px; white-space: nowrap; }
.ai-chip svg { width: 12px; height: 12px; }
.wait { font-size: 11.5px; color: var(--review); margin-left: 4px; white-space: nowrap; }
.wait.late { color: var(--bad); }
.pri { font-size: 12px; color: var(--ink-3); }
.pri.high { color: var(--bad); }
.bar { height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--done); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--side); border-radius: 10px; padding: 10px; min-height: 200px; }
.col h4 { margin: 0 0 8px; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.col h4 span { color: var(--ink-3); font-weight: 400; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; cursor: pointer; display: grid; gap: 6px; }
.card:hover { border-color: var(--brand); }
.card .t { font-weight: 500; }
.card .f { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cal div { min-height: 92px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 5px; font-size: 12px; min-width: 0; }
.cal div:nth-child(7n) { border-right: 0; }
.cal .dow { min-height: 0; background: var(--side); color: var(--ink-3); text-align: center; }
.cal .out { color: var(--ink-3); background: var(--soft); }
.cal .today .n { background: var(--brand); color: #fff; border-radius: 10px; padding: 0 6px; }
.ev { display: block; width: 100%; text-align: left; border: 0; border-radius: 4px; padding: 1px 5px; margin-top: 3px; font-size: 11.5px; background: var(--brand-soft); color: var(--brand-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.ai { background: var(--ai-soft); color: var(--ai); }

.list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; background: var(--panel); width: 100%; border-left: 0; border-right: 0; border-top: 0; text-align: left; flex-wrap: wrap; }
.li:last-child { border-bottom: 0; }
.li:hover { background: var(--hover); }
.li .body { flex: 1 1 240px; min-width: 0; }
.li .when { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
/* 收件匣每一則的「稍後」：滑過去（或用鍵盤走到）才出現，手機上一直在 */
.li .li-later { opacity: 0; flex: none; }
.li:hover .li-later, .li:focus-within .li-later, .li .li-later:focus { opacity: 1; }
@media (hover: none) { .li .li-later { opacity: 1; } }
/* 面板裡收起來的關聯、時數 */
.fold-row { margin: 10px 0; }
.li.unread .body b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-left: 6px; vertical-align: middle; }
.dot { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 13px; background: var(--soft); color: var(--ink-2); }
.dot.ai { background: var(--ai-soft); color: var(--ai); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ai-card, .widget { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; background: var(--panel); align-content: start; min-width: 0; }
.ai-card .hd { display: flex; gap: 10px; align-items: center; }
.state { font-size: 12px; display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 13px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; min-width: 0; }
.stats { display: flex; gap: 18px; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.stats b { font-size: 18px; color: var(--ink); display: block; }
/* 概覽的數字是連結：點了到工作表格只看那一組 */
.stats a { color: inherit; text-decoration: none; border-radius: 8px; padding: 4px 8px; margin: -4px -8px; }
.stats a:hover { background: var(--hover); }
.widget h3 { margin: 0; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.big { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hbars { display: grid; gap: 8px; font-size: 12.5px; }
.hbar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 38px; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.hbar .track { height: 10px; background: var(--soft); border-radius: 5px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 5px; background: var(--ai); }
.hbar .track i.bad { background: var(--bad); }
.hbar span:last-child { text-align: right; color: var(--ink-2); }

.scrim { position: fixed; inset: 0; background: rgba(10, 12, 25, 0.28); z-index: 20; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--panel-w, 640px), 100%); background: var(--panel); box-shadow: var(--shadow); z-index: 21; display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); }
.panel-top { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.panel-body { flex: 1; overflow-y: auto; padding: 16px 20px 40px; }
.props { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 10px; align-items: center; margin: 10px 0 14px; font-size: 13.5px; }
.props dt { color: var(--ink-3); }
.props dd { margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.box label { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; }
.box input { accent-color: var(--done); }
.box.warn { border-color: var(--review); }
.deliv { border: 1px solid var(--ai); border-radius: 10px; overflow: hidden; margin: 12px 0; }
.deliv-h { background: var(--ai-soft); padding: 10px 12px; font-size: 13px; }
.deliv-b { padding: 12px; display: grid; gap: 10px; }
.file { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; flex-wrap: wrap; }
.file .ext { font-family: var(--mono); font-size: 10.5px; background: var(--soft); border-radius: 4px; padding: 2px 5px; color: var(--ink-2); }
.file .sz { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.file .plus { color: var(--done); font-family: var(--mono); font-size: 12px; }
.file .minus { color: var(--bad); font-family: var(--mono); font-size: 12px; }
.verdict { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ask { border: 1px solid var(--ai); border-radius: 10px; padding: 10px 12px; margin: 12px 0; background: var(--ai-soft); display: grid; gap: 8px; }
.ask .q { color: var(--ink); }
textarea { width: 100%; min-height: 64px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; background: var(--bg); color: var(--ink); resize: vertical; }
.timeline { display: grid; border-left: 2px solid var(--line); margin: 8px 0 0 8px; padding-left: 16px; }
.tl { position: relative; padding: 0 0 14px; font-size: 13px; }
.tl::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--ink-3)); border: 2px solid var(--panel); }
.tl .when { color: var(--ink-3); font-size: 12px; }
.children { display: grid; gap: 4px; }
.children button { border: 0; background: none; text-align: left; display: flex; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; flex-wrap: wrap; }
.children button:hover { background: var(--hover); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: 8px; z-index: 40; font-size: 13px; max-width: calc(100% - 32px); }
.menu { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); padding: 6px; display: grid; gap: 1px; width: min(340px, 100%); }
.menu button { border: 0; background: none; text-align: left; padding: 6px 8px; border-radius: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.menu button:hover { background: var(--hover); }
.menu .grp { font-size: 11.5px; color: var(--ink-3); padding: 6px 8px 2px; }
.palette { position: fixed; top: calc(12vh + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); z-index: 31; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 14px 16px; font: inherit; font-size: 15px; background: transparent; color: var(--ink); outline: none; }
.palette .menu { border: 0; box-shadow: none; width: 100%; border-radius: 0; }

@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side-grip, .side-peek { display: none !important; }
  html.side-hidden .side { display: flex; }   /* 手機：側欄本來就是抽屜，電腦上的「隱藏」不算 */
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 30; transform: translateX(-100%); transition: transform 0.2s; box-shadow: var(--shadow); padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .side.open { transform: none; }
  .side-scrim { z-index: 29; }   /* 在內容上面、抽屜（30）下面 */
  .proto, .faces { display: none; }
  h1 { font-size: 24px; }
  .props { grid-template-columns: 84px minmax(0, 1fr); }
  .cal div { min-height: 64px; padding: 2px 3px; }
  .ev { font-size: 10.5px; padding: 0 3px; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

/* ── v3 加的：對話框、表單、設定分頁、雛型目錄 ── */
.modal-wrap { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal-wrap .scrim { z-index: 0; }
.modal { position: relative; z-index: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.modal.wide-m { width: min(820px, 100%); }
.modal-h { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.modal-h h2 { margin: 0; font-size: 16px; }
.modal-b { padding: 16px 18px; display: grid; gap: 12px; }
.modal-f { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); }
.field { display: grid; gap: 4px; }
.field > span { font-size: 12.5px; color: var(--ink-3); }
.field input[type=text], .field select, .field input[type=date], .field input[type=number] { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; background: var(--bg); color: var(--ink); width: 100%; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; background: var(--panel); padding: 5px 12px; font-size: 13px; }
.seg button.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 500; }
.stabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0 16px; }
.stabs button { border: 1px solid var(--line); background: var(--panel); border-radius: 16px; padding: 3px 12px; font-size: 13px; }
/* 分頁上的件數（例如「需求 3」）：小小一顆，選到時反白 */
.stabs button .n { display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 2px; border-radius: 8px; font-size: 11px; line-height: 16px; background: var(--brand); color: #fff; vertical-align: 1px; }
.stabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.set-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.set-row > div { flex: 1 1 260px; min-width: 0; }
/* 知識送審（§8）的一篇 */
.prop { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; background: var(--panel); }
.prop h3 { margin: 0 0 4px; }
.prop details { margin: 8px 0; }
.prop summary { cursor: pointer; color: var(--ink-2); }
.prop .verdict { margin-top: 8px; }
.set-row b { display: block; font-weight: 500; }
.set-row small { color: var(--ink-3); font-size: 12.5px; }
.switch { width: 36px; height: 20px; border-radius: 10px; background: var(--line); position: relative; border: 0; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.switch.on { background: var(--brand); }
.switch.on::after { left: 18px; }
.pill { display: inline-block; font-size: 11px; border-radius: 9px; padding: 0 7px; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.pill.p1 { background: var(--brand-soft); color: var(--brand-ink); }
.pill.p2 { background: var(--ai-soft); color: var(--ai); }
.pill.p3 { background: var(--del); color: var(--del-ink); }
.pill.pa { background: var(--ins); color: var(--ins-ink); }
.catalog td { white-space: normal; }
.diff-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.diff-cols > div { border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-width: 0; }
.crumbs-path { font-size: 12px; color: var(--ink-3); }

/* 檔案庫（§14）的檔案頁 */
.file-prev { margin: 14px 0 6px; }
.file-img { max-width: 100%; max-height: 70vh; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.file-text { white-space: pre-wrap; word-break: break-word; max-height: 70vh; overflow: auto; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 13px; }
.file-csv { border-collapse: collapse; font-size: 13px; }
.file-csv th, .file-csv td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; white-space: nowrap; }
.file-csv th { background: var(--soft); }
.file-vers { border-top: 1px solid var(--line); margin-bottom: 8px; }
.fv { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.fv-main { flex: 1 1 240px; min-width: 0; }
.fv-name { word-break: break-all; }
.fv-acts { display: flex; gap: 14px; }
.linkish { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font: inherit; }
.linkish:hover { text-decoration: underline; }

/* 一般資料庫（§16） */
.page-head.db-head .title-in { flex: 1 1 260px; width: auto; }
.opt { --c: #8a90a8; display: inline-block; background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--ink); border-radius: 4px; padding: 1px 7px; margin: 1px 4px 1px 0; font-size: 12.5px; white-space: nowrap; }
.opt.c-blue { --c: #2f6fdb; } .opt.c-green { --c: #0f9f6e; } .opt.c-orange { --c: #e8590c; } .opt.c-purple { --c: #9c36b5; } .opt.c-pink { --c: #c2255c; }
.opt.c-yellow { --c: #e0a800; } .opt.c-brown { --c: #8d6e63; } .opt.c-red { --c: #d14343; }
.db-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.db-tabs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.db-tabs [role="tab"] { border: 1px solid var(--line); background: var(--panel); border-radius: 16px; padding: 3px 12px; font-size: 13px; color: var(--ink); }
.db-tabs [role="tab"].on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.db-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.db-q { width: 180px; max-width: 100%; font: inherit; font-size: 13px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.db-note { font-size: 12.5px; margin: 0 0 8px; }
.db-table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.db-table th { text-align: left; font-weight: 500; color: var(--ink-3); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.db-table td { padding: 2px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.db-table .db-title { padding: 6px 8px; font-weight: 500; min-width: 160px; }
.db-table .db-title a { color: var(--ink); text-decoration: none; }
.db-table .db-title a:hover { text-decoration: underline; }
.cell-in { width: 100%; min-width: 0; font: inherit; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 4px 6px; }
.cell-in:hover { border-color: var(--line); }
.cell-in:focus { border-color: var(--brand); outline: none; background: var(--panel); }
.cell-in.num { text-align: right; }
.cell-date { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cell-date .cell-in { width: auto; }
.cell-end { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cell-pick { display: block; width: 100%; min-height: 28px; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 3px 6px; color: var(--ink); cursor: pointer; font: inherit; }
.cell-pick:hover { border-color: var(--line); }
.db-new td { padding: 4px; }
.db-props { display: grid; gap: 2px; margin: 4px 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.db-prop { display: grid; grid-template-columns: minmax(72px, 160px) minmax(0, 1fr); gap: 8px; align-items: center; min-height: 34px; }
.db-pl { color: var(--ink-3); font-size: 13px; }
.db-pv { min-width: 0; }
.db-files { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.db-file { font-size: 13px; }
.db-li-f { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.card[draggable="true"] { cursor: grab; }
fieldset.ro { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.ro .cell-in, fieldset.ro .cell-pick { cursor: default; }
/* 分享（§4.2） */
.share-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.share-row select { width: auto; font: inherit; font-size: 13px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; color: inherit; }   /* 連結做的按鈕（匯出 CSV）跟真的按鈕長得一樣：不是連結色、同樣高 */

/* 規劃（§11）：關聯、週期、燃盡、時間軸 */
.rel { display: inline-flex; align-items: center; gap: 4px; margin: 2px 8px 2px 0; }
.rel > .muted { font-size: 12px; }
.cyc { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; background: var(--panel); }
.cyc.active { border-color: var(--brand); }
.cyc-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-bottom: 8px; }
.cyc-head .chips { margin-left: auto; }
.burn { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 4px 0 10px; }
.burn svg { flex: 1 1 320px; max-width: 560px; height: auto; }
.burn-ideal { stroke: var(--ink-3); stroke-dasharray: 4 4; stroke-width: 1.5; }
.burn-axis { stroke: var(--line); }
.burn-real { fill: none; stroke: var(--brand); stroke-width: 2.5; }
.burn-dot { fill: var(--brand); }
.burn-t { fill: var(--ink-3); font-size: 11px; }
.tl-wrap { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.tl-names { flex: 0 0 200px; border-right: 1px solid var(--line); min-width: 0; }
.tl-name { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 0 10px; font: inherit; font-size: 13px; color: var(--ink); text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.tl-scroll { flex: 1 1 auto; overflow-x: auto; min-width: 0; }
.tl { position: relative; }
.tl-month { position: absolute; top: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.tl-week { position: absolute; top: 0; border-left: 1px solid var(--line); }
.tl-week span { position: absolute; top: 22px; left: 3px; font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.tl-today { position: absolute; top: 0; border-left: 2px solid var(--bad); opacity: .7; }
.tl-ms { position: absolute; top: 40px; transform: translateX(-50%); color: var(--review); font-size: 13px; white-space: nowrap; z-index: 2; }
.tl-ms span { font-size: 11px; margin-left: 2px; }
.tl-svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.tl-dep { fill: none; stroke: var(--ink-3); stroke-width: 1.5; }
.tl-dep.bad { stroke: var(--bad); }
.tl-bar { position: absolute; height: 22px; border-radius: 6px; background: color-mix(in srgb, var(--c) 30%, var(--panel)); border: 1px solid var(--c); display: flex; align-items: center; cursor: grab; touch-action: none; user-select: none; z-index: 1; }
.tl-bar.bad { border: 2px solid var(--bad); }
.tl-bar:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tl-t { flex: 1; font-size: 12px; padding: 0 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); }
.tl-h { flex: 0 0 6px; align-self: stretch; cursor: ew-resize; }
@media (max-width: 700px) { .tl-names { flex-basis: 110px; } }
/* 模組、計畫、狀態更新、工作量、時數（§11） */
.pbar { display: inline-block; vertical-align: middle; width: 160px; max-width: 40vw; height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; margin-right: 8px; }
.pbar i { display: block; height: 100%; background: var(--done); }
.pbar.bad i { background: var(--bad); }
.hl { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--soft); }
.hl.on_track { color: var(--done); } .hl.at_risk { color: var(--review); } .hl.off_track { color: var(--bad); }
label.hl { cursor: pointer; margin-right: 6px; }
.upd { padding: 8px 0; border-bottom: 1px solid var(--line); }
.upd p { margin: 4px 0 0; white-space: pre-wrap; }
.wk { padding: 8px 0; border-bottom: 1px solid var(--line); }
.wk-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.wk-head b { min-width: 140px; }
.wk.over .wk-head b { color: var(--bad); }
.time-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 13px; padding: 3px 0; }
.wk .late { color: var(--bad); }
/* 儀表板（§13） */
.widgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.widget { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel); min-width: 0; }
.widget-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.widget-h .chips { margin-left: auto; }
.w-num { font-size: 40px; font-weight: 700; line-height: 1.1; }
.w-bars { display: grid; gap: 6px; }
.w-row { display: grid; grid-template-columns: minmax(60px, 34%) 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.w-bl { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.w-bt { height: 10px; background: var(--soft); border-radius: 5px; overflow: hidden; }
.w-bt i { display: block; height: 100%; }
.w-pie { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.w-pie svg { width: 120px; height: 120px; flex: none; }
.w-pie ul { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; gap: 3px; min-width: 0; }
.w-pie li { display: flex; gap: 6px; align-items: center; }
.w-pie li i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.w-pie li b { margin-left: auto; padding-left: 8px; }
.w-line { width: 100%; height: auto; }
table.tsum td, table.tsum th { white-space: normal; } table.tsum td:not(:first-child), table.tsum th:not(:first-child) { white-space: nowrap; text-align: right; }
table.tsum { min-width: 0; }
.wf-rule { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 0 0 8px; display: grid; gap: 6px; }
/* 公開表單（§12.5） */
body.pub { background: var(--bg); color: var(--ink); margin: 0; }
.pub-form { max-width: 560px; margin: 0 auto; padding: 40px 16px 60px; }
.pub-form h1 { font-size: 24px; margin: 0 0 8px; }
.pub-intro { white-space: pre-wrap; color: var(--ink-2); }
.pub-form .field { display: grid; gap: 4px; margin: 14px 0; }
.pub-form input, .pub-form textarea, .pub-form select { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; box-sizing: border-box; }
.pub-msg { min-height: 1.4em; color: var(--bad); }
.pub-done { font-size: 17px; }
.pub-foot { font-size: 12px; margin-top: 30px; }
/* 匯入（§17.1）的對應 */
.box .field { display: grid; gap: 4px; }
.imp-row { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 2fr); gap: 8px; align-items: center; margin: 4px 0; }
.imp-row select, .box .field select { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; min-width: 0; }
.file-html { display: block; width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; resize: vertical; }
.file-acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; }
.file-pdf { display: block; width: 100%; height: 80vh; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.modal .file-pdf, .modal .file-html { height: 65vh; }
.att-drop.drag { outline: 2px dashed var(--brand); outline-offset: 2px; }
.att-drop .file + .file { margin-top: 6px; }
.ref-pick { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; max-height: 50vh; overflow: auto; }
.ref-opt { display: flex; gap: 8px; align-items: baseline; text-align: left; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; cursor: pointer; }
.ref-opt:hover, .ref-opt:focus-visible { background: var(--soft); }
.ref-opt .muted { margin-left: auto; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.pc-banner { display: block; line-height: 1.6; }

/* 表頭可以點了排序 */
.wt th.sortable { cursor: pointer; user-select: none; }
.wt th.sortable:hover, .wt th.sort-on { color: var(--ink); }
/* 到期的快速選（今天、明天、下週） */
.quick { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.quick .chip { padding: 1px 8px; font-size: 12px; }
.field .quick { margin-top: 4px; }

/* 頁面：寬版（表格多的時候）、圖示選單 */
.doc.wide { max-width: 1180px; }
.pg-icon-btn { font-size: 20px; line-height: 1; padding: 4px 8px; }
.icon-menu { width: 300px; }
.icon-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.icon-grid button { justify-content: center; font-size: 18px; padding: 4px 0; }
.icon-grid button.on { background: var(--brand-soft); }
.icon-menu .row-in { margin-top: 6px; }

/* 文件：版本歷史「跟現在比」、空白頁範本列、子頁清單 */
.hist-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hist-head h3 { flex: 1; min-width: 0; }
pre.hist-diff { max-height: 60vh; }
pre.hist-diff span { opacity: .6; }
pre.hist-diff > * { margin: 0 0 8px; padding: 2px 4px; }
.tpl { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 4px 0 10px; font-size: 13px; }
.tpl[hidden] { display: none; }
.kids { display: flex; flex-direction: column; gap: 2px; }
.kids .li { display: flex; align-items: center; gap: 10px; }
.kids .li .ic { flex: none; }
.kids .li-add { border: 1px dashed var(--line); background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
/* 拖放：拖到側欄的頁或團隊空間、頁面下方的子頁區 */
.nav.pg[draggable="true"] { cursor: grab; }
.drop-on { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 8px; background: var(--brand-soft); }
.kids[data-filedrop] { min-height: 40px; border-radius: 8px; }

/* 工作面板左邊緣的把手；側欄頁列拖到上下邊緣的插入線 */
.panel-grip { position: absolute; left: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 2; }
.panel-grip::after { content: ""; position: absolute; inset: 0 2px; background: var(--brand); opacity: 0; transition: opacity 0.15s; }
.panel-grip:hover::after, html.side-resizing .panel-grip::after { opacity: 0.5; }
@media (max-width: 820px) { .panel-grip { display: none; } }
.nav.pg.drop-before { box-shadow: 0 -2px 0 0 var(--brand); }
.nav.pg.drop-after { box-shadow: 0 2px 0 0 var(--brand); }
/* 手機上的資料庫頁：標題跟「分享」「丟進垃圾桶」擠成一列；搜尋框跟三顆按鈕也擠成一列（放不下就自己換行） */
@media (max-width: 820px) {
  .page-head.db-head .title-in { flex-basis: 140px; min-width: 0; }
  .db-tools { flex: 1 1 100%; }
  .db-q { flex: 1 1 100%; width: auto; order: -2; }   /* 搜尋框自己一列，三顆按鈕排在下一列（「新增一列」排最前） */
  .db-tools .primary { order: -1; }
}
