/* Uses the same terminal palette and Marochy controls as the AI Terminal. The phone's shell container already
   follows --phone-height / --phone-top from visualViewport, keeping this last row above the software keyboard. */
.shell-page { display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; padding: 20px 24px; overflow: hidden; }
.shell-page .page-back { flex: none; margin: 0; }
.shell-heading { display: flex; align-items: center; flex: none; gap: 16px; min-width: 0; }
.shell-heading h1 { flex: none; font-size: 22px; }
.shell-cwd { flex: 1; min-width: 0; overflow: hidden; color: var(--muted); font: 12px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.shell-heading > button { flex: none; margin-left: auto; }
.shell-controls { display: flex; flex: none; align-items: center; gap: 12px; min-width: 0; }
.shell-tabs { display: flex; flex: 1; gap: 4px; min-width: 0; overflow-x: auto; border-bottom: 1px solid var(--border); }
.shell-tab { flex: none; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; border-bottom: 2px solid transparent; color: var(--muted); transition: color var(--quick) var(--ease), border-color var(--quick) var(--ease); }
.shell-tab.on { color: var(--fg); border-bottom-color: var(--accent); background: var(--surface); }
.shell-actions { display: flex; flex: none; gap: 8px; }
.shell-status { flex: none; margin: 0; color: var(--muted); font: 12px/1.5 var(--mono); overflow-wrap: anywhere; }
.shell-workspace { position: relative; flex: 1; min-height: 0; min-width: 0; overflow: hidden; background: var(--term-bg); border: 1px solid var(--term-line); }
.shell-terminal { position: absolute; inset: 8px; min-width: 0; min-height: 0; }
.shell-terminal .xterm { height: 100%; }
.shell-terminal .xterm-screen { user-select: text; -webkit-user-select: text; }
.shell-keys { display: none; }
.shell-page [hidden] { display: none !important; }
html.phone .shell-page { gap: 8px; padding: 12px 12px max(8px, env(safe-area-inset-bottom)); }
html.phone .shell-heading { gap: 8px; flex-wrap: wrap; }
html.phone .shell-cwd { flex-basis: 100%; order: 1; }
html.phone .shell-controls { gap: 8px; }
html.phone .shell-tab { max-width: 160px; }
html.phone .shell-keys { display: flex; flex: none; gap: 4px; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px 0; }
html.phone .shell-key { flex: none; min-width: 44px; min-height: 44px; padding: 0 12px; }
html.phone .shell-key.on { color: var(--accent); border-color: var(--accent); background: var(--surface2); }
html.phone.phone-keyboard .shell-page { padding-bottom: 8px; }
