/* ProdByWave — modernistyczny system wizualny
   Kolory: papier, czerń, ultramaryna. Pismo: Adventor (geometria Avant Garde) + Heros (szwajcarska groteska). */

@font-face { font-family: 'Adventor'; src: url('/fonts/texgyreadventor-bold.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Adventor'; src: url('/fonts/texgyreadventor-regular.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Heros'; src: url('/fonts/texgyreheros-regular.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Heros'; src: url('/fonts/texgyreheros-bold.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Heros'; src: url('/fonts/texgyreheros-italic.woff') format('woff'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Heros Cn'; src: url('/fonts/texgyreheroscn-bold.woff') format('woff'); font-weight: 700; font-display: swap; }

:root {
  --paper: #EDEDE9;
  --paper-2: #E1E1DB;
  --white: #F8F8F5;
  --ink: #000000;
  --blue: #1F3FD8;
  --blue-dark: #1631B4;
  --grey: #66665F;
  --line-soft: #C4C4BC;
  --red: #C9301A;
  --green: #1E7A3C;

  --display: 'Adventor', 'Avant Garde', 'Century Gothic', 'Futura', sans-serif;
  --text: 'Heros', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --data: 'Heros Cn', 'Helvetica Neue', 'Arial Narrow', sans-serif;

  --pad: clamp(16px, 3.2vw, 44px);
  --max: 1480px;
  --rule: 2px solid var(--ink);
  --player-h: 0px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
body:has(.player) { --player-h: 76px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--text);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--player-h);
}
body.no-scroll { overflow: hidden; }
img, svg { display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--blue); color: var(--paper); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { top: 8px; }
.ta-r { text-align: right; }
.num { font-family: var(--data); font-weight: 700; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* Nagłówek ---------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px;
  padding: 0 var(--pad); height: 64px;
  background: var(--paper);
  border-bottom: var(--rule);
}
.logo { font: 700 22px/1 var(--display); letter-spacing: -0.04em; text-decoration: none; }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: 15px;
}
.nav a:hover { background: var(--paper-2); }
.nav a.is-on { background: var(--ink); color: var(--paper); }
.header__right { display: flex; align-items: center; gap: 20px; }
.account { display: flex; align-items: center; gap: 14px; font-size: 15px; }
.account__name { font-weight: 700; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; font-size: 15px; display: inline-flex; gap: 6px; align-items: center; }
.link:hover { color: var(--blue); }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px;
  border: var(--rule); border-radius: 999px; background: var(--paper); font-size: 15px; font-weight: 700;
}
.cart-btn svg { width: 20px; height: 20px; }
.cart-btn:hover { background: var(--ink); color: var(--paper); }
.cart-btn__n { font-family: var(--data); min-width: 1ch; }
.cart-btn.is-bump { animation: bump .4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.12); } }

/* Przyciski --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; border: var(--rule); text-decoration: none; white-space: nowrap;
  font-weight: 700; transition: background .15s, color .15s, border-color .15s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn--sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn--md { height: 42px; padding: 0 20px; font-size: 15px; }
.btn--lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--blue); border-color: var(--blue); }
.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }
.btn--quiet { background: transparent; border-color: transparent; color: var(--grey); padding-left: 4px; padding-right: 4px; }
.btn--quiet:hover { color: var(--ink); }
.btn--blue { background: var(--blue); border-color: var(--blue); color: var(--paper); }
.btn--blue:hover { background: var(--ink); border-color: var(--ink); }
.btn--on-blue { border-color: var(--paper); color: var(--paper); }
.btn--on-blue.btn--outline:hover { background: var(--paper); color: var(--blue); }
.btn--on-blue.btn--solid { background: var(--paper); color: var(--blue); }
.btn--on-blue.btn--quiet { color: var(--paper); border-color: transparent; }
.btn:disabled { opacity: .55; cursor: progress; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: transparent; text-decoration: none;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--paper-2); }
.icon-btn--sm { width: 34px; height: 34px; }
.icon-btn--sm svg { width: 18px; height: 18px; }
.icon-btn--paper { color: var(--paper); }
.icon-btn--paper:hover { background: rgba(255,255,255,.14); }
.icon-btn.is-danger { width: auto; padding: 0 12px; border-radius: 999px; background: var(--red); color: var(--white); }
.confirm-text { font-size: 13px; font-weight: 700; }

/* Przycisk odtwarzania: koło -------------------------------------- */
.play {
  --s: 40px;
  flex: none; display: grid; place-items: center; width: var(--s); height: var(--s);
  border-radius: 50%; border: var(--rule); background: transparent; padding: 0;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.play svg { width: 44%; height: 44%; fill: currentColor; }
.play svg path { transform: translateX(6%); }
.play:hover { background: var(--ink); color: var(--paper); }
.play.is-current { background: var(--blue); border-color: var(--blue); color: var(--paper); }
.play.is-loading { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.play--md { --s: 48px; }
.play--lg { --s: 64px; }
.play--xl { --s: 88px; border-width: 3px; }
.play--xl.is-current, .play--lg.is-current { box-shadow: 0 0 0 6px var(--paper), 0 0 0 8px var(--blue); }
.play--paper { border-color: var(--paper); color: var(--paper); }
.play--paper:hover, .play--paper.is-current { background: var(--paper); color: var(--blue); border-color: var(--paper); }

/* Fala ---------------------------------------------------------------- */
.wave { position: relative; width: 100%; }
.wave svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave__base path { fill: var(--ink); }
.wave__fill path { fill: var(--blue); }
.wave.is-interactive { cursor: pointer; }
.wave.is-current .wave__base path { fill: #9A9A92; }
.wave--paper .wave__base path, .wave--paper.is-current .wave__base path { fill: rgba(237,237,233,.38); }
.wave--paper .wave__fill path { fill: var(--paper); }
.wave:focus-visible { outline-offset: 6px; }

/* Okładki ----------------------------------------------------------- */
.cover { aspect-ratio: 1; overflow: hidden; background: var(--paper-2); flex: none; }
.cover img, .cover svg { width: 100%; height: 100%; object-fit: cover; }

/* Hero ---------------------------------------------------------------- */
.hero { padding: clamp(20px, 3vw, 40px) var(--pad) 0; max-width: var(--max); margin: 0 auto; }
.wordmark {
  margin: 0;
  font: 700 clamp(52px, 17.35vw, 257px)/.78 var(--display);
  letter-spacing: -0.065em;
  margin-left: -0.04em;
  white-space: nowrap;
}
.hero__feature { margin-top: clamp(28px, 4vw, 56px); border-top: var(--rule); padding-top: 16px; }
.hero__label { display: flex; justify-content: space-between; font-size: 14px; color: var(--grey); margin-bottom: 18px; }
.hero__len { font-family: var(--data); font-weight: 700; }
.hero__wave { animation: sweep 1.6s var(--ease) both .15s; }
@keyframes sweep { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.hero__now {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(16px, 3vw, 40px);
  padding: 28px 0 clamp(32px, 5vw, 64px);
}
.hero__title {
  display: block; text-decoration: none;
  font: 700 clamp(32px, 4.6vw, 64px)/1 var(--display); letter-spacing: -0.045em;
}
.hero__title:hover { color: var(--blue); }
.hero__info .meta { margin-top: 10px; }
.hero__buy { display: flex; align-items: center; gap: 22px; }
.hero__empty { margin-top: 48px; border-top: var(--rule); padding: 40px 0 64px; font-size: 20px; }
.hero__skeleton { margin-top: 56px; height: 300px; border-top: var(--rule); }

.meta { display: inline-flex; flex-wrap: wrap; gap: 6px 18px; font: 700 15px/1.2 var(--data); letter-spacing: .01em; }
.price { font: 700 18px/1 var(--data); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price--lg { font-size: clamp(24px, 2.6vw, 34px); }
.price--xl { font-size: clamp(32px, 3.6vw, 48px); }

/* Jak kupić (to jest sekwencja, więc numeracja) -------------------- */
.steps {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(40px, 6vw, 80px);
  display: grid; grid-template-columns: 1fr 3fr; gap: 32px;
}
.steps__title { margin: 0; font: 700 22px/1.2 var(--display); letter-spacing: -0.02em; padding-top: 18px; border-top: var(--rule); }
.steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.steps__list li { border-top: var(--rule); padding-top: 18px; counter-increment: step; }
.steps__list li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--paper); font: 700 15px/1 var(--data); margin-bottom: 16px;
}
.steps__list li:first-child::before { background: var(--blue); }
.steps h3 { margin: 0 0 8px; font: 700 19px/1.25 var(--text); }
.steps p { margin: 0; color: var(--grey); max-width: 34ch; }

/* Katalog ----------------------------------------------------------- */
.catalog { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) 96px; }
.catalog__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: var(--rule); padding-top: 22px; }
.section-title { margin: 0; font: 700 clamp(40px, 5.6vw, 76px)/.95 var(--display); letter-spacing: -0.05em; }
.section-title--sm { font-size: clamp(26px, 2.8vw, 36px); letter-spacing: -0.035em; margin: 56px 0 18px; }
.catalog__count { margin: 0; color: var(--grey); font: 700 16px/1 var(--data); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 20px; align-items: center; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border: var(--rule); border-radius: 999px; background: var(--white); }
.search svg { width: 20px; height: 20px; flex: none; }
.search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 15px; }
.search:focus-within { box-shadow: 0 0 0 3px var(--blue); }
.segmented { display: inline-flex; border: var(--rule); border-radius: 999px; padding: 3px; background: var(--white); }
.segmented button { border: 0; background: transparent; height: 34px; padding: 0 14px; border-radius: 999px; font: 700 14px/1 var(--data); white-space: nowrap; }
.segmented button:hover { background: var(--paper-2); }
.segmented button.is-on { background: var(--ink); color: var(--paper); }
.select { position: relative; }
.select select, .field select {
  appearance: none; height: 44px; padding: 0 40px 0 16px; border: var(--rule); border-radius: 999px; background: var(--white);
  font-size: 15px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px;
}

/* Lista utworów ---------------------------------------------------- */
.tracklist ul { list-style: none; margin: 0; padding: 0; }
.tracklist__head, .row {
  display: grid; align-items: center; gap: 18px;
  grid-template-columns: 40px 52px minmax(150px, 1.25fr) minmax(140px, 2fr) 54px 64px 104px 128px;
}
.tracklist__head { padding: 0 0 10px; font-size: 13px; color: var(--grey); border-bottom: var(--rule); }
.row { padding: 14px 0; border-bottom: 1px solid var(--line-soft); position: relative; }
.row:hover { background: linear-gradient(90deg, transparent, var(--white) 6%, var(--white) 94%, transparent); }
.row.is-current .row__title a { color: var(--blue); }
.row__cover { width: 52px; }
.row__title { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.row__title a, .row__title > span:first-child { font: 700 20px/1.1 var(--display); letter-spacing: -0.03em; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.row__sub { font-size: 13px; color: var(--grey); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.row__num { font: 700 19px/1 var(--data); font-variant-numeric: tabular-nums; }
.row__price { text-align: right; }
.row__action { display: flex; justify-content: flex-end; }

.empty { padding: 48px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.empty p { margin: 0; font-size: 18px; max-width: 52ch; }
.empty--page { border-top: var(--rule); }

/* Strony ------------------------------------------------------------ */
main { min-height: 60vh; }
.page { max-width: var(--max); margin: 0 auto; padding: clamp(28px, 4vw, 56px) var(--pad) 96px; }
.page.narrow { max-width: 760px; }
.page-title { margin: 0 0 18px; font: 700 clamp(38px, 5vw, 68px)/1 var(--display); letter-spacing: -0.05em; }
.lead { font-size: 19px; line-height: 1.5; max-width: 60ch; margin: 0 0 28px; }
.back { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 15px; margin-bottom: 24px; }
.back:hover { color: var(--blue); }

/* Bit --------------------------------------------------------------- */
.beat__grid { display: grid; grid-template-columns: minmax(260px, 5fr) 7fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.beat__cover { width: 100%; }
.beat__title { margin: 0; font: 700 clamp(46px, 7vw, 108px)/.9 var(--display); letter-spacing: -0.06em; }
.beat__by { color: var(--grey); margin: 14px 0 32px; }
.facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0 40px; margin: 0 0 32px; padding: 16px 0; border-top: var(--rule); border-bottom: var(--rule); }
.facts dt { font-size: 13px; color: var(--grey); margin-bottom: 6px; }
.facts dd { margin: 0; font: 700 21px/1.1 var(--data); }
.beat__desc { font-size: 18px; line-height: 1.55; max-width: 58ch; margin: 0 0 22px; white-space: pre-line; }
.tags { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { border: 1.5px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.beat__buy { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.beat__player { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; margin-top: clamp(40px, 6vw, 72px); padding-top: 28px; border-top: var(--rule); }

/* Szuflada koszyka -------------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100%);
  background: var(--paper); border-left: var(--rule); padding: 24px 28px 28px;
  display: flex; flex-direction: column; overflow-y: auto;
  transform: translateX(100%); transition: transform .32s var(--ease); visibility: hidden;
}
.drawer.is-open { pointer-events: auto; }
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; visibility: visible; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: var(--rule); }
.drawer__head h2 { margin: 0; font: 700 34px/1 var(--display); letter-spacing: -0.045em; }
.drawer__empty { padding: 32px 0; display: grid; gap: 20px; justify-items: start; }
.drawer__empty p { margin: 0; font-size: 17px; }
.cart-list { list-style: none; padding: 0; margin: 0; }
.cart-list li { display: grid; grid-template-columns: 52px 1fr auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.cart-list__cover { width: 52px; }
.cart-list__title { display: block; font: 700 18px/1.15 var(--display); letter-spacing: -0.03em; text-decoration: none; margin-bottom: 4px; }
.cart-list .meta { font-size: 13px; gap: 4px 12px; color: var(--grey); }

.methods { border: 0; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.methods legend { font-size: 14px; color: var(--grey); margin-bottom: 10px; padding: 0; }
.method {
  display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center;
  padding: 12px 16px; border: var(--rule); border-radius: 14px; cursor: pointer; background: var(--white);
  transition: background .15s, color .15s;
}
.method input { position: absolute; opacity: 0; pointer-events: none; }
.method:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }
.method.is-on { background: var(--ink); color: var(--paper); }
.method__mark { display: grid; place-items: center; height: 34px; border-radius: 8px; background: var(--paper-2); color: var(--ink); }
.method__mark svg { width: 22px; height: 22px; }
.method__mark--blik { background: var(--ink); color: var(--white); font: 700 15px/1 var(--display); letter-spacing: -0.02em; }
.method.is-on .method__mark { background: var(--paper); color: var(--ink); }
.method__text { display: grid; gap: 2px; }
.method__text strong { font-size: 16px; }
.method__text small { font-size: 13px; opacity: .75; }
.drawer__total { display: flex; justify-content: space-between; align-items: baseline; margin: 24px 0 16px; padding-top: 16px; border-top: var(--rule); }
.drawer__total strong { font: 700 34px/1 var(--data); }
.drawer__note { font-size: 13px; color: var(--grey); margin: 14px 0 0; }

/* Okno logowania ---------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); animation: fade .2s both; }
.modal__panel {
  position: relative; width: min(440px, 100%); background: var(--paper); border: var(--rule); border-radius: 20px;
  padding: 26px 28px 30px; display: grid; gap: 16px; animation: rise .28s var(--ease) both;
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.modal__x { position: absolute; top: 14px; right: 14px; }
.modal__title { margin: 4px 0 0; font: 700 34px/1 var(--display); letter-spacing: -0.045em; }
.modal__reason { margin: -4px 0 0; color: var(--grey); }
.tabs { display: inline-flex; border: var(--rule); border-radius: 999px; padding: 3px; justify-self: start; }
.tabs button { border: 0; background: none; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.tabs button.is-on { background: var(--ink); color: var(--paper); }

/* Pola formularzy --------------------------------------------------- */
.field { display: grid; gap: 7px; }
.field > span { font-size: 14px; font-weight: 700; }
.field input, .field textarea {
  width: 100%; border: var(--rule); border-radius: 12px; background: var(--white); padding: 12px 14px; font-size: 16px;
}
.field select { width: 100%; border-radius: 12px; }
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--blue); outline-offset: 1px; }
.field small { font-size: 13px; color: var(--grey); }
.field small.warn { color: var(--red); }
.field em { font-style: normal; font-size: 13px; color: var(--red); font-weight: 700; }
.field.has-error input, .field.has-error select { border-color: var(--red); }
.field-row { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 16px; }
.form-error { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--red); color: var(--white); font-size: 15px; }

/* Pasek odtwarzacza ------------------------------------------------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: 76px;
  display: grid; grid-template-columns: auto minmax(120px, 220px) 1fr auto auto auto; align-items: center; gap: 22px;
  padding: 0 var(--pad); background: var(--blue); color: var(--paper);
  animation: slideup .35s var(--ease) both;
}
@keyframes slideup { from { transform: translateY(100%); } }
.player__info { min-width: 0; display: grid; gap: 4px; }
.player__info a { font: 700 18px/1.1 var(--display); letter-spacing: -0.03em; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__info .meta { font-size: 13px; opacity: .8; gap: 4px 12px; }
.player__time { font: 700 15px/1 var(--data); font-variant-numeric: tabular-nums; white-space: nowrap; }
.player__time span { opacity: .65; }
.player__vol { display: flex; align-items: center; gap: 4px; }
.player__vol input { width: 90px; accent-color: var(--paper); }
.player__buy { display: flex; align-items: center; gap: 14px; }

/* Powiadomienia ----------------------------------------------------- */
.toasts { position: fixed; left: var(--pad); bottom: calc(var(--player-h) + 16px); z-index: 80; display: grid; gap: 8px; }
.toast { background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-size: 15px; animation: rise .25s var(--ease) both; max-width: min(520px, 90vw); }
.toast--error { background: var(--red); }

/* Biblioteka i tabele ---------------------------------------------- */
.library { list-style: none; padding: 0; margin: 0; border-top: var(--rule); }
.library__item { display: grid; grid-template-columns: 40px 52px minmax(160px, 1.2fr) minmax(140px, 2fr) auto auto; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.library__item .meta { color: var(--grey); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-weight: 400; font-size: 13px; color: var(--grey); padding: 0 12px 10px 0; border-bottom: var(--rule); }
.table th.ta-r { text-align: right; }
.table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table td.num { font-size: 17px; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1.5px solid currentColor; white-space: nowrap; }
.status--published, .status--paid { color: var(--green); }
.status--draft { color: var(--grey); }
.status--failed { color: var(--red); }

/* Studio ------------------------------------------------------------ */
.studio__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.studio__head .page-title { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); margin: 32px 0 0; border-top: var(--rule); border-bottom: var(--rule); }
.stats div { padding: 18px 18px 20px 0; }
.stats div + div { padding-left: 18px; border-left: 1px solid var(--line-soft); }
.stats div:first-child dd { color: var(--blue); }
.stats dt { font-size: 13px; color: var(--grey); margin-bottom: 10px; }
.stats dd { margin: 0; font: 700 clamp(24px, 2.6vw, 36px)/1 var(--data); font-variant-numeric: tabular-nums; }
.studio-table__cover { width: 44px; }
.studio-table__title { font: 700 18px/1.2 var(--display); letter-spacing: -0.03em; text-decoration: none; display: block; }
.studio-table__title:hover { color: var(--blue); }

.editor__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; align-items: start; margin-top: 12px; }
.editor__fields { display: grid; gap: 20px; }
.editor__media { display: grid; gap: 14px; }
.drop { border: 2px dashed var(--ink); border-radius: 16px; padding: 16px; background: var(--white); transition: background .15s, border-color .15s; }
.drop.is-over { background: #DDE3FB; border-color: var(--blue); }
.drop.is-filled { border-style: solid; }
.drop__head { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; }
.drop__head strong { display: block; font-size: 16px; }
.drop__head small { display: block; font-size: 13px; color: var(--grey); overflow-wrap: anywhere; }
.drop__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--paper); }
.drop__icon svg { width: 20px; height: 20px; }
.drop__cover { display: flex; align-items: end; gap: 16px; margin-top: 14px; }
.drop__cover .cover { width: 120px; }
.drop__wave { margin-top: 14px; height: 70px; position: relative; }
.drop__wave svg { width: 100%; height: 56px; }
.drop__wave path { fill: var(--ink); }
.drop__wave small { font-size: 13px; color: var(--grey); }
.drop__analysing { display: flex; align-items: center; gap: 10px; height: 56px; color: var(--grey); }
.drop__err { display: block; margin-top: 10px; color: var(--red); font-style: normal; font-weight: 700; font-size: 13px; }
.editor__bar { grid-column: 1 / -1; border-top: var(--rule); padding-top: 22px; display: grid; gap: 14px; }
.editor__actions { display: flex; gap: 12px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.progress { position: relative; height: 34px; border: var(--rule); border-radius: 999px; overflow: hidden; background: var(--white); }
.progress span { position: absolute; inset: 0 auto 0 0; background: var(--blue); transition: width .2s; }
.progress small { position: relative; display: grid; place-items: center; height: 100%; font-weight: 700; font-size: 13px; mix-blend-mode: difference; color: var(--white); }

/* Płatność ----------------------------------------------------------- */
.testmode { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 14px 16px; border: var(--rule); border-radius: 14px; background: #FFF4C2; margin-bottom: 32px; }
.testmode svg { width: 24px; height: 24px; }
.testmode p { margin: 0; font-size: 14px; }
.pay__items { list-style: none; margin: 0 0 28px; padding: 0; border-top: var(--rule); }
.pay__items li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 17px; }
.pay__items .pay__sum { border-bottom: var(--rule); font-weight: 700; }
.pay__items .num { font-size: 19px; }
.pay__form { display: grid; gap: 18px; }
.field--blik input { font: 700 40px/1 var(--data); letter-spacing: .32em; text-align: center; padding: 16px; }
.card-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card-fields .field:first-child { grid-column: 1 / -1; }
.card-fields__hint { grid-column: 1 / -1; font-size: 13px; color: var(--grey); }
.pay__cancel { justify-self: center; font-size: 14px; color: var(--grey); }
.blik-wait { display: flex; align-items: center; gap: 16px; padding: 24px; border: var(--rule); border-radius: 14px; background: var(--white); }
.blik-wait p { margin: 0; font-size: 18px; font-weight: 700; }
.order__ok { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--blue); color: var(--paper); margin-bottom: 22px; animation: rise .4s var(--ease) both; }
.order__ok svg { width: 34px; height: 34px; }
.order .btn { margin-top: 4px; }

/* Spinner ------------------------------------------------------------ */
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Stopka ------------------------------------------------------------- */
.footer {
  max-width: var(--max); margin: 0 auto; padding: 28px var(--pad) 40px; border-top: var(--rule);
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 24px; align-items: baseline; font-size: 14px;
}
.footer p { margin: 0; color: var(--grey); }
.footer__mark { font: 700 20px/1 var(--display); letter-spacing: -0.04em; }
.footer__small { font-family: var(--data); }

/* Responsywność ----------------------------------------------------- */
@media (max-width: 1180px) {
  .tracklist__head { display: none; }
  .row { grid-template-columns: 40px 52px 1fr auto auto; grid-template-areas: 'play cover title price action' 'play cover wave wave wave'; row-gap: 10px; }
  .row > .play { grid-area: play; }
  .row__cover { grid-area: cover; }
  .row__title { grid-area: title; }
  .row__wave { grid-area: wave; }
  .row__num[data-label] { display: none; }
  .row__price { grid-area: price; }
  .row__action { grid-area: action; }
  .row__sub::after { content: ''; }
  .library__item { grid-template-columns: 40px 52px 1fr auto; }
  .library__item .row__wave, .library__item .meta { display: none; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats div:nth-child(4) { padding-left: 0; border-left: 0; }
  .player { grid-template-columns: auto minmax(100px, 200px) 1fr auto auto; }
  .player__vol { display: none; }
}
@media (max-width: 860px) {
  .header { grid-template-columns: auto auto; gap: 12px; height: auto; padding-top: 10px; padding-bottom: 10px; }
  .nav { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; }
  .account__name { display: none; }
  .hero__now { grid-template-columns: auto 1fr; }
  .hero__buy { grid-column: 1 / -1; justify-content: space-between; }
  .steps { grid-template-columns: 1fr; }
  .steps__list { grid-template-columns: 1fr; gap: 20px; }
  .beat__grid { grid-template-columns: 1fr; }
  .beat__cover { max-width: 420px; }
  .facts { grid-template-columns: repeat(2, auto); gap: 14px 40px; }
  .editor__grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row .field:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .footer { grid-template-columns: 1fr; gap: 8px; }
  .player { grid-template-columns: auto 1fr auto; gap: 14px; }
  .player__wave, .player__time { display: none; }
  .player__buy .price { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div { border-left: 0 !important; padding-left: 0 !important; }
}
@media (max-width: 560px) {
  .row { grid-template-columns: 40px 1fr auto; grid-template-areas: 'play title price' 'play wave wave' 'play action action'; }
  .row__cover { display: none; }
  .row__action { justify-content: flex-start; }
  .filters .segmented { width: 100%; overflow-x: auto; }
  .select, .select select { width: 100%; }
  .cart-list li { grid-template-columns: 44px 1fr auto; }
  .cart-list li .price { grid-column: 2; }
  .cart-list li .icon-btn { grid-row: 1; grid-column: 3; }
  .drawer__panel { padding: 18px 16px; }
  .card-fields { grid-template-columns: 1fr 1fr; }
  .player__info .meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Zgoda w koszyku -------------------------------------------------- */
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; margin: 0 0 14px; padding: 12px 14px; border: 1.5px solid var(--line-soft); border-radius: 12px; font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.consent.is-on { border-color: var(--ink); }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); cursor: pointer; }
.consent a { text-underline-offset: 2px; }
.consent a:hover { color: var(--blue); }
.modal__legal { margin: 0; font-size: 13px; color: var(--grey); }
.modal__legal a:hover { color: var(--blue); }

.library__actions { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn svg { flex: none; }

/* Stopka: linki do dokumentów -------------------------------------- */
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer__links a { color: var(--grey); text-underline-offset: 3px; }
.footer__links a:hover { color: var(--blue); }

/* Dokumenty: regulamin, prywatność, licencja ----------------------- */
.legal { max-width: 900px; }
.legal__tabs { display: flex; gap: 6px; margin: 0 0 32px; flex-wrap: wrap; }
.legal__tabs a { padding: 8px 16px; border: 2px solid var(--ink); border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 14px; }
.legal__tabs a:hover { background: var(--paper-2); }
.legal__tabs a.is-on { background: var(--ink); color: var(--paper); }
.legal__version { margin: -6px 0 28px; font-family: var(--data); font-weight: 700; color: var(--grey); letter-spacing: .02em; }
.legal__warn { margin: 0 0 28px; }
.legal__limits { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0 0 40px; border-top: var(--rule); border-bottom: var(--rule); }
.legal__limits div { padding: 16px 16px 18px 0; }
.legal__limits div + div { padding-left: 16px; border-left: 1px solid var(--line-soft); }
.legal__limits dt { font-size: 13px; color: var(--grey); margin: 0 0 6px; }
.legal__limits dd { margin: 0; font: 700 clamp(22px, 2.6vw, 32px)/1 var(--data); letter-spacing: -0.01em; }
.legal__body { border-top: var(--rule); }
.legal__section { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding: 24px 0 26px; border-bottom: 1px solid var(--line-soft); }
.legal__section h2 { margin: 0; font: 700 19px/1.25 var(--display); letter-spacing: -0.02em; display: grid; gap: 6px; align-content: start; }
.legal__no { font: 700 14px/1 var(--data); color: var(--blue); letter-spacing: .04em; }
.legal__section ol { margin: 0; padding-left: 26px; display: grid; gap: 10px; max-width: 64ch; }
.legal__section li { padding-left: 4px; line-height: 1.55; }
.legal__section li::marker { font-family: var(--data); font-weight: 700; color: var(--grey); }
@media (max-width: 860px) {
  .legal__section { grid-template-columns: 1fr; gap: 12px; }
  .legal__limits { grid-template-columns: repeat(2, 1fr); }
  .legal__limits div, .legal__limits div + div { padding: 14px 12px 14px 0; border-left: 0; border-bottom: 1px solid var(--line-soft); }
  .library__actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.orders { overflow-x: auto; }
@media (max-width: 560px) {
  .library__item { grid-template-columns: 40px 1fr; row-gap: 12px; }
  .library__actions { grid-column: 1 / -1; justify-content: flex-start; }
}
/* katalogowe .row__* ustawiają grid-area; w bibliotece układ jest prosty */
.library__item > .row__cover, .library__item > .row__title, .library__item > .row__wave { grid-area: auto; }
