*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0e0e10; }
body {
  font-family: "JetBrains Mono", ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
  color: #d0d0d0;
}
input { font-family: inherit; }
::selection { background: #39415a; }

/* ── Window ── */
.term-window {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #0e0e10;
  overflow: hidden;
}

/* ── Title bar ── */
.term-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  background: #17171d;
  border-bottom: 1px solid #26262e;
  flex: none;
}
.tdot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}
.tdot-red    { background: #ec6a5e; }
.tdot-yellow { background: #f4bf4f; }
.tdot-green  { background: #61c554; }
.term-title-text {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: #9a9aa5;
}

/* ── Terminal body ── */
.term-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 20px;
  font-size: 13px;
  line-height: 1.55;
  background: #0e0e10;
  cursor: text;
  scroll-behavior: smooth;
}

/* ── Output lines ── */
.tline {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 1em;
}

/* ── Prompt structure ── */
.ps1-line1 {
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 2px;
}
.ps1-line2 {
  display: flex;
  align-items: baseline;
}
#device-prompt .ps1-line2 { margin-top: 2px; }

/* ── Inputs ── */
#local-input,
#device-input {
  flex: 1;
  min-width: 2ch;
  background: transparent;
  border: none;
  outline: none;
  color: #e6e6e6;
  caret-color: #e6e6e6;
  font: inherit;
  padding: 0;
}

/* ── ANSI color helpers ── */
.c-blue   { color: #5f87ff; }
.c-white  { color: #ffffff; }
.c-yellow { color: #e6b450; }
.c-green  { color: #4ade80; }
.c-red    { color: #ff6b6b; }
.c-gray   { color: #6a6a6a; }
.c-dim    { color: #7d93a8; }
.c-default{ color: #d0d0d0; }

/* ── Mobile tweaks ── */
@media (max-width: 600px) {
  .term-body { font-size: 12px; padding: 10px 10px 16px; }
}
