:root {
  color-scheme: dark;
  --bg: #000000;
  --fg: #f5f5f5;
  --fg-dim: #7a7a7a;
  --accent: #e8283e;
  --bar-bg: #111111;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
  user-select: none;
}

#app {
  height: 100dvh;
  width: 100vw;
  display: flex;
  flex-direction: column;
}

/* ---------- Home ---------- */

.home {
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  overflow-y: auto;
}

.home-header {
  padding: 20px 4px 8px;
}

.home-header h1 {
  font-size: 22px;
  margin: 0;
  font-weight: 600;
}

.song-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 24px;
}

.song-item {
  background: var(--bar-bg);
  border: 1px solid #262626;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  color: var(--fg);
  text-align: left;
}

.song-item:active {
  background: #1d1d1d;
}

.song-title {
  font-size: 18px;
  font-weight: 600;
}

.song-artist {
  font-size: 13px;
  color: var(--fg-dim);
}

/* ---------- Prompter ---------- */

.prompter {
  height: 100dvh;
}

.top-bar,
.bottom-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  background: var(--bar-bg);
  z-index: 2;
}

.top-bar {
  padding: max(10px, env(safe-area-inset-top)) 8px 8px;
  justify-content: space-between;
}

.song-name {
  font-size: 15px;
  color: var(--fg-dim);
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-bar {
  flex-direction: column;
  align-items: stretch;
  padding: 6px 12px max(10px, env(safe-area-inset-bottom));
  gap: 4px;
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.progress-slider {
  width: 100%;
  accent-color: var(--accent);
  height: 28px;
}

.icon-btn {
  background: #1d1d1d;
  border: none;
  color: var(--fg);
  font-size: 18px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.icon-btn:active {
  background: #2a2a2a;
}

.icon-btn.play {
  background: var(--accent);
  font-size: 16px;
}

.icon-btn.play.playing {
  background: #444;
}


.scroll-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: scroll;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
}

.lyrics {
  padding: 0 20px;
  line-height: 1.5;
  font-weight: 600;
  text-align: center;
}

.spacer {
  height: 40vh;
}

.stanza {
  margin-bottom: 2.2em;
}

.line {
  margin: 0 0 0.3em;
  color: var(--fg-dim);
}

.line.repeated {
  margin-bottom: 0.9em;
}

.instrumental {
  margin: 0 0 2.2em;
  padding: 18px 14px;
  border: 1px dashed #3a3a3a;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: background 0.2s, border-color 0.2s;
}

.instrumental-label {
  font-size: 0.6em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.instrumental-hint {
  font-size: 0.32em;
  font-weight: 400;
  font-style: normal;
  color: #555;
  text-transform: none;
  letter-spacing: normal;
}

.instrumental.no-pause {
  border-style: solid;
  opacity: 0.7;
}

.instrumental.active {
  border-color: var(--accent);
  background: rgba(232, 40, 62, 0.12);
}

.instrumental.active .instrumental-label {
  color: var(--accent);
}
