:root {
  --bg: #0f0f12;
  --surface: #1a1a21;
  --border: #2a2a35;
  --text: #f2f2f7;
  --muted: #8e8e9a;
  --spotify: #1db954;
  --spotify-hover: #1ed760;
  --danger: #e85d5d;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

/* Wider layout when the Spotify dashboard (two-column + tabs) is visible */
.shell:has(#panel-dashboard:not(.hidden)) {
  max-width: min(1080px, calc(100vw - 2.5rem));
}

.head .title {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 700;
}

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

.banner {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.banner-warn {
  background: rgba(232, 93, 93, 0.12);
  border: 1px solid rgba(232, 93, 93, 0.35);
  color: #ffb4b4;
}

.banner:not(.banner-warn) {
  background: rgba(29, 185, 84, 0.12);
  border: 1px solid rgba(29, 185, 84, 0.35);
  color: #b8f5cf;
}

.hidden {
  display: none !important;
}

.panel {
  margin-top: 1.5rem;
}

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

.copy-hint {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.8rem;
  line-height: 1.45;
}

.copy-hint code {
  font-size: 0.78em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-spotify {
  background: var(--spotify);
  color: #000;
}

.btn-spotify:hover {
  background: var(--spotify-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}

.btn-copy {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.btn-copy:hover {
  border-color: var(--muted);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

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

.copy-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.copy-block label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.copy-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.copy-row-stack {
  flex-direction: column;
}

.field {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
}

.field-json {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  resize: vertical;
  min-height: 140px;
}

.callback-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.callback-msg {
  color: var(--muted);
}

