/* Terminal (rjsh): phosphor on black in dark mode, ink on paper in light mode */
.app-terminal { background: #050504; --tm-blue: #8fb8ff; --tm-cyan: #7fd8e6; --tm-violet: #d9a6ff; }
[data-mode='light'] .app-terminal { background: var(--panel); --tm-blue: #1f56a8; --tm-cyan: #0b6f80; --tm-violet: #7a3fb0; }
.tm { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.tm-screen { flex: 1; min-height: 0; padding: 12px 14px 16px; font: 400 12.5px/1.6 var(--font-mono); color: var(--text); cursor: text; }
.tm-row { white-space: pre-wrap; word-break: break-word; min-height: 1.6em; }
.tm-pre { white-space: pre; overflow-x: auto; }
.tm-wrap { white-space: pre-wrap; max-width: 78ch; }
.tm-echo { color: var(--text); }
.tm-u { color: var(--acc); }
.tm-p { color: var(--tm-blue); }
.tm-d { color: var(--muted); }
.tm-h { color: var(--acc-hi); font-weight: 700; }
.tm-g { color: var(--green); }
.tm-k { color: var(--acc); font-weight: 600; }
.tm-th { color: var(--muted); }
.tm-big { color: var(--acc-hi); font-weight: 700; }
.tm-ref { color: var(--acc-hi); font-weight: 600; }
.tm-dir { color: var(--tm-blue); font-weight: 600; }
.tm-exe { color: var(--green); }
.tm-lnk { color: var(--tm-cyan); }
.tm-img { color: var(--tm-violet); }
.tm-cmd { color: var(--acc); text-decoration: underline; text-decoration-color: var(--acc-a35); text-underline-offset: 3px; font: inherit; padding: 0; }
.tm-cmd.tm-dir, .tm-cmd.tm-exe, .tm-cmd.tm-lnk, .tm-cmd.tm-img { text-decoration-color: currentColor; }
.tm-cmd:hover { color: var(--acc-hot); text-decoration-color: currentColor; }
.tm-line { display: flex; align-items: baseline; gap: 0; white-space: pre; cursor: text; }
.tm-line.is-busy { opacity: 0.35; }
.tm-input { flex: 1; min-width: 40px; background: none; border: 0; outline: 0; padding: 0; color: var(--text); font: inherit; caret-color: var(--acc); }
.tm-banner { padding: 4px 0 10px; }
.tm-led { image-rendering: auto; }
.tm-neo { display: flex; gap: 22px; align-items: flex-start; padding: 6px 0 10px; flex-wrap: wrap; }
.tm-neo-info { line-height: 1.62; white-space: nowrap; }
.tm-sw { display: flex; gap: 0; margin-top: 10px; }
.tm-sw i { width: 22px; height: 12px; display: block; }
.tm-chips { display: none; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; background: var(--panel); }
.tm-chips::-webkit-scrollbar { display: none; }
.os.is-mobile .tm-chips { display: flex; }
.os.is-mobile .tm-screen { font-size: 12px; padding: 10px 12px; }
.os.is-mobile .tm-input { font-size: 16px; } /* avoid iOS zoom on focus */
@container (max-width: 520px) { .tm-pre { font-size: 11px; } .tm-neo { gap: 12px; } }
[data-mode='light'] .tm-h, [data-mode='light'] .tm-big, [data-mode='light'] .tm-ref { color: var(--acc-hot); }
[data-mode='light'] .tm-chips { border-top: 2px solid var(--nb-line); }
