:root {
  color-scheme: dark;
  --content-width: 100%;
  --grid-gap: 2px;
  --poster-ratio: 1000 / 566;
  --player-ratio: 16 / 9;
  --background: #14171d;
  --surface: #202530;
  --accent: #8ee8cc;
  --muted: #abb5c6;
  font-family: system-ui, sans-serif;
  color: #f2f5fa;
  background: var(--background);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover, a[aria-current] { color: var(--accent); }
.shell { width: min(calc(100% - 2rem), var(--content-width)); margin-inline: auto; }
header { background: #191e26; border-bottom: 1px solid #303847; }
.toolbar, header nav, form, .pagination { display: flex; align-items: center; gap: 1rem; }
.toolbar { justify-content: space-between; flex-wrap: wrap; padding-block: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-size: clamp(1.1rem, 5.2vw, 2.05rem); font-weight: 850; letter-spacing: -.055em; }
.brand-wordmark { color: #f2f5fa; white-space: nowrap; }
.brand-wordmark span { color: var(--accent); }
.brand-mark { display: grid; place-items: center; width: 1.35em; height: 1em; border-radius: .26em; background: var(--accent); }
.brand-mark::after { content: ''; width: .43em; height: .48em; margin-left: .04em; background: #14201d; clip-path: polygon(0 0, 100% 50%, 0 100%); }

form { gap: .4rem; max-width: 100%; }
input, button { font: inherit; border-radius: .45rem; padding: .55rem .75rem; }
input { min-width: 0; width: min(53vw, 18rem); border: 1px solid #465064; background: var(--background); }
button { background: var(--accent); color: #17221f; border: 0; cursor: pointer; font-weight: 700; }
header nav { overflow-x: auto; white-space: nowrap; padding-block: .75rem; }
main { padding-block: 1.5rem 3rem; }
h1 { margin: 0 0 1.25rem; font-size: clamp(1.6rem, 4vw, 2.25rem); overflow-wrap: anywhere; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--grid-gap); }
.card { display: block; height: 100%; overflow: hidden; border-radius: .65rem; background: var(--surface); }
.poster { position: relative; aspect-ratio: var(--poster-ratio); background: linear-gradient(135deg, #374766, #19252e 70%); }
article:nth-child(3n+2) .poster { background: linear-gradient(135deg, #55446a, #241d31 70%); }
article:nth-child(3n+3) .poster { background: linear-gradient(135deg, #365954, #162b2a 70%); }
.poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.duration, .unavailable span { background: #111c; padding: .25rem .5rem; border-radius: .25rem; }
.duration { position: absolute; inset: auto .5rem .5rem auto; font-size: .8125rem; }
.card h2 { font-size: 1rem; margin: .7rem .75rem .25rem; overflow-wrap: anywhere; }
.category { color: var(--muted); font-size: .875rem; }
.card .category { display: block; margin: 0 .75rem .85rem; }
.pagination { justify-content: center; margin-top: 1.5rem; }
.pagination a { padding: .5rem .8rem; border-radius: .4rem; background: var(--surface); }
.detail { max-width: 58rem; }
.detail h1 { margin-top: .5rem; }
.detail video { display: block; width: 100%; aspect-ratio: var(--poster-ratio); background: #000; }
.unavailable { display: grid; place-items: center; }
.unavailable img { position: absolute; inset: 0; }
.unavailable span { z-index: 1; }
.shell { width: min(100%, var(--content-width)); }
.toolbar, header nav, main > h1, .detail, .info, .footer { padding-inline: 10px; }
.toolbar input, .toolbar button { height: 48px; }
.grid { grid-template-columns: 1fr; margin-inline: 1px; }
.card { padding: 4px; border: 1px solid #303847; }
.detail { max-width: none; }
.detail video, .detail .poster { aspect-ratio: var(--player-ratio); }
.info { max-width: 75ch; }
.footer { display: flex; flex-wrap: wrap; gap: 1rem; padding-block: 1rem; border-top: 1px solid #303847; }
@media (min-width: 332px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 664px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1016px) { :root { --content-width: 996px; } }
@media (min-width: 1348px) {
  :root { --content-width: 1328px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1680px) {
  :root { --content-width: 1660px; }
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .toolbar input, .toolbar button { height: 58px; }
}
.search-filter { margin: 0 10px 1rem; flex-wrap: wrap; }
.search-filter select { font: inherit; padding: .5rem; }

.archive-section { margin-top: 2rem; }
.archive-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-inline: 10px; }
.archive-heading h1 { margin-block: 0 .75rem; }
.archive-heading a { color: var(--accent); text-decoration: underline; }
.archive-note { margin: .75rem 10px 1rem; color: var(--muted); }
.category-placeholder { display: grid; place-items: center; }
.category-placeholder span { color: var(--accent); font-weight: 800; font-size: clamp(1.25rem, 4vw, 2.5rem); letter-spacing: .04em; }
.archive-filter input { width: min(14rem, 100%); }
.archive-directory-nav { display: flex; gap: 1rem; margin: 0 10px 1rem; }
.archive-directory-nav a { padding: .5rem .75rem; background: var(--surface); border-radius: .4rem; }
.detail .video-embed { display: block; width: 100%; aspect-ratio: var(--player-ratio); border: 0; background: #000; }
.video-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.video-tags a { padding: .35rem .55rem; border-radius: .4rem; background: var(--surface); }

.primary-navigation { gap: 3px; padding-block: 0; }
.primary-navigation a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: .55rem;
  min-height: 46px;
  padding-inline: clamp(.5rem, 2.2vw, 1.25rem);
  border: 1px solid #303847;
  border-bottom: 0;
  border-radius: .4rem .4rem 0 0;
  background: #202530;
  font-size: .9rem;
  font-weight: 650;
}
.primary-navigation a:hover { background: #252e3a; }
.primary-navigation a[aria-current] { background: #253833; border-color: #476b61; }
.primary-navigation a[aria-current]::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--accent);
}
.nav-icon { width: .85rem; height: .85rem; flex: 0 0 .85rem; background: currentColor; }
.nav-home { clip-path: polygon(0 45%, 50% 0, 100% 45%, 88% 45%, 88% 100%, 60% 100%, 60% 68%, 40% 68%, 40% 100%, 12% 100%, 12% 45%); }
.nav-video { clip-path: polygon(20% 0, 100% 50%, 20% 100%); }
.nav-grid { clip-path: polygon(0 0, 42% 0, 42% 42%, 0 42%, 0 0, 58% 0, 100% 0, 100% 42%, 58% 42%, 58% 0, 58% 58%, 100% 58%, 100% 100%, 58% 100%, 58% 58%, 0 58%, 42% 58%, 42% 100%, 0 100%, 0 58%); }
.nav-tag { clip-path: polygon(0 0, 48% 0, 100% 52%, 52% 100%, 0 48%); }

.nav-best { clip-path: polygon(50% 0, 64% 33%, 100% 37%, 73% 61%, 82% 100%, 50% 79%, 18% 100%, 27% 61%, 0 37%, 36% 33%); }
.nav-history { background: transparent; border: 2px solid currentColor; border-radius: 50%; position: relative; }
.nav-history::after { content: ''; position: absolute; inset: 18% 26% 35% 50%; border-bottom: 1px solid currentColor; border-left: 1px solid currentColor; }
.numbered-pagination, .alphabet { display: flex; flex-wrap: wrap; gap: 4px; }
.numbered-pagination { justify-content: flex-start; padding-inline: 10px; }
.numbered-pagination a, .numbered-pagination span, .alphabet a {
  display: inline-grid; place-items: center; min-width: 36px; min-height: 38px; padding: .25rem .5rem;
  border-radius: .3rem; border: 1px solid #303847; background: var(--surface); font-variant-numeric: tabular-nums;
}
.numbered-pagination .pagination-current, .alphabet [aria-current] { background: var(--accent); color: #17221f; font-weight: 750; }
.numbered-pagination .pagination-gap { background: transparent; border-color: transparent; }
.alphabet { margin: 0 10px 1rem; }
.notice-page { line-height: 1.65; }
.notice-page a { color: var(--accent); text-decoration: underline; }
.report-form { display: grid; gap: .8rem; max-width: 34rem; padding-block: .5rem; }
.report-form label { display: grid; gap: .25rem; }
.report-form input, .report-form select, .report-form textarea {
  width: 100%; color: inherit; background: var(--surface); border: 1px solid #465064; padding: .55rem; font: inherit;
}
.report-form button { justify-self: start; }
@media (min-width: 1016px) { .numbered-pagination a, .numbered-pagination span { min-width: 40px; } }
@media (min-width: 1680px) { .numbered-pagination a, .numbered-pagination span { min-width: 45px; } }

.footer { display: grid; gap: .75rem; }
.footer p { margin: 0; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem .7rem; }
.footer-links a {
  background: var(--surface); border: 1px solid #303847; border-radius: .35rem;
  padding: .45rem .65rem; line-height: 1.4; font-weight: 600;
}
.footer-links a:hover { border-color: var(--accent); }
.notice-page h2 { margin-top: 1.75rem; font-size: 1.25rem; }
.notice-page li + li { margin-top: .4rem; }