/* The Studio Home (js/views/home.js), in both themes. The picture is the same; these tokens set the colours. */
:root {
  --st-card: #ffffff; --st-line: #e3e8f1; --st-title: #111640; --st-soft: #4a5178; --st-mu: #5f6885;
  --st-cy: #0b7f8a; --st-co: #c8402f; --st-near: #a06a00; --st-track: #e3e8f1; --st-note: #6fb3c8;
  --st-now: #111640; --st-key: #e9eef6; --st-keyb: #111640; --st-gap: #cfd6e4; --st-on: #6fdbe3;
}
html[data-theme="dark"] {
  --st-card: #111833; --st-line: #232d52; --st-title: #ffffff; --st-soft: #a9b4d1; --st-mu: #8b97ba;
  --st-cy: #39e6ee; --st-co: #ff8a7d; --st-near: #ffd24a; --st-track: #2a3460; --st-note: #3a7ea6;
  --st-now: #ffffff; --st-key: #dfe6f2; --st-keyb: #07090f; --st-gap: #0a0f1e; --st-on: #39e6ee;
}
.st-card, .st-home .st-card { color: var(--st-title); }
.st-hero .btn-primary { font-size: 1.02rem; }
.st-hero .st-ideas-btn { font-size: 1.02rem; }
.st-ideas-btn .ic .ic-fill { fill: var(--pl-sun, #ffd65a); }

/* Layout */
.st-home { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); max-width: 1040px; margin: 0 auto; }
.st-full { grid-column: 1 / -1; min-width: 0; }
.st-home > * { min-width: 0; margin: 0; }
.st-card { background: var(--st-card); border: 1px solid var(--st-line); border-radius: 16px; padding: 16px; }
.st-label { margin: 0 0 8px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--st-mu); }
@media (min-width: 720px) { .st-home { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The hero: what to sing today */
.st-hero { padding: 18px; }
.st-hero-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.st-hero-text { min-width: 0; }
.st-hero .eyebrow { margin: 0; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: none; color: var(--st-cy); }
.st-hero .page-title { margin: 4px 0 0; font-family: var(--font-head); font-weight: 700; font-size: clamp(1.7rem, 4.5vw, 2.35rem); line-height: 1.06; letter-spacing: -0.025em; color: var(--st-title); overflow-wrap: anywhere; }
.st-hero .page-title:focus { outline: none; }
.st-heard { margin: 8px 0 0; max-width: 56ch; font-size: 0.92rem; line-height: 1.45; color: var(--st-soft); }
.st-heard b { color: var(--st-title); font-weight: 600; }
.st-bud { flex: none; width: 104px; height: 99px; margin: -6px -4px -4px 0; object-fit: contain; }
.st-pitch { display: block; width: 100%; height: 112px; margin-top: 12px; }
.st-pitch .g { stroke: var(--st-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.st-pitch .n { fill: var(--st-note); }
.st-hero-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.st-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--st-mu); }
.st-legend i { display: inline-block; width: 14px; height: 4px; border-radius: 9px; background: var(--st-note); }
.st-hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-left: auto; }
/* The song card on a wide screen: the name, the line and the button together on the left, Bud beside them. */
@media (min-width: 720px) {
  .st-song-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: start; padding: 22px 24px; }
  .st-song-hero .st-hero-top { display: contents; }
  .st-song-hero .st-hero-text { grid-column: 1; grid-row: 1; }
  .st-song-hero .st-bud { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 132px; height: auto; margin: 0 8px 0 0; }
  .st-song-hero .st-hero-foot { grid-column: 1; grid-row: 2; justify-content: flex-start; margin-top: 18px; }
  .st-song-hero .st-hero-actions { margin-left: 0; }
}
@media (max-width: 719px) {
  .st-bud { width: 74px; height: 71px; }
  .st-pitch { height: 92px; }
  .st-hero-foot { flex-direction: column-reverse; align-items: stretch; }
  .st-hero-actions { margin-left: 0; flex-direction: column; align-items: stretch; text-align: center; }
  .st-hero-actions .btn { width: 100%; justify-content: center; }
}

/* The path through the song */
.st-path { display: block; color: inherit; text-decoration: none; }
.st-path-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.st-path-top b { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; color: var(--st-title); overflow-wrap: anywhere; }
.st-path-top small { color: var(--st-soft); font-size: 0.82rem; }
.st-path-top .btn, .st-path-top .home-song-go { margin-left: auto; }
.st-path-top .home-song-go { color: var(--st-mu); display: inline-flex; }
.st-segs { display: flex; gap: 4px; }
.st-seg { flex: 1; min-width: 0; height: 6px; border-radius: 9px; background: var(--st-track); }
.st-seg.ok { background: var(--st-cy); }
.st-seg.now { background: var(--st-now); }
.st-path-ends { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 0.74rem; color: var(--st-mu); }

/* Range */
.st-range { font-family: var(--font-head); font-weight: 700; font-size: 1.7rem; line-height: 1; letter-spacing: -0.02em; color: var(--st-title); margin: 0; }
.st-keys { display: block; max-width: 100%; height: auto; margin: 16px auto 14px; }
.st-kw { fill: var(--st-key); stroke: var(--st-gap); stroke-width: 1; }
.st-kw.on { fill: var(--st-on); }
.st-kb { fill: var(--st-keyb); }
.st-kb.on { fill: color-mix(in srgb, var(--st-on) 45%, var(--st-keyb)); }
.st-row { display: flex; justify-content: space-between; gap: 8px; padding-top: 4px; font-size: 0.84rem; color: var(--st-soft); }
.st-row b { color: var(--st-title); font-weight: 500; text-align: right; }
.st-note { margin: 8px 0 0; font-size: 0.76rem; color: var(--st-mu); }
.st-card-link { display: block; color: inherit; text-decoration: none; }

/* Songs for your range */
.st-song { display: grid; gap: 6px; padding: 8px 0; border-top: 1px solid var(--st-line); color: inherit; text-decoration: none; font-size: 0.88rem; }
.st-song:first-of-type { border-top: 0; padding-top: 0; }
.st-song-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.st-song-top span { min-width: 0; overflow-wrap: anywhere; color: var(--st-title); }
.st-song-top small { flex: none; font-size: 0.74rem; color: var(--st-cy); }
.st-song-top small.near { color: var(--st-near); }
.st-song-top small.far { color: var(--st-co); }
.st-track { height: 5px; border-radius: 9px; background: var(--st-track); overflow: hidden; }
.st-track span { display: block; height: 100%; border-radius: 9px; background: var(--st-cy); }
.st-track span.near { background: var(--st-near); }
.st-track span.far { background: var(--st-co); }

/* The week */
.st-week { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 16px; }
.st-week b { font-family: var(--font-head); font-weight: 700; color: var(--st-title); }
.st-week p { margin: 2px 0 0; font-size: 0.78rem; color: var(--st-mu); max-width: 46ch; }
.st-days { display: flex; gap: 5px; flex: 1; min-width: 210px; max-width: 320px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.st-days li { flex: 1; text-align: center; font-size: 0.72rem; color: var(--st-mu); }
.st-days i { display: block; height: 6px; border-radius: 9px; background: var(--st-track); margin-bottom: 4px; }
.st-days li.on i { background: var(--st-cy); }
.st-days li.is-today { color: var(--st-title); }
.st-days li.is-today:not(.on) i { background: var(--st-now); }
@media (max-width: 719px) { .st-days { margin-left: 0; max-width: none; flex-basis: 100%; } }

/* Streak, level, goal and check-up: quieter than everything above */
.st-home .stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .st-home .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.st-home .stat-tile { min-height: 0; height: 100%; padding: 11px 12px; border-radius: 12px; }
.st-home .stat-value { font-size: 1rem; }
.st-home .stat-label, .st-home .stat-sub { color: var(--st-mu); }
.st-singer { display: flex; justify-content: flex-end; }
.st-singer:empty { display: none; }


/* Song ideas card: the singer's initials on a colour, the song and the singer, a link under the list */
.st-idea { display: flex !important; align-items: center; gap: 10px; }
.st-idea-av, .sc-idea-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 800 0.78rem/1 var(--font-head); color: var(--st-av-ink, #111640); background: var(--st-av1, #ffd65a); }
.st-idea:nth-of-type(4n+2) .st-idea-av, .sc-ideas-list li:nth-child(4n+2) .sc-idea-av { background: var(--st-av2, #9be7ee); }
.st-idea:nth-of-type(4n+3) .st-idea-av, .sc-ideas-list li:nth-child(4n+3) .sc-idea-av { background: var(--st-av3, #ffb3aa); }
.st-idea:nth-of-type(4n+4) .st-idea-av, .sc-ideas-list li:nth-child(4n+4) .sc-idea-av { background: var(--st-av4, #cfc5ff); }
.st-idea-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.st-idea-text small { color: var(--st-mu); font-size: 0.8rem; }
.st-idea > .ic { width: 18px; height: 18px; color: var(--st-mu); }
.st-song:first-of-type { border-top: 0; }
.st-idea-more { display: inline-block; margin-top: 10px; font-size: 0.88rem; font-weight: 700; color: var(--st-cy); }

/* Phones have no side menu, so the way to the full plan is one quiet row on Home (hidden once unlocked,
   and on wide screens where the menu's card does the job). */
.home-up { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: var(--st-title); }
.home-up-ic { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #ffd65a; color: #111640; }
.home-up-ic .ic { width: 20px; height: 20px; }
.home-up-ic .ic .ic-fill { fill: #111640; }
.home-up > .ic { width: 18px; height: 18px; color: var(--st-mu); flex: none; }
@media (min-width: 960px) and (min-height: 601px) { .home-up { display: none; } }
/* A song idea with its picture (the song's own cover from the song list), owner 13 Nov 2026. */
.st-idea-av.has-art { overflow: hidden; background: var(--line, #e3e7f0); }
.st-idea-av.has-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
