:root {
  --bg: #12100c;
  --card: #1b1712;
  --text: #e8e0d0;
  --muted: #9a8f7c;
  --accent: #e8a33d;
  --line: #2c2519;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
}

.brand {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.status {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5c5344;
}

body.live .dot {
  background: #c94f3d;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.5rem 3rem;
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  width: 100%;
  max-width: 560px;
}

.np-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

#npTitle {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0.35rem 0 0.6rem;
  line-height: 1.15;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  background: #241e15;
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.viz {
  margin: 1.2rem 0 0.4rem;
  height: 90px;
}

#scope {
  width: 100%;
  height: 90px;
  display: block;
}

.progress {
  height: 4px;
  background: #241e15;
  border-radius: 2px;
  overflow: hidden;
}

#progressFill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.25s linear;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.45rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.controls {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.3rem;
  align-items: center;
}

button {
  border: 1px solid var(--line);
  background: #241e15;
  color: var(--text);
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #171208;
  font-weight: 700;
}

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

input[type='range'] {
  flex: 1;
  accent-color: var(--accent);
}

.how {
  color: var(--muted);
  max-width: 560px;
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
  margin: 0;
}

footer {
  text-align: center;
  padding: 1.2rem;
  color: #6b6152;
  font-size: 0.75rem;
}

footer a {
  color: var(--muted);
}

.station-controls {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.9rem;
  align-items: center;
  flex-wrap: wrap;
}

.sc-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-right: 0.2rem;
}

.chip-btn {
  border: 1px solid var(--line);
  background: #241e15;
  color: var(--muted);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
}

.chip-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #171208;
  font-weight: 600;
}

.station-controls .spacer {
  flex: 1;
}
