// misc — split from src/client/mobile.css.ts (2026-08-16), order preserved. // Do not reorder: styles/index.ts concatenates in this exact order. export const MISC_CSS = ` /* ---------- 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) { padding-top: 6px !important; gap: 8px !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; } [data-phase="hero"] [class$="_card"]:has(textarea) > [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; } } /* ---------- tablet / wide mobile: keep sheets from becoming full-width ---------- Below 768px the near-full-width sheets are the right call for a phone. On wider but still sub-desktop viewports (foldables, tablet portrait, desktop-mode tall windows) the same full-bleed sheet leaves content clustered at the left edge with a large dead zone on the right. Cap and center the modal sheets and the aionui bottom sheets instead. */ @media (min-width: 768px) and (max-width: 1023px) { /* All modal dialogs: centered, never edge-to-edge. The settings sheet has a higher-specificity full-width rule above, so repeat its selector here to win; the generic export/other-modal rule is covered by the second selector. */ [aria-modal="true"]:has(> :first-child > :last-child > button):not(:has([role="navigation"])):not(:has([class*="ZuhsRW"])), [aria-modal="true"]:not(:has(> :first-child > :last-child > button)) { left: 0 !important; right: 0 !important; margin-left: auto !important; margin-right: auto !important; width: min(calc(100vw - 32px), 720px) !important; max-width: min(calc(100vw - 32px), 720px) !important; } /* The dsh-web-ui explorer / preview bottom sheets: same treatment — keep the mobile bottom-sheet behavior, but stop them spanning the full width. */ [data-aionui-explorer-col], [data-aionui-preview-col] { left: 0 !important; right: 0 !important; width: min(calc(100vw - 32px), 720px) !important; margin-left: auto !important; margin-right: auto !important; } /* Settings sections (e.g. Agent presets) often carry a desktop max-width (720px) that leaves a dead strip on the right once the sheet is capped to the same width; let them fill the sheet body instead. */ [aria-modal="true"] [class$="_section"] { width: 100% !important; max-width: none !important; } } /* ---------- desktop: the mobile controls must never appear ---------- */ @media (min-width: 1024px) { [data-mobile-nav="toggle"], [data-mobile-nav="files"], [data-mobile-nav="fab"], [data-mobile-nav="backdrop"], [data-mobile-nav="session-log"], [data-mobile-nav="explorer"], [data-mobile-nav="drawer-actions"] { display: none !important; } } `