/* LF AI — Lake Forest. The look is Claude's (the owner, 11-26: 学一下 Claude 这个配色), as the
   LF AI Agent on the computer: warm grays everywhere (never pure black, never a cool blue-gray),
   a slightly darker sidebar, the person's words in a soft bubble, the AI's answers as plain text on
   the page. One accent, Claude's coral, used sparingly: the focus ring, the live dot, an icon that
   is on. System type at 14px, 8px corners on rows. No gradients. Only these tokens set colour. */

:root {
  --bg: #faf9f5;        /* the page */
  --side-bg: #f0eee6;   /* the sidebar */
  --panel: #f0eee6;     /* the person's bubble, the message box, code */
  --pop: #faf9f5;       /* menus that float over the page */
  --line: #e5e3da;      /* hairlines */
  --field-line: #dedcd1;  /* the message box's edge */
  --faint: #87867f;     /* section labels, icons, field borders */
  --taupe: var(--faint);            /* its older name, still used below */
  --muted: #5e5d59;     /* secondary text */
  --ink: #141413;       /* text, bold labels and primary buttons */
  --on-ink: #faf9f5;
  --accent: #d97757;    /* Claude's coral */
  --unread: #3b82f6;    /* an unread dot, the one blue */
  --danger: #96301f;
  --ok: #2c7a3d; --warn: #946200; --bad: #b3261e;     /* a session's dot: running, waiting for you, failed */
  --hover: rgba(20, 20, 19, .05);   /* a row under the pointer */
  --sel: #e8e6dc;                   /* the open row */
  --scrim: rgba(20, 20, 19, .38);
  --bubble-r: 16px;     /* the person's bubble */
  --read-lh: 1.7;       /* the AI's answers */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --side: 252px;
  --col: 720px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #262624; --side-bg: #1f1e1d; --panel: #30302e; --pop: #30302e; --line: #3a3a37; --field-line: #3d3d3a;
    --faint: #9c9a92; --muted: #c2c0b6; --ink: #faf9f5; --on-ink: #1f1e1d; --accent: #d97757; --unread: #3b82f6;
    --danger: #e79b8c; --ok: #7fc48a; --warn: #e3b55b; --bad: #f08a78;
    --hover: rgba(250, 249, 245, .05); --sel: #30302e; --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #262624; --side-bg: #1f1e1d; --panel: #30302e; --pop: #30302e; --line: #3a3a37; --field-line: #3d3d3a;
  --faint: #9c9a92; --muted: #c2c0b6; --ink: #faf9f5; --on-ink: #1f1e1d; --accent: #d97757; --unread: #3b82f6;
  --danger: #e79b8c; --ok: #7fc48a; --warn: #e3b55b; --bad: #f08a78;
  --hover: rgba(250, 249, 245, .05); --sel: #30302e; --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 14px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}
[hidden] { display: none !important; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 8px; }
button:disabled { cursor: not-allowed; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--ink); color: var(--on-ink); }
code, pre, kbd { font-family: var(--mono); font-size: .9em; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mark { width: 22px; height: 22px; flex: none; color: var(--ink); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: 10px 16px; font-size: 13px; text-decoration: none; }
.skip:focus { top: 12px; }
.noscript { padding: 40px 24px; text-align: center; }

/* ---------- type ---------- */
.display { font-weight: 500; font-size: 24px; line-height: 1.25; }
.lede { color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 56ch; }
.label { font-size: 13px; font-weight: 500; color: var(--muted); line-height: 1.4; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.5; }
.count { color: var(--muted); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--ink); white-space: nowrap; }
.wordmark.small { font-size: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 34px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px;
  font-size: 13px; font-weight: 500; line-height: 1.2;
  white-space: nowrap; text-decoration: none; transition: background-color .15s, color .15s, opacity .15s;
}
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.primary:hover:not(:disabled) { opacity: .86; }
.btn.ghost { background: var(--sel); color: var(--ink); border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--line); }
.btn.danger { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn.danger:hover:not(:disabled) { opacity: .86; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .4; }
.btn.busy { opacity: .6; pointer-events: none; }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; text-decoration-thickness: 1px; font-size: inherit; padding: 2px 0; }
.link:hover { text-decoration-color: var(--ink); }
.link.danger { color: var(--danger); }
.link:disabled { opacity: .45; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--muted); flex: none; }
.ibtn:hover { color: var(--ink); background: var(--hover); }
.ibtn.ok { color: var(--ink); }
.ibtn.on, .ibtn.on:hover { color: var(--accent); }
.ibtn.on .ic { animation: live 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .ibtn.on .ic { animation: none; } }
.only-phone { display: none; }

/* ---------- fields ---------- */
.field { margin-top: 16px; }
.field > label, .flabel label, .dlg label.lbl { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.flabel { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.flabel label { margin-bottom: 0; }
.counter { margin-left: auto; font-size: 12px; color: var(--muted); }
.counter.over { color: var(--danger); font-weight: 500; }
input[type="text"], input[type="password"], input[type="number"], textarea, select.box {
  display: block; width: 100%; background: transparent; border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 11px; min-height: 38px; font-size: 14px; line-height: 1.5; color: var(--ink);
  transition: border-color .15s; appearance: none; -webkit-appearance: none;
}
textarea { resize: vertical; min-height: 76px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:hover, textarea:hover { border-color: var(--faint); }
input:focus, textarea:focus { border-color: var(--accent); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.mono-in { font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.field .hint { margin-top: 8px; }
.ferr { color: var(--danger); font-size: 13px; line-height: 1.5; margin-top: 8px; }
.ferr:empty { display: none; }

/* The sign-in page keeps the look it had: these are the shared pieces as they were before the app went quiet. */
.auth .display { font-weight: 300; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; letter-spacing: -.02em; }
.auth .lede { font-size: 16px; line-height: 1.6; }
.auth .label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.auth .wordmark { letter-spacing: .22em; text-transform: uppercase; }
.auth .btn { min-height: 44px; padding: 0 22px; border: 1px solid var(--ink); border-radius: 2px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.auth .btn.ghost { background: transparent; border-color: var(--line); }
.auth .btn.ghost:hover:not(:disabled) { background: transparent; border-color: var(--ink); }
.auth .field { margin-top: 22px; }
.auth .field > label, .auth .flabel label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.auth input[type="text"], .auth input[type="password"] { border: 1px solid var(--taupe); border-radius: 2px; padding: 11px 14px; min-height: 46px; font-size: 15px; }
.auth input:hover, .auth input:focus { border-color: var(--ink); }
.ferr.form { margin-top: 20px; }
.pwrap { position: relative; }
.pwrap input { padding-right: 70px; }
.pwrap .link { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); padding: 8px 0; }
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.facts .push { margin-left: auto; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: var(--bg); z-index: 50; }
body.booting .splash { display: flex; }
.splash .mark { width: 34px; height: 34px; opacity: .5; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .15; } }

/* ---------- sign in ---------- */
.auth { position: relative; isolation: isolate; min-height: 100%; height: 100%; overflow: auto; display: grid; grid-template-rows: auto 1fr auto; padding: 0 clamp(20px, 5vw, 48px); }
.auth-top { display: flex; align-items: center; justify-content: space-between; padding: 28px 0; }
.langsw { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--taupe); letter-spacing: .06em; }
.langsw .link { text-decoration: none; color: var(--muted); padding: 6px 2px; }
.langsw .link[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink); }
.auth-body { width: 100%; max-width: 440px; margin: 0 auto 24px; align-self: center; padding: 34px clamp(22px, 4vw, 32px) 36px; }

.auth-switches { display: flex; align-items: center; gap: clamp(12px, 3vw, 26px); }
.auth-body .lede { margin-top: 14px; }
.auth-body form { margin-top: 18px; }
.auth-body .btn.block { margin-top: 28px; }
.notice { margin-top: 22px; padding: 12px 14px; border: 1px solid var(--line); font-size: 14px; }
.auth-alt { margin-top: 26px; font-size: 14px; color: var(--muted); }
.auth-forgot { margin-top: 10px; font-size: 13px; color: var(--muted); }
.auth-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.auth-foot { padding: 24px 0 28px; border-top: 1px solid var(--line); }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); height: 100%; }
/* The sidebar, after LF AI Agent on the computer: short rows with 8px corners, a tint under
   the pointer and a stronger one on the open item, 12px faint section labels. No capitals,
   no tracking, weights 400 and 600 only. Top to bottom: wordmark, New chat, one scrolling
   list made of sections, the account button. */
.side { position: relative; background: var(--side-bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; padding: 14px 10px 10px; font-size: 14px; line-height: 1.5; letter-spacing: 0; }
.side-head { display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 0 8px; margin-bottom: 6px; }
.side .wordmark { gap: 8px; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.side .wordmark .mark { width: 18px; height: 18px; }
.side .ibtn { width: 28px; height: 28px; border-radius: 8px; }
.side .ibtn .ic { width: 16px; height: 16px; }
.navrow { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 7px 8px; border-radius: 8px; font-size: 14px; line-height: 1.5; text-align: left; color: var(--ink); text-decoration: none; }
.navrow:hover { background: var(--hover); }
.navrow > .ic { width: 16px; height: 16px; color: var(--muted); }
.sidelist { flex: 1; min-height: 60px; overflow-y: auto; margin: 4px -10px 0; padding: 0 10px 10px; scrollbar-width: thin; }
.sec { margin-top: 10px; }
.sec-head { position: relative; display: flex; align-items: center; gap: 2px; }
.sec-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; font-size: 12px; line-height: 1.5; color: var(--faint); text-align: left; }
.sec-btn:hover { color: var(--ink); }
.sec-btn .chev { width: 11px; height: 11px; opacity: 0; transition: transform .15s; }      /* the caret: under the pointer, or when folded */
.sec-btn:hover .chev, .sec-btn:focus-visible .chev, .sec-btn[aria-expanded="false"] .chev { opacity: 1; }
.sec-btn[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.sec-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .sec-head .ibtn { width: 24px; height: 24px; color: var(--faint); }
.side .sec-head .ibtn:hover { color: var(--ink); }
.side .sec-head .ibtn .ic { width: 15px; height: 15px; }
.sec-head .more { opacity: .55; }                  /* a section's menu is always there to be found */
.sec-head:hover .more, .sec-head:focus-within .more, .sec-head.menu-open .more { opacity: 1; }
.sec-list .row { position: relative; display: flex; align-items: center; }
.row .open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 13px; line-height: 1.5; color: var(--ink); text-align: left; }
.row .open:hover, .row.menu-open .open { background: var(--hover); }
.row.on .open, .row.on .open:hover { background: var(--sel); }
.row .open.quiet { color: var(--muted); font-size: 13px; }
.row .tt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .more { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); opacity: 0; }
.row:hover .more, .row:focus-within .more, .row.menu-open .more, .row.on .more { opacity: 1; }     /* the open row shows its menu without a pointer */
.row:hover .open:not(:only-child), .row:focus-within .open:not(:only-child), .row.menu-open .open:not(:only-child), .row.on .open:not(:only-child) { padding-right: 34px; }
.row input { min-height: 32px; padding: 4px 8px; font-size: 13px; border-radius: 8px; background: var(--bg); }
/* where a session lives: a cloud (only here) or a computer (synced with LF AI Agent there);
   the computer takes the session's state: running, waiting for the person, failed */
.row .where { width: 14px; height: 14px; flex: none; color: var(--faint); }
.row .where.running { color: var(--ok); animation: live 1.2s ease-in-out infinite; }
.row .where.waiting { color: var(--warn); }
.row .where.error { color: var(--bad); }
/* drag and drop: what is held follows the pointer as a small label; the section it would land
   in is outlined; a section being moved shows a line where it would go */
.side .row .open, .side .sec-btn { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.dragghost { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; max-width: 220px; padding: 5px 10px; border-radius: 8px; background: var(--pop); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); font-size: 13px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.dragging, .sec.dragging > .sec-head { opacity: .4; }
.sec.drop-in { border-radius: 8px; background: var(--hover); box-shadow: inset 0 0 0 1.5px var(--accent); }
.sec.drop-before { box-shadow: 0 -2px 0 var(--accent); }
.sec.drop-after { box-shadow: 0 2px 0 var(--accent); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }
body.is-dragging { -webkit-user-select: none; user-select: none; }
body.is-dragging .row .open:hover { background: transparent; }
/* a chat's sub-sessions hang under it, indented; the small button at the right folds them
   (and shows how many there are while they are folded away) */
.row.kid1 .open { padding-left: 26px; }
.row.kid2 .open { padding-left: 44px; }
.row .kidsbtn { position: absolute; right: 32px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; gap: 2px; height: 22px; min-width: 22px; padding: 0 5px; border-radius: 6px; color: var(--faint); font-size: 11px; line-height: 1; }
.row .kidsbtn:hover { background: var(--hover); color: var(--ink); }
.row .kidsbtn .chev { width: 11px; height: 11px; transition: transform .15s; }
.row .kidsbtn[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.row .kidsbtn.running { color: var(--ok); }
.row.has-kids .open, .row.has-kids:hover .open, .row.has-kids:focus-within .open, .row.has-kids.menu-open .open { padding-right: 64px; }   /* it does not move when ⋯ shows beside it */
/* the same choice for a new session, above the message field */
.whererow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px 0; }
.whererow .seg button { display: inline-flex; align-items: center; gap: 6px; }
.whererow .seg .ic { width: 14px; height: 14px; }
.whererow select.plain { height: 28px; font-size: 12px; }
.where-state { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.where-state.bad { color: var(--danger); }
.badge { flex: none; font-size: 11px; line-height: 1.5; color: var(--warn); white-space: nowrap; }
.pill { flex: none; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--sel); color: var(--ink); font-size: 11px; line-height: 18px; text-align: center; white-space: nowrap; }
.side-note { font-size: 13px; line-height: 1.5; color: var(--muted); padding: 4px 8px; }
.side-note:empty { display: none; }
.side-note .link { font-size: 13px; }
.side-foot { position: relative; display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.account-btn { flex: 1; padding: 6px 8px; }
.account-btn > .ic { margin-left: auto; }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--sel); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: none; }
.uname { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.seg { display: inline-flex; flex: none; background: var(--hover); border-radius: 8px; padding: 2px; }
.seg button { border-radius: 6px; padding: 3px 8px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
/* menus: the account menu opens upward from the foot; a row's menu (.pop) is placed by app.js */
.menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 30; background: var(--pop); border: 1px solid var(--line); border-radius: 8px; padding: 4px; font-size: 13px; line-height: 1.5; box-shadow: 0 10px 30px rgba(0, 0, 0, .16); max-height: calc(100dvh - 76px); overflow-y: auto; }
.menu > button, .menu > a { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 6px 10px; border: 0; border-radius: 6px; font-size: 13px; line-height: 1.5; text-align: left; text-decoration: none; color: var(--ink); }
.menu > button:hover:not(:disabled), .menu > a:hover { background: var(--hover); }
.menu > a[aria-current="page"] { background: var(--sel); }
.menu > button:disabled { color: var(--faint); cursor: default; }
.menu > button.danger { color: var(--danger); }
.menu > button:focus-visible, .menu > a:focus-visible, .menu .seg button:focus-visible { outline-offset: -2px; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 4px 4px 10px; font-size: 13px; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.menu.pop { left: 0; top: 0; right: auto; bottom: auto; width: max-content; min-width: 168px; max-width: min(260px, calc(100vw - 16px)); }
.menu.pop > button { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* "Move to…": the sections as rows, then one field to make a new one */
.picks { display: grid; gap: 2px; margin-top: 14px; max-height: 44dvh; overflow-y: auto; }
.picks .navrow { justify-content: space-between; }
.picks .navrow[aria-current="true"] { background: var(--sel); }
.picks .navrow .tt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moverow { display: flex; gap: 8px; margin-top: 14px; }
.moverow input { flex: 1; min-width: 0; }

.main { min-width: 0; height: 100%; overflow-y: auto; overflow-x: hidden; position: relative; scroll-padding-bottom: 200px; }
.topbar { display: none; }
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 39; }

/* ---------- chat ---------- */
.view.chat { min-height: 100%; display: flex; flex-direction: column; }
.thread { flex: 1; width: 100%; max-width: calc(var(--col) + 48px); margin: 0 auto; padding: 48px 24px 24px; }
.stage { position: sticky; bottom: 0; width: 100%; max-width: calc(var(--col) + 48px); margin: 0 auto; padding: 10px 24px 14px; background: var(--bg); }
.view.chat.is-empty { justify-content: center; }
.view.chat.is-empty .thread { display: none; }
.view.chat.is-empty .stage { position: static; padding-bottom: 12vh; }
.greet { display: none; margin-bottom: 34px; }
.view.chat.is-empty .greet { display: block; }
.greet .lede { margin-top: 12px; }
.import { border: 1px solid var(--line); padding: 16px 18px; margin-bottom: 18px; font-size: 14px; display: none; }
.view.chat.is-empty .import:not([hidden]) { display: block; }
.import-acts { display: flex; align-items: center; gap: 18px; margin-top: 12px; }
.import .btn { min-height: 38px; }

.composer { border: 1px solid var(--field-line); border-radius: 16px; background: var(--panel); transition: border-color .15s; }
.composer:focus-within { border-color: var(--faint); }
.composer.dragging { border-style: dashed; border-color: var(--ink); }
.composer textarea { border: 0; min-height: 48px; max-height: 40vh; padding: 12px 16px 4px; font-size: 15px; line-height: 1.55; resize: none; display: block; overflow-y: auto; }
.composer textarea:focus-visible { outline: none; }
.cbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 8px 10px; }
.cbar-l, .cbar-r { display: flex; align-items: center; gap: 4px; min-width: 0; }
.chipbtn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; font-size: 13px; color: var(--ink); min-width: 0; }
.chipbtn:hover { background: var(--hover); }
.chipbtn .label { font-size: 10px; }
.chipbtn > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.selwrap { position: relative; display: inline-flex; }
.selwrap::after { content: ""; position: absolute; right: 9px; top: 50%; width: 5px; height: 5px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-75%) rotate(45deg); pointer-events: none; }
select.plain { border: 0; background: transparent; font-size: 13px; padding: 0 24px 0 8px; height: 36px; cursor: pointer; border-radius: 8px; appearance: none; -webkit-appearance: none; color: var(--ink); max-width: 130px; }
select.plain:hover { background-color: var(--hover); }
select.plain option { background: var(--bg); color: var(--ink); }
#model { max-width: 230px; text-overflow: ellipsis; }
.send { width: 32px; height: 32px; border-radius: 50%; margin: 0 6px 6px 0; background: var(--ink); color: var(--on-ink); display: inline-flex; align-items: center; justify-content: center; flex: none; transition: opacity .15s; }
.send:disabled { opacity: .25; }
.send .i-stop { display: none; fill: currentColor; stroke: none; }
.send.busy .i-send { display: none; }
.send.busy .i-stop { display: block; }
.cnote { margin-top: 10px; text-align: center; font-size: 12px; color: var(--muted); }
.cwarn { padding: 10px 18px 0; font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 0; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; border: 1px solid var(--line); padding: 4px 4px 4px 10px; font-size: 13px; min-height: 34px; }
.chip.static { padding-right: 10px; }
.chip .ic { width: 15px; height: 15px; color: var(--muted); }
.chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.chip img { width: 24px; height: 24px; object-fit: cover; display: block; }
.chip .ibtn { width: 26px; height: 26px; }
.chip .ibtn .ic { width: 13px; height: 13px; }
.chip.busy { color: var(--muted); border-style: dashed; }

.msg { margin-bottom: 22px; }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; }
.msg.user .bubble { background: var(--panel); padding: 8px 14px; max-width: 86%; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; border-radius: var(--bubble-r); }
.msg.user .chips { padding: 8px 0 0; justify-content: flex-end; align-items: flex-end; }
/* a message that another session wrote (the chat that started this one, a sub-session, the team) */
.msg.user .fromline { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 0 0 4px; }
.msg.user .fromline .link { font-size: 12px; }
.kidline { font-size: 13px; color: var(--muted); margin: 0 0 22px; }
.kidline .link { font-size: 13px; }
.kidstate { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 0 0 24px; }
.toparent { margin: -18px 0 24px; }
.sub .sopen { flex: none; font-size: 12px; }
.msg.user .thumb { width: 120px; height: 120px; object-fit: cover; border: 1px solid var(--line); display: block; }
.mhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 10px; }
.mhead .who { font-size: 13px; font-weight: 500; color: var(--muted); }
.tag { font-size: 11px; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; }
.live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: live 1.2s ease-in-out infinite; }
@keyframes live { 50% { opacity: .25; } }
.waiting { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; min-height: 28px; }
.think { margin-bottom: 12px; }
.think summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; padding: 4px 0; }
.think summary::-webkit-details-marker { display: none; }
.think summary .ic { width: 14px; height: 14px; transition: transform .15s; }
.think[open] summary .ic { transform: rotate(180deg); }
.think .tbody { margin-top: 8px; padding: 2px 0 2px 16px; border-left: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow-y: auto; }
.mfoot { display: flex; align-items: center; gap: 2px; margin-top: 10px; margin-left: -9px; color: var(--muted); min-height: 36px; }
.mfoot .meta { font-size: 12px; margin-left: 9px; display: flex; flex-wrap: wrap; gap: 0 14px; }
/* under an answer: the sub-sessions it started and the skills it proposed */
.extras > * { margin-top: 18px; }
.subs .label, .prop .label { margin-bottom: 6px; }
.sublist { list-style: none; border-top: 1px solid var(--line); }
.sublist > li { border-bottom: 1px solid var(--line); }
.sub summary, .talk summary, .pinst summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.sub summary::-webkit-details-marker, .talk summary::-webkit-details-marker, .pinst summary::-webkit-details-marker { display: none; }
.sub summary .ic, .talk summary .ic, .pinst summary .ic { width: 14px; height: 14px; flex: none; color: var(--muted); transition: transform .15s; }
.sub[open] summary .ic, .talk[open] summary .ic, .pinst[open] summary .ic { transform: rotate(180deg); }
.sub summary { padding: 11px 0; min-height: 44px; }
.sub .stitle { flex: 1; min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.sub .sstate { flex: none; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.sub .sstate.bad { color: var(--danger); }
.sub .sbody { padding: 2px 0 16px 16px; margin-bottom: 4px; border-left: 1px solid var(--line); font-size: 15px; max-height: 420px; overflow-y: auto; }
.talk { margin-top: 4px; }
.talk summary, .pinst summary { display: inline-flex; gap: 8px; color: var(--muted); font-size: 13px; padding: 8px 0; }
.talklist { list-style: none; padding: 2px 0 4px 16px; border-left: 1px solid var(--line); max-height: 420px; overflow-y: auto; }
.talklist li { font-size: 14px; line-height: 1.6; padding: 9px 0; overflow-wrap: anywhere; }
.talklist li + li { border-top: 1px solid var(--line); }
.talklist .tfrom { display: block; font-size: 12px; color: var(--muted); }
.talklist .ttext { white-space: pre-wrap; }
.prop { border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.prop .pname { font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
.prop .pdesc { color: var(--muted); font-size: 15px; line-height: 1.55; margin-top: 4px; overflow-wrap: anywhere; }
.prop .pinst { margin-top: 6px; }
.prop .pinst .md { padding: 2px 0 2px 16px; border-left: 1px solid var(--line); font-size: 15px; max-height: 360px; overflow-y: auto; }
.prop .pmsg { font-size: 14px; color: var(--muted); }
.prop .pmsg:not(:empty) { margin-top: 10px; }
.prop .propacts { display: flex; flex-wrap: wrap; gap: 10px; }
.prop .propacts:not(:empty) { margin-top: 14px; }
.prop .propacts .btn { min-height: 38px; padding: 0 16px; }
.msg.err { border-left: 1px solid var(--danger); padding: 4px 0 4px 16px; }
.msg.err p { color: var(--danger); font-size: 15px; }
.msg.err .det { color: var(--muted); font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.msg.err .acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.msg.err .btn { min-height: 38px; padding: 0 16px; }

/* rendered Markdown */
.md { font-size: 16px; line-height: var(--read-lh); overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md blockquote, .md pre, .md .tscroll { margin: 0 0 14px; }
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 { font-weight: 500; line-height: 1.3; margin: 26px 0 10px; letter-spacing: -.005em; }
.md h1 { font-size: 22px; font-weight: 400; } .md h2 { font-size: 19px; } .md h3 { font-size: 17px; }
.md h4, .md h5, .md h6 { font-size: 16px; }
.md ul, .md ol { padding-left: 24px; }
.md ul { list-style: disc; } .md ol { list-style: decimal; }
.md ul ul { list-style: circle; }
.md li { margin: 4px 0; }
.md li > ul, .md li > ol { margin: 4px 0; }
.md a { text-decoration: underline; text-decoration-color: var(--taupe); text-underline-offset: 3px; }
.md a:hover { text-decoration-color: var(--ink); }
.md strong { font-weight: 600; }
.md code { background: var(--panel); padding: 1px 5px; border-radius: 8px; font-size: .87em; }
.md blockquote { border-left: 1px solid var(--ink); padding-left: 16px; color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.md pre.code { position: relative; background: var(--panel); border-radius: 8px; padding: 40px 16px 14px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.md pre.code code { background: none; padding: 0; font-size: inherit; white-space: pre; }
.md pre .lang { position: absolute; left: 16px; top: 12px; font: 500 12px/1.4 var(--font); color: var(--muted); }
.md pre .ccopy { position: absolute; right: 8px; top: 4px; font: 500 12px/1.4 var(--font); color: var(--muted); padding: 9px 8px; }
.md pre .ccopy:hover { color: var(--ink); }
.tscroll { overflow-x: auto; }
.md table { border-collapse: collapse; font-size: 14px; min-width: 50%; }
.md th, .md td { text-align: left; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.md th { font-weight: 500; border-bottom-color: var(--ink); }
.ta-c { text-align: center !important; } .ta-r { text-align: right !important; }
.caret { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 4px; animation: live 1.2s ease-in-out infinite; }

/* ---------- section pages ---------- */
.view.page { padding: 64px clamp(20px, 5vw, 64px) 96px; }
.page-in { max-width: 820px; margin: 0 auto; }
.phead { margin-bottom: 44px; }
.phead .label { margin-bottom: 16px; }
.phead .lede { margin-top: 16px; }
.phead.tight { margin-bottom: 28px; }
.pacts { display: flex; align-items: center; gap: 18px; margin-top: 28px; flex-wrap: wrap; }
.sect { margin: 56px 0 16px; }
.rows { border-top: 1px solid var(--line); }
.rows:empty { border-top: 0; }
.rows > li { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.rows .rmain { flex: 1; min-width: 0; }
.rows .rtitle { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; text-align: left; max-width: 100%; }
button.rtitle:hover { text-decoration: underline; text-underline-offset: 4px; }
.rows .rsub { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rows .rmeta { color: var(--muted); font-size: 13px; white-space: nowrap; flex: none; }
.rows .racts { display: flex; align-items: center; gap: 2px; flex: none; }
.rows .ricon { color: var(--muted); flex: none; display: flex; }
.rows .ricon img { width: 36px; height: 36px; object-fit: cover; border: 1px solid var(--line); display: block; }
.rows .ricon .ic { width: 20px; height: 20px; margin: 8px; }
.state { color: var(--muted); font-size: 15px; }
.state:empty { display: none; }
.state.box { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 40px 0; }
.state .big { font-size: 20px; font-weight: 300; color: var(--ink); margin-bottom: 6px; letter-spacing: -.01em; }
.state .btn, .state .link { margin-top: 16px; }
.state.error { color: var(--danger); }
.spin { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 10px; animation: live 1.2s ease-in-out infinite; vertical-align: middle; }

/* toggle: a square switch */
.switch { position: relative; width: 38px; height: 22px; border: 1px solid var(--taupe); border-radius: 8px; flex: none; transition: background-color .15s, border-color .15s; }
.switch::before { content: ""; position: absolute; inset: -12px -4px; }     /* a 44px target around the small switch */
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; background: var(--taupe); transition: transform .15s, background-color .15s; }
.switch[aria-checked="true"] { background: var(--ink); border-color: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(16px); background: var(--on-ink); }
.switchwrap { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 36px; }

/* skills editor */
.backlink { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); padding: 8px 0; margin-bottom: 22px; }
.backlink:hover { color: var(--ink); }
.backlink .ic { width: 15px; height: 15px; }
.draft { background: var(--panel); padding: 20px 22px 22px; border-radius: 8px; }
.draft label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink); }
.draft label .ic { width: 15px; height: 15px; }
.draft .hint { margin-top: 6px; }
.draft-row { display: flex; gap: 10px; margin-top: 14px; }
.draft-row input { flex: 1; min-width: 0; background: var(--bg); }
.tabs { display: inline-flex; gap: 16px; }
.tabs button { font-size: 13px; font-weight: 500; color: var(--muted); padding: 4px 0; border-bottom: 1px solid transparent; border-radius: 0; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.preview { border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; min-height: 200px; }
.preview:empty::before { content: attr(data-empty); color: var(--muted); }

/* files */
.drop { border: 1px dashed var(--faint-line); border-radius: 8px; padding: 34px 24px; text-align: center; transition: background-color .15s, border-color .15s; }
.drop.over { background: var(--panel); border-color: var(--ink); border-style: solid; }
.drop .hint { margin-top: 8px; }
.uploads { margin-top: 14px; }
.uploads li { display: flex; gap: 12px; align-items: baseline; font-size: 13px; padding: 6px 0; color: var(--muted); }
.uploads li.bad { color: var(--danger); }
.uploads li .nm { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46%; flex: none; }
#filesCount { margin: 26px 0 10px; }

/* API */
.steps > li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0 8px; padding: 30px 0; border-top: 1px solid var(--line); }
.steps > li:last-child { border-bottom: 1px solid var(--line); }
.stepn { font-size: 26px; font-weight: 300; line-height: 1.2; color: var(--taupe); }
.stepb h2 { font-size: 19px; font-weight: 400; letter-spacing: -.01em; line-height: 1.4; margin-bottom: 16px; }
.stepb .rows { margin-bottom: 18px; }
.stepb .state { margin-bottom: 16px; }
.keys .rtitle { font-weight: 400; }
.keys code { color: var(--muted); font-size: 13px; }
.copyline { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; min-height: 48px; }
.copyline code { font-size: 14px; overflow-wrap: anywhere; }
.copyline .link, .codebar .link { font-size: 13px; font-weight: 500; text-decoration: none; flex: none; padding: 8px 0; }
.copyline .link:hover, .codebar .link:hover { text-decoration: underline; }
.codebox { border: 1px solid var(--line); border-radius: 8px; }
.codebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
pre.code { margin: 0; }
.codebox pre.code { padding: 16px; overflow-x: auto; font-size: 13px; line-height: 1.65; white-space: pre; }
.stepb > .hint { margin-top: 12px; }
table.models, table.calls { border-collapse: collapse; width: 100%; font-size: 14px; }
table.models th, table.models td, table.calls th, table.calls td { text-align: left; padding: 14px 18px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.models thead th, table.calls thead th { font-size: 13px; font-weight: 500; color: var(--muted); border-bottom-color: var(--ink); padding-top: 0; padding-bottom: 10px; white-space: nowrap; }
table.models tbody th { font-weight: 400; white-space: nowrap; }
table.models td:last-child, table.models th:last-child { padding-right: 0; }
table.models + .hint, .tscroll + .hint { margin-top: 14px; }
table.calls { font-size: 13px; }
table.calls td { white-space: nowrap; padding-top: 10px; padding-bottom: 10px; }
table.calls .r, table.calls th.r { text-align: right; }
.ref { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 56px; }
.ref summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; padding: 18px 0; list-style: none; min-height: 44px; }
.ref summary::-webkit-details-marker { display: none; }
.ref summary .label { color: var(--ink); }
.ref summary .ic { transition: transform .15s; color: var(--muted); }
.ref[open] summary .ic { transform: rotate(180deg); }
.ref .tscroll { padding-bottom: 20px; }
.refbody { padding: 4px 0 28px; }
.refbody h3 { font-size: 13px; font-weight: 500; color: var(--muted); margin: 28px 0 10px; }
.refbody h3:first-child { margin-top: 4px; }
.refbody p { margin: 0 0 10px; max-width: 70ch; }
.refbody code { background: var(--panel); padding: 1px 5px; border-radius: 8px; font-size: .86em; }
.refbody dl { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 8px 24px; font-size: 14px; }
.refbody dt { white-space: nowrap; }
.refbody dt code { background: none; padding: 0; }
.refbody dd { color: var(--muted); }
.refbody pre.code { background: var(--panel); padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.6; margin: 0 0 12px; border-radius: 8px; }

/* usage */
.meter { height: 6px; background: var(--line); margin-top: 26px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .4s ease; }
.meter.none { display: none; }
#usageSub { margin-top: 14px; font-size: 14px; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trio > div { padding: 22px 0; }
.trio > div + div { border-left: 1px solid var(--line); padding-left: 24px; }
.trio dt { font-size: 13px; font-weight: 500; color: var(--muted); }
.trio dd { font-size: clamp(22px, 3vw, 30px); font-weight: 300; letter-spacing: -.01em; margin-top: 6px; }
.trio + .hint { margin-top: 12px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .bar { fill: var(--taupe); transition: fill .12s; }
.chart .hit { fill: transparent; cursor: default; }
.chart g:hover .bar, .chart g:focus .bar, .chart g.on .bar { fill: var(--ink); }
.chart g:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.chart .base { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); min-height: 22px; }

/* ---------- dialogs ---------- */
.dlg-back { position: fixed; inset: 0; background: var(--scrim); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.dlg { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; width: 100%; max-width: 460px; max-height: calc(100dvh - 40px); overflow-y: auto; padding: 20px 22px 18px; box-shadow: 0 24px 64px rgba(0, 0, 0, .28); }
.dlg.wide { max-width: 560px; }
.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.dlg h2 { font-size: 16px; font-weight: 600; line-height: 1.3; }
.dlg-head .ibtn { margin: -6px -8px 0 0; }
.dlg .dtext { color: var(--muted); font-size: 13px; margin-top: 6px; white-space: pre-line; }
.dlg .field:first-of-type { margin-top: 20px; }
.dlg-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.keyshow { margin-top: 18px; border: 1px solid var(--ink); padding: 14px 16px; font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.opts { margin-top: 16px; border-top: 1px solid var(--line); }
.opt { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 44px; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt .box { width: 18px; height: 18px; border: 1px solid var(--taupe); flex: none; margin-top: 2px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.opt .box.round { border-radius: 50%; }
.opt input:checked + .box { background: var(--ink); border-color: var(--ink); }
.opt input:checked + .box::after { content: ""; width: 6px; height: 6px; background: var(--on-ink); }
.opt input:checked + .box.round::after { border-radius: 50%; }
.opt input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt input:disabled ~ * { opacity: .45; }
.opt .otext { min-width: 0; flex: 1; }
.opt .otitle { font-size: 15px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .osub { color: var(--muted); font-size: 13px; line-height: 1.45; display: block; }
.opts.sub { margin: 0 0 0 30px; border-top: 0; }
.range { display: flex; align-items: center; gap: 14px; }
.range input[type="range"] { flex: 1; accent-color: var(--ink); min-height: 30px; }
.range output { width: 40px; text-align: right; font-size: 14px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: var(--on-ink); padding: 8px 14px; font-size: 13px; border-radius: 10px; max-width: 100%; }

/* ---------- phones and tablets ---------- */
@media (max-width: 860px) {
  .app { display: block; }
  .only-phone { display: inline-flex; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(86vw, 320px); z-index: 40; transform: translateX(-101%); transition: transform .22s ease; visibility: hidden; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .side.open { transform: none; visibility: visible; }
  .main { height: 100%; }
  .topbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); height: 56px; padding: 0 8px; }
  .view.chat { min-height: calc(100% - 56px); }
  .thread { padding: 28px 18px 18px; }
  .stage { padding: 8px 12px max(10px, env(safe-area-inset-bottom)); }
  .view.chat.is-empty .stage { padding: 0 18px 8vh; }
  .cnote { display: none; }
  .msg.user .bubble { max-width: 92%; }
  .view.page { padding: 36px 20px 80px; }
  .phead { margin-bottom: 32px; }
  .toasts { bottom: 86px; }
}
@media (max-width: 560px) {
  .display { font-size: 30px; }
  .dlg-back { align-items: flex-end; padding: 0; }
  .dlg { max-width: none; border-left: 0; border-right: 0; border-bottom: 0; padding: 24px 20px max(20px, env(safe-area-inset-bottom)); max-height: 88dvh; }
  .dlg.wide { max-width: none; }
  .dlg-acts .btn { flex: 1; }
  .trio > div + div { padding-left: 14px; }
  .trio dd { font-size: 21px; }
  .rows > li { flex-wrap: wrap; gap: 10px 14px; }
  .rows .rmeta.wide { display: none; }
  .steps > li { grid-template-columns: 30px minmax(0, 1fr); }
  .draft-row { flex-direction: column; }
  .chipbtn > span:last-child { max-width: 84px; }
  .refbody dl { grid-template-columns: 1fr; gap: 2px 0; }
  .refbody dt { white-space: normal; }
  .cbar { padding: 4px 4px 6px; gap: 2px; }
  .cbar-l, .cbar-r { gap: 0; }
  /* the bar never grows past the box: the model picker gives up width first */
  .cbar-l { flex: none; }
  .cbar-r { flex: 1 1 0; justify-content: flex-end; }
  .selwrap { flex: 0 1 auto; min-width: 0; }
  #model { min-width: 0; width: 100%; }
  .chipbtn { padding: 0 6px; gap: 6px; }
  select.plain { padding-left: 4px; }
  .view.chat.is-empty .stage { padding: 0 12px 8vh; }
  table.models, table.models tbody, table.models tr, table.models th, table.models td { display: block; }
  table.models thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.models tbody tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  table.models tbody tr:first-child { border-top: 1px solid var(--line); }
  table.models tbody th, table.models tbody td { border: 0; padding: 2px 0; white-space: normal; }
  table.models tbody td { color: var(--muted); }
  .refbody dd { margin-bottom: 10px; }
  .uploads li { flex-wrap: wrap; gap: 2px 12px; }
  .uploads li .nm { max-width: 100%; }
}
/* touch: every target at least 44px */
@media (pointer: coarse) {
  .ibtn, .side .ibtn { width: 44px; height: 44px; }
  .side .sec-head .ibtn { width: 40px; height: 36px; }
  .navrow, .row .open { min-height: 44px; }
  .sec-btn { min-height: 36px; }
  .row .more, .sec-head .more, .sec-btn .chev { opacity: 1; }
  .row .open:not(:only-child) { padding-right: 46px; }
  .row .more { right: 0; }
  .row .kidsbtn { right: 44px; height: 36px; min-width: 32px; }
  .row.has-kids .open, .row.has-kids:hover .open, .row.has-kids:focus-within .open, .row.has-kids.menu-open .open { padding-right: 84px; }
  .menu > button, .menu > a { min-height: 44px; }
  .menu-row { min-height: 44px; }
  .seg button { padding: 6px 12px; }
  .chip .ibtn { width: 44px; height: 44px; }
  .chip { padding-top: 0; padding-bottom: 0; }
  .pwrap .link { padding: 14px 0; }
  .chipbtn, select.plain { height: 44px; }
  .send { width: 44px; height: 44px; }
  .link { padding: 12px 0; }
  .langsw .link { padding: 15px 6px; }
  .tabs button { padding: 14px 0; }
  .switchwrap { min-height: 44px; }
  .think summary { padding: 12px 0; }
  .md pre .ccopy { padding: 15px 10px; top: 0; }
  .backlink { min-height: 44px; }
  .msg.err .btn, .import .btn, .prop .propacts .btn { min-height: 44px; }
  .talk summary, .pinst summary { padding: 13px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .side, .stage, .topbar, .toasts { display: none !important; }
  .sidepane-grip { display: none !important; }
  body, .main { overflow: visible; height: auto; }
  .app { display: block; }
}

/* a quiet note at the end of a thread (stopped, or no answer yet) */
.msg.note { border-left: 1px solid var(--line); padding: 4px 0 4px 16px; }
.msg.note p { color: var(--muted); font-size: 15px; }
.msg.note .acts { display: flex; gap: 10px; margin-top: 12px; }
.msg.note .btn { min-height: 38px; padding: 0 16px; }
.thread > .state { padding: 8px 0; }
.dlg .label.sect { margin: 26px 0 6px; }
.dlg .btn.block { margin: 0; }

/* touch screens have no hover: a tapped button must not stay highlighted */
@media (hover: none) {
  .ibtn:hover, .chipbtn:hover, select.plain:hover, .menu > button:hover:not(:disabled), .menu > a:hover:not([aria-current]), .navrow:hover, .row:not(.on) .open:hover { background: transparent; }
  .ibtn:hover { color: var(--muted); }
}
/* Chinese: the tiny tracked labels are too small for Han characters, so give them more size and less tracking */
html:lang(zh-CN) .btn { font-size: 13px; }
html:lang(zh-CN) .auth .btn { letter-spacing: .1em; }
html:lang(zh-CN) .label, html:lang(zh-CN) .field > label, html:lang(zh-CN) .flabel label,
html:lang(zh-CN) .backlink, html:lang(zh-CN) .draft label, html:lang(zh-CN) .tabs button, html:lang(zh-CN) .trio dt,
html:lang(zh-CN) .refbody h3, html:lang(zh-CN) table.models thead th, html:lang(zh-CN) table.calls thead th,
html:lang(zh-CN) .copyline .link, html:lang(zh-CN) .codebar .link, html:lang(zh-CN) .md pre .ccopy { font-size: 13px; }
html:lang(zh-CN) .auth .label, html:lang(zh-CN) .auth .field > label, html:lang(zh-CN) .auth .flabel label { font-size: 13px; letter-spacing: .06em; }
html:lang(zh-CN) .chipbtn .label { font-size: 12px; }
html:lang(zh-CN) .hint, html:lang(zh-CN) .count, html:lang(zh-CN) .ferr { font-size: 13px; }
html:lang(zh-CN) .auth .hint, html:lang(zh-CN) .auth .ferr { font-size: 14px; }
html:lang(zh-CN) .auth-foot { font-size: 12px; }
/* very narrow phones: the composer bar keeps every control, the skills button shows its label only */
@media (max-width: 350px) {
  .chipbtn > span:last-child { display: none; }
  .thread { padding-left: 14px; padding-right: 14px; }
}

/* ---------- devices: LF AI Agent on the person's computer, seen and controlled from here ----------
   Same language as the rest: hairlines, small tracked labels, no new colours. The accent is only
   the live dot. Everything a device sends is text (textContent or md.js), never markup. */
.lockline { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; font-size: 13px; color: var(--muted); min-height: 28px; }
.lockline:empty { display: none; }
#devHome .lockline, #devOneBody > .lockline { margin: -18px 0 22px; }
.offdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--taupe); flex: none; }
.devline { display: inline-flex; align-items: center; gap: 8px; }
.need { font-size: 13px; font-weight: 500; color: var(--ink); border: 1px solid var(--ink); padding: 3px 8px; white-space: nowrap; flex: none; line-height: 1.4; }
.devs .rsub, .tree .rsub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; overflow: visible; }
.devs .rsub { margin-top: 4px; }
.devs .rsub .need { margin: 2px 0; }
.devs .rsub > span, .tree .rsub > span { min-width: 0; overflow-wrap: anywhere; }
.rows a.rtitle { text-decoration: none; }
.rows a.rtitle:hover { text-decoration: underline; text-underline-offset: 4px; }
.devmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.devfacts { margin-top: 22px; border-top: 1px solid var(--line); }
.devfacts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 24px; flex-wrap: wrap; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.devfacts dt { color: var(--muted); }
.devfacts dd { text-align: right; overflow-wrap: anywhere; min-width: 0; }
.devfacts dd.off { color: var(--muted); }
.devwhy { margin-top: 14px; }
.sstat { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; flex: none; }
.sstat.bad { color: var(--danger); }
.tree > li.kid .rmain { border-left: 1px solid var(--line); padding-left: 14px; }
.tree > li.d1 { padding-left: 18px; } .tree > li.d2 { padding-left: 36px; } .tree > li.d3 { padding-left: 54px; } .tree > li.d4 { padding-left: 72px; }
.tree .rtitle { font-weight: 400; }
.acts { border-top: 1px solid var(--line); }
.acts:empty { border-top: 0; }
.acts > li { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 2px 18px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.acts .when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.acts .what { min-width: 0; overflow-wrap: anywhere; }
.acts .what .sub { display: block; color: var(--muted); font-size: 13px; }
.acts .res { text-align: right; color: var(--muted); font-size: 13px; max-width: 260px; overflow-wrap: anywhere; }
.acts .res.bad { color: var(--danger); }
.cmdline { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); padding: 2px 2px 8px; overflow-wrap: anywhere; }
.cmdline.bad { color: var(--danger); }
.cmdline .live { flex: none; }
.phead .cmdline { padding: 14px 0 0; }

/* a session, shown like a chat */
.view.page.in-sess { padding: 0; min-height: 100%; display: flex; flex-direction: column; }
.sess { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sess-head { width: 100%; max-width: calc(var(--col) + 48px); margin: 0 auto; padding: 30px 24px 0; }
.sess-head .backlink { margin-bottom: 8px; text-decoration: none; }
#devOne > .backlink { text-decoration: none; }
.sess-title { font-size: 22px; font-weight: 300; letter-spacing: -.01em; line-height: 1.25; overflow-wrap: anywhere; }
.sess-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.sess-meta > span { min-width: 0; overflow-wrap: anywhere; }
.dthread { padding-top: 26px; }
.dthread .earlier { display: flex; justify-content: center; margin-bottom: 26px; }
.dthread .earlier .btn { min-height: 38px; padding: 0 16px; }
.dstage .lockline { padding: 6px 2px 0; }
.dstage .dwhy { padding: 0 2px 10px; }
.dstage .composer textarea { min-height: 52px; }
.dstage.watch .composer { display: none; }
.chipbtn .ic.i-stopfill { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.msg.user .from { margin-top: 6px; font-size: 13px; color: var(--muted); }
.cutnote { margin-top: 6px; font-size: 13px; color: var(--muted); }
.trow { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: -1px; }
.trow + .msg, .trow + .appr, .trow + .dline { margin-top: 26px; }
.msg + .trow, .appr + .trow { margin-top: -8px; }
.trow summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; padding: 8px 0; min-height: 38px; font-size: 13px; color: var(--muted); }
.trow summary::-webkit-details-marker { display: none; }
.trow summary .ic { width: 14px; height: 14px; flex: none; transition: transform .15s; }
.trow[open] summary .ic { transform: rotate(180deg); }
.trow .tname { font-family: var(--mono); font-size: 13px; color: var(--ink); flex: none; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .tsum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .tsum.bad { color: var(--danger); }
.trow .tfull { margin: 0 0 12px; padding: 2px 0 2px 16px; border-left: 1px solid var(--line); font-family: var(--mono); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow-y: auto; color: var(--ink); }
.msg.between .tfrom { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; overflow-wrap: anywhere; }
.msg.between { border-left: 1px solid var(--line); padding: 2px 0 2px 16px; }
.msg.between .ttext { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.dline { font-size: 13px; color: var(--muted); margin-bottom: 26px; overflow-wrap: anywhere; }
.dline .link { font-size: 13px; }
.msg.note p, .msg.err p { white-space: pre-wrap; overflow-wrap: anywhere; }

/* an approval: the one thing on this page with a full ink border while it waits */
.appr { border: 1px solid var(--ink); border-radius: 8px; padding: 16px 18px 18px; margin-bottom: 34px; }
.appr.done { border-color: var(--line); }
.appr .label { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.appr .atitle { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.appr .acode { margin: 10px 0 0; padding: 12px 14px; background: var(--panel); border-radius: 8px; font-family: var(--mono); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 172px; overflow: hidden; }
.appr .acode.plain { font-family: var(--font); font-size: 14px; }
.appr .acode.open { max-height: none; }
.appr .acode:empty { display: none; }
.appr .amore { font-size: 13px; margin-top: 4px; }
.appr .anote { margin-top: 14px; }
.appr .anote label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.appr .anote input { min-height: 42px; padding: 8px 12px; font-size: 14px; }
.appr .aacts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.appr .aacts .btn { min-height: 42px; padding: 0 18px; }
.appr .astate { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.appr .aout { margin-top: 12px; font-size: 14px; }
.appr .aout .at { color: var(--muted); }
.appr .awhy { margin-top: 12px; font-size: 13px; color: var(--muted); }
.appr .ferr { margin-top: 10px; }
.dlg select.box { cursor: pointer; padding-right: 34px; }
.dlg .selbox { position: relative; display: block; }
.dlg .selbox::after { content: ""; position: absolute; right: 16px; top: 50%; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-75%) rotate(45deg); pointer-events: none; }
.dlg select.box option { background: var(--bg); color: var(--ink); }

@media (max-width: 860px) {
  .view.page.in-sess { min-height: calc(100% - 56px); }
  .sess-head { padding: 18px 18px 0; }
  .dthread { padding-top: 20px; }
  .sess-title { font-size: 20px; }
}
@media (max-width: 560px) {
  .acts > li { grid-template-columns: minmax(0, 1fr) auto; }
  .acts .when { grid-column: 1 / -1; }
  .acts .res { max-width: 46vw; }
  .appr { padding: 14px 14px 16px; }
  .appr .aacts .btn { flex: 1 1 auto; }
  .devfacts dd { text-align: left; }
  .tree > li.d1 { padding-left: 12px; } .tree > li.d2 { padding-left: 24px; } .tree > li.d3 { padding-left: 36px; } .tree > li.d4 { padding-left: 48px; }
  .devs > li, .tree > li { flex-wrap: nowrap; }
  .devs > li { align-items: flex-start; }
}
@media (pointer: coarse) {
  .appr .aacts .btn, .dthread .earlier .btn { min-height: 44px; }
  .trow summary { min-height: 44px; }
  .appr .anote input { min-height: 44px; }
}
html:lang(zh-CN) .need, html:lang(zh-CN) .appr .anote label, html:lang(zh-CN) .msg.user .from { font-size: 13px; }
html:lang(zh-CN) .lockline, html:lang(zh-CN) .sstat, html:lang(zh-CN) .cmdline { font-size: 14px; }

/* =====================================================================
   Search, dashboard, scheduled, plugins (web/features.js). Everything below belongs to
   those four; new rules for them go at the very end of this file.
   ===================================================================== */
.navrow[aria-current="page"] { background: var(--sel); }
.navrow .fx-kbd { margin-left: auto; font: inherit; font-size: 12px; color: var(--faint); opacity: 0; transition: opacity .12s; }
.navrow:hover .fx-kbd, .navrow:focus-visible .fx-kbd { opacity: 1; }
@media (hover: none) { .navrow .fx-kbd { display: none; } }

/* ---------- search: a field at the top of a panel, the results under it ---------- */
.fx-search-back { align-items: flex-start; padding-top: min(14vh, 120px); }
.dlg.fx-search { max-width: 620px; padding: 0; display: flex; flex-direction: column; max-height: min(560px, calc(100dvh - min(14vh, 120px) - 24px)); overflow: hidden; }
.fx-search .dlg-head { align-items: center; gap: 10px; margin: 0; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--line); flex: none; }
.fx-search .dlg-head .ibtn { margin: 0; }
.fx-sicon { display: inline-flex; color: var(--muted); flex: none; }
.fx-sicon .ic { width: 17px; height: 17px; }
.fx-search input.fx-sin { flex: 1; min-width: 0; border: 0; border-radius: 0; padding: 6px 0; min-height: 36px; font-size: 15px; background: transparent; }
.fx-search input.fx-sin:focus-visible { outline: none; }
.fx-res { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; scrollbar-width: thin; }
.fx-res:empty { display: none; }
.fx-rl { padding: 6px 10px 4px; font-size: 12px; color: var(--faint); }
.fx-r { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; min-width: 0; }
.fx-r[aria-selected="true"] { background: var(--sel); }
.fx-rw { width: 15px; height: 15px; margin-top: 3px; color: var(--faint); }
.fx-rm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fx-rt { font-size: 14px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-rs { font-size: 13px; line-height: 1.5; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.fx-rd { flex: none; font-size: 12px; line-height: 21px; color: var(--faint); white-space: nowrap; }
.fx-res mark { background: rgba(227, 181, 91, .38); color: inherit; border-radius: 3px; padding: 0 1px; }
.fx-snote { flex: none; padding: 10px 16px 12px; font-size: 13px; color: var(--muted); }
.fx-snote:empty { display: none; }
.fx-res:not(:empty) + .fx-snote { border-top: 1px solid var(--line); padding: 8px 16px; font-size: 12px; }
.msg.fx-hit { animation: fx-hit 2.4s ease-out; border-radius: 10px; }
@keyframes fx-hit { 0%, 35% { box-shadow: 0 0 0 6px rgba(227, 181, 91, .3); background: rgba(227, 181, 91, .3); } 100% { box-shadow: 0 0 0 6px transparent; background: transparent; } }
@media (prefers-reduced-motion: reduce) { .msg.fx-hit { animation: none; outline: 2px solid var(--warn); outline-offset: 4px; } }
@media (max-width: 560px) {
  .fx-search-back { padding-top: 0; align-items: flex-start; }
  .dlg.fx-search { max-height: 100dvh; height: 100dvh; border: 0; border-radius: 0; padding: 0 0 env(safe-area-inset-bottom); }
  .fx-search .dlg-head { padding: 10px 8px 10px 16px; }
  .fx-search input.fx-sin { font-size: 16px; }
  .fx-r { padding: 10px; }
}

/* ---------- dashboard ---------- */
.fx-dash .phead { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fx-h { margin: 36px 0 12px; }
.fx-hero .label { margin-bottom: 6px; }
.fx-big { font-size: 34px; font-weight: 500; line-height: 1.15; letter-spacing: -.01em; }
.fx-big .fx-of { font-size: 16px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.fx-meter { display: block; width: 100%; max-width: 420px; height: 8px; margin: 14px 0 8px; }
.fx-track-bg { fill: var(--line); }
.fx-track-on { fill: var(--ink); }
.fx-meter.near .fx-track-on, .fx-track.near .fx-track-on { fill: var(--warn); }
.fx-meter.over .fx-track-on, .fx-track.over .fx-track-on { fill: var(--bad); }
.fx-chart svg { max-height: 190px; }
.fx-chart .bar { fill: var(--faint); }
.fx-chart g.today .bar, .fx-chart g:hover .bar, .fx-chart g:focus .bar { fill: var(--ink); }
.fx-chart .fx-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.fx-chart text.fx-axis { font-size: 11px; }
.fx-chart figcaption { margin-top: 8px; font-size: 13px; }
.fx-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.fx-bars li { display: grid; grid-template-columns: minmax(0, 7.5em) minmax(40px, 1fr) auto auto; align-items: center; gap: 12px; padding: 7px 0; font-size: 13px; }
.fx-bn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-track { display: block; width: 100%; height: 6px; }
.fx-bv { text-align: right; min-width: 4.5em; }
.fx-bc { color: var(--muted); font-size: 13px; text-align: right; min-width: 4em; }
.fx-list { border-top: 1px solid var(--line); }
.fx-list > li { border-bottom: 1px solid var(--line); }
.fx-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; min-width: 0; text-decoration: none; color: var(--ink); border-radius: 6px; }
a.fx-row:hover { background: var(--hover); }
.fx-row .fx-rw { margin-top: 0; }
.fx-rw.running { color: var(--ok); }
.fx-rw.waiting { color: var(--warn); }
.fx-rw.error { color: var(--bad); }
.fx-row .fx-rs { -webkit-line-clamp: 1; }
.fx-tag { flex: none; font-size: 12px; line-height: 1.5; color: var(--muted); white-space: nowrap; }
.fx-tag.running { color: var(--ok); }
.fx-tag.waiting { color: var(--warn); }
.fx-tag.error { color: var(--bad); }
.fx-trio dd { font-size: 24px; font-weight: 500; }
.fx-trio-note { margin: 10px 0 20px; }
table.fx-team th[scope="row"] { font-weight: 400; white-space: nowrap; }
table.fx-team .fx-un { font-weight: 500; }
table.fx-team .fx-ln { color: var(--muted); margin-left: 8px; }
table.fx-team th .fx-tag { margin-left: 8px; padding: 1px 6px; border-radius: 999px; background: var(--sel); }
table.fx-team td .fx-track { width: 96px; margin: 5px 0 0 auto; }
table.fx-team tr.off th, table.fx-team tr.off td { color: var(--muted); }
table.fx-team .fx-over { color: var(--bad); font-weight: 500; }
@media (max-width: 700px) {
  .fx-two { grid-template-columns: minmax(0, 1fr); }
  .fx-big { font-size: 30px; }
  .fx-bars li { grid-template-columns: minmax(0, 8em) minmax(30px, 1fr) auto; }
  .fx-bc { display: none; }
  /* the team on a phone: who, how much, of how much; the rest is on a wider screen */
  table.fx-team th:nth-child(n+4), table.fx-team td:nth-child(n+4) { display: none; }
  table.fx-team td .fx-track { width: 64px; }
  table.fx-team th[scope="row"] { white-space: normal; }
  table.fx-team .fx-ln { display: block; margin-left: 0; font-size: 13px; }
  table.fx-team td:last-child, table.fx-team th:last-child { padding-right: 0; }
}

/* ---------- scheduled ---------- */
.fx-sched .phead { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fx-tasks { border-top: 1px solid var(--line); }
.fx-tasks:empty { border-top: 0; }
.fx-tasks > li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.fx-tm { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.fx-tn { max-width: 100%; font-size: 15px; font-weight: 500; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-tn:hover { text-decoration: underline; text-underline-offset: 4px; }
.fx-tasks > li.off .fx-tn { color: var(--muted); }
.fx-tw { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 13px; color: var(--muted); }
.fx-tnext { color: var(--faint); }
.fx-tl { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); max-width: 100%; }
.fx-tl.bad, .fx-runs .bad { color: var(--danger); }
.fx-run { flex: none; min-height: 30px; padding: 0 12px; }
.fx-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.fx-time { display: flex; align-items: center; gap: 8px; }
.fx-time .selbox { flex: 1; min-width: 0; }
.dlg .link.fx-del { margin-right: auto; }
.fx-hist { margin-top: 20px; }
.fx-runs li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
@media (max-width: 560px) {
  .fx-tasks > li { flex-wrap: wrap; }
  .fx-tm { flex-basis: 100%; }
  .fx-run { margin-left: auto; }
  .fx-grid2 { grid-template-columns: minmax(0, 1fr); }
  .dlg .link.fx-del { flex-basis: 100%; text-align: left; }
}
.dlg .fx-grid2 .field { margin-top: 16px; }
@media (max-width: 560px) { .fx-tasks > li { gap: 6px 14px; } }

/* ---- sidebar: menus that are always there to be found, a new chat inside a section (appended) ---- */
.row .more { opacity: .45; }                       /* every row shows its ⋯, faint; full under the pointer and on the open row */
.row .open:not(:only-child) { padding-right: 34px; }
.row.held .open { background: var(--sel); }        /* a long press holds the row: let go for its menu, move to drag it */
.side .sec-head .secadd { opacity: .55; }
.side .sec-head:hover .secadd, .side .sec-head:focus-within .secadd { opacity: 1; }
.empty-sec { list-style: none; }
.empty-sec .addhere { color: var(--muted); font-size: 13px; padding-top: 5px; padding-bottom: 5px; }
.empty-sec .addhere:hover { color: var(--ink); }
.empty-sec .addhere .ic { width: 14px; height: 14px; }
.empty-sec .side-note { padding-top: 0; }
.intosec { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.intosec .ibtn { width: 22px; height: 22px; }
.intosec .ibtn .ic { width: 12px; height: 12px; }
.movewhy { margin-top: 10px; }
@media (pointer: coarse) {
  .row .more { opacity: 1; }
  .row .open:not(:only-child) { padding-right: 46px; }
  .empty-sec .addhere { min-height: 44px; }
  .intosec .ibtn { width: 36px; height: 36px; }
}

/* =====================================================================
   Context: the meter by the model picker ("6%"; amber near the point where the chat is
   compacted) and the line in the thread where a summary takes over (compact.py).
   ===================================================================== */
.ctx { flex: none; height: 32px; padding: 0 8px; border-radius: 8px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ctx:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.ctx.high { color: var(--warn); }
.ctx:disabled { cursor: default; opacity: .6; }
.cutline { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font-size: 13px; color: var(--faint); text-align: center; }
.cutline::before, .cutline::after { content: ""; flex: 1; min-width: 12px; height: 1px; background: var(--line); }

/* ---------- scheduled: a row's ⋯ menu and the runs of a task ---------- */
.fx-more { position: relative; flex: none; display: inline-flex; }
.fx-more .menu.pop { left: auto; right: 0; top: calc(100% + 4px); }
.fx-more .menu.pop.up { top: auto; bottom: calc(100% + 4px); }
.fx-runs-dlg .label { margin-top: 14px; }
.fx-runs-all { margin-top: 10px; border-top: 1px solid var(--line); max-height: min(420px, 55dvh); overflow-y: auto; }
.fx-runs-all:empty { display: none; }
.fx-runs-all li { align-items: baseline; padding: 9px 0; }
.fx-runs-all li > :last-child { min-width: 0; text-align: right; }
/* ---------- plugins: a grid of cards ---------- */
.fx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.fx-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.fx-card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fx-card-mark { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--sel); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; text-transform: uppercase; }
.fx-card-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-card-desc { font-size: 13px; line-height: 1.5; color: var(--muted); }
.fx-card-status { font-size: 13px; }
.fx-card-status > li { display: flex; align-items: center; gap: 8px; padding: 5px 0; min-width: 0; }
.fx-card-status .fx-rw { width: 15px; height: 15px; margin: 0; flex: none; color: var(--faint); }
.fx-cs-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-cs-val { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-cs-val.quiet { color: var(--muted); }
.fx-cs-val.bad { color: var(--danger); }
.fx-card-act { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: auto; padding-top: 4px; min-height: 36px; }
.fx-card-act .btn { min-height: 32px; }
.fx-card.off .fx-card-name { color: var(--muted); }

/* ---------- 联网: the row under an answer, the card's log, the switch by the message field ---------- */
.fx-web { margin: 6px 0; font-size: 13px; color: var(--muted); }
.fx-web > summary { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 8px 4px 6px; border-radius: 8px; cursor: pointer; list-style: none; }
.fx-web > summary::-webkit-details-marker { display: none; }
.fx-web > summary:hover { background: var(--hover); color: var(--ink); }
.fx-web .fx-webic { width: 14px; height: 14px; flex: none; }
.fx-web .fx-webt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-web .fx-webwhy { flex: none; color: var(--faint); }
.fx-web > summary > .ic:last-child { width: 12px; height: 12px; flex: none; transition: transform .15s; }
.fx-web[open] > summary > .ic:last-child { transform: rotate(180deg); }
.fx-web.quiet .fx-webt { color: var(--faint); }
.fx-webbody { margin: 4px 0 8px 28px; padding-left: 12px; border-left: 1px solid var(--line); overflow-wrap: anywhere; }
.fx-webbody ol { list-style: decimal; padding-left: 18px; }
.fx-webbody li { padding: 2px 0; }
.fx-webhost { margin-left: 8px; color: var(--faint); font-size: 12px; }
.fx-webnote { color: var(--faint); margin-top: 4px; }
.ibtn.fx-webbtn { border-radius: 8px; }
.ibtn.fx-webbtn[aria-pressed="true"] { color: var(--ink); }
.ibtn.fx-webbtn[aria-pressed="false"] { color: var(--faint); opacity: .55; }
.fx-card-more > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: 13px; color: var(--muted); cursor: pointer; list-style: none; }
.fx-card-more > summary::-webkit-details-marker { display: none; }
.fx-card-more > summary:hover { color: var(--ink); }
.fx-card-more > summary .ic { width: 12px; height: 12px; transition: transform .15s; }
.fx-card-more[open] > summary .ic { transform: rotate(180deg); }
.fx-weblog { max-height: 240px; overflow-y: auto; font-size: 13px; border-top: 1px solid var(--line); scrollbar-width: thin; }
.fx-weblog > li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.fx-weblog > li.quiet { display: block; }
.fx-wl-x { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.fx-wl-s.bad { color: var(--danger); }
.fx-cs-name.quiet { color: var(--muted); white-space: normal; }

/* ---------- a plugin's own page, and its row under 插件 in the sidebar ---------- */
.fx-plugrows { display: flex; flex-direction: column; }
.navrow.fx-plugrow { padding: 4px 8px 4px 34px; font-size: 13px; color: var(--muted); }
.navrow.fx-plugrow:hover, .navrow.fx-plugrow[aria-current="page"] { color: var(--ink); }
.fx-plugdot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .5; flex: none; }
.fx-card-open { margin-right: auto; font-size: 13px; }
.fx-bl > li { padding: 4px 0; }
.fx-bl-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; min-width: 0; }
.fx-bl-row .fx-rt.link { font-size: 15px; font-weight: 500; text-decoration: none; }
.fx-bl-row .fx-rs.quiet { color: var(--faint); }
.fx-bl-new { flex: none; }
.fx-bl-why { margin: -2px 0 8px 31px; }
@media (max-width: 560px) {
  .fx-bl-row { flex-wrap: wrap; }
  .fx-bl-row .fx-rm { flex: 1 1 60%; }
  .fx-bl-new { width: 100%; }
  .fx-bl-why { margin-left: 0; }
}
.fx-bl-why { margin: -8px 0 10px 31px; }

/* ---- the Lark / 飞书 plugin: a quiet row and a card under an answer (features.js) ---- */
.extras > .fx-lknote { margin-top: 8px; display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 13px; line-height: 1.5; min-width: 0; }
.extras > .fx-lknote:first-child { margin-top: 14px; }
.fx-lknote .ic { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.fx-lknote > span, .fx-lknote > a { min-width: 0; overflow-wrap: anywhere; }
.prop.fx-lksend .fx-lktext { margin-top: 8px; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow-y: auto; }
.prop.fx-lksend .hint { margin-top: 8px; }

/* ---- sidebar: a row with sub-sessions keeps room for its fold button next to the ⋯ (appended) ---- */
.row.has-kids .open:not(:only-child) { padding-right: 64px; }
@media (pointer: coarse) {
  .row.has-kids .open:not(:only-child) { padding-right: 84px; }
}

/* the Lark page */
.fx-lkform { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.fx-lkform .fx-lkin { flex: 1 1 320px; min-width: 0; }
.fx-lkbtns { display: flex; gap: 10px; flex: none; }
.fx-lkout:not(:empty) { margin-top: 18px; }
.fx-lkt { font-weight: 500; font-size: 15px; overflow-wrap: anywhere; }
.fx-lktextbox { margin-top: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; max-height: 320px; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.6; }
.fx-lkh { margin-top: 36px; font-size: 15px; font-weight: 500; }
.fx-lkh + .hint { margin-top: 4px; }
.fx-lklog, .fx-lkchats { margin-top: 10px; }
.fx-lklog > li, .fx-lkchats > li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.fx-lklog > li.quiet, .fx-lkchats > li.quiet { color: var(--muted); font-size: 14px; }
.fx-lklog .fx-rs a { overflow-wrap: anywhere; }
.fx-plugpage[data-plugin="lark"] .pacts { margin-top: 28px; }
@media (max-width: 560px) { .fx-lkbtns { flex: 1 1 100%; } .fx-lkbtns .btn { flex: 1; } }

/* ---- a question card from the computer: options as buttons, "Other…", Send and Skip (appended) ---- */
.appr .aqs { margin-top: 12px; display: grid; gap: 16px; }
.appr .aq .qhead { font-size: 12px; color: var(--faint); margin: 0 0 2px; }
.appr .aq .qtext { font-size: 15px; line-height: 1.5; margin: 0 0 8px; overflow-wrap: anywhere; white-space: pre-wrap; }
.appr .qopts { display: grid; gap: 6px; }
.appr .qopt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; text-align: left; color: var(--ink); background: transparent; }
.appr .qopt:hover:not(:disabled) { background: var(--hover); }
.appr .qopt.on { border-color: var(--accent); background: var(--sel); }
.appr .qopt:disabled { opacity: .6; cursor: default; }
.appr .qopt .qlabel { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.appr .qopt .qdesc { font-size: 13px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.appr .qother .qlabel { color: var(--muted); }
.appr .qotherin { margin-top: 6px; width: 100%; }
@media (pointer: coarse) { .appr .qopt { min-height: 44px; } }

/* ---------- switches read as on or off (QA W13): a rounded track and a round knob; on = the
   accent colour with the knob at the right. Every .switch (scheduled tasks, skills, plugins)
   keeps one look; delete this block to go back to the square switch above. ---------- */
.switch { border-radius: 999px; background: var(--faint); border-color: transparent; }
.switch { background: color-mix(in srgb, var(--faint) 62%, transparent); }      /* off: a grey track in either theme */
.switch::after { border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .28); }
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"]::after { background: #fff; }
.switch:disabled { opacity: .5; }

/* ===== Video (video.js): the chat card and the 视频 page ===== */
.vx-card .vx-prompt, .vx-item .vx-prompt { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.vx-card .vx-prompt { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.vx-picks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.vx-pick { display: inline-flex; align-items: center; gap: 8px; }
.vx-pl { font-size: 13px; color: var(--muted); }
.vx-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.vx-btns { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.vx-price { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vx-job { margin-top: 10px; }
.vx-state { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.vx-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.vx-cancel { margin-left: auto; font-size: 13px; }
.vx-state + .hint { margin-top: 2px; font-size: 13px; }
.vx-player { display: block; width: 100%; max-height: 420px; border-radius: 8px; background: #000; }
.vx-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vx-note { font-size: 14px; color: var(--muted); }
.vx-slot + .vx-slot { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 2px; }
.vx-form { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 28px; }
.vx-form .vx-ta { width: 100%; border: 0; padding: 4px 4px 0; min-height: 64px; font-size: 15px; line-height: 1.55; resize: none; background: transparent; }
.vx-form .vx-ta:focus-visible { outline: none; }
.vx-form .vx-picks { margin-top: 8px; padding: 0 4px; }
.vx-form .vx-foot { padding: 0 4px; }
.vx-form .hint { margin-top: 8px; padding: 0 4px; font-size: 13px; }
.vx-imgbtn { display: inline-flex; align-items: center; gap: 6px; }
.vx-imgbtn .ic { width: 15px; height: 15px; }
.vx-list { display: flex; flex-direction: column; gap: 22px; }
.vx-item { border-top: 1px solid var(--line); padding-top: 16px; }
.vx-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.vx-imgs { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 50vh; overflow-y: auto; }
.vx-imgb { display: block; width: 100%; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; padding: 0; }
.vx-imgb:hover, .vx-imgb:focus-visible { border-color: var(--accent); }
.vx-imgb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vx-break { font-size: 13px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.vx-break:empty { display: none; }
.vx-card .vx-meta { margin-top: 4px; overflow-wrap: anywhere; }
.vx-ins { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding: 0 4px; }
.vx-ins .vx-chip { max-width: 100%; }
.vx-form .vx-break { padding: 0 4px; text-align: right; }
.vx-vids { list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.vx-vidb { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; text-align: left; }
.vx-vidb:hover, .vx-vidb:focus-visible { border-color: var(--accent); }
.vx-vidb .ic { width: 16px; height: 16px; flex: none; color: var(--muted); }
.vx-vidb .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) {
  .vx-picks { gap: 8px; }
  .vx-pick { width: 100%; justify-content: space-between; }
  .vx-btns { width: 100%; justify-content: flex-end; }
}

/* ---- which computer a row is on (more than one computer), the open thing's name in the phone's top bar (appended) ---- */
.row .open:has(.devname) { flex-wrap: wrap; row-gap: 0; }
.row .open .devname { order: 10; flex: 0 0 100%; min-width: 0; padding-left: 22px; margin-top: -1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.3; color: var(--faint); }
.topbar #topTitle.named { min-width: 0; flex: 1; justify-content: center; }
.topbar #topTitle.named span { display: block; max-width: 62vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 600; }

/* ---- messages that wait their turn, and the working line of a computer session (appended) ---- */
.composer .queued { display: grid; gap: 4px; padding: 10px 12px 0; margin: 0; list-style: none; }
.composer .queued .qrow { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 4px 4px 10px; border-radius: 8px; background: var(--hover); font-size: 13px; }
.composer .queued .qtag { flex: none; font-size: 12px; color: var(--faint); }
.composer .queued .qtxt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.composer .queued .ibtn { width: 24px; height: 24px; flex: none; }
.composer .queued .ibtn .ic { width: 13px; height: 13px; }
.dthread .workline { display: flex; align-items: center; gap: 8px; margin: 0 0 24px; font-size: 13px; color: var(--muted); }
.dthread .workline.needs { color: var(--warn); }
.dthread .workline .link { font-size: 13px; }
@media (pointer: coarse) { .composer .queued .ibtn { width: 36px; height: 36px; } }

/* ---- the project of a new session, first in the row above the message field (appended) ---- */
.whererow .projwrap select.plain { height: 28px; font-size: 12px; max-width: 180px; }

/* ---- 立即发送 on a queued message (appended) ---- */
.composer .queued .qnow { flex: none; height: 24px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--accent); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.composer .queued .qnow:hover { text-decoration: underline; }
.composer .queued .qnow:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- the sidebar in two blocks (appended): the nav rows on top, set off by a hairline and space;
   then a small tracked label 项目 / Projects with a + for a new section; section headers stronger ---- */
.side-top { display: flex; flex-direction: column; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.side-proj { display: flex; align-items: center; justify-content: space-between; min-height: 24px; padding: 0 2px 0 8px; }
.side-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); line-height: 1.4; }
.side .side-proj .ibtn { width: 24px; height: 24px; border-radius: 6px; color: var(--faint); }
.side .side-proj .ibtn:hover { color: var(--ink); }
.side .side-proj .ibtn .ic { width: 15px; height: 15px; }
.side .sidelist { margin-top: 2px; }
.side .sec { margin-top: 18px; }
#chatList > .sec:first-child { margin-top: 4px; }
.side .sec-btn { font-size: 13px; font-weight: 600; color: var(--muted); }
.side .sec-btn:hover { color: var(--ink); }
@media (pointer: coarse) {
  .side .side-proj .ibtn { width: 40px; height: 36px; }
}

/* Claude Opus 5.5: the effort chip next to the model picker (web/features.js) */
.fx-effort[hidden] { display: none; }
.fx-effort { height: 32px; padding: 0 8px; gap: 6px; flex: none; white-space: nowrap; }
.fx-effort .val { font-weight: 600; }
.fx-effort[data-effort="high"] .val { color: var(--accent, var(--ink)); }

/* Lark / 飞书, each person's own app: the brand choice and the step with its QR code (web/features.js) */
.fx-lkflow { margin-top: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.fx-lkflow .seg button { font-size: 13px; padding: 4px 10px; }
.fx-lksteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; align-self: stretch; min-width: 0; }
.fx-lkrow { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fx-lkrh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.fx-lknum { flex: none; }
.fx-lkrow.wait .fx-lkrh { color: var(--muted); }
.fx-lkrow.open .fx-lktitle { font-weight: 500; }
.fx-lkok { color: var(--ok, #2f8f4e); font-size: 13px; }
.fx-lkdone { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; padding-left: 24px; }
.fx-lkerr { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-left: 24px; font-size: 14px; color: var(--danger, #c0392b); }
.fx-lkpick { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-left: 24px; min-width: 0; align-self: stretch; }
.fx-lkapps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; align-self: stretch; min-width: 0; }
.fx-lkapp { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); min-width: 0; }
.fx-lkapp:hover { background: var(--hover); }
.fx-lkappn { font-size: 14px; overflow-wrap: anywhere; }
.fx-lkappid { font-size: 12px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.fx-lkrow .fx-lkscan { padding-left: 24px; }
.fx-lksum { margin-top: 12px; min-width: 0; }
.fx-lksum dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 14px; }
.fx-lksum dt { color: var(--muted); }
.fx-lksum dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.fx-lkperm { margin-top: 4px; font-size: 13px; }
.fx-lkperm summary { cursor: pointer; color: var(--muted); }
.fx-lkperm ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.fx-lkperm code { font-size: 12px; color: var(--muted); }
.fx-lkacts { display: inline-flex; gap: 8px; flex-wrap: wrap; }
#fxLkPageSum { margin: 4px 0 20px; }
.fx-lkscan { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; min-width: 0; }
.fx-lkqr { width: 176px; height: 176px; flex: none; border-radius: 8px; background: #fff; border: 1px solid var(--line); image-rendering: pixelated; }
.fx-lkscanx { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; flex: 1 1 200px; }
.fx-lkcode { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.fx-lkend { color: var(--muted); }
#fxLkPageFlow { margin-top: 20px; }
@media (max-width: 560px) { .fx-lkscan { flex-direction: column; align-items: flex-start; } .fx-lkscanx .btn { align-self: stretch; text-align: center; } .fx-lkrow .fx-lkscan, .fx-lkpick, .fx-lkdone, .fx-lkerr { padding-left: 0; } }

/* ---- a card taken back at the computer (appended): greyed, folded to its title and 已撤回 ---- */
.appr.withdrawn { opacity: .6; }
.appr.withdrawn .acode, .appr.withdrawn .amore, .appr.withdrawn .aqs, .appr.withdrawn .cutnote { display: none; }

/* ---------- plugins, simpler: one line per plugin, the rest folded under 更多; the rows under 插件 fold ---------- */
.fx-cards { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.fx-card { gap: 0; padding: 10px 2px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.fx-card-head { gap: 12px; min-height: 36px; }
.fx-card-mark { width: 28px; height: 28px; color: var(--muted); }
.fx-card-mark .ic { width: 16px; height: 16px; margin: 0; }
.fx-card-txt { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.fx-card-name { flex: none; max-width: 55%; font-size: 14px; font-weight: 600; }
.fx-card-line { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-card-act { flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0; padding: 0; min-height: 0; }
.fx-card-act .btn { min-height: 30px; padding: 0 12px; font-size: 13px; }
.fx-card-open { margin-right: 0; font-size: 13px; }
.fx-card.off .fx-card-mark { opacity: .55; }
.fx-card > .fx-lkflow, .fx-card > .fx-lksum { margin: 10px 0 4px 40px; }
.fx-card.away .fx-card-name { color: var(--muted); font-weight: 500; }
.fx-plugmore { margin-top: 14px; }
.fx-plugmore[hidden] { display: none; }
.fx-plugmore > summary { display: inline-flex; align-items: center; gap: 8px; padding: 6px 2px; font-size: 13px; color: var(--muted); cursor: pointer; list-style: none; }
.fx-plugmore > summary::-webkit-details-marker { display: none; }
.fx-plugmore > summary:hover { color: var(--ink); }
.fx-plugmore > summary .n { color: var(--faint); }
.fx-plugmore > summary .chev { width: 12px; height: 12px; transform: rotate(-90deg); transition: transform .15s; }
.fx-plugmore[open] > summary .chev { transform: none; }
.fx-plugmore > .fx-cards { margin-top: 6px; }
.fx-weblog { max-height: min(420px, 60dvh); }
.fx-plughead { position: relative; }
.fx-plughead.has-tog > .navrow { padding-right: 36px; }
.side .fx-plugtog { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; color: var(--faint); }
.side .fx-plugtog:hover { color: var(--ink); }
.fx-plugtog[hidden] { display: none; }
.fx-plugtog .chev { width: 13px; height: 13px; transition: transform .15s; }
.fx-plugtog[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.fx-plugrows[hidden] { display: none; }
@media (max-width: 560px) {
  .fx-card-txt { flex-direction: column; align-items: flex-start; gap: 0; }
  .fx-card-name { max-width: 100%; }
  .fx-card-line { width: 100%; }
  .fx-card > .fx-lkflow, .fx-card > .fx-lksum { margin-left: 0; }
  .side .fx-plugtog { width: 40px; height: 36px; }
  .fx-plughead.has-tog > .navrow { padding-right: 44px; }
}

/* ---------- 仪表盘: the daily company reports (reports.js) ---------- */
.rp { --rp-green: var(--ok); --rp-yellow: var(--warn); --rp-red: var(--bad); --rp-grey: var(--faint); }
.rp .rp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rp .rp-titles { min-width: 0; }
.rp #rpDate { display: flex; align-items: center; gap: 4px; margin-top: 6px; min-height: 32px; }
.rp #rpDate .backlink { margin: 0; padding: 4px 0; }
.rp .rp-dn { width: 28px; height: 28px; font-size: 18px; line-height: 1; color: var(--muted); }
.rp .rp-dw { font-size: 13px; color: var(--muted); }
.rp .rp-tools { display: flex; gap: 8px; }
.rp .btn.sm { min-height: 30px; padding: 0 12px; font-size: 13px; }
.rp-h { margin: 32px 0 12px; }
.rp-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--rp-grey); }
.rp-dot.green { background: var(--rp-green); } .rp-dot.yellow { background: var(--rp-yellow); } .rp-dot.red { background: var(--rp-red); }
.rp-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--sel); white-space: nowrap; }
.rp-pill.red { color: var(--rp-red); } .rp-pill.yellow { color: var(--rp-yellow); } .rp-pill.green { color: var(--rp-green); } .rp-pill.grey { color: var(--muted); }
.rp-chief { background: var(--panel); border-radius: 14px; padding: 18px 18px 14px; }
.rp-ch { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rp-counts { display: flex; gap: 12px; font-size: 13px; }
.rp-cnt { display: inline-flex; align-items: center; gap: 5px; }
.rp-sum { margin-top: 10px; font-size: 16px; line-height: 1.6; }
.rp-nh { margin-top: 16px; }
.rp-today { list-style: none; margin: 6px 0 0; padding: 0; counter-reset: rpn; }
.rp-today li a, .rp-dec { display: flex; align-items: flex-start; gap: 10px; padding: 9px 8px; margin: 0 -8px; border-radius: 8px; color: inherit; text-decoration: none; }
.rp-today li a:hover, .rp-dec:hover { background: var(--hover); }
.rp-today .rp-dot, .rp-dec .rp-dot { margin-top: 6px; }
.rp-dm { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rp-dt { font-size: 14px; line-height: 1.45; }
.rp-ds { font-size: 13px; color: var(--muted); line-height: 1.45; }
.rp-decisions { list-style: none; margin: 0; padding: 0; }
.rp-decisions li + li { border-top: 1px solid var(--line); }
.rp-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.rp-acts.rp-top { margin: 0 0 20px; }
.rp-err { color: var(--danger); }
.rp-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.rp-card { border: 1px solid var(--line); border-radius: 14px; border-left: 4px solid var(--rp-grey); }
.rp-card.green { border-left-color: var(--rp-green); } .rp-card.yellow { border-left-color: var(--rp-yellow); } .rp-card.red { border-left-color: var(--rp-red); }
.rp-card.none { border-left-color: var(--line); }
.rp-cl { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 14px 16px 12px; color: inherit; text-decoration: none; border-radius: 0 13px 13px 0; }
.rp-cl:hover { background: var(--hover); }
.rp-ct { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rp-cn { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-hl { font-size: 14px; line-height: 1.5; }
.rp-old { font-size: 13px; }
.rp-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 2px 0 0; }
.rp-kpis dt { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-kpis dd { margin: 0; font-size: 15px; font-weight: 500; display: flex; align-items: baseline; gap: 4px; }
.rp-arr { font-size: 13px; font-weight: 600; }
.rp-arr.good { color: var(--rp-green); } .rp-arr.bad { color: var(--rp-red); } .rp-arr.flat { color: var(--muted); }
.rp-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; font-size: 12px; color: var(--muted); }
.rp-more { color: var(--ink); font-weight: 500; white-space: nowrap; }
.rp-busy { display: inline-flex; align-items: center; }
.rp-foot { margin-top: 18px; }
.rp-start { border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 24px; }
.rp-steps { list-style: none; margin: 12px 0 0; padding: 0; }
.rp-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.rp-steps li + li { border-top: 1px solid var(--line); }
.rp-sn { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; background: var(--sel); }
.rp-steps li.done .rp-sn { background: var(--ok); color: var(--on-ink); }
.rp-sm { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rp-st { font-weight: 500; }
.rp-sx { font-size: 13px; color: var(--muted); }
.rp-dh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rp-big { font-size: 19px; line-height: 1.5; font-weight: 500; margin-top: 12px; }
.rp-kpil { list-style: none; margin: 0; padding: 0; }
.rp-kpil li { display: grid; grid-template-columns: minmax(0, 1.2fr) auto 92px; grid-template-areas: "n v s" "x x x"; align-items: center; gap: 2px 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.rp-kn { grid-area: n; font-size: 14px; }
.rp-kv { grid-area: v; display: flex; align-items: baseline; gap: 4px; font-size: 16px; font-weight: 500; justify-self: end; }
.rp-ks { grid-area: x; font-size: 13px; color: var(--muted); }
.rp-kx { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.rp-spark { grid-area: s; width: 88px; height: 24px; justify-self: end; }
.rp-spark polyline { fill: none; stroke: var(--faint); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.rp-spark circle { fill: var(--ink); }
.rp-lines { margin: 0; padding-left: 1.2em; }
.rp-lines li { padding: 4px 0; line-height: 1.55; }
.rp-own { margin-left: 8px; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--sel); }
.rp-src { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.rp-src li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 6px 0; }
.rp-src .rp-sk { font-size: 12px; color: var(--muted); min-width: 4.5em; }
.rp-src li.bad { color: var(--muted); }
.rp-why { color: var(--danger); font-size: 13px; }
.rp-hist { list-style: none; margin: 0; padding: 0; }
.rp-hr { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; margin: 0 -8px; border: 0; background: none; color: inherit; font: inherit; text-align: left; border-radius: 8px; cursor: pointer; }
.rp-hr:hover, .rp-hr.on { background: var(--hover); }
.rp-hd { flex: none; width: 4.5em; font-size: 13px; color: var(--muted); }
.rp-hh { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.rp-mlist { list-style: none; margin: 8px 0 0; padding: 0; }
.rp-mlist li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.rp-mn { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; }
.rp-mn .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-warn { margin-bottom: 8px; }
.rp-set { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: end; }
.rp-set .rp-chk { grid-column: 1 / -1; }
.rp input[type="time"] { width: 100%; font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); }
.rp-chk { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; cursor: pointer; }
.rp-chk input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--ink); }
.rp-chk > span { display: flex; flex-direction: column; gap: 2px; }
.rp-form { display: flex; flex-direction: column; gap: 4px; }
.rp-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.rp-fs { border: 0; margin: 14px 0 6px; padding: 0; min-width: 0; }
.rp-fs legend { padding: 0; margin-bottom: 8px; }
.rp-rows { display: flex; flex-direction: column; gap: 8px; }
.rp-row { display: grid; gap: 8px; align-items: center; }
.rp-srow { grid-template-columns: 7.5em minmax(0, 2fr) minmax(0, 1fr) 32px; }
.rp-srow .rp-sfile { grid-column: 2; }
.rp-krow { grid-template-columns: minmax(0, 1.4fr) 4.5em 6em minmax(0, 1.6fr) 7em 32px; }
.rp-prow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; }
.rp-row .box { min-width: 0; width: 100%; }
.rp-addrow { margin-top: 8px; align-self: flex-start; }
.rp-del { margin-left: auto; color: var(--danger); }
@media (max-width: 640px) {
  .rp-cards { grid-template-columns: 1fr; }
  .rp-sum { font-size: 15px; }
  .rp-set, .rp-two { grid-template-columns: 1fr; }
  .rp-srow { grid-template-columns: 6.5em minmax(0, 1fr) 32px; }
  .rp-srow .rp-slabel { grid-column: 1 / 3; }
  .rp-srow .rp-sfile { grid-column: 2; }
  .rp-krow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; }
  .rp-krow .rp-kwhere { grid-column: 1 / 3; }
  .rp-kpil li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n v" "x s"; }
}
.rp-failnote { font-size: 13px; line-height: 1.45; color: var(--danger); }
#rpFailNote { margin-top: 10px; }
/* 仪表盘 without a form: the one-line empty state, what a company watches, the settings button */
.rp-empty { font-size: 15px; line-height: 1.6; color: var(--muted); padding: 24px 0; }
.rp-watch { font-size: 13px; color: var(--muted); line-height: 1.45; }
#rpWatch { margin: -8px 0 18px; }
.rp .rp-set-btn { width: 36px; height: 36px; }
.rp-foot .linkbtn { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: underline; cursor: pointer; }
.rp-set .rp-acts { grid-column: 1 / -1; }
/* 仪表盘, first visit: what the page is, Lark first, the projects with 设为公司, an example card */
.rp-intro { margin-bottom: 22px; }
.rp-intro p { font-size: 15px; line-height: 1.65; }
.rp-step { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.rp-projects { list-style: none; margin: 0; padding: 0; }
.rp-projects li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rp-projects li:last-child { border-bottom: 1px solid var(--line); }
.rp-pn { font-size: 15px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-newco { margin-top: 16px; max-width: 420px; }
.rp-newco .label { display: block; margin-bottom: 6px; }
.rp-newco input { width: 100%; }
.rp-sample { margin-top: 28px; max-width: 420px; opacity: .55; pointer-events: none; user-select: none; }
.rp-sample .rp-card { border-style: dashed; }
.rp-sample .rp-cl { padding: 14px 16px; }
.rp-sbadge { font-size: 12px; font-weight: 600; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--faint); color: var(--muted); }
.rp-tell { display: block; width: 100%; text-align: left; padding: 10px 16px 12px; border: 0; border-top: 1px dashed var(--line); background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; border-radius: 0 0 13px 0; }
.rp-tell:hover { background: var(--hover); }
button#rpWatch.rp-tell { width: auto; padding: 0; margin: -8px 0 18px; border: 0; }
.rp-card { display: flex; flex-direction: column; }
.rp-card > .rp-cl { flex: 1; height: auto; }

/* ---------- 仪表盘 = 每日早报 (briefing.js) ---------- */
.bf .bf-date { display: flex; align-items: center; gap: 4px; margin-top: 6px; min-height: 32px; }
.bf .bf-dn { width: 28px; height: 28px; font-size: 18px; line-height: 1; color: var(--muted); }
.bf .bf-dw { font-size: 13px; color: var(--muted); }
.bf-step { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.bf-st { font-size: 15px; font-weight: 500; }
.bf-none { font-size: 15px; color: var(--muted); padding: 8px 0; }
.bf-err, .bf-failnote { color: var(--danger); }
.bf-failnote { font-size: 13px; margin-bottom: 10px; }
.bf-summary { list-style: none; margin: 0; padding: 16px 18px; background: var(--panel); border-radius: 14px; }
.bf-summary li { font-size: 16px; line-height: 1.6; padding: 2px 0; }
.bf-h { margin: 30px 0 10px; }
.bf-list { margin: 0; padding-left: 1.4em; }
.bf-list li { padding: 7px 0; line-height: 1.5; }
.bf-it { font-weight: 500; }
.bf-sub { display: block; font-size: 13px; color: var(--muted); }
.bf-src { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; font-size: 12px; }
.bf-src a, .bf-src span { color: var(--muted); max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-src a { text-decoration: underline; text-decoration-color: var(--line); }
.bf-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.bf-topic { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.bf-topic h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.bf-topic ul { margin: 0; padding-left: 1.1em; }
.bf-topic li { padding: 4px 0; line-height: 1.5; font-size: 14px; }
.bf-cal { list-style: none; margin: 0; padding: 0; }
.bf-cal li { display: flex; gap: 14px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.bf-time { flex: none; min-width: 7.5em; color: var(--muted); }
.bf-gaps { margin-top: 18px; }
.bf-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.bf-meta { margin-left: auto; }
@media (max-width: 640px) { .bf-topics { grid-template-columns: 1fr; } .bf-meta { margin-left: 0; width: 100%; } }

/* ---------- 仪表盘: the plain overview (overview.js) ---------- */
.ov-h { margin: 28px 0 8px; }
.ov .phead + .state + #ovBody > .ov-h:first-child { margin-top: 0; }
.ov-list { list-style: none; margin: 0; padding: 0; }
.ov-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; margin: 0 -8px; border-radius: 8px; color: inherit; text-decoration: none; }
.ov-row:hover { background: var(--hover); }
.ov-ic { flex: none; width: 16px; height: 16px; color: var(--faint); }
.ov-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ov-t { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-s { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-tag { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ov-tag.waiting { color: var(--warn); font-weight: 500; }
.ov-tag.running { color: var(--ok); }
.ov-quiet { padding: 4px 0 8px; }

/* ---- the bar at the top of a chat or a session (appended): sticky, a hairline under it, as in the
   Claude app. Title (a click renames it), a muted line (project › folder, the computer, status),
   mode and model as small chips, 上级 and ⋯ on the right. No new colours. ---- */
.convhead { position: sticky; top: 0; z-index: 15; background: var(--bg); border-bottom: 1px solid var(--line); }
.convhead[hidden] { display: none; }
.view.chat.is-empty .convhead { display: none; }
.convhead .ch-in { display: flex; align-items: center; gap: 12px; width: 100%; max-width: calc(var(--col) + 48px); margin: 0 auto; padding: 10px 24px 9px; min-width: 0; }
.convhead .ch-text { flex: 1; min-width: 0; }
.convhead .ch-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: 0; line-height: 1.35; min-width: 0; }
.convhead .ch-name { display: block; max-width: 100%; padding: 1px 6px; margin-left: -6px; border-radius: 6px; font: inherit; color: var(--ink); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convhead .ch-name:hover { background: var(--hover); }
.convhead .ch-input { width: 100%; font: inherit; font-size: 15px; font-weight: 600; padding: 1px 6px; margin-left: -6px; border-radius: 6px; background: var(--bg); }
.convhead .ch-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 2px 0 0; padding: 0; border: 0; font-size: 13px; line-height: 1.5; color: var(--muted); min-width: 0; }
.convhead .ch-meta > * { min-width: 0; }
.convhead .ch-where { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.convhead .hdev { display: inline-flex; align-items: center; gap: 5px; padding: 0 7px; height: 20px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); text-decoration: none; max-width: 22ch; }
.convhead .hdev:hover { color: var(--ink); }
.convhead .hdev .ic, .convhead .hcloud { width: 13px; height: 13px; flex: none; color: var(--faint); }
.convhead .hdev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convhead .hchips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.convhead .hchip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--hover); color: var(--muted); font-size: 12px; white-space: nowrap; max-width: 24ch; overflow: hidden; text-overflow: ellipsis; }
.convhead .ch-side { display: flex; align-items: center; gap: 6px; flex: none; }
.convhead .ch-up { font-size: 13px; color: var(--muted); text-decoration: none; max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convhead .ch-up:hover { color: var(--ink); text-decoration: underline; }
.convhead .ch-more { width: 32px; height: 32px; border-radius: 8px; }
.view.page.in-sess .convhead { margin-bottom: 4px; }
@media (max-width: 860px) {
  .convhead { top: 56px; }                          /* under the phone's own top bar */
  .convhead .ch-in { padding: 8px 14px 7px; }
}
@media (max-width: 480px) {
  .convhead .hchips { display: none; }              /* the chips are in ⋯ */
  .convhead .ch-up { max-width: 12ch; }
  .convhead .ch-where { max-width: 20ch; }
}
@media (pointer: coarse) { .convhead .ch-more { width: 44px; height: 44px; } }

/* ---- files of a computer session (appended): file names in answers open from the computer; a
   preview window; the right side shows Files only ---- */
.md .flink { display: inline; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.md .flink code { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.md .flink:hover code { text-decoration-color: var(--ink); }
.fprev { min-width: 0; }
.fprev-path { font-size: 13px; color: var(--muted); margin: 0 0 10px; overflow-wrap: anywhere; }
.fprev-text { max-height: 60vh; overflow: auto; padding: 12px 14px; background: var(--panel); border-radius: 8px; font-family: var(--mono); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.fprev-md { max-height: 60vh; overflow: auto; }
.fprev-scroll { max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.fprev-table { border-collapse: collapse; font-size: 13px; }
.fprev-table th, .fprev-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.fprev-table th { font-weight: 600; background: var(--panel); position: sticky; top: 0; }
.fprev-img { display: block; max-width: 100%; max-height: 60vh; margin: 0 auto; border-radius: 8px; image-rendering: auto; }
.fprev-cut { margin-top: 8px; }
.fchoices { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.fpanel { position: fixed; top: 0; right: 0; bottom: 0; width: 320px; z-index: 18; background: var(--bg); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.fpanel[hidden] { display: none; }
.fpanel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 8px 16px; border-bottom: 1px solid var(--line); }
.fpanel-head .label { margin: 0; }
.fpanel > .ftree { flex: 1; overflow: auto; padding: 6px 8px 16px; }
.ftree { list-style: none; margin: 0; padding: 0; }
.ftree .ftree { padding-left: 14px; }
.ftree .frow { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; padding: 4px 8px; border-radius: 6px; font-size: 13px; line-height: 1.5; color: var(--ink); text-align: left; }
.ftree .frow:hover { background: var(--hover); }
.ftree .frow .ic { width: 14px; height: 14px; flex: none; color: var(--faint); }
.ftree .frow.dir .chev { transform: rotate(-90deg); transition: transform .12s; }
.ftree .frow.dir[aria-expanded="true"] .chev { transform: none; }
.ftree .fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftree .fstate { padding: 4px 8px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ftree .fstate.bad { color: var(--danger); }
@media (min-width: 1100px) { #devSess.files-on { padding-right: 320px; } }
@media (max-width: 1099px) { .fpanel { width: min(360px, 100vw); box-shadow: -10px 0 30px rgba(0, 0, 0, .12); } }
@media (max-width: 860px) { .fpanel { top: 56px; } }        /* under the phone's own top bar */
@media (max-width: 480px) { .fpanel { width: 100vw; border-left: 0; } }
@media (pointer: coarse) { .ftree .frow { min-height: 40px; } }

/* ---- the title menu ▾ (appended): Claude-style, keys on the right, › submenus, ✓ choices ---- */
.convhead .ch-name { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.convhead .ch-tt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convhead .ch-caret { width: 14px; height: 14px; flex: none; color: var(--faint); }
.convhead .ch-name[aria-expanded="true"] { background: var(--hover); }
.menu.pop.tmenu { position: fixed; z-index: 60; min-width: 220px; }
.menu.pop.tmenu > button { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.menu.pop.tmenu .tl2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu.pop.tmenu .tkey, .menu.pop.tmenu .tcheck { flex: none; font: inherit; font-size: 12px; color: var(--faint); min-width: 12px; text-align: right; }
.menu.pop.tmenu .danger .tkey { color: inherit; opacity: .7; }
.menu.pop.tmenu .menu-sep { height: 1px; margin: 4px 6px; background: var(--line); }
/* compact transcript: tool steps and thinking folded away */
.thread.compact .trow, .thread.compact .think { display: none; }

/* ---- 飞书机器人 (appended): the session the app keeps at the top, above every project; a paper
   plane where a computer is; 来自飞书 on the messages that came through it ---- */
.side > .sec-list.pinned { list-style: none; margin: -6px 0 10px; padding: 0; }
.side > .sec-list.pinned[hidden] { display: none; }
.msg.user .from.lark { display: inline-flex; align-items: center; gap: 4px; }
.msg.user .from.lark .ic { width: 12px; height: 12px; color: var(--faint); }

/* ---------- steps fold into one quiet line: under a cloud answer (searches, pages, Lark) and in a computer
   session (a run of tool rows with the words between them); the answer is what the eye lands on ---------- */
.steps { margin: 0 0 12px; }
.steps[hidden] { display: none; }
.steps > summary { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 0; font-size: 13px; color: var(--muted); cursor: pointer; list-style: none; }
.steps > summary::-webkit-details-marker { display: none; }
.steps > summary:hover { color: var(--ink); }
.steps > summary .stl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps > summary .live[hidden] { display: none; }
.steps > summary .ic { width: 14px; height: 14px; flex: none; transition: transform .15s; }
.steps[open] > summary .ic { transform: rotate(180deg); }
.steps .stbody { margin: 6px 0 4px 2px; padding-left: 14px; border-left: 1px solid var(--line); }
.steps.one > summary { display: none; }
.steps.one .stbody { margin: 0; padding: 0; border: 0; }
.steps.dev { margin: 4px 0 20px; }
.steps.dev .stbody > .trow:first-child, .steps.dev .stbody > .narr + .trow { margin-top: 0; }
.steps .narr { margin: 8px 0 10px; }
.steps .narr .mhead { display: none; }
.steps .narr .md { font-size: 13px; line-height: 1.6; color: var(--muted); }
.thread.compact .steps.dev { display: none; }
@media (max-width: 760px) { .steps > summary { min-height: 36px; } }
/* #main is only the skip link's target: never a focus ring (Safari drew it as a blue bar along the sidebar) */
#main:focus, #main:focus-visible { outline: none; }

/* ---- the home of a new chat (appended): our mark above the greeting, centred and quiet, as in the
   Claude app; it fades in, and goes with the greeting once the conversation starts ---- */
.view.chat.is-empty .greet { text-align: center; animation: greet-in .3s ease-out both; }
.greet .greet-mark { display: block; width: 44px; height: 44px; margin: 0 auto 18px; color: var(--ink); }
.view.chat.is-empty .greet .lede { margin-left: auto; margin-right: auto; }     /* its box is narrower than the column */
@keyframes greet-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .view.chat.is-empty .greet { animation: none; } }
@media (max-width: 860px) { .greet .greet-mark { margin-bottom: 14px; } }

/* attachments sit above the person's words (QA-WEB-R1 #21) */
.msg.user .chips.above { padding: 0 0 8px; }
/* a toast with one action (撤销 after archiving) */
.toast.act { display: inline-flex; align-items: center; gap: 14px; pointer-events: auto; }
.toast .toast-act { color: var(--on-ink); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 2px 0; }
/* 等你确认 looks the same everywhere: the warn colour the sidebar uses, no box (QA-WEB-R2 P8) */
.need { color: var(--warn); border: 0; padding: 0; font-weight: 600; }
/* one model: its name as text, nothing to open (QA-WEB-R2 P2); a phone's bar has no room for a name it cannot change */
.selwrap.one::after { display: none; }
.selwrap.one select.plain { pointer-events: none; cursor: default; padding-right: 8px; }
@media (max-width: 560px) { .cbar-r .selwrap.one { display: none; } }
/* light theme contrast (QA-WEB-R2 P1): the small 项目 / 对话 labels and the context meter read at 4.5:1 or more,
   and the coral focus ring at 3:1 or more against the page and the sidebar; the dark theme passes already */
:root:not([data-theme="dark"]) .side-label, :root:not([data-theme="dark"]) .ctx:not(.high) { color: var(--muted); }
:root:not([data-theme="dark"]) :focus-visible { outline-color: #c2603f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .side-label, :root:not([data-theme="light"]) .ctx:not(.high) { color: var(--faint); }
  :root:not([data-theme="light"]) :focus-visible { outline-color: var(--accent); }
}
/* a phone has one bar: the chat's title is in it (app.js syncTop); the chat's header shows only to rename (QA-WEB-R1 #23) */
@media (max-width: 860px) {
  .convhead { display: none; }
  .convhead:has(.ch-input) { display: block; }
  .topbar #topTitle.has-menu { cursor: pointer; border-radius: 8px; padding: 6px 8px; }
  .topbar #topTitle.has-menu span::after { content: " ⌄"; color: var(--muted); }
}
/* a phone's composer row (QA-WEB-R1 #12): the model's name stays readable; the context meter only shows when it is high */
@media (max-width: 420px) {
  .cbar-l .ibtn { width: 36px; }
  .cbar-r .ctx:not(.high) { display: none; }
  .cbar-r .selwrap:not(.one) { flex: none; }
  .cbar-r .selwrap:not(.one) #model { width: auto; max-width: 110px; padding-left: 4px; }
}
/* the command an approval card asks about is in the card; its tool row stays in the page, not on screen (QA-WEB-R2 P7) */
.steps .trow.dup, .steps.dup { display: none; }
/* a phone with more than one model (owner 11-26): the picker gets its own line above the buttons, with the full name;
   the buttons keep their row (the two halves of the bar flow as one row, the send side pushed right) */
@media (max-width: 420px) {
  .cbar:has(.selwrap:not(.one):not([hidden])) { flex-wrap: wrap; row-gap: 0; }
  .cbar:has(.selwrap:not(.one):not([hidden])) > .cbar-l, .cbar:has(.selwrap:not(.one):not([hidden])) > .cbar-r { display: contents; }
  .cbar:has(.selwrap:not(.one):not([hidden])) .selwrap { order: -1; flex: 0 0 100%; }
  .cbar:has(.selwrap:not(.one):not([hidden])) .selwrap select.plain { width: auto; max-width: 100%; height: 30px; }
  .cbar:has(.selwrap:not(.one):not([hidden])) #micBtn, .cbar:has(.selwrap:not(.one):not([hidden])) #dMicBtn { margin-left: auto; }
  .cbar:has(.selwrap:not(.one):not([hidden])) .ctx.high { margin-left: auto; }
  .cbar:has(.selwrap:not(.one):not([hidden])) .ctx.high ~ #micBtn { margin-left: 0; }
}
@media (max-width: 420px) {
  .cbar:has(.selwrap:not(.one):not([hidden])) .selwrap::after { display: none; }
  .cbar:has(.selwrap:not(.one):not([hidden])) .selwrap #model, .cbar:has(.selwrap:not(.one):not([hidden])) .selwrap #dModel {
    width: auto; max-width: 100%; padding: 0 24px 0 6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 3.5l3 3 3-3' fill='none' stroke='%2387867f' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 8px center / 10px 10px;
  }
}

/* ---------- Team (owner 11-26): the main assistant on a quiet card, its sub-agents as a cascading tree under it,
   theirs smaller; everything else folded under 其他对话. Hairlines, one accent (the working dot). ---------- */
.tm-count { margin: -6px 0 18px; font-size: 13px; color: var(--muted); }
.tm-main { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 14px; background: var(--bg); }
.tm-main.empty { padding: 18px; }
.tm-main .tm-mt { font-size: 15px; font-weight: 600; color: var(--ink); }
.tm-mhead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tm-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--panel); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.tm-mname { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.tm-mname:hover .tm-mt { text-decoration: underline; text-underline-offset: 3px; }
.tm-ms { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-ask { display: flex; align-items: flex-end; gap: 8px; margin-top: 14px; }
.tm-ask textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 30vh; resize: vertical; border: 1px solid var(--field-line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; background: var(--bg); }
.tm-ask .tm-go { flex: none; min-height: 44px; }
.tm-off { margin-top: 8px; }
.tm-nosubs { margin-top: 14px; }
.tm-tree { margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.tm-tree, .tm-kids { list-style: none; }
.tm-kids { margin: 0 0 0 15px; padding: 0 0 0 12px; border-left: 1px solid var(--line); }
.tm-kids[hidden] { display: none; }
.tm-node { min-width: 0; }
.tm-row { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 7px 0; border-bottom: 1px solid var(--line); }
.tm-kids .tm-row { border-bottom: 0; padding: 4px 0; }
.tm-fold { flex: none; width: 24px; height: 24px; color: var(--faint); }
.tm-fold .chev { width: 12px; height: 12px; transition: transform .15s; }
.tm-fold[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.tm-fold-gap { flex: none; width: 24px; }
.tm-link { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit; padding: 2px 4px; border-radius: 6px; }
.tm-link:hover { background: var(--hover); }
.tm-t { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-node.d2 .tm-t, .tm-node.d3 .tm-t { font-size: 13px; }
.tm-meta { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 12px; color: var(--muted); }
.tm-skill { color: var(--ink); }
.tm-more { font-size: 13px; color: var(--muted); padding: 4px 0 4px 30px; }
.tm-chip { flex: none; font-size: 12px; line-height: 1.5; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tm-chip.working { color: var(--ink); }
.tm-chip.working::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.tm-chip.needs { color: var(--warn); border-color: currentColor; font-weight: 600; }
.tm-chip.failed { color: var(--bad); border-color: currentColor; }
.tm-other { margin-top: 26px; }
.tm-other > summary { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; color: var(--muted); cursor: pointer; list-style: none; }
.tm-other > summary::-webkit-details-marker { display: none; }
.tm-other > summary:hover { color: var(--ink); }
.tm-other > summary .tm-n { color: var(--faint); }
.tm-other > summary .chev { width: 12px; height: 12px; transform: rotate(-90deg); transition: transform .15s; }
.tm-other[open] > summary .chev { transform: none; }
.tm-otherbody { margin-top: 6px; }
@media (max-width: 560px) {
  .tm-main { padding: 14px 12px 12px; }
  .tm-kids { margin-left: 10px; padding-left: 8px; }
  .tm-ask { flex-direction: column; align-items: stretch; }
}

/* ---------- Team's chat: the right sidebar, a mirror of the left one (owner 11-26: right tab should be just like left
   tab, full height): the same background, hairline (on its inner edge), padding, type and head; the tree sits between
   the two. Its edge is the shared .sidepane-grip (LF.sidePanel); folded, a button at the top right brings it back; a phone
   gets a drawer from the right. ---------- */
.rside { position: fixed; top: 0; right: 0; bottom: 0; width: var(--rside, 360px); z-index: 24; display: flex; flex-direction: column; min-height: 0;
  background: var(--side-bg); border-left: 1px solid var(--line); padding: 14px 10px 10px; font-size: 14px; line-height: 1.5; letter-spacing: 0; }
.rside[hidden] { display: none; }
.app.rside-on .main { margin-right: var(--rside, 360px); }
.rside-head { gap: 6px; min-width: 0; }
.rside-lead { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1; }
.rside-acts { display: flex; align-items: center; gap: 4px; flex: none; }
.rside .ibtn { width: 28px; height: 28px; border-radius: 8px; }
.rside .ibtn .ic { width: 16px; height: 16px; }
.ic.flip { transform: scaleX(-1); }
.tm-pback[hidden] { display: none; }
.tm-ptitle { min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-pfull { font-size: 13px; white-space: nowrap; }
.tm-plog { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px 10px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.6; scrollbar-width: thin; }
.tm-pmsg.user { align-self: flex-end; max-width: 88%; }
.tm-pmsg.user .bubble { background: var(--bg); padding: 6px 11px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tm-pmsg.bot .md { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.tm-pmsg.bot .md > :first-child { margin-top: 0; }
.tm-psteps, .tm-pnote { font-size: 13px; color: var(--muted); }
.tm-pnote.bad { color: var(--bad); }
.tm-pneeds { font-size: 13px; font-weight: 600; color: var(--warn); text-decoration: none; }
.tm-pneeds:hover { text-decoration: underline; }
.tm-pwhy { padding: 0 8px 6px; }
.tm-pwhy[hidden] { display: none; }
.tm-pform { display: flex; align-items: flex-end; gap: 8px; padding: 10px 0 0; border-top: 1px solid var(--line); }
.tm-pform textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 160px; resize: none; border: 1px solid var(--field-line); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 14px; background: var(--bg); }
.tm-pform .tm-psend { flex: none; }
.tm-main.on, .tm-link.on { background: var(--sel); }
.tm-main.on { border-color: var(--field-line); }
.tm-phd { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rside-open[hidden] { display: none; }
@media (max-width: 860px) {
  .rside { width: min(86vw, 360px); z-index: 40; transform: translateX(101%); transition: transform .22s ease; visibility: hidden; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .rside.open { transform: none; visibility: visible; }
  .rside-resize, .rside-show { display: none !important; }
  .app.rside-on .main { margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) { .rside { transition: none; } }

/* ---------- Team, layout C (owner 11-26: 「C」): one compact indented tree over the whole width. 主Agent on top with the
   counts; each level indented on a thin guide line; a row: fold, title, skill (muted), the state and yuan at the right
   edge, ✕ on hover; deeper rows smaller and quieter; the open row in the sidebar's --sel. A phone: the same tree. ---------- */
.view.page.ov.tm2-page { padding: 10px clamp(10px, 1.6vw, 20px) 80px; }
.app.sidepane-left-off .view.page.ov.tm2-page { padding-top: 52px; }     /* the left sidebar folded: its buttons float top left */
.tm2-page > .state:empty { display: none; }
.tm2-list, .tm2-kids { list-style: none; margin: 0; padding: 0; }
.tm2-kids { margin-left: 13px; padding-left: 10px; border-left: 1px solid var(--line); }
.tm2-kids.top { margin-top: 2px; }
.tm2-r { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 34px; padding: 3px 8px 3px 2px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink); }
.tm2-r:hover { background: var(--hover); }
.tm2-r.on { background: var(--sel); }
.tm2-r:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tm2-r.root { min-height: 40px; font-size: 15px; }
.tm2-r.root .tm2-t { font-weight: 600; flex: none; }
.tm2-r.soon { cursor: default; color: var(--muted); }
.tm2-r.soon:hover { background: none; }
.tm2-n.d2 > .tm2-r, .tm2-n.d3 > .tm2-r { min-height: 30px; font-size: 13px; }
.tm2-n.d2 > .tm2-r .tm2-t, .tm2-n.d3 > .tm2-r .tm2-t { color: var(--muted); }
.tm2-tog { flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: none; color: var(--faint); cursor: pointer; padding: 0; }
.tm2-tog:hover { color: var(--ink); background: var(--hover); }
.tm2-tog.gap { cursor: default; background: none; }
.tm2-tog .chev { width: 12px; height: 12px; transition: transform .15s; }
.tm2-tog[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.tm2-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm2-sk { flex: none; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--faint); }
.tm2-count { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.tm2-gap { flex: 1; min-width: 8px; }
.tm2-st { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tm2-st.working { color: var(--ink); }
.tm2-st.working::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.tm2-st.needs { color: var(--warn); font-weight: 600; }
.tm2-st.failed { color: var(--bad); }
.tm2-y { flex: none; min-width: 46px; text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tm2-x { flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: none; color: var(--faint); cursor: pointer; padding: 0; opacity: 0; }
.tm2-x .ic { width: 13px; height: 13px; }
.tm2-r:hover .tm2-x, .tm2-r:focus-within .tm2-x, .tm2-x:focus-visible { opacity: 1; }
.tm2-x:hover { color: var(--danger); background: var(--hover); }
@media (hover: none) { .tm2-x { opacity: .7; } }
.tm2-clear { flex: none; border: 0; background: none; padding: 2px 6px; border-radius: 6px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.tm2-clear:hover { color: var(--ink); background: var(--hover); }
.tm2-hint { margin: 2px 0 6px 34px; }
.tm2-more { font-size: 13px; color: var(--muted); padding: 4px 0 4px 34px; }
.tm-meta .tm-q { color: var(--warn); flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) {
  .view.page.ov.tm2-page { padding: 8px 10px 80px; }
  .rside-open { flex: none; }
  .tm2-kids { margin-left: 11px; padding-left: 6px; }
  .tm2-sk { display: none; }
}

/* ---------- side panels (app.js sidePanel; owner 11-26: 网页上能 drag, Team's chat 「just like left tab」): the
   left sidebar and any panel on the right. .sidepane (+ .right), its handle .sidepane-grip on the inner edge, .is-off
   folded, .sp-drawer.open the phone drawer. The hairline is Team's .tm-resize look. ---------- */
:where(.sidepane) { position: relative; }
.sidepane-grip { display: none; }
html.is-resizing, html.is-resizing * { cursor: col-resize !important; -webkit-user-select: none !important; user-select: none !important; }
@media (min-width: 861px) {
  /* -4px: centred on the panel's 1px border */
  .sidepane-grip { display: block; position: absolute; top: 0; bottom: 0; right: -4px; width: 6px; z-index: 25; cursor: col-resize; touch-action: none; outline: none; -webkit-tap-highlight-color: transparent; }
  .sidepane.right > .sidepane-grip { right: auto; left: -4px; }
  .sidepane-grip::after { content: ""; position: absolute; top: 0; bottom: 0; left: 2px; width: 2px; background: transparent; transition: background .12s; }
  .sidepane-grip:hover::after, .sidepane-grip.dragging::after { background: var(--field-line); }
  .sidepane-grip:focus-visible::after { background: var(--accent); }
  .sidepane.is-off { display: none !important; }
  /* the left sidebar folded: the main area is the one column; the menu button (and New chat) float top left */
  .app.sidepane-left-off { grid-template-columns: minmax(0, 1fr); }
  .app.sidepane-left-off .topbar { display: flex; position: fixed; top: 8px; left: 10px; z-index: 30; gap: 2px; height: auto; padding: 0; background: transparent; border: 0; }
  .app.sidepane-left-off .topbar #topTitle { display: none; }
  .app.sidepane-left-off .convhead .ch-in { padding-left: max(24px, calc(104px - (100vw - var(--col) - 48px) / 2)); }
}
@media (min-width: 861px) and (pointer: coarse) {
  /* a finger needs more than 6 px (an iPad with the page wide) */
  .sidepane-grip { width: 18px; right: -10px; }
  .sidepane.right > .sidepane-grip { left: -10px; }
  .sidepane-grip::after { left: 8px; }
}
@media (max-width: 860px) {
  /* a right panel on a phone: a drawer from the right, the mirror of the sidebar's */
  .sidepane.right.sp-drawer { position: fixed; right: 0; left: auto; top: 0; bottom: 0; width: min(86vw, 360px); height: auto; z-index: 40; transform: translateX(101%); transition: transform .22s ease; visibility: hidden; background: var(--bg); border-left: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .sidepane.right.sp-drawer.open { transform: none; visibility: visible; }
}
@media (max-width: 860px) { .not-phone { display: none !important; } }

/* the chat sidebar on LF.sidePanel: the left sidebar's look kept on a phone too (its drawer), and the button that
   brings it back sits at the end of Team's top line: the panel icon alone on a computer, 对话 beside it on a phone */
.rside.sidepane.right.sp-drawer { background: var(--side-bg); }
.rside-open .ic { width: 16px; height: 16px; }
@media (min-width: 861px) {
  .rside-open { width: 28px; height: 28px; padding: 0; justify-content: center; border-color: transparent; background: none; }
  .rside-open:hover { background: var(--hover); }
  .rside-open > span { display: none; }
}

/* ---------- Team's chat sidebar: tabs (owner 11-26: 在chat那里开好几个chat的tabs), ＋ new chat, and the session view itself
   docked in it (LF.dockSession; owner: team chat should have all functions). Quiet: hairlines, the sidebar's colours. ---------- */
.rside-head { gap: 4px; padding: 0 2px 0 4px; }
.ts-tabs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.ts-tabs::-webkit-scrollbar { display: none; }
.ts-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 170px; height: 28px; padding: 0 6px 0 9px; border-radius: 7px; font-size: 13px; color: var(--muted); cursor: pointer; }
.ts-tab:hover { background: var(--hover); color: var(--ink); }
.ts-tab.on { background: var(--sel); color: var(--ink); }
.ts-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ts-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.ts-dot.working { background: var(--accent); }
.ts-dot.needs { background: var(--warn); }
.ts-dot.done { background: var(--ok); }
.ts-dot.failed { background: var(--bad); }
.ts-x { flex: none; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 0; border-radius: 5px; background: none; color: var(--faint); cursor: pointer; opacity: 0; }
.ts-x .ic { width: 11px; height: 11px; }
.ts-tab:hover .ts-x, .ts-tab.on .ts-x, .ts-x:focus-visible { opacity: 1; }
.ts-x:hover { color: var(--ink); background: var(--hover); }
.ts-pick { flex: 1; min-width: 0; height: 32px; font-size: 14px; }
.rside-dock { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; margin: 0 -10px -10px; border-top: 1px solid var(--line); }
.rside-dock[hidden] { display: none; }
.rside-dock > .sess { flex: 1 0 auto; min-height: 100%; }
.rside-dock .convhead, .rside-dock .stage { background: var(--side-bg); }
.rside-dock .convhead .ch-in { max-width: none; padding: 8px 14px 7px; }
.app.sidepane-left-off .rside-dock .convhead .ch-in { padding-left: 14px; }
.rside-dock .thread { max-width: none; padding: 18px 14px 14px; }
.rside-dock .stage { max-width: none; padding: 8px 10px 10px; }
.rside-dock .fpanel { position: absolute; inset: 0 0 0 auto; width: min(100%, 300px); z-index: 16; }
.rside-dock .dlog .md { font-size: 14px; }
.rside-new { display: flex; flex-direction: column; gap: 10px; padding: 14px 4px 0; border-top: 1px solid var(--line); }
.rside-new[hidden] { display: none; }
.rside-new textarea { width: 100%; min-height: 92px; resize: vertical; border: 1px solid var(--field-line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; background: var(--bg); color: var(--ink); }
.rside-new-go { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@media (hover: none) { .ts-x { opacity: .7; } }

/* ---------- Team, layout B (owner 11-26: 我想要B那样的 instead of C): a left-to-right tree on a computer. Nested flex:
   a node is its box, then a column of its children, so a parent sits centred on what is under it; the elbow lines are
   borders (the column's stub, each child's vertical part and tick). A phone keeps the indented tree. ---------- */
.lr-page { display: flex; flex-direction: column; min-width: 0; }
.lr-bar { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 4px 6px; }
.lr-hint { margin: 0 4px 8px; }
.lr-wrap { overflow: auto; padding: 10px 20px 28px 4px; }
.lr, .lr-kids { list-style: none; margin: 0; padding: 0; }
.lr { display: inline-flex; flex-direction: column; min-width: max-content; }
.lr-n { display: flex; align-items: center; }
.lr-kids { display: flex; flex-direction: column; position: relative; padding-left: 30px; }
.lr-kids::before { content: ""; position: absolute; left: 0; top: 50%; width: 30px; border-top: 1px solid var(--field-line); }
.lr-kids > .lr-n { position: relative; padding: 5px 0 5px 18px; }
.lr-kids > .lr-n::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid var(--field-line); }
.lr-kids > .lr-n:first-child::before { top: 50%; }
.lr-kids > .lr-n:last-child::before { bottom: 50%; }
.lr-kids > .lr-n:only-child::before { display: none; }
.lr-kids > .lr-n::after { content: ""; position: absolute; left: 0; top: 50%; width: 18px; border-top: 1px solid var(--field-line); }
.lr-box { position: relative; flex: none; width: 150px; box-sizing: border-box; padding: 7px 12px 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); cursor: pointer; }
.lr-box:hover { border-color: var(--faint-line); }
.lr-box:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lr-box.on { background: var(--sel); border-color: var(--faint); }
.lr-box.st-needs { border-color: var(--warn); }
.lr-box.root { background: var(--side-bg); }
.lr-box.root .lr-name { font-weight: 600; }
.lr-box.soon { cursor: default; border-style: dashed; width: 190px; }
.lr-name { display: block; padding-right: 12px; font-size: 13px; line-height: 1.35; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-st { display: block; font-size: 12px; line-height: 1.4; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lr-st.working::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 5px; vertical-align: 1px; }
.lr-st.needs { color: var(--warn); font-weight: 600; }
.lr-st.failed { color: var(--bad); }
.lr-tog { position: absolute; right: -11px; top: 50%; transform: translateY(-50%); z-index: 1; min-width: 20px; height: 20px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--field-line); border-radius: 999px; background: var(--bg); color: var(--muted); font: inherit; font-size: 11px; line-height: 1; cursor: pointer; }
.lr-tog[aria-expanded="true"] { padding: 0; width: 20px; }
.lr-tog .chev { width: 10px; height: 10px; transform: rotate(90deg); }
.lr-tog:hover { color: var(--ink); border-color: var(--faint); }
.lr-tog:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lr-x { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 0; border-radius: 5px; background: none; color: var(--faint); cursor: pointer; opacity: 0; }
.lr-x .ic { width: 11px; height: 11px; }
.lr-box:hover .lr-x, .lr-box:focus-within .lr-x, .lr-x:focus-visible { opacity: 1; }
.lr-x:hover { color: var(--danger); background: var(--hover); }
@media (hover: none) { .lr-x { opacity: .7; } }
.lr-more { padding-left: 18px; }

/* ---------- Team's actions (agent 84b39f3) and boxes that show the whole name: a box is as wide as its name needs
   (148-320 px; the root at least 164), then the name takes two lines; siblings share the widest (overview.js,
   evenBoxes); + 子Agent and ⋯ overlay the box's top right on hover, focus or when open, always on touch. The lines
   are the agent's: --faint at 55%. ---------- */
.lr { --tl: color-mix(in srgb, var(--faint) 55%, transparent); }
.lr-kids::before, .lr-kids > .lr-n::after { border-top-color: var(--tl); }
.lr-kids > .lr-n::before { border-left-color: var(--tl); }
.lr-box { width: auto; min-width: 148px; max-width: 320px; padding-right: 10px; }
.lr-box.root { min-width: 164px; }
.lr-box.on { background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lr-box.root.on { background: var(--side-bg); }
.lr-name { padding-right: 0; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.lr-acts, .tm2-acts { display: inline-flex; align-items: center; gap: 1px; }
.lr-acts { position: absolute; top: 3px; right: 3px; padding: 1px; border-radius: 7px; background: var(--pop); box-shadow: 0 0 0 1px var(--line); opacity: 0; pointer-events: none; }
.lr-box:hover .lr-acts, .lr-box:focus-within .lr-acts, .lr-box.on .lr-acts { opacity: 1; pointer-events: auto; }
.tm-act { flex: none; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; }
.tm-act .ic { width: 13px; height: 13px; }
.tm-act:hover { color: var(--ink); background: var(--hover); }
.tm-act:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.tm2-acts { opacity: 0; }
.tm2-r:hover .tm2-acts, .tm2-r:focus-within .tm2-acts, .tm2-r.on .tm2-acts { opacity: 1; }
@media (hover: none) { .lr-acts, .tm2-acts { opacity: 1; pointer-events: auto; } }
.tm-menu { position: fixed; left: 0; top: 0; right: auto; bottom: auto; width: max-content; min-width: 150px; z-index: 60; }
.tm-dform .field { margin-bottom: 4px; }
.tm-dform select { width: 100%; height: 38px; border: 1px solid var(--field-line); border-radius: 8px; padding: 0 10px; background: var(--bg); color: var(--ink); font: inherit; }

/* ---------- Team as three columns, 文件夹 | 结构 | 聊天 (owner 11-26; agent 14e24da): the folder narrow on the left
   (--tf-w, 240 px; 180 px to 45%), closed to nothing with its toggle; 结构 beside it; each with a 40 px head. A phone
   stacks the folder (at most 38% of the height) above the tree. ---------- */
.view.page.ov.tm2-page { padding: 0; height: 100%; display: flex; flex-direction: column; min-height: 0; }
.app.sidepane-left-off .view.page.ov.tm2-page { padding-top: 0; }
.app.sidepane-left-off .tsplit > :first-child .thead, .app.sidepane-left-off .tsplit.fclosed .tmid .thead { padding-left: 92px; }   /* the folded sidebar's buttons */
.tsplit { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--tf-w, 240px) minmax(0, 1fr); position: relative; }
.tsplit.fclosed { grid-template-columns: minmax(0, 1fr); }
.tsplit.fclosed .tfolder, .tsplit.fclosed .tf-grip { display: none; }
.tfolder { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.tmid { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.thead { flex: none; display: flex; align-items: center; gap: 6px; height: 40px; box-sizing: border-box; padding: 0 8px 0 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.thead-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink); }
.thead-i { display: inline-flex; color: var(--muted); }
.thead-i .ic, .thead-b .ic { width: 15px; height: 15px; }
.thead .tm2-count { font-size: 12px; }
.thead-b { width: 28px; height: 28px; border-radius: 7px; }
.fopen { display: none; }
.tsplit.fclosed .fopen { display: inline-flex; }
.tfiles { flex: 1; min-height: 0; overflow: auto; padding: 6px 6px 24px; }
.tfiles .frow { padding: 3px 8px; }
.tmid > .state:empty { display: none; }
.tmid > .state { padding: 8px 14px 0; }
.ttree { flex: 1; min-height: 0; overflow: auto; padding: 12px 14px 40px; }
.ttree .lr-wrap { overflow: visible; padding: 0 20px 0 0; }
.tf-grip { position: absolute; top: 0; bottom: 0; left: calc(var(--tf-w, 240px) - 3px); width: 6px; z-index: 5; cursor: col-resize; touch-action: none; outline: none; }
.tf-grip::after { content: ""; position: absolute; top: 0; bottom: 0; left: 2px; width: 2px; background: transparent; transition: background .12s; }
.tf-grip:hover::after, .tf-grip.dragging::after { background: var(--field-line); }
.tf-grip:focus-visible::after { background: var(--accent); }
@media (max-width: 860px) {
  .view.page.ov.tm2-page { height: auto; min-height: 100%; }
  .tsplit, .tsplit.fclosed { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .tfolder { max-height: 38vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .tf-grip { display: none; }
  .ttree { padding: 8px 10px 80px; overflow: visible; }
}
/* the agent's box fix (fda07c4): as wide as the name, 148-320 px, two lines; the actions fade in over a gradient */
.lr-box { width: max-content; }
.lr-name { overflow-wrap: anywhere; word-break: normal; }
.lr-acts { padding-left: 16px; box-shadow: none; background: linear-gradient(to right, transparent, var(--bg) 14px); }
.lr-box.root .lr-acts, .lr-box.on.root .lr-acts { background: linear-gradient(to right, transparent, var(--side-bg) 14px); }
/* starters in 主Agent's empty chat: a click puts the words in the box (owner 11-26) */
.starters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px 8px; }
.starters[hidden] { display: none; }
.starters .chip { min-height: 30px; padding: 4px 11px; border-radius: 999px; background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.starters .chip:hover { background: var(--hover); border-color: var(--field-line); }
/* a box's line for the SDK's own sub-tasks running now (agent 1ffa8cb) */
.lr-subs { display: block; font-size: 11px; line-height: 1.4; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-dev { height: 26px; font-size: 13px; max-width: 160px; }
.tm-dev[hidden] { display: none; }

/* the mark in the collapsed sidebar's floating bar, left of nothing else (owner 11-26: 左上角为什么没有 logo); a phone's
   bar keeps its title alone */
.topbar #topTitle .top-mark { display: none; }
@media (min-width: 861px) {
  .app.sidepane-left-off .topbar #topTitle { display: inline-flex; align-items: center; order: -1; padding: 0 6px; }
  .app.sidepane-left-off .topbar #topTitle > span { display: none; }
  .app.sidepane-left-off .topbar #topTitle .top-mark { display: block; width: 18px; height: 18px; }
}
/* where you are (owner 11-26: 你要让用户知道你在哪): the current nav item or open row, filled and stronger, clear in light */
:root { --here: #e2dfd3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --here: #34332f; } }
:root[data-theme="dark"] { --here: #34332f; }
.navrow[aria-current="page"], .row.on .open, .row.on .open:hover { background: var(--here); font-weight: 600; color: var(--ink); }

/* ---------- LF Agent's 云 | 电脑 (owner 11-26): a large two-way switch at the very top, the one chosen obvious; a plain
   line under it says they are two separate folders ---------- */
.side-top { flex: none; padding: 12px 14px 8px; border-bottom: 1px solid var(--line); }
.app.sidepane-left-off .side-top { padding-left: 92px; }
.side-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 560px; border: 1px solid var(--field-line); border-radius: 12px; padding: 3px; background: var(--side-bg); }
.side-pc { display: flex; flex-direction: column; min-width: 0; }
.side-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 52px; padding: 6px 10px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: inherit; cursor: pointer; min-width: 0; width: 100%; }
.side-opt:hover { color: var(--ink); }
.side-opt.on { background: var(--bg); color: var(--ink); box-shadow: 0 0 0 1.5px var(--accent), 0 1px 3px rgba(20, 20, 19, .08); }
.side-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.side-name { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; }
.side-ic { font-size: 17px; line-height: 1; }
.side-sub { max-width: 100%; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-pc .tm-dev { align-self: center; margin-top: 3px; }
.side-note { margin: 8px 2px 0; font-size: 13px; color: var(--muted); }
@media (max-width: 860px) {
  .side-top { padding: 10px 10px 8px; }
  .side-switch { max-width: none; }
  .side-opt { min-height: 46px; }
}
.app.sidepane-left-off .tsplit > :first-child .thead, .app.sidepane-left-off .tsplit.fclosed .tmid .thead { padding-left: 12px; }   /* the switch row above leaves the room */

/* ---------- one box per turn for what it did (owner 11-26; agent f410d7d): a hairline box, folded, the summary line
   with a red 「N 个失败」, then the latest step muted (a spinner while it works); open: one line a step, a step's
   command and output in a limited scroll ---------- */
.steps { border: 1px solid var(--line); border-radius: 10px; margin: 6px 0 14px; }
.steps > summary.stepsum { display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 100%; box-sizing: border-box; padding: 7px 12px;
  font-size: 13px; color: var(--muted); cursor: pointer; list-style: none; }
.steps > summary.stepsum:hover { color: var(--ink); }
.steps:hover { border-color: var(--field-line); }
.stepsum .sline { display: flex; align-items: center; gap: 6px; min-width: 0; }
.stepsum .scaret { flex: none; width: 10px; color: var(--faint); font-size: 11px; }
.stepsum .stl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepsum .sbad { flex: none; margin-left: 4px; color: var(--bad); }
.stepsum .sbad[hidden], .stepsum .slast[hidden] { display: none; }
.stepsum .slast { display: flex; align-items: center; gap: 6px; padding-left: 16px; min-width: 0; color: var(--faint); font-size: 13px; }
.stepsum .slast-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps[open] > .stepsum .slast { display: none; }
.stepsum .spin { width: 10px; height: 10px; flex: none; box-sizing: border-box; border: 1.5px solid var(--faint); border-top-color: transparent; border-radius: 50%; animation: lfspin .9s linear infinite; }
.stepsum .spin[hidden] { display: none; }
@keyframes lfspin { to { transform: rotate(360deg); } }
.steps .stbody { margin: 0; padding: 2px 12px 8px; border-left: 0; border-top: 1px solid var(--line); }
.steps.dev { margin: 6px 0 20px; }
.steps .trow .tfull { max-height: 15.5em; }
@media (prefers-reduced-motion: reduce) { .stepsum .spin { animation: none; } }

/* LF Agent's middle column: 结构 | the open files, each a tab; a file's preview fills the column */
.mtabs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.mtabs::-webkit-scrollbar { display: none; }
.mtab { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 200px; height: 28px; padding: 0 8px; border-radius: 7px; font-size: 13px; color: var(--muted); cursor: pointer; }
.mtab .ic { width: 13px; height: 13px; flex: none; color: var(--faint); }
.mtab:hover { background: var(--hover); color: var(--ink); }
.mtab.on { background: var(--sel); color: var(--ink); font-weight: 600; }
.mtab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mtab:hover .ts-x, .mtab.on .ts-x { opacity: 1; }
.tmid .thead .tm2-count[hidden], #tmClearSlot[hidden] { display: none; }
.tview { flex: 1; min-height: 0; overflow: auto; padding: 14px 18px 40px; }
.tview[hidden] { display: none; }
.tview .fprev-img { max-width: 100%; height: auto; }
.tfiles .frow.on { background: var(--sel); font-weight: 600; }

/* 云's 飞书机器人, still being built: greyed, a small 开发中 tag */
.devtag { flex: none; margin-left: 6px; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; line-height: 1.6; color: var(--faint); font-weight: 400; }
.row .lark-dev { color: var(--faint); }
.row .lark-dev .ic { color: var(--faint); }
.lark-dev-box { margin: 0 0 12px; }
.lark-dev-b { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px dashed var(--field-line); border-radius: 9px; background: none; color: var(--faint); font: inherit; font-size: 13px; cursor: pointer; }
.lark-dev-b .ic { width: 14px; height: 14px; }
.lark-dev-line { margin: 6px 2px 0; }
.lark-dev-line[hidden] { display: none; }
/* 其他对话 (owner 11-26): the folders' groups, then the loose chats with no head of their own */
.loose-sec { margin-top: 4px; }

/* 云's state, from the server (cloudd): 休息中 / 启动中… / 排队中 / 空间已满 / 启动失败 再试一次 */
.cloud-line { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.cloud-line .spin { width: 11px; height: 11px; flex: none; box-sizing: border-box; border: 1.5px solid var(--faint); border-top-color: transparent; border-radius: 50%; animation: lfspin .9s linear infinite; }
.cloud-line .link { font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .cloud-line .spin { animation: none; } }

.ftree .fstate .fretry { margin-left: 8px; font-size: 13px; }

/* a session's model picker: the full name, as wide as the chat's own (owner 11-26: 「DeepSeek V4.1 Flash 1017 · 森湖 LFGPU」) */
#dModel { max-width: 230px; text-overflow: ellipsis; }
.cbar-r #dModelWrap { min-width: 0; }

/* A picture in the file preview (app.js zoomView): its own pane that scrolls, the picture at the pane's width until a
   click takes it to 100%; − / + and a ctrl/⌘ wheel or a pinch zoom, a drag pans. */
.fzoom { min-width: 0; }
.fzoom-bar { display: flex; align-items: center; justify-content: flex-end; gap: 2px; margin: 0 0 6px; }
.fzoom-b, .fzoom-pct { height: 26px; padding: 0 8px; border-radius: 7px; color: var(--muted); font-size: 13px; line-height: 26px; font-variant-numeric: tabular-nums; }
.fzoom-b { width: 26px; padding: 0; font-size: 16px; }
.fzoom-b:hover:not(:disabled), .fzoom-pct:hover { background: var(--hover); color: var(--ink); }
.fzoom-b:disabled { opacity: .35; }
.fzoom-pane { overflow: auto; max-height: calc(100dvh - 250px); min-height: 60px; border-radius: 8px; background: var(--panel); touch-action: pan-x pan-y; overscroll-behavior: contain; }
.fzoom-pane:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fzoom .fzoom-img { display: block; max-width: none; max-height: none; height: auto; margin: 0 auto; border-radius: 0; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.fzoom.zoomable .fzoom-pane { cursor: zoom-in; }
.fzoom.zoomed .fzoom-pane { cursor: grab; }
.fzoom.panning .fzoom-pane { cursor: grabbing; }
.tview .fzoom-pane { max-height: max(180px, calc(100dvh - 360px)); }     /* LF Agent's middle column: the column itself need not scroll */
@media (max-width: 720px) { .fzoom-pane { max-height: calc(100dvh - 230px); } .fzoom-b, .fzoom-pct { height: 32px; line-height: 32px; } .fzoom-b { width: 32px; } }

/* The pictures an answer names, under it (app.js inlinePics): at most 360 px tall, a click opens the file */
.pics { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin: 10px 0 2px; }
.pic { display: block; max-width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); cursor: zoom-in; line-height: 0; }
.pic img { display: block; max-width: 100%; max-height: 360px; width: auto; height: auto; }
.pic.wait { display: inline-flex; align-items: center; justify-content: center; width: 160px; height: 100px; cursor: default; }
.pic .spin { width: 12px; height: 12px; box-sizing: border-box; border: 1.5px solid var(--faint); border-top-color: transparent; border-radius: 50%; animation: lfspin .9s linear infinite; }
.pic:hover { border-color: var(--field-line); }
.pic:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.steps .pics { display: none; }                 /* narration tucked into the work box does not show them */
@media (prefers-reduced-motion: reduce) { .pic .spin { animation: none; } }

/* a step's picture, in its opened row (app.js stepPic) */
.trow .tpic { margin: 0 0 12px; padding-left: 16px; border-left: 1px solid var(--line); }
.trow .tpic .pic img { max-height: 360px; }
/* ---------- Agent Flow (owner 11-26: 「+ still not active in web？」; agent 1e2dee4, 2454341) ----------
   the add slot: a dashed, box-sized 「+ 加一个 Agent」 after an agent's children (the same elbow line as a child), or to the
   right of a box with none; the name is typed in it. Always there for 主Agent and the open box, on hover or focus for the
   others, always on a touch screen. Kids are marked k1 / kz, as the slot may follow the last one. */
.lr-kids > .lr-n.k1::before { top: 50%; }
.lr-kids > .lr-n.kz::before { bottom: 50%; }
.lr-kids > .lr-n.k1.kz::before { display: none; }
.lr-kids > .lr-slot { position: relative; display: flex; align-items: center; padding: 5px 0 5px 18px; opacity: 0; transition: opacity .15s .25s; }
.lr-kids > .lr-slot::before { content: ""; position: absolute; left: 0; top: calc(-1 * var(--up, 30px)); bottom: 50%; border-left: 1px solid var(--tl); }
.lr-kids > .lr-slot::after { content: ""; position: absolute; left: 0; top: 50%; width: 18px; border-top: 1px solid var(--tl); }
.lr-kids > .lr-slot.on, .lr-kids > .lr-slot.typing, .lr-kids > .lr-slot:hover, .lr-kids > .lr-slot:focus-within, .lr-kids.solo > .lr-slot,
.lr-box:hover ~ .lr-kids > .lr-slot, .lr-box:focus-visible ~ .lr-kids > .lr-slot { opacity: 1; transition-delay: 0s; }
/* a box with no children: its slot to the right takes no room until it shows (it is no taller than the box: nothing moves) */
.lr-kids.solo { display: none; }
.lr-kids.solo.on, .lr-n:hover > .lr-kids.solo, .lr-n:focus-within > .lr-kids.solo { display: flex; }
.lr-kids.solo > .lr-slot { padding-top: 0; padding-bottom: 0; }
.lr-kids.solo > .lr-slot::before { display: none; }
@media (hover: none) { .lr-kids > .lr-slot { opacity: 1; } .lr-kids.solo { display: flex; } }
.tm-addslot { display: flex; align-items: center; justify-content: center; gap: 7px; box-sizing: border-box; min-width: 148px; min-height: 46px; margin: 0; padding: 0 10px;
  border: 1px dashed color-mix(in srgb, var(--faint) 60%, transparent); border-radius: 9px; background: none; color: var(--faint); font: inherit; font-size: 13px;
  text-align: left; cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.tadd-p { flex: none; font-size: 15px; line-height: 1; }
.tadd-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.tm-addslot:hover { border-color: var(--accent); color: var(--ink); background: var(--hover); }
button.tm-addslot:active { background: var(--sel); }
button.tm-addslot:focus { outline: none; }
button.tm-addslot:focus-visible { border-style: solid; border-color: var(--accent); color: var(--ink); }
.tm-addslot.edit { justify-content: flex-start; border-style: solid; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--bg); color: var(--ink); cursor: text; }
.tm-addslot input { flex: 1; min-width: 0; width: 0; border: 0; outline: 0; padding: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; }
.tm-addslot input:disabled { color: var(--muted); }
/* on a phone (the indented tree): a row, for 主Agent and the open row only */
.tm2-slot { list-style: none; padding: 2px 0; }
.tm2-slot .tm-addslot { width: 100%; min-width: 0; min-height: 36px; justify-content: flex-start; }
/* a temporary agent: a lighter box (dashed is the add slot's look) */
.lr-box.temp { border-color: color-mix(in srgb, var(--line) 55%, transparent); }
.lr-box.temp .lr-name { color: var(--muted); }
/* the middle column's first tab: the Agent Flow pill; 「← Agent Flow」 while a file shows */
.mtab.tflow { height: 30px; padding: 0 11px 0 9px; margin: 0 6px 0 1px; border: 1px solid var(--faint); border-radius: 999px;
  background: var(--side-bg); color: var(--ink); font-weight: 500; }      /* not pinned: this row also holds the counts, so tabs would slide under it */
.mtab.tflow:hover { background: var(--sel); border-color: var(--muted); color: var(--ink); }
.mtab.tflow:active { transform: translateY(1px); }
.mtab.tflow.on { background: var(--side-bg); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); font-weight: 600; }
.tflow-i { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.tflow-back { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) {   /* a phone: next to the counts there is room for its icon only; with a file open (no counts) it reads ← Agent Flow */
  .mtab.tflow.on { padding: 0 9px; }
  .mtab.tflow.on .ts-t { display: none; }
}

/* ---------- LF Agent: the 主Agent's rail (owner 11-26, pick B; the agent's class names: .tflowv .trail .trail-h .trail-t
   .trail-c .trail-l .tchats .tchat .tchat-t .tchat-m .tname-in .tstem .tnarrow). The rail does not scroll with the tree:
   the tree's own scroller is .tscroll beside it. ---------- */
.ttree.has-rail { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.ttree.has-rail > .tm2-tree { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tflowv { display: flex; min-width: 0; }
.has-rail .tflowv { flex: 1; min-height: 0; }
.has-rail .tscroll { flex: 1; min-width: 0; min-height: 0; overflow: auto; padding: 12px 14px 40px 0; }
.has-rail .lr-page > :not(.lr-wrap) { margin-left: 14px; }
.tm2-page #tmCount { display: none; }                  /* the counts are read once, in the rail */
.trail { flex: none; width: clamp(180px, 24%, 260px); min-height: 0; box-sizing: border-box; display: flex; flex-direction: column; padding: 10px 8px;
  background: var(--side-bg); border-right: 1px solid var(--line); }
.trail-h { flex: none; display: flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 2px 0 8px; border-radius: 8px; cursor: pointer; }
.trail-h:hover { background: var(--hover); }
.trail-h:focus { outline: none; }
.trail-h:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.trail-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; color: var(--ink); }
.trail-acts { flex: none; display: inline-flex; }
.trail-c { flex: none; padding: 1px 6px 0 22px; font-size: 12px; line-height: 1.45; color: var(--faint); font-variant-numeric: tabular-nums; }
.trail-l { flex: none; margin: 14px 8px 4px; font-size: 12px; color: var(--faint); }
.tdot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.tdot.working { background: var(--accent); }
.tdot.needs { background: var(--warn); }
.tdot.done { background: var(--ok); }
.tdot.failed { background: var(--bad); }
.tchats { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.trail .tchats { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
.tchat { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 4px 6px; border: 0; border-radius: 6px; background: none; color: var(--ink);
  font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.tchat:hover { background: var(--hover); }
.tchat.on { background: var(--sel); font-weight: 500; }
.tchat:focus { outline: none; }
.tchat:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.tchat-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tchat-p { width: 7px; flex: none; text-align: center; font-size: 14px; line-height: 1; }
.tchat.new { color: var(--muted); }
.tchat.new:hover { color: var(--ink); }
.tchat-m { flex: none; margin-left: auto; width: 22px; height: 18px; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--faint);
  font: inherit; line-height: 1; cursor: pointer; opacity: 0; }
.tchat:hover .tchat-m, .tchat.on .tchat-m, .tchat-m:focus-visible { opacity: 1; }
.tchat-m:hover { background: var(--hover); color: var(--ink); }
.tchat.typing .tchat-m { display: none; }
@media (hover: none) { .tchat-m { opacity: 1; } }
.tname-in { flex: 1; min-width: 0; width: 96px; border: 0; outline: 0; padding: 0; border-bottom: 1px solid var(--accent); border-radius: 0; background: none;
  color: var(--ink); font: inherit; }
/* no room for a rail beside the tree (.tnarrow): a block across the top, the chats as chips that wrap; the outline below */
.tflowv.tnarrow { flex-direction: column; }
.tnarrow .trail { width: auto; padding: 8px 10px; margin: 0 0 8px; border-right: 0; border-bottom: 1px solid var(--line); border-radius: 8px; }
.tnarrow .trail-l { display: none; }
.tnarrow .trail .tchats { flex-direction: row; flex-wrap: wrap; gap: 6px; margin-top: 8px; overflow: visible; }
.tnarrow .trail .tchat { max-width: 100%; padding: 3px 6px 3px 9px; border: 1px solid var(--line); border-radius: 999px; }
.tnarrow .trail .tchat.new { padding-right: 10px; }
.tm2-n.tstem > .tm2-kids.top { margin-left: 0; padding-left: 0; border-left: 0; }

/* a session's context by its model picker (app.js paintSessCtx): the words give way where the bar is narrow */
#dCtx { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
#dCtx.plain { cursor: default; }
#dCtx.plain:hover { background: none; color: var(--faint); }
:root:not([data-theme="dark"]) #dCtx.plain:not(.high):hover { color: var(--muted); }
#dCtx.plain.high:hover { color: var(--warn); }
#dCtx.tight .ctx-w { display: none; }
#dModelWrap { flex: 0 1 auto; }
.cbar.fitcheck #dModelWrap { flex: none; }
#dModelWrap #dModel { min-width: 0; }               /* the model's name gives way (…) before the bar runs over its send button */
@media (max-width: 720px) { #dCtx .ctx-w { display: none; } #dCtx { padding: 0 4px; } }
#dThread .cutline.dcut { margin: 6px 0 22px; }
.steps .cutline.dcut { margin: 8px 0; }
.md .ffiles { display: flex; flex-wrap: wrap; gap: 4px 12px; }      /* files an answer is about but does not name */
/* ---------- LF Agent: an agent's step list beside its box, 「2/5」, the task line, 预算用完 · 继续？ (agent 0d23241's
   classes: ol.ttodo li.tdone / .tnow / .tnot / .tmore, .tprog, .tl3) ---------- */
.tprog { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.lr-box .tl3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; margin-top: 1px;
  font-size: 12px; line-height: 1.35; color: var(--muted); }
.tm2-n > .tl3 { margin: -2px 0 2px 32px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttodo { list-style: none; margin: 2px 0 6px 32px; padding: 0; font-size: 12px; line-height: 1.5; color: var(--ink); }
.lr-n > .ttodo { flex: none; align-self: center; margin: 0 0 0 18px; max-width: 240px; position: relative; }
.lr-n > .ttodo::before { content: ""; position: absolute; left: -18px; top: 50%; width: 14px; border-top: 1px solid var(--tl, var(--line)); }
.ttodo li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ttodo .ttext { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttodo .tmark { width: 10px; flex: none; text-align: center; font-size: 11px; }
.ttodo .tdone, .ttodo .tmore { color: var(--faint); }
.ttodo .tnot { color: var(--muted); }
.ttodo .tnow { font-weight: 500; }
.tspin { width: 10px; height: 10px; flex: none; box-sizing: border-box; border: 1.5px solid var(--faint); border-top-color: transparent; border-radius: 50%;
  animation: tspin .9s linear infinite; }
@keyframes tspin { to { transform: rotate(360deg); } }
.lr-box.tbudget-on { border-color: var(--warn); }
.lr-box.tbudget-on .lr-st { color: var(--warn); font-weight: 600; }
.tbudget { display: flex; gap: 6px; margin: 5px 0 1px; }
.tm2-r .tbudget { margin: 0; }
.tbudget button { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.tbudget .tbudget-go { border-color: var(--accent); color: var(--accent); font-weight: 500; }
.tbudget button:hover { background: var(--hover); }
.tbudget button:disabled { opacity: .5; cursor: default; }
.tm2-r.temp .tm2-t { color: var(--muted); }
.trail .ttodo { flex: none; margin: 6px 6px 0 22px; max-width: none; }

/* 在浏览器打开 in the head of an open file's tab (LF Agent's middle column) */
.thead .tm-inbr { flex: none; height: 26px; padding: 0 8px; font-size: 12px; white-space: nowrap; }
/* while a file shows (the counts are hidden then), ← Agent Flow stays pinned at the left as the file tabs scroll under it,
   so the open file's tab can scroll into sight and the way back stays in reach (as the agent's .tflow) */
.mtab.tflow:not(.on) { position: sticky; left: 0; z-index: 1; box-shadow: 0 0 0 4px var(--bg); }
/* ---------- LF Agent: dragging a box (agent caed555's classes): the box dims where it is, a copy follows the pointer, a
   line or a lit box (or the rail) shows the drop ---------- */
.lr-box, .tm2-r { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tdragging { opacity: .35; }
.tghost { position: fixed; z-index: 60; margin: 0; pointer-events: none; opacity: .85; box-shadow: 0 8px 22px rgba(0, 0, 0, .2); background: var(--bg); }
.tghost .lr-acts, .tghost .tm2-acts, .tghost .lr-tog, .tghost .tbudget { display: none; }
.tdropline { position: fixed; z-index: 59; display: none; height: 2px; border-radius: 1px; background: var(--accent); pointer-events: none; }
.lr-box.tdrop, .tm2-r.tdrop { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.trail.tdrop { box-shadow: inset 0 0 0 2px var(--accent); }
.tdrag, .tdrag .lr-box, .tdrag .tm2-r, .tdrag .tm-addslot { cursor: grabbing; }

/* Agent Flow pinned first again (the counts live in the rail now, agent fc09df1): it stays at the left whether the tree
   or a file shows, and keeps its label on a phone too */
.mtab.tflow.on { position: sticky; left: 0; z-index: 1; box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--bg); }
@media (max-width: 860px) {
  .mtab.tflow.on { padding: 0 11px 0 9px; }
  .mtab.tflow.on .ts-t { display: inline; }
}

/* 云's 飞书机器人 (开发中) in the 主Agent's rail, under its counts and above 对话 (owner 11-26: 这个应该在主agent那块里):
   a quiet dashed row the rail's width, not a card on the canvas */
.trail .lark-dev-box { flex: none; margin: 10px 0 0; }
.trail .lark-dev-b { display: flex; width: 100%; box-sizing: border-box; gap: 7px; padding: 4px 8px; border-radius: 6px; font-size: 13px; text-align: left; }
.trail .lark-dev-b:hover { background: var(--hover); }
.trail .lark-dev-b > span:not(.devtag) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trail .lark-dev-b .devtag { margin-left: auto; }
.trail .lark-dev-line { margin: 4px 8px 0; font-size: 12px; }
.tnarrow .trail .lark-dev-box { margin-top: 8px; }

/* ---------- Agent Flow, layout A (owner 11-26: 「A · 左边一张高卡片」): the 主Agent is one tall card at the left of the
   canvas, the root of the tree (.tstem.has-card holds the card, then the 子Agent column): one line leaves its right edge
   and branches to each 子Agent and the add slot. Inside, top to bottom: 主Agent + its state and spend on one line, the
   counts, 云's 飞书机器人 (开发中), 对话 and its chats, + 新对话 in the accent. A narrow view keeps the block on top. ---------- */
.has-rail .tflowv.tcards .tscroll { padding-left: 14px; }
.lr-n.tstem.has-card { align-items: stretch; }
.lr-n.tstem.has-card > .lr-kids { justify-content: center; }
.trail.tcard { flex: none; align-self: stretch; width: 228px; min-height: 260px; padding: 10px 8px 12px; border: 1px solid var(--line); border-right: 1px solid var(--line);
  border-radius: 12px; background: var(--bg); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.trail.tcard.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.trail.tcard.tdrop { box-shadow: 0 0 0 2px var(--accent); }
.trail.tcard .trail-t { flex: 0 1 auto; }
.trail-s { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.trail.tcard .tchats { overflow: visible; }
.trail.tcard .tchat.new { color: var(--accent); }
.trail.tcard .tchat.new:hover { color: var(--accent); background: var(--hover); }

/* owner 11-27: skills are always auto, so the composer's 技能 chip is gone */
#skillsBtn { display: none !important; }

/* ---------- LF Agent's top left with the left sidebar folded (owner 11-27: 「左上角有点问题」, 「云和电脑稍微小一点点」):
   the mark, ☰ and ＋ are one even row of 36 px squares on one centre line (10 + 3 × 36 + 2 × 4 = 126 px); the 云 | 电脑
   switch starts 12 px after them, or under them when its column is too narrow; the switch about 15% smaller ---------- */
@media (min-width: 861px) {
  .app.sidepane-left-off .topbar { align-items: center; gap: 4px; }
  .app.sidepane-left-off .topbar #topTitle { width: 36px; height: 36px; padding: 0; justify-content: center; box-sizing: border-box; }
  .side-top { container-type: inline-size; padding-top: 8px; }
  .app.sidepane-left-off .side-top { padding-left: 14px; }
  .app.sidepane-left-off .side-top > * { margin-left: 124px; }
  .app.sidepane-left-off:has(#v-overview:not([hidden])) .topbar { top: 16px; }      /* on the switch's centre line (8 + 52 / 2) */
  @container (max-width: 400px) {
    .app.sidepane-left-off .side-top > * { margin-left: 0; }
    .app.sidepane-left-off .side-top > .side-switch { margin-top: 42px; }
  }
}
.side-switch { border-radius: 11px; }
.side-opt { min-height: 44px; padding: 4px 9px; border-radius: 8px; }
.side-name { font-size: 14px; line-height: 1.3; gap: 5px; }
.side-ic { font-size: 15px; }
.side-sub { font-size: 12px; line-height: 1.3; }
@media (max-width: 860px) { .side-opt { min-height: 40px; } }

/* LF Agent's file panel (owner 11-27: 「把这个folder path写在下面的最上面」): the head says 文件; the folder's path is the
   first line above the list, quiet and small, with a folder icon, shortened in the middle (its last 10 characters stay) */
.tpath { flex: none; display: flex; align-items: center; min-width: 0; padding: 8px 14px 2px 14px; font-size: 12px; line-height: 1.4; color: var(--faint, var(--muted)); white-space: nowrap; }
.tpath:empty { display: none; }
.tpath-i { flex: none; width: 13px; height: 13px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
.tpath-a { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tpath-b { flex: none; }
.tpath-a, .tpath-b { white-space: pre; }
.tpath + .tfiles { padding-top: 2px; }

/* home composer, an account with no computer (owner 11-27): 电脑 greyed, its tooltip says why; 云端 is picked */
.whererow .seg button.nopc { opacity: .45; cursor: not-allowed; }
.whererow .seg button.nopc:hover { background: none; color: var(--muted); }

/* the sidebar's footer shows who is signed in (owner 11-27: 「cant even see my self」): the account name gets the whole row
   (the EN | 中文 switch is in the account menu's 语言 already), cut only when really long, the full name as the tooltip;
   the account menu starts with the name and, small and grey, the real name */
.side-foot > .side-lang { display: none; }
.account-btn { min-width: 0; }
.account-btn .uname { flex: 1 1 auto; }
.menu-who { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px 6px; min-width: 0; }
.mw-name { font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-sub:empty { display: none; }

/* a Markdown / text file edited where it is shown (owner 11-27: md 可以在页面上改): its raw text in a plain editor */
.fedit { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.fedit-ta { width: 100%; min-height: 220px; height: clamp(220px, calc(100vh - 340px), 720px); box-sizing: border-box; resize: vertical; padding: 12px 14px; border: 1px solid var(--field-line);
  border-radius: 8px; background: var(--bg); color: var(--ink); font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 4; white-space: pre-wrap; }
.fedit-ta:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.fedit-ta[readonly] { opacity: .7; }
.fedit-msg:empty { display: none; }
.fedit-msg { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.fedit-msg .state { margin: 0; }
.fedit .dlg-acts { align-items: center; }
.fedit-keys { margin-right: auto; font-size: 12px; }
.fedit-off { display: inline-flex; align-items: center; gap: 8px; }
.fedit-off .hint { font-size: 12px; }
.fedit-msg:not(:empty) + .fedit-ta { height: clamp(180px, calc(100vh - 500px), 600px); }   /* a message above: the buttons stay in sight */

/* LF Agent's file panel, 「整洁的树」 (owner 11-27, option A; app.js tidyAfter): Agent 须知 first, a folder's item count on
   its right, scratch folders last and greyed, folders known to be empty hidden until 显示空文件夹 */
#tmFiles .frow .fname { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tmFiles .frow.dir { display: flex; align-items: center; }
#tmFiles .fcount { margin-left: auto; padding-left: 8px; flex: none; font-size: 12px; color: var(--faint, var(--muted)); font-variant-numeric: tabular-nums; font-weight: 400; }
#tmFiles .fnotes > .frow .fname { font-weight: 600; }
#tmFiles .fscratch > .frow { color: var(--faint, var(--muted)); }
#tmFiles .ftag { flex: none; margin-left: 6px; padding: 0 5px; border-radius: 4px; background: var(--hover); font-size: 11px; line-height: 16px; color: var(--muted); }
#tmFiles:not(.show-empty) li.fempty:not(:has(> .frow[aria-expanded="true"])) { display: none; }
#tmFiles li.fempty > .frow { color: var(--faint, var(--muted)); }
#tmFiles > .ffoot { list-style: none; padding: 10px 8px 0; font-size: 12px; }
#tmFiles > .ffoot .link { font-size: 12px; color: var(--muted); }

/* ---------- LF Agent's two tab bars in one style (owner 11-27: 「tabs搞更清晰一些」), like a browser's: the open tab is the
   content's own surface, outlined, a line of the accent on top, in the ink and medium weight, and joins the content (the
   bar's bottom line stops under it); the others are see-through and muted. At most 180 px with … (the full name as the
   tooltip); × on hover and on the open tab, a middle click closes. Too many: the bar scrolls sideways and fades where more
   are (overview.js tabEdges). The middle bar's Agent Flow is its first tab, pinned, the same shape (no ×); the path line
   over a file keeps its folder only. ---------- */
.ts-tabs, .mtabs { align-self: stretch; align-items: flex-end; gap: 2px; padding: 0 1px; }
.ts-tab, .mtab, .mtab.tflow, .mtab.tflow.on, .mtab.tflow:not(.on) { height: 31px; max-width: 180px; box-sizing: border-box; padding: 0 6px 0 11px; margin: 0;
  border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; background: transparent; color: var(--muted); font-weight: 400; box-shadow: none; transform: none; }
.mtab.tflow, .mtab.tflow.on, .mtab.tflow:not(.on) { padding-right: 11px; }
.ts-tab:hover, .mtab:hover, .mtab.tflow:hover { background: var(--hover); color: var(--ink); border-color: transparent; }
.ts-tab.on, .ts-tab.on:hover { --tab-face: var(--side-bg); }
.mtab.on, .mtab.on:hover, .mtab.tflow.on, .mtab.tflow.on:hover { --tab-face: var(--bg); }
.ts-tab.on, .mtab.on, .mtab.tflow.on { background: var(--tab-face); color: var(--ink); font-weight: 500; border-color: var(--line); box-shadow: inset 0 2px 0 var(--accent); }
.mtab.tflow:not(.on) { background: var(--bg); }                 /* pinned: the file tabs slide under it */
.mtab.tflow:not(.on):hover { background: linear-gradient(var(--hover), var(--hover)), var(--bg); }
.mtab .ic, .tflow-i { color: currentColor; opacity: .75; }
.ts-tab .ts-t, .mtab .ts-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-dot { width: 7px; height: 7px; }
@media (max-width: 860px) { .mtab.tflow.on .ts-t { display: inline; } }
/* the bar's bottom line under the tabs, so the open one covers it: the right sidebar's head sits over the chat's top line */
.rside-head { position: relative; z-index: 1; margin-bottom: -1px; min-height: 34px; align-items: stretch; }
.rside-head .rside-acts { align-self: center; }
.tmid .thead { border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); }
/* more tabs than room: the edges fade where more are (the pinned Agent Flow never fades) */
.ts-tabs.fade-r, .mtabs.fade-r { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 32px); mask-image: linear-gradient(to left, transparent 0, #000 32px); }
.ts-tabs.fade-l { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 32px); mask-image: linear-gradient(to right, transparent 0, #000 32px); }
.ts-tabs.fade-l.fade-r { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%); }
.mtabs.fade-l { -webkit-mask-image: linear-gradient(to right, #000 var(--tab-pin), transparent var(--tab-pin), #000 calc(var(--tab-pin) + 32px)); mask-image: linear-gradient(to right, #000 var(--tab-pin), transparent var(--tab-pin), #000 calc(var(--tab-pin) + 32px)); }
.mtabs.fade-l.fade-r { -webkit-mask-image: linear-gradient(to right, #000 var(--tab-pin), transparent var(--tab-pin), #000 calc(var(--tab-pin) + 32px), #000 calc(100% - 32px), transparent 100%); mask-image: linear-gradient(to right, #000 var(--tab-pin), transparent var(--tab-pin), #000 calc(var(--tab-pin) + 32px), #000 calc(100% - 32px), transparent 100%); }
/* the path over an open file in the middle column: its tab says the name; the folder stays, muted, when there is one */
.tview .fprev-path .fp-name { display: none; }
.tview .fprev-path:has(> .fp-dir:empty) { display: none; }
.tmid .thead > .tm2-gap { flex: 0 0 0; }                      /* the tabs take the head's room; what follows them stays at the right */
.tmid .thead > .mtabs { flex: 1 1 auto; }
/* a narrow middle column: the pinned Agent Flow tab is its icon alone (its name stays the tooltip), the file tabs get the room */
.tmid { container-type: inline-size; }
@container (max-width: 360px) {
  .mtab.tflow .ts-t, .mtab.tflow.on .ts-t { display: none; }
  .mtab.tflow, .mtab.tflow.on, .mtab.tflow:not(.on) { padding: 0 9px; }
  .mtab { max-width: 140px; }
}
/* every tab its own box (owner 11-27: 「tabs要有自己边框每一个」): a hairline on top and both sides, rounded on top, a little
   apart, a muted fill and muted words; under the pointer its edge darkens; the open one as before (the surface, ink, the
   accent line on top, joined to the content) */
.ts-tabs, .mtabs { gap: 5px; }
.ts-tab, .mtab, .mtab.tflow, .mtab.tflow:not(.on) { border-color: var(--line); background: var(--hover); color: var(--muted); }
.mtab.tflow:not(.on) { background: linear-gradient(var(--hover), var(--hover)), var(--bg); }      /* pinned: opaque */
.ts-tab:not(.on):hover, .mtab:not(.on):hover, .mtab.tflow:not(.on):hover { border-color: var(--field-line); color: var(--ink); }
.ts-tab.on, .mtab.on, .mtab.tflow.on { border-color: var(--line); background: var(--tab-face); color: var(--ink); font-weight: 500; }


/* LF Agent's conversation head (owner 11-27): the path 主Agent › … › the parent; each name opens that agent's tab here */
.convhead .ch-path { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.convhead .ch-nav { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convhead .ch-nav:hover { color: var(--ink); text-decoration: underline; }
.convhead .ch-sep { flex: none; color: var(--faint, var(--muted)); }

/* LF Agent's hints above the composer (owner 11-27: 「给一些hint」): small, quiet outline pills, one or two lines; a phone: one line that scrolls */
.starters { gap: 5px; padding: 0 2px 6px; max-height: 64px; overflow: hidden; }
.starters .chip { min-height: 26px; padding: 2px 10px; font-size: 13px; color: var(--muted); background: transparent; border-color: var(--line); }
.starters .chip:hover { color: var(--ink); background: var(--hover); }
@media (max-width: 860px) {
  .starters { flex-wrap: nowrap; overflow-x: auto; max-height: none; scrollbar-width: none; }
  .starters::-webkit-scrollbar { display: none; }
  .starters .chip { flex: none; white-space: nowrap; }
}

/* ---------- a 子Agent's own folder (owner 11-27): the picker under the name in 「+ 加一个 Agent」, one folder-only tree of
   the 主Agent's folder; the box's 📁 line, which opens it in the file panel ---------- */
.tm-addslot.edit { flex-wrap: wrap; row-gap: 4px; }
.tfp-b { flex: 1 0 100%; display: flex; align-items: center; gap: 4px; min-width: 0; padding: 2px 4px; margin-left: 14px; border: 0; border-radius: 5px; background: none;
  color: var(--muted); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.tfp-b:hover, .tfp-b[aria-expanded="true"] { background: var(--hover); color: var(--ink); }
.tfp-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tfp-i { flex: none; font-size: 11px; }
.tfp-pop { position: fixed; z-index: 60; width: 292px; overflow: auto; padding: 6px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px;
  background: var(--pop, var(--bg)); box-shadow: 0 8px 28px rgba(0, 0, 0, .14); font-size: 13px; }
.tfp-h { margin: 8px 8px 2px; font-size: 12px; color: var(--faint); }
.tfp-tree { list-style: none; margin: 0; padding: 0; }
.tfp-tree .tfp-tree { padding-left: 14px; }
.tfp-line { display: flex; align-items: center; gap: 2px; min-width: 0; }
.tfp-row { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; padding: 4px 6px; border: 0; border-radius: 6px; background: none; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; }
.tfp-row:hover { background: var(--hover); }
.tfp-row.on { background: var(--sel); font-weight: 500; }
.tfp-row.new, .tfp-newtop { color: var(--accent); }
.tfp-plus { width: 12px; flex: none; text-align: center; }
.tfp-name { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tfp-hint { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--faint); }
.tfp-tog { flex: none; width: 18px; height: 22px; padding: 0; border: 0; background: none; color: var(--faint); cursor: pointer; }
.tfp-tog .chev { width: 10px; height: 10px; transition: transform .12s; }
.tfp-tog[aria-expanded="true"] .chev { transform: rotate(90deg); }
.tfp-add { flex: none; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--faint); cursor: pointer; opacity: 0; }
.tfp-line:hover .tfp-add, .tfp-add:focus-visible { opacity: 1; }
.tfp-add:hover { background: var(--hover); color: var(--ink); }
@media (hover: none) { .tfp-add { opacity: 1; } }
.tfp-in { width: calc(100% - 12px); margin: 3px 6px; padding: 4px 6px; box-sizing: border-box; border: 1px solid var(--accent); border-radius: 6px; background: var(--bg);
  color: var(--ink); font: inherit; outline: none; }
.tfp-state { padding: 6px 8px; color: var(--faint); font-size: 12px; }
.lr-box .tdir { display: flex; align-items: center; max-width: 100%; margin-top: 1px; padding: 0; border: 0; background: none; color: var(--faint); font: inherit;
  font-size: 12px; line-height: 1.4; text-align: left; cursor: pointer; overflow: hidden; white-space: nowrap; }
.lr-box .tdir:hover { color: var(--accent); text-decoration: underline; }
.lr-box .tdir > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.tm2-dir { color: var(--faint); }
#tmFiles .frow.flash { box-shadow: inset 0 0 0 2px var(--accent); transition: box-shadow .3s; }

/* LF Agent's file panel changes its folder (owner 11-27): ⋯ on a row under the pointer (or focused), a name typed in place,
   最近删除 at the bottom with each deletion by its time */
#tmFiles li.fops { position: relative; }
#tmFiles .fmore { position: absolute; right: 2px; top: 1px; width: 24px; height: 24px; border-radius: 6px; opacity: 0; background: var(--side-bg, var(--bg)); }
#tmFiles .fmore .ic { width: 14px; height: 14px; }
#tmFiles li.fops:hover > .fmore, #tmFiles li.fops > .frow:focus-visible + .fmore, #tmFiles .fmore:focus-visible, #tmFiles .fmore[aria-expanded="true"] { opacity: 1; }
#tmFiles li.fops:hover > .frow.dir .fcount { visibility: hidden; }
@media (hover: none) { #tmFiles .fmore { opacity: .6; } }
#tmFiles .fnew { list-style: none; padding: 2px 4px; }
#tmFiles .fname-in { width: 100%; box-sizing: border-box; height: 26px; padding: 0 8px; border: 1px solid var(--accent); border-radius: 6px; background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; }
#tmFiles .fname-in:focus { outline: none; box-shadow: 0 0 0 1px var(--accent); }
#tmFiles li.ftrash > .frow .fname, #tmFiles li.ftrashed > .frow .fname { font-variant-numeric: tabular-nums; }
#tmFolderNew:disabled { opacity: .4; cursor: not-allowed; }
.tf-plus { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- Agent Flow: sections by folder (owner 11-27: 这也可以分section). A header is a row of the first column: the
   trunk passes it, no tick to it; quiet, small; its + adds an agent with that folder ---------- */
.lr-kids > .lr-n.lr-hd { padding-top: 10px; padding-bottom: 2px; }
.lr-kids > .lr-n.lr-hd:first-child { padding-top: 2px; }
.lr-kids > .lr-n.lr-hd::after { display: none; }
.lr-hd-r { display: flex; align-items: center; gap: 2px; min-width: 148px; }
.lr-hd-t { display: inline-flex; align-items: center; gap: 4px; min-width: 0; padding: 2px 6px 2px 2px; border: 0; border-radius: 6px; background: none;
  color: var(--faint); font: inherit; font-size: 12px; cursor: pointer; }
.lr-hd-t:hover { background: var(--hover); color: var(--ink); }
.lr-hd-t .chev { width: 10px; height: 10px; transform: rotate(90deg); transition: transform .12s; }
.lr-hd-t[aria-expanded="false"] .chev { transform: none; }
.lr-hd-i { font-size: 11px; }
.lr-hd-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-hd-c { margin-left: 2px; padding: 0 6px; border-radius: 999px; background: var(--hover); font-size: 11px; font-variant-numeric: tabular-nums; }
.lr-hd-add { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--faint); font: inherit; font-size: 15px; line-height: 1;
  cursor: pointer; opacity: 0; }
.lr-hd:hover .lr-hd-add, .lr-hd-add:focus-visible { opacity: 1; }
.lr-hd-add:hover { background: var(--hover); color: var(--accent); }
@media (hover: none) { .lr-hd-add { opacity: 1; } }
.lr-hd.tdrop .lr-hd-t { box-shadow: inset 0 0 0 2px var(--accent); color: var(--ink); }
.lr-secslot[hidden] { display: none; }

/* the add box, more obvious (owner 11-27): 名字 and 文件夹 as labelled rows, each a real control; the folder control is
   bordered like an input (folder icon, path/, 新建 when new, ▾) and opens the folder tree. A folder is the same 18 px line
   icon on that control, in the tree's rows and on a box's folder line. */
.tm-addslot.edit { display: block; padding: 8px 10px 9px; }
.tadd-form { display: flex; flex-direction: column; gap: 6px; }
.tadd-row { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 6px; min-width: 0; }
.tadd-l { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tm-addslot.edit .tadd-in { width: 100%; min-width: 0; box-sizing: border-box; height: 30px; padding: 0 8px; border: 1px solid var(--field-line); border-radius: 7px;
  background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; outline: none; }
.tm-addslot.edit .tadd-in:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tm-addslot.edit .tfp-b { flex: none; width: 100%; min-width: 0; height: 30px; margin: 0; padding: 0 8px 0 6px; box-sizing: border-box; gap: 6px;
  border: 1px solid var(--field-line); border-radius: 7px; background: var(--bg); color: var(--ink); font-size: 13px; }
.tm-addslot.edit .tfp-b:hover { border-color: var(--faint); background: var(--bg); }
.tm-addslot.edit .tfp-b:focus { outline: none; }
.tm-addslot.edit .tfp-b:focus-visible, .tm-addslot.edit .tfp-b[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tfp-t { flex: 0 1 auto; }
.tfp-tag { flex: none; padding: 0 6px; border-radius: 999px; background: var(--hover); color: var(--muted); font-size: 11px; line-height: 18px; }
.tfp-tag[hidden] { display: none; }
.tfp-car { flex: none; margin-left: auto; color: var(--faint); font-size: 11px; }
.tfi { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linejoin: round; vertical-align: middle; }
.tfp-fi { color: var(--muted); }
.tfp-row { align-items: center; }
.tfp-ri { color: var(--faint); }
.lr-box .tdir { gap: 4px; margin-top: 2px; }
.lr-box .tdir .tdir-i, .tm2-dir .tdir-i { width: 18px; height: 18px; }
.tm2-dir { display: inline-flex; align-items: center; gap: 3px; }
.lr-hd-i.tfi { width: 18px; height: 18px; color: var(--faint); }

/* the folder tree, clearer (owner 11-27): › folded / ⌄ open like the file panel, an arrow column of its own so names line up,
   no arrow where there is no subfolder, children indented 16 px on a faint guide, a ✓ and a fill on the chosen one; the
   section headers' arrows the same way */
.tfp-tog .chev { transform: rotate(-90deg); transition: transform .15s; }
.tfp-tog[aria-expanded="true"] .chev { transform: none; }
.tfp-tog.none { visibility: hidden; pointer-events: none; }
.tfp-tree .tfp-tree { margin-left: 9px; padding-left: 7px; border-left: 1px solid color-mix(in srgb, var(--faint) 35%, transparent); }
.tfp-row.on { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); }
.tfp-ok { flex: none; margin-left: auto; color: var(--accent); font-size: 13px; }
.tfp-row .tfp-hint { flex: 0 1 auto; }
.tfp-pop.mid { transform: translate(-50%, -50%); width: min(320px, calc(100vw - 32px)); }
.lr-hd-t .chev { transform: none; }
.lr-hd-t[aria-expanded="false"] .chev { transform: rotate(-90deg); }

/* 上传 into LF Agent's folder: a row per file while it goes up; a folder (or the whole panel) lit while files are dragged over it */
#tmFiles .fup { list-style: none; display: flex; align-items: center; gap: 8px; padding: 4px 8px; font-size: 13px; color: var(--muted); }
#tmFiles .fup .fup-n { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
#tmFiles .fup .fup-s { flex: none; margin-left: auto; font-size: 12px; }
#tmFiles li.fdrop > .frow { background: var(--hover); box-shadow: inset 0 0 0 1.5px var(--accent); }
#tmFolder.fdrop-all #tmFiles { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 8px; }
#tmFolderUpload:disabled { opacity: .4; cursor: not-allowed; }

/* the folder tree, style A like the file panel (owner 11-27: 「do the same for this」): amber folders (open when open), a
   fixed arrow column, guide lines, a muted short hint; a footer with 用这个文件夹 */
.tfp-ri { color: #c98a1b; fill: color-mix(in srgb, #e3a93a 22%, transparent); }
.tfp-ri.open { fill: none; }
.tfp-row.on .tfp-ri { color: #b47a12; }
.tfp-row.new .tfp-ok { display: none; }
.tfp-foot { position: sticky; bottom: -6px; display: flex; justify-content: flex-end; margin: 6px -6px -6px; padding: 6px; border-top: 1px solid var(--line);
  background: var(--pop, var(--bg)); }
.tfp-use { height: 28px; padding: 0 12px; font-size: 13px; }

/* ---------- the icon tree (owner 11-27, style A: 「图标树 + 缩进线」; app.js ftParts / ftDress), shared: LF Agent's file
   panel uses it, and any tree may (ul.ftree.ft-tree, nested ul.ft-guide, .ft-row, .ft-chev, .ft-ic.ft-<kind>, .ft-name,
   .ft-count, li.ft-leaf, .ft-muted, .on). Four colours of its own, light and dark. ---------- */
:root { --ft-amber: #b7791f; --ft-green: #3c8a4f; --ft-coral: #d97757; --ft-purple: #7b61b8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ft-amber: #e0b157; --ft-green: #7fc48a; --ft-coral: #e8957a; --ft-purple: #b6a1e6; } }
:root[data-theme="dark"] { --ft-amber: #e0b157; --ft-green: #7fc48a; --ft-coral: #e8957a; --ft-purple: #b6a1e6; }
.ftree .ft-row, #tmFiles .ft-row { gap: 5px; min-height: 28px; padding: 0 8px 0 4px; border-radius: 6px; font-size: 13px; line-height: 1.35; }
.ft-row .ft-chev { width: 14px; height: 14px; flex: none; color: var(--faint, var(--muted)); transform: rotate(-90deg); transition: transform .12s; }
.ft-row[aria-expanded="true"] > .ft-chev { transform: none; }
.ft-row .ft-chev.ft-none, li.ft-leaf > .ft-row:not([aria-expanded="true"]) > .ft-chev, .ft-row.ft-leaf:not([aria-expanded="true"]) > .ft-chev { visibility: hidden; }   /* an open one keeps its ⌄ */
.ft-row .ft-ic, .ftree .frow .ft-ic { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; }
.ft-ic.ft-dir, .ft-ic.ft-dir-open { color: var(--ft-amber); }
.ft-ic.ft-dir-open, .ft-row[aria-expanded="true"] > .ft-ic.ft-dir { display: none; }
.ft-row[aria-expanded="true"] > .ft-ic.ft-dir-open { display: block; }
.ft-ic.ft-img { color: var(--ft-green); }
.ft-ic.ft-web { color: var(--ft-coral); }
.ft-ic.ft-doc, .ft-ic.ft-notes { color: var(--ft-purple); }
.ft-ic.ft-other { color: var(--faint, var(--muted)); }
.ft-row.ft-other .ft-name { color: var(--muted); }
.ft-row.ft-muted, .ft-row.ft-muted .ft-name { color: var(--muted); }
.ft-row.ft-muted .ft-ic.ft-dir, .ft-row.ft-muted .ft-ic.ft-dir-open { color: var(--faint, var(--muted)); }
.ft-row .ft-count { color: var(--faint, var(--muted)); }
.ftree .ft-row.on, #tmFiles .ft-row.on { background: var(--sel); font-weight: 500; }
.ftree .ft-guide, #tmFiles .ftree.ft-guide { margin-left: 11px; padding-left: 4px; border-left: .5px solid var(--line); }
#tmFiles .fup { padding-left: 23px; }

/* approval cards read like a sentence (owner 11-27): the title says what it does; the raw text behind a quiet 查看命令 ›,
   monospace when open; the paths it touches as small file chips; 加备注 a quiet link after the buttons */
.appr .atitle { font-size: 16px; font-weight: 500; }
.appr .achips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.appr .achip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--muted); }
.appr .achip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appr .achip .ic { width: 13px; height: 13px; flex: none; }
.appr .adisc { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 13px; color: var(--muted); text-decoration: none; }
.appr .adisc:hover { color: var(--ink); }
.appr .adisc .adisc-c { display: inline-block; transition: transform .15s; }
.appr .adisc.open .adisc-c { transform: rotate(90deg); }
.appr .acode[hidden] { display: none; }
.appr .aacts { align-items: center; }
.appr .anotelink { font-size: 13px; color: var(--muted); text-decoration: none; margin-left: 4px; }
.appr .anotelink:hover { color: var(--ink); text-decoration: underline; }

/* LF Agent hides the left sidebar by itself (owner 11-27: 「自动隐藏侧边栏」; app.js initSideAuto): folded as when it is
   hidden by hand; the left edge or ☰ slides it in over the page (fixed, its own width, a shadow), 150 ms, nothing reflows */
@media (min-width: 861px) {
  .app.side-auto #side.is-off { display: flex !important; position: fixed; left: 0; top: 0; bottom: 0; width: var(--side, 252px); z-index: 45;
    transform: translateX(-102%); visibility: hidden; transition: transform .15s ease, box-shadow .15s ease, visibility 0s linear .15s; }
  .app.side-auto.side-peek #side.is-off { transform: none; visibility: visible; box-shadow: 0 10px 32px rgba(0, 0, 0, .16), 0 0 0 1px var(--line);
    transition: transform .15s ease, box-shadow .15s ease, visibility 0s; }
  .app.side-auto #side.is-off .sidepane-grip { display: none; }
}
@media (prefers-reduced-motion: reduce) { .app.side-auto #side.is-off { transition: none; } }

/* ---------- Agent Flow: the person's own groups and pins (owner 11-27); the folder picker on the shared icon tree ---------- */
.lr-hd-pin { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; color: var(--accent); }
.lr-hd.pin .lr-hd-n { color: var(--ink); }
.lr-hd-m { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--faint); font: inherit; line-height: 1; cursor: pointer; opacity: 0; }
.lr-hd:hover .lr-hd-m, .lr-hd-m:focus-visible, .lr-hd-m[aria-expanded="true"] { opacity: 1; }
.lr-hd-m:hover { background: var(--hover); color: var(--ink); }
@media (hover: none) { .lr-hd-m { opacity: 1; } }
.lr-hd[draggable="true"] .lr-hd-t { cursor: grab; }
.lr-hd.tdragging { opacity: .45; }
.lr-hd.tdrop .lr-hd-t { box-shadow: inset 0 0 0 2px var(--accent); color: var(--ink); }
.lr-newgroup { list-style: none; padding: 6px 0 0 18px; }
.lr-newgroup-b { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 0; border-radius: 6px; background: none; color: var(--faint);
  font: inherit; font-size: 13px; cursor: pointer; }
.lr-newgroup-b:hover { background: var(--hover); color: var(--ink); }
.tfp-pop .ftree { list-style: none; margin: 0; padding: 0; }
.tfp-li { position: relative; }
.tfp-pop .ft-row { width: 100%; padding-right: 30px; text-align: left; }
.tfp-pop .ft-row .ft-count { flex: 0 1 auto; min-width: 0; margin-left: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.tfp-pop .ft-row.on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tfp-li > .tfp-add { position: absolute; top: 3px; right: 4px; }
.tfp-li:hover > .tfp-add { opacity: 1; }
.tfi.ft-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; }

/* the folder picker's one 新建文件夹 (owner 11-27): where it will go, muted, after the words; the row becomes the name field */
.tfp-newtop { gap: 6px; }
.tfp-where { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: 12px; }
.tfp-newbox { display: flex; align-items: center; gap: 6px; padding: 2px 6px 2px 0; }
.tfp-newbox .tfp-in { flex: 1; width: auto; margin: 2px 0 2px 6px; }
.tfp-newbox .tfp-where { flex: none; max-width: 45%; }

/* LF Agent's hidden sidebar has a handle (owner 11-27: 「需要一个小handle的东西让人知道可以拿出来吧」): a slim rounded tab at the
   left edge, half-way down, quiet and a little stronger under the pointer; and its ▢ there is a pin (outline: 固定侧边栏;
   filled in the accent: 取消固定). app.js sideAutoApply */
.side-handle { display: none; }
@media (min-width: 861px) {
  .app.side-auto .side-handle:not([hidden]) { display: block; position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 31; width: 16px; height: 72px;
    padding: 0; border: 0; background: none; cursor: pointer; transition: opacity .15s; }
  .side-handle::before { content: ""; position: absolute; left: 3px; top: 12px; width: 6px; height: 48px; border-radius: 4px; background: var(--muted);
    opacity: .38; box-shadow: 0 0 0 1px var(--bg); transition: opacity .15s, width .15s; }
  .side-handle:hover::before, .side-handle:focus-visible::before { opacity: .75; width: 7px; }
  .side-handle:focus-visible { outline: none; }
  .side-handle:focus-visible::before { box-shadow: 0 0 0 2px var(--accent); }
  .app.side-auto.side-peek .side-handle { opacity: 0; pointer-events: none; }
}
#hideSide .pin-ic { display: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linejoin: round; }
#hideSide.pin-mode > .ic:not(.pin-ic) { display: none; }
#hideSide.pin-mode > .pin-ic { display: block; }
#hideSide.pin-mode.pinned { color: var(--accent); }
#hideSide.pin-mode.pinned > .pin-ic { fill: currentColor; }

/* Agent Flow groups, after a hands-on pass (owner 11-27: 怪怪的): the name typed in place, an empty group's hint (also a drop place) */
.lr-hd-in { width: 140px; height: 22px; padding: 0 6px; border: 1px solid var(--accent); border-radius: 5px; background: var(--bg); color: var(--ink);
  font: inherit; font-size: 12px; outline: none; }
.lr-hd.typing .lr-hd-t { cursor: text; }
.lr-kids > .lr-n.lr-ghint { padding-top: 2px; padding-bottom: 6px; }
.lr-kids > .lr-n.lr-ghint::after { display: none; }
.lr-ghint > span { display: block; min-width: 148px; padding: 8px 10px; border: 1px dashed var(--field-line); border-radius: 9px; color: var(--faint); font-size: 12px; }
.lr-ghint.tdrop > span { border-color: var(--accent); color: var(--ink); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.lr-kids > .lr-newgroup { padding: 0 0 6px 18px; }
.lr-kids > .lr-newgroup .lr-newgroup-b { padding: 2px 6px; font-size: 12px; }

/* LF Agent's file tab: an .html file shown as the page (sandboxed iframe), its render_html picture while it loads,
   查看源代码 at the top right (owner 11-27, UI review #8) */
.fpage-wrap { display: flex; flex-direction: column; gap: 8px; }
.fpage-bar { display: flex; justify-content: flex-end; }
.fpage { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; min-height: 240px; }
.fpage-frame { display: block; width: 100%; height: 70vh; border: 0; background: #fff; visibility: hidden; }
.fpage-frame.on { visibility: visible; }
.fpage-pic { position: absolute; inset: 0; width: 100%; height: auto; max-height: 100%; object-fit: contain; object-position: top center; background: #fff; }
.fpage-wait { position: absolute; top: 12px; left: 14px; margin: 0; }

/* ---------- 等你 at the top of Agent Flow (UI review A): a count, one line per thing waiting, the answers in the line ---------- */
.tin { margin: 0 0 10px 14px; max-width: 760px; border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); border-radius: 10px;
  background: color-mix(in srgb, var(--warn) 6%, var(--bg)); }
.tin-h { display: flex; align-items: center; gap: 6px; width: 100%; padding: 7px 10px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13px;
  font-weight: 600; text-align: left; cursor: pointer; border-radius: 10px; }
.tin-h .chev { width: 11px; height: 11px; transition: transform .15s; }
.tin-h[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.tin-n { min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 12px; line-height: 18px; text-align: center;
  font-variant-numeric: tabular-nums; }
.tin-list { list-style: none; margin: 0; padding: 0 6px 6px; }
.tin-r { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 3px 6px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.tin-r:hover { background: color-mix(in srgb, var(--warn) 10%, transparent); }
.tin-r:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tin-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.tin-who { flex: none; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--ink); }
.tin-what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.tin-acts { flex: none; display: inline-flex; gap: 4px; }
.tin-b { height: 26px; padding: 0 10px; border: 1px solid var(--field-line); border-radius: 7px; background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.tin-b:hover { border-color: var(--faint); }
.tin-b.go { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.tin-b.ghost { border-color: transparent; background: none; color: var(--muted); }
.tnarrow .tin { margin-left: 0; }
@media (max-width: 860px) { .tin-who { max-width: 40%; } .tin-r { flex-wrap: wrap; } .tin-acts { margin-left: 15px; } }

/* 「+ 加一个 Agent」 asks what to do first (UI review B, fixes 9 / 10): the task box, then 名字 and 文件夹, then 取消 · 添加 */
.tm-addslot.edit .tadd-task { width: 100%; min-height: 48px; box-sizing: border-box; resize: vertical; padding: 6px 8px; border: 1px solid var(--field-line);
  border-radius: 7px; background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; line-height: 1.45; outline: none; }
.tm-addslot.edit .tadd-task:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tadd-acts { display: flex; justify-content: flex-end; gap: 6px; margin-top: 2px; }
.tadd-acts .btn { height: 28px; padding: 0 12px; font-size: 13px; }

/* ---------- the UI review's 2, 3, 4, 5, 6 and 16 (owner 11-27: 都做) ---------- */
/* one status vocabulary: the head's state in Agent Flow's words and colours; 离线 greyed */
.sstat.as-working { color: var(--ink); }
.sstat.as-needs { color: var(--warn); font-weight: 500; }
.sstat.as-failed { color: var(--bad); }
.sstat.as-offline, .sstat.as-stopped, .sstat.as-idle { color: var(--muted); }
.sstat .offdot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; border: 1.5px solid var(--faint, var(--muted)); box-sizing: border-box; vertical-align: 0; }
.lr-st.offline, .tm2-st.offline, .lr-st.stopped, .tm2-st.stopped { color: var(--muted); }
.lr-box.st-offline { opacity: .72; }
.lr-box.st-offline .lr-name { color: var(--muted); }
#tmFiles .fquiet { color: var(--faint, var(--muted)); }
/* the narrow list: the name comes first and is never squeezed out; what follows it shrinks or goes */
.tm2-r .tm2-t { flex: 1 1 auto; min-width: 6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm2-r .tm2-gap { flex: 0 0 0; min-width: 4px; }
.tm2-r .tm2-sk { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm2-r .tm2-st, .tm2-r .tm2-y, .tm2-r .tprog { flex: none; white-space: nowrap; }
@media (max-width: 1100px) { .tm2-r .tm2-dir { display: none; } }
/* the composer's footer: ■ Stop in the send button's place while it works; the model's short name, cut with … */
.dstop-slot { display: inline-flex; }
.dstop-slot #dStop { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 50%; background: var(--ink); color: var(--bg); gap: 0; }
.dstop-slot #dStop > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dstop-slot #dStop .ic { width: 12px; height: 12px; }
.dstop-slot #dStop[hidden], #dSend[hidden] { display: none; }
#dModelWrap { min-width: 0; flex: 0 1 auto; }
#dModelWrap select { max-width: 13em; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.cbar-r { min-width: 0; }
/* the tab bar: a tab never stops half-way at the left edge */
.ts-tabs, .mtabs { scroll-snap-type: x proximity; scroll-padding-inline: 2px; }
.ts-tab, .mtab { scroll-snap-align: start; }

/* UI review #14: LF Agent's head has no ▾ by the title (the ⋯ menu is the same) */
.convhead.docked-head .ch-caret { display: none; }
/* UI review #21: 云 | 电脑 as one quiet line; each side's second line (在服务器上 / the computer) is in its tooltip */
.side-switch { max-width: 300px; border-radius: 9px; padding: 2px; }
.side-pc { flex-direction: row; align-items: center; gap: 4px; }
.side-opt { flex-direction: row; gap: 6px; min-height: 30px; padding: 3px 12px; border-radius: 7px; }
.side-opt .side-sub { display: none; }
.side-pc .tm-dev { margin-top: 0; max-width: 120px; }
.side-note { margin-top: 6px; font-size: 13px; }
.side-note .link { margin-left: 2px; font-size: 13px; }
@media (max-width: 860px) { .side-switch { max-width: none; } .side-opt { min-height: 36px; } }

/* ---------- UI review round 2 (owner 11-27: 接着做): 12, 13, 20, 22 ---------- */
/* a row being deleted: dimmed while the computer moves it */
#tmFiles li.fbusy > .frow { opacity: .45; pointer-events: none; }
/* 最近删除: each deletion as what it was, how long ago, and 恢复 */
#tmFiles li.ftrash-item { display: flex; flex-wrap: nowrap; align-items: center; min-width: 0; }
#tmFiles li.ftrash-item > .ft-row > .ft-chev { visibility: hidden; }
#tmFiles li.ftrash-item > .frow { flex: 1 1 auto; min-width: 0; width: auto; cursor: default; }
#tmFiles li.ftrash-item > .ftrash-meta { display: inline-flex; align-items: center; gap: 8px; flex: none; padding-right: 6px; font-size: 12px; color: var(--faint, var(--muted)); }
#tmFiles li.ftrash-item > .ftrash-meta .ftrash-back { font-size: 12px; color: var(--accent); }
#tmFiles li.ftrash-item > ul.ftree { display: none; }
#tmFiles li.ftrash-item > .fmore { display: none; }
/* the file panel's head: two groups (上传 · 新建文件夹 | 重新读取 · 收起) with a hairline between */
.thead-grp { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.thead-sep { flex: none; width: 1px; height: 16px; margin: 0 4px; background: var(--line); }
/* the hidden sidebar's handle (UI review 22): not a bar that reads as a scrollbar, but a small half-round tab with ›, out
   of sight until the pointer comes near the left edge */
@media (min-width: 861px) {
  .app.side-auto .side-handle:not([hidden]) { width: 18px; height: 44px; opacity: 0; transition: opacity .15s, transform .15s; }
  .app.side-auto.side-near .side-handle:not([hidden]), .side-handle:focus-visible { opacity: 1; }
  .side-handle::before { left: 0; top: 0; width: 16px; height: 44px; border-radius: 0 10px 10px 0; background: var(--bg); opacity: 1;
    border: 1px solid var(--line); border-left: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); box-sizing: border-box; }
  .side-handle::after { content: "›"; position: absolute; left: 0; top: 0; width: 16px; height: 44px; line-height: 42px; text-align: center; font-size: 16px; color: var(--muted); }
  .side-handle:hover::before, .side-handle:focus-visible::before { width: 18px; opacity: 1; }
  .side-handle:hover::after { color: var(--ink); }
}
#tmFiles li.ftrash-item .fcount { display: none; }

/* ---------- UI review #23: contrast and one type scale (site-wide) ----------
   Text in --faint was #87867f: 3.5:1 on the page, under WCAG AA's 4.5:1 for the 11–13px labels it colours (新建分组,
   对话, 加一个 Agent, 空 …). It is now dark enough for text on the page, the sidebar and a selected row; the old, lighter
   tone stays as --faint-line for outlines that only frame something (a hovered box, a drop zone).
   Coral text (+ 新对话, 2 个子任务在跑, 新建「…/」) was 3:1: --accent-text is the same coral, darker, for words only; dots,
   rings and icons keep --accent. Type: the half-pixel sizes are gone; the scale is 11 (counts, tags) · 12 (meta) · 13
   (lists, secondary) · 14 (body) · 15 (message box, titles) · 16 (headings). New CSS: please use these. */
:root { --faint: #6b6a64; --faint-line: #87867f; --accent-text: #ae5435; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --faint: #a8a69e; --faint-line: #9c9a92; --accent-text: #e08a6d; }
}
:root[data-theme="dark"] { --faint: #a8a69e; --faint-line: #9c9a92; --accent-text: #e08a6d; }
.composer .queued .qnow, .lr-subs, .tbudget .tbudget-go, .trail.tcard .tchat.new, .trail.tcard .tchat.new:hover,
.tfp-row.new, .tfp-newtop, .lr-box .tdir:hover, .lr-hd-add:hover, .rp-tell { color: var(--accent-text); }

/* ---------- UI review round 2: 11 (the ⋯ menu in groups), 19 (LF Agent's card as tall as its content), D (what it is doing) ---------- */
.tm-menu .tm-sep { height: 1px; margin: 4px 6px; background: var(--line); }
.lr-n.tstem.has-card { align-items: flex-start; }
.lr-n.tstem.has-card > .lr-kids { justify-content: flex-start; }
.trail.tcard { align-self: flex-start; min-height: 0; }
.trail.tcard.on { border-color: var(--accent); box-shadow: 0 0 0 .5px var(--accent); }
.lr-n.tstem.has-card > .lr-kids.fit::before { top: var(--stub, 50%); }
.lr-n.tstem.has-card > .lr-kids.fit::after { content: ''; position: absolute; left: 30px; top: var(--bt, 0); height: var(--bh, 0); border-left: 1px solid var(--tl); pointer-events: none; }
.lr-st .lr-now { color: var(--faint); font-weight: 400; }
.lr-st.needs .lr-now { color: var(--muted); }
.sess-meta .snow, .snow { min-width: 0; max-width: 32em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: 12px; }

/* 成果 (owner 11-27, UI review C): files an answer names, as cards under it (a page's picture, a document's first lines),
   and the newest files an agent made on its Agent Flow box / the LF Agent card; a click opens the file tab */
.fcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 10px 0 2px; }
.fcard { display: flex; align-items: stretch; gap: 10px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fcard:hover { border-color: var(--muted); }
.fcard-th { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 6px; background: var(--bg); overflow: hidden; color: var(--muted); }
.fcard-th img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.fcard-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fcard-n { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcard-k { font-size: 12px; color: var(--muted); }
.fcard-g { font-size: 12px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fcard-g:empty { display: none; }
.steps .fcards { display: none; }
/* on a box: one compact row, the picture or the name only */
.lr-made { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; min-width: 0; }
.lr-made .fcard { gap: 6px; padding: 3px 6px 3px 3px; border-radius: 6px; max-width: 100%; align-items: center; }
.lr-made .fcard-th { width: 22px; height: 22px; border-radius: 4px; }
.lr-made .fcard-th .ic { width: 13px; height: 13px; }
.lr-made .fcard-k, .lr-made .fcard-g { display: none; }
.lr-made .fcard-n { font-weight: 500; font-size: 12px; max-width: 110px; }
.lr-made .fcard.pic .fcard-n { max-width: 80px; }
.lr-made-more { font-size: 12px; color: var(--muted); }
.trail-made { margin-top: 10px; }
.trail-made .lr-made { margin-top: 4px; }

/* 成果 in the narrow Agent Flow list: under the row, lined up with its name */
.tm2-n > .lr-made { margin: 2px 0 4px 26px; }

/* ---------- UI review F + 24: LF Agent on a phone: Agent · 对话 · 文件 at the bottom (overview.js phNav). Agent shows
   Agent Flow (and an open file), 文件 the folder at full height, 对话 the chat drawer. Not shown wider than 860 px. ---------- */
.tm-phnav { display: none; }
@media (max-width: 860px) {
  .tm-phnav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 4px 8px max(6px, env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
  .tph-b { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px;
    padding: 4px 0 2px; border: 0; border-radius: 10px; background: none; color: var(--faint); font: inherit; font-size: 11px; line-height: 1.2;
    cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tph-b .ic, .tph-b .tflow-i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.3; opacity: 1; }
  .tph-b.on { color: var(--ink); font-weight: 600; }
  .tph-b:active { background: var(--hover); }
  .tph-b:disabled { opacity: .45; cursor: default; }
  .tph-b:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .tph-n { position: absolute; top: 3px; left: calc(50% + 7px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
    background: var(--warn); color: var(--bg); font-size: 11px; font-weight: 600; line-height: 17px; text-align: center; }
  .view.page.ov.tm2-page { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .tsplit.ph-agent, .tsplit.ph-files { grid-template-rows: auto; }
  .tsplit.ph-agent .tfolder, .tsplit.ph-agent .tf-grip { display: none; }
  .tsplit.ph-files .tmid { display: none; }
  .tsplit.ph-files .tfolder, .tsplit.ph-files.fclosed .tfolder { display: flex; max-height: none; min-height: 60vh; border-bottom: 0; }
  .tm2-page #rsideOpen, .tm2-page #tmFolderClose, .tm2-page .tsplit .fopen { display: none !important; }   /* the bar does these */
}

/* 云's 飞书 (owner 11-27: 云端接入飞书): one row in 云's sidebar and on the LF Agent card, 飞书 · 已连接 · <name> | 连接飞书;
   it opens the Lark page. Connected: the tag is quiet; not yet: the tag is the action, in the accent. */
.row .lark-cloud .ic, .lark-cloud-b .ic { width: 14px; height: 14px; flex: none; color: var(--muted); }
.lark-cloud-tag { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; font-size: 12px; color: var(--accent); }
.on > .lark-cloud-tag, .lark-cloud.on .lark-cloud-tag, .lark-cloud-b.on .lark-cloud-tag { color: var(--faint); }
.trail .lark-cloud-box { flex: none; margin: 10px 0 0; }
.lark-cloud-b { display: flex; align-items: center; width: 100%; box-sizing: border-box; gap: 7px; padding: 4px 8px; border: 1px solid var(--line);
  border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.lark-cloud-b:hover { background: var(--hover); }
.lark-cloud-b .tt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-page .lark-cloud-box { max-width: 320px; margin: 0 0 12px; }

/* 飞书机器人's own card under LF Agent's (owner 11-27: 「像这样」): one column of the two cards, the same width and look;
   its folder line, its chat, 连接飞书. In the file panel, 飞书机器人/ near the top with the Lark mark. */
.lr-n.tstem.has-card > .tcol { flex: none; display: flex; flex-direction: column; gap: 12px; align-self: flex-start; }
.tcol > .trail.tcard { align-self: stretch; }
.trail.tlark.tcard { min-height: 0; padding-bottom: 10px; }
.trail.tlark .tl-ic { width: 14px; height: 14px; flex: none; color: var(--muted); }
.trail.tlark .tl-s { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; }
.tl-folder { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; padding: 3px 8px; border: 0; border-radius: 6px; background: none;
  color: var(--muted); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.tl-folder:hover { background: var(--hover); color: var(--ink); }
.tl-folder .tl-fic { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; }
.tl-acts { margin: 10px 0 2px; }
.tl-acts .tl-connect { width: 100%; }
.tl-setup { display: block; margin: 8px 2px 0; font-size: 12px; text-align: left; }
.tnarrow .trail.tlark { margin-top: 0; }
.lr-page > .tcol.lr-lark { width: 228px; margin: 0 0 12px; }
#tmFiles .flark > .ft-row .ft-lark { width: 15px; height: 15px; flex: none; color: var(--accent); }
.fx-lkbot { margin: 18px 0; }
.fx-lksteps { margin: 8px 0 12px; padding-left: 20px; font-size: 13px; line-height: 1.6; }
.fx-lkhookrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fx-lkhook { flex: 1 1 260px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; overflow-wrap: anywhere; user-select: all; }
.fx-lkvt { flex: 1 1 220px; min-width: 0; }

/* the money back on the page (owner 11-27: 「那些钱…都给我加回去」): a box's spend on its state line, a turn's cost at its
   end in a chat, the chat's total in its head */
.lr-st .lr-y { color: var(--muted); font-variant-numeric: tabular-nums; }
.dline.dcost { text-align: right; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; margin-top: -4px; }
.scost { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tl-open { display: block; margin: 8px 2px 2px; font-size: 13px; }
.fx-lkopen { margin: 6px 0 18px; }
.fx-lkopen .hint { margin: 0 0 8px; }
.fx-lkchk { margin: 6px 0 20px; }
.fx-lkchk-l { list-style: none; margin: 8px 0 10px; padding: 0; }
.fx-lkchk-i { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.fx-lkchk-i:first-child { border-top: 0; }
.fx-lkchk-m { flex: none; width: 16px; text-align: center; font-weight: 600; color: var(--faint); }
.fx-lkchk-i.ok .fx-lkchk-m { color: #2f8f5b; }
.fx-lkchk-i.no .fx-lkchk-m { color: var(--accent); }
.fx-lkchk-t { flex: 1; min-width: 0; }
.fx-lkchk-i > .link { flex: none; font-size: 13px; }
.fx-lkscopes { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 0; }
.fx-lkscopes-t { flex: 1; min-width: 0; max-height: 140px; overflow: auto; margin: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; user-select: all; }
.tl-h .tl-more { flex: none; margin-left: 4px; }
.fx-lktop { margin: 4px 0 14px; }
.fx-lklisten { margin: 0 0 12px; font-size: 13px; }
.fx-lklisten.ok { color: #2f8f5b; }
.fx-lklisten.no { color: var(--accent); }
.tl-listen { margin: 6px 8px 0; font-size: 12px; line-height: 1.45; }
.tl-listen.ok { color: #2f8f5b; }
.tl-listen.no { color: var(--accent); }

/* the person's own message: the pictures that came with it, above the words, right-aligned like the bubble (11-27) */
.msg.user .ufiles { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-bottom: 6px; }
.msg.user .upics { justify-content: flex-end; margin: 0; }
.msg.user .upics .pic img { max-height: 220px; }
.msg.user .chips .chip.opens { cursor: pointer; }
.msg.user .chips .chip.opens:hover { background: var(--hover); }

/* ---------- 精简版 (owner 11-27: 「只需要来一个 LF agent 主 agent 对话」): on LF Agent's page, one big chat with LF Agent ---------- */
.tm-simple { margin-left: auto; padding: 2px 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tm-simple:hover { color: var(--ink); }
/* only the top bar of the page stays (its menu button opens the account menu: 切换到完整版); the rest of LF Agent goes */
body.lf-simple #main > :not(.topbar) { display: none !important; }
body.lf-simple #newChatTop { display: none; }
body.lf-simple #side .side-proj, body.lf-simple #sideList { display: none; }
/* the chat: everything right of a pinned sidebar and under the top bar, its content in one readable column */
body.lf-simple #tmPane { left: var(--sl, 0) !important; top: var(--st, 0) !important; right: 0 !important; width: auto !important; max-width: none !important;
  transform: none !important; visibility: visible !important; display: flex !important; border-left: 0; box-shadow: none; }
body.lf-simple #rsideResize, body.lf-simple #tmPane .rside-head, body.lf-simple .sidepane-scrim, body.lf-simple .rside-scrim { display: none !important; }
body.lf-simple #dThread > *, body.lf-simple #dStage > * { width: 100%; max-width: 820px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
body.lf-simple #sessHead .ch-in { max-width: 820px; margin: 0 auto; }
body.lf-simple #sessMeta, body.lf-simple #sessSide { display: none !important; }
body.lf-simple #dThread { font-size: 17px; line-height: 1.65; }
body.lf-simple #dThread .md, body.lf-simple #dThread .msg { font-size: 17px; }
body.lf-simple #dInput { font-size: 17px; line-height: 1.5; }
body.lf-simple #sessHead .ch-title, body.lf-simple #sessHead h1, body.lf-simple #sessHead .ch-name { font-size: 19px; }
/* nothing technical: no model, no context meter, no costs, at most three hints */
body.lf-simple #dModelWrap, body.lf-simple #dCtx, body.lf-simple .dcost, body.lf-simple .scost { display: none !important; }
body.lf-simple #starters .chip:nth-child(n+4) { display: none; }
body.lf-simple #starters .chip { font-size: 14px; padding: 4px 12px; }
/* 精简版: the sidebar keeps LF Agent and the account (切换到完整版 is in its menu); nothing that leads elsewhere */
body.lf-simple #side .side-top > :not([data-fx="overview"]) { display: none !important; }
body.lf-simple #side #pinList, body.lf-simple #side .side-pins { display: none !important; }
body.lf-simple #tmPane { z-index: 30; }   /* under the sidebar drawer and its scrim (the way to 切换到完整版 on a phone) */
body.lf-simple #side .side-foot { margin-top: auto; }   /* the account stays at the bottom, so its menu (切换到完整版) opens on screen */

/* Agent Flow: the small dashed ＋ at a box's right (owner 11-27: 右边那个加号消失了): 给它加一个 Subagent; on that box's
   hover, or for the selected box; at the end of its children column when it has some open */
.lr-kid-add { flex: none; width: 24px; height: 24px; margin-left: 10px; padding: 0; border: 1px dashed var(--field-line); border-radius: 7px; background: var(--bg);
  color: var(--faint); font: inherit; font-size: 15px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s; }
.lr-n > .lr-box:hover ~ .lr-kid-add, .lr-n.sel > .lr-kid-add, .lr-kid-add:hover, .lr-kid-add:focus-visible,
.lr-n > .lr-box:hover ~ .lr-kids > .lr-miniadd > .lr-kid-add, .lr-n.sel > .lr-kids > .lr-miniadd > .lr-kid-add { opacity: 1; }
.lr-kid-add:hover { border-color: var(--accent); color: var(--accent); }
.lr-kids > .lr-n.lr-miniadd { padding: 2px 0 4px 18px; }
.lr-kids > .lr-n.lr-miniadd::before, .lr-kids > .lr-n.lr-miniadd::after { display: none; }
.lr-kids > .lr-n.lr-miniadd > .lr-kid-add { margin-left: 0; }
@media (hover: none) { .lr-kid-add { opacity: .7; } }

/* ---------- Agent Flow's canvas scrolls both ways (owner 11-27): scrollbars that stay visible (macOS hides overlay
   ones, so a mouse had no sign the tree went on), and a drag on empty canvas pans it (overview.js, .tpan) ---------- */
.has-rail .tscroll::-webkit-scrollbar { width: 11px; height: 11px; }
.has-rail .tscroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--faint) 45%, transparent); border: 3px solid transparent; border-radius: 8px; background-clip: padding-box; }
.has-rail .tscroll::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--faint) 75%, transparent); }
.has-rail .tscroll::-webkit-scrollbar-track, .has-rail .tscroll::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) { .has-rail .tscroll { scrollbar-width: thin; } }
.has-rail .tscroll.tpan { cursor: grabbing; user-select: none; }
.has-rail .tscroll.tpan * { cursor: grabbing !important; }
/* the tree's wrapper is as wide as the tree, so its right padding is inside the scroll: nothing sits flush at the right edge */
.has-rail .tscroll .lr-page > .lr-wrap { width: max-content; min-width: 100%; box-sizing: border-box; padding-right: 24px; }

/* ---------- 精简版 never traps anyone (owner 11-27, live bug): 切换到完整版 always on screen, top right; a plain line with
   新对话 in front of the chat when LF Agent's chat isn't there (overview.js simpleWhy) ---------- */
.simple-off, .simple-why { display: none; }
body.lf-simple .simple-off { display: inline-flex; align-items: center; position: fixed; top: calc(var(--simple-t, 0px) + 10px); right: 16px; z-index: 45;
  min-height: 30px; padding: 0 12px; font-size: 13px; background: var(--bg); }
body.lf-simple #sessHead { padding-right: 150px; }
body.lf-simple .simple-why:not([hidden]) { display: flex; align-items: center; justify-content: center; position: fixed; left: var(--simple-l, 0px); top: var(--simple-t, 0px);
  right: 0; bottom: 0; z-index: 40; padding: 24px; background: var(--bg); }
.simple-why-in { max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.simple-why-t { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; line-height: 1.5; color: var(--ink); }
.simple-why-in .hint { margin: 0; font-size: 14px; }
.simple-why-in .btn { margin-top: 6px; min-height: 36px; padding: 0 18px; font-size: 15px; }
@media (max-width: 860px) {   /* a phone: in the top bar's free right end, not over the chat */
  body.lf-simple .simple-off { top: max(4px, calc((var(--simple-t, 44px) - 30px) / 2)); right: 10px; padding: 0 10px; }
  body.lf-simple #sessHead { padding-right: 0; }
}

/* ---------- 等你 lives in the chat (owner 11-27: 卡片要在chat里): no block at the top of Agent Flow; a box that waits on
   the person shows 等你 with a small warning dot (the cards and tabs have theirs: .tdot / .ts-dot .needs) ---------- */
.lr-box.st-needs .lr-st-w::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 5px 1px 0; border-radius: 50%; background: var(--warn); vertical-align: middle; }
.lr-box.st-needs .lr-st-w { color: var(--warn); font-weight: 500; }
.tm2-st.needs::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); margin-right: 6px; vertical-align: 1px; }

/* owner 11-27: 「把清理功能删了」: no 清空已完成 in Agent Flow (delete agents one by one from their ⋯) */
#tmClearSlot { display: none !important; }

/* ---------- each group ends in its own 「+ 加一个 Agent」 (owner 11-27: 每个section下面要有个地方留给加号): always there,
   smaller than the column's own, a little room before the next group's head; a box dragged onto it joins the group ---------- */
.lr-kids > .lr-slot.lr-gslot { opacity: 1; padding-top: 3px; padding-bottom: 14px; }
.lr-gslot .tm-addslot:not(.edit) { min-height: 32px; min-width: 148px; padding: 0 10px; font-size: 12px; gap: 5px; color: var(--faint); }
.lr-gslot .tm-addslot:not(.edit) .tadd-p { font-size: 14px; }
.lr-gslot .tm-addslot.tdrop { border-color: var(--accent); color: var(--ink); background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* ---------- the add box's folder is required (owner 11-27): 「选择文件夹…」 in muted text until one is chosen, 添加 waits;
   the picker's subfolders are indented by depth like the file panel (17 px a level, the guide line at each) ---------- */
.tfp-b.none .tfp-t { color: var(--faint); }
.tadd-go[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.tfp-pop .ftree.ft-guide { margin-left: 13px; padding-left: 4px; border-left: 1px solid var(--line); }

/* ---------- hidden helpers stay hidden, in 精简版 too (owner 11-27: his copied page text had 「No file chosen」 twice and
   「跳到正文」): the native file inputs behind 📎 keep their 1 px box (精简版's full-width rule no longer stretches
   #dFilePick) and, like the skip link, are left out of a select-all copy; the skip link still shows on keyboard focus ---------- */
input[type="file"].sr-only { width: 1px !important; height: 1px !important; max-width: 1px !important; margin: -1px !important; pointer-events: none; -webkit-user-select: none; user-select: none; }
.skip { -webkit-user-select: none; user-select: none; }
.skip:not(:focus) { clip-path: inset(50%); }

/* ---------- a group header's ＋ beside its ⋯ (owner 11-28: "add an icon"): the same size and look, the group's add box ---------- */
.lr-hd-m.lr-hd-plus { font-size: 16px; }
.lr-hd-m.lr-hd-plus:hover { color: var(--accent-text, var(--accent)); }

/* ---------- 飞书机器人 is a section of LF Agent's card (owner 11-28, picked A): LF Agent · 对话 | 飞书机器人 (its state,
   飞书机器人/, its chats, + 新对话) | 成果, a hairline between; no card of its own ---------- */
.trail-hr { flex: none; height: 0; margin: 10px 4px 8px; border-top: .5px solid var(--line); }
.tlark.tl-sec { display: flex; flex-direction: column; min-width: 0; }
.tlark.tl-sec > .trail-h { margin-top: 0; }
.tlark.tl-sec.on > .trail-h { background: var(--hover); }
.tlark.tl-sec .tl-ic { width: 14px; height: 14px; flex: none; color: var(--muted); }
.tlark.tl-sec .tl-s { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; }

/* ---------- folder levels, one style for the file panel and the folder picker (owner 11-28, A+B): an opened folder's
   children sit in a lightly tinted block (nested blocks read a little darker, no more past the third level); on its left
   edge a 1.5 px amber line under the parent's folder icon, down to the last child's middle, and a 12 px amber branch to
   each child row. Rows keep their height, arrows, counts, selection and clicks. ---------- */
#tmFiles .ftree.ft-guide, .tfp-pop .ftree.ft-guide {
  --lvl-tint: color-mix(in srgb, var(--ink) 3.5%, transparent);
  position: relative; margin: 0 0 1px 28px; padding: 0; border-left: 0; border-radius: 0 6px 6px 0; background: var(--lvl-tint); }
#tmFiles .ft-guide .ft-guide .ft-guide .ft-guide, .tfp-pop .ft-guide .ft-guide .ft-guide .ft-guide { background: none; }   /* past three levels: the lines only */
#tmFiles .ftree.ft-guide > li, .tfp-pop .ftree.ft-guide > li { position: relative; padding-left: 12px; }
#tmFiles .ftree.ft-guide > li::before, .tfp-pop .ftree.ft-guide > li::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1.5px solid var(--ft-amber); pointer-events: none; }
#tmFiles .ftree.ft-guide > li:last-child::before, .tfp-pop .ftree.ft-guide > li:last-child::before { bottom: auto; height: 14px; }
#tmFiles .ftree.ft-guide > li::after, .tfp-pop .ftree.ft-guide > li::after {
  content: ''; position: absolute; left: 0; top: 13.25px; width: 12px; border-top: 1.5px solid var(--ft-amber); pointer-events: none; }
#tmFiles .ftree.ft-guide > li > .ft-row, .tfp-pop .ftree.ft-guide > li > .ft-row { padding-left: 1px; }
/* files in the file panel: a grey icon by type (a document, a sheet, a picture, a PDF, a page, a plain file); folders stay amber */
#tmFiles .ft-ic:not(.ft-dir):not(.ft-dir-open) { color: var(--muted); }
#tmFiles .ft-guide > li > .ftree.ft-guide, .tfp-pop .ft-guide > li > .ftree.ft-guide { margin-left: 27.75px; }   /* under a nested row's icon (its row starts 1 px in) */
#tmFiles > li > .ftree.ft-guide, .tfp-pop .tfp-tree > li > .ftree.ft-guide { margin-left: 30.75px; }   /* under a top row's icon */

/* a folder named in a reply (`销售部/`): the tree's amber folder icon at the start of its code chip; on LF Agent the chip
   opens that folder in the file panel (owner 11-28: 「这种有文件夹的都要来个文件夹logo」) */
code.fdir-code { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
code.fdir-code .ft-ic { width: 13px; height: 13px; flex: none; fill: none; stroke: var(--ft-amber, #b7791f); stroke-width: 1.4; stroke-linejoin: round; }
.fdlink { display: inline; padding: 0; margin: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; vertical-align: baseline; }
.fdlink:hover code.fdir-code { background: var(--hover); color: var(--ink); }
.fdlink:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }

/* ---------- 飞书机器人 in LF Agent's card as a light blue band (owner 11-28, B): edge to edge at the card's bottom (its
   corners rounded with the card's), no hairline above (the band is the divider), 成果 above it ---------- */
:root { --lark-band: color-mix(in srgb, #2f6fdb 8%, var(--bg)); --lark-band-on: color-mix(in srgb, #2f6fdb 17%, var(--bg)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --lark-band: color-mix(in srgb, #6f9be8 13%, var(--bg)); --lark-band-on: color-mix(in srgb, #6f9be8 24%, var(--bg)); } }
:root[data-theme="dark"] { --lark-band: color-mix(in srgb, #6f9be8 13%, var(--bg)); --lark-band-on: color-mix(in srgb, #6f9be8 24%, var(--bg)); }
.trail.tcard.has-lark { padding-bottom: 0; }
.trail.has-lark > .tlark.tl-sec { margin: 12px -8px 0; padding: 8px 8px 12px; background: var(--lark-band); border-top: .5px solid color-mix(in srgb, #2f6fdb 18%, var(--line)); border-radius: 0 0 11px 11px; }
.tnarrow .trail.has-lark { padding-bottom: 0; }
.tnarrow .trail.has-lark > .tlark.tl-sec { margin: 10px -10px 0; padding: 8px 10px 10px; border-radius: 0 0 7px 7px; }
.trail.has-lark > .tlark.tl-sec .tchat.on, .trail.has-lark > .tlark.tl-sec.on > .trail-h { background: var(--lark-band-on); }
.trail.has-lark > .tlark.tl-sec .tchat:not(.on):hover, .trail.has-lark > .tlark.tl-sec > .trail-h:hover { background: color-mix(in srgb, var(--lark-band-on) 60%, var(--lark-band)); }
.tnarrow .trail.has-lark > .tlark.tl-sec .tchat { background: var(--bg); }
.tnarrow .trail.has-lark > .tlark.tl-sec .tchat.on { background: var(--lark-band-on); }

/* the file panel's head (owner 11-28: 全部展开 / 全部收起 beside 上传 / 新建 / 刷新): six icons and 文件 fit the panel's 240 px;
   the title keeps its word, the icons are a little narrower here */
#tmFolder .thead-t { flex: none; }
#tmFolder .thead-b { width: 24px; }
#tmFolder .thead-sep { margin: 0 2px; }
#tmFolderAll[aria-busy="true"] { opacity: .55; cursor: progress; }

/* 精简版's wait card (11-28): 再试一次 and 新对话 side by side; nothing of 精简版 over the sign-in page */
.simple-why-b { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.simple-why-b .btn { margin-top: 0; }
body.lf-simple:has(#auth:not([hidden])) .simple-off, body.lf-simple:has(#auth:not([hidden])) .simple-why { display: none !important; }

/* ---------- a box whose folder was deleted (owner 11-28): 「文件夹已删除」 in a muted warning colour, the folder icon dimmed
   and struck through; the old path in the tooltip ---------- */
.lr-box .tdir.gone, .tm2-dir.gone { color: color-mix(in srgb, var(--warn) 70%, var(--faint)); cursor: default; position: relative; }
.lr-box .tdir.gone:hover { color: color-mix(in srgb, var(--warn) 70%, var(--faint)); text-decoration: none; }
.tdir.gone .tdir-i, .tm2-dir.gone .tdir-i { opacity: .45; }
.tdir.gone::before, .tm2-dir.gone::before { content: ''; position: absolute; left: 1px; top: 50%; width: 16px; border-top: 1.5px solid currentColor; transform: rotate(-35deg); opacity: .8; pointer-events: none; }

/* ---------- Agent Flow, clearer (owner 11-28: style A for the boxes, C's ＋ nodes in both places) ----------
   A box: a white card with a solid border a step darker than the hairlines; the open one: the accent's 1px border and
   a light accent fill. The tree lines 2 px in that stronger colour, so the structure reads first. 「+ 加一个 Agent」 is no
   dashed box but a node at the end of its line: a 16 px circle with ＋ on the line, then a small 「加一个」; the ＋ right of
   a box (给它加一个 Subagent) the same circle on a short stub. */
.lr { --bstrong: color-mix(in srgb, var(--ink) 20%, var(--bg)); --card: #fff; --tl: var(--bstrong); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lr { --bstrong: color-mix(in srgb, var(--ink) 26%, var(--bg)); --card: var(--panel); } }
:root[data-theme="dark"] .lr { --bstrong: color-mix(in srgb, var(--ink) 26%, var(--bg)); --card: var(--panel); }
.lr .lr-box:not(.root) { background: var(--card); border: 1px solid var(--bstrong); box-shadow: none; }
.lr .lr-box:not(.root):hover { border-color: color-mix(in srgb, var(--ink) 38%, var(--bg)); }
.lr .lr-box.st-needs:not(.on), .lr .lr-box.tbudget-on:not(.on) { border-color: var(--warn); }
.lr .lr-box.temp:not(.on) { border-style: dashed; }
.lr .lr-box.on, .lr .lr-box.on:hover { border: 1px solid var(--accent); box-shadow: none; background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.lr .lr-box.on .lr-acts { background: linear-gradient(to right, transparent, color-mix(in srgb, var(--accent) 8%, var(--card)) 14px); }
/* the lines: 2 px */
.lr .lr-kids::before, .lr .lr-kids > .lr-n::after, .lr .lr-kids > .lr-slot::after { border-top-width: 2px; border-top-color: var(--tl); }
.lr .lr-kids > .lr-n::before, .lr .lr-kids > .lr-slot::before { border-left-width: 2px; border-left-color: var(--tl); }
/* 「+ 加一个 Agent」 on the canvas: a node on its line, then 「加一个」 */
.lr .lr-kids > .lr-slot { opacity: 1; }
.lr .lr-slot .tm-addslot:not(.edit) { min-width: 0; min-height: 26px; width: auto; padding: 0 6px 0 0; margin-left: -2px; gap: 6px; border: 0; border-radius: 0;
  background: none; justify-content: flex-start; color: var(--muted); font-size: 12px; box-shadow: none; }
.lr .lr-slot .tm-addslot:not(.edit) .tadd-p { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 16px; height: 16px; box-sizing: border-box;
  border: 1.5px solid var(--bstrong); border-radius: 50%; background: var(--bg); font-size: 13px; line-height: 1; color: var(--muted); }
.lr .lr-slot .tm-addslot:not(.edit):hover, .lr .lr-slot .tm-addslot:not(.edit):focus-visible { background: none; color: var(--ink); }
.lr .lr-slot .tm-addslot:not(.edit):hover .tadd-p, .lr .lr-slot .tm-addslot:not(.edit):focus-visible .tadd-p { border-color: var(--accent); color: var(--accent); }
.lr .lr-slot .tm-addslot.tdrop:not(.edit) .tadd-p { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
.lr .lr-kids > .lr-slot.lr-gslot { padding-top: 4px; padding-bottom: 12px; }
/* the ＋ right of a box: the same node, on a short stub from the box */
.lr .lr-kid-add { position: relative; width: 16px; height: 16px; margin-left: 14px; box-sizing: border-box; border: 1.5px solid var(--bstrong); border-radius: 50%; background: var(--bg);
  color: var(--muted); font-size: 13px; line-height: 13px; display: inline-flex; align-items: center; justify-content: center; }
.lr .lr-kid-add::before { content: ""; position: absolute; right: 100%; top: 50%; width: 14px; margin-top: -1px; border-top: 2px solid var(--bstrong); }
.lr .lr-kid-add:hover, .lr .lr-kid-add:focus-visible { border-color: var(--accent); color: var(--accent); }
.lr .lr-kids > .lr-n.lr-miniadd > .lr-kid-add { margin-left: 0; }
.lr .lr-kids > .lr-n.lr-miniadd > .lr-kid-add::before { display: none; }       /* at the end of a children column the column's line leads to it */
.lr .lr-kids > .lr-n.lr-miniadd { padding-left: 11px; }
.lr .lr-kids > .lr-n.lr-miniadd::before { top: -6px; bottom: 50%; border-left: 2px solid var(--tl); }
.lr .lr-kids > .lr-n.lr-miniadd::after { width: 11px; border-top: 2px solid var(--tl); }
/* its stub only with its ＋ (on the box's hover, for the open box, on a touch screen) */
.lr .lr-n > .lr-box:hover ~ .lr-kids > .lr-n.lr-miniadd::before, .lr .lr-n > .lr-box:hover ~ .lr-kids > .lr-n.lr-miniadd::after,
.lr .lr-n.sel > .lr-kids > .lr-n.lr-miniadd::before, .lr .lr-n.sel > .lr-kids > .lr-n.lr-miniadd::after,
.lr .lr-kids > .lr-n.lr-miniadd:hover::before, .lr .lr-kids > .lr-n.lr-miniadd:hover::after { display: block; }
@media (hover: none) { .lr .lr-kids > .lr-n.lr-miniadd::before, .lr .lr-kids > .lr-n.lr-miniadd::after { display: block; } }
@media (hover: none) { .lr .lr-kid-add { opacity: 1; } }

/* the ＋ nodes bigger and the one right of a box always there (owner 11-28: 「加号要大一点好吧，然后要一直出现怎么样？」):
   24 px rings of about 1.75 px, a bolder ＋, 「加一个」 at 13 px; quiet at rest, the accent under the pointer. The node right
   of a box starts 22 px out, past the box's 「‹」 fold button, on a stub from the box */
.lr .lr-slot .tm-addslot:not(.edit) { min-height: 32px; gap: 8px; font-size: 13px; margin-left: -4px; }
.lr .lr-slot .tm-addslot:not(.edit) .tadd-p, .lr .lr-kid-add { width: 24px; height: 24px; border-width: 1.75px; font-size: 18px; font-weight: 500; line-height: 1; }
.lr .lr-kid-add { opacity: 1; margin-left: 22px; color: var(--muted); }
.lr .lr-kid-add::before { width: 22px; }
.lr .lr-kid-add:hover, .lr .lr-kid-add:focus-visible { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.lr .lr-slot .tm-addslot:not(.edit):hover .tadd-p { background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
/* at the end of a box's children column: always there too, its line with it */
.lr .lr-kids > .lr-n.lr-miniadd { padding: 4px 0 6px 13px; }
.lr .lr-kids > .lr-n.lr-miniadd::before, .lr .lr-kids > .lr-n.lr-miniadd::after { display: block; }
.lr .lr-kids > .lr-n.lr-miniadd::after { width: 13px; }
.lr .lr-kids > .lr-n.lr-miniadd > .lr-kid-add { margin-left: 0; }

/* ---------- Agent Flow's ＋, as dashed boxes with only a ＋ in them (owner 11-28: 「就一个加号，以及那框框，然后用 D 的那种
   方框」): no circles, no 「加一个」 (the tooltip / aria-label still says it). Right of a box (给它加一个 Subagent): 34×40, on a
   short solid stub from the box. A group's end, the end of a box's children column: as wide as a card, 30 px tall,
   joined to the tree line. 1.5 px dashed in the stronger border colour, radius 8; the ＋ two 14×2 bars drawn as
   backgrounds, so it sits exactly in the middle at any zoom; border and ＋ in the accent under the pointer. ---------- */
.lr { --plus: linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat; }
.lr .lr-kid-add, .lr .lr-slot .tm-addslot:not(.edit) {
  box-sizing: border-box; padding: 0; border: 1.5px dashed var(--bstrong); border-radius: 8px; color: var(--faint, var(--muted));
  background: var(--plus), var(--bg); font-size: 0; line-height: 0; font-weight: 400; opacity: 1; }
.lr .lr-kid-add { width: 34px; height: 40px; margin-left: 22px; }
.lr .lr-kid-add::before { width: 22px; right: calc(100% + 1.5px); margin-top: -1px; border-top: 2px solid var(--tl); }
.lr .lr-slot .tm-addslot:not(.edit) { width: 148px; min-width: 148px; height: 30px; min-height: 30px; margin-left: 0; gap: 0; justify-content: center; }
.lr .lr-slot .tm-addslot:not(.edit) > .tadd-p, .lr .lr-slot .tm-addslot:not(.edit) > .tadd-t { display: none; }
.lr .lr-kids > .lr-n.lr-miniadd > .lr-kid-add { width: 148px; height: 30px; margin-left: 0; }
.lr .lr-kid-add:hover, .lr .lr-kid-add:focus-visible, .lr .lr-slot .tm-addslot:not(.edit):hover, .lr .lr-slot .tm-addslot:not(.edit):focus-visible {
  border-color: var(--accent); color: var(--accent); background: var(--plus), color-mix(in srgb, var(--accent) 6%, var(--bg)); }
.lr .lr-slot .tm-addslot.tdrop:not(.edit) { border-color: var(--accent); color: var(--accent); background: var(--plus), color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.lr .lr-kids > .lr-slot.lr-gslot { padding-top: 5px; padding-bottom: 12px; }

/* one unbroken 2 px line from a box, through its 「‹」, down its children column to each child and on into the ＋ box at
   the column's end (owner 11-28: the line box → ‹ → children did not meet, a gap at the children's side): a column that
   ends in the ＋ keeps its vertical line from the first child's middle down to the ＋'s middle, one child or many */
.lr .lr-kids:has(> .lr-n.lr-miniadd) > .lr-n.kz:not(.lr-miniadd)::before { bottom: 0; }
.lr .lr-kids:has(> .lr-n.lr-miniadd) > .lr-n.k1.kz::before { display: block; top: 50%; bottom: 0; }
.lr .lr-kids > .lr-n.lr-miniadd { padding: 5px 0 5px 18px; }
.lr .lr-kids > .lr-n.lr-miniadd::before { display: block; top: 0; bottom: 50%; border-left: 2px solid var(--tl); }
.lr .lr-kids > .lr-n.lr-miniadd::after { display: block; width: 18px; border-top: 2px solid var(--tl); }
.lr .lr-tog { z-index: 2; }                                         /* the 「‹」 sits on the line, over it */

/* the wide ＋ boxes (a group's end, the end of a children column) say one more thing after the ＋ (owner 11-28:
   「其实平行agent也能干很多事是吧 加一句话」): 再加一个 Agent，可以同时分头做事, 13 px, muted, on one line; the box as wide as
   that needs (at least a card), ＋ and words centred together. The small boxes right of a card stay ＋ only. */
.lr .lr-slot .tm-addslot:not(.edit), .lr .lr-kids > .lr-n.lr-miniadd > .lr-kid-add {
  width: auto; min-width: 148px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--bg); font-size: 13px; line-height: 1; white-space: nowrap; }
.lr .lr-slot .tm-addslot:not(.edit) > .tadd-p, .lr .lr-kids > .lr-n.lr-miniadd > .lr-kid-add > .tadd-p {
  display: inline-block; flex: none; width: 14px; height: 14px; border: 0; border-radius: 0; font-size: 0; background: var(--plus); }
.lr .lr-slot .tm-addslot:not(.edit) > .tadd-t, .lr .lr-kids > .lr-n.lr-miniadd > .lr-kid-add > .tadd-t { display: inline; font-size: 13px; color: var(--muted); }
.lr .lr-slot .tm-addslot:not(.edit):hover, .lr .lr-slot .tm-addslot:not(.edit):focus-visible,
.lr .lr-kids > .lr-n.lr-miniadd > .lr-kid-add:hover, .lr .lr-kids > .lr-n.lr-miniadd > .lr-kid-add:focus-visible { background: color-mix(in srgb, var(--accent) 6%, var(--bg)); }
.lr .lr-slot .tm-addslot:not(.edit):hover > .tadd-t, .lr .lr-kids > .lr-n.lr-miniadd > .lr-kid-add:hover > .tadd-t { color: var(--ink); }
.lr .lr-slot .tm-addslot:not(.edit), .lr .lr-kids > .lr-n.lr-miniadd > .lr-kid-add { flex: none; max-width: none; }     /* never squeezed: the line stays whole */
.lr .lr-slot .tm-addslot:not(.edit) > .tadd-t, .lr .lr-kids > .lr-n.lr-miniadd > .lr-kid-add > .tadd-t { overflow: visible; text-overflow: clip; }
.lr .lr-slot .tm-addslot:not(.edit), .lr .lr-kids > .lr-n.lr-miniadd > .lr-kid-add { width: max-content !important; }   /* evenBoxes sets one width for a column; this line needs its own */

/* ---------- Agent Flow: the small ＋ right of a box hides at rest (owner 11-28: 「这些自动隐藏」) ----------
   It and its stub (its ::before) fade in over 120 ms while the pointer is on that box or on the ＋; its space stays, so
   nothing moves. An invisible strip over the stub keeps it shown on the way from the box to the ＋. While its add slot
   is open the slot is drawn instead. Touch screens always show it; the wide ＋ at a column's end is not touched. */
.lr .lr-n:not(.lr-miniadd) > .lr-kid-add { opacity: 0; transition: opacity .12s; }
.lr .lr-n:not(.lr-miniadd) > .lr-box:hover ~ .lr-kid-add, .lr .lr-n:not(.lr-miniadd) > .lr-kid-add:hover,
.lr .lr-n:not(.lr-miniadd) > .lr-kid-add:focus-visible { opacity: 1; }
.lr .lr-n:not(.lr-miniadd) > .lr-kid-add::after { content: ""; position: absolute; right: 100%; top: 0; bottom: 0; width: 24px; }
.lr .lr-kids > .lr-n.lr-miniadd > .lr-kid-add { opacity: 1; }
@media (hover: none) { .lr .lr-n:not(.lr-miniadd) > .lr-kid-add { opacity: 1; } }

/* ---------- Agent Flow drag, easier (owner 11-28, A) ----------
   The pointer carries a small pill (↕ and the name, accent border) just right of and below it, never the whole card; the
   card dims where it was. Each group shows a big dashed zone at its end, 「放到「组名」」; the one the drop would go to turns
   accent. Between two cards of the same group a 3 px accent bar, the two cards 6 px apart; the middle of a box outlines
   it in the accent with 「放到它下面」. The group's own add slots step aside while a box is dragged. */
.tpill { position: fixed; z-index: 60; pointer-events: none; display: inline-flex; align-items: center; gap: 6px; max-width: 240px; box-sizing: border-box;
  padding: 5px 12px 5px 10px; border: 1.5px solid var(--accent); border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 13px; line-height: 1.3;
  white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.tpill > .tpill-i { flex: none; color: var(--accent); font-size: 13px; }
.tpill > .tpill-n { overflow: hidden; text-overflow: ellipsis; }
.lr .lr-box.tdragging, .tm2-r.tdragging { opacity: .35; }
.tdrag .tstem > .lr-kids > .lr-slot { display: none; }
.lr .lr-kids > .lr-n.lr-dz { padding: 4px 0 12px 18px; }
.lr .lr-kids > .lr-n.lr-dz::before { bottom: auto; height: calc(4px + 22px); }
.lr .lr-kids > .lr-n.lr-dz::after { top: calc(4px + 22px); }
.lr-dz-b { box-sizing: border-box; display: flex; align-items: center; justify-content: center; min-width: 148px; height: 44px; padding: 0 14px;
  border: 1.5px dashed var(--bstrong, var(--field-line)); border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 13px; white-space: nowrap;
  transition: background .1s, border-color .1s, color .1s; }
.lr-dz.tdz-on > .lr-dz-b { border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg)); color: var(--accent); font-weight: 500; }
.tdropline { height: 3px; border-radius: 2px; }
.lr .lr-box.tnudge-up { transform: translateY(-3px); }
.lr .lr-box.tnudge-dn { transform: translateY(3px); }
.lr .lr-box { transition: transform .1s; }
.lr .lr-box.tdrop:not(.root), .lr .lr-box.tdrop:not(.root):hover { position: relative; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--card, var(--bg))); }
.tdrop-x { position: absolute; right: 8px; bottom: 6px; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; line-height: 18px;
  pointer-events: none; white-space: nowrap; }
.tm2-r.tdrop { position: relative; }
.tdrop-x { top: -10px; bottom: auto; right: 10px; }    /* on the box's top border: the status line stays readable */

/* a chat's one name in LF Agent's card (owner 11-28): the whole name, cut with … when long (the tooltip has it all) */
.trail .tchat .tchat-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Agent Flow: stronger borders and selection (owner 11-28: 「边框以及选中颜色都要加重啊！」) ----------
   Cards: a 1.5 px border a clear step darker (dark: #5a5a58 on a card a touch lighter than the canvas); the open one: the
   accent at full strength, 2 px (1.5 px border + .5 px ring, so nothing moves), on an accent tint (12 % light, 20 % dark).
   The tree lines and the dashed ＋ boxes step up with them (dark lines #6a6a68). LF Agent's card when one of its chats is
   open, and the open chat row (飞书 band too), take the same accent. */
.lr { --bstrong: color-mix(in srgb, var(--ink) 30%, var(--bg)); --tl: color-mix(in srgb, var(--ink) 30%, var(--bg)); --selfill: color-mix(in srgb, var(--accent) 12%, var(--card, var(--bg))); --selrow: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lr { --bstrong: #5a5a58; --tl: #6a6a68; --card: #31312f; --selfill: color-mix(in srgb, var(--accent) 20%, #31312f); --selrow: color-mix(in srgb, var(--accent) 20%, var(--bg)); } }
:root[data-theme="dark"] .lr { --bstrong: #5a5a58; --tl: #6a6a68; --card: #31312f; --selfill: color-mix(in srgb, var(--accent) 20%, #31312f); --selrow: color-mix(in srgb, var(--accent) 20%, var(--bg)); }
.lr .lr-box:not(.root) { border-width: 1.5px; }
.lr .lr-box:not(.root):hover { border-color: color-mix(in srgb, var(--ink) 45%, var(--bg)); }
.lr .lr-box.st-needs:not(.on), .lr .lr-box.tbudget-on:not(.on) { border-color: var(--warn); }
.lr .lr-box.on, .lr .lr-box.on:hover { border: 1.5px solid var(--accent); box-shadow: 0 0 0 .5px var(--accent); background: var(--selfill); }
.lr .lr-box.on .lr-acts { background: linear-gradient(to right, transparent, var(--selfill) 14px); }
.lr .lr-box.tdrop:not(.root) { border-width: 1.5px; }
/* the LF Agent card: its border, and the accent when one of its chats is open */
.lr .trail.tcard { border: 1.5px solid var(--bstrong); }
.lr .trail.tcard.on { border: 1.5px solid var(--accent); box-shadow: 0 0 0 .5px var(--accent); }
/* the open chat row, in the card's list and in the 飞书 band */
.lr .trail .tchat.on, .lr .trail.has-lark > .tlark.tl-sec .tchat.on, .lr .trail.has-lark > .tlark.tl-sec.on > .trail-h { background: var(--selrow); box-shadow: inset 0 0 0 1.5px var(--accent); }
/* Chrome rounds a 1.5 px border down to 1 px: the extra width is a ring instead (a 1 px border + a .5 px ring; the open one
   1 px + 1 px = 2 px), and nothing moves between the states */
.lr .lr-box:not(.root) { border-width: 1px; box-shadow: 0 0 0 .5px var(--bstrong); }
.lr .lr-box:not(.root):hover { box-shadow: 0 0 0 .5px color-mix(in srgb, var(--ink) 45%, var(--bg)); }
.lr .lr-box.st-needs:not(.on), .lr .lr-box.tbudget-on:not(.on) { box-shadow: 0 0 0 .5px var(--warn); }
.lr .lr-box.on, .lr .lr-box.on:hover { border: 1px solid var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lr .lr-box.tdrop:not(.root) { border-width: 1px; box-shadow: 0 0 0 1px var(--accent); }
.lr .trail.tcard { border: 1px solid var(--bstrong); box-shadow: 0 0 0 .5px var(--bstrong); }
.lr .trail.tcard.on { border: 1px solid var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* ---------- Agent Flow: thicker still (owner 11-28: 「边框加粗！」) ----------
   Cards and LF Agent's card: a 2 px border; the open one: the same 2 px border in the accent plus a 1 px accent ring outside
   (3 px), so the text never moves when the selection changes. Tree lines stay 2 px. */
.lr .lr-box:not(.root) { border-width: 2px; box-shadow: none; }
.lr .lr-box:not(.root):hover { box-shadow: none; }
.lr .lr-box.st-needs:not(.on), .lr .lr-box.tbudget-on:not(.on) { box-shadow: none; }
.lr .lr-box.on, .lr .lr-box.on:hover { border: 2px solid var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lr .lr-box.tdrop:not(.root) { border-width: 2px; box-shadow: 0 0 0 1px var(--accent); }
.lr .trail.tcard { border: 2px solid var(--bstrong); box-shadow: none; }
.lr .trail.tcard.on { border: 2px solid var(--accent); box-shadow: 0 0 0 1px var(--accent); }
/* the selected border (owner 11-28: 「选中的边框也加个颜色！」): a saturated orange at full strength, never muted: #D85A30
   light, a brighter #F0784A on the dark canvas; LF Agent's card and the open chat row the same */
.lr { --selb: #d85a30; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lr { --selb: #f0784a; } }
:root[data-theme="dark"] .lr { --selb: #f0784a; }
.lr .lr-box.on, .lr .lr-box.on:hover { border-color: var(--selb); box-shadow: 0 0 0 1px var(--selb); }
.lr .trail.tcard.on { border-color: var(--selb); box-shadow: 0 0 0 1px var(--selb); }
.lr .trail .tchat.on, .lr .trail.has-lark > .tlark.tl-sec .tchat.on, .lr .trail.has-lark > .tlark.tl-sec.on > .trail-h { box-shadow: inset 0 0 0 1.5px var(--selb); }

/* voice input, our own (owner 11-28): recording = a red dot and the time on the mic; then 转写中… */
#micBtn.rec, #dMicBtn.rec, #micBtn.busy, #dMicBtn.busy { width: auto; gap: 6px; padding: 0 10px 0 8px; border-radius: 999px; }
#micBtn.rec, #dMicBtn.rec { color: #d6332b; background: color-mix(in srgb, #d6332b 12%, transparent); }
#micBtn.rec::before, #dMicBtn.rec::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #d6332b;
  animation: micPulse 1.2s ease-in-out infinite; flex: none; }
#micBtn.rec .ic, #dMicBtn.rec .ic { display: none; }
#micBtn .mic-t, #dMicBtn .mic-t { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#micBtn.busy .ic, #dMicBtn.busy .ic { animation: micPulse 1s ease-in-out infinite; }
#micBtn.busy, #dMicBtn.busy { color: var(--muted); }
@keyframes micPulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { #micBtn.rec::before, #dMicBtn.rec::before, #micBtn.busy .ic, #dMicBtn.busy .ic { animation: none; } }

/* voice input's live words (owner 11-28): the box's text see-through, an overlay draws it with the words not yet
   final in grey italics (app.js vGhost) */
textarea.mic-ghosting { color: transparent !important; caret-color: var(--ink); }   /* he can edit while it records */
.mic-ghost { position: absolute; z-index: 1; pointer-events: none; overflow: hidden; white-space: pre-wrap;
  border-style: solid; border-color: transparent; background: transparent; color: var(--ink); margin: 0; }
.mic-ghost .prov { color: var(--muted); font-style: italic; }

/* ---------- the phone's Agent page, layout B (owner 11-28): grouped cards like the iPhone's settings; light: white cards on
   the page grey; dark: raised cards on the dark page. Only in the narrow layout (.tnarrow .ph). ---------- */
.tnarrow { --ph-card: #fff; --ph-page: var(--side-bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tnarrow { --ph-card: var(--panel); } }
:root[data-theme="dark"] .tnarrow { --ph-card: var(--panel); }
.tnarrow .tscroll.ph { background: var(--ph-page); padding: 12px 14px 28px; }
.ph-page { display: flex; flex-direction: column; }
.ph-card { position: relative; display: flex; flex-direction: column; background: var(--ph-card); border-radius: 12px; overflow: hidden; margin: 0 0 6px; }
.ph-card.ph-top { border-radius: 14px; border: 2px solid transparent; margin-bottom: 4px; }
.ph-card.ph-top.on { border-color: var(--accent); }
.ph-gh { margin: 16px 4px 7px; font-size: 12.5px; color: var(--muted); }
.ph-row { position: relative; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; font-size: 15px; color: var(--ink);
  cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ph-row + .ph-row, .ph-card > .ph-add { border-top: .5px solid var(--line); }
.ph-row:active, .ph-row.on { background: color-mix(in srgb, var(--ink) 5%, var(--ph-card)); }
.ph-row:focus { outline: none; }
.ph-row:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.ph-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-main .ph-name { font-weight: 600; }
.ph-gap { flex: 1; min-width: 6px; }
.ph-meta { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }
.ph-meta.working { color: var(--accent); }
.ph-meta.needs { color: var(--warn); font-weight: 500; }
.ph-meta.failed { color: var(--bad); }
.ph-chev { flex: none; font-size: 17px; line-height: 1; color: var(--faint); }
.ph-new .ph-name { color: var(--accent); }
.ph-sub { padding-left: 34px; }
.ph-sub.d3 { padding-left: 52px; }
.ph-sub.d4 { padding-left: 68px; }
.ph-arrow { flex: none; color: var(--faint); }
.ph-row.temp .ph-name { color: var(--muted); }
.ph-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.ph-dot.listen { background: #3cb179; }
.ph-dot.working { background: var(--accent); }
.ph-dot.needs { background: var(--warn); }
.ph-dot.off, .ph-dot.offline, .ph-dot.stopped { background: var(--faint); }
.ph-row.ph-lark { background: var(--lark-band); }
.ph-row.ph-lark.on, .ph-row.ph-lark:active { background: var(--lark-band-on); }
.ph-row.ph-lark.ph-chat, .ph-row.ph-lark.ph-new { padding-left: 32px; }
.ph-larkh.open .ph-chev { transform: rotate(90deg); }
.ph-more { position: absolute; right: 10px; top: 50%; width: 22px; height: 22px; margin-top: -11px; padding: 0; border: 0; background: none; opacity: 0; pointer-events: none; }
.ph-card > .ph-add { list-style: none; padding: 0; margin: 0; }
.ph-card > .ph-add .tm-addslot:not(.edit) { width: 100%; min-height: 46px; justify-content: flex-start; padding: 0 16px; border: 0; border-radius: 0; background: none; color: var(--muted); font-size: 14px; }
.ph-card > .ph-add .tm-addslot.edit { margin: 8px; }

/* 在这台电脑上安装 (agent_install.py): the box on 电脑 with no computer, in 设备 and in its dialog */
.install-box { margin: 14px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card, transparent); max-width: 640px; }
.install-box .install-h { margin: 0 0 4px; font-weight: 600; font-size: 14px; }
.install-box .hint { margin: 6px 0; }
.install-box .install-go { margin-top: 8px; }
.install-out { margin-top: 10px; }
.install-pre { margin: 0 0 8px; padding: 10px 12px; border-radius: 8px; background: var(--code-bg, rgba(127, 127, 127, .12)); white-space: pre-wrap; word-break: break-all; font-size: 12.5px; user-select: all; }
.install-off { font-size: 12px; }

/* LF Agent's 安装 right after 云 | 电脑 (owner 11-30): quiet next to the switch; the accent while no computer is connected */
.side-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.side-install { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px;
  background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.side-install .ic { width: 14px; height: 14px; }
.side-install:hover { color: var(--ink); background: var(--hover); }
.side-install:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.side-install.want { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.side-install.want:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
@media (max-width: 860px) { .side-row .side-switch { flex: 1 1 auto; min-width: 0; } .side-install { height: 36px; } }

/* ---------- card answers (owner 11-30): a run of the same answer is one quiet line that opens; 已撤回 small and muted ---------- */
.dline.cardsum { display: block; margin: 0 0 26px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted); text-align: left; cursor: pointer; text-decoration: none; }
.dline.cardsum:hover { color: var(--ink); }
.dline.cardans:not([hidden]) + .dline.cardans { margin-top: -18px; }
.dline.cardans.quiet { font-size: 12px; color: var(--faint); }
/* a card's detail opened in full (owner 11-30: every card is read and answered on the web, up to 60,000 characters): it
   scrolls inside the card instead of running down the page */
.appr .acode.open { max-height: 60vh; overflow: auto; }

/* ---------- 「LF Agent」 and 「飞书机器人」 are corner tags, not chats (owner 11-30, B): a small coloured tag flush in the
   top-left corner (LF Agent orange with dark text, 飞书机器人 blue with white), the state muted at the right of the line,
   a small ⋯; never clickable, never selected. Desktop card, 飞书 band, phone top card. ---------- */
:root { --tag-lf: #D85A30; --tag-lark: #378ADD; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tag-lf: #F0784A; } }
:root[data-theme="dark"] { --tag-lf: #F0784A; }
.trail-tag, .tl-tag, .ph-tag { position: absolute; top: 0; left: 0; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  font-size: 11px; font-weight: 600; line-height: 1.35; white-space: nowrap; pointer-events: none; }
.trail-tag, .ph-tag { background: var(--tag-lf); color: #1f1e1d; }
.tl-tag, .ph-tag.lark { background: var(--tag-lark); color: #fff; }
.tl-tag .ic, .ph-tag .ic { width: 11px; height: 11px; }
.trail.tcard { position: relative; }
.trail.tcard > .trail-h.trail-tagline { position: static; min-height: 20px; margin: -8px -2px 2px 0; padding: 0; justify-content: flex-end; gap: 4px; cursor: default; background: none !important; box-shadow: none !important; }
.trail.tcard > .trail-h.trail-tagline .trail-tag { border-radius: 11px 0 8px 0; }
.trail-tagline .trail-s { margin-left: 0; color: var(--faint); font-size: 12px; }
.tlark.tl-sec { position: relative; }
.tlark.tl-sec > .trail-h.tl-tagline { position: static; min-height: 22px; margin: -4px -2px 4px 0; padding: 0; justify-content: flex-end; gap: 4px; cursor: default; background: none !important; }
.tlark.tl-sec > .trail-h.tl-tagline .tl-tag { border-radius: 0 0 8px 0; }
.tl-tagline .tl-s { margin-left: 0; color: var(--faint); font-size: 12px; }
.ph-card.ph-top { position: relative; }
.ph-tagline { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-height: 30px; padding: 0 8px 0 16px; }
.ph-tagline .ph-tag { border-radius: 0 0 8px 0; }
.ph-tagline.ph-lark { background: var(--lark-band); border-top: .5px solid var(--line); }
.ph-tagline .ph-meta { font-size: 12px; color: var(--faint); }
.ph-tmore button, .ph-tmore-b { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
.ph-tagline + .ph-row { border-top: 0; }
.trail.tcard > .trail-h.trail-tagline { padding-left: 72px; }
.trail-tagline .trail-s, .tl-tagline .tl-s { flex: 0 1 auto; min-width: 0; margin-left: auto; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlark.tl-sec > .trail-h.tl-tagline { padding-left: 96px; }

/* the file panel's path line (owner 11-30: the full path): click copies it; ⋯ on 电脑 has 复制路径 / 在 Finder 中显示 */
.tpath.copyable { cursor: pointer; border-radius: 6px; }
.tpath.copyable:hover { color: var(--ink); }
.tpath.copyable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tpath-b { max-width: 70%; overflow: hidden; text-overflow: ellipsis; }
.tpath-m { flex: none; margin-left: auto; padding: 0 4px; border: 0; border-radius: 5px; background: none; color: var(--muted); font: inherit; line-height: 1.2; cursor: pointer; }
.tpath-m:hover { color: var(--ink); background: var(--hover); }

/* ---------- status per chat, not on the tags (owner 11-30: 「status should not be at table level should be session
   level」): each chat row says its state and cost, muted; the tag lines keep only the tag and ⋯ and are never outlined;
   飞书's connection is a small line beside its folder ---------- */
.trail .tchat .tchat-s { flex: none; margin-left: auto; padding-left: 6px; font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.trail .tchat .tchat-s.working { color: var(--accent); }
.trail .tchat .tchat-s.needs { color: var(--warn); font-weight: 500; }
.trail .tchat .tchat-s + .tchat-m { margin-left: 2px; }
.trail.tcard > .trail-h.trail-tagline, .tlark.tl-sec > .trail-h.tl-tagline,
.lr .trail.has-lark > .tlark.tl-sec.on > .trail-h.tl-tagline, .lr .trail .trail-h.trail-tagline.sel { box-shadow: none !important; outline: none !important; background: none !important; }
.tl-statline { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 2px 0 2px; }
.tl-statline .tl-folder { margin: 0; }
.tl-conn { flex: none; margin-left: auto; font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.tl-conn.ok { color: #2f8f5b; }
.tl-conn.no { color: var(--muted); }
.ph-statline { display: flex; align-items: center; min-height: 24px; padding: 0 16px 4px; font-size: 12px; color: var(--faint); }
.ph-statline.ph-lark { background: var(--lark-band); }
.ph-statline.ok { color: #2f8f5b; }
.ph-tagline + .ph-statline + .ph-row { border-top: 0; }

/* LF Agent's top row (owner 11-30: 「pls rearrange reorganize」): [云 | 电脑] ⓘ [安装] … [精简版], nothing under it */
.side-row { position: relative; }
.side-info { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: none; color: var(--muted); cursor: pointer; }
.side-info .ic { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }
.side-info:hover, .side-info[aria-expanded="true"] { color: var(--ink); background: var(--hover); }
.side-info:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.side-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; max-width: min(320px, calc(100vw - 24px)); padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font-size: 13px; line-height: 1.5;
  box-shadow: 0 6px 24px rgba(20, 20, 19, .12); }
.side-pop[hidden] { display: none; }
.side-pop p { margin: 0; }
.side-pop .link { margin-top: 6px; font-size: 13px; }
.side-pop.first { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.side-row .tm-simple { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 8px; color: var(--muted); font-size: 13px; text-decoration: none; }
.side-row .tm-simple .ic { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.side-row .tm-simple:hover { color: var(--ink); background: var(--hover); }
.side-top .side-note[hidden] { display: none; }
@media (max-width: 860px) {
  .side-row { gap: 6px; }
  .side-row .tm-simple, .side-install { height: 36px; padding: 0 9px; font-size: 12.5px; }
  .side-pop { left: 0; right: 0; max-width: none; }
}

/* the path line's 打开文件夹 (owner 11-30: 「need 打开文件夹」, 电脑 only): a small outlined button at its right; icon only
   when the panel is narrow (the tooltip says it) */
.tpath { container-type: inline-size; }
.tpath-open { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border: 1px solid var(--line);
  border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 11.5px; white-space: nowrap; cursor: pointer; }
.tpath-open .ic { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
.tpath-open:hover { color: var(--ink); background: var(--hover); }
.tpath-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tpath-open + .tpath-m { margin-left: 2px; }
.tpath:has(.tpath-open) .tpath-b { padding-right: 8px; }      /* a gap before 打开文件夹 when the path is long */
@container (max-width: 200px) { .tpath-open-t { display: none; } .tpath-open { padding: 0 5px; } }

/* ---------- the 安装 panel, short (owner 11-30: 「太复杂了 这个字太多了」): narrow and calm ---------- */
.dlg:has(.inst-panel) { max-width: 440px; }
.inst-panel { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.inst-step { margin: 0; font-size: 14px; color: var(--ink); }
.inst-cmdbox { position: relative; padding: 10px 70px 10px 12px; border-radius: 8px; background: var(--code-bg, rgba(127, 127, 127, .12));
  font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.inst-cmdbox .install-cmd { background: none; padding: 0; user-select: all; }
.inst-copy { position: absolute; top: 7px; right: 7px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink);
  font: inherit; font-size: 12px; cursor: pointer; }
.inst-copy:hover { border-color: var(--accent); }
.inst-copy.done { color: #2f8f5b; border-color: color-mix(in srgb, #2f8f5b 50%, var(--line)); }
.inst-note { margin: 0; font-size: 12px; color: var(--faint); }
.inst-again { align-self: flex-start; }
.inst-foot { display: flex; justify-content: flex-end; }
.inst-off { font-size: 11.5px; color: var(--faint); }
.inst-off:hover { color: var(--muted); }
.inst-offcmd { margin: 0; font-size: 11.5px; }

/* LF Agent's 电脑 with no computer online (owner 11-30): a calm empty state in Agent Flow's place, 安装 / 切换到云 */
.pc-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 46vh; padding: 32px 20px; text-align: center; }
.pc-empty .pc-empty-i { width: 34px; height: 34px; color: var(--faint, var(--muted)); margin-bottom: 4px; }
.pc-empty-t { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.pc-empty-x { margin: 0; max-width: 340px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.pc-empty-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.pc-empty-acts .btn { min-height: 38px; padding: 0 18px; }
/* 云's 低配 / low capacity in the switch: small and grey, its tooltip says why */
.side-badge { margin-left: 5px; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; font-size: 10.5px; line-height: 15px; font-weight: 400;
  color: var(--faint, var(--muted)); white-space: nowrap; }
.side-badge:empty { display: none; }
@media (max-width: 860px) { .side-badge { margin-left: 3px; padding: 0 3px; font-size: 10px; } }

/* the inline install card: the short panel in a narrow card (owner 11-30) */
.install-box { max-width: 440px; }
.install-box .install-h { margin: 0 0 8px; }

/* ---------- the install panel in two numbered steps (owner 11-30): open Terminal (⌘ 空格 as key caps), then paste ---------- */
.inst-stepbox { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.inst-n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-text, var(--accent)); font-size: 12px; font-weight: 600; }
.inst-stepbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.inst-stepbody .inst-step { font-weight: 500; }
.inst-sub { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.inst-key { display: inline-block; min-width: 18px; padding: 0 5px; margin: 0 1px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
  background: var(--bg); color: var(--ink); font: inherit; font-size: 11.5px; line-height: 17px; text-align: center; }
.inst-panel { gap: 14px; }

/* a small terminal mark beside 「打开「终端」」 (owner 11-30): our own drawing; dark in light mode, a lifted dark in dark mode */
.inst-steprow { display: flex; align-items: center; gap: 8px; }
.inst-term { flex: none; width: 32px; height: 32px; }
.inst-term-bg { fill: #2b2b29; stroke: rgba(0, 0, 0, .25); stroke-width: 1; }
.inst-term-fg { fill: none; stroke: #f2f1ec; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .inst-term-bg { fill: #1b1b1a; stroke: rgba(255, 255, 255, .22); } }
:root[data-theme="dark"] .inst-term-bg { fill: #1b1b1a; stroke: rgba(255, 255, 255, .22); }

/* LF AI's own browser is open for the session's turn (browser_lf, 12-01): a quiet tag on its row and in its header */
.badge.brw { color: var(--accent); }
.hdev.hbrw { color: var(--accent); }
