/* reetu taas.. — values from design/handoff/README.md */

@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(../../fonts/archivo-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: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(../../fonts/archivo-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; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 200 900; font-display: swap; src: url(../../fonts/unbounded-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: 'Unbounded'; font-style: normal; font-weight: 200 900; font-display: swap; src: url(../../fonts/unbounded-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: #0d0e10; --ink: #ecebe6; --dim: #8f8d87; --rule: #2a2a28; --btn: #4a4a47; --chip: #3a3a38; --paper: #121316;
  --body: 'Archivo', system-ui, sans-serif;
  --disp: 'Unbounded', sans-serif;
  --sp: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sleeve: min(82cqw, 480px);
  --read-w: 680px; /* the reading column incl. its 20px side padding; app.js READ_W matches */
  color-scheme: dark;
}

html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 1px solid var(--dim); outline-offset: 2px; }

.app {
  position: fixed; inset: 0; overflow: hidden; background: var(--bg); color: var(--ink);
  container-type: inline-size;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.app.boot, .app.boot * { transition: none !important; }

/* A song's palette colour arrives as --c; the derived tints are mixed where it is set. */
.tone {
  --back: color-mix(in oklch, var(--paper) 86%, var(--c));
  --peek: color-mix(in oklch, var(--paper) 88%, var(--c));
  --sleeve-bg: var(--c);
}
.tone.derived { --sleeve-bg: var(--back); }

/* Artwork: fills the box, or a stamp of the parent artwork on derived sleeves. */
.art { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.art.stamp { left: 56%; top: 56%; width: 32%; height: 32%; border-radius: 3px; }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- lyric lines (sheet and sleeve back) ---------- */

.sec { margin-bottom: var(--gap); }
.ln { color: var(--ink); text-wrap: pretty; touch-action: pan-y; -webkit-touch-callout: none; }
.v { font-family: var(--body); font-size: var(--vs); font-weight: var(--vw); line-height: var(--lh); letter-spacing: var(--ls); font-variation-settings: 'wdth' var(--wd); }
.c { font-family: var(--disp); font-size: var(--cs); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; }
.ln.v2 { color: var(--dim); }
.ann { text-decoration-line: underline; text-decoration-style: dotted; text-decoration-thickness: 1px; text-decoration-color: var(--dim); text-underline-offset: 0.16em; cursor: pointer; }
.note { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 200ms ease-out; }
.note.open { grid-template-rows: 1fr; }
.note > div { min-height: 0; overflow: hidden; }
.note-text { font-family: var(--body); font-style: normal; font-size: 14px; line-height: 1.45; font-weight: 400; letter-spacing: 0; font-variation-settings: 'wdth' 100; color: var(--dim); padding: 6px 0 12px; max-width: 34ch; }

/* Line reveal (only with JS): fade in once; the first 12 lines also widen to the feel's width. */
.js .ly .ln { opacity: 0; transition: opacity 250ms ease-out var(--d, 0ms); }
.js .ly .ln.t { transition: opacity 250ms ease-out var(--d, 0ms), font-variation-settings 420ms ease-out var(--d, 0ms); }
.js .ly .ln.t.v { font-variation-settings: 'wdth' var(--wd0); }
.js .ly .ln.on { opacity: 1; }
.js .ly .ln.t.v.on { font-variation-settings: 'wdth' var(--wd); }
.reduced .ly .ln { transition: none !important; }

/* ---------- the sheet (reading page) ---------- */

.sheet {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; box-sizing: border-box; z-index: 0;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  background-color: var(--paper); visibility: hidden;
}
.sheet::-webkit-scrollbar { display: none; }
html:not(.js) .app[data-view="reading"] .sheet { visibility: visible; }
html:not(.js) .app[data-view="reading"] .crate { display: none; }
.anim .sheet {
  transition: left 420ms var(--ease), top 420ms var(--ease), width 420ms var(--ease), height 420ms var(--ease), border-radius 420ms var(--ease), background-color 420ms linear;
}
/* The reading column is centred on wide screens; text inside stays left-aligned. */
.sheet-head, .sheet-body { max-width: var(--read-w); margin: 0 auto; box-sizing: border-box; }
.sheet-head { display: flex; align-items: center; gap: 14px; padding: calc(var(--sp) + 10px) 20px 0 20px; }
.thumb { display: block; width: 44px; height: 44px; border-radius: 6px; background: var(--sleeve-bg); position: relative; overflow: hidden; flex: none; }
.head-text { min-width: 0; }
.sheet-title { margin: 0; font-family: var(--disp); font-size: 24px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.anchor-sheet { letter-spacing: 0; }
.js .anchor-sheet { visibility: hidden; }
.sheet-meta { font-size: 13px; color: var(--dim); margin-top: 3px; }
.sheet-body { padding: 40px 20px 120px; box-sizing: border-box; }
.col { max-width: max(72cqw, min(100%, 460px)); }

.foot { margin-top: 40px; display: flex; flex-direction: column; gap: 28px; font-size: 14px; line-height: 1.4; color: var(--dim); }
.pill { display: inline-block; padding: 10px 14px; border: 1px solid var(--btn); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink); }
.next { display: flex; align-items: center; gap: 14px; cursor: pointer; padding-top: 28px; border-top: 1px solid var(--rule); }
.next-thumb { width: 56px; height: 56px; border-radius: 4px; background: var(--sleeve-bg); flex: none; overflow: hidden; position: relative; }
.next-label { font-size: 12px; }
.next-title { font-family: var(--disp); font-size: 22px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); margin-top: 2px; }

/* Lyric waveform: one tick per section, fixed top-right of the reading page. */
.wave { position: absolute; right: 20px; top: calc(var(--sp) + 20px); height: 200px; width: 24px; z-index: 1; opacity: 0; pointer-events: none; transition: opacity 150ms linear; }
.wave.on { opacity: 1; pointer-events: auto; }
.wave-hit { position: absolute; left: -28px; right: -18px; top: -12px; bottom: -12px; cursor: grab; touch-action: none; }
.vscrubbing .wave-hit { cursor: grabbing; }
.ticks { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; pointer-events: none; }
.tick { min-height: 2px; border-radius: 1px; background-color: var(--rule); transition: background-color 220ms linear; }
.wave-dots { position: absolute; right: 30px; top: -9px; font-family: var(--disp); font-size: 14px; font-weight: 500; line-height: 1; letter-spacing: 0; color: var(--ink); transition: top 160ms ease-out; pointer-events: none; }

/* ---------- the crate (home) ---------- */

.crate { position: absolute; inset: 0; display: flex; flex-direction: column; z-index: 1; transition: opacity 200ms linear; }
.is-unfolded .crate { pointer-events: none; }
.js.loading .crate, .js.loading .sheet, .js.loading .wave { opacity: 0 !important; }
.tint { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 24px; background-color: transparent; opacity: 0.16; filter: blur(48px); transition: background-color 300ms linear, opacity 150ms linear; pointer-events: none; }
.is-unfolded .tint { opacity: 0; }

.topbar { position: relative; display: flex; align-items: center; justify-content: space-between; padding: var(--sp) 20px 0; height: 52px; flex: none; }
.crate .topbar, .caption { transition: opacity 150ms linear; }
.is-unfolded .crate .topbar, .is-unfolded .caption { opacity: 0; }
.mark { font-family: var(--disp); font-size: 19px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.mark-dots { letter-spacing: 0; }
.icons { display: flex; gap: 2px; margin-right: -11px; }
.icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer; }
.icon svg { fill: none; stroke: currentColor; stroke-width: 1.25px; stroke-linecap: round; }
.icon.close { margin-right: -11px; }

.stage { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding-bottom: 24px; position: relative; min-height: 0; }
.row {
  /* On phones neighbours peek 12px at the edges; on wide screens the gap caps at 64px so they're easy to click. */
  --gap: min(calc((100cqw - var(--sleeve)) / 2 - 12px), 64px);
  display: flex; align-items: flex-start; gap: var(--gap);
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding: 28px 0;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.row::-webkit-scrollbar { display: none; }
.scrubbing .row { scroll-snap-type: none; }
/* spacer + gap = the side padding, so the first and last sleeve can be centred */
.spacer { flex: 0 0 calc((100cqw - var(--sleeve)) / 2 - var(--gap)); height: 1px; }

.sleeve { flex: 0 0 var(--sleeve); aspect-ratio: 1; scroll-snap-align: center; scroll-snap-stop: always; perspective: 1200px; position: relative; cursor: pointer; transition: transform 220ms ease-in, opacity 150ms linear, --lift 150ms ease-out; }
/* Away from the centre a sleeve loses its colour, then its light: colour belongs to the record in hand.
   --d (0 centred … 1 a full step away) follows the scroll; hovering lifts a neighbour halfway back. */
@property --lift { syntax: '<number>'; inherits: true; initial-value: 1; }
.sleeve.dim .front { filter: saturate(calc(1 - 0.8 * var(--d) * var(--lift))) brightness(calc(1 - 0.55 * var(--d) * var(--lift))); }
@media (hover: hover) { .sleeve.dim:hover { --lift: 0.5; } }
.peek { position: absolute; left: 8px; right: 8px; top: -3px; height: 8px; border-radius: 2px 2px 0 0; background: var(--peek); opacity: 0; transition: opacity 300ms linear; }
.card { position: absolute; inset: 0; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: transform 600ms ease-in-out, opacity 100ms linear; }
.face { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: opacity 300ms linear; }
.front { display: block; background: var(--sleeve-bg); transform: rotateY(0deg); -webkit-touch-callout: none; }
.label { position: absolute; left: 8px; bottom: 10px; font-size: 11px; font-weight: 500; letter-spacing: 0.02em; line-height: 1.2; color: var(--ink); padding: 3px 6px; border-radius: 3px; white-space: nowrap; }
.cover-title { position: absolute; left: 14px; top: 12px; right: 14px; font-family: var(--disp); font-size: clamp(22px, 8.5cqw, 44px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; color: var(--ink); text-wrap: balance; overflow-wrap: anywhere; }
.back { background: var(--back); transform: rotateY(180deg); padding: 20px; box-sizing: border-box; }
.back-title { font-family: var(--disp); font-size: 24px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 24px; }
/* The back starts in plain type and tunes to the song's feel as it comes round. */
.back .v { font-size: var(--p-vs); font-weight: var(--p-vw); line-height: var(--p-lh); letter-spacing: var(--p-ls); font-variation-settings: 'wdth' var(--p-wd); }
.is-tuned .sleeve.active .back .v { font-size: var(--vs); font-weight: var(--vw); line-height: var(--lh); letter-spacing: var(--ls); font-variation-settings: 'wdth' var(--wd); }
.anim .back .ln { transition: font-variation-settings 700ms ease-out, font-weight 700ms ease-out, letter-spacing 700ms ease-out, line-height 700ms ease-out, font-size 700ms ease-out; }
.anchor-back { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); font-family: var(--disp); font-size: 26px; font-weight: 500; line-height: 1; letter-spacing: 0; visibility: hidden; }
.back .pill { position: absolute; right: 16px; bottom: 16px; padding: 8px 12px; line-height: normal; letter-spacing: 0; font-variation-settings: 'wdth' 100; background: var(--back); }

.is-back .sleeve.active .card { transform: rotateY(180deg); }
.is-back:not(.is-busy) .sleeve.active .peek { opacity: 1; }
.is-busy .peek { transition: none; }
.is-busy .sleeve.active .card { opacity: 0; }
.is-unfolded .sleeve:not(.active) { opacity: 0; }
.is-unfolded:not(.reduced) .sleeve.before { transform: translateX(-40px); }
.is-unfolded:not(.reduced) .sleeve.after { transform: translateX(40px); }
/* Reduced motion: the flip is a crossfade. */
.reduced .card, .reduced .back { transform: none !important; }
.reduced .back { opacity: 0; }
.reduced.is-back .sleeve.active .back { opacity: 1; }
.reduced.is-back .sleeve.active .front { opacity: 0; }

.caption { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 20px; }
.cap-text { text-align: center; line-height: 1.3; }
.cap-title { font-family: var(--disp); font-size: 17px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); }
.cap-meta { font-size: 13px; color: var(--dim); margin-top: 4px; }
.track { position: relative; height: 1px; background: var(--rule); width: var(--sleeve); margin-top: 4px; }
.track-hit { position: absolute; left: -12px; right: -12px; top: -22px; height: 44px; cursor: grab; touch-action: none; }
.scrubbing .track-hit { cursor: grabbing; }
.anchor-pager { position: absolute; left: 0; top: 50%; transform: translate(-50%, -76%); font-family: var(--disp); font-size: 22px; font-weight: 500; line-height: 1; letter-spacing: 0; visibility: hidden; }
.hints { font-size: 13px; color: var(--dim); min-height: 18px; opacity: 0; transition: opacity 300ms linear; }
.hints.on { opacity: 1; }

/* Gesture ghosts, played once each until the gesture is learned. */
.gh { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; }
.gh-tap { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--ink); box-sizing: border-box; transform: translate(-50%, -50%) scale(0.5); }
.gh-swipe { height: 1px; background: var(--ink); transform-origin: right center; transform: scaleX(0); }
.gh-pull { width: 1px; height: 80px; background: var(--ink); transform-origin: center bottom; transform: scaleY(0); }

/* The sleeve that flies into the thumbnail while the sheet unfolds. */
.ghost { position: absolute; left: 0; top: 0; width: 0; height: 0; perspective: 1200px; visibility: hidden; z-index: 2; pointer-events: none; }
.ghost-card { position: absolute; inset: 0; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transform: rotateY(180deg); }
.ghost-front, .ghost-back { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ghost-front { background: var(--sleeve-bg); transform: rotateY(0deg); }
.ghost-back { background: var(--back); transform: rotateY(180deg); }
.anim .ghost { transition: left 420ms var(--ease), top 420ms var(--ease), width 420ms var(--ease), height 420ms var(--ease); }
.anim .ghost-card { transition: transform 420ms var(--ease); }
.anim .ghost-front, .anim .ghost-back { transition: border-radius 420ms var(--ease); }
/* Collapse runs the same timings eased in. */
.collapsing { --ease: cubic-bezier(0.8, 0, 0.8, 0.3); }

/* The '..': one object that travels between its homes. */
.dots { position: absolute; left: 0; top: 0; font-family: var(--disp); font-size: 48px; font-weight: 500; line-height: 1; letter-spacing: 0; color: var(--ink); z-index: 3; pointer-events: none; visibility: hidden; }
.anim .dots { transition: transform 450ms cubic-bezier(0.3, 0.7, 0.2, 1), font-size 450ms cubic-bezier(0.3, 0.7, 0.2, 1); }
.anim.collapsing .dots { transition-timing-function: cubic-bezier(0.7, 0, 0.8, 0.3); }
.scrubbing .dots { transition: none; }

/* ---------- list + search ---------- */

.list { position: absolute; inset: 0; z-index: 4; background: var(--bg); display: flex; flex-direction: column; visibility: hidden; opacity: 0; transition: opacity 150ms linear, visibility 0s linear 150ms; }
.list-open .list { visibility: visible; opacity: 1; transition: opacity 150ms linear; }
/* On wide screens the list sits in the same centred column as the lyrics. */
.list { --side: max(20px, calc((100% - var(--read-w)) / 2 + 20px)); }
.list .topbar { padding-left: var(--side); padding-right: var(--side); }
.search-wrap { padding: 8px var(--side) 0; flex: none; }
.search {
  display: block; width: 100%; box-sizing: border-box; background: none; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0;
  padding: 12px 0; margin: 0; font: inherit; font-size: 17px; color: var(--ink); outline: none;
  -webkit-appearance: none; appearance: none; user-select: text; -webkit-user-select: text;
}
.search::placeholder { color: var(--dim); opacity: 1; }
.search::-webkit-search-cancel-button, .search::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.chips { display: flex; gap: 8px; padding: 16px 0 8px; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--chip); background: transparent; color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.items { flex: 1; min-height: 0; overflow-y: auto; padding: 0 var(--side) 40px; scrollbar-width: none; overscroll-behavior: contain; }
.items::-webkit-scrollbar { display: none; }
.item { display: grid; grid-template-columns: minmax(0, 1fr); align-items: baseline; padding: 14px 0; border-top: 1px solid var(--rule); cursor: pointer; }
.item[hidden] { display: none; }
.item-title { font-family: var(--disp); font-size: 21px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.item-meta { font-size: 13px; color: var(--dim); grid-column: 1 / -1; margin-top: 2px; }
.item-snip { font-size: 13px; color: var(--dim); grid-column: 1 / -1; margin-top: 4px; font-style: italic; }
.item-snip:empty { display: none; }
.items-end { border-top: 1px solid var(--rule); }

/* ---------- share card ---------- */

.share { position: absolute; inset: 0; z-index: 5; background: rgba(13, 14, 16, 0.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 20px; visibility: hidden; opacity: 0; transition: opacity 150ms linear, visibility 0s linear 150ms; }
.share-open .share { visibility: visible; opacity: 1; transition: opacity 150ms linear; }
.share-label { font-size: 13px; color: var(--dim); }
.share-card { width: min(80cqw, 360px); aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; position: relative; background: var(--c); color: var(--share-ink, var(--ink)); padding: 22px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; flex: none; }
.sc-title { font-family: var(--disp); font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.sc-line { font-family: var(--disp); font-size: var(--cs); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; text-wrap: pretty; max-width: 90%; padding-bottom: 22%; position: relative; z-index: 1; }
.sc-brand { font-family: var(--disp); font-size: 16px; font-weight: 500; letter-spacing: -0.02em; position: relative; z-index: 1; }
/* The artist's silhouette: one mask (public/silhouette.webp), coloured per share from the song's palette. */
.sil {
  position: absolute; bottom: 0; right: 4%; width: 40%; aspect-ratio: 1 / 1.5; background-color: var(--sil, #000);
  -webkit-mask: url(../../silhouette.webp) bottom / 100% auto no-repeat; mask: url(../../silhouette.webp) bottom / 100% auto no-repeat;
}
.share-btns { display: flex; gap: 10px; }
.btn { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--btn); background: none; color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer; }

.feel-tight{--vs:28px;--vw:480;--lh:1.12;--ls:-0.015em;--wd:68;--wd0:62;--cs:33px;--gap:31px}
.feel-wide{--vs:24px;--vw:350;--lh:1.55;--ls:0.03em;--wd:120;--wd0:108;--cs:28px;--gap:37px}
.feel-warm{--vs:26px;--vw:580;--lh:1.6;--ls:0.005em;--wd:104;--wd0:92;--cs:30px;--gap:42px}
.feel-plain{--vs:26px;--vw:400;--lh:1.35;--ls:0;--wd:100;--wd0:88;--cs:30px;--gap:35px}
:root{--p-vs:26px;--p-vw:400;--p-lh:1.35;--p-ls:0;--p-wd:100}
