// misc — split from src/client/mobile.css.ts (2026-08-16), order preserved. // Self-contained: each section (composer / tablet / desktop) carries its own // media query. export const MISC_CSS = `@media (max-width: 1023px) and (pointer: coarse) { /* ---------- hero composer on mobile ---------- The official hero card carries a 2-line textarea plus a tall tool row, which reads oversized on a phone. Tighten the empty-state rhythm: keep the official centered hero, shrink the textarea line box, slim the card padding and the tool row, and close the gap under the headline. */ [data-phase="hero"] [class*="_card"]:has(textarea, [data-composer-input]) { gap: 8px !important; } /* Composer stacks carrying the git branch chip must keep compat.css's 44px chip clearance: that rule sets padding-top: 44px on the composer card of any stack that contains the absolutely-positioned chip anchor (A′, #105: the chip stays in the dock subtree and is re-anchored to the stack, so the exclusion moved from the card level to this stack-level :not(:has()) — a card-level :has() could never match anymore). Chip geometry: top corner +12 + 28px chip — the chip grew 24→28px, so the clearance grew 40→44px to keep the same ~4px breathing gap (2026-09-06). This compact override used to stomp the clearance back to 6px with the same specificity (this sheet loads after compat), so on the hero empty state the chip painted over the input line (2026-09-06). Excluding chip-bearing stacks restores the clearance; the textarea collapse below still applies to them. */ [data-phase="hero"] [class*="_composerStack"]:not(:has([data-gitgraph-chip-anchor])) [class*="_card"]:has(textarea, [data-composer-input]) { padding-top: 6px !important; } /* The official composer autosizes the textarea and writes an inline height (2 lines on the hero empty state) on the textarea's scroll/grow wrappers. :placeholder-shown lets us collapse the EMPTY state to one line with !important; as soon as the user types, the pseudo-class no longer matches and the autosizer's inline height takes over again — so multi-line growth keeps working. */ [data-phase="hero"] textarea:placeholder-shown { height: 28px !important; } [data-phase="hero"] [class*="_card"]:has(textarea:placeholder-shown) > [class*="_scroll"], [data-phase="hero"] [class*="_card"]:has(textarea:placeholder-shown) [class*="_grow"] { height: 28px !important; } /* The one-line collapse above is deliberately NOT mirrored onto the Lexical generation (0.1.2+), even though it signals its empty state with the separate [data-composer-placeholder] node. That host pins the hero input itself — hero-scoped min-height: 52px, because its hero hint wraps to two lines — and a min-height floor beats an outer height: the 28px wrappers of 2026-09-05 only shrank the scrollport under a 52px input, i.e. overflow-y auto with scrollHeight 52 against clientHeight 28 → scrollbar plus a clipped first input line and hint line (phone report 2026-09-14, probe scripts/probes/hero-composer-clip-probe.mjs). The textarea generation this collapse was written for has no such floor — its input is a transparent height:100% layer over the wrappers — so it still collapses there. */ [data-phase="hero"] [class*="_card"]:has(textarea, [data-composer-input]) > [class*="_row"] { padding-top: 2px !important; } [data-phase="hero"] [class*="_headline"] { line-height: 1.15 !important; margin-bottom: 0 !important; } [data-phase="hero"] [class*="_stack"] { gap: 0 !important; } /* ---------- composer dock: swap git branch chip with the todo card ---------- The git-graph branch chip (conversation.input.dock, order 100) floats alone at the bottom-left above the input card, with a dead zone to its right; the full-width todo card (order 0) sits above it. Swap them so the chip reads as the stack's top row and the todo card fills the row above the composer. The dock container itself is display:contents (inline style) — its children are direct flex items of the composer stack, so order on the children is what reorders them. Only the chip needs an order change: -1 puts it before the todo card (order 0) and before the input card (order 0, later in DOM). The todo card must KEEP its order 0 — raising it past the input card's order 0 would drop it below the composer entirely (2026-08-16 regression, fixed). The queue strip (order 20) keeps hugging the input card. Desktop untouched (this block lives inside the max-width: 1023px media query). */ [data-slot="conversation.input.dock"] [data-gitgraph-chip-anchor] { order: -1 !important; } /* Mobile tap target + feedback for the branch chip (git-graph, 24px desktop spec). Two real-world problems: ① the chip is tiny and sits right above the expandable todo card — mis-taps land on the todo card; ② opening the popover waits for the host's /git/branches round-trip (~700ms on device) with zero feedback, so users tap again and toggle the popover closed. Enlarge the target, kill double-tap zoom delay, and give an instant pressed state so a tap reads as registered. */ [data-slot="conversation.input.dock"] [data-gitgraph-chip-anchor] [data-gitgraph-chip] { touch-action: manipulation !important; min-height: 34px !important; padding: 0 12px !important; font-size: 13px !important; } [data-slot="conversation.input.dock"] [data-gitgraph-chip-anchor] [data-gitgraph-chip]:active { transform: scale(.96) !important; transition: transform .12s !important; } /* ---------- mattskills status capsule: keep its tail (skills button / fold chevron) inside the pill on portrait ---------- dsh-mattpocock-skills-deck renders a capsule status bar in conversation.input.dock (order 40, the row above the composer card). Its own sheet deliberately never shrinks icons or counters ("图标与普通计数 永不收缩"), so as soon as the capsule's content is wider than the pill the host wrapper's overflow:hidden cuts the right edge and the two segments that sit last — the skills-list button (2×2 grid) and the fold chevron that collapses the whole deck strip — are not painted at all. Measured 2026-10-10 on a 393px portrait viewport, session bound to a ticket with two-digit counters (可接 21 / 诊断 20): capsule content ≈ 415px against a ~360px pill, i.e. ~55px short — exactly those two segments; the same session on landscape shows both, so this is width pressure, not a missing feature (and not a deck version difference: 1.7.51 / 1.8.0-rc.1 / 1.8.0-rc.2 all render both unconditionally). Reclaim the width from the capsule's desktop-sized spacing (6px column gap plus 7px padding on each of ~11 children) rather than hiding any segment, and keep a horizontal scroll as the fallback for the narrowest phones so the tail can still be swiped into view. The scrollbar stays hidden, so the pill still reads as one pill. Desktop untouched: this block lives inside the max-width: 1023px media query. */ [data-slot="conversation.input.dock"] .dsws-capsule { gap: 1px 3px !important; padding: 3px 4px !important; overflow-x: auto !important; overflow-y: hidden !important; scrollbar-width: none !important; } [data-slot="conversation.input.dock"] .dsws-capsule::-webkit-scrollbar { display: none !important; } [data-slot="conversation.input.dock"] .dsws-capsule .dsws-capsule-word { padding: 2px 4px !important; column-gap: 3px !important; } [data-slot="conversation.input.dock"] .dsws-capsule .dsws-seg { padding: 2px 4px !important; gap: 3px !important; } [data-slot="conversation.input.dock"] .dsws-capsule .dsws-split .dsws-split-part { padding: 2px 4px !important; } [data-slot="conversation.input.dock"] .dsws-capsule .dsws-timebtn { padding: 2px 4px !important; } [data-slot="conversation.input.dock"] .dsws-capsule .dsws-skillbtn, [data-slot="conversation.input.dock"] .dsws-capsule .dsws-fold-toggle { padding: 1px 2px !important; } /* ---------- ask question composer (ask_user_question): kill iOS Safari input-focus auto-zoom ---------- Safari on iPhone enlarges the whole viewport when a focused /