:root {
  --bg: #0f0f12;
  --surface: #1a1a1f;
  --border: #2a2a30;
  --text: #e8e8ea;
  --text-dim: #9a9aa2;
  --accent: #4ade80;
  --danger: #f87171;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

a { color: var(--accent); }

header.app-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

header.app-header h1 { font-size: 1.1rem; margin: 0; }

nav.tier-nav { display: flex; gap: 0.5rem; }

nav.tier-nav a {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--text-dim);
}

nav.tier-nav a.active { color: var(--text); border-color: var(--accent); }

main { max-width: 48rem; margin: 0 auto; padding: 1rem 1.25rem 3rem; }

button {
  font: inherit;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

button:hover { border-color: var(--accent); }
button:active { transform: translateY(1px); }

input[type="text"], input[type="search"] {
  font: inherit;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 100%;
}

.empty-state {
  color: var(--text-dim);
  padding: 2rem 1rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.error-banner {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin: 0.75rem 0;
}

.best-effort-banner {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin: 0.75rem 0;
}

.offset-label {
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  min-width: 8rem;
  text-align: center;
}

/* Shared lyrics-engine rendering — used by both tier pages */
.lyrics-panel {
  height: min(50vh, 26rem);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.lyrics-line {
  padding: 0.5rem 0.25rem;
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
  cursor: pointer;
  border-radius: 6px;
}

.lyrics-line.active { opacity: 1; color: var(--accent); font-weight: 600; }

.tier-cards { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }

.tier-card {
  display: block;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
}

.tier-card strong { color: var(--text); display: block; margin-bottom: 0.25rem; }
.tier-card span { color: var(--text-dim); font-size: 0.9rem; }

@media (max-width: 480px) {
  main { padding: 0.75rem 0.75rem 3rem; }
  header.app-header { padding: 0.75rem; }
}
