/* «Нечуті пісні» (src/unheard.js, docs/UNHEARD.md): the album block that opens the home page.
   Drawn with the design tokens only (no colours of its own), so a design that redefines the tokens recolours it;
   each design's own sheet adds its material (src/designs/common.css and src/<design>/base.css). */
.unheard { position: relative; display: grid; grid-template-columns: clamp(132px, 28vw, 340px) minmax(0, 1fr); grid-template-areas: "cover head" "cover tracks"; align-items: start; gap: 18px 32px; padding: 24px; margin-bottom: 32px; border: 1px solid var(--line); border-radius: var(--radius-hero); background: var(--surface); color: var(--ink); }
.unheard-cover-wrap { grid-area: cover; position: relative; isolation: isolate; }
.unheard-cover { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-lg); box-shadow: 0 18px 40px color-mix(in srgb, var(--paper) 55%, transparent); }
.unheard-head { grid-area: head; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.unheard-eyebrow { color: var(--muted); text-transform: uppercase; }
.unheard h2 { font-size: clamp(22px, 3vw, 36px); font-weight: 800; letter-spacing: -.6px; line-height: 1.08; overflow-wrap: anywhere; }
.unheard-album { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.unheard-album strong { font-weight: 800; }
.unheard-meta { color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.unheard-plays { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; white-space: nowrap; }
.unheard-plays[hidden] { display: none; }
.unheard-plays .icon-ear { flex: none; width: 16px; height: 16px; }
.unheard-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.unheard-play { position: relative; display: grid; place-items: center; flex: none; width: 56px; height: 56px; padding: 0; border-radius: 50%; background: var(--lime); color: var(--on-lime); transition: transform .15s; }
.unheard-play:active { transform: scale(.95); }
.unheard-play .icon { width: 26px; height: 26px; }
.unheard-play .icon-play { margin-left: 3px; }
.unheard-play .icon-pause, .unheard-play[aria-pressed="true"] .icon-play { display: none; }
.unheard-play[aria-pressed="true"] .icon-pause { display: inline-block; }
.unheard.is-loading .unheard-play::after { content: ''; position: absolute; inset: -5px; border: 3px solid transparent; border-top-color: var(--lime); border-radius: 50%; animation: latest-spin .9s linear infinite; }
.unheard-mode { position: relative; display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink); }
.unheard-mode .icon { width: 20px; height: 20px; }
.unheard-mode[aria-pressed="true"] { border-color: var(--lime); background: var(--lime); color: var(--on-lime); }
.unheard-repeat-one { position: absolute; top: 3px; right: 3px; display: none; min-width: 14px; height: 14px; border-radius: 7px; background: var(--on-lime); color: var(--lime); font-size: 9px; font-weight: 800; line-height: 14px; }
.unheard-repeat[data-mode="one"] .unheard-repeat-one { display: block; }
.unheard-progress { height: 3px; margin-top: 10px; overflow: hidden; border-radius: 2px; background: var(--line); }
.unheard-progress i { display: block; width: var(--progress, 0%); height: 100%; background: var(--lime); transition: width .25s linear; }
.unheard-status { color: var(--muted); font-size: 12px; font-weight: 700; }
.unheard-status:empty { display: none; }
.unheard-tracks { grid-area: tracks; display: grid; gap: 2px; max-width: 760px; margin: 0; padding: 0; list-style: none; }
.unheard-progress { max-width: 760px; }
.unheard-track { display: grid; grid-template-columns: 32px 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 12px 6px 6px; border-radius: var(--radius-md); background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; text-align: left; }
.unheard-track:focus-visible { outline-offset: 1px; }
.unheard-track[aria-current="true"] { background: var(--lime-tint); }
.unheard-track-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink); }
.unheard-track-icon .icon { width: 14px; height: 14px; }
.unheard-track-icon .icon-play { margin-left: 2px; }
.unheard-track-icon .icon-pause, .unheard-eq { display: none; }
.unheard-track[aria-current="true"] .unheard-track-icon { border-color: var(--lime); background: var(--lime); color: var(--on-lime); }
.unheard.is-playing .unheard-track[aria-current="true"] .icon-play { display: none; }
.unheard.is-playing .unheard-track[aria-current="true"] .unheard-eq { display: flex; }
.unheard-track-no { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.unheard-track-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A name too long for its row (src/unheard.js fitTitles): a classic marquee — the name and its copy 2.5em apart slide
   left by one name and gap, resting at the start for a fifth of each round; the right edge fades instead of «…». */
.unheard-track-title.is-marquee { text-overflow: clip; -webkit-mask-image: linear-gradient(90deg, black calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, black calc(100% - 18px), transparent); }
.unheard-marquee { display: inline-flex; gap: 2.5em; vertical-align: top; will-change: transform; animation: unheard-marquee var(--marquee-time) linear infinite; }
.unheard-marquee > span { flex: none; }
@keyframes unheard-marquee { 0%, 20% { transform: none; } to { transform: translateX(var(--marquee-shift)); } }
.unheard-track time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.unheard-eq { align-items: flex-end; gap: 2px; height: 14px; }
.unheard-eq b { width: 3px; height: 100%; border-radius: 1px; background: currentColor; animation: unheard-eq .8s ease-in-out infinite alternate; }
.unheard-eq b:nth-child(2) { animation-delay: -.35s; }
.unheard-eq b:nth-child(3) { animation-delay: -.6s; }
@keyframes unheard-eq { from { height: 25%; } to { height: 100%; } }
/* The album's secret (docs/UNHEARD.md, «Прихована пісня»): an empty button over the block's top right corner — no look,
   no pointer, no grey flash under a finger; only a keyboard sees where it is. Pressed, it gives way to a message that
   pops up in the same corner and fades (src/unheard.js empties it after SECRET_NOTE_MS, also when reduced motion stops
   every animation), and the found song slides into its place in the list with a short glow. */
.unheard-secret { position: absolute; top: 0; right: 0; z-index: 3; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; cursor: default; -webkit-tap-highlight-color: transparent; }
.unheard-secret:focus-visible { outline: 2px solid var(--ink); outline-offset: -8px; }
.unheard-secret-note { position: absolute; top: 12px; right: 12px; z-index: 4; max-width: min(320px, calc(100% - 24px)); margin: 0; padding: 10px 14px; border-radius: var(--radius-md); background: var(--lime); color: var(--on-lime); font-size: 14px; font-weight: 800; line-height: 1.3; text-wrap: balance; box-shadow: 0 12px 30px color-mix(in srgb, var(--ink) 30%, transparent); pointer-events: none; animation: unheard-note 6.5s ease both; }
.unheard-secret-note:empty { display: none; }
@keyframes unheard-note { 0% { opacity: 0; transform: translateY(-8px) scale(.94); } 6% { opacity: 1; transform: none; } 88% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.unheard-tracks .is-revealed { overflow: hidden; animation: unheard-open .45s ease-out backwards; }
.unheard-tracks .is-revealed .unheard-track { animation: unheard-slide .6s cubic-bezier(.2, .8, .2, 1) .1s backwards, unheard-found 2.4s ease-out .7s; }
.unheard-tracks .is-revealed .unheard-track:focus-visible { outline-offset: -3px; }
@keyframes unheard-open { from { max-height: 0; } to { max-height: 96px; } }
@keyframes unheard-slide { from { opacity: 0; transform: translateX(100%); } }
@keyframes unheard-found { from { box-shadow: inset 0 0 0 2px var(--lime); } }
/* The songs' lyrics (src/unheard-lyrics.js, docs/UNHEARD.md, «Тексти пісень»). «Текст пісні» is a 44 px icon at the end
   of a song's row, over the row's own button; every row keeps the same room for it, so the durations stay in one
   column. The lyrics open in a native modal <dialog>: on a phone a sheet over the bottom edge (8 px off the sides, above
   the home indicator) whose head stays while the text scrolls under it, the page beneath held still; on a wider
   screen a window in the middle. Every <p> sets its colour and line height: the site's `dialog p` would grey them. */
.unheard-tracks li { position: relative; }
.unheard-tracks:has(.unheard-lyrics-button) .unheard-track { padding-right: 52px; }
.unheard-lyrics-button { position: absolute; top: 0; right: 4px; bottom: 0; display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--muted); -webkit-tap-highlight-color: transparent; }
.unheard-lyrics-button .icon { width: 20px; height: 20px; }
.unheard-lyrics-button:focus-visible { outline-offset: -4px; }
.unheard-lyrics-button:active, .unheard-tracks li:has([aria-current="true"]) .unheard-lyrics-button { color: var(--ink); }
.unheard-lyrics { position: fixed; inset: auto 8px calc(8px + env(safe-area-inset-bottom)); width: auto; max-width: none; max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius-2xl); background: var(--surface); color: var(--ink); }
.unheard-lyrics[open] { display: flex; flex-direction: column; }
.unheard-lyrics[open] { animation: unheard-lyrics-up .32s cubic-bezier(.2, .8, .2, 1); }
.unheard-lyrics[open]::backdrop { animation: unheard-lyrics-dim .25s ease-out; }
:root:has(.unheard-lyrics[open]) { overflow: hidden; }
.unheard-lyrics-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 18px 12px 14px 20px; border-bottom: 1px solid var(--line); }
.unheard-lyrics-head { display: grid; gap: 4px; min-width: 0; }
.unheard-lyrics-kicker { margin: 0; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; line-height: 1.4; text-transform: uppercase; }
.unheard-lyrics-title { margin: 0; color: var(--ink); font-size: 22px; font-weight: 800; letter-spacing: -.4px; line-height: 1.15; overflow-wrap: anywhere; }
.unheard-lyrics-by { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.35; }
.unheard-lyrics-close { position: relative; display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink); }
.unheard-lyrics-close .icon { width: 20px; height: 20px; }
.unheard-lyrics-done { display: none; }
.unheard-lyrics-body { flex: 1 1 auto; min-height: 0; padding: 20px 20px 28px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.unheard-lyrics-body:focus-visible { outline-offset: -4px; }
.unheard-lyrics-part { margin: 0 0 22px; }
.unheard-lyrics-part.is-chorus { padding-left: 14px; border-left: 3px solid var(--lime); }
.unheard-lyrics-label { margin: 0 0 6px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; line-height: 1.4; text-transform: uppercase; }
.unheard-lyrics-lines { margin: 0; color: var(--ink); font-size: 17px; font-weight: 500; line-height: 1.55; overflow-wrap: anywhere; }
/* A line too long for the screen wraps under itself, so a new line still reads as new. */
.unheard-lyrics-lines span { display: block; padding-left: 1em; text-indent: -1em; }
.unheard-lyrics-chords { margin-top: 26px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--lime-tint); }
.unheard-lyrics-chords .unheard-lyrics-lines { font-size: 15px; font-weight: 700; word-spacing: .35em; }
.unheard-lyrics-state { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
/* The text usually arrives at once: «Завантажуємо…» shows only when it does not. */
.unheard-lyrics-body.is-loading .unheard-lyrics-state { animation: unheard-lyrics-wait .4s; }
@keyframes unheard-lyrics-wait { from, to { opacity: 0; } }
@keyframes unheard-lyrics-up { from { opacity: 0; transform: translateY(40px); } }
@keyframes unheard-lyrics-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes unheard-lyrics-dim { from { opacity: 0; } }
@media (hover: hover) {
  .unheard-track:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
  .unheard-track[aria-current="true"]:hover { background: var(--lime-tint); }
  .unheard.is-playing .unheard-track[aria-current="true"]:hover .unheard-eq { display: none; }
  .unheard.is-playing .unheard-track[aria-current="true"]:hover .icon-pause { display: inline-block; }
  .unheard-mode:hover { border-color: var(--ink); }
  .unheard-lyrics-button:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
  .unheard-lyrics-close:hover { border-color: var(--ink); }
}
@media (min-width: 761px) {
  .unheard-lyrics { inset: 0; width: min(580px, calc(100% - 48px)); max-height: calc(100vh - 64px); max-height: min(800px, calc(100dvh - 64px)); margin: auto; }
  .unheard-lyrics[open] { animation-name: unheard-lyrics-pop; }
  .unheard-lyrics-bar { padding: 24px 18px 18px 28px; }
  .unheard-lyrics-title { font-size: 26px; }
  .unheard-lyrics-body { padding: 24px 28px 32px; }
  .unheard-lyrics-lines { font-size: 18px; }
}
@media (max-width: 760px) {
  .unheard { grid-template-areas: "cover head" "tracks tracks"; gap: 16px; padding: 16px; margin-bottom: 24px; border-radius: var(--radius-xl); }
  .unheard-controls { margin-top: 6px; }
}
@media (max-width: 380px) {
  .unheard { grid-template-columns: 112px minmax(0, 1fr); gap: 14px 12px; padding: 14px; }
  .unheard-track { gap: 8px; padding-right: 8px; }
  .unheard-lyrics-body { padding-inline: 16px; }
  .unheard-lyrics-lines { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .unheard-eq b { height: 70%; animation: none; }
  .unheard-marquee { animation: none; }
  .unheard-progress i, .unheard-play { transition: none; }
  .unheard.is-loading .unheard-play::after { animation: none; border-color: var(--lime); }
  .unheard-tracks .is-revealed, .unheard-tracks .is-revealed .unheard-track { animation: none; }
}
