:root {
  --bg: #080808;
  --text: #d4d4d4;
  --muted: #666;
  --accent: #888;
  --ok: #7a9;
  --warn: #a97;
  --err: #a77;
  --line: rgba(255, 255, 255, 0.08);
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  overflow: hidden;
}

#net {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.5;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 20px;
}

.mark {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
}

.mark span {
  width: 8px;
  height: 8px;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
}

.term {
  width: min(480px, 100%);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.term__out {
  min-height: 120px;
  max-height: min(36vh, 240px);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.term__out::-webkit-scrollbar {
  width: 6px;
}

.term__out::-webkit-scrollbar-track {
  background: transparent;
  margin: 2px 0;
}

.term__out::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  border: 1px solid transparent;
  background-clip: padding-box;
}

.term__out::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
  background-clip: padding-box;
}

.term__out::-webkit-scrollbar-thumb:active {
  background: rgba(255, 255, 255, 0.3);
  background-clip: padding-box;
}

.term__out .ok { color: var(--ok); }
.term__out .warn { color: var(--warn); }
.term__out .err { color: var(--err); }
.term__out .acc { color: var(--text); }
.term__out .dim { color: var(--muted); }

.term__line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
}

.term__ps {
  color: var(--muted);
  cursor: text;
}

#cmd {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  caret-color: var(--text);
}

@media (max-width: 480px) {
  #cmd { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  #net { display: none; }
}
