:root {
  --bg: #16130f;
  --ink: #e9e2d2;
  --ink-dim: #9c937f;
  --accent: #c9a86a;
  --accent-dim: #8a7448;
  --line: #3a332a;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  background:
    linear-gradient(rgba(22, 19, 15, 0.62), rgba(22, 19, 15, 0.88)),
    var(--bg-img, url('/assets/piano/bg.jpg')) center / cover no-repeat fixed,
    var(--bg);
  color: var(--ink);
  font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 24px;
  -webkit-font-smoothing: antialiased;
}

main {
  width: 100%;
  max-width: 460px;
  text-align: center;
}

.emblem {
  display: block;
  margin: 0 auto 6px;
  opacity: 0.92;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.7rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  margin: 0 0 0.5em;
}

h1::after {
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  margin: 0.55em auto 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.lede {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-dim);
  margin: 0 0 2.6em;
}

/* ---- now playing ---- */

.now { min-height: 4em; }

.status {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  min-height: 1.3em;
}

.status.pulse { animation: pulse 2.4s ease-in-out infinite; }

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

.title {
  font-size: 1.1rem;
  font-style: italic;
  margin-top: 8px;
  min-height: 1.4em;
  transition: opacity .8s;
}

.title.fading { opacity: 0; }

/* ---- volume ---- */

.vol {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 300px;
  margin: 0 auto;
}

.mute-btn {
  background: transparent;
  border: none;
  color: var(--ink-dim);
  cursor: pointer;
  padding: 4px;
  display: flex;
  transition: color .2s;
}

.mute-btn:hover { color: var(--ink); }
.mute-btn.muted { color: var(--accent); }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
}

input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: var(--line);
}

/* ---- instrument switch ---- */

.switch {
  margin-top: 2.4em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.switch a {
  color: var(--ink-dim);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}

.switch a:hover { color: var(--ink); }
.switch a.on { color: var(--accent); border-bottom-color: var(--accent-dim); }

/* ---- footer ---- */

footer {
  margin-top: 2.2em;
  font-size: 0.72rem;
  color: var(--ink-dim);
  opacity: 0.75;
}

footer #stats { display: block; margin-bottom: 3px; }

footer a {
  color: var(--accent-dim);
  text-decoration: none;
}

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