:root {
  --bg: #0d0f14;
  --bar: #15181e;
  --control: #1d2129;
  --line: #2b303a;
  --text: #d6dae3;
  --dim: #929aa9;
  --accent: #7aa2f7;
  --attached: #9ece6a;
  --bad: #f7768e;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--bg);
  color: var(--dim);
  font-family: var(--mono);
}

.features {
  max-width: 34rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}

.features li::before {
  content: "x ";
  color: var(--bad);
}

.features li.ok::before {
  content: "+ ";
  color: var(--attached);
}

#app {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--bar);
}

.spacer {
  flex: 1 1 8px;
}

button {
  min-height: 29px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--control);
  color: var(--text);
  font: inherit;
  flex: 0 0 auto;
  padding: 4px 9px;
  cursor: pointer;
}

button:hover:not(:disabled) {
  border-color: var(--accent);
}

button:focus-visible {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 1px;
}

button:disabled {
  cursor: default;
  opacity: 0.5;
}

#terminal-wrap {
  min-width: 0;
  min-height: 0;
  padding: 7px 6px 5px 8px;
  overflow: hidden;
  background: var(--bg);
}

#terminal {
  width: 100%;
  height: 100%;
}

@media (max-width: 360px) {
  .spacer {
    display: none;
  }

  .toolbar {
    justify-content: flex-end;
  }
}
