*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0b0d10;
  --fg: #eef2f7;
  --muted: #9aa4b2;
  --accent: #9ee7ff;
  --green: #22c55e;
  --red: #ef4444;
  --font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 14px; line-height: 1.6; overflow: hidden; }

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}

.terminal-wrap.desktop {
  display: flex;
  flex-direction: column;
  width: min(720px, calc(100% - 32px));
  height: 100vh;
  cursor: text;
}

.terminal-wrap.desktop .input-line {
  display: flex;
  align-items: center;
  position: relative;
  flex-shrink: 0;
  margin-top: 25vh;
}

.terminal-wrap.desktop .input-wrap {
  position: relative;
  width: 100%;
  min-height: 1.4em;
  font-size: 16px;
}

.terminal-wrap.desktop .input-ghost {
  position: absolute;
  left: 0;
  top: 0;
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: none;
}

.terminal-wrap.desktop #input-text-display {
  color: var(--fg);
}

.terminal-wrap.desktop #input-suggestion {
  color: rgba(255,255,255,.18);
}

#char-prefix {
  position: absolute;
  right: 0;
  top: 0;
  padding: 0 4px;
  font-size: inherit;
  line-height: inherit;
  color: rgba(154, 164, 178, 0.35);
  pointer-events: none;
  white-space: nowrap;
  display: none;
  z-index: 2;
}

.terminal-wrap.desktop #terminal-input {
  position: relative;
  z-index: 1;
  display: block;
  background: transparent;
  border: none;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: var(--red);
  caret-shape: block;
  font-family: var(--font);
  font-size: inherit;
  line-height: inherit;
  outline: none;
  resize: none;
  overflow: hidden;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 1.4em;
  min-height: 1.4em;
}

#mode-indicator {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--muted);
  z-index: 10;
  visibility: hidden;
}

#mode-indicator.visible {
  visibility: visible;
}

.mode-chat { color: #f59e0b; }
.mode-email { color: var(--accent); }

.terminal-wrap.desktop .history {
  flex: 1;
  overflow-y: auto;
  padding-top: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.terminal-wrap.desktop .history::-webkit-scrollbar {
  display: none;
}

.terminal-wrap.desktop .history-line {
  display: flex;
  align-items: baseline;
  padding: 2px 0;
  font-size: 12px;
  transition: opacity .6s ease;
}

.terminal-wrap.desktop .history-line.output-line {
  padding-bottom: 12px;
}

.terminal-wrap.desktop .line-num {
  width: 2ch;
  flex-shrink: 0;
  text-align: right;
  margin-right: 1.5ch;
  color: var(--muted);
  user-select: none;
}

.terminal-wrap.desktop .line-content {
  flex: 1;
  min-width: 0;
}

.terminal-wrap.desktop .history-line.fade-1 { opacity: .65; }
.terminal-wrap.desktop .history-line.fade-2 { opacity: .40; }
.terminal-wrap.desktop .history-line.fade-3 { opacity: .20; }
.terminal-wrap.desktop .history-line.fade-4 { opacity: .08; }
.terminal-wrap.desktop .history-line.fade-5 { opacity: .03; }
.terminal-wrap.desktop .history-line.fade-6 { opacity: 0; }

@media (max-width: 768px) {
  .terminal-wrap.desktop .input-line { margin-top: 10vh; }
}

.cmd-text { color: var(--fg); }
.warning { color: #f59e0b; }

.help-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
}

.help-cmd { color: var(--accent); }
.help-desc { color: var(--muted); word-break: break-all; }
.text-muted { color: var(--muted); }
.pre-line { white-space: pre; }

.routes-grid {
  display: grid;
  grid-template-columns: 7ch 16ch 1fr;
  gap: 4px 16px;
}
.routes-method { color: var(--accent); }
.routes-path { color: var(--muted); }
.routes-desc { color: var(--muted); }

.mascot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mascot-art {
  font-size: 6px;
  line-height: 1.2;
  text-align: left;
  white-space: pre;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.mascot-text { font-size: 12px; font-style: italic; color: var(--muted); }
.mascot-status { font-size: 11px; color: var(--muted); }



.hidden { display: none; }

.email-tui { margin: 4px 0; }
.email-row { display: flex; gap: 8px; padding: 2px 0; }
.email-row.active::before { content: '> '; color: var(--accent); }
.email-label { color: var(--muted); min-width: 8ch; }
.email-value { color: var(--fg); white-space: pre-wrap; word-break: break-word; }

