/*
Theme Name: APKXHub
Description: Magazine-grid listing theme for app and game discovery. Dark navy, borderless, cyan accents.
Author: replica
Version: 1.0.7
Text Domain: apkxhub
*/

/* ---------- tokens ---------- */
:root {
	--xh-bg: #0b1220;
	--xh-panel: #101a2e;
	--xh-panel-2: #0d1526;
	--xh-line: #1b2a45;
	--xh-text: #e7eef9;
	--xh-dim: #8fa2c0;
	--xh-accent: #22d3ee;
	--xh-accent-ink: #062028;
	--xh-alert: #f87171;
	--xh-wrap: 1200px;
	--xh-radius: 12px;
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--xh-bg);
	color: var(--xh-text);
	font: 400 15.5px/1.65 "Sora", "Segoe UI", system-ui, sans-serif;
	letter-spacing: .1px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--xh-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-inline-start: 1.3em; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.xh-wrap { max-width: var(--xh-wrap); margin: 0 auto; padding: 0 22px; }
.xh-skip {
	position: absolute; inset-inline-start: 12px; top: -48px; z-index: 60;
	background: var(--xh-accent); color: var(--xh-accent-ink);
	padding: 8px 14px; border-radius: 8px; font-weight: 600;
	transition: top .15s ease;
}
.xh-skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--xh-accent); outline-offset: 2px; }
.xh-empty { color: var(--xh-dim); padding: 30px 0; }
.xh-count-note { color: var(--xh-dim); font-size: 13px; }

/* ---------- top bar ---------- */
.xh-top {
	position: sticky; top: 0; z-index: 40;
	background: rgba(11, 18, 32, .92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	box-shadow: 0 1px 0 0 var(--xh-accent);
}
.xh-top__row {
	display: flex; align-items: center; gap: 22px;
	min-height: 62px;
}
.xh-brand {
	display: inline-flex; align-items: center; gap: 9px;
	color: var(--xh-text); font-weight: 700; font-size: 19px;
	letter-spacing: .2px;
}
.xh-brand:hover { text-decoration: none; color: var(--xh-accent); }
.xh-brand__mark {
	width: 30px; height: 30px; border-radius: 8px;
	background: linear-gradient(135deg, #22d3ee 0%, #0ea5b7 100%);
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--xh-accent-ink); flex: 0 0 auto;
}
.xh-brand__mark svg { width: 18px; height: 18px; }
.xh-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.xh-nav a {
	display: block; padding: 8px 12px; border-radius: 8px;
	color: var(--xh-dim); font-size: 14px; font-weight: 500;
}
.xh-nav a:hover { color: var(--xh-text); background: var(--xh-panel); text-decoration: none; }
.xh-nav .current-menu-item > a,
.xh-nav .current_page_item > a { color: var(--xh-accent); }
.xh-top__side { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }

.xh-search { position: relative; }
.xh-search--bar input[type="search"] {
	width: 240px; height: 38px;
	background: var(--xh-panel); color: var(--xh-text);
	border: 1px solid var(--xh-line); border-radius: 10px;
	padding: 0 40px 0 14px; font-size: 13.5px;
}
.xh-search--bar input[type="search"]::placeholder { color: var(--xh-dim); }
.xh-search--bar input[type="search"]:focus { border-color: var(--xh-accent); outline: none; }
.xh-search button[type="submit"] {
	position: absolute; inset-inline-end: 5px; top: 50%; transform: translateY(-50%);
	width: 30px; height: 30px; border: 0; border-radius: 7px;
	background: transparent; color: var(--xh-dim);
	display: inline-flex; align-items: center; justify-content: center;
}
.xh-search button[type="submit"]:hover { color: var(--xh-accent); background: var(--xh-panel-2); }
.xh-search svg { width: 16px; height: 16px; }
.xh-suggest {
	position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 50;
	width: 320px; max-height: 420px; overflow: auto;
	background: var(--xh-panel); border: 1px solid var(--xh-line);
	border-radius: var(--xh-radius); box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
	display: none; padding: 6px;
}
.xh-suggest.is-open { display: block; }
.xh-suggest a {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 10px; border-radius: 8px; color: var(--xh-text);
}
.xh-suggest a:hover { background: var(--xh-panel-2); text-decoration: none; }
.xh-suggest img { width: 34px; height: 34px; border-radius: 7px; flex: 0 0 auto; }
.xh-suggest span { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xh-search--wide input[type="search"] {
	width: 100%; height: 50px; border-radius: 12px;
	font-size: 15px; padding: 0 50px 0 18px;
}

.xh-burger {
	display: none; width: 40px; height: 40px;
	background: var(--xh-panel); border: 1px solid var(--xh-line);
	border-radius: 9px; color: var(--xh-text);
	align-items: center; justify-content: center;
}
.xh-burger svg { width: 18px; height: 18px; }
.xh-sheet { display: none; border-top: 1px solid var(--xh-line); padding: 12px 0 18px; }
.xh-sheet-list { list-style: none; margin: 0; padding: 0; }
.xh-sheet-list a {
	display: block; padding: 11px 6px; color: var(--xh-text);
	border-bottom: 1px solid var(--xh-line); font-size: 15px;
}
.xh-sheet-list ul { list-style: none; padding-inline-start: 16px; }
body[data-nav="open"] .xh-sheet { display: block; }
/* sheet-borne lang switcher stays hidden until the phone breakpoint shows it */
.xh-sheet .xh-lang--sheet { display: none; }

/* ---------- ticker ---------- */
.xh-ticker {
	border-bottom: 1px solid var(--xh-line);
	background: var(--xh-panel-2);
}
.xh-ticker__row {
	display: flex; align-items: baseline; gap: 14px;
	padding: 12px 0;
}
.xh-ticker__label {
	color: var(--xh-accent); font-size: 11.5px; font-weight: 700;
	text-transform: uppercase; letter-spacing: 2px; flex: 0 0 auto;
}
.xh-ticker__desc { color: var(--xh-dim); font-size: 13.5px; margin: 0; }

/* ---------- hero (magazine lead) ---------- */
.xh-herozone { padding: 26px 0 6px; }
.xh-kicker {
	color: var(--xh-accent); font-size: 12px; font-weight: 700;
	text-transform: uppercase; letter-spacing: 2.4px;
	margin: 0 0 14px;
	display: flex; align-items: center; gap: 12px;
}
.xh-kicker::after { content: ""; flex: 1; height: 1px; background: var(--xh-line); }
.xh-hero {
	display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: 26px; align-items: stretch;
	background: var(--xh-panel); border-radius: 16px; overflow: hidden;
}
.xh-hero__media { position: relative; min-height: 300px; }
.xh-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xh-hero__body { padding: 30px 30px 26px 0; display: flex; flex-direction: column; }
.xh-hero__cat {
	color: var(--xh-accent); font-size: 11.5px; font-weight: 700;
	text-transform: uppercase; letter-spacing: 1.8px; margin: 0 0 10px;
}
.xh-hero__title { font-size: 30px; margin: 0 0 12px; }
.xh-hero__title a { color: var(--xh-text); }
.xh-hero__title a:hover { color: var(--xh-accent); text-decoration: none; }
.xh-hero__snippet { color: var(--xh-dim); font-size: 14.5px; margin: 0 0 18px; }
.xh-hero__meta { margin-top: auto; display: flex; align-items: center; gap: 16px; }
.xh-hero__meta .xh-ver { color: var(--xh-accent); font-weight: 600; font-size: 13px; }
.xh-hero__meta .xh-dev { color: var(--xh-dim); font-size: 13px; }
.xh-hero__cta { margin-top: 18px; }

.xh-btn {
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--xh-accent); color: var(--xh-accent-ink);
	font-weight: 700; font-size: 14px;
	padding: 11px 20px; border-radius: 10px; border: 0;
}
.xh-btn:hover { text-decoration: none; filter: brightness(1.08); }
.xh-btn svg { width: 16px; height: 16px; }

/* ---------- toplist strip ---------- */
.xh-topstrip { padding: 22px 0 4px; }
.xh-topstrip__row {
	display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr);
	gap: 12px; overflow-x: auto; padding-bottom: 8px;
	scrollbar-width: thin;
}
.xh-topcard {
	display: flex; align-items: center; gap: 12px;
	background: var(--xh-panel); border-radius: var(--xh-radius);
	padding: 12px 14px;
}
.xh-topcard:hover { background: var(--xh-panel-2); text-decoration: none; }
.xh-topcard img { width: 46px; height: 46px; border-radius: 9px; }
.xh-topcard .t {
	display: block; color: var(--xh-text); font-size: 13.5px; font-weight: 600;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	max-width: 130px;
}
.xh-topcard .m { display: flex; align-items: center; gap: 6px; color: var(--xh-dim); font-size: 12.5px; }

/* ---------- stars ---------- */
.xh-stars { display: inline-flex; gap: 1.5px; }
.xh-stars svg { width: 13px; height: 13px; fill: var(--xh-line); }
.xh-stars svg.on { fill: var(--xh-accent); }
.xh-stars svg.half { fill: url(#xh-half-grad); }

/* ---------- grid cards ---------- */
.xh-gridzone { padding: 10px 0 30px; }
.xh-grid {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}
.xh-card {
	background: var(--xh-panel); border-radius: var(--xh-radius);
	overflow: hidden; transition: transform .12s ease;
}
.xh-card:hover { transform: translateY(-2px); }
.xh-card__media { position: relative; aspect-ratio: 13 / 8; background: var(--xh-panel-2); }
.xh-card__media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.xh-card__flag {
	position: absolute; top: 10px; inset-inline-start: 10px;
	background: var(--xh-accent); color: var(--xh-accent-ink);
	font-size: 10.5px; font-weight: 800; text-transform: uppercase;
	letter-spacing: 1px; padding: 3px 9px; border-radius: 999px;
}
.xh-card__flag.is-update { background: #fbbf24; color: #3f2d04; }
.xh-card__body { padding: 14px 16px 16px; }
.xh-card__cat {
	color: var(--xh-accent); font-size: 11px; font-weight: 700;
	text-transform: uppercase; letter-spacing: 1.6px;
}
.xh-card__title {
	display: block; color: var(--xh-text); font-size: 16.5px; font-weight: 600;
	margin: 6px 0 8px;
}
.xh-card__title:hover { color: var(--xh-accent); text-decoration: none; }
.xh-card__meta {
	display: flex; align-items: center; gap: 10px;
	color: var(--xh-dim); font-size: 12.5px;
}
.xh-card__meta .sep { opacity: .5; }
.xh-card__rate { margin-top: 10px; display: flex; align-items: center; gap: 8px; }
.xh-card__rate .n { color: var(--xh-text); font-weight: 700; font-size: 13.5px; }
.xh-card__rate .v { color: var(--xh-dim); font-size: 12px; }

/* ---------- compact rows (archive / search / related) ---------- */
.xh-line {
	display: grid; grid-template-columns: 54px minmax(0, 1fr) auto;
	gap: 14px; align-items: center;
	padding: 13px 4px;
	border-bottom: 1px solid var(--xh-line);
}
.xh-line:hover { background: var(--xh-panel-2); }
.xh-line img { width: 54px; height: 54px; border-radius: 10px; }
.xh-line .t {
	display: block; color: var(--xh-text); font-weight: 600; font-size: 15px;
	margin: 0 0 3px;
}
.xh-line:hover .t { color: var(--xh-accent); }
.xh-line .m { color: var(--xh-dim); font-size: 12.5px; display: flex; gap: 10px; flex-wrap: wrap; }
.xh-line__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.xh-line__side .n { color: var(--xh-text); font-weight: 700; font-size: 14px; }

/* ---------- archive head ---------- */
.xh-archhead { padding: 30px 0 18px; border-bottom: 1px solid var(--xh-line); margin-bottom: 8px; }
.xh-archhead h1 { font-size: 28px; margin: 0 0 6px; }
.xh-archhead .xh-desc { color: var(--xh-dim); font-size: 14px; margin: 0 0 8px; }

/* ---------- crumbs ---------- */
.xh-crumbs { color: var(--xh-dim); font-size: 12.5px; margin: 18px 0 4px; }
.xh-crumbs .sep { margin: 0 7px; opacity: .55; }
.xh-crumbs [aria-current="page"] { color: var(--xh-text); }

/* ---------- single ---------- */
.xh-single { max-width: 760px; margin: 0 auto; padding-bottom: 40px; }
.xh-singlehead { padding: 26px 0 20px; }
.xh-singlehead__grid { display: flex; gap: 20px; align-items: flex-start; }
.xh-singlehead img { width: 96px; height: 96px; border-radius: 20px; flex: 0 0 auto; border: 1px solid var(--xh-line); }
.xh-singlehead h1 { font-size: 30px; margin: 0 0 10px; }
.xh-singlehead__dev { color: var(--xh-dim); font-size: 14px; margin: 0 0 12px; }
.xh-singlehead__dev b { color: var(--xh-text); }
.xh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.xh-chip {
	background: var(--xh-panel); border: 1px solid var(--xh-line);
	color: var(--xh-dim); font-size: 12px; font-weight: 600;
	padding: 4px 11px; border-radius: 999px;
}
.xh-chip.is-cat, .xh-chip.is-cat a { color: var(--xh-accent); border-color: rgba(34, 211, 238, .35); }
.xh-singlehead__date { color: var(--xh-dim); font-size: 12.5px; margin: 12px 0 0; }

.xh-dlbar {
	display: flex; align-items: center; gap: 18px;
	background: linear-gradient(90deg, rgba(34, 211, 238, .16), rgba(34, 211, 238, .05));
	border: 1px solid rgba(34, 211, 238, .4);
	border-radius: var(--xh-radius);
	padding: 14px 18px; margin: 0 0 22px;
}
.xh-dlbar__score { display: flex; align-items: center; gap: 10px; }
.xh-dlbar__num { font-size: 20px; font-weight: 800; color: var(--xh-accent); }
.xh-dlbar__num small { color: var(--xh-dim); font-weight: 500; font-size: 12px; }
.xh-dlbar__cta { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.xh-ratebox .xh-clicks { display: inline-flex; gap: 2px; margin-inline-start: 8px; }
.xh-ratebox .xh-clicks button {
	background: none; border: 0; padding: 2px; color: var(--xh-line);
}
.xh-ratebox .xh-clicks button svg { width: 17px; height: 17px; fill: currentColor; }
.xh-ratebox .xh-clicks button.is-lit { color: var(--xh-accent); }
.xh-ratebox .xh-count { color: var(--xh-dim); font-size: 12.5px; }
.xh-ratebox .xh-thanks { color: var(--xh-accent); font-size: 12.5px; font-weight: 600; }
.xh-ratebox.is-done .xh-clicks button { color: var(--xh-accent); }

.xh-stats {
	display: grid; grid-template-columns: repeat(3, 1fr);
	background: var(--xh-panel); border-radius: var(--xh-radius);
	overflow: hidden; margin: 0 0 26px;
}
.xh-stats > div {
	padding: 13px 16px; border: 0 solid var(--xh-line);
	border-inline-end-width: 1px; border-bottom-width: 1px;
}
.xh-stats > div:nth-child(3n) { border-inline-end-width: 0; }
.xh-stats > div:nth-child(n+4) { border-bottom-width: 0; }
.xh-stats dt { color: var(--xh-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px; margin: 0 0 3px; }
.xh-stats dd { margin: 0; color: var(--xh-text); font-weight: 600; font-size: 14px; }

.xh-intro { margin: 18px 0 22px; padding: 16px 18px; background: var(--xh-panel); border: 1px solid var(--xh-line); border-inline-start: 3px solid var(--xh-accent); border-radius: var(--xh-radius); }
.xh-intro-title { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--xh-accent); text-transform: uppercase; letter-spacing: .5px; }
.xh-intro-text { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--xh-dim); }
.xh-article { font-size: 15.5px; }
.xh-article h2 { font-size: 22px; margin: 1.5em 0 .6em; padding-top: .35em; }
.xh-article h3 { font-size: 17.5px; margin: 1.3em 0 .5em; }
.xh-article a { text-decoration: underline; text-decoration-color: rgba(34, 211, 238, .5); }

.xh-jump {
	display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 4px;
	margin: 0 0 18px;
	scrollbar-width: none;
}
.xh-jump a {
	flex: 0 0 auto; background: var(--xh-panel); color: var(--xh-dim);
	border: 1px solid var(--xh-line); border-radius: 999px;
	font-size: 12.5px; font-weight: 600; padding: 6px 13px;
}
.xh-jump a:hover { color: var(--xh-accent-ink); background: var(--xh-accent); border-color: var(--xh-accent); text-decoration: none; }

.xh-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 26px 0 6px; }
.xh-share__label { color: var(--xh-dim); font-size: 12px; text-transform: uppercase; letter-spacing: 1.6px; margin-inline-end: 4px; }
.xh-share a {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--xh-panel); border: 1px solid var(--xh-line);
	color: var(--xh-dim); font-size: 12px; font-weight: 600;
	padding: 7px 13px; border-radius: 999px;
}
.xh-share a:hover { color: var(--xh-text); border-color: var(--xh-accent); text-decoration: none; }
.xh-share svg { width: 14px; height: 14px; }

.xh-authorbox {
	display: flex; gap: 14px; align-items: center;
	background: var(--xh-panel); border-radius: var(--xh-radius);
	padding: 16px 18px; margin: 26px 0;
}
.xh-authorbox img { border-radius: 50%; }
.xh-authorbox .who { margin: 0 0 2px; color: var(--xh-dim); font-size: 12.5px; }
.xh-authorbox .who span { color: var(--xh-accent); text-transform: uppercase; font-size: 10.5px; letter-spacing: 1.4px; margin-inline-end: 8px; }
.xh-authorbox p:last-child { margin: 0; color: var(--xh-dim); font-size: 13px; }

.xh-relstrip { margin: 30px 0 10px; }
.xh-relgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.xh-relcard {
	background: var(--xh-panel); border-radius: var(--xh-radius);
	padding: 15px 16px;
}
.xh-relcard:hover { background: var(--xh-panel-2); text-decoration: none; }
.xh-relcard .t { display: block; color: var(--xh-text); font-weight: 600; font-size: 14px; margin: 0 0 4px; }
.xh-relcard .m { color: var(--xh-dim); font-size: 12px; }

.xh-flagbtn {
	display: inline-flex; align-items: center; gap: 6px;
	background: none; border: 1px solid var(--xh-line); border-radius: 999px;
	color: var(--xh-dim); font-size: 12.5px; font-weight: 600;
	padding: 7px 14px;
}
.xh-flagbtn:hover { color: var(--xh-alert); border-color: var(--xh-alert); }
.xh-flagbtn svg { width: 13px; height: 13px; fill: currentColor; }

/* ---------- pager ---------- */
.xh-pagerwrap { padding: 8px 0 40px; }
.xh-pager { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.xh-pager li { display: contents; }
.xh-pager a, .xh-pager .xh-here, .xh-pager .dots {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 38px; height: 38px; padding: 0 12px;
	background: var(--xh-panel); border: 1px solid var(--xh-line);
	border-radius: 9px; color: var(--xh-dim); font-size: 13.5px; font-weight: 600;
}
.xh-pager a:hover { color: var(--xh-accent); border-color: var(--xh-accent); text-decoration: none; }
.xh-pager .xh-here { background: var(--xh-accent); color: var(--xh-accent-ink); border-color: var(--xh-accent); }
.xh-pager .dots { border: 0; background: none; }

/* ---------- comments ---------- */
.xh-comments { margin-top: 30px; }
.xh-comments .xh-sechead h2 { font-size: 19px; }
.xh-comments .comment-list { list-style: none; margin: 0 0 20px; padding: 0; }
.xh-comments .comment-list .comment { border-bottom: 1px solid var(--xh-line); padding: 14px 0; }
.xh-comments .comment-list .children { list-style: none; padding-inline-start: 24px; }
.xh-comments .commentauthor { color: var(--xh-text); font-weight: 600; }
.xh-comments .comment-meta { color: var(--xh-dim); font-size: 12px; margin-inline-start: 8px; }
.xh-commentform label { display: block; color: var(--xh-dim); font-size: 13px; margin: 10px 0 4px; }
.xh-commentform input[type="text"], .xh-commentform input[type="email"], .xh-commentform input[type="url"], .xh-commentform textarea {
	width: 100%; background: var(--xh-panel); color: var(--xh-text);
	border: 1px solid var(--xh-line); border-radius: 9px; padding: 10px 12px; font-size: 14px;
}
.xh-commentform input[type="submit"] {
	background: var(--xh-accent); color: var(--xh-accent-ink); border: 0;
	font-weight: 700; padding: 11px 22px; border-radius: 9px; margin-top: 10px;
}

/* ---------- footer ---------- */
.xh-foot { border-top: 1px solid var(--xh-line); background: var(--xh-panel-2); margin-top: 30px; }
.xh-foot__cols {
	display: grid; grid-template-columns: 2fr 1fr 1fr;
	gap: 30px; padding: 34px 0 26px;
}
.xh-foot__brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; color: var(--xh-text); margin-bottom: 10px; }
.xh-foot__brand .xh-brand__mark { width: 26px; height: 26px; }
.xh-foot__desc { color: var(--xh-dim); font-size: 13.5px; margin: 0; max-width: 420px; }
.xh-foot h4 { color: var(--xh-text); font-size: 12px; text-transform: uppercase; letter-spacing: 1.8px; margin: 0 0 12px; }
.xh-foot ul { list-style: none; margin: 0; padding: 0; }
.xh-foot ul li { margin: 0 0 8px; }
.xh-foot ul a { color: var(--xh-dim); font-size: 13.5px; }
.xh-foot ul a:hover { color: var(--xh-accent); text-decoration: none; }
.xh-foot__legal {
	display: flex; align-items: center; justify-content: space-between; gap: 14px;
	border-top: 1px solid var(--xh-line); padding: 14px 0 20px;
	color: var(--xh-dim); font-size: 12.5px;
}
.xh-lang { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--xh-line); border-radius: 999px; background: var(--xh-panel-2); }
.xh-lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 3px 9px; border-radius: 999px; color: var(--xh-dim); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; line-height: 1.6; }
.xh-lang a:hover { color: var(--xh-text); background: var(--xh-panel); }
.xh-lang a.is-current { color: var(--xh-accent-ink); background: var(--xh-accent); }

/* ---------- floating bits ---------- */
.xh-up {
	position: fixed; inset-inline-start: 18px; bottom: 18px; z-index: 30;
	width: 42px; height: 42px; border-radius: 10px;
	background: var(--xh-accent); color: var(--xh-accent-ink);
	border: 0; opacity: 0; pointer-events: none;
	transform: translateY(8px); transition: opacity .18s, transform .18s;
	display: inline-flex; align-items: center; justify-content: center;
}
.xh-up.is-on { opacity: 1; pointer-events: auto; transform: none; }
.xh-up svg { width: 17px; height: 17px; }

.xh-report {
	position: fixed; inset: 0; z-index: 80;
	background: rgba(4, 8, 16, .72);
	display: none; align-items: center; justify-content: center; padding: 20px;
}
.xh-report.is-open { display: flex; }
.xh-report__card {
	width: 100%; max-width: 420px;
	background: var(--xh-panel); border: 1px solid var(--xh-line);
	border-radius: 14px; padding: 22px; position: relative;
}
.xh-report__card h3 { font-size: 17px; margin: 0 0 12px; }
.xh-report__close {
	position: absolute; top: 12px; inset-inline-end: 12px;
	width: 32px; height: 32px; border-radius: 8px;
	background: var(--xh-panel-2); border: 1px solid var(--xh-line);
	color: var(--xh-dim); display: inline-flex; align-items: center; justify-content: center;
}
.xh-report__close svg { width: 14px; height: 14px; }
.xh-report__card label { display: block; color: var(--xh-dim); font-size: 13.5px; margin: 0 0 8px; }
.xh-report__card textarea {
	width: 100%; background: var(--xh-panel-2); color: var(--xh-text);
	border: 1px solid var(--xh-line); border-radius: 9px;
	padding: 10px 12px; font-size: 13.5px; margin: 6px 0 12px;
}
.xh-report__card input[type="submit"] {
	background: var(--xh-accent); color: var(--xh-accent-ink);
	border: 0; font-weight: 700; padding: 10px 20px; border-radius: 9px;
}
.xh-thanks { color: var(--xh-accent); font-weight: 600; font-size: 13.5px; }

/* ---------- generic page / 404 ---------- */
.xh-page { max-width: 820px; margin: 0 auto; padding-bottom: 40px; }
.xh-pagehead { padding: 28px 0 6px; }
.xh-pagehead h1 { font-size: 30px; margin: 0; }

.xh-404 { max-width: 640px; margin: 0 auto; padding: 70px 0 60px; text-align: center; }
.xh-404 code {
	color: var(--xh-accent); font-size: 40px; font-weight: 800; letter-spacing: 4px;
	display: block; margin-bottom: 12px;
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
	.xh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.xh-relgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
	.xh-nav { display: none; }
	.xh-search--bar input[type="search"] { width: 150px; }
	.xh-burger { display: inline-flex; }
	.xh-hero { grid-template-columns: 1fr; }
	.xh-hero__media { min-height: 210px; }
	.xh-hero__body { padding: 0 22px 24px; }
	.xh-foot__cols { grid-template-columns: 1fr; gap: 22px; }
	.xh-foot__legal { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 620px) {
	.xh-grid { grid-template-columns: 1fr; }
	.xh-relgrid { grid-template-columns: 1fr; }
	.xh-search--bar { display: none; }
	.xh-stats { grid-template-columns: repeat(2, 1fr); }
	.xh-stats > div:nth-child(3n) { border-inline-end-width: 1px; }
	.xh-stats > div:nth-child(2n) { border-inline-end-width: 0; }
	.xh-stats > div:nth-child(n+4) { border-bottom-width: 1px; }
	.xh-stats > div:nth-child(n+5) { border-bottom-width: 0; }
	.xh-singlehead__grid { flex-direction: column; }
	.xh-dlbar { flex-wrap: wrap; }
	.xh-dlbar__cta { margin-inline-start: 0; width: 100%; }
	.xh-dlbar__cta .xh-btn { width: 100%; justify-content: center; }
	.xh-hero__title { font-size: 24px; }
	.xh-singlehead h1 { font-size: 25px; }
	/* brand + lang pills + burger cannot share one row on phones */
	.xh-lang { display: none; }
	/* the drawer carries the language switcher instead */
	.xh-sheet .xh-lang--sheet { display: inline-flex; margin: 10px 6px 0; }
	.xh-sheet .xh-lang--sheet a.is-current { color: var(--xh-accent-ink); background: var(--xh-accent); }
	.xh-brand { min-width: 0; }
	.xh-top__row > * { flex-shrink: 1; }
}

/* ===== RTL：方向性图形与正文（RTL 试点 P2-B3，2026-11-17） =====
   用 html[dir="rtl"] 而不是 :dir()：旧版 Android WebView 不认后者；LTR 下这些规则不生效。
   本皮肤没有下载页（/download/{id}/ 302 到发布方）；这里覆盖：分页 ‹/› 镜像、
   正文（模板改不到）容器级 plaintext、评论同意行。 */
html[dir="rtl"] .xh-pager a.prev,html[dir="rtl"] .xh-pager a.next{display:inline-block;transform:scaleX(-1)}
html[dir="rtl"] .comment-form-cookies-consent{direction:ltr;unicode-bidi:isolate}

/* ===== RTL: alignment + form passthrough (2026-11-18 sweep) ===== */
/* 0) No per-element dir="auto" on block text: a Latin title would resolve the
      block itself to ltr, and text-align:start would then land on the left of
      an RTL page (the 2026-11-17 "everything drifted" bug). Blocks inherit
      html[dir=rtl]; <bdi> stays the only inline isolation (numbers, sizes,
      dates, ratings). */
/* 3) No unicode-bidi:plaintext on body copy: it decides the paragraph
      direction from the first strong character, so an English paragraph is
      laid out ltr and hugs the left edge inside an RTL page. Inheriting rtl
      keeps start (the right edge) aligned while bidi still orders each run. */
/* 4) Form controls: dir="auto" is injected by mu-plugins/smc-rtl.php (v1.5).
      Empty value falls back to rtl so the placeholder stays on the right;
      once Latin is typed the field turns ltr, and padding-left keeps the text
      clear of the inline-start button (measured overlay + 8px). */
html[dir="rtl"] input[dir="auto"]:placeholder-shown,
html[dir="rtl"] textarea[dir="auto"]:placeholder-shown{direction:rtl}
html[dir="rtl"] #xh-q[dir="auto"]{padding-left:43px}
