/*
Theme Name: JORJEEN
Theme URI: https://github.com/bzl-team/JORJEEN
Description: จอจีน — ธีมเขียนเองสำหรับเว็บข้อมูลซีรีส์จีนแนวตั้งและหนังสั้นจีน
Version: 0.1.0
Requires PHP: 8.1
Text Domain: jorjeen
*/

/* ---------- Tokens: every colour lives here and nowhere else ---------- */
:root {
	--navy-950: #070f24;
	--navy-900: #0b1736;
	--navy-800: #12234d;
	--navy-700: #1b3166;
	--navy-600: #2a4585;
	--gold-500: #f5b400;
	--gold-rgb: 245,180,0; /* same as --gold-500, for rgba() tints */
	--gold-400: #ffc933;
	--gold-300: #ffde85;
	/* Metallic gold sampled from the logo (design/brand/wordmark-source.png): dark edge, bright highlight, mid gold. */
	--gold-metal: linear-gradient(135deg, #ce8a29 0%, #f0b344 22%, #fce97d 45%, #fad45c 55%, #f0b344 78%, #ce8a29 100%);
	--ring: 3px; /* hover/tap ring width */
	/* Same logo gold laid out left to right, for full-width lines (header, footer, tab bar). */
	--gold-metal-h: linear-gradient(90deg, #ce8a29 0%, #f0b344 20%, #fce97d 50%, #f0b344 80%, #ce8a29 100%);
	--ink: #eef2fb;
	--ink-body: #d5dcef;
	--ink-dim: #a9b5d1;
	--ink-faint: #8391b3;
	--done: #1f5b3f;
	--done-ink: #d8f5e6;
	--new: #c8423a;
	--demo-bg: #5a3d00;
	--radius: 10px;
	--wrap: 1180px;
	--font: "Sarabun", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--navy-900); color: var(--ink); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main { flex: 1; }

/* ---------- Demo banner ---------- */
.demo-bar { background: var(--demo-bg); color: var(--gold-300); font-size: 13px; text-align: center; padding: 6px 12px; }

/* ---------- Header ---------- */
.topbar { background: var(--navy-950); border-bottom: 2px solid transparent; border-image: var(--gold-metal-h) 1; position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; gap: 28px; padding-top: 10px; padding-bottom: 10px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.logo-emblem { width: 60px; height: 60px; flex: none; }
.logo-word { width: 195px; height: 44px; }
.nav { display: flex; gap: 20px; font-size: 15px; }
.nav a { color: var(--ink-dim); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--gold-300); border-color: var(--gold-500); }
.search { min-width: 0; margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--navy-800); border: 1px solid var(--navy-600); border-radius: 999px; padding: 0 6px 0 16px; width: 300px; }
.search input { flex: 1; min-width: 0; background: none; border: 0; color: var(--ink); font: inherit; font-size: 14px; padding: 9px 0; outline: none; }
.search input::placeholder { color: var(--ink-faint); }
.search button { background: none; border: 0; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; }
.ic-search { width: 15px; height: 15px; border: 2px solid var(--ink-dim); border-radius: 50%; position: relative; }
.ic-search::after { content: ""; position: absolute; width: 6px; height: 2px; background: var(--ink-dim); right: -5px; bottom: -3px; transform: rotate(45deg); }

/* ---------- Page heading ---------- */
/* .wrap.page, not .page: WordPress also puts "page" on <body> of info pages. */
.wrap.page { padding-top: 22px; padding-bottom: 28px; }
h1.page-h1 { font-size: 22px; font-weight: 700; line-height: 1.35; }
h1.page-h1 span { color: var(--gold-400); }
.lede { color: var(--ink-dim); font-size: 14px; margin-top: 4px; }
.crumbs { font-size: 13px; color: var(--ink-faint); margin-bottom: 14px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs b { color: var(--ink-dim); font-weight: 500; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 6px; }
.chip { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: var(--navy-800); border: 2px solid var(--navy-600); color: var(--ink-dim); text-decoration: none; white-space: nowrap; }
.chip:hover, .chip:focus-visible, .chip:active { color: var(--gold-300); outline: none; }
.chip.gold { background: rgba(var(--gold-rgb),.14); color: var(--gold-300); }

/* ---------- Homepage (owner's reference image, 2026-11-02) ---------- */
/* Hero carousel, to the owner's spec (2026-11-02, second version).
   One continuous scene across the full width, about 4:1 on desktop (1920 → ~490px, 1440 → ~380px).
   Only the text is held in from the edge; the picture is never boxed.
   .is-wide   = landscape hero file (wp jorjeen heroes), cover + focus point per title.
   .is-poster = fallback while a title has no landscape file: the whole portrait poster as a card,
                uncropped and never stretched, over the same file blurred.
   Slides stack in one grid cell, so the band is as tall as its tallest slide. */
/* Balanced on the site's content frame (owner, 2026-11-02): text starts on the logo line, the dots end
   on the search box line, the poster is centred at 70% of the frame, clear of the dots. % = band width. */
.spot { --edge: max(28px, calc((100% - var(--wrap)) / 2 + 28px)); --inner: calc(min(100%, var(--wrap)) - 56px); }
.spot { position: relative; display: grid; overflow: hidden; background: var(--navy-950); border-bottom: 2px solid transparent; border-image: var(--gold-metal-h) 1; }
.spot-slide { grid-area: 1 / 1; position: relative; display: flex; align-items: center; min-height: clamp(400px, 28vw, 560px); opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.spot-slide.on { opacity: 1; visibility: visible; }
.spot-bg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
/* Dark navy over the left for the text, opening up by the middle; a light shade at the bottom
   joins the next section. The scene stays faintly visible behind the text. */
.spot-slide::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(7,15,36,.7) 0%, rgba(7,15,36,0) 24%), linear-gradient(90deg, rgba(7,15,36,.9) 0%, rgba(7,15,36,.78) 24%, rgba(7,15,36,.42) 42%, rgba(7,15,36,0) 60%); }
/* The current title's poster shows faintly across the band (owner, 2026-11-02): light blur, dimmed. */
.is-poster .spot-bg { inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); object-position: center 25%; filter: blur(8px) brightness(.5) saturate(1.05); }
/* Whole poster, exactly as on the cards (owner, 2026-11-02): natural ratio, nothing cropped, centred where
   the figures sit in a wide hero, framed like a card. */
.is-poster .spot-img { position: absolute; z-index: 1; top: 50%; left: calc(var(--edge) + var(--inner) * .7); transform: translate(-50%, -50%); height: calc(100% - 44px); width: auto; max-width: none; border-radius: 12px; box-shadow: 0 18px 44px rgba(0,0,0,.6), 0 0 0 2px rgba(var(--gold-rgb),.55); }
.spot-text { position: relative; z-index: 2; width: min(calc(var(--inner) * .42), 520px); margin-left: var(--edge); padding: 40px 0 56px; display: flex; flex-direction: column; align-items: flex-start; }
.spot-kicker { font-size: 14px; font-weight: 600; color: var(--gold-300); padding: 3px 12px; border: 1px solid rgba(var(--gold-rgb),.6); border-radius: 7px; background: rgba(7,15,36,.45); margin-bottom: 14px; }
.spot-title { font-size: clamp(32px, 2.9vw, 52px); line-height: 1.25; font-weight: 800; color: #fff; text-wrap: balance; margin-bottom: 12px; text-shadow: 0 2px 16px rgba(0,0,0,.5);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spot-blurb { font-size: clamp(15px, 1.1vw, 17px); line-height: 1.6; color: var(--ink-body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.spot-meta { font-size: 13.5px; color: var(--ink-dim); margin-bottom: 22px; }
.btn-gold.spot-btn { min-height: 42px; padding: 0 22px; border-radius: 999px; font-size: 15px; background: var(--gold-metal); }
.spot-btn span { font-size: 18px; line-height: 1; }
/* Three-poster shelf on the right half of the frame (owner, 2026-11-02). Desktop only; it replaces the
   single poster card. The current title stands forward with the gold frame, the others are dimmed.
   Hidden while a slide with a landscape hero is showing, so it never covers that scene. */
.spot-shelf { position: absolute; z-index: 2; top: 50%; left: calc(var(--edge) + var(--inner) * .45); width: calc(var(--inner) * .55); transform: translateY(-54%); display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; transition: opacity .4s, visibility .4s; }
.spot.wide-on .spot-shelf { opacity: 0; visibility: hidden; }
.is-poster .spot-img { display: none; }
.spot-pick { display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; box-shadow: 0 14px 34px rgba(0,0,0,.55); filter: brightness(.55) saturate(.85); transform: scale(.94); transition: filter .3s, transform .3s, box-shadow .3s; }
.spot-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spot-pick:hover, .spot-pick:focus-visible { filter: brightness(.85); outline: none; }
.spot-pick.on { filter: none; transform: scale(1.04); box-shadow: 0 18px 40px rgba(0,0,0,.6), 0 0 0 2px var(--gold-500); }
@media (prefers-reduced-motion: reduce) { .spot-pick { transition: none; } }
/* Slide number and dots: bottom right, clear of the figures' faces. */
.spot-nav { position: absolute; right: var(--edge); bottom: 22px; z-index: 3; display: flex; align-items: center; gap: 16px; pointer-events: none; }
.spot-count { color: var(--ink); font-size: 14px; letter-spacing: .5px; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.spot-dots { display: flex; gap: 2px; pointer-events: auto; }
/* 24px tap target, 9px dot. */
.spot-dot { width: 24px; height: 24px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.spot-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.45); transition: background .2s, transform .2s; }
.spot-dot.on::before { background: var(--gold-500); transform: scale(1.15); }
@media (prefers-reduced-motion: reduce) { .spot-slide { transition: none; } }
@media (max-width: 860px) {
	.spot-slide { min-height: 340px; }
	.spot-text { width: calc(var(--inner) * .43); }
	.spot-shelf { gap: 10px; }
}
/* Phone: picture on top, text below on navy, so text never sits on a face. */
@media (max-width: 600px) {
	.spot-slide { display: block; min-height: 0; }
	.spot-slide::after { background: linear-gradient(180deg, rgba(7,15,36,0) 0%, rgba(7,15,36,0) 32%, rgba(7,15,36,.92) 48%); }
	/* Same picture height in both modes, so slides line up and no gap opens under shorter ones. */
	.is-wide .spot-bg { position: relative; display: block; height: 260px; }
	/* Whole poster as a centred card on the blurred band, same height as the wide picture. */
	.is-poster .spot-img { position: relative; display: block; top: auto; left: auto; transform: none; height: 236px; margin: 12px auto; }
	.spot-text { width: auto; margin: 0; padding: 4px 16px 56px; }
	.spot-kicker { font-size: 13px; margin-bottom: 10px; }
	.spot-title { font-size: 26px; margin-bottom: 8px; }
	.spot-blurb { font-size: 15px; }
	.spot-meta { font-size: 13px; margin-bottom: 16px; }
	.spot-btn { width: 100%; justify-content: center; }
	.spot-nav { left: 0; right: 0; bottom: 14px; justify-content: center; }
	.spot-count { display: none; }
	/* Phone keeps one poster per slide; three side by side would be thumbnail-sized. */
	.spot-shelf { display: none; }
}

/* Mood shortcuts */
.mood { display: flex; align-items: center; gap: 22px; margin: 22px 0 4px; }
.mood-h { font-size: 22px; font-weight: 700; white-space: nowrap; }
.mood-list { display: flex; flex-wrap: wrap; gap: 12px; }
.mood-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 24px; border-radius: 999px; border: 2px solid rgba(var(--gold-rgb),.55); color: var(--ink); text-decoration: none; font-size: 15px; background: rgba(7,15,36,.35); }
.mood-btn svg { color: var(--gold-400); }
.mood-btn:hover, .mood-btn:focus-visible { color: var(--gold-300); outline: none; }

/* Collection banners: four posters on the right, colour wash from the left. */
.promos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 26px 0 6px; }
.promo { display: block; height: 170px; border-radius: 12px; text-decoration: none; color: var(--ink); border: 2px solid rgba(var(--gold-rgb),.22); background: var(--navy-800); }
.promo-art { position: absolute; top: 0; bottom: 0; right: 0; width: 62%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; transform: skewX(-8deg) translateX(18px); }
.promo-art .poster { aspect-ratio: auto; height: 100%; border-radius: 0; transform: skewX(8deg) scale(1.18); }
.promo-art .poster-text { font-size: 0; }
.promo::before { z-index: 3; }
.promo-bg { position: absolute; inset: 0; overflow: hidden; border-radius: 10px; }
.promo-bg::after { content: ""; position: absolute; inset: 0; }
.promo-red .promo-bg::after { background: linear-gradient(90deg, #3a0a12 0%, rgba(58,10,18,.92) 36%, rgba(58,10,18,.2) 80%); }
.promo-blue .promo-bg::after { background: linear-gradient(90deg, #0a2340 0%, rgba(10,35,64,.92) 36%, rgba(10,35,64,.2) 80%); }
.promo-text { position: absolute; z-index: 2; left: 28px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; max-width: 58%; }
.promo-title { font-size: 34px; line-height: 1.15; font-weight: 800; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.promo-sub { font-size: 14px; color: var(--ink-body); }
.promo-go { font-size: 14px; color: var(--gold-300); font-weight: 600; margin-top: 4px; }

/* กำลังมาแรง: poster + title list, most viewed first (no rank numbers: owner, 2026-11-02). */
.rank { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 0; }
.rank li + li { border-left: 1px solid rgba(var(--gold-rgb),.14); }
.rank li:nth-child(3n+1) { border-left: 0; }
.rank-item { display: flex; align-items: center; gap: 18px; padding: 10px 18px; text-decoration: none; color: var(--ink); border-radius: 10px; }
.rank-item:hover .rank-title, .rank-item:focus-visible .rank-title { color: var(--gold-300); }
.rank-item:focus-visible { outline: none; }
.rank-item .poster { width: 112px; flex: none; border-radius: 8px; }
.rank-item .poster-text { font-size: 0; }
.rank-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rank-title { font-size: 16px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-meta { font-size: 12.5px; color: var(--ink-dim); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 8px; text-decoration: none; cursor: pointer; border: 0; }
.btn-gold { background: var(--gold-500); color: var(--navy-950); }
.btn-gold:hover { background: var(--gold-400); }
.btn-ghost { background: none; border: 2px solid var(--navy-600); color: var(--ink-dim); }
.btn-ghost:hover, .btn-ghost:focus-visible, .btn-ghost.on { color: var(--gold-300); outline: none; }
.btn-lg { font-size: 15px; padding: 11px 20px; border-radius: 10px; min-height: 44px; }
.btn-off { background: var(--navy-700); color: var(--ink-faint); cursor: default; }

/* ---------- Rows and grids ---------- */
.row { margin: 26px 0 6px; }
.row-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.row-head h2 { font-size: 18px; font-weight: 700; padding-left: 10px; border-left: 4px solid var(--gold-500); }
.row-head .count { color: var(--ink-faint); font-size: 13px; }
.row-head .more { margin-left: auto; color: var(--gold-400); font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; }
.grid-list { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 18px; }
.empty { color: var(--ink-faint); font-size: 14px; padding: 18px 0; }

/* ---------- Card + poster ---------- */
.card { text-decoration: none; color: inherit; display: block; min-width: 0; }
.card:hover .card-title, .card:focus-visible .card-title { color: var(--gold-300); }
.card:focus-visible { outline: none; }
/* Gold frame on the poster when hovered or tapped. A pseudo-element sits above the absolutely positioned image. */
.card .poster::after, .rank-item .poster::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: var(--ring); background: var(--gold-metal); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .15s; pointer-events: none; }
.card:hover .poster::after, .card:focus-visible .poster::after, .card:active .poster::after,
.rank-item:hover .poster::after, .rank-item:focus-visible .poster::after, .rank-item:active .poster::after { opacity: 1; }
.poster { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: linear-gradient(160deg, hsl(var(--h, 220) 45% 30%), var(--navy-900)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
/* Poster pops up when hovered or tapped, like the sister site (owner, 2026-10-30). */
.card .poster, .rank-item .poster { transition: transform .18s ease, box-shadow .18s ease; }
.card:hover .poster, .card:focus-visible .poster, .card:active .poster,
.rank-item:hover .poster, .rank-item:focus-visible .poster, .rank-item:active .poster { transform: translateY(-6px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 12px 24px rgba(0,0,0,.55); }
@media (prefers-reduced-motion: reduce) { .card .poster, .rank-item .poster { transition: none; } .card:hover .poster, .card:focus-visible .poster, .card:active .poster, .rank-item:hover .poster, .rank-item:focus-visible .poster, .rank-item:active .poster { transform: none; } }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster-text { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 12px; text-align: center; font-size: 13px; font-weight: 700; line-height: 1.35; color: rgba(255,255,255,.82); }
.poster-text b { font-size: 10.5px; letter-spacing: 1px; color: var(--gold-400); font-weight: 700; opacity: .85; }
.badge { position: absolute; z-index: 1; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; }
.b-lang { top: 6px; left: 6px; background: var(--gold-500); color: var(--navy-950); }
.b-lang.sub { background: #e9edf7; color: var(--navy-900); }
.b-ep { bottom: 6px; right: 6px; background: rgba(7,15,36,.82); color: var(--ink); }
.card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 600; margin-top: 8px; line-height: 1.35; }
.card-meta { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

/* ---------- Genre tiles ---------- */
.genres { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.genre { background: var(--navy-800); border: 2px solid var(--navy-700); border-radius: 9px; padding: 12px 14px; text-decoration: none; }
.genre:hover, .genre:focus-visible, .genre:active { outline: none; }

/* ---------- Logo-gold ring on hover/tap ----------
   Drawn by ::before over the element's own 2px border (inset -2px), so it is a bit thicker
   than the border and nothing shifts. The mask cuts the middle out, leaving only the ring. */
.promo, .mood-btn, .chip, .genre, .btn-ghost { position: relative; }
.promo::before, .mood-btn::before, .chip::before, .genre::before, .btn-ghost::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: var(--ring); background: var(--gold-metal); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .15s; pointer-events: none; }
.promo:hover::before, .promo:focus-visible::before, .promo:active::before,
.mood-btn:hover::before, .mood-btn:focus-visible::before, .mood-btn:active::before,
.chip:hover::before, .chip:focus-visible::before, .chip:active::before, .chip.gold::before,
.genre:hover::before, .genre:focus-visible::before, .genre:active::before,
.btn-ghost:hover::before, .btn-ghost:focus-visible::before, .btn-ghost.on::before { opacity: 1; }
.genre b { display: block; font-size: 14.5px; }
.genre span { font-size: 12px; color: var(--ink-faint); }
.hub-group { margin-top: 26px; }
.hub-intro { max-width: 820px; margin-top: 10px; font-size: 14.5px; line-height: 1.75; color: var(--ink-body); }
/* Keyword tags at the foot of the homepage: smaller chips, wrap on every screen. */
.tag-cloud, .chips.tag-cloud { flex-wrap: wrap; overflow: visible; margin: 0; }
.tag-cloud .chip { font-size: 12.5px; }
#genres { scroll-margin-top: 90px; }

/* ---------- Pagination ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 26px; }
.pager .pager-step { font-size: 20px; line-height: 1; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 10px; display: grid; place-items: center; border-radius: 8px; font-size: 14px; text-decoration: none; background: var(--navy-800); border: 1px solid var(--navy-700); color: var(--ink-dim); }
.pager a:hover { color: var(--ink); border-color: var(--navy-600); }
.pager .on { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-950); font-weight: 700; }

/* ---------- Listing filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-faint); margin-top: 8px; }

/* ---------- Series page ---------- */
.hero { display: grid; grid-template-columns: 250px 1fr; gap: 28px; background: linear-gradient(120deg, var(--navy-800), var(--navy-900)); border: 1px solid rgba(var(--gold-rgb),.22); border-radius: 14px; padding: 22px; }
.title-th { font-size: 26px; font-weight: 800; line-height: 1.25; }
.title-th span { color: var(--gold-400); }
.title-alt { font-size: 14px; color: var(--ink-dim); margin-top: 6px; line-height: 1.6; }
.title-alt b { color: var(--ink-faint); font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tag { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 6px; background: var(--navy-700); color: var(--ink); text-decoration: none; }
.tag.gold { background: var(--gold-500); color: var(--navy-950); }
.tag.done { background: var(--done); color: var(--done-ink); }
.versions { display: flex; gap: 8px; margin: 4px 0 16px; font-size: 13px; color: var(--ink-dim); align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--navy-600); border-radius: 8px; overflow: hidden; }
.seg button { background: none; border: 0; color: var(--ink-dim); font: inherit; font-size: 13px; padding: 6px 14px; cursor: pointer; min-height: 34px; }
.seg button.on { background: rgba(var(--gold-rgb),.18); color: var(--gold-300); font-weight: 700; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cta-note { font-size: 12px; color: var(--ink-faint); margin-top: 10px; line-height: 1.55; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 18px; }
.q { background: rgba(7,15,36,.45); border-radius: 9px; padding: 10px 12px; }
.q span { display: block; font-size: 11.5px; color: var(--ink-faint); }
.q b { font-size: 15px; }
.cols { display: grid; grid-template-columns: 1fr 330px; gap: 24px; margin-top: 22px; }
.box { background: var(--navy-800); border: 1px solid var(--navy-700); border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.box h2 { font-size: 17px; font-weight: 700; margin-bottom: 10px; padding-left: 10px; border-left: 4px solid var(--gold-500); }
.box p { font-size: 15px; line-height: 1.85; color: var(--ink-body); }
.box p + p { margin-top: 10px; }
.byline { font-size: 12px; color: var(--ink-faint); margin-top: 12px; }
.pending { font-size: 14px; color: var(--ink-dim); }
.points { list-style: none; display: grid; gap: 8px; }
.points li { font-size: 14.5px; color: var(--ink-body); padding-left: 18px; position: relative; line-height: 1.6; }
.points li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--gold-500); }
.info { width: 100%; border-collapse: collapse; font-size: 14px; }
.info th { text-align: left; color: var(--ink-faint); font-weight: 500; width: 42%; padding: 8px 0; vertical-align: top; }
.info td { padding: 8px 0; color: var(--ink); }
.info tr + tr th, .info tr + tr td { border-top: 1px solid var(--navy-700); }
.info a { color: var(--gold-400); text-decoration: none; }
.faq details { border-top: 1px solid var(--navy-700); padding: 10px 0; }
.faq summary { font-size: 14.5px; font-weight: 600; cursor: pointer; }
.faq details p { font-size: 14px; margin-top: 6px; color: var(--ink-dim); }
.why { font-size: 12px; color: var(--ink-faint); margin: -4px 0 12px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }

/* ---------- Search / saved / text pages ---------- */
.search-big { display: flex; gap: 10px; margin-top: 16px; max-width: 640px; }
.search-big input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--navy-600); background: var(--navy-800); color: var(--ink); }
.prose { max-width: 760px; }
.prose p, .prose li { font-size: 15.5px; line-height: 1.85; color: var(--ink-body); margin-top: 12px; }
.prose h2 { font-size: 19px; margin-top: 26px; }
.prose ul { padding-left: 22px; }
.prose a { color: var(--gold-400); }

/* ---------- Footer ---------- */
.footer { margin-top: 36px; background: var(--navy-950); border-top: 2px solid transparent; border-image: var(--gold-metal-h) 1; font-size: 14px; color: var(--ink-body); }
/* Brand block left, three link columns pushed to the right. */
.footer-inner { display: grid; grid-template-columns: minmax(0, 430px) 1fr repeat(3, auto); column-gap: 56px; row-gap: 28px; padding-top: 34px; padding-bottom: 26px; }
.foot-brand { grid-column: 1; }
.foot-col:nth-of-type(1) { grid-column: 3; }
.foot-logo { display: inline-flex; }
.foot-desc { margin-top: 14px; line-height: 1.85; color: var(--ink-dim); }
.foot-contact { margin-top: 22px; }
.foot-rule { display: flex; align-items: center; gap: 12px; }
.foot-rule::after { content: ""; flex: 1; height: 1px; background: rgba(var(--gold-rgb),.35); }
.foot-contact address { font-style: normal; line-height: 1.9; margin-top: 10px; }
.foot-phone { margin-top: 6px; }
.foot-phone a { color: var(--gold-400); font-weight: 800; letter-spacing: .5px; }
.foot-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
/* Same pattern as the sister site: gold outline, fills gold on hover. ".footer .social-btn" beats ".footer a". */
.footer .social-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 9px; font-size: 14px; font-weight: 600; border: 1px solid rgba(var(--gold-rgb),.45); background: var(--navy-800); color: var(--ink); transition: background .15s, border-color .15s, color .15s; }
.footer .social-btn svg { flex: none; color: var(--gold-400); }
.footer .social-btn:hover { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-950); }
.footer .social-btn:hover svg { color: var(--navy-950); }
.footer h4 { color: var(--gold-400); font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.foot-col li { line-height: 1.6; margin-bottom: 10px; }
.footer ul { list-style: none; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--gold-300); }
.disclaimer { grid-column: 1 / -1; border-top: 1px solid rgba(var(--gold-rgb),.25); padding-top: 14px; font-size: 12.5px; color: var(--ink-faint); }

/* ---------- Mobile tab bar ---------- */
.tabbar { display: none; }
/* Keyboard: every link and button shows where the focus is; the skip link appears on first Tab. */
:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 2px; }
.skip-link { position: fixed; z-index: 30; top: 8px; left: 8px; padding: 8px 14px; border-radius: 8px; background: var(--gold-500); color: var(--navy-950); font-weight: 700; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
/* Cookie consent: shows only once GA4 is switched on (footer.php). */
.consent { position: fixed; z-index: 20; left: 16px; right: 16px; bottom: 16px; max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--navy-800); border: 2px solid rgba(var(--gold-rgb),.45); box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.consent[hidden] { display: none; }
.consent p { flex: 1; font-size: 13.5px; color: var(--ink-body); }
.consent a { color: var(--gold-400); }
@media (max-width: 600px) { .consent { bottom: 76px; flex-wrap: wrap; } .consent p { flex-basis: 100%; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.mood { flex-direction: column; align-items: flex-start; gap: 12px; }
	.nav { gap: 14px; font-size: 14px; }
	.search { width: 220px; }
	.grid { grid-template-columns: repeat(5, 1fr); }
	.grid > .card:nth-child(n+6) { display: none; }
	.grid-list { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 860px) {
	.promos { grid-template-columns: 1fr; }
	.rank { grid-template-columns: repeat(2, 1fr); }
	.rank li:nth-child(n) { border-left: 1px solid rgba(var(--gold-rgb),.14); }
	.rank li:nth-child(2n+1) { border-left: 0; }
	.nav { display: none; }
	.search { width: auto; flex: 1; }
	.grid-list, .grid-6 { grid-template-columns: repeat(4, 1fr); }
	.genres { grid-template-columns: repeat(3, 1fr); }
	.cols { grid-template-columns: 1fr; gap: 0; }
	.footer-inner { grid-template-columns: repeat(3, auto); column-gap: 32px; justify-content: start; }
	.foot-brand { grid-column: 1 / -1; max-width: 520px; }
	.foot-col:nth-of-type(1) { grid-column: auto; }
}
@media (max-width: 600px) {
	.mood-h { font-size: 18px; }
	.mood-list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 3px; margin: -3px; max-width: calc(100% + 6px); }
	.mood-btn { flex: none; min-height: 42px; padding: 0 16px; font-size: 14px; }
	.promo { height: 136px; }
	.promo-text { left: 18px; max-width: 66%; }
	.promo-art { width: 48%; }
	.promo-title { font-size: 25px; }
	.promo-sub { font-size: 12.5px; }
	.rank { grid-template-columns: 1fr; }
	.rank li:nth-child(n) { border-left: 0; }
	.rank-item { padding: 8px 4px; }
	.rank-item .poster { width: 92px; }
	.wrap { padding: 0 14px; }
	.topbar-inner { gap: 10px; padding-top: 8px; padding-bottom: 8px; }
	.logo { gap: 8px; }
	.logo-emblem { width: 44px; height: 44px; }
	.logo-word { width: 142px; height: 32px; }
	.search { padding-left: 12px; }
	.wrap.page { padding-top: 14px; }
	h1.page-h1 { font-size: 18px; }
	.chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.grid, .grid-list, .grid-6 { grid-template-columns: repeat(3, 1fr); gap: 10px; }
	.grid > .card:nth-child(n+6) { display: block; }
	.grid > .card:nth-child(n+7) { display: none; }
	.row-head h2 { font-size: 16px; }
	.card-title { font-size: 13px; }
	.genres { grid-template-columns: repeat(2, 1fr); }
	.hero { grid-template-columns: 112px 1fr; gap: 14px; padding: 14px; }
	.hero-main { display: contents; }
	.hero-head { grid-column: 2; }
	.hero-rest { grid-column: 1 / -1; }
	.title-th { font-size: 19px; }
	.title-alt { font-size: 12.5px; }
	.tag { font-size: 11.5px; padding: 3px 8px; }
	.cta-row .btn-gold { width: 100%; justify-content: center; }
	.quick { grid-template-columns: repeat(2, 1fr); }
	.box { padding: 14px; }
	.box p { font-size: 14.5px; }
	/* Top and bottom again: the phone .wrap rule above zeroes them. */
	.footer-inner { grid-template-columns: repeat(3, 1fr); column-gap: 14px; padding-top: 26px; padding-bottom: 22px; }
	.footer { font-size: 13.5px; }
	.footer h4 { font-size: 14px; }
	/* Thumb-sized footer links (sister site measured 21px-tall links; Google asks for ~48px). */
	.foot-col li { margin-bottom: 0; }
	.foot-col a { display: flex; align-items: center; min-height: 40px; }
	body { padding-bottom: 64px; }
	.tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--navy-950); border-top: 2px solid transparent; border-image: var(--gold-metal-h) 1; padding: 8px 0 10px; }
	.tab { text-align: center; font-size: 11px; color: var(--ink-faint); text-decoration: none; }
	.tab.active { color: var(--gold-400); }
}
