/* myplex — laid out and lit like Netflix: #141414 canvas, one red, wide artwork that grows under
   the pointer. Figtree stands in for Netflix Sans; Bebas Neue draws the wordmark. */
: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));
  --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; } }
@media (max-width: 1099px) { :root { --per: 4; } }
@media (max-width: 799px) { :root { --per: 3; } }
@media (max-width: 499px) { :root { --per: 2; --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); }
.logo {
  font: 400 clamp(1.7rem, 2.3vw, 2.35rem)/1 "Bebas Neue", Impact, sans-serif;
  color: var(--red); letter-spacing: .02em; text-transform: uppercase; flex: 0 0 auto;
  padding-top: 3px;
}
.logo b { font-weight: inherit; }
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; }

/* 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 { padding: 12px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid rgba(255,255,255,.12); }
.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 .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: 13vw; object-fit: contain; object-position: left bottom; margin-bottom: 1.4vw; 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; }
.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 16:9 tile */
.tile { flex: 0 0 var(--tile-w); width: var(--tile-w); position: relative; cursor: pointer; border-radius: var(--radius); }
.tile.skeleton { aspect-ratio: 16 / 9; }
.boxart { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background-color: #222; }
.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; }
.ranktile { flex: 0 0 var(--tile-w); width: var(--tile-w); height: calc(var(--tile-w) * .55 * 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(--tile-w) * .9)/.74 var(--font); letter-spacing: -.08em;
  color: var(--bg); -webkit-text-stroke: max(3px, .28vw) #595959;
}
.ranktile .num.two { font-size: calc(var(--tile-w) * .62); letter-spacing: -.14em; left: -3%; }
.ranktile .poster {
  position: relative; z-index: 1; margin-left: auto; width: 55%; 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(--per), minmax(0, 1fr)); gap: 3.2vw 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-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: block; font-size: 2.6rem; margin-bottom: 26px; }
.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=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; }
.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; }
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 } }
.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;
}

/* ---------- 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) {
  .bell { display: none; }
  .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: 22px var(--pad); font-size: clamp(1.8rem, 2.6vw, 2.6rem); align-self: flex-start; }
.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; }
}
