/* ─── BOTTOM NAV ─── */
nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}

/* Safari PWA standalone: re-anchor nav to actual bottom */
@media all and (display-mode: standalone) {
  nav {
    bottom: 0;
    padding-bottom: max(var(--safe-b), env(safe-area-inset-bottom, 0px));
    height: calc(var(--nav-h) + max(var(--safe-b), env(safe-area-inset-bottom, 0px)));
  }
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  transition: color 0.2s;
  padding: 8px 0;
}
.nav-btn.active { color: var(--accent); }
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn span { font-family: 'Instrument Sans', sans-serif; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }

/* ─── PLAYER BAR ─── */
#player-bar {
  background: rgba(14,12,10,0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(200,169,110,0.2);
  padding: 10px 16px;
  display: none;
  align-items: center;
  gap: 12px;
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-b));
  left: 0; right: 0;
  z-index: 99;
}
#player-bar.visible { display: flex; }
#player-thumb {
  width: 40px; height: 40px;
  background: var(--bg4);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  border: 1px solid var(--border);
}
#player-info { flex: 1; min-width: 0; }
#player-title { font-family: 'Fraunces', serif; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#player-artist { font-size: 10px; color: var(--text2); letter-spacing: 0.05em; }
#player-play {
  width: 36px; height: 36px;
  background: var(--accent);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  color: #080808;
}
#player-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border);
}
#player-progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.5s linear;
}
audio { display: none; }

/* ─── TOAST ─── */
#toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-b) + 80px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 200;
  white-space: nowrap;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
