/* AI 顧問團 — 視覺系統(2026-11 改版)
   想改整體外觀,先改最上面這一段的顏色與字型;其餘樣式都從這裡取值。
   風格:簡約、現代、科技感。靈感來自防霾紗窗 —— 細紗網擋下雜訊,讓乾淨的空氣(有用的資訊)進來。
   霧白的底、深青色的導覽與重點區、水青色的主色、一點陽光琥珀色做提醒;全站用粗而乾淨的黑體,數字用幾何感的 Sora。 */
:root {
  --mist: #F1F5F4; --mist-2: #E6EEEC; --mist-3: #D8E3E0;
  --surface: #FFFFFF;
  --ink: #0F2A2E; --ink-2: #3D565A; --ink-3: #566D71; --ink-4: #7C9093; /* ink-3:小字也讀得清楚(對比 4.5 以上);ink-4 只給提示字與裝飾 */
  --line: #DCE6E3; --line-2: #C6D4D1;
  --deep: #0E3338; --deep-2: #092528; --deep-3: #164349; --deep-ink: #B9D2CF;
  --air: #0A857D; --air-2: #076A64; --air-wash: #DBF1EE; --air-bright: #2FD1C1;
  --sun: #F2B84B; --sun-wash: #FCF0D3; --sun-ink: #7C5609;
  --ok: #0A857D; --ok-wash: #DBF1EE; --warn: #8F6206; --warn-wash: #FBEFD2; --bad: #BE3B2E; --bad-wash: #FBE8E5;
  /* 舊名稱沿用(畫面程式裡還有少數地方直接用到) */
  --paper: var(--mist); --paper-2: var(--mist-2); --paper-3: var(--mist-3);
  --accent: var(--air); --accent-2: var(--air-2); --accent-wash: var(--air-wash);
  --navy: var(--deep); --navy-ink: var(--deep-ink); --navy-accent: var(--air-bright);
  --display: "Sora", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --serif: var(--display);
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 28px;
  --shadow-1: 0 1px 2px rgba(14, 51, 56, .06);
  --shadow-2: 0 14px 34px -18px rgba(14, 51, 56, .32), 0 2px 6px rgba(14, 51, 56, .05);
  --shadow-3: 0 30px 70px -26px rgba(9, 37, 40, .5);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --rail: 78px; --side: 300px; --col: 760px;
  /* 紗網:兩個方向的細線疊在一起。放在深色區塊上當底紋 */
  --weave: repeating-linear-gradient(0deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 7px);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--mist); color: var(--ink); font: 15px/1.7 var(--sans); overflow: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-tap-highlight-color: transparent; }
#app { height: 100dvh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: #BFEDE6; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--air); outline-offset: 2px; border-radius: 6px; }
.icon { display: inline-grid; place-items: center; flex: none; }
.icon svg { display: block; }
.spacer { flex: 1; }
.serif { font-family: var(--display); font-weight: 700; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }

/* ── 動畫:只在「回應使用者的動作」時動(打開、展開、送出);不做整頁依序浮現那種裝飾 ── */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes caret { 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 209, 193, .5); } 60% { box-shadow: 0 0 0 7px rgba(47, 209, 193, 0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* ── 外框:左側導覽列、情境側欄、主畫面 ── */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); height: 100dvh; }
.shell.has-side { grid-template-columns: var(--rail) var(--side) minmax(0, 1fr); }
.drawer { display: contents; }
.scrim { display: none; }

.rail { background: var(--weave), linear-gradient(180deg, var(--deep) 0%, var(--deep-2) 100%); color: var(--deep-ink); display: flex; flex-direction: column;
  align-items: center; padding: 16px 0 14px; gap: 3px; position: relative; z-index: 3; }
.brand { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; margin-bottom: 14px; border-radius: 14px; }
.nav { width: 64px; padding: 9px 0 7px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 500; color: rgba(185, 210, 207, .66); position: relative; transition: color .18s, background .18s; }
.nav:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav.on { color: #fff; background: rgba(47, 209, 193, .16); }
.nav.on .icon { color: var(--air-bright); }
.nav .dot { position: absolute; top: 7px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--sun);
  box-shadow: 0 0 0 3px var(--deep); }
.nav.find { border: 0; background: transparent; margin-bottom: 6px; }
.nav.find .long { display: none; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.me-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06);
  color: #fff; font: 700 14px var(--display); display: grid; place-items: center; margin-top: 8px; transition: background .2s, border-color .2s; }
.me-btn:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); }

.side { background: var(--mist-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.side-head { padding: 18px 16px 14px; display: flex; gap: 12px; align-items: center; }
.side-head .who { flex: 1; min-width: 0; }
.side-name { font: 700 18px/1.25 var(--display); }
.side-role { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-actions { padding: 0 14px 6px; display: flex; flex-direction: column; gap: 8px; }
.side-scroll { flex: 1; overflow-y: auto; padding: 0 8px 20px; overscroll-behavior: contain; }
.side-label { display: flex; align-items: center; gap: 6px; padding: 16px 10px 6px; font-size: 12px; color: var(--ink-3); font-weight: 700; }
.side-label .spacer + * { margin-right: -4px; }
.side-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 10px; border-radius: 10px; font-size: 13.5px; line-height: 1.45;
  color: var(--ink-2); cursor: pointer; position: relative; transition: background .15s, color .15s; min-height: 34px; }
.side-item:hover { background: rgba(14, 51, 56, .06); color: var(--ink); }
.side-item.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); font-weight: 500; }
.side-item .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item .when, .side-item .count { font-size: 11.5px; color: var(--ink-3); flex: none; font-variant-numeric: tabular-nums; }
.side-item .icon { color: var(--ink-3); }
.side-item .more { opacity: 0; margin: -4px -2px -4px 0; }
.side-item:hover .more, .side-item.on .more, .side-item .more[aria-expanded="true"] { opacity: 1; }
.side-item:hover .more ~ .when, .side-item.on .more ~ .when { display: none; }
.side-item .badge { margin-left: 2px; }
.side-nest { margin-left: 15px; padding-left: 8px; border-left: 1px solid var(--line-2); }
.side-zone { padding: 14px 10px 4px; font: 700 14px var(--display); color: var(--ink); display: flex; align-items: center; gap: 8px; }
.side-empty { padding: 6px 10px 10px; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.side-mark { width: 46px; height: 46px; border-radius: 15px; flex: none; display: grid; place-items: center; background: var(--weave), var(--deep); color: var(--air-bright); }
.side-item .av { margin: -1px 0; }
/* 側欄上方:這位專家的小助手今天帶回來什麼 */
.side-scout { margin: 2px 14px 8px; padding: 11px 13px; border-radius: 14px; background: var(--weave), var(--deep); color: #fff; display: block;
  transition: background-color .2s; }
.side-scout:hover { background-color: var(--deep-3); }
.side-scout .k { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--air-bright); }
.side-scout .v { font-size: 12.5px; line-height: 1.55; color: rgba(255, 255, 255, .86); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }

.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; background: var(--mist); }
.topbar { height: 58px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 20px 0 26px; border-bottom: 1px solid var(--line); }
.topbar.bare { border-color: transparent; }
.topbar .titles { min-width: 0; flex: 1; }
.topbar h1 { font: 700 16.5px/1.3 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar h1.editable { cursor: text; border-radius: 6px; padding: 2px 6px; margin-left: -6px; transition: background .15s; width: max-content; max-width: 100%; }
.topbar h1.editable:hover { background: rgba(14, 51, 56, .06); }
.icon-btn.menu-btn { display: none; }
.page { flex: 1; overflow-y: auto; min-height: 0; }
.page-inner { max-width: 1080px; margin: 0 auto; padding: 40px 44px 90px; }
.page-inner.narrow { max-width: 820px; }
.page-inner.wide { max-width: 1180px; }

/* ── 文字層級 ── */
.eyebrow { font-size: 13px; font-weight: 700; color: var(--air-2); display: flex; align-items: center; gap: 8px; }
.display { font: 900 clamp(29px, 3.5vw, 44px)/1.22 var(--display); margin: 8px 0 12px; text-wrap: balance; }
.lead { color: var(--ink-2); font-size: 16px; max-width: 38em; margin-bottom: 30px; text-wrap: pretty; }
.section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font: 700 20px/1.3 var(--display); }
.section-head .note { font-size: 13px; color: var(--ink-3); }
.section-head .spacer + * { align-self: center; }
.hint { font-size: 13px; color: var(--ink-3); line-height: 1.65; }
.muted { color: var(--ink-3); }

/* ── 按鈕、欄位、標籤 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s, transform .12s; }
.btn:hover:not(:disabled) { border-color: var(--ink-3); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--deep); border-color: var(--deep); color: #fff; font-weight: 700; }
.btn.primary:hover:not(:disabled) { background: var(--deep-3); border-color: var(--deep-3); }
.btn.accent { background: var(--air); border-color: var(--air); color: #fff; font-weight: 700; }
.btn.accent:hover:not(:disabled) { background: var(--air-2); border-color: var(--air-2); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover:not(:disabled) { background: rgba(14, 51, 56, .07); border-color: transparent; color: var(--ink); }
.btn.danger { color: var(--bad); }
.btn.danger:hover:not(:disabled) { border-color: var(--bad); background: var(--bad-wash); }
.btn.sm { height: 31px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.lg { height: 48px; padding: 0 24px; font-size: 15.5px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn .icon { margin-left: -2px; }
.btn.arrow .icon:last-child { display: none; } /* 按鈕不再掛箭頭;文字本身已經說了會發生什麼 */
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-3); display: inline-grid;
  place-items: center; flex: none; transition: background .15s, color .15s; }
.icon-btn:hover { background: rgba(14, 51, 56, .08); color: var(--ink); }
.icon-btn.sm { width: 26px; height: 26px; border-radius: 7px; }
.link { color: var(--air-2); background: none; border: 0; padding: 0; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { margin-top: 6px; }
.input, .field input[type="text"], .field input[type="password"], .field input[type="time"], .field select, .field textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 13px; font-size: 15px; line-height: 1.5;
  outline: 0; transition: border-color .18s, box-shadow .18s; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--air); box-shadow: 0 0 0 4px rgba(10, 133, 125, .14); }
select, .field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236B8286' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px !important; }
.search { position: relative; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-4); pointer-events: none; }
.search input { width: 100%; height: 36px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255, 255, 255, .7); padding: 0 12px 0 34px;
  font-size: 13.5px; outline: 0; transition: border-color .18s, background .18s, box-shadow .18s; }
.search input:focus { border-color: var(--air); background: var(--surface); box-shadow: 0 0 0 4px rgba(10, 133, 125, .12); }

.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700;
  background: var(--mist-3); color: var(--ink-2); white-space: nowrap; }
.tag.accent { background: var(--air-wash); color: var(--air-2); }
.tag.ok { background: var(--ok-wash); color: var(--air-2); }
.tag.warn { background: var(--warn-wash); color: var(--warn); }
.tag.bad { background: var(--bad-wash); color: var(--bad); }
.tag.sun { background: var(--sun); color: #3B2A05; }
.tag.line { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-3); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--sun);
  color: #3B2A05; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; padding: 3px; background: var(--mist-3); border-radius: 12px; gap: 2px; max-width: 100%; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 14px; border-radius: 9px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap;
  transition: background .18s, color .18s, box-shadow .18s; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); font-weight: 700; }
.seg button:disabled { opacity: .4; cursor: default; }
/* 狀態燈:連線中會輕輕跳動 */
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
.live.on::before { background: var(--air-bright); animation: pulse 2.4s infinite; }
.live.off::before { background: var(--sun); }

/* ── 頭像:名字的第一個字 + 這位成員的代表色 ── */
.av { width: var(--s, 36px); height: var(--s, 36px); border-radius: calc(var(--s, 36px) * .32); flex: none; display: inline-grid; place-items: center;
  background: linear-gradient(150deg, var(--a, #2B3C3F), var(--b, #5C7377)); color: #fff; font: 700 calc(var(--s, 36px) * .44)/1 var(--sans);
  position: relative; overflow: hidden; user-select: none; }
.av::after { content: ""; position: absolute; inset: 0; background: var(--weave); opacity: .9; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit;
  transform: scale(1.5); transform-origin: 50% 34%; } /* 照片是肩上半身:小頭像裡放大到臉為主 */
.av.photo::after { display: none; } /* 有照片時不蓋紗網底紋 */
.av.scout { box-shadow: inset 0 0 0 2px var(--air-bright); font-weight: 500; } /* 小助手:和他的專家同色,外圈一道亮線 */
.stack .av.scout { box-shadow: inset 0 0 0 2px var(--air-bright), 0 0 0 2px var(--mist); }
.stack { display: flex; }
.stack .av { margin-left: -8px; box-shadow: 0 0 0 2px var(--mist); }
.stack .av:first-child { margin-left: 0; }

/* ── 卡片與清單 ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.card + .card { margin-top: 14px; }
.card h3 { font: 700 16.5px/1.35 var(--display); }
.card-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 20px 16px; display: flex; flex-direction: column;
  gap: 4px; position: relative; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.tile:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.tile .av { margin-bottom: 12px; }
.tile .name { font: 700 20px/1.3 var(--display); }
.tile .role { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.tile .facts { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); padding-top: 12px; margin-top: 10px;
  border-top: 1px solid var(--line); }
.tile .go { display: flex; align-items: center; gap: 4px; margin-top: 12px; }
.tile .intel { display: block; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); margin-top: 10px; padding: 9px 11px; border-radius: 10px; background: var(--mist);
  min-height: calc(3.1em + 18px); transition: background .18s; }
.tile .intel span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile a.intel:hover { background: var(--air-wash); }
.tile .intel.none { color: var(--ink-3); }
.tile .facts span:empty { display: none; }
.tile.add { border-style: dashed; background: transparent; align-items: center; justify-content: center; color: var(--ink-3); min-height: 190px;
  cursor: pointer; gap: 10px; font-size: 14px; }
.tile.add:hover { color: var(--ink); background: var(--surface); box-shadow: none; }
.rows { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 16px; padding: 15px 8px; border-bottom: 1px solid var(--line); position: relative; transition: background .18s; }
a.row:hover, .row.click:hover { background: rgba(255, 255, 255, .75); }
.row-main { flex: 1; min-width: 0; }
.row-title { font: 700 16px/1.4 var(--display); }
.row-sub { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .chev { color: var(--ink-4); }
a.row:hover .chev, .row.click:hover .chev { color: var(--ink); }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--r-lg); font-size: 14px; }
.empty .serif { display: block; font-size: 17px; color: var(--ink); margin-bottom: 6px; }
.notice { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--sun-wash); color: var(--sun-ink); font-size: 13px;
  border-bottom: 1px solid rgba(124, 86, 9, .14); }
.notice .btn { margin-left: auto; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.fold > summary { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--air-2); font-weight: 700; }
.fold > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform .2s; margin-right: 2px; }
.fold[open] > summary::before { transform: rotate(45deg); }
.fold pre { margin: 10px 0 0; }
pre { background: var(--mist-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font: 13px/1.65 var(--mono);
  white-space: pre-wrap; word-break: break-word; overflow-x: auto; max-height: 420px; }
code { font: .9em var(--mono); background: rgba(14, 51, 56, .07); padding: .12em .38em; border-radius: 5px; }
pre code { background: none; padding: 0; font-size: 1em; }
.bar { height: 6px; border-radius: 3px; background: var(--mist-3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--air); transition: width .6s var(--ease); }

/* ── 對話 ── */
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 28px 28px 8px; min-height: 0; }
.thread { max-width: var(--col); margin: 0 auto; display: flex; flex-direction: column; gap: 28px; padding-bottom: 12px; }
.msg { min-width: 0; }
.msg.ai .msg-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.msg-name { font-weight: 700; font-size: 13.5px; }
.msg-role { font-size: 12px; color: var(--ink-3); }
.msg.me { align-self: flex-end; max-width: min(80%, 620px); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.bubble { background: var(--deep); color: #fff; padding: 10px 16px; border-radius: 18px 18px 5px 18px; white-space: pre-wrap; word-break: break-word;
  font-size: 15.5px; line-height: 1.7; }
.bubble a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .5); }
.msg.note { align-self: stretch; display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--ink-3); text-align: center;
  line-height: 1.6; }
.msg.note::before, .msg.note::after { content: ""; flex: 1; min-width: 20px; height: 1px; background: var(--line); }
.msg.note span { max-width: 78%; }
.msg.error .md { color: var(--bad); }
.msg-foot { display: flex; align-items: center; gap: 4px; margin-top: 8px; min-height: 26px; }
.meta { font-size: 11.5px; color: var(--ink-3); }
.msg-foot .icon-btn { opacity: 0; transition: opacity .2s, background .15s, color .15s; }
.msg:hover .msg-foot .icon-btn, .msg-foot .icon-btn:focus-visible { opacity: 1; }
.typing { display: inline-flex; gap: 5px; padding: 8px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--air); animation: blink 1.3s infinite both; }
.typing i:nth-child(2) { animation-delay: .16s; }
.typing i:nth-child(3) { animation-delay: .32s; }
.msg.streaming .md > :last-child::after { content: ""; display: inline-block; width: 7px; height: 1.05em; margin-left: 3px; vertical-align: -.18em;
  background: var(--air); border-radius: 1px; animation: caret 1s steps(1) infinite; }

.md { font-size: 16px; line-height: 1.8; word-break: break-word; color: var(--ink); }
.md > * + * { margin-top: .85em; }
.md h3 { font: 700 20px/1.4 var(--display); margin-top: 1.4em; }
.md h4 { font: 700 17px/1.45 var(--display); margin-top: 1.3em; }
.md h5 { font-size: 15px; font-weight: 700; margin: 1.1em 0 0; }
.md ul, .md ol { padding-left: 1.4em; margin-bottom: 0; }
.md li + li { margin-top: .3em; }
.md li > ul, .md li > ol { margin-top: .3em; }
.md li::marker { color: var(--air); }
.md a { color: var(--air-2); text-decoration: underline; text-decoration-color: rgba(10, 133, 125, .4); text-underline-offset: 3px; word-break: break-all; }
.md a:hover { text-decoration-color: currentColor; }
.md blockquote { margin: .85em 0 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--air-wash); color: var(--ink-2); }
.md blockquote:first-child { margin-top: 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.4em 0; }
.md strong { font-weight: 700; }
.md .codeblock { position: relative; }
.md .codeblock button { position: absolute; top: 7px; right: 7px; opacity: 0; transition: opacity .2s; background: var(--surface); }
.md .codeblock:hover button { opacity: 1; }
.md .table { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.md table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.55; }
.md th, .md td { padding: 9px 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.md th { font-weight: 700; background: var(--deep); font-size: 12.5px; color: #fff; white-space: nowrap; }
.md tr:last-child td { border-bottom: 0; }

/* 附件 */
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.msg.me .files { justify-content: flex-end; margin-top: 0; }
.att-img { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--mist-2); cursor: zoom-in; transition: box-shadow .2s; }
.att-img:hover { box-shadow: var(--shadow-2); }
.att-img img { display: block; max-width: min(300px, 100%); max-height: 240px; min-width: 72px; min-height: 56px; object-fit: cover; }
.att-video { border-radius: 14px; overflow: hidden; background: #000; max-width: min(420px, 100%); border: 1px solid var(--line); }
.att-video video { display: block; width: 100%; max-height: 300px; }
.att-audio { width: 100%; display: block; }
.att-media { display: flex; flex-direction: column; gap: 4px; width: min(420px, 100%); min-width: 0; }
.att-media:has(audio) { width: min(360px, 100%); }
.att-cap { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); padding-left: 2px; }
.att-cap .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
/* 回覆進行中的狀態:正在用哪個工具、是不是在等你同意 */
.msg-status { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--air-2); margin-top: 10px; padding: 6px 12px 6px 10px;
  background: var(--air-wash); border-radius: 999px; font-weight: 500; }
.msg-status::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid rgba(10, 133, 125, .3); border-top-color: var(--air);
  animation: spin .9s linear infinite; flex: none; }
.switch { position: relative; width: 40px; height: 23px; border-radius: 12px; border: 0; background: var(--line-2); flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(14, 51, 56, .25); transition: transform .22s var(--ease); }
.switch[aria-checked="true"] { background: var(--air); }
.switch[aria-checked="true"]::after { transform: translateX(17px); }
.switch:disabled { opacity: .45; cursor: default; }
.chip { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 13px; max-width: 320px; min-width: 0; text-align: left; position: relative; overflow: hidden; transition: border-color .18s, box-shadow .18s; }
button.chip:hover, a.chip:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.chip .ext { width: 36px; height: 36px; border-radius: 9px; background: var(--mist-2); color: var(--ink-2); display: grid; place-items: center;
  font: 700 9.5px/1 var(--display); flex: none; }
.chip.gen .ext { background: var(--deep); color: var(--air-bright); }
.chip .nm { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.chip .sz { font-size: 11.5px; color: var(--ink-3); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip .txt { min-width: 0; flex: 1; }
.chip .x { margin: -2px -6px -2px 0; }
.chip .prog { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--air); transition: width .2s; }
.chip.failed { border-color: var(--bad); }
.chip.failed .sz { color: var(--bad); }
.chip img.thumb { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; flex: none; }

/* 輸入區 */
.composer-wrap { padding: 4px 28px 22px; flex: none; position: relative; }
.composer-wrap::before { content: ""; position: absolute; left: 0; right: 14px; top: -24px; height: 24px; pointer-events: none;
  background: linear-gradient(180deg, rgba(241, 245, 244, 0), var(--mist)); }
.composer { max-width: var(--col); margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px;
  box-shadow: var(--shadow-2); padding: 12px 12px 10px 18px; transition: border-color .2s, box-shadow .25s; position: relative; }
.composer:focus-within { border-color: var(--air); box-shadow: var(--shadow-2), 0 0 0 4px rgba(10, 133, 125, .12); }
.composer.drop { border-color: var(--air); box-shadow: 0 0 0 4px rgba(10, 133, 125, .2); }
.composer textarea { display: block; width: 100%; border: 0; outline: 0; resize: none; background: transparent; font-size: 16px; line-height: 1.65;
  max-height: 220px; padding: 4px 6px 4px 0; }
.composer textarea::placeholder { color: var(--ink-4); }
.tray { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 6px 10px 0; }
.tray:empty { display: none; }
.tray .linkrow { display: flex; gap: 8px; width: 100%; }
.tray .linkrow input { flex: 1; min-width: 0; height: 36px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; outline: 0; font-size: 14px; }
.tray .linkrow input:focus { border-color: var(--air); }
.composer-bar { display: flex; align-items: center; gap: 4px; margin: 6px 0 0 -8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 9px; border: 0; background: transparent;
  color: var(--ink-3); font-size: 13px; max-width: 46vw; transition: background .15s, color .15s; }
.pill:hover { background: rgba(14, 51, 56, .07); color: var(--ink); }
.pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-bar .pill { min-width: 0; }
.composer-bar.two .pill { max-width: 34vw; }
.composer-bar.two .pill + .pill { flex: none; max-width: none; } /* 小會議室:位置不夠時只縮專家那一顆(字比較長),小助手那顆完整顯示 */
@media (max-width: 1100px) { .composer-bar.two .keyhint { display: none; } }
.keyhint { font-size: 11.5px; color: var(--ink-3); margin-right: 8px; white-space: nowrap; }
.send { width: 38px; height: 38px; border-radius: 50%; background: var(--air); color: #fff; border: 0; display: grid; place-items: center; flex: none;
  transition: transform .12s, background .2s; }
.send:hover:not(:disabled) { background: var(--air-2); }
.send:active:not(:disabled) { transform: scale(.94); }
.send:disabled { background: var(--mist-3); color: var(--ink-4); cursor: default; }
.send .icon + .icon { display: none; }
.send.stop { background: var(--deep); }
.send.stop:hover:not(:disabled) { background: var(--deep-3); }
.send.stop .icon { display: none; }
.send.stop .icon + .icon { display: inline-grid; }
.send.busy .icon, .send.busy .icon + .icon { display: none; }
.send.busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink-4); border-top-color: transparent;
  animation: spin .8s linear infinite; }
.quick { max-width: var(--col); margin: 0 auto 10px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.tobottom { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 10px); width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; box-shadow: var(--shadow-2);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); z-index: 2; margin-bottom: 14px; }
.tobottom.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }

/* 新對話:主視覺 + 置中的輸入區 */
.chat.fresh { overflow-y: auto; }
.chat.fresh .chat-scroll { flex: none; overflow: visible; padding-top: clamp(36px, 12vh, 120px); padding-bottom: 0; }
.chat.fresh .composer-wrap::before { display: none; }
.chat.fresh .composer-wrap { padding-bottom: 20px; }
.below { display: none; }
.chat.fresh .below { display: block; width: 100%; max-width: calc(var(--col) + 56px); margin: 0 auto; padding: 6px 28px 70px; }
.hero { position: relative; padding-bottom: 6px; }
.hero .display { font-size: clamp(30px, 4vw, 44px); margin-top: 14px; }
.hero p { color: var(--ink-2); font-size: 15.5px; max-width: 36em; text-wrap: pretty; }
.hero-who { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.aura { display: none; }
.suggest { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 10px; }
.suggest button { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px 12px;
  display: flex; flex-direction: column; gap: 3px; position: relative; transition: border-color .2s, box-shadow .2s; }
.suggest button:hover { border-color: var(--air); box-shadow: 0 0 0 3px rgba(10, 133, 125, .1); }
.suggest .no { display: none; }
.suggest .tt { font-weight: 700; font-size: 14px; }
.suggest .ds { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; }
.suggest .icon { display: none; }

/* 申請卡片與館藏收據 */
.cards { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.cards:empty { display: none; }
.pcard { border: 1px solid var(--line-2); border-radius: 18px; background: var(--surface); overflow: hidden; max-width: 560px;
  animation: pop .3s var(--ease) both; box-shadow: var(--shadow-1); }
.pcard.pending { border-color: var(--sun); box-shadow: 0 0 0 3px rgba(242, 184, 75, .18); }
.pcard-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 0; }
.pcard-head .kind { font-size: 12.5px; font-weight: 700; color: var(--sun-ink); }
.pcard-title { font: 700 17px/1.4 var(--display); padding: 4px 18px 0; }
.pcard-body { padding: 10px 18px 4px; font-size: 14px; }
.pcard dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; }
.pcard dt { color: var(--ink-3); font-size: 12.5px; padding-top: 2px; white-space: nowrap; }
.pcard dd { margin: 0; white-space: pre-wrap; word-break: break-word; line-height: 1.65; }
.pcard textarea { width: 100%; min-height: 84px; margin-top: 10px; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; outline: 0; }
.pcard-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px 16px; font-size: 13.5px; flex-wrap: wrap; }
.pcard.approved, .pcard.rejected { background: transparent; border-color: var(--line); box-shadow: none; }
.pcard.approved .kind { color: var(--air-2); }
.pcard.rejected .kind, .pcard.rejected .pcard-title { color: var(--ink-3); }
.pcard .state { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.pcard.approved .state .icon { color: var(--air); }
/* 施工排程:卡片上依序列出每一張單(可收合);設定頁用同一份樣式顯示進度 */
.plan { border-top: 1px solid var(--line); }
.plan-item { border-bottom: 1px solid var(--line); }
.plan-item > summary, .plan-step { display: flex; align-items: center; gap: 10px; padding: 10px 0; flex-wrap: wrap; }
.plan-item > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(-45deg); transition: transform .2s; margin: 0 4px; }
.plan-item[open] > summary::after { transform: rotate(45deg); }
.plan .no { font: 700 12px/1 var(--display); color: var(--ink-4); flex: none; font-variant-numeric: tabular-nums; }
.plan .nm { flex: 1; min-width: 0; font-weight: 700; line-height: 1.5; }
.plan-item dl { padding: 0 0 14px 26px; }
.plan-step { border-bottom: 1px solid var(--line); font-size: 14px; }
.plan-step.now .no { color: var(--air-2); }
.plan-step.off .nm { color: var(--ink-3); font-weight: 500; }
.receipts { border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .7); max-width: 560px; overflow: hidden; }
.receipts-head { padding: 9px 14px; font-size: 12px; font-weight: 700; color: var(--ink-3); border-bottom: 1px solid var(--line); background: var(--mist-2); }
.receipt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; font-size: 13.5px; line-height: 1.55; border-bottom: 1px solid var(--line); }
.receipt:last-child { border-bottom: 0; }
.receipt .icon { margin-top: 2px; color: var(--air); }
.receipt.failed .icon { color: var(--bad); }
.receipt.undone { color: var(--ink-3); }
.receipt.undone .icon { color: var(--ink-4); }
.receipt.undone .what { text-decoration: line-through; text-decoration-color: var(--ink-4); }
.receipt .what { flex: 1; min-width: 0; }

/* ── 浮層:對話框、選單、提示、燈箱 ── */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(9, 37, 40, .5); backdrop-filter: blur(4px); display: grid; place-items: center;
  padding: 20px; animation: fade .2s both; }
.modal { width: min(560px, 100%); max-height: min(86dvh, 860px); overflow-y: auto; background: var(--surface); border-radius: 22px; padding: 26px 28px 24px;
  box-shadow: var(--shadow-3); animation: pop .25s var(--ease) both; }
.modal.wide { width: min(880px, 100%); }
.modal h2 { font: 700 21px/1.35 var(--display); margin-bottom: 18px; }
.modal-foot { display: flex; align-items: center; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.menu { position: fixed; z-index: 70; min-width: 190px; max-width: min(320px, calc(100vw - 16px)); background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 5px; box-shadow: var(--shadow-3); animation: pop .16s var(--ease) both; max-height: 70dvh; overflow-y: auto; }
.menu button, .menu a { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: transparent; padding: 8px 10px; border-radius: 9px;
  font-size: 13.5px; text-align: left; color: var(--ink); }
.menu button:hover, .menu a:hover { background: var(--mist); }
.menu button.danger { color: var(--bad); }
.menu button .icon { color: var(--ink-3); }
.menu button.danger .icon { color: inherit; }
.menu button small { color: var(--ink-3); font-size: 12px; margin-left: 8px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.menu .menu-label { padding: 7px 10px 3px; font-size: 12px; color: var(--ink-3); font-weight: 700; }
.menu .pad { padding: 10px 10px 8px; }
.menu .pad .field { margin-bottom: 12px; }
.menu .pad .field:last-of-type { margin-bottom: 8px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; background: var(--deep); color: #fff; padding: 10px 18px;
  border-radius: 999px; font-size: 13.5px; box-shadow: var(--shadow-3); animation: pop .22s var(--ease) both; max-width: min(90vw, 520px);
  display: flex; align-items: center; gap: 9px; }
.toast.ok .icon { color: var(--air-bright); }
.toast.err .icon { color: var(--sun); }
/* 快速搜尋(⌘K) */
.palette-back { position: fixed; inset: 0; z-index: 75; background: rgba(9, 37, 40, .45); backdrop-filter: blur(6px); display: flex; justify-content: center;
  align-items: flex-start; padding: min(14vh, 120px) 16px 16px; animation: fade .15s both; }
.palette { width: min(640px, 100%); max-height: min(72dvh, 640px); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-3); overflow: hidden;
  display: flex; flex-direction: column; animation: pop .2s var(--ease) both; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px 16px 20px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.palette-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--ink); }
.palette-input input::placeholder { color: var(--ink-4); }
.palette kbd { font: 600 11px/1 var(--display); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 6px; background: var(--mist); }
.palette-list { overflow-y: auto; padding: 4px 8px 10px; overscroll-behavior: contain; }
.palette-group { padding: 12px 12px 4px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.palette-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; text-align: left; padding: 8px 12px; border-radius: 12px; }
.palette-item.on { background: var(--air-wash); }
.palette-item .ico { width: 30px; height: 30px; border-radius: 9.6px; background: var(--mist-2); color: var(--ink-2); display: grid; place-items: center; flex: none; }
.palette-item.on .ico { background: var(--surface); color: var(--air-2); }
.palette-item .tt { display: block; font-weight: 700; font-size: 14.5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-item .ds { display: block; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-item .w { font-size: 12px; color: var(--ink-3); flex: none; }
.palette-empty { padding: 30px 20px; text-align: center; color: var(--ink-3); font-size: 14px; }
.palette-foot { display: flex; gap: 18px; padding: 10px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); background: var(--mist); }
.palette-foot span { display: inline-flex; align-items: center; gap: 6px; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(6, 24, 26, .9); display: grid; place-items: center; padding: 24px; animation: fade .2s both;
  cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 100px); border-radius: 10px; box-shadow: var(--shadow-3); }
.lightbox .tools { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; }
.lightbox .tools a, .lightbox .tools button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff;
  display: grid; place-items: center; }
.viewer-frame { width: 100%; height: min(64dvh, 640px); border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.viewer-body { max-height: 64dvh; overflow: auto; }
.viewer-body pre { max-height: none; }

/* ── 各頁 ── */
.article { max-width: 760px; }
.article .display { margin-top: 12px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 12.5px; color: var(--ink-3); padding-bottom: 20px;
  margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.article-meta a { color: var(--air-2); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }
.crumbs .icon { color: var(--ink-4); }
.shelf-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 16px; position: relative;
  overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.shelf-card:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); }
.shelf-card .nm { font: 700 17px/1.35 var(--display); display: flex; align-items: center; gap: 8px; }
.shelf-card .ds { font-size: 13px; color: var(--ink-3); margin-top: 4px; min-height: 2.9em; line-height: 1.5; }
.shelf-card .ft { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); font-size: 12px;
  color: var(--ink-3); }
.shelf-card .ft .icon { margin-left: auto; color: var(--ink-4); }
.zone-head { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 14px; }
.zone-head:first-child { margin-top: 8px; }
.zone-head h2 { font: 700 21px/1.3 var(--display); }
.zone-head .note { font-size: 13px; color: var(--ink-3); }
.entry-row .excerpt { font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.6; margin-top: 2px; }
.entry-row .row-meta { font-size: 12px; color: var(--ink-3); margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
mark { background: var(--sun-wash); color: inherit; border-radius: 3px; padding: 0 1px; }
.tones { display: flex; gap: 10px; flex-wrap: wrap; }
.tones button { width: 34px; height: 34px; border-radius: 11px; border: 0; background: linear-gradient(150deg, var(--a), var(--b)); position: relative; }
.tones button.on::after { content: ""; position: absolute; inset: -4px; border-radius: 14px; border: 2px solid var(--ink); }
.profile-top { display: flex; gap: 22px; align-items: center; margin-bottom: 24px; flex-wrap: wrap; }
.asset { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.asset:last-of-type { border-bottom: 0; }
.asset > :first-child { flex: 1; min-width: 0; }
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  cursor: pointer; transition: border-color .18s, background .18s, box-shadow .18s; }
.check:hover { border-color: var(--line-2); }
.check.on { border-color: var(--air); box-shadow: inset 0 0 0 1px var(--air); background: var(--air-wash); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check small { color: var(--ink-3); font-size: 12px; display: block; line-height: 1.35; }
.check b { font-weight: 700; font-size: 14px; display: block; line-height: 1.35; }
.kv { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv > :first-child { flex: 1; min-width: 0; }
.codebox { font: 700 18px var(--mono); letter-spacing: .14em; }
.settings-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: -8px 0 4px; }
.settings-nav button { height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-size: 13px; color: var(--ink-2);
  transition: background .18s, border-color .18s, color .18s; }
.settings-nav button:hover { background: var(--surface); border-color: var(--air); color: var(--ink); }

/* ── 今天(首頁)── */
.today-head { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.today-head .display { margin: 2px 0 0; font-size: clamp(30px, 3.6vw, 46px); }
.today-head .date { font: 600 13.5px var(--display); color: var(--air-2); }
.today-head + .lead { margin: 10px 0 22px; }
.ask { background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; padding: 14px 14px 12px 20px; box-shadow: var(--shadow-2);
  transition: border-color .2s, box-shadow .2s; }
.ask:focus-within { border-color: var(--air); box-shadow: var(--shadow-2), 0 0 0 4px rgba(10, 133, 125, .12); }
.ask textarea { display: block; width: 100%; border: 0; outline: 0; resize: none; background: transparent; font-size: 17px; line-height: 1.6; min-height: 56px;
  max-height: 200px; }
.ask textarea::placeholder { color: var(--ink-4); }
.ask-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 0 -8px; }
.ask-bar .pill { max-width: 70vw; color: var(--ink-2); font-weight: 500; }
.ask-bar .pill .av { margin: 0 2px 0 -2px; }
.ask-bar .btn { border-radius: 999px; padding: 0 20px; }
.starters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.starters button { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-size: 13.5px; color: var(--ink-2);
  transition: background .18s, border-color .18s, color .18s; }
.starters button:hover { background: var(--surface); border-color: var(--air); color: var(--ink); }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; margin-top: 34px; align-items: start; }
/* 今日情報:深色的主區塊 + 一位一列的清單 */
.brief-panel { border-radius: var(--r-xl); background: var(--weave), linear-gradient(160deg, var(--deep) 0%, var(--deep-2) 100%); color: #fff; padding: 26px 28px 24px;
  position: relative; overflow: hidden; }
.brief-panel .k { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--air-bright); }
.brief-panel .k .at { margin-left: auto; font: 500 12.5px var(--display); color: var(--deep-ink); font-variant-numeric: tabular-nums; }
/* 切換看哪一位專家的情報:一排頭像,選中的那一位展開顯示名字 */
.brief-tabs { display: flex; gap: 6px; margin: 16px -4px 0; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.brief-tabs::-webkit-scrollbar { display: none; }
.brief-tabs button { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 36px; padding: 0 4px; border-radius: 12px; border: 0; background: transparent;
  color: #fff; font-size: 13.5px; font-weight: 700; opacity: .62; transition: opacity .18s, background .18s; }
.brief-tabs button:hover { opacity: 1; }
.brief-tabs button.on { opacity: 1; background: rgba(255, 255, 255, .12); padding-right: 12px; }
.brief-tabs button:focus-visible { outline-color: var(--air-bright); }
.brief-panel .working { background: rgba(47, 209, 193, .14); color: #CFF5F0; margin: 14px 0 0; }
.brief-panel .working::before { border-color: rgba(47, 209, 193, .3); border-top-color: var(--air-bright); }
.brief-panel h2 { font: 900 24px/1.3 var(--display); margin: 16px 0 14px; }
.brief-panel ol { margin: 0; padding: 0; list-style: none; counter-reset: point; display: flex; flex-direction: column; gap: 12px; }
.brief-panel li { counter-increment: point; display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 15px; line-height: 1.65; color: rgba(255, 255, 255, .92); }
.brief-panel li::before { content: counter(point); font: 700 13px/26px var(--display); width: 26px; height: 26px; border-radius: 8px; text-align: center;
  background: rgba(47, 209, 193, .18); color: var(--air-bright); }
.brief-panel .foot { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.brief-panel .foot .who { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--deep-ink); margin-right: auto; }
.brief-panel .btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; }
.brief-panel .btn:hover:not(:disabled) { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .4); }
.brief-panel .btn.accent { background: var(--air-bright); border-color: var(--air-bright); color: var(--deep-2); }
.brief-panel .btn.accent:hover:not(:disabled) { background: #5ADFD2; border-color: #5ADFD2; }
.brief-panel p { color: rgba(255, 255, 255, .82); font-size: 14.5px; line-height: 1.75; max-width: 34em; }
.brief-list { border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.brief-row { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.brief-row .main { flex: 1; min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 6px;
  border-radius: 10px; transition: background .18s; }
.brief-row .main:hover { background: rgba(255, 255, 255, .8); }
.brief-row .nm { font-weight: 700; font-size: 14px; display: flex; align-items: baseline; gap: 8px; }
.brief-row .nm small { font-weight: 400; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brief-row .pt { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brief-row .pt.none { color: var(--ink-3); }
.brief-row .when { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.side-card + .side-card { margin-top: 14px; }
.side-card h3 { font: 700 15px/1.3 var(--display); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.side-card .mini { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; min-width: 0; }
.side-card .mini:first-of-type { border-top: 0; }
.side-card .mini .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-card .mini .t small { color: var(--ink-3); font-size: 12px; margin-left: 8px; }
.side-card .mini > .icon { width: 24px; color: var(--ink-3); }
.side-card h3 .badge { margin-left: auto; }
.side-card .live { align-items: flex-start; line-height: 1.5; }
.side-card .live::before { margin-top: 6px; }
.side-card .mini .w { font-size: 12px; color: var(--ink-3); flex: none; }
.side-card .mini:hover .t { color: var(--air-2); }
.status-list { display: flex; flex-direction: column; gap: 9px; }
.team-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.team-strip a { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 500; transition: border-color .18s, background .18s; }
.team-strip a:hover { border-color: var(--air); background: var(--air-wash); }

/* ── 小助手(每日情報、參考範本、推薦工具)── */
.scout-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.scout-head .display { margin: 0; font-size: clamp(24px, 2.6vw, 32px); }
.scout-head .sub { font-size: 13.5px; color: var(--ink-3); }
.scout-head .sub { margin-top: 4px; max-width: 44em; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.scout-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 26px; align-items: start; margin-top: 22px; }
.scout-layout.solo { grid-template-columns: minmax(0, 1fr); }
.report-title { font: 900 clamp(22px, 2.4vw, 28px)/1.3 var(--display); margin-bottom: 18px; text-wrap: balance; }
/* 今天的總覽:每位專家一張卡片,兩欄排下去 */
.digest { columns: 2; column-gap: 16px; }
.digest-card { break-inside: avoid; margin: 0 0 16px; }
.digest-card + .digest-card { margin-top: 0; }
.points { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: point; display: flex; flex-direction: column; gap: 10px; }
.points li { counter-increment: point; display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 14.5px; line-height: 1.65; }
.points li::before { content: counter(point); font: 700 12px/22px var(--display); width: 22px; height: 22px; border-radius: 7px; text-align: center;
  background: var(--air-wash); color: var(--air-2); margin-top: 1px; }
.scout-dates { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.scout-dates button { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: transparent; padding: 9px 12px; border-radius: 10px;
  font-size: 13.5px; color: var(--ink-2); transition: background .15s; }
.scout-dates button:hover { background: rgba(14, 51, 56, .06); }
.scout-dates button.on { background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); color: var(--ink); font-weight: 700; }
.scout-dates button .d { font-family: var(--display); font-variant-numeric: tabular-nums; }
.scout-dates button.failed { color: var(--ink-3); }
.report { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 34px 34px; min-width: 0; }
.report .md h3 { padding-top: 1em; border-top: 1px solid var(--line); }
.report .md > h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.report .md h4 { color: var(--air-2); }
.report-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.mission { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); white-space: pre-wrap; }
.working { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; background: var(--air-wash); color: var(--air-2); font-size: 14px;
  font-weight: 500; margin-bottom: 16px; }
.working .btn { margin-left: auto; flex: none; }
.working::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(10, 133, 125, .3); border-top-color: var(--air);
  animation: spin .9s linear infinite; flex: none; }

/* ── 進門(登入前):產品介紹頁 ── */
.land { height: 100dvh; overflow-y: auto; background: var(--mist); scroll-behavior: smooth; }
.land-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 14px clamp(20px, 5vw, 56px);
  background: rgba(241, 245, 244, .82); backdrop-filter: blur(14px); }
.land-brand { display: flex; align-items: center; gap: 11px; font: 700 17px var(--display); color: var(--ink); }
.land-brand .icon { width: 36px; height: 36px; border-radius: 11px; background: var(--deep); color: #fff; }
.land-top nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.land-top nav a { padding: 8px 13px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background .18s, color .18s; }
.land-top nav a:hover { background: rgba(14, 51, 56, .07); color: var(--ink); }
.land-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(18px, 4vh, 44px) clamp(20px, 5vw, 56px) clamp(40px, 7vh, 72px); max-width: 1320px; margin: 0 auto; }
.land-hero h1 { font: 900 clamp(38px, 5.2vw, 68px)/1.14 var(--display); letter-spacing: -.01em; }
.land-hero h1 span { display: block; word-break: keep-all; overflow-wrap: anywhere; }
.land-hero .sub { font-size: clamp(15.5px, 1.25vw, 17.5px); line-height: 1.85; color: var(--ink-2); margin-top: 22px; max-width: 30em; text-wrap: pretty; }
.land-form { margin-top: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 22px 18px; max-width: 420px;
  box-shadow: var(--shadow-2); }
.land-form h2 { font: 700 18px/1.3 var(--display); margin-bottom: 4px; }
.land-form .hint { font-size: 13px; margin-bottom: 14px; }
.land-form .field { margin-bottom: 12px; }
.land-form .swap { display: block; width: 100%; text-align: center; margin-top: 12px; font-size: 13.5px; color: var(--ink-3); background: none; border: 0; }
.land-form .swap:hover { color: var(--air-2); }
.stage { position: relative; border-radius: var(--r-xl); background: linear-gradient(165deg, var(--deep) 0%, var(--deep-2) 100%); overflow: hidden;
  aspect-ratio: 10 / 9; min-height: 420px; box-shadow: var(--shadow-3); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage .cap { position: absolute; left: 22px; bottom: 18px; font-size: 12px; color: rgba(185, 210, 207, .7); }
.stage .cap-r { left: auto; right: 22px; }
.stage-card { position: absolute; right: 5%; top: 50%; transform: translateY(-50%); width: min(46%, 300px); background: rgba(255, 255, 255, .97); color: var(--ink);
  border-radius: 18px; padding: 16px 18px 14px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55); }
.stage-card .k { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--air-2); }
.stage-card .k b { margin-left: auto; font: 600 12px var(--display); color: var(--ink-3); }
.stage-card h3 { font: 900 16.5px/1.35 var(--display); margin: 8px 0 8px; }
.stage-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.stage-card li { font-size: 13px; line-height: 1.55; padding-left: 14px; position: relative; color: var(--ink-2); transition: opacity .5s, transform .5s var(--ease); }
.stage-card li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 2px; background: var(--air); }
.stage-card li.wait { opacity: 0; transform: translateX(-10px); }
.stage-card .by { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.land-band { padding: clamp(46px, 8vh, 88px) clamp(20px, 5vw, 56px); }
.land-band > .in { max-width: 1210px; margin: 0 auto; }
.land-band h2 { font: 900 clamp(26px, 3vw, 40px)/1.25 var(--display); word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.land-band .intro { font-size: 16px; color: var(--ink-2); margin-top: 12px; max-width: 34em; line-height: 1.85; }
.land-band.dark { background: var(--weave), var(--deep); color: #fff; }
.land-band.dark .intro { color: var(--deep-ink); }
/* 成員:每一位是一條「線」,顏色就是他的代表色 */
.threads { margin-top: 34px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; }
.threads.staff { margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.threads.staff .thread-item b { font-size: 17px; }
.thread-item { display: grid; grid-template-columns: 4px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.thread-item i { border-radius: 2px; background: linear-gradient(180deg, var(--a), var(--b)); }
.thread-item b { display: block; font: 700 16px/1.3 var(--display); }
.thread-item span { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; line-height: 1.55; }
/* 一天怎麼運作:真的有先後順序,所以用時間當標記 */
.day { margin-top: 38px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.day > div { padding: 22px 22px 6px 0; border-right: 1px solid rgba(255, 255, 255, .12); margin-right: 22px; }
.day > div:last-child { border-right: 0; margin-right: 0; }
.day time { font: 700 26px/1 var(--display); color: var(--air-bright); font-variant-numeric: tabular-nums; }
.day b { display: block; font: 700 17px/1.4 var(--display); margin: 14px 0 6px; }
.day p { font-size: 14px; line-height: 1.75; color: var(--deep-ink); }
.guards { margin-top: 30px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.guard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.guard .icon { width: 40px; height: 40px; border-radius: 12px; background: var(--air-wash); color: var(--air-2); margin-bottom: 14px; }
.guard b { display: block; font: 700 17px/1.4 var(--display); margin-bottom: 6px; }
.guard p { font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.land-foot { padding: 26px clamp(20px, 5vw, 56px) 40px; font-size: 12.5px; color: var(--ink-3); display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* 視窗不高的電腦(小筆電):導覽列壓緊一點;再矮就只留圖示(滑鼠停上去有名稱) */
@media (min-width: 881px) and (max-height: 740px) {
  .rail { padding: 10px 0 8px; gap: 1px; overflow-y: auto; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .brand { height: 36px; margin-bottom: 6px; }
  .nav { padding: 6px 0 4px; gap: 1px; font-size: 10.5px; line-height: 1.5; }
  .nav.find { margin-bottom: 2px; }
  .me-btn { width: 32px; height: 32px; margin-top: 4px; }
}
@media (min-width: 881px) and (max-height: 600px) {
  .nav { padding: 9px 0; }
  .nav > span:not(.icon):not(.dot) { display: none; }
}
/* 寬螢幕上,頁面本身已經有大標題的頁面,最上面那一列就不再重複標題 */
@media (min-width: 881px) {
  .topbar.bare h1 { display: none; }
  .topbar.bare.blank { display: none; } /* 只有手機的選單按鈕、沒有別的東西時,電腦上整列不佔位 */
  .topbar.bare.blank + .page .page-inner { padding-top: 60px; }
}
@media (max-width: 880px) { .wide-only { display: none !important; } }

/* ── 手機與窄螢幕:導覽與側欄收進抽屜 ── */
@media (max-width: 1020px) {
  .today-grid { grid-template-columns: minmax(0, 1fr); }
  .brief-list { grid-template-columns: minmax(0, 1fr); }
  .land-hero { grid-template-columns: minmax(0, 1fr); }
  .stage { aspect-ratio: 16 / 11; min-height: 340px; }
  .day { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day > div:nth-child(2) { border-right: 0; margin-right: 0; }
  .threads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 880px) {
  .shell, .shell.has-side { grid-template-columns: minmax(0, 1fr); }
  .drawer { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: min(88vw, 350px); z-index: 50; background: var(--mist-2);
    transform: translateX(-104%); transition: transform .34s var(--ease); box-shadow: var(--shadow-3); padding-top: env(safe-area-inset-top); }
  body.drawer-open .drawer { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(9, 37, 40, .45); opacity: 0; pointer-events: none; transition: opacity .3s; }
  body.drawer-open .scrim { opacity: 1; pointer-events: auto; }
  .rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px 6px; gap: 2px; align-items: stretch; }
  .rail .brand { display: none; }
  .rail .nav { width: auto; font-size: 11px; padding: 8px 0 6px; }
  .rail .nav.find { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 10px; height: 40px; padding: 0 14px; margin: 0 0 4px; border-radius: 12px;
    background: rgba(255, 255, 255, .08); font-size: 13.5px; color: rgba(255, 255, 255, .8); }
  .nav.find .short { display: none; }
  .nav.find .long { display: inline; }
  .palette-back { padding-top: 10px; }
  .palette-foot { display: none; }
  .rail .nav .dot { right: calc(50% - 16px); }
  .rail-foot { display: contents; }
  .me-btn { display: none; }
  .digest { columns: 1; }
  .today-head .display { font-size: 30px; }
  .ask { border-radius: 18px; padding: 12px 10px 10px 16px; }
  .ask textarea { font-size: 16px; }
  .side { flex: 1; border-right: 0; }
  .shell:not(.has-side) .drawer { height: auto; bottom: auto; border-radius: 0 0 18px 0; }
  .icon-btn.menu-btn { display: inline-grid; margin-left: -6px; }
  .topbar { padding: 0 10px 0 14px; height: 54px; padding-top: env(safe-area-inset-top); box-sizing: content-box; gap: 4px; }
  .topbar .stack { display: none; }
  .topbar .titles { margin-left: 4px; }
  .page-inner { padding: 24px 18px 70px; }
  .chat-scroll { padding: 20px 16px 6px; }
  .composer-wrap { padding: 4px 12px calc(12px + env(safe-area-inset-bottom)); }
  .chat.fresh .below { padding: 6px 16px 60px; }
  .chat.fresh .chat-scroll { padding-top: clamp(20px, 7vh, 70px); }
  .keyhint { display: none; }
  /* 只有一顆設定按鈕時不限寬度(放不下才縮)。小會議室有兩顆(專家的模型、小助手的深度):收掉箭頭與多餘的留白,小助手那顆只留等級 */
  .composer-bar:not(.two) .pill { max-width: none; }
  .composer-bar.two .pill { max-width: none; padding: 0 6px; flex: 0 1 auto; }
  .composer-bar.two .pill .icon:last-child { display: none; }
  .msg.me { max-width: 88%; }
  .side-item .more { opacity: 1; }
  .side-item .more ~ .when { display: none; }
  .msg-foot .icon-btn { opacity: 1; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  /* 成員卡片在手機上改成橫式:頭像在左,名字與職稱在右,比較不佔高度 */
  .tile:not(.add) { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 12px; row-gap: 0; padding: 16px 16px 14px; align-items: center; }
  .tile:not(.add) .av { --s: 46px !important; grid-row: span 2; margin: 0; }
  .tile .intel, .tile .facts, .tile .go { grid-column: 1 / -1; }
  .tile.add { min-height: 84px; flex-direction: row; }
  .modal { padding: 22px 20px 20px; border-radius: 18px; }
  .row { gap: 12px; }
  .brief-panel { padding: 22px 20px 20px; border-radius: 22px; }
  .brief-row .main { grid-template-columns: 34px minmax(0, 1fr); }
  .brief-row .when { display: none; }
  .brief-panel .foot .btn { flex: 1; }
  .scout-layout { grid-template-columns: minmax(0, 1fr); }
  .scout-dates { flex-direction: row; overflow-x: auto; position: static; padding-bottom: 4px; }
  .scout-dates button { white-space: nowrap; }
  .report { padding: 22px 18px 26px; }
  .land-top nav a:not(.btn) { display: none; }
  .stage-card { width: min(52%, 240px); padding: 13px 14px 12px; }
  .stage-card li { font-size: 12px; }
  .threads, .threads.staff { grid-template-columns: minmax(0, 1fr); }
  .day { grid-template-columns: minmax(0, 1fr); }
  .day > div { border-right: 0; margin-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .12); padding: 20px 0; }
  .day > div:last-child { border-bottom: 0; }
}
/* 觸控螢幕(手機、平板):可以點的東西至少 40px 高,手指好按 */
@media (pointer: coarse) {
  .btn.sm { height: 38px; padding: 0 14px; font-size: 13.5px; }
  .icon-btn { width: 40px; height: 40px; }
  .icon-btn.sm { width: 34px; height: 34px; }
  .side-item { min-height: 44px; font-size: 14.5px; }
  .seg button { height: 38px; }
  .starters button, .settings-nav button { height: 40px; }
  .menu button, .menu a { padding: 11px 12px; font-size: 14.5px; }
  .brief-tabs button { height: 40px; }
  .palette-item { padding: 10px 12px; }
  .switch { width: 46px; height: 27px; border-radius: 14px; }
  .switch::after { width: 21px; height: 21px; }
  .switch[aria-checked="true"]::after { transform: translateX(19px); }
}
@media (hover: none) {
  .tile:hover, .shelf-card:hover, .att-img:hover { box-shadow: none; }
}
