/* Playlists-linkers — шаблон сторінки на один екран смартфона (рішення 29; Шаблон сторінки, розд. 2).
   Кольори — з конфігу сторінки: --bg (рішення 14, 92), --text. Кнопки — чорні з білим текстом, фіксовано (рішення 78).
   Системні шрифти: жодних запитів до сторонніх серверів. */
:root {
  --focus: #0b57d0;
  /* Системний шрифт на всіх сторінках (рішення 124): без інших названих шрифтів; товщини — 400 / 500 / 600 / 700,
     800 і 900 не використовуються (виняток — «PLAYLISTY» 300 у каталозі). */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gap: clamp(0.5rem, 1.6dvh, 0.875rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text, #141414);
  background: #f4f0ff;
  background: var(--bg, #f4f0ff);
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  padding: max(0.875rem, env(safe-area-inset-top)) 0 max(0.75rem, env(safe-area-inset-bottom));
}
a { color: inherit; }

/* Одна колонка для всього вмісту (рішення 85): поля по 20 px, не ширше 420 px; 390 px → 350, 360 px → 320. */
.page {
  width: min(100% - 40px, 420px);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* 1. Постер 16:9 — 75 % ширини колонки, по центру (рішення 95; змінює рішення 85): посилання на YouTube-плейлист
   (рішення 86). Радіус кутів — як у кнопок. 390 px → ≈262×148, 360 px → 240×135. */
.video {
  position: relative;
  width: 75%;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.45);
}
.play { position: absolute; inset: 0; display: block; width: 100%; height: 100%; color: inherit; }
.play:focus-visible { outline-offset: -3px; }
.poster { width: 100%; height: 100%; object-fit: cover; display: block; }
.play-icon {
  position: absolute; left: 50%; top: 50%;
  width: 51px; height: 36px; transform: translate(-50%, -50%); /* 75 % від 68×48 (рішення 95) */
  border-radius: 10.5px; background: rgba(18, 18, 18, 0.82);
  transition: background-color 120ms ease;
}
.play-icon::after {
  content: ""; position: absolute; left: 53%; top: 50%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 8.25px 0 8.25px 13.5px; border-color: transparent transparent transparent #ffffff;
}
.play:hover .play-icon, .play:focus-visible .play-icon { background: #ff0033; }

/* Ротатор плейлистів (рішення 99): стрілки у смугах обабіч постера — по 12,5 % ширини колонки
   (390 px → ≈ 44 px, 360 px → 40 px), вертикально по центру постера. Зона натискання 44×44 px — по центру смуги;
   коло 36 px, шеврон #141414. Висоту сторінки не змінює (рішення T6): стрілки — поверх смуг, position: absolute. */
.hero { position: relative; }
.rot {
  position: absolute; top: 50%; z-index: 1;
  width: 44px; height: 44px; margin-top: -22px;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.rot-prev { left: calc(6.25% - 22px); }
.rot-next { right: calc(6.25% - 22px); }
.rot-circle {
  position: relative; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.75); border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.25);
  transition: background-color 120ms ease;
}
.rot-circle::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px;
  border-top: 2.25px solid #141414; border-left: 2.25px solid #141414;
}
.rot-prev .rot-circle::before { transform: translate(-30%, -50%) rotate(-45deg); }
.rot-next .rot-circle::before { transform: translate(-70%, -50%) rotate(135deg); }
.rot:hover .rot-circle, .rot:focus-visible .rot-circle { background: #ffffff; }
.rot:focus-visible { outline-offset: -2px; border-radius: 50%; }

/* 2. Назва — по центру (рішення 75). */
h1 { text-align: center; margin: 0.125rem 0 0; font-size: clamp(1.375rem, 3.4dvh, 1.75rem); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
/* 3. Посилання на сайт (рішення 89, 90): блок на всю ширину колонки в рамці, радіус як у кнопок;
   перший рядок жирний зі стрілкою, другий — дрібніший; обидва без переносів. */
.site { margin: 0; }
.site-link {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 12px;
  border: 1.5px solid #141414; border-radius: 12px;
  text-align: center; text-decoration: none; white-space: nowrap;
}
.site-main { font-weight: 600; font-size: clamp(14px, 4.1vw, 15.5px); line-height: 1.25; }
.site-sub { font-weight: 500; font-size: clamp(11.5px, 3.45vw, 13px); line-height: 1.25; color: #2a2a2c; }
.page-404 .site { font-size: 0.9375rem; line-height: 1.35; }

/* 4–6. Кнопки (рішення 77, 78, 82, 91): чорні з білим текстом; сітка з двох колонок —
   логотипи по лівому краю першої колонки (28 px), написи — по лівому краю другої;
   написи без переносів, шрифт адаптивний, щоб на 360 px усе вміщалося. */
.buttons { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(0.4375rem, 1.1dvh, 0.625rem); }
.btn {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  justify-items: start;
  min-height: 54px;
  padding: 13px 16px 13px 22px;
  border-radius: 12px;
  background: #000000;
  color: #ffffff;
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.6);
  font-size: clamp(14px, 4.2vw, 17px);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 120ms ease;
}
.btn:hover { opacity: 0.88; }
.logo-col { display: flex; align-items: center; }

/* Логотипи (рішення 70–73, 84, 91) — розміри й відступи за гайдлайнами брендів, public/assets/logos/README.md. */
/* ExpertMusic (рішення 91): символ без напису, 28 px заввишки (viewBox 706×928 → ≈ 21 px); SVG з fill="currentColor"
   як маска — колір = білий текст кнопки. */
.btn .mask {
  display: block; height: 28px; width: calc(28px * 706 / 928);
  background-color: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}
/* Spotify: іконка ≥ 21 px; вільна зона — половина висоти іконки (12 px): до тексту ≥ 14 px, до рамки ≥ 13 px.
   Apple Music (рішення 84): офіційна кольорова іконка 24 px, як інші іконки платформ. */
.btn .icon { display: block; height: 24px; width: auto; }
/* YouTube (рішення 71B): офіційний PNG 1255×1075 з вбудованою вільною зоною навколо іконки 827×580.
   Висота файлу 44.5 px → іконка 24 px, поля ≈ 9–10 px; файл зсунуто вліво на ширину поля, щоб іконка
   стояла в одну вертикаль з іншими логотипами (поле лишається в межах лівого відступу кнопки, 22 px). */
.btn-youtube { padding-top: 4.75px; padding-bottom: 4.75px; }
.btn .youtube { display: block; height: 44.5px; width: auto; margin-left: -9px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.foot {
  display: flex; flex-wrap: wrap; gap: 0.25rem 0.375rem; justify-content: center; align-items: baseline;
  margin-top: auto; padding-top: 0.25rem; font-size: 0.75rem; color: #3d3d40;
}
.foot-sep { color: #3d3d40; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

.page-404 { justify-content: center; text-align: center; }

/* «Всі плейлисти» на сторінці плейлиста (рішення 109): угорі — пігулка, під кнопками — контурна кнопка
   як рамка посилання на сайт. Обидві — у тій самій вкладці. */
.all-top-wrap, .all-bottom-wrap { margin: 0; display: flex; justify-content: center; }
.all-top {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.8125rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.all-bottom {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 48px; padding: 10px 12px;
  border: 1.5px solid #141414; border-radius: 12px;
  font-size: clamp(14px, 4.1vw, 15.5px); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.all-icon { font-weight: 400; }

/* Каталог на / (рішення 108). Верхній блок закріплений: шапка, рамка сайту, пошук, фільтри; прокручуються картки. */
.page-catalog { gap: 0; }
.cat-top {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 5;
  margin: 0 -20px; padding: 10px 20px 12px;
  display: flex; flex-direction: column; gap: 10px;
  background: rgba(246, 243, 252, 0.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 8px 18px -14px rgba(0, 0, 0, 0.35);
}
/* Шапка: логотип зліва, «PLAYLISTY» — по центру колонки; бічні колонки не вужчі за вміст, тож заголовок
   ніколи не перетинає логотип (на вузькому екрані зсувається вправо). */
.cat-head { display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: 10px; min-height: 40px; }
.cat-logo {
  display: block; height: 24px; width: calc(24px * 2042 / 937);
  background-color: #141414;
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
}
.cat-logo-text { font-weight: 600; font-size: 0.875rem; }
/* Висота великих літер ≈ висоті логотипа (24 px): cap height системного шрифту ≈ 0,7 em → 34 px. */
.cat-title {
  grid-column: 2; margin: 0; text-align: center;
  font-size: clamp(30px, 9vw, 34px); line-height: 1; font-weight: 300; letter-spacing: 0.08em;
  text-transform: uppercase; margin-right: -0.08em; white-space: nowrap;
}
.cat-search {
  width: 100%; min-height: 44px; padding: 0 14px 0 38px;
  border: 1px solid rgba(0, 0, 0, 0.14); border-radius: 12px;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23555' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5.5'/%3E%3Cpath d='M11 11l4 4'/%3E%3C/svg%3E") 14px 50% no-repeat;
  font: inherit; font-size: 16px; color: inherit;
  -webkit-appearance: none; appearance: none;
}
.cat-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.cat-filter {
  width: 100%; min-height: 44px; padding: 0 30px 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.14); border-radius: 12px;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23141414'/%3E%3C/svg%3E") calc(100% - 12px) 50% no-repeat;
  font: inherit; font-size: 15px; font-weight: 500; color: inherit;
  -webkit-appearance: none; appearance: none; text-overflow: ellipsis;
}
.cat-count { margin: 12px 0 8px; font-size: 0.875rem; color: #3d3d40; }
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 12px; }
.card a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.cover {
  display: block; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, #d9d3e8, #c9d9e6);
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.45);
}
/* Постер YouTube 16:9 як запасна обкладинка — обрізається до квадрата. */
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-title { margin-top: 4px; font-weight: 600; font-size: 0.9375rem; line-height: 1.25; }
.card-meta { font-size: 0.8125rem; color: #3d3d40; line-height: 1.3; }
.card a:focus-visible { outline-offset: 3px; border-radius: 12px; }
/* Сірі заготовки наступної порції. */
.card-skel .cover { background: rgba(0, 0, 0, 0.08); box-shadow: none; animation: skel 1.2s ease-in-out infinite alternate; }
.card-skel .skel-line { display: block; height: 12px; margin-top: 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.08); width: 80%; }
.card-skel .skel-line + .skel-line { width: 55%; margin-top: 6px; }
@keyframes skel { from { opacity: 0.55; } to { opacity: 1; } }
.cat-more { margin: 16px 0 4px; text-align: center; font-size: 0.875rem; color: #3d3d40; }
.cat-more p { margin: 0; }
.page-catalog .foot { margin-top: 18px; }

/* Блок ліцензії (рішення 112, 113, 116, 117; макет E1): заголовок, підзаголовок, три картки в рядок, примітка.
   Той самий компонент карток — на /licencja (рішення 120). Уся картка — посилання; кнопка «Wybieram» — внизу. */
.offer-block { margin-top: 2px; }
.offer-head { margin: 0; text-align: center; font-size: 19px; line-height: 1.2; font-weight: 700; text-wrap: balance; }
.offer-sub { margin: 3px 0 8px; text-align: center; font-size: 12.5px; line-height: 1.3; color: #3d3d40; }
.offer-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.offer-grid li { display: flex; min-width: 0; }
.offer {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 8px 4px 6px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.84); border: 1px solid rgba(0, 0, 0, 0.12);
  color: #141414; text-decoration: none;
  transition: background-color 120ms ease;
}
.offer:hover { background: #ffffff; }
.offer-title { font-size: 13px; font-weight: 600; line-height: 1.2; }
.offer-price { margin-top: 3px; font-size: clamp(17px, 5vw, 19px); font-weight: 700; line-height: 1.15; white-space: nowrap; }
.offer-label { margin: 2px 0 6px; font-size: 11px; line-height: 1.25; color: #3d3d40; }
.offer-cta {
  margin-top: auto; width: 100%; padding: 7px 4px; border-radius: 9px;
  background: #000000; color: #ffffff; font-size: 13px; font-weight: 600; line-height: 1.2;
}
.offer-note { margin: 8px 0 0; text-align: center; font-size: 11.5px; line-height: 1.35; color: #3d3d40; }

/* Сторінка /licencja (рішення 119, 120, 123). */
.page-licencja { gap: 22px; }
.lic-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.lic-title { margin: 0; font-size: 25px; line-height: 1.15; font-weight: 700; text-wrap: balance; }
.lic-sub { margin: 6px 0 14px; text-align: center; font-size: 14px; line-height: 1.35; color: #3d3d40; }
.lic-h2 { margin: 0 0 10px; font-size: 19px; line-height: 1.2; font-weight: 700; }
.lic-h2-center { text-align: center; text-wrap: balance; }
/* «Co zawiera licencja» — список із галочками (виправлення рішення 123, варіант A): одна картка-контейнер без рамки
   й тіні, пункти — рядки з роздільником 1 px (після останнього немає). */
.inc-list { list-style: none; margin: 0; padding: 6px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.6); }
.inc { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; }
.inc + .inc { border-top: 1px solid rgba(0, 0, 0, 0.07); }
.inc-check { flex: none; color: #0a7d3e; font-size: 15px; line-height: 1.3; }
.inc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inc-title { font-size: 14.5px; font-weight: 400; line-height: 1.35; color: var(--text, #141414); }
.inc-sub { font-size: 12.5px; line-height: 1.3; color: #3d3d40; }
/* Часті питання (рішення 127, 129): картка як «Co zawiera licencja», акордеон з «+» / «−» праворуч. */
.faq-list { padding: 0 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.6); }
.faq + .faq { border-top: 1px solid rgba(0, 0, 0, 0.07); }
.faq-q { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 12px 0; list-style: none; cursor: pointer; font-size: 15px; font-weight: 600; line-height: 1.35; }
.faq-q::-webkit-details-marker { display: none; }
.faq-sign::before { content: "+"; }
.faq[open] .faq-sign::before { content: "\2212"; }
.faq-sign { flex: none; width: 1em; text-align: center; font-size: 18px; font-weight: 400; line-height: 1.1; }
.faq-a { padding: 0 0 12px; }
.faq-a p { margin: 0; font-size: 13.5px; font-weight: 400; line-height: 1.45; color: #3d3d40; }
.faq-a .faq-link { margin-top: 6px; }
.faq-link a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.offer-agreement { margin-top: 2px; }
.offer-agreement a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.page-licencja .foot { margin-top: 0; }

/* Оцінка Google на /licencja (рішення 125): уся картка — посилання в новій вкладці; зірки — статичні, без запитів до Google. */
.rev-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(0, 0, 0, 0.1);
  color: #141414; text-decoration: none;
}
.rev-rating { font-size: 30px; line-height: 1; font-weight: 700; }
.rev-mid { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
/* П'ять зірок: сірий шар і жовтий (#F4B400) поверх, обрізаний до rating / 5. */
.rev-stars { position: relative; display: inline-block; font-size: 18px; line-height: 1; letter-spacing: 1px; color: #d6d3dc; white-space: nowrap; }
.rev-stars-fill { position: absolute; left: 0; top: 0; overflow: hidden; color: #f4b400; white-space: nowrap; }
.rev-count { font-size: 12.5px; line-height: 1.3; color: #3d3d40; }
.rev-src { font-size: 13px; font-weight: 600; color: #3d3d40; white-space: nowrap; }
.rev-note { margin: 6px 0 0; font-size: 11.5px; line-height: 1.35; color: #3d3d40; }

/* Банер згоди — поверх нижньої частини сторінки (рішення 19); дві кнопки (рішення 96, як fakturownia.pl):
   «W porządku» — заповнена чорна, «Ustawienia plików cookie» — контурна; однаковий розмір, один рядок. */
.banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: #ffffff; color: #141414;
  padding: 1rem 16px max(0.875rem, env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -0.5rem 2rem rgba(0, 0, 0, 0.25);
  font-size: 0.875rem; line-height: 1.4;
}
.banner-inner { max-width: 28rem; margin: 0 auto; }
.banner h2, .settings h2 { margin: 0 0 0.375rem; font-size: 1.0625rem; line-height: 1.25; font-weight: 700; }
.banner p { margin: 0 0 0.875rem; }
/* Колонки строго рівні (minmax(0, 1fr)); шрифт адаптивний, щоб «Ustawienia plików cookie» вміщалося в рядок на 360 px.
   Якщо системний шрифт ширший — напис переноситься, а не обрізається; висота кнопок однакова (grid). */
.banner-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.banner-actions button {
  min-height: 2.75rem; padding: 0.5rem 4px; border-radius: 10px;
  font: inherit; font-size: clamp(12px, 3.4vw, 14px); font-weight: 600; line-height: 1.2;
  overflow-wrap: anywhere; text-wrap: balance; cursor: pointer; border: 1.5px solid #141414;
}
.banner-actions .btn-fill { background: #000000; border-color: #000000; color: #ffffff; }
.banner-actions .btn-outline { background: transparent; color: #141414; }
.banner .banner-policy, .settings .banner-policy { margin: 0.75rem 0 0; text-align: center; font-size: 0.8125rem; }
.settings .banner-policy { margin: 0.5rem 0 1rem; }

.settings { border: 0; border-radius: 16px; padding: 1.25rem; max-width: 26rem; width: calc(100% - 2rem); color: #141414; font-size: 0.9375rem; }
.settings::backdrop { background: rgba(0, 0, 0, 0.5); }
.settings-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; }
.settings-head h2 { font-size: 1.25rem; }
.settings-close { background: none; border: 0; padding: 0 0.25rem; font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; color: inherit; }
.cat { padding: 0.75rem 0; border-top: 1px solid #e4e0ec; }
.cat label { font-weight: 500; display: flex; gap: 0.5rem; align-items: center; }
.cat p { margin: 0.25rem 0 0 1.75rem; font-size: 0.875rem; color: #4b4560; }

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