:root {
	--dmzx-app-bg-1: var(--dmzx-app-bg1, #0a1720);
	--dmzx-app-bg-2: var(--dmzx-app-bg2, #0d1b26);
	--dmzx-app-bg-3: var(--dmzx-app-bg3, #10212d);
	--dmzx-app-accent: var(--dmzx-app-accent-config, #18d66f);
	--dmzx-app-accent-2: #0eb35a;
	--dmzx-app-accent-3: #0a8b46;
	--dmzx-app-white: #ffffff;
	--dmzx-app-text: #f8fafc;
	--dmzx-app-subtle: rgba(255, 255, 255, 0.72);
	--dmzx-app-tile-bg: linear-gradient(180deg, rgba(23, 33, 84, 0.92), rgba(15, 23, 42, 0.95));
	--dmzx-app-tile-border: rgba(255, 255, 255, 0.08);
	--dmzx-app-tile-hover-border: rgba(97, 218, 251, 0.28);
	--dmzx-app-tile-hover-glow: 0 18px 40px rgba(2, 8, 23, 0.30), 0 0 0 1px rgba(120, 119, 198, 0.12);
	--dmzx-app-shadow: 0 14px 32px rgba(2, 6, 23, 0.18);
	--dmzx-app-scale-safe: clamp(0.50, var(--dmzx-app-scale, 1), 1.40);
	--dmzx-shell-min-height: calc(220px * var(--dmzx-app-scale-safe));
	--dmzx-shell-radius: calc(22px * var(--dmzx-app-scale-safe));
	--dmzx-shell-padding-y: calc(18px * var(--dmzx-app-scale-safe));
	--dmzx-shell-padding-x: calc(20px * var(--dmzx-app-scale-safe));
	--dmzx-header-gap: calc(14px * var(--dmzx-app-scale-safe));
	--dmzx-heading-margin-top: calc(10px * var(--dmzx-app-scale-safe));
	--dmzx-kicker-padding-y: calc(6px * var(--dmzx-app-scale-safe));
	--dmzx-kicker-padding-x: calc(10px * var(--dmzx-app-scale-safe));
	--dmzx-kicker-font: calc(10px * var(--dmzx-app-scale-safe));
	--dmzx-heading-font: calc(1.7rem * var(--dmzx-app-scale-safe));
	--dmzx-arrow-size: calc(38px * var(--dmzx-app-scale-safe));
	--dmzx-arrow-font: calc(24px * var(--dmzx-app-scale-safe));
	--dmzx-carousel-gap: calc(14px * var(--dmzx-app-scale-safe));
	--dmzx-tile-width: calc(184px * var(--dmzx-app-scale-safe));
	--dmzx-tile-min-height: calc(322px * var(--dmzx-app-scale-safe));
	--dmzx-tile-radius: calc(18px * var(--dmzx-app-scale-safe));
	--dmzx-tile-padding: calc(10px * var(--dmzx-app-scale-safe));
	--dmzx-media-height: calc(124px * var(--dmzx-app-scale-safe));
	--dmzx-media-radius: calc(16px * var(--dmzx-app-scale-safe));
	--dmzx-media-padding: calc(10px * var(--dmzx-app-scale-safe));
	--dmzx-title-font: calc(1rem * var(--dmzx-app-scale-safe));
	--dmzx-subtitle-font: calc(.78rem * var(--dmzx-app-scale-safe));
	--dmzx-desc-font: calc(.74rem * var(--dmzx-app-scale-safe));
	--dmzx-modal-radius: 24px;
	--dmzx-modal-close-size: 42px;
}

.dmzx-apps-shell {
	margin-top: 12px;
	border-radius: var(--dmzx-shell-radius);
	overflow: hidden;
	min-height: var(--dmzx-shell-min-height);
	background: radial-gradient(circle at top left, rgba(34,197,94,.10), transparent 24%),
		radial-gradient(circle at top right, rgba(56,189,248,.10), transparent 22%),
		linear-gradient(135deg, var(--dmzx-app-bg-1), var(--dmzx-app-bg-2) 60%, var(--dmzx-app-bg-3));
	border: 1px solid rgba(255,255,255,0.05);
	box-shadow: var(--dmzx-app-shadow);
}
.dmzx-apps-shell .inner {
	padding: var(--dmzx-shell-padding-y) var(--dmzx-shell-padding-x) calc(var(--dmzx-shell-padding-y) + 2px);
	min-height: var(--dmzx-shell-min-height);
	box-sizing: border-box;
}
.dmzx-apps-header {
	display: flex; align-items: flex-end; justify-content: space-between;
	gap: var(--dmzx-header-gap); margin-bottom: var(--dmzx-header-gap);
}
.dmzx-apps-kicker {
	display: inline-flex; align-items: center;
	padding: var(--dmzx-kicker-padding-y) var(--dmzx-kicker-padding-x);
	border-radius: 999px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.94);
	font-size: var(--dmzx-kicker-font); font-weight: 800; letter-spacing: 0.12em;
	text-transform: uppercase; backdrop-filter: blur(8px);
}
.dmzx-apps-heading {
	margin: var(--dmzx-heading-margin-top) 0 0;
	max-width: calc(620px * var(--dmzx-app-scale-safe));
	font-size: clamp(1rem, calc(1.4rem * var(--dmzx-app-scale-safe)), var(--dmzx-heading-font));
	line-height: 1.15; font-weight: 900; color: #fff; letter-spacing: -0.02em;
}
.dmzx-apps-nav { display: flex; gap: calc(8px * var(--dmzx-app-scale-safe)); flex-shrink: 0; }
.dmzx-apps-arrow {
	width: var(--dmzx-arrow-size); height: var(--dmzx-arrow-size);
	border-radius: 999px; border: 1px solid rgba(255,255,255,0.12);
	background: rgba(255,255,255,0.06); color: #fff; font-size: var(--dmzx-arrow-font);
	line-height: 1; cursor: pointer;
	transition: background .2s ease, transform .2s ease, border-color .2s ease;
	backdrop-filter: blur(10px);
}
.dmzx-apps-arrow:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.22); transform: translateY(-1px); }
.dmzx-apps-carousel-wrap { position: relative; }
.dmzx-apps-carousel {
	display: flex; gap: var(--dmzx-carousel-gap); overflow-x: auto; overflow-y: hidden;
	scroll-behavior: smooth; padding-bottom: calc(6px * var(--dmzx-app-scale-safe)); scrollbar-width: none;
}
.dmzx-apps-carousel::-webkit-scrollbar { display: none; }
.dmzx-app-tile {
	position: relative; flex: 0 0 var(--dmzx-tile-width); display: flex; flex-direction: column;
	cursor: pointer; border-radius: var(--dmzx-tile-radius); padding: var(--dmzx-tile-padding);
	background: var(--dmzx-app-tile-bg); border: 1px solid var(--dmzx-app-tile-border);
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
	min-width: 0; min-height: var(--dmzx-tile-min-height); box-sizing: border-box;
	box-shadow: 0 10px 28px rgba(2,6,23,.18);
}
.dmzx-app-tile::before {
	content: ""; position: absolute; inset: 0; border-radius: inherit;
	background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent 30%); pointer-events: none;
}
.dmzx-app-tile:hover, .dmzx-app-tile:focus {
	transform: translateY(-4px); border-color: var(--dmzx-app-tile-hover-border);
	box-shadow: var(--dmzx-app-tile-hover-glow); outline: none;
}
.dmzx-app-tile-media {
	width: 100%; height: var(--dmzx-media-height); min-height: var(--dmzx-media-height);
	max-height: var(--dmzx-media-height); border-radius: var(--dmzx-media-radius);
	background: linear-gradient(180deg, #ffffff, #f8fbff); display: flex;
	align-items: center; justify-content: center; padding: var(--dmzx-media-padding);
	overflow: hidden; box-sizing: border-box; border: 1px solid rgba(15,23,42,0.04);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.dmzx-app-tile-media img { width: 100%; height: 100%; object-fit: contain; border-radius: calc(12px * var(--dmzx-app-scale-safe)); }
.dmzx-app-card-placeholder { font-size: calc(12px * var(--dmzx-app-scale-safe)); font-weight: 700; color: #64748b; text-align: center; }
.dmzx-app-tile-body {
	padding: calc(11px * var(--dmzx-app-scale-safe)) calc(2px * var(--dmzx-app-scale-safe)) calc(2px * var(--dmzx-app-scale-safe));
	min-width: 0; display: flex; flex-direction: column; flex: 1;
}
.dmzx-app-tile-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dmzx-app-tile-badge, .dmzx-app-tile-status, .dmzx-app-modal-badge, .dmzx-app-modal-status {
	display: inline-flex; align-items: center; justify-content: center;
	height: 22px; padding: 0 9px; border-radius: 999px; font-size: 8px; font-weight: 800;
	letter-spacing: .08em; text-transform: uppercase; line-height: 1; white-space: nowrap; box-sizing: border-box;
}
.dmzx-app-tile-badge, .dmzx-app-modal-badge { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.90); border: 1px solid rgba(255,255,255,0.06); }
.dmzx-app-modal-badge { background: #eef4ff; color: #3157c8; border: 1px solid rgba(49,87,200,.10); }
.dmzx-app-tile-status, .dmzx-app-modal-status { padding-left: 8px; padding-right: 10px; border: 0; }
.dmzx-app-tile-status::before, .dmzx-app-modal-status::before {
	content: ""; width: 5px; height: 5px; border-radius: 999px; margin-right: 5px; background: currentColor;
}
.dmzx-app-tile-status-new,     .dmzx-app-modal-status.is-new     { background: #22c55e; color: #fff; }
.dmzx-app-tile-status-updated,  .dmzx-app-modal-status.is-updated { background: #3b82f6; color: #fff; }
.dmzx-app-tile-status-beta,     .dmzx-app-modal-status.is-beta    { background: #a855f7; color: #fff; }
.dmzx-app-tile-title {
	margin: 0; font-size: var(--dmzx-title-font); line-height: 1.18; font-weight: 900;
	color: var(--dmzx-app-text); white-space: nowrap; overflow: hidden;
	text-overflow: ellipsis; letter-spacing: -0.01em;
}
.dmzx-app-tile-title:hover { text-decoration: underline; text-decoration-color: rgba(255,255,255,0.25); text-underline-offset: 3px; }
.dmzx-app-tile-subtitle {
	margin-top: calc(6px * var(--dmzx-app-scale-safe)); font-size: var(--dmzx-subtitle-font);
	line-height: 1.35; color: var(--dmzx-app-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dmzx-app-tile-meta { margin-top: 7px; font-size: calc(.69rem * var(--dmzx-app-scale-safe)); line-height: 1.3; color: rgba(255,255,255,0.68); }
.dmzx-app-tile-description {
	margin-top: calc(8px * var(--dmzx-app-scale-safe)); font-size: var(--dmzx-desc-font);
	line-height: 1.5; color: rgba(255,255,255,0.78); display: -webkit-box;
	-webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
	min-height: calc(1.5em * 4);
}
.dmzx-app-empty {
	padding: calc(20px * var(--dmzx-app-scale-safe)); border-radius: calc(16px * var(--dmzx-app-scale-safe));
	background: rgba(255,255,255,0.05); color: #fff; text-align: center; font-weight: 800;
}

/* Modal */
.dmzx-app-modal { position: fixed; inset: 0; z-index: 9999; display: none; }
.dmzx-app-modal.is-open { display: block; }
.dmzx-app-modal-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,.74); backdrop-filter: blur(5px); }
.dmzx-app-modal-dialog {
	position: relative; z-index: 2; width: min(980px, calc(100% - 18px));
	margin: 24px auto; border-radius: var(--dmzx-modal-radius); background: #fff;
	box-shadow: 0 28px 70px rgba(2,6,23,.28); overflow: hidden;
}
.dmzx-app-modal-close {
	position: absolute; top: 12px; right: 12px; z-index: 3;
	width: var(--dmzx-modal-close-size); height: var(--dmzx-modal-close-size);
	border: 0; border-radius: 999px; background: rgba(15,23,42,.06);
	color: #0f172a; font-size: 28px; line-height: 1; cursor: pointer;
	transition: background .18s ease, transform .18s ease;
}
.dmzx-app-modal-close:hover { background: rgba(15,23,42,.12); transform: scale(1.04); }
.dmzx-app-modal-layout { display: grid; grid-template-columns: 300px 1fr; min-height: 560px; }
.dmzx-app-modal-media-wrap {
	padding: 18px; background: linear-gradient(180deg, #f5f8fe 0%, #eef4ff 100%);
	border-right: 1px solid rgba(15,23,42,.05);
}
.dmzx-app-modal-media {
	height: auto; min-height: 280px; display: flex; align-items: center; justify-content: center;
	background: rgba(255,255,255,0.9); border-radius: 18px; padding: 14px;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}
.dmzx-app-modal-media img { width: 100%; max-height: 320px; object-fit: contain; border-radius: 14px; }
.dmzx-app-main-image-trigger { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.dmzx-app-main-image-trigger img { width: 100%; height: 100%; object-fit: contain; border-radius: 14px; }
.dmzx-app-modal-gallery { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.dmzx-app-gallery-thumb {
	display: inline-flex; align-items: center; justify-content: center;
	width: 64px; height: 64px; min-width: 64px; min-height: 64px;
	padding: 4px; border: 1px solid rgba(15,23,42,.12); border-radius: 10px;
	background: #fff; cursor: pointer; overflow: hidden; box-sizing: border-box;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.dmzx-app-gallery-thumb:hover { transform: translateY(-1px); border-color: rgba(37,99,235,.28); }
.dmzx-app-gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.dmzx-app-gallery-thumb.is-active { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.14); }
.dmzx-app-modal-content { padding: 22px 22px 18px; display: flex; flex-direction: column; min-height: 0; }
.dmzx-app-modal-topline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-right: 52px; margin-bottom: 8px; }
.dmzx-app-modal-title {
	margin: 0; font-size: 1.65rem; line-height: 1.08; font-weight: 900; color: #0f172a;
	letter-spacing: -0.02em; padding-bottom: 10px; border-bottom: 1px solid rgba(15,23,42,.10);
}
.dmzx-app-modal-subtitle { margin-top: 10px; font-size: 1rem; font-weight: 700; color: #64748b; }
.dmzx-app-modal-meta { margin-top: 10px; font-size: .88rem; font-weight: 700; color: #64748b; }
.dmzx-app-modal-description {
	margin-top: 14px; font-size: .96rem; line-height: 1.78; color: #334155;
	max-height: 280px; overflow: auto; padding-right: 10px; white-space: normal;
	word-break: break-word; flex: 1 1 auto; scrollbar-width: thin; scrollbar-color: rgba(100,116,139,.6) transparent;
}
.dmzx-app-modal-description::-webkit-scrollbar { width: 8px; }
.dmzx-app-modal-description::-webkit-scrollbar-track { background: transparent; }
.dmzx-app-modal-description::-webkit-scrollbar-thumb { background: rgba(100,116,139,.45); border-radius: 999px; }
.dmzx-app-modal-description::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,.65); }
.dmzx-app-modal-description br { content: ""; display: block; margin-bottom: 10px; }

/* ── Officiele store badges ── */
.dmzx-app-modal-actions {
	margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(15,23,42,.06);
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.dmzx-store-badge {
	display: inline-block; text-decoration: none !important;
	transition: transform .18s ease, opacity .18s ease;
	border-radius: 12px; overflow: hidden; line-height: 0;
}
.dmzx-store-badge:hover { transform: translateY(-2px); opacity: .88; }
.dmzx-store-badge img          { display: block; height: 72px; width: auto; }
.dmzx-store-badge-play img     { height: 106px; }  /* Play PNG heeft ingebakken padding ~32% */

/* Lightbox */
.dmzx-app-image-lightbox { position: fixed; inset: 0; z-index: 2147483600; display: none; }
.dmzx-app-image-lightbox.is-open { display: block; }
.dmzx-app-image-lightbox-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,.88); backdrop-filter: blur(4px); z-index: 1; }
.dmzx-app-image-lightbox-dialog {
	position: relative; z-index: 2; width: min(99vw, 1400px); height: min(98vh, 980px);
	margin: 1vh auto; border-radius: 20px; background: #0f172a;
	box-shadow: 0 24px 70px rgba(0,0,0,.45); overflow: hidden; display: flex;
	align-items: center; justify-content: center;
}
.dmzx-app-image-lightbox-close {
	position: absolute; top: 12px; right: 12px; z-index: 3; width: 44px; height: 44px;
	border: 0; border-radius: 999px; background: rgba(255,255,255,.94);
	color: #0f172a; font-size: 30px; line-height: 1; cursor: pointer;
	box-shadow: 0 10px 24px rgba(2,6,23,.24);
}
.dmzx-app-image-lightbox-inner {
	width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
	padding: 56px 20px 20px; box-sizing: border-box;
}
.dmzx-app-image-lightbox-inner img {
	display: block; max-width: 100%; max-height: 100%; object-fit: contain;
	border-radius: 14px; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.28);
}

@media (max-width: 900px) {
	.dmzx-app-tile { flex-basis: calc(154px * var(--dmzx-app-scale-safe)); min-height: calc(294px * var(--dmzx-app-scale-safe)); }
	.dmzx-app-modal-layout { grid-template-columns: 1fr; min-height: 0; }
	.dmzx-app-modal-media-wrap { border-right: 0; border-bottom: 1px solid rgba(15,23,42,.05); }
	.dmzx-app-modal-media { min-height: 200px; }
	.dmzx-app-modal-media img { max-height: 240px; }
}

@media (max-width: 640px) {
	.dmzx-apps-shell, .dmzx-apps-shell .inner { min-height: auto; }
	.dmzx-apps-shell .inner { padding: 12px; }
	.dmzx-apps-header { align-items: flex-start; flex-direction: column; }
	.dmzx-apps-heading { font-size: clamp(.95rem, calc(1.15rem * var(--dmzx-app-scale-safe)), 1.15rem); max-width: 100%; }
	.dmzx-apps-nav { align-self: flex-end; }
	.dmzx-app-tile {
		flex: 0 0 calc(136px * var(--dmzx-app-scale-safe));
		padding: calc(8px * var(--dmzx-app-scale-safe));
		min-height: calc(252px * var(--dmzx-app-scale-safe));
	}
	.dmzx-app-tile-media {
		height: min(calc(100px * var(--dmzx-app-scale-safe)), var(--dmzx-media-height));
		min-height: min(calc(100px * var(--dmzx-app-scale-safe)), var(--dmzx-media-height));
		max-height: min(calc(100px * var(--dmzx-app-scale-safe)), var(--dmzx-media-height));
		padding: calc(8px * var(--dmzx-app-scale-safe));
	}
	.dmzx-app-tile-title    { font-size: calc(.88rem * var(--dmzx-app-scale-safe)); }
	.dmzx-app-tile-subtitle { font-size: calc(.73rem * var(--dmzx-app-scale-safe)); }
	.dmzx-app-tile-description { display: none; }
	.dmzx-app-modal { position: fixed; inset: 0; z-index: 2147483000; padding: 0; }
	.dmzx-app-modal-backdrop { position: absolute; inset: 0; z-index: 1; background: rgba(2,6,23,.82); backdrop-filter: blur(5px); }
	.dmzx-app-modal-dialog { position: relative; z-index: 2; width: 100%; max-width: 100%; height: 100dvh; margin: 0; border-radius: 0; overflow: hidden; background: #fff; }
	.dmzx-app-modal-close {
		position: fixed !important; top: calc(env(safe-area-inset-top) + 10px); right: 10px;
		width: 42px; height: 42px; display: flex !important; align-items: center; justify-content: center;
		border: 0; border-radius: 999px; background: rgba(255,255,255,0.96); color: #0f172a;
		font-size: 28px; line-height: 1; box-shadow: 0 8px 24px rgba(2,6,23,.22);
		z-index: 2147483001 !important;
	}
	.dmzx-app-modal-layout { display: flex; flex-direction: column; height: 100dvh; min-height: 100dvh; }
	.dmzx-app-modal-media-wrap {
		padding: calc(env(safe-area-inset-top) + 56px) 14px 10px; border-right: 0;
		border-bottom: 1px solid rgba(15,23,42,.05); background: linear-gradient(180deg, #f8fbff 0%, #f1f6ff 100%);
	}
	.dmzx-app-modal-media { min-height: 184px; max-height: 30vh; height: 30vh; padding: 12px; border-radius: 16px; }
	.dmzx-app-modal-media img { max-height: 100%; width: 100%; object-fit: contain; }
	.dmzx-app-modal-gallery { display: flex; gap: 6px; margin-top: 10px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
	.dmzx-app-gallery-thumb { width: 56px; height: 56px; min-width: 56px; min-height: 56px; flex: 0 0 56px; }
	.dmzx-app-modal-content { flex: 1 1 auto; min-height: 0; padding: 14px 14px calc(18px + env(safe-area-inset-bottom)); overflow: hidden; }
	.dmzx-app-modal-topline { gap: 8px; padding-right: 0; margin-bottom: 8px; }
	.dmzx-app-modal-badge, .dmzx-app-modal-status { height: 28px; padding: 0 10px; font-size: 9px; }
	.dmzx-app-modal-title   { font-size: 1.08rem; line-height: 1.15; padding-bottom: 8px; }
	.dmzx-app-modal-subtitle { font-size: .88rem; margin-top: 8px; }
	.dmzx-app-modal-meta    { font-size: .82rem; margin-top: 8px; }
	.dmzx-app-modal-description { margin-top: 12px; max-height: none; height: auto; flex: 1 1 auto; overflow: auto; font-size: .9rem; line-height: 1.7; padding-right: 2px; }
	.dmzx-app-modal-actions { margin-top: 12px; padding-top: 12px; padding-bottom: env(safe-area-inset-bottom); background: #fff; position: sticky; bottom: 0; z-index: 3; }
	.dmzx-store-badge img      { height: 58px; }
	.dmzx-store-badge-play img { height: 86px; }
	.dmzx-app-image-lightbox-dialog { width: 100vw; height: 100dvh; margin: 0; border-radius: 0; }
	.dmzx-app-image-lightbox-close { top: calc(env(safe-area-inset-top) + 10px); right: 10px; width: 42px; height: 42px; }
	.dmzx-app-image-lightbox-inner { padding: calc(env(safe-area-inset-top) + 56px) 10px calc(env(safe-area-inset-bottom) + 10px); }
}