@property --song { syntax: '<color>'; inherits: true; initial-value: #e8590c; }

/* Plus Jakarta Sans (SIL Open Font License), self-hosted */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/plus-jakarta-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/plus-jakarta-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f6f6f3; --panel: #ffffff; --ink: #1d1f22; --muted: #6c7178; --line: #e3e3de;
  --accent: #e8590c; --on-accent: #fff; --soft: #f1f0ec; --chip: #eceae4;
  --ok: #2b8a3e; --bad: #c92a2a;
  --sh: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.07);
  --tintA: 15%; --song: #e8590c; --on-song: #fff;
  --song-ink: color-mix(in srgb, var(--song) 70%, #000);
  --song-soft: color-mix(in srgb, var(--song) 18%, var(--panel));
  color-scheme: light;
  transition: --song .5s ease;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141518; --panel: #1c1e22; --ink: #e8e8e6; --muted: #959aa1; --line: #2c2f35;
    --accent: #ff7a2f; --soft: #23262b; --chip: #2a2d33; --ok: #51cf66; --bad: #ff6b6b;
    --sh: 0 1px 2px rgba(0,0,0,.3); --tintA: 24%;
    --song-ink: color-mix(in srgb, var(--song) 60%, #fff);
    --song-soft: color-mix(in srgb, var(--song) 26%, var(--panel));
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141518; --panel: #1c1e22; --ink: #e8e8e6; --muted: #959aa1; --line: #2c2f35;
  --accent: #ff7a2f; --soft: #23262b; --chip: #2a2d33; --ok: #51cf66; --bad: #ff6b6b;
  --sh: 0 1px 2px rgba(0,0,0,.3); --tintA: 24%;
  --song-ink: color-mix(in srgb, var(--song) 60%, #fff);
  --song-soft: color-mix(in srgb, var(--song) 26%, var(--panel));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 9px 14px; }
button:disabled { opacity: .4; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
button.ghost { background: none; border-color: transparent; }
button.danger { color: var(--bad); }
input, textarea, select { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; }
input:focus-visible, textarea:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=range] { padding: 0; border: 0; background: none; accent-color: var(--accent); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
a { color: var(--accent); }
h1 { font-size: 24px; font-weight: 800; margin: 0; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: 16px; font-weight: 700; margin: 22px 0 10px; letter-spacing: -.01em; }
.tagline { font-size: 15px; font-weight: 700; color: var(--accent); margin-top: 0; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.tagline .ic { width: 18px; height: 18px; }
.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; flex: none; }
.cl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- shell */
#app { position: fixed; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
#views { position: relative; min-height: 0; }
.view { position: absolute; inset: 0; display: none; }
.view.on { display: grid; }
.view.scroll { overflow-y: auto; overscroll-behavior: contain; padding: calc(env(safe-area-inset-top) + 14px) 16px 32px; }
.view.scroll.on { display: block; }
.view.scroll > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.tint {
  /* the song's colour glows at the top and fades to the normal background behind the text */
  --tint-top: color-mix(in srgb, var(--song) calc(var(--tintA) * var(--tint-scale, 1)), var(--bg));
  background: var(--bg) linear-gradient(180deg, var(--tint-top) 0%, var(--tint-top) 12%, var(--bg) 62%);
  --muted: #565b62;        /* stronger secondary text on song-coloured screens */
}
#tabs { display: flex; justify-content: space-around; background: var(--panel); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
#tabs button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 18px; }
#tabs button .ic { width: 22px; height: 22px; }
#tabs button.on { color: var(--accent); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 8px; }
.bar .ttl { font-weight: 600; text-align: center; min-width: 0; }
.pill { border-radius: 99px; padding: 6px 13px; font-size: 13px; background: var(--panel); }
.icon-btn { border: 0; background: none; padding: 8px; border-radius: 50%; color: var(--muted); }
.icon-btn .ic { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- swipe deck (never scrolls) */
#v-discover { grid-template-rows: auto minmax(0, 1fr); padding-top: env(safe-area-inset-top); }
.deckroot { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
.deck { position: relative; min-height: 0; display: grid; place-items: center; margin: 0 16px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.card { grid-area: 1 / 1; width: min(100%, 460px, calc(var(--dh, 520px) - 132px)); min-width: 160px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--sh); overflow: hidden;
  display: flex; flex-direction: column; will-change: transform; cursor: grab; }
.card:active { cursor: grabbing; }
.card.b1 { transform: scale(.95) translateY(12px); filter: brightness(.97); pointer-events: none; }
.card.b2 { transform: scale(.9) translateY(24px); filter: brightness(.94); pointer-events: none; }
.card.top { z-index: 2; }
.card.from-right { animation: inR .3s ease-out; }
.card.from-left { animation: inL .3s ease-out; }
@keyframes inR { from { transform: translate(120%, 0) rotate(16deg); opacity: 0; } }
@keyframes inL { from { transform: translate(-120%, 0) rotate(-16deg); opacity: 0; } }
.cov { position: relative; aspect-ratio: 1; background: var(--chip); overflow: hidden; }
.cov img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.stamp { position: absolute; top: 18px; padding: 3px 12px; border: 3px solid; border-radius: 10px; font-weight: 800; font-size: 22px; letter-spacing: .04em;
  background: rgba(255,255,255,.92); opacity: 0; pointer-events: none; }
.stamp.yes { left: 18px; color: #2b8a3e; transform: rotate(-12deg); }
.stamp.no { right: 18px; color: #c92a2a; transform: rotate(12deg); }
.tag { position: absolute; top: 12px; right: 12px; background: var(--panel); color: var(--song-ink); border-radius: 99px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.pp { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.45); color: #fff; transition: opacity .2s; }
.card.playing .pp { opacity: .55; }
.info { padding: 12px 15px 14px; }
.info .t { font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.info .a { color: var(--muted); font-size: 14px; }
.why { display: inline-flex; max-width: 100%; align-items: center; gap: 5px; margin-top: 7px; background: var(--song-soft); color: var(--song-ink); border-radius: 99px; padding: 3px 10px; font-size: 12px; }
.why span { overflow: hidden; text-overflow: ellipsis; }
.prog { height: 4px; background: var(--chip); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--song); border-radius: 2px; transition: width .25s linear; }
.card.ghost { cursor: default; }
.shimmer { animation: shim 1.2s ease-in-out infinite alternate; }
@keyframes shim { to { opacity: .5; } }
.empty { text-align: center; color: var(--muted); max-width: 320px; padding: 20px; }
.empty b { color: var(--ink); display: block; font-size: 17px; margin-bottom: 6px; }
.empty .row { justify-content: center; margin-top: 14px; }
.acts { display: flex; justify-content: center; align-items: flex-start; gap: 20px; padding: 12px 0 14px; }
.nodeck .acts { visibility: hidden; }
.act { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.albl { font-size: 11px; color: var(--muted); display: none; }
.labels .albl { display: block; }
.rb { border-radius: 50%; display: grid; place-items: center; padding: 0; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--sh); transition: transform .1s, background .5s, color .5s; }
.rb:active { transform: scale(.92); }
.rb.big { width: 60px; height: 60px; } .rb.big .ic { width: 28px; height: 28px; }
.rb.sm { width: 44px; height: 44px; margin-top: 8px; color: var(--muted); } .rb.sm .ic { width: 20px; height: 20px; }
.rb.no { color: var(--bad); }
.rb.go { background: var(--song); border-color: var(--song); color: var(--on-song); }
.builder .rb.no { color: var(--muted); }

/* short or landscape screens: tighter info so the cover keeps its space */
@media (max-height: 640px) {
  .card { width: min(100%, 460px, calc(var(--dh, 400px) - 108px)); border-radius: 20px; }
  .info { padding: 9px 12px 11px; } .info .t { font-size: 15px; } .why { display: none; }
  .acts { padding: 8px 0 10px; } .rb.big { width: 52px; height: 52px; }
  .bar { padding-top: 8px; padding-bottom: 4px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .deckroot { grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr) auto; }
  .acts { flex-direction: column; padding: 0 16px; justify-content: center; gap: 10px; }
}

/* ---------------------------------------------------------------- pages and sheets */
#layer > .page { position: fixed; inset: 0; z-index: 20; background: var(--bg); display: grid; grid-template-rows: auto minmax(0, 1fr); padding-top: env(safe-area-inset-top); animation: up .25s ease-out; }
#layer > .page.tint { background: var(--bg) linear-gradient(180deg, var(--tint-top) 0%, var(--tint-top) 12%, var(--bg) 62%); }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.page .body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px calc(28px + env(safe-area-inset-bottom)); }
.page .body > * { max-width: 720px; margin-left: auto; margin-right: auto; }
#layer > .page.builder { grid-template-rows: auto auto minmax(0, 1fr); }
.page.builder .deckroot { padding-bottom: env(safe-area-inset-bottom); }
.bprog { padding: 0 16px 10px; font-size: 13px; color: var(--muted); }
.bprog .prog { margin-top: 6px; }
.bprog .prog i { transition: width .3s; }
.sheet-bg { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--panel); width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); animation: up .25s ease-out; }
.sheet::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 22px; } }

/* ---------------------------------------------------------------- lists, tiles, chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--chip); color: var(--muted); border: 0; border-radius: 99px; padding: 6px 12px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--accent); color: var(--on-accent); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--chip); border-radius: 13px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; border-radius: 10px; padding: 9px 4px; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--sh); }
.lbl { font-size: 13px; font-weight: 600; color: var(--muted); margin: 16px 0 7px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.tile { border: 0; background: none; padding: 0; text-align: left; border-radius: 14px; }
.tile .mos { aspect-ratio: 1; border-radius: 14px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; background: var(--chip); box-shadow: var(--sh); }
.tile .mos.one { grid-template-columns: 1fr; }
.tile .mos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .mos .ph { display: grid; place-items: center; color: var(--muted); grid-column: 1 / -1; }
.tile .mos .ph .ic { width: 36px; height: 36px; }
.tile .nm { font-weight: 600; margin-top: 7px; }
.tile .ct { font-size: 12px; color: var(--muted); }
.tile.add .mos { border: 2px dashed var(--line); box-shadow: none; background: none; }
.tracks { list-style: none; padding: 0; margin: 0; }
.trk { display: flex; align-items: center; gap: 11px; padding: 7px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.trk:last-child { border-bottom: 0; }
.trk img, .trk .art { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; flex: none; background: var(--chip); }
.trk .t { font-weight: 500; } .trk .a { font-size: 13px; color: var(--muted); }
.trk .badge { font-size: 11px; color: var(--song-ink); }
.trk.now .t { color: var(--accent); }
.trk button { border: 0; background: none; padding: 8px; color: var(--muted); border-radius: 50%; }
.phead { display: flex; gap: 16px; align-items: flex-end; margin: 8px auto 14px; }
.phead .mos { width: 112px; height: 112px; flex: none; border-radius: 16px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; background: var(--chip); box-shadow: var(--sh); }
.phead .mos.one { grid-template-columns: 1fr; }
.phead .mos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phead .mos .ph { display: grid; place-items: center; color: var(--muted); grid-column: 1 / -1; }
.phead h1 { font-size: 22px; word-break: break-word; }
.pacts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.play-big { width: 50px; height: 50px; border-radius: 50%; padding: 0; display: grid; place-items: center; background: var(--accent); border: 0; color: var(--on-accent); }
.play-big .ic { width: 24px; height: 24px; }
.card-box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--sh); margin-bottom: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.stat b { display: block; font-size: 22px; } .stat span { font-size: 12px; color: var(--muted); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting select { width: auto; }
.btn-list { display: grid; gap: 8px; }
.btn-list button { display: flex; align-items: center; gap: 10px; text-align: left; }

/* track sheet */
.tsheet .hero { display: flex; gap: 14px; align-items: center; }
.tsheet .hero img { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; box-shadow: var(--sh); }
.tsheet .hero .t { font-size: 18px; font-weight: 600; }
.plat { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.plat a { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-decoration: none; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; font-weight: 500; font-size: 14px; }
.plat a .ic { color: var(--muted); width: 16px; height: 16px; }
.plat a.wide { grid-column: 1 / -1; }
.disclose { font-size: 11px; color: var(--muted); margin-top: 10px; }

/* onboarding */
.ob-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 10px; margin-top: 14px; }
.ob-art { border: 0; background: none; padding: 0; text-align: center; position: relative; }
.ob-art img, .ob-art .art { width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: var(--chip); display: block; transition: transform .15s; border: 3px solid transparent; }
.ob-art.trk-r img { border-radius: 14px; }
.ob-art.on img { border-color: var(--accent); transform: scale(.94); }
.ob-art .tick { position: absolute; top: 2px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: none; place-items: center; }
.ob-art.on .tick { display: grid; }
.ob-art .nm { font-size: 13px; font-weight: 500; margin-top: 6px; }
.ob-art .sub { font-size: 11px; color: var(--muted); }
.ob-foot { position: sticky; bottom: 0; padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.ob-foot button { width: 100%; padding: 14px; font-size: 16px; border-radius: 16px; }
.searchbox { position: relative; }
.searchbox .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbox input { padding-left: 40px; }
.pbar { height: 6px; background: var(--chip); border-radius: 3px; overflow: hidden; margin: 10px 0; }
.pbar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

.ob-alt { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 14px 0 16px; }
.ob-alt button { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--panel); box-shadow: var(--sh); }
.ob-alt button > .ic { width: 22px; height: 22px; color: var(--accent); }
.ob-alt b { display: block; font-size: 15px; }
.ob-alt small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.offer h2 { font-size: 22px; font-weight: 800; margin: 8px 0 8px; letter-spacing: -.02em; }
.offer p { margin: 0 0 10px; }
.offer-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.offer-ic .ic { width: 28px; height: 28px; }
.open-app { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 4px; padding: 13px; border-radius: 14px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 16px; text-decoration: none; }
.open-app .ic { width: 18px; height: 18px; }
.open-app.done { background: var(--chip); color: var(--ink); }
.opt { border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-top: 12px; background: var(--soft); }
.opt-h { display: flex; align-items: center; gap: 10px; }
.opt-h .num { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.opt p { margin: 6px 0 10px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.steps li::marker { color: var(--muted); font-weight: 700; }
.btnlink { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 9px 14px; color: var(--ink); text-decoration: none; }
.btnlink .ic { width: 16px; height: 16px; }
.stepper { max-width: 420px !important; }
.step-cover { display: block; width: min(100%, 300px); aspect-ratio: 1; object-fit: cover; border-radius: 20px; margin: 12px auto; box-shadow: var(--sh); }
.step-t { font-size: 20px; font-weight: 800; text-align: center; letter-spacing: -.01em; }
.inst-ic { width: 64px; height: 64px; border-radius: 15px; box-shadow: var(--sh); display: block; }
.ic.inl { width: 18px; height: 18px; vertical-align: -3px; color: var(--accent); }
.steps.inst { margin: 4px 0 12px; gap: 12px; }
.steps.inst .tbox { margin-top: 8px; }
.ob-alt button.lead { border: 2px solid var(--accent); }
.qr { width: 220px; max-width: 70vw; margin: 6px auto; background: #fff; border-radius: 14px; padding: 6px; }
.qr svg { display: block; width: 100%; height: auto; }
.bigcode { text-align: center; font: 600 30px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .14em; margin: 10px 0 2px; }

#toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100% - 32px); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

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

/* full-song player (YouTube). YouTube asks for the player to stay visible and at least 200 x 200 px */
.fp { max-width: 560px !important; }
.fp-media { position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 200px; border-radius: 18px; overflow: hidden; background: #000; box-shadow: var(--sh); margin-top: 4px; }
.fp-yt, .fp-yt iframe, #fp-yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fp-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.fp-msg { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(0,0,0,.72); color: #fff; font-size: 13px; padding: 8px 12px; border-radius: 10px; text-align: center; pointer-events: none; }
.fp-t { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin-top: 14px; }
.fp-a { font-size: 15px; }
.fp-time { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 12px; }
.fp-time .prog { margin: 0; }
.fp-ctl { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 12px; }
.fp-ctl .rb.sm { margin-top: 0; }
.fp-over { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--on-accent); border: 0; border-radius: 99px; padding: 12px 20px; font-weight: 700; font-size: 16px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.fp-over .ic { width: 20px; height: 20px; }

/* dark mode: lighter secondary text where the song colour shows */
:root[data-theme="dark"] .tint { --muted: #c5c8cd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tint { --muted: #c5c8cd; } }
.fp-a, .fp-time { font-weight: 500; }

/* player actions as pill buttons (bigger tap targets, neutral colours) */
.fp-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.fp-actions a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 99px; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: 13px; background: color-mix(in srgb, var(--ink) 9%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.fp-actions a .ic { width: 16px; height: 16px; color: var(--ink); }
.fp-actions a.on .ic { color: var(--accent); }
.fp-actions { flex-wrap: nowrap; }
.fp-actions a { white-space: nowrap; }
.fp-actions a.icon-only { padding: 8px 12px; }
.fp-actions a.icon-only .ic { width: 20px; height: 20px; }
.fp-actions a.on .ic { fill: var(--accent); stroke: var(--accent); }

/* sponsored cards in the deck */
.card.ad .adcov { background: var(--ad); display: grid; place-items: center; }
.card.ad .adart { width: 42%; aspect-ratio: 1; border-radius: 28%; background: rgba(255,255,255,.18); display: grid; place-items: center; color: #fff; }
.card.ad .adart .ic { width: 55%; height: 55%; stroke-width: 1.6; }
.card.ad .adtag { background: #1d1f22; color: #fff; letter-spacing: .02em; }
.card.ad .adtext { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.card.ad .ad-cta { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; padding: 10px; border-radius: 12px;
  background: var(--ad); color: #fff; font-weight: 700; text-decoration: none; }
.card.ad .ad-cta .ic { width: 16px; height: 16px; }
.card.ad .adnote { font-size: 10.5px; color: var(--muted); margin-top: 6px; line-height: 1.3; }
.card.ad .stamp.yes { color: #1f6feb; }
.card.ad { width: min(100%, 460px, calc(var(--dh, 520px) - 190px)); }
@media (max-height: 640px) { .card.ad { width: min(100%, 460px, calc(var(--dh, 400px) - 170px)); } .card.ad .adnote { display: none; } }

/* Go ad-free */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 4px; }
.plan { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; position: relative; }
.plan b { font-size: 22px; } .plan span { font-size: 13px; color: var(--muted); }
.plan em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); }
.plan.best { border: 2px solid var(--accent); }
.agree { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13px; line-height: 1.4; cursor: pointer; }
.agree input { margin-top: 1px; flex: none; }
.agree.need { color: var(--bad); }
/* Go ad-free: options select, one big Pay button */
.plans { grid-template-columns: repeat(3, 1fr); }
.plan { border: 2px solid var(--line); background: var(--panel); transition: border-color .15s, background .15s; }
.plan.best { border-width: 2px; }
.plan.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.plan.wide { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; padding: 12px 14px; }
.plan.wide b { font-size: 15px; }
.custom-row { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ink) !important; font-size: 15px !important; }
.custom-row input { width: 64px; padding: 6px 8px; text-align: right; }
.custom-row i { font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); min-width: 64px; }
.pay { width: 100%; margin-top: 12px; padding: 15px; font-size: 17px; font-weight: 800; border-radius: 16px; }
.testnote { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 13px; background: color-mix(in srgb, #f0b400 18%, var(--panel)); border: 1px solid color-mix(in srgb, #f0b400 50%, transparent); }
code.acid { user-select: all; font-size: 13px; }
.card.ad .adtext { -webkit-line-clamp: 3; }
.card.ad { width: min(100%, 460px, calc(var(--dh, 520px) - 210px)); }
@media (max-height: 640px) { .card.ad { width: min(100%, 460px, calc(var(--dh, 400px) - 185px)); } }
/* first visit: sound is blocked until the first tap, so invite it */
.card.blocked .pp { opacity: 1; background: var(--accent); animation: ppPulse 1.4s ease-in-out infinite; }
@keyframes ppPulse { 50% { transform: scale(1.12); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 25%, transparent); } }
/* QR scanner in the link-code sheet */
.scanbox { margin-top: 10px; }
.scanwrap { position: relative; width: min(100%, 46dvh); margin: 0 auto; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #000; }
.scanvid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanframe { position: absolute; inset: 20%; border: 3px solid rgba(255,255,255,.9); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.28); pointer-events: none; }
/* Import: choose where your songs are */
.src-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.src-grid .chip { padding: 9px 14px; font-size: 14px; }
.src-body .steps { margin: 12px 0 4px; }
.fnames { margin: 8px 0 0; padding-left: 18px; }
