/* Noiserun – index2: scéna ako hlavná vec
   Rozhranie je sklo nad scénou a preberá jej tému (svetlá / tmavá).
   Všetky ovládacie prvky v jednom riadku majú rovnakú výšku a stred, aby ležali v jednej rovine.
   v0.4: knižnica ako modálne okno, posuvníky skryté všade, Stlmiť nestmavuje ovládanie ani obrázky v páse. */
:root {
  --accent: #FF5C7A;
  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --ui: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .75, .15, 1);
  --gut: clamp(14px, 3vw, 36px);
  --row: 44px;
  --brand: #FF5C7A;
}
body[data-theme="dark"] {
  --glass: rgba(12, 8, 24, .56);
  --glass-strong: rgba(14, 9, 28, .86);
  --text: #F7EFE6;
  --muted: rgba(247, 239, 230, .74);
  --line: rgba(247, 239, 230, .18);
  --hover: rgba(247, 239, 230, .12);
  --solid: #F7EFE6;
  --solid-text: #160C22;
  --shade: rgba(8, 5, 16, .78);
}
body[data-theme="light"] {
  --glass: rgba(255, 248, 242, .62);
  --glass-strong: rgba(255, 248, 242, .9);
  --text: #22122E;
  --muted: rgba(34, 18, 46, .72);
  --line: rgba(34, 18, 46, .16);
  --hover: rgba(34, 18, 46, .08);
  --solid: #22122E;
  --solid-text: #FFF8F2;
  --shade: rgba(255, 246, 238, .82);
}
/* touch-action: manipulation vypne priblíženie dvojitým ťuknutím (iPhone), štipnutie ostáva */
* { box-sizing: border-box; scrollbar-width: none; touch-action: manipulation; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: #000; color: var(--text); font: 400 16px/1.45 var(--ui); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
canvas { display: block; image-rendering: pixelated; }
/* náhľad scény sa kreslí v rade (views.js): do nakreslenia vidno podklad karty, potom sa obrázok jemne objaví */
canvas.thumb { transition: opacity .25s; }
/* náhľad scény ako obrázok (assets/thumbs); živá scéna (canvas) sa nad neho položí len pri hraní, ukážke či prechode myšou */
img.pic { display: block; width: 100%; height: 100%; object-fit: cover; }
img.pic-px { image-rendering: pixelated; }
canvas.pic-live { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .2s ease; }
canvas.pic-live.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { canvas.pic-live { transition: none; } }
/* dlhé zoznamy po dávkach: neviditeľná značka na konci, pri ktorej sa doplní ďalšia dávka */
.page-more { grid-column: 1 / -1; width: 100%; height: 1px; }
/* sekcie a karty mimo obrazovky sa nerozkladajú ani nekreslia, kým sa k nim obsah neposunie (otvorenie Explore
   inak rozkladalo celý Featured naraz); auto = po prvom zobrazení si prehliadač pamätá skutočnú výšku */
#sheetLib .shelf, #sheetLib .prem-ban, #sheetMine .shelf, .cards > .card, .mgrid > .mtile, .mrows > .mrow { content-visibility: auto; contain-intrinsic-size: auto 280px; }
#sheetLib .shelf, #sheetMine .shelf { margin-inline: -28px; padding-inline: 28px; }
canvas.thumb.wait { opacity: 0; }

/* ---------- scéna ---------- */
/* potiahnutie po scéne doľava / doprava prepína stopy: prehliadač ho nesmie použiť na posun ani priblíženie */
.stage { position: fixed; inset: 0; touch-action: none; }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .8s ease; }
.layer.on { opacity: 1; }
.dim { position: fixed; inset: 0; z-index: 1; background: #000; opacity: 0; pointer-events: none; transition: opacity 1.2s ease; }
body.dimmed .dim { opacity: .8; }
body.ended .dim { opacity: .95; transition-duration: 8s; }

/* ---------- skrývanie rozhrania ---------- */
.chrome { position: fixed; z-index: 5; transition: opacity .6s ease, transform .6s var(--ease); }
body.idle .chrome { opacity: 0; pointer-events: none; }
body.idle .topbar { transform: translateY(-10px); }
body.idle .deck { transform: translateY(14px); }
body.idle { cursor: none; }

/* ---------- stlmenie ----------
   Scéna stmavne (.dim) aj vo svetlej téme. Každý prvok rozhrania je stmavený,
   kým nad ním nie je myš alebo fokus z klávesnice; vtedy sa ukáže naplno. */
body.dimmed { --shade: rgba(3, 2, 8, .66); }
/* texty priamo nad scénou: pod nimi je teraz tma, preto svetlá farba aj vo svetlej téme */
body.dimmed .logo, body.dimmed .info, body.dimmed .group-head, body.dimmed .tile-name {
  --text: #F7EFE6; --muted: rgba(247, 239, 230, .74); color: var(--text);
}
/* ovládanie má plné sklo, aby nepreberalo stmavenú scénu pod sebou */
body.dimmed .controls { background: var(--glass-strong); }
.logo, .info, .controls, .group-head, .tile { transition: filter .35s ease; }
body.dimmed .logo, body.dimmed .info, body.dimmed .controls, body.dimmed .group-head, body.dimmed .tile { filter: brightness(.32); }
body.dimmed .logo:hover, body.dimmed .logo:focus-visible,
body.dimmed .info:hover,
body.dimmed .controls:hover, body.dimmed .controls:has(:focus-visible),
body.dimmed .group-head:hover,
body.dimmed .tile:hover, body.dimmed .tile:focus-visible { filter: none; }

/* ---------- horný riadok ---------- */
.topbar {
  top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 14px;
  padding: max(14px, env(safe-area-inset-top)) var(--gut) 24px;
  background: linear-gradient(var(--shade), transparent);
}
/* logo: slovo v písme nadpisov, bodka nad „i“ je pixel vo farbe aktuálneho packu
   (rovnaké štvorčeky ako pri názve packu a na kartách) */
.logo { display: inline-flex; align-items: center; height: var(--row); font: 600 21px/1 var(--display); letter-spacing: -.03em; color: var(--text); text-decoration: none; }
.logo-i { position: relative; }
.logo-i::before { content: ''; position: absolute; left: 50%; top: .18em; width: .18em; height: .18em; margin-left: -.09em; background: var(--accent); transition: background-color .6s ease; }
.pill { display: inline-flex; align-items: center; justify-content: center; height: var(--row); padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--text); background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); white-space: nowrap; }
.pill:hover { background: var(--glass-strong); }
.pill-quiet { font-weight: 500; }
.pill-solid { background: var(--solid); color: var(--solid-text); }
.pill-solid:hover { background: var(--solid); opacity: .9; }

/* ---------- spodná časť: informácie, ovládanie, pás ---------- */
.deck {
  left: 0; right: 0; bottom: 0;
  display: grid; gap: 14px;
  /* dole len toľko, aby názvy pod dlaždicami nekolidovali s pruhom domov na iPhone (ten má okolo 8 px od spodku) */
  padding: 90px var(--gut) max(14px, calc(env(safe-area-inset-bottom) - 14px));
  background: linear-gradient(transparent, var(--shade) 42%);
}
.info { max-width: 760px; }
.meta { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.dot { width: 10px; height: 10px; flex: none; background: var(--accent); }
.title { margin: 0; font: 600 clamp(28px, 4vw, 52px)/1.06 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.desc { margin: 8px 0 0; max-width: 62ch; font-size: 16px; color: var(--muted); }

.controls {
  display: flex; align-items: center; gap: 2px;
  width: max-content; max-width: 100%; height: 60px; padding: 0 8px;
  border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.ctl { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--row); min-width: var(--row); padding: 0 10px; border-radius: 999px; font-size: 14px; font-weight: 500; line-height: 1; color: var(--text); white-space: nowrap; }
.ctl:hover { background: var(--hover); }
.ctl svg { width: 22px; height: 22px; flex: none; }
/* ikonka v <i> ako blok: inak sedí na účiari riadka a je v tlačidle posunutá nahor */
.ctl > i, .ctl > i > svg, .lib-x > i, .lib-x > i > svg, .lib-search-x > i, .lib-search-x > i > svg { display: block; }
.ctl-main { width: 48px; min-width: 48px; height: 48px; padding: 0; margin: 0 4px; background: var(--solid); color: var(--solid-text); }   /* ⏮ ▶ ⏭: play v strede */
.ctl-main:hover { background: var(--solid); opacity: .9; }
.ctl-main svg { width: 24px; height: 24px; }
.ctl[aria-pressed="true"], .ctl.on { background: var(--hover); box-shadow: inset 0 -2px 0 var(--accent); }
#moreBtn[aria-expanded="true"] { background: var(--hover); }
.ctl-text { font-variant-numeric: tabular-nums; }
.ctl-vol { cursor: default; padding-left: 4px; padding-right: 4px; gap: 6px; }
.ctl-vol:hover { background: none; }
/* reproduktor: ťuknutie stlmí, podržanie ukáže posuvník (na mobile) */
.ctl-mute { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 999px; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.ctl-mute:hover { background: var(--hover); }
.sep { width: 1px; height: 24px; margin: 0 6px; background: var(--line); flex: none; }
.ctl-cap { display: none; }   /* popis pod ikonou len na mobile */

/* PWA spustená z plochy: text sa neoznačuje omylom myšou ani prstom (políčka na písanie ostávajú) */
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
  body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; }
}
html.pwa body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.pwa input, html.pwa textarea { -webkit-user-select: text; user-select: text; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 96px; height: var(--row); margin: 0; background: transparent; cursor: pointer; --p: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--text) 0 var(--p), var(--line) var(--p) 100%); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border: 0; border-radius: 50%; background: var(--text); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--text); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--text); }

/* pás stôp */
.rail {
  display: flex; gap: 28px; overflow-x: auto;
  margin: 0 calc(-1 * var(--gut)); padding: 4px var(--gut) 6px;
  scroll-padding-inline: var(--gut); scrollbar-width: none;
  overscroll-behavior-x: contain;   /* švih touchpadom na začiatku pásu nesmie znamenať „späť“ v prehliadači */
}
.rail::-webkit-scrollbar { display: none; }
/* prepínač pásu „Up next | Recently played“: stojí v riadku hlavičiek skupín, pás sa pod ním posúva (hlavička prvej
   skupiny začína za ním); jazdec ako záložky v Explore */
.rail-wrap { position: relative; min-width: 0; }
.rail-views { position: absolute; z-index: 2; left: 0; top: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 2px; border-radius: 999px; background: var(--glass-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.rail-views [role=tab], .rail-views .ind-item { display: inline-flex; align-items: center; justify-content: center; height: 24px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .2s; }
.rail-views [role=tab]:hover { color: var(--text); }
.rail-views [role=tab]:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.rail-ind { top: 2px; bottom: 2px; }
.rail .group:first-child .group-head { padding-left: var(--rv-w, 0px); }
body.fold-1 .rail-wrap, body.fold-2 .rail-wrap { display: none; }
/* prázdna história: jedna široká dlaždica s vetou, výška ako ostatné (pás neposkočí) */
.tile.tile-empty { width: 346px; cursor: default; }
.tile-empty .tile-art { display: grid; place-items: center; padding: 0 18px; text-align: center; font-size: 13px; color: var(--muted); background: var(--hover); aspect-ratio: auto; height: 94.5px; }
/* prichytávanie k dlaždiciam len pri dotyku; myš a koliesko posúva app.js (hscroll) */
@media (hover: none) and (pointer: coarse) { .rail { scroll-snap-type: x proximity; } }
/* pásy, ktoré sa dajú chytiť myšou: ťahanie neoznačuje text */
.rail, .lib-tabs, .chips { -webkit-user-select: none; user-select: none; }
.dragging, .dragging button { cursor: grabbing; }
.group { flex: none; }
.group-head { min-height: 22px; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.group-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--text); }
.group-name::before { content: ''; width: 8px; height: 8px; background: var(--accent); }
.tiles { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
/* skupiny bez packu (naposledy, podobné, Library): bez farebného štvorčeka */
.group-plain .group-name::before { display: none; }
.group-plain .group-name { font-weight: 500; color: var(--muted); }
.group-more .group-head { visibility: hidden; }
/* hlavička packu: kúpa celého packu priamo z pásu */
.group-buy { height: 22px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--accent); font-size: 12px; font-weight: 600; color: var(--text); }
.group-buy:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
body.idle .group-buy { pointer-events: none; }
/* koniec pásu: odkaz do Library alebo Explore v tvare dlaždice */
.tile-more .tile-art { display: grid; place-content: center; justify-items: center; gap: 4px; background: var(--hover); color: var(--text); font-size: 13px; font-weight: 600; }
.tile-more .tile-art svg { width: 24px; height: 24px; }
.tile-more:hover .tile-art { background: var(--line); }
.tile { display: grid; gap: 6px; width: 168px; text-align: left; scroll-snap-align: start; border-radius: 8px; }
.tile:focus-visible { outline: none; }
.tile-art { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: rgba(0, 0, 0, .3); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s; }
.tile-art canvas { width: 100%; height: 100%; }
.tile:hover .tile-art, .tile:focus-visible .tile-art { box-shadow: 0 0 0 2px var(--text); }
.tile[data-state="playing"] .tile-art { box-shadow: 0 0 0 2px var(--accent); }
.tile-name { font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile[data-state="playing"] .tile-name, .tile[data-state="shown"] .tile-name, .tile:hover .tile-name { color: var(--text); }
.tile-flag:empty { display: none; }
.tile-flag { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 999px; background: rgba(10, 6, 19, .72); color: #fff; font-size: 11px; font-weight: 600; }
.tile-flag svg { width: 14px; height: 14px; }
.tile-soon .tile-art { background: repeating-conic-gradient(rgba(127, 127, 160, .28) 0 25%, rgba(40, 30, 60, .4) 0 50%) 0 0 / 4px 4px; }
.tile-soon .tile-flag { top: auto; bottom: 6px; right: 6px; }
.tile-soon { cursor: default; opacity: .8; }
/* charakter zvuku: malé ikonky v rohu dlaždice (názvy sú v title a v aria-label dlaždice) */
.tile-feel { position: absolute; left: 6px; bottom: 6px; display: flex; align-items: center; gap: 3px; height: 22px; padding: 0 6px; border-radius: 999px; background: rgba(10, 6, 19, .72); color: #fff; }
.tile-feel .feel-i, .meta-feel .feel-i { display: grid; }
.tile-feel svg { width: 13px; height: 13px; }
.meta-feel { display: inline-flex; align-items: center; gap: 5px; margin-left: 9px; vertical-align: -3px; }
.meta-feel svg { width: 15px; height: 15px; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.bars i { width: 3px; background: currentColor; animation: eq 1s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: -.3s; }
.bars i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 12px; } }

/* ---------- panely ---------- */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(5, 3, 12, .5); }
.sheet {
  position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; margin: 0 auto;
  width: min(560px, 100%); max-height: 92vh; overflow: auto;
  border-radius: 22px 22px 0 0; background: var(--glass-strong); color: var(--text);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .3);
  animation: sheet-up .35s var(--ease);
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }
.sheet-art { width: 100%; aspect-ratio: 16 / 7; }
.sheet-body { padding: 24px 24px max(24px, env(safe-area-inset-bottom)); }
.sheet h2 { margin: 0; font: 600 24px/1.2 var(--display); letter-spacing: -0.01em; }
.sheet-lead { margin: 10px 0 0; color: var(--muted); }
.offers { display: grid; gap: 10px; margin-top: 20px; }
.offer { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 16px 18px; border-radius: 14px; text-align: left; border: 1px solid var(--line); background: var(--hover); }
.offer:hover { border-color: var(--text); }
.offer-name { font-weight: 600; }
.offer-price { grid-row: span 2; align-self: center; font-weight: 600; white-space: nowrap; }
.offer-note { font-size: 14px; color: var(--muted); }
.offer-premium { border-color: var(--accent); }
.sheet-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.sheet-close { height: var(--row); margin-top: 18px; padding: 0 18px; border-radius: 999px; font-weight: 600; background: var(--hover); }
.form { display: grid; gap: 8px; margin-top: 20px; }
.form label { margin-top: 8px; font-size: 15px; font-weight: 500; }
.form input { height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--hover); color: var(--text); font-size: 16px; }
.form .pill { justify-self: start; margin-top: 14px; }

/* ---------- tlačidlá v hornej lište ---------- */
.pill svg { width: 20px; height: 20px; flex: none; }
.count:empty { display: none; }
.ctl .count { margin-left: -2px; }
.count { display: inline-block; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }

/* ---------- knižnica (modálne okno) ---------- */
.lib {
  position: fixed; z-index: 21; inset: 0; margin: auto;
  width: min(1640px, calc(100% - 2 * var(--gut))); height: min(1240px, calc(100% - 40px));     /* skoro celá obrazovka PC */
  display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr);
  border-radius: 22px; overflow: hidden; background: var(--glass-strong); color: var(--text);
  -webkit-backdrop-filter: blur(28px) saturate(1.2); backdrop-filter: blur(28px) saturate(1.2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45); animation: lib-in .35s var(--ease);
}
@keyframes lib-in { from { transform: translateY(16px) scale(.985); opacity: 0; } }
@keyframes lib-up { from { transform: translateY(100%); } }
@keyframes fold-in { from { opacity: 0; transform: translateY(14px); } }
.lib-head { display: flex; align-items: center; gap: 18px; padding: 16px 16px 14px 28px; border-bottom: 1px solid var(--line); }
.lib-head h2 { margin: 0; font: 600 22px/1 var(--display); letter-spacing: -.01em; }
.lib-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; min-width: 0; padding: 4px; border-radius: 999px; background: var(--hover); overflow-x: auto; }
.lib-tabs [role=tab], .lib-tabs .ind-item { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.lib-tabs [role=tab]:hover { color: var(--text); }
.lib-tabs { position: relative; }
.lib-tabs [role=tab] { transition: color .2s; }
/* jazdec: podklad vybranej záložky, presúva sa medzi záložkami (aj za prstom pri potiahnutí obsahu) */
/* jazdec je nad položkami a nesie ich kópiu vo farbe vybranej položky (slider() v app.js) */
.tab-ind { position: absolute; z-index: 2; top: 4px; bottom: 4px; left: 0; width: 0; overflow: hidden; border-radius: 999px; background: var(--solid); pointer-events: none; transition: transform .34s var(--ease), opacity .2s; }
.tab-ind.instant, .tab-ind.instant .ind-copy { transition: none; }
.ind-copy { position: absolute; left: 0; top: 0; transition: transform .34s var(--ease); }
.tab-ind .ind-copy .ind-item { position: absolute; color: var(--solid-text); }
.tab-ind.off { opacity: 0; }
.lib-tabs [role=tab] svg { width: 18px; height: 18px; }
.lib-tabs.more-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }
.lib-tabs.more-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent); }
.lib-tabs.more-l.more-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent); }
.lib-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.lib-x { flex: none; display: grid; place-items: center; width: var(--row); height: var(--row); border-radius: 999px; }
.lib-x:hover { background: var(--hover); }
.lib-cart { position: relative; }
.lib-cart[aria-pressed="true"] { background: var(--solid); color: var(--solid-text); }
/* Premium v hlavičke Explore: vždy na jedno ťuknutie, vo farbe značky */
.lib-cart .count { position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; line-height: 18px; }
.lib-x svg { width: 22px; height: 22px; }
.lib-body { overflow-y: auto; overscroll-behavior: contain; padding: 22px 28px 36px; }
/* Explore: vodorovné potiahnutie prepína záložky (app.js), zvislé posúva obsah; štipnutie ostáva, kde ho prehliadač pozná */
#sheetLib .lib-body { position: relative; overflow-x: hidden; touch-action: pan-y; touch-action: pan-y pinch-zoom; }
/* susedná záložka čaká vykreslená a neviditeľná na mieste obsahu; pri potiahnutí sa ukáže vedľa prsta (app.js) */
.pane-park { position: absolute; top: 0; left: 0; right: 0; height: 100%; padding: inherit; overflow: hidden; visibility: hidden; pointer-events: none; }
.pane-park.pane-peek { visibility: visible; }
@keyframes pane-in-r { from { transform: translateX(56px); opacity: 0; } }
@keyframes pane-in-l { from { transform: translateX(-56px); opacity: 0; } }
.pane.in-r { animation: pane-in-r .3s var(--ease); }
.pane.in-l { animation: pane-in-l .3s var(--ease); }
/* Library: počet stôp a prepínač zobrazenia (riadky, mriežka, karty) */
.mine-bar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
/* hľadanie: lupa v hlavičke otvorí pole namiesto záložiek (Explore) alebo počtu stôp (Library) */
.lib-search { flex: 1; min-width: 0; max-width: 640px; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 4px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--hover); color: var(--muted); }
.lib-search[hidden] { display: none; }
.lib-search:focus-within { border-color: var(--text); color: var(--text); }
.lib-search > i, .lib-search > i svg { display: block; width: 19px; height: 19px; flex: none; }
.lib-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none; }
.lib-search input:focus-visible { outline: none; }
.lib-search input::placeholder { color: var(--muted); }
.lib-search input::-webkit-search-cancel-button { display: none; }
.lib-search-x { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; color: var(--muted); }
.lib-search-x:hover { color: var(--text); background: var(--hover); }
.lib-search-x svg { width: 18px; height: 18px; }
.lib-head.searching .lib-tabs, .lib-head.searching .lib-sub, .lib-head.searching .lib-search-btn { display: none; }
/* výsledky: kategórie ako štítky, ktoré sa zalamujú; druh (pack, miesto, štýl) menším písmom */
.chips-wrap { flex-wrap: wrap; overflow: visible; }
.chip small { font-size: 12px; font-weight: 500; opacity: .75; }
#searchBox .mine-head:first-child, #searchBox .pane-sub:nth-child(2) { margin-top: 0; }
.search-none { margin-top: 8px; }
.lib-views { position: relative; display: flex; gap: 2px; margin-left: auto; padding: 3px; border-radius: 999px; background: var(--hover); }
.lib-views button, .lib-views .ind-item { display: grid; place-items: center; width: 40px; height: 32px; padding: 0; border-radius: 999px; color: var(--muted); transition: color .2s; }
.lib-views button:hover { color: var(--text); }
/* ikonka ako blok: inak ju riadok textu (účiar) posunie mimo stred tlačidla */
.lib-views i, .lib-views svg { display: block; }
.lib-views svg { width: 19px; height: 19px; }
.view-ind { top: 3px; bottom: 3px; }
.pane:focus { outline: none; }
.pane-lead { margin: 0 0 16px; max-width: 72ch; color: var(--muted); }
.pane-sub { margin: 32px 0 12px; font-size: 15px; font-weight: 600; color: var(--muted); }
.empty { margin: 0 0 14px; color: var(--muted); }
.chips { display: flex; gap: 8px; margin: 0 0 18px; overflow-x: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--solid); color: var(--solid-text); border-color: transparent; }
.chip svg { width: 16px; height: 16px; }
.chip.is-on { background: var(--solid); color: var(--solid-text); border-color: transparent; }
/* Sounds: dva riadky filtrov (použitie, miesto, štýl | charakter zvuku), filtre platia naraz */
#useChips { margin-bottom: 10px; }
/* miesto, štýl a radenie: štítok, ktorý otvorí menu (.pop); šípka sa pri otvorenom menu otočí */
.chip-sel { gap: 2px; padding-right: 9px; }
.chip-sel > svg:last-child { transition: transform .2s var(--ease); }
.chip-sel[aria-expanded="true"] { color: var(--text); border-color: var(--text); }
.chip-sel.is-on[aria-expanded="true"] { border-color: transparent; }
.chip-sel[aria-expanded="true"] > svg:last-child { transform: rotate(180deg); }
.chip-x svg { margin-right: -4px; }
.sounds-count { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; row-gap: 4px; margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.sounds-count .link { font-size: 14px; }
/* Library: štítky All / Packs / Tracks a radenie, rad Continue, packy s postupom */
.mine-chips { margin: 0 0 6px; }
.chip-sort svg:first-child { width: 17px; height: 17px; }
.mine-cont { margin: 18px 0 8px; }
.mine-strip { margin-top: 32px; }
.mpack-bar { height: 4px; margin-top: 10px; border-radius: 4px; background: var(--line); overflow: hidden; }
.mpack-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
/* pack v Library: malý obrázok vedľa názvu a postupu, tlačidlá pod nimi cez celú šírku */
.mpacks { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.mpack { grid-template-columns: 132px minmax(0, 1fr); grid-template-rows: auto auto; }
.mpack .card-art { grid-row: 1; grid-column: 1; aspect-ratio: 16 / 9; margin: 14px 0 0 14px; overflow: hidden; border-radius: 10px; }
.mpack .card-body { grid-row: 1; grid-column: 2; padding: 12px 14px 0 12px; }
.mpack .card-meta { font-size: 12.5px; }
.mpack .card-actions { grid-row: 2; grid-column: 1 / 3; }
.mpack .btn-cart { flex: none; }

/* Featured: rady ako v obchodoch s hudbou – nadpis, „See all“ a vodorovný pás dlaždíc až po okraje panelu */
.shelf + .shelf, .shelf + .prem-ban, .prem-ban + .shelf { margin-top: 32px; }
.shelf-head { display: flex; align-items: baseline; gap: 12px; }
.shelf-title { margin: 0; font: 600 20px/1.2 var(--display); letter-spacing: -.01em; }
.shelf-all { margin-left: auto; display: inline-flex; align-items: center; gap: 1px; font-size: 14px; font-weight: 600; color: var(--muted); }
.shelf-all:hover { color: var(--text); }
.shelf-all svg { width: 16px; height: 16px; }
.shelf-sub { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.shelf-row { display: flex; gap: 14px; margin: 12px -28px 0; padding: 2px 28px 4px; overflow-x: auto; scroll-padding: 0 28px; }
.shelf-row > * { flex: none; }
/* šípky radu (len myš): na okrajoch okna, ukážu sa pri prechode nad radom, na začiatku a na konci sa skryjú */
.shelf-track { position: relative; }
.shelf-row { position: relative; }   /* offsetLeft kariet voči radu (šípky posúvajú na hranu karty) */
.shelf-arrow { position: absolute; z-index: 3; top: calc(50% + 6px); display: grid; place-items: center; width: 44px; height: 44px; margin-top: -30px; border-radius: 999px; background: var(--glass-strong); color: var(--text); box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(0, 0, 0, .28); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.shelf-arrow svg { width: 22px; height: 22px; }
.shelf-arrow:hover { background: var(--solid); color: var(--solid-text); }
.shelf-arrow-prev { left: -20px; }
.shelf-arrow-next { right: -20px; }
.shelf-track:hover .shelf-arrow { opacity: 1; pointer-events: auto; }
.shelf-track.at-start .shelf-arrow-prev, .shelf-track.at-end .shelf-arrow-next { opacity: 0; pointer-events: none; }
@media (hover: none) and (pointer: coarse) { .shelf-arrow { display: none; } }
.shelf-row > .mtile { width: 200px; }
.shelf-hero .pack { width: min(520px, 86%); aspect-ratio: 16 / 10; }
@media (hover: none) and (pointer: coarse) { .shelf-row { scroll-snap-type: x proximity; } .shelf-row > * { scroll-snap-align: start; } }
.tile-flag.flag-free { background: var(--accent); color: #160C22; }
.mtile.is-running .tile-flag { display: none; }   /* hrá: v rohu je ekvalizér */
/* zvuky: mriežka dlaždíc s obrázkom scény pod tmavým závojom (ako žánre v Spotify) */
.feel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.feel-tile { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; gap: 8px; height: 84px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #1A1026; color: #F7EFE6; text-align: left; transition: border-color .2s; }
.feel-tile::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(10, 6, 20, .86) 10%, rgba(10, 6, 20, .2)); }
.feel-tile-art { position: absolute; inset: 0; z-index: -2; }
.feel-tile-art canvas { width: 100%; height: 100%; }
.feel-tile:hover { border-color: var(--text); }
.feel-tile-in { display: flex; align-items: center; gap: 10px; min-width: 0; }
.feel-tile svg { width: 22px; height: 22px; flex: none; }
.feel-tile-text { display: grid; min-width: 0; }
.feel-tile-name { font: 600 16px/1.12 var(--display); letter-spacing: -.01em; }   /* dlhší názov (Steady noise) sa zalomí */
.feel-tile-n { font-size: 12.5px; color: rgba(247, 239, 230, .76); }

/* tlačidlá v knižnici */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--text); }
.btn:hover { background: var(--hover); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:disabled { cursor: default; opacity: .7; }
.btn-solid { background: var(--solid); color: var(--solid-text); border-color: transparent; }
.btn-solid:hover { background: var(--solid); opacity: .9; }
.btn-cart { background: var(--accent); color: #160C22; border-color: transparent; }
.btn-cart:hover { background: var(--accent); opacity: .9; }
.btn-cart.is-in { background: transparent; color: var(--text); border-color: var(--accent); }
.btn-try[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); font-variant-numeric: tabular-nums; }
.link { padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: var(--text); }

/* single: karta s obrázkom, ukážkou a cenou */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card { display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: var(--hover); transition: border-color .2s, box-shadow .2s; }
.card.trying { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.card-art { position: relative; aspect-ratio: 16 / 9; cursor: pointer; background: rgba(0, 0, 0, .25); }
.card-art canvas { width: 100%; height: 100%; }
.card-badge { position: absolute; top: 10px; left: 10px; height: 24px; padding: 0 9px; border-radius: 999px; background: rgba(10, 6, 19, .72); color: #fff; font-size: 12px; font-weight: 600; line-height: 24px; }
.card-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); opacity: 0; transition: opacity .3s; }
.card-prog i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 1s linear; }
.card.trying .card-prog { opacity: 1; }
.card-body { padding: 14px 16px 4px; }
.card-top { display: flex; align-items: baseline; gap: 10px; }
.card-name { flex: 1; min-width: 0; margin: 0; font: 600 17px/1.25 var(--display); letter-spacing: -.01em; }
.card-meta { margin: 5px 0 0; font-size: 13px; color: var(--muted); }
.card-pack { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.card-pack::before { content: ''; width: 7px; height: 7px; background: var(--accent); }
.card-desc { margin: 8px 0 0; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* charakter zvuku na karte: ikonka + názov, klik vyfiltruje podobné stopy */
.card-feel { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 0; }
.feel-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px 0 7px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); }
.feel-chip:hover { color: var(--text); background: var(--hover); }
.feel-chip svg { width: 15px; height: 15px; flex: none; }
.card-actions { display: flex; align-items: center; gap: 8px; padding: 12px 14px 14px; }
.card-actions .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; }
.card-actions .btn span { overflow: hidden; text-overflow: ellipsis; }
.card-price { flex: none; font-size: 16px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.card-price-own, .card-price-soon { font-size: 13px; font-weight: 600; color: var(--muted); }
.card-soon .card-art { cursor: default; background: repeating-conic-gradient(rgba(127, 127, 160, .28) 0 25%, rgba(40, 30, 60, .4) 0 50%) 0 0 / 6px 6px; }
.cards-soon .card { opacity: .8; }
/* hrajúca stopa v Explore / Library: rámik vo farbe packu, ekvalizér na obrázku */
.card.is-playing, .mtile.is-playing .mtile-art, .mrow.is-playing { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.now-badge { position: absolute; top: 8px; right: 8px; display: none; place-items: center; width: 28px; height: 24px; border-radius: 999px; background: var(--accent); color: #160C22; }
.now-badge .bars { height: 11px; }
.is-running .now-badge { display: grid; }
.btn-icon, .card-actions .btn-icon { flex: none; width: 40px; padding: 0; }
.btn-save { color: var(--text); }
.btn-save.is-in { border-color: var(--accent); }
.btn-save.is-in svg { color: var(--accent); }
.btn-save.is-in .ic-on { stroke: #160C22; }
.btn-save svg { width: 22px; height: 22px; }
/* Library ako riadky: malý obrázok, názov, pack s charakterom zvuku, pridať / play; na širokej ploche dva stĺpce */
.mrows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 8px 12px; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--hover); transition: border-color .2s, box-shadow .2s; }
.mrow-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; text-align: left; }
.mrow-art { position: relative; flex: none; width: 96px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 9px; background: rgba(0, 0, 0, .25); }
.mrow-art canvas { width: 100%; height: 100%; }
/* prázdna Library: čo sem patrí a dve cesty, kde to nájsť (žiadne cudzie stopy v Library) */
.mine-empty { display: grid; justify-items: center; gap: 10px; max-width: 460px; margin: 48px auto 28px; text-align: center; }
.mine-empty-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 999px; background: var(--hover); color: var(--brand); }
.mine-empty-ic svg { width: 30px; height: 30px; }
.mine-empty h3 { margin: 6px 0 0; font: 600 22px/1.2 var(--display); letter-spacing: -.01em; }
.mine-empty p { margin: 0; color: var(--muted); text-wrap: balance; }
.mine-empty p svg { width: 16px; height: 16px; vertical-align: -3px; }
.mine-empty-act { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
#mineBox .mine-chips + .shelf { margin-top: 18px; }
/* zámok na karte v Library (stopa hrá celá len s Premium alebo po kúpe): vľavo hore, vpravo je odznak hrania */
.tile-flag.flag-left { left: 6px; right: auto; }
.mrow-art .tile-flag { top: 4px; min-width: 20px; height: 20px; padding: 0 4px; }
.mrow-art .tile-flag svg { width: 12px; height: 12px; }
.mrow-art .now-badge { top: 4px; right: 4px; width: 24px; height: 20px; }
.mrow-text { min-width: 0; display: grid; gap: 3px; }
.mrow-name { font: 600 16px/1.25 var(--display); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow-meta { display: flex; align-items: center; min-width: 0; font-size: 13px; color: var(--muted); }
.mrow-info { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow-feel { flex: none; display: flex; align-items: center; gap: 5px; margin-left: 9px; }
.mrow-feel .feel-i { display: grid; }
.mrow-feel svg { width: 15px; height: 15px; }
.mrow .btn-icon { height: 40px; }
/* Library ako mriežka: obrázok s ikonkami charakteru zvuku (ako pás stôp) a názov, ťuknutie spustí */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px 12px; }
.mtile { display: grid; gap: 2px; min-width: 0; text-align: left; }
.mtile-art { position: relative; display: block; aspect-ratio: 16 / 9; margin-bottom: 6px; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); transition: border-color .2s, box-shadow .2s; }
.mtile-art canvas { width: 100%; height: 100%; }
.mtile:hover .mtile-art { border-color: var(--text); }
.mtile-name { font: 600 14.5px/1.25 var(--display); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtile-meta { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-hint { margin: 24px 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 14px; border: 1px dashed var(--line); }
.mine-hint p { flex: 1 1 260px; margin: 0; color: var(--muted); }
.mine-hint p svg { width: 18px; height: 18px; vertical-align: -4px; color: var(--text); }

/* packy: štvorcové karty, obrázok cez celú plochu */
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
/* Packs po sekciách: rady (sezóna, New) a nadpis All packs idú cez celú mriežku, karty All packs sú jej bunky */
.packs > .shelf, .packs > .packs-all { grid-column: 1 / -1; min-width: 0; }
.packs > .shelf + .shelf, .packs > .shelf + .packs-all { margin-top: 14px; }
.shelf-packs .pack { width: 300px; }
.shelf-hero .pack-name { font-size: 26px; }
/* úzka karta packu (rady na mobile ~360 px): tlačidlá sa zmestia – užšie okraje, „Add to cart“ bez ikonky */
.pack { container-type: inline-size; }
@container (max-width: 300px) { .pack-actions { gap: 6px; } .pack-actions .btn { padding: 0 11px; } .pack-actions .btn-cart svg { display: none; } }
.pack { position: relative; isolation: isolate; aspect-ratio: 1; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); background: #1A1026; color: #F7EFE6; }
.pack::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 6, 20, 0) 22%, rgba(10, 6, 20, .55) 48%, rgba(10, 6, 20, .93) 100%); }
.pack-art { position: absolute; inset: 0; z-index: -2; }
.pack-art canvas { width: 100%; height: 100%; object-fit: cover; }
.pack-season { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pack-soon .pack-art { background: radial-gradient(circle at 70% 28%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 62%), repeating-conic-gradient(rgba(127, 127, 160, .25) 0 25%, rgba(40, 30, 60, .5) 0 50%) 0 0 / 8px 8px; }
.pack-badge { position: absolute; top: 12px; left: 12px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(10, 6, 19, .72); color: #fff; font-size: 12.5px; font-weight: 600; line-height: 26px; }
.pack-badge.is-now { background: var(--accent); color: #160C22; }
.pack-body { padding: 16px 16px 14px; }
.pack-name { margin: 0; font: 600 22px/1.15 var(--display); letter-spacing: -.01em; }
.pack-desc { margin: 6px 0 0; font-size: 14px; color: rgba(247, 239, 230, .84); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pack-meta { margin: 6px 0 0; font-size: 13px; color: rgba(247, 239, 230, .66); }
.pack-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.pack-price { margin-right: auto; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pack .btn { color: #F7EFE6; border-color: rgba(247, 239, 230, .3); }
.pack .btn:hover { background: rgba(247, 239, 230, .12); }
.pack .btn-cart { color: #160C22; border-color: transparent; }
.pack .btn-cart:hover { background: var(--accent); }
.pack .btn-cart.is-in { color: #F7EFE6; border-color: var(--accent); background: transparent; }
.art-gradient { overflow: hidden; background: #140B2A; }
.art-gradient i { position: absolute; width: 90%; aspect-ratio: 1; border-radius: 50%; filter: blur(30px); opacity: .85; animation: blob 18s ease-in-out infinite alternate; }
.art-gradient i:nth-child(1) { left: -20%; top: -15%; background: #7A5CFF; }
.art-gradient i:nth-child(2) { right: -25%; top: 10%; background: #FF5C7A; animation-duration: 23s; animation-delay: -6s; }
.art-gradient i:nth-child(3) { left: 10%; bottom: -35%; background: #2EC5FF; animation-duration: 27s; animation-delay: -12s; }
body[data-theme="light"] .art-gradient { background: #FFE9DC; }
body[data-theme="light"] .art-gradient i { opacity: .7; }
@keyframes blob { from { transform: translate(-6%, -4%) scale(1); } to { transform: translate(8%, 6%) scale(1.15); } }

/* plochy v nočných farbách (Premium, baner vo Featured, pruh v Library): rovnaké v svetlej aj tmavej téme;
   jedna tmavá farba a jemný ružový nádych za textom, farby dodajú scény na stene */
.prem-hero, .prem-ban, .mine-strip {
  --text: #F7EFE6; --muted: rgba(247, 239, 230, .76); --line: rgba(247, 239, 230, .22); --hover: rgba(247, 239, 230, .12);
  --solid: #F7EFE6; --solid-text: #160C22;
  color: var(--text);
  background: radial-gradient(90% 140% at 0% 0%, rgba(255, 92, 122, .24), transparent 62%), #150B27;
}
.prem-hero .btn-solid, .prem-ban .btn-solid, .mine-strip .btn-solid { background: var(--brand); color: #160C22; }

/* Featured: Premium ako veľký baner (výška asi dvoch radov), stavba ako na stránke Premium: vľavo text, vpravo stena scén */
.prem-ban {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; min-height: 300px; border-radius: 22px;
}
.prem-ban-copy { width: 52%; padding: 30px 36px; }
.prem-ban h3 { margin: 8px 0 0; font: 600 clamp(26px, 2.9vw, 38px)/1.06 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.prem-ban .prem-price { margin-top: 12px; }
.prem-ban .prem-price strong { font-size: 26px; }
.prem-ban-line { margin: 6px 0 0; max-width: 42ch; font-size: 15px; color: var(--muted); }
.prem-ban-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.prem-ban-act .btn { height: 46px; padding: 0 20px; font-size: 15px; }
.prem-ban-act .btn-quiet { gap: 2px; padding-right: 14px; }
.prem-ban .prem-wall { top: -80px; bottom: -80px; left: 44%; right: -80px; }

/* Premium je podstránka Explore: späť na záložku, z ktorej prišla */
.pane-back { display: inline-flex; align-items: center; gap: 2px; height: 36px; margin: -6px 0 2px -8px; padding: 0 14px 0 6px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--muted); justify-self: start; }
.pane-back:hover { color: var(--text); background: var(--hover); }
.pane-back svg { width: 20px; height: 20px; }

/* premium: vľavo text a cena, vpravo šikmá stena scén, ktorá sa pomaly posúva; pod tým packy a porovnanie */
.prem { display: grid; gap: 16px; }
.prem-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; min-height: 420px;
  border-radius: 22px; box-shadow: 0 20px 50px rgba(20, 8, 40, .28);
}
.prem-copy { width: 50%; padding: 40px 40px 34px; }
/* stena je mimo toku, výšku karty určuje len text */
.prem-wall {
  position: absolute; z-index: -1; top: -90px; bottom: -90px; left: 46%; right: -90px; overflow: hidden;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 10px;
  transform: rotate(-10deg);
  -webkit-mask: linear-gradient(to right, transparent, #000 34%) no-repeat; mask: linear-gradient(to right, transparent, #000 34%) no-repeat;
}
.prem-run { animation: prem-drift 70s linear infinite; }
.prem-col:nth-child(2n) .prem-run { animation-direction: reverse; animation-duration: 85s; }
.prem-col:nth-child(3) .prem-run { animation-duration: 95s; }
@keyframes prem-drift { to { transform: translateY(-50%); } }
.prem-shot { display: block; width: 100%; aspect-ratio: 16 / 9; margin-bottom: 10px; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent), 0 8px 24px rgba(0, 0, 0, .35); }
.prem-kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.prem-copy h3 { margin: 10px 0 0; font: 600 clamp(30px, 3.6vw, 46px)/1.05 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.prem-price { margin: 16px 0 0; font-size: 17px; color: var(--muted); }
.prem-price strong { margin-right: 2px; font: 600 34px/1 var(--display); letter-spacing: -.01em; color: var(--text); font-variant-numeric: tabular-nums; }
.prem-lead { display: inline-block; margin: 16px 0 0; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #FFC4D0; background: rgba(255, 92, 122, .18); }
.prem-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.prem-list li { display: flex; align-items: center; gap: 10px; }
.prem-list svg { width: 18px; height: 18px; flex: none; color: var(--brand); }
.prem-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.prem-act .btn { height: 48px; padding: 0 22px; font-size: 15px; }
.prem-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.prem-sec { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 14px; }
.prem-sub { margin: 0; font: 600 18px/1.2 var(--display); letter-spacing: -.01em; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plan { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 20px; border-radius: 16px; border: 1px solid var(--line); }
.plan-name { margin: 0; font-weight: 600; color: var(--muted); }
.plan-price { margin: 8px 0 0; color: var(--muted); }
.plan-price strong { font: 600 26px/1 var(--display); letter-spacing: -.01em; color: var(--text); font-variant-numeric: tabular-nums; }
.plan-what { flex: 1; margin: 10px 0 16px; font-size: 14.5px; }
.plan-premium { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); }
.plan-tag { position: absolute; top: 18px; right: 18px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--brand); color: #160C22; font-size: 12px; font-weight: 700; line-height: 24px; }

/* Library: čo už mám, oddelené od obchodu (Explore) */
.lib-sub { margin: 0; font-size: 14px; color: var(--muted); white-space: nowrap; }
.mine-strip { display: flex; align-items: center; gap: 16px; padding: 16px 18px 16px 22px; border-radius: 16px; }
.mine-strip-text { flex: 1; min-width: 0; }
.mine-strip-text p:last-child { margin: 3px 0 0; }
.mine-head { display: flex; align-items: baseline; gap: 8px; margin: 30px 0 12px; font: 600 18px/1.2 var(--display); letter-spacing: -.01em; }
.mine-head span { font: 500 14px/1 var(--ui); color: var(--muted); }
.mine-note { margin: -4px 0 14px; color: var(--muted); }
.mine-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.mine-foot p { margin: 0; color: var(--muted); }

/* košík */
.cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.cart-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto var(--row); align-items: center; gap: 14px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--hover); }
.cart-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: rgba(0, 0, 0, .25); box-shadow: 0 0 0 1px var(--accent); }
.cart-art canvas { width: 100%; height: 100%; }
.cart-name { margin: 0; font-weight: 600; }
.cart-kind { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.cart-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-x { display: grid; place-items: center; width: var(--row); height: var(--row); border-radius: 999px; color: var(--muted); }
.cart-x:hover { background: var(--hover); color: var(--text); }
.cart-x svg { width: 20px; height: 20px; }
.cart-foot { display: grid; justify-items: start; gap: 10px; max-width: 760px; margin-top: 20px; }
.cart-sum { margin: 0; font-size: 17px; color: var(--muted); }
.cart-sum strong { margin-left: 6px; font: 600 24px/1 var(--display); color: var(--text); }
.cart-up { margin: 0; color: var(--muted); }
.btn-pay { height: 48px; padding: 0 22px; font-size: 15px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 30; left: 0; right: 0; top: max(70px, calc(env(safe-area-inset-top) + 60px)); margin: 0 auto;
  width: max-content; max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 999px;
  background: var(--solid); color: var(--solid-text); font-size: 15px; font-weight: 500; text-align: center;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
}
.toast.show { opacity: 1; transform: none; }
body.sheet-open .toast { top: auto; bottom: max(28px, env(safe-area-inset-bottom)); }

/* ---------- vyskakovacie menu (⋯ v lište, výber miesta, štýlu a radenia) ----------
   sklo ako okná, riadky ako v zozname; zvolená možnosť má fajku, skratky sú vpravo len pri klávesnici */
.pop {
  position: fixed; z-index: 25; min-width: 230px; max-width: calc(100vw - 24px); padding: 6px; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 18px; background: var(--glass-strong); color: var(--text);
  -webkit-backdrop-filter: blur(28px) saturate(1.2); backdrop-filter: blur(28px) saturate(1.2);
  box-shadow: 0 0 0 1px var(--line), 0 18px 50px rgba(0, 0, 0, .32);
  animation: pop-down .18s var(--ease);
}
.pop.pop-up { animation-name: pop-up; }
@keyframes pop-down { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes pop-up { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.pop-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 15px; font-weight: 500; text-align: left; white-space: nowrap; }
.pop-item:hover { background: var(--hover); }
.pop-item:focus-visible, .pop-seg button:focus-visible { outline-offset: -2px; }
.pop-item > svg { width: 20px; height: 20px; flex: none; }
.pop-item > span { flex: 1; }
.pop-item[aria-checked="true"] { font-weight: 600; }
.pop-check, .pop-check svg { display: block; width: 18px; height: 18px; flex: none; }
.pop-item[aria-checked="false"] .pop-check { visibility: hidden; }
kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 7px; border: 1px solid var(--line); background: var(--hover); font: 600 12.5px/1 var(--ui); color: var(--muted); }
.pop-theme { display: flex; align-items: center; gap: 14px; min-height: 50px; padding: 0 6px 0 12px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.pop-theme-name { display: flex; align-items: center; gap: 12px; flex: 1; }
.pop-theme-name svg { width: 20px; height: 20px; flex: none; }
.pop-seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--hover); }
.pop-seg button { height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--muted); transition: color .2s, background-color .2s; }
.pop-seg button:hover { color: var(--text); }
.pop-seg button[aria-checked="true"] { background: var(--solid); color: var(--solid-text); }
/* dotyk bez klávesnice: skratky nemajú zmysel */
@media (hover: none) and (pointer: coarse) { .pop-item kbd, .pop-keys { display: none; } }

/* klávesové skratky (okno z menu ⋯ alebo klávesom ?) */
.keys { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 10px 18px; margin: 20px 0 0; }
.keys dt { display: flex; gap: 4px; }
.keys dd { margin: 0; color: var(--muted); }
.keys kbd { color: var(--text); }

/* účet: aktívne Premium sa spravuje tu */
.acc-prem { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 14px 14px 18px; border-radius: 16px; background: var(--hover); }
.acc-prem p { flex: 1; margin: 0; font-size: 14.5px; }
.acc-prem .prem-kicker { display: block; margin-bottom: 2px; }

/* po obnovení stránky: zvuk sa rozbehne prvým ťuknutím kdekoľvek, toto tlačidlo to len oznamuje (nie je súčasť .chrome, nezmizne) */
.resume {
  position: fixed; z-index: 15; left: 50%; top: 40%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); height: 56px; padding: 0 24px 0 18px;
  border-radius: 999px; background: var(--solid); color: var(--solid-text); font-size: 16px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35); animation: resume-in .4s var(--ease);
}
.resume span { overflow: hidden; text-overflow: ellipsis; }
.resume b { font-weight: 700; }
.resume svg { width: 22px; height: 22px; flex: none; }
@keyframes resume-in { from { opacity: 0; transform: translate(-50%, -30%); } }

/* ---------- úvodná obrazovka (len nainštalovaná appka) ----------
   Logo v strede na farbe podľa systému; bodka nad „ı“ pulzuje, kým sa appka načíta.
   app.js ju po prvom vykreslení scény odstráni; keby skript zlyhal, zmizne sama po 10 s. */
.splash { display: none; }
@media (display-mode: standalone), (display-mode: fullscreen) {
  .splash {
    position: fixed; z-index: 40; inset: 0;
    display: grid; place-items: center; background: #FFF4EC; color: #22122E;
    animation: splash-out .5s ease 10s forwards;
  }
  .splash.out { animation: splash-out .45s ease forwards; }
}
@media (prefers-color-scheme: dark) { .splash { background: #120A1F; color: #F7EFE6; } }
.splash-logo { width: min(56vw, 260px); height: auto; overflow: visible; }
.splash-dot { fill: #FF5C7A; animation: splash-dot 1s ease-in-out infinite alternate; }
@keyframes splash-dot { from { opacity: .3; } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  .splash-dot { animation: none; }
  .layer, .chrome, .dim, .toast, .tile-art, .card-prog i, .card-prog, .logo, .logo-i::before, .info, .controls, .group-head, .tile { transition: none !important; }
  .sheet, .lib, .art-gradient i, .prem-run, .resume, .rail, .controls, .pane.in-r, .pane.in-l, .pop { animation: none; }
  .chip-sel > svg:last-child, .pop-seg button { transition: none; }
  .tab-ind, .ind-copy, .lib-tabs [role=tab], .lib-views button, canvas.thumb { transition: none; }
  .bars i { animation: none; height: 8px; }
}

/* ---------- mobil ---------- */
@media (max-width: 760px) {
  :root { --row: 40px; }
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .logo { font-size: 19px; }
  .pill { padding: 0 14px; font-size: 14px; }
  .deck { gap: 12px; padding-top: 70px; }
  .title { font-size: 28px; }
  .desc { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  /* ovládanie v dvoch zámerných riadkoch namiesto zalamovania:
     1. prehrávanie: play, predošlá, ďalšia a hlasitosť cez zvyšok šírky
     2. lišta nástrojov s rovnako širokými políčkami (ikona a popis pod ňou, ako tab bar v appkách),
        poradie ako na desktope: časovač, stlmenie | Explore, Library, ⋯ (celá obrazovka, zdieľanie, téma) */
  .controls { width: 100%; height: auto; flex-wrap: wrap; justify-content: space-evenly; row-gap: 0; padding: 6px; border-radius: 22px; -webkit-touch-callout: none; }
  .controls::after { content: ''; order: 1; flex-basis: 100%; height: 0; }   /* zlom medzi riadkami */
  .sep { display: none; }
  /* 1. riadok symetricky: TV · predošlá · play v strede · ďalšia · hlasitosť */
  #castBtn { order: -4; position: relative; }
  #prevBtn { order: -3; }
  .ctl-main { order: -2; width: 56px; min-width: 56px; height: 56px; margin: 0; }
  .ctl-main svg { width: 26px; height: 26px; }
  #nextBtn { order: -1; }
  .ctl-vol { order: 0; position: relative; min-width: 0; padding: 0; }
  #castBtn .count { position: absolute; top: 0; right: -2px; min-width: 16px; height: 16px; margin: 0; padding: 0 4px; font-size: 10px; line-height: 16px; }
  .ctl-mute { width: var(--row); height: var(--row); }
  .ctl-mute[aria-expanded="true"] { background: var(--hover); }
  /* hlasitosť: ten istý posuvník ako na desktope, len otočený na výšku nad reproduktorom (ukáže sa ťuknutím)
     a v rovnakej sklenenej podložke ako lišta ovládania */
  .ctl-vol input[type=range] {
    position: absolute; z-index: 3; left: 50%; bottom: calc(100% + 80px);   /* po otočení 14 px nad lištou */
    width: 180px; height: 48px; margin-left: -90px; padding: 0 18px; border-radius: 999px; touch-action: none;
    background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    transform: rotate(-90deg); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s;
  }
  .ctl-vol.open input[type=range] { opacity: 1; visibility: visible; transition: opacity .2s; }
  /* zbalenie potiahnutím nadol: 1 = bez pásu stôp, 2 = len názov a popis; zvislý pohyb patrí stránke, vodorovný pásu */
  .deck, .rail { touch-action: pan-x; }
  .deck::before { content: ''; position: absolute; top: 46px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--line); }
  body.fold-1 .rail, body.fold-2 .rail, body.fold-2 .controls { display: none; }
  .rail, .controls { animation: fold-in .35s var(--ease); }
  .ctl-tool { order: 2; position: relative; flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; height: 52px; margin-top: 4px; padding: 0 2px; border-radius: 14px; font-size: 10.5px; font-weight: 600; }
  .ctl-tool svg { width: 20px; height: 20px; }
  /* výška riadka > 1, inak orezanie dlhého popisu odstrihne dolné ťahy (g v „Light“) */
  .ctl-tool span:not(.count) { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.35; }
  .ctl-tool .count { position: absolute; top: 3px; left: calc(50% + 5px); min-width: 16px; height: 16px; margin: 0; padding: 0 4px; font-size: 10px; line-height: 16px; }
  #libBtn::before { content: ''; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
  .tile { width: 132px; }
  .tile.tile-empty { width: 274px; }
  .tile-empty .tile-art { height: 74.25px; }
  /* Explore a Library ako panel zdola, ktorý nesiaha po vrch: hlavička je vždy pod stavovým riadkom a hodinami
     (nezávisle od toho, čo iOS hlási ako bezpečnú zónu), nad panelom ostane stmavená scéna, ťuknutím na ňu sa zavrie */
  .lib { top: calc(max(env(safe-area-inset-top), 44px) + 20px); bottom: 0; width: 100%; height: auto; margin: 0; border-radius: 22px 22px 0 0; animation-name: lib-up; }
  .lib-head { position: relative; flex-wrap: wrap; gap: 10px; padding: 20px 10px 10px 18px; touch-action: pan-x; }
  /* aj záložky a tlačidlá v hlavičke: zvislý pohyb na nich ťahá panel (inak by si ho vzal prehliadač) */
  .lib-head * { touch-action: pan-x; }
  .lib-head::before { content: ''; position: absolute; top: 7px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--line); }
  .lib-tabs { order: 3; width: 100%; }
  .lib-tabs [role=tab], .lib-tabs .ind-item { padding: 0 12px; }
  .mine-bar { order: 3; flex-basis: 100%; }
  #libSearch { order: 3; flex-basis: 100%; max-width: none; }
  .lib-search { height: 42px; max-width: none; }
  .mrow-art { width: 84px; }
  .mrow-style { display: none; }   /* úzky riadok: pack a ikonky charakteru, štýl je na karte */
  .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mpacks { grid-template-columns: minmax(0, 1fr); }
  .mpack { grid-template-columns: 116px minmax(0, 1fr); }
  .shelf-row { gap: 12px; margin: 10px -16px 0; padding: 2px 16px 4px; scroll-padding: 0 16px; }
  .shelf-row > .mtile { width: 150px; }
  .shelf-hero .pack { aspect-ratio: 4 / 3; }
  #packCards .shelf-hero .pack { width: 88%; aspect-ratio: 1; }   /* mobil: výklad o kúsok väčší než New */
  .shelf-packs .pack { width: min(300px, 84%); }
  .feel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .feel-tile { height: 72px; padding: 10px 12px; }
  .feel-tile-name { font-size: 15px; }
  .lib-body { padding: 16px 16px max(28px, env(safe-area-inset-bottom)); }
  #sheetLib .shelf, #sheetMine .shelf { margin-inline: -16px; padding-inline: 16px; }
  .prem-hero { display: block; min-height: 0; }
  .prem-wall { top: -60px; bottom: auto; left: -70px; right: -70px; height: 250px; -webkit-mask: linear-gradient(#000 35%, transparent) no-repeat; mask: linear-gradient(#000 35%, transparent) no-repeat; }
  .prem-copy { width: auto; padding: 168px 22px 24px; }
  .prem-ban { display: block; min-height: 0; }
  .prem-ban .prem-wall { top: -50px; bottom: auto; left: -70px; right: -70px; height: 220px; -webkit-mask: linear-gradient(#000 35%, transparent) no-repeat; mask: linear-gradient(#000 35%, transparent) no-repeat; }
  .prem-ban-copy { width: auto; padding: 138px 20px 22px; }
  .prem-ban-act .btn-solid { flex: 1 1 100%; }
  .prem-ban-act .btn-quiet { margin: 0 auto; border-color: transparent; }
  .mine-strip { flex-wrap: wrap; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .cart-row { grid-template-columns: 72px minmax(0, 1fr) auto 36px; gap: 10px; }
}
/* veľmi úzke telefóny: menšie popisy v lište nástrojov */
@media (max-width: 340px) {
  .ctl-tool { padding: 0; font-size: 9.5px; letter-spacing: -.01em; }
}

/* ---------- nainštalovaná appka (PWA) cez celú obrazovku ----------
   iOS 26 (WebKit 301108): pri black-translucent + viewport-fit=cover je okno appky o výšku stavového riadku
   kratšie než displej a WebKit pod túto hranu fixné prvky nekreslí (scéna, lišta, úvodná obrazovka) – dole ostal pás.
   Okno sa zväčší na celý displej, až keď je stránka aspoň taká vysoká ako displej; min() so 100lvh zabráni
   posúvaniu tam, kde chyba nie je. Pozadie html je farba, ktorou iOS natrie prípadný zvyšok mimo stránky.
   Pri štarte appky okno ešte chvíľu ostáva krátke a pod úvodnou obrazovkou by bolo vidieť čierne body ako pruh,
   preto má body počas nej jej farbu. */
@media (display-mode: standalone), (display-mode: fullscreen) {
  html { min-height: min(100lvh, calc(100% + env(safe-area-inset-top))); }
  html, body:has(> .splash) { background: #FFF4EC; }
}
@media (display-mode: standalone) and (prefers-color-scheme: dark), (display-mode: fullscreen) and (prefers-color-scheme: dark) {
  html, body:has(> .splash) { background: #120A1F; }
}

/* ---------- prenos na TV: panel v telefóne ---------- */
.ctl#castBtn.on { color: var(--text); }
.cast-row { display: flex; gap: 10px; }
.cast-row input { flex: 1 1 0; width: 0; min-width: 0; font: 600 22px/1 var(--ui); letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.cast-row .pill { margin-top: 0; height: 50px; }
.cast-err { margin: 6px 0 0; font-size: 14px; color: #FF8A9E; }
body[data-theme="light"] .cast-err { color: #B4233F; }
.cast-screens { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.cast-screens h3 { margin: 0 0 10px; font: 600 17px/1.3 var(--display); }
.cast-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cast-item { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 14px; border-radius: 14px; background: var(--hover); }
.cast-item svg { width: 22px; height: 22px; flex: none; }
.cast-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cast-st { font-size: 13px; color: var(--muted); white-space: nowrap; }
.cast-st::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #5BD68A; vertical-align: 1px; }
.cast-st.off::before { background: var(--muted); }
.cast-x { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; }
.cast-x:hover { background: var(--hover); }
.cast-x svg { width: 18px; height: 18px; }
.cast-vol { display: flex; align-items: center; gap: 14px; margin-top: 14px; font-size: 15px; }
.cast-vol input[type=range] { flex: 1 1 0; width: 0; }
.cast-opt { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 15px; cursor: pointer; }
.cast-opt input { width: 20px; height: 20px; accent-color: var(--accent); }
.cast-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.cast-actions .sheet-close { margin-right: auto; }

/* ---------- prenos na TV: obrazovka /tv ---------- */
body.tv { cursor: none; }
body.tv.pairing { cursor: auto; }
body.tv.pairing .dim { opacity: .55; }
.tv-pair {
  position: fixed; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: clamp(28px, 6vw, 96px);
  padding: 5vh 6vw;
}
.tv-card { max-width: 560px; }
.tv-card .logo { margin: 0 0 3vh; font-size: clamp(22px, 2.2vw, 34px); }
.tv-card h1 { margin: 0; font: 600 clamp(26px, 3.2vw, 52px)/1.1 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.tv-steps { margin: 3vh 0 0; padding-left: 1.3em; font-size: clamp(17px, 1.6vw, 26px); color: var(--muted); }
.tv-steps li { margin: .35em 0; }
.tv-steps strong { color: var(--text); }
.tv-code { margin: 4vh 0 0; font: 600 clamp(48px, 7vw, 112px)/1 var(--display); letter-spacing: .06em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tv-exp { margin: 1.5vh 0 0; font-size: clamp(14px, 1.1vw, 18px); color: var(--muted); }
.tv-fs { margin-top: 3vh; }
.tv-qr { margin: 0; display: grid; justify-items: center; gap: 14px; }
.tv-qr canvas { width: clamp(180px, 22vw, 320px); height: auto; aspect-ratio: 1; border-radius: 18px; image-rendering: pixelated; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.tv-qr figcaption { font-size: clamp(14px, 1.2vw, 20px); color: var(--muted); }
.tv-now {
  position: fixed; z-index: 5; left: 0; right: 0; bottom: 0;
  padding: 120px 5vw 6vh; background: linear-gradient(transparent, var(--shade) 60%);
  opacity: 0; transform: translateY(14px); transition: opacity 1.2s ease, transform 1.2s var(--ease); pointer-events: none;
}
.tv-now.show { opacity: 1; transform: none; }
.tv-now .title { font-size: clamp(32px, 4.4vw, 72px); }
.tv-now .meta { font-size: clamp(15px, 1.3vw, 22px); }
.tv-sound {
  position: fixed; z-index: 10; left: 50%; top: 8vh; transform: translateX(-50%);
  padding: 18px 30px; border-radius: 999px; font-size: clamp(18px, 1.8vw, 28px); font-weight: 600;
  background: var(--solid); color: var(--solid-text); box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
}
.tv-sound:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
body.tv .toast { top: auto; bottom: 6vh; font-size: clamp(16px, 1.4vw, 22px); padding: 14px 24px; }
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .tv-pair { flex-direction: column; text-align: center; overflow: auto; }
  .tv-steps { display: inline-block; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .tv-now { transition: none; } }

/* ---------- otázka na súhlas so štatistikou (track.js) ----------
   obe tlačidlá rovnako výrazné; mizne s rozhraním (.chrome) a pod otvoreným panelom */
.consent {
  z-index: 12; left: 0; right: 0; top: max(70px, calc(env(safe-area-inset-top) + 60px)); margin: 0 auto;
  width: min(460px, calc(100% - 32px)); padding: 16px 18px 14px; border-radius: 22px;
  background: var(--glass-strong); color: var(--text); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: 0 0 0 1px var(--line), 0 12px 40px rgba(0, 0, 0, .3);
  opacity: 0; transform: translateY(-8px);
}
.consent.show { opacity: 1; transform: none; }
body.idle .consent { transform: translateY(-10px); }
body.sheet-open .consent { display: none; }
.consent-text { margin: 0 0 12px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.consent-text strong { color: var(--text); font-weight: 600; }
.consent-text a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.consent-btns { display: flex; gap: 8px; }
.consent-btns .pill { flex: 1 1 0; background: var(--hover); box-shadow: inset 0 0 0 1px var(--line); }
.consent-btns .pill:hover { background: var(--line); }
@media (prefers-reduced-motion: reduce) { .consent { transition: none; } }
