/*
 * File: app.css
 * Description: MexStreamz cinematic interface and responsive layout system.
 * Author: MexTech Limited
 * Copyright: © 2026 MexTech Limited. All rights reserved.
 * Link: https://mextechltd.name.ng
 * Version: 1.1.0
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --shell: #000;
  --ink: #f5f5f7;
  --panel: #1c1c1e;
  --panel-raised: #2c2c2e;
  --glass: rgba(28,28,30,.64);
  --line: rgba(255,255,255,.14);
  --line-soft: rgba(255,255,255,.08);
  --muted: rgba(245,245,247,.56);
  --muted-strong: rgba(245,245,247,.78);
  --brand: #14b8a6;
  --gold: #c7a86b;
  --on-solid: #000;
  --solid: #f5f5f7;
  --gutter: 4.2vw;
  --radius: 14px;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --display: var(--sans);
  --ease: cubic-bezier(.22,.8,.24,1);
}

:root.light {
  color-scheme: light;
  --shell: #fff;
  --ink: #1d1d1f;
  --panel: #f5f5f7;
  --panel-raised: #e8e8ed;
  --glass: rgba(255,255,255,.72);
  --line: rgba(0,0,0,.14);
  --line-soft: rgba(0,0,0,.08);
  --muted: rgba(29,29,31,.58);
  --muted-strong: rgba(29,29,31,.8);
  --on-solid: #fff;
  --solid: #1d1d1f;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  min-width: 320px;
  margin: 0;
  background: var(--shell);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
::selection { background: var(--brand); color: #000; }

.tv-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  padding: 1rem var(--gutter) 0;
  pointer-events: none;
  transition: padding .4s var(--ease);
}
.tv-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  max-width: 1760px;
  margin: 0 auto;
}
.tv-header__inner > * { pointer-events: auto; }
.tv-brand { display: inline-flex; align-items: center; gap: .7rem; justify-self: start; font-size: 1.05rem; font-weight: 700; letter-spacing: -.03em; }
.tv-brand__mark { display: grid; width: 2.1rem; height: 2.1rem; place-items: center; border-radius: 50%; background: var(--solid); color: var(--on-solid); }
.tv-brand__mark svg { width: .9rem; height: .9rem; fill: currentColor; stroke-width: 2.4; margin-left: 2px; }
.tv-tabs {
  display: inline-flex;
  gap: .15rem;
  padding: .28rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
}
.tv-tabs a { padding: .55rem 1.15rem; border-radius: 999px; color: var(--muted-strong); font-size: .82rem; font-weight: 600; letter-spacing: -.01em; transition: background .25s ease, color .25s ease; }
.tv-tabs a:hover { color: var(--ink); }
.tv-tabs a[aria-current="page"] { background: var(--solid); color: var(--on-solid); }
.tv-header__actions { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.tv-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0 .75rem;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  transition: width .45s var(--ease);
}
.tv-search:focus-within, .tv-search:hover { width: 14rem; }
.tv-search svg { flex: 0 0 auto; width: 1rem; height: 1rem; color: var(--muted-strong); }
.tv-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: .85rem; }
.tv-search input::placeholder { color: var(--muted); }
.tv-icon, .tv-avatar {
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  color: var(--muted-strong);
  transition: color .2s ease, transform .3s var(--ease);
}
.tv-icon:hover { color: var(--ink); transform: scale(1.06); }
.tv-icon svg { width: 1rem; height: 1rem; }
.tv-avatar { background: var(--solid); color: var(--on-solid); font-size: .82rem; font-weight: 700; }
.tv-link { padding: 0 .7rem; color: var(--muted-strong); font-size: .85rem; font-weight: 600; }
.tv-link:hover { color: var(--ink); }
.tv-pill { padding: .68rem 1.15rem; border-radius: 999px; background: var(--solid); color: var(--on-solid); font-size: .82rem; font-weight: 700; transition: transform .3s var(--ease); }
.tv-pill:hover { transform: scale(1.05); }
.tv-header.is-solid { padding-top: .65rem; }

.tv-dock { display: none; }
.tv-main { min-height: 100vh; transition: opacity .14s ease, transform .14s ease; }
.tv-main.is-leaving { opacity: 0; transform: translateY(6px); }
.tv-main.is-entering { animation: tv-page-in .3s var(--ease); }
.tv-loader { position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: 3px; background: linear-gradient(90deg, var(--brand), var(--gold)); box-shadow: 0 0 12px var(--brand); transform: scaleX(0); transform-origin: left center; opacity: 0; pointer-events: none; transition: transform .2s ease-out, opacity .25s ease; }
.tv-loader.is-active { opacity: 1; }
@keyframes tv-page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tv-footer { padding: 5rem var(--gutter) 6rem; }
.tv-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 1760px; margin: 0 auto; padding-top: 2rem; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .75rem; }
.tv-footer__inner a { color: var(--muted-strong); }
.tv-footer__inner a:hover { color: var(--ink); }

.tv-kicker { color: var(--muted-strong); font-size: .78rem; font-weight: 600; letter-spacing: .02em; }
.tv-muted { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.tv-inline { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.tv-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 3.1rem;
  padding: 0 1.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--solid);
  color: var(--on-solid);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.01em;
  transition: transform .3s var(--ease), opacity .2s ease;
}
.tv-play:hover { transform: scale(1.04); }
.tv-play:active { transform: scale(.98); }
.tv-play svg { width: 1rem; height: 1rem; fill: currentColor; }
.tv-play--small { min-height: 2.7rem; padding: 0 1.4rem; font-size: .85rem; }
.tv-play--block { width: 100%; }
.tv-round {
  display: inline-grid;
  min-width: 3.1rem;
  height: 3.1rem;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  color: var(--ink);
  transition: transform .3s var(--ease), background .2s ease;
}
.tv-round:hover { transform: scale(1.08); }
.tv-round svg { width: 1.1rem; height: 1.1rem; }
.tv-round--count { grid-auto-flow: column; gap: .5rem; padding: 0 1.1rem; font-size: .85rem; font-weight: 600; }
.tv-round.is-active { background: var(--brand); border-color: var(--brand); color: #000; }
.tv-ghost { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted-strong); font-size: .82rem; font-weight: 600; transition: background .2s ease, color .2s ease; }
.tv-ghost:hover { background: var(--panel); color: var(--ink); }
.tv-ghost svg { width: .9rem; height: .9rem; }

.tv-hero { position: relative; display: flex; align-items: flex-end; min-height: 100vh; overflow: hidden; background: #000; }
.tv-hero__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: tv-drift 24s ease-in-out infinite alternate; }
.tv-hero__shade { position: absolute; inset: 0; background: linear-gradient(0deg, var(--shell) 0%, rgba(0,0,0,.55) 30%, rgba(0,0,0,0) 62%), linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,0) 58%); }
:root.light .tv-hero__shade { background: linear-gradient(0deg, var(--shell) 0%, rgba(255,255,255,0) 44%), linear-gradient(90deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 58%); }
.tv-hero__body { position: relative; width: min(46rem, 100%); padding: 0 var(--gutter) 7vh; color: #f5f5f7; }
.tv-hero .tv-kicker { color: rgba(245,245,247,.82); }
.tv-hero__title { margin-top: .9rem; font-size: clamp(3rem, 7.2vw, 7.4rem); font-weight: 800; letter-spacing: -.055em; line-height: .94; text-wrap: balance; }
.tv-hero__meta, .tv-detail__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: 1.3rem; color: rgba(245,245,247,.78); font-size: .88rem; font-weight: 600; }
.tv-hero__meta span, .tv-detail__meta span { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; }
.tv-hero__text { display: -webkit-box; max-width: 36rem; margin-top: 1rem; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: rgba(245,245,247,.72); font-size: 1rem; line-height: 1.55; }
.tv-hero__actions { display: flex; align-items: center; gap: .7rem; margin-top: 1.9rem; }
.tv-hero .tv-round { color: #f5f5f7; background: rgba(60,60,64,.55); }
.tv-hero .tv-play { background: #f5f5f7; color: #000; }
.tv-hero__card {
  position: absolute;
  right: var(--gutter);
  bottom: 7vh;
  display: grid;
  width: 19rem;
  gap: .7rem;
  padding: .6rem;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 22px;
  background: rgba(40,40,44,.5);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  color: #f5f5f7;
  transition: transform .5s var(--ease);
}
.tv-hero__card:hover { transform: translateY(-4px); }
.tv-hero__card img { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; object-fit: cover; }
.tv-hero__card span { display: grid; gap: .2rem; padding: 0 .5rem .45rem; font-size: .92rem; font-weight: 700; letter-spacing: -.02em; }
.tv-hero__card small { color: rgba(245,245,247,.6); font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
@keyframes tv-drift { from { transform: scale(1.02); } to { transform: scale(1.09) translate3d(-1.2%, -.8%, 0); } }

.tv-empty { display: grid; min-height: 100vh; place-content: center; justify-items: center; gap: 1rem; padding: 8rem var(--gutter); text-align: center; }
.tv-empty svg { width: 2.6rem; height: 2.6rem; color: var(--muted); }
.tv-empty h1, .tv-empty h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; letter-spacing: -.04em; }
.tv-empty p { max-width: 28rem; color: var(--muted); line-height: 1.6; }
.tv-browse .tv-empty { min-height: 40vh; padding: 4rem 0; }

.tv-shelf { margin-top: 3.6rem; }
.tv-shelf--flush { margin-top: 3rem; }
.tv-shelf__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0 var(--gutter); margin-bottom: 1.1rem; }
.tv-shelf__head h2 { font-size: clamp(1.3rem, 1.9vw, 1.9rem); font-weight: 700; letter-spacing: -.035em; }
.tv-shelf__head a { display: inline-flex; align-items: center; gap: .15rem; color: var(--muted); font-size: .85rem; font-weight: 600; transition: color .2s ease; }
.tv-shelf__head a:hover { color: var(--ink); }
.tv-shelf__head svg { width: 1rem; height: 1rem; }
.tv-rank, .tv-row, .tv-poster-row, .tv-filter__chips {
  display: flex;
  gap: 1.1rem;
  padding: .8rem var(--gutter) 1.6rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.tv-rank::-webkit-scrollbar, .tv-row::-webkit-scrollbar, .tv-poster-row::-webkit-scrollbar, .tv-filter__chips::-webkit-scrollbar { display: none; }
.tv-rank > *, .tv-row > *, .tv-poster-row > * { scroll-snap-align: start; }

.tv-tile { display: grid; flex: 0 0 clamp(17rem, 24vw, 30rem); align-content: start; gap: .8rem; min-width: 0; }
.tv-tile__art { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--panel); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.tv-tile__art img { width: 100%; height: 100%; object-fit: cover; }
.tv-tile:hover .tv-tile__art { transform: scale(1.045); box-shadow: 0 26px 50px -18px rgba(0,0,0,.65); }
.tv-tile__art em { position: absolute; right: .6rem; bottom: .6rem; padding: .28rem .55rem; border-radius: 999px; background: rgba(0,0,0,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff; font-size: .68rem; font-style: normal; font-weight: 600; }
.tv-tile__progress { position: absolute; inset: auto 0 0 0; display: block; height: 3px; background: var(--brand); }
.tv-tile__label { display: grid; gap: .2rem; padding: 0 .2rem; }
.tv-tile__label small { color: var(--muted); font-size: .72rem; font-weight: 600; }
.tv-tile__label strong { overflow: hidden; font-size: .96rem; font-weight: 650; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }

.tv-rank { gap: 0; }
.tv-rank__item { position: relative; display: flex; flex: 0 0 auto; align-items: flex-end; }
.tv-rank__number { margin-right: -1.4rem; z-index: 1; color: transparent; font-size: clamp(8rem, 12vw, 13rem); font-weight: 800; letter-spacing: -.09em; line-height: .78; -webkit-text-stroke: 2px var(--muted); pointer-events: none; }
.tv-rank__frame { display: block; width: clamp(9rem, 12vw, 13.5rem); aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--radius); background: var(--panel); transition: transform .5s var(--ease); }
.tv-rank__frame img { width: 100%; height: 100%; object-fit: cover; }
.tv-rank__item:hover .tv-rank__frame { transform: scale(1.05); }
.tv-rank__item { margin-right: 1.6rem; }

.tv-genres { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .9rem; padding: .8rem var(--gutter) 0; }
.tv-genre { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 9.5rem; padding: 1.3rem; overflow: hidden; border-radius: 20px; color: #fff; transition: transform .5s var(--ease); }
.tv-genre:hover { transform: translateY(-5px) scale(1.02); }
.tv-genre:after { content: ''; position: absolute; right: -2.5rem; top: -2.5rem; width: 8rem; height: 8rem; border-radius: 50%; background: rgba(255,255,255,.16); }
.tv-genre strong { position: relative; z-index: 1; font-size: 1.15rem; font-weight: 700; letter-spacing: -.03em; }
.tv-genre small { position: relative; z-index: 1; margin-top: .25rem; color: rgba(255,255,255,.72); font-size: .74rem; font-weight: 600; }
.tv-genre[data-tone="0"] { background: linear-gradient(145deg, #ff6a5b, #a3204a); }
.tv-genre[data-tone="1"] { background: linear-gradient(145deg, #4c8dff, #232a86); }
.tv-genre[data-tone="2"] { background: linear-gradient(145deg, #2fd2b4, #0b5c62); }
.tv-genre[data-tone="3"] { background: linear-gradient(145deg, #ffb340, #b5471a); }
.tv-genre[data-tone="4"] { background: linear-gradient(145deg, #b071ff, #4a2394); }
.tv-genre[data-tone="5"] { background: linear-gradient(145deg, #7a808c, #262a33); }

.tv-poster { display: grid; flex: 0 0 clamp(10rem, 13vw, 15rem); align-content: start; gap: .35rem; }
.tv-poster__art { display: block; aspect-ratio: 2 / 3; margin-bottom: .55rem; overflow: hidden; border-radius: var(--radius); background: var(--panel); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.tv-poster__art img { width: 100%; height: 100%; object-fit: cover; }
.tv-poster:hover .tv-poster__art { transform: translateY(-6px); box-shadow: 0 30px 50px -20px rgba(0,0,0,.7); }
.tv-poster strong { overflow: hidden; font-size: .92rem; font-weight: 650; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.tv-poster small { color: var(--muted); font-size: .74rem; font-weight: 600; }

.tv-browse { padding: 8.2rem var(--gutter) 2rem; max-width: 1760px; margin: 0 auto; }
.tv-browse__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; }
.tv-browse__head h1 { font-size: clamp(2.4rem, 5.5vw, 5rem); font-weight: 800; letter-spacing: -.055em; line-height: 1; }
.tv-browse__head p { color: var(--muted); font-size: .9rem; font-weight: 600; white-space: nowrap; }
.tv-filter { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr) auto; align-items: center; gap: 1.2rem; margin: 2rem calc(var(--gutter) * -1) 2rem; padding: .9rem var(--gutter); background: linear-gradient(180deg, var(--shell) 70%, transparent); }
.tv-filter__search { display: flex; align-items: center; gap: .6rem; height: 2.8rem; padding: 0 1rem; border-radius: 999px; background: var(--panel); }
.tv-filter__search svg { width: 1rem; height: 1rem; color: var(--muted); }
.tv-filter__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: .9rem; }
.tv-filter__search input::placeholder { color: var(--muted); }
.tv-filter__chips { gap: .5rem; padding: 0; scroll-snap-type: none; }
.tv-chip { flex: 0 0 auto; padding: .55rem 1rem; border: 1px solid var(--line-soft); border-radius: 999px; background: var(--panel); color: var(--muted-strong); font-size: .82rem; font-weight: 600; white-space: nowrap; transition: background .2s ease, color .2s ease; }
.tv-chip:hover { color: var(--ink); background: var(--panel-raised); }
.tv-chip[aria-current="true"] { border-color: transparent; background: var(--solid); color: var(--on-solid); }
.tv-segment { display: inline-flex; padding: .25rem; border-radius: 999px; background: var(--panel); }
.tv-segment button { padding: .5rem .95rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted-strong); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.tv-segment button[aria-pressed="true"] { background: var(--solid); color: var(--on-solid); }
.tv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.4rem 1.2rem; padding-bottom: 3rem; }
.tv-grid .tv-tile { flex: none; }

.tv-watch { padding-top: 5.6rem; max-width: 1760px; margin: 0 auto; }
.tv-stage { padding: 0 var(--gutter); }
.tv-player { position: relative; aspect-ratio: 16 / 9; max-height: 78vh; margin: 0 auto; overflow: hidden; border-radius: 22px; background: #000; box-shadow: 0 40px 90px -40px rgba(0,0,0,.9); color: #fff; }
.tv-player:fullscreen { max-height: none; border-radius: 0; }
.tv-player__video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.tv-player__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(0,0,0,.72), transparent 36%); transition: opacity .3s ease; }
.tv-player__center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; transition: opacity .3s ease; }
.tv-player__big { display: grid; width: 5.4rem; height: 5.4rem; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(60,60,64,.55); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); color: #fff; pointer-events: auto; transition: transform .3s var(--ease); }
.tv-player__big:hover { transform: scale(1.08); }
.tv-player__big svg { width: 1.7rem; height: 1.7rem; fill: currentColor; margin-left: 3px; }
.tv-player.is-playing .tv-player__center { opacity: 0; }
.tv-player.is-playing .tv-player__center .tv-player__big { pointer-events: none; }
.tv-player.is-playing:not(:hover) .tv-player__bar, .tv-player.is-playing:not(:hover) .tv-player__shade { opacity: 0; }
.tv-player__bar { position: absolute; right: 1.4rem; bottom: 1rem; left: 1.4rem; transition: opacity .3s ease; }
.tv-player__scrub input { display: block; width: 100%; height: 4px; margin: 0; appearance: none; -webkit-appearance: none; border-radius: 4px; background: rgba(255,255,255,.28); accent-color: #fff; cursor: pointer; }
.tv-player__scrub input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.tv-player__scrub input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.tv-player__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .55rem; }
.tv-player__group { display: flex; align-items: center; gap: .2rem; }
.tv-player__btn { display: inline-grid; min-width: 2.4rem; height: 2.4rem; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: .8rem; font-weight: 700; transition: background .2s ease; }
.tv-player__btn:hover { background: rgba(255,255,255,.16); }
.tv-player__btn svg { width: 1.1rem; height: 1.1rem; }
.tv-player__btn--text { padding: 0 .6rem; border-radius: 999px; }
.tv-player__time { margin-left: .6rem; color: rgba(255,255,255,.72); font-size: .78rem; font-variant-numeric: tabular-nums; font-weight: 600; }

.tv-detail { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 5rem; padding: 3rem var(--gutter) 0; }
.tv-detail__title { margin-top: .6rem; font-size: clamp(2.2rem, 4.6vw, 4.4rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; text-wrap: balance; }
.tv-detail__meta { color: var(--muted-strong); }
.tv-detail__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.tv-detail__text { max-width: 46rem; margin-top: 1.6rem; color: var(--muted-strong); font-size: 1.05rem; line-height: 1.65; }
.tv-detail__tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.6rem; }
.tv-detail__side { align-self: start; padding: 1.5rem; border-radius: 22px; background: var(--panel); }
.tv-detail__side h2 { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tv-detail__side dl { display: grid; margin-top: .6rem; }
.tv-detail__side dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line-soft); font-size: .88rem; }
.tv-detail__side dl div:last-child { border: 0; }
.tv-detail__side dt { color: var(--muted); }
.tv-detail__side dd { font-weight: 600; text-align: right; }

.tv-comments { max-width: 52rem; margin: 4rem var(--gutter) 0; padding-bottom: 2rem; }
.tv-comments h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.035em; }
.tv-comments__form { display: flex; gap: .6rem; margin-top: 1.2rem; }
.tv-comments__form .tv-input { flex: 1; }
.tv-comments .tv-muted { margin-top: 1rem; }
.tv-comments__list { display: grid; gap: 1.4rem; margin-top: 2rem; }
.tv-comment { display: flex; gap: .9rem; }
.tv-comment__avatar { display: grid; flex: 0 0 2.4rem; height: 2.4rem; place-items: center; border-radius: 50%; background: var(--panel-raised); font-size: .8rem; font-weight: 700; }
.tv-comment p:first-child { display: flex; align-items: baseline; gap: .6rem; font-size: .88rem; }
.tv-comment p:first-child small { color: var(--muted); font-size: .72rem; }
.tv-comment p:last-child { margin-top: .3rem; color: var(--muted-strong); font-size: .92rem; line-height: 1.6; }

.tv-input, .field-input {
  width: 100%;
  min-height: 3rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 12px;
  outline: 0;
  background: var(--panel);
  color: var(--ink);
  font-size: .95rem;
  transition: border-color .2s ease, background .2s ease;
}
select.field-input, select.tv-input { appearance: none; -webkit-appearance: none; }
.tv-input:focus, .field-input:focus { border-color: var(--brand); background: var(--panel-raised); }
.tv-input::placeholder { color: var(--muted); }
.tv-input:disabled { opacity: .5; }

.tv-auth { position: relative; display: grid; min-height: 100vh; place-items: center; padding: 6rem var(--gutter); overflow: hidden; }
.tv-auth__glow { position: absolute; top: -20%; left: 50%; width: min(70rem, 140vw); height: 44rem; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(20,184,166,.28), transparent); pointer-events: none; }
.tv-auth__card { position: relative; display: grid; width: min(100%, 25rem); justify-items: center; text-align: center; }
.tv-auth__mark { width: 3.4rem; height: 3.4rem; margin-bottom: 1.6rem; }
.tv-auth__mark svg { width: 1.3rem; height: 1.3rem; }
.tv-auth__card h1 { margin-top: .5rem; font-size: clamp(2.3rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.tv-auth__sub { margin-top: .9rem; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.tv-form { display: grid; width: 100%; gap: .9rem; margin-top: 2rem; text-align: left; }
.tv-form--split { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; margin-top: 1.4rem; }
.tv-field { display: grid; gap: .45rem; }
.tv-field--wide { grid-column: 1 / -1; }
.tv-field span { color: var(--muted-strong); font-size: .78rem; font-weight: 600; }
.tv-check { display: flex; align-items: center; gap: .6rem; color: var(--muted-strong); font-size: .85rem; }
.tv-check input { width: 1.05rem; height: 1.05rem; accent-color: var(--brand); }
.tv-form .tv-play { margin-top: .5rem; }
.tv-form--split .tv-play { justify-self: start; }
.tv-auth__links { display: flex; align-items: center; justify-content: center; gap: 1.3rem; margin-top: 1.6rem; color: var(--muted); font-size: .85rem; }
.tv-auth__links a { color: var(--muted-strong); font-weight: 600; }
.tv-auth__links a:hover { color: var(--ink); }
.tv-alert, .tv-notice { width: 100%; margin-top: 1.4rem; padding: .85rem 1rem; border-radius: 12px; font-size: .88rem; line-height: 1.5; text-align: left; }
.tv-alert { background: rgba(255,69,58,.14); color: #ff8a80; }
.tv-notice { background: rgba(20,184,166,.14); color: var(--brand); }
.tv-notice + .tv-play { margin-top: 1rem; }

.tv-account { max-width: 1400px; margin: 0 auto; padding: 8rem 0 2rem; }
.tv-account__head { display: flex; align-items: center; gap: 1.4rem; padding: 0 var(--gutter); }
.tv-account__avatar { display: grid; flex: 0 0 auto; width: 5.4rem; height: 5.4rem; place-items: center; border-radius: 50%; background: linear-gradient(145deg, var(--brand), #0b5c62); color: #fff; font-size: 2rem; font-weight: 700; }
.tv-account__head h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.045em; }
.tv-account__head p { margin-top: .3rem; color: var(--muted); font-size: .9rem; word-break: break-word; }
.tv-account__head .tv-ghost { margin-left: auto; }
.tv-account > .tv-muted { padding: 3rem var(--gutter) 0; }
.tv-panel { margin: 3.5rem var(--gutter) 0; padding: 2rem; border-radius: 24px; background: var(--panel); }
.tv-panel h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.03em; }
.tv-panel .tv-input { background: var(--panel-raised); }

.brand-mark { display: inline-flex; align-items: center; gap: .7rem; font-size: 1.05rem; font-weight: 700; letter-spacing: -.03em; }
.brand-symbol { display: grid; width: 2.1rem; height: 2.1rem; place-items: center; border-radius: 50%; background: var(--solid); color: var(--on-solid); }
.brand-symbol svg { width: .9rem; height: .9rem; fill: currentColor; stroke-width: 2.4; margin-left: 2px; }
.eyebrow { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .1em; line-height: 1.3; text-transform: uppercase; }
.eyebrow.text-teal, .text-teal { color: var(--brand); }
.section-title { font-weight: 700; letter-spacing: -.035em; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.button-primary, .button-quiet { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: 0 1.6rem; border: 0; border-radius: 999px; font-size: .9rem; font-weight: 700; transition: transform .3s var(--ease); }
.button-primary { background: var(--solid); color: var(--on-solid); }
.button-quiet { border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.button-primary:hover, .button-quiet:hover { transform: scale(1.03); }
.button-primary svg, .button-quiet svg { width: .95rem; height: .95rem; }
.tag { display: inline-flex; padding: .38rem .7rem; border-radius: 999px; background: var(--panel-raised); color: var(--muted-strong); font-size: .72rem; font-weight: 600; }
.field-label { display: block; color: var(--muted-strong); font-size: .78rem; font-weight: 600; }
.field-label .field-input { margin-top: .45rem; }
.alert-error { margin-top: 1rem; padding: .85rem 1rem; border-radius: 12px; background: rgba(255,69,58,.14); color: #ff8a80; font-size: .88rem; }
.auth-links { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; color: var(--muted); font-size: .85rem; }
.auth-links a:hover { color: var(--ink); }
.auth-shell { position: relative; display: grid; min-height: 100vh; place-items: center; padding: 5rem var(--gutter); overflow: hidden; }
.auth-shell:before { content: ''; position: absolute; top: -20%; left: 50%; width: min(70rem, 140vw); height: 44rem; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(20,184,166,.26), transparent); pointer-events: none; }
.auth-art { display: none; }
.auth-panel { position: relative; width: min(100%, 30rem); }
.auth-card h2 { margin-top: .6rem; font-size: 2.4rem; font-weight: 800; letter-spacing: -.05em; line-height: 1.05; }
.auth-card > p { margin-top: .8rem; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.auth-form { display: grid; gap: 1rem; margin-top: 1.8rem; }
.auth-form button { width: 100%; }
.admin-shell { min-height: 100vh; background: var(--shell); }
.admin-sidebar { border-right: 1px solid var(--line-soft); background: var(--panel); }
.admin-nav-link { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 12px; color: var(--muted-strong); font-size: .88rem; font-weight: 600; transition: background .2s ease, color .2s ease; }
.admin-nav-link:hover { background: var(--panel-raised); color: var(--ink); }
.admin-nav-link.active { background: var(--solid); color: var(--on-solid); }
.admin-nav-link svg { width: 1rem; height: 1rem; }
.stat-card { padding: 1.3rem; border: 0; border-radius: 22px; background: var(--panel); }
.admin-shell .button-primary { min-height: 2.6rem; }
:root.light .text-white { color: var(--ink) !important; }
:root.light .text-white\/35, :root.light .text-white\/40, :root.light .text-white\/45, :root.light .text-white\/50, :root.light .text-white\/55 { color: var(--muted) !important; }

@media (min-width: 1800px) {
  :root { --gutter: 5vw; --radius: 18px; }
  .tv-hero__title { font-size: 8.4rem; }
  .tv-hero__text { font-size: 1.15rem; max-width: 42rem; }
  .tv-tile { flex-basis: 30rem; }
  .tv-header__inner, .tv-browse, .tv-watch, .tv-footer__inner { max-width: 2000px; }
  .tv-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 2400px) {
  html { font-size: 20px; }
}

@media (max-width: 1279px) {
  .tv-hero__card { display: none; }
  .tv-genres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tv-filter { grid-template-columns: minmax(0, 1fr) auto; }
  .tv-filter__chips { grid-column: 1 / -1; grid-row: 2; }
  .tv-detail { gap: 3rem; grid-template-columns: minmax(0, 1fr) 17rem; }
}

@media (max-width: 1023px) {
  :root { --gutter: 5vw; }
  .tv-header__inner { grid-template-columns: auto 1fr auto; }
  .tv-tabs { justify-self: center; }
  .tv-tabs a { padding: .5rem .85rem; font-size: .78rem; }
  .tv-search:focus-within, .tv-search:hover { width: 2.5rem; }
  .tv-link { display: none; }
  .tv-hero { min-height: 80vh; }
  .tv-hero__body { width: min(38rem, 100%); padding-bottom: 6vh; }
  .tv-hero__title { font-size: clamp(2.8rem, 8vw, 5rem); }
  .tv-tile { flex-basis: 45vw; }
  .tv-detail { grid-template-columns: minmax(0, 1fr); }
  .tv-detail__side { max-width: 36rem; }
  .tv-player { max-height: none; }
}

@media (max-width: 767px) {
  :root { --gutter: 1.2rem; --radius: 12px; }
  body { padding-bottom: 5.4rem; }
  .tv-header { padding: .7rem var(--gutter) 0; }
  .tv-header__inner { grid-template-columns: 1fr auto; }
  .tv-tabs, .tv-search, .tv-pill { display: none; }
  .tv-brand__name { font-size: 1rem; }
  .tv-dock {
    position: fixed;
    right: .8rem;
    bottom: calc(.8rem + env(safe-area-inset-bottom));
    left: .8rem;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: .4rem;
    border: 1px solid var(--line-soft);
    border-radius: 26px;
    background: var(--glass);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    box-shadow: 0 20px 40px -18px rgba(0,0,0,.6);
  }
  .tv-dock a { display: grid; justify-items: center; gap: .2rem; padding: .55rem 0; border-radius: 20px; color: var(--muted); font-size: .64rem; font-weight: 600; }
  .tv-dock a svg { width: 1.2rem; height: 1.2rem; }
  .tv-dock a[aria-current="page"] { background: var(--panel-raised); color: var(--ink); }
  .tv-hero { display: block; min-height: 0; padding-top: 0; }
  .tv-hero__art { position: relative; height: 68vh; min-height: 24rem; animation: none; }
  .tv-hero__shade { height: 68vh; min-height: 24rem; background: linear-gradient(0deg, var(--shell) 0%, rgba(0,0,0,0) 46%), linear-gradient(180deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,0) 22%); }
  .tv-hero__body { display: grid; justify-items: center; width: 100%; margin-top: -9rem; padding: 0 var(--gutter) 1rem; color: var(--ink); text-align: center; }
  .tv-hero .tv-kicker { color: var(--muted-strong); }
  .tv-hero__title { font-size: clamp(2.5rem, 13vw, 3.6rem); }
  .tv-hero__meta { justify-content: center; margin-top: .9rem; color: var(--muted-strong); font-size: .8rem; }
  .tv-hero__text { margin-top: .8rem; color: var(--muted); font-size: .9rem; -webkit-line-clamp: 3; }
  .tv-hero__actions { display: grid; grid-template-columns: 1fr auto auto; width: 100%; margin-top: 1.4rem; }
  .tv-hero .tv-play { background: var(--solid); color: var(--on-solid); }
  .tv-hero .tv-round { color: var(--ink); background: var(--panel); }
  .tv-shelf { margin-top: 2.4rem; }
  .tv-shelf__head h2 { font-size: 1.25rem; }
  .tv-row, .tv-poster-row, .tv-rank { gap: .8rem; scroll-snap-type: x mandatory; }
  .tv-tile { flex-basis: 78vw; }
  .tv-tile__art:hover { transform: none; }
  .tv-rank__number { font-size: 7.5rem; margin-right: -1rem; }
  .tv-rank__frame { width: 7.6rem; }
  .tv-poster { flex-basis: 8.6rem; }
  .tv-genres { display: flex; gap: .7rem; overflow-x: auto; padding-bottom: 1rem; scrollbar-width: none; scroll-snap-type: x mandatory; }
  .tv-genres::-webkit-scrollbar { display: none; }
  .tv-genre { flex: 0 0 42vw; min-height: 7.6rem; padding: 1rem; scroll-snap-align: start; }
  .tv-browse { padding-top: 5.4rem; }
  .tv-browse__head { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .tv-filter { grid-template-columns: minmax(0, 1fr); gap: .8rem; margin-top: 1.2rem; }
  .tv-filter__chips { grid-row: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .tv-filter__search { order: -1; }
  .tv-segment { overflow-x: auto; scrollbar-width: none; }
  .tv-grid { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .tv-watch { padding-top: 0; }
  .tv-stage { padding: 0; }
  .tv-player { border-radius: 0; box-shadow: none; margin-top: 0; }
  .tv-player__big { width: 4rem; height: 4rem; }
  .tv-player__bar { right: .8rem; bottom: .5rem; left: .8rem; }
  .tv-player__time { display: none; }
  .tv-player__btn { min-width: 2.2rem; height: 2.2rem; }
  .tv-detail { padding-top: 1.6rem; gap: 1.5rem; }
  .tv-detail__title { font-size: 2.2rem; }
  .tv-detail__text { font-size: .95rem; }
  .tv-detail__actions .tv-round { flex: 1; }
  .tv-detail__side { max-width: none; }
  .tv-comments { margin-top: 2.5rem; }
  .tv-comments__form { flex-direction: column; }
  .tv-auth { align-items: start; padding-top: 7rem; }
  .tv-account { padding-top: 5.4rem; }
  .tv-account__head { flex-wrap: wrap; }
  .tv-account__avatar { width: 4.2rem; height: 4.2rem; font-size: 1.6rem; }
  .tv-account__head .tv-ghost { margin-left: 0; width: 100%; justify-content: center; }
  .tv-panel { padding: 1.3rem; }
  .tv-form--split { grid-template-columns: minmax(0, 1fr); }
  .tv-form--split .tv-play { justify-self: stretch; }
  .tv-footer { padding: 3rem var(--gutter) 2rem; }
  .tv-footer__inner { flex-direction: column; align-items: flex-start; }
  .admin-sidebar { border-right: 0; border-bottom: 1px solid var(--line-soft); }
}

@media (max-width: 379px) {
  .tv-hero__title { font-size: 2.3rem; }
  .tv-genre { flex-basis: 60vw; }
  .tv-tile { flex-basis: 84vw; }
  .tv-dock a span { font-size: .58rem; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .tv-hero { min-height: 120vh; }
  .tv-player { max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

:root.light {
  --shell: #f4f7f5;
  --ink: #14201d;
  --panel: #ffffff;
  --panel-raised: #edf3f0;
  --glass: rgba(255,255,255,.9);
  --glass-strong: rgba(255,255,255,.94);
  --panel-deep: #e5eeea;
  --panel-soft: rgba(20,32,29,.045);
  --line: rgba(20,32,29,.16);
  --line-soft: rgba(20,32,29,.09);
  --muted: rgba(20,32,29,.58);
  --muted-strong: rgba(20,32,29,.78);
  --brand: #0f8f82;
  --gold: #9a6f28;
  --on-solid: #ffffff;
  --solid: #14201d;
  --shadow-soft: 0 24px 70px -42px rgba(20,32,29,.28);
  --shadow-card: 0 18px 50px -30px rgba(20,32,29,.22);
}

:root.light body {
  background:
    radial-gradient(circle at 16% -10%, rgba(15,143,130,.09), transparent 34rem),
    radial-gradient(circle at 90% 4%, rgba(154,111,40,.08), transparent 28rem),
    var(--shell);
}

:root.light body.is-shell {
  background: #eef3f1;
}

:root.light .tv-header.is-solid .tv-header__inner {
  border-color: var(--line-soft);
  background: var(--glass-strong);
  box-shadow: var(--shadow-soft);
}

:root.light .tv-tabs,
:root.light .tv-search,
:root.light .tv-icon,
:root.light .tv-avatar {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 24px -18px rgba(20,32,29,.34);
}

:root.light .tv-hero {
  background: var(--shell);
}

:root.light .tv-hero__shade {
  background:
    linear-gradient(0deg, var(--shell) 0%, rgba(244,247,245,.94) 13%, rgba(244,247,245,.2) 58%, transparent 78%),
    linear-gradient(90deg, rgba(244,247,245,.9) 0%, rgba(244,247,245,.28) 55%, transparent 78%);
}

:root.light .tv-hero__body {
  color: var(--ink);
}

:root.light .tv-hero .tv-kicker,
:root.light .tv-hero__meta,
:root.light .tv-hero__text {
  color: var(--muted-strong);
}

:root.light .tv-hero .tv-round {
  border-color: var(--line);
  background: rgba(255,255,255,.84);
  color: var(--ink);
}

:root.light .tv-hero .tv-play {
  background: var(--solid);
  color: var(--on-solid);
}

:root.light .tv-hero:after {
  background: linear-gradient(180deg, transparent, rgba(20,32,29,.08));
}

:root.light .tv-hero__card {
  border-color: var(--line);
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow-card);
  color: var(--ink);
}

:root.light .tv-hero__card small {
  color: var(--muted);
}

:root.light .tv-auth,
:root.light .auth-shell {
  background:
    radial-gradient(circle at 50% 8%, rgba(15,143,130,.1), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(154,111,40,.08), transparent 26rem);
}

:root.light .tv-auth__card,
:root.light .auth-panel {
  border-color: var(--line-soft);
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(24px) saturate(130%);
  -webkit-backdrop-filter: blur(24px) saturate(130%);
}

:root.light .auth-art {
  border-color: var(--line);
  background:
    linear-gradient(140deg, rgba(15,143,130,.22), transparent 38%),
    linear-gradient(25deg, rgba(154,111,40,.14), transparent 48%),
    radial-gradient(circle at 68% 22%, rgba(255,255,255,.9), transparent 5rem),
    #dcebe6;
  box-shadow: var(--shadow-card);
  color: var(--ink);
}

:root.light .auth-art:before {
  border-color: rgba(20,32,29,.13);
  box-shadow: 0 0 0 2rem rgba(20,32,29,.035), 0 0 0 5rem rgba(20,32,29,.025);
}

:root.light .auth-art:after {
  background: rgba(20,32,29,.05);
}

:root.light .tv-panel,
:root.light .tv-detail__side,
:root.light .tv-filter__search,
:root.light .tv-chip,
:root.light .tv-segment,
:root.light .admin-sidebar,
:root.light .admin-shell .admin-sidebar,
:root.light .stat-card,
:root.light .admin-shell .stat-card {
  border-color: var(--line-soft);
  background: var(--panel);
  box-shadow: 0 14px 34px -28px rgba(20,32,29,.32);
}

:root.light .tv-input,
:root.light .field-input,
:root.light .admin-shell .field-input {
  border-color: var(--line-soft);
  background: #f8fbf9;
  color: var(--ink);
}

:root.light .tv-input:focus,
:root.light .field-input:focus,
:root.light .admin-shell .field-input:focus {
  border-color: var(--brand);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15,143,130,.13);
}

:root.light .tv-tile__art,
:root.light .tv-poster__art,
:root.light .tv-rank__frame {
  box-shadow: inset 0 0 0 1px rgba(20,32,29,.08), 0 18px 36px -28px rgba(20,32,29,.3);
}

:root.light .tv-tile__art:after,
:root.light .tv-poster__art:after,
:root.light .tv-rank__frame:after {
  border-color: rgba(20,32,29,.1);
}

:root.light .tv-tile__art em {
  background: rgba(20,32,29,.72);
  color: #fff;
}

:root.light .tv-admin__side,
:root.light .pv-admin__side {
  border-color: var(--line-soft);
  background: #e9f0ed;
}

:root.light .pv-card,
:root.light .pv-admin__stat,
:root.light .pv-setup__card {
  border-color: var(--line-soft);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

:root.light .pv-bar {
  border-color: var(--line-soft);
  background: rgba(255,255,255,.94);
  color: var(--ink);
}

:root.light .pv-group {
  background: #e8efec;
}

:root.light .pv-group button {
  color: var(--muted-strong);
}

:root.light .pv-group button.is-on {
  background: var(--solid);
  color: var(--on-solid);
}

:root.light .pv-device {
  border-color: var(--line);
  background: var(--shell);
}

:root.light .admin-shell table thead {
  background: rgba(20,32,29,.035);
}

:root {
  --panel-deep: #101113;
  --panel-soft: rgba(255,255,255,.045);
  --glass-strong: rgba(18,18,20,.82);
  --shadow-soft: 0 24px 70px -42px rgba(0,0,0,.85);
  --shadow-card: 0 18px 50px -30px rgba(0,0,0,.72);
}

body {
  background:
    radial-gradient(circle at 16% -10%, rgba(20,184,166,.07), transparent 34rem),
    radial-gradient(circle at 90% 4%, rgba(199,168,107,.05), transparent 28rem),
    var(--shell);
}

body.is-shell {
  background: #0b0b0c;
}

.tv-header__inner {
  padding: .42rem .42rem .42rem .65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}

.tv-header.is-solid .tv-header__inner {
  border-color: var(--line-soft);
  background: var(--glass-strong);
  box-shadow: var(--shadow-soft);
}

.tv-brand__mark,
.brand-symbol {
  box-shadow: 0 8px 24px -12px rgba(255,255,255,.7);
}

.tv-tabs,
.tv-search,
.tv-icon,
.tv-avatar {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.tv-hero {
  isolation: isolate;
}

.tv-hero:after {
  position: absolute;
  inset: auto 0 0;
  z-index: 0;
  height: 12rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.28));
  content: '';
  pointer-events: none;
}

.tv-hero__body,
.tv-hero__card {
  z-index: 1;
}

.tv-hero__title,
.tv-browse__head h1,
.tv-detail__title,
.tv-auth__card h1,
.auth-card h2 {
  text-wrap: balance;
}

.tv-shelf__head {
  max-width: 1760px;
  margin-inline: auto;
}

.tv-tile__art,
.tv-poster__art,
.tv-rank__frame {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

.tv-tile__art:after,
.tv-poster__art:after,
.tv-rank__frame:after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: inherit;
  content: '';
  pointer-events: none;
}

.tv-tile__art,
.tv-poster__art,
.tv-rank__frame {
  position: relative;
}

.tv-auth {
  background:
    radial-gradient(circle at 50% 8%, rgba(20,184,166,.12), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(199,168,107,.05), transparent 26rem);
}

.tv-auth__card {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line-soft);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(28,28,30,.7), rgba(16,16,18,.38));
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(24px) saturate(130%);
  -webkit-backdrop-filter: blur(24px) saturate(130%);
}

.tv-auth__mark {
  box-shadow: 0 18px 40px -16px rgba(20,184,166,.5);
}

.auth-shell {
  grid-template-columns: minmax(0, 1fr) minmax(26rem, 34rem);
  gap: clamp(3rem, 8vw, 10rem);
  padding: clamp(2rem, 6vw, 6rem) clamp(1.2rem, 7vw, 8rem);
  background:
    radial-gradient(circle at 12% 12%, rgba(20,184,166,.12), transparent 30rem),
    radial-gradient(circle at 92% 90%, rgba(199,168,107,.08), transparent 24rem);
}

.auth-art {
  position: relative;
  display: flex;
  min-height: min(70vh, 42rem);
  align-items: flex-end;
  padding: clamp(1.8rem, 5vw, 5rem);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 36px;
  background:
    linear-gradient(140deg, rgba(20,184,166,.42), transparent 38%),
    linear-gradient(25deg, rgba(199,168,107,.18), transparent 48%),
    radial-gradient(circle at 68% 22%, rgba(255,255,255,.2), transparent 5rem),
    #111819;
  box-shadow: var(--shadow-card);
}

.auth-art:before,
.auth-art:after {
  position: absolute;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  content: '';
  pointer-events: none;
}

.auth-art:before {
  top: 12%;
  right: 12%;
  width: 16rem;
  height: 16rem;
  box-shadow: 0 0 0 2rem rgba(255,255,255,.035), 0 0 0 5rem rgba(255,255,255,.025);
}

.auth-art:after {
  right: -10rem;
  bottom: -13rem;
  width: 34rem;
  height: 34rem;
  background: rgba(0,0,0,.16);
}

.auth-art__copy {
  position: relative;
  z-index: 1;
  max-width: 32rem;
}

.auth-art__copy h1 {
  margin-top: .8rem;
  font-size: clamp(3rem, 6vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -.07em;
  line-height: .92;
}

.auth-art__copy p:last-child {
  max-width: 24rem;
  margin-top: 1.2rem;
  color: rgba(245,245,247,.72);
  font-size: 1rem;
  line-height: 1.65;
}

.auth-panel {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line-soft);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(28,28,30,.82), rgba(16,16,18,.58));
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(24px) saturate(130%);
  -webkit-backdrop-filter: blur(24px) saturate(130%);
}

.auth-card .brand-mark {
  margin-bottom: 1rem;
}

.auth-card .eyebrow {
  margin-top: 2rem;
}

.auth-card h2 {
  margin-top: .65rem;
  font-size: clamp(2.2rem, 4vw, 3.7rem);
}

.auth-form {
  gap: 1.1rem;
}

.auth-form .button-primary {
  width: 100%;
  margin-top: .35rem;
}

.install-shell {
  align-items: center;
}

.install-card {
  max-height: min(88vh, 62rem);
  overflow: auto;
  scrollbar-width: thin;
}

.install-card > p:not(.eyebrow),
.install-card > .auth-form {
  max-width: 32rem;
}

.install-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.install-section .eyebrow {
  margin-top: 0;
}

.install-actions {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-top: 1.5rem;
}

[data-mysql-fields][hidden] {
  display: none;
}

.admin-shell {
  background:
    radial-gradient(circle at 8% 0%, rgba(20,184,166,.08), transparent 28rem),
    radial-gradient(circle at 96% 0%, rgba(199,168,107,.06), transparent 24rem),
    var(--shell);
}

.admin-shell > .min-h-screen {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  background: rgba(0,0,0,.08);
}

.admin-shell .admin-sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 100vh;
  padding: 1.4rem !important;
  background: rgba(17,17,19,.82);
  box-shadow: 16px 0 50px -45px rgba(0,0,0,.9);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.admin-shell .admin-sidebar .eyebrow {
  margin-top: 3.5rem;
}

.admin-shell > .min-h-screen > main {
  min-width: 0;
  padding: clamp(1.2rem, 3vw, 3rem) !important;
}

.admin-shell > .min-h-screen > main > .mx-auto {
  max-width: 1400px;
}

.admin-shell h1 {
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  letter-spacing: -.065em;
  line-height: .98;
}

.admin-shell h2 {
  letter-spacing: -.04em;
}

.admin-shell .stat-card,
.admin-shell main section,
.admin-shell main form.rounded-2xl,
.admin-shell main > .mx-auto > .overflow-hidden.rounded-2xl {
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card);
}

.admin-shell .stat-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,.055), transparent 60%),
    var(--panel);
}

.admin-shell .stat-card:after {
  position: absolute;
  right: -2rem;
  bottom: -3rem;
  width: 8rem;
  height: 8rem;
  border: 1px solid rgba(20,184,166,.18);
  border-radius: 50%;
  content: '';
}

.admin-shell .field-input {
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

.admin-shell .field-input:hover {
  border-color: var(--line);
}

.admin-shell .field-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(20,184,166,.12);
}

.admin-shell table thead {
  background: rgba(255,255,255,.025);
}

.admin-shell table tbody tr {
  transition: background .2s ease;
}

.admin-shell table tbody tr:hover {
  background: rgba(255,255,255,.035);
}

.admin-shell .button-primary,
.admin-shell .button-quiet {
  box-shadow: 0 12px 24px -16px rgba(255,255,255,.8);
}

.admin-shell .admin-nav-link {
  min-height: 2.8rem;
}

.appearance-colors {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.appearance-color-field {
  display: grid;
  gap: .55rem;
}

.appearance-color-control {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
}

.appearance-swatch {
  display: block;
  width: 3.25rem;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--color-preview, #14B8A6);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.08), 0 10px 24px -16px rgba(0,0,0,.8);
}

.appearance-hex {
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.appearance-hex:invalid {
  border-color: #ff6b61;
}

@media (max-width: 900px) {
  .appearance-colors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 32rem);
    gap: 2rem;
    padding-inline: 5vw;
  }

  .auth-art {
    min-height: 32rem;
    padding: 2rem;
  }

  .admin-shell .admin-sidebar {
    position: relative;
    min-height: auto;
  }

  .admin-shell > .min-h-screen {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .tv-header__inner {
    padding: .32rem .32rem .32rem .5rem;
  }

  .tv-auth__card {
    padding: 1.25rem;
    border-radius: 22px;
  }

  .auth-shell {
    display: block;
    min-height: 100svh;
    padding: 1.2rem;
  }

  .auth-art {
    display: none;
  }

  .auth-panel {
    width: min(100%, 34rem);
    margin: 0 auto;
    padding: 1.35rem;
    border-radius: 22px;
  }

  .install-card {
    max-height: none;
  }

  .install-actions {
    display: grid;
  }

  .admin-shell .admin-sidebar {
    padding: 1rem !important;
  }

  .admin-shell .admin-sidebar .eyebrow {
    margin-top: 2rem;
  }

  .appearance-colors {
    grid-template-columns: 1fr;
  }
}

.password-control {
  display: block;
  position: relative;
}

.password-control > input {
  padding-right: 5.25rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: .7rem;
  transform: translateY(-50%);
  border: 0;
  border-radius: .55rem;
  background: transparent;
  color: var(--brand, #14B8A6);
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  padding: .35rem .5rem;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: rgba(20,184,166,.12);
  outline: none;
}

.password-control {
  display: block;
  position: relative;
  width: 100%;
}

.password-control > input {
  width: 100%;
  padding-right: 3.6rem;
}

.password-control > .password-toggle {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--muted-strong);
  cursor: pointer;
  display: inline-flex;
  height: 2.75rem;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: .45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem !important;
  z-index: 2;
}

.password-control > .password-toggle:hover,
.password-control > .password-toggle:focus-visible {
  background: rgba(20,184,166,.14);
  color: var(--brand);
  outline: none;
}

.password-toggle__icon {
  height: 1.3rem;
  pointer-events: none;
  width: 1.3rem;
}

.password-toggle__text {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.tv-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: 3rem;
  padding: 2rem var(--gutter);
}

.tv-footer__inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1760px;
  min-height: 2rem;
}

.tv-footer__copyright {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.5;
  margin: 0;
}

.tv-footer__legal {
  align-items: center;
  display: inline-flex;
  gap: .9rem;
}

.tv-footer__legal a {
  color: var(--muted-strong);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease;
}

.tv-footer__legal a:hover,
.tv-footer__legal a:focus-visible {
  color: var(--brand);
}

.tv-footer__legal span {
  background: var(--line);
  display: block;
  height: 1rem;
  width: 1px;
}

@media (max-width: 767px) {
  .tv-footer {
    margin-top: 2rem;
    padding: 2.25rem 1.25rem calc(2.25rem + env(safe-area-inset-bottom));
  }

  .tv-footer__inner {
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    text-align: center;
  }

  .tv-footer__copyright {
    font-size: .84rem;
  }

  .tv-footer__legal {
    gap: .8rem;
    justify-content: center;
  }
}

.tv-avatar, .tv-account__avatar, .tv-comment__avatar { overflow: hidden; }
.tv-avatar img, .tv-account__avatar img, .tv-comment__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

.tv-avatars { min-width: 0; margin: 0; padding: 0; border: 0; }
.tv-avatars legend { padding: 0; margin-bottom: .7rem; color: var(--muted-strong); font-size: .78rem; font-weight: 600; }
.tv-avatars__grid { display: grid; grid-template-columns: repeat(4, 4.6rem); gap: .9rem; }
.tv-avatars__option { position: relative; display: block; width: 4.6rem; height: 4.6rem; cursor: pointer; }
.tv-avatars__option input { position: absolute; inset: 0; z-index: 2; margin: 0; opacity: 0; cursor: pointer; }
.tv-avatars__option img { display: block; width: 100%; height: 100%; border: 2px solid var(--line-soft); border-radius: 50%; box-shadow: 0 0 0 3px transparent; transition: transform .3s var(--ease), box-shadow .25s ease, border-color .25s ease; }
.tv-avatars__option:hover img { transform: scale(1.06); }
.tv-avatars__option input:checked + img { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent); transform: scale(1.06); }
.tv-avatars__option input:focus-visible + img { border-color: var(--ink); }

@media (max-width: 767px) {
  .tv-avatars__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tv-avatars__option { width: 100%; height: auto; aspect-ratio: 1; }
}

.admin-shell .admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100vh;
  min-height: 0;
  padding: 1.5rem 1rem 1rem !important;
  overflow-y: auto;
  border-right: 1px solid var(--line-soft);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, transparent), color-mix(in srgb, var(--shell) 96%, transparent));
}
.admin-shell .admin-brand { padding: 0 .55rem; }
.admin-shell .admin-brand em { margin-left: auto; padding: .18rem .5rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted-strong); font-size: .6rem; font-style: normal; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.admin-shell .admin-nav-label { margin: 2.4rem 0 .6rem; padding: 0 .75rem; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.admin-shell .admin-nav { display: grid; gap: .2rem; }
.admin-shell .admin-nav-link { position: relative; gap: .8rem; min-height: 2.75rem; padding: .35rem .6rem; border-radius: 14px; background: transparent; color: var(--muted-strong); font-size: .86rem; font-weight: 600; transition: background .25s ease, color .25s ease, transform .3s var(--ease); }
.admin-shell .admin-nav-link:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); transform: translateX(2px); }
.admin-shell .admin-nav-icon { display: grid; flex: 0 0 auto; width: 2rem; height: 2rem; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted-strong); transition: background .25s ease, color .25s ease, box-shadow .25s ease; }
.admin-shell .admin-nav-icon svg { width: 1rem; height: 1rem; }
.admin-shell .admin-nav-link.active { background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 20%, transparent), color-mix(in srgb, var(--brand) 4%, transparent)); color: var(--ink); }
.admin-shell .admin-nav-link.active::before { position: absolute; top: 22%; bottom: 22%; left: -1rem; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); box-shadow: 0 0 14px var(--brand); content: ''; }
.admin-shell .admin-nav-link.active .admin-nav-icon { background: var(--brand); color: #04110f; box-shadow: 0 8px 20px -8px var(--brand); }
.admin-shell .admin-sidebar__foot { display: grid; gap: .6rem; margin-top: auto; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); }
.admin-shell .admin-user { display: flex; align-items: center; gap: .7rem; padding: .6rem; border: 1px solid var(--line-soft); border-radius: 16px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.admin-shell .admin-user__avatar { display: grid; flex: 0 0 auto; width: 2.3rem; height: 2.3rem; place-items: center; overflow: hidden; border-radius: 50%; background: var(--solid); color: var(--on-solid); font-size: .8rem; font-weight: 700; }
.admin-shell .admin-user__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.admin-shell .admin-user__meta { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.admin-shell .admin-user__meta strong { overflow: hidden; color: var(--ink); font-size: .82rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .admin-user__meta small { color: var(--muted); font-size: .68rem; }
.admin-shell .admin-user__out { display: grid; flex: 0 0 auto; width: 2rem; height: 2rem; place-items: center; border-radius: 10px; color: var(--muted-strong); transition: background .25s ease, color .25s ease; }
.admin-shell .admin-user__out:hover { background: color-mix(in srgb, #ef4444 16%, transparent); color: #f87171; }
.admin-shell .admin-user__out svg { width: 1rem; height: 1rem; }

@media (min-width: 1024px) {
  .admin-shell > .min-h-screen { grid-template-columns: 272px minmax(0, 1fr); }
  .admin-shell .admin-sidebar { position: sticky; top: 0; }
}

@media (max-width: 1023px) {
  .admin-shell .admin-sidebar { position: sticky; top: 0; z-index: 40; flex-direction: row; align-items: center; gap: .75rem; width: 100%; height: auto; padding: .7rem .8rem !important; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line-soft); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
  .admin-shell .admin-brand { flex: 0 0 auto; padding: 0; }
  .admin-shell .admin-brand span:not(.brand-symbol), .admin-shell .admin-brand em, .admin-shell .admin-nav-label, .admin-shell .admin-user__meta, .admin-shell .admin-sidebar__foot > .admin-nav-link { display: none; }
  .admin-shell .admin-nav { display: flex; flex: 1; gap: .3rem; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .admin-shell .admin-nav::-webkit-scrollbar { display: none; }
  .admin-shell .admin-nav-link { flex: 0 0 auto; min-height: 2.5rem; padding: .3rem .75rem .3rem .4rem; }
  .admin-shell .admin-nav-link:hover { transform: none; }
  .admin-shell .admin-nav-link.active::before { display: none; }
  .admin-shell .admin-sidebar__foot { flex: 0 0 auto; margin: 0; padding: 0; border: 0; }
  .admin-shell .admin-user { padding: 0; border: 0; background: transparent; }
}

.tv-legal { max-width: 1240px; margin: 0 auto; padding: 8rem var(--gutter) 2rem; }
.tv-legal__head { display: grid; gap: .9rem; }
.tv-legal__head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.tv-legal__switch { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.tv-legal__switch a { padding: .55rem 1rem; border: 1px solid var(--line-soft); border-radius: 999px; color: var(--muted-strong); font-size: .82rem; font-weight: 600; transition: background .2s ease, color .2s ease; }
.tv-legal__switch a:hover { background: var(--panel); color: var(--ink); }
.tv-legal__switch a[aria-current="page"] { background: var(--solid); border-color: var(--solid); color: var(--on-solid); }
.tv-legal__layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3.5rem; margin-top: 3rem; align-items: start; }
.tv-legal__toc { position: sticky; top: 6rem; display: grid; gap: .1rem; max-height: calc(100vh - 8rem); overflow-y: auto; padding-right: .5rem; }
.tv-legal__toc p { margin-bottom: .6rem; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.tv-legal__toc a { padding: .42rem .7rem; border-left: 2px solid var(--line-soft); color: var(--muted); font-size: .8rem; line-height: 1.4; transition: color .2s ease, border-color .2s ease; }
.tv-legal__toc a:hover { border-color: var(--brand); color: var(--ink); }
.tv-legal__body { max-width: 46rem; padding: 2.4rem; border: 1px solid var(--line-soft); border-radius: 24px; background: var(--panel); }
.tv-legal__body h2 { scroll-margin-top: 6rem; margin: 2.6rem 0 .9rem; padding-top: 2rem; border-top: 1px solid var(--line-soft); font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.tv-legal__body h2:first-of-type { margin-top: 2rem; }
.tv-legal__body p { margin-top: .9rem; color: var(--muted-strong); font-size: .95rem; line-height: 1.8; }
.tv-legal__body > p:first-child { margin-top: 0; color: var(--muted); font-size: .82rem; font-weight: 600; }
.tv-legal__body ul { display: grid; gap: .55rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.tv-legal__body li { position: relative; padding-left: 1.4rem; color: var(--muted-strong); font-size: .95rem; line-height: 1.7; }
.tv-legal__body li::before { position: absolute; top: .72em; left: .2rem; width: .38rem; height: .38rem; border-radius: 50%; background: var(--brand); content: ''; }

.tv-support { max-width: 1240px; margin: 0 auto; padding: 8rem var(--gutter) 2rem; }
.tv-support__head { display: grid; gap: .9rem; }
.tv-support__head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.05em; line-height: 1.02; word-break: break-word; }
.tv-support__lead { max-width: 40rem; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.tv-support__hours { display: flex; align-items: flex-start; gap: 1rem; margin-top: 2rem; padding: 1.1rem 1.3rem; border: 1px solid color-mix(in srgb, var(--brand) 32%, transparent); border-radius: 18px; background: color-mix(in srgb, var(--brand) 9%, transparent); }
.tv-support__hours-icon { display: grid; flex: 0 0 auto; width: 2.4rem; height: 2.4rem; place-items: center; border-radius: 12px; background: var(--brand); color: #04110f; }
.tv-support__hours-icon svg { width: 1.1rem; height: 1.1rem; }
.tv-support__hours strong { font-size: .92rem; }
.tv-support__hours p { margin-top: .25rem; color: var(--muted-strong); font-size: .88rem; line-height: 1.6; }
.tv-support__flash { margin-top: 1rem; }
.tv-support__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; margin-top: 2rem; }
.tv-support__grid .tv-panel { margin: 0; }
.tv-support .tv-form { margin-top: 1.4rem; }
.tv-textarea { min-height: 8rem; resize: vertical; line-height: 1.6; }
.tv-support__gate { display: grid; justify-items: center; gap: .8rem; margin-top: 2rem; padding: 3.5rem 1.5rem; border: 1px solid var(--line-soft); border-radius: 24px; background: var(--panel); text-align: center; }
.tv-support__gate-icon { display: grid; width: 3.6rem; height: 3.6rem; place-items: center; border-radius: 50%; background: var(--panel-raised); color: var(--brand); }
.tv-support__gate-icon svg { width: 1.4rem; height: 1.4rem; }
.tv-support__gate h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.tv-support__gate p { max-width: 30rem; color: var(--muted); font-size: .95rem; line-height: 1.65; }
.tv-support__gate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: .8rem; }

.tv-tickets { display: grid; gap: .6rem; margin-top: 1.2rem; }
.tv-tickets__item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--panel-raised); transition: transform .3s var(--ease), border-color .2s ease; }
.tv-tickets__item:hover { border-color: var(--line); transform: translateY(-2px); }
.tv-tickets__main { display: grid; min-width: 0; gap: .2rem; }
.tv-tickets__main strong { overflow: hidden; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
.tv-tickets__main small { color: var(--muted); font-size: .74rem; }

.tv-status { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .02em; }
.tv-status::before { width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; content: ''; }
.tv-status--open { background: rgba(245,158,11,.16); color: #f59e0b; }
.tv-status--answered { background: rgba(20,184,166,.16); color: var(--brand); }
.tv-status--resolved { background: rgba(59,130,246,.16); color: #60a5fa; }
.tv-status--closed { background: var(--panel-raised); color: var(--muted); }

.tv-ticket { margin-top: 2rem; }
.tv-ticket__back { display: inline-flex; align-items: center; gap: .5rem; color: var(--muted-strong); font-size: .85rem; font-weight: 600; }
.tv-ticket__back:hover { color: var(--ink); }
.tv-ticket__back svg { width: .95rem; height: .95rem; }
.tv-ticket__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.1rem; margin-top: 1.2rem; color: var(--muted); font-size: .8rem; }
.tv-ticket__due { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem; color: var(--muted-strong); font-size: .85rem; }
.tv-ticket__due svg { width: .95rem; height: .95rem; color: var(--brand); }
.tv-thread { display: grid; gap: 1rem; margin-top: 2rem; }
.tv-message { display: flex; gap: .9rem; }
.tv-message__avatar { display: grid; flex: 0 0 2.6rem; width: 2.6rem; height: 2.6rem; place-items: center; overflow: hidden; border-radius: 50%; background: var(--panel-raised); font-size: .82rem; font-weight: 700; }
.tv-message__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tv-message__avatar svg { width: 1.1rem; height: 1.1rem; }
.tv-message--staff .tv-message__avatar { background: var(--brand); color: #04110f; }
.tv-message__bubble { min-width: 0; flex: 1; padding: 1.1rem 1.3rem; border: 1px solid var(--line-soft); border-radius: 18px; background: var(--panel); }
.tv-message--staff .tv-message__bubble { border-color: color-mix(in srgb, var(--brand) 34%, transparent); background: color-mix(in srgb, var(--brand) 8%, var(--panel)); }
.tv-message__who { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; }
.tv-message__who strong { font-size: .9rem; }
.tv-message__who small { color: var(--muted); font-size: .74rem; }
.tv-message__body { margin-top: .7rem; color: var(--muted-strong); font-size: .93rem; line-height: 1.75; overflow-wrap: anywhere; }
.tv-ticket__reply { margin-top: 2rem; padding: 1.4rem; border: 1px solid var(--line-soft); border-radius: 20px; background: var(--panel); }
.tv-ticket__reply .tv-input { background: var(--panel-raised); }
.tv-ticket__actions { display: flex; justify-content: flex-end; }
.tv-ticket__close { margin-top: 1rem; }
.tv-ticket__closed { margin-top: 2rem; }
.tv-ticket__closed a { color: var(--brand); }

.ticket-tag--open { background: rgba(245,158,11,.16); color: #f59e0b; }
.ticket-tag--answered { background: rgba(20,184,166,.16); color: var(--brand); }
.ticket-tag--resolved { background: rgba(59,130,246,.16); color: #60a5fa; }
.ticket-tag--closed { background: var(--panel-raised); color: var(--muted); }
.ticket-tag--overdue { background: rgba(239,68,68,.16); color: #f87171; }
.ticket-message { padding: 1.1rem 1.3rem; border: 1px solid var(--line-soft); border-radius: 16px; background: color-mix(in srgb, var(--ink) 3%, transparent); }
.ticket-message--staff { border-color: color-mix(in srgb, var(--brand) 34%, transparent); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.admin-shell .admin-nav-badge { display: inline-grid; min-width: 1.35rem; height: 1.35rem; margin-left: auto; padding: 0 .4rem; place-items: center; border-radius: 999px; background: #f59e0b; color: #1c1100; font-size: .68rem; font-weight: 800; }

@media (max-width: 1023px) {
  .tv-legal__layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .tv-legal__toc { display: none; }
  .tv-support__grid { grid-template-columns: minmax(0, 1fr); }
  .admin-shell .admin-nav-badge { margin-left: .4rem; }
}

@media (max-width: 767px) {
  .tv-legal, .tv-support { padding-top: 6.5rem; }
  .tv-legal__body { padding: 1.4rem; border-radius: 20px; }
  .tv-support__hours { padding: 1rem; }
  .tv-message__avatar { flex-basis: 2.2rem; width: 2.2rem; height: 2.2rem; }
  .tv-ticket__actions .tv-play { width: 100%; }
}

.admin-shell .button-primary,
.admin-shell button.button-primary,
.admin-shell a.button-primary {
  border: 0;
  background: var(--brand);
  color: #04110f;
  cursor: pointer;
  box-shadow: 0 12px 26px -14px var(--brand);
}
.admin-shell .button-primary:hover { filter: brightness(1.08); }
.admin-shell .button-primary:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.admin-shell .button-quiet,
.admin-shell button.button-quiet,
.admin-shell a.button-quiet {
  border: 1px solid var(--line);
  background: var(--panel-raised);
  color: var(--ink);
  cursor: pointer;
  box-shadow: none;
}
.admin-shell .button-quiet:hover { border-color: var(--brand); }


.select-native { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; }
.select-trigger { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.06); color: inherit; padding: 0 14px; text-align: left; font: inherit; cursor: pointer; }
.select-trigger::after { content: '⌄'; color: var(--primary, #14b8a6); font-size: 18px; }
.select-trigger:hover, .select-trigger:focus-visible { border-color: var(--primary, #14b8a6); outline: none; }
.selection-modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 20px; }
.selection-modal__backdrop { position: absolute; inset: 0; background: rgba(2,8,12,.72); backdrop-filter: blur(12px); }
.selection-modal__panel { position: relative; width: min(100%, 460px); max-height: min(650px, calc(100vh - 40px)); overflow: auto; border: 1px solid rgba(255,255,255,.12); border-radius: 24px; background: #10191d; box-shadow: 0 30px 90px rgba(0,0,0,.45); padding: 24px; animation: selection-in .2s ease-out; }
.selection-modal__panel header { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.selection-modal__panel p { margin: 0 0 4px; color: #67e8d7; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.selection-modal__panel h2 { margin: 0; color: #fff; font-size: 24px; }
.selection-modal__panel header button { border: 0; border-radius: 10px; background: rgba(255,255,255,.08); color: #d7e0e3; padding: 9px 12px; cursor: pointer; }
.selection-modal__options { display: grid; gap: 8px; }
.selection-modal__option { width: 100%; border: 1px solid transparent; border-radius: 14px; background: rgba(255,255,255,.04); color: #eaf2f3; padding: 15px 16px; text-align: left; font: inherit; cursor: pointer; }
.selection-modal__option:hover, .selection-modal__option:focus-visible, .selection-modal__option[data-selected="true"] { border-color: rgba(45,212,191,.55); background: rgba(20,184,166,.12); outline: none; }
.upload-modal { position: fixed; z-index: 1100; inset: 0; display: none; place-items: center; padding: 20px; }
.upload-modal.is-visible { display: grid; }
.upload-modal__backdrop { position: absolute; inset: 0; background: rgba(2,8,12,.8); backdrop-filter: blur(14px); }
.upload-modal__card { position: relative; width: min(100%, 520px); overflow: hidden; border: 1px solid rgba(45,212,191,.25); border-radius: 28px; background: linear-gradient(145deg,#132328,#0c1216); box-shadow: 0 32px 100px rgba(0,0,0,.52); padding: 30px; }
.upload-modal__glow { position: absolute; top: -90px; right: -50px; width: 240px; height: 240px; border-radius: 50%; background: rgba(20,184,166,.18); filter: blur(28px); }
.upload-modal__card h2 { position: relative; margin: 0 0 8px; color: #fff; font-size: 28px; }
.upload-modal__card p { position: relative; margin: 0; color: rgba(230,245,245,.65); }
.upload-modal__meter { position: relative; height: 10px; margin: 26px 0 14px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.09); }
.upload-modal__meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#14b8a6,#6ee7d7); transition: width .35s ease; box-shadow: 0 0 22px rgba(45,212,191,.9); }
.upload-modal__meta { position: relative; display: flex; justify-content: space-between; color: #9db1b5; font-size: 13px; }
@keyframes selection-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.admin-menu-toggle { display: none; }
.admin-mobile-drawer { display: none; }
@media (max-width: 1023px) {
  .admin-shell .admin-menu-toggle { display: grid; flex: 0 0 auto; width: 2.55rem; height: 2.55rem; place-items: center; margin-left: auto; border: 1px solid var(--line); border-radius: 13px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); cursor: pointer; transition: transform .25s var(--ease), background .25s ease; }
  .admin-shell .admin-menu-toggle:hover, .admin-shell .admin-menu-toggle:focus-visible { background: var(--brand); color: #04110f; outline: none; transform: translateY(-1px); }
  .admin-mobile-drawer { position: fixed; z-index: 100; inset: 0; display: block; pointer-events: none; }
  .admin-mobile-drawer__scrim { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(2,8,12,.7); opacity: 0; backdrop-filter: blur(5px); transition: opacity .32s ease; }
  .admin-mobile-drawer__panel { position: relative; display: flex; flex-direction: column; width: min(84vw, 340px); height: 100%; padding: 1.15rem; overflow-y: auto; border-right: 1px solid var(--line); background: linear-gradient(165deg, color-mix(in srgb, var(--panel) 96%, #07100f), var(--shell)); box-shadow: 28px 0 70px rgba(0,0,0,.28); transform: translateX(-104%); transition: transform .38s var(--ease); }
  .admin-mobile-drawer.is-open { pointer-events: auto; }
  .admin-mobile-drawer.is-open .admin-mobile-drawer__scrim { opacity: 1; }
  .admin-mobile-drawer.is-open .admin-mobile-drawer__panel { transform: translateX(0); }
  .admin-mobile-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  .admin-mobile-drawer .admin-brand { padding: 0; }
  .admin-mobile-drawer .admin-brand em { display: none; }
  .admin-mobile-drawer__close { display: grid; width: 2.4rem; height: 2.4rem; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); cursor: pointer; }
  .admin-mobile-drawer .admin-nav-label { display: block; margin: 2rem 0 .7rem; padding: 0 .6rem; }
  .admin-mobile-drawer .admin-nav { display: grid; flex: 0 0 auto; overflow: visible; }
  .admin-mobile-drawer .admin-nav-link { display: flex; min-height: 3rem; padding: .45rem .6rem; }
  .admin-mobile-drawer .admin-nav-link.active::before { left: -1.15rem; }
  .admin-mobile-drawer__foot { display: grid; gap: .8rem; margin-top: auto; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); }
  .admin-mobile-drawer .admin-user { display: flex; }
  .admin-mobile-drawer .admin-user__meta { display: grid; }
  body.admin-menu-open { overflow: hidden; }
}

@media (max-width: 1023px) {
  .admin-mobile-theme { display: flex; align-items: center; gap: .75rem; width: 100%; margin-bottom: .15rem; padding: .7rem; border: 1px solid var(--line-soft); border-radius: 16px; background: color-mix(in srgb, var(--ink) 4%, transparent); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .25s ease, background .25s ease, transform .25s var(--ease); }
  .admin-mobile-theme:hover, .admin-mobile-theme:focus-visible { border-color: color-mix(in srgb, var(--brand) 52%, var(--line)); background: color-mix(in srgb, var(--brand) 10%, transparent); outline: none; transform: translateY(-1px); }
  .admin-mobile-theme__icon { display: grid; flex: 0 0 auto; width: 2.15rem; height: 2.15rem; place-items: center; border-radius: 11px; background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }
  .admin-mobile-theme__icon svg { width: 1rem; height: 1rem; }
  .admin-mobile-theme > span:nth-child(2) { display: grid; gap: .12rem; min-width: 0; flex: 1; }
  .admin-mobile-theme strong { font-size: .8rem; font-weight: 700; }
  .admin-mobile-theme small { color: var(--muted); font-size: .66rem; }
  .admin-mobile-theme__switch { display: flex; align-items: center; width: 2.25rem; height: 1.3rem; padding: .16rem; border-radius: 999px; background: var(--brand); transition: background .25s ease; }
  .admin-mobile-theme__switch i { width: .98rem; height: .98rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.24); transition: transform .25s var(--ease); }
  :root.light .admin-mobile-theme__switch i { transform: translateX(.95rem); }
}

.vm-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: 2rem; }
.vm-stat { display: grid; gap: .35rem; padding: 1.1rem 1.25rem; border-radius: 20px; background: var(--panel); }
.vm-stat span { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.vm-stat strong { color: var(--ink); font-size: 1.85rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.vm-toolbar { display: grid; grid-template-columns: 1fr; gap: .7rem; margin-top: 1.4rem; }
.vm-toolbar .field-input { height: 2.8rem; padding-top: 0; padding-bottom: 0; }
.vm-toolbar .button-quiet { min-height: 2.8rem; }
.vm-search { display: flex; align-items: center; gap: .6rem; height: 2.8rem; padding: 0 1rem; border-radius: 12px; background: var(--panel); color: var(--muted); }
.vm-search svg { width: 1rem; height: 1rem; flex: 0 0 auto; }
.vm-search input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: .9rem; outline: none; }
.vm-bulk { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; margin-top: 1rem; padding: .7rem 1rem; border-radius: 16px; background: var(--panel); }
.vm-bulk__count { flex: 1 1 10rem; color: var(--muted-strong); font-size: .82rem; font-weight: 600; }
.vm-bulk__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.vm-bulk .button-quiet { min-height: 2.3rem; padding: 0 1.1rem; background: var(--panel-raised); font-size: .8rem; }
.vm-bulk .button-quiet:disabled { opacity: .4; pointer-events: none; }
.vm-danger { color: #ff8a80; }
.vm-check { position: relative; display: inline-grid; flex: 0 0 auto; width: 1.3rem; height: 1.3rem; cursor: pointer; }
.vm-check input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.vm-check span { display: block; width: 100%; height: 100%; border: 1.5px solid var(--line); border-radius: 7px; background: var(--panel-raised); transition: background .2s ease, border-color .2s ease; }
.vm-check input:checked + span { border-color: var(--brand); background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304110f' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 76% no-repeat; }
.vm-check input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.vm-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; margin-top: 1.4rem; }
.vm-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: var(--panel); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.vm-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.28); }
.vm-card.is-draft .vm-card__art img { filter: grayscale(.7) brightness(.8); }
.vm-card__art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel-raised); }
.vm-card__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vm-card__empty { display: grid; width: 100%; height: 100%; place-items: center; color: var(--muted); }
.vm-card__empty svg { width: 2rem; height: 2rem; }
.vm-card__select { position: absolute; top: .75rem; left: .75rem; }
.vm-card__select span { background: rgba(0,0,0,.55); border-color: rgba(255,255,255,.5); backdrop-filter: blur(6px); }
.vm-badge { position: absolute; top: .75rem; right: .75rem; padding: .32rem .7rem; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .04em; backdrop-filter: blur(6px); }
.vm-badge.is-live { background: var(--brand); color: #04110f; }
.vm-card__time { position: absolute; right: .75rem; bottom: .75rem; padding: .22rem .55rem; border-radius: 8px; background: rgba(0,0,0,.72); color: #fff; font-size: .7rem; font-style: normal; font-weight: 700; }
.vm-card__body { flex: 1; min-width: 0; padding: 1rem 1.15rem .7rem; }
.vm-card__body h3 { overflow: hidden; color: var(--ink); font-size: 1rem; font-weight: 700; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.vm-card__meta { margin-top: .4rem; color: var(--muted-strong); font-size: .78rem; }
.vm-card__date { margin-top: .2rem; color: var(--muted); font-size: .72rem; }
.vm-card__actions { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; padding: .7rem 1.15rem 1.05rem; }
.vm-card__actions form { display: contents; }
.vm-action { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.2rem; padding: 0 .85rem; border: 0; border-radius: 999px; background: var(--panel-raised); color: var(--ink); font-size: .76rem; font-weight: 700; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s var(--ease); }
.vm-action:hover { background: var(--brand); color: #04110f; transform: translateY(-1px); }
.vm-action.vm-danger { margin-left: auto; width: 2.2rem; padding: 0; color: #ff8a80; }
.vm-action.vm-danger:hover { background: #ff453a; color: #fff; }
.vm-action svg { width: .9rem; height: .9rem; }
.vm-empty { display: grid; justify-items: center; gap: .8rem; margin-top: 1.4rem; padding: 4rem 1.5rem; border-radius: 24px; background: var(--panel); text-align: center; }
.vm-empty > span { display: grid; width: 3.6rem; height: 3.6rem; place-items: center; border-radius: 50%; background: var(--panel-raised); color: var(--brand); }
.vm-empty svg { width: 1.5rem; height: 1.5rem; }
.vm-empty h2 { color: var(--ink); font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.vm-empty p { max-width: 26rem; margin-bottom: .6rem; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.vm-modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 1rem; visibility: hidden; pointer-events: none; }
.vm-modal.is-open { visibility: visible; pointer-events: auto; }
.vm-modal__scrim { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(2,8,12,.72); opacity: 0; backdrop-filter: blur(8px); transition: opacity .3s ease; }
.vm-modal.is-open .vm-modal__scrim { opacity: 1; }
.vm-modal__panel { position: relative; width: min(100%, 44rem); max-height: calc(100vh - 2rem); overflow-y: auto; padding: 1.6rem; border: 1px solid var(--line-soft); border-radius: 26px; background: var(--panel); box-shadow: 0 30px 80px rgba(0,0,0,.45); opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .3s ease, transform .3s var(--ease); }
.vm-modal.is-open .vm-modal__panel { opacity: 1; transform: none; }
.vm-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.vm-modal__head h2 { margin-top: .4rem; color: var(--ink); font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.vm-modal__close { display: grid; flex: 0 0 auto; width: 2.4rem; height: 2.4rem; place-items: center; border: 0; border-radius: 50%; background: var(--panel-raised); color: var(--ink); cursor: pointer; transition: background .2s ease, color .2s ease; }
.vm-modal__close:hover { background: var(--brand); color: #04110f; }
.vm-modal__close svg { width: 1rem; height: 1rem; }
.vm-form { display: grid; grid-template-columns: 1fr; gap: 1.1rem; margin-top: 1.4rem; }
.vm-form__foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .6rem; padding-top: .4rem; }
.vm-thumb { display: flex; align-items: center; gap: 1rem; margin-top: .45rem; }
.vm-thumb__preview { display: grid; flex: 0 0 auto; width: 8.5rem; aspect-ratio: 16 / 9; place-items: center; overflow: hidden; border-radius: 12px; background: var(--panel-raised); color: var(--muted); }
.vm-thumb__preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vm-thumb__preview svg { width: 1.4rem; height: 1.4rem; }
.vm-thumb__controls { display: grid; flex: 1; min-width: 0; gap: .6rem; }
.vm-thumb__controls .field-input { margin-top: 0; }
.vm-remove { display: flex; align-items: center; gap: .5rem; color: var(--muted-strong); font-size: .78rem; font-weight: 600; cursor: pointer; }
.vm-remove input { accent-color: var(--brand); }
body.vm-modal-open { overflow: hidden; }

@media (min-width: 640px) {
  .vm-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .vm-toolbar { grid-template-columns: 1fr 1fr; }
  .vm-search { grid-column: 1 / -1; }
  .vm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vm-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .vm-toolbar { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) auto auto; }
  .vm-search { grid-column: auto; }
  .vm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1500px) {
  .vm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  .vm-thumb { flex-direction: column; align-items: stretch; }
  .vm-thumb__preview { width: 100%; }
  .vm-modal__panel { padding: 1.2rem; }
}
