html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #0d1013;
}

@font-face {
  font-family: "JetBrainsMono Nerd Font Mono";
  src: url("./JetBrainsMonoNerdFontMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  outline: 0;
  overflow: hidden;
}

canvas {
  display: block;
}

#grid {
  width: max-content;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  /* The grid is a rendered UI, not selectable text — dragging the mouse over it
     (e.g. to move a panel) must not start a text selection. */
  user-select: none;
  -webkit-user-select: none;
}

#grid > pre {
  width: max-content;
  height: 20px !important;
  line-height: 20px !important;
}

.keyboard-capture-hint {
  position: fixed;
  right: 10px;
  bottom: 8px;
  padding: 3px 7px;
  border: 1px solid rgba(100, 116, 139, 0.45);
  border-radius: 999px;
  background: rgba(16, 16, 20, 0.48);
  color: rgba(205, 214, 244, 0.72);
  font: 11px "JetBrainsMono Nerd Font Mono";
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.ratatui-demo-root[data-keyboard-active="true"] .keyboard-capture-hint {
  opacity: 0.72;
}

pre {
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
  font-family: "JetBrainsMono Nerd Font Mono";
  font-variant-ligatures: none;
}

/* Thin border along the viewport edge while the demo holds the keyboard —
   from inside the iframe this reads as a border around the iframe itself. */
.ratatui-demo-root[data-keyboard-active="true"]::after {
  content: "";
  position: fixed;
  inset: 0;
  border: 1px solid rgba(100, 116, 139, 0.6);
  pointer-events: none;
}
