[hidden] { display: none !important; }
/* Nil Media: styled after the Nil launcher.
   Sizes are in rem where 1rem = 10 "launcher dp": a 1280px-wide window is 1:1,
   bigger screens scale up (like the TV), phones get their own overrides. */

@font-face { font-family: 'Outfit'; font-weight: 200; src: url('/fonts/Outfit-ExtraLight.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Outfit'; font-weight: 300; src: url('/fonts/Outfit-Light.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Outfit'; font-weight: 500; src: url('/fonts/Outfit-Medium.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Outfit'; font-weight: 600; src: url('/fonts/Outfit-SemiBold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Outfit'; font-weight: 700; src: url('/fonts/Outfit-Bold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 400; src: url('/fonts/Inter-Regular.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 500; src: url('/fonts/Inter-Medium.otf') format('opentype'); font-display: swap; }

:root {
  --bg: #050507;
  --text: #ECEDF1;
  --muted: #6C6E76;
  --muted-2: #8E9099;
  --line: rgba(255, 255, 255, .12);
  --line-soft: rgba(255, 255, 255, .094);
  --glass: rgba(255, 255, 255, .047);
  --glass-2: rgba(255, 255, 255, .08);
  --ring: #fff;
  --accent: #6E7484;
  --pad-x: 6.4rem;
  --pad-top: 3.8rem;
  --radius: 1.6rem;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-pop: cubic-bezier(.34, 1.45, .64, 1);
  --dim: saturate(.15) brightness(.52);
}

* { box-sizing: border-box; }
/* Overall size. Browsers get 49%; the Nil Media TV app uses 90%, the same scale as the Nil launcher. */
:root { --ui-scale: .82; }
html { font-size: clamp(8px, 100vw / 128 * var(--ui-scale), calc(16px * var(--ui-scale))); background: var(--bg); color-scheme: dark; }
/* The TV app matches the Nil launcher exactly: 1rem = 10 launcher units (dp x 0.9).
   A 16:9 TV is 960dp wide, so 1rem = 100vw / 96 x 0.9 — the clock, header buttons
   and side margins then land on the same pixels as the launcher's. */
html.tv-app { --ui-scale: .9; font-size: calc(100vw / 96 * var(--ui-scale)); }
/* In the TV app the posters and banners keep their earlier, smaller size (3/4 of the
   browser's), so more of them fit on screen; text and the header stay launcher-sized. */
html.tv-app .card { --w: 12.75rem; }
html.tv-app .card.landscape { --w: 22.5rem; }
html.tv-app .card.square { --w: 14.25rem; }
html.tv-app .card.wide { --w: 25.5rem; }
html.tv-app .row { gap: 2.25rem; }
@media (min-width: 761px) {
  html.tv-app .page.tv .grid { --card-w: 11.25rem; gap: 2.4rem 1.8rem; }
  html.tv-app .page.tv .grid.landscape { --card-w: 18rem; }
  html.tv-app .page.tv .grid.square { --card-w: 12rem; }
}
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: 'Inter', system-ui, sans-serif; font-size: 1.4rem; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; }
:focus { outline: none; }
::selection { background: rgba(255, 255, 255, .25); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.spacer { flex: 1; }

/* ------------------------------------------------------------------ backdrop */

html.no-backdrop #aurora, html.no-backdrop #grain, html.no-backdrop #hero-art { display: none; }
#aurora {
  position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -3; pointer-events: none;
}
#grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  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%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#hero-art {
  position: fixed; top: 0; right: 0; width: 74vw; height: 80vh; z-index: -2; pointer-events: none;
}
#hero-art .layer {
  position: absolute; inset: 0; background-size: cover; background-position: center 20%;
  opacity: 0; transition: opacity .6s var(--ease-out);
  filter: grayscale(.6) blur(.2rem);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 60%), linear-gradient(to bottom, #000 30%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: linear-gradient(to right, transparent 0%, #000 60%), linear-gradient(to bottom, #000 30%, transparent 100%);
}
#hero-art .layer.on { opacity: .43; }
body.detail-mode #hero-art { width: 80vw; height: 92vh; }
body.detail-mode #hero-art .layer { filter: grayscale(.25); }
body.detail-mode #hero-art .layer.on { opacity: .55; }

/* ------------------------------------------------------------------ shell */

#app { position: relative; min-height: 100vh; transition: transform .26s var(--ease-out); transform-origin: 50% 40%; }
body.panel-open #app { transform: scale(.97); }
.page { padding: var(--pad-top) var(--pad-x) 9rem; min-height: 100vh; }

header.top {
  display: flex; align-items: flex-start; gap: 1.2rem; position: relative; z-index: 2;
}
.clock-col { flex: 1; min-width: 0; }
.clock-row { display: flex; align-items: baseline; min-height: 4.4rem; }
.clock {
  font-family: 'Outfit'; font-weight: 700; font-size: 3.4rem; letter-spacing: -.01em; line-height: 1.1;
  background: linear-gradient(#fff, #92949C); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ampm { font-family: 'Outfit'; font-weight: 600; font-size: 1.5rem; letter-spacing: .06em; color: var(--muted); padding-left: .7rem; }
.date { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'Inter'; font-weight: 500; font-size: 1.2rem; letter-spacing: .16em; color: var(--muted); padding: .8rem 0 0 .2rem; text-transform: uppercase; }
.brand { display: flex; align-items: center; gap: 1rem; }
.brand img { width: 3.2rem; height: 3.2rem; border-radius: .8rem; }
.brand span { font-family: 'Outfit'; font-weight: 600; font-size: 2rem; }

/* pills: the launcher's round header buttons */
.pills { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pill {
  height: 4.4rem; min-width: 4.4rem; padding: 0 1.4rem; border-radius: 2.2rem; display: inline-flex; align-items: center; justify-content: center; gap: .8rem;
  background: var(--glass); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); color: var(--text);
  font-weight: 500; font-size: 1.4rem; white-space: nowrap;
  transition: transform .2s var(--ease-pop), background .15s, color .15s, box-shadow .2s;
}
.pill svg { width: 2rem; height: 2rem; flex: none; }
.pill.icon-only { padding: 0; width: 4.4rem; }
.pill .label { display: inline; }
/* header pills show their name only when focused, like the launcher */
/* Same round 44-unit buttons as the launcher's header (12 + 20 icon + 12) */
header.top .pill { padding: 0 1.2rem; }
header.top .avatar-pill { padding: 0 .6rem; }
/* Like the launcher: the selected button pops (overshoot) and its name slides open. The label grows
   to its exact width (width: auto is animatable thanks to interpolate-size) and shrinks the same way
   when you leave, so while focus moves along the row one label closes as the next opens and the row
   barely shifts. Browsers without interpolate-size simply show the name without the slide. */
:root { interpolate-size: allow-keywords; }
header.top .pill {
  gap: 0; will-change: transform;
  transition: transform .26s cubic-bezier(.34, 1.56, .64, 1), background-color .16s, color .16s;
}
header.top .pill .label {
  display: inline-block; width: 0; padding: 0; opacity: 0; overflow: hidden; white-space: nowrap; vertical-align: middle;
  transition: width .2s cubic-bezier(.3, .7, .2, 1), padding .2s cubic-bezier(.3, .7, .2, 1), opacity .1s;
}
header.top .pill:focus .label, header.top .pill:hover .label {
  width: auto; padding: 0 .4rem 0 .8rem; opacity: 1;
  transition: width .24s cubic-bezier(.3, .7, .2, 1), padding .24s cubic-bezier(.3, .7, .2, 1), opacity .18s .06s;
}
.pill:focus, .pill:hover, .pill.on:focus { background: #fff; color: var(--bg); box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, .45); transform: scale(1.06); }
.pill.on { background: rgba(255, 255, 255, .16); }
.pill.primary { background: #fff; color: var(--bg); box-shadow: none; }
.pill.primary:focus, .pill.primary:hover { box-shadow: 0 0 0 .3rem var(--bg), 0 0 0 .55rem #fff, 0 1rem 2.4rem rgba(0, 0, 0, .45); }
.pill.big { height: 5.2rem; border-radius: 2.6rem; padding: 0 2.4rem; font-size: 1.6rem; font-family: 'Outfit'; font-weight: 600; }
.pill.big svg { width: 2.2rem; height: 2.2rem; }
.pill.danger:focus, .pill.danger:hover { background: #FF6B7A; color: #fff; }
.pill[disabled] { opacity: .4; pointer-events: none; }
.avatar-pill { padding: 0 1.4rem 0 .6rem; }
.avatar {
  width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-family: 'Outfit'; font-weight: 600; font-size: 1.5rem; color: #fff;
}

/* TV layout: header and hero stay put, the rows scroll underneath (big screens only) */
@media (min-width: 761px) {
  .page.tv { height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; }
  .page.tv > * { flex: none; }
  .page.tv > .tv-scroll {
    flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
    margin: 0 calc(var(--pad-x) * -1); padding: 2.8rem var(--pad-x) 10rem;
    -webkit-mask-image: linear-gradient(transparent 0, #000 1.4rem); mask-image: linear-gradient(transparent 0, #000 1.4rem);
  }
  .page.tv > .tv-scroll::-webkit-scrollbar { display: none; }
  .page.tv > .hero { margin-top: 4rem; min-height: 17rem; }
  /* Browse pages have no hero: leave a little air under the header */
  .page.tv > header.top + .tv-scroll { margin-top: 1.6rem; }
  /* Fixed-width columns so a whole row of posters fits under the pinned hero */
  .page.tv .grid { grid-template-columns: repeat(auto-fill, var(--card-w, 15rem)); --card-w: 15rem; justify-content: space-between; gap: 3rem 2.4rem; }
  .page.tv .grid.landscape { --card-w: 24rem; }
  .page.tv .grid.square { --card-w: 16rem; }
  .page.tv > .tv-scroll > .section-label:first-child, .page.tv > .tv-scroll > section:first-child > .section-label { padding-top: .4rem; }
}

/* ------------------------------------------------------------------ hero */

.hero { margin-top: 5.2rem; min-height: 15rem; position: relative; z-index: 1; }
.hero-title {
  font-family: 'Outfit'; font-weight: 600; font-size: 5.8rem; letter-spacing: -.015em; line-height: 1.08;
  margin: 0 0 .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80vw;
  transition: opacity .11s, transform .26s var(--ease-out);
}
.hero-title.out { opacity: 0; transform: translateX(-1rem); }
.hero-title.in-start { opacity: 0; transform: translateX(1.4rem); transition: none; }
.hero-logo { max-height: 10rem; max-width: 42rem; object-fit: contain; object-position: left bottom; margin-bottom: 1rem; filter: drop-shadow(0 .4rem 2rem rgba(0, 0, 0, .5)); }
.hero-meta { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; color: var(--muted-2); font-size: 1.4rem; font-weight: 500; min-height: 2rem; }
.hero-meta .dot { width: .4rem; height: .4rem; border-radius: 50%; background: var(--muted); }
.badge { padding: .2rem .8rem; border-radius: .6rem; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); font-size: 1.1rem; letter-spacing: .06em; color: var(--text); font-weight: 500; }
.hero-overview { max-width: 64rem; color: rgba(236, 237, 241, .74); font-size: 1.5rem; line-height: 1.55; margin-top: 1.2rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4rem; }

/* ------------------------------------------------------------------ sections & rows */

.section-label {
  font-family: 'Inter'; font-weight: 500; font-size: 1.2rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
  padding: 4rem 0 2rem .2rem; display: flex; align-items: center; gap: 1.6rem;
}
.section-label a, .section-label button { letter-spacing: .12em; font-size: 1.1rem; color: var(--muted); padding: .4rem 1rem; border-radius: 1rem; }
.section-label a:focus, .section-label a:hover, .section-label button:focus, .section-label button:hover { background: #fff; color: var(--bg); }
/* A sideways-scrolling row clips anything outside its box, so it gets extra room above and below
   (cancelled by negative margins) for the focused card's lift, ring and glow. */
.row {
  display: flex; gap: 3rem; overflow-x: auto; overflow-y: visible; scroll-snap-type: x proximity;
  margin: -5.5rem calc(var(--pad-x) * -1) -8rem; padding: 5.5rem var(--pad-x) 8rem; scrollbar-width: none;
  scroll-padding: 0 var(--pad-x);
}
/* ...and the label above a row stays clickable on top of that extra room */
.section-label { position: relative; z-index: 1; }
.row::-webkit-scrollbar { display: none; }
.grid {
  display: grid; gap: 3.4rem 3rem; grid-template-columns: repeat(auto-fill, minmax(var(--card-w, 17rem), 1fr)); align-items: start;
  padding-top: 1rem;
}
.grid.landscape { --card-w: 26rem; }
.grid.square { --card-w: 19rem; }

/* ------------------------------------------------------------------ cards */

.card { position: relative; flex: none; width: var(--w, 17rem); scroll-snap-align: start; cursor: pointer; display: block; text-align: left; }
.grid .card { width: auto; }
.card.landscape { --w: 30rem; }
.card.square { --w: 19rem; }
.card.wide { --w: 34rem; }
.card .frame { position: relative; transition: transform .28s var(--ease-pop); }
.card .face {
  position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: #161A22;
  filter: var(--dim); transition: filter .26s var(--ease-out), box-shadow .3s;
}
.card.landscape .face, .card.wide .face { aspect-ratio: 16 / 9; }
.card.square .face { aspect-ratio: 1; }
.card.circle .face { border-radius: 50%; }
.card .face img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.card .face img.loaded { opacity: 1; }
.card .face::before { /* glassy top highlight */
  content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, .08), transparent 35%);
}
.card .face::after { /* thin edge */
  content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1.2px rgba(255, 255, 255, .13); transition: box-shadow .2s;
}
.card .placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  padding: 1.4rem; text-align: center; font-family: 'Outfit'; font-weight: 500; font-size: 1.4rem; color: rgba(236, 237, 241, .86);
}
.card .placeholder svg { width: 3.6rem; height: 3.6rem; opacity: .75; }
.card .ring {
  position: absolute; inset: -.6rem; border-radius: calc(var(--radius) + .6rem); box-shadow: 0 0 0 .25rem var(--ring);
  opacity: 0; transform: scale(.95, .92); transition: opacity .16s, transform .16s var(--ease-out); pointer-events: none; z-index: 4;
}
.card.circle .ring { border-radius: 50%; }
.card .glow {
  position: absolute; inset: 0; border-radius: var(--radius); z-index: -1; opacity: 0; transition: opacity .3s;
  box-shadow: 0 1.6rem 4rem rgba(210, 214, 224, .22), 0 0 3rem rgba(210, 214, 224, .1);
}
.card:focus .frame, .card:hover .frame { transform: scale(1.1) translateY(-.6rem); }
.card.square:focus .frame, .card.square:hover .frame, .grid .card:focus .frame, .grid .card:hover .frame { transform: scale(1.07) translateY(-.5rem); }
.card:focus .face, .card:hover .face { filter: none; }
.card:focus .face::after, .card:hover .face::after { box-shadow: inset 0 0 0 1.2px rgba(255, 255, 255, .43); }
.card:focus .ring { opacity: 1; transform: none; transition: opacity .3s, transform .3s var(--ease-pop); }
.card:focus .glow, .card:hover .glow { opacity: 1; }
.card .progress { position: absolute; left: 1.2rem; right: 1.2rem; bottom: 1.1rem; height: .3rem; border-radius: .2rem; background: rgba(255, 255, 255, .25); z-index: 3; overflow: hidden; }
.card .progress i { display: block; height: 100%; background: #fff; border-radius: .2rem; }
.card .flag {
  position: absolute; top: .9rem; right: .9rem; z-index: 3; min-width: 2.6rem; height: 2.6rem; padding: 0 .8rem; border-radius: 1.3rem;
  background: rgba(5, 5, 7, .82); display: grid; place-items: center; font-size: 1.2rem; font-weight: 500;
}
.card .flag svg { width: 1.4rem; height: 1.4rem; }
.card .caption { padding: 1.2rem .2rem 0; transition: transform .28s var(--ease-pop), opacity .2s; opacity: .72; }
.card:focus .caption, .card:hover .caption { opacity: 1; transform: translateY(.8rem); }
.card .c-title { font-family: 'Outfit'; font-weight: 500; font-size: 1.45rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .c-sub { font-size: 1.2rem; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .2rem; }
.card.lib .face { aspect-ratio: 16 / 9; }
.card.lib .lib-name {
  position: absolute; inset: auto 0 0 0; z-index: 3; padding: 2.4rem 1.6rem 1.4rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7)); font-family: 'Outfit'; font-weight: 600; font-size: 2rem;
  display: flex; align-items: center; gap: 1rem;
}
.card.lib .lib-name svg { width: 2.2rem; height: 2.2rem; }
.card.lib img { filter: blur(.1rem); }

@media (hover: none) {
  .card .face { filter: none; }
}

/* entrance */
.rise { opacity: 0; transform: translateY(2.6rem); animation: rise .52s var(--ease-out) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ toolbar & lists */

.toolbar { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; margin-top: 2.4rem; }
.toolbar .count { color: var(--muted); font-size: 1.3rem; letter-spacing: .1em; text-transform: uppercase; margin-left: .6rem; }
.crumbs { display: flex; gap: .8rem; align-items: center; color: var(--muted-2); font-size: 1.4rem; margin-top: 1rem; flex-wrap: wrap; }
.crumbs svg { width: 1.4rem; height: 1.4rem; flex: none; }
.crumbs a { padding: .3rem .9rem; border-radius: 1rem; }
.crumbs a:focus, .crumbs a:hover { background: #fff; color: var(--bg); }

.list { display: flex; flex-direction: column; gap: .6rem; }
.list-row {
  display: flex; align-items: center; gap: 1.6rem; padding: 1.2rem 1.6rem; border-radius: 1.6rem; text-align: left; width: 100%;
  transition: transform .16s, background .12s;
}
.list-row .num { width: 3rem; color: var(--muted); font-family: 'Outfit'; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.list-row .main { flex: 1; min-width: 0; }
.list-row .t { font-family: 'Outfit'; font-weight: 500; font-size: 1.7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .s { font-size: 1.3rem; color: var(--muted); margin-top: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .end { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 1.3rem; }
.list-row svg { width: 2.2rem; height: 2.2rem; color: var(--muted); flex: none; }
.list-row:focus, .list-row:hover { background: #fff; color: var(--bg); transform: scale(1.015); }
.list-row:focus .s, .list-row:hover .s, .list-row:focus .num, .list-row:hover .num, .list-row:focus .end, .list-row:hover .end, .list-row:focus svg, .list-row:hover svg { color: #545C6C; }
.list-row.playing .t { color: #fff; }
.list-row.playing:focus .t, .list-row.playing:hover .t { color: var(--bg); }
.list-row .eq { display: inline-flex; gap: .2rem; align-items: flex-end; height: 1.4rem; margin-right: .6rem; }
.list-row .eq i { width: .3rem; background: currentColor; border-radius: .1rem; animation: eq 1s infinite ease-in-out; }
.list-row .eq i:nth-child(2) { animation-delay: -.3s; } .list-row .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }

.episode {
  display: grid; grid-template-columns: 26rem 1fr; gap: 2.4rem; padding: 1.4rem; border-radius: 2rem; text-align: left; width: 100%;
  transition: background .15s, transform .2s var(--ease-pop);
}
.episode .face { position: relative; aspect-ratio: 16 / 9; border-radius: 1.2rem; overflow: hidden; background: #161A22; filter: var(--dim); transition: filter .25s; }
.episode .face img { width: 100%; height: 100%; object-fit: cover; }
.episode .face .progress { position: absolute; left: 1rem; right: 1rem; bottom: .9rem; height: .3rem; background: rgba(255, 255, 255, .25); border-radius: .2rem; overflow: hidden; }
.episode .face .progress i { display: block; height: 100%; background: #fff; }
.episode .face .flag { position: absolute; top: .8rem; right: .8rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(5, 5, 7, .72); display: grid; place-items: center; }
.episode .face .flag svg { width: 1.4rem; height: 1.4rem; }
.episode .e-num { color: var(--muted); font-size: 1.2rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; }
.episode .e-title { font-family: 'Outfit'; font-weight: 600; font-size: 2rem; margin: .3rem 0 .6rem; }
.episode .e-ov { color: rgba(236, 237, 241, .62); font-size: 1.35rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.episode:focus, .episode:hover { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 .25rem #fff; transform: scale(1.01); }
.episode:focus .face, .episode:hover .face { filter: none; }

/* ------------------------------------------------------------------ detail */

.detail { margin-top: 3.2rem; display: flex; flex-direction: column; }
.detail .hero { margin-top: 2rem; }
.detail-actions { display: flex; gap: 1.4rem; flex-wrap: wrap; margin-top: 2.8rem; }
.detail-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1.4rem 3rem; margin-top: 3rem; max-width: 110rem; }
.detail-info .k { font-size: 1.1rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.detail-info .v { margin-top: .4rem; font-size: 1.4rem; color: rgba(236, 237, 241, .85); }
.tagline { font-family: 'Outfit'; font-weight: 300; font-size: 2rem; color: rgba(236, 237, 241, .8); margin-top: .4rem; }
.cast .card .face { background: #1b1f27; }
.album-head { display: flex; gap: 3.2rem; align-items: flex-end; margin-top: 3rem; }
.album-head .cover { width: 22rem; aspect-ratio: 1; border-radius: 1.6rem; overflow: hidden; flex: none; background: #161A22; box-shadow: 0 2rem 5rem rgba(0, 0, 0, .5); }
.album-head .cover img { width: 100%; height: 100%; object-fit: cover; }
.album-head .hero { margin-top: 0; min-height: 0; }

/* ------------------------------------------------------------------ side panel (launcher style) */

#overlay {
  position: fixed; inset: 0; z-index: 50; background: linear-gradient(to right, rgba(0, 0, 0, .43), rgba(0, 0, 0, .88));
  opacity: 0; transition: opacity .18s; display: none;
}
#overlay.open { display: block; opacity: 1; }
.panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(46rem, 100vw); display: flex; flex-direction: column;
  padding: 4.8rem 2.6rem 2.8rem 3.4rem; border-radius: 3.2rem 0 0 3.2rem;
  background: linear-gradient(135deg, rgba(14, 14, 17, .98), rgba(6, 6, 8, .99)); box-shadow: inset 1px 0 0 var(--line-soft), -3rem 0 6rem rgba(0, 0, 0, .5);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.16, .9, .3, 1);
}
#overlay.open .panel { transform: none; }
.panel.wide { width: min(64rem, 100vw); }
.panel h2 { font-family: 'Outfit'; font-weight: 300; font-size: 3.2rem; margin: 0 0 .6rem 1.4rem; line-height: 1.15; }
.panel .panel-sub { color: var(--muted); margin: 0 0 2.2rem 1.4rem; font-size: 1.3rem; }
.panel .rows { overflow-y: auto; flex: 1; padding: .6rem; margin: -.6rem; scrollbar-width: none; }
.panel .rows::-webkit-scrollbar { display: none; }
.prow {
  display: flex; align-items: center; gap: 1.6rem; width: 100%; padding: 1.4rem 1.6rem; border-radius: 1.6rem; text-align: left; margin-bottom: .6rem;
  transition: transform .16s, background .1s;
}
.prow svg { width: 2.6rem; height: 2.6rem; color: var(--muted); flex: none; }
.prow .main { flex: 1; min-width: 0; }
.prow .t { font-family: 'Outfit'; font-weight: 500; font-size: 1.8rem; }
.prow .s { font-size: 1.3rem; color: var(--muted); margin-top: .5rem; }
.prow .check { width: 2.2rem; height: 2.2rem; color: var(--text); }
.prow:focus, .prow:hover { background: #fff; color: var(--bg); transform: scale(1.03); }
.prow:focus .s, .prow:hover .s { color: #545C6C; }
.prow:focus svg, .prow:hover svg { color: var(--bg); }
.prow.sel .t::after { content: ''; }
.panel-section { font-size: 1.1rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); padding: 1.8rem 1.6rem .8rem; }

/* ------------------------------------------------------------------ forms */

.form { display: flex; flex-direction: column; gap: 1.8rem; max-width: 76rem; }
.field > label, .field > .flabel { display: block; font-size: 1.1rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 .8rem .4rem; }
.field .hint { color: var(--muted); font-size: 1.25rem; margin: .7rem 0 0 .4rem; }
.field .hint a { text-decoration: underline; }
.field-hint { color: var(--muted); font-size: 1.3rem; margin: .4rem 0 0 .4rem; }
.cbtn.danger { flex: none; }
.cbtn.danger:focus, .cbtn.danger:hover { background: #FF6B7A; color: #fff; }
.input {
  width: 100%; height: 5rem; padding: 0 1.8rem; border-radius: 1.6rem; border: 0; background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 1.6rem; transition: box-shadow .15s, background .15s;
}
textarea.input { height: 12rem; padding: 1.4rem 1.8rem; resize: vertical; }
.input:focus { box-shadow: inset 0 0 0 .25rem #fff; background: rgba(255, 255, 255, .07); }
.input::placeholder { color: var(--muted); }
.choice {
  display: flex; align-items: center; gap: 1.4rem; width: 100%; min-height: 5.6rem; padding: 1rem 1.8rem; border-radius: 1.6rem; text-align: left;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); transition: transform .16s, background .1s;
}
.choice .main { flex: 1; min-width: 0; }
.choice .t { font-family: 'Outfit'; font-weight: 500; font-size: 1.65rem; }
.choice .s { font-size: 1.25rem; color: var(--muted); margin-top: .2rem; }
.choice .val { color: var(--muted-2); font-size: 1.45rem; white-space: nowrap; }
.choice svg { width: 2rem; height: 2rem; color: var(--muted); }
.choice:focus, .choice:hover { background: #fff; color: var(--bg); transform: scale(1.015); box-shadow: none; }
.choice:focus .val, .choice:hover .val, .choice:focus .s, .choice:hover .s, .choice:focus svg, .choice:hover svg { color: #545C6C; }
.switch { width: 4.6rem; height: 2.8rem; border-radius: 1.4rem; background: rgba(255, 255, 255, .16); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: .3rem; left: .3rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: #fff; transition: transform .22s var(--ease-pop); }
.switch.on { background: #4FD1A5; }
.switch.on::after { transform: translateX(1.8rem); }
.choice:focus .switch:not(.on), .choice:hover .switch:not(.on) { background: rgba(5, 5, 7, .25); }
.form-actions { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 1rem; }
.error-text { color: #FF8C98; font-size: 1.35rem; min-height: 1.8rem; }
.card-box { background: var(--glass); box-shadow: inset 0 0 0 1px var(--line-soft); border-radius: 2rem; padding: 2.2rem 2.4rem; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(32rem, 1fr)); gap: 2rem; }

/* ------------------------------------------------------------------ login */

.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 2rem; text-align: center; }
.login h1 { font-family: 'Outfit'; font-weight: 600; font-size: 5.2rem; margin: 0; letter-spacing: -.015em; }
.login .sub { color: var(--muted); letter-spacing: .24em; text-transform: uppercase; font-size: 1.2rem; font-weight: 500; margin: 1.4rem 0 5rem; }
.profiles { display: flex; gap: 4rem; flex-wrap: wrap; justify-content: center; max-width: 110rem; }
.profile { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; width: 15rem; }
.profile .pic {
  width: 13rem; height: 13rem; border-radius: 3rem; display: grid; place-items: center; position: relative;
  font-family: 'Outfit'; font-weight: 600; font-size: 5.2rem; color: #fff; filter: var(--dim);
  transition: transform .28s var(--ease-pop), filter .25s; box-shadow: inset 0 0 0 1.2px rgba(255, 255, 255, .15);
}
.profile .pic::after { content: ''; position: absolute; inset: -.7rem; border-radius: 3.6rem; box-shadow: 0 0 0 .25rem #fff; opacity: 0; transform: scale(.94); transition: opacity .2s, transform .3s var(--ease-pop); }
.profile .pic svg { width: 2rem; height: 2rem; position: absolute; right: 1rem; bottom: 1rem; opacity: .8; }
.profile .n { font-family: 'Outfit'; font-weight: 500; font-size: 1.8rem; color: var(--muted-2); transition: color .2s; }
.profile:focus .pic, .profile:hover .pic { filter: none; transform: scale(1.1) translateY(-.4rem); }
.profile:focus .pic::after { opacity: 1; transform: none; }
.profile:focus .n, .profile:hover .n { color: var(--text); }
.login-box { width: min(44rem, 92vw); display: flex; flex-direction: column; gap: 1.6rem; text-align: left; }
.setup { max-width: 84rem; margin: 0 auto; padding: 8rem 3rem; }
.setup h1 { font-family: 'Outfit'; font-weight: 600; font-size: 4.6rem; margin: 0 0 .6rem; }
.setup .lead { color: var(--muted-2); font-size: 1.6rem; margin: 0 0 3.4rem; max-width: 64rem; }
.steps { display: flex; gap: .8rem; margin-bottom: 3rem; }
.steps i { height: .4rem; flex: 1; border-radius: .2rem; background: rgba(255, 255, 255, .12); }
.steps i.on { background: #fff; }

/* ------------------------------------------------------------------ mini player: a small wide button in the top bar */

#mini {
  position: fixed; z-index: 40; top: var(--pad-top); left: calc(var(--pad-x) + 24rem);
  width: min(30rem, calc(100vw - var(--pad-x) * 2 - 56rem)); height: 4.4rem;
  display: flex; align-items: center; gap: 1rem; padding: 0 1.4rem 0 .6rem; border-radius: 2.2rem; cursor: pointer; overflow: hidden;
  background: rgb(22, 23, 28); color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  transform: translateY(-250%); visibility: hidden;
  transition: transform .4s var(--ease-out), visibility 0s .4s, background .15s, color .15s, box-shadow .2s;
}
#mini.show { transform: none; visibility: visible; transition: transform .22s var(--ease-pop), background .15s, color .15s, box-shadow .2s; }
/* Selected: white, a little bigger and lifted, exactly like the header buttons */
#mini.show:focus, #mini.show:hover { background: #fff; color: var(--bg); transform: scale(1.06); box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, .45); }
#mini:focus .a, #mini:hover .a { color: rgba(5, 5, 7, .55); }
body.in-player #mini, body.np-open #mini { display: none; }
#mini .art { width: 3.2rem; height: 3.2rem; border-radius: 50%; overflow: hidden; background: rgba(255, 255, 255, .1); flex: none; }
#mini .art img { width: 100%; height: 100%; object-fit: cover; }
#mini .mt { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: .8rem; white-space: nowrap; overflow: hidden; }
#mini .t { font-family: 'Outfit'; font-weight: 600; font-size: 1.4rem; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
#mini .a { color: var(--muted); font-size: 1.2rem; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; transition: color .15s; }
/* Little equalizer while playing, a pause sign while paused */
#mini .eq { display: flex; gap: .25rem; align-items: flex-end; height: 1.4rem; flex: none; }
#mini .eq i { width: .3rem; height: 30%; border-radius: .2rem; background: currentColor; animation: eq 1s ease-in-out infinite; }
#mini .eq i:nth-child(2) { animation-delay: -.4s; }
#mini .eq i:nth-child(3) { animation-delay: -.7s; }
#mini .eq.paused svg { width: 1.4rem; height: 1.4rem; opacity: .7; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.cbtn {
  width: 4.4rem; height: 4.4rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .047);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .18s var(--ease-pop), background .12s, color .12s; flex: none;
}
.cbtn svg { width: 2rem; height: 2rem; }
.cbtn.lg { width: 5.6rem; height: 5.6rem; }
.cbtn.lg svg { width: 2.4rem; height: 2.4rem; }
.cbtn:focus, .cbtn:hover { background: #fff; color: var(--bg); transform: scale(1.1); }
.cbtn.on { box-shadow: inset 0 0 0 .2rem #fff; }
/* Over a video the buttons are solid, so the edge of the picture (letterboxing) never shows through them */
#player .cbtn { background: #1A1B20; }
#player .cbtn:focus, #player .cbtn:hover { background: #fff; }

/* ------------------------------------------------------------------ full-screen music player */

#np { position: fixed; inset: 0; z-index: 34; background: var(--bg); display: none; overflow: hidden; }
#np.show { display: block; animation: np-in .35s var(--ease-out); }
@keyframes np-in { from { opacity: 0; transform: translateY(3rem); } }
body.in-player #np, body.np-open #mini { display: none; }
#np .np-bg {
  position: absolute; inset: -12%; background-size: cover; background-position: center;
  filter: blur(70px) saturate(1.4) brightness(.5); opacity: .9;
}
#np .np-shade { position: absolute; inset: 0; background: linear-gradient(to right, rgba(5, 5, 7, .55), rgba(5, 5, 7, .15) 55%, rgba(5, 5, 7, .45)); }
#np .np-top { position: absolute; top: var(--pad-top); left: var(--pad-x); right: var(--pad-x); display: flex; align-items: center; gap: 1.6rem; z-index: 2; }
#np .np-kicker { font-size: 1.2rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted-2); font-weight: 500; }
#np .np-main { position: absolute; inset: 0; display: flex; align-items: center; gap: 6rem; padding: 11rem var(--pad-x) 7rem; z-index: 1; }
#np .np-art { width: min(46rem, 58vh); aspect-ratio: 1; border-radius: 2rem; overflow: hidden; background: rgba(255, 255, 255, .08); box-shadow: 0 3rem 8rem rgba(0, 0, 0, .6); flex: none; }
#np .np-art img { width: 100%; height: 100%; object-fit: cover; }
#np .np-info { flex: 1; min-width: 0; }
#np .np-title { font-family: 'Outfit'; font-weight: 600; font-size: 4.8rem; line-height: 1.1; letter-spacing: -.01em; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#np .np-sub { color: var(--muted-2); font-size: 2rem; margin-top: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#np .np-seek { position: relative; height: 3rem; display: flex; align-items: center; margin-top: 4rem; cursor: pointer; border-radius: 1.5rem; }
#np .np-seek .rail { position: absolute; left: 0; right: 0; height: .5rem; border-radius: .3rem; background: rgba(255, 255, 255, .2); overflow: hidden; transition: height .15s; }
#np .np-seek .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #fff; transition: width .9s linear; }
#np .np-seek:focus .rail, #np .np-seek:hover .rail { height: 1rem; }
#np .np-times { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 1.3rem; margin-top: .4rem; font-variant-numeric: tabular-nums; }
#np .np-ctrls { display: flex; align-items: center; gap: 1.4rem; margin-top: 2.6rem; }
#np .np-next { color: var(--muted); font-size: 1.3rem; margin-top: 3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mini .track { position: absolute; left: 4.6rem; right: 2.2rem; bottom: .45rem; height: .2rem; border-radius: .1rem; background: rgba(255, 255, 255, .14); overflow: hidden; }
#mini:focus .track, #mini:hover .track { background: rgba(5, 5, 7, .14); }
#mini .track i { display: block; height: 100%; width: 0; background: currentColor; border-radius: .1rem; transition: width .9s linear; }
.np-card { display: flex; gap: 2.4rem; align-items: center; padding: 1.4rem 2rem 2rem 1.4rem; border-radius: 1.6rem; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); max-width: 76rem; position: relative; transition: transform .2s var(--ease-pop), background .15s; text-align: left; width: 100%; }
.np-card:focus, .np-card:hover { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 .25rem #fff; transform: scale(1.02); }
.np-card .art { width: 9rem; height: 9rem; border-radius: 1rem; overflow: hidden; background: rgba(255, 255, 255, .16); flex: none; }
.np-card .art img { width: 100%; height: 100%; object-fit: cover; }
.np-card .t { font-family: 'Outfit'; font-weight: 600; font-size: 2rem; }
.np-card .a { color: var(--muted); margin-top: .7rem; }
.np-card .app { color: rgba(108, 110, 118, .8); font-size: 1.1rem; letter-spacing: .18em; margin-top: 1rem; text-transform: uppercase; font-weight: 500; }
.np-card .bar { position: absolute; left: 12.4rem; right: 2rem; bottom: 1.4rem; height: .3rem; background: rgba(255, 255, 255, .16); border-radius: .2rem; overflow: hidden; }
.np-card .bar i { display: block; height: 100%; background: #fff; }

/* ------------------------------------------------------------------ video player */

/* While a full-screen layer is up, the page underneath can't scroll (it would drag the video around) */
body.in-player, body.np-open { overflow: hidden; }
#player { position: fixed; inset: 0; z-index: 30; background: #000; display: none; cursor: none; }
#player.show { display: block; }
/* TV app: the Android player draws the video on its own layer behind this page, so the page goes
   see-through and only the player's controls (and option panels) stay */
html.native-video, html.native-video body, html.native-video #player { background: transparent; }
html.native-video body > :not(#player):not(#overlay):not(#viewer) { visibility: hidden; }
html.native-video #player video { visibility: hidden; }
#player.ui { cursor: default; }
#player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
#player .subs {
  position: absolute; left: 6%; right: 6%; bottom: 8%; text-align: center; pointer-events: none; z-index: 2;
  transition: bottom .3s var(--ease-out); font-family: 'Inter'; font-weight: 500;
}
#player.ui .subs { bottom: 22%; }
#player .subs span {
  display: inline; padding: .15em .45em; line-height: 1.5; border-radius: .25em; white-space: pre-line;
  font-size: calc(2.6rem * var(--sub-scale, 1)); color: #fff; text-shadow: 0 0 .3rem #000, 0 .1rem .3rem #000;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
#player .subs.bg span { background: rgba(0, 0, 0, .62); text-shadow: none; }
#player .chrome { position: absolute; inset: 0; z-index: 3; opacity: 0; transition: opacity .3s; pointer-events: none; }
#player.ui .chrome { opacity: 1; pointer-events: auto; }
#player .shade-top { position: absolute; inset: 0 0 auto 0; height: 22rem; background: linear-gradient(rgba(0, 0, 0, .75), transparent); }
#player .shade-bottom { position: absolute; inset: auto 0 0 0; height: 34rem; background: linear-gradient(transparent, rgba(0, 0, 0, .88)); }
#player .p-top { position: absolute; top: 3.4rem; left: var(--pad-x); right: var(--pad-x); display: flex; align-items: flex-start; gap: 2rem; }
#player .p-titles { flex: 1; min-width: 0; }
#player .p-kicker { font-size: 1.2rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted-2); font-weight: 500; }
#player .p-title { font-family: 'Outfit'; font-weight: 600; font-size: 3.4rem; margin-top: .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#player .p-bottom { position: absolute; left: var(--pad-x); right: var(--pad-x); bottom: 4rem; }
#player .seek { position: relative; height: 3rem; display: flex; align-items: center; cursor: pointer; border-radius: 1.5rem; }
#player .seek .rail { position: absolute; left: 0; right: 0; height: .5rem; border-radius: .3rem; background: rgba(255, 255, 255, .2); overflow: hidden; transition: height .15s; }
#player .seek .buf { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 255, 255, .22); }
#player .seek .fill { position: absolute; left: 0; top: 0; bottom: 0; background: #fff; }
#player .seek .knob { position: absolute; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: #fff; transform: translateX(-50%) scale(0); transition: transform .15s; box-shadow: 0 0 1.2rem rgba(0, 0, 0, .5); }
#player .seek:focus .rail, #player .seek:hover .rail { height: .8rem; }
#player .seek:focus .knob, #player .seek:hover .knob { transform: translateX(-50%) scale(1); }
#player .seek .tip { position: absolute; bottom: 3.6rem; transform: translateX(-50%); background: #fff; color: var(--bg); padding: .4rem 1rem; border-radius: .8rem; font-weight: 500; font-size: 1.3rem; display: none; font-variant-numeric: tabular-nums; }
#player .seek:focus .tip, #player .seek.dragging .tip { display: block; }
#player .times { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 1.3rem; margin-top: .6rem; font-variant-numeric: tabular-nums; }
#player .p-ctrls { display: flex; align-items: center; gap: 1.4rem; margin-top: 1.6rem; }
#player .p-ctrls .group { display: flex; gap: 1.2rem; align-items: center; }
#player .spinner { position: absolute; left: 50%; top: 50%; width: 6rem; height: 6rem; margin: -3rem; border-radius: 50%; border: .4rem solid rgba(255, 255, 255, .18); border-top-color: #fff; animation: spin .9s linear infinite; z-index: 2; display: none; }
#player.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
#player .osd { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.9); background: rgba(10, 10, 12, .7); padding: 1.6rem 2.4rem; border-radius: 2rem; font-family: 'Outfit'; font-weight: 600; font-size: 2.4rem; opacity: 0; transition: opacity .2s, transform .2s; z-index: 4; pointer-events: none; display: flex; gap: 1rem; align-items: center; }
#player .osd.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#player .osd svg { width: 3rem; height: 3rem; }
#player .upnext { position: absolute; right: var(--pad-x); bottom: 18rem; z-index: 5; width: 40rem; padding: 1.8rem; border-radius: 2rem; background: rgba(14, 14, 17, .92); box-shadow: inset 0 0 0 1px var(--line-soft); display: none; }
#player .upnext.on { display: block; }
#player .upnext .k { font-size: 1.1rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
#player .upnext .t { font-family: 'Outfit'; font-weight: 600; font-size: 2rem; margin: .4rem 0 1.4rem; }
#player .stats { position: absolute; top: 12rem; left: var(--pad-x); z-index: 4; background: rgba(0, 0, 0, .7); padding: 1.4rem 1.8rem; border-radius: 1.4rem; font-size: 1.25rem; line-height: 1.7; font-variant-numeric: tabular-nums; display: none; }
#player .stats.on { display: block; }
#player .err { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; z-index: 6; text-align: center; padding: 2rem; background: rgba(0, 0, 0, .7); }
#player .err.on { display: flex; }
#player .err .m { max-width: 70rem; font-size: 1.7rem; color: rgba(236, 237, 241, .85); }

/* ------------------------------------------------------------------ photo viewer */

#viewer { position: fixed; inset: 0; z-index: 35; background: #000; display: none; }
#viewer.show { display: block; }
#viewer img.ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .5s; border: 0; outline: 0; }
#viewer img.ph:not([src]) { visibility: hidden; }
#viewer .v-bar { position: absolute; inset: auto 0 0 0; padding: 3rem var(--pad-x); display: flex; align-items: center; gap: 1.2rem; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); transition: opacity .3s; }
#viewer.idle .v-bar { opacity: 0; pointer-events: none; }
#viewer .v-title { flex: 1; min-width: 0; }
#viewer .v-title .t { font-family: 'Outfit'; font-weight: 600; font-size: 2rem; }
#viewer .v-title .s { color: var(--muted-2); font-size: 1.3rem; }
#viewer .v-toast { position: absolute; top: 3rem; right: var(--pad-x); padding: .8rem 1.6rem; border-radius: 99rem; background: rgba(20, 21, 26, .9); font-size: 1.4rem; font-weight: 500; opacity: 0; transform: translateY(-.6rem); transition: opacity .2s, transform .2s; pointer-events: none; }
#viewer .v-toast.on { opacity: 1; transform: none; }
.toolbar .count.hint { margin-left: auto; letter-spacing: .04em; text-transform: none; font-size: 1.2rem; opacity: .7; }

/* ------------------------------------------------------------------ misc */

#toast {
  position: fixed; left: 50%; top: 3rem; transform: translate(-50%, -12rem); visibility: hidden; z-index: 100; background: #fff; color: var(--bg);
  padding: 1.2rem 2.2rem; border-radius: 2.2rem; font-weight: 500; transition: transform .3s var(--ease-out); max-width: 90vw; box-shadow: 0 1rem 3rem rgba(0, 0, 0, .5);
}
#toast.on { transform: translate(-50%, 0); visibility: visible; }
#toast { transition: transform .3s var(--ease-out), visibility 0s .3s; }
#toast.on { transition: transform .3s var(--ease-out); }
.empty { color: var(--muted); padding: 4rem 0; font-size: 1.7rem; font-family: 'Outfit'; font-weight: 300; }
.loading-dots { display: flex; gap: .8rem; padding: 6rem 0; }
.loading-dots i { width: 1rem; height: 1rem; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.loading-dots i:nth-child(2) { animation-delay: .2s; } .loading-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.search-box { position: relative; max-width: 80rem; margin-top: 3rem; }
.search-box svg { position: absolute; left: 2rem; top: 50%; transform: translateY(-50%); width: 2.4rem; height: 2.4rem; color: var(--muted); pointer-events: none; }
.search-box .input { height: 6.4rem; border-radius: 3.2rem; padding-left: 6rem; font-size: 2.2rem; font-family: 'Outfit'; }
.tabs { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 3rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.6rem; }
.stat { padding: 2rem 2.2rem; border-radius: 2rem; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line-soft); }
.stat .n { font-family: 'Outfit'; font-weight: 600; font-size: 3.4rem; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 1.1rem; letter-spacing: .2em; text-transform: uppercase; margin-top: .6rem; }
.session { display: flex; gap: 1.8rem; align-items: center; padding: 1.6rem 1.8rem; border-radius: 2rem; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line-soft); }
.session .thumb { width: 14rem; aspect-ratio: 16 / 9; border-radius: 1rem; overflow: hidden; background: #161A22; flex: none; }
.session .thumb img { width: 100%; height: 100%; object-fit: cover; }
.session .main { flex: 1; min-width: 0; }
.session .t { font-family: 'Outfit'; font-weight: 600; font-size: 1.7rem; }
.session .s { color: var(--muted-2); font-size: 1.3rem; margin-top: .3rem; }
.session .bar { height: .3rem; background: rgba(255, 255, 255, .15); border-radius: .2rem; margin-top: 1rem; overflow: hidden; }
.session .bar i { display: block; height: 100%; background: #fff; }
.activity { display: flex; flex-direction: column; }
.activity div { display: flex; gap: 1.6rem; padding: 1rem .4rem; border-bottom: 1px solid rgba(255, 255, 255, .05); font-size: 1.35rem; }
.activity time { color: var(--muted); min-width: 13rem; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 2.4rem; font-size: 1.35rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.paths { display: flex; flex-direction: column; gap: .8rem; }
.path-row { display: flex; gap: 1rem; align-items: center; }
.path-row .input { flex: 1; }
.match { display: flex; gap: 1.6rem; align-items: flex-start; width: 100%; text-align: left; padding: 1.2rem; border-radius: 1.6rem; transition: background .1s, transform .15s; }
.match img { width: 6.4rem; border-radius: .8rem; aspect-ratio: 2 / 3; object-fit: cover; background: #222; flex: none; }
.match .t { font-family: 'Outfit'; font-weight: 600; font-size: 1.7rem; }
.match .s { color: var(--muted); font-size: 1.25rem; margin-top: .3rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.match:focus, .match:hover { background: #fff; color: var(--bg); transform: scale(1.02); }

/* ------------------------------------------------------------------ small screens */

@media (max-width: 760px) {
  .date { display: none; }
  :root { --pad-x: 1.8rem; --pad-top: 2rem; }
  html { font-size: 9px; }
  .clock { font-size: 2.8rem; }
  header.top .pill:focus .label, header.top .pill:hover .label { display: none; }
  .hero { margin-top: 2.6rem; min-height: 0; }
  .hero-title { font-size: 3.6rem; white-space: normal; }
  .hero-overview { font-size: 1.4rem; }
  .row { gap: 1.6rem; }
  .card { --w: 13rem; }
  .card.landscape { --w: 24rem; }
  .card.square { --w: 15rem; }
  .grid { gap: 2.4rem 1.4rem; --card-w: 13rem; }
  .grid.landscape { --card-w: 22rem; }
  .grid.square { --card-w: 14rem; }
  .card:focus .frame, .card:hover .frame, .grid .card:focus .frame { transform: scale(1.03); }
  #hero-art { width: 100vw; height: 60vh; }
  .episode { grid-template-columns: 15rem 1fr; gap: 1.4rem; }
  .episode .e-ov { -webkit-line-clamp: 2; }
  .album-head { flex-direction: column; align-items: flex-start; }
  #player .p-title { font-size: 2.4rem; }
  #player .p-ctrls { flex-wrap: wrap; justify-content: center; }
  .profile { width: 11rem; }
  .profile .pic { width: 10rem; height: 10rem; font-size: 4rem; border-radius: 2.4rem; }
  .login h1 { font-size: 3.6rem; }
  /* Phones: no room in the top bar, so the mini player sits at the bottom */
  #mini { top: auto; bottom: 1.6rem; left: 1.8rem; width: calc(100vw - 3.6rem); height: 5.2rem; border-radius: 2.6rem; transform: translateY(250%); }
  body:has(#mini.show) .page { padding-bottom: 9rem; }
  #np .np-main { flex-direction: column; justify-content: center; gap: 3rem; padding: 8rem var(--pad-x) 4rem; text-align: center; }
  #np .np-art { width: min(70vw, 42vh); }
  #np .np-info { width: 100%; flex: none; }
  #np .np-title { font-size: 3rem; }
  #np .np-sub { font-size: 1.6rem; }
  #np .np-ctrls { justify-content: center; }
  #np .np-ctrls .spacer { display: none; }
}
