/* SibiMusic — SiBI brand (navy #1e3a5f, gold #c4934a) on a dark listening surface */
:root {
  --bg: #0b1626;
  --bg2: #102036;
  --card: #15283f;
  --card2: #1b3150;
  --line: #24405f;
  --text: #f3f5f9;
  --text2: #b4c0d2;
  --text3: #8a9ab0;
  --primary: #1e3a5f;
  --primary-l: #3b6cb4;
  --gold: #d9a95c;
  --gold-d: #c4934a;
  --radius: 14px;
  --nav-h: 64px;
  --mini-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); -webkit-tap-highlight-color: transparent; }
body { min-height: 100dvh; overscroll-behavior-y: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img, svg { display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #111; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- layout ---------- */
.main { padding: 16px 16px calc(var(--nav-h) + var(--mini-h) + 24px + var(--safe-b)); max-width: 1100px; margin: 0 auto; outline: none; }
.nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; background: rgba(8, 17, 30, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.nav .brand { display: none; }
.nav-link { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--text3); }
.nav-link svg { width: 24px; height: 24px; fill: currentColor; }
.nav-link[aria-current="page"] { color: var(--gold); }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 232px 1fr; }
  .nav { position: sticky; top: 0; height: 100dvh; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 24px 14px;
    border-top: 0; border-right: 1px solid var(--line); background: var(--bg2); }
  .nav .brand { display: flex; margin-bottom: 20px; }
  .nav-link { flex: 0; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 10px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; }
  .nav-link:hover { background: var(--card); color: var(--text); }
  .nav-link[aria-current="page"] { background: var(--card); }
  .main { padding: 28px 32px calc(var(--mini-h) + 40px); width: 100%; }
}

.brand { align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 700 20px var(--serif);
  background: linear-gradient(135deg, var(--primary), var(--primary-l)); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(217,169,92,.4); }
.brand-text { font: 600 19px var(--serif); }
.brand-text b { color: var(--gold); font-weight: 600; }

/* ---------- common ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.topbar .brand { display: flex; padding: 0; }
.topbar > span { margin-left: auto; }
@media (min-width: 900px) { .topbar .brand { display: none; } }
.page-title { font: 600 28px var(--serif); }
.eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.muted { color: var(--text2); }
.small { font-size: 13px; }
section.block { margin: 28px 0 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.block-head h2 { font: 600 20px var(--serif); }
.block-head a { font-size: 13px; color: var(--text2); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--text2); white-space: nowrap; }
.pill[aria-pressed="true"] { background: var(--gold); color: #1a1406; border-color: var(--gold); }
.pill.gold { color: var(--gold); border-color: rgba(217,169,92,.5); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 700; }
.btn-gold { background: var(--gold); color: #1a1406; }
.btn-gold:hover { background: #e6b86b; }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--card); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--text2); flex: none; }
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,.06); }
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }
.icon-btn.lg svg { width: 30px; height: 30px; }
.icon-btn[aria-pressed="true"] { color: var(--gold); }
.liked { color: var(--gold) !important; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.badge { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: rgba(217,169,92,.15); color: var(--gold); }
.sample-note { margin-top: 32px; font-size: 12px; color: var(--text3); text-align: center; }

/* covers */
.cover { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--card); }
.cover svg { width: 100%; height: 100%; }

/* ---------- home ---------- */
.hero { position: relative; border-radius: 20px; padding: 22px; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, rgba(217,169,92,.28), transparent 55%), linear-gradient(140deg, var(--primary), #0f2442 70%);
  border: 1px solid rgba(217,169,92,.25); }
.hero q { display: block; font: italic 600 22px/1.35 var(--serif); margin: 10px 0 8px; quotes: "“" "”"; }
.hero .meta { color: var(--text2); font-size: 13px; }
.hero-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
@media (min-width: 700px) { .hero { padding: 32px; } .hero q { font-size: 28px; max-width: 28ch; } }

.row { display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; }
@media (min-width: 600px) { .row { grid-auto-columns: 28%; } }
@media (min-width: 900px) { .row { grid-auto-columns: calc(20% - 12px); } }
.tile h3 { font-size: 14px; font-weight: 700; margin-top: 8px; }
.tile p { font-size: 12px; color: var(--text3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile:hover .cover { box-shadow: 0 0 0 2px var(--gold); }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.moods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .moods { grid-template-columns: repeat(3, 1fr); } }
.mood { position: relative; height: 72px; border-radius: 12px; padding: 12px 14px; font-weight: 800; overflow: hidden; display: flex; align-items: flex-end; }
.mood span { position: relative; text-shadow: 0 1px 6px rgba(0,0,0,.4); }

.upsell { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.upsell strong { font: 600 18px var(--serif); display: block; }

/* ---------- track list ---------- */
.tracks { list-style: none; margin: 0; padding: 0; }
.track { display: grid; grid-template-columns: 44px 1fr auto auto; align-items: center; gap: 12px; padding: 6px 4px; border-radius: 10px; }
.track:hover { background: rgba(255,255,255,.04); }
.track .cover { width: 44px; border-radius: 6px; }
.track-main { min-width: 0; text-align: left; display: flex; flex-direction: column; overflow: hidden; }
.track-title .eq-slot:empty { display: none; }
.track-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 6px; align-items: center; }
.track-sub { font-size: 13px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track.playing .track-title { color: var(--gold); }
.track-dur { font-size: 13px; color: var(--text3); font-variant-numeric: tabular-nums; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.eq i { width: 3px; background: var(--gold); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%,100% { height: 3px; } 50% { height: 12px; } }
.paused .eq i { animation-play-state: paused; }

/* ---------- collection header ---------- */
.coll { display: grid; gap: 18px; margin-bottom: 18px; }
.coll .cover { width: min(62vw, 240px); margin: 0 auto; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.coll h1 { font: 600 28px var(--serif); }
.coll-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.play-fab { width: 56px; height: 56px; border-radius: 50%; background: var(--gold); color: #1a1406; display: grid; place-items: center; }
.play-fab svg { width: 26px; height: 26px; fill: currentColor; }
@media (min-width: 700px) {
  .coll { grid-template-columns: 220px 1fr; align-items: end; }
  .coll .cover { width: 220px; margin: 0; }
  .coll h1 { font-size: 40px; }
}

/* ---------- track detail / metadata ---------- */
.journey { display: flex; gap: 4px; margin: 10px 0 0; }
.journey span { flex: 1; text-align: center; font-size: 11px; font-weight: 700; padding: 6px 2px; border-radius: 6px; background: var(--card); color: var(--text3); }
.journey span.on { background: var(--gold); color: #1a1406; }
.meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .meta-grid { grid-template-columns: repeat(4, 1fr); } }
.meta-grid div { background: var(--card); border-radius: 12px; padding: 12px; }
.meta-grid dt { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text3); font-weight: 700; }
.meta-grid dd { margin: 4px 0 0; font-weight: 600; }
.energy { display: inline-flex; gap: 3px; } .energy i { width: 8px; height: 14px; border-radius: 2px; background: var(--line); } .energy i.on { background: var(--gold); }
.insight-card { background: linear-gradient(150deg, rgba(217,169,92,.14), rgba(30,58,95,.3)); border: 1px solid rgba(217,169,92,.3); border-radius: 16px; padding: 18px; }
.insight-card q { display: block; font: italic 600 19px/1.4 var(--serif); quotes: "“" "”"; margin: 6px 0 10px; }
.insight-card .prompt { color: var(--text2); font-size: 14px; }
.insight-card .prompt b { color: var(--text); }

/* ---------- search ---------- */
.search-box { position: sticky; top: 0; z-index: 5; padding: 8px 0 10px; background: var(--bg); }
.search-box input { width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 0 16px 0 44px; font: inherit; font-size: 16px; }
.search-box input:focus { border-color: var(--gold); outline: none; }
.search-box svg { position: absolute; left: 14px; top: 22px; width: 20px; height: 20px; fill: var(--text3); }
.result-group h2 { font: 600 18px var(--serif); margin: 22px 0 8px; }
.empty { padding: 32px 0; color: var(--text3); text-align: center; }

/* ---------- membership ---------- */
.plans { display: grid; gap: 14px; }
@media (min-width: 800px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.plan.hl { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 16px 40px rgba(217,169,92,.12); }
.plan h3 { font: 600 20px var(--serif); }
.plan .price { font-size: 28px; font-weight: 800; } .plan .price small { font-size: 13px; color: var(--text3); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 0 0 6px; display: grid; align-content: start; gap: 6px; font-size: 14px; color: var(--text2); flex: 1; }
.plan li::before { content: "✓"; color: var(--gold); font-weight: 800; margin-right: 8px; }
.status-card { padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- mini player ---------- */
.mini { position: fixed; z-index: 29; left: 8px; right: 8px; bottom: calc(var(--nav-h) + var(--safe-b) + 6px); height: var(--mini-h);
  display: flex; align-items: center; gap: 4px; padding: 0 6px 0 8px; border-radius: 14px; background: #1d3554; box-shadow: 0 8px 30px rgba(0,0,0,.45); overflow: hidden; }
.mini-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; height: 100%; }
.mini-art { width: 46px; height: 46px; flex: none; } .mini-art .cover { border-radius: 8px; }
.mini-meta { min-width: 0; display: flex; flex-direction: column; }
.mini-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-progress { position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: rgba(255,255,255,.12); }
.mini-progress span { display: block; height: 100%; width: 0; background: var(--gold); }
.play-sm svg { width: 26px; height: 26px; }
@media (min-width: 900px) { .mini { left: 248px; right: 16px; bottom: 16px; max-width: 1100px; margin: 0 auto; } }

/* ---------- full player ---------- */
.player { position: fixed; inset: 0; z-index: 40; overflow-y: auto; padding: 12px 20px calc(24px + var(--safe-b));
  background: linear-gradient(180deg, var(--pc, #1e3a5f) 0%, var(--bg) 70%); animation: up .28s ease-out; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.player-top { display: flex; align-items: center; justify-content: space-between; max-width: 1000px; margin: 0 auto; }
.player-ctx { text-align: center; font-size: 13px; font-weight: 700; } .player-ctx small { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text2); font-weight: 600; }
.player-body { max-width: 440px; margin: 16px auto 0; display: grid; gap: 22px; }
.player-art .cover { border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.player-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.player-head h2 { font: 600 24px var(--serif); } .player-head p { color: var(--text2); }
@media (min-width: 900px) { .player-body { max-width: 1000px; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; margin-top: 40px; } }
input[type=range] { width: 100%; height: 24px; accent-color: var(--gold); margin: 0; }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums; }
.preview-tag { color: var(--gold); font-weight: 700; }
.controls { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 22px; }
.play-lg { width: 68px; height: 68px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; }
.play-lg svg { width: 32px; height: 32px; fill: currentColor; }

/* ---------- sheet + toast ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 520px; max-height: 85dvh; overflow-y: auto; background: var(--bg2); border-radius: 20px 20px 0 0; padding: 20px 20px calc(20px + var(--safe-b)); animation: up .22s ease-out; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 20px; } }
.sheet h2 { font: 600 20px var(--serif); margin-bottom: 12px; }
.sheet-list { list-style: none; margin: 0 0 12px; padding: 0; }
.sheet-list button { width: 100%; text-align: left; padding: 12px 6px; border-radius: 8px; display: flex; gap: 12px; align-items: center; }
.sheet-list button:hover { background: var(--card); }
.field { display: grid; gap: 6px; margin-bottom: 12px; } .field input { height: 46px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 0 12px; font: inherit; font-size: 16px; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.fake-card { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; color: var(--text2); font-size: 14px; margin: 12px 0; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--nav-h) + var(--mini-h) + 24px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; transition: .25s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
