/* ============ Terminal ============ */
.term-trigger { position: fixed; left: 22px; bottom: 22px; width: 42px; height: 42px; border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--line-strong); color: var(--text); font-family: var(--ff-mono); font-size: .95rem; display: flex; align-items: center; justify-content: center; transition: all var(--transition); z-index: 90; box-shadow: var(--shadow); }
.term-trigger:hover { border-color: var(--amber); color: var(--amber); transform: translateY(-2px); }
.term-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.7); padding: 20px; }
.term-overlay[hidden] { display: none; }
.term-window { width: min(640px, 100%); max-height: 74vh; display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.term-code { font-family: var(--ff-mono); font-size: .66rem; color: var(--amber); border: 1px solid var(--amber); border-radius: var(--radius-sm); padding: 3px 7px; letter-spacing: .04em; flex-shrink: 0; }
.term-bar-title { font-family: var(--ff-mono); font-size: .78rem; color: var(--text-mute); flex: 1; }
.term-close { font-size: .95rem; color: var(--text-mute); padding: 4px 8px; transition: color var(--transition); }
.term-close:hover { color: var(--amber); }
.term-body { flex: 1; overflow-y: auto; padding: 16px 18px; font-family: var(--ff-mono); font-size: .84rem; line-height: 1.7; }
.term-line { margin-bottom: 6px; white-space: pre-wrap; word-break: break-word; }
.term-line.cmd { color: var(--text-mute); }
.term-line.cmd::before { content: '$ '; color: var(--amber); }
.term-line.out { color: var(--text-dim); }
.term-line.err { color: var(--text-dim); text-decoration: underline dotted; }
.term-input-row { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.term-prompt { font-family: var(--ff-mono); color: var(--amber); font-size: .84rem; }
.term-input { flex: 1; background: transparent; border: none; font-family: var(--ff-mono); font-size: .84rem; color: var(--text); }
.term-input:focus { outline: none; }
