:root {
  --font: "Menlo", "Consolas", "DejaVu Sans Mono", monospace;
  --font-size: 20px;
  --line-height: 26px;
  --fg: #e0e0e0;
  --bg: #1a1a1a;
}

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  overscroll-behavior: none;
}

#status {
  font-size: 12px;
  padding: 4px 8px;
  color: #888;
}

#term-container {
  position: relative;
  height: calc(100% - 24px);
  padding: 4px;
  box-sizing: border-box;
}

#terminal {
  height: 100%;
}

/* Tap-Catcher: fängt Taps auf dem Terminal ab und fokussiert das Overlay,
   statt xterms eigenes (deaktiviertes) Helper-Textarea zu treffen. */
#tap-catcher {
  position: absolute;
  inset: 0;
  z-index: 5;
}

/* Overlay-Textarea: wird per JS an die aktuelle Cursor-Position von xterm
   angedockt und wächst/umbricht dort wie ein normales HTML-Feld. */
#overlay {
  position: absolute;
  z-index: 10;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  resize: none;
  overflow: hidden;
  background: transparent;
  color: var(--fg);
  caret-color: var(--fg);
  font-family: var(--font);
  font-size: var(--font-size);
  line-height: var(--line-height);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: var(--line-height);
}
