/* Odtwarzacz wideo ICAN — osadzany w ramkach na stronach ICAN i jako strona podglądu. */
:root { --bg: #000; --fg: #f3f4f6; --muted: #9ca3af; --accent: #2563eb; --panel: #111827; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg);
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { height: 100%; display: flex; flex-direction: column; }
.stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.media { flex: 1 1 auto; width: 100%; min-height: 0; background: #000; object-fit: contain; display: block; }
audio.media { flex: 0 0 auto; margin: auto 0; }
.bar { display: flex; gap: 12px; justify-content: flex-end; padding: 4px 8px; background: var(--panel); font-size: 12px; }
.bar label { color: var(--muted); }
.bar select { background: #1f2937; color: var(--fg); border: 1px solid #374151; border-radius: 4px; padding: 1px 4px; font: inherit; }
.unavailable { align-items: center; justify-content: center; color: var(--muted); }
.main { flex: 1 1 auto; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
/* playlista: domyślnie pasek miniatur pod odtwarzaczem */
.playlist { list-style: none; margin: 0; padding: 4px; display: flex; gap: 6px; overflow-x: auto; background: var(--panel);
  flex: 0 0 auto; scrollbar-width: thin; scrollbar-color: #374151 transparent; }
.playlist li a { display: flex; flex-direction: column; width: 128px; color: var(--fg); text-decoration: none; font-size: 12px; padding: 4px;
  border-radius: 4px; }
.playlist li.current a, .playlist li a:hover { background: #1f2937; }
.playlist li.current a { box-shadow: inset 3px 0 0 var(--accent); }
.playlist li a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.playlist .th { position: relative; display: block; flex: 0 0 auto; width: 120px; height: 68px; }
.playlist img { width: 120px; height: 68px; object-fit: cover; background: #222; border-radius: 3px; display: block; }
.playlist em { position: absolute; right: 3px; bottom: 3px; background: rgba(0, 0, 0, .8); color: #fff; font: 11px/1.3 system-ui, sans-serif;
  font-style: normal; padding: 0 4px; border-radius: 2px; }
.playlist .nm { margin-top: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* lista z boku na szerokim osadzeniu (jak dawny odtwarzacz „YT (prawy)”) */
@media (min-width: 640px) {
  body.pl-side .wrap { flex-direction: row; }
  body.pl-side .playlist { flex: 0 0 clamp(220px, 30%, 320px); flex-direction: column; gap: 2px; overflow-x: hidden; overflow-y: auto;
    border-left: 1px solid #1f2937; }
  body.pl-side .playlist li a { flex-direction: row; align-items: flex-start; gap: 8px; width: auto; }
  body.pl-side .playlist .th, body.pl-side .playlist img { width: 96px; height: 54px; }
  body.pl-side .playlist .nm { margin-top: 0; -webkit-line-clamp: 3; }
  body.page.pl-side .wrap { max-width: 1600px; gap: 12px; align-items: flex-start; }
  body.page.pl-side .playlist { max-height: calc(100vh - 32px); position: sticky; top: 16px; border: 0; border-radius: 6px; }
}
/* strona podglądu */
body.page { background: #0b0f17; }
body.page .wrap { max-width: 1280px; margin: 0 auto; padding: 16px; height: auto; min-height: 100%; }
body.page .stage { aspect-ratio: 16 / 9; flex: 0 0 auto; }
.title { font-size: 20px; margin: 0 0 12px; font-weight: 600; }
.desc { color: #d1d5db; margin: 12px 0; }
.share { color: #9ca3af; font-size: 14px; margin: 10px 0 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.share .dl { background: #2563eb; color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 6px; font-weight: 600; }
.share .dl:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
@media (max-width: 480px) { .bar { justify-content: space-between; } body.page .wrap { padding: 8px; } }
