@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0b0b0d;
  --panel: rgba(20, 20, 24, 0.78);
  --panel-solid: #16161a;
  --border: rgba(255, 255, 255, 0.06);
  --text: #f5f5f7;
  --muted: #87878f;
  --accent: #21c25e;
  --accent-2: #ffb03a;
  --good: #46d39a;
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 60px;
  --bar-h: 96px;
  --drawer-w: 320px;
  --shadow-soft: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  font-family: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { color-scheme: dark; }
body {
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

/* no visible scrollbars anywhere — scrolling still works, the track/thumb
   is just never drawn */
* {
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* old Edge/IE */
}
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ===== First-visit intro / landing overlay ===== */
#intro-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  background: #0b0b0d; overflow-y: auto; overflow-x: hidden;
}
.intro-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(33,194,94,.35), transparent 42%),
    radial-gradient(circle at 85% 70%, rgba(255,176,58,.28), transparent 45%),
    radial-gradient(circle at 60% 15%, rgba(33,194,94,.18), transparent 40%),
    #0b0b0d;
  filter: blur(40px) saturate(140%);
}
.intro-nav {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 32px;
}
.intro-nav .logo { font-family: "Sora", inherit; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.intro-nav-right { display: flex; align-items: center; gap: 14px; }
.intro-link-btn {
  background: none; border: none; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 10px 14px; border-radius: 30px; transition: background .15s ease;
}
.intro-link-btn:hover { background: rgba(255,255,255,.08); }
.intro-pill-btn {
  background: var(--text); color: #0b0b0d; border: none; font-size: 14px; font-weight: 700;
  padding: 10px 20px; border-radius: 30px; cursor: pointer; transition: filter .15s ease;
}
.intro-pill-btn:hover { filter: brightness(.9); }
.intro-hero {
  position: relative; z-index: 1; min-height: calc(100vh - 80px); flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 22px; padding: 0 24px;
}
/* fades the gradient hero smoothly into the solid dark content below instead
   of cutting off abruptly at the section boundary */
.intro-hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 240px;
  background: linear-gradient(to bottom, transparent, #0b0b0d); pointer-events: none;
}
.intro-hero h1 {
  font-size: clamp(40px, 7vw, 76px); font-weight: 800; color: var(--text); margin: 0;
  letter-spacing: -0.02em;
}
.intro-cycle-word { color: var(--accent); }
.intro-cursor { color: var(--accent); font-weight: 400; animation: intro-blink 1s step-end infinite; }
@keyframes intro-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.intro-hero p {
  max-width: 520px; color: rgba(245,245,247,.75); font-size: 16px; line-height: 1.6; margin: 0;
}
.intro-cta {
  background: var(--accent); color: #fff; border: none; font-size: 16px; font-weight: 700;
  padding: 14px 34px; border-radius: 30px; cursor: pointer; transition: background .15s ease;
  box-shadow: 0 10px 30px rgba(33,194,94,.35);
}
.intro-cta:hover { background: #34d07b; }
.intro-cta-secondary {
  background: none; border: none; color: rgba(245,245,247,.6); font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.intro-cta-secondary:hover { color: var(--text); }

/* gallery modal — two-column layout matching the main app (metadata on the
   left, video on the right) instead of the Sample Map's stacked format */
.mm-card.gm-card { width: min(94vw, 820px); display: flex; gap: 22px; align-items: center; }
.mm-card.browse-card { width: min(94vw, 640px); max-height: 80vh; display: flex; flex-direction: column; }
.browse-title { font-family: "Sora", inherit; font-size: 18px; font-weight: 700; margin: 0 28px 14px 4px; flex-shrink: 0; }
.browse-tab-body { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 0 2px; }
.gm-meta-col { flex: 0 0 300px; min-width: 0; }
.gm-video-col { flex: 1 1 0; min-width: 0; }
.gm-meta-col .mm-title { margin-top: 0; }
.gm-meta { margin-top: 14px; }
.gm-transport { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
/* lives inside the sign-up gate (z-index 60) — needs to render above it */
#gallery-modal { z-index: 65; }
@media (max-width: 720px) {
  .gm-card { flex-direction: column; }
  .gm-meta-col { flex: 1 1 auto; width: 100%; }
}

/* ===== Landing scroll content below the hero ===== */
.intro-scroll { position: relative; z-index: 1; background: #0b0b0d; }
.intro-section { max-width: 1080px; margin: 0 auto; padding: 80px 32px; }
.intro-section-tight { padding-top: 56px; }
.intro-section-alt { background: rgba(255,255,255,.02); max-width: none; }
.intro-section-alt > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.intro-section h2 {
  font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; color: var(--text);
  margin: 0 0 8px; text-align: center; letter-spacing: -0.01em;
}
.intro-section-sub {
  text-align: center; color: rgba(245,245,247,.6); font-size: 14px; margin: 0 0 36px;
}

/* gallery — single horizontal row, edge-to-edge from the very left to the
   very right of the screen instead of sitting inside the centered column */
.intro-gallery {
  overflow: hidden; padding: 4px 0 16px;
  width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
}
.intro-gallery-strip {
  display: flex; gap: 16px; width: max-content;
  animation: intro-gallery-scroll linear infinite;
}
.intro-gallery:hover .intro-gallery-strip { animation-play-state: paused; }
@keyframes intro-gallery-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.intro-gallery-loading { text-align: center; color: var(--muted); padding: 30px 0; width: 100%; }
.intro-gallery-card {
  flex: 0 0 200px; cursor: pointer; transition: transform .15s ease, border-color .15s ease;
  background: var(--panel-solid); border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; text-align: left;
}
.intro-gallery-card:hover { transform: translateY(-3px) scale(1.05); border-color: rgba(33,194,94,.4); z-index: 1; }
.intro-gallery-thumb { position: relative; width: 100%; aspect-ratio: 1/1; background: #000; overflow: hidden; }
.intro-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.intro-gallery-info { padding: 10px 12px 12px; }
.intro-gallery-title { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intro-gallery-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intro-gallery-tag {
  display: inline-block; margin-top: 6px; font-size: 10px; font-weight: 700; letter-spacing: .3px;
  text-transform: uppercase; color: var(--accent); background: rgba(33,194,94,.12);
  padding: 2px 7px; border-radius: 5px;
}

/* features */
.intro-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.intro-feature-ico { font-size: 26px; display: block; margin-bottom: 12px; }
.intro-feature h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.intro-feature p { font-size: 13.5px; color: rgba(245,245,247,.6); line-height: 1.55; margin: 0; }

/* pricing */
.intro-pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 640px; margin: 0 auto; }
.intro-price-card {
  background: var(--panel-solid); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; display: flex; flex-direction: column;
}
.intro-price-active { border-color: rgba(33,194,94,.4); }
.intro-price-name { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.intro-price-soon { font-size: 10px; font-weight: 700; color: var(--accent-2); background: rgba(255,176,58,.14); padding: 2px 7px; border-radius: 5px; }
.intro-price-amount { font-size: 32px; font-weight: 800; color: var(--text); margin: 10px 0 18px; }
.intro-price-list { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.intro-price-list li { font-size: 13px; color: rgba(245,245,247,.75); padding-left: 18px; position: relative; }
.intro-price-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.intro-price-cta {
  padding: 11px; border-radius: 9px; border: none; background: var(--accent); color: #fff;
  font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background .15s ease;
}
.intro-price-cta:hover { background: #34d07b; }
.intro-price-cta-disabled { background: rgba(255,255,255,.06); color: var(--muted); cursor: not-allowed; }

/* FAQ */
.intro-faq { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.intro-faq-item {
  background: var(--panel-solid); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 18px;
}
.intro-faq-item summary {
  font-size: 14px; font-weight: 700; color: var(--text); cursor: pointer; list-style: none;
}
.intro-faq-item summary::-webkit-details-marker { display: none; }
.intro-faq-item summary::before { content: "+ "; color: var(--accent); }
.intro-faq-item[open] summary::before { content: "– "; }
.intro-faq-item p { font-size: 13.5px; color: rgba(245,245,247,.65); line-height: 1.6; margin: 10px 0 0; }

/* footer */
.intro-footer {
  max-width: 1080px; margin: 0 auto; padding: 40px 32px 60px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  border-top: 1px solid var(--border);
}
.intro-footer-logo { font-family: "Sora", inherit; font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.intro-footer-links { display: flex; gap: 18px; }
.intro-footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; }
.intro-footer-links a:hover { color: var(--text); }
.intro-footer-copy { font-size: 11.5px; color: rgba(245,245,247,.4); }

/* ===== Temp Tracks page ===== */
body.scores-page { overflow-y: auto; }
#temp-stage { max-width: 1200px; margin: 0 auto; padding: calc(var(--nav-h) + 32px) 32px 60px; }
.temp-head { text-align: center; margin-bottom: 32px; }
.temp-head h1 { font-size: 32px; font-weight: 800; color: var(--text); margin: 0 0 8px; letter-spacing: -0.01em; }
.temp-head p { color: var(--muted); font-size: 14px; margin: 0; }

/* horizontal scrollable row — edge-to-edge from the very left to the very
   right of the screen rather than confined inside #temp-stage's max-width */
.temp-row {
  display: flex; gap: 16px; overflow-x: auto; padding: 4px 32px 16px;
  scroll-snap-type: x proximity;
  width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw;
}
.temp-empty-note { color: var(--muted); font-size: 13px; padding: 40px; margin: 0 auto; }
.temp-card {
  flex: 0 0 200px; scroll-snap-align: start; cursor: pointer;
  background: var(--panel-solid); border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; transition: transform .15s ease, border-color .15s ease;
}
.temp-card:hover { transform: translateY(-3px); border-color: rgba(33,194,94,.4); }
.temp-card-art { position: relative; width: 100%; aspect-ratio: 1/1; background: #000; overflow: hidden; }
.temp-card-art img { width: 100%; height: 100%; object-fit: cover; }
.temp-card-info { padding: 10px 12px 12px; }
.temp-card-title { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.temp-card-artist { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.temp-card-date { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* filter bar */
.temp-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.temp-select {
  padding: 10px 14px; border-radius: 30px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; outline: none;
}
.temp-magic-wrap { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.temp-magic-btn {
  padding: 10px 18px; border-radius: 30px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.08); border: 1px solid var(--border); color: var(--text); cursor: pointer;
}
.temp-magic-btn:hover { background: rgba(255,255,255,.14); }
.temp-magic-btn.active { border-color: var(--accent); color: var(--accent); }
.temp-magic-input {
  width: 0; opacity: 0; overflow: hidden; padding: 10px 0; border-radius: 30px; font-size: 13px;
  background: rgba(255,255,255,.08); border: 1px solid transparent; color: var(--text); outline: none;
  transition: width .2s, opacity .2s, padding .2s, border-color .2s;
}
.temp-magic-wrap.open .temp-magic-input { width: 220px; opacity: 1; padding: 10px 14px; border-color: var(--border); }

/* tracklist inside the release modal */
.temp-tracklist { margin-top: 14px; max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.temp-tracklist-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  cursor: pointer; transition: background .12s ease;
}
.temp-tracklist-item:hover { background: rgba(255,255,255,.06); }
.temp-tracklist-item.active { background: rgba(33,194,94,.12); }
.temp-tracklist-num { font-size: 11px; color: var(--muted); width: 18px; flex-shrink: 0; text-align: right; }
.temp-tracklist-item.active .temp-tracklist-num { color: var(--accent); }
.temp-tracklist-title { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.temp-tracklist-item.active .temp-tracklist-title { color: var(--accent); font-weight: 700; }

/* ===== Center stage: two-column layout ===== */
#stage {
  position: fixed; top: var(--nav-h); bottom: 76px; left: 220px; right: 0; z-index: 10;
  display: flex; align-items: stretch; overflow: hidden;
}

/* far-left panel: personalized account + browse tabs + tools/settings/about —
   fixed independently of #stage so it always reaches the true bottom of the
   screen, instead of stopping short where #stage clears the sticky player */
.stage-farleft {
  position: fixed; top: var(--nav-h); left: 0; bottom: 0; width: 220px; z-index: 20;
  display: flex; flex-direction: column;
  background: var(--panel);
  overflow: hidden;
}

/* personalized account chip, Suno-style */
.farleft-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px 10px; cursor: pointer; flex-shrink: 0;
}
.farleft-user .user-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(33,194,94,.16); color: var(--accent); font-size: 16px;
}
.farleft-user-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.farleft-user .user-email {
  font-size: 13px; font-weight: 700; color: var(--text); max-width: 140px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.farleft-plan { font-size: 11px; color: var(--muted); }
.farleft-upgrade-btn {
  margin: 0 14px 12px; padding: 9px 12px; border-radius: 9px; cursor: pointer;
  background: linear-gradient(135deg, #ffce5c, #ffb03a); border: none;
  color: #2a1d00; font-weight: 700; font-size: 12.5px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: filter .15s ease;
}
.farleft-upgrade-btn:hover { filter: brightness(1.06); }
body.is-pro .farleft-upgrade-btn {
  background: rgba(255,176,58,.16); border: 1px solid rgba(255,176,58,.45); color: var(--accent-2);
}

.farleft-divider { border-top: 1px solid var(--border); margin: 4px 14px; flex-shrink: 0; }

.stage-farleft .tabs {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px; flex-shrink: 0;
}
.stage-farleft .tab {
  width: 100%; padding: 9px 12px; border-radius: 7px; border: none;
  background: none; color: var(--muted); font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap; text-align: left;
}
.stage-farleft .tab:hover { color: var(--text); background: rgba(255,255,255,.06); }
.stage-farleft .tab.active { color: var(--accent); background: rgba(33,194,94,.1); }
.farleft-tools-open {
  flex-shrink: 0; padding: 4px 10px 10px; display: flex; flex-direction: column; gap: 2px;
}
.farleft-tools-label {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px 4px; color: var(--muted); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}
.farleft-tools-open .tools-item { position: static; opacity: 1; }

/* tools / settings / about, pinned to the bottom of the sidebar */
.farleft-bottom { flex-shrink: 0; margin-top: auto; padding: 4px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.farleft-bottom .farleft-divider { margin: 4px 4px 8px; }
.farleft-link {
  width: 100%; padding: 9px 12px; border-radius: 7px; border: none;
  background: none; color: var(--muted); font-size: 12.5px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; white-space: nowrap; text-align: left; transition: background .12s, color .12s;
}
.farleft-link:hover { color: var(--text); background: rgba(255,255,255,.06); }
.farleft-bottom .tools-menu { width: 100%; }
.farleft-bottom .tools-dropdown {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); top: auto; width: auto; min-width: 0;
}

/* left panel: metadata */
.stage-left {
  flex: 0 0 380px; display: flex; flex-direction: column;
  background: var(--bg); border-right: 1px solid var(--border);
  overflow-y: auto;
}
.stage-left #stage-meta {
  padding: 20px 16px; flex-shrink: 0;
}

/* center video column — fills the full width of its section */
.stage-center {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column;
  padding: 16px 24px; gap: 10px; overflow-y: auto;
}

/* video — fixed 16:9 */
#player-bg {
  position: relative; width: 100%; aspect-ratio: 16 / 9; flex-shrink: 0;
  background: #000; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-soft);
}
#yt-player, #yt-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
/* YouTube's native "watch on YouTube" chain-link icon sits in the
   bottom-left corner with no API flag to disable it. Rather than blocking
   all clicks on the video (which also breaks click-to-play/pause), only
   swallow clicks in that one small dead-zone. */
#player-link-blocker {
  position: absolute; left: 0; bottom: 0; width: 64px; height: 40px;
  z-index: 2; cursor: default;
}
#player-empty {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; text-align: center;
  color: var(--muted); background: #0a0a0c;
}
#player-empty .empty-logo { font-family: "Sora", inherit; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }

/* shuffle + filter row */
.stage-shuffle {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; flex-shrink: 0; width: 100%;
}
.stage-shuffle .st-left { display: flex; align-items: center; gap: 6px; justify-content: flex-end; justify-self: stretch; width: 100%; padding-right: 12px; }
.stage-shuffle .st-center { display: flex; align-items: center; justify-content: center; }
.stage-shuffle .st-right { display: flex; align-items: center; gap: 6px; justify-content: flex-start; justify-self: stretch; width: 100%; padding-left: 12px; }
.stage-shuffle .big-shuffle { margin-top: 0; }
.stage-filter-btn {
  padding: 10px 18px; border-radius: 30px; font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,.08); border: 1px solid var(--border); color: var(--text);
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.stage-filter-btn:hover { background: rgba(255,255,255,.14); }
.stage-filter-btn.active { border-color: var(--accent); color: var(--accent); }

/* Magic Find */
.magic-find-wrap { display: flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; }
.magic-find-input {
  width: 0; opacity: 0; overflow: hidden;
  padding: 9px 0; border-radius: 30px; font-size: 14px;
  background: rgba(255,255,255,.08); border: 1px solid transparent; color: var(--text);
  outline: none; transition: width .25s, opacity .25s, padding .25s, border-color .25s;
  flex-shrink: 0;
}
.magic-find-input::placeholder { color: var(--muted); }
.magic-find-wrap.open .magic-find-input { width: 180px; opacity: 1; padding: 9px 14px; border-color: var(--border); }
.magic-find-wrap.open #btn-magic-find { border-color: var(--accent); color: var(--accent); }

/* Tempo Tap */
#btn-tempo-tap.tapping { border-color: var(--accent); color: var(--accent); }
#btn-tempo-tap .tap-bpm { font-size: 11px; opacity: .7; }
.speed-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.speed-label { font-size: 11px; font-weight: 700; color: var(--muted); min-width: 32px; text-align: center; }
.speed-slider { -webkit-appearance: none; appearance: none; width: 70px; height: 4px; border-radius: 2px; background: var(--border); outline: none; cursor: pointer; }
.speed-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); cursor: pointer; }
.speed-slider::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: none; cursor: pointer; }

/* transport controls — shared by the sticky bottom bar */
.st-controls {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%;
}
.st-left { display: flex; align-items: center; gap: 6px; justify-self: start; }
.st-center { display: flex; align-items: center; gap: 10px; justify-self: center; }
.st-right { display: flex; align-items: center; gap: 6px; justify-self: end; }
.st-scrub { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 11px; color: var(--muted); }
.st-scrub input { flex: 1; accent-color: var(--accent); }

/* sticky bottom player bar — Suno-style: always visible, current track +
   full transport, so playback stays controllable while browsing anything */

#sticky-player {
  /* stops at the far-left sidebar's edge instead of running full width, so
     it sits under the metadata + video area only, matching where that
     panel meets the sidebar above it */
  position: fixed; left: 220px; right: 0; bottom: 0; z-index: 25; height: 76px;
  display: flex; align-items: center; gap: 20px; padding: 0 20px;
  background: var(--panel-solid); border-top: 1px solid var(--border);
  box-shadow: 0 -8px 30px rgba(0,0,0,.35);
}
.sp-track { display: flex; align-items: center; gap: 12px; flex: 0 0 240px; min-width: 0; }
.sp-track img {
  width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: #000; flex-shrink: 0;
}
.sp-track-info { min-width: 0; }
.sp-title { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-artist { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.sp-center { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; max-width: 640px; margin: 0 auto; }
.sp-right { flex: 0 0 140px; display: flex; justify-content: flex-end; }

/* right panel metadata */
#stage-meta { display: flex; flex-direction: column; gap: 12px; }
.big-shuffle {
  padding: 10px 24px; border-radius: 30px; border: none;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}
.big-shuffle:hover { background: #34d07b; }

#loading-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px); color: var(--text); font-weight: 600;
}
.spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,.15); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Navbar ===== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 30;
  display: flex; align-items: center; gap: 14px; padding: 0 24px;
  background: rgba(10,10,12,.7);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
/* extends the sidebar's color up behind the logo, so the gray column runs
   uninterrupted from the very top of the page instead of starting below the navbar */
#navbar::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 220px;
  background: var(--panel);
}
.nav-left { position: relative; z-index: 1; }
.nav-left, .nav-right { display: flex; align-items: center; gap: 8px; }
.nav-left .logo { margin-right: 20px; }
#tools-menu { margin-right: 8px; }
.nav-center { flex: 1; display: flex; justify-content: center; }
.logo {
  font-family: "Sora", inherit; font-weight: 800; font-size: 18px;
  display: inline-flex; align-items: baseline; letter-spacing: -0.02em;
  text-decoration: none;
}
.logo-crate { color: var(--text); }
.logo-dig { color: var(--text); }

/* Tools dropdown */
.tools-menu { position: relative; }
.tools-trigger {
  background: none; border: none;
  color: var(--muted); font-size: 18px; font-weight: 800; padding: 0;
  cursor: pointer; transition: color .15s;
}
.tools-trigger:hover { color: var(--text); }
.tools-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 6px; min-width: 160px; z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.tools-dropdown.open { display: flex; flex-direction: column; gap: 2px; }
.tools-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 7px; font-size: 13px;
  font-weight: 500; color: var(--muted); text-decoration: none; transition: background .12s, color .12s;
}
.icon-inline { width: 14px; height: 14px; flex-shrink: 0; }
.tools-item:hover { background: rgba(255,255,255,.07); color: var(--text); }
.tools-item.active-tool { color: var(--accent); }

/* About dropdown */
.about-content { padding: 4px 4px 2px; }
.about-title { font-size: 14px; font-weight: 800; color: var(--text); margin: 0 0 8px; padding: 0 8px; }
.about-desc { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0 0 10px; padding: 0 8px; max-width: 220px; }
.about-links { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--border); padding-top: 6px; margin-top: 4px; }

.icon-btn {
  background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text);
  height: 36px; min-width: 36px; padding: 0 12px; border-radius: var(--radius-sm); font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s ease, border-color .15s ease;
}
.icon-btn:hover { background: rgba(255,255,255,.1); }
.icon-btn.active { border-color: var(--accent); color: var(--accent); }
.icon-btn.small { height: 28px; min-width: 28px; padding: 0 6px; }
.icon-btn.login { font-weight: 600; }
body.is-auth .icon-btn.login { border-color: var(--accent); color: var(--accent); }
.icon-btn.shuffle { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.icon-btn.shuffle:hover { background: #34d07b; }
.icon-btn.upgrade {
  background: linear-gradient(135deg, #ffce5c, #ffb03a); border-color: #ffce5c;
  color: #2a1d00; font-weight: 700;
}
.icon-btn.upgrade:hover { filter: brightness(1.06); }
body.is-pro .icon-btn.upgrade { background: rgba(255,176,58,.16); border-color: rgba(255,176,58,.45); color: var(--accent-2); }

.pro-pill {
  font-size: 9px; font-weight: 800; letter-spacing: .5px; padding: 1px 5px; border-radius: 6px;
  background: linear-gradient(135deg, #ffce5c, #ffb03a); color: #2a1d00; vertical-align: middle;
}
body.is-pro .pro-pill { display: none; }

.search-wrap {
  position: relative; width: min(520px, 46vw);
  display: flex; align-items: center;
}
.search-wrap .search-ico { position: absolute; left: 12px; color: var(--muted); font-size: 16px; }
#search-input {
  width: 100%; height: 38px; padding: 0 14px 0 34px; border-radius: 20px;
  background: rgba(255,255,255,.08); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; outline: none;
}
#search-input:focus { border-color: var(--accent); background: rgba(255,255,255,.12); }

/* ===== Popovers ===== */
.popover {
  position: fixed; top: calc(var(--nav-h) + 6px); right: 16px; z-index: 40;
  width: 260px; background: var(--panel-solid); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.popover h4 { margin: 0 0 10px; font-size: 14px; }
.popover label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.popover label.row { display: flex; align-items: center; gap: 8px; color: var(--text); }
.popover select {
  width: 100%; margin-top: 5px; padding: 7px 8px; border-radius: 8px;
  background: rgba(255,255,255,.06); color: var(--text); border: 1px solid var(--border);
}
/* filter panel (samplette-style) — centered, opened from the under-video button */
.filter-pop {
  width: 320px; right: auto; left: 50%; top: 50%; transform: translate(-50%, -50%);
  max-height: 80vh; overflow-y: auto;
}
.settings-pop {
  width: 240px; left: 12px; right: auto; top: auto; bottom: 70px; padding: 14px;
}
.settings-section { margin-bottom: 14px; }
.settings-heading {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); margin-bottom: 8px;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; font-size: 13px; color: var(--text); cursor: pointer;
}
.settings-row input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
.settings-divider { border-top: 1px solid var(--border); margin: 4px 0 12px; }
.settings-links { display: flex; flex-direction: column; gap: 2px; }
.settings-links a {
  font-size: 13px; color: var(--muted); text-decoration: none;
  padding: 5px 0; transition: color .15s;
}
.settings-links a:hover { color: var(--text); }
.filter-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.filter-head h4 { margin: 0; }
.link-btn { background: none; border: none; color: var(--accent); font-size: 12px; text-decoration: underline; padding: 0; }
.f-field { margin-bottom: 11px; }
.f-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 4px; }
.f-field input[type="text"], .filter-pop select, .f-range input {
  width: 100%; padding: 7px 8px; border-radius: 8px; background: rgba(255,255,255,.06);
  border: 1px solid var(--border); color: var(--text); font-size: 13px; outline: none;
}
.f-field input[type="text"]:focus, .filter-pop select:focus, .f-range input:focus { border-color: var(--accent); }
.f-mini { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); margin-top: 5px; }
.f-range { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 6px; margin-bottom: 11px; }
.f-range .f-label { grid-column: 1 / -1; margin-bottom: 2px; }
.f-range input { width: 100%; }
.f-unit { font-size: 11px; color: var(--muted); }
.f-toggle { margin: 4px 0 12px; }
.f-apply { width: 100%; padding: 10px 0; border: none; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 700; }
.f-apply:hover { background: #34d07b; }
.f-hint { font-style: normal; text-transform: none; letter-spacing: 0; font-size: 9.5px; color: var(--muted); opacity: .7; font-weight: 400; }

/* multi-select list: single click toggles each option */
.multi-search {
  width: 100%; box-sizing: border-box; margin-bottom: 5px;
  padding: 5px 8px; font-size: 13px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text);
}
.multi-search::placeholder { color: var(--muted); }
.multi {
  max-height: 132px; overflow-y: auto; padding: 4px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border); border-radius: 8px;
}
.multi .opt {
  padding: 5px 8px; border-radius: 5px; font-size: 13px; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 7px;
}
.multi .opt:before {
  content: ""; width: 13px; height: 13px; border-radius: 3px; flex: none;
  border: 1px solid var(--muted); background: transparent;
}
.multi .opt:hover { background: rgba(255,255,255,.08); }
.multi .opt.selected { background: rgba(33,194,94,.16); color: var(--text); }
.multi .opt.selected:before { background: var(--accent); border-color: var(--accent); }

.timer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.timer-grid button {
  padding: 9px 0; border-radius: 8px; background: rgba(255,255,255,.06);
  color: var(--text); border: 1px solid var(--border); font-weight: 600;
}
.timer-grid button:hover { background: rgba(255,255,255,.13); }
.timer-grid button.cancel { color: var(--accent); }
#timer-status { margin-top: 10px; font-size: 12px; }

/* ===== Drawers ===== */
.drawer {
  position: fixed; top: var(--nav-h); bottom: 0; z-index: 25;
  width: var(--drawer-w); background: var(--panel); backdrop-filter: blur(14px);
  border: 1px solid var(--border); display: flex; flex-direction: column;
  transition: transform .25s ease;
}
#left-drawer { left: 0; border-left: none; transform: translateX(-100%); }
#right-drawer { right: 0; border-right: none; transform: translateX(100%); padding: 14px; gap: 10px; overflow-y: auto; }
body.left-open #left-drawer { transform: none; }
body.right-open #right-drawer { transform: none; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; border-bottom: 1px solid var(--border); }
.tab {
  flex: 1 0 auto; padding: 7px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  background: transparent; color: var(--muted); border: 1px solid transparent;
}
.tab:hover { color: var(--text); background: rgba(255,255,255,.05); }
.tab.active { color: var(--text); background: rgba(33,194,94,.16); border-color: rgba(33,194,94,.4); }
.tab-body { flex: 1; overflow-y: auto; padding: 8px; }
.tab-panel { display: none; }

.drawer-foot { padding: 12px 14px; border-top: 1px solid var(--border); }
.foot-attr { font-size: 10.5px; line-height: 1.5; color: var(--muted); }
.foot-attr a { color: var(--muted); text-decoration: underline; }
.foot-attr a:hover { color: var(--text); }
.foot-links { margin-top: 8px; font-size: 11px; }
.foot-links a { color: var(--accent-2); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.tab-panel.active { display: block; }

/* track list rows */
.row-item {
  display: flex; gap: 10px; align-items: center; padding: 7px; border-radius: 9px; cursor: pointer;
  border: 1px solid transparent;
}
.row-item:hover { background: rgba(255,255,255,.06); }
.row-item.playing { background: rgba(33,194,94,.14); border-color: rgba(33,194,94,.35); }
.row-item img { width: 52px; height: 38px; object-fit: cover; border-radius: 6px; flex: none; background:#222; }
.row-meta { min-width: 0; flex: 1; }
.row-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-x { color: var(--muted); background: none; border: none; font-size: 14px; padding: 4px; }
.row-x:hover { color: var(--accent); }
.empty-note { color: var(--muted); font-size: 13px; text-align: center; padding: 30px 14px; line-height: 1.5; }

.pl-create { display: flex; gap: 6px; margin-bottom: 10px; }
.pl-create input { flex: 1; padding: 7px 9px; border-radius: 8px; background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--text); }
.pl-create button { padding: 0 12px; border-radius: 8px; background: var(--accent); border: none; color: #fff; font-weight: 700; }
.pl-card { padding: 9px 11px; border-radius: 9px; background: rgba(255,255,255,.04); border: 1px solid var(--border); margin-bottom: 7px; cursor: pointer; }
.pl-card:hover { background: rgba(255,255,255,.08); }
.pl-card .pl-name { font-weight: 600; font-size: 13px; display: flex; justify-content: space-between; }
.pl-card .pl-count { color: var(--muted); font-size: 11.5px; }

/* ===== Right drawer meta ===== */
.meta-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.meta-head h3 { margin: 0; font-size: 15px; line-height: 1.3; }
.meta-thumb-wrap img { width: 100%; border-radius: 10px; display: block; background:#222; }
.meta-id { margin: 2px 0; }
.meta-id-top { margin: 0; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.meta-artist { font-size: 15px; font-weight: 700; line-height: 1.3; margin: 0 0 3px; }
.meta-release { font-size: 12px; color: var(--muted); line-height: 1.4; }
.meta-year { color: var(--muted); }
/* metadata list — clean label/value pairs with generous spacing and hairline
   dividers instead of a dense bordered grid, closer to the Sora/ElevenLabs
   product-page feel than a plain data table */
.meta-table {
  display: flex; flex-direction: column; gap: 0; margin: 0;
}
.meta-table dt {
  font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
  padding: 7px 2px 1px; display: block;
}
.meta-table dd {
  margin: 0; font-size: 13.5px; font-weight: 600; font-family: "Sora", inherit; padding: 0 2px 7px;
  border-bottom: 1px solid var(--border); word-break: break-word; display: block;
  color: var(--text); transition: color .15s ease;
}
.meta-table dd:last-of-type { border-bottom: none; padding-bottom: 2px; }
.meta-table dt:hover + dd, .meta-table dd:hover { color: var(--accent); }

.meta-link { color: var(--accent); text-decoration: none; }
.meta-link:hover { text-decoration: underline; }

/* copy-for-download button */
.copy-title-btn {
  width: 100%; padding: 11px 14px; border-radius: 10px; cursor: pointer;
  background: rgba(33,194,94,.1); border: 1px solid rgba(33,194,94,.35);
  color: var(--accent); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, border-color .15s;
}
.copy-title-btn:hover { background: rgba(33,194,94,.2); border-color: rgba(33,194,94,.6); }
.copy-title-btn.copied { background: rgba(33,194,94,.25); border-color: var(--accent); }
.copy-title-icon { font-size: 16px; }
.meta-acoustic { font-size: 11px; }
.meta-credit { font-size: 10.5px; margin: 2px 0 8px; }
.meta-credit a { color: var(--accent-2); text-decoration: none; }
.meta-credit a:hover { text-decoration: underline; }
.meta-relations { display: flex; flex-direction: column; gap: 6px; }
.rel-btn {
  text-align: left; padding: 8px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text);
}
.rel-btn:hover { background: rgba(255,255,255,.11); }
.rel-btn:before { content: "→ "; color: var(--accent); }
.meta-section { border-top: 1px solid var(--border); padding-top: 10px; }
.meta-section h4 { margin: 0 0 6px; font-size: 13px; }
.ws-link {
  display: inline-block; margin-top: 4px; padding: 8px 12px; border-radius: 8px;
  background: rgba(255,176,58,.14); border: 1px solid rgba(255,176,58,.4);
  color: var(--accent-2); font-size: 13px; font-weight: 600; text-decoration: none;
}
.ws-link:hover { background: rgba(255,176,58,.24); }
#notes-area {
  width: 100%; min-height: 72px; resize: vertical; padding: 9px; border-radius: 9px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-size: 13px; outline: none; box-sizing: border-box;
}
#notes-area:focus { border-color: var(--accent); }

/* center lower: notes + comments */
.center-lower {
  display: flex; flex-direction: column; gap: 20px;
  padding-top: 4px;
}
.lower-heading {
  margin: 0 0 8px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
}
.center-notes { display: flex; flex-direction: column; }
.center-comments { display: flex; flex-direction: column; }

.comments-input-row {
  display: flex; gap: 8px; margin-bottom: 12px;
}
.comments-input-row input {
  flex: 1; padding: 9px 12px; border-radius: 9px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 13px; outline: none;
}
.comments-input-row input:focus { border-color: var(--accent); }
.comment-submit-btn {
  padding: 0 16px; border-radius: 9px; border: none;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; cursor: pointer;
  flex-shrink: 0;
}
.comment-submit-btn:hover { background: #34d07b; }

.comments-list { display: flex; flex-direction: column; gap: 8px; }
.comments-empty { color: var(--muted); font-size: 13px; margin: 0; }
.comment-item {
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
}
.comment-meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.comment-author { font-size: 12px; font-weight: 700; color: var(--accent); }
.comment-time { font-size: 11px; color: var(--muted); }
.comment-body { font-size: 13px; line-height: 1.5; color: var(--text); }
.meta-actions {
  display: flex; flex-direction: row; gap: 6px;
  justify-content: center; flex-wrap: wrap;
  margin-bottom: 16px;
}
.ghost-btn {
  flex: 1 1 auto; padding: 8px 14px; border-radius: 9px; background: rgba(255,255,255,.06);
  border: 1px solid var(--border); color: var(--text); font-size: 12.5px; font-weight: 600;
  text-align: center; cursor: pointer; white-space: nowrap;
}
.ghost-btn:hover { background: rgba(255,255,255,.12); }
a.ghost-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.ws-inline { color: var(--accent-2); border-color: rgba(255,176,58,.35); background: rgba(255,176,58,.06); }
.ws-inline:hover { background: rgba(255,176,58,.12); }
.ghost-btn.active { color: var(--accent); border-color: var(--accent); background: rgba(33,194,94,.08); }

/* ===== Player bar ===== */
#player-bar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--bar-h); z-index: 30;
  background: linear-gradient(to top, rgba(8,8,10,.97), rgba(8,8,10,.82));
  backdrop-filter: blur(12px); border-top: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 6px 16px 8px;
}
.pb-scrub { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.pb-scrub input { flex: 1; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px;
  background: rgba(255,255,255,.18); outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 2px solid #1a1a1e;
}
input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%; background: var(--accent); cursor: pointer; border: none;
}
#pb-seek {
  accent-color: var(--accent);
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) 0%, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.18) 100%);
}
#pb-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  margin-top: -4px;
}
#pb-seek::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: none; cursor: pointer;
}
#pb-seek::-moz-range-track { background: transparent; }

.pb-controls { flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.pb-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pb-track img { width: 46px; height: 34px; object-fit: cover; border-radius: 6px; background:#222; flex: none; }
.pb-track-text { min-width: 0; }
.pb-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26vw; }
.pb-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26vw; }
.pb-center { display: flex; align-items: center; gap: 8px; justify-self: center; }
.pb-right { display: flex; align-items: center; gap: 6px; justify-self: end; }
.ctrl {
  background: transparent; border: none; color: var(--text); font-size: 16px;
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
}
.ctrl:hover { background: rgba(255,255,255,.1); }
.ctrl.play { background: var(--accent); color: #fff; font-size: 18px; width: 44px; height: 44px; }
.ctrl.play:hover { background: #34d07b; }
.ctrl.tog.active { color: var(--accent); }
.vol-wrap { display: flex; align-items: center; gap: 6px; }
#pb-vol { width: 84px; }

/* ===== Toast ===== */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 60; background: #1c1c22; border: 1px solid var(--border); color: var(--text);
  padding: 10px 18px; border-radius: 24px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.5);
  transition: opacity .2s, transform .2s;
}

/* ===== Pro modal ===== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px); padding: 20px;
}
.modal {
  position: relative; width: min(380px, 92vw); background: var(--panel-solid);
  border: 1px solid var(--border); border-radius: 18px; padding: 26px 24px 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.modal-x { position: absolute; top: 14px; right: 14px; }
.pro-head { text-align: center; margin-bottom: 18px; }
.pro-crown { font-size: 40px; color: var(--accent-2); }
.pro-head h2 { margin: 6px 0 4px; font-size: 24px; }
.pro-head h2 span { color: var(--accent-2); }
.pro-head p strong { font-size: 22px; color: var(--text); }
.pro-features { list-style: none; margin: 0 0 16px; padding: 0; }
.pro-features li {
  font-size: 13.5px; color: var(--muted); padding: 8px 0 8px 26px; position: relative;
  border-bottom: 1px solid var(--border);
}
.pro-features li:before {
  content: "✓"; position: absolute; left: 4px; color: var(--good); font-weight: 800;
}
.pro-features li b { color: var(--text); }
.pro-status { text-align: center; font-size: 13px; margin-bottom: 10px; min-height: 0; }
.pro-status.active { color: var(--good); font-weight: 600; }
.pro-cta {
  width: 100%; padding: 13px 0; border: none; border-radius: 12px; font-size: 16px; font-weight: 800;
  background: linear-gradient(135deg, #ffce5c, #ffb03a); color: #2a1d00;
}
.pro-cta:hover { filter: brightness(1.06); }
.pro-cta:disabled { opacity: .5; cursor: default; filter: none; }
.pro-restore { width: 100%; background: none; border: none; padding: 12px 0 4px; font-size: 12.5px; text-decoration: underline; }
.pro-fineprint { text-align: center; font-size: 11px; margin: 8px 0 0; line-height: 1.4; }

/* login modal */
.login-logo { font-size: 38px; color: var(--accent); }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form label { display: block; font-size: 12px; color: var(--muted); }
.login-form input {
  width: 100%; margin-top: 5px; padding: 10px 11px; border-radius: 9px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--text);
  font-size: 14px; outline: none;
}
.login-form input:focus { border-color: var(--accent); }
.login-form .pro-cta { margin-top: 4px; }
.login-error { color: #ff6b6b; font-size: 12.5px; text-align: center; }

@media (max-width: 760px) {
  .nav-right .icon-btn.shuffle span { display: none; }
  .pb-title, .pb-sub { max-width: 38vw; }
  .search-wrap { width: 50vw; }
  #pb-vol { width: 56px; }
  :root { --drawer-w: 86vw; }
}

/* ===== Mobile (phones) ===== */
@media (max-width: 480px) {
  :root { --nav-h: 50px; }

  /* navbar */
  #navbar { padding: 0 10px; }
  .nav-right .icon-btn span { display: none; }
  .nav-right { gap: 4px; }
  .icon-btn { padding: 6px 8px; font-size: 14px; }

  /* stage — stack vertically on mobile */
  #stage { flex-direction: column; overflow-y: auto; padding: 0; }
  .ad-col { display: none; }
  .stage-left { flex: none; border-right: none; border-bottom: 1px solid var(--border); }
  .stage-left-inner { padding: 12px 12px 14px; gap: 10px; }
  .stage-center { overflow-y: visible; padding: 10px 10px 0; }
  .stage-right { flex: none; border-left: none; border-top: 1px solid var(--border); padding: 12px 12px 16px; }

  /* artist/title above video */
  .meta-id-top { margin-bottom: 6px; }
  .meta-id-top .meta-artist { font-size: 14px; }
  .meta-id-top .meta-release { font-size: 12px; }

  /* video */
  #player-bg { border-radius: 10px; }

  /* shuffle + filter row */
  .stage-shuffle { gap: 6px; margin-top: 10px; }
  .big-shuffle { padding: 10px 20px; font-size: 14px; }
  .stage-filter-btn { padding: 10px 14px; font-size: 13px; }

  /* transport */
  .stage-transport { margin-top: 8px; gap: 6px; }
  .st-controls { max-width: 100%; }
  .st-scrub { max-width: 100%; }
  .ctrl { width: 34px; height: 34px; font-size: 14px; }
  .ctrl.play { width: 44px; height: 44px; font-size: 18px; }
  #pb-vol { width: 48px; }

  /* metadata below video */
  #stage-meta { margin-top: 0; }
  .meta-actions { flex-wrap: wrap; gap: 6px; }
  .ghost-btn { padding: 7px 12px; font-size: 12px; }
  .meta-table { font-size: 12px; }

  /* drawers */
  :root { --drawer-w: 100vw; }
  #left-drawer, #right-drawer { border-radius: 0; }

  /* filter popover */
  .filter-pop { width: calc(100vw - 20px); left: 10px; right: 10px; max-height: 80vh; overflow-y: auto; }

  /* modals */
  .modal { width: 92vw; padding: 20px 16px; }
  .auth-modal { padding: 24px 16px 20px; }

  /* playlist picker */
  .pl-picker { left: 10px !important; right: 10px; width: auto; }
  .user-email { display: none; }
}

/* ============================================================
   Sample Map page
   ============================================================ */
body.map-page { overflow: hidden; }
.map-page #navbar .logo { text-decoration: none; }
.map-title { font-size: 14px; font-weight: 700; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }

#map-stage {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; gap: 0;
}
#map-wrap {
  position: relative; flex: 1 1 auto; min-width: 0;
  background: #01020a;
  overflow: hidden;
}
/* interactive globe canvas */
#map-wrap {
  background:
    radial-gradient(80% 80% at 50% 50%, #03061a, #01020a);
}
#globe { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#globe:active { cursor: grabbing; }
#globe-container { width: 100%; height: 100%; }
#globe-container canvas { display: block; }

.globe-hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  color: rgba(255,255,255,.45); font-size: 12px; letter-spacing: .5px;
  pointer-events: none; transition: opacity .6s; text-transform: lowercase;
  background: rgba(0,0,0,.35); padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border);
}
.globe-hint.fade { opacity: 0; }

/* full-bleed globe stage */
.map-page #map-stage { display: block; }
.map-page #map-wrap { width: 100%; height: 100%; }
.map-count {
  position: absolute; top: 14px; left: 16px; pointer-events: none;
  font-size: 11.5px; letter-spacing: .4px; color: rgba(190,255,220,.6);
  text-transform: uppercase; font-weight: 600;
}

/* centered "dug up" modal */
.map-modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .25s;
}
.map-modal.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.mm-backdrop { position: absolute; inset: 0; background: rgba(4,6,8,.62); backdrop-filter: blur(7px); }
.mm-card {
  position: relative; z-index: 1; width: min(92vw, 560px);
  background: linear-gradient(165deg, #11201a, #0a0f12);
  border: 1px solid rgba(54,224,136,.28); border-radius: 18px; padding: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 60px rgba(33,194,94,.12);
}
.mm-card.pop { animation: nowPop .45s cubic-bezier(.2,.9,.3,1.3); }
.mm-close {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255,255,255,.06); color: var(--text);
  font-size: 13px; cursor: pointer; z-index: 2;
}
.mm-close:hover { background: rgba(255,255,255,.14); }
.mm-region { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #8affc0; margin-bottom: 12px; }
.mm-region .mm-count { color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.mm-player { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--border), 0 0 30px rgba(33,194,94,.18); display: block; line-height: 0; font-size: 0; }
.mm-player #map-player, .mm-player #gallery-player, .mm-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
.mm-title { margin-top: 14px; font-size: 17px; font-weight: 800; line-height: 1.3; }
.mm-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.mm-actions { display: flex; gap: 9px; margin-top: 16px; }
.gm-transport { margin-top: 14px; }
#mm-playlist-menu {
  position: absolute; z-index: 5; left: 20px; right: 20px; bottom: 90px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.4); max-height: 220px; overflow-y: auto;
}
#mm-playlist-menu.hidden { display: none; }

/* generated "now playing" card */
.map-now { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.map-now.hidden { display: none; }
.map-now.pop { animation: nowPop .42s cubic-bezier(.2,.9,.3,1.3); }
@keyframes nowPop {
  from { opacity: 0; transform: translateY(-8px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.mn-player { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--border), 0 0 24px rgba(33,194,94,.18); }
.mn-player #map-player, .mn-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mn-title { margin-top: 9px; font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.mn-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.mn-actions { display: flex; gap: 7px; margin-top: 10px; }
.mn-btn { flex: 1; padding: 8px 6px; border-radius: 8px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--text); cursor: pointer; }
.mn-btn:hover { background: rgba(255,255,255,.12); }
.mn-btn.primary { background: var(--accent); border-color: var(--accent); color: #06210f; }
.mn-btn.primary:hover { background: #34d07b; }

.map-tip {
  position: absolute; z-index: 20; pointer-events: none;
  background: rgba(16,16,20,.96); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; font-size: 12.5px; max-width: 240px; box-shadow: 0 14px 34px rgba(0,0,0,.6);
}
.map-tip .tip-list { margin-top: 5px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.map-empty {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  color: var(--muted); font-size: 15px; pointer-events: none;
}

#map-panel {
  flex: 0 0 340px; background: var(--panel); backdrop-filter: blur(14px);
  border-left: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden;
}
.mp-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.mp-head h3 { margin: 0 0 2px; font-size: 18px; }
.mp-list { flex: 1; overflow-y: auto; padding: 8px; }
.mp-row { display: flex; gap: 10px; align-items: center; padding: 7px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; }
.mp-row:hover { background: rgba(255,255,255,.06); border-color: var(--border); }
.mp-row img { width: 54px; height: 40px; object-fit: cover; border-radius: 6px; background: #222; flex: none; }
.mp-meta { min-width: 0; flex: 1; }
.mp-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-play { flex: none; width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--accent); color: #06210f; font-size: 13px; font-weight: 700; }
.mp-play:hover { background: #34d07b; }

@media (max-width: 760px) {
  #map-panel { flex-basis: 44vw; }
  #world .continent-labels text { font-size: 10px; }
}

/* ===== Auth modal ===== */
.modal-bg { position: absolute; inset: 0; }
.auth-modal { max-width: 380px; width: 90%; padding: 32px 28px 28px; position: relative; z-index: 1; }
.auth-logo { font-family: "Sora", inherit; font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 20px; letter-spacing: -.02em; }
.auth-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.auth-tab { flex: 1; background: none; border: none; color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.auth-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.auth-google-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #222; border: none; border-radius: 8px; padding: 10px; font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 4px; }
.auth-google-btn:hover { background: #f5f5f5; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-modal input[type=email], .auth-modal input[type=password] {
  width: 100%; box-sizing: border-box; background: rgba(255,255,255,.06); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 10px; outline: none;
}
.auth-modal input:focus { border-color: var(--accent); }
.auth-submit { width: 100%; background: var(--accent); color: #06210f; border: none; border-radius: 8px; padding: 11px; font-size: 14px; font-weight: 700; cursor: pointer; margin-top: 4px; }
.auth-submit:hover { background: #34d07b; }
.auth-submit:disabled { opacity: .6; cursor: default; }
.auth-error { color: #ff6b6b; font-size: 12.5px; margin: -4px 0 8px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; }
.auth-switch .link-btn { color: var(--accent); font-weight: 600; }

/* ===== User button + dropdown ===== */
.user-btn { display: flex; align-items: center; gap: 6px; }
.user-avatar { color: var(--accent); font-size: 16px; }
.user-email { font-size: 13px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu {
  position: fixed; top: calc(var(--nav-h) + 6px); right: 12px; z-index: 2000;
  background: var(--panel-solid); border: 1px solid var(--border); border-radius: 10px;
  min-width: 200px; box-shadow: 0 8px 32px rgba(0,0,0,.5); padding: 8px 0;
}
.user-menu-email { padding: 8px 14px 4px; font-size: 12px; color: var(--muted); word-break: break-all; }
.user-menu-divider { border: none; border-top: 1px solid var(--border); margin: 6px 0; }
.user-menu-item { width: 100%; background: none; border: none; color: var(--text); font-size: 13.5px; padding: 8px 14px; text-align: left; cursor: pointer; }
.user-menu-item:hover { background: rgba(255,255,255,.07); }

/* ===== Playlist picker ===== */
.pl-picker {
  position: fixed; z-index: 3000;
  background: var(--panel-solid); border: 1px solid var(--border);
  border-radius: 12px; min-width: 220px; max-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,.6); overflow: hidden;
  font-family: inherit;
}
.pl-picker-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; font-size: 13px; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.pl-picker-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; }
.pl-picker-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; color: var(--text);
  padding: 10px 14px; cursor: pointer; text-align: left; gap: 10px;
}
.pl-picker-item:hover { background: rgba(255,255,255,.07); }
.pl-picker-name { font-size: 13.5px; font-weight: 500; }
.pl-picker-count { font-size: 11.5px; color: var(--muted); flex-shrink: 0; }
