/* PloughBot, clean full-page layout (Harry 21 Oct 2026: "clean, just like Claude or Grok Bot"). Loaded after layout.css.
 * Everything is scoped to .pbx so the rest of the console is untouched; body.pb-fullpage hides the console chrome. */
body.pb-fullpage { padding-left: 0; overflow: hidden; }
body.pb-fullpage header#top, body.pb-fullpage nav#nav, body.pb-fullpage #nav-scrim, body.pb-fullpage #phone-fab, body.pb-fullpage #alerts { display: none !important; }
body.pb-fullpage #banner:not(.error) { display: none; }
body.pb-fullpage #banner.error { position: fixed; z-index: 48; top: 10px; left: 50%; transform: translateX(-50%); max-width: 90vw; border-radius: 10px; }
body.pb-fullpage .phonebar { top: max(.6rem, env(safe-area-inset-top)); bottom: auto; }
body.pb-fullpage main#main { padding: 0; margin: 0; max-width: none; }

.pbx {
  --p-bg: #faf9f7; --p-side: #f3f2ee; --p-line: #e7e4de; --p-ink: #191c20; --p-fg: #2a2f36; --p-muted: #6b6f76; --p-hover: rgba(25, 28, 32, .055);
  --p-active: rgba(25, 28, 32, .085); --p-ubub: #efede8; --p-card: #fff; --p-onink: #fff; --p-ink2: #000; --p-accent: #13875a; --p-green: #29cb8b; --p-w: 268px; --p-col: 760px;
  --p-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  position: fixed; inset: 0; z-index: 45; display: flex; background: var(--p-bg); color: var(--p-fg); font: 16px/1.5 var(--p-font); -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
.pbx button, .pbx select, .pbx textarea, .pbx h1, .pbx h2, .pbx h3 { font-family: var(--p-font); }
.pbx button { margin: 0; min-height: 0; font: inherit; white-space: normal; }
.pbx .pbx-i { display: block; flex: none; }
.pbx [hidden] { display: none !important; }
.pbx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pbx-spacer { flex: 1; }

/* ---------- sidebar */
.pbx-side { width: var(--p-w); flex: none; background: var(--p-side); border-right: 1px solid var(--p-line); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 10px 10px 16px; transition: margin-left .2s ease; }
.pbx.side-closed .pbx-side { margin-left: calc(-1 * var(--p-w)); visibility: hidden; transition: margin-left .2s ease, visibility 0s .2s; }
.pbx-side-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 10px 6px; }
.pbx-brand { display: inline-flex; align-items: center; gap: 9px; font: 600 17px/1 var(--p-font); color: var(--p-ink); letter-spacing: .01em; }
.pbx-new { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 1px solid var(--p-line); border-radius: 12px; background: var(--p-card); color: var(--p-ink); font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.pbx-new:hover { border-color: #cfcac1; background: var(--p-card); }
.pbx-sec { margin: 18px 8px 6px; font-size: 12.5px; font-weight: 600; color: var(--p-muted); letter-spacing: .02em; }
.pbx-team, .pbx-threads { display: flex; flex-direction: column; gap: 2px; }
.pbx .pbx-bot { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 8px; border: 0; border-radius: 12px; background: none; color: inherit; cursor: pointer; font-weight: 400; }
.pbx .pbx-bot:hover { background: var(--p-hover); border: 0; }
.pbx .pbx-bot.active { background: var(--p-active); }
.pbx .pbx-bot.off { opacity: .55; }
.pbx .pbx-bot.sub { margin-left: 0; }
.pbx .pbx-bot.code { border-top: 0; border-radius: 12px; margin-top: 0; }
.pbx-bt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pbx-brow { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.pbx-name { font-weight: 600; color: var(--p-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbx-tag { font-size: 11px; color: var(--p-muted); background: rgba(25, 28, 32, .06); border-radius: 6px; padding: 0 5px; line-height: 17px; flex: none; }
.pbx-time { margin-left: auto; font-size: 12px; color: var(--p-muted); flex: none; padding-left: 6px; }
.pbx-prev { font-size: 13px; color: var(--p-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbx-prev.busy { color: var(--p-accent); }
.pbx .pbx-trow { display: flex; flex-direction: row; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--p-fg); cursor: pointer; font-weight: 400; }
.pbx .pbx-trow:hover { background: var(--p-hover); border: 0; }
.pbx .pbx-trow.active { background: var(--p-active); color: var(--p-ink); }
.pbx-ttitle { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
.pbx-live { width: 8px; height: 8px; border-radius: 50%; background: var(--p-green); flex: none; animation: pbx-pulse 1.4s ease-in-out infinite; }
.pbx-empty-list { margin: 4px 10px; color: var(--p-muted); font-size: 13px; }

/* avatar + status */
.pbx-av { position: relative; display: inline-flex; flex: none; }
.pbx-av.code { width: 36px; height: 36px; border-radius: 50%; background: var(--p-card); border: 1px solid var(--p-line); align-items: center; justify-content: center; color: var(--p-ink); }
.pbx-st { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--p-side); background: #b9bdc3; }
.pbx-st.on { background: var(--p-green); }
.pbx-st.busy { background: #f59e0b; }
.pbx-bot-msg .pbx-st { display: none; }

/* ---------- the animated mark */
.pbx-mark { display: block; overflow: visible; }
.pbx-mark .pbx-eyes { transform-box: fill-box; transform-origin: center; animation: pbx-glance 9s ease-in-out infinite; }
.pbx-mark .pbx-eye { transform-box: fill-box; transform-origin: center; animation: pbx-blink 5.5s infinite; }
.pbx-mark.working .pbx-eyes { animation: pbx-scan 1.6s ease-in-out infinite; }
.pbx-mark.hello { margin: 0 auto 14px; filter: drop-shadow(0 4px 10px rgba(17, 20, 24, .12)); }
@keyframes pbx-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
@keyframes pbx-glance { 0%, 30%, 100% { transform: translate(0, 0); } 38%, 50% { transform: translate(2.4px, 0); } 58%, 70% { transform: translate(-2.4px, .4px); } 78% { transform: translate(0, 0); } }
@keyframes pbx-scan { 0%, 100% { transform: translate(-2.4px, 0); } 50% { transform: translate(2.4px, 0); } }
@keyframes pbx-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .pbx-mark .pbx-eyes, .pbx-mark .pbx-eye, .pbx-mark.working .pbx-eyes, .pbx-live, .pbx-dots span, .pbx-av.busy .pbx-mark.working { animation: none; }
  .pbx-dots span { opacity: .6; }
  .pbx-side, .pbx.side-closed .pbx-side, .pbx-panel { transition: none; }
}

/* ---------- main column */
.pbx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.pbx-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; min-height: 58px; }
.pbx .pbx-ib { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid transparent; background: none; color: var(--p-fg); cursor: pointer; }
.pbx .pbx-ib:hover { background: var(--p-hover); border-color: transparent; }
.pbx .pbx-ib[aria-pressed="true"] { background: var(--p-active); color: var(--p-ink); }
.pbx .pbx-ib:disabled { opacity: .35; }
.pbx-tools { flex: none; display: flex; align-items: center; gap: 2px; padding: 0 4px; }
.pbx .pbx-tools .pbx-ib { border: 1px solid var(--p-line); background: var(--p-card); margin-left: 4px; }
.pbx .pbx-tools .pbx-ib:hover { background: #f6f5f2; }
.pbx .pbx-tools .pbx-ib[aria-pressed="true"] { background: var(--p-ink); color: var(--p-onink); border-color: var(--p-ink); }
.pbx .pbx-tools #pb-viewonly[aria-pressed="true"] { background: var(--p-card); color: var(--p-fg); border-color: var(--p-line); }
.pbx .pbx-tools #pb-viewonly[aria-pressed="false"] { background: #fff4e5; color: #8a5300; border-color: #f2c48d; }
.pbx-tools #pb-archive { border-color: transparent; background: none; }
.pbx-openside { display: none !important; }
.pbx.side-closed .pbx-openside { display: inline-flex !important; }
.pbx-badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #b4232c; color: #fff; font: 600 11px/18px var(--p-font); text-align: center; }
.pbx-title { margin: 0 0 0 6px; font: 600 15px/1.3 var(--p-font); color: var(--p-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 44%; }
.pbx .pbx-exit { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px 8px 11px; border-radius: 999px; border: 1px solid var(--p-line); background: var(--p-card); color: var(--p-ink); font-weight: 600; font-size: 14px; cursor: pointer; margin-left: 6px; white-space: nowrap; flex: none; }
.pbx .pbx-exit:hover { border-color: #cfcac1; background: #f6f5f2; }

.pbx-convo { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pbx-convo[hidden], .pbx-chief[hidden], .pbx-panel[hidden], .pbx-pane[hidden] { display: none !important; }
.pbx .pbx-log { flex: 1; min-height: 0; max-height: none; overflow-y: auto; border: 0; border-radius: 0; background: none; padding: 8px 20px 24px; display: block; }
.pbx-msgs { max-width: var(--p-col); margin: 0 auto; display: flex; flex-direction: column; gap: 22px; padding-top: 8px; }
.pbx-hello { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-bottom: 6vh; }
.pbx-greet { margin: 0; font: 600 28px/1.25 var(--p-font); color: var(--p-ink); letter-spacing: -.01em; }
.pbx.is-empty .pbx-convo { justify-content: center; }
.pbx.is-empty .pbx-log { flex: 0 1 auto; overflow: visible; }
.pbx.is-empty .pbx-cwrap { padding-bottom: 18vh; }

.pbx .pb-msg { display: flex; }
.pbx .pbx-me { justify-content: flex-end; }
.pbx .pb-msg.me .pbx-ubub { max-width: 78%; background: var(--p-ubub); color: var(--p-ink); border-radius: 18px; padding: 10px 15px; white-space: pre-wrap; }
.pbx .pbx-me .pbx-meta { color: var(--p-muted); margin-top: 3px; font-size: 11.5px; text-align: right; }
.pbx .pbx-bot-msg { gap: 12px; align-items: flex-start; }
.pbx .pbx-reply { max-width: none; flex: 1; min-width: 0; background: none; padding: 3px 0 0; border-radius: 0; white-space: normal; }
.pbx .pbx-reply.failed { border: 0; }
.pbx .pbx-reply.failed .pbx-rtext { color: #8a1c22; }
.pbx-who { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; font-size: 13px; color: var(--p-ink); }
.pbx-who .pill { font-size: 11px; padding: 1px 7px; }
.pbx-meta { color: var(--p-muted); font-size: 12px; }
.pbx-md { font-size: 16px; line-height: 1.5; color: var(--p-fg); overflow-wrap: anywhere; }
.pbx-md > :first-child { margin-top: 0; }
.pbx-md > :last-child { margin-bottom: 0; }
.pbx-md p { margin: 0 0 .7em; }
.pbx-md ul, .pbx-md ol { margin: 0 0 .7em; padding-left: 1.4em; }
.pbx-md li { margin: .2em 0; }
.pbx-md li > ul, .pbx-md li > ol { margin: .2em 0 0; }
.pbx-md h3, .pbx-md h4, .pbx-md h5, .pbx-md h6 { margin: 1em 0 .4em; font-size: 16.5px; font-weight: 650; color: var(--p-ink); }
.pbx-md h3 { font-size: 18px; }
.pbx-md strong { font-weight: 650; color: var(--p-ink); }
.pbx-md a { color: var(--p-accent); text-decoration: underline; text-underline-offset: 2px; }
.pbx-md code { font: 13.5px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: #f1efea; padding: .1em .35em; border-radius: 5px; word-break: normal; }
.pbx-md pre { margin: 0 0 .8em; padding: 12px 14px; background: #f4f2ee; border: 1px solid var(--p-line); border-radius: 12px; overflow-x: auto; }
.pbx-md pre code { background: none; padding: 0; white-space: pre; }
.pbx-md blockquote { margin: 0 0 .7em; padding: 2px 0 2px 12px; border-left: 3px solid var(--p-line); color: var(--p-muted); }
.pbx-md hr { border: 0; border-top: 1px solid var(--p-line); margin: 1em 0; }
.pbx-table { overflow-x: auto; margin: 0 0 .8em; }
.pbx-md table { border-collapse: collapse; font-size: 14.5px; min-width: 50%; }
.pbx-md th, .pbx-md td { border: 1px solid var(--p-line); padding: 6px 10px; text-align: left; vertical-align: top; }
.pbx-md th { background: #f4f2ee; font-weight: 650; }
.pbx-thinking { display: inline-flex; align-items: center; gap: 8px; color: var(--p-muted); font-style: normal; font-size: 15px; }
.pbx-dots { display: inline-flex; gap: 4px; }
.pbx-dots span { width: 6px; height: 6px; border-radius: 50%; background: #a3a39e; animation: pbx-dot 1.4s ease-in-out infinite; }
.pbx-dots span:nth-child(2) { animation-delay: .18s; }
.pbx-dots span:nth-child(3) { animation-delay: .36s; }
@keyframes pbx-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.pbx-av.busy .pbx-mark.working { animation: pbx-bob 2.4s ease-in-out infinite; }
@keyframes pbx-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.pbx .pbx-steps.quiet > summary { border: 0; background: none; padding: 2px 0; font-weight: 500; font-size: 12px; }
.pbx-muted { color: var(--p-muted); }
.pbx .pbx-steps { margin: 8px 0 0; border: 0; padding: 0; font-size: 13px; }
.pbx .pbx-steps > summary { display: inline-block; cursor: pointer; color: var(--p-muted); font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--p-line); background: var(--p-card); list-style: none; }
.pbx .pbx-steps > summary::-webkit-details-marker { display: none; }
.pbx .pbx-steps[open] > summary { margin-bottom: 6px; }
.pbx .pbx-steps .pb-steps-body { border: 1px solid var(--p-line); border-radius: 12px; padding: 6px 10px; background: var(--p-card); }

/* composer */
.pbx-cwrap { width: 100%; max-width: calc(var(--p-col) + 40px); margin: 0 auto; padding: 0 20px max(12px, env(safe-area-inset-bottom)); }
.pbx-err:empty { display: none; }
.pbx-err { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: #fdecee; font-size: 14px; }
.pbx .pbx-composer { border: 1px solid var(--p-line); border-radius: 22px; background: var(--p-card); padding: 12px 12px 10px 16px; box-shadow: 0 2px 10px rgba(17, 20, 24, .06), 0 0 0 1px rgba(17, 20, 24, .01); }
.pbx .pbx-composer:focus-within { border-color: #cbc6bd; box-shadow: 0 2px 14px rgba(17, 20, 24, .09); }
.pbx .pbx-composer textarea { display: block; width: 100%; margin: 0; padding: 2px 0; border: 0; outline: 0; resize: none; background: none; font: 16px/1.5 var(--p-font); color: var(--p-ink); min-height: 26px; max-height: 220px; box-shadow: none; }
.pbx .pbx-composer textarea:focus-visible { outline: 0; }
.pbx .pbx-composer textarea::placeholder { color: #8f9399; }
.pbx-crow { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.pbx-pillwrap { display: inline-flex; min-width: 0; flex: 0 1 auto; }
.pbx-pillwrap .pbx-pill { width: 100%; }
.pbx .pbx-pill { appearance: none; -webkit-appearance: none; max-width: 15rem; border: 0; border-radius: 999px; background: #f1efea; color: var(--p-ink); font: 600 13px/1.2 var(--p-font); padding: 7px 26px 7px 12px; margin: 0; min-height: 32px; cursor: pointer; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  background-image: linear-gradient(45deg, transparent 50%, #6b6f76 50%), linear-gradient(135deg, #6b6f76 50%, transparent 50%); background-position: right 13px center, right 9px center; background-size: 4px 4px; background-repeat: no-repeat; }
.pbx .pbx-pill:hover { background-color: #e9e6df; }
.pbx .pbx-pill:disabled { cursor: default; opacity: 1; color: var(--p-muted); background-image: none; padding-right: 12px; }
.pbx .pbx-send { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; background: var(--p-ink); color: var(--p-onink); cursor: pointer; flex: none; }
.pbx .pbx-send:hover { background: var(--p-ink2); }
.pbx .pbx-send:disabled { background: #c9c6c0; opacity: 1; }
.pbx .pbx-send.stop { background: var(--p-card); color: var(--p-ink); border: 1.5px solid var(--p-ink); }
.pbx .pbx-send[hidden] { display: none; }
.pbx-note { margin: 7px 0 0; text-align: center; font-size: 12px; color: var(--p-muted); }

/* Chief of Staff (Programming) inside the main column */
.pbx-chief { flex: 1; min-height: 0; overflow-y: auto; padding: 0 20px 24px; }
.pbx .pbx-back { border: 0; background: none; color: var(--p-accent); font-weight: 600; padding: 6px 0; cursor: pointer; }

/* ---------- side panel (computer screen / bot emails) */
.pbx-panel { width: min(46vw, 640px); flex: none; background: var(--p-card); border-left: 1px solid var(--p-line); display: flex; flex-direction: column; min-height: 0; }
.pbx-phead { display: flex; align-items: center; gap: 4px; padding: 10px 10px 6px 18px; min-height: 58px; }
.pbx-phead h3 { margin: 0; font: 600 15px/1.2 var(--p-font); color: var(--p-ink); }
.pbx-pane { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 16px; }
.pbx .pbx-screen { aspect-ratio: 16 / 10; border-radius: 12px; background: #0b0d10; color: #cfd6de; }
.pbx .pbx-screen:empty { display: flex; }
.pbx-pnote { color: var(--p-muted); font-size: 13px; margin: 8px 2px; }
.pbx .pb-mail { border-bottom: 1px solid var(--p-line); padding: 10px 0; }
.pbx .pb-mail button { margin: 6px 6px 0 0; min-height: 38px; }

.pbx-scrim { display: none; }

/* ---------- smaller screens: iPad landscape keeps the sidebar; the panel overlays the chat */
@media (max-width: 1180px) {
  .pbx { --p-w: 252px; }
  .pbx-panel { position: absolute; top: calc(58px + env(safe-area-inset-top)); right: 0; bottom: 0; z-index: 3; border-top: 1px solid var(--p-line); border-top-left-radius: 14px; width: min(560px, 62vw); box-shadow: -12px 0 32px rgba(17, 20, 24, .14); }
}
@media (max-width: 820px) {
  .pbx-side { position: absolute; top: 0; left: 0; bottom: 0; z-index: 4; box-shadow: 12px 0 32px rgba(17, 20, 24, .16); }
  .pbx.side-closed .pbx-side { margin-left: calc(-1 * var(--p-w) - 20px); }
  .pbx:not(.side-closed) .pbx-scrim { display: block; position: absolute; inset: 0; z-index: 3; background: rgba(17, 20, 24, .25); }
  .pbx-panel { width: 100%; }
  .pbx-exit span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pbx .pbx-exit { padding: 8px; }
  .pbx-title { display: none; }
  .pbx-greet { font-size: 24px; }
  .pbx .pb-msg.me .pbx-ubub { max-width: 88%; }
}
@media (max-width: 480px) { .pbx .pbx-pill { max-width: 9.5rem; } .pbx .pbx-tools .pbx-ib { width: 36px; height: 36px; margin-left: 2px; } }
.pbx-md th { text-transform: none; letter-spacing: normal; font-size: 14.5px; color: var(--p-ink); }
.pbx-md td { font-size: 14.5px; }

/* ---------- 21 Oct (Harry): starters, approval cards, sources, mic, feedback, more menu, summary, trust, notifications */
.pbx-starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; width: 100%; max-width: 680px; padding: 0 12px; box-sizing: border-box; }
.pbx .pbx-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--p-line); border-radius: 999px; background: var(--p-card); color: var(--p-fg); font-size: 14.5px; cursor: pointer; text-align: left; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
.pbx .pbx-chip:hover { border-color: #cfcac1; background: var(--p-card); color: var(--p-ink); }
.pbx .pbx-chip:focus-visible, .pbx .pbx-src:focus-visible, .pbx .pbx-btn:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; }
.pbx-chip-to { font-size: 12px; color: var(--p-muted); border-left: 1px solid var(--p-line); padding-left: 8px; }

.pbx-sources { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.pbx .pbx-src { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 10px 3px 8px; border: 1px solid var(--p-line); border-radius: 999px; background: var(--p-card); color: var(--p-fg); font-size: 13px; line-height: 1.5; text-decoration: none; }
.pbx a.pbx-src:hover { border-color: #cfcac1; color: var(--p-ink); }
.pbx .pbx-src .pbx-i { width: 14px; height: 14px; color: var(--p-muted); }
.pbx-src-k { font-weight: 600; }
.pbx-src-t { color: var(--p-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.pbx-src-t:empty { display: none; }
.pbx .pbx-src.none { color: var(--p-muted); background: transparent; border-style: dashed; padding-left: 10px; }

.pbx-fb { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-top: 6px; color: var(--p-muted); }
.pbx .pbx-ib.sm { width: 32px; height: 32px; color: var(--p-muted); }
.pbx .pbx-ib.sm .pbx-i { width: 17px; height: 17px; }
.pbx .pbx-ib.sm.on { color: var(--p-ink); background: var(--p-active); }
.pbx-fb-why { font-size: 13px; margin-left: 6px; }
.pbx-fb-form { display: flex; align-items: center; gap: 6px; flex: 1 1 320px; margin-left: 6px; }
.pbx .pbx-fb-in { flex: 1; min-width: 0; margin: 0; padding: 6px 10px; border: 1px solid var(--p-line); border-radius: 10px; font: 14px/1.4 var(--p-font); background: var(--p-card); }
.pbx .pbx-fb-save, .pbx .pbx-fb-skip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--p-line); background: var(--p-card); font-size: 13px; cursor: pointer; }
.pbx .pbx-fb-save { background: var(--p-ink); color: var(--p-onink); border-color: var(--p-ink); }

.pbx-card { margin: 12px 0 4px; border: 1px solid var(--p-line); border-radius: 14px; background: var(--p-card); padding: 12px 14px; box-shadow: 0 1px 3px rgba(0, 0, 0, .04); }
.pbx-card.held { border-color: #e2c78e; box-shadow: 0 0 0 3px rgba(226, 199, 142, .22); }
.pbx-card-h { display: flex; align-items: center; gap: 8px; color: var(--p-ink); font-size: 14.5px; }
.pbx-card-h .pbx-i { width: 18px; height: 18px; }
.pbx-card-f { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 10px 0 8px; font-size: 14px; }
.pbx-card-f dt { color: var(--p-muted); }
.pbx-card-f dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--p-ink); }
.pbx-card-b { margin: 0; padding: 10px 12px; border-radius: 10px; background: #f7f6f3; font: 14px/1.5 var(--p-font); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow-y: auto; }
.pbx .pbx-card-in, .pbx .pbx-card-ta { width: 100%; box-sizing: border-box; margin: 0; padding: 6px 10px; border: 1px solid var(--p-line); border-radius: 10px; font: 14px/1.5 var(--p-font); background: var(--p-card); }
.pbx .pbx-card-ta { min-height: 160px; resize: vertical; }
.pbx-card-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pbx .pbx-btn { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--p-line); background: var(--p-card); color: var(--p-ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.pbx .pbx-btn:hover { border-color: #cfcac1; }
.pbx .pbx-btn.primary { background: var(--p-ink); border-color: var(--p-ink); color: var(--p-onink); }
.pbx .pbx-btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.pbx .pbx-btn.ghost { border-color: transparent; color: var(--p-muted); }

.pbx .pbx-mic { width: 36px; height: 36px; color: var(--p-muted); }
.pbx .pbx-mic.on { color: #fff; background: #c2410c; animation: pbx-pulse 1.4s ease-in-out infinite; }

.pbx-morewrap { position: relative; display: inline-flex; }
.pbx-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 6; min-width: 230px; padding: 6px; border: 1px solid var(--p-line); border-radius: 14px; background: var(--p-card); box-shadow: 0 12px 32px rgba(17, 20, 24, .14); }
.pbx .pbx-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--p-ink); font-size: 14.5px; cursor: pointer; text-align: left; }
.pbx .pbx-menu button:hover, .pbx .pbx-menu button:focus-visible { background: var(--p-hover); outline: none; }
.pbx .pbx-menu .pbx-i { width: 18px; height: 18px; color: var(--p-muted); }

.pbx-seg { display: inline-flex; gap: 2px; padding: 3px; margin: 8px 0 4px; border-radius: 999px; background: #f1efea; }
.pbx .pbx-seg button { padding: 5px 12px; border: 0; border-radius: 999px; background: none; color: var(--p-muted); font-size: 13.5px; cursor: pointer; }
.pbx .pbx-seg button.on { background: var(--p-card); color: var(--p-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); font-weight: 600; }
.pbx-sum-h { margin: 12px 2px 6px; font: 600 16px/1.3 var(--p-font); color: var(--p-ink); }
.pbx-sum-s { border: 1px solid var(--p-line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.pbx-sum-s.zero { opacity: .7; }
.pbx-sum-t { display: flex; justify-content: space-between; font-weight: 600; color: var(--p-ink); font-size: 14.5px; }
.pbx-sum-n { min-width: 26px; text-align: center; border-radius: 999px; background: #f1efea; padding: 0 8px; font-size: 13px; }
.pbx-sum-s ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.pbx-sum-s li { margin: 2px 0; }
.pbx-sum-s a { color: inherit; text-decoration: underline; text-decoration-color: #cfcac1; text-underline-offset: 2px; }

.pbx-trust { display: flex; gap: 10px; align-items: flex-start; padding: 10px 2px; border-bottom: 1px solid var(--p-line); }
.pbx-trust-b { flex: 1; min-width: 0; }
.pbx-trust-r { display: flex; align-items: baseline; gap: 8px; color: var(--p-ink); }
.pbx-trust-p { font-weight: 600; font-variant-numeric: tabular-nums; }
.pbx-tbar { display: block; height: 6px; border-radius: 999px; background: #efede8; overflow: hidden; margin: 6px 0 4px; }
.pbx-tfill { display: block; height: 100%; width: 0; background: var(--p-accent); border-radius: 999px; }
.pbx-tfill.low { background: #b45309; }
.pbx-trust-l { font-size: 13px; color: var(--p-fg); margin-top: 2px; }
.pbx-nsec { border: 1px solid var(--p-line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.pbx-nsec h4 { margin: 0 0 4px; font: 600 15px/1.3 var(--p-font); color: var(--p-ink); }
.pbx .small { font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .pbx .pbx-mic.on { animation: none; } }
@media (min-width: 1181px) and (max-width: 1500px) { .pbx.panel-open .pbx-title { visibility: hidden; } }

/* ---------- Copy (21 Oct): next to the thumbs, a corner copy on hover (desktop), always visible on touch screens */
.pbx-reply { position: relative; }
.pbx .pbx-copy { width: auto; min-width: 32px; padding: 0 8px; border-radius: 999px; gap: 5px; font-size: 13px; color: var(--p-muted); }
.pbx .pbx-copy .pbx-copy-l:empty { display: none; }
.pbx .pbx-copy.done { color: var(--p-accent); }
.pbx .pbx-copy:hover { background: var(--p-hover); color: var(--p-ink); }
.pbx .pbx-hovercopy { position: absolute; top: 6px; right: 6px; padding: 0; opacity: 0; transition: opacity .15s; background: var(--p-bg); }
.pbx-bot-msg:hover .pbx-hovercopy, .pbx .pbx-hovercopy:focus-visible, .pbx .pbx-hovercopy.done { opacity: 1; }
.pbx-code, .pbx-table { position: relative; }
.pbx .pbx-code-copy { position: absolute; top: 4px; right: 4px; z-index: 1; padding: 0; background: rgba(255, 255, 255, .85); opacity: .75; }
.pbx .pbx-code-copy:hover, .pbx .pbx-code-copy.done { opacity: 1; }
.pbx .pbx-card-copy { margin-left: 4px; }
.pbx-copybuf { position: fixed; top: -1000px; left: -1000px; opacity: 0; }
@media (hover: none) { .pbx .pbx-hovercopy { display: none; } .pbx .pbx-code-copy { opacity: 1; } }

/* ---------- voice mode: full-screen view, the E pulses while listening and moves while speaking */
.pbx .pbx-voice { width: 36px; height: 36px; color: var(--p-ink); background: rgba(25, 28, 32, .06); margin-right: 2px; }
.pbx .pbx-voice:hover { background: rgba(25, 28, 32, .11); }
body.pbv-on { overflow: hidden; }
.pbv { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; background: radial-gradient(120% 80% at 50% 30%, #ffffff 0%, #f4f2ed 60%, #ebe8e1 100%); color: #191c20;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); outline: none; }
.pbv button { font: inherit; margin: 0; }
.pbv-top { display: flex; align-items: center; width: 100%; max-width: 760px; gap: 10px; min-height: 40px; }
.pbv-who { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.pbv-dot { width: 8px; height: 8px; border-radius: 50%; background: #29cb8b; }
.pbv[data-state="speaking"] .pbv-dot { background: #020381; }
.pbv[data-state="error"] .pbv-dot, .pbv[data-state="muted"] .pbv-dot { background: #c2410c; }
.pbv-natural { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #6b6f76; cursor: pointer; }
.pbv-natural input { margin: 0; accent-color: #13875a; }
.pbv-switch { position: relative; gap: 8px; padding: 6px 10px; border-radius: 999px; background: rgba(0,0,0,.04); color: #33363b; font-weight: 500; }
.pbv-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pbv-switch .pbv-track { width: 34px; height: 20px; border-radius: 999px; background: #c9ccd1; position: relative; transition: background .15s; flex: none; }
.pbv-switch .pbv-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.pbv-switch input:checked + .pbv-track { background: #13875a; }
.pbv-switch input:checked + .pbv-track::after { transform: translateX(14px); }
.pbv-switch input:focus-visible + .pbv-track { outline: 2px solid #13875a; outline-offset: 2px; }
.pbv-natwrap { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pbv-pick { font: inherit; font-size: 13px; padding: 5px 8px; border-radius: 10px; border: 1px solid rgba(0,0,0,.12); background: #fff; color: #33363b; max-width: 260px; }
.pbx-dark .pbv-pick, .pb-dark .pbv-pick { background: #23262b; color: #e6e7ea; border-color: rgba(255,255,255,.14); }
.pbx-dark .pbv-switch, .pb-dark .pbv-switch { background: rgba(255,255,255,.08); color: #e6e7ea; }
.pbv-stage { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; gap: 18px; }
.pbv-orbwrap { position: relative; width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; }
.pbv-ring { position: absolute; inset: 14px; border-radius: 50%; background: rgba(41, 203, 139, .16); transition: transform .12s linear; }
.pbv-orb { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pbv-orb:focus-visible { outline: 3px solid #13875a; outline-offset: 6px; }
.pbv-orb .pbx-mark { filter: drop-shadow(0 10px 28px rgba(17, 20, 24, .22)); }
.pbv[data-state="listening"] .pbv-ring, .pbv[data-state="hearing"] .pbv-ring { animation: pbv-breathe 1.8s ease-in-out infinite; }
.pbv[data-state="hearing"] .pbv-ring { background: rgba(41, 203, 139, .28); }
.pbv[data-state="listening"] .pbx-mark .pbx-eye, .pbv[data-state="hearing"] .pbx-mark .pbx-eye { animation: pbx-blink 3.5s infinite; }
.pbv[data-state="thinking"] .pbv-ring { background: rgba(25, 28, 32, .07); animation: pbv-spin 1.6s linear infinite; border: 3px solid transparent; border-top-color: rgba(25, 28, 32, .35); }
.pbv[data-state="thinking"] .pbx-mark .pbx-eyes { animation: pbx-scan 1.6s ease-in-out infinite; }
.pbv[data-state="speaking"] .pbv-ring { background: rgba(2, 3, 129, .12); animation: pbv-talk .9s ease-in-out infinite; }
.pbv[data-state="speaking"] .pbv-orb .pbx-mark { animation: pbv-bob .6s ease-in-out infinite alternate; }
.pbv[data-state="muted"] .pbv-orb .pbx-mark { opacity: .55; }
@keyframes pbv-breathe { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.14); opacity: .5; } }
@keyframes pbv-talk { 0%, 100% { transform: scale(1.02); } 30% { transform: scale(1.2); } 60% { transform: scale(1.08); } }
@keyframes pbv-bob { from { transform: translateY(0) scale(1); } to { transform: translateY(-5px) scale(1.035); } }
@keyframes pbv-spin { to { transform: rotate(360deg); } }
.pbv-status { margin: 0; min-height: 24px; font-size: 17px; color: #2a2f36; text-align: center; }
.pbv-capwrap { width: 100%; max-width: 640px; max-height: 30vh; display: flex; flex-direction: column; }
.pbv-caps { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; mask-image: linear-gradient(to bottom, transparent 0, #000 22px); -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px); }
.pbv-cap { margin: 0; padding: 8px 12px; border-radius: 14px; font-size: 15.5px; line-height: 1.45; max-width: 88%; }
.pbv-cap b { display: block; font-size: 12px; font-weight: 600; color: #6b6f76; margin-bottom: 1px; }
.pbv-cap.me { align-self: flex-end; background: #efede8; }
.pbv-cap.bot { align-self: flex-start; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.pbv-cap.interim { align-self: flex-end; background: transparent; color: #6b6f76; font-style: italic; margin-top: 4px; }
.pbv-ctl { display: flex; gap: 22px; margin: 18px 0 6px; }
.pbv-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; padding: 0; border: 0; background: none; color: #2a2f36; font-size: 13px; cursor: pointer; }
.pbv-btn .pbx-i { box-sizing: content-box; width: 24px; height: 24px; padding: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(17, 20, 24, .12); }
.pbv-btn.on .pbx-i { background: #191c20; color: #fff; }
.pbv-btn.end .pbx-i { background: #d92d20; color: #fff; }
.pbv-btn:focus-visible .pbx-i { outline: 3px solid #13875a; outline-offset: 3px; }
.pbv-eng { margin: 4px 0 0; font-size: 12px; color: #8a8e94; text-align: center; }
@media (max-width: 480px) { .pbv-orbwrap { width: 180px; height: 180px; } .pbv-orb .pbx-mark { width: 140px; height: 140px; } .pbv-capwrap { max-height: 34vh; } }
@media (prefers-reduced-motion: reduce) { .pbv-ring, .pbv-orb .pbx-mark, .pbv .pbx-mark .pbx-eyes, .pbv .pbx-mark .pbx-eye { animation: none !important; } }
.pbx .pbx-fb .pbx-copy { margin-right: 6px; padding: 0 10px 0 8px; height: 32px; }

/* ---------- v2 (21 Oct): search, pinned, projects, attachments, @mention, edit / retry / stop, table panel, schedules, quick jump */
.pbx .pbx-sbtn { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 6px; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: var(--p-fg); cursor: pointer; text-align: left; }
.pbx .pbx-sbtn:hover { background: var(--p-hover); }
.pbx .pbx-sbtn .pbx-i { width: 18px; height: 18px; color: var(--p-muted); }
.pbx .pbx-sbtn span { flex: 1; }
.pbx-kbd { font: 11px/1 var(--p-font); color: var(--p-muted); border: 1px solid var(--p-line); border-radius: 6px; padding: 3px 5px; background: var(--p-card); }
.pbx-menu .pbx-kbd { margin-left: auto; }
.pbx-tcol { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pbx-tfrom { font-size: 12px; color: var(--p-accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbx-projs { display: flex; flex-direction: column; gap: 2px; }
.pbx .pbx-proj { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px; border: 0; border-radius: 10px; background: none; color: var(--p-fg); cursor: pointer; text-align: left; }
.pbx .pbx-proj:hover { background: var(--p-hover); }
.pbx .pbx-proj.active { background: var(--p-active); color: var(--p-ink); font-weight: 600; }
.pbx .pbx-proj .pbx-i { width: 17px; height: 17px; color: var(--p-muted); }

/* attachments */
.pbx .pbx-attach { color: var(--p-muted); }
.pbx-fchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.pbx-fchip { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; padding: 4px 4px 4px 4px; border: 1px solid var(--p-line); border-radius: 12px; background: var(--p-bg); font-size: 13px; }
.pbx-fchip.err { border-color: #e5a3a8; background: #fdecee; color: #8a1c22; }
.pbx-fthumb { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; flex: none; }
.pbx-fic { width: 40px; height: 40px; border-radius: 8px; background: var(--p-hover); display: inline-flex; align-items: center; justify-content: center; color: var(--p-muted); flex: none; }
.pbx-fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--p-ink); }
.pbx-fst { color: var(--p-muted); font-size: 12px; white-space: nowrap; }
.pbx-fst:empty { display: none; }
.pbx .pbx-fx { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: none; color: var(--p-muted); cursor: pointer; padding: 0; flex: none; }
.pbx .pbx-fx .pbx-i { width: 15px; height: 15px; }
.pbx .pbx-fx:hover { background: var(--p-hover); color: var(--p-ink); }
.pbx-mfiles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; white-space: normal; }
.pbx .pbx-mfile { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px 4px 8px; border: 1px solid var(--p-line); border-radius: 10px; background: var(--p-card); color: var(--p-ink); font-size: 13px; cursor: pointer; }
.pbx .pbx-mfile .pbx-i { width: 16px; height: 16px; color: var(--p-muted); }
.pbx .pbx-mfile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbx-main { position: relative; }
.pbx-drop { position: absolute; inset: 10px; z-index: 8; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--p-accent); border-radius: 18px; background: color-mix(in srgb, var(--p-bg) 88%, transparent); pointer-events: none; }
.pbx-drop > div { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--p-accent); }

/* @mention */
.pbx-composer { position: relative; }
.pbx-mention { position: absolute; left: 10px; bottom: calc(100% + 6px); z-index: 7; min-width: 260px; padding: 6px; border: 1px solid var(--p-line); border-radius: 14px; background: var(--p-card); box-shadow: 0 12px 32px rgba(17, 20, 24, .14); }
.pbx-mopt { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; cursor: pointer; }
.pbx-mopt.on, .pbx-mopt:hover { background: var(--p-hover); }
.pbx-mopt .pbx-muted { margin-left: auto; }
.pbx-mhint { font-size: 12.5px; color: var(--p-accent); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* edit / retry / stop */
.pbx .pbx-me { align-items: flex-start; gap: 4px; }
.pbx .pbx-edit { opacity: 0; margin-top: 6px; color: var(--p-muted); transition: opacity .15s; }
.pbx-me:hover .pbx-edit, .pbx .pbx-edit:focus-visible { opacity: 1; }
@media (hover: none) { .pbx .pbx-edit { opacity: 1; } }
.pbx .pb-msg.me .pbx-ubub.editing { width: 78%; max-width: 78%; white-space: normal; }
.pbx .pbx-edit-ta { width: 100%; box-sizing: border-box; border: 1px solid var(--p-line); border-radius: 12px; padding: 8px 10px; font: 15px/1.5 var(--p-font); background: var(--p-card); color: var(--p-ink); resize: vertical; }
.pbx-edit-a { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.pbx .pbx-tstop { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 2px 10px 2px 7px; border: 1px solid var(--p-line); border-radius: 999px; background: var(--p-card); color: var(--p-ink); font-size: 13px; cursor: pointer; }
.pbx .pbx-tstop .pbx-i { width: 13px; height: 13px; }
.pbx .pbx-tstop:hover { border-color: #cfcac1; }
.pbx .pbx-retry { color: var(--p-muted); }

/* tables and long lists -> side panel */
.pbx .pbx-tbtns { position: absolute; top: 4px; right: 4px; z-index: 1; display: inline-flex; gap: 4px; }
.pbx .pbx-tbtns .pbx-code-copy { position: static; }
.pbx-listbar { display: flex; justify-content: flex-end; margin: 0 0 -4px; }
.pbx .pbx-listopen { position: static; opacity: 1; background: none; height: 28px; padding: 0 10px 0 8px; }
.pbx-tacts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pbx-tacts .pbx-btn { display: inline-flex; align-items: center; gap: 6px; }
.pbx-tacts .pbx-btn .pbx-i { width: 17px; height: 17px; }
.pbx-pscroll { overflow: auto; border: 1px solid var(--p-line); border-radius: 12px; max-height: calc(100vh - 190px); }
.pbx-ptable { border-collapse: collapse; width: 100%; font-size: 14px; }
.pbx-ptable th { position: sticky; top: 0; background: var(--p-side); text-align: left; font-weight: 600; color: var(--p-ink); }
.pbx-ptable th, .pbx-ptable td { padding: 7px 10px; border-bottom: 1px solid var(--p-line); vertical-align: top; }
.pbx-ptable tbody tr:nth-child(even) td { background: var(--p-hover); }

/* search */
.pbx-sfil { display: flex; gap: 6px; margin: 8px 0 12px; }
.pbx-sfil .pbx-card-in { flex: 1; min-width: 0; }
.pbx-sres { display: flex; flex-direction: column; gap: 4px; }
.pbx .pbx-shit { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: var(--p-fg); cursor: pointer; }
.pbx .pbx-shit:hover { background: var(--p-hover); }
.pbx-snip { font-size: 13.5px; color: var(--p-fg); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* chat options */
.pbx-pane .pbx-nsec > .pbx-card-in, .pbx-pane .pbx-nsec > .pbx-card-ta { margin: 6px 0; }
.pbx-pane .pbx-nsec .pbx-card-ta { min-height: 80px; }
.pbx .pbx-btn.sm { padding: 5px 12px; font-size: 13px; }
.pbx .pbx-btn { display: inline-flex; align-items: center; gap: 6px; }
.pbx .pbx-btn .pbx-i { width: 16px; height: 16px; }
.pbx .pbx-btn.on { background: var(--p-active); }
.pbx-shares { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--p-muted); }

/* schedules */
.pbx-sched .pbx-card-f dd .pbx-card-in { max-width: 100%; }
.pbx-sched-when { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pbx-sched-when .pbx-card-in { width: auto; }
.pbx-srow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--p-line); }
.pbx-srow.paused, .pbx-srow.done { opacity: .6; }
.pbx-sic { width: 32px; height: 32px; border-radius: 50%; background: var(--p-hover); display: inline-flex; align-items: center; justify-content: center; color: var(--p-muted); flex: none; }
.pbx-sic .pbx-i { width: 17px; height: 17px; }
.pbx-sb { flex: 1; min-width: 0; }
.pbx-toasts { position: fixed; z-index: 55; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 36px)); }
.pbx-toast { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; border-radius: 14px; background: var(--p-ink); color: var(--p-onink); box-shadow: 0 12px 32px rgba(17, 20, 24, .22); font-size: 14px; }
.pbx-toast.remind { background: #0f5132; color: #fff; }
.pbx-toast > span { flex: 1; }
.pbx .pbx-toast .pbx-ib { color: inherit; }

/* quick jump */
.pbx-jump { position: fixed; inset: 0; z-index: 58; background: rgba(17, 20, 24, .28); display: flex; justify-content: center; align-items: flex-start; padding-top: 14vh; }
.pbx-jbox { width: min(620px, calc(100vw - 28px)); background: var(--p-card); border: 1px solid var(--p-line); border-radius: 16px; box-shadow: 0 24px 60px rgba(17, 20, 24, .28); overflow: hidden; }
.pbx .pbx-jq { width: 100%; box-sizing: border-box; margin: 0; padding: 16px 18px; border: 0; border-bottom: 1px solid var(--p-line); font: 17px/1.4 var(--p-font); background: none; color: var(--p-ink); outline: none; }
.pbx-jl { max-height: 50vh; overflow-y: auto; padding: 6px; }
.pbx-jo { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; cursor: pointer; color: var(--p-fg); }
.pbx-jo.on, .pbx-jo:hover { background: var(--p-hover); color: var(--p-ink); }
.pbx-jk { flex: none; width: 56px; font-size: 12px; color: var(--p-muted); }
.pbx-jnone { padding: 10px 12px; }
@media (max-width: 820px) { .pbx-toasts { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: none; } .pbx-jump { padding-top: 8vh; } }

/* ---------- dark mode: system (auto) or a choice in More (saved on this device) */
.pbx.pbx-dark {
  --p-bg: #17191c; --p-side: #1e2125; --p-line: #33373d; --p-ink: #f1f2f3; --p-fg: #d9dbde; --p-muted: #9a9fa6; --p-hover: rgba(255, 255, 255, .06);
  --p-active: rgba(255, 255, 255, .1); --p-ubub: #2a2e33; --p-card: #212428; --p-onink: #121417; --p-ink2: #ffffff; --p-accent: #34c58a;
  color-scheme: dark;
}
.pbx.pbx-dark .pbx-tag { background: rgba(255, 255, 255, .08); }
.pbx.pbx-dark .pbx-st { border-color: var(--p-side); }
.pbx.pbx-dark .pbx-code-copy { background: rgba(33, 36, 40, .85); }
.pbx.pbx-dark .pbx-md pre, .pbx.pbx-dark .pbx-md code { background: #0f1113; color: #e6e8ea; }
.pbx.pbx-dark .pbx-md th, .pbx.pbx-dark .pbx-ptable th { background: #24272b; }
.pbx.pbx-dark .pbx-md th, .pbx.pbx-dark .pbx-md td { border-color: var(--p-line); }
.pbx.pbx-dark .pbx-composer textarea::placeholder { color: #7d828a; }
.pbx.pbx-dark .pbx-card-in, .pbx.pbx-dark .pbx-card-ta, .pbx.pbx-dark .pbx-fb-in, .pbx.pbx-dark select, .pbx.pbx-dark input { color: var(--p-ink); background-color: var(--p-card); border-color: var(--p-line); }
.pbx.pbx-dark .pbx-tools #pb-viewonly[aria-pressed="false"] { background: #3a2a12; color: #f5c27a; border-color: #6b4b1c; }
.pbx.pbx-dark .pbx-fchip.err { background: #3a1d20; color: #f3b1b6; border-color: #6b2a30; }
.pbx.pbx-dark .pbx-toast.remind { background: #1f6f4a; }
.pbx.pbx-dark .pb-warn { color: #f5c27a; }
.pbx.pbx-dark .pbx-mark circle[fill="#111418"] { fill: #2c3036; }
html.pb-dark .pbv { background: radial-gradient(120% 80% at 50% 30%, #23262a 0%, #17191c 60%, #111315 100%); color: #eceef0; }
html.pb-dark .pbv-cap.bot { background: #23262a; color: #eceef0; }
html.pb-dark .pbv-cap b { color: #a5aab1; }
html.pb-dark .pbv-cap.me { background: #2e3237; color: #eceef0; }
html.pb-dark .pbv-btn .pbx-i { background: #2a2e33; color: #eceef0; }
html.pb-dark .pbv-btn.on .pbx-i { background: #eceef0; color: #17191c; }
html.pb-dark .pbv-status, html.pb-dark .pbv-eng, html.pb-dark .pbv-interim { color: #a5aab1; }
.pbx-side > * { flex-shrink: 0; }
.pbx .pbx-listopen { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; width: auto; }
.pbx .pbx-listopen .pbx-i { width: 16px; height: 16px; }
.pbx.pbx-dark .pbx-md tr td, .pbx.pbx-dark .pbx-md tr:hover td, .pbx.pbx-dark .pbx-ptable tr:hover td { background: transparent; color: var(--p-fg); }
.pbx.pbx-dark .pbx-ptable tbody tr:nth-child(even) td { background: var(--p-hover); }
.pbx.pbx-dark .pbx-md code, .pbx.pbx-dark .pbx-pill, .pbx.pbx-dark .pbx-seg, .pbx.pbx-dark .pbx-sum-n, .pbx.pbx-dark .pbx-card-b { background-color: #2a2e33; color: var(--p-ink); }
.pbx.pbx-dark .pbx-pill:hover, .pbx.pbx-dark .pbx-tools .pbx-ib:hover, .pbx.pbx-dark .pbx-exit:hover { background-color: #33373d; }
@media (max-width: 480px) { .pbx .pbx-tools #pb-chat-opts { display: none; } }
@media (min-width: 481px) { .pbx .pbx-menu .pbx-m-chat { display: none; } }
/* fix/voice-mode: live microphone level, hints, tap-to-send */
.pbv-meter { width: 160px; height: 6px; margin: 10px auto 0; border-radius: 3px; background: rgba(25, 28, 32, .1); overflow: hidden; }
.pbv-meter[hidden] { display: none; }
.pbv-meterbar { display: block; height: 100%; width: 0; background: #29cb8b; transition: width .08s linear; }
.pbv-hint { margin: 8px auto 0; max-width: 300px; font-size: 13px; line-height: 1.35; color: #8a4b00; text-align: center; }
.pbv-hint[hidden] { display: none; }
.pbv-btn.send .pbx-i { background: #029143; color: #fff; }
.pbv-btn:disabled { opacity: .4; cursor: default; }
html.pb-dark .pbv-hint { color: #f0b46a; } html.pb-dark .pbv-meter { background: rgba(255,255,255,.12); }
