:root {
  --bg: #f6f4ef; --panel: #fff; --ink: #1d1b17; --muted: #7a7468; --line: #e4dfd4;
  --accent: #8a2b1f; --gold: #b8892b; --sel: #f3ebdc;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 Inter, system-ui, sans-serif;
  display: grid; grid-template-columns: 330px 1fr; height: 100vh;
}
button { font: inherit; color: inherit; }
kbd { font: 500 11px "JetBrains Mono", monospace; }

/* ---------- sidebar ---------- */
aside { background: var(--panel); border-right: 1px solid var(--line); overflow: auto; display: flex; flex-direction: column; }
.brand { padding: 22px 22px 14px; border-bottom: 1px solid var(--line); }
.brand h1 { font: 600 26px/1.1 "Cormorant Garamond", serif; margin: 0; }
.brand h1 em { font-weight: 500; }
.brand p { margin: 6px 0 0; color: var(--muted); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }

.mv { border-bottom: 1px solid var(--line); }
.mv header { display: flex; align-items: stretch; }
.mv .toggle {
  all: unset; box-sizing: border-box; flex: 1; display: flex; align-items: center; gap: 10px;
  padding: 12px 10px 12px 22px; cursor: pointer; font-weight: 600;
}
.mv .toggle .n { font: 500 12px "JetBrains Mono", monospace; color: var(--muted); }
.mv .toggle .chev { margin-left: auto; color: var(--muted); font-size: 11px; transition: transform .15s; }
.mv.open .toggle .chev { transform: rotate(180deg); }
.mv.cur .toggle { color: var(--accent); }
.mv .play {
  all: unset; box-sizing: border-box; cursor: pointer; padding: 0 22px 0 10px; display: flex; align-items: center;
  font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.mv .play:hover, .mv.cur .play { color: var(--accent); }
.cues { list-style: none; margin: 0; padding: 0 0 8px; }
.mv:not(.open) .cues { display: none; }
.cues li { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; padding: 7px 22px; cursor: pointer; align-items: baseline; }
.cues li:hover { background: #faf8f3; }
.cues li.cur { background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }
.cues .m { font: 500 13px "JetBrains Mono", monospace; color: var(--muted); }
.cues li.bass .m { color: var(--ink); }
.cues .t { font-size: 14px; color: var(--muted); }
.cues li.bass .t { font-weight: 600; color: var(--ink); }
.cues .pg { font: 500 11.5px "JetBrains Mono", monospace; color: var(--muted); white-space: nowrap; }
.tag {
  display: inline-block; white-space: nowrap; font-size: 10px; font-weight: 600; letter-spacing: .06em;
  color: var(--gold); border: 1px solid var(--gold); border-radius: 3px; padding: 0 4px; margin-left: 6px; vertical-align: 1px;
}

/* ---------- player ---------- */
main { display: flex; flex-direction: column; overflow: auto; min-width: 0; }
.stage { padding: 28px 36px 0; }
.video {
  aspect-ratio: 16/9; max-height: 56vh; margin: 0 auto; background: #000;
  border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.video iframe, .video #player { display: block; width: 100%; height: 100%; border: 0; }

.now { padding: 18px 36px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.now h2 { font: 600 30px/1.1 "Cormorant Garamond", serif; margin: 0; }
.now h2 small { font: 500 18px "Cormorant Garamond", serif; color: var(--muted); margin-right: 8px; }
.now .meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
.now .meta b { color: var(--ink); font-weight: 600; }
.now .meta a { color: var(--muted); text-decoration: none; margin-left: 10px; }
.now .meta a:hover { color: var(--accent); }
.now.error h2 { color: var(--accent); font-size: 22px; }

.transport { padding: 10px 36px 26px; }
.bar { position: relative; height: 6px; background: #e3ded3; border-radius: 3px; margin: 18px 0 10px; cursor: pointer; touch-action: none; }
.bar::before { content: ""; position: absolute; inset: -12px 0; }   /* bigger hit area */
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 3px; }
.bar .knob { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); transform: translate(-50%,-50%); }
.bar .tick { position: absolute; top: -6px; width: 2px; height: 18px; background: var(--gold); opacity: .5; transform: translateX(-1px); }
.bar .tick.bass { opacity: 1; }
.times { display: flex; justify-content: space-between; font: 500 12px "JetBrains Mono", monospace; color: var(--muted); }

.ctl { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.ctl button {
  cursor: pointer; height: 44px; min-width: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.ctl button:hover { border-color: #c9c2b4; }
.ctl button kbd { color: var(--muted); background: #f1ede4; border-radius: 4px; padding: 1px 5px; }
.ctl .main { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff; border: 0; font-size: 22px; padding: 0; }
.ctl .main:hover { background: #a0372a; }

.foot { margin-top: auto; padding: 14px 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; display: flex; gap: 22px; flex-wrap: wrap; }
.foot kbd { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; margin-right: 4px; color: var(--ink); }

/* ---------- narrow screens: stack ---------- */
@media (max-width: 860px) {
  body { display: block; height: auto; }
  aside { border-right: 0; border-top: 1px solid var(--line); }
  .stage { padding: 16px 16px 0; }
  .now, .transport, .foot { padding-left: 16px; padding-right: 16px; }
  .now { flex-direction: column; gap: 4px; }
  .now h2 { font-size: 24px; }
  .now .meta { white-space: normal; }
}
