/* Mélo design tokens.
   Direction (from the design bracket, round 1 re-run): Colour field. The album's colour fills the Discover page; everything
   else is Graphite (dark) or white (light), with one green accent. Soft corners, flat (no shadows, no frames), outlined
   circle action buttons, soft filled genre chips, a thin-line player. Round 2 fixed three pieces: masking-tape "why this
   song", dot rows instead of every bar, and plain-word controls.
   Three colours each mean one thing: green = like, red = dislike, pink = super-like. */

/* Figtree (SIL Open Font License, see fonts/Figtree-OFL.txt): the closest free relative of Spotify's typefaces, which are
   private. Manrope stays as a fallback while Figtree loads. */
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-italic-latin-ext.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap;
  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: "Figtree"; src: url("../fonts/figtree-italic-latin.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap;
  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: "Figtree"; src: url("../fonts/figtree-normal-latin-ext.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap;
  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: "Figtree"; src: url("../fonts/figtree-normal-latin.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap;
  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: "Manrope"; src: url("../fonts/manrope-200-800.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #ffffff;
  --paper-2: #f0f0ee;    /* chips, hover */
  --paper-3: #e3e3df;
  --ink: #111111;
  --ink-2: #55554f;      /* secondary text: 7.5:1 on white */
  --ink-3: #64645e;      /* tertiary text: 6.0:1 on white, 4.6:1 on paper-3 */
  --line: #dcdcd8;
  --accent: #1fa35a;     /* like, primary buttons: always with black text on it (6.2:1) */
  --on-accent: #0b0b0b;
  --accent-ink: #13803f; /* green used as text: 5.0:1 on white */
  --dislike: #d23a2e;
  --on-dislike: #ffffff;
  --super: #cf2f6b;
  --on-super: #ffffff;
  --tint: var(--paper);  /* the cover's average colour, set on Discover */
  --tint-soft: var(--paper);

  --font-display: "Figtree", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: "Figtree", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Figtree", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --rule: 1.5px solid var(--line);
  --hair: 1px solid var(--line);
  --shadow: none;        /* flat */
  --shadow-sm: none;
  --radius: 12px;        /* soft */

  --gutter: clamp(18px, 4.5vw, 48px);
  --top-h: 60px;
  --tab-h: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* Graphite */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #181a1c; --paper-2: #2a2d30; --paper-3: #33373b;
  --ink: #ececea; --ink-2: #b8b8b2; --ink-3: #9e9e98; --line: #34383c;
  --accent: #1fa35a; --on-accent: #0b0b0b; --accent-ink: #2fc06e;
  --dislike: #ff6b5e; --on-dislike: #2b0906; --super: #ff7aa8; --on-super: #3a0a22;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #181a1c; --paper-2: #2a2d30; --paper-3: #33373b;
    --ink: #ececea; --ink-2: #b8b8b2; --ink-3: #9e9e98; --line: #34383c;
    --accent: #1fa35a; --on-accent: #0b0b0b; --accent-ink: #2fc06e;
    --dislike: #ff6b5e; --on-dislike: #2b0906; --super: #ff7aa8; --on-super: #3a0a22;
  }
}

@media (max-width: 759px) {
  :root { --tab-h: calc(62px + var(--safe-b)); }
}
