/*
 * Keyhole — design layer on top of the MyArcadeTheme markup.
 * Loaded after style.css and create.css (Theme Options colours).
 * All values come from Appearance > Customize > Keyhole (CSS variables).
 */

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
	--kh-accent: #e3b55b;
	--kh-on-accent: #1a1206;
	--kh-d-bg: #0c0f17; --kh-d-surface: #151b2b; --kh-d-text: #e8ebf3;
	--kh-l-bg: #f3f5f9; --kh-l-surface: #ffffff; --kh-l-text: #1b2233;
	--kh-b-new: #3fc6b4; --kh-b-hot: #ff5b6b; --kh-b-wt: #111111;
	--kh-fs: 15px; --kh-width: 1440px; --kh-radius: 14px; --kh-card: 160px; --kh-gap: 16px;
	--kh-font-head: 'Cinzel', serif;
	--kh-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	/* default = dark */
	--bg: var(--kh-d-bg); --surface: var(--kh-d-surface); --text: var(--kh-d-text);
	--shadow: 0 18px 40px rgba(0, 0, 0, .45);
	color-scheme: dark;
}
html[data-kh-mode="light"] {
	--bg: var(--kh-l-bg); --surface: var(--kh-l-surface); --text: var(--kh-l-text);
	--shadow: 0 14px 34px rgba(20, 30, 60, .12);
	color-scheme: light;
}
html[data-kh-mode="dark"] {
	--bg: var(--kh-d-bg); --surface: var(--kh-d-surface); --text: var(--kh-d-text);
	--shadow: 0 18px 40px rgba(0, 0, 0, .45);
	color-scheme: dark;
}
:root, html[data-kh-mode] {
	--muted: color-mix(in srgb, var(--text) 62%, var(--bg));
	--line: color-mix(in srgb, var(--text) 13%, transparent);
	--surface-2: color-mix(in srgb, var(--surface) 82%, var(--text) 6%);
	--accent-soft: color-mix(in srgb, var(--kh-accent) 16%, transparent);
	--glass: color-mix(in srgb, var(--bg) 82%, transparent);
}

/* ==========================================================================
   2. Base
   ========================================================================== */
body.kh {
	background: var(--bg) !important; /* beats the colour saved in Theme Options */
	color: var(--muted);
	font-family: var(--kh-font-body);
	font-size: var(--kh-fs);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}
body.kh.kh-bg-glow {
	background-image:
		radial-gradient(1100px 560px at 85% -10%, color-mix(in srgb, var(--kh-accent) 12%, transparent), transparent 70%),
		radial-gradient(900px 500px at -10% 25%, color-mix(in srgb, var(--kh-accent) 7%, transparent), transparent 70%) !important;
	background-attachment: fixed !important;
}
body.kh button, body.kh input, body.kh select, body.kh textarea { font-family: var(--kh-font-body); font-size: inherit; }
body.kh a { color: var(--text); transition: color .15s; }
body.kh a:hover { color: var(--kh-accent); }
body.kh h1, body.kh h2, body.kh h3, body.kh h4 { color: var(--text); }
body.kh ::selection { background: var(--kh-accent); color: var(--kh-on-accent); }
body.kh ::-webkit-scrollbar { width: 10px; height: 10px; background: var(--bg); }
body.kh ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 2px solid var(--bg); }
body.kh :focus-visible { outline: 2px solid var(--kh-accent); outline-offset: 2px; }
body.kh img { max-width: 100%; height: auto; }

/* Layout: fluid container up to the chosen width */
body.kh .cont { width: auto !important; max-width: var(--kh-width); margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
body.kh .all, body.kh .bdcn, body.kh .hdcn-2, body.kh .boxed-cont { background: transparent !important; }
body.kh .bdcn { padding-top: 24px; }
body.kh .bdcn > .cont > .cntcls { margin-left: 0; margin-right: 0; }

@media (min-width: 992px) {
	body.kh .bdcn > .cont > .cntcls { display: flex; gap: 28px; align-items: flex-start; }
	body.kh .bdcn > .cont > .cntcls.sidebar_left { flex-direction: row-reverse; }
	body.kh .bdcn > .cont > .cntcls::before, body.kh .bdcn > .cont > .cntcls::after { display: none; }
	body.kh .bdcn .main-cn { float: none; width: auto !important; flex: 1 1 auto; min-width: 0; padding: 0; }
	body.kh .bdcn .sdbr-cn { float: none; width: var(--kh-sidebar, 320px) !important; flex: 0 0 var(--kh-sidebar, 320px); padding: 0; }
	body.kh .bdcn .main-cn.cols-n12 { width: 100% !important; }
}
@media (max-width: 991px) {
	body.kh .bdcn .main-cn, body.kh .bdcn .sdbr-cn { float: none; width: 100% !important; padding: 0; }
	body.kh .bdcn .sdbr-cn { margin-top: 24px; }
}
/* Hide the right column on the front page (option) */
body.kh.home.kh-no-home-sidebar .bdcn .sdbr-cn { display: none; }
body.kh.home.kh-no-home-sidebar .bdcn .main-cn { width: 100% !important; flex-basis: 100%; }

/* ==========================================================================
   3. Header
   ========================================================================== */
body.kh .hdcn { background: transparent; box-shadow: none; }
@media (min-width: 992px) {
	/* lets the menu bar stick to the top of the whole page */
	body.kh.kh-sticky .hdcn { display: contents; }
	body.kh.kh-sticky .hdcn-3 { position: sticky; top: 0; z-index: 900; }
	body.kh.kh-sticky.admin-bar .hdcn-3 { top: 32px; }
}

/* Top bar */
body.kh .hdcn-1 { background: var(--surface) !important; border-bottom: 1px solid var(--line); font-size: 13px; }
body.kh .hdcn-1, body.kh .hdcn-1 a, body.kh .hdcn-1 span, body.kh .hdcn-1 div[class*="fa-"], body.kh .hdcn-1 h1 { color: var(--muted) !important; }
body.kh .hdcn-1 a:hover, body.kh .hdcn-1 strong { color: var(--text) !important; }
body.kh .menu-top ul { background: var(--surface) !important; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }

/* Logo row */
body.kh .hdcn-2 { padding: 10px 0; }
body.kh .hdcn-2 .logo img { max-height: var(--kh-logo-h, 160px); width: auto; }
/* Logo row: logo on the left, 728×90 banner on the right on the same line (like the old theme). */
body.kh .hdcn-2 > .cont { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
body.kh .hdcn-2 > .cont::before, body.kh .hdcn-2 > .cont::after { display: none; }
body.kh .hdcn-2 .logo { float: none; flex: none; max-width: none; margin: 0; text-align: left; }
body.kh .hdcn-2 .logo a { display: block; line-height: 0; }
body.kh .hdcn-2 .bnr728 { float: none; flex: none; width: 728px; max-width: 100%; height: 90px; margin: 0; line-height: 0; }
/* AdSense had no ad to show: close the space instead of leaving a white rectangle. */
body.kh .hdcn-2 .bnr728:has(ins.adsbygoogle[data-ad-status="unfilled"]), body.kh .hdcn-2 .bnr728:not(:has(ins)) { display: none; }
/* Not enough room next to the logo (tablet): banner centred under it. Phones: hidden (728 px is too wide). */
@media (max-width: 1079px) { body.kh .hdcn-2 > .cont { justify-content: center; } }
@media (max-width: 767px) { body.kh .hdcn-2 .bnr728 { display: none; } }

/* Menu bar */
body.kh .hdcn-3 {
	background: var(--glass) !important;
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	height: auto;
}
@media (min-width: 992px) {
	body.kh .hdcn-3 > .cont { display: flex; align-items: center; gap: 10px; min-height: 60px; }
	body.kh .hdcn-3 .menu { display: flex; align-items: center; flex: 1; min-width: 0; float: none; }
	body.kh .hdcn-3 .menu > ul { display: flex; flex-wrap: wrap; gap: 2px; float: none; }
	body.kh .menu > ul > li > a {
		height: auto; line-height: 1.2; padding: 10px 14px !important; border-radius: 10px;
		color: var(--muted) !important; font-weight: 600; font-size: 14px; text-transform: none; background: transparent !important;
	}
	body.kh .menu > ul > li:hover > a,
	body.kh .menu > ul > li.current-menu-item > a,
	body.kh .menu > ul > li.current-menu-ancestor > a { color: var(--text) !important; background: color-mix(in srgb, var(--text) 8%, transparent) !important; }
	body.kh .menu .sub-menu, body.kh .menu > ul > li > ul { background: var(--surface) !important; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
	body.kh .menu > ul > li li a { color: var(--text) !important; border-radius: 8px; }
	body.kh .menu .menu-item-has-children ul li:hover > a { background: var(--accent-soft) !important; color: var(--text) !important; }
}
body.kh .rndgame, body.kh a.rndgame {
	margin-left: auto; float: none; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
	height: 40px; line-height: 40px; padding: 0 18px !important; border-radius: 999px;
	background: var(--kh-accent) !important; color: var(--kh-on-accent) !important; font-weight: 700; font-size: 13px;
	box-shadow: 0 6px 22px color-mix(in srgb, var(--kh-accent) 35%, transparent);
}
body.kh .rndgame:before { color: inherit !important; }
body.kh .rndgame:hover { filter: brightness(1.08); }

/* Dark / light button */
.kh-mode-btn {
	display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; margin: 0;
	border-radius: 50%; border: 1px solid var(--line) !important; background: var(--surface) !important; color: var(--text) !important; cursor: pointer;
	transition: transform .2s, border-color .2s; box-shadow: none;
}
.kh-mode-btn:hover { border-color: var(--kh-accent); transform: rotate(15deg); }
.kh-mode-btn .kh-sun { display: none; }
html[data-kh-mode="dark"] .kh-mode-btn .kh-sun { display: block; }
html[data-kh-mode="dark"] .kh-mode-btn .kh-moon { display: none; }
.kh-mode-float { position: fixed; right: 16px; bottom: 76px; z-index: 950; }
@media (max-width: 991px) {
	body.kh .hdcn-3 > .cont { position: relative; }
	body.kh .hdcn-3 .kh-mode-btn { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; }
	body.kh .hdcn-3 .kh-mode-btn:hover { transform: translateY(-50%) rotate(15deg); }
}

/* Mobile menu (keeps the theme's own open/close script) */
@media (max-width: 991px) {
	body.kh .hdcn-3 .menu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 48px 8px 0; float: none; }
	body.kh .menu-botn {
		order: 1; width: auto !important; margin: 0 !important; height: 40px; padding: 0 16px !important; border-radius: 999px;
		color: var(--text) !important; background: var(--surface) !important; border: 1px solid var(--line) !important; font-weight: 700; text-align: left;
	}
	body.kh .menu-botn span, body.kh .menu-botn span:before { color: inherit !important; }
	body.kh .rndgame, body.kh a.rndgame { order: 2; margin: 0 0 0 auto; height: 40px; }
	body.kh .hdcn-3 .menu > ul { order: 3; flex-basis: 100%; background: var(--surface) !important; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
	body.kh .menu > ul li a { color: var(--text) !important; border-bottom: 1px solid var(--line); background: transparent !important; }
	body.kh .hdcn-2 { padding: 6px 0; }
	body.kh .hdcn-2 .logo { text-align: center; }
}
@media (max-width: 420px) {
	body.kh .rndgame, body.kh a.rndgame { padding: 0 14px !important; font-size: 0 !important; gap: 0; }
	body.kh .rndgame:before { font-size: 16px; }
}

/* Header games carousel */
body.kh .hdcn-4 { background: transparent !important; padding: 12px 0; height: auto !important; }
body.kh .hdcn-4 [class*="gmcn-smal"] {
	background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--kh-radius) - 2px);
	padding: 8px; height: auto; min-height: 0;
	display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-items: center;
	transition: border-color .2s;
}
body.kh .hdcn-4 [class*="gmcn-smal"]:hover { border-color: color-mix(in srgb, var(--kh-accent) 60%, transparent); }
body.kh .hdcn-4 [class*="gmcn-smal"] .gm-imag {
	grid-row: 1 / span 2; width: 56px !important; height: 56px !important; border-radius: 10px; overflow: hidden;
	position: relative; float: none; margin: 0; padding: 0; left: auto; top: auto;
}
body.kh .hdcn-4 [class*="gmcn-smal"] .gm-imag img { width: 56px; height: 56px; object-fit: cover; }
body.kh .hdcn-4 [class*="gmcn-smal"] .gm-titl,
body.kh .hdcn-4 [class*="gmcn-smal"] .gm-vpcn { position: static; float: none; margin: 0; padding: 0; width: auto; min-width: 0; align-self: end; }
body.kh .hdcn-4 [class*="gmcn-smal"] .gm-vpcn { align-self: start; display: flex; gap: 8px; font-size: 11px; color: var(--muted); }
body.kh .hdcn-4 [class*="gmcn-smal"] .gm-titl a {
	color: var(--text) !important; font-weight: 600; font-size: 13px; line-height: 1.25;
	display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/*
 * Show the carousel, the news ticker and the home slider straight away, without waiting
 * for their script (WP Rocket delays it until the visitor moves): no spinner any more.
 * Before the slider starts, the games sit in a row that can be swiped; the script then takes over.
 */
body.kh .hdcn-4 .mt-bx-loading, body.kh .lastgms-cn-clfl .mt-bx-loading { display: none !important; }
body.kh .hdgms-cn, body.kh .news-cn, body.kh #lastgmsload { visibility: visible !important; }
body.kh .hdgms-cn > ul.sldr-hd {
	display: flex; gap: 10px; height: auto; margin: 0; padding: 0 0 4px; list-style: none;
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
body.kh .hdgms-cn > ul.sldr-hd::-webkit-scrollbar { display: none; }
body.kh .hdgms-cn > ul.sldr-hd > li { flex: 0 0 210px; scroll-snap-align: start; list-style: none; }
body.kh .news-cn > ul.sldr-nw { height: 40px; overflow: hidden; margin: 0; }
body.kh .news-cn > ul.sldr-nw > li { height: 40px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; list-style: none; }
body.kh .lstgms > ul.sldr-gm > li:not(:first-child) { display: none; }
body.kh .hdgms-cn .bx-prev, body.kh .hdgms-cn .bx-next { background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--line); border-radius: 50%; }

/* News ticker */
body.kh .hdcn-5 { background: transparent !important; }
body.kh .news-cn { background: var(--surface) !important; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 8px 0 0; }
body.kh .news-cn:before { display: none; }
body.kh .news-cn > strong { background: var(--kh-accent) !important; color: var(--kh-on-accent) !important; border-radius: 999px; }
body.kh .news-cn > strong:after { display: none; }
body.kh .news-cn, body.kh .news-cn a, body.kh .news-cn li a { color: var(--muted) !important; }
body.kh .news-cn li a:hover { color: var(--text) !important; }

/* Ads: keep every ad container (old Theme Options slots), only tidy the spacing */
body.kh .bnr728, body.kh [class^="bnr"] { margin-left: auto; margin-right: auto; text-align: center; max-width: 100%; overflow: hidden; }

/* Keyhole ad slots */
.kh-ad { display: block; clear: both; width: 100%; max-width: 100%; margin: 22px auto; text-align: center; overflow: hidden; min-height: 50px; }
.kh-ad ins.adsbygoogle { margin: 0 auto; }
.kh-ad-label { display: block; margin: 0 0 6px; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); opacity: .75; }
.kh-ad-home-hero { margin: -12px auto 30px; }
.kh-ad-list-top { margin: 0 auto 20px; }
.kh-ad-game-top { margin: 0 auto 16px; }
.kh-ad-game-after { margin: 18px auto 6px; }
/* In-feed row: spans the whole grid line */
/* Category / tag / search grids: always 5 games per row on computer (like the old theme),
   even when the window is under 1200 px wide (the automatic grid would drop to 4) */
@media (min-width: 992px) { body.kh .main-cn ul.lst-gams.cate-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* Category / developer (tag) pages: the H1 title row lines up with the title of the first widget on the right
   (the widget title sits inside a framed box with inner padding) */
@media (min-width: 992px) { body.kh .main-cn .titl:first-child:has(h1) { padding-top: 15px; padding-bottom: 4px; } }
/* "Show / Sort" selectors on the same line as the title (the parent theme pushed them 10px down);
   row-gap keeps the spacing when they wrap to a second line on narrow screens */
body.kh .main-cn .titl .game_sorting { margin-top: 0; }
body.kh .main-cn .titl:has(.game_sorting) { row-gap: 10px; }
body.kh ul > li.kh-ad-row { grid-column: 1 / -1; max-width: none !important; width: 100% !important; float: none; list-style: none; }
body.kh ul > li.kh-ad-row .kh-ad { margin: 6px auto; padding: 12px; border-radius: var(--kh-radius); background: var(--surface); border: 1px dashed var(--line); }
/* Sidebar */
body.kh .sdbr-cn .kh-ad { margin: 0 0 22px; }
@media (min-width: 992px) {
	body.kh .sdbr-cn .kh-ad-sticky { position: sticky; top: 84px; }
	body.kh.admin-bar .sdbr-cn .kh-ad-sticky { top: 116px; }
}

/* ==========================================================================
   4. Section titles, boxes, sidebar
   ========================================================================== */
body.kh .titl {
	border: 0 !important; padding: 0 0 10px; margin: 0 0 18px;
	display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
	font-family: var(--kh-font-head); font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--text);
	text-transform: none; letter-spacing: .2px; position: relative;
}
body.kh .titl::after { content: ""; position: absolute; left: 0; bottom: 0; width: 46px; height: 3px; border-radius: 3px; background: var(--kh-accent); }
body.kh.kh-title-upper .titl { text-transform: uppercase; letter-spacing: 1px; }
body.kh .titl a { color: var(--text); }
body.kh .titl > div:first-child { font: inherit; color: inherit; }
/* Category / tag name as H1 (SEO), same look as before */
body.kh .titl > h1.kh-arch-title { font: inherit; color: inherit; margin: 0; padding: 0; line-height: inherit; letter-spacing: inherit; text-transform: inherit; display: block; }
body.kh .botn-mrgm, body.kh a.botn-mrgm {
	position: static; float: none; font-family: var(--kh-font-body); font-size: 12px; font-weight: 700; letter-spacing: .5px;
	padding: 6px 14px !important; border-radius: 999px; border: 1px solid var(--line); background: transparent !important;
	color: var(--kh-accent) !important; height: auto; line-height: 1.4;
}
body.kh .botn-mrgm:hover { background: var(--accent-soft) !important; }

body.kh .main-cn .blk-cn { margin-bottom: 36px; }

/* Sort select */
body.kh .mt-slct-cn { font-family: var(--kh-font-body); font-size: 13px; color: var(--muted); }
body.kh .mt-slct-cn .selecter-selected { background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: 999px; color: var(--text) !important; }
body.kh .mt-slct-cn .selecter-options { background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
body.kh .mt-slct-cn .selecter-item { color: var(--text) !important; background: transparent !important; border: 0 !important; }
body.kh .mt-slct-cn .selecter-item:hover, body.kh .mt-slct-cn .selecter-item.selected { background: var(--accent-soft) !important; }
/* The open sort list stays above the game cards and their badges */
body.kh .titl:has(.mt-slct-cn), body.kh .mt-slct-cn { position: relative; z-index: 100; }
body.kh .mt-slct-cn .selecter-options { z-index: 101; }
/* Sort button: text no longer stuck to the left edge; the list opens BELOW the button (not over it) */
body.kh .mt-slct-cn .selecter-selected { padding: 0 34px 0 14px !important; }
body.kh .mt-slct-cn .selecter-selected::after { right: 12px !important; }
body.kh .mt-slct-cn .selecter.open .selecter-selected { border-color: var(--kh-accent) !important; }
body.kh .mt-slct-cn .selecter-options {
	top: calc(100% + 6px) !important; left: auto !important; right: 0 !important;
	min-width: 100%; width: auto !important; white-space: nowrap; padding: 6px !important;
}
body.kh .mt-slct-cn .selecter-item { padding-left: 32px !important; padding-right: 14px !important; border-radius: 8px; } /* room for the check mark */

/* Sidebar widgets as cards */
body.kh .sdbr-cn .blk-cn {
	background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--kh-radius) + 4px);
	padding: 18px; margin-bottom: 22px;
}
body.kh .sdbr-cn .titl { font-size: 18px; margin-bottom: 14px; }
body.kh.kh-no-ad-titles .sdbr-cn .blk-cn:has(ins.adsbygoogle) > .titl,
body.kh.kh-no-ad-titles .sdbr-cn .widget_advertisement > .titl,
body.kh.kh-no-ad-titles #front_page_text.blk-cn:has(.adsbygoogle) > .titl { display: none; }

/* Small game lists (Most played, random, rated…) */
body.kh [class*="widget_style_"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 12px; margin: 0; }
body.kh [class*="widget_style_"] > li { float: none; width: auto !important; margin: 0; padding: 0; }
body.kh [class*="gmcn-smal-3"], body.kh [class*="gmcn-smal-2"] { padding: 0; height: auto; text-align: center; }
body.kh [class*="gmcn-smal-3"] .gm-imag, body.kh [class*="gmcn-smal-2"] .gm-imag {
	float: none; margin: 0 auto 6px; width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2) !important; position: relative;
}
body.kh [class*="gmcn-smal-3"] .gm-imag img, body.kh [class*="gmcn-smal-2"] .gm-imag img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
body.kh [class*="gmcn-smal-3"]:hover .gm-imag img, body.kh [class*="gmcn-smal-2"]:hover .gm-imag img { transform: scale(1.08); }
body.kh [class*="gmcn-smal-3"] .gm-titl, body.kh [class*="gmcn-smal-2"] .gm-titl { padding: 0; margin: 0; }
body.kh [class*="gmcn-smal-3"] .gm-titl a, body.kh [class*="gmcn-smal-2"] .gm-titl a,
body.kh .widget_mabp_recent_games [class*="gmcn-"] .gm-titl a {
	color: var(--text) !important; font-size: 12px; font-weight: 600; line-height: 1.3;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal;
}

/* Comments widget & generic widgets */
body.kh .sdbr-cn, body.kh .sdbr-cn p { color: var(--muted); }
body.kh .scp-widget, body.kh .scp-widget * { background-color: transparent !important; }
body.kh .scp-widget a { color: var(--kh-accent) !important; }
body.kh .tagcloud a { background: var(--surface-2) !important; color: var(--text) !important; border-radius: 999px; }
body.kh .tagcloud a:hover { background: var(--kh-accent) !important; color: var(--kh-on-accent) !important; }

/* ==========================================================================
   5. Game cards (grid)
   ========================================================================== */
body.kh :not(.bx-viewport) > ul.lst-gams,
body.kh ul.lst-gmct-cntcls-n6,
body.kh ul.lst-gamgrid {
	display: grid !important;
	/* on a small phone, two columns always fit the space (never wider than the screen) */
	grid-template-columns: repeat(auto-fill, minmax(min(var(--kh-card), calc(50% - var(--kh-gap) / 2)), 1fr));
	gap: var(--kh-gap);
	grid-auto-flow: row dense; /* an in-feed ad row never leaves a half-empty line */
	margin: 0 !important; padding: 0; width: auto !important; height: auto !important;
}
body.kh :not(.bx-viewport) > ul.lst-gams > li,
body.kh ul.lst-gmct-cntcls-n6 > li,
body.kh ul.lst-gamgrid > li {
	float: none !important; height: auto !important; padding: 0 !important; margin: 0 auto !important;
	/* thumbnails are 150x150: never stretch a card more than ~15% over the chosen size */
	width: 100% !important; max-width: calc(var(--kh-card) * 1.15);
	min-width: 0; /* long titles or the stars row can never push the card wider than its column */
}
body.kh [class*="gmcn-midl"], body.kh [class*="gmcn-midl"] .gm-text, body.kh [class*="gmcn-midl"] .gm-vpcn { min-width: 0; max-width: 100%; }
body.kh [class*="gmcn-midl"] .gm-vpcn { flex-wrap: wrap; }
body.kh :not(.bx-viewport) > ul.lst-gams::before, body.kh :not(.bx-viewport) > ul.lst-gams::after,
body.kh ul.lst-gmct-cntcls-n6::before, body.kh ul.lst-gmct-cntcls-n6::after { display: none; }

/* Card */
body.kh [class*="gmcn-midl"] {
	position: relative; padding: 0 !important; width: auto !important; height: auto !important;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--kh-radius); overflow: hidden;
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
body.kh [class*="gmcn-midl"] .gm-imag {
	position: relative !important; inset: auto; width: 100% !important; height: auto !important; aspect-ratio: 1 / 1;
	margin: 0; overflow: hidden; background: var(--surface-2) !important; display: block;
}
body.kh [class*="gmcn-midl"] .gm-imag > a { display: block; width: 100%; height: 100%; position: relative; }
/* Thumbnail shape option (images are cropped from the centre) */
body.kh.kh-card-shape-rect [class*="gmcn-midl"] .gm-imag { aspect-ratio: 4 / 3; }
body.kh.kh-card-shape-photo [class*="gmcn-midl"] .gm-imag { aspect-ratio: 3 / 2; }
/* 300×200 format: real big cards (about 300 px wide, 3 per row on computer, 2 on phone); the site gets wider to make room */
body.kh.kh-card-shape-photo { --kh-card: 290px; --kh-width: 1360px; }
@media (min-width: 992px) { body.kh.kh-card-shape-photo .main-cn ul.lst-gams.cate-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); } }
body.kh.kh-card-shape-photo [class*="gmcn-midl"] .gm-titl a { font-size: 14px; }
/* 185×125 format: about 185 px wide, 4 per row on computer (site width 1180 px) */
body.kh.kh-card-shape-small [class*="gmcn-midl"] .gm-imag { aspect-ratio: 185 / 125; }
body.kh.kh-card-shape-small { --kh-card: 180px; --kh-width: 1180px; }
@media (min-width: 992px) { body.kh.kh-card-shape-small .main-cn ul.lst-gams.cate-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
@media (min-width: 1180px) { body.kh.home.kh-card-shape-small .main-cn .blk-cn > ul.lst-gams > li:nth-child(n+9) { display: none; } }
/* 200×150 format: medium cards (about 200 px wide, 4 per row on computer); the site gets a bit wider */
body.kh.kh-card-shape-medium [class*="gmcn-midl"] .gm-imag { aspect-ratio: 4 / 3; }
body.kh.kh-card-shape-medium { --kh-card: 195px; --kh-width: 1250px; }
@media (min-width: 992px) { body.kh.kh-card-shape-medium .main-cn ul.lst-gams.cate-grid { grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); } }
@media (min-width: 1250px) { body.kh.home.kh-card-shape-medium .main-cn .blk-cn > ul.lst-gams > li:nth-child(n+9) { display: none; } }
/* Homepage category blocks show 10 games: with 3 per row, keep 9 so no game sits alone on the last row */
@media (min-width: 1290px) { body.kh.home.kh-card-shape-photo .main-cn .blk-cn > ul.lst-gams > li:nth-child(n+10) { display: none; } }
body.kh.kh-card-shape-wide [class*="gmcn-midl"] .gm-imag { aspect-ratio: 16 / 10; }
body.kh [class*="gmcn-midl"] .gm-imag img {
	position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover;
	opacity: 1 !important; transition: transform .35s ease;
}
body.kh [class*="gmcn-midl"] .gm-imag a:before { z-index: 1; }

/* Play button on hover */
body.kh.kh-card-play [class*="gmcn-midl"] .gm-imag > a::after {
	content: "\25B6"; position: absolute; left: 50%; top: 50%; z-index: 3; width: 52px; height: 52px; margin: -26px 0 0 -26px;
	border-radius: 50%; display: grid; place-items: center; font-size: 18px; padding-left: 3px; box-sizing: border-box;
	background: var(--kh-accent); color: var(--kh-on-accent);
	box-shadow: 0 0 0 8px color-mix(in srgb, var(--kh-accent) 28%, transparent);
	opacity: 0; transform: scale(.7); transition: opacity .2s, transform .2s;
}
body.kh.kh-card-play [class*="gmcn-midl"]:hover .gm-imag > a::after { opacity: 1; transform: scale(1); }

/* Hover effects */
body.kh.kh-card-hover-lift [class*="gmcn-midl"]:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--kh-accent) 55%, transparent); }
body.kh.kh-card-hover-lift [class*="gmcn-midl"]:hover .gm-imag img,
body.kh.kh-card-hover-zoom [class*="gmcn-midl"]:hover .gm-imag img { transform: scale(1.07); }
body.kh.kh-card-hover-glow [class*="gmcn-midl"]:hover { border-color: var(--kh-accent); box-shadow: 0 0 0 1px var(--kh-accent), 0 0 28px color-mix(in srgb, var(--kh-accent) 45%, transparent); }

/* Title BELOW the image (default) */
body.kh.kh-card-title-below [class*="gmcn-midl"] .gm-imag a:before { display: none; }
body.kh.kh-card-title-below [class*="gmcn-midl"] .gm-text,
body.kh.kh-card-title-below [class*="gmcn-midl"]:hover .gm-text {
	position: static !important; inset: auto; padding: 10px 12px 12px; background: none; transform: none; opacity: 1;
}
body.kh.kh-card-title-below [class*="gmcn-midl"] .gm-titl { text-shadow: none; margin: 0; }
body.kh.kh-card-title-below [class*="gmcn-midl"] .gm-titl a {
	color: var(--text) !important; font-size: 14px; font-weight: 600; line-height: 1.3;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em;
}
body.kh.kh-card-title-below [class*="gmcn-midl"]:hover .gm-titl a { color: var(--kh-accent) !important; }

/* Image only, infos OVER the image on hover (WEG style): title, stars and plays fade in on a dark veil.
   The text stays in the page for Google; clicks go through to the image link. */
body.kh.kh-card-title-overlay [class*="gmcn-midl"] .gm-imag a:before { display: none; }
body.kh.kh-card-title-overlay [class*="gmcn-midl"] .gm-text,
body.kh.kh-card-title-overlay [class*="gmcn-midl"]:hover .gm-text {
	position: absolute !important; inset: 0 !important; top: 0 !important; bottom: 0 !important; z-index: 2;
	display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
	padding: 10px !important; transform: none; pointer-events: none;
	background: linear-gradient(to top, rgba(0, 0, 0, .88), rgba(0, 0, 0, .45) 65%, rgba(0, 0, 0, .15));
	opacity: 0; transition: opacity .2s;
}
body.kh.kh-card-title-overlay [class*="gmcn-midl"]:hover .gm-text,
body.kh.kh-card-title-overlay [class*="gmcn-midl"]:focus-within .gm-text { opacity: 1; }
body.kh.kh-card-title-overlay [class*="gmcn-midl"] .gm-titl { margin: 0; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
body.kh.kh-card-title-overlay [class*="gmcn-midl"] .gm-titl a {
	color: #fff !important; font-size: 13px; font-weight: 700; line-height: 1.25; height: auto !important;
	display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
body.kh.kh-card-title-overlay [class*="gmcn-midl"] .gm-titl { height: auto !important; }
body.kh.kh-card-title-overlay [class*="gmcn-midl"] .gm-vpcn { margin-top: 2px; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 11px; line-height: 1; padding-right: 22px; /* stars, then plays: room for the "already played" ✓ */ }
body.kh.kh-card-title-overlay [class*="gmcn-midl"] .gm-vpcn > * { height: auto !important; min-height: 0; margin: 0; padding: 0; line-height: 12px !important; }
body.kh.kh-card-title-overlay [class*="gmcn-midl"] .gm-vpcn,
body.kh.kh-card-title-overlay [class*="gmcn-midl"] .gm-vpcn .gm-play { color: rgba(255, 255, 255, .85) !important; }
body.kh.kh-card-title-overlay [class*="gmcn-midl"] .gm-cate { display: none; }
/* Option: stars + plays always visible at the bottom of the image; the title still appears on hover */
body.kh.kh-card-title-overlay.kh-card-stats-always [class*="gmcn-midl"] .gm-text { opacity: 1; background: linear-gradient(to top, rgba(0, 0, 0, .82), rgba(0, 0, 0, .35) 32%, rgba(0, 0, 0, 0) 50%); }
body.kh.kh-card-title-overlay.kh-card-stats-always [class*="gmcn-midl"]:hover .gm-text,
body.kh.kh-card-title-overlay.kh-card-stats-always [class*="gmcn-midl"]:focus-within .gm-text { background: linear-gradient(to top, rgba(0, 0, 0, .88), rgba(0, 0, 0, .45) 65%, rgba(0, 0, 0, .15)); }
body.kh.kh-card-title-overlay.kh-card-stats-always [class*="gmcn-midl"] .gm-titl { opacity: 0; transition: opacity .2s; }
body.kh.kh-card-title-overlay.kh-card-stats-always [class*="gmcn-midl"]:hover .gm-titl,
body.kh.kh-card-title-overlay.kh-card-stats-always [class*="gmcn-midl"]:focus-within .gm-titl { opacity: 1; }
/* Option: no dark veil at rest, stars + plays sit on the image with a thin text shadow (the veil comes back on hover for the title) */
body.kh.kh-card-title-overlay.kh-card-stats-always.kh-card-stats-clear:not(.kh-card-title-always) [class*="gmcn-midl"]:not(:hover):not(:focus-within) .gm-text { background: transparent !important; }
body.kh.kh-card-title-overlay.kh-card-stats-always.kh-card-stats-clear [class*="gmcn-midl"] .gm-vpcn,
body.kh.kh-card-title-overlay.kh-card-stats-always.kh-card-stats-clear [class*="gmcn-midl"] .gm-vpcn * { color: #fff !important; text-shadow: 0 0 2px #000, 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, .7); }
body.kh.kh-card-title-overlay.kh-card-stats-always.kh-card-stats-clear [class*="gmcn-midl"] .gm-vote { filter: drop-shadow(0 0 1px #000) drop-shadow(0 1px 2px rgba(0, 0, 0, .8)); }
/* Option: title always visible at the bottom of the image (stars + plays too if that option is on, otherwise on hover) */
body.kh.kh-card-title-overlay.kh-card-title-always [class*="gmcn-midl"] .gm-text { opacity: 1; background: linear-gradient(to top, rgba(0, 0, 0, .88), rgba(0, 0, 0, .5) 40%, rgba(0, 0, 0, 0) 68%); }
body.kh.kh-card-title-overlay.kh-card-title-always [class*="gmcn-midl"] .gm-titl { opacity: 1 !important; padding-right: 20px; /* room for the "already played" ✓ */ }
body.kh.kh-card-title-overlay.kh-card-title-always.kh-no-card-stats-always [class*="gmcn-midl"] .gm-vpcn { display: none; }
body.kh.kh-card-title-overlay.kh-card-title-always.kh-no-card-stats-always [class*="gmcn-midl"]:is(:hover, :focus-within) .gm-vpcn { display: flex; }
body.kh.kh-card-title-overlay.kh-card-title-always [class*="gmcn-midl"]:is(:hover, :focus-within) .gm-text { background: linear-gradient(to top, rgba(0, 0, 0, .88), rgba(0, 0, 0, .45) 65%, rgba(0, 0, 0, .15)); }
/* Option: title just BELOW the image (always visible); the veil, stars and plays stay on the image */
body.kh.kh-card-title-overlay.kh-card-title-under [class*="gmcn-midl"] { padding-bottom: 42px !important; }
body.kh.kh-card-title-overlay.kh-card-title-under [class*="gmcn-midl"] .gm-text { bottom: 42px !important; opacity: 1 !important; background: transparent !important; }
body.kh.kh-card-title-overlay.kh-card-title-under [class*="gmcn-midl"]:is(:hover, :focus-within) .gm-text { background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, .3) 55%, rgba(0, 0, 0, .1)) !important; }
body.kh.kh-card-title-overlay.kh-card-title-under.kh-card-stats-always [class*="gmcn-midl"] .gm-text { background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0) 45%) !important; }
body.kh.kh-card-title-overlay.kh-card-title-under [class*="gmcn-midl"] .gm-titl {
	position: absolute; left: 0; right: 0; top: 100%; height: 42px; padding: 6px 8px 0 !important; margin: 0;
	opacity: 1 !important; text-shadow: none; pointer-events: auto;
}
body.kh.kh-card-title-overlay.kh-card-title-under [class*="gmcn-midl"] .gm-titl a { color: var(--text) !important; font-size: 12.5px; font-weight: 600; line-height: 1.25; }
body.kh.kh-card-title-overlay.kh-card-title-under [class*="gmcn-midl"]:hover .gm-titl a { color: var(--kh-accent) !important; }
body.kh.kh-card-title-overlay.kh-card-title-under [class*="gmcn-midl"] .gm-vpcn { opacity: 0; transition: opacity .2s; padding-right: 22px; }
body.kh.kh-card-title-overlay.kh-card-title-under [class*="gmcn-midl"]:is(:hover, :focus-within) .gm-vpcn,
body.kh.kh-card-title-overlay.kh-card-title-under.kh-card-stats-always [class*="gmcn-midl"] .gm-vpcn { opacity: 1; }
/* No ▶ button in this mode: it would cover the title */
body.kh.kh-card-title-overlay [class*="gmcn-midl"] .gm-imag > a::after { display: none !important; }

/* Category, rating, plays */
body.kh [class*="gmcn-midl"] .gm-cate { display: none; }
body.kh.kh-card-cat [class*="gmcn-midl"] .gm-cate { display: block; margin-bottom: 4px; }
body.kh .gm-cate a { background: var(--accent-soft) !important; color: var(--kh-accent) !important; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 2px 8px; }
body.kh.kh-no-card-rating [class*="gmcn-midl"] .gm-vpcn { display: none; }
body.kh [class*="gmcn-midl"] .gm-vpcn { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
body.kh [class*="gmcn-midl"] .gm-vpcn::after { display: none; }
body.kh [class*="gmcn-midl"] .gm-vpcn .gm-play, body.kh .gm-play { color: var(--muted) !important; float: none; padding: 0; }
body.kh .gm-play:before { color: var(--kh-accent) !important; }
body.kh [class*="gmcn-"] .gm-vote { float: none; }

/* Badges */
.kh-badges { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 4; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.kh-b {
	display: inline-block; font-family: var(--kh-font-body); font-size: 10.5px; line-height: 1; font-weight: 800; letter-spacing: .4px;
	text-transform: uppercase; padding: 5px 7px; border-radius: 6px; color: #fff; background: #333;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .25); white-space: nowrap;
}
.kh-b-new { background: var(--kh-b-new); color: #06241f; }
.kh-b-hot { background: var(--kh-b-hot); }
.kh-b-wt { background: var(--kh-b-wt); color: var(--kh-accent); border: 1px solid color-mix(in srgb, var(--kh-accent) 45%, transparent); }
[class*="gmcn-smal"] .kh-badges, .hdcn-4 .kh-badges { display: none; }

/* Larger list cards (category "large", half-width boxes) */
body.kh [class*="gmcn-larg"] {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--kh-radius); padding: 12px; overflow: hidden; height: auto;
	transition: border-color .2s, transform .2s;
}
body.kh [class*="gmcn-larg"]:hover { border-color: color-mix(in srgb, var(--kh-accent) 55%, transparent); transform: translateY(-2px); }
body.kh [class*="gmcn-larg"] .gm-imag { border-radius: calc(var(--kh-radius) - 4px); overflow: hidden; position: relative; background: var(--surface-2) !important; }
body.kh [class*="gmcn-larg"] .gm-imag img { width: 100%; object-fit: cover; }
body.kh [class*="gmcn-larg"] div.gm-titl a { color: var(--text) !important; font-weight: 700; }
body.kh [class*="gmcn-larg"] .gm-desc, body.kh [class*="gmcn-larg"] .gm-desc p { color: var(--muted); }
body.kh ul.lst-gmct { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: var(--kh-gap); margin: 0; }
body.kh ul.lst-gmct > li { float: none; width: auto !important; margin: 0; padding: 0; }

/* Pagination */
body.kh .wp-pagenavi { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; align-items: center; margin: 26px 0; }
body.kh .wp-pagenavi a, body.kh .wp-pagenavi span {
	border: 1px solid var(--line) !important; background: var(--surface) !important; color: var(--text) !important;
	border-radius: 9px; min-width: 34px; height: 34px; line-height: 1 !important; padding: 0 9px !important; margin: 0; text-align: center; font-size: 13px; white-space: nowrap;
	/* Centred vertically whatever line-height another stylesheet (WP-PageNavi) forces. */
	display: inline-flex !important; align-items: center; justify-content: center; box-sizing: border-box;
}
/* Compact pieces so the whole row fits on one line: "…" without a box, "Page 1 of 818" as plain text. */
body.kh .wp-pagenavi span.extend { border-color: transparent !important; background: transparent !important; min-width: 18px; padding: 0 2px !important; }
body.kh .wp-pagenavi span.pages { border-color: transparent !important; background: transparent !important; color: var(--muted) !important; padding: 0 6px 0 0 !important; }
@media (max-width: 1200px) { body.kh .wp-pagenavi span.pages { display: none !important; } }
body.kh .wp-pagenavi a:hover, body.kh .wp-pagenavi span.current { background: var(--kh-accent) !important; color: var(--kh-on-accent) !important; border-color: var(--kh-accent) !important; }

/* ==========================================================================
   6. Featured game (front page hero)
   ========================================================================== */
.kh-hero {
	position: relative; overflow: hidden; isolation: isolate;
	display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 10px;
	margin: 0 0 34px; border-radius: calc(var(--kh-radius) + 8px); border: 1px solid var(--line); background: var(--surface);
	min-height: 320px;
}
.kh-hero-bg { position: absolute; inset: -40px; z-index: -2; background-size: cover; background-position: center; filter: blur(42px) saturate(1.3); opacity: .55; }
.kh-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--surface) 28%, color-mix(in srgb, var(--surface) 55%, transparent) 70%, color-mix(in srgb, var(--surface) 25%, transparent)); }
.kh-hero-txt { padding: 40px 0 40px 42px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.kh-tag {
	align-self: flex-start; font-size: 11.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
	color: var(--kh-accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--kh-accent) 40%, transparent);
	padding: 6px 12px; border-radius: 999px;
}
body.kh .kh-hero-title { margin: 0; font-family: var(--kh-font-head); font-weight: 800; font-size: clamp(26px, 3.4vw, 44px); line-height: 1.08; }
body.kh .kh-hero-title a { color: var(--text); }
body.kh .kh-hero-title a:hover { color: var(--kh-accent); }
.kh-hero-desc { margin: 0; color: var(--muted); max-width: 560px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kh-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 14px; color: var(--muted); }
.kh-hero-meta strong { color: var(--text); }
.kh-hero-meta .gm-cate a { font-size: 12px; }
.kh-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.kh-btn {
	display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 999px;
	font-weight: 700; font-size: 15px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text) !important;
	text-decoration: none; transition: filter .15s, transform .15s;
}
.kh-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.kh-btn-accent { background: var(--kh-accent); border-color: var(--kh-accent); color: var(--kh-on-accent) !important; box-shadow: 0 8px 26px color-mix(in srgb, var(--kh-accent) 35%, transparent); }
.kh-hero-art { display: grid; place-items: center; padding: 30px 30px 30px 0; position: relative; min-width: 0; }
.kh-hero-art img { border-radius: calc(var(--kh-radius) + 4px); box-shadow: 0 26px 56px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08); transition: transform .3s; }

/* With a screenshot (any size): landscape frame, image cropped to fill it, small thumbnail on the corner */
.kh-hero-has-shot .kh-hero-shot { width: 100%; max-width: 520px; aspect-ratio: 750 / 385; height: auto; object-fit: cover; transform: rotate(1.5deg); }
.kh-hero-has-shot .kh-hero-art:hover .kh-hero-shot { transform: rotate(0) scale(1.02); }
.kh-hero-has-shot .kh-hero-mini {
	position: absolute; left: 4px; bottom: 14px; width: 92px; height: 92px; object-fit: cover;
	border: 3px solid var(--surface); border-radius: 18px; transform: rotate(-4deg);
}

/* Thumbnail only (150x150): shown at its natural size so it stays sharp */
.kh-hero-thumb-only { grid-template-columns: 1fr auto; }
.kh-hero-thumb-only .kh-hero-art { padding: 30px 46px 30px 10px; }
.kh-hero-thumb-only .kh-hero-thumb { width: 150px; height: 150px; object-fit: cover; transform: rotate(3deg) scale(1.1); }
.kh-hero-thumb-only .kh-hero-art:hover .kh-hero-thumb { transform: rotate(0) scale(1.12); }

/* ==========================================================================
   7. Game page, posts, comments, forms
   ========================================================================== */
/* Game window: square corners, and the old theme's colour (Theme Options / create.css) is kept. */
body.kh .game-cn { border-radius: 0 !important; overflow: hidden; }
body.kh .game-ctrl { border-radius: 0 !important; }
/*
 * The old theme puts the game at z-index 1051 (above the "lights off" veil, 1050), which is also above
 * the sticky menu (900): while scrolling, the game slid over the menu. The game now stays under the menu,
 * and goes back above the veil only while the lights are off.
 */
body.kh .game-play, body.kh .game-load { z-index: 5; }
body.kh:has(.lgtbxbg-pofi[style*="block"]) .game-play,
body.kh:has(.lgtbxbg-pofi[style*="block"]) .game-load { z-index: 1051; }
/* Option "Largeur de la fenêtre de jeu" = ancien thème: the game is at most 1100px wide, centred. */
body.kh.kh-game-width-classic .myarcade_game_wrap { max-width: 1100px; margin-left: auto; margin-right: auto; }
body.kh [class^="post-"] { color: var(--muted); }
body.kh [class^="post-"] header h1, body.kh [class^="post-"] header h2 { font-family: var(--kh-font-head); color: var(--text) !important; }
body.kh [class^="post-"] .txcn p { color: var(--muted); }
body.kh .game_opts > li > a, body.kh .game_opts > li > span > a { border-radius: 10px; }
body.kh .lst-cmnt .cmnt-cn, body.kh .cmnt-cn { background: var(--surface) !important; border: 1px solid var(--line); border-radius: var(--kh-radius); }
body.kh .cmnt-cn p { color: var(--muted); }

body.kh input[type="text"], body.kh input[type="email"], body.kh input[type="url"], body.kh input[type="search"],
body.kh input[type="password"], body.kh textarea, body.kh select {
	background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--line) !important; border-radius: 12px;
}
body.kh input:focus, body.kh textarea:focus { border-color: var(--kh-accent) !important; }
body.kh input[type="submit"], body.kh button[type="submit"], body.kh .comment-form .submit {
	background: var(--kh-accent) !important; color: var(--kh-on-accent) !important; border: 0; border-radius: 999px; font-weight: 700;
}

/* Search modal */
body.kh .modal { background: color-mix(in srgb, var(--bg) 92%, transparent) !important; }
body.kh .srchbx input { font-family: var(--kh-font-head); color: var(--text) !important; background: transparent !important; border: 0 !important; border-bottom: 2px solid var(--kh-accent) !important; border-radius: 0; }

/* Front page SEO text */
body.kh #front_page_text { color: var(--muted); background: transparent !important; }
body.kh #front_page_text h1, body.kh #front_page_text h2, body.kh #front_page_text h3 { font-family: var(--kh-font-head); color: var(--text); line-height: 1.25; margin: 22px 0 10px; }
body.kh #front_page_text h1 { font-size: clamp(22px, 2.4vw, 30px); margin-top: 6px; }
body.kh #front_page_text h2 { font-size: clamp(18px, 1.9vw, 22px); }
body.kh #front_page_text p { margin: 0 0 12px; line-height: 1.7; }
body.kh #front_page_text a { color: var(--kh-accent) !important; text-decoration: underline; text-underline-offset: 3px; }
body.kh .bdcn > .cont > #front_page_text { background: var(--surface) !important; border: 1px solid var(--line); border-radius: calc(var(--kh-radius) + 4px); padding: 28px 32px; margin: 10px 0 30px; }

/*
 * Text written in the WordPress editor often carries fixed colours/fonts
 * (e.g. black Comic Sans). Make it follow the dark/light mode so it is always readable.
 */
body.kh #front_page_text [style*="color"],
body.kh .txcn [style*="color"],
body.kh .entry-content [style*="color"],
body.kh .gm-desc [style*="color"],
body.kh .cat-desc [style*="color"],
body.kh .archive-description [style*="color"] { color: inherit !important; }
body.kh #front_page_text [style*="font-family"],
body.kh .txcn [style*="font-family"],
body.kh .entry-content [style*="font-family"],
body.kh .gm-desc [style*="font-family"] { font-family: inherit !important; }
body.kh #front_page_text [style*="background"],
body.kh .txcn [style*="background"],
body.kh .entry-content [style*="background"] { background: transparent !important; }
body.kh #front_page_text strong, body.kh .txcn strong, body.kh .entry-content strong { color: var(--text); }
body.kh #front_page_text a [style*="color"], body.kh .txcn a [style*="color"], body.kh .entry-content a [style*="color"] { color: var(--kh-accent) !important; }

/* ==========================================================================
   8. Footer, back to top, cookie notice
   ========================================================================== */
body.kh .ftcn { background: transparent !important; border-top: 1px solid var(--line); margin-top: 40px; }
body.kh .ftcn-1 { background: var(--surface) !important; padding: 34px 0 10px; }
body.kh .ftcn-1 .cntcls { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
body.kh .ftcn-1 .cntcls > .blk-cn { width: auto !important; float: none; padding: 0; }
/* Footer ad slot: full row when it has an ad, removed when empty (it pushed the menu to the middle). */
body.kh .ftcn-1 .cntcls > .bnr { grid-column: 1 / -1; }
body.kh .ftcn-1 .cntcls > .bnr:not(:has(*)) { display: none; }
body.kh .ftcn-2 { background: var(--bg) !important; border-top: 1px solid var(--line); padding: 16px 0; }
body.kh .ftcn, body.kh .ftcn a, body.kh .ftcn p { color: var(--muted) !important; }
body.kh .ftcn a:hover { color: var(--kh-accent) !important; }
body.kh .ftcn .titl { font-size: 16px; }
body.kh .botn-gtop { background: var(--kh-accent) !important; color: var(--kh-on-accent) !important; border-radius: 50%; box-shadow: var(--shadow); }
body.kh #cookie-notice .cookie-notice-container { background: var(--surface) !important; color: var(--text) !important; border-top: 1px solid var(--line); }
body.kh #cookie-notice .cn-button { background: var(--kh-accent) !important; color: var(--kh-on-accent) !important; border-radius: 999px !important; }

/* ==========================================================================
   8a. Top des jeux (widget / shortcode)
   ========================================================================== */
.kh-tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.kh-tabs::-webkit-scrollbar { display: none; }
body.kh .kh-tab {
	flex: 1 0 auto; height: 32px; padding: 0 12px; margin: 0; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap;
	background: transparent !important; color: var(--muted) !important; font: 600 12.5px/32px var(--kh-font-body); box-shadow: none;
}
body.kh .kh-tab:hover { color: var(--text) !important; }
body.kh .kh-tab[aria-selected="true"] { background: var(--kh-accent) !important; color: var(--kh-on-accent) !important; }
.kh-tabpanel[hidden] { display: none !important; }
.kh-top-empty { color: var(--muted); text-align: center; }

/* Ranked list */
.kh-top-rank { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.kh-top-rank > li { margin: 0; padding: 0; }
body.kh .kh-top-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; margin: 0 -8px; border-radius: 12px; color: var(--text); transition: background .15s; }
body.kh .kh-top-row:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.kh-top-row img { width: 52px; height: 52px; flex: none; border-radius: 10px; object-fit: cover; }
.kh-top-row .kh-rank { flex: none; width: 24px; text-align: center; font: 800 18px/1 var(--kh-font-head); color: var(--muted); opacity: .6; }
.kh-top-rank > li:nth-child(-n+3) .kh-rank { color: var(--kh-accent); opacity: 1; }
.kh-top-txt { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.kh-top-title { font-weight: 600; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kh-top-plays { font-size: 12px; color: var(--muted); }

/* Grid of cards with a rank number */
.kh-top-cards .kh-rank {
	position: absolute; left: 8px; bottom: 8px; z-index: 4; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px;
	display: grid; place-items: center; font: 800 15px/1 var(--kh-font-body); background: rgba(0, 0, 0, .7); color: #fff;
	backdrop-filter: blur(4px);
}
.kh-top-cards > li:nth-child(-n+3) .kh-rank { background: var(--kh-accent); color: var(--kh-on-accent); }

/* ==========================================================================
   8c. Game page details (screenshots, ratings, editor text, admin buttons, comments)
   ========================================================================== */

/* Screenshots: one clean grid of landscape tiles (no empty "play" boxes, no overlap with the video) */
body.kh ul.lst-scrs {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 44%), 1fr)); gap: 12px;
	margin: 0 !important; padding: 0; list-style: none;
}
body.kh ul.lst-scrs::after, body.kh ul.lst-scrs::before { display: none; }
body.kh ul.lst-scrs > li { float: none; width: auto !important; height: auto !important; padding: 0 !important; margin: 0; list-style: none; }
body.kh .lst-scrs [class*="gmcn-smal-3"] { padding: 0 !important; height: auto !important; background: none !important; position: relative; }
body.kh .lst-scrs .gm-imag:first-child { display: none !important; } /* unused "PLAY NOW" layer */
body.kh .lst-scrs .gm-imag {
	position: relative !important; left: auto; top: auto; display: block; width: 100% !important; height: auto !important;
	aspect-ratio: 16 / 10; margin: 0; border-radius: 12px; overflow: hidden; background: var(--surface-2) !important; border: 1px solid var(--line);
}
body.kh .lst-scrs .gm-imag > a { display: block; width: 100%; height: 100%; }
body.kh .lst-scrs .gm-imag img { width: 100% !important; height: 100% !important; object-fit: cover; opacity: 1 !important; }
body.kh .lst-scrs .gm-imag:hover img { transform: scale(1.05); }
body.kh .lst-scrs .gm-imag > a > span { background: color-mix(in srgb, var(--bg) 75%, transparent) !important; color: var(--text) !important; }

/* Ratings (WP-PostRatings): the "(x votes, average…)" text must never overlap the game */
body.kh .gm-vote { height: auto !important; line-height: 1.4; }
/* Game page: stars on the right of the title, as in the original theme */
@media (min-width: 666px) {
	body.kh .post-game > header .gm-vote { float: right; margin: 6px 0 0 16px; }
}
@media (max-width: 665px) {
	body.kh .post-game > header .gm-vote { display: block; margin: 6px 0 12px; text-align: center; }
	body.kh .post-game > header .wp-postratings { justify-content: center; }
}
body.kh .wp-postratings { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--muted); line-height: 1.4; }
body.kh .wp-postratings em { font-style: normal; }
body.kh .wp-postratings strong { color: var(--text); }
body.kh [class*="gmcn-"] .wp-postratings em, body.kh .hdcn-4 .wp-postratings em, body.kh .kh-hero .wp-postratings em { display: none; } /* cards: stars only */
body.kh [class*="gmcn-"] .wp-postratings { font-size: 0; }
@media (max-width: 600px) {
	body.kh [class^="post-"] header .wp-postratings em { font-size: 12px; }
	body.kh [class^="post-"] header h1 { font-size: clamp(24px, 7vw, 32px); line-height: 1.15; word-break: break-word; }
}

/* Game description: lists and quotes written in the editor stay readable */
body.kh .txcn, body.kh .txcn p, body.kh .txcn li, body.kh .txcn blockquote,
body.kh .entry-content li, body.kh #front_page_text li { color: color-mix(in srgb, var(--text) 80%, var(--bg)) !important; }
body.kh .txcn ul, body.kh .txcn ol { padding-left: 20px; }

/* Bullets and numbers in text written in the editor (the parent theme removes them everywhere).
   Only plain editor lists (no class, or the block editor's .wp-block-list): game grids and menus are untouched. */
body.kh :is(.txcn, .entry-content, .post-sngl, #front_page_text, .description, .textwidget) :is(ul:not([class]), ul.wp-block-list) { list-style: disc outside; padding-left: 22px; margin: 0 0 14px; }
body.kh :is(.txcn, .entry-content, .post-sngl, #front_page_text, .description, .textwidget) :is(ol:not([class]), ol.wp-block-list) { list-style: decimal outside; padding-left: 24px; margin: 0 0 14px; }
body.kh :is(.txcn, .entry-content, .post-sngl, #front_page_text, .description, .textwidget) :is(ul:not([class]), ul.wp-block-list, ol:not([class]), ol.wp-block-list) > li { display: list-item; list-style: inherit; float: none; width: auto; margin: 0 0 6px; line-height: 1.65; }
body.kh :is(.txcn, .entry-content, .post-sngl, #front_page_text, .description, .textwidget) :is(ul:not([class]), ul.wp-block-list) ul { list-style: circle outside; margin: 6px 0 0; }
body.kh :is(.txcn, .entry-content, .post-sngl, #front_page_text, .description, .textwidget) :is(ul:not([class]), ul.wp-block-list, ol:not([class]), ol.wp-block-list) > li::marker { color: var(--kh-accent); font-weight: 700; }
body.kh .txcn blockquote { border-left: 3px solid var(--kh-accent); background: var(--surface-2); border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 14px 0; }

/* "Edit / delete post" buttons (visible to admins only) */
body.kh .admin_actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin: 14px 0; }
body.kh .admin_actions .botn {
	background: var(--surface-2) !important; color: var(--text) !important; border: 1px solid var(--line) !important;
	border-radius: 999px; padding: 8px 16px !important; height: auto; line-height: 1.3; font-size: 13px; font-weight: 600;
}
body.kh .admin_actions .botn:hover { border-color: var(--kh-accent) !important; color: var(--kh-accent) !important; }

/* Comments (Secure Comments Pro and default WordPress) follow dark / light mode */
body.kh .scp-comments, body.kh .scp-widget, body.kh .scp-respond {
	--scp-text: var(--text); --scp-muted: var(--muted); --scp-border: var(--line);
	--scp-bg: var(--surface); --scp-soft: var(--surface); --scp-accent: var(--kh-accent);
	--scp-shadow: none;
}
body.kh .scp-respond, body.kh .comment-respond { background: var(--surface) !important; border: 1px solid var(--line) !important; color: var(--text); }
body.kh .scp-comment-list .scp-respond { background: var(--surface-2) !important; box-shadow: none; }
body.kh .scp-item--author > .scp-comment { background: color-mix(in srgb, var(--kh-accent) 6%, var(--surface)) !important; }
body.kh .scp-comment { background: var(--surface) !important; }
body.kh .comment-reply-title, body.kh .scp-form__title, body.kh .scp-comments h2, body.kh .scp-comments h3 { color: var(--text) !important; }
body.kh .scp-comments, body.kh .scp-comments p, body.kh .comment-respond label, body.kh .logged-in-as { color: var(--muted); }
body.kh .scp-comments a, body.kh .comment-respond a { color: var(--kh-accent) !important; }
body.kh .scp-field input, body.kh .scp-field textarea { background-color: var(--surface-2) !important; color: var(--text) !important; border-color: var(--line) !important; }
body.kh .scp-avatar { border-color: var(--surface) !important; }
body.kh .scp-secure { background: color-mix(in srgb, #10b981 14%, transparent) !important; border-color: color-mix(in srgb, #10b981 40%, transparent) !important; color: #10b981 !important; }

/* Sidebar: a block widget that only holds a heading becomes the title of the widget under it */
body.kh .sdbr-cn .blk-cn.widget_block:has(> .wp-block-heading:only-child) {
	background: none; border: 0; padding: 0 4px; margin-bottom: 10px;
}
body.kh .sdbr-cn .widget_block > .wp-block-heading:only-child {
	margin: 0; padding: 0 0 10px; position: relative; color: var(--text) !important;
	font-family: var(--kh-font-head) !important; font-weight: 700 !important; font-size: 18px !important; text-transform: none !important;
}
body.kh .sdbr-cn .widget_block > .wp-block-heading:only-child::after { content: ""; position: absolute; left: 0; bottom: 0; width: 46px; height: 3px; border-radius: 3px; background: var(--kh-accent); }
body.kh .sdbr-cn .wp-block-heading { color: var(--text); }
body.kh .wp-block-tag-cloud a, body.kh .sdbr-cn .tagcloud a {
	display: inline-block; margin: 0 4px 8px 0; padding: 6px 12px !important; border-radius: 999px; border: 1px solid var(--line) !important;
	background: var(--surface-2) !important; color: var(--text) !important; font-size: 13px !important; text-decoration: none;
}
body.kh .wp-block-tag-cloud a:hover { background: var(--kh-accent) !important; color: var(--kh-on-accent) !important; border-color: var(--kh-accent) !important; }

/* News ticker: icon inside the pill, game title bright, description muted */
body.kh .news-cn .bx-controls-direction a { background: transparent !important; color: var(--muted) !important; }
body.kh .hdcn-5 { height: auto !important; padding: 0 0 6px; }
body.kh .news-cn { position: relative; }
body.kh .news-cn > strong { display: inline-flex; align-items: center; gap: 6px; padding: 0 16px 0 14px !important; left: 0 !important; top: 0 !important; bottom: 0; height: auto !important; margin: 0 !important; }
body.kh .news-cn > strong::before { position: static !important; margin: 0 !important; width: auto !important; font-size: 14px; color: inherit !important; }
body.kh .news-cn li, body.kh .news-cn li span, body.kh .news-cn li > strong { color: var(--muted) !important; font-weight: 400; }
body.kh .news-cn li a { color: var(--text) !important; font-weight: 700; }
body.kh .news-cn li a:hover { color: var(--kh-accent) !important; }

body.kh .news-cn li { padding-right: 70px !important; }
body.kh .news-cn .bx-controls-direction a { width: 22px !important; height: 22px !important; line-height: 22px !important; top: 0 !important; bottom: 0 !important; margin: auto 0 !important; text-align: center; }
body.kh .news-cn .bx-prev { right: 36px !important; left: auto !important; }
body.kh .news-cn .bx-next { right: 10px !important; left: auto !important; }

/* Header carousel: arrows inside the bar, never on top of a game */
body.kh .hdgms-cn { padding: 0 44px !important; position: relative; }
body.kh .hdgms-cn .bx-prev, body.kh .hdgms-cn .bx-next {
	width: 32px !important; height: 32px !important; line-height: 30px !important; text-align: center; top: 0 !important; bottom: 0 !important; margin: auto 0 !important;
}
body.kh .hdgms-cn .bx-prev { left: -40px !important; right: auto !important; }
body.kh .hdgms-cn .bx-next { right: -40px !important; left: auto !important; }
body.kh .hdgms-cn .bx-controls-direction a.disabled { opacity: .35; }

/* "MORE GAMES" button next to a section title: always a readable pill (the old icon-only version overlapped the title) */
body.kh .titl { padding-right: 0; }
body.kh .titl a.botn-mrgm, body.kh .titl a.botn-mrgm:hover {
	position: static !important; display: inline-flex; align-items: center; gap: 6px; flex: none;
	font-size: 11.5px !important; padding: 6px 14px !important; height: auto !important; margin-left: auto;
}
body.kh .titl a.botn-mrgm::before {
	position: static !important; width: auto !important; height: auto !important; line-height: 1 !important;
	background: none !important; font-size: 10px !important; color: inherit !important;
}
@media (max-width: 420px) {
	body.kh .titl a.botn-mrgm, body.kh .titl a.botn-mrgm:hover { font-size: 0 !important; padding: 8px 10px !important; gap: 0; }
	body.kh .titl a.botn-mrgm::before { font-size: 12px !important; }
}

/* Sidebar ads: a box inside a widget box no longer squeezes the ad (300 px ads fit) */
body.kh .sdbr-cn .blk-cn .blk-cn { background: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; border-radius: 0; }
/* Ad boxes placed directly in the sidebar share the id #front_page_text with the homepage text (made transparent above): give them the same white box as the other widgets */
body.kh .sdbr-cn #front_page_text.blk-cn:not(.blk-cn .blk-cn) { background: var(--surface) !important; }
body.kh .sdbr-cn .blk-cn:has(.adsbygoogle), body.kh .sdbr-cn .blk-cn:has(iframe[id^="aswift"]), body.kh .sdbr-cn .widget_advertisement {
	padding-left: 0 !important; padding-right: 0 !important; text-align: center; overflow: visible;
}
body.kh .sdbr-cn .blk-cn:has(.adsbygoogle) .titl, body.kh .sdbr-cn .widget_advertisement .titl { margin-left: 18px; margin-right: 18px; text-align: left; }
body.kh .sdbr-cn ins.adsbygoogle { margin-left: auto !important; margin-right: auto !important; }
/* An empty block widget (e.g. an empty list) shows no empty box */
body.kh .sdbr-cn .blk-cn.widget_block:has(> ul:empty:only-child) { display: none; }

/* Smooth page change (supported browsers) */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ==========================================================================
   8b. Appearance options (Customize > Keyhole > Mise en page)
   ========================================================================== */

/* Full width */
body.kh.kh-layout-width-full .cont { max-width: none; padding-left: clamp(16px, 3vw, 44px); padding-right: clamp(16px, 3vw, 44px); }

/* Density */
body.kh { --kh-sp: 1; }
body.kh.kh-density-compact { --kh-sp: .65; }
body.kh.kh-density-airy { --kh-sp: 1.4; }
body.kh .bdcn { padding-top: calc(24px * var(--kh-sp)); }
body.kh .main-cn .blk-cn { margin-bottom: calc(36px * var(--kh-sp)); }
body.kh .titl { margin-bottom: calc(18px * var(--kh-sp)); }
body.kh .kh-hero { margin-bottom: calc(34px * var(--kh-sp)); }
body.kh .sdbr-cn .blk-cn { margin-bottom: calc(22px * var(--kh-sp)); }
body.kh.kh-density-compact .hdcn-2 { padding: 4px 0; }
body.kh.kh-density-compact .hdcn-2 .logo img { max-height: calc(var(--kh-logo-h, 160px) * .8); }

/* Menu bar style */
body.kh.kh-header-style-solid .hdcn-3 { background: var(--surface) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.kh.kh-header-style-accent .hdcn-3 { background: var(--kh-accent) !important; -webkit-backdrop-filter: none; backdrop-filter: none; border-color: transparent; }
@media (min-width: 992px) {
	body.kh.kh-header-style-accent .menu > ul > li > a { color: var(--kh-on-accent) !important; opacity: .85; }
	body.kh.kh-header-style-accent .menu > ul > li:hover > a,
	body.kh.kh-header-style-accent .menu > ul > li.current-menu-item > a { opacity: 1; background: color-mix(in srgb, var(--kh-on-accent) 14%, transparent) !important; }
}
body.kh.kh-header-style-accent .rndgame { background: var(--kh-on-accent) !important; color: var(--kh-accent) !important; box-shadow: none; }
body.kh.kh-header-style-accent .kh-mode-btn { background: color-mix(in srgb, var(--kh-on-accent) 12%, transparent) !important; color: var(--kh-on-accent) !important; border-color: transparent !important; }

/* Menu alignment */
@media (min-width: 992px) {
	body.kh.kh-menu-align-center .hdcn-3 .menu > ul { flex: 1; justify-content: center; }
}

/* Featured game: banner style (big picture behind the text) */
body.kh.kh-hero-style-banner .kh-hero { grid-template-columns: 1fr; min-height: 380px; align-items: end; }
body.kh.kh-hero-style-banner .kh-hero-art { display: none; }
body.kh.kh-hero-style-banner .kh-hero-has-shot .kh-hero-bg { inset: 0; filter: none; opacity: 1; }
body.kh.kh-hero-style-banner .kh-hero::before { background: linear-gradient(90deg, color-mix(in srgb, var(--surface) 96%, transparent) 0%, color-mix(in srgb, var(--surface) 75%, transparent) 45%, transparent 85%), linear-gradient(0deg, color-mix(in srgb, var(--surface) 80%, transparent), transparent 60%); }
body.kh.kh-hero-style-banner .kh-hero-txt { max-width: 640px; padding: 48px; }
/* Featured game: compact style */
body.kh.kh-hero-style-compact .kh-hero { grid-template-columns: auto 1fr; min-height: 0; }
body.kh.kh-hero-style-compact .kh-hero-art { order: -1; padding: 18px 0 18px 18px; }
body.kh.kh-hero-style-compact .kh-hero-art img { transform: none !important; }
body.kh.kh-hero-style-compact .kh-hero-shot { width: 220px; max-width: 220px; }
body.kh.kh-hero-style-compact .kh-hero-mini { display: none; }
body.kh.kh-hero-style-compact .kh-hero-thumb { width: 110px; height: 110px; }
body.kh.kh-hero-style-compact .kh-hero-txt { padding: 18px 24px; gap: 8px; }
body.kh.kh-hero-style-compact .kh-hero-title { font-size: clamp(20px, 2vw, 26px); }
body.kh.kh-hero-style-compact .kh-hero-desc { -webkit-line-clamp: 1; }
body.kh.kh-hero-style-compact .kh-btn { height: 40px; padding: 0 18px; font-size: 14px; }
@media (max-width: 900px) {
	body.kh.kh-hero-style-banner .kh-hero { min-height: 300px; }
	body.kh.kh-hero-style-banner .kh-hero-txt { padding: 26px 22px; }
	body.kh.kh-hero-style-compact .kh-hero { grid-template-columns: 1fr; }
	body.kh.kh-hero-style-compact .kh-hero-art { padding: 16px 16px 0; }
	body.kh.kh-hero-style-compact .kh-hero-shot { width: 100%; max-width: 100%; }
}

/* ==========================================================================
   9. Responsive
   ========================================================================== */
@media (max-width: 1199px) {
	body.kh .cont { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 900px) {
	.kh-hero { grid-template-columns: 1fr; min-height: 0; }
	.kh-hero-thumb-only { grid-template-columns: 1fr; }
	.kh-hero-art, .kh-hero-thumb-only .kh-hero-art { order: -1; padding: 22px 22px 0; }
	.kh-hero-has-shot .kh-hero-shot { max-width: 100%; transform: none; }
	.kh-hero-has-shot .kh-hero-mini { left: 34px; bottom: -14px; width: 72px; height: 72px; }
	.kh-hero-has-shot .kh-hero-txt { padding-top: 26px; }
	.kh-hero-txt { padding: 18px 24px 28px; }
	.kh-hero::before { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 35%, transparent), var(--surface) 55%); }
}
@media (max-width: 767px) {
	body.kh { font-size: calc(var(--kh-fs) - 1px); }
	body.kh .cont { padding-left: 14px; padding-right: 14px; }
	body.kh .bdcn { padding-top: 14px; }
	body.kh .titl { font-size: 19px; margin-bottom: 14px; }
	body.kh :not(.bx-viewport) > ul.lst-gams, body.kh ul.lst-gmct-cntcls-n6, body.kh ul.lst-gamgrid {
		grid-template-columns: repeat(auto-fill, minmax(min(var(--kh-card), 40vw), 1fr)); gap: 12px;
	}
	body.kh.kh-card-title-below [class*="gmcn-midl"] .gm-text { padding: 8px 10px 10px; }
	body.kh.kh-card-title-below [class*="gmcn-midl"] .gm-titl a { font-size: 13px; }
	body.kh .hdcn-2 .logo img { max-height: min(var(--kh-logo-h, 160px), 80px); }
	body.kh .sdbr-cn .blk-cn { padding: 14px; }
	.kh-btn { height: 44px; padding: 0 18px; font-size: 14px; }
	.kh-hero { margin-bottom: 24px; }
	body.kh .bdcn > .cont > #front_page_text { padding: 18px; }
	.kh-b { font-size: 9.5px; padding: 4px 6px; }
	.kh-mode-float { bottom: 70px; right: 12px; }
}
@media (max-width: 380px) {
	body.kh :not(.bx-viewport) > ul.lst-gams, body.kh ul.lst-gmct-cntcls-n6, body.kh ul.lst-gamgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	body.kh [class*="widget_style_"] { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1600px) {
	body.kh { font-size: calc(var(--kh-fs) + 1px); }
}

/* Touch screens: no hover, so keep the title visible on overlay cards */
@media (hover: none) {
	/* Phones / tablets: no hover, so the title stays visible in a small band at the bottom of the image (stars and plays hidden) */
	body.kh.kh-card-title-overlay [class*="gmcn-midl"] .gm-text { opacity: 1; top: auto !important; padding: 18px 30px 7px 8px !important; /* right: room for the "already played" ✓ */ background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0)); }
	body.kh.kh-card-title-overlay [class*="gmcn-midl"] .gm-titl a { font-size: 12px; -webkit-line-clamp: 2; }
	body.kh.kh-card-title-overlay [class*="gmcn-midl"] .gm-vpcn { display: none; }
	/* With "stars + plays always visible": title AND stats in the band (stars and plays on one line) */
	body.kh.kh-card-title-overlay.kh-card-stats-always [class*="gmcn-midl"] .gm-titl { opacity: 1; }
	body.kh.kh-card-title-overlay.kh-card-stats-always [class*="gmcn-midl"] .gm-vpcn { display: flex; flex-direction: row; align-items: center; gap: 8px; }
	body.kh.kh-card-title-overlay.kh-card-stats-always [class*="gmcn-midl"] .gm-text { background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0)); }
	/* Title below the image: nothing on the image unless stars + plays are set to always visible */
	body.kh.kh-card-title-overlay.kh-card-title-under [class*="gmcn-midl"] .gm-text { top: 0 !important; padding: 8px 30px 7px 8px !important; }
	body.kh.kh-card-title-overlay.kh-card-title-under [class*="gmcn-midl"] .gm-titl { padding: 6px 8px 0 !important; }
	body.kh.kh-card-play [class*="gmcn-midl"] .gm-imag > a::after { display: none; }
	/* "No grey" option: no band at all, the title gets the same thin shadow as the stars */
	body.kh.kh-card-title-overlay.kh-card-stats-always.kh-card-stats-clear:not(.kh-card-title-always) [class*="gmcn-midl"] .gm-text { background: transparent !important; }
	body.kh.kh-card-title-overlay.kh-card-stats-always.kh-card-stats-clear:not(.kh-card-title-under) [class*="gmcn-midl"] .gm-titl { text-shadow: 0 0 2px #000, 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, .7); }
}

/* Respect "reduce motion" */
@media (prefers-reduced-motion: reduce) {
	body.kh *, .kh-hero-art img { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   20. "Ancien thème" colours (Customizer: Couleurs du site = Ancien thème)
   The colours come from Appearance > Theme Options (--kh-o-* variables written by PHP).
   Light mode = the old design; dark mode (visitor's sun/moon button) keeps Keyhole's dark colours.
   ========================================================================== */
body.kh.kh-palette-classic {
	--kh-accent: var(--kh-o-g3, #16C4BB);
	--kh-on-accent: #fff;
	--accent-soft: color-mix(in srgb, var(--kh-o-g3, #16C4BB) 16%, transparent);
}
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic {
	--bg: var(--kh-o-body, #F1F1F1);
	--surface: var(--kh-o-box, #FFFFFF);
	--text: var(--kh-o-link, #2D3E58);
	--muted: var(--kh-o-text, #666666);
	--line: rgba(0, 0, 0, .09);
	--surface-2: color-mix(in srgb, var(--kh-o-box, #fff) 94%, #000);
	--glass: var(--kh-o-g2, #2D3E58);
	--shadow: 0 10px 26px rgba(20, 30, 60, .10);
	--kh-on-bar: var(--kh-o-btntxt, #fff);
	background-image: none !important;
}
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic a:hover { color: var(--kh-o-hover, #16C4BB); }

/* Top bar and logo row */
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-1 { background: var(--kh-o-top, #F8F8F8) !important; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-2 { background: var(--kh-o-box, #fff) !important; }

/* Menu bar */
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-3 {
	background: var(--kh-o-g2, #2D3E58) !important; -webkit-backdrop-filter: none; backdrop-filter: none; border-color: transparent;
}
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-3 .menu > ul > li > a,
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-3 .kh-mode-btn,
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-3 .menu > ul + a { color: var(--kh-on-bar) !important; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-3 .menu > ul > li:hover > a,
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-3 .menu > ul > li.current-menu-item > a,
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-3 .menu > ul > li.current-menu-ancestor > a { color: var(--kh-on-bar) !important; background: var(--kh-o-g1, #3469AF) !important; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-3 .kh-mode-btn { border-color: rgba(255, 255, 255, .25) !important; background: transparent !important; }

/* Games carousel band */
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-4 { background: var(--kh-o-g1, #3469AF) !important; padding: 12px 0; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-4 [class*="gmcn-smal"] { background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .18); }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-4 [class*="gmcn-smal"]:hover { background: var(--kh-o-g2, #2D3E58); border-color: transparent; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-4 [class*="gmcn-smal"] .gm-titl a { color: var(--kh-on-bar) !important; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-4 [class*="gmcn-smal"] .gm-vpcn,
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-4 [class*="gmcn-smal"] .gm-vpcn .gm-play { color: rgba(255, 255, 255, .8) !important; }
/* Stars keep their own colours (gold / grey): they are drawn with the text colour, never force it on them. */
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-4 [class*="gmcn-smal"] .gm-vpcn .gm-vote { color: initial; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdgms-cn .bx-prev,
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdgms-cn .bx-next { background: var(--kh-o-g2, #2D3E58) !important; color: var(--kh-on-bar) !important; border-color: transparent; }

/* News bar */
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .hdcn-5 { background: var(--kh-o-g2, #2D3E58) !important; padding: 6px 0 !important; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .news-cn { background: transparent !important; border-color: transparent; margin: 0; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .news-cn > strong { background: var(--kh-o-g1, #3469AF) !important; color: var(--kh-on-bar) !important; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .news-cn li,
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .news-cn li span,
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .news-cn li > strong,
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .news-cn .bx-controls-direction a { color: rgba(255, 255, 255, .8) !important; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .news-cn li a { color: var(--kh-o-hover, #16C4BB) !important; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .news-cn li a:hover { color: var(--kh-on-bar) !important; }

/* Footer */
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .ftcn { border-top: 0; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .ftcn-1 { background: var(--kh-o-g1, #3469AF) !important; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .ftcn-2 { background: var(--kh-o-g2, #2D3E58) !important; border-top: 0; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .ftcn,
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .ftcn a,
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .ftcn p,
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .ftcn h3,
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .ftcn .titl { color: var(--kh-on-bar) !important; }
html:not([data-kh-mode="dark"]) body.kh.kh-palette-classic .ftcn a:hover { color: var(--kh-o-g3, #16C4BB) !important; }

/* ==========================================================================
   21. Progression des joueurs (inc/keyhole-progress.php)
   ========================================================================== */
body.kh .kh-prog[hidden] { display: none !important; }
body.kh .kh-prog { color: var(--muted); font-size: 13px; }
body.kh .kh-prog-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
body.kh .kh-prog-lvl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--kh-accent); }
body.kh .kh-prog-name { color: var(--text); font-weight: 700; font-size: 15px; }
body.kh .kh-prog-count { margin-left: auto; font-size: 12px; }
body.kh .kh-prog-bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; margin: 8px 0 6px; }
body.kh .kh-prog-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--kh-accent), color-mix(in srgb, var(--kh-accent) 60%, #fff)); transition: width .8s ease; }
body.kh .kh-prog-next { font-size: 12.5px; }
body.kh .kh-prog-title { font-family: var(--kh-font-head); color: var(--text); font-size: 16px; font-weight: 700; margin-bottom: 10px; }
body.kh .kh-prog-sub { margin: 14px 0 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
body.kh .kh-prog-recent { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
body.kh .kh-prog-recent li { list-style: none; margin: 0; padding: 0; }
body.kh .kh-prog-recent a { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 13px; line-height: 1.25; min-width: 0; }
body.kh .kh-prog-recent a:hover { color: var(--kh-accent); }
body.kh .kh-prog-recent img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; }
body.kh .kh-prog-recent span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* Card under the game */
body.kh .kh-prog-m-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--kh-radius); padding: 16px 18px; margin: 16px 0; }
/* In a sidebar widget: one game per line */
body.kh .sdbr-cn .kh-prog-recent { grid-template-columns: 1fr; }
/* Thin bar under the menu */
body.kh .kh-prog-wrap { margin-bottom: 14px; }
body.kh .kh-prog.kh-prog-m-bar { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 6px 16px; display: flex; align-items: center; gap: 14px; height: auto; margin: 0; overflow: visible; }
body.kh .kh-prog.kh-prog-m-bar .kh-prog-head { flex: none; }
body.kh .kh-prog.kh-prog-m-bar .kh-prog-count { margin-left: 0; }
body.kh .kh-prog.kh-prog-m-bar .kh-prog-bar { flex: 1; margin: 0; min-width: 60px; padding: 0; border: 0; display: block; height: 8px; }
@media (max-width: 600px) { body.kh .kh-prog.kh-prog-m-bar .kh-prog-count { display: none; } }
/* ✓ on games already played */
body.kh .kh-played .gm-imag { position: relative; }
body.kh .kh-played .gm-imag::after {
	content: "✓"; position: absolute; right: 6px; bottom: 6px; z-index: 3; width: 22px; height: 22px; border-radius: 50%;
	display: grid; place-items: center; font-size: 13px; font-weight: 800; line-height: 1;
	background: var(--kh-accent); color: var(--kh-on-accent); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); pointer-events: none;
}
body.kh .hdcn-4 .kh-played .gm-imag::after { width: 16px; height: 16px; font-size: 10px; right: 3px; bottom: 3px; }
/* "Level up!" message */
.kh-prog-toast {
	position: fixed; left: 50%; bottom: 24px; z-index: 99999; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center;
	padding: 12px 22px; border-radius: 16px; background: var(--kh-accent, #16C4BB); color: var(--kh-on-accent, #fff); box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
	font-size: 14px; animation: kh-toast-in .4s ease; transition: opacity .6s, transform .6s;
}
.kh-prog-toast strong { font-size: 17px; }
.kh-prog-toast.kh-out { opacity: 0; transform: translate(-50%, 20px); }
@keyframes kh-toast-in { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .kh-prog-toast { animation: none; } body.kh .kh-prog-bar > span { transition: none; } }

/* ==========================================================================
   22. Category / tag description: short text + "Afficher plus / Réduire" button (Theme Options option)
   ========================================================================== */
body.kh .titl .description {
	font-family: var(--kh-font-body); font-weight: 400; font-size: 14px; line-height: 1.6; letter-spacing: normal;
	text-transform: none; color: var(--muted); overflow: visible; margin-top: 8px;
}
body.kh .titl .description p { margin: 0 0 .6em; text-transform: none; }
body.kh .titl .description > div:not(.description-trigger-button) { overflow: hidden; }
/* Shortened: 3 lines, fading out at the bottom */
body.kh .titl .description .collapsed {
	height: auto; max-height: 4.8em; position: relative;
	-webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent);
}
body.kh .titl .description .description-trigger-button { text-align: center; margin: 6px 0 2px; font-size: 13px; line-height: 1; }
body.kh .titl .description .trigger-icon {
	display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 7px 14px; border-radius: 99px;
	border: 1px solid var(--line); background: var(--surface); color: var(--kh-accent); font-weight: 700;
}
body.kh .titl .description .trigger-icon.hide { display: none; }
body.kh .titl .description .trigger-icon:hover { border-color: var(--kh-accent); }
body.kh .titl .description .trigger-icon::before { order: 2; font-size: 15px; }
body.kh .titl .description .kh-more-txt { font-style: normal; font-family: var(--kh-font-body); }
/* The old script also adds "collapsed" to the button itself when closing: never shorten the button. */
body.kh .titl .description .description-trigger-button.collapsed { max-height: none; -webkit-mask-image: none; mask-image: none; overflow: visible; }

/* ==========================================================================
   23. Questions dépliables (<details>) dans les pages et articles : FAQ, etc.
   ========================================================================== */
body.kh .txcn details, body.kh .entry-content details {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--kh-radius);
	margin: 0 0 12px; overflow: hidden; transition: border-color .2s, box-shadow .2s;
}
body.kh .txcn details:hover, body.kh .entry-content details:hover { border-color: color-mix(in srgb, var(--kh-accent) 55%, transparent); }
body.kh .txcn details[open], body.kh .entry-content details[open] { border-color: var(--kh-accent); box-shadow: var(--shadow); }
body.kh .txcn summary, body.kh .entry-content summary {
	list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 16px 20px; cursor: pointer; user-select: none; -webkit-user-select: none;
	font-family: var(--kh-font-body); font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--text);
	transition: color .15s, background-color .15s;
}
body.kh .txcn summary::-webkit-details-marker, body.kh .entry-content summary::-webkit-details-marker { display: none; }
body.kh .txcn summary::marker, body.kh .entry-content summary::marker { content: ""; }
/* Arrow on the right (colour of the site accent), turns when open */
body.kh .txcn summary::after, body.kh .entry-content summary::after {
	content: ""; flex: none; width: 18px; height: 18px; background-color: var(--kh-accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .25s ease;
}
body.kh .txcn summary:hover, body.kh .entry-content summary:hover { color: var(--kh-accent); background: color-mix(in srgb, var(--kh-accent) 5%, transparent); }
body.kh .txcn details[open] > summary, body.kh .entry-content details[open] > summary { color: var(--kh-accent); }
body.kh .txcn details[open] > summary::after, body.kh .entry-content details[open] > summary::after { transform: rotate(180deg); }
body.kh .txcn summary:focus-visible, body.kh .entry-content summary:focus-visible { outline: 2px solid var(--kh-accent); outline-offset: -2px; border-radius: var(--kh-radius); }
/* Answer */
body.kh .txcn details > :not(summary), body.kh .entry-content details > :not(summary) { margin: 0; padding: 0 20px 18px; color: var(--muted); line-height: 1.7; }
body.kh .txcn details > :not(summary) + :not(summary), body.kh .entry-content details > :not(summary) + :not(summary) { padding-top: 0; }
body.kh .txcn details[open] > summary + *, body.kh .entry-content details[open] > summary + * { border-top: 1px solid var(--line); padding-top: 14px; animation: kh-faq-in .25s ease; }
@keyframes kh-faq-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body.kh .txcn details > *, body.kh .txcn summary::after { animation: none; transition: none; } }
@media (max-width: 600px) { body.kh .txcn summary, body.kh .entry-content summary { font-size: 15px; padding: 14px 16px; } body.kh .txcn details > :not(summary) { padding: 0 16px 16px; } }
body.kh .txcn p + details, body.kh .entry-content p + details { margin-top: 20px; }

/* ==========================================================================
   24. Fenêtre de recherche (en haut : « Recherche »)
   ========================================================================== */
body.kh #modl-srch { background: rgba(8, 12, 22, .86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
body.kh #modl-srch .modal-dialog { width: auto; max-width: 720px; margin: 14vh auto 0; padding: 0 16px; }
body.kh #modl-srch .modal-content { width: auto !important; max-width: none; padding: 0 !important; background: transparent; box-shadow: none; border: 0; }
body.kh #modl-srch .srchbx form { position: relative; }
body.kh #modl-srch .modal-content input {
	width: 100%; height: 62px !important; line-height: normal !important; margin: 0 0 12px !important; padding: 0 74px 0 26px !important;
	font-family: var(--kh-font-body) !important; font-size: 18px !important; font-weight: 500 !important; text-transform: none; letter-spacing: normal;
	color: var(--text) !important; background: var(--surface) !important; border: 2px solid transparent !important; border-radius: 999px !important;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .35); outline: 0; transition: border-color .2s;
}
body.kh #modl-srch .modal-content input:focus { border-color: var(--kh-accent) !important; }
body.kh #modl-srch .modal-content input::placeholder { color: var(--muted) !important; opacity: 1; font-weight: 400; }
body.kh #modl-srch .modal-content input::-webkit-input-placeholder { color: var(--muted) !important; }
body.kh #modl-srch .modal-content button[type="submit"] {
	position: absolute; top: 8px; right: 8px; width: 46px; height: 46px; border-radius: 50%; padding: 0; border: 0;
	display: grid; place-items: center; background: var(--kh-accent) !important; color: var(--kh-on-accent) !important; font-size: 0; box-shadow: none;
}
body.kh #modl-srch .modal-content button[type="submit"]:hover { filter: brightness(1.08); }
body.kh #modl-srch .modal-content button[type="submit"] span::before { font-size: 18px !important; color: inherit; position: static; margin: 0; }
body.kh #modl-srch p { margin: 0; text-align: center; font-family: var(--kh-font-body); font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .7); text-transform: none; letter-spacing: normal; }
/* Close button: round cross */
body.kh #modl-srch .clos-modl {
	top: 18px; right: 18px; width: 46px; height: 46px; border-radius: 50%; font-size: 0 !important; opacity: 1; overflow: hidden;
	background: rgba(255, 255, 255, .12) !important; background-image: none !important; border: 0; display: grid; place-items: center; transition: background-color .2s;
}
body.kh #modl-srch .clos-modl::before { content: "\00d7"; font-size: 30px; line-height: 1; color: #fff; font-family: var(--kh-font-body); }
body.kh #modl-srch .clos-modl:hover { background: rgba(255, 255, 255, .24) !important; }
@media (max-width: 600px) {
	body.kh #modl-srch .modal-dialog { margin-top: 90px; }
	body.kh #modl-srch .modal-content input { height: 54px !important; font-size: 16px !important; padding: 0 64px 0 20px !important; }
	body.kh #modl-srch .modal-content button[type="submit"] { width: 40px; height: 40px; top: 7px; right: 7px; }
}
/* Instant search results (option) */
body.kh .kh-live { margin: 0 0 14px; background: var(--surface); border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); overflow: hidden; text-align: left; }
body.kh .kh-live ul { list-style: none; margin: 0; padding: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px; }
body.kh .kh-live li { list-style: none; margin: 0; }
body.kh .kh-live li a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; color: var(--text); font-family: var(--kh-font-body); font-size: 14px; font-weight: 600; line-height: 1.3; text-transform: none; }
body.kh .kh-live li a:hover, body.kh .kh-live li a:focus { background: var(--accent-soft); color: var(--text); }
body.kh .kh-live img { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; flex: none; }
body.kh .kh-live-all { display: block; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--kh-accent) !important; font-weight: 700; font-family: var(--kh-font-body); font-size: 14px; text-align: center; }
body.kh .kh-live-none { padding: 16px 20px; color: var(--muted) !important; text-align: center !important; }

/* ==========================================================================
   25. Fonctions joueurs (inc/keyhole-extras.php)
   ========================================================================== */
/* Bar under the game: favourite + next episode */
body.kh .kh-gamebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
body.kh .kh-fav-toggle, body.kh .kh-fav-page, body.kh .kh-next-ep {
	display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px; border-radius: 999px;
	border: 1px solid var(--line) !important; background: var(--surface) !important; color: var(--text) !important;
	font: 700 14px/1.2 var(--kh-font-body); text-transform: none; cursor: pointer; box-shadow: none; transition: border-color .2s, background-color .2s;
}
body.kh .kh-fav-toggle:hover, body.kh .kh-fav-page:hover { border-color: #ff4d6d !important; }
body.kh .kh-fav-toggle .kh-fav-on, body.kh .kh-fav-toggle.is-on .kh-fav-off { display: none; }
body.kh .kh-fav-toggle.is-on .kh-fav-on { display: inline; }
body.kh .kh-fav-toggle.is-on { border-color: #ff4d6d !important; background: color-mix(in srgb, #ff4d6d 10%, var(--surface)) !important; }
body.kh .kh-heart, body.kh .kh-fav-btn::before {
	content: ""; display: inline-block; width: 18px; height: 18px; background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.6 2.9 4.5 6.7 4.5c2.2 0 3.7 1.2 5.3 3 1.6-1.8 3.1-3 5.3-3 3.8 0 5.8 4.1 4.3 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.6 2.9 4.5 6.7 4.5c2.2 0 3.7 1.2 5.3 3 1.6-1.8 3.1-3 5.3-3 3.8 0 5.8 4.1 4.3 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.kh .kh-fav-toggle .kh-heart { color: var(--muted); }
body.kh .kh-fav-toggle.is-on .kh-heart { color: #ff4d6d; }
body.kh .kh-fav-page { color: var(--muted) !important; font-weight: 600; }
body.kh .kh-next-ep { margin-left: auto; background: var(--kh-accent) !important; border-color: var(--kh-accent) !important; color: var(--kh-on-accent) !important; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 40px 8px 18px; position: relative; border-radius: 16px; }
body.kh .kh-next-ep span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
body.kh .kh-next-ep strong { font-size: 14px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.kh .kh-next-ep::after { content: "\203A"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 26px; line-height: 1; }
body.kh .kh-next-ep:hover { filter: brightness(1.06); }
@media (max-width: 600px) { body.kh .kh-next-ep { margin-left: 0; width: 100%; } }
/* Heart on game cards */
body.kh .kh-fav-btn {
	position: absolute; top: 6px; right: 6px; z-index: 4; width: 30px; height: 30px; padding: 0; border: 0 !important; border-radius: 50%;
	display: grid; place-items: center; background: rgba(0, 0, 0, .45) !important; color: #fff !important; cursor: pointer;
	opacity: 0; transform: scale(.85); transition: opacity .15s, transform .15s; box-shadow: none;
}
body.kh .kh-fav-btn::before { width: 15px; height: 15px; }
body.kh figure.gm-imag:hover .kh-fav-btn, body.kh .kh-fav-btn:focus-visible, body.kh .kh-fav-btn.is-on { opacity: 1; transform: none; }
body.kh .kh-fav-btn.is-on { background: #ff4d6d !important; }
@media (hover: none) { body.kh .kh-fav-btn { opacity: .9; transform: none; } }
body.kh .kh-favs-list { margin-top: 10px; }
body.kh .kh-favs-empty { padding: 20px; border: 1px dashed var(--line); border-radius: var(--kh-radius); text-align: center; color: var(--muted); }
/* Similar games */
body.kh .kh-similar { margin-top: 26px; }
/* In the left column (also inside the sticky-sidebar wrapper): aligned with the top of the right column */
body.kh .main-cn .kh-similar:first-child { margin-top: 0; margin-bottom: 24px; }
/* "With walkthrough only" button */
body.kh .kh-wt-filter {
	display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; margin: 0 0 0 8px; border-radius: 999px; vertical-align: middle;
	border: 1px solid var(--line); background: var(--surface); color: var(--text) !important; font: 600 13px/1 var(--kh-font-body); text-transform: none; letter-spacing: normal; white-space: nowrap;
}
body.kh .kh-wt-filter:hover { border-color: var(--kh-accent); color: var(--kh-accent) !important; }
body.kh .kh-wt-filter.is-on { background: var(--kh-accent); border-color: var(--kh-accent); color: var(--kh-on-accent) !important; }

/* ==========================================================================
   26. Sondage (widget « Keyhole – Sondage » / [keyhole_poll])
   ========================================================================== */
body.kh .kh-poll { font-family: var(--kh-font-body); }
body.kh .kh-poll-q { margin: 0 0 12px; color: var(--text); font-weight: 700; font-size: 15px; line-height: 1.4; text-transform: none; }
body.kh .kh-poll-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
body.kh .kh-poll-list li { list-style: none; margin: 0; padding: 0; }
body.kh .kh-poll-opt {
	position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 10px 14px; overflow: hidden;
	border: 1px solid var(--line) !important; border-radius: 12px; background: var(--surface-2) !important; color: var(--text) !important;
	font: 600 14px/1.3 var(--kh-font-body); text-align: left; text-transform: none; cursor: pointer; box-shadow: none; transition: border-color .15s, transform .1s;
}
body.kh .kh-poll-opt:hover:not(:disabled) { border-color: var(--kh-accent) !important; }
body.kh .kh-poll-opt:active:not(:disabled) { transform: scale(.99); }
body.kh .kh-poll-opt:disabled { cursor: default; opacity: 1; }
body.kh .kh-poll-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent-soft); transition: width .7s ease; pointer-events: none; }
body.kh .kh-poll-txt { position: relative; flex: 1; min-width: 0; }
body.kh .kh-poll-pct { position: relative; flex: none; font-weight: 800; color: var(--kh-accent); }
body.kh .kh-poll-opt.is-mine { border-color: var(--kh-accent) !important; }
body.kh .kh-poll-opt.is-mine .kh-poll-txt::after { content: " ✓"; color: var(--kh-accent); }
body.kh .kh-poll.is-busy { opacity: .7; pointer-events: none; }
body.kh .kh-poll-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
body.kh .kh-poll-see { padding: 0; border: 0 !important; background: none !important; color: var(--kh-accent) !important; font: 600 12.5px var(--kh-font-body); cursor: pointer; text-transform: none; box-shadow: none; }
body.kh .kh-poll.is-results .kh-poll-see { display: none; }
body.kh .sdbr-cn .kh-poll { padding: 0 2px; }
@media (prefers-reduced-motion: reduce) { body.kh .kh-poll-bar { transition: none; } }
/* Several questions in one poll widget */
body.kh .kh-survey-step[hidden], body.kh .kh-survey-next[hidden], body.kh .kh-survey-done[hidden] { display: none !important; }
body.kh .kh-survey-count { margin: 0 0 6px; font: 700 11px/1 var(--kh-font-body); text-transform: uppercase; letter-spacing: .06em; color: var(--kh-accent); }
body.kh .kh-survey-step + .kh-survey-step:not([hidden]) { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
body.kh .kh-survey-next {
	display: block; width: 100%; margin: 12px 0 0; padding: 11px 14px; border: 0 !important; border-radius: 12px;
	background: var(--kh-accent) !important; color: var(--kh-on-accent) !important; font: 700 14px/1 var(--kh-font-body); text-transform: none; cursor: pointer; box-shadow: none;
}
body.kh .kh-survey-next:hover { filter: brightness(1.06); }
body.kh .kh-survey-done { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font: 600 13.5px/1.4 var(--kh-font-body); text-align: center; }
/* One colour per answer (results) */
body.kh .kh-poll-list li:nth-child(8n+1) { --kh-pc: #16C4BB; }
body.kh .kh-poll-list li:nth-child(8n+2) { --kh-pc: #3B82F6; }
body.kh .kh-poll-list li:nth-child(8n+3) { --kh-pc: #F59E0B; }
body.kh .kh-poll-list li:nth-child(8n+4) { --kh-pc: #EC4899; }
body.kh .kh-poll-list li:nth-child(8n+5) { --kh-pc: #8B5CF6; }
body.kh .kh-poll-list li:nth-child(8n+6) { --kh-pc: #22C55E; }
body.kh .kh-poll-list li:nth-child(8n+7) { --kh-pc: #EF4444; }
body.kh .kh-poll-list li:nth-child(8n+8) { --kh-pc: #64748B; }
body.kh .kh-poll.is-results .kh-poll-bar { background: color-mix(in srgb, var(--kh-pc, var(--kh-accent)) 26%, transparent); }
body.kh .kh-poll.is-results .kh-poll-opt { border-left: 4px solid var(--kh-pc, var(--kh-accent)) !important; }
body.kh .kh-poll.is-results .kh-poll-pct { color: var(--kh-pc, var(--kh-accent)); }
body.kh .kh-poll.is-results .kh-poll-opt.is-mine { border-color: var(--kh-pc, var(--kh-accent)) !important; box-shadow: 0 0 0 1px var(--kh-pc, var(--kh-accent)); }
body.kh .kh-poll-opt.is-mine .kh-poll-txt::after { color: var(--kh-pc, var(--kh-accent)); }
/* Poll: thank-you message, voted state */
body.kh .kh-poll-msg { margin: 8px 0 0; font: 600 13px/1.3 var(--kh-font-body); color: var(--kh-accent); text-align: center; }
body.kh .kh-poll-msg[hidden] { display: none; }
body.kh .kh-poll.is-voted .kh-poll-opt:not(.is-mine) { opacity: .6; }
body.kh .kh-poll-opt.is-mine { border-color: var(--kh-accent) !important; background: var(--accent-soft) !important; }
/* Results block, seen by everyone (one colour per answer) */
body.kh .kh-results { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-family: var(--kh-font-body); }
body.kh .kh-results-title { margin: 0 0 10px; font: 700 11px/1 var(--kh-font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
body.kh .kh-res + .kh-res { margin-top: 14px; }
body.kh .kh-res-q { margin: 0 0 8px; font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--text); text-transform: none; }
body.kh .kh-res-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
body.kh .kh-res-list li { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr auto; column-gap: 8px; row-gap: 3px; align-items: center; font-size: 12.5px; color: var(--text); }
body.kh .kh-res-txt { min-width: 0; line-height: 1.3; }
body.kh .kh-res-pct { font-weight: 800; color: var(--kh-pc, var(--kh-accent)); }
body.kh .kh-res-bar { grid-column: 1 / -1; height: 7px; border-radius: 7px; background: color-mix(in srgb, var(--text) 9%, transparent); overflow: hidden; }
body.kh .kh-res-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--kh-pc, var(--kh-accent)); transition: width .7s ease; }
body.kh .kh-res-list li.is-mine .kh-res-txt::after { content: " ✓"; color: var(--kh-pc, var(--kh-accent)); font-weight: 800; }
body.kh .kh-res-total { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }
body.kh .kh-res-list li:nth-child(8n+1) { --kh-pc: #16C4BB; }
body.kh .kh-res-list li:nth-child(8n+2) { --kh-pc: #3B82F6; }
body.kh .kh-res-list li:nth-child(8n+3) { --kh-pc: #F59E0B; }
body.kh .kh-res-list li:nth-child(8n+4) { --kh-pc: #EC4899; }
body.kh .kh-res-list li:nth-child(8n+5) { --kh-pc: #8B5CF6; }
body.kh .kh-res-list li:nth-child(8n+6) { --kh-pc: #22C55E; }
body.kh .kh-res-list li:nth-child(8n+7) { --kh-pc: #EF4444; }
body.kh .kh-res-list li:nth-child(8n+8) { --kh-pc: #64748B; }
@media (prefers-reduced-motion: reduce) { body.kh .kh-res-bar i { transition: none; } }
/* Poll: "‹ Précédente / Suivante ›" always visible */
body.kh .kh-survey-nav { display: flex; gap: 8px; margin: 12px 0 0; }
body.kh .kh-survey-nav button {
	flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 12px; border-radius: 10px;
	border: 1px solid var(--line) !important; background: var(--surface) !important; color: var(--text) !important;
	font: 700 13px/1 var(--kh-font-body); text-transform: none; cursor: pointer; box-shadow: none; transition: border-color .15s, background-color .15s;
}
body.kh .kh-survey-nav button:hover:not(:disabled) { border-color: var(--kh-accent) !important; color: var(--kh-accent) !important; }
body.kh .kh-survey-nav button:disabled { opacity: .4; cursor: default; }
body.kh .kh-survey-nav .kh-survey-next.is-hint { background: var(--kh-accent) !important; border-color: var(--kh-accent) !important; color: var(--kh-on-accent) !important; }

/* ==========================================================================
   27. Jeu en vedette : « Compact, image à droite penchée et animée » (ordinateur)
   On mobile it stays like the « côte à côte » style.
   ========================================================================== */
@media (min-width: 992px) {
	body.kh.kh-hero-style-compactright .kh-hero { min-height: 0; margin-bottom: 22px; }
	body.kh.kh-hero-style-compactright .kh-hero-txt { padding: 18px 0 18px 30px; gap: 7px; }
	body.kh.kh-hero-style-compactright .kh-hero-title { font-size: clamp(22px, 2.1vw, 30px); }
	body.kh.kh-hero-style-compactright .kh-hero-desc { -webkit-line-clamp: 1; font-size: 14px; }
	body.kh.kh-hero-style-compactright .kh-hero-meta { font-size: 13px; }
	body.kh.kh-hero-style-compactright .kh-btn { height: 40px; padding: 0 20px; font-size: 14px; }
	body.kh.kh-hero-style-compactright .kh-hero-art { padding: 14px 56px 14px 10px; }
	body.kh.kh-hero-style-compactright .kh-hero-thumb { width: 128px; height: 128px; transform: rotate(4deg); animation: kh-hero-float 4s ease-in-out infinite; }
	body.kh.kh-hero-style-compactright .kh-hero-shot { max-width: 260px; animation: kh-hero-float 4s ease-in-out infinite; }
	body.kh.kh-hero-style-compactright .kh-hero-mini { display: none; }
	body.kh.kh-hero-style-compactright .kh-hero-art:hover .kh-hero-thumb,
	body.kh.kh-hero-style-compactright .kh-hero-art:hover .kh-hero-shot { animation-play-state: paused; }
}
@keyframes kh-hero-float {
	0%, 100% { transform: translateY(0) rotate(4deg); }
	50% { transform: translateY(-6px) rotate(1.5deg); }
}
@media (prefers-reduced-motion: reduce) {
	body.kh.kh-hero-style-compactright .kh-hero-thumb, body.kh.kh-hero-style-compactright .kh-hero-shot { animation: none; }
}

/* ==========================================================================
   28. Page « introuvable » (404) utile
   ========================================================================== */
body.kh .kh-404-box { text-align: center; padding: 34px 24px 30px; }
body.kh .kh-404-code { margin: 0; font: 800 76px/1 var(--kh-font-head); color: var(--kh-accent); letter-spacing: .04em; }
body.kh .kh-404-title { margin: 8px 0 10px; font: 700 clamp(22px, 2.4vw, 30px)/1.2 var(--kh-font-head); color: var(--text); text-transform: none; }
body.kh .kh-404-text { margin: 0 auto 18px; max-width: 560px; color: var(--muted); }
body.kh .kh-404-search { display: flex; gap: 8px; max-width: 520px; margin: 0 auto 18px; }
body.kh .kh-404-search input { flex: 1; min-width: 0; height: 48px; padding: 0 18px !important; border: 1px solid var(--line) !important; border-radius: 999px !important; background: var(--surface) !important; color: var(--text) !important; font: 500 15px var(--kh-font-body); }
body.kh .kh-404-search input:focus { border-color: var(--kh-accent) !important; outline: 0; }
body.kh .kh-404-search button { height: 48px; padding: 0 22px; border: 0 !important; border-radius: 999px; background: var(--kh-accent) !important; color: var(--kh-on-accent) !important; font: 700 14px var(--kh-font-body); cursor: pointer; text-transform: none; }
body.kh .kh-404-cats { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
body.kh .kh-404-cats li { list-style: none; margin: 0; }
body.kh .kh-404-cats a { display: inline-flex; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 600 13.5px var(--kh-font-body); }
body.kh .kh-404-cats a:hover { border-color: var(--kh-accent); color: var(--kh-accent); }
body.kh .kh-404-home { margin: 0; }
body.kh .kh-404-games { margin-top: 24px; }
body.kh .kh-404-games h2.titl { font-size: 20px; margin-top: 0; }
@media (max-width: 600px) { body.kh .kh-404-code { font-size: 56px; } body.kh .kh-404-search { flex-direction: column; } }
/* Similar games (left column of the game page): one single row (5 computer / 4 tablet / swipeable row on mobile) */
@media (min-width: 1200px) { body.kh .kh-similar ul.lst-gams.kh-similar-list { grid-template-columns: repeat(5, minmax(0, 1fr)); } body.kh .kh-similar ul.lst-gams.kh-similar-list > li:nth-child(n+6) { display: none; } }
@media (min-width: 768px) and (max-width: 1199px) { body.kh .kh-similar ul.lst-gams.kh-similar-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } body.kh .kh-similar ul.lst-gams.kh-similar-list > li:nth-child(n+5) { display: none; } }
@media (max-width: 767px) {
	body.kh .kh-similar ul.lst-gams.kh-similar-list { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 42%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
	body.kh .kh-similar ul.lst-gams.kh-similar-list > li { scroll-snap-align: start; }
}

/* ==========================================================================
   29. Hide the games carousel / the NEWS bar (Mise en page options), per screen size
   ========================================================================== */
@media (min-width: 992px) {
	body.kh.kh-hide-carousel-pc .hdcn-4 { display: none !important; }
	body.kh.kh-hide-news-pc .hdcn-5 { display: none !important; }
}
@media (max-width: 991px) {
	body.kh.kh-hide-carousel-mobile .hdcn-4 { display: none !important; }
	body.kh.kh-hide-news-mobile .hdcn-5 { display: none !important; }
}

/* ==========================================================================
   30. Featured game on phones and tablets (Page d'accueil options)
   ========================================================================== */
@media (max-width: 991px) {
	body.kh.kh-hero-hide-mobile .kh-hero { display: none !important; }
	/* Compact: one row, small square picture on the left, title + "Play" on the right, no description */
	body.kh.kh-hero-compact-mobile .kh-hero { grid-template-columns: auto minmax(0, 1fr) !important; min-height: 0 !important; gap: 0; align-items: center; margin-bottom: 18px; }
	body.kh.kh-hero-compact-mobile .kh-hero::before { background: color-mix(in srgb, var(--surface) 88%, transparent); }
	body.kh.kh-hero-compact-mobile .kh-hero-art { order: -1; padding: 10px 0 10px 10px !important; }
	body.kh.kh-hero-compact-mobile .kh-hero-art img { transform: none !important; animation: none !important; box-shadow: 0 4px 12px rgba(0, 0, 0, .22); }
	body.kh.kh-hero-compact-mobile .kh-hero-thumb,
	body.kh.kh-hero-compact-mobile .kh-hero-mini { position: static !important; display: block !important; width: 72px !important; height: 72px !important; max-width: 72px; object-fit: cover; border: 0 !important; border-radius: 12px !important; }
	body.kh.kh-hero-compact-mobile .kh-hero-has-shot .kh-hero-shot { display: none !important; }
	body.kh.kh-hero-compact-mobile .kh-hero-txt {
		padding: 10px 12px !important; gap: 6px 10px;
		display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "tag tag" "title cta"; align-items: center;
	}
	body.kh.kh-hero-compact-mobile .kh-tag { grid-area: tag; justify-self: start; font-size: 10px; padding: 3px 8px; letter-spacing: .8px; }
	body.kh.kh-hero-compact-mobile .kh-hero-title { grid-area: title; font-size: 16px !important; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	body.kh.kh-hero-compact-mobile .kh-hero-desc,
	body.kh.kh-hero-compact-mobile .kh-hero-meta { display: none !important; }
	body.kh.kh-hero-compact-mobile .kh-hero-cta { grid-area: cta; margin: 0; flex-wrap: nowrap; }
	body.kh.kh-hero-compact-mobile .kh-hero-cta .kh-btn { height: 38px; padding: 0 14px; font-size: 13px; white-space: nowrap; }
	body.kh.kh-hero-compact-mobile .kh-hero-cta .kh-btn:not(:first-child) { display: none; }
}