.hidden {
  display: none;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: #111827;
  color: #f9fafb;
}

.app {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
}

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.subtitle {
  color: #cbd5e1;
}

.version-pill {
  font-size: 12px;
  color: #cbd5e1;
  border: 1px solid #374151;
  background: #0f172a;
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
}

.card {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

button:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.status {
  margin-top: 12px;
  color: #93c5fd;
  min-height: 20px;
  animation: pulse 500ms ease;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.summary-grid dt {
  font-size: 12px;
  text-transform: uppercase;
  color: #9ca3af;
}

.summary-grid dd {
  margin: 4px 0 0;
  font-size: 18px;
}

.deck-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  list-style: none;
  padding: 0;
}

.deck-list li {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 8px 10px;
}

.hint {
  color: #9ca3af;
}

.node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.node-button {
  text-align: left;
  background: #0f172a;
  border: 1px solid #334155;
  min-height: 72px;
}

.node-button.current {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px #f59e0b;
}

.end-state {
  border-color: #4b5563;
}

.end-state.win {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px #22c55e;
}

.end-state.loss {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px #ef4444;
}

.top-gap {
  margin-top: 12px;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

pre {
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
