/* ==========================================================================
   HentaiDiario — main.css
   Dark UI, mobile-first, plain CSS (no build step).
   Custom properties per theme contract.
   ========================================================================== */

:root {
	--bg: #0b0b0f;
	--surface: #16161d;
	--surface2: #1e1e27;
	--accent: #e3336d;
	--accent-2: #ff6b9d;
	--text: #e7e7ee;
	--muted: #9a9aa5;
	--radius: 12px;
	--radius-sm: 8px;
	--border: rgba(255, 255, 255, 0.07);
	--shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
		Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
	--header-h: 56px;
	--container: 1360px;
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

img,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
	display: block;
}

a {
	color: var(--accent-2);
	text-decoration: none;
}

a:hover {
	color: var(--accent);
}

h1,
h2,
h3,
h4 {
	line-height: 1.25;
	margin: 0 0 0.5em;
	font-weight: 700;
	color: var(--text);
}

h1 {
	font-size: 1.45rem;
}

h2 {
	font-size: 1.2rem;
}

h3 {
	font-size: 1rem;
}

p {
	margin: 0 0 1em;
}

ul,
ol {
	margin: 0 0 1em;
	padding-left: 1.25em;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

::selection {
	background: var(--accent);
	color: #fff;
}

/* Scrollbars (WebKit + Firefox) */
* {
	scrollbar-width: thin;
	scrollbar-color: var(--surface2) transparent;
}

::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-thumb {
	background: var(--surface2);
	border-radius: 4px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

/* --------------------------------------------------------------------------
   Accessibility: skip link + focus-visible
   -------------------------------------------------------------------------- */

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 10000;
	background: var(--accent);
	color: #fff;
	padding: 10px 18px;
	border-radius: 0 0 var(--radius-sm) 0;
	font-weight: 600;
}

.skip-link:focus {
	left: 0;
	color: #fff;
}

:focus {
	outline: none;
}

:focus-visible {
	outline: 2px solid var(--accent-2);
	outline-offset: 2px;
	border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Layout container
   -------------------------------------------------------------------------- */

.hd-container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 12px;
}

@media (min-width: 768px) {
	.hd-container {
		padding: 0 20px;
	}
}

.hd-main {
	min-height: 60vh;
	padding: 16px 0 40px;
}

/* --------------------------------------------------------------------------
   Header (sticky)
   -------------------------------------------------------------------------- */

.hd-header {
	position: sticky;
	top: 0;
	z-index: 900;
	background: rgba(11, 11, 15, 0.92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}

.hd-header__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: var(--header-h);
	max-width: var(--container);
	margin: 0 auto;
	padding: 8px 12px;
	flex-wrap: wrap;
}

@media (min-width: 768px) {
	.hd-header__inner {
		padding: 8px 20px;
		flex-wrap: nowrap;
	}
}

.hd-logo {
	font-size: 1.15rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--text);
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

.hd-logo:hover {
	color: var(--text);
}

.hd-logo__accent {
	color: var(--accent);
}

.hd-logo img {
	max-height: 32px;
	width: auto;
}

/* Search form (header + standalone) */

.hd-search {
	display: flex;
	align-items: center;
	flex: 1 1 220px;
	max-width: 520px;
	margin-left: auto;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	overflow: hidden;
	transition: border-color 0.15s ease;
}

.hd-search:focus-within {
	border-color: var(--accent);
}

.hd-search input[type="search"],
.hd-search input[type="text"] {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: 0;
	padding: 9px 16px;
	color: var(--text);
}

.hd-search input::placeholder {
	color: var(--muted);
}

.hd-search input:focus {
	outline: none;
}

.hd-search button {
	background: transparent;
	border: 0;
	padding: 8px 14px;
	color: var(--muted);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	transition: color 0.15s ease;
}

.hd-search button:hover {
	color: var(--accent-2);
}

.hd-search svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* Standalone (search page / 404) variant */
.hd-search--page {
	margin: 20px auto;
	max-width: 480px;
}

/* --------------------------------------------------------------------------
   Category nav (horizontal scroll)
   -------------------------------------------------------------------------- */

.hd-nav {
	background: var(--bg);
	border-bottom: 1px solid var(--border);
}

.hd-nav__scroll {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	max-width: var(--container);
	margin: 0 auto;
	padding: 8px 12px;
}

.hd-nav__scroll::-webkit-scrollbar {
	display: none;
}

@media (min-width: 768px) {
	.hd-nav__scroll {
		padding: 8px 20px;
	}
}

.hd-nav__link {
	flex: 0 0 auto;
	white-space: nowrap;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--surface);
	color: var(--muted);
	font-size: 0.85rem;
	font-weight: 600;
	border: 1px solid transparent;
	transition: background 0.15s ease, color 0.15s ease;
}

.hd-nav__link:hover {
	background: var(--surface2);
	color: var(--text);
}

.hd-nav__link.is-active,
.hd-nav__link[aria-current="page"] {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}

.hd-nav__link.is-active:hover,
.hd-nav__link[aria-current="page"]:hover {
	background: var(--accent-2);
	color: #fff;
}

/* --------------------------------------------------------------------------
   Section headings
   -------------------------------------------------------------------------- */

.hd-section-title {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 18px 0 12px;
	font-size: 1.15rem;
}

.hd-section-title::before {
	content: "";
	width: 4px;
	height: 1em;
	border-radius: 2px;
	background: var(--accent);
	align-self: center;
	flex: 0 0 auto;
}

.hd-section-title a {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--muted);
	margin-left: auto;
}

.hd-section-title a:hover {
	color: var(--accent-2);
}

.hd-page-title {
	margin: 14px 0 4px;
}

.hd-page-sub {
	color: var(--muted);
	font-size: 0.9rem;
	margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   Video grid + card
   -------------------------------------------------------------------------- */

.hd-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 14px 10px;
	margin: 12px 0 20px;
}

@media (min-width: 480px) {
	.hd-grid {
		gap: 16px 12px;
	}
}

.hd-card {
	position: relative;
	min-width: 0;
}

.hd-card__link {
	display: block;
	color: var(--text);
	border-radius: var(--radius);
}

.hd-card__link:hover {
	color: var(--text);
}

.hd-card__thumb {
	position: relative;
	margin: 0 0 8px;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--surface2);
}

.hd-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}

.hd-card__link:hover .hd-card__thumb img {
	transform: scale(1.05);
}

.hd-card__thumb-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 1.4rem;
	color: var(--muted);
	letter-spacing: 0.1em;
	background: linear-gradient(135deg, var(--surface2), var(--surface));
}

.hd-card__duration {
	position: absolute;
	right: 6px;
	bottom: 6px;
	padding: 2px 7px;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.78);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.02em;
}

.hd-card__title {
	margin: 0 0 2px;
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.15s ease;
}

.hd-card__link:hover .hd-card__title {
	color: var(--accent-2);
}

.hd-card__views {
	margin: 0;
	font-size: 0.75rem;
	color: var(--muted);
}

/* Empty state */

.hd-empty {
	background: var(--surface);
	border: 1px dashed var(--border);
	border-radius: var(--radius);
	padding: 36px 20px;
	text-align: center;
	color: var(--muted);
	margin: 20px 0;
}

.hd-empty p {
	margin: 0;
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */

.hd-breadcrumb {
	margin: 12px 0 4px;
	font-size: 0.8rem;
	color: var(--muted);
}

.hd-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hd-breadcrumb li {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
}

.hd-breadcrumb li + li::before {
	content: "";
	color: var(--muted);
	opacity: 0.6;
}

.hd-breadcrumb a {
	color: var(--muted);
}

.hd-breadcrumb a:hover {
	color: var(--accent-2);
}

.hd-breadcrumb [aria-current="page"],
.hd-breadcrumb span {
	color: var(--text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 260px;
}

/* --------------------------------------------------------------------------
   Single video layout
   -------------------------------------------------------------------------- */

.hd-single {
	max-width: 1080px;
	margin: 0 auto;
}

.hd-player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: var(--radius);
	overflow: hidden;
	margin: 12px 0 14px;
	box-shadow: var(--shadow);
}

/* Legacy fallback for browsers without aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
	.hd-player {
		height: 0;
		padding-bottom: 56.25%;
	}
}

.hd-player iframe,
.hd-player video,
.hd-player embed,
.hd-player object {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.hd-player__missing {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	background: var(--surface);
	font-size: 0.9rem;
	padding: 20px;
	text-align: center;
}

.hd-single__title {
	font-size: 1.25rem;
	margin: 0 0 8px;
}

@media (min-width: 768px) {
	.hd-single__title {
		font-size: 1.45rem;
	}
}

/* Meta row: views · duration · date */

.hd-meta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 16px;
	color: var(--muted);
	font-size: 0.85rem;
	margin: 0 0 14px;
}

.hd-meta-row span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.hd-meta-row svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
	opacity: 0.8;
}

.hd-meta-row strong {
	color: var(--text);
	font-weight: 600;
}

/* Taxonomy chips */

.hd-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 16px;
}

.hd-chips__label {
	color: var(--muted);
	font-size: 0.8rem;
	font-weight: 600;
	align-self: center;
	margin-right: 2px;
}

.hd-chip {
	display: inline-flex;
	align-items: center;
	padding: 5px 13px;
	border-radius: 999px;
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text);
	font-size: 0.8rem;
	font-weight: 600;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hd-chip:hover {
	background: var(--surface2);
	border-color: var(--accent);
	color: var(--accent-2);
}

.hd-chip--accent {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.hd-chip--accent:hover {
	background: var(--accent-2);
	border-color: var(--accent-2);
	color: #fff;
}

/* Description block + toggle */

.hd-desc {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px 18px;
	margin: 0 0 22px;
	color: var(--text);
	font-size: 0.92rem;
}

.hd-desc.is-collapsed .hd-desc__body {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hd-desc__body > :last-child {
	margin-bottom: 0;
}

.hd-desc-toggle {
	display: inline-block;
	margin-top: 10px;
	background: transparent;
	border: 0;
	padding: 0;
	color: var(--accent-2);
	font-weight: 600;
	font-size: 0.85rem;
	cursor: pointer;
}

.hd-desc-toggle:hover {
	color: var(--accent);
	text-decoration: underline;
}

/* Related videos */

.hd-related {
	margin-top: 26px;
}

/* --------------------------------------------------------------------------
   SEO text block (home + archives, page 1 only)
   -------------------------------------------------------------------------- */

.hd-seo-block {
	margin: 28px 0 8px;
	padding: 18px 20px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--muted);
	font-size: 0.86rem;
	line-height: 1.7;
}

.hd-seo-block h2 {
	color: var(--text);
	font-size: 1rem;
	margin-bottom: 0.6em;
}

.hd-seo-block p:last-child {
	margin-bottom: 0;
}

.hd-seo-block a {
	color: var(--accent-2);
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.hd-pagination {
	display: flex;
	justify-content: center;
	margin: 26px 0 8px;
}

.hd-pagination .nav-links,
.hd-pagination .page-numbers-wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}

.hd-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border-radius: var(--radius-sm);
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text);
	font-size: 0.85rem;
	font-weight: 600;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.hd-pagination a.page-numbers:hover {
	background: var(--surface2);
	border-color: var(--accent);
	color: var(--accent-2);
}

.hd-pagination .page-numbers.current {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
	cursor: default;
}

.hd-pagination .page-numbers.dots {
	background: transparent;
	border-color: transparent;
	color: var(--muted);
}

/* --------------------------------------------------------------------------
   Term cards (page-generos / series / estudios listings)
   -------------------------------------------------------------------------- */

.hd-term-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
	margin: 14px 0 22px;
}

.hd-term-card {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 3px;
	padding: 16px 14px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	transition: background 0.15s ease, border-color 0.15s ease,
		transform 0.15s ease;
}

.hd-term-card:hover {
	background: var(--surface2);
	border-color: var(--accent);
	color: var(--text);
	transform: translateY(-2px);
}

.hd-term-card__name {
	font-weight: 700;
	font-size: 0.92rem;
	margin: 0;
}

.hd-term-card:hover .hd-term-card__name {
	color: var(--accent-2);
}

.hd-term-card__count {
	font-size: 0.75rem;
	color: var(--muted);
	margin: 0;
}

/* --------------------------------------------------------------------------
   Static pages / entry content (Aviso legal, DMCA, 2257…)
   -------------------------------------------------------------------------- */

.hd-entry {
	max-width: 820px;
	margin: 0 auto;
}

.hd-entry-content {
	color: var(--text);
	font-size: 0.95rem;
}

.hd-entry-content h2 {
	margin-top: 1.6em;
}

.hd-entry-content h3 {
	margin-top: 1.3em;
}

.hd-entry-content blockquote {
	margin: 1em 0;
	padding: 10px 16px;
	border-left: 3px solid var(--accent);
	background: var(--surface);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	color: var(--muted);
}

.hd-entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1em 0;
	font-size: 0.88rem;
}

.hd-entry-content th,
.hd-entry-content td {
	padding: 8px 10px;
	border: 1px solid var(--border);
	text-align: left;
}

.hd-entry-content th {
	background: var(--surface);
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.hd-404 {
	text-align: center;
	padding: 48px 16px 24px;
}

.hd-404__code {
	font-size: 4.5rem;
	font-weight: 800;
	line-height: 1;
	margin: 0 0 8px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hd-404 h1 {
	font-size: 1.3rem;
	margin-bottom: 6px;
}

.hd-404 p {
	color: var(--muted);
	max-width: 480px;
	margin: 0 auto 16px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.hd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 22px;
	border-radius: 999px;
	border: 1px solid var(--accent);
	background: var(--accent);
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease,
		transform 0.1s ease;
	text-align: center;
}

.hd-btn:hover {
	background: var(--accent-2);
	border-color: var(--accent-2);
	color: #fff;
}

.hd-btn:active {
	transform: scale(0.98);
}

.hd-btn--ghost {
	background: transparent;
	border-color: var(--border);
	color: var(--muted);
}

.hd-btn--ghost:hover {
	background: var(--surface2);
	border-color: var(--muted);
	color: var(--text);
}

/* --------------------------------------------------------------------------
   Age gate (full-screen overlay)
   -------------------------------------------------------------------------- */

.hd-age-gate {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(5, 5, 8, 0.96);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.hd-age-gate.is-visible {
	display: flex;
}

/* Body lock while the gate is open */
body.hd-age-gate-open {
	overflow: hidden;
}

.hd-age-gate__card {
	width: 100%;
	max-width: 420px;
	background: var(--surface);
	border: 1px solid var(--accent);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 30px 26px;
	text-align: center;
}

.hd-age-gate__logo {
	font-size: 1.3rem;
	font-weight: 800;
	margin-bottom: 14px;
}

.hd-age-gate__logo .hd-logo__accent {
	color: var(--accent);
}

.hd-age-gate__title {
	font-size: 1.15rem;
	margin-bottom: 8px;
}

.hd-age-gate__text {
	color: var(--muted);
	font-size: 0.88rem;
	margin-bottom: 22px;
}

.hd-age-gate__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

@media (min-width: 480px) {
	.hd-age-gate__actions {
		flex-direction: row;
		justify-content: center;
	}
}

.hd-age-gate__actions .hd-btn {
	flex: 1;
}

.hd-age-gate__note {
	margin: 16px 0 0;
	font-size: 0.72rem;
	color: var(--muted);
	opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Search results / notices
   -------------------------------------------------------------------------- */

.hd-notice {
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius-sm);
	padding: 14px 16px;
	margin: 16px 0;
	color: var(--text);
	font-size: 0.9rem;
}

.hd-notice--muted {
	border-left-color: var(--muted);
	color: var(--muted);
}

/* --------------------------------------------------------------------------
   Footer (3-col responsive)
   -------------------------------------------------------------------------- */

.hd-footer {
	margin-top: 40px;
	background: var(--surface);
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 0.85rem;
}

.hd-footer__inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 30px 12px 20px;
	display: grid;
	grid-template-columns: 1fr;
	gap: 26px;
}

@media (min-width: 640px) {
	.hd-footer__inner {
		grid-template-columns: repeat(3, 1fr);
		padding: 36px 20px 24px;
	}
}

.hd-footer__col h4,
.hd-footer__title {
	color: var(--text);
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 12px;
}

.hd-footer__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hd-footer__col li {
	margin-bottom: 8px;
}

.hd-footer__col a {
	color: var(--muted);
}

.hd-footer__col a:hover {
	color: var(--accent-2);
}

.hd-footer__desc {
	margin: 0;
	line-height: 1.7;
}

.hd-footer__bottom {
	border-top: 1px solid var(--border);
	text-align: center;
	padding: 14px 12px;
	font-size: 0.78rem;
	color: var(--muted);
}

.hd-footer__bottom p {
	margin: 0 0 4px;
}

.hd-footer__bottom p:last-child {
	margin: 0;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	word-wrap: normal !important;
}

.hd-hidden {
	display: none !important;
}

.hd-text-muted {
	color: var(--muted);
}

.hd-text-center {
	text-align: center;
}

.hd-mt-0 {
	margin-top: 0;
}

.hd-mb-0 {
	margin-bottom: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* ==========================================================================
   APPENDED — template/CSS seam fixes
   Rules for class names used by the PHP templates that had no CSS. Additive
   only: nothing above this banner was modified. Same design tokens
   (--bg/--surface/--surface2/--accent/--accent-2/--text/--muted/--radius),
   mobile-first with a single ~768px breakpoint per section. All transitions
   added here are already neutralized by the global
   prefers-reduced-motion block above.
   ========================================================================== */

/* ---- Layout shell (header.php) ------------------------------------------ */

.hd-site {
	display: block;
	width: 100%;
}

/* Skip link: visually parked off-screen until keyboard focus */
.hd-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 10000;
	background: var(--accent);
	color: #fff;
	padding: 10px 18px;
	border-radius: 0 0 var(--radius-sm) 0;
	font-weight: 600;
}

.hd-skip-link:focus {
	left: 0;
	color: #fff;
}

/* Header inner row (mirrors .hd-header__inner) */
.hd-header-inner {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	min-height: var(--header-h);
	max-width: var(--container);
	margin: 0 auto;
	padding: 8px 12px;
}

/* Brand wordmark: "Hentai<span>Diario</span>" — accent on the span */
.hd-brand {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-size: 1.15rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--text);
	white-space: nowrap;
	border-radius: 6px;
}

.hd-brand:hover {
	color: var(--text);
}

.hd-brand span {
	color: var(--accent);
}

/* Search wrapper in the header (holds .hd-search-form) */
.hd-header-search {
	flex: 1 1 220px;
	min-width: 0;
	max-width: 520px;
	margin-left: auto;
}

/* Primary nav: horizontal scrollable pill list (mirrors .hd-nav__scroll) */
.hd-nav-list {
	display: flex;
	gap: 6px;
	list-style: none;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	max-width: var(--container);
	margin: 0 auto;
	padding: 8px 12px;
}

.hd-nav-list::-webkit-scrollbar {
	display: none;
}

.hd-nav-item {
	flex: 0 0 auto;
	margin: 0;
}

.hd-nav-link {
	display: inline-block;
	white-space: nowrap;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--surface);
	color: var(--muted);
	font-size: 0.85rem;
	font-weight: 600;
	border: 1px solid transparent;
	transition: background 0.15s ease, color 0.15s ease;
}

.hd-nav-link:hover {
	background: var(--surface2);
	color: var(--text);
}

.hd-nav-link.is-active,
.hd-nav-link[aria-current="page"] {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}

.hd-nav-link.is-active:hover,
.hd-nav-link[aria-current="page"]:hover {
	background: var(--accent-2);
	color: #fff;
}

@media (min-width: 768px) {
	.hd-header-inner {
		padding: 8px 20px;
		flex-wrap: nowrap;
	}

	.hd-nav-list {
		padding: 8px 20px;
	}
}

/* ---- Search form (searchform.php / search.php) --------------------------- */

.hd-search-form {
	display: flex;
	align-items: center;
	width: 100%;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	overflow: hidden;
	transition: border-color 0.15s ease;
}

.hd-search-form:focus-within {
	border-color: var(--accent);
}

.hd-search-input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: 0;
	padding: 9px 16px;
	color: var(--text);
}

.hd-search-input::placeholder {
	color: var(--muted);
}

.hd-search-input:focus {
	outline: none;
}

.hd-search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
	background: var(--accent);
	border: 0;
	padding: 9px 16px;
	color: #fff;
	cursor: pointer;
	transition: background 0.15s ease;
}

.hd-search-submit:hover {
	background: var(--accent-2);
}

.hd-search-submit:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -3px;
}

.hd-search-submit svg {
	display: block;
}

/* No-results state */
.hd-search-empty {
	margin: 18px 0;
}

.hd-search-suggestions {
	margin: 0 0 26px;
}

/* ---- Age gate children (template-parts/age-gate.php) ---------------------
   The parent .hd-age-gate (fixed inset overlay, display:flex when
   .is-visible) already exists above — only the children are added here. */

.hd-age-gate__overlay {
	position: absolute;
	inset: 0;
	background: rgba(5, 5, 8, 0.85);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.hd-age-gate__box {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 480px;
	background: var(--surface);
	border: 1px solid var(--accent);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 30px 26px;
	text-align: center;
}

/* Template logo span carries no class — accent it directly */
.hd-age-gate__logo span {
	color: var(--accent);
}

.hd-age-gate__desc {
	color: var(--muted);
	font-size: 0.88rem;
	line-height: 1.6;
	margin-bottom: 22px;
}

.hd-age-gate__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 22px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease,
		color 0.15s ease, transform 0.1s ease;
}

.hd-age-gate__btn:active {
	transform: scale(0.98);
}

.hd-age-gate__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.hd-age-gate__actions .hd-age-gate__btn {
	flex: 1;
}

.hd-age-gate__btn--accept {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.hd-age-gate__btn--accept:hover {
	background: var(--accent-2);
	border-color: var(--accent-2);
	color: #fff;
}

.hd-age-gate__btn--exit {
	background: var(--surface2);
	border-color: var(--border);
	color: var(--muted);
}

.hd-age-gate__btn--exit:hover {
	border-color: var(--muted);
	color: var(--text);
}

/* ---- Single video (single.php) ------------------------------------------- */

.hd-single-title {
	font-size: 1.25rem;
	margin: 10px 0 8px;
}

/* Player frame: the wrap owns the 16:9 box; the inner .hd-player (styled
   standalone above) is collapsed to fill it so the two never double up. */
.hd-player-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: var(--radius);
	overflow: hidden;
	margin: 12px 0 14px;
	box-shadow: var(--shadow);
}

@supports not (aspect-ratio: 16 / 9) {
	.hd-player-wrap {
		height: 0;
		padding-bottom: 56.25%;
	}
}

.hd-player-wrap .hd-player {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding-bottom: 0;
	border-radius: 0;
	box-shadow: none;
}

.hd-player-wrap iframe,
.hd-player-wrap video {
	width: 100%;
	height: 100%;
	border: 0;
}

/* Placeholder state (no embed yet): dimmed thumb + play circle + note */
.hd-player--placeholder img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.5;
}

.hd-play-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 76px;
	height: 76px;
	border-radius: 50%;
	background: rgba(227, 51, 109, 0.9);
	color: #fff;
	box-shadow: var(--shadow);
}

.hd-play-overlay svg {
	display: block;
	width: 40px;
	height: 40px;
}

.hd-player-unavailable {
	position: absolute;
	left: 50%;
	bottom: 14px;
	transform: translateX(-50%);
	margin: 0;
	max-width: 90%;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.72);
	color: var(--text);
	font-size: 0.8rem;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Meta row items (views · duration · date) */
.hd-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--muted);
}

.hd-meta-views,
.hd-meta-duration,
.hd-meta-date {
	white-space: nowrap;
}

/* Taxonomy chip groups */
.hd-single-taxonomies {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 18px;
}

.hd-chip-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.hd-chip-group .hd-chips {
	margin: 0;
}

.hd-chip-group-label {
	color: var(--muted);
	font-size: 0.8rem;
	font-weight: 600;
}

/* Count badge inside a chip (series chips on the front page) */
.hd-chip-count {
	margin-left: 4px;
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--muted);
}

/* Collapsible description: <details class="hd-desc-toggle hd-single-description">.
   .hd-desc-toggle above styles a text button; these equal-specificity rules
   come later in the cascade and reset the details element into a card. */
.hd-single-description {
	display: block;
	margin: 0 0 22px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 14px 18px;
	color: var(--text);
	font-size: 0.92rem;
}

/* Neutralize .hd-desc-toggle:hover (accent + underline) on the card */
.hd-single-description:hover {
	color: var(--text);
	text-decoration: none;
}

.hd-desc-summary {
	display: inline-block;
	list-style: none;
	color: var(--accent-2);
	font-weight: 600;
	font-size: 0.85rem;
	cursor: pointer;
	border-radius: 4px;
}

.hd-desc-summary::-webkit-details-marker {
	display: none;
}

.hd-desc-summary::after {
	content: " ▾";
}

.hd-single-description[open] .hd-desc-summary::after {
	content: " ▴";
}

.hd-desc-summary:hover {
	color: var(--accent);
}

.hd-desc-body {
	margin-top: 10px;
	color: var(--text);
}

.hd-desc-body > :last-child {
	margin-bottom: 0;
}

/* ---- Archive header (archive.php) ----------------------------------------- */

.hd-archive-header {
	margin: 0 0 16px;
}

.hd-archive-count {
	margin: 0 0 10px;
	color: var(--muted);
	font-size: 0.85rem;
}

.hd-archive-description {
	max-width: 820px;
	color: var(--muted);
	font-size: 0.9rem;
	line-height: 1.7;
}

.hd-archive-description p:last-child {
	margin-bottom: 0;
}

/* ---- Front page / generic sections ---------------------------------------- */

.hd-section {
	margin: 24px 0 30px;
}

.hd-page-subtitle {
	color: var(--muted);
	font-size: 0.9rem;
	max-width: 820px;
	margin: 0 0 16px;
}

.hd-page-intro {
	color: var(--muted);
	font-size: 0.92rem;
	line-height: 1.7;
	max-width: 820px;
	margin: 0 0 18px;
}

.hd-page-intro p:last-child {
	margin-bottom: 0;
}

/* Home H1 is a long SEO phrase — slightly tighter on mobile */
.hd-page-title--home {
	font-size: 1.3rem;
	margin-top: 16px;
}

.hd-seo-block-title {
	color: var(--text);
	font-size: 1rem;
	margin-bottom: 0.6em;
}

@media (min-width: 768px) {
	.hd-single-title {
		font-size: 1.45rem;
	}

	.hd-page-title--home {
		font-size: 1.55rem;
	}
}

/* ---- Footer (footer.php) ---------------------------------------------------
   Parent .hd-footer (surface bg, top border, muted text) exists above. */

.hd-footer-inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 30px 12px 20px;
}

.hd-footer-cols {
	display: grid;
	grid-template-columns: 1fr;
	gap: 26px;
}

.hd-footer-col {
	min-width: 0;
}

.hd-footer-title {
	color: var(--text);
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0 0 12px;
}

.hd-footer-about p {
	margin: 0;
	line-height: 1.7;
}

.hd-footer-brand,
.hd-footer-about .hd-footer-brand {
	margin: 0 0 10px;
	font-size: 1.05rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--text);
}

.hd-footer-brand span {
	color: var(--accent);
}

.hd-footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hd-footer-links li {
	margin-bottom: 8px;
}

.hd-footer-links a {
	color: var(--muted);
}

.hd-footer-links a:hover {
	color: var(--accent-2);
}

.hd-footer-bottom {
	margin-top: 26px;
	border-top: 1px solid var(--border);
	padding: 14px 0 0;
	text-align: center;
	font-size: 0.78rem;
	color: var(--muted);
}

.hd-footer-bottom p {
	margin: 0 0 4px;
}

.hd-footer-bottom p:last-child {
	margin: 0;
}

.hd-footer-rta a {
	color: var(--muted);
	font-weight: 600;
}

.hd-footer-rta a:hover {
	color: var(--accent-2);
}

.hd-footer-copy {
	color: var(--muted);
}

.hd-footer-disclaimer {
	font-size: 0.72rem;
	opacity: 0.8;
}

@media (min-width: 768px) {
	.hd-footer-inner {
		padding: 36px 20px 24px;
	}

	.hd-footer-cols {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ---- Term card children (page-generos.php) ---------------------------------
   Wrapper .hd-term-card (surface bg, radius, hover accent border) exists
   above; the templates use non-BEM child class names, added here. */

.hd-term-card-name {
	font-weight: 700;
	font-size: 0.92rem;
	transition: color 0.15s ease;
}

.hd-term-card:hover .hd-term-card-name {
	color: var(--accent-2);
}

.hd-term-card-count {
	font-size: 0.75rem;
	color: var(--muted);
}

/* ---- Utilities -------------------------------------------------------------- */

/* Standard visually-hidden (searchform label et al.) */
.hd-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ==========================================================================
   END APPENDED SECTION
   ========================================================================== */
