:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  background: #0b0d12;
  color: #f4f6fb;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: #0b0d12; }
body { min-height: 100dvh; }
button, input { font: inherit; }
button { color: inherit; }

.app {
  width: min(100%, 520px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(18px + var(--safe-top)) 18px calc(26px + var(--safe-bottom));
}

.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.eyebrow { margin: 0 0 5px; font-size: 12px; letter-spacing: .14em; color: #8d96a8; font-weight: 700; }
h1 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.mode-pill { white-space: nowrap; border: 1px solid #303746; border-radius: 999px; padding: 7px 10px; color: #adb6c8; font-size: 12px; }

.cover-wrap { position: relative; }
.cover { width: 100%; aspect-ratio: 1; display: block; object-fit: cover; border-radius: 28px; box-shadow: 0 24px 70px rgba(0,0,0,.42); }
.media-badge { position: absolute; left: 14px; bottom: 14px; border: 1px solid rgba(255,255,255,.22); background: rgba(10,13,20,.7); backdrop-filter: blur(18px); border-radius: 999px; padding: 8px 11px; font-size: 12px; }

.now-playing { padding: 20px 4px 0; }
.now-playing h2 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.025em; }
.now-playing p { margin: 0; color: #99a2b3; }

.progress { margin-top: 22px; }
.progress input { width: 100%; accent-color: #f4f6fb; }
.times { display: flex; justify-content: space-between; color: #828b9d; font-variant-numeric: tabular-nums; font-size: 12px; margin-top: 4px; }

.controls { display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 18px; align-items: center; padding: 18px 34px 22px; }
.control { border: 0; background: transparent; min-height: 54px; border-radius: 50%; font-size: 26px; cursor: pointer; }
.control:active { transform: scale(.94); }
.control.primary { background: #f4f6fb; color: #0b0d12; width: 68px; height: 68px; justify-self: center; font-size: 27px; }

.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.status { border: 1px solid #242a35; background: #11151d; border-radius: 16px; padding: 13px; min-height: 72px; }
.status span { display: block; color: #828b9d; font-size: 12px; margin-bottom: 7px; }
.status strong { font-size: 14px; }

.section-title { margin: 26px 2px 10px; font-size: 13px; color: #8d96a8; letter-spacing: .08em; text-transform: uppercase; }
.track-list { display: grid; gap: 8px; }
.track { width: 100%; border: 1px solid #222834; background: #10141b; border-radius: 16px; display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px 8px 8px; text-align: left; }
.track.active { border-color: #59657a; background: #151a23; }
.track img { width: 48px; height: 48px; border-radius: 11px; }
.track b { display: block; font-size: 14px; }
.track small { color: #7f899b; }
.track .num { color: #717b8e; font-variant-numeric: tabular-nums; }

.log { background: #090b0f; border: 1px solid #202631; border-radius: 16px; padding: 12px; min-height: 110px; max-height: 180px; overflow: auto; color: #97a2b5; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.log div + div { border-top: 1px solid #171c24; padding-top: 4px; margin-top: 4px; }
.note { color: #7f899b; font-size: 12px; line-height: 1.55; margin: 14px 2px 0; }

@media (min-width: 700px) {
  .app { padding-top: 30px; }
}

.status-wide {
  grid-column: 1 / -1;
}
