:root {
  --bg: #0e1116; --panel: #151a22; --panel2: #1b222c; --line: #262e3a;
  --text: #e4e8ee; --muted: #8b97a8; --accent: #5aa9ff; --th-h: 36px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 12px; font-weight: normal; margin: 6px 0 0; }
button, input, select { font: inherit; color: inherit; }
button { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .4; cursor: default; }
button.link { background: none; border: 0; color: var(--accent); padding: 0; }
input[type=search], input[type=number], select { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; width: 100%; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }

.top { display: flex; align-items: center; gap: 14px; padding: 8px 14px; background: var(--panel); border-bottom: 1px solid var(--line); flex: none; }
.top h1 { font-size: 18px; margin: 0; letter-spacing: .3px; }
.spacer { flex: 1; }
#banner { background: #3a2f0b; color: #ffd873; padding: 6px 14px; font-size: 13px; flex: none; }
.colwrap { position: relative; }
#colmenu { position: absolute; right: 0; top: 110%; z-index: 20; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: grid; gap: 4px; min-width: 160px; box-shadow: 0 8px 24px #0008; }

.layout { flex: 1; display: flex; min-height: 0; }
nav { width: 285px; flex: none; overflow-y: auto; padding: 12px 14px 24px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
nav .row { display: flex; justify-content: space-between; align-items: center; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0; padding: 8px 10px 10px; display: grid; gap: 4px; }
legend { padding: 0 6px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
nav label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
nav label.field { display: grid; gap: 4px; color: var(--muted); font-size: 12px; cursor: default; }
nav label .n { margin-left: auto; color: var(--muted); font-size: 12px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.scroll { max-height: 190px; overflow-y: auto; display: grid; gap: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.chips label:has(input:checked) { background: var(--accent); color: #07101c; border-color: var(--accent); }
.chips input { display: none; }

main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tablewrap { flex: 1; overflow: auto; }
table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 1000px; }
th, td { padding: 7px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { position: sticky; background: var(--panel); z-index: 2; white-space: nowrap; }
thead tr:first-child th { top: 0; height: var(--th-h); cursor: pointer; user-select: none; }
thead tr:first-child th:hover { color: var(--accent); }
thead tr:last-child th { top: var(--th-h); padding: 4px 6px; border-bottom: 2px solid var(--line); cursor: default; }
thead input { padding: 3px 6px; font-weight: normal; min-width: 70px; }
th[aria-sort=ascending]::after { content: " ▲"; font-size: 10px; color: var(--accent); }
th[aria-sort=descending]::after { content: " ▼"; font-size: 10px; color: var(--accent); }
tbody tr:hover { background: var(--panel); }
td.title { font-weight: 600; min-width: 170px; max-width: 260px; color: var(--accent); }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
td.clamp > div { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 140px; max-width: 240px; }
td.desc > div { display: block; min-width: 300px; max-width: 560px; }
#tbl.collapsed td.desc > div { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
tbody tr { cursor: pointer; }
.badge { display: inline-block; white-space: nowrap; padding: 1px 8px; margin: 0 4px 3px 0; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; }
.badge small { font-weight: 400; opacity: .85; }
.badge:hover { text-decoration: none; filter: brightness(1.15); }
.age { border: 1px solid var(--muted); border-radius: 4px; padding: 0 5px; font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 40px; }

.pager { flex: none; display: flex; gap: 12px; align-items: center; justify-content: center; padding: 8px; background: var(--panel); border-top: 1px solid var(--line); }
.pager select { width: auto; }


/* tabs */
.tabs { display: flex; gap: 4px; }
.tabs a { color: var(--muted); padding: 5px 14px; border-radius: 6px; border: 1px solid transparent; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.on { color: var(--text); background: var(--panel2); border-color: var(--line); }

/* table view */
#view-table { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.toolbar { display: flex; gap: 16px; align-items: center; padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
#backbar { display: flex; gap: 12px; align-items: center; padding: 8px 12px; background: #11243d; border-bottom: 1px solid #1e3a60; }
#backbar button { border-color: var(--accent); }

/* pickers */
.picker input { margin-top: 2px; }
.sel { display: flex; flex-wrap: wrap; gap: 4px; }
.sel:empty { display: none; }
.chip { background: var(--accent); color: #07101c; border: 0; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.pick { display: flex; width: 100%; justify-content: space-between; gap: 8px; text-align: left; background: none; border: 0; border-radius: 4px; padding: 3px 6px; }
.pick:hover { background: var(--panel2); }
.pick .n { color: var(--muted); font-size: 12px; }

/* statistics */
#view-stats { flex: 1; overflow: auto; padding: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; }
.stat b { font-size: 22px; }
.stat span { color: var(--muted); }
.stat small { color: var(--muted); font-size: 12px; }
.grid { grid-auto-flow: dense; display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 14px; min-width: 0; }
.card.span2 { grid-column: span 2; }
.card h3 { margin: 0 0 10px; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.card h3 small { color: var(--muted); font-weight: normal; margin-left: auto; }
.card h3 select { width: auto; padding: 2px 6px; font-size: 12px; }
.donutwrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.donut { flex: none; }
.donut .dtotal { fill: var(--text); font-size: 5.2px; font-weight: 600; }
.seg.act { cursor: pointer; }
.seg.act:hover { stroke-width: 7.5; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; flex-basis: 160px; display: grid; gap: 2px; }
.legend li { display: flex; gap: 8px; align-items: center; padding: 2px 6px; border-radius: 4px; }
.legend li.act { cursor: pointer; }
.legend li.act:hover, .bars li.act:hover, .col.act:hover { background: var(--panel2); }
.legend i, .key i { width: 10px; height: 10px; border-radius: 2px; flex: none; display: inline-block; }
.legend .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend .val, .bars .val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.legend small { color: var(--muted); }
.minis { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-around; }
.mini { text-align: center; display: grid; justify-items: center; gap: 4px; }
.mini h4 { margin: 0; }
.mini small { color: var(--muted); }
.key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.key span { display: inline-flex; gap: 5px; align-items: center; }
.cols { display: flex; gap: 2px; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; border-radius: 3px; }
.col.act { cursor: pointer; }
.col .area { flex: 1; display: flex; align-items: flex-end; }
.col .stack { width: 100%; display: flex; flex-direction: column; min-height: 0; }
.col .stack span { display: block; min-height: 1px; }
.col em { height: 16px; font-size: 10px; font-style: normal; color: var(--muted); white-space: nowrap; overflow: visible; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.bars li { display: grid; grid-template-columns: minmax(80px, 38%) 1fr auto; gap: 8px; align-items: center; padding: 2px 4px; border-radius: 4px; }
.bars li.act { cursor: pointer; }
.bars .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .track { background: var(--bg); border-radius: 3px; height: 10px; overflow: hidden; }
.bars .fill { display: block; height: 100%; border-radius: 3px; }
.ranked { margin: 0; padding: 0; list-style: none; counter-reset: rk; display: grid; }
.ranked li { counter-increment: rk; display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 4px 6px; border-radius: 4px; cursor: pointer; }

.ranked li:hover { background: var(--panel2); }
.ranked .ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranked small { color: var(--muted); }
.ranked .dots { display: inline-flex; gap: 3px; }
.ranked .dots i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ranked .sub { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* flyout */
#scrim { position: fixed; inset: 0; background: #0009; z-index: 40; }
#flyout { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 50; background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; transform: translateX(104%); transition: transform .22s ease; box-shadow: -12px 0 40px #0008; }
#flyout.open { transform: none; }
#flyout .close { position: absolute; top: 10px; right: 10px; z-index: 2; border-radius: 50%; width: 32px; height: 32px; padding: 0; background: #000a; }
.poster { background: var(--bg); height: 340px; display: flex; justify-content: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.poster.none { display: none; }
.poster img { height: 100%; opacity: 0; transform: translateY(-40px); transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s; }
.poster img.in { opacity: 1; transform: none; }
.fbody { padding: 16px 18px 28px; }
.fbody h2 { margin: 0 0 6px; font-size: 22px; }
.fbody h3 { margin: 18px 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.meta { margin: 0 0 10px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.star { color: #f6d365; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; font-size: 12px; }
.plot { line-height: 1.55; margin: 0; }
.watch { display: grid; gap: 8px; }
.btn { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; color: #fff; font-weight: 600; }
.btn:hover { text-decoration: none; filter: brightness(1.15); }
.btn small { font-weight: 400; opacity: .9; }
.fbody dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; margin: 16px 0 12px; }
.fbody dt { color: var(--muted); }
.fbody dd { margin: 0; }

.langs { display: grid; gap: 8px; }
.lp { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 3px; font-size: 13px; }
.lp > div span { display: inline-block; width: 78px; color: var(--muted); }
.lp em { color: var(--muted); }

/* sheet chrome (filters header/footer, flyout close) */
.sheet-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; margin: -12px -14px 0; padding: 12px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.sheet-head strong { flex: 1; }
.sheet-head .grab, .sheet-head .x, .sheet-foot, .fly-foot, #filterbar, #navscrim { display: none; }
.fly-bar { position: sticky; top: 0; height: 0; z-index: 3; overflow: visible; }
.fly-bar .close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; padding: 0; background: #000b; font-size: 16px; }
button.primary { background: var(--accent); color: #07101c; border-color: var(--accent); font-weight: 600; padding: 12px 16px; border-radius: 10px; width: 100%; }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #07101c; font-size: 12px; font-weight: 700; text-align: center; margin-left: 4px; }

@media (max-width: 800px) {
  body { padding-bottom: 60px; }
  #summary, #updated { display: none; }
  .top { gap: 8px; padding: 8px 10px; }
  .top h1 { font-size: 16px; }
  .tabs a { padding: 6px 10px; white-space: nowrap; }
  .card.span2 { grid-column: auto; }
  .grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  #view-stats { padding: 12px; }

  /* bottom bar with the filters button, in thumb reach */
  #filterbar { display: flex; position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; align-items: center; gap: 12px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
  #openfilters { flex: 1; padding: 12px; font-weight: 600; border-radius: 10px; background: var(--accent); color: #07101c; border-color: var(--accent); font-size: 15px; }
  #openfilters .count { background: #07101c; color: var(--accent); }
  body.nav-open #filterbar, body.fly-open #filterbar { display: none; }

  /* filters as a bottom sheet */
  nav#filters { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 88vh; max-height: 88dvh; border: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; transform: translateY(105%); transition: transform .22s ease; box-shadow: 0 -10px 40px #000a; padding-bottom: 0; }
  body.nav-open nav#filters { transform: none; }
  body.nav-open #navscrim { display: block; position: fixed; inset: 0; z-index: 30; background: #0009; }
  .sheet-head { padding-top: 22px; }
  .sheet-head .grab { display: block; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line); }
  .sheet-head .x { display: block; width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 16px; }
  .sheet-foot { display: block; position: sticky; bottom: 0; margin: 0 -14px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }

  /* flyout as a bottom sheet */
  #flyout { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 92vh; max-height: 92dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; transform: translateY(105%); box-shadow: 0 -10px 40px #000a; }
  .poster { height: 260px; }
  .fly-foot { display: block; position: sticky; bottom: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
}

/* ---------- home / landing ---------- */
.top h1 a { color: inherit; }
.top h1 a:hover { text-decoration: none; }
body[data-route=home] nav#filters, body[data-route=home] #filterbar, body[data-route=home] #summary, body[data-route=home] #navscrim { display: none !important; }
#view-home { flex: 1; overflow: auto; scroll-behavior: smooth; }
.hero { position: relative; padding: 56px 20px 30px; text-align: center; border-bottom: 1px solid var(--line);
  background: radial-gradient(900px 380px at 15% -20%, #2c4a9a66, transparent 65%), radial-gradient(800px 380px at 95% -10%, #7a3a9a55, transparent 62%), linear-gradient(180deg, #131a28, var(--panel)); }
.hero h2 { margin: 0 0 10px; font-size: clamp(28px, 5.4vw, 46px); letter-spacing: -.8px; line-height: 1.1; }
.hero p { margin: 0 auto 22px; max-width: 640px; color: #aab5c6; font-size: clamp(14px, 2.2vw, 17px); line-height: 1.55; }
.hero p b { color: var(--text); }
#homesearch { display: flex; gap: 8px; max-width: 560px; margin: 0 auto 16px; }
#homesearch input { flex: 1; padding: 12px 18px; border-radius: 999px; font-size: 15px; background: #0b0f16; border-color: #2a3547; }
#homesearch .primary { width: auto; padding: 12px 22px; border-radius: 999px; }
.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.cta-a { padding: 9px 18px; border: 1px solid #2f3b50; border-radius: 999px; color: var(--text); background: #ffffff0a; font-weight: 500; }
.cta-a:hover { text-decoration: none; border-color: var(--accent); background: #5aa9ff1a; }
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pills li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: #0b0f1699; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pills li i { width: 9px; height: 9px; border-radius: 50%; }
.pills li b { color: var(--text); font-variant-numeric: tabular-nums; }

.jump { position: sticky; top: 0; z-index: 7; height: 52px; box-sizing: border-box; display: flex; gap: 8px; align-items: center; padding: 0 16px; overflow-x: auto; scrollbar-width: none; background: #0e1116f2; backdrop-filter: blur(8px); }
/* platform + film/series choices stay pinned to the bottom edge, in thumb reach */
.hbar { position: sticky; bottom: 0; z-index: 6; background: #121821f5; backdrop-filter: blur(10px); border-top: 1px solid #2a3547; box-shadow: 0 -10px 28px #000a; padding-bottom: env(safe-area-inset-bottom); }
.jump::-webkit-scrollbar { display: none; }
.jump button { flex: none; border-radius: 999px; padding: 6px 14px; background: var(--panel); }
.hwrap { max-width: 1480px; margin: 0 auto; padding: 0 16px 48px; }
.hctl { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; padding: 8px 16px 10px; max-width: 1480px; margin: 0 auto; }
.expcol { display: flex; gap: 8px; margin-left: auto; }
.ptoggles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pchip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 12px; background: transparent; color: var(--muted); white-space: nowrap; transition: background .12s, opacity .12s; }
.pchip[aria-pressed=true] { background: var(--c); border-color: var(--c); color: #fff; font-weight: 600; }

.hgroup { padding-top: 26px; scroll-margin-top: 64px; }
.hwrap { padding-top: 4px; }
.ghead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ghead h3 { margin: 0; font-size: 20px; letter-spacing: -.2px; }
.ghead p { margin: 0; color: var(--muted); font-size: 13px; }
.hgroup[style] .ghead h3::before { content: ""; display: inline-block; width: 4px; height: 18px; border-radius: 2px; background: var(--g); margin-right: 10px; vertical-align: -3px; }

.rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 14px; scrollbar-width: thin; }
.pc { flex: none; width: 138px; scroll-snap-align: start; text-align: left; background: none; border: 0; padding: 0; display: grid; gap: 3px; align-content: start; }
.pc img { width: 138px; height: 207px; object-fit: cover; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); transition: transform .18s, box-shadow .18s; }
.pc:hover img { transform: translateY(-4px); box-shadow: 0 10px 24px #000a; }
.pc b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc small { color: var(--muted); }

.lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; align-items: start; }
details.hl { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--g, var(--accent)); border-radius: 12px; overflow: hidden; transition: border-color .15s; }
details.hl:hover { border-color: #38465c; border-left-color: var(--g, var(--accent)); }
details.hl[open] { background: #131922; }
details.hl summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; user-select: none; }
details.hl summary::-webkit-details-marker { display: none; }
.ht { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ht b { font-size: 15px; }
.ht small { color: var(--muted); font-size: 12px; }
.chev { width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .18s; margin-right: 4px; flex: none; }
details.hl[open] .chev { transform: rotate(-135deg); }
.lbody .ptoggles { padding: 4px 16px 12px; }
.hrows { list-style: none; margin: 0; padding: 0; }
.hrow { display: grid; grid-template-columns: 22px 44px 1fr auto; gap: 12px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.hrow:hover { background: var(--panel2); }
.rk { color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; font-weight: 600; }
.hrow:nth-child(-n+3) .rk { color: #f6d365; }
.th img { width: 44px; height: 66px; object-fit: cover; border-radius: 5px; background: var(--bg); display: block; }
.th { width: 44px; height: 66px; border-radius: 5px; background: var(--bg); }
.hmain { min-width: 0; display: grid; gap: 2px; }
.hmain b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hmain small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pls { display: flex; flex-wrap: wrap; gap: 4px; }
.badge.sm { font-size: 10px; padding: 0 7px; margin: 0; font-style: normal; }
.hmet { text-align: right; display: grid; gap: 1px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hmet b { color: #f6d365; font-size: 13px; }
.hmet small { color: var(--muted); font-size: 11px; }
.lfoot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; }
.pad { padding: 12px 16px; }

@media (max-width: 800px) {
  .hero { padding: 34px 16px 22px; }
  #homesearch { flex-direction: column; }
  #homesearch .primary { width: 100%; }
  .hwrap { padding: 0 12px 40px; }
  .lists { grid-template-columns: 1fr; }
  .hrow { grid-template-columns: 18px 40px 1fr auto; gap: 10px; padding: 9px 12px; }
  .th, .th img { width: 40px; height: 60px; }
  .pc, .pc img { width: 118px; }
  .pc img { height: 177px; }
  .top { gap: 6px; }
  .tabs a { padding: 6px 8px; }
}
@media (max-width: 480px) {
  .top h1 { display: none; }
}

/* home: search suggestions, film/series toggle, list tools */
#homesearch .sbox { position: relative; flex: 1; text-align: left; }
#homesearch .sbox input { width: 100%; }
#suggest { position: absolute; z-index: 12; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; max-height: min(60vh, 460px); overflow-y: auto;
  background: var(--panel2); border: 1px solid #34425a; border-radius: 16px; box-shadow: 0 18px 40px #000b; }
#suggest li { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
#suggest li:hover, #suggest li.active { background: #ffffff12; }
#suggest li.none, #suggest li.all { display: block; text-align: center; color: var(--muted); padding: 10px; }
#suggest li.all { color: var(--accent); }
#suggest .th, #suggest .th img { width: 36px; height: 54px; }
#suggest .sm { min-width: 0; display: grid; gap: 1px; }
#suggest .sm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#suggest .sm small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#suggest .dots { display: inline-flex; gap: 4px; }
#suggest .dots i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.seg2 { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg2 button { border: 0; border-radius: 0; background: transparent; color: var(--muted); padding: 4px 13px; font-size: 12px; }
.seg2 button + button { border-left: 1px solid var(--line); }
.seg2 button[aria-pressed=true] { background: var(--accent); color: #07101c; font-weight: 600; }
.ltools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 4px 16px 12px; }
.ltools .ptoggles { padding: 0; }
.hmain small.g { opacity: .8; }

@media (max-width: 800px) {
  #homesearch .sbox { flex: none; width: 100%; }
  /* phone: the section chips scroll away; the pinned bottom bar keeps platform / film-series in reach */
  .jump { position: static; height: auto; padding: 8px 12px; }
  .jump button { padding: 4px 12px; font-size: 13px; }
  .hctl { padding: 8px 12px; gap: 8px 12px; }
  .hplat { flex: 1 0 100%; }
  .hctl .muted { display: none; }
  .expcol button { padding: 6px 10px; font-size: 12px; }
  .hgroup { scroll-margin-top: 12px; }
  body[data-route=home] { padding-bottom: 0; }
}
@media (max-width: 480px) {
  #gplat { gap: 5px; }
  .hctl .pchip { padding: 4px 9px; font-size: 12px; }
}

.eyebrow { display: inline-block; margin-bottom: 14px; padding: 4px 14px; border: 1px solid #2f3b50; border-radius: 999px; background: #ffffff0a; color: #aab5c6; font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; }

/* loading splash: shown on first paint, instead of the empty table chrome, until the data is ready */
#loader { display: none; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 40px 20px; text-align: center; color: var(--muted);
  background: radial-gradient(700px 320px at 20% 0%, #2c4a9a44, transparent 65%), radial-gradient(600px 300px at 90% 10%, #7a3a9a33, transparent 62%); }
body.loading #loader { display: flex; }
body.loading nav#filters, body.loading #navscrim, body.loading #filterbar, body.loading #view-home, body.loading #view-table, body.loading #view-stats, body.loading #colwrap, body.loading #summary, body.loading #updated { display: none !important; }
#loader p { margin: 0; }
.lname { font-size: clamp(26px, 6vw, 38px); font-weight: 700; letter-spacing: -.5px; color: var(--text); }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.lhint { font-size: 13px; opacity: 0; animation: fadein .6s ease 3.5s forwards; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadein { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
