:root {
  --bg: #0f0d17;
  --card: #1b1828;
  --text: #ece8ff;
  --muted: #a49fbd;
  --accent: #8a3ae0;
  --ok: #6fe3a6;
  --warn: #ffcf66;
  --bad: #ff7a85;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.card {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid #2c2740;
}

h1 { margin: 0 0 4px; font-size: 1.4rem; }

.game { margin: 0 0 20px; color: var(--muted); overflow-wrap: anywhere; }

button {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: default; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--ok); outline-offset: 2px; }

.row {
  display: grid;
  grid-template-columns: 80px 1fr 64px;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.row input { width: 100%; accent-color: var(--accent); }
.row output { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.status { margin: 16px 0 4px; font-weight: 600; }
.status[data-state="ok"] { color: var(--ok); }
.status[data-state="wait"] { color: var(--warn); }
.status[data-state="bad"] { color: var(--bad); }

.hint { margin: 0; color: var(--muted); font-size: 0.85rem; }
