/* myplex — laid out and lit like Netflix: #141414 canvas, one red, wide artwork that grows under
   the pointer. Figtree stands in for Netflix Sans; the wordmark is img/logo.png. */
:root {
  --bg: #141414;
  --surface: #181818;
  --surface-2: #232323;
  --line: #333;
  --text: #fff;
  --soft: #e5e5e5;
  --muted: #b3b3b3;
  --dim: #808080;
  --red: #e50914;
  --red-hover: #f6121d;
  --green: #46d369;
  --accent: var(--red);
  --danger: #e87c03;
  --nav-h: 68px;
  --pad: 4vw;
  --gap: 6px;
  --per: 6;
  --tile-w: calc((100vw - 2 * var(--pad) - (var(--per) - 1) * var(--gap)) / var(--per));
  /* posters (2:3): more of them fit a row */
  --pper: 8;
  --poster-w: calc((100vw - 2 * var(--pad) - (var(--pper) - 1) * var(--gap)) / var(--pper));
  --radius: 4px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .75);
  --font: "Figtree", "Netflix Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
@media (max-width: 1399px) { :root { --per: 5; --pper: 7; } }
@media (max-width: 1099px) { :root { --per: 4; --pper: 6; } }
@media (max-width: 799px) { :root { --per: 3; --pper: 4; } }
@media (max-width: 499px) { :root { --per: 2; --pper: 3; --gap: 5px; } }

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ic { display: inline-flex; }
.ic svg { width: 1em; height: 1em; display: block; }
/* the `hidden` attribute has to beat every author `display` rule below */
[hidden] { display: none !important; }
.grow { flex: 1; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 2.4vw;
  height: var(--nav-h); padding: 0 var(--pad);
  background: linear-gradient(to bottom, rgba(0,0,0,.7) 10%, rgba(0,0,0,0));
  transition: background-color .4s ease;
}
header.solid { background-color: var(--bg); }
/* the wordmark: img/logo.png, the 3D red "My Plex" */
.logo { display: inline-flex; align-items: center; flex: 0 0 auto; line-height: 0; }
.logo img { display: block; height: clamp(24px, 2.2vw, 32px); width: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
nav { flex: 1; min-width: 0; display: flex; align-items: center; }
.primary { display: flex; align-items: center; gap: 1.3vw; list-style: none; margin: 0; padding: 0; }
.primary > li { position: relative; }
.primary a { font-size: 14px; color: var(--soft); white-space: nowrap; transition: color .4s; }
.primary a:hover { color: #b3b3b3; }
.primary a.active { color: #fff; font-weight: 700; cursor: default; }
.browse { display: none; }
.nav-more .more-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 14px; color: var(--soft); white-space: nowrap; }
.nav-more .more-btn:hover, .nav-more .more-btn.active { color: #fff; }
.nav-more .more-btn.active { font-weight: 700; }
.nav-more .menu-panel { min-width: 200px; }

/* dropdowns: menu, mega menu, genres, bell, account */
.dropdown { position: relative; }
.menu-panel, .mega {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  min-width: 220px; z-index: 30; background: rgba(0,0,0,.92);
  border: 1px solid rgba(255,255,255,.15); border-top: 2px solid #e5e5e5;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden;
  transition: opacity .15s ease, visibility 0s linear .15s;
}
.menu-panel::before, .mega::before {
  content: ""; position: absolute; top: -9px; left: 50%; margin-left: -7px;
  border: 7px solid transparent; border-top: 0; border-bottom-color: #e5e5e5;
}
.dropdown.open > .menu-panel, .dropdown.open > .mega { opacity: 1; visibility: visible; transition: opacity .15s ease; }
.menu-panel.right { left: auto; right: 0; transform: none; }
.menu-panel.right::before { left: auto; right: 14px; }
.menu-panel { display: flex; flex-direction: column; padding: 10px 0; }
.menu-panel > a, .menu-panel > button {
  display: flex; align-items: center; gap: 10px; padding: 8px 18px; font-size: 13.5px; color: var(--soft);
  background: none; border: 0; text-align: left; cursor: pointer;
}
.menu-panel > a:hover, .menu-panel > button:hover { text-decoration: underline; color: #fff; }
.menu-panel > a.active { font-weight: 700; color: #fff; }
.menu-panel .ic svg { width: 18px; height: 18px; color: var(--muted); }

/* mega menu: a library's genres, opened from its link */
.mega { left: -18px; transform: none; width: min(560px, 80vw); padding: 18px 0 14px; cursor: default; }
.mega::before { left: 36px; }
.mega-head { display: flex; align-items: baseline; gap: 12px; padding: 0 22px 12px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.12); }
.mega-head a { font-size: 17px !important; font-weight: 800; color: #fff !important; }
.mega-head span { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.mega-cols { column-count: 3; column-gap: 8px; padding: 0 8px; }
.mega-cols a, .genre-panel a {
  display: block; break-inside: avoid; padding: 5px 14px; font-size: 13.5px; color: var(--soft);
}
.mega-cols a:hover, .genre-panel a:hover { text-decoration: underline; color: #fff; }
.mega-cols a.all, .genre-panel a.all { font-weight: 700; color: #fff; }

.tools { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; }
.search { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid transparent; transition: background .3s, border-color .3s; }
.search.open, .search:focus-within { background: rgba(0,0,0,.75); border-color: rgba(255,255,255,.85); }
.search .icon { border: 0; background: none; padding: 0; cursor: pointer; color: #fff; display: flex; font-size: 22px; }
.search input { width: 0; padding: 0; border: 0; background: none; color: #fff; outline: none; font-size: 14px; transition: width .3s ease; }
.search.open input, .search:focus-within input { width: 15rem; }
.search input::placeholder { color: #8c8c8c; }
.search input::-webkit-search-cancel-button { filter: invert(1); }
.icon-btn { position: relative; border: 0; background: none; padding: 0; cursor: pointer; color: #fff; display: flex; font-size: 24px; }
.icon-btn .count {
  position: absolute; top: -5px; right: -7px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; line-height: 1;
}
.notes { width: 380px; padding: 0; max-height: 70vh; overflow-y: auto; }
.notes-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid rgba(255,255,255,.12); }
.notes-head button { background: none; border: 1px solid #5a5a5a; color: var(--soft); border-radius: 99px; padding: 4px 11px; font-size: 12px; cursor: pointer; }
.notes-head button:hover { border-color: #fff; color: #fff; }
.notes-on { font-size: 11.5px; color: var(--green); }
.notes .note { display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.08); color: var(--soft); font-size: 13.5px; }
.notes .note:hover { background: rgba(255,255,255,.05); text-decoration: none; }
.notes .thumb { position: relative; flex: 0 0 112px; aspect-ratio: 16 / 9; border-radius: 3px; overflow: hidden; background: #222; }
.notes .thumb img { width: 100%; height: 100%; object-fit: cover; }
.notes .thumb.tall { flex: 0 0 50px; aspect-ratio: 2 / 3; }
.notes .note.unread { background: rgba(229,9,20,.09); }
.notes .k { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.notes .note.unread .k { color: #fff; }
.notes .note.unread .k::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--red); vertical-align: 1px; }
.notes .t { font-weight: 700; color: #fff; }
.notes .s { color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.notes .empty { justify-content: center; color: var(--dim); }
.avatar-btn { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; color: #fff; }
.avatar {
  width: 32px; height: 32px; border-radius: 4px; display: grid; place-items: center;
  background: linear-gradient(135deg, #2b74d8, #1747a6); color: #fff; font-weight: 800; font-size: 15px;
}
.avatar.small { width: 28px; height: 28px; font-size: 13px; }
.avatar-btn .caret { font-size: 18px; transition: transform .25s ease; }
.account.open .caret { transform: rotate(180deg); }
.menu-panel .who { display: flex; align-items: center; gap: 10px; padding: 6px 18px 12px; margin-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 13.5px; }
.menu-panel .who em { color: var(--dim); font-style: normal; font-size: 12px; }
.menu-panel .signout { justify-content: center; border-top: 1px solid rgba(255,255,255,.12) !important; margin-top: 6px; padding-top: 14px !important; }

/* ---------- billboard ---------- */
.billboard { position: relative; height: 56.25vw; min-height: 420px; max-height: 92vh; overflow: hidden; background: #000; }
.billboard.skeleton { animation: none; background: #1a1a1a; }
.bb-art { position: absolute; inset: 0; background-size: cover; background-position: center 18%; }
.bb-art.tall { display: none; }
.bb-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(77deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.35) 32%, rgba(0,0,0,0) 62%),
    linear-gradient(to bottom, rgba(20,20,20,0) 55%, rgba(20,20,20,.55) 78%, var(--bg) 100%);
}
.bb-info { position: absolute; left: var(--pad); bottom: 30%; width: 38%; z-index: 2; animation: rise .7s ease both; }
.bb-logo { display: block; max-width: 100%; max-height: min(11vw, 24vh); object-fit: contain; object-position: left bottom; margin-bottom: 1.1vw; filter: drop-shadow(0 4px 24px rgba(0,0,0,.6)); }
h1.bb-logo.text { margin: 0 0 1.2vw; font-size: clamp(2rem, 4.4vw, 4.6rem); line-height: 1; font-weight: 900; letter-spacing: -.02em; text-shadow: 2px 2px 12px rgba(0,0,0,.6); }
.bb-rank { display: flex; align-items: center; gap: .6em; margin-bottom: 1vw; font-size: clamp(1rem, 1.5vw, 1.65rem); font-weight: 700; text-shadow: 2px 2px 4px rgba(0,0,0,.45); }
.bb-synopsis {
  margin: 0 0 1.6vw; font-size: clamp(.95rem, 1.25vw, 1.4rem); line-height: 1.35; color: #fff;
  text-shadow: 2px 2px 4px rgba(0,0,0,.45); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bb-buttons { display: flex; gap: .8vw; flex-wrap: wrap; }
.bb-buttons .short { display: none; }
.bb-maturity {
  position: absolute; right: 0; bottom: 30%; z-index: 2; padding: .5vw 3.5vw .5vw .8vw;
  background: rgba(51,51,51,.6); border-left: 3px solid #dcdcdc; font-size: clamp(.9rem, 1.1vw, 1.2rem);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .55em 1.6em; border: 0; border-radius: var(--radius); cursor: pointer;
  font-size: clamp(.95rem, 1.15vw, 1.3rem); font-weight: 700; background: #fff; color: #000;
  transition: background .15s ease, opacity .15s ease;
}
.btn .ic svg { width: 1.6em; height: 1.6em; }
.btn:hover { background: rgba(255,255,255,.75); }
.btn.more, .btn.ghost { background: rgba(109,109,110,.7); color: #fff; }
.btn.more:hover, .btn.ghost:hover { background: rgba(109,109,110,.4); }
.btn.gold, .btn.red { background: var(--red); color: #fff; }
.btn.gold:hover, .btn.red:hover { background: var(--red-hover); }
.btn.small { padding: 7px 14px; font-size: 13.5px; }
.btn.small .ic svg { width: 1.2em; height: 1.2em; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn[disabled] { opacity: .5; cursor: default; }

/* ---------- shelves ---------- */
.rows { position: relative; z-index: 2; padding-bottom: 2vw; }
.rows.over { margin-top: -9vw; }
.rows.plain { padding-top: 1vw; }
/* A category without a billboard (Įrašai): the rows start below the header and its "Įrašai · Žanrai" bar. */
.subnav + .rows.plain { padding-top: calc(var(--nav-h) + 64px + 1vw); }
.shelf { margin: 0 0 3vw; position: relative; }
.shelf-top { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 var(--pad); margin-bottom: .6vw; }
.shelf-head { margin: 0; font-size: clamp(1.05rem, 1.4vw, 1.55rem); font-weight: 700; color: var(--soft); }
.shelf-head a { display: inline-flex; align-items: baseline; gap: .8em; }
.shelf-head .explore {
  display: inline-flex; align-items: center; gap: .1em; font-size: .62em; font-weight: 700; color: #54b9c5;
  opacity: 0; transform: translateX(-1.5em); transition: opacity .4s ease, transform .5s ease; white-space: nowrap;
}
.shelf-head a:hover .explore, .shelf:hover .explore { opacity: 1; transform: none; }
.shelf-head .explore .ic svg { width: 1.3em; height: 1.3em; }
.marks { display: flex; gap: 2px; opacity: 0; transition: opacity .2s; padding-bottom: 4px; }
.shelf:hover .marks { opacity: 1; }
.marks i { width: 12px; height: 2px; background: #4d4d4d; }
.marks i.on { background: #aaa; }
.shelf-slider { position: relative; }
.shelf-track {
  display: flex; gap: var(--gap); overflow-x: auto; overflow-y: hidden; padding: 0 var(--pad);
  scroll-padding: 0 var(--pad); scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth;
}
.shelf-track::-webkit-scrollbar { display: none; }
.shelf-track > * { scroll-snap-align: start; }
.pager {
  position: absolute; top: 0; bottom: 0; z-index: 4; width: calc(var(--pad) - 2px);
  border: 0; padding: 0; cursor: pointer; color: #fff; display: grid; place-items: center;
  background: rgba(20,20,20,.5); opacity: 0; transition: opacity .2s, background .2s;
}
.pager.prev { left: 0; border-radius: 0 var(--radius) var(--radius) 0; }
.pager.next { right: 0; border-radius: var(--radius) 0 0 var(--radius); }
.pager svg { width: 2.4vw; height: 2.4vw; min-width: 22px; min-height: 22px; transition: transform .15s; }
.shelf-slider:hover .pager { opacity: 1; }
.pager:hover { background: rgba(20,20,20,.72); }
.pager:hover svg { transform: scale(1.25); }

/* the tile: a 2:3 poster, or 16:9 in "Tęsti žiūrėjimą" */
.tile { flex: 0 0 var(--tile-w); width: var(--tile-w); position: relative; cursor: pointer; border-radius: var(--radius); }
.tile.tall { flex: 0 0 var(--poster-w); width: var(--poster-w); }
.tile.skeleton { aspect-ratio: 16 / 9; }
.tile.tall.skeleton { aspect-ratio: 2 / 3; }
.boxart { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background-color: #222; }
.boxart.tall { aspect-ratio: 2 / 3; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.boxart img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.boxshade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,0) 46%); }
.boxtitle {
  position: absolute; left: 8%; right: 8%; bottom: 8%; font-weight: 800; letter-spacing: -.01em;
  font-size: clamp(12px, 1.02vw, 18px); line-height: 1.12; text-shadow: 0 1px 8px rgba(0,0,0,.9);
}
.boxtitle span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.boxtitle small { display: block; font-size: .8em; font-weight: 600; opacity: .85; margin-top: 2px; }
.tile:focus-visible { outline-offset: 3px; }
.top10 {
  position: absolute; top: 0; right: 0; z-index: 2; display: inline-flex; flex-direction: column; align-items: center;
  justify-content: center; width: clamp(20px, 1.55vw, 30px); padding: 3px 0 2px; background: var(--red); color: #fff;
  border-bottom-left-radius: 2px; line-height: 1;
}
.top10 span { font-size: clamp(6px, .45vw, 8.5px); font-weight: 800; letter-spacing: .04em; }
.top10 b { font-size: clamp(10px, .82vw, 15px); font-weight: 900; }
.bb-rank .top10 { position: static; width: 2.2em; padding: 3px 0; font-size: 1rem; border-radius: 2px; }
.bb-rank .top10 span { font-size: .45em; }
.bb-rank .top10 b { font-size: .85em; }
.ribbon {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 2; white-space: nowrap;
  background: var(--red); color: #fff; font-size: clamp(8px, .62vw, 11px); font-weight: 700;
  padding: 2px 6px; border-radius: 2px 2px 0 0;
}
.pbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(77,77,77,.9); z-index: 3; }
.pbar span { display: block; height: 100%; background: var(--red); }
.art .fallback, .boxart .fallback, .poster .fallback, .fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: clamp(16px, 2.2vw, 30px); font-weight: 900; letter-spacing: .06em; color: #555;
  background: linear-gradient(150deg, #262626, #161616);
}

/* Top 10: the outlined number with the poster leaning on it */
.ranked .shelf-track { padding-top: 4px; }
/* the poster is as big as in every other row; the number takes the room left of it */
.ranktile { flex: 0 0 calc(var(--poster-w) * 1.62); width: calc(var(--poster-w) * 1.62); height: calc(var(--poster-w) * 1.5); position: relative; cursor: pointer; display: flex; }
/* The number is about as tall as the poster and tucks under its left edge, as on Netflix. */
.ranktile .num {
  position: absolute; left: 1%; bottom: 0; z-index: 0;
  font: 900 calc(var(--poster-w) * 1.62)/.74 var(--font); letter-spacing: -.08em;
  color: var(--bg); -webkit-text-stroke: max(3px, .28vw) #595959;
}
.ranktile .num.two { font-size: calc(var(--poster-w) * 1.12); letter-spacing: -.14em; left: -3%; }
.ranktile .poster {
  position: relative; z-index: 1; margin-left: auto; width: calc(100% / 1.62); height: 100%;
  border-radius: var(--radius); overflow: hidden; background: #222;
}
.ranktile .poster img { width: 100%; height: 100%; object-fit: cover; }

/* the hover preview ("mini modal") */
.preview {
  position: absolute; z-index: 18; background: var(--surface); border-radius: 6px; overflow: hidden;
  box-shadow: 0 3px 12px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.04); cursor: pointer;
  opacity: 0; transform: scale(var(--from, .7)); transition: transform .28s cubic-bezier(.25,.8,.25,1), opacity .2s ease;
}
.preview.on { opacity: 1; transform: none; }
.pv-art { position: relative; aspect-ratio: 16 / 9; background-color: #222; }
.pv-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-name {
  position: absolute; left: 14px; right: 14px; bottom: 10px; font-weight: 800; font-size: 1.05rem; line-height: 1.15;
  text-shadow: 0 1px 10px rgba(0,0,0,.95);
}
.pv-info { padding: 14px 16px 16px; }
.pv-buttons { display: flex; align-items: center; gap: 8px; }
.circle {
  width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; padding: 0; cursor: pointer; color: #fff;
  border: 2px solid rgba(255,255,255,.5); background: rgba(42,42,42,.6); display: grid; place-items: center;
  transition: border-color .15s, background .15s;
}
.circle:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.circle .ic svg { width: 20px; height: 20px; }
.circle.solid { background: #fff; color: #000; border-color: #fff; }
.circle.solid:hover { background: rgba(255,255,255,.8); }
.circle.big { width: 44px; height: 44px; }
.circle.big .ic svg { width: 24px; height: 24px; }
.pv-progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.pv-progress .pbar, .m-progress .pbar { position: relative; flex: 1; height: 3px; }
.pv-ep { margin-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--soft); }
.pv-meta, .m-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--soft); }
.match { color: var(--green); font-weight: 800; }
.maturity { border: 1px solid rgba(255,255,255,.4); padding: 0 .45em; font-size: .85em; line-height: 1.5; }
.hd { border: 1px solid rgba(255,255,255,.4); border-radius: 3px; padding: 0 .35em; font-size: .68em; font-weight: 700; line-height: 1.5; }
.genres { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; color: #fff; }
.genres i { font-style: normal; color: #646464; font-size: .8em; }

/* ---------- pages ---------- */
.page { padding-top: calc(var(--nav-h) + 1.2vw); min-height: 70vh; }
.pagetitle { margin: 0 0 1.6vw; padding: 0 var(--pad); font-size: clamp(1.6rem, 2.4vw, 2.6rem); font-weight: 800; letter-spacing: -.01em; }
.pagetitle.small { font-size: clamp(1.1rem, 1.6vw, 1.6rem); color: var(--muted); font-weight: 600; }
.subnav {
  position: sticky; top: var(--nav-h); z-index: 16; height: 64px; margin-bottom: -64px;
  display: flex; align-items: center; gap: 2rem; padding: 0 var(--pad);
  transition: background-color .4s ease;
}
.subnav.solid { background-color: var(--bg); }
.subnav h1 { margin: 0; font-size: clamp(1.5rem, 2.3vw, 2.4rem); font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.page .subnav { height: auto; margin: -1.2vw 0 1.4vw; padding-top: 12px; padding-bottom: 12px; }
.crumbs { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.crumbs a { font-size: clamp(1.1rem, 1.6vw, 1.6rem); font-weight: 700; color: var(--muted); }
.crumbs a:hover { color: #fff; }
.crumbs > .ic svg { width: 1.6rem; height: 1.6rem; color: var(--dim); }
.genre-btn {
  display: inline-flex; align-items: center; gap: 1.6rem; padding: 4px 8px 4px 10px; cursor: pointer;
  background: #000; border: 1px solid rgba(255,255,255,.9); color: #fff; font-size: 14px; font-weight: 700;
}
.genre-btn:hover { background: rgba(255,255,255,.1); }
.genre-btn .ic svg { width: 18px; height: 18px; }
.genre-panel { left: 0; transform: none; padding: 10px 0; width: min(560px, 90vw); display: block; column-count: 3; column-gap: 4px; }
.genre-panel::before { left: 26px; }
.gridlink { margin-left: auto; display: grid; place-items: center; width: 34px; height: 30px; border: 1px solid rgba(255,255,255,.9); background: #000; font-size: 18px; }
.gridlink:hover { background: rgba(255,255,255,.1); }
select.sort, select.season {
  background: #000; color: #fff; border: 1px solid rgba(255,255,255,.9); padding: 6px 30px 6px 10px; font-size: 14px; font-weight: 700;
  border-radius: 2px; cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.gallery-wrap { padding: 0 var(--pad) 3vw; }
.gallery-count { color: var(--dim); font-size: 13.5px; margin-bottom: 14px; }
.gallery { display: grid; grid-template-columns: repeat(var(--pper), minmax(0, 1fr)); gap: 2.4vw var(--gap); }
.gallery .tile { width: auto; flex: none; }
.empty { color: var(--muted); padding: 60px var(--pad); text-align: center; }
.empty.big { padding: 12vh var(--pad); font-size: 1.15rem; }
.empty.big p { margin: .4em 0; }
.empty-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 2px solid #555; font-size: 34px; color: #777; margin-bottom: 14px; }

.foot { max-width: 980px; margin: 2vw auto 0; padding: 30px var(--pad) 50px; color: var(--dim); font-size: 13px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px 34px; margin-bottom: 18px; }
.foot-links a:hover { text-decoration: underline; }

/* ---------- title sheet ---------- */
.modal {
  position: fixed; inset: 0; z-index: 30; overflow-y: auto; padding: 32px 16px 40px;
  background: rgba(0,0,0,.7); animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise { from { transform: translateY(16px); opacity: 0 } to { transform: none; opacity: 1 } }
.sheet { width: min(860px, 100%); margin: 0 auto; background: var(--surface); border-radius: 8px; overflow: hidden; box-shadow: 0 6px 40px rgba(0,0,0,.8); animation: rise .3s ease; }
.m-head { position: relative; aspect-ratio: 16 / 9; background-color: #000; }
.m-head > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m-shade { position: absolute; inset: 0; background: linear-gradient(to top, var(--surface) 0%, rgba(24,24,24,.6) 22%, rgba(24,24,24,0) 52%); }
.m-head .close {
  position: absolute; top: 16px; right: 16px; z-index: 3; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: var(--surface); color: #fff; cursor: pointer; display: grid; place-items: center; font-size: 22px;
}
.m-title { position: absolute; left: 48px; right: 48px; bottom: 6%; z-index: 2; }
.m-logo { display: block; max-width: 44%; max-height: 7.5rem; object-fit: contain; object-position: left bottom; margin-bottom: 18px; filter: drop-shadow(0 3px 18px rgba(0,0,0,.7)); }
h2.m-logo.text { margin: 0 0 18px; font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 900; line-height: 1.05; letter-spacing: -.02em; text-shadow: 0 2px 14px rgba(0,0,0,.8); max-width: 80%; }
.m-buttons { display: flex; align-items: center; gap: 10px; }
.m-buttons .btn { font-size: 1.05rem; padding: .5em 1.6em .5em 1.2em; }
.m-progress { display: flex; align-items: center; gap: 12px; width: min(380px, 70%); margin-top: 14px; font-size: 13.5px; color: var(--soft); }
.m-body { padding: 4px 48px 40px; }
.m-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; }
.m-meta { margin-top: 0; font-size: 15px; color: #bcbcbc; }
.m-ep { margin: 16px 0 0; font-size: 1.05rem; }
.m-plot { margin: 16px 0 0; font-size: 1rem; line-height: 1.55; }
.m-side { font-size: 14px; color: #ddd; line-height: 1.45; }
.side-row { margin: 0 0 10px; word-break: break-word; }
.side-row .k { color: #777; }
.side-row .more { font-style: italic; color: #fff; }
.side-row .more:hover { text-decoration: underline; }
.m-body h3 { margin: 44px 0 18px; font-size: 1.5rem; font-weight: 700; }
.eps-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 44px 0 18px; }
.eps-head h3 { margin: 0; }
.one-season { color: var(--soft); font-weight: 700; }
.eps { border-top: 1px solid #404040; }
.ep {
  display: grid; grid-template-columns: 3rem 9.6rem minmax(0, 1fr); gap: 1.2rem; align-items: center;
  padding: 1.4rem 1rem; border-bottom: 1px solid #404040; border-radius: 4px; cursor: pointer;
}
.ep:hover, .ep:focus-visible { background: #2a2a2a; }
.ep.current { background: #333; }
.ep-num { font-size: 1.5rem; color: #d2d2d2; text-align: center; }
.ep-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: #222; }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.2rem; opacity: 0; transition: opacity .15s; background: rgba(0,0,0,.35); }
.ep:hover .ep-play, .ep:focus-visible .ep-play { opacity: 1; }
.ep-play .ic { width: 1.4em; height: 1.4em; border: 2px solid #fff; border-radius: 50%; display: grid; place-items: center; background: rgba(30,30,30,.5); }
.ep-play .ic svg { width: .7em; height: .7em; }
.ep:has(.ep-del) { grid-template-columns: 3rem 9.6rem minmax(0, 1fr) 2.4rem; }
.ep-del { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid transparent; background: none; color: #8a8a8a; cursor: pointer; display: grid; place-items: center; }
.ep-del .ic svg { width: 1.2rem; height: 1.2rem; display: block; }
.ep-del:hover, .ep-del:focus-visible { color: var(--danger); border-color: var(--danger); outline: none; }
.eps-head .eps-del { margin-left: auto; color: #aaa; }
.eps-head .eps-del:hover { color: var(--danger); }
.circle.danger:hover, .circle.danger:focus-visible { border-color: var(--danger); color: var(--danger); background: rgba(232,124,3,.08); }
.tm-item.danger { color: var(--danger); }
.ep-top { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.ep-top .d { color: var(--soft); font-weight: 400; flex: 0 0 auto; }
.ep-top em { color: var(--green); font-style: normal; }
.ep p { margin: 6px 0 0; color: #d2d2d2; font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sim-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1em; }
.sim { background: #2f2f2f; border-radius: 4px; overflow: hidden; cursor: pointer; }
.sim:hover, .sim:focus-visible { background: #383838; }
.sim-art { position: relative; aspect-ratio: 16 / 9; background-color: #222; }
.sim-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sim-len { position: absolute; top: 8px; right: 10px; font-weight: 700; font-size: 13px; text-shadow: 0 1px 6px rgba(0,0,0,.9); }
.sim-name { position: absolute; left: 10px; right: 10px; bottom: 8px; font-weight: 800; font-size: .95rem; line-height: 1.15; text-shadow: 0 1px 8px rgba(0,0,0,.95); }
.sim-body { padding: 14px 14px 18px; }
.sim-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sim-top .m-meta { font-size: 13.5px; }
.sim p { margin: 12px 0 0; color: #d2d2d2; font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.m-about { margin-top: 10px; padding-top: 1px; }
.m-about h3 { font-weight: 400; }
.m-about .side-row { font-size: 14px; }

/* cast portraits under "Apie" */
.cast { margin-top: 26px; }
.cast h3 { margin: 0 0 14px !important; font-size: 1rem !important; color: var(--muted); font-weight: 600 !important; }
.cast .people { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; }
.person { flex: 0 0 100px; width: 100px; text-align: center; }
.person .ph { position: relative; width: 84px; height: 84px; margin: 0 auto 8px; border-radius: 50%; overflow: hidden; background: #2a2a2a; display: grid; place-items: center; }
.person .ph img { width: 100%; height: 100%; object-fit: cover; }
.person .ph .fallback { font-size: 24px; }
.person .n { font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.person .r { font-size: 11.5px; color: var(--dim); line-height: 1.3; margin-top: 2px; }

/* ---------- sign in ---------- */
.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative;
  background: radial-gradient(120% 80% at 50% 0%, rgba(229,9,20,.22) 0%, rgba(20,20,20,.9) 45%, #000 100%), #000;
}
.auth .box { width: min(450px, 100%); background: rgba(0,0,0,.75); border-radius: 6px; padding: 48px 56px 56px; }
.auth .logo { display: flex; justify-content: center; margin: -8px 0 22px; }
.auth .logo img { height: 52px; max-width: 100%; }
.auth h1 { font-size: 2rem; margin: 0 0 8px; font-weight: 800; }
.auth p { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.auth .btn { font-size: 1rem; padding: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--muted); }
input[type=text], input[type=password], input[type=url], input[type=number], input[type=search]:not(#q), select:not(.sort):not(.season) {
  padding: 14px 16px; border-radius: 4px; border: 1px solid rgba(128,128,128,.7);
  background: rgba(22,22,22,.7); color: #fff; width: 100%;
}
input:focus { border-color: #fff; outline: none; }
.error { color: var(--danger); font-size: 14px; min-height: 1.3em; margin-top: 8px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 16px; }

/* ---------- admin ---------- */
.panel { background: var(--surface); border: 1px solid #2a2a2a; border-radius: 6px; padding: 22px; max-width: 560px; }
.panel h2 { margin-top: 0; }
table { border-collapse: collapse; width: 100%; max-width: 560px; }
td { padding: 10px 14px 10px 0; border-bottom: 1px solid #262626; }
.matchresults { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* "Valdymas": the libraries on top, then sections that fold open (app.js: fold) */
.admin { padding-left: var(--pad); padding-right: var(--pad); max-width: calc(840px + 2 * var(--pad)); }
.admin h1 { margin: 0 0 18px; }
.admin .s { font-size: 13px; }
.adm-lib { background: var(--surface); border: 1px solid #2a2a2a; border-radius: 10px; padding: 18px 20px; }
.adm-lib-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.adm-lib-head h2 { margin: 0; font-size: 1.25rem; }
.adm-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 10px; }
.adm-stat { flex: 1 1 120px; background: #222; border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; }
.adm-stat b { font-size: 1.5rem; font-weight: 800; line-height: 1.15; }
.adm-stat span { color: var(--muted); font-size: 13px; }
.adm-note { margin: 0 0 4px; }
.adm-low { color: var(--danger); font-weight: 700; }
.adm-sec { background: var(--surface); border: 1px solid #2a2a2a; border-radius: 10px; margin-top: 12px; overflow: hidden; }
.adm-head {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border: 0; background: transparent;
  color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.adm-head:hover { background: #1e1e1e; }
.adm-ic { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #262626; display: grid; place-items: center; }
.adm-ic svg { width: 20px; height: 20px; }
.adm-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adm-title { font-weight: 800; font-size: 1.05rem; display: inline-flex; align-items: center; gap: 8px; }
.adm-sum { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.adm-chev { flex: none; color: var(--muted); display: inline-flex; transition: transform .2s ease; }
.adm-chev svg { width: 24px; height: 24px; }
.adm-sec.open > .adm-head .adm-chev { transform: rotate(180deg); }
.adm-body { padding: 2px 18px 20px 70px; }
.adm-body > div > p:first-child { margin-top: 0; }
.adm-sec.sub { margin-top: 14px; background: #1c1c1c; border-color: #303030; }
.adm-sec.sub .adm-head { padding: 12px 14px; }
.adm-sec.sub .adm-title { font-size: .98rem; }
.adm-sec.sub .adm-body { padding: 2px 14px 14px; }
.adm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 4px; }
.adm-match { border-top: 1px solid #2a2a2a; padding: 13px 0; }
.adm-users { display: flex; flex-direction: column; }
.adm-user { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #262626; }
.adm-add { margin-top: 16px; }
.adm-add h3 { margin: 0 0 10px; font-size: 1rem; }
.adm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adm-check { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
@media (max-width: 599px) {
  .adm-head { padding: 12px 14px; gap: 12px; }
  .adm-ic { width: 32px; height: 32px; }
  .adm-body { padding: 2px 14px 16px; }
  .adm-two { grid-template-columns: 1fr; }
  .adm-lib { padding: 16px; }
}

/* share links (the dialog over the title sheet, and the admin list) */
.offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }
.share-pop {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: rgba(0,0,0,.78); backdrop-filter: blur(6px); animation: fade .2s ease;
}
.share-card {
  position: relative; width: min(520px, 100%); background: var(--surface); border: 1px solid #2a2a2a;
  border-radius: 8px; padding: 26px 28px 24px; box-shadow: 0 6px 40px rgba(0,0,0,.8); animation: rise .3s ease;
}
.share-card h2 { margin: 0 0 6px; font-size: 1.45rem; font-weight: 800; padding-right: 40px; }
.share-x {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: #2a2a2a; color: #fff; cursor: pointer; display: grid; place-items: center; font-size: 20px;
}
.share-x:hover { background: #3a3a3a; }
.share-what { display: flex; flex-direction: column; gap: 10px; margin: 0 0 18px; color: var(--soft); }
.share-what strong { font-size: 1.05rem; }
.share-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.share-segs { display: flex; gap: 4px; padding: 4px; background: #111; border: 1px solid #2f2f2f; border-radius: 8px; }
.share-seg {
  flex: 1; padding: 9px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted);
  font-weight: 700; font-size: 14px; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.share-seg:hover { color: #fff; }
.share-seg[aria-pressed="true"] { background: #fff; color: #000; }
.share-scope:empty { display: none; }
.share-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.share-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border: 1px solid #444;
  border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; user-select: none;
}
.share-chip:has(input:checked) { border-color: #fff; background: rgba(255,255,255,.1); }
.share-chip input { accent-color: var(--red); width: 16px; height: 16px; margin: 0; }
.share-scope-info { margin: 0; color: var(--muted); font-size: 13.5px; }
.share-card .hint { margin: 2px 0 6px; line-height: 1.5; }
.share-card .hint.warn { color: var(--danger); }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.share-actions .btn { font-size: 1rem; padding: .55em 1.3em; }
.share-actions .btn .ic svg { width: 1.2em; height: 1.2em; }
.share-copy { display: flex; gap: 8px; }
.share-copy input { flex: 1; min-width: 0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14.5px; }
.share-copy .btn { flex: none; }
.shares { max-width: 680px; }
.share-list { display: flex; flex-direction: column; }
.share-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid #262626; }
.share-row:first-child { border-top: 0; }
.share-main { flex: 1; min-width: 0; }
.share-title { font-weight: 700; overflow-wrap: anywhere; }
.share-main .s { font-size: 13px; margin-top: 3px; }
.share-state { display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 3px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; vertical-align: 1px; background: #333; color: var(--muted); }
.share-row.ok .share-state { background: rgba(70,211,105,.15); color: var(--green); }
.share-row.bad .share-state { background: rgba(232,124,3,.15); color: var(--danger); }
.share-row.off .share-title { color: var(--muted); }
.share-btns { display: flex; gap: 8px; flex: none; }
.share-list .ic svg { width: 1.05em; height: 1.05em; vertical-align: -2px; }
@media (max-width: 599px) {
  .share-card { padding: 22px 18px 18px; }
  .share-two { grid-template-columns: 1fr; gap: 0; }
  .share-row { flex-direction: column; align-items: stretch; }
}

/* uploads */
.uppanel { max-width: 680px; }
.uppanel h3 { margin: 26px 0 6px; font-size: 1.05rem; }
.uprow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 14px; }
.uprow .field { margin-bottom: 12px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 16px; text-align: center;
  border: 2px dashed #464646; border-radius: 8px; transition: border-color .15s ease, background .15s ease;
}
.dropzone.over { border-color: var(--green); background: rgba(70, 211, 105, .07); }
.dropzone .ic.big svg { width: 38px; height: 38px; color: var(--muted); }
.dropzone .t { font-weight: 700; font-size: 16px; }
.dropzone .muted { font-size: 13px; }
.dropzone .btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.upq { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.upq:empty { display: none; }
.upitem { background: #1f1f1f; border: 1px solid #2c2c2c; border-radius: 6px; padding: 8px 10px 10px; }
.upitem[data-status="done"] { border-color: rgba(70, 211, 105, .35); }
.upitem[data-status="blocked"], .upitem[data-status="failed"] { border-color: rgba(232, 124, 3, .45); }
.uphead { display: flex; align-items: center; gap: 8px; }
.uppanel input.upname {
  flex: 1; min-width: 0; padding: 6px 8px; font-size: 14px; font-weight: 600;
  background: transparent; border-color: transparent; text-overflow: ellipsis;
}
.uppanel input.upname:not([readonly]):hover, .uppanel input.upname:not([readonly]):focus { border-color: #5a5a5a; background: rgba(0, 0, 0, .3); }
.uppanel input.upname[readonly] { cursor: default; }
.upname.static { flex: 1; min-width: 0; padding: 6px 8px; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.upx { display: inline-flex; padding: 5px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.upx:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.upx .ic svg { width: 18px; height: 18px; }
.upmeta { display: flex; flex-wrap: wrap; gap: 3px 14px; margin: 2px 8px 0; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.upbar { height: 4px; margin: 9px 8px 0; overflow: hidden; border-radius: 2px; background: #333; }
.upbar i { display: block; width: 0; height: 100%; background: var(--red); transition: width .3s linear; }
.upitem[data-status="done"] .upbar i { background: var(--green); }
.upitem.pending .upbar i { background: #777; }
.upstat { margin: 6px 8px 0; font-size: 12.5px; color: var(--soft); font-variant-numeric: tabular-nums; }
.upstat:empty { display: none; }
.upstat.bad { color: var(--danger); }
.upstat.good { color: var(--green); }
.upstat a, .linkbtn { padding: 0; border: 0; background: none; color: #fff; font: inherit; text-decoration: underline; cursor: pointer; }
.upactions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.upsum { font-size: 13.5px; }
.upsum .bad { color: var(--danger); }
.upnote { padding: 12px 14px; border-left: 3px solid var(--danger); border-radius: 4px; background: #1f1f1f; font-size: 14px; }
.upnote ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.uppill {
  position: fixed; right: 18px; bottom: 18px; z-index: 55; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 12px; border: 1px solid #3a3a3a; border-radius: 999px; background: #1f1f1f; color: #fff;
  font-size: 13.5px; font-weight: 600; text-decoration: none; box-shadow: var(--shadow); animation: rise .25s ease;
}
.uppill .ic svg { width: 18px; height: 18px; color: var(--green); }
.uppill.warn .ic svg { color: var(--danger); }
@media (max-width: 640px) {
  .uprow { grid-template-columns: 1fr; gap: 0; }
  .uppill { right: 12px; bottom: 12px; left: 12px; justify-content: center; }
}
.matchpick {
  display: flex; flex-direction: column; align-items: center; gap: 7px; width: 108px; padding: 8px 6px 10px;
  cursor: pointer; text-align: center; background: #1f1f1f; border: 1px solid var(--line); border-radius: 6px;
  transition: border-color .12s ease, transform .12s ease;
}
.matchpick:hover { border-color: var(--red); transform: translateY(-2px); }
.matchpick img, .matchpick .noimg { width: 86px; height: 129px; object-fit: cover; border-radius: 4px; background: #2a2a2a; }
.matchpick .cap { font-size: 11.5px; line-height: 1.3; color: #d6d6da; }

/* remote access steps (Valdymas -> Nuotolinė prieiga) */
.remote-steps { margin: 14px 0 4px; display: flex; flex-direction: column; gap: 10px; }
.remote-step { display: flex; gap: 12px; align-items: flex-start; }
.remote-step .dot { flex: 0 0 auto; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: #555; }
.remote-step.ok .dot { background: var(--green); }
.remote-step.bad .dot { background: var(--danger); }
.remote-step.wait .dot { background: #e5a00d; animation: pulse 1.2s ease-in-out infinite; }
.remote-step .t { font-weight: 700; }
.remote-step .s { font-size: 13px; }
.remote-url { margin-top: 6px; padding: 12px 14px; background: #1f1f1f; border-left: 3px solid var(--green); border-radius: 4px; }
.remote-url a { color: #fff; font-weight: 700; text-decoration: underline; }
@keyframes pulse { 50% { opacity: .35 } }

/* ---------- player ---------- */
.player { position: fixed; inset: 0; background: #000; z-index: 40; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .ui { position: absolute; inset: 0; transition: opacity .25s ease; }
.player.idle .ui { opacity: 0; }
.player.idle { cursor: none; }
.player .top {
  position: absolute; top: 0; left: 0; right: 0; padding: 18px 26px 40px; display: flex; align-items: center; gap: 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,0));
}
.player .top .who { min-width: 0; }
.player .top .who .t { font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .top .who .s { color: var(--muted); font-size: 13px; }
.player .round {
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; flex: 0 0 auto;
}
.player .round:hover { background: rgba(30,30,32,.9); }
.player .round svg { width: 22px; height: 22px; }
.player .center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 34px; pointer-events: none; }
.player .center button { pointer-events: auto; width: 62px; height: 62px; border: 0; border-radius: 50%; cursor: pointer; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; }
.player .center button.big { width: 84px; height: 84px; background: rgba(0,0,0,.42); }
.player .center svg { width: 30px; height: 30px; }
.player .center button.big svg { width: 40px; height: 40px; }
.player .bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 26px 22px; background: linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,0)); }
.player .seek { position: relative; height: 20px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.player .seek .track { position: relative; width: 100%; height: 5px; border-radius: 3px; background: rgba(255,255,255,.26); overflow: hidden; }
.player .seek .buf { position: absolute; inset: 0 auto 0 0; height: 100%; background: rgba(255,255,255,.22); }
.player .seek .played { position: absolute; inset: 0 auto 0 0; height: 100%; background: var(--accent); }
.player .seek .knob {
  position: absolute; top: 50%; width: 15px; height: 15px; margin-left: -7.5px; border-radius: 50%;
  background: var(--accent); transform: translateY(-50%); opacity: 0; transition: opacity .15s;
}
.player .seek:hover .knob, .player .seek.dragging .knob { opacity: 1; }
.player .row { display: flex; align-items: center; gap: 18px; margin-top: 12px; }
.player .time { font-variant-numeric: tabular-nums; font-size: 13.5px; color: #d8d9de; }
.player .grow { flex: 1; }
.player .vol { display: flex; align-items: center; gap: 8px; }
.player .vol input { width: 92px; accent-color: var(--red); }
.player .next {
  position: absolute; right: 30px; bottom: 130px; z-index: 3; background: rgba(12,12,14,.92);
  border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; max-width: 300px; box-shadow: var(--shadow);
}
.player .next .cap { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.player .next .t { font-weight: 700; margin-bottom: 12px; }
.player .spinner { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.player .spinner div { width: 54px; height: 54px; border-radius: 50%; border: 4px solid rgba(255,255,255,.25); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.menupop {
  position: absolute; right: 26px; bottom: 132px; z-index: 5; min-width: 210px; background: rgba(12,12,14,.97);
  border: 1px solid var(--line); border-radius: 6px; padding: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.menupop .head { color: var(--muted); font-size: 12px; padding: 6px 10px; text-transform: uppercase; letter-spacing: .1em; }
.menupop button { text-align: left; padding: 9px 10px; border: 0; background: none; border-radius: 4px; cursor: pointer; color: var(--text); font-size: 14px; }
.menupop button:hover { background: var(--surface-2); }
.menupop button.on { color: var(--red); font-weight: 700; }
.menupop .note { color: var(--muted); font-size: 12px; padding: 8px 10px 2px; border-top: 1px solid var(--line); margin-top: 6px; max-width: 270px; line-height: 1.4; }
.menupop .note + .note { border-top: 0; margin-top: 0; padding-top: 2px; }
.menupop .tv-bufnow div + div { margin-top: 6px; }
/* OpenSubtitles in the subtitle menu (app.js buildOSMenu) */
.menupop .os-find { color: var(--muted); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 11px; border-radius: 0 0 4px 4px; }
.menupop .os-find:hover { color: var(--text); }
.menupop.wide { width: min(460px, calc(100vw - 32px)); }
/* Subtitle picker (app.js buildSubMenu): fixed top with "Išjungti", only the tracks scroll */
.menupop.subs {
  width: min(310px, calc(100vw - 32px)); max-height: min(72vh, 560px); padding: 6px 0 0; overflow: hidden;
  border-radius: 12px; background: rgba(18,18,20,.94); border-color: rgba(255,255,255,.09);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: subpop .16s ease-out;
}
@keyframes subpop { from { opacity: 0; transform: translateY(6px); } }
.menupop.subs .head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 8px; font-weight: 700; }
.menupop.subs .sub-count { font-size: 11px; letter-spacing: 0; color: var(--dim); }
.menupop.subs .sub-row {
  display: flex; align-items: center; gap: 12px; margin: 1px 8px; padding: 9px 12px; border-radius: 8px;
  position: relative; transition: background .12s;
}
.menupop.subs .sub-row:hover { background: rgba(255,255,255,.08); }
.menupop.subs .sub-row.on { color: var(--text); font-weight: 400; background: rgba(229,9,20,.16); }
.menupop.subs .sub-row.on::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--red); }
.menupop.subs .sub-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.menupop.subs .sub-name { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menupop.subs .sub-note { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.menupop.subs .sub-chk { flex: none; color: var(--red); font-weight: 800; font-size: 15px; }
.menupop.subs .sub-off { margin-bottom: 6px; }
.menupop.subs .sub-off::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: -4px; height: 1px; background: var(--line); }
.menupop.subs .sub-list {
  display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 0 6px; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent;
  mask-image: linear-gradient(to bottom, transparent 0, #000 10px, #000 calc(100% - 14px), transparent 100%);
}
.menupop.subs .sub-list::-webkit-scrollbar { width: 6px; }
.menupop.subs .sub-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 3px; }
.menupop.subs .note { border-top: 0; margin: 0 8px; padding: 10px 12px; }
.menupop.subs .os-find { flex: none; margin: 0; padding: 13px 20px; border-radius: 0; background: rgba(255,255,255,.03); font-size: 13.5px; }
.menupop.subs .os-find:hover { background: rgba(255,255,255,.08); }
html.tv .menupop.subs .sub-row:focus .sub-note { color: #444; }
.menupop .head .os-back { padding: 0 8px 0 0; font-size: 18px; color: var(--text); vertical-align: -1px; }
.menupop .os-langs { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 10px 10px; }
.menupop .os-lang { padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 12.5px; font-weight: 700; }
.menupop .os-lang.on { background: #fff; color: #000; }
.menupop .os-lang.on:hover { background: #e6e6e6; }
.menupop .os-list { display: flex; flex-direction: column; max-height: min(46vh, 380px); overflow-y: auto; border-top: 1px solid var(--line); padding-top: 6px; }
.menupop .os-row { display: flex; gap: 10px; align-items: flex-start; }
.menupop .os-row.busy { opacity: .6; cursor: progress; }
.menupop .os-row[disabled]:not(.busy) { opacity: .45; }
.menupop .os-lc { flex: none; min-width: 30px; padding: 2px 5px; border-radius: 3px; background: rgba(255,255,255,.12); font-size: 11px; font-weight: 800; text-align: center; margin-top: 1px; }
.menupop .os-main { display: flex; flex-direction: column; min-width: 0; }
.menupop .os-rel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.menupop .os-meta { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.menupop .os-fit { color: var(--green); font-weight: 700; }
.menupop .tv-bufnow b { display: block; color: var(--text); font-weight: 600; }
.player .round .qlabel { font-size: 11.5px; font-weight: 800; letter-spacing: .01em; }
video::cue { background: rgba(0,0,0,.72); color: #fff; font-size: 1.05em; }

/* ---------- misc ---------- */
.skeleton { background: linear-gradient(100deg, #1c1c1c 30%, #262626 50%, #1c1c1c 70%); background-size: 220% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--radius); }
.sk-title { width: 180px; height: 22px; }
@keyframes shimmer { to { background-position: -220% 0 } }
/* "something new arrived": a card that slides in at the corner */
.ntoast {
  position: fixed; right: 24px; bottom: 24px; z-index: 70; display: flex; gap: 14px; align-items: center;
  width: min(380px, calc(100vw - 32px)); padding: 12px 40px 12px 12px; color: #fff; text-decoration: none;
  background: rgba(24,24,24,.97); border: 1px solid rgba(255,255,255,.12); border-left: 4px solid var(--red);
  border-radius: 8px; box-shadow: var(--shadow); animation: ntoastIn .45s cubic-bezier(.2,.8,.2,1);
}
.ntoast.out { animation: ntoastOut .3s ease forwards; }
.ntoast .thumb { position: relative; flex: 0 0 62px; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: #222; }
.ntoast .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ntoast .k { font-size: 11.5px; font-weight: 800; color: var(--red); text-transform: uppercase; letter-spacing: .07em; }
.ntoast .t { font-size: 16px; font-weight: 800; line-height: 1.25; margin: 3px 0 9px; }
.ntoast .cta { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 4px; background: #fff; color: #141414; font-size: 13px; font-weight: 700; }
.ntoast .cta .ic svg { width: 16px; height: 16px; }
.ntoast .x { position: absolute; top: 8px; right: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; padding: 2px; }
.ntoast .x:hover { color: #fff; }
@keyframes ntoastIn { from { transform: translateX(115%); opacity: 0; } }
@keyframes ntoastOut { to { transform: translateX(115%); opacity: 0; } }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 60;
  background: #fff; color: #000; border-radius: 4px; padding: 12px 20px; font-weight: 600;
  box-shadow: var(--shadow); font-size: 14px; max-width: 90vw; animation: rise .25s ease;
}

/* ask(): the page's own confirmation (app.js) */
.ask {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: askIn .16s ease;
}
.ask.out { animation: askOut .12s ease forwards; }
.ask-card {
  width: min(460px, 100%); background: var(--surface-2); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px; box-shadow: 0 24px 60px rgba(0, 0, 0, .7); padding: 26px 28px 22px;
  font-family: var(--font); animation: askPop .18s cubic-bezier(.2, .9, .3, 1.2);
}
.ask-title { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; color: var(--text); }
.ask-title .rec-dot { flex: none; }
.ask-lead { margin-top: 16px; font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.3; }
.ask-line { margin-top: 6px; font-size: 14px; color: var(--muted); line-height: 1.4; }
.ask-title + .ask-line { margin-top: 14px; }
.ask-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.ask-btns .btn { min-width: 108px; justify-content: center; font-size: 15px; padding: 10px 20px; }
.ask-btns .btn:focus-visible, html.tv .ask-btns .btn:focus { outline: 3px solid #fff; outline-offset: 2px; }
/* "Rodyti per TV" picker (dlna.js) */
.tvpick { min-width: min(420px, 92vw); }
.tvp-list { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.tvp-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.04); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tvp-row:hover, .tvp-row:focus-visible { background: rgba(255,255,255,.1); border-color: var(--accent); outline: none; }
.tvp-row svg { width: 26px; height: 26px; flex: none; color: var(--accent); }
.tvp-t { display: flex; flex-direction: column; gap: 2px; }
.tvp-t small { color: var(--muted); font-size: 12.5px; }
.tvp-note { margin-top: 12px; }
@keyframes askIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes askOut { to { opacity: 0; } }
@keyframes askPop { from { transform: scale(.94) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- smaller screens ---------- */
@media (max-width: 1099px) {
  .primary { gap: 1.6vw; }
  .primary a { font-size: 13px; }
}
@media (max-width: 899px) {
  :root { --nav-h: 56px; }
  .primary { display: none; }
  .browse { display: block; }
  .browse-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; padding: 0; }
  .browse .menu-panel { left: 0; transform: none; min-width: 240px; }
  .browse .menu-panel::before { left: 24px; }
  .browse .menu-panel a { justify-content: center; padding: 12px 18px; }
  .tools { gap: 12px; }
  .search.open input, .search:focus-within input { width: 9rem; }
  .bb-info { width: 62%; bottom: 24%; }
  .bb-maturity { bottom: 24%; }
  .rows.over { margin-top: -6vw; }
  .m-title { left: 22px; right: 22px; }
  .m-body { padding: 4px 22px 30px; }
  .m-cols { grid-template-columns: 1fr; gap: 14px; }
  .sim-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pager { display: none; }
  /* no hover on touch: "Naršyti viską" is a plain chevron that is always there */
  .marks { display: none; }
  .shelf-head .explore { opacity: 1; transform: none; font-size: 0; }
  .shelf-head .explore .ic svg { width: 22px; height: 22px; }
  .notes { width: min(360px, 92vw); }
  .subnav { gap: 1rem; }
}
@media (max-width: 599px) {
  .ntoast { right: 16px; bottom: 16px; }
  .billboard { height: 128vw; max-height: 82vh; }
  .bb-art.wide { display: none; }
  .bb-art.tall { display: block; background-position: center top; }
  .bb-shade { background: linear-gradient(to bottom, rgba(20,20,20,0) 40%, rgba(20,20,20,.7) 72%, var(--bg) 100%); }
  .bb-info { left: 0; right: 0; width: auto; bottom: 6%; padding: 0 6vw; text-align: center; display: flex; flex-direction: column; align-items: center; }
  .bb-logo { max-height: 22vw; object-position: center bottom; }
  .bb-synopsis, .bb-maturity { display: none; }
  .bb-buttons { flex-wrap: nowrap; justify-content: center; gap: 10px; width: 100%; }
  .bb-buttons .btn { flex: 1; max-width: 170px; font-size: 1rem; padding: .6em 1em; }
  .bb-buttons .long { display: none; }
  .bb-buttons .short { display: inline; }
  .rows.over { margin-top: 0; }
  .shelf { margin-bottom: 6vw; }
  .shelf-head { font-size: 1.05rem; }
  .boxtitle { font-size: 12px; }
  .modal { padding: 0; }
  .sheet { border-radius: 0; min-height: 100vh; }
  .m-head .close { top: 10px; right: 10px; }
  .m-logo { max-width: 70%; max-height: 5rem; }
  .m-buttons .btn { flex: 1; }
  .ep { grid-template-columns: 7.5rem minmax(0, 1fr); padding: 1rem .4rem; gap: .9rem; }
  .ep-num { display: none; }
  .sim-grid { grid-template-columns: 1fr; }
  .genre-panel, .mega-cols { column-count: 2; }
  .subnav h1 { font-size: 1.4rem; }
  .auth .box { padding: 32px 24px; }
}
/* ---------- profiles: avatars ---------- */
.pav {
  --size: 32px;
  width: var(--size); height: var(--size); border-radius: calc(var(--size) * .12);
  display: inline-grid; place-items: center; flex: 0 0 auto; position: relative; overflow: hidden;
  background: radial-gradient(120% 95% at 28% 12%, var(--a), var(--b));
  box-shadow: inset 0 calc(var(--size) * -.08) calc(var(--size) * .18) rgba(0,0,0,.28);
}
.pav i { font-style: normal; font-size: calc(var(--size) * .58); line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.pav.sm { --size: 28px; }
.pav.md { --size: 54px; }
.pav.lg { --size: 84px; }
.pav.xl { --size: clamp(96px, 10vw, 168px); }
.pav.add { background: transparent; border: 2px solid #4d4d4d; box-shadow: none; color: #8c8c8c; }
.pav.add .ic { font-size: calc(var(--size) * .42); }
.menu-panel .pswitch .ic.mini svg { width: 14px; height: 14px; }

/* ---------- "Kas žiūri?" ---------- */
.who-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.who-page > .logo { padding: 20px var(--pad); align-self: flex-start; }
.who-page > .logo img { height: clamp(24px, 2.3vw, 34px); }
.who-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 var(--pad) 9vh; text-align: center; }
.who-main h1 { font-size: clamp(1.9rem, 3.5vw, 3.5rem); font-weight: 500; margin: 0 0 2.4vw; letter-spacing: -.01em; }
.who-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(16px, 2vw, 34px); max-width: 1120px; }
.who-card {
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--dim);
  display: flex; flex-direction: column; align-items: center; gap: 12px; width: clamp(96px, 10vw, 168px);
  animation: whoIn .55s cubic-bezier(.2,.75,.25,1) both; animation-delay: calc(var(--i, 0) * 70ms);
}
.who-face { position: relative; display: block; border-radius: calc(clamp(96px, 10vw, 168px) * .12); outline: 3px solid transparent; transition: outline-color .15s ease, transform .25s ease; }
.who-card:hover, .who-card:focus-visible { color: #fff; outline: none; }
.who-card:hover .who-face, .who-card:focus-visible .who-face { outline-color: #fff; }
.who-card:active .who-face { transform: scale(.97); }
.who-name { font-size: clamp(.95rem, 1.3vw, 1.3rem); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-tags { display: flex; gap: 6px; align-items: center; min-height: 20px; margin-top: -6px; }
.who-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; }
.who-tag.kids { background: linear-gradient(90deg, #ffd84d, #ff7a59); color: #1d1206; }
.who-tag.lock { color: var(--muted); padding: 0; }
.who-tag.lock .ic svg { width: 16px; height: 16px; }
.who-edit { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.52); border-radius: inherit; color: #fff; font-size: clamp(28px, 3vw, 46px); }
.who-btn {
  display: inline-flex; align-items: center; justify-content: center; margin-top: 4.2vw; padding: .55em 1.7em;
  border: 1px solid #808080; color: #808080; background: transparent; cursor: pointer;
  font: 500 clamp(.95rem, 1.15vw, 1.15rem)/1.3 var(--font); letter-spacing: .14em; text-transform: uppercase;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.who-btn:hover, .who-btn:focus-visible { color: #fff; border-color: #fff; outline: none; }
.who-btn.solid { background: #fff; color: #141414; border-color: #fff; font-weight: 700; }
.who-btn.solid:hover, .who-btn.solid:focus-visible { background: var(--red); border-color: var(--red); color: #fff; }
.who-btn.danger { color: var(--danger); border-color: var(--danger); }
.who-btn[disabled] { opacity: .5; cursor: default; }
@keyframes whoIn { from { opacity: 0; transform: translateY(16px) scale(.94); } }

/* ---------- profile editor ---------- */
.who-page.edit .who-main { justify-content: flex-start; padding-top: 1vh; text-align: left; }
.who-page.edit h1 { width: 100%; max-width: 780px; margin: 0 0 6px; padding-bottom: 14px; border-bottom: 1px solid #333; font-size: clamp(1.8rem, 3vw, 3rem); }
.edit-card { width: 100%; max-width: 780px; display: flex; flex-direction: column; }
.edit-top { display: flex; gap: 26px; align-items: flex-start; padding: 22px 0; border-bottom: 1px solid #262626; }
.edit-face { flex: 0 0 auto; }
.edit-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.edit-name .cap { font-size: 13px; color: var(--muted); }
.edit-name input[type=text] { background: #333; border-color: #333; font-size: 1.05rem; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0; border-bottom: 1px solid #262626; }
.set.col { flex-direction: column; align-items: stretch; gap: 14px; }
.set-l { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.set-l b { font-size: 1.02rem; display: inline-flex; align-items: center; gap: 6px; }
.set-l b .ic svg { width: 17px; height: 17px; color: var(--muted); }
.set-l small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.face-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; justify-items: center; }
.face { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 9px; outline: 3px solid transparent; outline-offset: 2px; transition: outline-color .15s ease, transform .15s ease; line-height: 0; }
.face:hover { transform: translateY(-3px); }
.face.on { outline-color: #fff; }
.kids-toggle { display: flex; gap: 14px; align-items: center; margin-top: 8px; cursor: pointer; user-select: none; }
.kids-toggle > span:last-child { display: flex; flex-direction: column; }
.kids-toggle small { color: var(--muted); font-size: 13px; }

input.switch { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.switch-wrap { position: relative; display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; cursor: pointer; }
.switch-ui { width: 48px; height: 28px; border-radius: 99px; background: #4d4d4d; position: relative; transition: background .2s ease; flex: 0 0 auto; }
.switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.45); transition: transform .22s cubic-bezier(.3,.7,.3,1.35);
}
input.switch:checked + .switch-ui { background: var(--green); }
input.switch:checked + .switch-ui::after { transform: translateX(20px); }
input.switch:focus-visible + .switch-ui { outline: 2px solid #fff; outline-offset: 2px; }

.kids-box {
  margin: 18px 0 2px; padding: 2px 20px; border-radius: 12px;
  background: linear-gradient(155deg, rgba(79,141,255,.16), rgba(255,216,77,.07) 70%);
  border: 1px solid rgba(130,165,255,.28); animation: rise .3s ease;
}
.kids-box .set:last-child, .kids-box .bed-times:last-child { border-bottom: 0; }
.seg { display: inline-flex; background: rgba(0,0,0,.35); border-radius: 10px; padding: 4px; gap: 4px; flex: 0 0 auto; }
.seg button { border: 0; background: none; color: var(--muted); padding: 8px 14px; border-radius: 7px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.seg button b { font-size: 14px; }
.seg button small { font-size: 11.5px; opacity: .75; }
.seg button.on { background: #fff; color: #141414; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 99px; border: 1px solid #5a5a5a; background: none; color: var(--soft); cursor: pointer; font-weight: 600; transition: background .15s ease, color .15s ease; }
.chip .ic { display: none; }
.chip.on { background: #fff; color: #141414; border-color: #fff; }
.chip.on .ic { display: inline-flex; }
.kids-box select:not(.sort):not(.season) { width: auto; min-width: 170px; padding: 11px 14px; flex: 0 0 auto; }
.bed-times { display: flex; align-items: center; gap: 10px; padding: 0 0 18px; color: var(--muted); transition: opacity .2s ease; }
.bed-times.off { opacity: .35; }
input[type=time] { padding: 10px 12px; border-radius: 6px; border: 1px solid #5a5a5a; background: rgba(0,0,0,.35); color: #fff; color-scheme: dark; font-size: 1rem; }
.today { display: flex; align-items: center; gap: 10px; padding: 16px 0 4px; font-weight: 600; }
.today-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(70,211,105,.2); }
.today-dot.stop { background: #ff6b6b; box-shadow: 0 0 0 4px rgba(255,107,107,.22); }
.lock-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
input.pin-set { max-width: 260px; letter-spacing: .25em; }
.edit-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 22px; padding-bottom: 6vh; }
.edit-actions .who-btn { margin-top: 0; }

/* ---------- PIN pad ---------- */
.pin-pad { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(0,0,0,.84); backdrop-filter: blur(8px); animation: fade .2s ease; }
.pin-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 24px 18px; width: min(360px, 94vw); text-align: center; animation: rise .3s ease; }
.pin-who { color: var(--muted); font-weight: 700; margin-top: 4px; }
.pin-card h2 { margin: 4px 0 14px; font-weight: 500; font-size: 1.3rem; }
.pin-field { position: relative; display: block; cursor: text; }
.pin-boxes { display: flex; gap: 12px; }
.pin-boxes.shake { animation: shake .4s ease; }
.pin-box { width: 56px; height: 64px; border: 2px solid #5a5a5a; border-radius: 10px; display: grid; place-items: center; transition: border-color .15s ease; }
.pin-box.at { border-color: #fff; }
.pin-box.full::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #fff; animation: pop .16s ease; }
input.pin-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; caret-color: transparent; }
.pin-card .error { min-height: 1.3em; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 66px); gap: 12px; margin-top: 2px; }
.pin-key { width: 66px; height: 66px; border-radius: 50%; border: 0; background: rgba(255,255,255,.09); color: #fff; font-size: 1.45rem; font-weight: 600; cursor: pointer; transition: background .12s ease, transform .08s ease; }
.pin-key:hover, .pin-key:focus-visible { background: rgba(255,255,255,.2); outline: none; }
.pin-key:active { transform: scale(.93); }
.pin-key.soft { background: none; color: var(--muted); font-size: 1.2rem; }
.pin-cancel { margin-top: 10px; background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
@keyframes pop { from { transform: scale(0); } }

/* ---------- kids mode ---------- */
body.kids { --bg: #0e1736; --surface: #15224d; --surface-2: #1c2c60; --radius: 10px; }
body.kids header .logo::after {
  content: "Vaikams"; display: inline-block; margin-left: 9px; padding: 4px 9px; vertical-align: 6px; border-radius: 99px;
  background: linear-gradient(90deg, #ffd84d, #ff7a59); color: #1d1206; font: 800 11px/1 var(--font); letter-spacing: .08em; text-transform: uppercase;
}
.timeleft { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 99px; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 700; white-space: nowrap; }
.timeleft.low { background: rgba(255,107,107,.28); }
.tl-ring { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--p) * 1%), rgba(255,255,255,.2) 0); }
.timeleft.low .tl-ring { background: conic-gradient(#ff6b6b calc(var(--p) * 1%), rgba(255,255,255,.2) 0); }

/* ---------- bedtime / time's up ---------- */
.blocked { min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden; text-align: center; padding: 24px; }
.blocked.night { background: radial-gradient(130% 90% at 50% 115%, #34479a 0%, #141d48 45%, #060918 100%); }
.blocked.done { background: radial-gradient(130% 90% at 50% 115%, #ffb347 0%, #c4501a 32%, #3d1607 72%, #120602 100%); }
.sky i { position: absolute; left: var(--x); top: var(--y); width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .2; animation: twinkle 3s ease-in-out infinite; animation-delay: var(--d); }
.blocked.done .sky i { opacity: .12; }
.blocked-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 560px; animation: rise .5s ease; }
.blocked-art { font-size: clamp(76px, 12vw, 144px); line-height: 1; margin: 6px 0 8px; animation: float 4.5s ease-in-out infinite; filter: drop-shadow(0 12px 34px rgba(255,220,130,.4)); }
.blocked h1 { font-size: clamp(1.8rem, 4vw, 3.1rem); margin: 0; font-weight: 800; letter-spacing: -.01em; }
.blocked p { color: rgba(255,255,255,.82); font-size: 1.12rem; margin: 6px 0 4px; }
.blocked-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.blocked-actions .who-btn { margin-top: 18px; }
.blocked-actions .who-btn:not(.solid) { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.6); }
.blocked-card > .pav { margin-bottom: 6px; }
@keyframes twinkle { 50% { opacity: .95; transform: scale(1.7); } }
@keyframes float { 50% { transform: translateY(-14px) rotate(-5deg); } }

@media (max-width: 599px) {
  .edit-top { flex-direction: column; align-items: center; }
  .edit-name { width: 100%; }
  .set { flex-direction: column; align-items: stretch; }
  .seg { align-self: flex-start; }
  .timeleft span:last-child { display: none; }
  .timeleft { padding: 5px; }
  .pin-keys { grid-template-columns: repeat(3, 60px); }
  .pin-key { width: 60px; height: 60px; }
}

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

/* ---- Live TV (tv.js) ---- */
.tv-page { padding-left: var(--pad); padding-right: var(--pad); }
.tv-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 6px 0 16px; }
.tv-head h1 { margin: 0; font-size: clamp(1.5rem, 2.3vw, 2.4rem); font-weight: 800; }
.tv-search { flex: 1; min-width: 200px; max-width: 420px; margin-left: auto; padding: 10px 14px; border-radius: 4px; border: 1px solid #444; background: #000; color: #fff; font: inherit; }
.tv-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.tv-chips::-webkit-scrollbar { display: none; }
.tv-chips .chip { white-space: nowrap; text-decoration: none; flex: none; }
.chip .n { font-weight: 500; opacity: .6; font-size: .85em; }
.tv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 8px; padding-bottom: 60px; }
.tv-row { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 6px; background: var(--surface); color: inherit; text-decoration: none; transition: background .15s ease, transform .15s ease; min-width: 0; }
.tv-row:hover, .tv-row:focus-visible { background: var(--surface-2); outline: none; transform: scale(1.01); }
.tv-row:focus-visible { box-shadow: 0 0 0 2px #fff; }
.tv-num { width: 34px; flex: none; text-align: right; color: var(--dim); font-variant-numeric: tabular-nums; font-weight: 700; }
.tv-logo { width: 72px; height: 44px; flex: none; border-radius: 4px; background: #0b0b0b; display: grid; place-items: center; overflow: hidden; }
.tv-logo img { max-width: 88%; max-height: 82%; object-fit: contain; }
.tv-logo span { font-weight: 800; color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.tv-logo.sm { width: 52px; height: 32px; }
.tv-main { min-width: 0; flex: 1; }
.tv-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.tv-star svg { width: 14px; height: 14px; color: #f5c518; }
.tv-now { font-size: 13px; min-width: 0; }
.tv-prog { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tv-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--soft); flex: 1; min-width: 0; }
.tv-bar { width: 60px; flex: none; height: 3px; border-radius: 2px; background: rgba(255,255,255,.2); overflow: hidden; }
.tv-bar i { display: block; height: 100%; background: var(--red); }
.tv-next { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 499px) { .tv-list { grid-template-columns: 1fr; } .tv-num { width: 24px; } .tv-logo { width: 56px; height: 36px; } }

.player.live .top { align-items: center; }
.tv-plogo { flex: none; }
.tv-live { font-size: 11px; font-weight: 800; letter-spacing: .12em; padding: 4px 8px; border-radius: 3px; background: var(--red); color: #fff; }
.player .tv-bottom { padding-top: 70px; }
.tv-pnow { display: grid; gap: 4px; max-width: 720px; }
.tv-pn { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.tv-pn b { font-size: 18px; }
.tv-pn .tv-bar { width: 120px; }
.tv-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; min-width: 44px; }
.player .round.on { color: #f5c518; }
.tv-error { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); background: rgba(20,20,20,.94); border-radius: 8px; padding: 22px 24px; text-align: center; z-index: 3; }
.tv-err-t { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.tv-error .adm-row { justify-content: center; }
.tv-numpad { position: absolute; top: 24px; right: 30px; font-size: 54px; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 2px 12px #000; z-index: 4; }
.tv-side { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); background: rgba(12,12,12,.95); overflow-y: auto; padding: 14px 10px; z-index: 5; }
.tv-side .head { color: var(--muted); font-size: 12px; padding: 6px 10px 10px; text-transform: uppercase; letter-spacing: .1em; }
.tv-srow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 5px; background: none; color: #fff; text-align: left; cursor: pointer; font: inherit; }
.tv-srow:hover, .tv-srow:focus-visible { background: var(--surface-2); outline: none; }
.tv-srow.on { box-shadow: inset 3px 0 0 var(--red); background: rgba(229,9,20,.12); }
.tv-srow .tv-num { width: 28px; }

.tvadm-row { padding: 14px 0; border-top: 1px solid #262626; display: grid; gap: 10px; }
.tvadm-row:first-child { border-top: 0; }
.tvadm-row .share-state { background: rgba(255,255,255,.1); color: var(--soft); }
.tvadm-row.bad .share-state { background: rgba(232,124,3,.15); color: var(--danger); }
.tvadm-main { display: grid; gap: 3px; min-width: 0; }
.tvadm-url { word-break: break-all; }
.tvadm-main .warn { color: var(--danger); }
.tvadm-main .ok { color: var(--green); }
/* The provider's films and series (vod.js) */
.vod-bar { height: 4px; max-width: 360px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; margin: 2px 0; }
.vod-bar i { display: block; height: 100%; background: var(--red, #e50914); transition: width .4s; }
.tvadm-row.busy .share-state { background: rgba(229,9,20,.18); color: #ff6b72; }
.vod-kind { margin: 12px 0 4px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vod-check { display: grid; gap: 8px; margin-top: 10px; }
.vod-check .ok { color: var(--green); }
.vod-check .warn, .vod-check .error { color: var(--danger); }
.vod-more { display: block; margin: 24px auto 0; }
.vod-hits { margin-top: 28px; }
.vod-note { color: var(--muted); }
.vodplayer .vod-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; transition: opacity .25s ease; }
.vodplayer.idle .vod-top { opacity: 0; pointer-events: none; }
/* The picture over a channel's / recording's timeline (tv.js) */
.tv-arc { position: relative; }
.tv-prev { position: absolute; bottom: calc(100% + 10px); transform: translateX(-50%); width: 208px; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 3; }
.tv-prevpic { width: 208px; height: 117px; border-radius: 8px; overflow: hidden; background: #111; border: 2px solid #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.6); }
.tv-prevpic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-prev.nopic .tv-prevpic { display: none; }
/* Recordings (rec.js) */
.rec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--red); margin-right: 6px; vertical-align: 0; }
.rec-dot.big { width: 16px; height: 16px; margin: 0; }
.rec-btn.on .rec-dot { box-shadow: 0 0 0 3px rgba(229,9,20,.35); animation: recpulse 1.4s ease-in-out infinite; }
@keyframes recpulse { 50% { opacity: .45; } }
.rec-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.rec-pill { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 800; background: rgba(255,255,255,.1); color: var(--soft); }
.rec-pill.recording { background: rgba(229,9,20,.2); color: #ff6b72; }
.rec-pill.scheduled { background: rgba(70,140,255,.18); color: #9cc2ff; }
.rec-pill.done { background: rgba(70,211,105,.15); color: var(--green); }
.rec-pill.failed { background: rgba(232,124,3,.15); color: var(--danger); }
.rec-pill.series { margin-left: 6px; }
.rec-meter { max-width: 640px; display: grid; gap: 6px; margin: 4px 0 18px; }
.rec-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.rec-bar i { display: block; height: 100%; background: var(--red); }
.rec-sec { margin-top: 22px; }
.rec-sec h2 { font-size: 18px; margin: 0 0 4px; }
.rec-sec h2 .n { color: var(--muted); font-weight: 600; }
.rec-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tv-prevtime { font-weight: 800; font-size: 14px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.8); white-space: nowrap; }
.error.s { font-size: 13px; }
.tvadm-extra { background: #101010; border-radius: 6px; padding: 12px 14px; }
.tvadm-filter { flex: 1; min-width: 180px; }
.tvadm-grps { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 14px; max-height: 360px; overflow-y: auto; margin-top: 8px; }
.tvadm-grp { display: flex; align-items: center; gap: 8px; padding: 5px 0; cursor: pointer; min-width: 0; }
.tvadm-grp span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvadm-form input[type=file] { color: var(--muted); margin-bottom: 4px; }
.tvadm-form > div > input, .tvadm-form .adm-two input { width: 100%; }
.tvadm-more { margin: 10px 0 0; }
.tvadm-more summary { cursor: pointer; margin-bottom: 8px; }
.tvadm-more label { display: grid; gap: 4px; }

/* ---- TV mode (tvmode.js): read from three metres away, driven by a remote ---- */
html.tv { --pad: 5vw; --per: 5; --pper: 7; }
html.tv body { cursor: default; }
/* What has the focus must be seen from the sofa. */
html.tv :focus { outline: none; }
html.tv a:focus, html.tv button:focus, html.tv [tabindex]:focus, html.tv input:focus, html.tv select:focus {
  outline: 3px solid #fff; outline-offset: 3px; border-radius: 4px;
}
html.tv .tile:focus, html.tv .ranktile:focus { outline: none; z-index: 3; }
html.tv .tile, html.tv .ranktile { transition: transform .18s ease; }
html.tv .tile:focus { transform: scale(1.1); }
html.tv .tile:focus .boxart { box-shadow: 0 0 0 4px #fff, 0 12px 30px rgba(0,0,0,.8); }
html.tv .ranktile:focus { transform: scale(1.06); }
html.tv .ranktile:focus .poster { box-shadow: 0 0 0 4px #fff; }
html.tv .shelf-track { padding-top: 22px; padding-bottom: 22px; margin-top: -14px; margin-bottom: -14px; scroll-behavior: smooth; }
html.tv .pager, html.tv .marks { display: none !important; }
html.tv .btn:focus { background: #fff; color: #141414; outline: 3px solid #fff; transform: scale(1.06); }
html.tv .btn { transition: transform .15s ease; }
html.tv .bb-buttons .btn { font-size: 1.25rem; }
html.tv .mega { display: none !important; }
html.tv #nav .primary a { font-size: 1.05rem; padding: 6px 10px; border-radius: 4px; }
html.tv #nav .primary a:focus { background: #fff; color: #141414; outline: none; }
html.tv .chip:focus, html.tv .tv-chips .chip:focus { background: #fff; color: #141414; outline: none; transform: scale(1.06); }
html.tv .ep:focus, html.tv .sim:focus, html.tv .tv-row:focus, html.tv .tv-srow:focus, html.tv .who-card:focus {
  outline: 3px solid #fff; outline-offset: 2px; background: var(--surface-2);
}
html.tv .who-card:focus .who-face { outline: 4px solid #fff; transform: scale(1.06); }
html.tv .menupop button:focus, html.tv .menu-panel a:focus, html.tv .menu-panel button:focus { background: #fff; color: #141414; outline: none; }
/* The player: the timeline is a stop for the remote, the controls grow a little. */
html.tv .player .seek:focus { outline: none; }
html.tv .player .seek:focus .track { height: 8px; }
html.tv .player .seek:focus .knob { opacity: 1; transform: translateY(-50%) scale(1.5); background: #fff; }
html.tv .player .round:focus, html.tv .player .center button:focus { background: #fff; color: #141414; outline: none; }
html.tv .player .round { width: 52px; height: 52px; }
html.tv .player .vol input { display: none; }
html.tv .player .tv-error .btn:focus { transform: scale(1.06); }
html.tv .foot { display: none; }
html.tv .sheet { width: min(1240px, 100%); }
html.tv .sheet .close:focus { background: #fff; color: #141414; }
html.tv .player .round:focus, html.tv .player .center button:focus { border-radius: 50%; outline: none; }
html.tv .player .center button:focus { transform: scale(1.12); }

/* ---- TV programme grid (guide.js) ---- */
.epg { padding-left: var(--pad); padding-right: var(--pad); padding-bottom: 0; }
.epg-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 12px; }
.epg-head h1 { margin: 0; font-size: clamp(1.4rem, 2vw, 2.1rem); font-weight: 800; }
.epg-chips { margin: 0; padding: 0; flex: 1; min-width: 0; }
.epg-wrap { position: relative; height: calc(100vh - var(--nav-h) - 96px); min-height: 320px; border: 1px solid #262626; border-radius: 8px; overflow: hidden; background: #101010; }
.epg-scroll { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; outline: none; }
.epg-canvas { position: relative; }
.epg-ruler { position: sticky; top: 0; z-index: 4; background: #181818; border-bottom: 1px solid #2c2c2c; }
.epg-corner { position: sticky; left: 0; top: 0; z-index: 5; display: flex; align-items: center; padding-left: 14px; background: #181818;
  border-right: 1px solid #2c2c2c; font-weight: 700; color: var(--soft); text-transform: capitalize; }
.epg-tick { position: absolute; top: 0; bottom: 0; padding: 12px 0 0 6px; font-size: 13px; font-weight: 700; color: var(--soft); border-left: 1px solid #3a3a3a; white-space: nowrap; }
.epg-tick.half { color: var(--dim); font-weight: 500; border-left-color: #2a2a2a; }
.epg-tick.day { color: #fff; border-left: 2px solid #777; text-transform: capitalize; }
.epg-now { position: absolute; width: 2px; margin-left: -1px; background: var(--red); z-index: 3; pointer-events: none; box-shadow: 0 0 8px rgba(229,9,20,.7); }
.epg-now-flag { position: absolute; bottom: 4px; transform: translateX(-50%); background: var(--red); color: #fff; font-size: 11.5px; font-weight: 800;
  padding: 2px 6px; border-radius: 3px; z-index: 6; pointer-events: none; }
.epg-row { position: absolute; left: 0; border-bottom: 1px solid #1f1f1f; }
.epg-ch { position: sticky; left: 0; z-index: 2; height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 0;
  border-right: 1px solid #2c2c2c; background: #161616; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.epg-ch .tv-num { width: 28px; flex: none; }
.epg-ch.loading { color: var(--dim); justify-content: center; }
.epg-chname { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 5px; }
.epg-p { position: absolute; top: 4px; bottom: 4px; padding: 6px 10px; border: 0; border-radius: 5px; margin-left: 2px; background: #232323; color: #fff;
  font: inherit; text-align: left; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.epg-p:hover { background: #2e2e2e; }
.epg-p.past { background: #1a1a1a; color: var(--dim); }
.epg-p.live { background: #3a1214; box-shadow: inset 3px 0 0 var(--red); }
.epg-p.none { background: transparent; color: var(--dim); font-style: italic; }
.epg-t { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epg-time { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.epg-p.past .epg-time { color: #5a5a5a; }
.epg-p:focus-visible, .epg-ch:focus-visible { outline: 3px solid #fff; outline-offset: -3px; z-index: 2; }
.epg-p:focus-visible { background: #fff; color: #141414; }
.epg-p:focus-visible .epg-time { color: #444; }
.epg-detail { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; }
.epg-detail[hidden] { display: none; }
.epg-dcard { width: min(760px, 100%); background: #1c1c1c; border-radius: 12px 12px 0 0; padding: 22px 26px 26px; box-shadow: var(--shadow); animation: rise .25s ease; }
.epg-dch { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 700; }
.epg-dcard h2 { margin: 12px 0 4px; font-size: 1.6rem; }
.epg-dwhen { color: var(--green); font-weight: 700; margin-bottom: 10px; text-transform: capitalize; }
.epg-dcard p { max-height: 40vh; overflow: auto; line-height: 1.5; }
html.tv .epg-p:focus, html.tv .epg-ch:focus { outline: 3px solid #fff; outline-offset: -3px; }
html.tv .epg-p:focus { background: #fff; color: #141414; transform: none; }
html.tv .epg-t { font-size: 16px; }
@media (max-width: 699px) {
  .epg-head h1 { width: 100%; order: -1; }
  .epg-wrap { height: calc(100vh - var(--nav-h) - 150px); }
  .epg-ch { padding: 0 6px; gap: 4px; }
  .epg-ch .tv-num { display: none; }
}
.epg-in { position: sticky; display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.epg-p { overflow: clip; }
.epg-p { align-items: flex-start; }
.epg-in { align-self: flex-start; max-width: calc(100% - 4px); }
.epg-now { z-index: 1; }
.epg-ch { z-index: 3; }
.epg-now-flag { z-index: 4; }
.epg-p:focus-visible, html.tv .epg-p:focus { z-index: 2; }
/* the archive (catch-up): past programmes one can still watch */
.epg-days { margin: -4px 0 10px; }
.epg-p.past.rec { background: #20232b; color: var(--soft); }
.epg-p.past.rec .epg-time { color: var(--muted); }
.epg-rec { color: #6ea8fe; font-weight: 900; margin-right: 5px; }
.tv-live.rec { background: #2f6fd6; }
.tv-arc { display: flex; align-items: center; gap: 14px; margin: 8px 0 2px; max-width: 900px; }
.tv-arc .seek { flex: 1; }
.player .tv-arcseek .knob { opacity: 1; }
.tv-arctime { font-variant-numeric: tabular-nums; font-size: 13.5px; color: #d8d9de; white-space: nowrap; }
html.tv .player .tv-arcseek:focus .track { height: 8px; }

/* ---- Live player: the channel bottom left, "Archyvas" panel (tv.js) ---- */
.tv-pinfo { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.tv-pinfo .who { min-width: 0; }
.tv-pname { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.tv-pname .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-pinfo .s { color: var(--muted); font-size: 13px; }
.player.live .tv-live { flex: none; }
.tv-archbtn { display: inline-flex; align-items: center; gap: 6px; }
.player .tv-bottom .row .btn { margin: 0; }
.tv-side.tv-arcside { width: min(460px, 94vw); padding: 18px 14px; background: rgba(14,14,16,.97); backdrop-filter: blur(6px); }
.tv-archhead { display: flex; align-items: center; gap: 12px; padding: 0 6px 12px; }
.tv-archhead .head { padding: 0; }
.tv-archhead .tv-name { font-size: 17px; }
.tv-archdays { padding: 0 6px 6px; margin-bottom: 4px; flex-wrap: nowrap; }
.tv-archdays .chip { font-size: 13px; padding: 6px 12px; }
.tv-arcnote { padding: 2px 8px 10px; font-size: 12.5px; }
.tv-arclist { display: flex; flex-direction: column; gap: 2px; }
.tv-arow { align-items: flex-start; padding: 10px; border-radius: 8px; }
.tv-arow .tv-main { min-width: 0; }
.tv-arow .tv-name { white-space: normal; font-size: 14.5px; line-height: 1.3; }
.tv-arow .tv-next { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.tv-arow .tv-bar { width: 100%; margin-top: 6px; }
.tv-atime { flex: none; width: 46px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; padding-top: 1px; }
.tv-arow[disabled] { cursor: default; opacity: .55; }
.tv-arow.future[disabled] { opacity: .75; }
.tv-arow.live { background: rgba(229,9,20,.10); }
.tv-arow.on { box-shadow: inset 3px 0 0 #2f6fd6; background: rgba(47,111,214,.14); }
.tv-badge { flex: none; align-self: center; font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 3px 7px; border-radius: 4px;
  background: rgba(255,255,255,.08); color: var(--muted); white-space: nowrap; }
.tv-badge.rec { background: rgba(47,111,214,.18); color: #8fb7ff; }
.tv-badge.live { background: var(--red); color: #fff; }
.tv-badge.on { background: #2f6fd6; color: #fff; }
.tv-arow:not([disabled]):hover, .tv-arow:not([disabled]):focus-visible { background: var(--surface-2); outline: none; }

/* ---- TV guide with a mouse: time slider, dragging, visible scrollbars ---- */
.epg-timebar { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.epg-step { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.epg-slider { flex: 1; min-width: 120px; accent-color: var(--red); height: 6px; cursor: pointer; }
.epg-slabel { flex: none; min-width: 170px; text-align: right; color: var(--soft); font-variant-numeric: tabular-nums; font-size: 13.5px; font-weight: 600; text-transform: capitalize; }
.epg-wrap { height: auto; }
.epg-scroll { cursor: grab; scrollbar-width: auto; scrollbar-color: #555 #161616; }
.epg-scroll.dragging { cursor: grabbing; user-select: none; }
.epg-scroll.dragging .epg-p { pointer-events: none; }
.epg-scroll::-webkit-scrollbar { width: 12px; height: 12px; }
.epg-scroll::-webkit-scrollbar-track { background: #161616; }
.epg-scroll::-webkit-scrollbar-thumb { background: #4a4a4a; border-radius: 6px; border: 2px solid #161616; }
.epg-scroll::-webkit-scrollbar-thumb:hover { background: #666; }
@media (max-width: 699px) { .epg-slabel { display: none; } .epg-step { padding: 6px 8px; } }
/* timeshift: a live channel watched behind its edge */
.tv-live.shift { background: #555; font-variant-numeric: tabular-nums; }

/* Valdymas → Serialų stebėjimas (sonarr.js) */
.son h3 { margin: 22px 0 10px; font-size: 1.02rem; }
.son .warn-box { background: rgba(232,124,3,.12); border: 1px solid rgba(232,124,3,.45); color: #ffc98a; border-radius: 8px; padding: 10px 14px; margin: 4px 0 12px; }
.son .warn-box a { color: #fff; }
.vpn-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; background: #1f1f1f; border: 1px solid #2e2e2e; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.vpn-line .ic svg { width: 18px; height: 18px; color: #46c37b; display: block; }
.vpn-line span { color: var(--muted); font-size: 13px; }
.vpn-line.down { background: #2a1414; border-color: #6b2424; color: #ffd6d6; }
.vpn-line[hidden] { display: none; }
.vpn-line.down .ic svg { color: #ff6b6b; }
.vpn-line.down span { color: #e6a3a3; }
.son-field { display: flex; flex-direction: column; gap: 5px; margin: 10px 0; max-width: 480px; }
.son-field span { color: var(--muted); font-size: 13px; }
.son-field input, .son-field select, .son-res-act select { background: #111; color: var(--text); border: 1px solid #3a3a3a; border-radius: 6px; padding: 9px 11px; font: inherit; }
.son-search-in { display: flex; align-items: center; gap: 10px; background: #111; border: 1px solid #3a3a3a; border-radius: 8px; padding: 0 12px; max-width: 560px; }
.son-search-in:focus-within { border-color: #777; }
.son-search-in .ic svg { width: 20px; height: 20px; color: var(--muted); }
.son-search-in input { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font: inherit; padding: 11px 0; outline: none; }
.son-results { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.son-res { display: flex; gap: 14px; align-items: center; background: #1f1f1f; border-radius: 8px; padding: 10px; }
.son-res-main { flex: 1; min-width: 0; }
.son-res-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.son-res-act select { width: 220px; padding: 7px 9px; font-size: 13.5px; }
.son-res-main + .son-res-act { flex: none; }
.son-ov { color: var(--muted); font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.son-title { font-weight: 800; }
.son-poster { flex: none; width: 74px; aspect-ratio: 2 / 3; border-radius: 6px; background: #262626 center / cover; overflow: hidden; }
.son-poster.sm { width: 52px; }
.son-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.son-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); background: #262626; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.son-badge .ic svg { width: 14px; height: 14px; }
.son-badge.ok { color: var(--green); background: rgba(70,211,105,.12); }
.son-q { background: #1f1f1f; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.son-q.bad { border: 1px solid rgba(232,124,3,.5); }
.son-q-top { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.son-q-state { margin-left: auto; color: var(--soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.son-bar { height: 4px; background: #333; border-radius: 2px; overflow: hidden; margin-top: 8px; }
.son-bar i { display: block; height: 100%; background: var(--red); }
.son-up-list { display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; }
.son-up-row { display: flex; gap: 12px; align-items: center; padding: 8px 12px; background: #1f1f1f; border-bottom: 1px solid #2a2a2a; }
.son-up-row.have { opacity: .7; }
.son-up-when { flex: none; width: 112px; color: var(--soft); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.son-up-what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.son-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.son-show { background: #1f1f1f; border-radius: 8px; padding: 10px; }
.son-show.off { opacity: .6; }
.son-show-top { display: flex; gap: 12px; }
.son-show-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.son-next { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--soft); }
.son-next .ic svg { width: 15px; height: 15px; color: var(--muted); }
.son-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.son-btns .btn.small { padding: 5px 10px; font-size: 12.5px; }
.son-eps { margin-top: 10px; }
.son-season { margin-top: 6px; }
.son-season summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.son-ep { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-top: 1px solid #2a2a2a; font-size: 13.5px; }
.son-ep.have { color: var(--muted); }
.son-ep-n { flex: none; width: 64px; font-variant-numeric: tabular-nums; color: var(--muted); }
.son-ep-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.son-ep .btn.small { padding: 4px 10px; font-size: 12.5px; }
@media (max-width: 640px) {
  .son-grid { grid-template-columns: 1fr; }
  .son-res { flex-wrap: wrap; }
  .son-res-act { width: 100%; justify-content: flex-start; }
  .son-up-when { width: 92px; }
}
/* the page's general input and select rules are more specific (:not(#q)); these win over them */
.son .son-search-in input[type=search]:not(#q) { border: 0; box-shadow: none; background: none; padding: 11px 0; width: auto; }
.son .son-res-act select:not(.sort):not(.season) { width: 220px; padding: 8px 10px; font-size: 13.5px; }
.son .son-field input:not(#q), .son .son-field select:not(.sort):not(.season) { padding: 9px 11px; }
.son-q-act { display: flex; justify-content: flex-end; margin-top: 6px; }
.son-src-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.son-src { display: flex; align-items: center; gap: 12px; background: #1f1f1f; border-radius: 8px; padding: 8px 12px; }
.son-src-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.son-src-main .error { flex-basis: 100%; margin: 0; min-height: 0; }
.son-src-on { display: inline-flex; position: relative; cursor: pointer; }
.son-badge.warn { color: #ffc98a; background: rgba(232,124,3,.14); }
.son-src-add { margin-top: 10px; }
.son-cat { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 420px; overflow: auto; padding-right: 4px; }
.son-cat-item { display: flex; flex-direction: column; gap: 3px; text-align: left; background: #1f1f1f; border: 1px solid transparent; border-radius: 8px; padding: 9px 12px; color: inherit; cursor: pointer; }
.son-cat-item:hover, .son-cat-item:focus-visible { border-color: #666; outline: none; }
.son-cat-item.added { opacity: .65; }
.son-cat-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.son-form-box { background: #1c1c1c; border: 1px solid #3a3a3a; border-radius: 10px; padding: 14px 16px; margin-top: 12px; }
.son-field small { font-size: 12px; }
.son-check { display: flex; align-items: center; gap: 8px; margin: 10px 0; cursor: pointer; }
.son .warn-box ul { margin: 6px 0 0; padding-left: 20px; }

/* Vartotojai: viewing rights (app.js accessEditor) */
.adm-user-wrap.open { background: #1b1b1b; border-radius: 10px; padding: 0 12px 12px; margin: 6px -12px; }
.adm-user-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.adm-user-main .son-badge { margin-left: 8px; }
.adm-user-btns { display: flex; align-items: center; gap: 8px; flex: none; }
.acc-edit { border-top: 1px solid #2c2c2c; padding-top: 6px; }
.acc-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 4px; }
.acc-row { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid #262626; }
.acc-label { display: flex; flex-direction: column; gap: 4px; }
.acc-ctl { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.acc-ctl .adm-check { margin-top: 0; }
.acc-ctl .switch-ui { margin-right: 4px; }
.acc-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.acc-inline input[type=date] { padding: 7px 10px; border-radius: 6px; border: 1px solid #5a5a5a; background: rgba(0,0,0,.35); color: #fff; color-scheme: dark; }
.acc-pick-items { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow: auto; }
.acc-chip { display: inline-flex; align-items: center; gap: 6px; background: #262626; border-radius: 999px; padding: 5px 12px 5px 8px; font-size: 13.5px; cursor: pointer; }
.acc-tv { display: flex; flex-direction: column; gap: 10px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: #111; border: 1px solid #333; border-radius: 8px; padding: 3px; width: fit-content; }
.seg button { background: none; border: 0; color: var(--muted); padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.seg button.on { background: #fff; color: #000; font-weight: 700; }
.seg button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
@media (max-width: 700px) {
  .acc-row { grid-template-columns: 1fr; gap: 8px; }
  .adm-user { flex-wrap: wrap; }
}

/* ---------- the hero marquee (app.js billboard) ---------- */
.billboard.live { --hero-ms: 9000ms; isolation: isolate; }
.bb-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s cubic-bezier(.4,0,.2,1), filter 1.4s ease; filter: blur(6px) saturate(1.1); }
.bb-layer.on { opacity: 1; filter: none; }
.bb-layer .bb-art { transform-origin: 70% 30%; will-change: transform; }
.bb-layer.on .bb-art { animation: bb-drift calc(var(--hero-ms) + 2400ms) linear both; }
.bb-layer.on.drift-b .bb-art { transform-origin: 25% 60%; animation-name: bb-drift-b; }
.billboard.paused .bb-layer.on .bb-art { animation-play-state: paused; }
@keyframes bb-drift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.11) translate3d(-1.6%, .8%, 0); } }
@keyframes bb-drift-b { from { transform: scale(1.1) translate3d(-1.2%, 0, 0); } to { transform: scale(1.02) translate3d(.8%, -.6%, 0); } }
.bb-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.billboard.live .bb-shade {
  background:
    radial-gradient(120% 90% at 0% 100%, rgba(0,0,0,.78) 0%, rgba(0,0,0,.35) 38%, rgba(0,0,0,0) 62%),
    linear-gradient(77deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.2) 34%, rgba(0,0,0,0) 60%),
    linear-gradient(to bottom, rgba(20,20,20,.55) 0%, rgba(20,20,20,0) 18%, rgba(20,20,20,0) 58%, rgba(20,20,20,.6) 80%, var(--bg) 100%);
}
.billboard.live .bb-info { animation: none; bottom: 27%; }
.bb-words > * { opacity: 0; transform: translateY(14px); }
.bb-words.in > * { animation: bb-rise .9s cubic-bezier(.2,.7,.2,1) both; }
.bb-words.in > *:nth-child(2) { animation-delay: .08s; }
.bb-words.in > *:nth-child(3) { animation-delay: .18s; }
.bb-words.in > *:nth-child(4) { animation-delay: .28s; }
@keyframes bb-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.bb-kicker {
  display: flex; align-items: center; gap: .6em; margin-bottom: .9vw; font-size: clamp(.8rem, 1vw, 1.05rem); font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.bb-kicker i { width: 26px; height: 3px; background: var(--red); border-radius: 2px; box-shadow: 0 0 12px rgba(229,9,20,.8); }
.bb-kicker.new i { background: #46d369; box-shadow: 0 0 12px rgba(70,211,105,.7); }
.bb-kicker.top { letter-spacing: .02em; text-transform: none; font-size: clamp(1rem, 1.45vw, 1.55rem); font-weight: 700; }
.bb-kicker .top10 { position: static; width: 2.2em; padding: 3px 0; font-size: 1rem; border-radius: 2px; }
.bb-kicker .top10 span { font-size: .45em; }
.bb-kicker .top10 b { font-size: .85em; }
.bb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .55em; margin: 0 0 .9vw; font-size: clamp(.85rem, 1.05vw, 1.15rem); color: #e5e5e5; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.bb-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.55); }
.bb-meta .bb-star { color: #ffd166; font-weight: 700; }
.bb-meta .bb-cert { border: 1px solid rgba(255,255,255,.6); padding: 0 .45em; border-radius: 3px; font-size: .85em; }
.billboard.live .bb-synopsis { -webkit-line-clamp: 3; max-width: 46ch; }
/* On a low window the words would climb under the header (and a category's "Filmai · Žanrai" bar):
   they stop below it, and the title logo shrinks to make room. */
@media (min-width: 761px) {
  .billboard.live .bb-info { top: calc(var(--nav-h) + 12px); display: flex; flex-direction: column; justify-content: flex-end; }
  .subnav + .billboard.live .bb-info { top: calc(var(--nav-h) + 76px); }
  .billboard.live .bb-words { display: flex; flex-direction: column; align-items: flex-start; min-height: 0; }
  .billboard.live .bb-words > *, .billboard.live .bb-buttons { flex-shrink: 0; }
  .billboard.live .bb-words > img.bb-logo { flex-shrink: 1; min-height: 28px; }
}
@media (min-width: 761px) and (max-height: 700px) {
  .billboard.live .bb-synopsis { -webkit-line-clamp: 2; }
}

.bb-side { position: absolute; right: var(--pad); bottom: 21%; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.bb-count { font-variant-numeric: tabular-nums; letter-spacing: .12em; font-size: 13px; color: rgba(255,255,255,.65); text-shadow: 0 1px 6px #000; }
.bb-count b { color: #fff; font-size: 15px; }
.bb-fill { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--red); box-shadow: 0 0 10px rgba(229,9,20,.9); }
.billboard.counting .bb-bar.on .bb-fill { animation: bb-fill var(--hero-ms) linear both; }
.billboard.paused .bb-fill { animation-play-state: paused !important; }
@keyframes bb-fill { from { width: 0; } to { width: 100%; } }
.bb-bars { display: flex; gap: 6px; }
.bb-bar { position: relative; width: 26px; height: 4px; padding: 0; border: 0; border-radius: 2px; background: rgba(255,255,255,.28); overflow: hidden; cursor: pointer; transition: width .5s cubic-bezier(.2,.7,.2,1), background .3s; }
.bb-bar:hover { background: rgba(255,255,255,.55); }
.bb-bar.on { width: 56px; background: rgba(255,255,255,.35); }
.bb-bar .bb-fill { height: 100%; }
.bb-nav {
  position: absolute; top: 42%; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.35); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .3s, background .2s;
  backdrop-filter: blur(6px);
}
.bb-nav svg { width: 26px; height: 26px; }
.bb-nav.prev { left: 14px; }
.bb-nav.next { right: 14px; }
.billboard.live:hover .bb-nav { opacity: .85; }
.bb-nav:hover { background: rgba(0,0,0,.6); opacity: 1 !important; }
html.tv .bb-nav { display: none; }
@media (prefers-reduced-motion: reduce) {
  .bb-layer.on .bb-art { animation: none; }
  .bb-words.in > * { animation: none; opacity: 1; transform: none; }
}
@media (max-width: 1100px) {
  .bb-side { bottom: 23%; }
  .bb-bar { width: 18px; }
  .bb-bar.on { width: 40px; }
}
@media (max-width: 760px) {
  .bb-nav, .bb-meta, .bb-count { display: none; }
  .bb-side { left: 50%; right: auto; bottom: 2.5%; transform: translateX(-50%); }
  .billboard.live .bb-info { bottom: 7%; }
  .billboard.live .bb-shade { background: linear-gradient(to bottom, rgba(20,20,20,.35) 0%, rgba(20,20,20,0) 16%, rgba(20,20,20,0) 38%, rgba(20,20,20,.75) 70%, var(--bg) 100%); }
  .bb-kicker { justify-content: center; margin-bottom: 8px; }
  .bb-bars { gap: 5px; }
  .bb-bar { width: 18px; height: 3px; }
  .bb-bar.on { width: 30px; background: rgba(255,255,255,.45); }
  .bb-bar .bb-fill { height: 100%; box-shadow: none; background: #fff; }
}

/* Filmų stebėjimas (radarr.js): most of it borrows the Serialų stebėjimas look */
.rad-chips { display: flex; gap: 8px; margin: -2px 0 12px; }
.rad-chips .chip { font: inherit; font-size: 13.5px; padding: 6px 14px; }
.rad-when { color: #ffd166; margin-top: 2px; }
.son-check.s { font-size: 13px; color: var(--muted); margin: 0; }
.son h3 .son-speed { color: #46d369; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Stebėsena (#/monitor, monitor.js): live TV instruments ---------- */
.mon { padding-left: var(--pad); padding-right: var(--pad); padding-bottom: 60px; --ok: #46d369; --warn: #e87c03; --bad: #e50914; --info: #8fb7ff; }
.mon h2 { margin: 0 0 12px; font-size: 1.05rem; font-weight: 800; letter-spacing: .02em; }
.mon-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.mon-head h1 { margin: 0; font-size: 2rem; font-weight: 900; letter-spacing: -.01em; }
.mon-back { width: 38px; height: 38px; border-radius: 50%; background: #262626; display: grid; place-items: center; transition: background .2s; }
.mon-back:hover { background: #333; }
.mon-back svg { width: 20px; height: 20px; }
.mon-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--soft);
  background: rgba(229,9,20,.14); border: 1px solid rgba(229,9,20,.45); padding: 4px 10px 4px 8px; border-radius: 99px; }
.mon-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(229,9,20,.7); animation: monPulse 1.6s infinite; }
.mon-live.stale { filter: grayscale(1); opacity: .6; }
.mon-live.stale i { animation: none; }
@keyframes monPulse { 70% { box-shadow: 0 0 0 9px rgba(229,9,20,0); } 100% { box-shadow: 0 0 0 0 rgba(229,9,20,0); } }

.mon-nas { display: flex; gap: 8px; flex-wrap: wrap; }
.mon-chip { position: relative; min-width: 118px; padding: 7px 12px 9px; border-radius: 10px; background: linear-gradient(180deg, #1d1d1d, #141414);
  border: 1px solid #2c2c2c; overflow: hidden; }
.mon-chip > span { display: block; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.mon-chip .mc-v b { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.mon-chip .mc-v small { margin-left: 3px; color: var(--muted); font-size: 11.5px; }
.mon-chip > i { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--ok), #9ef0b3);
  transform-origin: left; transform: scaleX(var(--f, 0)); transition: transform .9s cubic-bezier(.2,.8,.2,1); }
.mon-chip.warn > i { background: linear-gradient(90deg, var(--warn), #ffb35c); }

.mon-tabrow { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.mon-tabrow .mon-tabs { margin-bottom: 0; flex: 1 1 auto; min-width: 0; }
.mon-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.mon-tabw { position: relative; display: inline-flex; }
.mon-tab.ended { padding-right: 42px; }
.mon-x { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
.mon-x:hover, .mon-x:focus-visible { background: #3a3a3a; color: #fff; }
.mon-x svg { width: 16px; height: 16px; }
.mon-clear { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 12px; cursor: pointer;
  background: transparent; border: 1px dashed #3a3a3a; color: var(--muted); font-weight: 700; font-size: 13px; transition: color .2s, border-color .2s; }
.mon-clear:hover { color: #fff; border-color: #777; }
.mon-clear svg { width: 15px; height: 15px; }
.mon-tabs:empty { display: none; }
.mon-tab { display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px 9px 13px; border-radius: 12px; cursor: pointer;
  background: #1a1a1a; border: 1px solid #2c2c2c; color: var(--soft); font-weight: 700; transition: border-color .2s, background .2s, transform .15s; }
.mon-tab:hover { background: #222; }
.mon-tab:active { transform: scale(.98); }
.mon-tab.on { background: #262626; border-color: #e5e5e5; color: #fff; }
.mon-tab small { color: var(--dim); font-weight: 600; font-size: 12px; }
.mon-tab.ended { opacity: .62; }
.mon-led { width: 10px; height: 10px; border-radius: 50%; background: #555; flex: none; }
.mon-tab.ok .mon-led { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.mon-tab.info .mon-led { background: var(--info); box-shadow: 0 0 8px var(--info); }
.mon-tab.warn .mon-led { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.mon-tab.bad .mon-led { background: var(--bad); box-shadow: 0 0 10px var(--bad); animation: monBlink 1s infinite; }
@keyframes monBlink { 50% { opacity: .35; } }
.mon-empty { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 14px 18px; border: 1px dashed #333; border-radius: 12px; margin-bottom: 14px; }
.mon-empty svg { width: 22px; height: 22px; }

.mon-panel { position: relative; background: linear-gradient(180deg, #1b1b1b 0%, #131313 100%); border: 1px solid #2a2a2a; border-radius: 16px;
  padding: 18px 20px; box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 32px rgba(0,0,0,.45); }
.mon-panel + .mon-panel { margin-top: 14px; }

.mon-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 2px 4px; color: var(--muted); font-size: 13px; }
.mon-meta span + span::before { content: '•'; color: #444; margin-right: 18px; }

.mon-gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 18px 0 10px; }
.mg { display: flex; flex-direction: column; align-items: center; text-align: center; transition: opacity .4s; }
.mg-svg { width: 100%; max-width: 250px; height: auto; display: block; filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)); }
.mg-label { margin-top: 6px; font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.mg-sub { min-height: 1.3em; font-size: 12.5px; color: var(--dim); }
.mg.off .mg-svg { filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)) saturate(.2) brightness(.8); }
.mg-num { font: 700 10px var(--font); fill: #b3b3b3; }
.mg-read { font: 800 25px var(--font); fill: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mg-unit { font: 600 8.5px var(--font); fill: #808080; letter-spacing: .1em; text-transform: uppercase; }
.mg-led { transition: fill .4s; }

.mon-counters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.mon-counters:empty { display: none; }
.mon-count { position: relative; padding: 12px 14px; border-radius: 12px; background: #161616; border: 1px solid #2a2a2a; overflow: hidden; }
.mon-count b { display: block; font-size: 1.9rem; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; }
.mon-count span { display: block; font-weight: 700; font-size: 13px; color: var(--soft); }
.mon-count small { display: block; font-size: 12px; color: var(--dim); }
.mon-count.bad b { color: var(--red); text-shadow: 0 0 18px rgba(229,9,20,.45); }
.mon-count.bump { animation: monBump 1.2s ease-out; }
@keyframes monBump { 0% { background: rgba(229,9,20,.55); transform: scale(1.04); } 100% { background: #161616; transform: none; } }

.mc-axis { font: 600 11px var(--font); fill: #808080; }
.mon-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.mon-legend span::before { content: ''; display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

.mon-log { display: flex; flex-direction: column; min-height: 0; }
.mon-events { list-style: none; margin: 0; padding: 0 4px 0 0; overflow-y: auto; max-height: 268px; scrollbar-width: thin; scrollbar-color: #444 transparent; display: flex; flex-direction: column; gap: 6px; }
.ev { display: flex; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: 8px; background: #171717; border-left: 3px solid #444; font-size: 13px; }
.ev time { flex: none; color: var(--dim); font-variant-numeric: tabular-nums; font-size: 12px; }
.ev.info { border-left-color: #555; color: var(--muted); }
.ev.warn { border-left-color: var(--warn); }
.ev.bad { border-left-color: var(--bad); background: rgba(229,9,20,.08); }
.ev.k-start, .ev.k-viewer { border-left-color: var(--info); }

.mon-devices { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.mon-devices:empty { display: none; }
.dev { background: #161616; border: 1px solid #2a2a2a; border-radius: 14px; padding: 14px 16px; transition: opacity .4s; }
.dev.gone { opacity: .5; }
.dev { cursor: pointer; transition: opacity .4s, border-color .25s, box-shadow .25s; }
.dev:hover { border-color: #3a3a3a; }
.dev.sel { border-color: #e5e5e5; box-shadow: 0 0 0 1px #e5e5e5 inset, 0 8px 24px rgba(0,0,0,.45); }
.dev.gone { cursor: default; }
.dev-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #141414; background: #e5e5e5;
  padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.dev-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.dev-ic { width: 38px; height: 38px; border-radius: 10px; background: #262626; display: grid; place-items: center; flex: none; }
.dev-ic svg { width: 20px; height: 20px; }
.dev-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dev-name b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-name span { font-size: 12.5px; color: var(--muted); }
.pill { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; background: #333; color: var(--soft); }
.pill.playing { background: rgba(70,211,105,.18); color: #7be696; }
.pill.buffering, .pill.frozen { background: rgba(229,9,20,.22); color: #ff8a8f; animation: monBlink 1s infinite; }
.pill.paused { background: rgba(143,183,255,.18); color: #b9d1ff; }
.pill.error { background: var(--red); color: #fff; }
.pill.silent, .pill.left { background: #2a2a2a; color: var(--dim); }
.dev-body { display: grid; grid-template-columns: auto auto 1fr; gap: 16px; align-items: end; }
.dev dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 13px; align-self: center; }
.dev dt { color: var(--dim); }
.dev dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.dev dd.bad { color: #ff5a60; }
.dev dd.warn { color: #ffb35c; }
.dev-err { margin: 10px 0 0; color: #ff8a8f; font-size: 12.5px; }

/* A liquid tank: the reserve as a level, with a moving surface and a mark at the target. */
.tank-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tank-wrap b { font-size: 14px; font-variant-numeric: tabular-nums; }
.tank-wrap span { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.tank { --c1: #46d369; --c2: #1f8a3b; position: relative; width: 46px; height: 124px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(90deg, #0b0b0b, #161616 45%, #0b0b0b); border: 1px solid #333;
  box-shadow: inset 0 0 12px rgba(0,0,0,.9), 0 4px 12px rgba(0,0,0,.5); }
.tank.amber { --c1: #ffb35c; --c2: #b35f00; }
.tank.red { --c1: #ff4d55; --c2: #8a0610; }
.tank .liq { position: absolute; left: 0; right: 0; bottom: 0; height: max(var(--h, 0%), 6px); background: linear-gradient(0deg, var(--c2), var(--c1));
  transition: height 1s cubic-bezier(.3,.9,.3,1); box-shadow: 0 0 14px var(--c1); }
.tank .liq::before, .tank .liq::after { content: ''; position: absolute; left: 50%; width: 140px; height: 140px; top: -137px; margin-left: -70px;
  background: #121212; border-radius: 43%; animation: monWave 6s linear infinite; }
.tank .liq::after { border-radius: 40%; background: rgba(18,18,18,.55); animation-duration: 9s; top: -135px; }
@keyframes monWave { to { transform: rotate(360deg); } }
.tank::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,.1), rgba(255,255,255,0) 35%, rgba(255,255,255,0) 70%, rgba(255,255,255,.05)); }
.tank-mark { position: absolute; left: -2px; right: -2px; bottom: var(--m, 50%); border-top: 1.5px dashed rgba(255,255,255,.55); z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .mon-live i, .mon-tab.bad .mon-led, .pill.buffering, .tank .liq::before, .tank .liq::after { animation: none; }
}
@media (max-width: 1100px) {
  .mon-gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mon-counters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .mon-head h1 { font-size: 1.5rem; }
  .mon-gauges { gap: 10px; }
  .mon-counters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mon-devices { grid-template-columns: minmax(0, 1fr); }
  .mon-chip { min-width: 0; flex: 1 1 40%; }
  .mon-meta { gap: 2px 12px; }
  .mon-meta span + span::before { display: none; }
}
.adm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.adm-top h1 { margin: 0; }

/* Srautas: provider → NAS → devices (monitor.js monFlow, drawSpeed) */
.mf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; align-items: center; }
.mf-box { background: radial-gradient(120% 90% at 50% 50%, #1c1c1c 0%, #111 70%); border: 1px solid #262626; border-radius: 14px; padding: 6px; }
.mf-svg { display: block; width: 100%; height: auto; }
.mf-track { fill: none; stroke: #232323; stroke-width: 12; stroke-linecap: round; }
.mf-flow, .mf-flow-glow { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 0.1 16; animation: mfRun 1s linear infinite; }
.mf-flow-glow { stroke-width: 9; opacity: .55; }
@keyframes mfRun { to { stroke-dashoffset: -16.1; } }
.mf-link.idle .mf-flow, .mf-link.idle .mf-flow-glow { opacity: .15; }
.mf-link.bad .mf-flow, .mf-link.bad .mf-flow-glow { stroke: #e87c03; }
.mf-link.bad .mf-val { fill: #ffb35c; }
.mf-val { font: 800 22px var(--font); fill: #fff; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: #111; stroke-width: 4px; }
.mf-unit { font: 600 12px var(--font); fill: #b3b3b3; stroke-width: 0; }
.mf-sub { font: 600 12px var(--font); fill: #808080; paint-order: stroke; stroke: #111; stroke-width: 3px; }
.mf-name { font: 800 15px var(--font); fill: #e5e5e5; letter-spacing: .04em; }
.mf-dname { font: 700 14px var(--font); fill: #e5e5e5; }
.mf-dev.empty .mf-dname { fill: #666; font-weight: 600; }
.mf-halo { fill: none; stroke: #e50914; stroke-opacity: .35; stroke-width: 2; animation: mfHalo 2.4s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes mfHalo { 0% { transform: scale(.85); stroke-opacity: .55; } 100% { transform: scale(1.25); stroke-opacity: 0; } }
.mf-led { fill: #46d369; animation: mfLed 1.1s steps(2, jump-none) infinite; }
@keyframes mfLed { 50% { fill: #1c5a2c; } }
.ms-box { min-width: 0; }
.mon-speed { width: 100%; overflow: hidden; }
.ms-svg { display: block; width: 100%; height: 250px; }
.ms-spike { font: 700 10.5px var(--font); }
.ms-grid { stroke: #242424; stroke-width: 1; }
.ms-line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.ms-dot { filter: drop-shadow(0 0 6px currentColor); }
.ms-need { stroke: #46d369; stroke-opacity: .6; stroke-dasharray: 5 5; }
.ms-need-t { font: 600 10.5px var(--font); fill: #46d369; }
.ms-val { font: 800 13px var(--font); font-variant-numeric: tabular-nums; }
.mon-legend .l-in::before { background: #ff4a52; }
.mon-legend .l-out::before { background: #8fb7ff; }
.mon-legend .l-need::before { background: repeating-linear-gradient(90deg, #46d369 0 4px, transparent 4px 7px); }
.mc-v .mc-pk { margin-left: 6px; font-style: normal; font-size: 11px; color: var(--dim); }
@media (max-width: 1100px) { .mf-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .mf-flow, .mf-flow-glow, .mf-halo, .mf-led { animation: none; } }

/* ‹ › at the ends of a chip row that does not fit (chipScroller). */
.chip-scroller { position: relative; }
.chip-arrow {
  position: absolute; top: 0; bottom: 6px; z-index: 2; width: 40px; display: flex; align-items: center; justify-content: center;
  border: 0; padding: 0; color: #fff; cursor: pointer;
}
.chip-arrow[hidden] { display: none; }
.chip-arrow.prev { left: 0; background: linear-gradient(90deg, #0e0e10 55%, transparent); justify-content: flex-start; padding-left: 4px; }
.chip-arrow.next { right: 0; background: linear-gradient(270deg, #0e0e10 55%, transparent); justify-content: flex-end; padding-right: 4px; }
.chip-arrow .ic svg { width: 26px; height: 26px; }
.chip-arrow:hover .ic svg { transform: scale(1.15); }
html.tv .chip-arrow { display: none; }

/* Siuntimo nustatymai (dlprefs.js) */
.dl-prefs > .seg { margin: 4px 0 6px; }
.dl-ctl { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-width: 0; }
.dl-gbrow { display: flex; align-items: center; gap: 8px; }
.dl-gb { width: 90px; }
.dl-words { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-word { display: inline-flex; align-items: center; gap: 4px; background: #262629; border: 1px solid #3a3a3e; color: #eee;
  border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; cursor: pointer; }
.dl-word svg { width: 14px; height: 14px; opacity: .7; }
.dl-word:hover, .dl-word:focus-visible { border-color: var(--red); }
.dl-word-in { width: 200px; }
.dl-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dl-save { margin-top: 14px; align-items: center; }
@media (max-width: 700px) { .dl-word-in { width: 100%; } }

/* Valdymas → Diskai (disks.js) */
.dsk { display: grid; gap: 12px; }
.dsk-alert { border-radius: 8px; padding: 11px 14px; font-size: 13.5px; line-height: 1.5; }
.dsk-alert.bad { background: #2a1414; border: 1px solid #6b2424; color: #ffd6d6; }
.dsk-alert.warn { background: #26200f; border: 1px solid #6b5a24; color: #ffe9bf; }
.dsk-vol { background: #1f1f1f; border: 1px solid #2e2e2e; border-radius: 8px; padding: 11px 14px; }
.dsk-vol-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; }
.dsk-bar { height: 8px; border-radius: 4px; background: #333; margin-top: 8px; overflow: hidden; }
.dsk-bar i { display: block; height: 100%; background: #46c37b; }
.dsk-bar i.low { background: #f0b84a; }
.dsk-low { color: #f0b84a; }
.dsk-bad { color: #ff6b6b; font-weight: 700; }
.dsk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.dsk-card { background: #1f1f1f; border: 1px solid #2e2e2e; border-radius: 8px; padding: 11px 14px; font-size: 13.5px; }
.dsk-card.warn { border-color: #6b5a24; }
.dsk-card.bad { border-color: #8a3a3a; background: #241515; }
.dsk-card-head { display: flex; justify-content: space-between; font-size: 14.5px; margin-bottom: 2px; }
.dsk-state { color: #46c37b; }
.dsk-card.warn .dsk-state { color: #f0b84a; }
.dsk-card.bad .dsk-state { color: #ff6b6b; }
.dsk-row { display: flex; justify-content: space-between; line-height: 1.8; }

/* The AI assistant (ai.js) */
.ai-btn { background: var(--red); color: #fff; border: 0; }
.ai-btn .ic svg, .ai-answer .ic svg, .ai-mark .ic svg, .ai-wishes h2 .ic svg, .rec-pill.ai .ic svg { width: 16px; height: 16px; vertical-align: -2px; }
.ai-answer { display: flex; gap: 8px; align-items: flex-start; font-size: 16px; margin: 16px 0 12px; }
.ai-answer .ic { color: var(--red); }
.ai-wait { display: flex; align-items: center; gap: 10px; color: var(--muted); margin-top: 14px; }
.ai-dots { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #444; border-top-color: var(--red); animation: aispin .8s linear infinite; }
@keyframes aispin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ai-dots { animation: none; } }
.ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
.ai-hit .tile { width: 100%; }
.ai-cap { display: flex; flex-direction: column; gap: 2px; margin-top: 7px; font-size: 13.5px; }
.ai-why { color: #c9c9c9; font-size: 12.5px; line-height: 1.4; }
.ai-tvbox { position: relative; aspect-ratio: 2 / 3; border-radius: 6px; background: linear-gradient(160deg, #262626, #161616); display: flex;
  align-items: center; justify-content: center; cursor: pointer; border: 1px solid #2e2e2e; }
.ai-tvbox:hover, .ai-tvbox:focus-visible { border-color: #fff; outline: none; }
.ai-tvbox img { max-width: 70%; max-height: 40%; object-fit: contain; }
.ai-tvact { position: absolute; left: 8px; bottom: 8px; font-size: 12px; font-weight: 700; background: rgba(0, 0, 0, .6); padding: 3px 8px; border-radius: 4px; }
.ai-add { display: flex; gap: 8px; margin: 6px 0 12px; max-width: 640px; }
.ai-add input { flex: 1; min-width: 0; background: #111; color: var(--text); border: 1px solid #3a3a3a; border-radius: 6px; padding: 9px 11px; font: inherit; }
.ai-rule { align-items: center; }
.ai-mark { color: var(--red); margin-right: 10px; }
.rec-pill.ai { color: var(--red); }
.ok-text { color: #46c37b; }
.ai-toggle { color: #fff; display: flex; font-size: 22px; padding: 6px; }
.ai-toggle .ic svg { width: 22px; height: 22px; }
.ai-toggle[hidden] { display: none; }
.ai-page .pagetitle .ic svg { width: 26px; height: 26px; color: var(--red); vertical-align: -3px; }
.ai-ask { display: flex; gap: 10px; align-items: stretch; max-width: 820px; margin: 16px 0 10px; }
.ai-q { flex: 1; min-width: 0; resize: vertical; background: #111; color: var(--text); border: 1px solid #3a3a3a; border-radius: 8px;
  padding: 12px 14px; font: inherit; font-size: 16px; line-height: 1.4; }
.ai-q:focus { border-color: #888; outline: none; }
.ai-examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 18px; }
@media (max-width: 640px) { .ai-ask { flex-direction: column; } }
.ai-tvact.rec { background: var(--red); }
.ai-wishoffer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 14px; }

/* The tile menu (tilemenu.js): right click, long press */
.tile, .ranktile { -webkit-touch-callout: none; }
.tm-shade { position: fixed; inset: 0; z-index: 400; }
.tm-shade.sheet, .tm-shade:has(.tm-dialog) { background: rgba(0, 0, 0, .55); }
.tm { position: fixed; min-width: 240px; max-width: 320px; background: #1e1e1e; border: 1px solid #3a3a3a; border-radius: 10px;
  padding: 6px 0; box-shadow: 0 12px 32px rgba(0, 0, 0, .6); }
.tm.sheet { left: 0; right: 0; bottom: 0; top: auto; max-width: none; border-radius: 16px 16px 0 0; padding-bottom: max(10px, env(safe-area-inset-bottom));
  animation: tmup .18s ease-out; }
@keyframes tmup { from { transform: translateY(40%); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .tm.sheet { animation: none; } }
.tm-head { display: flex; flex-direction: column; gap: 2px; padding: 8px 16px 9px; border-bottom: 1px solid #333; margin-bottom: 4px; }
.tm-head span { color: var(--muted); font-size: 12.5px; }
.tm-item { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; color: var(--text); font: inherit;
  font-size: 14.5px; padding: 9px 16px; text-align: left; cursor: pointer; }
.tm.sheet .tm-item { padding: 13px 18px; font-size: 16px; }
.tm-item:hover, .tm-item:focus-visible { background: #2c2c2c; outline: none; }
.tm-item .ic svg { width: 18px; height: 18px; display: block; }
.tm-item.ai .ic { color: var(--red); }
.tm-sep { border-top: 1px solid #333; margin-top: 4px; padding: 8px 16px 2px; font-size: 11.5px; color: #888; }
.tm-dialog { position: fixed; left: 50%; top: 12vh; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); max-height: 76vh; overflow: auto;
  background: #1e1e1e; border: 1px solid #3a3a3a; border-radius: 12px; padding: 18px 20px; }
.tm-dialog h3 { margin: 0 0 6px; }
.tm-match-row { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.tm-match-row input[type=text] { flex: 1; min-width: 0; background: #111; color: var(--text); border: 1px solid #3a3a3a; border-radius: 6px; padding: 8px 10px; font: inherit; }

/* ---------- Chromecast (cast.js) ---------- */
.player .castbtn.on { color: var(--accent); }
.player .castcover { position: absolute; inset: 0; display: grid; place-items: center; background: #000; overflow: hidden; }
.player .castcover .cc-art { position: absolute; inset: -20px; background: center / cover no-repeat; filter: blur(14px) brightness(.38); }
.player .castcover .cc-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 0 24px; max-width: 560px; }
.player .castcover .cc-ic svg { width: 64px; height: 64px; color: var(--accent); }
.player .castcover .cc-dev { color: #d8d9de; font-size: 15px; }
.player .castcover .cc-t { font-weight: 800; font-size: 22px; line-height: 1.25; margin-bottom: 8px; }
.player.casting .ui { opacity: 1 !important; }
.player.casting { cursor: default !important; }
.castbar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 35; width: min(560px, calc(100% - 32px));
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 14px; overflow: hidden;
  background: rgba(24,24,27,.96); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 12px 40px rgba(0,0,0,.55); }
.castbar[hidden] { display: none; }
.castbar .cb-prog { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); }
.castbar .cb-ic svg { width: 24px; height: 24px; color: var(--accent); display: block; }
.castbar .cb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; background: none; border: 0; color: #fff; cursor: pointer; text-align: left; padding: 2px 0; font: inherit; }
.castbar .cb-main b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.castbar .cb-main span { font-size: 12px; color: #a9aab1; }
.castbar .cb-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.castbar .cb-btn:hover { background: rgba(255,255,255,.16); }
.castbar .cb-btn svg { width: 22px; height: 22px; }
.player.casting .cast-hide { display: none !important; }
.player .castcover .cc-logo { max-width: 180px; max-height: 90px; object-fit: contain; margin-bottom: 4px; }
.player .castcover .cc-now { color: #d8d9de; font-size: 15px; }
.player .castbtn.dim { opacity: .55; }

/* ---------- signing a TV in with the phone (app.js renderLink / tvLinkPanel) ---------- */
.linkpage { display: grid; place-items: center; min-height: 70vh; padding: 24px 16px; }
.linkbox { width: min(440px, 100%); background: var(--surface, #1c1c1f); border-radius: 14px; padding: 28px 24px; text-align: center; }
.linkbox h1 { font-size: 1.5rem; margin: 6px 0 10px; }
.linkbox form { display: grid; gap: 12px; }
.linkbox .link-code { font-size: 28px; letter-spacing: 6px; text-align: center; text-transform: uppercase; padding: 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.2); background: #111; color: #fff; font-weight: 800; }
.linkbox .link-tv svg { width: 56px; height: 56px; color: var(--accent); }
.linkbox .link-tv.ok svg { color: #46d369; }
.linkbox .link-dev { font-size: 1.15rem; font-weight: 700; }
.linkbox .link-btns { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.linkbox .link-btns .btn { min-width: 130px; justify-content: center; }
/* A TV's sign-in: the QR card in the middle; the password form slides out beside it. */
.auth.qr-first { display: flex; align-items: center; justify-content: center; }
.auth.qr-first .auth-form { max-width: 0; opacity: 0; overflow: hidden; margin-left: 0; transform: translateX(-36px) scale(.98);
  transition: max-width .6s cubic-bezier(.2,.8,.2,1), margin-left .6s cubic-bezier(.2,.8,.2,1), opacity .35s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.auth.qr-first.open .auth-form { max-width: 480px; margin-left: 40px; opacity: 1; transform: none; transition-delay: 0s, 0s, .12s, 0s; }
.auth.qr-first .auth-form .box { width: 440px; }
.auth .tvlink { transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.auth .tvlink-alt { margin-top: 14px; background: none; border: 0; color: #d8d9de; font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; padding: 10px 14px; border-radius: 8px; display: inline-flex; gap: 8px; align-items: center; }
.auth .tvlink-alt:hover, .auth .tvlink-alt:focus-visible { color: #fff; background: rgba(255,255,255,.1); outline: 2px solid #fff; outline-offset: 2px; }
.auth .tvlink-alt .chev { font-size: 20px; line-height: 1; transition: transform .4s ease; }
.auth.qr-first.open .tvlink-alt .chev { transform: rotate(180deg); }
.auth .tvlink { width: min(380px, 100%); text-align: center; background: rgba(0,0,0,.75); border-radius: 6px; padding: 32px 28px; }
.auth .tvlink h2 { margin: 0 0 6px; font-size: 1.6rem; }
.auth .tvlink-qr { width: 240px; height: 240px; background: #fff; border-radius: 10px; padding: 10px; margin: 14px auto 6px; display: block; image-rendering: pixelated; }
.auth .tvlink-code { font-size: 40px; font-weight: 900; letter-spacing: 6px; margin: 4px 0; }

/* ---------- scrubbing previews over the film timeline (app.js, server trickplay.go) ---------- */
.player .seek .tp { position: absolute; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column;
  align-items: center; pointer-events: none; z-index: 3; }
.player .seek .tp[hidden] { display: none; }
.player .seek .tp-img { background-repeat: no-repeat; border-radius: 6px; border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 8px 28px rgba(0,0,0,.6); background-color: #000; }
.player .seek .tp-img[hidden] { display: none; }
.player .seek .tp-time { margin-top: 6px; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgba(0,0,0,.9); }
@media (max-width: 700px) { .player .seek .tp-img { zoom: .6; } }

/* ---------- Valdymas → Atsarginės kopijos (app.js backupsPanel) ---------- */
.bk { display: grid; gap: 12px; }
.bk-warn { background: rgba(232,124,3,.12); border: 1px solid rgba(232,124,3,.35); color: #f2c27a; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.bk-actions { display: flex; gap: 10px; }
.bk-list { display: grid; gap: 6px; }
.bk-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.04); }
.bk-when { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bk-new { font-size: 11px; color: #46d369; text-transform: uppercase; letter-spacing: .5px; }
@media (max-width: 560px) { .bk-row { grid-template-columns: 1fr auto; } .bk-row .muted { display: none; } }
