/* Ricky Box Music: dark, mobile-first music app look */
:root {
  --bg: #0d0b14;
  --bg2: #15121f;
  --card: #1c1829;
  --card2: #252036;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f1fb;
  --muted: #a69fbc;
  --accent: #ff7a59;
  --accent2: #9b6bff;
  --grad: linear-gradient(135deg, #ff7a59 0%, #f7508f 50%, #9b6bff 100%);
  --radius: 14px;
  --top: 64px;
  --tab: 0px;
  --bar: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --artw: min(92vw, 640px, calc((100dvh - 400px) * 1.7778));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  padding-bottom: calc(var(--tab) + var(--bar) + var(--safe-b));
}
body.has-player { --bar: 68px; }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 800; }
h2 { font-size: clamp(19px, 2.4vw, 24px); font-weight: 700; }
.muted { color: var(--muted); }
.muted a { text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); }
.lead { color: var(--muted); font-size: 1.08em; max-width: 680px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; font-weight: 700; color: var(--accent); margin: 0 0 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Loading bar during page switches */
body.loading::before {
  content: ''; position: fixed; z-index: 100; top: 0; left: 0; height: 3px; width: 100%;
  background: var(--grad); transform-origin: left; animation: load 1.2s ease-out infinite;
}
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(0.9); opacity: 0.4; } }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top);
  background: rgba(13, 11, 20, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1320px; margin: 0 auto; height: 100%; padding: 0 16px; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; white-space: nowrap; }
.logo b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topnav { display: flex; gap: 4px; }
.topnav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; }
.topnav a:hover { color: var(--text); background: var(--card); }
.topnav a[aria-current] { color: var(--text); background: var(--card2); }
.topsearch { margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; width: min(360px, 32vw); color: var(--muted); }
.topsearch input { flex: 1; background: none; border: 0; color: var(--text); font: inherit; padding: 9px 0; outline: none; min-width: 0; }
.yt-link { color: #ff3b3b; display: flex; padding: 6px; }

/* ---------- Main ---------- */
.main { max-width: 1320px; margin: 0 auto; padding: 0 16px 48px; min-height: 60vh; }
.section { margin: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.see-all { color: var(--muted); font-weight: 600; font-size: 14px; }
.see-all:hover { color: var(--accent); }
.page-head { padding: 36px 0 12px; }
.empty { color: var(--muted); padding: 32px 0; text-align: center; }
.prose { max-width: 720px; color: #d9d4e8; font-size: 16px; }
.prose p { margin: 0 0 1em; }
.prose a { color: var(--accent); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-weight: 700; transition: transform 0.12s, filter 0.12s, background 0.12s; white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px rgba(247, 80, 143, 0.7); }
.btn-primary:hover { filter: brightness(1.08); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-icon { padding: 11px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.busy { opacity: 0.6; pointer-events: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; margin: 20px 0 8px; border-radius: 24px; padding: clamp(36px, 7vw, 80px) clamp(22px, 5vw, 64px); background:
  radial-gradient(600px 300px at 15% 0%, rgba(255, 122, 89, 0.35), transparent 60%),
  radial-gradient(500px 300px at 90% 100%, rgba(155, 107, 255, 0.4), transparent 60%),
  linear-gradient(160deg, #1e1830, #120f1c); border: 1px solid var(--line); }
.hero-in { position: relative; z-index: 1; max-width: 640px; }
.hero h1 { font-size: clamp(34px, 6.5vw, 64px); }
.hero-bars { position: absolute; right: clamp(-40px, 2vw, 40px); bottom: 0; height: 70%; display: flex; align-items: flex-end; gap: 6px; opacity: 0.35; }
.hero-bars i { width: 8px; border-radius: 4px 4px 0 0; background: var(--grad); height: 30%; animation: bar 1.6s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.13s); }
.hero-bars i:nth-child(3n) { animation-duration: 1.1s; }
.hero-bars i:nth-child(4n+1) { animation-duration: 2.1s; }
@keyframes bar { from { height: 12%; } to { height: 95%; } }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 16px; }
.grid.genres { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px 18px; }

.genre-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 108px; padding: 14px 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--c1), var(--c2)); font-weight: 800; font-size: 18px; line-height: 1.2; transition: transform 0.15s, box-shadow 0.15s; }
.genre-tile::after { content: ''; position: absolute; right: -24px; top: -24px; width: 96px; height: 96px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.genre-tile small { font-weight: 500; font-size: 12px; opacity: 0.8; }
.genre-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -14px var(--c1); }

.card { position: relative; container-type: inline-size; min-width: 0; }
.card-art { display: block; position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--card); }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.card:hover .card-art img { transform: scale(1.04); }
.card-badge { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.72); font-size: 12px; font-weight: 600; }
.card-play { position: absolute; left: 10px; top: calc(56.25cqw - 54px); width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); opacity: 0; transform: translateY(6px); transition: opacity 0.15s, transform 0.15s; }
.card-play svg { margin-left: 2px; }
.card:hover .card-play, .card.is-current .card-play, .card-play:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .card-play { opacity: 1; transform: none; width: 38px; height: 38px; top: calc(56.25cqw - 46px); left: 8px; } }
.card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 10px; font-weight: 700; line-height: 1.35; }
.card.is-current .card-title { color: var(--accent); }
.card-sub { color: var(--muted); font-size: 13px; }

/* ---------- Track list ---------- */
.tracklist { list-style: none; margin: 0; padding: 0; }
.trow { display: grid; grid-template-columns: 40px 64px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 10px; }
.trow:hover { background: var(--card); }
.trow-play { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); position: relative; }
.trow-play > * { grid-area: 1 / 1; }
.trow-ic, .eq { display: none; }
.trow:hover .trow-n, .trow.is-current .trow-n { display: none; }
.trow:hover .trow-ic { display: block; color: var(--text); }
.trow-play:not(:has(.trow-n)) .trow-ic { display: block; }
.trow.is-current .trow-ic { display: none; }
.trow.is-current .eq { display: flex; }
.trow-cover { width: 64px; height: 36px; object-fit: cover; border-radius: 6px; background: var(--card); }
.trow-main { min-width: 0; }
.trow-title { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow.is-current .trow-title { color: var(--accent); }
.trow-main small { color: var(--muted); font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow-main small a:hover { text-decoration: underline; }
.trow-plays, .trow-dur { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.eq { align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; height: 30%; background: var(--accent); border-radius: 1px; }
body.is-playing .eq i { animation: bar 0.8s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -0.3s !important; }
.eq i:nth-child(3) { animation-delay: -0.55s !important; }

/* ---------- Detail headers ---------- */
.detail-head { display: flex; gap: clamp(18px, 4vw, 36px); align-items: flex-end; padding: 32px 0 20px; }
.detail-art-wrap { position: relative; flex: none; }
.detail-art { width: clamp(260px, 36vw, 440px); height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8); background: var(--card); }
.detail-head > .detail-art { flex: none; }
.art-play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); transition: transform 0.15s; }
.art-play svg { margin-left: 4px; }
.art-play:hover { transform: scale(1.06); }
.detail-info { min-width: 0; }
.detail-info h1 { font-size: clamp(26px, 4vw, 44px); }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.cover-head { margin: 20px 0 0; border-radius: 24px; padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 56px); background: linear-gradient(150deg, var(--c1), var(--c2) 70%, var(--bg2)); }
.cover-head .lead { color: rgba(255, 255, 255, 0.85); }
.cover-head .muted { color: rgba(255, 255, 255, 0.7); }
.cover-head .eyebrow { color: rgba(255, 255, 255, 0.8); }

.bigsearch input { width: 100%; max-width: 640px; padding: 14px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 17px; outline: none; }
.bigsearch input:focus { border-color: var(--accent); }

.pager { display: flex; justify-content: space-between; align-items: center; padding: 24px 4px; color: var(--muted); }
.pager a { color: var(--text); font-weight: 600; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg2); padding: 36px 16px 24px; }
.footer-in { max-width: 1320px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-in p { max-width: 420px; font-size: 14px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; color: var(--muted); font-weight: 600; }
.copy { text-align: center; color: var(--muted); font-size: 13px; margin: 24px 0 0; }

/* ---------- Range inputs ---------- */
input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 16px; background: transparent; margin: 0; cursor: pointer; --p: 0%; }
input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) var(--p), rgba(255, 255, 255, 0.18) var(--p)); }
input[type='range']::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) var(--p), rgba(255, 255, 255, 0.18) var(--p)); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: #fff; border: 0; }
input[type='range']::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }

/* ---------- Player bar ---------- */
.player { position: fixed; z-index: 50; left: 0; right: 0; bottom: calc(var(--tab) + var(--safe-b)); height: var(--bar); background: rgba(24, 20, 36, 0.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.player[hidden], .np[hidden], .yt-box[hidden] { display: none !important; }
.pl-progress { position: absolute; left: 0; right: 0; top: -8px; }
.pl-progress input { height: 16px; }
.pl-in { height: 100%; max-width: 1320px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; }
.pl-now { display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left; }
.pl-now img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; flex: none; background: var(--card); }
.pl-meta { min-width: 0; display: flex; flex-direction: column; }
.pl-meta b, .pl-meta small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-meta small { color: var(--muted); font-size: 12px; }
.pl-ctrls { display: flex; align-items: center; gap: 6px; }
.ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); position: relative; transition: color 0.12s, background 0.12s; }
.ic > * { grid-area: 1 / 1; }
.ic:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.ic.on { color: var(--accent); }
.ic.big { width: 46px; height: 46px; background: #fff; color: #120f1c; }
.ic.big:hover { background: #fff; color: #120f1c; transform: scale(1.05); }
.ic.huge { width: 72px; height: 72px; background: var(--grad); color: #fff; }
.ic.huge:hover { background: var(--grad); color: #fff; }
.i-pause { display: none; }
body.is-playing .i-play { display: none; }
body.is-playing .i-pause { display: block; }
.rep1 { display: none; font-style: normal; font-size: 9px; font-weight: 800; position: absolute; top: 7px; right: 6px; }
.ic.one .rep1 { display: block; }
.pl-right { display: flex; align-items: center; justify-content: flex-end; gap: 14px; color: var(--muted); }
.pl-time { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-vol { display: flex; align-items: center; gap: 8px; }
.pl-vol input { width: 100px; }

/* Floating YouTube player (must stay visible while a YouTube track plays) */
.yt-box { position: fixed; z-index: 45; right: 16px; bottom: calc(var(--tab) + var(--bar) + var(--safe-b) + 14px); width: 320px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.8); border: 1px solid var(--line); transition: all 0.25s ease; }
.yt-box iframe, #yt-frame { width: 100%; height: 100%; display: block; border: 0; }
body.np-open .yt-box { z-index: 70; right: auto; bottom: auto; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); width: var(--artw); transform: translateX(-50%); border-radius: 16px; }

/* ---------- Now playing sheet ---------- */
.np { position: fixed; z-index: 60; inset: 0; display: flex; flex-direction: column; background: radial-gradient(800px 400px at 50% 0%, rgba(155, 107, 255, 0.28), transparent 70%), var(--bg); padding-top: env(safe-area-inset-top, 0px); animation: up 0.22s ease-out; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.np-head { height: 56px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; font-weight: 700; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; }
.np-body { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 720px; margin: 0 auto; padding: 8px 16px calc(16px + var(--safe-b)); }
.np-art { width: var(--artw); aspect-ratio: 16 / 9; flex: none; border-radius: 16px; overflow: hidden; background: var(--card); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9); }
.np-art img { width: 100%; height: 100%; object-fit: cover; }
body.yt-on .np-art img { visibility: hidden; }
.np-info { width: var(--artw); max-width: 100%; margin-top: 18px; text-align: center; }
.np-info a { display: block; font-weight: 800; font-size: 20px; line-height: 1.3; }
.np-info small { color: var(--muted); }
.np-seek { width: var(--artw); max-width: 100%; margin-top: 12px; }
.np-times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.np-ctrls { display: flex; align-items: center; gap: 14px; margin: 6px 0 10px; }
.np-qh { align-self: stretch; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin: 8px 0 6px; }
.np-queue { align-self: stretch; flex: 1; min-height: 80px; overflow-y: auto; list-style: none; margin: 0; padding: 0; overscroll-behavior: contain; }
.np-queue li { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.np-queue li:hover { background: var(--card); }
.np-queue li.on { background: var(--card2); }
.np-queue li.on b { color: var(--accent); }
.np-queue img { width: 56px; height: 32px; object-fit: cover; border-radius: 4px; flex: none; }
.np-queue span { min-width: 0; display: flex; flex-direction: column; }
.np-queue b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-queue small { color: var(--muted); font-size: 12px; }
body.np-open { overflow: hidden; }

/* ---------- Mobile tab bar ---------- */
.tabbar { display: none; }

.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--tab) + var(--bar) + var(--safe-b) + 20px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #fff; color: #120f1c; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; transition: all 0.2s; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  .topsearch { width: auto; flex: 1; max-width: 320px; }
  .pl-vol, .pl-time { display: none; }
  .yt-box { width: 240px; }
}

/* ---------- Phone ---------- */
@media (max-width: 767px) {
  :root { --tab: 60px; --top: 56px; }
  body { font-size: 14.5px; }
  body.has-player { --bar: 64px; }
  .topbar-in { gap: 12px; }
  .topnav, .topsearch { display: none; }
  .yt-link { margin-left: auto; }
  .tabbar { display: flex; position: fixed; z-index: 55; left: 0; right: 0; bottom: 0; height: calc(var(--tab) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(13, 11, 20, 0.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); }
  .tabbar a[aria-current] { color: var(--text); }
  .tabbar a[aria-current] svg { color: var(--accent); }
  .player { background: rgba(31, 26, 46, 0.98); border-top: 0; }
  .pl-in { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 8px 0 10px; }
  .pl-right { display: none; }
  .pl-now img { width: 44px; height: 44px; }
  .hide-sm { display: none !important; }
  .np .hide-sm { display: grid !important; }
  .yt-box { width: 160px; right: 8px; bottom: calc(var(--tab) + var(--bar) + var(--safe-b) + 8px); border-radius: 10px; }
  .main { padding: 0 14px 32px; }
  .hero { margin-top: 14px; border-radius: 18px; }
  .hero-bars { opacity: 0.2; }
  .section { margin: 30px 0; }
  .grid.genres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .genre-tile { min-height: 84px; font-size: 16px; padding: 12px; }
  .grid.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .card-title { font-size: 14px; }
  .trow { grid-template-columns: 34px 56px minmax(0, 1fr) auto; gap: 10px; padding: 7px 4px; }
  .trow-play { width: 34px; height: 34px; }
  .trow-cover { width: 56px; height: 32px; }
  .detail-head { flex-direction: column; align-items: stretch; padding-top: 18px; }
  .detail-art { width: 100%; }
  .cover-head { border-radius: 18px; margin-top: 14px; }
  .actions .btn { flex: 1 1 auto; }
  .actions .btn-icon { flex: 0 0 auto; }
  .footer { padding-bottom: 24px; }
  .footer-in { flex-direction: column; }
}

/* ---------- Account link ---------- */
.acct { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 14px; white-space: nowrap; max-width: 180px; }
.acct svg { margin-left: 4px; }
.acct-name { overflow: hidden; text-overflow: ellipsis; }
.acct-av { width: 26px; height: 26px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; flex: none; }

/* ---------- Forms (public) ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.form label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--muted); }
.form label.check a { color: var(--accent); }
.form input:not([type=checkbox]):not([type=radio]):not([type=file]), .form select, .form textarea {
  font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; outline: none; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); }
.form input[type=file] { color: var(--muted); font-size: 14px; }
.form input[type=file]::file-selector-button { font: inherit; font-weight: 600; color: var(--text); background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; margin-right: 12px; cursor: pointer; }
.form input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin-top: 2px; }
.form textarea { resize: vertical; }
.form .btn { align-self: flex-start; }
.hp { position: absolute !important; left: -9999px !important; height: 0; overflow: hidden; }
.small { font-size: 13px; }
.alert { padding: 12px 16px; border-radius: 12px; margin: 12px 0; font-weight: 500; }
.alert-ok { background: rgba(72, 199, 142, 0.14); border: 1px solid rgba(72, 199, 142, 0.35); color: #9ff0c8; }
.alert-err { background: rgba(255, 99, 99, 0.12); border: 1px solid rgba(255, 99, 99, 0.35); color: #ffb3b3; }
.auth { display: grid; place-items: center; padding: 40px 0; }
.auth-box { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 5vw, 36px); }
.auth-box h1 { font-size: 28px; }
.card-box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(16px, 3vw, 24px); }
.card-box h2 { font-size: 19px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; margin: 24px 0; }
.narrow { max-width: 720px; }
.upbar { position: relative; height: 34px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); overflow: hidden; }
.upbar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--grad); opacity: 0.5; transition: width 0.2s; }
.upbar span { position: relative; display: block; line-height: 32px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.upbar.done { border-color: rgba(72, 199, 142, 0.5); }
.upbar.fail { border-color: rgba(255, 99, 99, 0.6); }
.upbar.fail span { color: #ffb3b3; }

/* ---------- Account uploads ---------- */
.sublist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sublist li { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 12px; background: var(--card); }
.sublist img { width: 64px; height: 36px; object-fit: cover; border-radius: 6px; flex: none; }
.sublist li > div { display: flex; flex-direction: column; min-width: 0; }
.sublist .note { color: #ffd49a; margin-top: 4px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--card2); margin-left: 4px; }
.badge-pending { background: rgba(255, 196, 87, 0.18); color: #ffd49a; }
.badge-approved { background: rgba(72, 199, 142, 0.18); color: #9ff0c8; }
.badge-rejected { background: rgba(255, 99, 99, 0.16); color: #ffb3b3; }

/* ---------- Community ---------- */
.hero-sm { padding: clamp(28px, 5vw, 56px) clamp(22px, 5vw, 56px); }
.hero-sm h1 { font-size: clamp(30px, 5vw, 48px); }
.tabs { display: flex; gap: 6px; margin: 24px 0 18px; overflow-x: auto; }
.tab { padding: 8px 16px; border-radius: 999px; background: var(--card); color: var(--muted); font-weight: 600; white-space: nowrap; }
.tab.on { background: var(--text); color: var(--bg); }
.stars { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; line-height: 1; letter-spacing: 2px; }
.stars-box { position: relative; display: inline-block; }
.stars-bg { color: rgba(255, 255, 255, 0.18); }
.stars-fg { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: #ffc457; }
.stars small { letter-spacing: 0; color: var(--muted); font-size: 12px; }
.card .stars { margin-top: 4px; font-size: 13px; }
.rate-form { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 2px; flex-wrap: wrap; }
.rate-form input { position: absolute; opacity: 0; pointer-events: none; }
.rate-form label { font-size: 34px; line-height: 1; color: rgba(255, 255, 255, 0.2); cursor: pointer; transition: color 0.1s, transform 0.1s; padding: 2px; }
.rate-form label:hover, .rate-form label:hover ~ label, .rate-form input:checked ~ label { color: #ffc457; }
.rate-form label:active { transform: scale(0.9); }
.rate-form input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 6px; }
.rate-form .btn { order: -1; margin-left: 14px; }
.ask { background: var(--card); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 8px; }
.comment-form { margin-bottom: 18px; }
.comment-form textarea { min-height: 90px; }
.comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.comments li { display: flex; gap: 12px; }
.comments p { margin: 4px 0 0; color: #ddd8ea; white-space: pre-wrap; overflow-wrap: anywhere; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; font-weight: 800; flex: none; }

/* ---------- Home promo + SEO copy ---------- */
.promo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin: 48px 0; padding: clamp(22px, 4vw, 40px); border-radius: 24px;
  background: radial-gradient(500px 240px at 0% 0%, rgba(155, 107, 255, 0.35), transparent 70%), var(--card); border: 1px solid var(--line); }
.promo h2 { font-size: clamp(22px, 3vw, 30px); }
.promo .actions { margin: 0; }
.seo-copy { color: #cfc9de; max-width: 980px; }
.seo-copy a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255, 122, 89, 0.5); text-underline-offset: 3px; }
.seo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.seo-copy h3 { margin-top: 24px; font-size: 18px; color: var(--text); }
.seo-copy details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.seo-copy summary { cursor: pointer; font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.seo-copy summary::-webkit-details-marker { display: none; }
.seo-copy summary::after { content: '+'; color: var(--accent); font-size: 20px; line-height: 1; }
.seo-copy details[open] summary::after { content: '\2013'; }
.seo-copy details p { margin: 8px 0 0; }
.legal { padding: 24px 0 40px; }
.legal h2 { margin-top: 1.6em; font-size: 20px; }
.legal li { margin-bottom: 6px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.contact-mail { margin: 24px 0; }
.copy a { color: var(--muted); text-decoration: underline; }

@media (max-width: 767px) {
  .acct { margin-left: auto; padding: 4px; border: 0; background: none; }
  .acct-name { display: none; }
  .acct + .yt-link { margin-left: 0; }
  .two-col, .seo-cols { grid-template-columns: 1fr; }
  .form .btn { align-self: stretch; }
  .tabbar a span { font-size: 10px; }
}

/* ---------- Listen with: platform switch ---------- */
.platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 8px; }
.platforms-page { margin-top: 16px; }
.pf-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-right: 4px; }
.platforms button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); color: var(--muted); font-weight: 600; font-size: 13px; transition: all 0.15s; }
.platforms button:hover:not(:disabled) { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.platforms button.on { color: #fff; border-color: transparent; background: var(--grad); }
.platforms button[data-platform='apple'].on { background: linear-gradient(135deg, #fa233b, #fb5c74); }
.platforms button[data-platform='spotify'].on { background: #1db954; color: #08130b; }
.platforms button[data-platform='youtube'].on { background: #ff2a2a; }
.platforms button:disabled { opacity: 0.35; cursor: not-allowed; }
.np .platforms { justify-content: center; margin: 4px 0 6px; }
.pf-pill { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.pf-pill:hover { color: var(--text); }
.pf-pill[hidden] { display: none; }

/* Apple Music / Spotify player box (must stay visible while it plays) */
.ext-box { position: fixed; z-index: 72; right: 16px; bottom: calc(var(--tab) + var(--bar) + var(--safe-b) + 14px); width: min(420px, calc(100vw - 32px)); padding: 10px; border-radius: 14px; background: rgba(24, 20, 36, 0.97); border: 1px solid var(--line); box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.8); }
.ext-box[hidden], .ext-box [hidden] { display: none !important; }
.ext-note { margin: 0 0 8px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.apple-frame iframe { display: block; }
.sp-wrap iframe { display: block; border-radius: 12px; }
.ext-box.flash { animation: flash 0.9s ease; }
@keyframes flash { 0%, 100% { box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.8); } 40% { box-shadow: 0 0 0 3px var(--accent), 0 18px 40px -10px rgba(0, 0, 0, 0.8); } }
body.ext-apple .pl-progress, body.ext-apple .pl-time, body.ext-apple .np-seek { visibility: hidden; }
body.np-open .ext-box { top: calc(64px + env(safe-area-inset-top, 0px)); bottom: auto; left: 50%; right: auto; transform: translateX(-50%); width: var(--artw); max-width: calc(100vw - 16px); }
body.ext-on .np-art { aspect-ratio: auto; height: 250px; }
body.ext-on .np-art img { visibility: hidden; }

@media (max-width: 767px) {
  .ext-box { left: 8px; right: 8px; width: auto; bottom: calc(var(--tab) + var(--bar) + var(--safe-b) + 8px); padding: 8px; }
  .ext-note { font-size: 11px; }
  .pl-right .pf-pill { display: none; }
}

/* ---------- Language menu ---------- */
.langsw { position: relative; }
.langsw summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; user-select: none; }
.langsw summary::-webkit-details-marker { display: none; }
.langsw summary:hover, .langsw[open] summary { color: var(--text); }
.langsw ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; list-style: none; margin: 0; padding: 6px; min-width: 170px; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7); }
.langsw li a { display: block; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.langsw li a:hover { background: rgba(255, 255, 255, 0.08); }
.langsw li a[aria-current] { color: var(--accent); }
.footer-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 12px; font-size: 13px; }
.footer-langs a { color: var(--muted); }
.footer-langs a:hover, .footer-langs a[aria-current] { color: var(--text); }
@media (max-width: 767px) {
  .langsw { margin-left: auto; }
  .langsw + .acct { margin-left: 0; }
  .langsw summary { padding: 6px 8px; border: 0; background: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.listen-link { margin: 14px 0 0; }
.listen-link a { color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.25); text-underline-offset: 3px; }
.listen-link a:hover { color: var(--accent); }

/* "Can't play here" notice with Spotify / Apple Music links */
.notice { position: fixed; z-index: 95; left: 50%; bottom: calc(var(--tab) + var(--bar) + var(--safe-b) + 16px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; width: min(440px, calc(100vw - 24px)); padding: 14px 40px 14px 16px; border-radius: 14px; background: #fff; color: #120f1c; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55); transition: all 0.2s; }
.notice.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.notice p { margin: 0; font-weight: 600; font-size: 14px; }
.notice-links { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.notice-links a { padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: #fff; }
.notice-links .nl-sp { background: #1db954; color: #06140a; }
.notice-links .nl-ap { background: linear-gradient(135deg, #fa233b, #fb5c74); }
.notice-x { position: absolute; top: 6px; right: 10px; font-size: 22px; line-height: 1; color: #6b6480; }
.btn-spotify:hover { background: #1db954; color: #06140a; border-color: transparent; }
.btn-apple:hover { background: #fa233b; color: #fff; border-color: transparent; }
