/* ========================================================================= maestro web — design system Register: product (a tool; design serves the task). Identity: precise, calm, alive. Monospace-as-UI; signal-green = "alive". Theme: dark (default) + light, all via OKLCH custom-property tokens. ========================================================================= */ :root { /* ---- type ---- */ --font-mono: ui-monospace, "SF Mono", "SFMono-Regular", "Cascadia Code", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace; --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --fs-11: 0.6875rem; --fs-12: 0.75rem; --fs-13: 0.8125rem; --fs-14: 0.875rem; --fs-15: 0.9375rem; --fs-17: 1.0625rem; --fs-20: 1.25rem; /* ---- spacing ---- */ --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; /* ---- radii ---- Terminal-native: crisp, near-square corners. Round dots (status, brand) use border-radius:50% directly and are unaffected; these tokens govern rectangles (buttons, inputs, cards, tags) and stay sharp on purpose. */ --r-1: 2px; --r-2: 3px; --r-3: 4px; --r-pill: 3px; /* ---- sizing ---- */ --row-h: 46px; --control-h: 30px; --tap: 40px; /* Height of the two top-of-pane bars (sidebar search + attach header) — shared so they line up across the split. */ --bar-h: 34px; /* ---- motion ---- */ --ease-out: cubic-bezier(0.22, 1, 0.36, 1); --dur-fast: 120ms; --dur: 180ms; --dur-slow: 240ms; /* ---- z-index scale ---- */ --z-sticky: 10; --z-backdrop: 40; --z-modal: 50; --z-toast: 60; /* ---- color: dark (default) ---- */ color-scheme: dark; --bg: oklch(0.178 0.012 256); --bg-grid: oklch(0.215 0.014 256); --surface: oklch(0.214 0.014 256); --surface-2: oklch(0.252 0.016 256); --surface-3: oklch(0.292 0.018 256); --border: oklch(0.318 0.018 256); --border-strong: oklch(0.4 0.022 256); --ink: oklch(0.945 0.006 256); --muted: oklch(0.722 0.014 256); --faint: oklch(0.58 0.014 256); /* signal green = "alive", primary action, focus, selection */ --accent: oklch(0.83 0.16 152); --accent-strong: oklch(0.88 0.17 152); --accent-ink: oklch(0.2 0.03 256); --accent-tint: oklch(0.83 0.16 152 / 0.12); --accent-ring: oklch(0.83 0.16 152 / 0.55); --live: oklch(0.84 0.17 152); --live-glow: oklch(0.84 0.17 152 / 0.55); --danger: oklch(0.72 0.18 25); --danger-tint: oklch(0.72 0.18 25 / 0.14); --warn: oklch(0.82 0.14 85); --shadow-1: 0 1px 2px oklch(0 0 0 / 0.4); --shadow-2: 0 12px 28px -8px oklch(0 0 0 / 0.6), 0 2px 8px oklch(0 0 0 / 0.4); --term-bg: oklch(0.158 0.012 256); } :root[data-theme="light"], :root[data-theme="light"] body { color-scheme: light; --bg: oklch(0.985 0.003 256); --bg-grid: oklch(0.93 0.006 256); --surface: oklch(1 0 0); --surface-2: oklch(0.965 0.004 256); --surface-3: oklch(0.93 0.006 256); --border: oklch(0.892 0.008 256); --border-strong: oklch(0.82 0.012 256); --ink: oklch(0.26 0.014 256); --muted: oklch(0.47 0.016 256); --faint: oklch(0.62 0.016 256); --accent: oklch(0.6 0.15 151); --accent-strong: oklch(0.55 0.16 151); --accent-ink: oklch(0.99 0.01 152); --accent-tint: oklch(0.6 0.15 151 / 0.12); --accent-ring: oklch(0.6 0.15 151 / 0.5); --live: oklch(0.6 0.16 151); --live-glow: oklch(0.6 0.16 151 / 0.45); --danger: oklch(0.55 0.21 27); --danger-tint: oklch(0.55 0.21 27 / 0.1); --warn: oklch(0.66 0.15 75); --shadow-1: 0 1px 2px oklch(0.5 0.02 256 / 0.12); --shadow-2: 0 16px 36px -12px oklch(0.4 0.03 256 / 0.28), 0 2px 8px oklch(0.5 0.02 256 / 0.1); --term-bg: oklch(0.165 0.012 256); } /* Follow the OS when the user hasn't pinned a theme. */ @media (prefers-color-scheme: light) { :root:not([data-theme]) { color-scheme: light; --bg: oklch(0.985 0.003 256); --bg-grid: oklch(0.93 0.006 256); --surface: oklch(1 0 0); --surface-2: oklch(0.965 0.004 256); --surface-3: oklch(0.93 0.006 256); --border: oklch(0.892 0.008 256); --border-strong: oklch(0.82 0.012 256); --ink: oklch(0.26 0.014 256); --muted: oklch(0.47 0.016 256); --faint: oklch(0.62 0.016 256); --accent: oklch(0.6 0.15 151); --accent-strong: oklch(0.55 0.16 151); --accent-ink: oklch(0.99 0.01 152); --accent-tint: oklch(0.6 0.15 151 / 0.12); --accent-ring: oklch(0.6 0.15 151 / 0.5); --live: oklch(0.6 0.16 151); --live-glow: oklch(0.6 0.16 151 / 0.45); --danger: oklch(0.55 0.21 27); --danger-tint: oklch(0.55 0.21 27 / 0.1); --warn: oklch(0.66 0.15 75); --shadow-1: 0 1px 2px oklch(0.5 0.02 256 / 0.12); --shadow-2: 0 16px 36px -12px oklch(0.4 0.03 256 / 0.28), 0 2px 8px oklch(0.5 0.02 256 / 0.1); --term-bg: oklch(0.165 0.012 256); } } /* ---------- reset / base ---------- */ * { box-sizing: border-box; } *:focus { outline: none; } html, body { height: 100%; margin: 0; /* No pull-to-refresh / scroll chaining — terminal scroll wins on touch. */ overscroll-behavior: none; } body { overflow-x: hidden; } body { background: var(--bg); color: var(--ink); font-family: var(--font-mono); font-size: var(--fs-15); line-height: 1.45; font-feature-settings: "ss01", "cv01"; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; /* faint structural grid — terminal texture, not a CRT costume */ background-image: linear-gradient(var(--bg-grid) 1px, transparent 1px), linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px); background-size: 100% 64px, 64px 100%; background-position: center top; /* dim the grid via opacity on a fixed overlay would cost a node; bake it low instead */ } #app { /* `--app-vh` tracks the *visual* viewport (set by installViewportSizing) so the shell stays above the mobile soft keyboard; falls back to the layout viewport where `visualViewport` is unavailable. `--app-top` follows the layout viewport's scroll under the keyboard so the shell stays pinned to the visible region instead of drifting to the top. */ height: var(--app-vh, 100%); transform: translateY(var(--app-top, 0px)); display: flex; flex-direction: column; overflow: hidden; } a { color: inherit; text-decoration: none; } code { font-family: var(--font-mono); font-size: 0.92em; padding: 1px 5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-1); } ::selection { background: var(--accent-tint); color: var(--ink); } button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; } ::placeholder { color: var(--faint); opacity: 1; } :focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; border-radius: var(--r-1); } /* ---------- buttons ---------- Terminal-native: the brackets are the chrome. Default + primary wear [ brackets ]; ghost/icon drop them for quieter nav and single glyphs. */ .btn { appearance: none; border: 1px solid transparent; background: transparent; color: var(--ink); padding: 0 var(--sp-1); height: var(--control-h); min-height: var(--control-h); cursor: pointer; font-family: var(--font-mono); font-size: var(--fs-13); font-weight: 500; letter-spacing: 0.01em; display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); } .btn::before { content: "["; color: var(--faint); } .btn::after { content: "]"; color: var(--faint); } .btn:hover { color: var(--accent); } .btn:hover::before, .btn:hover::after { color: var(--accent); } .btn:active { transform: translateY(1px); } .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; } .btn-primary { color: var(--accent); font-weight: 600; } .btn-primary::before, .btn-primary::after { color: var(--accent); } .btn-primary:hover { background: var(--accent-tint); } /* Ghost: no brackets — quiet nav (back, disconnect, theme, kit) and icons. */ .btn-ghost { color: var(--muted); } .btn-ghost::before, .btn-ghost::after { content: none; } .btn-ghost:hover { color: var(--ink); background: var(--surface-2); } .btn-icon { width: var(--control-h); padding: 0; font-size: var(--fs-15); } .btn-icon::before, .btn-icon::after { content: none; } .btn-icon:hover { background: var(--surface-2); } /* ---------- app shell: sidebar + content ---------- */ /* Global app header: brand + app-level actions (spawn, theme toggle), spanning the full width above the split. */ .app-header { display: flex; align-items: center; gap: var(--sp-3); flex: 0 0 auto; padding: var(--sp-1) var(--sp-3); border-bottom: 1px solid var(--border); background: color-mix(in oklab, var(--surface) 82%, transparent); backdrop-filter: blur(8px); } /* Hamburger to the left of the brand — toggles the off-canvas session drawer. Mobile only (desktop keeps the sidebar permanently in view). */ .app-menu { display: none; place-items: center; flex: none; width: 32px; height: 32px; border: none; border-radius: var(--r-1); background: transparent; color: var(--ink); font-size: var(--fs-17); cursor: pointer; } .app-menu:hover { background: var(--surface-2); } /* Three-part header: brand (left), status (centered), actions (right). Equal flex on the outer two keeps the status group truly centered. */ .app-header .brand { flex: 1 1 0; min-width: 0; margin-right: 0; } .app-status { flex: 0 1 auto; display: flex; justify-content: center; min-width: 0; overflow: hidden; } .app-status .statusbar { border-bottom: 0; background: transparent; padding: 0; flex-wrap: nowrap; } .app-status .statusbar .spacer { display: none; } .app-actions { display: flex; align-items: center; gap: var(--sp-2); flex: 1 1 0; justify-content: flex-end; } .app-shell { flex: 1 1 auto; min-height: 0; } /* Desktop: persistent two-pane split. Sidebar holds the session list; the content pane shows the welcome state or the attached terminal. */ @media (min-width: 860px) { .app-shell { display: grid; grid-template-columns: var(--sidebar-w, clamp(220px, 22vw, 320px)) minmax(0, 1fr); } } .sidebar { display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; position: relative; background: color-mix(in oklab, var(--surface) 26%, var(--bg)); border-right: 1px solid var(--border); } /* Drag-to-resize grip on the sidebar's right edge (desktop split only). */ .sidebar-resize { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; z-index: var(--z-sticky); touch-action: none; } .sidebar-resize:hover, .sidebar-resize:active { background: var(--accent-ring); } @media (max-width: 859px) { .sidebar-resize { display: none; } .app-status { display: none; } } /* Sidebar's own slim header: just the session search (app-level actions live in the global top bar). */ /* The search input IS the header — it spans edge to edge, flush, with just a bottom rule for separation. No wrapper padding, no boxed border/radius. */ .sidebar-search { flex: 0 0 auto; } .sidebar-search .search { width: 100%; max-width: none; height: var(--bar-h); border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; } .sidebar-search .search:hover { background: var(--surface-2); border-bottom-color: var(--border-strong); } .sidebar-search .search:focus { background: var(--surface-2); border-bottom-color: var(--accent); box-shadow: none; } .content { min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); } .content-welcome { margin: auto; max-width: 48ch; } /* Off-screen home for parked-but-connected terminals. Kept in the DOM (not display:none) so the live WS keeps buffering into each terminal; on re-mount we fit + the scrollback is already there, so switching is instant. */ .conn-cache { position: fixed; left: -99999px; top: 0; width: 1px; height: 1px; overflow: hidden; } /* ---------- catalog ---------- */ .catalog { display: flex; flex-direction: column; height: 100%; min-height: 0; } .catalog-header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--border); background: color-mix(in oklab, var(--surface) 82%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: var(--z-sticky); } .brand { display: inline-flex; align-items: center; gap: var(--sp-2); margin-right: auto; } .brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 4px var(--live-glow); flex: 0 0 auto; animation: pulse 2.4s var(--ease-out) infinite; } .brand h1 { margin: 0; font-size: var(--fs-17); font-weight: 600; letter-spacing: -0.01em; } .brand .blink { color: var(--accent); font-weight: 400; animation: blink 1.2s steps(1) infinite; } .catalog-actions { display: flex; flex: 1 1 280px; gap: var(--sp-2); align-items: center; justify-content: flex-end; } .search { flex: 1 1 200px; max-width: 340px; height: var(--control-h); padding: 0 var(--sp-3); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-2); color: var(--ink); transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); } .search:hover { border-color: var(--border-strong); } .search:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-tint); } /* ---------- status bar ---------- */ .statusbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--border); background: var(--surface); font-size: var(--fs-12); color: var(--muted); } .statusbar .spacer { /* zero basis: claim leftover space without inflating the bar's min width */ flex: 1 1 0; min-width: var(--sp-2); } .session-tally { display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; } .session-tally::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 5px var(--live-glow); } /* ---------- session tree ---------- */ .tree { flex: 1 1 auto; overflow: auto; padding: var(--sp-1) 0 var(--sp-4); scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; } .tree-folder { display: flex; flex-direction: column; } .tree-folder-header { display: flex; align-items: center; gap: var(--sp-2); background: transparent; border: 0; width: 100%; text-align: left; height: 38px; padding-right: var(--sp-4); color: var(--muted); cursor: pointer; font-family: var(--font-mono); font-size: var(--fs-12); transition: color var(--dur-fast) var(--ease-out); } .tree-folder-header:hover { color: var(--ink); } .tree-folder-header .chevron { width: 16px; text-align: center; color: var(--faint); font-size: var(--fs-11); transition: transform var(--dur) var(--ease-out), color var(--dur-fast) var(--ease-out); } .tree-folder-header[aria-expanded="false"] .chevron { transform: rotate(-90deg); } .tree-folder-header:hover .chevron { color: var(--accent); } .folder-name { flex: 1 1 auto; min-width: 0; color: var(--ink); font-size: var(--fs-14); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* Earlier path segments collapse to their initial; the trailing segment (the one that actually names the dir) stays full. Dim the collapsed prefix. Shared by the sidebar tree and the spawn dialog's recent-directory picker. */ .folder-name .folder-stem, .recent-dir .folder-stem { color: var(--faint); } .tree-leaf { display: flex; align-items: center; gap: var(--sp-2); min-height: 30px; margin: 1px var(--sp-2); padding: 4px var(--sp-3); border-radius: var(--r-1); color: var(--ink); position: relative; transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); } /* "Alive" reads as a faint wash on the row itself — no per-row status icon. */ .tree-leaf[data-status="running"] { background: color-mix(in oklab, var(--accent) 6%, transparent); } .tree-leaf:hover { background: var(--surface-2); } .tree-leaf[data-status="running"]:hover { background: color-mix(in oklab, var(--accent) 13%, var(--surface-2)); } .tree-leaf:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--accent-ring); } /* The session currently mounted in the content pane. */ .tree-leaf.is-active, .tree-leaf.is-active[data-status="running"] { background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--accent-ring); } .tree-leaf.is-active .leaf-name { color: var(--ink); } /* Exited sessions recede: dimmed name + an "exited" badge carry status, so it's never the running tint's absence alone doing the work. */ .tree-leaf[data-status="dead"] { color: var(--muted); } .tree-leaf[data-status="dead"] .leaf-name { color: var(--muted); font-weight: 400; } .leaf-name { font-weight: 500; font-size: var(--fs-13); flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .leaf-meta { font-size: var(--fs-11); color: var(--muted); margin-left: auto; padding-left: var(--sp-2); min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: baseline; gap: var(--sp-2); } .leaf-cmd { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .leaf-badge { font-size: var(--fs-11); letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 1px 8px; flex: 0 0 auto; } .leaf-actions { position: absolute; right: var(--sp-1); top: 50%; transform: translateY(-50%); display: inline-flex; gap: 2px; } .leaf-act { background: var(--surface-3); color: var(--faint); border: 1px solid var(--border); border-radius: var(--r-1); width: 24px; height: 24px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-12); transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); } @media (hover: hover) { .leaf-actions { opacity: 0; transition: opacity var(--dur-fast) var(--ease-out); } .tree-leaf:hover .leaf-actions, .tree-leaf:focus-within .leaf-actions { opacity: 1; } } .leaf-clone:hover { color: var(--accent); background: var(--accent-tint); border-color: color-mix(in oklab, var(--accent) 40%, transparent); } .leaf-kill:hover { color: var(--danger); background: var(--danger-tint); border-color: color-mix(in oklab, var(--danger) 40%, transparent); } /* ---------- empty / loading ---------- */ .empty { padding: var(--sp-5) var(--sp-4); color: var(--muted); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); font-family: var(--font-sans); } .empty-glyph { font-family: var(--font-mono); font-size: var(--fs-20); color: var(--accent); border: 1px solid var(--border); border-radius: var(--r-3); width: 56px; height: 56px; display: grid; place-items: center; background: var(--surface); } .empty-title { color: var(--ink); font-size: var(--fs-15); font-family: var(--font-mono); } .empty-hint { font-size: var(--fs-13); max-width: 42ch; } .empty-hint kbd { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-2); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: var(--r-1); padding: 1px 6px; color: var(--ink); } .empty-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); } /* ---------- attach view ---------- */ .attach { display: flex; flex-direction: column; height: 100%; background: var(--bg); } .attach-header { display: flex; align-items: center; gap: var(--sp-2); height: var(--bar-h); padding: 0 var(--sp-2); border-bottom: 1px solid var(--border); background: var(--surface); } /* Compact controls so the bar hugs the title — no tall buttons. */ .attach-header .btn { height: 26px; min-height: 26px; } .attach-header .btn-icon { width: 26px; } .attach-header .back { font-size: var(--fs-15); width: 28px; height: 26px; } /* Desktop keeps the session list permanently in view, so the in-header "back" arrow is redundant — the sidebar is the nav. Mobile (single-pane) keeps it. */ @media (min-width: 860px) { .attach-header .back { display: none; } } .attach-header .disconnect { color: var(--faint); } .attach-header .disconnect:hover { color: var(--danger); background: var(--danger-tint); border-color: color-mix(in oklab, var(--danger) 40%, transparent); } .attach-title { font-family: var(--font-mono); font-size: var(--fs-13); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; } .attach-title .sid { color: var(--muted); } .attach-title .at-name { color: var(--ink); font-weight: 500; } .attach-title .at-cmd { color: var(--muted); } .attach-title .at-cmd::before { content: "·"; margin: 0 6px; color: var(--faint); } .attach-title .at-host { color: var(--faint); margin-left: 6px; } .attach-title .at-host::before { content: "@"; opacity: 0.6; } .attach-state { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); padding: 2px var(--sp-2); border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; } .attach-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; } .attach-state[data-state="connecting"] { color: var(--warn); } .attach-state[data-state="connecting"]::before { animation: pulse 1.2s var(--ease-out) infinite; } .attach-state[data-state="open"] { color: var(--accent); } .attach-state[data-state="open"]::before { box-shadow: 0 0 6px var(--live-glow); } .attach-state[data-state="closed"], .attach-state[data-state="error"] { color: var(--danger); } .attach-body { flex: 1 1 auto; min-height: 0; padding: var(--sp-2); display: flex; overflow: hidden; background: var(--term-bg); } .attach-body .xterm { width: 100%; height: 100%; } /* xterm hard-codes overflow-y: scroll on its viewport — an always-on bar that (a) shows even with no scrollback and (b) makes FitAddon subtract its width, costing a column. Hide it entirely: scroll still works via wheel/touch/keys, and fit reclaims the full width. */ /* Higher specificity than xterm's own `.xterm .xterm-viewport` (which loads after this and would otherwise win the tie) so the always-on scrollbar reservation actually goes away. */ .attach-body .xterm .xterm-viewport { overflow-y: auto; scrollbar-width: none; /* We drive scrollback from touchmove (see attach.ts); claim vertical pans so the browser doesn't fight the handler or trigger gestures mid-scroll. */ touch-action: pan-y; } .attach-body .xterm .xterm-viewport::-webkit-scrollbar { width: 0; height: 0; } /* Mobile: full-bleed terminal — the desktop frame padding wastes space and the sub-cell remainder it left was triggering a stray scrollbar. */ @media (max-width: 859px) { .attach-body { padding: 0; } } .attach-status { margin: var(--sp-4); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-2); background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-14); color: var(--muted); } .attach-status.status-error { border-color: color-mix(in oklab, var(--danger) 50%, var(--border)); color: var(--danger); } /* ---------- mobile special-key bar (Termux-style) ---------- */ /* Two compact rows (Termux layout) in a 5-column grid the 10 keys flow into: Esc/Tab + Ctrl/Alt on the left, cursor keys as a real-keyboard inverted-T on the right (Home/End fill the top corners). Layout is always defined; only *visibility* is gated: hidden on precise-pointer devices (a physical keyboard already has these keys), shown on touch where the soft keyboard omits them. The shell tracks the visual viewport (see `#app`), so it lands above it. */ .attach-keybar { display: none; grid-template-columns: repeat(5, 1fr); gap: var(--sp-1); padding: var(--sp-1) var(--sp-2); padding-bottom: calc(var(--sp-1) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); background: var(--surface); } /* Shown on touch only while *this* terminal is focused (`keybar-active`, toggled on textarea focus/blur in attach.ts) AND the soft keyboard is actually up (`html.kb-open`, detected from the visual-viewport shrink in viewport.ts). Both are needed: dismissing the keyboard doesn't blur the terminal, so focus alone would leave the bar lingering. */ @media (pointer: coarse) { html.kb-open .attach-keybar.keybar-active { display: grid; } } .attach-keybar .keycap { height: 32px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: var(--fs-13); color: var(--ink); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-1); user-select: none; -webkit-user-select: none; touch-action: manipulation; cursor: pointer; transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); } .attach-keybar .keycap:active { background: var(--surface-3); border-color: var(--border-strong); } /* Explicit press feedback: `pointerdown` preventDefault (kept for terminal focus) suppresses native `:active` on touch, so flash a quick spring. */ @keyframes keycap-press { 0% { transform: scale(0.92); background: var(--accent-tint); border-color: var(--accent); } 100% { transform: scale(1); } } .attach-keybar .keycap.is-pressed { animation: keycap-press 200ms var(--ease-out); } /* Armed sticky modifier (Ctrl/Alt): lit in signal-green until it folds into the next key. */ .attach-keybar .keycap-mod[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent-strong); } /* ---------- modal ---------- */ .modal-backdrop { position: fixed; inset: 0; background: oklch(0.12 0.01 256 / 0.6); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; padding: 0; z-index: var(--z-modal); animation: fade var(--dur) var(--ease-out); } @media (min-width: 600px) { .modal-backdrop { align-items: center; padding: var(--sp-6); } } .modal { background: var(--surface); border-radius: var(--r-3) var(--r-3) 0 0; border: 1px solid var(--border); width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: var(--shadow-2); animation: sheet-up var(--dur-slow) var(--ease-out); } @media (min-width: 600px) { .modal { border-radius: var(--r-3); animation: pop var(--dur) var(--ease-out); } } .modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3); border-bottom: 1px solid var(--border); } .modal-header h2 { margin: 0; font-size: var(--fs-15); font-weight: 600; display: inline-flex; align-items: center; gap: var(--sp-2); } .modal-header h2::before { content: "+"; color: var(--accent); font-weight: 700; } .modal-body { padding: var(--sp-3); overflow: auto; display: flex; flex-direction: column; gap: var(--sp-2); scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; } .modal-body label, .spawn-form label { display: flex; flex-direction: column; gap: 5px; font-size: var(--fs-12); color: var(--muted); letter-spacing: 0.01em; } .modal-body label.row-inline, .spawn-form label.row-inline { flex-direction: row; align-items: center; gap: var(--sp-2); color: var(--ink); font-size: var(--fs-14); cursor: pointer; } .modal-body input[type="text"], .modal-body input[type="search"], .modal-body select, .spawn-form input[type="text"] { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-2); padding: 10px var(--sp-3); color: var(--ink); font-family: var(--font-mono); font-size: var(--fs-15); width: 100%; transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); } .modal-body input[type="text"]:hover, .modal-body select:hover, .spawn-form input[type="text"]:hover { border-color: var(--border-strong); } .modal-body input[type="text"]:focus, .modal-body input[type="search"]:focus, .modal-body select:focus, .spawn-form input[type="text"]:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-tint); } .modal-body input[type="checkbox"], .spawn-form input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; } .worktree { border: 1px solid var(--border); border-radius: var(--r-2); padding: var(--sp-3); margin: 0; display: flex; flex-direction: column; gap: var(--sp-3); background: color-mix(in oklab, var(--surface-2) 50%, transparent); } .worktree legend { padding: 0 6px; color: var(--ink); font-size: var(--fs-13); } .modal-actions { display: flex; gap: var(--sp-2); justify-content: flex-end; margin-top: var(--sp-2); } .form-error { color: var(--danger); margin: 0; font-size: var(--fs-13); min-height: 1.2em; } .form-error:not(:empty) { padding: var(--sp-2) var(--sp-3); background: var(--danger-tint); border-radius: var(--r-2); } /* ---------- spawn form: tiles + recents picker (#27) ---------- */ .spawn-modal .field, .spawn-form .field { display: flex; flex-direction: column; gap: var(--sp-2); } .field-label { font-size: var(--fs-13); color: var(--ink); } /* One-click tiles: host row + command row. */ .tile-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); } .tile { flex: 1 1 auto; min-width: 96px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: var(--sp-2) var(--sp-3); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-2); color: var(--ink); font-family: inherit; cursor: pointer; text-align: left; transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); } .tile:hover { border-color: var(--border-strong); } .tile.is-active { border-color: var(--accent); background: var(--accent-tint); } .tile-label { font-size: var(--fs-14); font-weight: 600; } .tile-sub { font-size: var(--fs-12); color: var(--muted); font-family: var(--font-mono); } .tile-more { flex: 0 0 auto; min-width: 0; justify-content: center; align-items: center; color: var(--muted); } /* Project picker rows (#59). Worktree rows are indented under their base repository; rows stale beyond 7 days are dimmed but still selectable. */ .picker { display: flex; flex-direction: column; gap: var(--sp-1); max-height: 220px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; } .project-filter { width: 100%; } .project-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding: 6px var(--sp-3); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-2); color: var(--ink); font-family: inherit; cursor: pointer; text-align: left; transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); } .project-row:hover { border-color: var(--border-strong); } .project-row.is-active { border-color: var(--accent); background: var(--accent-tint); } .project-row.is-worktree { margin-left: var(--sp-4); } .project-row.is-stale { opacity: 0.55; } .project-info { display: flex; align-items: baseline; gap: var(--sp-2); min-width: 0; } .project-name { font-size: var(--fs-13); font-weight: 600; white-space: nowrap; } .recent-dir { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .recent-cmd { flex: 0 0 auto; font-family: var(--font-mono); font-size: var(--fs-12); color: var(--muted); } .project-other .recent-dir { font-family: inherit; font-style: italic; } .picker-empty { margin: 0; padding: 6px var(--sp-3); color: var(--faint); font-size: var(--fs-13); } .picker-loading { margin: 0; padding: 6px var(--sp-3); color: var(--faint); font-size: var(--fs-13); } .raw-wrap { display: flex; } .raw-input { width: 100%; } /* Worktree-by-branch: inferred repo line + inline hint. */ .wt-hint { margin: 0; font-size: var(--fs-12); color: var(--muted); } .wt-body { display: flex; flex-direction: column; gap: var(--sp-3); } .wt-repo { margin: 0; font-family: var(--font-mono); font-size: var(--fs-12); color: var(--muted); } /* Generated-name field with a reroll button. */ .name-row { display: flex; gap: var(--sp-2); align-items: center; } .name-row input { flex: 1 1 auto; } .form-actions { display: flex; gap: var(--sp-2); justify-content: flex-end; margin-top: var(--sp-2); } .reroll { flex: 0 0 auto; } /* ---------- directory autocomplete (NAP-329) ---------- */ .dir-ac { position: fixed; z-index: var(--z-toast); /* above the modal it completes within */ margin: 0; padding: var(--sp-1); list-style: none; max-height: 280px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-2); box-shadow: var(--shadow-2); scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; } .dir-ac-item { padding: 6px var(--sp-2); border-radius: var(--r-1); color: var(--ink); font-family: var(--font-mono); font-size: var(--fs-14); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dir-ac-item:hover { background: var(--surface-2); } .dir-ac-item.is-active { background: var(--accent-tint); color: var(--ink); } .dir-ac-more { padding: 6px var(--sp-2); color: var(--faint); font-size: var(--fs-12); font-style: italic; } /* ---------- not-found ---------- */ .not-found { margin: auto; padding: var(--sp-5) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); align-items: center; text-align: center; } .not-found h1 { margin: 0; font-size: var(--fs-20); } .not-found p { margin: 0; color: var(--muted); } /* ---------- theme toggle ---------- */ .theme-toggle { position: relative; overflow: hidden; } .theme-toggle .sun, .theme-toggle .moon { position: absolute; inset: 0; display: grid; place-items: center; transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out); } .theme-toggle .moon { transform: translateY(0); opacity: 1; } .theme-toggle .sun { transform: translateY(120%); opacity: 0; } :root[data-theme="light"] .theme-toggle .moon { transform: translateY(-120%); opacity: 0; } :root[data-theme="light"] .theme-toggle .sun { transform: translateY(0); opacity: 1; } @media (prefers-color-scheme: light) { :root:not([data-theme]) .theme-toggle .moon { transform: translateY(-120%); opacity: 0; } :root:not([data-theme]) .theme-toggle .sun { transform: translateY(0); opacity: 1; } } /* ---------- keyframes ---------- */ @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } } @keyframes ripple { 0% { transform: scale(1); opacity: 0.6; } 70%, 100% { transform: scale(2.4); opacity: 0; } } @keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } } @keyframes fade { from { opacity: 0; } } @keyframes sheet-up { from { transform: translateY(16px); opacity: 0; } } @keyframes pop { from { transform: scale(0.98); opacity: 0; } } /* ---------- responsive ---------- */ @media (max-width: 520px) { .brand h1 { font-size: var(--fs-15); } .catalog-actions { flex: 1 1 100%; flex-wrap: wrap; justify-content: stretch; } .search { flex: 1 1 100%; max-width: none; order: -1; } .statusbar .spacer { display: none; } .tree-leaf .leaf-actions { opacity: 1; } } /* Mobile: no room for a split, so show one pane at a time. The catalog route shows the session list full-width; opening a session swaps to the terminal (its header's ← returns to the list). The connection still lives in the pool, so returning to it is instant. */ @media (max-width: 859px) { .app-shell[data-route="catalog"] > .content { display: none; } .app-shell:not([data-route="catalog"]) > .sidebar { display: none; } .sidebar { border-right: 0; } } /* ---------- reduced motion ---------- */ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; } .brand-dot, [data-status="running"] .leaf-status::before, .tally-live::before { animation: none; } } /* ---------- debug HUD (#20) ---------- */ .debug-hud { position: fixed; right: var(--sp-3); bottom: var(--sp-3); z-index: var(--z-toast); min-width: 180px; max-width: 280px; padding: var(--sp-2) var(--sp-3); background: color-mix(in oklab, var(--surface) 88%, transparent); border: 1px solid var(--border-strong); border-radius: var(--r-2); box-shadow: var(--shadow-2); font-family: var(--font-mono); font-size: var(--fs-12); line-height: 1.5; /* Diagnostics only — never intercept clicks on the terminal beneath it. */ pointer-events: none; user-select: none; } .hud-head { color: var(--ink); font-weight: 600; margin-bottom: 2px; border-bottom: 1px solid var(--border); padding-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hud-row { display: flex; justify-content: space-between; gap: var(--sp-3); } .hud-k { color: var(--muted); } .hud-v { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hud-v[data-activity="Active"] { color: var(--accent); } .hud-v[data-activity="AwaitingInput"] { color: var(--warn); } .hud-v[data-activity="Idle"] { color: var(--muted); } /* debug-HUD navbar toggle: lit when the HUD is on. */ .debug-toggle.is-active { color: var(--accent); border-color: var(--accent); } /* ========================================================================= multi-view (#30 splits, #31 tabs, #33 highlights) Tabs of nested split trees; each session leaf hosts a live .attach. The focused pane reads at full strength, the rest recede — and the sidebar row for the focused session matches it (loud), open-elsewhere rows stay quiet. ========================================================================= */ .mv { flex: 1; min-height: 0; display: flex; flex-direction: column; } /* Mobile, single tab: the tab bar is pure chrome — collapse it (a floating ☰ inside the pane keeps the sidebar drawer reachable). */ .mv-mobile-solo > .mv-tabs { display: none; } /* tab bar */ .mv-tabs { display: flex; align-items: stretch; gap: 2px; height: var(--bar-h); padding: 0 var(--sp-2); background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; flex: none; } .mv-tab { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-3); align-self: center; height: calc(var(--bar-h) - 8px); border-radius: var(--r-1); font: 500 var(--fs-12) / 1 var(--font-mono); color: var(--muted); background: transparent; border: 1px solid transparent; cursor: pointer; white-space: nowrap; } .mv-tab:hover { background: var(--surface-2); color: var(--ink); } .mv-tab.is-active { background: var(--surface-3); color: var(--ink); border-color: var(--border); } .mv-tab-close { opacity: 0.5; font-size: var(--fs-13); line-height: 1; } .mv-tab-close:hover { opacity: 1; color: var(--danger); } .mv-tab-add { align-self: center; width: 24px; height: 24px; border-radius: var(--r-1); color: var(--muted); font-size: var(--fs-15); background: transparent; border: none; cursor: pointer; } .mv-tab-add:hover { background: var(--surface-2); color: var(--ink); } /* canvas + welcome */ .mv-canvas { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--bg); } .mv-canvas > .mv-split, .mv-canvas > .mv-pane { position: absolute; inset: var(--sp-2); } .mv-canvas > .content-welcome { position: absolute; inset: 0; margin: auto; height: max-content; } /* splits + dividers */ .mv-split { display: flex; width: 100%; height: 100%; min-width: 0; min-height: 0; } .mv-split.row { flex-direction: row; } .mv-split.col { flex-direction: column; } .mv-split > .mv-slot { min-width: 0; min-height: 0; display: flex; } .mv-split > .mv-slot > * { flex: 1; min-width: 0; min-height: 0; } .mv-divider { flex: none; position: relative; z-index: 2; } .mv-split.row > .mv-divider { width: 6px; cursor: col-resize; } .mv-split.col > .mv-divider { height: 6px; cursor: row-resize; } .mv-divider::after { content: ""; position: absolute; inset: 0; margin: auto; background: var(--border); } .mv-split.row > .mv-divider::after { width: 1px; height: 100%; } .mv-split.col > .mv-divider::after { height: 1px; width: 100%; } .mv-divider:hover::after, .mv-divider.is-dragging::after { background: var(--accent); } /* a single pane = wrapper around a live .attach (or an empty placeholder) */ .mv-pane { position: relative; display: flex; min-width: 0; min-height: 0; border: 1px solid var(--border); border-radius: var(--r-2); overflow: hidden; background: var(--term-bg); } .mv-pane-host { flex: 1; min-width: 0; min-height: 0; display: flex; } .mv-pane-host > .attach { flex: 1; min-width: 0; min-height: 0; } /* per-session colour strip — maps a pane to its sidebar row */ .mv-pane::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--mv-color, transparent); z-index: 3; pointer-events: none; } /* focused pane: accent ring + glow, full strength */ .mv-pane.is-focused { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 0 22px -8px var(--accent-ring); } /* unfocused panes recede so the eye finds the live one */ .mv-pane:not(.is-focused) { border-color: color-mix(in oklab, var(--border) 70%, transparent); } .mv-pane:not(.is-focused) .attach-body { opacity: 0.45; } .mv-pane:not(.is-focused) .attach-header { opacity: 0.7; } /* per-pane back button is meaningless in multi-view (use Close pane instead) */ .mv-pane .attach-header .back { display: none; } /* Draft pane (#57): an empty pane renders the shared spawn form inline. The host is already a flex column; the form fills and scrolls within it. */ .mv-pane-host > .mv-draft { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; /* The modal form got its stacking and padding from `.modal-body`; in a pane the form is the host, so it carries them itself. */ display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3); } /* pane tools cluster (disconnect / split / close), top-right corner. The attach header's own disconnect button is hidden — ⏻ lives here as the leftmost tool. */ .mv-pane-tools { position: absolute; top: 6px; right: 4px; z-index: 4; display: flex; gap: 2px; opacity: 0; pointer-events: none; transition: opacity var(--dur-fast) var(--ease-out); } .mv-pane .attach-header .disconnect { display: none; } .mv-tool-off:hover { background: var(--danger-tint); color: var(--danger); } .mv-pane:hover .mv-pane-tools { opacity: 1; pointer-events: auto; } /* The tools share the header's right corner with the connection-state label, so hide that label while hovering (tools showing) — no overlap. */ .mv-pane:hover .attach-state { visibility: hidden; } /* "connected" is noise — a streaming terminal already shows it's connected. Only the transient/meaningful states surface (connecting/error); a closed session auto-closes its pane, so "closed" is rarely seen. */ .attach-state[data-state="open"] { display: none; } .mv-tool { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: var(--r-1); border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: var(--fs-12); cursor: pointer; } .mv-tool:hover { background: var(--surface-3); color: var(--ink); } /* drag-to-dock (issue #32): a cursor-following ghost + the target pane's drop zone highlight. */ .mv-drag-ghost { position: fixed; z-index: var(--z-toast); pointer-events: none; padding: 2px 10px; border-radius: var(--r-2); background: var(--surface-3); border: 1px solid var(--accent); color: var(--ink); font: 600 var(--fs-12) / 1.4 var(--font-mono); box-shadow: var(--shadow-2); } .mv-dock-overlay { position: absolute; inset: 0; z-index: 5; pointer-events: none; } .mv-dock-zone { background: color-mix(in oklab, var(--accent) 30%, transparent); border: 1px solid var(--accent); border-radius: var(--r-1); } /* sidebar two-tier highlight + colour dot (issue #33). .is-active = focused pane (loud, from existing rule); .is-open = open elsewhere (quiet). The dot uses the session's colour so a row maps to a pane. */ .tree-leaf.is-open { background: color-mix(in oklab, var(--accent) 6%, transparent); } .tree-leaf.is-open::after, .tree-leaf.is-active::after { content: ""; position: absolute; right: 9px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--mv-color, var(--accent)); pointer-events: none; } .tree-leaf.is-open::after { opacity: 0.7; } .tree-leaf.is-active::after { box-shadow: 0 0 8px var(--mv-color, var(--accent-ring)); } /* ========================================================================= multi-view mobile (#35): below 860px the split tree projects to a pill strip with one pane visible; the sidebar becomes an off-canvas drawer (☰). ========================================================================= */ .mv-backdrop { display: none; } .mv-mobile { position: absolute; /* Flush to the edges — a single full-screen pane needs no canvas inset. */ inset: 0; display: flex; flex-direction: column; gap: 0; } /* One pane fills the screen: no border, radius, or focus ring to box it in. */ .mv-mobile > .mv-pane, .mv-mobile > .mv-pane.is-focused { border: none; border-radius: 0; box-shadow: none; } .mv-panebar { display: flex; gap: 4px; padding: var(--sp-1) var(--sp-2); overflow-x: auto; scrollbar-width: none; flex: none; } .mv-pill { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 7px var(--sp-3); border-radius: var(--r-1); background: var(--surface-2); color: var(--muted); font: 600 var(--fs-12) / 1 var(--font-mono); white-space: nowrap; cursor: pointer; border: 1px solid transparent; } .mv-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mv-color, var(--faint)); flex: none; } .mv-pill.is-active { background: var(--accent-tint); color: var(--accent-strong); border-color: var(--accent-ring); } .mv-mobile > .mv-pane { flex: 1; min-height: 0; } @media (max-width: 859px) { .app-menu { display: inline-grid; } /* sidebar → off-canvas drawer (override the route-based show/hide) */ .app-shell > .sidebar { display: flex !important; position: fixed; top: 0; left: 0; bottom: 0; width: min(82vw, 320px); z-index: var(--z-modal); transform: translateX(-100%); transition: transform var(--dur) var(--ease-out); box-shadow: var(--shadow-2); border-right: 1px solid var(--border); } .app-shell.drawer-open > .sidebar { transform: none; } /* content always visible (the layout/projection); drawer floats over it */ .app-shell[data-route="catalog"] > .content, .app-shell > .content { display: flex; } .app-shell.drawer-open > .mv-backdrop { display: block; position: fixed; inset: 0; z-index: var(--z-backdrop); background: oklch(0 0 0 / 0.5); } }