:root {
  color-scheme: dark;
  --bg: #090c14;
  --surface: #111621;
  --surface-2: #181e2b;
  --surface-3: #202838;
  --text: #f4f1e8;
  --muted: #99a1af;
  --line: #293142;
  --accent: #e2a72f;
  --accent-soft: rgb(226 167 47 / .13);
  --max: 1500px;
  font: 16px/1.55 "Noto Sans Thai Looped", sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-height: 100dvh; margin: 0; background: radial-gradient(circle at 82% -15%, rgb(226 167 47 / .07), transparent 34rem), var(--bg); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { max-width: 100%; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.sr-only, .skip-link { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { width: auto; height: auto; left: 1rem; top: 1rem; z-index: 5; clip-path: none; padding: .7rem 1rem; border-radius: .4rem; background: var(--text); color: var(--bg); }

.site-header { position: sticky; top: 0; z-index: 4; padding-top: .75rem; }
.nav-wrap { min-height: 64px; display: flex; align-items: center; gap: 1rem; padding: 0 1rem; border: 1px solid rgb(65 74 91 / .72); border-radius: .85rem; background: rgb(17 22 33 / .88); box-shadow: 0 12px 34px rgb(1 4 11 / .28); backdrop-filter: blur(18px); }
.brand { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .62rem; font-size: 1rem; font-weight: 850; letter-spacing: -.035em; }
.brand-logo { display: block; width: auto; height: 2rem; max-width: 12rem; object-fit: contain; }
.brand-mark { color: var(--accent); }
.primary-nav { min-width: 0; display: flex; align-items: center; gap: .15rem; overflow: hidden; }
.primary-nav a { flex: 0 0 auto; min-height: 40px; display: grid; place-items: center; padding: .5rem .68rem; border-radius: .45rem; color: var(--muted); font-size: .79rem; font-weight: 680; transition: color .2s, background .2s; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { background: var(--surface-3); color: var(--text); }
.header-search { width: min(15rem, 22vw); min-width: 10rem; display: flex; margin-left: auto; border: 1px solid var(--line); border-radius: .48rem; overflow: hidden; background: var(--surface-2); }
.header-search input { min-width: 0; width: 100%; height: 38px; border: 0; background: transparent; color: var(--text); padding: 0 .75rem; outline: none; }
.header-search button { width: 2.65rem; border: 0; background: var(--accent); color: #171006; font-size: 1.25rem; font-weight: 900; cursor: pointer; }
.header-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mobile-menu { display: none; margin-left: auto; }
.mobile-menu summary { list-style: none; cursor: pointer; color: var(--muted); font-size: .82rem; font-weight: 750; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-panel { position: absolute; inset: calc(100% + .45rem) 1rem auto; padding: .5rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); box-shadow: 0 18px 38px rgb(1 4 11 / .48); }
.mobile-menu nav { display: grid; }
.mobile-menu nav a { padding: .65rem .75rem; border-radius: .4rem; color: var(--muted); }
.mobile-menu nav a:hover { background: var(--surface-2); color: var(--text); }
.mobile-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; margin-bottom: .35rem; }
.mobile-search input { min-width: 0; border: 1px solid var(--line); border-radius: .4rem; background: var(--surface-2); color: var(--text); padding: .55rem .65rem; outline: none; }
.mobile-search button { border: 0; border-radius: .4rem; background: var(--accent); color: #171006; padding: .55rem .7rem; font-weight: 800; }

main { padding: 3rem 0 6rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem; margin-bottom: 2rem; }
.eyebrow { margin: 0 0 .45rem; color: var(--accent); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { max-width: 17ch; margin: 0; font-size: clamp(2.2rem, 5vw, 4.65rem); line-height: 1.18; letter-spacing: -.03em; text-wrap: balance; }
.lede { max-width: 64ch; margin: .9rem 0 0; color: var(--muted); text-wrap: pretty; }
.library-count { min-width: 8.5rem; display: grid; justify-items: end; padding-bottom: .2rem; color: var(--muted); font-size: .72rem; }
.library-count strong { color: var(--text); font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.05em; }

.taxonomy-strip { display: flex; gap: .45rem; margin: 0 0 2.25rem; overflow-x: auto; scrollbar-width: none; }
.taxonomy-strip::-webkit-scrollbar { display: none; }
.taxonomy-strip a { flex: 0 0 auto; padding: .43rem .68rem; border: 1px solid var(--line); border-radius: .45rem; color: var(--muted); background: rgb(17 22 33 / .55); font-size: .76rem; transition: border-color .2s, color .2s, transform .2s; }
.taxonomy-strip a:hover, .taxonomy-strip a[aria-current="page"] { border-color: rgb(226 167 47 / .7); color: var(--text); transform: translateY(-1px); }
.taxonomy-strip span { color: var(--muted); font-variant-numeric: tabular-nums; }

.sponsor-strip { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: .8rem; margin-bottom: 2.25rem; }
.sponsor-slot { display: block; width: min(100%, var(--slot-w)); }
.sponsor-slot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); transition: transform .22s ease, box-shadow .22s ease; }
.sponsor-slot:hover img { transform: translateY(-2px); box-shadow: 0 14px 30px rgb(1 4 11 / .35); }
.sponsor-slot.s-300x250 { --slot-w: 300px; }
.sponsor-slot.s-410x113 { --slot-w: 410px; }
.sponsor-slot.s-800x600 { --slot-w: 800px; }

.section-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-title h2 { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.85rem); line-height: 1.1; letter-spacing: -.035em; }
.section-title > span { color: var(--muted); font-size: .7rem; }
.featured { margin-bottom: 3.2rem; }
.featured-track { display: flex; gap: .75rem; overflow-x: auto; padding: 0 0 .55rem; scroll-snap-type: x mandatory; scrollbar-color: var(--line) transparent; }
.featured-card { flex: 0 0 min(24rem, 74vw); scroll-snap-align: start; }
.featured-card.lead { flex-basis: min(34rem, 86vw); }
.featured-card a { position: relative; aspect-ratio: 16 / 9; display: block; overflow: hidden; border-radius: .7rem; background: var(--surface); }
.featured-card img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease; }
.featured-card:hover img { transform: scale(1.035); }
.featured-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgb(3 5 10 / .9)); }
.featured-card div { position: absolute; inset: auto 1rem .9rem; }
.featured-card h3 { max-width: 50ch; margin: 0; font-size: clamp(.95rem, 1.7vw, 1.25rem); line-height: 1.32; text-wrap: pretty; }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 17.5rem; align-items: start; gap: 2.2rem; }
.content-layout:not(:has(.discovery)) { grid-template-columns: 1fr; }
.content-layout:not(:has(.discovery)) .catalog { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.catalog-section { min-width: 0; }
.catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem .9rem; }
.video-card { min-width: 0; }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; margin: 0 0 .68rem; overflow: hidden; border-radius: .55rem; background: var(--surface); transition: transform .22s ease, box-shadow .22s ease; }
.thumb img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .3s ease; }
.video-card:hover .thumb { transform: translateY(-3px); box-shadow: 0 14px 30px rgb(1 4 11 / .35); }
.video-card:hover .thumb img { transform: scale(1.025); }
.play { position: absolute; left: .7rem; bottom: .7rem; width: 2.1rem; height: 2.1rem; border: 1px solid rgb(255 255 255 / .13); border-radius: 50%; background: rgb(6 8 13 / .78); backdrop-filter: blur(8px); }
.play::after { content: ""; position: absolute; left: .87rem; top: .61rem; border-left: .62rem solid #fff; border-top: .42rem solid transparent; border-bottom: .42rem solid transparent; }
.video-card h3 { margin: 0; font-size: .92rem; line-height: 1.42; font-weight: 650; letter-spacing: -.012em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-wrap: pretty; }
.empty { padding: 5rem 1.25rem; border-top: 1px solid var(--line); text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: .35rem; color: var(--text); }

.discovery { position: sticky; top: 5.7rem; display: grid; gap: 1rem; }
.discovery section { padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; background: rgb(17 22 33 / .66); }
.aside-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; font-size: .8rem; font-weight: 800; }
.aside-title small { color: var(--muted); font-variant-numeric: tabular-nums; }
.category-list { display: grid; }
.category-list a { display: flex; justify-content: space-between; gap: .8rem; padding: .52rem 0; border-top: 1px solid rgb(41 49 66 / .72); color: var(--muted); font-size: .76rem; transition: color .2s; }
.category-list a:hover { color: var(--accent); }
.category-list small { font-variant-numeric: tabular-nums; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: .36rem; }
.tag-cloud a { padding: .28rem .42rem; border: 1px solid var(--line); border-radius: .35rem; color: var(--muted); font-size: .67rem; transition: border-color .2s, color .2s; }
.tag-cloud a:hover { border-color: var(--accent); color: var(--accent); }
.tag-cloud small { font-variant-numeric: tabular-nums; }
.tag-index { gap: .5rem; }
.tag-index a { padding: .45rem .7rem; font-size: .82rem; }
.aside-more { color: var(--accent); font-size: .72rem; font-weight: 700; text-decoration: none; }
.aside-more:hover { text-decoration: underline; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2.5rem; color: var(--muted); font-size: .76rem; }
.pagination a { padding: .55rem .75rem; border: 1px solid var(--line); border-radius: .4rem; color: var(--text); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.seo-copy { max-width: 64rem; margin: 5rem auto 0; padding: 2rem 0 0; border-top: 1px solid var(--line); text-align: center; }
.seo-copy h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.3rem); letter-spacing: -.04em; }
.seo-copy p:last-child { max-width: 65ch; margin: .8rem auto 0; color: var(--muted); text-wrap: pretty; }

.section-head { margin-bottom: 1.6rem; }
.section-head h1 { max-width: 20ch; font-size: clamp(2rem, 5vw, 4rem); }
.section-head p { max-width: 65ch; margin: .75rem 0 0; color: var(--muted); }
.breadcrumbs { display: flex; gap: .5rem; margin-bottom: 1rem; color: var(--muted); font-size: .76rem; }
.breadcrumbs a:hover { color: var(--accent); }
.player-shell { aspect-ratio: 16 / 9; overflow: hidden; border-radius: .7rem; background: #030405; box-shadow: 0 22px 55px rgb(1 3 8 / .42); }
.player-shell video, .player-shell .art-video-player { width: 100%; height: 100%; display: block; }
.watch-copy { max-width: 960px; margin-top: 2rem; }
.watch-copy h1 { max-width: none; font-size: clamp(1.8rem, 4.2vw, 3.25rem); line-height: 1.08; }
.watch-meta { margin: 1rem 0 0; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.watch-description { max-width: 75ch; margin: 1.2rem 0 0; color: var(--muted); white-space: pre-wrap; }
.term-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.term-links a { padding: .3rem .5rem; border: 1px solid var(--line); border-radius: .35rem; color: var(--muted); font-size: .76rem; }
.term-links a:hover { border-color: var(--accent); color: var(--accent); }
.related { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.related h2 { margin: 0 0 1.4rem; font-size: 1.35rem; }

.site-footer { padding: 2.5rem 0 2.8rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.2rem 3rem; align-items: start; }
.footer-grid > div p { max-width: 52ch; margin: .8rem 0 0; }
.footer-grid nav { display: flex; flex-wrap: wrap; justify-content: end; gap: .8rem 1rem; }
.footer-grid nav a:hover { color: var(--accent); }
.adult-note { grid-column: 1 / -1; margin: .6rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.partner-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: .45rem .55rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.partner-links .eyebrow { margin: 0; margin-right: .45rem; }
.partner-links a { font-size: .75rem; }
.partner-links a:hover { color: var(--accent); }
.partner-sep { color: var(--muted); opacity: .55; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button:active, a:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

@media (max-width: 1080px) {
  .content-layout { grid-template-columns: 1fr; }
  .discovery { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .primary-nav, .header-search { display: none; }
  .mobile-menu { display: block; }
  .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-layout:not(:has(.discovery)) .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .container { width: min(calc(100% - 24px), var(--max)); }
  .site-header { padding-top: .45rem; }
  .nav-wrap { min-height: 58px; border-radius: .7rem; }
  .brand-logo { height: 1.75rem; max-width: 10rem; }
  main { padding-top: 2.3rem; }
  .hero { grid-template-columns: 1fr; gap: 1.1rem; }
  .library-count { justify-items: start; }
  .featured { margin-bottom: 2.5rem; }
  .featured-card, .featured-card.lead { flex-basis: 84vw; }
  .catalog { gap: 1.4rem .65rem; }
  .video-card h3 { font-size: .83rem; }
  .discovery { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid nav { justify-content: start; }
}
