@font-face {
  font-family: "Libre Baskerville";
  src: url("fonts/LibreBaskerville.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Baskerville";
  src: url("fonts/LibreBaskerville-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0c1210;
  --bg-elev: #15201a;
  --gruen-dunkel: #1e3328;
  --gruen: #2f4a38;
  --gruen-hell: #3d5c47;
  --beige: #f4efe6;
  --beige-warm: #ebe3d4;
  --beige-dunkel: #d9cdb8;
  --erde: #6b5344;
  --akzent: #c9a96a;
  --akzent-dunkel: #8a6b3e;
  --text: #f4efe6;
  --text-dim: #b7ad9c;
  --line: rgba(201, 169, 106, 0.28);
  --shadow: rgba(0, 0, 0, 0.45);
  --radius: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
body {
  min-height: 100dvh;
  background:
    radial-gradient(120% 80% at 50% -10%, #24382d 0%, transparent 55%),
    var(--bg);
}
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: var(--akzent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
img { display: block; max-width: 100%; }

.app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: calc(10px + var(--safe-top)) 18px calc(12px + var(--safe-bot));
  gap: 8px;
}

.top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--akzent-dunkel);
  box-shadow: 0 0 0 2px rgba(201, 169, 106, 0.18);
}
.brand { flex: 1; min-width: 0; }
.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--akzent);
  font-weight: 600;
}
.brand h1 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.25;
}
.top-actions { display: flex; gap: 2px; }

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--beige);
  position: relative;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover, .icon-btn:focus-visible { background: rgba(244, 239, 230, 0.08); }
.icon-btn[aria-pressed="true"] { color: var(--akzent); }
.icon-btn.ghost { width: 46px; height: 46px; }

.now {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 0 auto;
  padding-top: 4px;
}
.cover-wrap {
  position: relative;
  width: min(48vw, 200px);
  max-height: 30vh;
  aspect-ratio: 5 / 8;
  height: auto;
  max-width: 100%;
}
.cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(201, 169, 106, 0.35),
    0 14px 32px var(--shadow);
  background: var(--gruen-dunkel);
}
.badge {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  background: rgba(12, 18, 16, 0.86);
  color: var(--akzent);
  border: 1px solid var(--akzent);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 5px 12px;
  backdrop-filter: blur(6px);
}
#song-title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.28rem;
  font-weight: 400;
  margin-top: 14px;
  padding: 0 8px;
}
#song-book {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-top: 4px;
  padding: 0 12px;
  max-width: 36em;
}

.transport { flex-shrink: 0; padding: 6px 0 2px; }
.progress {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
#time-cur { text-align: right; }
#time-dur { text-align: left; }
#seek {
  -webkit-appearance: none;
  appearance: none;
  height: 28px;
  background: transparent;
  width: 100%;
}
#seek::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(90deg, var(--akzent) var(--pos, 0%), rgba(217, 205, 184, 0.28) var(--pos, 0%));
  border-radius: 99px;
}
#seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--beige);
  border: 2px solid var(--akzent-dunkel);
  margin-top: -6px;
  box-shadow: 0 1px 4px var(--shadow);
}
#seek:disabled::-webkit-slider-thumb { opacity: 0.35; }
#seek::-moz-range-track {
  height: 4px;
  background: rgba(217, 205, 184, 0.28);
  border-radius: 99px;
}
#seek::-moz-range-progress {
  height: 4px;
  background: var(--akzent);
  border-radius: 99px;
}
#seek::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--beige);
  border: 2px solid var(--akzent-dunkel);
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 0;
}
.play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--akzent);
  color: var(--gruen-dunkel);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(138, 107, 62, 0.4);
  flex-shrink: 0;
}
.play svg { width: 30px; height: 30px; }
.play .ico-play { margin-left: 3px; }
.play.is-playing .ico-play { display: none; }
.play.is-playing .ico-pause { display: block; }
.play:not(.is-playing) .ico-pause { display: none; }
.play:hover, .play:focus-visible { filter: brightness(1.08); }
.play:active { transform: scale(0.97); }
.play.is-soon {
  background: var(--gruen);
  color: var(--akzent);
  box-shadow: none;
  border: 1px solid var(--akzent-dunkel);
}
.repeat-one {
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--akzent);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  margin-top: 2px;
}
.tabs button {
  padding: 10px 8px 8px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs button[aria-selected="true"] {
  color: var(--akzent);
  border-bottom-color: var(--akzent);
}

.panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 4px;
}

.playlist { list-style: none; }
.playlist li + li { border-top: 1px solid rgba(217, 205, 184, 0.1); }
.song-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 8px 4px;
  border-radius: 8px;
}
.song-btn:hover, .song-btn:focus-visible { background: rgba(244, 239, 230, 0.06); }
.song-btn.is-current {
  background: rgba(201, 169, 106, 0.1);
}
.song-btn img {
  width: 42px;
  height: 66px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--line);
  background: var(--gruen-dunkel);
}
.song-meta { min-width: 0; }
.song-meta strong {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-btn.is-current .song-meta strong { color: var(--akzent); }
.song-meta span {
  display: block;
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--akzent);
  border: 1px solid var(--akzent-dunkel);
  border-radius: 999px;
  padding: 3px 7px;
  white-space: nowrap;
}

.lyrics {
  padding: 4px 8px 16px;
  text-align: center;
}
.lyrics .label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--akzent);
  font-weight: 600;
  margin: 18px 0 8px;
}
.lyrics .label:first-child { margin-top: 4px; }
.lyrics p {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--beige-warm);
}
.lyrics p + p { margin-top: 0.2em; }
.lyrics .block-chorus p { color: var(--beige); }
.lyrics .solo {
  font-style: italic;
  color: var(--text-dim);
  font-family: "Libre Baskerville", Georgia, serif;
}

.foot {
  flex-shrink: 0;
  text-align: center;
  padding-top: 6px;
  border-top: 1px solid rgba(217, 205, 184, 0.1);
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  position: relative;
  background: var(--bg);
}
.foot::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 18px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.foot p + p { margin-top: 2px; }

.sheet {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: grid;
  place-items: end center;
  z-index: 20;
  padding: 16px 16px calc(16px + var(--safe-bot));
}
.sheet[hidden] { display: none !important; }
svg[hidden], .u-hide { display: none !important; }
.sheet-card {
  width: min(100%, 440px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px 16px 12px 12px;
  padding: 22px 20px 16px;
  box-shadow: 0 -8px 30px var(--shadow);
}
.sheet-card h2 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 10px;
}
.sheet-card p { color: var(--beige-warm); margin: 0 0 8px; font-size: 0.95rem; }
.sheet-card ol { margin: 8px 0 12px 1.2em; color: var(--beige-warm); }
.sheet-card li { margin: 4px 0; }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.btn-gold, .btn-ghost {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 600;
}
.btn-gold { background: var(--akzent); color: var(--gruen-dunkel); }
.btn-ghost { border: 1px solid var(--line); color: var(--beige); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bot));
  transform: translateX(-50%);
  background: var(--gruen-dunkel);
  color: var(--beige);
  border: 1px solid var(--akzent);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.9rem;
  z-index: 30;
  box-shadow: 0 8px 20px var(--shadow);
  max-width: calc(100% - 32px);
  text-align: center;
}

.panel { padding-bottom: 12px; }

@media (min-height: 900px) {
  .cover-wrap {
    width: min(56vw, 240px);
    max-height: 36vh;
  }
  #song-title { font-size: 1.36rem; }
}
@media (min-width: 720px) {
  body { background: #080c0a; }
  .app {
    max-width: 420px;
    min-height: 100dvh;
    box-shadow: 0 0 0 1px var(--line), 0 0 80px rgba(0, 0, 0, 0.5);
  }
}

.avatar-link { display: block; flex-shrink: 0; }
.kicker a { color: var(--akzent); text-decoration: none; }
.kicker a:hover, .kicker a:focus-visible { text-decoration: underline; }

.now-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
  padding: 0 8px;
}
.btn-download,
.btn-video {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
}
.btn-download {
  background: var(--akzent);
  color: var(--gruen-dunkel);
}
.btn-download svg { width: 18px; height: 18px; }
.btn-download:hover, .btn-download:focus-visible {
  filter: brightness(1.08);
  text-decoration: none;
}
.btn-video {
  border: 1px solid var(--line);
  color: var(--beige);
  background: transparent;
}
.btn-video:hover, .btn-video:focus-visible {
  background: rgba(244, 239, 230, 0.08);
  text-decoration: none;
}

.playlist li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px;
}
.song-dl {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--akzent);
  flex-shrink: 0;
}
.song-dl svg { width: 22px; height: 22px; }
.song-dl:hover, .song-dl:focus-visible {
  background: rgba(201, 169, 106, 0.16);
  text-decoration: none;
}

.btn-download[hidden],
.btn-video[hidden] {
  display: none !important;
}
