/*
Theme Name: CrushReview
Theme URI: https://crushreview.org
Description: Editorial review theme for short novels and short-drama series ("Midnight Velvet" design system). Review fields, dual scores, tropes, steam level, Review schema; review data exposed in the REST API for automation.
Version: 2.3.0
Requires PHP: 8.1
Text Domain: crushreview
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
    /* dark is the default look; light is the alternate theme */
    --bg: #0b0a0f;
    --bg-2: #100e15;
    --surface: #15131b;
    --surface-2: #1c1924;
    --surface-3: #242030;
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .14);
    --ink: #f4f1f7;
    --ink-2: #d9d3e2;
    --muted: #9c95aa;
    --faint: #6e6880;

    --rose: #ff7a9a;
    --rose-2: #e2557c;
    --rose-soft: rgba(255, 122, 154, .14);
    --gold: #f5c451;
    --mint: #45d39a;
    --amber: #f2a541;
    --slate: #8b8698;
    --danger: #ff6b6b;
    --on-accent: #1a0710;
    --grad: linear-gradient(135deg, #ffa3b8 0%, #ff7a9a 45%, #d8467a 100%);

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, .25), 0 18px 40px -18px rgba(0, 0, 0, .7);
    --shadow-3: 0 30px 80px -24px rgba(0, 0, 0, .85);
    --ring: 0 0 0 3px rgba(255, 122, 154, .45);

    --r-sm: 10px;
    --r: 14px;
    --r-lg: 20px;
    --r-xl: 28px;

    --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
    --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --w: 1200px;
    --gutter: clamp(16px, 4vw, 32px);
    --header-h: 68px;
    color-scheme: dark;
}
:root[data-theme="light"] {
    --bg: #f6f3ef;
    --bg-2: #efebe5;
    --surface: #ffffff;
    --surface-2: #f8f5f2;
    --surface-3: #efeae4;
    --line: rgba(22, 19, 28, .09);
    --line-2: rgba(22, 19, 28, .16);
    --ink: #16131c;
    --ink-2: #39333f;
    --muted: #6c6574;
    --faint: #9a93a2;
    --rose: #d64a73;
    --rose-2: #b8365e;
    --rose-soft: rgba(214, 74, 115, .1);
    --gold: #c88a12;
    --mint: #148a5b;
    --amber: #c06a0b;
    --slate: #7a7484;
    --on-accent: #ffffff;
    --grad: linear-gradient(135deg, #f28aa5 0%, #d64a73 55%, #a92f58 100%);
    --shadow-1: 0 1px 2px rgba(22, 19, 28, .06);
    --shadow-2: 0 1px 2px rgba(22, 19, 28, .05), 0 14px 34px -16px rgba(22, 19, 28, .22);
    --shadow-3: 0 26px 60px -24px rgba(22, 19, 28, .35);
    color-scheme: light;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 16px/1.6 var(--sans);
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--rose); color: var(--on-accent); font-weight: 700; }
.skip:focus { left: 8px; }
.wrap { width: min(var(--w), 100% - 2 * var(--gutter)); margin-inline: auto; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ==========================================================================
   3. Type
   ========================================================================== */
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 0; font: 700 11.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--rose);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.eyebrow--plain::before { display: none; }
.h-display { margin: 0; font: 600 clamp(36px, 5.6vw, 68px)/1.02 var(--serif); letter-spacing: -.025em; font-optical-sizing: auto; }
.h1 { margin: 0; font: 600 clamp(30px, 4vw, 48px)/1.08 var(--serif); letter-spacing: -.02em; }
.h2 { margin: 0; font: 600 clamp(24px, 2.6vw, 32px)/1.15 var(--serif); letter-spacing: -.015em; }
.h3 { margin: 0; font: 600 19px/1.3 var(--serif); letter-spacing: -.005em; }
.lead { margin: 0; font-size: clamp(16px, 1.4vw, 18.5px); line-height: 1.6; color: var(--ink-2); }

/* ==========================================================================
   4. Buttons, chips, badges
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; padding: 0 22px; border: 0; border-radius: 999px;
    font: 700 14.5px/1 var(--sans); letter-spacing: .005em; white-space: nowrap; cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--grad); color: var(--on-accent); box-shadow: 0 10px 26px -12px var(--rose); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -12px var(--rose); }
.btn--ghost { background: rgba(255, 255, 255, .07); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
:root[data-theme="light"] .btn--ghost { background: var(--surface); }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); }
:root[data-theme="light"] .btn--ghost:hover { background: var(--surface-3); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 13.5px; }
.btn--block { width: 100%; }

.chip {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px;
    border-radius: 999px; background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
    font: 600 13px/1 var(--sans); white-space: nowrap; transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.chip:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); background: var(--surface-3); }
.chip small { color: var(--faint); font-weight: 600; }
.chip--rose { background: var(--rose-soft); color: var(--rose); box-shadow: none; }
.chip--rose:hover { background: var(--rose); color: var(--on-accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.pill {
    display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px;
    font: 700 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
    background: rgba(255, 255, 255, .1); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.pill--novel { background: rgba(122, 158, 255, .2); color: #c9d6ff; }
.pill--reel { background: rgba(255, 122, 154, .22); color: #ffd0db; }
.card__poster .pill { background: rgba(10, 8, 14, .62); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.card__poster .pill--novel svg { color: #9fb6ff; }
.card__poster .pill--reel svg { color: #ff9cb4; }
:root[data-theme="light"] .pill--novel { background: #e6ecff; color: #3550a8; }
:root[data-theme="light"] .pill--reel { background: #ffe4eb; color: #b8365e; }
.pill svg { width: 12px; height: 12px; }

/* Score: rounded square chip with tone; ring for the big ones */
.score {
    --c: var(--slate);
    display: inline-grid; place-items: center; min-width: 42px; height: 30px; padding: 0 9px;
    border-radius: 9px; background: var(--c); color: #0b0a0f;
    font: 800 14px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.01em;
    box-shadow: 0 6px 16px -8px var(--c);
}
.score--hi { --c: var(--mint); }
.score--mid { --c: var(--gold); }
.score--lo { --c: var(--slate); }
:root[data-theme="light"] .score { color: #fff; }
.ring {
    --c: var(--slate); --size: 76px; --track: rgba(255, 255, 255, .1);
    position: relative; display: inline-grid; place-items: center; width: var(--size); height: var(--size); border-radius: 50%; flex: none;
    background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--track) 0);
}
:root[data-theme="light"] .ring { --track: rgba(22, 19, 28, .09); }
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font: 700 calc(var(--size) * .34)/1 var(--serif); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ring--hi { --c: var(--mint); }
.ring--mid { --c: var(--gold); }
.ring--lo { --c: var(--slate); }
.ring--sm { --size: 56px; }
.ring--sm::before { inset: 5px; }

.steam { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; line-height: 1; }
.steam i { font-style: normal; filter: grayscale(1) opacity(.28); }
.steam i.on { filter: none; }
.steam b { margin-left: 6px; font: 600 12.5px var(--sans); color: var(--ink-2); }

/* ==========================================================================
   5. Header
   ========================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 40; height: var(--header-h);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 1px 0 var(--line);
}
.site-header__in { display: flex; align-items: center; gap: 28px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand__mark { display: block; width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 8px 20px -10px #ec5a87; }
.brand__mark svg { display: block; width: 100%; height: 100%; }
.brand__name { font: 600 21px/1 var(--serif); letter-spacing: -.02em; }
.brand__name em { font-style: italic; color: var(--rose); }
.nav { display: flex; gap: 4px; }
.nav a { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px; font: 600 14.5px/1 var(--sans); color: var(--muted); transition: color .15s ease, background-color .15s ease; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle span { display: grid; place-items: center; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: grid; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
.menu-btn { display: none; }
@media (max-width: 860px) {
    .site-header__in { gap: 12px; }
    .nav { display: none; }
    .menu-btn { display: inline-grid; }
}

/* Mobile sheet menu */
.sheet { position: fixed; inset: 0; z-index: 60; display: none; }
.sheet.is-open { display: block; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(5, 4, 8, .6); backdrop-filter: blur(4px); animation: fade .2s ease; }
.sheet__panel { position: absolute; inset: 0 0 0 auto; width: min(340px, 86vw); padding: 20px; background: var(--surface); box-shadow: var(--shadow-3); animation: slide .24s cubic-bezier(.2, .8, .2, 1); overflow-y: auto; }
.sheet__panel nav { display: grid; gap: 4px; margin-top: 24px; }
.sheet__panel nav a { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 14px; border-radius: 12px; font: 600 17px/1 var(--sans); }
.sheet__panel nav a:hover { background: var(--surface-2); }
.sheet__panel nav a svg { width: 18px; height: 18px; color: var(--faint); }
.sheet__panel nav a[aria-current] { background: var(--surface-2); color: var(--rose); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; }
.sheet__label { margin: 28px 0 10px; font: 700 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }

/* Search overlay */
.search-ov { position: fixed; inset: 0; z-index: 70; display: none; place-items: start center; padding: 12vh var(--gutter) 0; background: rgba(5, 4, 8, .72); backdrop-filter: blur(8px); }
.search-ov.is-open { display: grid; animation: fade .18s ease; }
.search-ov form { position: relative; width: min(640px, 100%); }
.search-ov input { width: 100%; height: 64px; padding: 0 20px 0 56px; border: 0; border-radius: 18px; background: var(--surface); color: var(--ink); font: 500 19px var(--sans); box-shadow: var(--shadow-3), inset 0 0 0 1px var(--line-2); }
.search-ov input:focus { outline: none; box-shadow: var(--shadow-3), 0 0 0 3px var(--rose-soft), inset 0 0 0 1px var(--rose); }
.search-ov svg { position: absolute; left: 20px; top: 32px; width: 22px; height: 22px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-ov p { margin: 14px 4px 0; color: rgba(255, 255, 255, .6); font-size: 13px; }
@media (hover: none) { .search-ov p { display: none; } .search-ov input { height: 58px; font-size: 17px; } .search-ov svg { top: 29px; } }

/* ==========================================================================
   6. Sections
   ========================================================================== */
.section { padding: clamp(40px, 6vw, 72px) 0 0; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.section__head .h2 { margin-top: 10px; }
.section__head p.muted { margin: 6px 0 0; max-width: 520px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; height: 36px; font: 700 14px/1 var(--sans); color: var(--rose); white-space: nowrap; }
.link-more svg { width: 16px; height: 16px; transition: transform .15s ease; }
.link-more:hover svg { transform: translateX(3px); }

.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.tabs button { height: 34px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 700 13.5px/1 var(--sans); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); }
:root:not([data-theme="light"]) .tabs button[aria-selected="true"] { background: var(--surface-3); }

/* ==========================================================================
   7. Cards
   ========================================================================== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 32px 20px; }
.card { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card[hidden] { display: none; }
.card__poster {
    position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--r);
    background: var(--surface-2); box-shadow: var(--shadow-2); isolation: isolate;
}
.card__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .2, 1), filter .3s ease; }
.card__poster::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); pointer-events: none; }
.card__poster .score { position: absolute; left: 10px; bottom: 10px; z-index: 2; }
.card__poster .pill { position: absolute; left: 10px; top: 10px; z-index: 2; }
.card__shade { position: absolute; inset: 40% 0 0; z-index: 1; background: linear-gradient(transparent, rgba(6, 5, 9, .55)); pointer-events: none; }
.card__hover {
    position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
    padding: 16px; background: linear-gradient(to top, rgba(8, 6, 11, .96) 20%, rgba(8, 6, 11, .6) 70%, rgba(8, 6, 11, .2));
    color: #fff; font-size: 13.5px; line-height: 1.5; opacity: 0; transform: translateY(6px); transition: opacity .22s ease, transform .22s ease;
}
.card__hover strong { font: 700 12.5px var(--sans); color: #ff9cb4; letter-spacing: .02em; }
.card:hover .card__poster img { transform: scale(1.05); }
.card:hover .card__hover, .card:focus-within .card__hover { opacity: 1; transform: none; }
@media (hover: none) { .card__hover { display: none; } }
@media (max-width: 560px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
    .card__title { font-size: 15px; }
    .card__meta { font-size: 12px; gap: 6px; }
    .card__meta span + span::before { margin-right: 6px; }
}
.card__title { margin: 0; font: 600 16.5px/1.3 var(--serif); letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 4; }
.card__meta { display: flex; align-items: center; gap: 8px; margin: -4px 0 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.card__meta span + span::before { content: "·"; margin-right: 8px; opacity: .6; }
.card__meta > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.card__steam { flex: none; display: inline-flex; align-items: center; gap: 3px; color: var(--rose); font-weight: 700; font-variant-numeric: tabular-nums; }
.card__steam svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }

/* Rail (horizontal scroll) */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(172px, 196px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 24px; margin: 0 calc(-1 * var(--gutter)); scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* Ranked rail (big numbers) */
.ranked { grid-auto-columns: minmax(214px, 236px); }
.ranked .card { flex-direction: row; align-items: flex-end; gap: 0; }
.ranked .card__n { flex: none; width: 70px; margin-right: -18px; font: 700 128px/.78 var(--serif); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, .26); position: relative; z-index: 0; }
:root[data-theme="light"] .ranked .card__n { -webkit-text-stroke-color: rgba(20, 14, 26, .22); }
.ranked .card__poster { width: 150px; flex: none; z-index: 1; }
.ranked .card:hover .card__n { -webkit-text-stroke-color: var(--rose); }

/* ==========================================================================
   8. Home: hero
   ========================================================================== */
.hero { position: relative; isolation: isolate; overflow: hidden; margin-top: calc(-1 * var(--header-h)); padding: calc(var(--header-h) + clamp(40px, 7vw, 88px)) 0 clamp(36px, 5vw, 64px); color: #f6f2f8; background: #09080c; }
.hero__bg { position: absolute; inset: -12%; z-index: -2; background: center 30% / cover no-repeat; filter: blur(60px) saturate(1.35) brightness(.6); transform: scale(1.08); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
    radial-gradient(60% 70% at 78% 35%, rgba(255, 122, 154, .26), transparent 70%),
    linear-gradient(90deg, rgba(9, 8, 12, .95) 0%, rgba(9, 8, 12, .7) 45%, rgba(9, 8, 12, .35) 100%),
    linear-gradient(to top, #09080c 0%, transparent 40%); }
.hero__in { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero .eyebrow { color: #ff9cb4; }
.hero__title { margin: 16px 0 0; }
.hero__title a:hover { color: #fff; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 18px 0 0; color: rgba(246, 242, 248, .72); font-size: 14.5px; }
.hero__meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }
.hero__verdict { margin: 22px 0 0; max-width: 560px; font: italic 500 clamp(18px, 1.8vw, 22px)/1.5 var(--serif); color: #fff; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
:root[data-theme] .hero .btn--ghost { color: #fff; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.hero__poster { position: relative; justify-self: end; width: 100%; }
.hero__poster a { display: block; overflow: hidden; border-radius: 20px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .1); transform: perspective(1200px) rotateY(-6deg) rotateX(2deg); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.hero__poster a:hover { transform: perspective(1200px) rotateY(0) translateY(-4px); }
.hero__poster img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.hero__score { position: absolute; left: -28px; bottom: 28px; display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 18px; background: rgba(20, 17, 26, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .1); }
.hero__score .ring::before { background: #1b1722; }
.hero__score .ring b { color: #fff; }
.hero__score span { display: grid; line-height: 1.25; }
.hero__score span b { font: 700 15px var(--sans); color: #fff; }
.hero__score span small { font-size: 12px; color: rgba(255, 255, 255, .6); }
.hero__search { display: flex; gap: 8px; max-width: 520px; margin-top: 36px; padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.hero__search input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 0; background: transparent; color: #fff; font: 500 15px var(--sans); }
.hero__search input::placeholder { color: rgba(255, 255, 255, .5); }
.hero__search input:focus { outline: none; }
.hero__search:focus-within { box-shadow: inset 0 0 0 1px rgba(255, 156, 180, .7), 0 0 0 4px rgba(255, 122, 154, .16); }
.hero__tropes { margin-top: 16px; }
.hero__tropes .chip { background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .78); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.hero__tropes .chip:hover { background: rgba(255, 122, 154, .18); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 156, 180, .5); }
@media (max-width: 900px) {
    .hero__in { grid-template-columns: 1fr; }
    .hero__poster { order: -1; justify-self: start; width: 190px; }
    .hero__score { left: calc(100% + 20px); right: auto; bottom: 16px; width: max-content; }
}
@media (max-width: 520px) {
    .hero__poster { width: 150px; }
    .hero__score { left: calc(100% + 14px); bottom: 6px; max-width: calc(100vw - 150px - 2 * var(--gutter) - 14px); padding: 8px 12px 8px 8px; }
    .hero__score span b { font-size: 14px; }
    .hero__score .ring { --size: 52px; }
    .hero__search .btn { padding: 0 16px; }
}

/* Top rated list */
.toplist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin: 0; padding: 0; list-style: none; counter-reset: top; }
.toplist li { counter-increment: top; }
.toplist a { display: grid; grid-template-columns: 34px 56px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px; border-radius: var(--r); transition: background-color .15s ease; }
.toplist a:hover { background: var(--surface-2); }
.toplist a::before { content: counter(top, decimal-leading-zero); font: 600 22px/1 var(--serif); color: var(--faint); text-align: center; font-variant-numeric: tabular-nums; }
.toplist li:nth-child(-n+3) a::before { color: var(--rose); }
.toplist img { width: 56px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow-1); }
.toplist__t { min-width: 0; display: grid; gap: 4px; }
.toplist__t strong { font: 600 16px/1.3 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toplist__t span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .toplist { grid-template-columns: 1fr; } .toplist a { grid-template-columns: 28px 48px minmax(0, 1fr) auto; gap: 12px; padding: 10px 6px; } .toplist img { width: 48px; } .toplist__t strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 15px; } }

/* Trope tiles */
.tropes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.trope-tile { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 128px; padding: 0 20px 0 24px; border-radius: var(--r-lg); overflow: hidden; isolation: isolate; background: linear-gradient(135deg, var(--surface-2), var(--surface)); box-shadow: inset 0 0 0 1px var(--line); transition: transform .2s ease, box-shadow .2s ease; }
.trope-tile::before { content: ""; position: absolute; right: -40px; top: 50%; z-index: -1; width: 220px; height: 220px; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(closest-side, var(--rose-soft), transparent); opacity: .9; }
.trope-tile:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-2); }
.trope-tile__t { display: grid; gap: 6px; min-width: 0; }
.trope-tile b { font: 600 20px/1.2 var(--serif); letter-spacing: -.01em; }
.trope-tile__t span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); transition: color .15s ease; }
.trope-tile__t svg { width: 14px; height: 14px; transition: transform .2s ease; }
.trope-tile:hover .trope-tile__t span { color: var(--rose); }
.trope-tile:hover .trope-tile__t svg { transform: translateX(3px); }
.trope-tile__fan { position: relative; flex: none; width: 112px; height: 96px; }
.trope-tile__fan img { position: absolute; top: 6px; width: 56px; height: 84px; object-fit: cover; border-radius: 8px; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.trope-tile__fan img:nth-child(1) { right: 0; z-index: 3; transform: rotate(7deg); }
.trope-tile__fan img:nth-child(2) { right: 26px; z-index: 2; transform: rotate(-2deg) scale(.94); }
.trope-tile__fan img:nth-child(3) { right: 52px; z-index: 1; transform: rotate(-10deg) scale(.88); }
.trope-tile:hover .trope-tile__fan img:nth-child(1) { transform: rotate(10deg) translate(4px, -4px); }
.trope-tile:hover .trope-tile__fan img:nth-child(3) { transform: rotate(-14deg) scale(.88) translate(-6px, -2px); }
@media (max-width: 900px) { .tropes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tropes-grid { grid-template-columns: 1fr; gap: 10px; } .trope-tile { height: 104px; } .trope-tile b { font-size: 18px; } }

/* CTA band */
.band { margin-top: clamp(48px, 7vw, 88px); padding: clamp(28px, 4vw, 44px); border-radius: var(--r-xl); background: radial-gradient(80% 140% at 100% 0%, rgba(255, 122, 154, .22), transparent 60%), var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.band p { margin: 8px 0 0; color: var(--muted); max-width: 520px; }
@media (max-width: 720px) { .band { grid-template-columns: 1fr; } }

/* ==========================================================================
   9. Review page
   ========================================================================== */
.rv-hero { position: relative; isolation: isolate; overflow: hidden; margin-top: calc(-1 * var(--header-h)); padding: calc(var(--header-h) + 36px) 0 48px; color: #f6f2f8; background: #09080c; }
.rv-hero__bg { position: absolute; inset: -12%; z-index: -2; background: center / cover no-repeat; filter: blur(64px) saturate(1.3) brightness(.55); transform: scale(1.08); }
.rv-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 90% at 15% 20%, rgba(255, 122, 154, .2), transparent 70%), linear-gradient(to top, #09080c, rgba(9, 8, 12, .55) 60%, rgba(9, 8, 12, .75)); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 28px; padding: 0; list-style: none; font-size: 13px; color: rgba(255, 255, 255, .55); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a:hover { color: #fff; }
.crumbs--page ol { color: var(--muted); }
.crumbs--page a:hover { color: var(--ink); }
.rv-hero__in { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: end; }
.rv-hero__poster { border-radius: 18px; overflow: hidden; box-shadow: 0 34px 80px -28px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .1); }
.rv-hero__poster img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.rv-hero__credit { display: block; margin-top: 10px; font-size: 11.5px; color: rgba(255, 255, 255, .45); }
.rv-hero__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rv-hero__title { margin: 16px 0 0; max-width: 18ch; font: 600 clamp(34px, 4.8vw, 60px)/1.02 var(--serif); letter-spacing: -.025em; }
.rv-hero__by { margin: 14px 0 0; color: rgba(255, 255, 255, .7); font-size: 15px; }
.rv-hero__by b { color: #fff; font-weight: 600; }
.rv-hero .chips { margin-top: 20px; }
.rv-hero .chip--rose { background: rgba(255, 122, 154, .16); color: #ffb3c5; }
.rv-hero .chip--rose:hover { background: #ff7a9a; color: #1a0710; }
.scores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.scorecard { display: flex; align-items: center; gap: 14px; padding: 12px 20px 12px 12px; border-radius: 20px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.scorecard .ring::before { background: #17141e; }
.scorecard .ring b { color: #fff; }
.scorecard span { display: grid; gap: 3px; }
.scorecard span b { font: 700 16px/1.2 var(--sans); color: #fff; }
.scorecard span small { font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.rv-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
:root[data-theme] .rv-hero .btn--ghost { color: #fff; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
@media (max-width: 820px) {
    .rv-hero__in { grid-template-columns: 1fr; align-items: start; }
    .rv-hero__poster { width: 170px; }
}
@media (max-width: 560px) {
    .rv-hero { padding-bottom: 32px; }
    .rv-hero__poster { width: 132px; border-radius: 14px; }
    .crumbs ol { margin-bottom: 20px; }
    .scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
    .scorecard { gap: 10px; padding: 10px; border-radius: 16px; }
    .scorecard .ring { --size: 44px; }
    .scorecard span { min-width: 0; }
    .scorecard span b { font-size: 12.5px; line-height: 1.2; letter-spacing: -.01em; }
    .scorecard span small { font-size: 11.5px; white-space: nowrap; }
    .rv-hero__cta { display: grid; margin-top: 18px; }
    .rv-hero__cta .btn--ghost { display: none; }
}

/* Body layout */
.rv { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 64px); padding-top: 48px; }
.rv__aside { display: grid; gap: 16px; align-content: start; position: sticky; top: calc(var(--header-h) + 20px); align-self: start; }
@media (max-width: 980px) { .rv { grid-template-columns: 1fr; } .rv__aside { position: static; } }
.panel { padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); }
.panel__title { margin: 0 0 14px; font: 700 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.facts { margin: 0; display: grid; }
.facts div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.facts div:first-child { border-top: 0; padding-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.warn { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.warn span { height: 26px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 8px; background: rgba(255, 107, 107, .12); color: #ff9a9a; font: 600 12.5px/1 var(--sans); }
:root[data-theme="light"] .warn span { color: #b42323; background: #fde8e8; }
.bars { display: grid; gap: 12px; margin: 0; }
.bars div { display: grid; grid-template-columns: 88px minmax(0, 1fr) 32px; align-items: center; gap: 12px; font-size: 13.5px; }
.bars dt { color: var(--muted); }
.bars dd { margin: 0; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bars dd i { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }

/* Prose */
.prose { max-width: 680px; font-size: 17.5px; line-height: 1.78; color: var(--ink-2); }
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.1em; font: 600 27px/1.2 var(--serif); letter-spacing: -.015em; color: var(--ink); }
.prose h3 { margin-top: 1.7em; font: 600 21px/1.3 var(--serif); color: var(--ink); }
.prose a:not(.btn) { color: var(--rose); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.prose strong { color: var(--ink); }
.prose blockquote { padding: 4px 0 4px 22px; border-left: 3px solid var(--rose); font: italic 500 20px/1.55 var(--serif); color: var(--ink); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: .4em; }

.tldr { display: grid; gap: 8px; padding: 22px 24px; border-radius: var(--r-lg); background: linear-gradient(135deg, var(--rose-soft), transparent 80%), var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.tldr b { font: 700 11.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--rose); }
.tldr p { margin: 0; font: 500 18px/1.6 var(--sans); color: var(--ink); }

.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.proscons > div { padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.proscons h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px !important; font: 700 13px/1 var(--sans) !important; letter-spacing: .12em; text-transform: uppercase; }
.proscons .pro h2 { color: var(--mint); }
.proscons .con h2 { color: var(--danger); }
.proscons ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 15.5px; line-height: 1.5; }
.proscons li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.proscons li::before { content: "+"; font-weight: 800; color: var(--mint); }
.proscons .con li::before { content: "–"; color: var(--danger); }
@media (max-width: 640px) { .proscons { grid-template-columns: 1fr; } }

.bottomline { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; padding: 28px; border-radius: var(--r-xl); background: radial-gradient(90% 140% at 0% 0%, var(--rose-soft), transparent 60%), var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.bottomline__score { display: grid; justify-items: center; gap: 10px; }
.bottomline__score small { font: 700 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--rose); }
.bottomline h2 { margin: 0 !important; font: 600 24px/1.2 var(--serif) !important; }
.bottomline__verdict { margin: 8px 0 0 !important; font: italic 500 18px/1.55 var(--serif); color: var(--ink); }
.bottomline__for { margin: 10px 0 18px !important; font-size: 15px; color: var(--muted); }
@media (max-width: 560px) { .bottomline { grid-template-columns: 1fr; } .bottomline__score { justify-items: start; grid-auto-flow: column; align-items: center; } }

.note { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--r); background: var(--surface-2); font-size: 14px; line-height: 1.6; color: var(--muted); }
.note svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--rose); }
.note a { color: var(--rose); text-decoration: underline; }

.progress { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 3px; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--grad); transform: scaleX(0); transform-origin: 0 50%; }

/* ==========================================================================
   10. Archive, pages, pager, footer
   ========================================================================== */
.page-head { padding: clamp(36px, 5vw, 64px) 0 28px; background: radial-gradient(60% 120% at 100% 0%, var(--rose-soft), transparent 60%); }
.page-head p.lead { margin-top: 12px; max-width: 640px; }
.page-head__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.page-head__count { font-size: 14px; color: var(--muted); }
.page-body { max-width: 720px; padding: 8px 0 24px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 48px 0 0; }
.pager .page-numbers { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font: 700 14px/1 var(--sans); }
.pager .current { background: var(--grad); color: var(--on-accent); box-shadow: none; }
.empty { display: grid; justify-items: start; gap: 16px; padding: 48px 0; color: var(--muted); }

.site-footer { margin-top: clamp(64px, 8vw, 104px); padding: 48px 0 32px; background: var(--bg-2); box-shadow: 0 -1px 0 var(--line); }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-footer p { margin: 14px 0 0; max-width: 340px; font-size: 14px; color: var(--muted); }
.site-footer h3 { margin: 0 0 14px; font: 700 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 14.5px; }
.site-footer ul a { color: var(--ink-2); }
.site-footer ul a:hover { color: var(--rose); }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__grid > :first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
span.card__poster { display: block; }

/* Sort links on lists */
.sorts { display: flex; gap: 4px; margin-left: auto; }
.sorts a { height: 34px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; font: 600 13px var(--sans); color: var(--muted); transition: color .15s ease, background-color .15s ease; }
.sorts a:hover { color: var(--ink); }
.sorts a[aria-current] { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }

/* Dark media heroes keep light-on-dark details in both themes */
:root[data-theme] :is(.hero, .rv-hero) .btn--ghost:hover { background: rgba(255, 255, 255, .16); }
:is(.hero, .rv-hero) .steam b { color: rgba(255, 255, 255, .78); }
:is(.hero, .rv-hero) .steam i { filter: grayscale(1) brightness(1.6) opacity(.3); }
:is(.hero, .rv-hero) .steam i.on { filter: none; }

/* Light theme: over a dark media hero the header turns dark glass until you scroll past it */
:root[data-theme="light"].on-hero .site-header { background: rgba(12, 10, 16, .35); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); color: #f6f2f8; }
:root[data-theme="light"].on-hero .brand__name { color: #fff; }
:root[data-theme="light"].on-hero .brand__name em { color: #ff9cb4; }
:root[data-theme="light"].on-hero .nav a, :root[data-theme="light"].on-hero .icon-btn { color: rgba(255, 255, 255, .75); }
:root[data-theme="light"].on-hero .nav a:hover, :root[data-theme="light"].on-hero .nav a[aria-current="page"], :root[data-theme="light"].on-hero .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.site-header, .site-header .nav a, .site-header .icon-btn, .brand__name { transition: background-color .25s ease, color .25s ease, box-shadow .25s ease; }

/* Review H1 tail + quick answers (FAQ) */
.rv-hero__title span { font-style: italic; font-weight: 500; font-size: .56em; color: #ff9cb4; letter-spacing: -.01em; white-space: nowrap; }
.faq { margin-top: 36px; }
.faq > h2 { margin-bottom: 14px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 2px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 500 22px/1 var(--sans); color: var(--rose); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary h3 { margin: 0; font: 600 17px/1.35 var(--sans); color: var(--ink); }
.faq details p { margin: 0 2px 18px; color: var(--ink-2); }

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

/* Ranked list (Top rated hub) */
.ranklist { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.rank { display: grid; grid-template-columns: 56px 96px minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 16px 22px 16px 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.rank__n { font: 700 44px/1 var(--serif); text-align: center; color: transparent; -webkit-text-stroke: 1.5px var(--rose); font-variant-numeric: tabular-nums; }
.rank__img { width: 96px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow-1); }
.rank__body { min-width: 0; display: grid; gap: 6px; }
.rank__title { margin: 0; font: 600 21px/1.25 var(--serif); }
.rank__title a:hover { color: var(--rose); }
.rank__meta { margin: 0; font-size: 13px; color: var(--muted); }
.rank__verdict { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.rank .chips { margin-top: 4px; }
.rank .chip { height: 28px; font-size: 12px; }
.rank__score { display: grid; justify-items: center; gap: 8px; }
.rank__score a { font: 600 12.5px var(--sans); color: var(--rose); white-space: nowrap; }
@media (max-width: 720px) {
    .rank { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 14px; }
    .rank__n { display: none; }
    .rank__img { width: 72px; grid-row: span 2; }
    .rank__score { grid-column: 2; display: flex; align-items: center; gap: 12px; justify-items: start; }
    .rank__verdict { font-size: 14px; }
    .rank .chips { display: none; }
}
