:root {
  --bg: #0f1216;
  --card: #171c22;
  --line: #262d36;
  --text: #e6e9ee;
  --dim: #8b95a3;
  --on: #2ea043;
  --warn: #d29922;
  --off: #6e7681;
  --accent: #58a6ff;
  --crash: #f85149;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 16px;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

h1 { font-size: 18px; margin: 0; font-weight: 600; }
h2 { font-size: 13px; margin: 0 0 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
h3 { font-size: 13px; margin: 0 0 8px; }
.sub { color: var(--dim); font-weight: 400; }

.pill { margin-left: auto; padding: 3px 10px; border-radius: 999px; font-size: 12px; }
.pill.on { background: rgba(46,160,67,.18); color: var(--on); }
.pill.warn { background: rgba(210,153,34,.18); color: var(--warn); }
.pill.off { background: rgba(110,118,129,.18); color: var(--off); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}

.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
label { display: inline-flex; gap: 6px; align-items: center; color: var(--dim); }
input {
  background: #0d1117;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 5px;
  padding: 5px 7px;
  font: inherit;
}
button {
  background: #21262d;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 5px;
  padding: 6px 12px;
  font: inherit;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
button:disabled { opacity: .45; cursor: default; }

.hint { color: var(--dim); font-size: 12px; margin: 10px 0 0; }
.hint code { background: #0d1117; padding: 1px 4px; border-radius: 3px; }
.dim { color: var(--dim); }

/* The flight */
.flight { text-align: center; padding: 22px 14px; }
.multiplier { font-size: 54px; font-weight: 700; letter-spacing: -.02em; }
.multiplier.crashed { color: var(--crash); }
.phase { display: flex; gap: 12px; justify-content: center; margin-top: 4px; }
.phase #phase { color: var(--accent); }

.strip { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-top: 14px; }
.chip { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: #0d1117; border: 1px solid var(--line); }
.chip.low { color: var(--dim); }
.chip.mid { color: var(--accent); }
.chip.high { color: var(--on); }

/* Slots */
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.slot { border: 1px solid var(--line); border-radius: 6px; padding: 12px; }
.slot label { display: flex; justify-content: space-between; margin-bottom: 7px; }
.slot .state { margin-top: 8px; font-size: 12px; }
.balance { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

.out {
  background: #0d1117;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  margin: 0;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow: auto;
}
.out.log { max-height: 320px; }
