/*
 * 9MinGames single-game presentation contract.
 * This file is the only owner of player, identity dock, toolbar, rating popover,
 * fullscreen and immersive-player geometry.
 */

body.nmg-game-view {
	--nmg-player-surface: #081321;
	--nmg-player-control: rgba(28, 43, 63, .94);
	--nmg-player-control-hover: rgba(43, 61, 86, .98);
	--nmg-player-divider: rgba(255, 255, 255, .12);
	--nmg-player-text: var(--nmg-text, #f4f7fb);
	--nmg-player-muted: var(--nmg-muted, #8e9aad);
}

body.nmg-game-view .nmg-game-frame {
	position: relative;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	border-radius: 14px;
	background: var(--nmg-player-surface);
	box-shadow: 0 16px 44px rgba(0, 0, 0, .18);
}

/* Player geometry ------------------------------------------------------- */
body.nmg-game-view .nmg-game-player-shell {
	position: relative;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

body.nmg-game-view .nmg-game-player-stage {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	border: 1px solid rgba(142, 154, 173, .24);
	border-bottom: 0;
	border-radius: 14px 14px 0 0;
	background: var(--nmg-game-backdrop-color, #101a2a);
	overflow: hidden;
}

body.nmg-game-view .nmg-game-player-shell[data-orientation="landscape"] .nmg-game-player-stage {
	aspect-ratio: var(--nmg-game-ratio, 16 / 9);
}

body.nmg-game-view .nmg-game-player-shell[data-orientation="square"] .nmg-game-player-stage,
body.nmg-game-view .nmg-game-player-shell[data-orientation="portrait"] .nmg-game-player-stage {
	height: min(78svh, 900px);
	min-height: 420px;
}

body.nmg-game-view .nmg-game-player-stage::before,
body.nmg-game-view .nmg-game-player-stage::after {
	position: absolute;
	content: "";
	pointer-events: none;
}

body.nmg-game-view .nmg-game-player-stage::before {
	inset: -36px;
	z-index: 0;
	background-color: var(--nmg-game-backdrop-color, #101a2a);
	background-image: var(--nmg-game-backdrop, none);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	filter: blur(30px) saturate(1.08);
	opacity: .78;
	transform: scale(1.12);
}

body.nmg-game-view .nmg-game-player-stage::after {
	inset: 0;
	z-index: 1;
	background:
		radial-gradient(circle at 50% 42%, rgba(var(--nmg-game-backdrop-rgb, 16, 26, 42), .04), rgba(4, 9, 17, .34) 84%),
		linear-gradient(180deg, rgba(4, 9, 17, .04), rgba(4, 9, 17, .2));
}

body.nmg-game-view .nmg-game-player {
	position: relative;
	z-index: 2;
	display: block;
	flex: 0 0 auto;
	width: min(100%, var(--nmg-player-ratio-max-width, 100%), var(--nmg-player-svh-width, var(--nmg-player-vh-width, 100vw)));
	min-width: 0;
	max-width: 100%;
	height: auto;
	max-height: 100%;
	aspect-ratio: var(--nmg-game-ratio, 16 / 9);
	background: color-mix(in srgb, var(--nmg-game-backdrop-color, #101a2a) 70%, #07111f);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 18px 48px rgba(0, 0, 0, .3);
	overflow: hidden;
}

body.nmg-game-view .nmg-game-player iframe,
body.nmg-game-view .nmg-player-cover,
body.nmg-game-view .nmg-player-loading,
body.nmg-game-view .nmg-player-error {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
}

body.nmg-game-view .nmg-game-player iframe {
	z-index: 5;
	display: block;
	min-width: 100%;
	min-height: 100%;
	border: 0;
	background: color-mix(in srgb, var(--nmg-game-backdrop-color, #101a2a) 60%, #07111f);
}

/* Cover and play CTA ---------------------------------------------------- */
body.nmg-game-view .nmg-player-cover {
	z-index: 3;
	display: grid;
	place-items: center;
	box-sizing: border-box;
	overflow: hidden;
}

body.nmg-game-view .nmg-player-cover__backdrop {
	position: absolute;
	inset: -24px;
	z-index: 0;
	display: block;
	background-image: var(--nmg-game-backdrop, none);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	filter: blur(20px) saturate(1.04);
	transform: scale(1.08);
}

body.nmg-game-view .nmg-player-cover__image {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-position: center;
}

body.nmg-game-view .nmg-game-player--cover-cover .nmg-player-cover__image {
	object-fit: cover;
}

body.nmg-game-view .nmg-game-player--cover-contain .nmg-player-cover__image {
	object-fit: contain;
}

body.nmg-game-view .nmg-player-cta {
	position: relative;
	inset: auto;
	z-index: 4;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: max-content;
	max-width: calc(100% - 32px);
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.15;
	text-align: center;
	text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
	transform: none;
	box-shadow: none;
	cursor: pointer;
}

body.nmg-game-view .nmg-player-cta__icon {
	display: grid;
	place-items: center;
	width: 68px;
	height: 68px;
	border: 2px solid rgba(255, 255, 255, .88);
	border-radius: 999px;
	background: rgba(7, 17, 31, .42);
	box-shadow: 0 10px 34px rgba(0, 0, 0, .3);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	transition: transform 160ms ease, background-color 160ms ease;
}

body.nmg-game-view .nmg-player-cta:hover .nmg-player-cta__icon,
body.nmg-game-view .nmg-player-cta:focus-visible .nmg-player-cta__icon {
	background: color-mix(in srgb, var(--nmg-accent, #6d5dfc) 72%, rgba(7, 17, 31, .5));
	transform: scale(1.04);
}

body.nmg-game-view .nmg-player-cta__icon svg {
	display: block;
	width: 32px;
	height: 32px;
}

body.nmg-game-view .nmg-game-player.is-loaded .nmg-player-cover {
	visibility: hidden;
	pointer-events: none;
}

/* Loading and error states --------------------------------------------- */
body.nmg-game-view .nmg-player-loading {
	z-index: 8;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 20px;
	box-sizing: border-box;
	background:
		linear-gradient(180deg, rgba(var(--nmg-game-backdrop-rgb, 16, 26, 42), .2), rgba(5, 10, 18, .68)),
		var(--nmg-game-backdrop-color, #101a2a);
	color: #fff;
	text-align: center;
	backdrop-filter: blur(12px) saturate(1.06);
	-webkit-backdrop-filter: blur(12px) saturate(1.06);
}

body.nmg-game-view .nmg-player-loading[hidden],
body.nmg-game-view .nmg-player-error[hidden] {
	display: none;
}

body.nmg-game-view .nmg-player-loading__mark {
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 18px;
	background: rgba(255, 255, 255, .12);
	box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
	animation: nmg-player-loading-float 1.8s ease-in-out infinite;
}

body.nmg-game-view .nmg-player-loading__mark svg {
	width: 27px;
	height: 27px;
}

body.nmg-game-view .nmg-player-loading__copy {
	display: grid;
	gap: 3px;
}

body.nmg-game-view .nmg-player-loading__copy strong {
	font-size: .96rem;
	font-weight: 800;
	line-height: 1.2;
}

body.nmg-game-view .nmg-player-loading__copy > span {
	color: rgba(255, 255, 255, .76);
	font-size: .78rem;
	font-weight: 600;
	line-height: 1.35;
}

body.nmg-game-view .nmg-player-loading__dots {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 10px;
}

body.nmg-game-view .nmg-player-loading__dots i {
	display: block;
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: currentColor;
	opacity: .35;
	animation: nmg-player-loading-dot 1.05s ease-in-out infinite;
}

body.nmg-game-view .nmg-player-loading__dots i:nth-child(2) { animation-delay: .14s; }
body.nmg-game-view .nmg-player-loading__dots i:nth-child(3) { animation-delay: .28s; }

body.nmg-game-view .nmg-player-error {
	z-index: 9;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px;
	box-sizing: border-box;
	background: rgba(7, 17, 31, .9);
	color: #fff;
	text-align: center;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

body.nmg-game-view .nmg-player-error p {
	max-width: 34rem;
	margin: 0;
	font-weight: 650;
	line-height: 1.45;
}

/* Player-owned fullscreen ---------------------------------------------- */
body.nmg-game-view .nmg-player-expand-control {
	position: absolute;
	right: max(10px, env(safe-area-inset-right));
	top: max(10px, env(safe-area-inset-top));
	z-index: 30;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	min-width: 42px;
	min-height: 42px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .34);
	border-radius: 13px;
	background: rgba(7, 17, 31, .7);
	color: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
	backdrop-filter: blur(9px);
	-webkit-backdrop-filter: blur(9px);
	cursor: pointer;
	touch-action: manipulation;
	transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

body.nmg-game-view .nmg-player-expand-control:hover,
body.nmg-game-view .nmg-player-expand-control:focus-visible,
body.nmg-game-view .nmg-player-expand-control.is-active {
	border-color: rgba(255, 255, 255, .72);
	background: color-mix(in srgb, var(--nmg-accent, #6d5dfc) 82%, rgba(7, 17, 31, .7));
	transform: translateY(-1px);
}

body.nmg-game-view .nmg-player-expand-control__icon,
body.nmg-game-view .nmg-player-expand-control__icon svg {
	display: block;
	width: 19px;
	height: 19px;
}

body.nmg-game-view .nmg-player-fullscreen-status {
	position: absolute;
	left: 50%;
	top: max(10px, env(safe-area-inset-top));
	z-index: 34;
	width: max-content;
	max-width: min(calc(100% - 84px), 390px);
	margin: 0;
	padding: 7px 10px;
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 999px;
	background: rgba(7, 17, 31, .9);
	color: #fff;
	font-size: .76rem;
	font-weight: 650;
	line-height: 1.3;
	text-align: center;
	box-shadow: 0 6px 22px rgba(0, 0, 0, .32);
	transform: translateX(-50%);
	pointer-events: none;
}

body.nmg-game-view .nmg-player-fullscreen-status[hidden] { display: none; }

body.nmg-game-view .nmg-game-player-shell::backdrop { background: #000; }

html.nmg-immersive-player-open,
body.nmg-immersive-player-open {
	overflow: hidden;
	overscroll-behavior: none;
}

body.nmg-immersive-player-open {
	position: fixed;
	top: var(--nmg-immersive-scroll-offset, 0);
	left: 0;
	right: 0;
	width: 100%;
}

body.nmg-game-view .nmg-game-player-shell:fullscreen,
body.nmg-game-view .nmg-game-player-shell:-webkit-full-screen,
body.nmg-game-view .nmg-game-player-shell.is-nmg-immersive {
	display: flex;
	flex-direction: column;
	width: var(--nmg-fullscreen-viewport-width, 100vw);
	height: var(--nmg-fullscreen-viewport-height, 100dvh);
	max-width: none;
	max-height: none;
	margin: 0;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
	box-sizing: border-box;
	border: 0;
	border-radius: 0;
	background: #000;
	box-shadow: none;
	overflow: hidden;
}

body.nmg-game-view .nmg-game-player-shell.is-nmg-immersive {
	position: fixed;
	inset: auto;
	top: var(--nmg-fullscreen-viewport-top, 0);
	left: var(--nmg-fullscreen-viewport-left, 0);
	z-index: 100000;
}

body.nmg-game-view .nmg-game-player-shell:fullscreen .nmg-game-player-stage,
body.nmg-game-view .nmg-game-player-shell:-webkit-full-screen .nmg-game-player-stage,
body.nmg-game-view .nmg-game-player-shell.is-nmg-immersive .nmg-game-player-stage {
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	min-height: 0;
	max-height: none;
	aspect-ratio: auto;
	border: 0;
	border-radius: 0;
	background: #000;
}

body.nmg-game-view .nmg-game-player-shell:not([data-fullscreen-fit="fill"]):fullscreen .nmg-game-player,
body.nmg-game-view .nmg-game-player-shell:not([data-fullscreen-fit="fill"]):-webkit-full-screen .nmg-game-player,
body.nmg-game-view .nmg-game-player-shell.is-nmg-immersive:not([data-fullscreen-fit="fill"]) .nmg-game-player {
	width: min(100%, var(--nmg-fullscreen-player-width, var(--nmg-player-fullscreen-dvh-width, 177.778dvh)));
	height: min(100%, var(--nmg-fullscreen-player-height, var(--nmg-player-fullscreen-dvw-height, 56.25dvw)));
	max-width: 100%;
	max-height: 100%;
	aspect-ratio: var(--nmg-game-ratio, 16 / 9);
	border-radius: 0;
}

body.nmg-game-view .nmg-game-player-shell[data-fullscreen-fit="fill"]:fullscreen .nmg-game-player,
body.nmg-game-view .nmg-game-player-shell[data-fullscreen-fit="fill"]:-webkit-full-screen .nmg-game-player,
body.nmg-game-view .nmg-game-player-shell.is-nmg-immersive[data-fullscreen-fit="fill"] .nmg-game-player {
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	aspect-ratio: auto;
	border-radius: 0;
}

body.nmg-game-view .nmg-game-player-shell.is-nmg-immersive .nmg-player-fullscreen-status {
	position: fixed;
	left: calc(var(--nmg-fullscreen-viewport-left, 0px) + (var(--nmg-fullscreen-viewport-width, 100vw) / 2));
	top: max(10px, calc(var(--nmg-fullscreen-viewport-top, 0px) + env(safe-area-inset-top)));
}

body.nmg-game-view .nmg-player-rotate-hint {
	position: absolute;
	left: 50%;
	bottom: max(68px, calc(env(safe-area-inset-bottom) + 58px));
	z-index: 32;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: min(88%, 360px);
	margin: 0;
	padding: 9px 13px;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 999px;
	background: rgba(7, 17, 31, .88);
	color: #fff;
	font-size: .875rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
	transform: translateX(-50%);
	pointer-events: none;
}

body.nmg-game-view .nmg-player-rotate-hint[hidden] { display: none; }
body.nmg-game-view .nmg-player-rotate-hint__icon,
body.nmg-game-view .nmg-player-rotate-hint__icon svg { width: 20px; height: 20px; }

/* Identity dock --------------------------------------------------------- */
body.nmg-game-view .nmg-game-dock {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	min-height: 58px;
	margin: 0;
	padding: 8px 12px;
	box-sizing: border-box;
	border: 0;
	border-radius: 0 0 14px 14px;
	background: color-mix(in srgb, var(--nmg-surface, #0d1929) 94%, #162337);
	color: var(--nmg-player-text);
	box-shadow: none;
	overflow: visible;
}

body.nmg-game-view .nmg-game-dock__identity {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 11px;
	min-width: 0;
	text-align: left;
}

body.nmg-game-view .nmg-game-dock__thumb {
	display: block;
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	min-width: 42px;
	margin: 0;
	border-radius: 10px;
	object-fit: cover;
}

body.nmg-game-view .nmg-game-dock__copy {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 4px;
	min-width: 0;
	text-align: left;
}

body.nmg-game-view .nmg-game-dock__title {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	padding: 0;
	color: var(--nmg-player-text);
	font-size: 1.02rem;
	font-weight: 800;
	line-height: 1.18;
	letter-spacing: -.012em;
	text-align: left;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.nmg-game-view .nmg-game-dock__meta {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	width: 100%;
	min-width: 0;
	margin: 0;
	color: var(--nmg-player-muted);
	font-size: .78rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
}

body.nmg-game-view .nmg-rating-summary {
	display: inline-flex;
	align-items: center;
	min-width: 0;
	color: var(--nmg-player-muted);
}

body.nmg-game-view .nmg-rating-summary strong {
	color: var(--nmg-player-text);
	font-weight: 800;
}

body.nmg-game-view .nmg-rating-summary .nmg-inline-icon {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-right: 5px;
	color: #ffc42f;
	fill: #ffc42f;
}

body.nmg-game-view .nmg-rating-summary__votes::before {
	content: "·";
	margin-inline: 6px;
	color: rgba(142, 154, 173, .78);
}

body.nmg-game-view .nmg-engagement-disclosure {
	margin-left: 5px;
	font-size: .68rem;
	line-height: 1;
}

body.nmg-game-view .nmg-category-pill {
	display: inline-flex;
	align-items: center;
	max-width: min(150px, 42vw);
	height: 22px;
	padding: 0 9px;
	border: 1px solid color-mix(in srgb, var(--nmg-accent, #6d5dfc) 62%, white 5%);
	border-radius: 999px;
	background: color-mix(in srgb, var(--nmg-accent, #6d5dfc) 18%, transparent);
	color: #f5f4ff;
	font-size: .7rem;
	font-weight: 750;
	line-height: 1;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Action toolbar -------------------------------------------------------- */
body.nmg-game-view .nmg-game-toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	overflow: visible;
}

body.nmg-game-view .nmg-toolbar-cluster {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	min-width: 0;
	margin: 0;
	border: 0;
	box-shadow: none;
}

body.nmg-game-view .nmg-toolbar-cluster--reactions {
	height: 36px;
	border-radius: 13px;
	background: var(--nmg-player-control);
	overflow: hidden;
}

body.nmg-game-view .nmg-toolbar-cluster--utilities {
	gap: 7px;
	background: transparent;
}

body.nmg-game-view .nmg-toolbar-button,
body.nmg-game-view .nmg-rating-picker > .nmg-toolbar-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	min-width: 36px;
	min-height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 13px;
	background: var(--nmg-player-control);
	color: var(--nmg-player-text);
	font: inherit;
	line-height: 1;
	box-shadow: none;
	cursor: pointer;
	touch-action: manipulation;
	transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

body.nmg-game-view .nmg-toolbar-cluster--reactions .nmg-toolbar-button {
	position: relative;
	width: auto;
	min-width: 64px;
	padding-inline: 11px;
	border-radius: 0;
	background: transparent;
}

body.nmg-game-view .nmg-toolbar-cluster--reactions .nmg-toolbar-button + .nmg-toolbar-button::before {
	position: absolute;
	left: 0;
	top: 8px;
	bottom: 8px;
	width: 1px;
	content: "";
	background: var(--nmg-player-divider);
}

body.nmg-game-view .nmg-toolbar-button:hover,
body.nmg-game-view .nmg-toolbar-button:focus-visible,
body.nmg-game-view .nmg-toolbar-button.is-active,
body.nmg-game-view .nmg-rating-picker > .nmg-toolbar-button:hover,
body.nmg-game-view .nmg-rating-picker > .nmg-toolbar-button:focus-visible,
body.nmg-game-view .nmg-rating-picker > .nmg-toolbar-button.is-active {
	background: var(--nmg-player-control-hover);
	color: #fff;
	transform: translateY(-1px);
}

body.nmg-game-view .nmg-toolbar-button[aria-pressed="true"] {
	background: color-mix(in srgb, var(--nmg-accent, #6d5dfc) 34%, var(--nmg-player-control));
}

body.nmg-game-view .nmg-toolbar-button .nmg-inline-icon,
body.nmg-game-view .nmg-rating-picker > .nmg-toolbar-button .nmg-inline-icon {
	display: block;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 0;
}

body.nmg-game-view .nmg-toolbar-button__count {
	font-size: .78rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	letter-spacing: .01em;
}

body.nmg-game-view .nmg-toolbar-control--rating .is-rated,
body.nmg-game-view .nmg-toolbar-control--rating .is-rated .nmg-inline-icon {
	color: #ffc42f;
	fill: #ffc42f;
}

/* Rating popover is viewport-positioned by game-page.js. */
body.nmg-game-view .nmg-rating-picker { position: relative; flex: 0 0 auto; }

body.nmg-game-view .nmg-rating-picker__panel {
	position: fixed;
	left: var(--nmg-rating-panel-left, 50%);
	top: var(--nmg-rating-panel-top, 50%);
	z-index: 100100;
	display: flex;
	align-items: center;
	gap: 4px;
	width: max-content;
	margin: 0;
	padding: 7px;
	border: 1px solid rgba(142, 154, 173, .3);
	border-radius: 13px;
	background: rgba(8, 19, 33, .97);
	box-shadow: 0 16px 44px rgba(0, 0, 0, .38);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

body.nmg-game-view .nmg-rating-picker__panel[hidden] { display: none; }

body.nmg-game-view .nmg-rating-picker__panel button {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: rgba(255, 255, 255, .5);
	cursor: pointer;
}

body.nmg-game-view .nmg-rating-picker__panel button:hover,
body.nmg-game-view .nmg-rating-picker__panel button:focus-visible,
body.nmg-game-view .nmg-rating-picker__panel button.is-active {
	background: rgba(255, 196, 47, .12);
	color: #ffc42f;
}

body.nmg-game-view .nmg-rating-picker__panel svg { width: 21px; height: 21px; }

body.nmg-game-view .nmg-interaction-status {
	min-height: 0;
	margin: 0;
	color: var(--nmg-player-muted);
	font-size: .78rem;
	text-align: right;
}

/* Mobile presentation --------------------------------------------------- */
@media (max-width: 768px) {
	body.nmg-game-view { overflow-x: clip; }

	body.nmg-game-view .nmg-game-frame {
		border-radius: 14px;
		background: transparent;
		box-shadow: none;
	}

	body.nmg-game-view .nmg-game-player-shell[data-mobile-layout="portrait-stage"]:not(.is-nmg-immersive):not(:fullscreen):not(:-webkit-full-screen) .nmg-game-player-stage {
		height: min(72svh, 133.333vw, 680px);
		min-height: min(400px, 133.333vw);
		aspect-ratio: auto;
		border-inline: 0;
		border-radius: 14px 14px 0 0;
	}

	body.nmg-game-view .nmg-game-player-shell[data-mobile-layout="portrait-stage"]:not(.is-nmg-immersive):not(:fullscreen):not(:-webkit-full-screen) .nmg-game-player {
		width: min(100%, var(--nmg-mobile-player-svh-width, 100%), var(--nmg-mobile-player-vw-width, 100%), var(--nmg-mobile-player-max-width, 100%));
		max-height: 100%;
	}

	body.nmg-game-view .nmg-player-expand-control {
		right: max(10px, env(safe-area-inset-right));
		top: max(10px, env(safe-area-inset-top));
		width: 44px;
		height: 44px;
		min-width: 44px;
		min-height: 44px;
		border-radius: 14px;
	}

	body.nmg-game-view .nmg-game-dock {
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
		min-height: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	body.nmg-game-view .nmg-game-dock__identity {
		display: flex;
		align-items: center;
		justify-content: flex-start;
		gap: 12px;
		width: 100%;
		min-height: 74px;
		padding: 10px 14px;
		box-sizing: border-box;
		border-radius: 0 0 14px 14px;
		background: color-mix(in srgb, var(--nmg-surface, #0d1929) 94%, #162337);
		text-align: left;
	}

	body.nmg-game-view .nmg-game-dock__thumb {
		flex-basis: 52px;
		width: 52px;
		height: 52px;
		min-width: 52px;
		border-radius: 12px;
	}

	body.nmg-game-view .nmg-game-dock__copy {
		align-items: flex-start;
		justify-content: center;
		gap: 5px;
		min-height: 52px;
		text-align: left;
	}

	body.nmg-game-view .nmg-game-dock__title {
		font-size: 1rem;
		line-height: 1.2;
		text-align: left;
	}

	body.nmg-game-view .nmg-game-dock__meta {
		justify-content: flex-start;
		gap: 7px;
		font-size: .76rem;
		text-align: left;
		overflow: hidden;
	}

	body.nmg-game-view .nmg-category-pill { max-width: 112px; }

	body.nmg-game-view .nmg-game-toolbar {
		justify-content: center;
		gap: 8px;
		width: 100%;
		min-height: 0;
		margin: 0;
		padding: 8px 10px;
		box-sizing: border-box;
		border: 0;
		border-radius: 14px;
		background: color-mix(in srgb, var(--nmg-surface, #0d1929) 94%, #162337);
		box-shadow: none;
		overflow: visible;
	}

	body.nmg-game-view .nmg-toolbar-cluster--reactions { height: 40px; }
	body.nmg-game-view .nmg-toolbar-cluster--utilities { gap: 7px; }

	body.nmg-game-view .nmg-toolbar-button,
	body.nmg-game-view .nmg-rating-picker > .nmg-toolbar-button {
		width: 40px;
		height: 40px;
		min-width: 40px;
		min-height: 40px;
		border-radius: 14px;
	}

	body.nmg-game-view .nmg-toolbar-cluster--reactions .nmg-toolbar-button {
		min-width: 64px;
		padding-inline: 10px;
	}


	body.nmg-game-view .nmg-report-dialog input,
	body.nmg-game-view .nmg-report-dialog select,
	body.nmg-game-view .nmg-report-dialog textarea {
		font-size: 16px;
	}
}

@media (max-width: 360px) {
	body.nmg-game-view .nmg-game-dock__identity {
		gap: 10px;
		min-height: 68px;
		padding: 8px 10px;
	}

	body.nmg-game-view .nmg-game-dock__thumb {
		width: 48px;
		height: 48px;
		min-width: 48px;
	}

	body.nmg-game-view .nmg-game-dock__copy { min-height: 48px; }
	body.nmg-game-view .nmg-game-dock__title { font-size: .94rem; }
	body.nmg-game-view .nmg-game-dock__meta { gap: 5px; font-size: .71rem; }
	body.nmg-game-view .nmg-category-pill { max-width: 82px; }

	body.nmg-game-view .nmg-game-toolbar {
		justify-content: center;
		gap: 6px;
		padding: 7px 8px;
		overflow: visible;
	}

	body.nmg-game-view .nmg-toolbar-cluster--reactions { height: 38px; }
	body.nmg-game-view .nmg-toolbar-cluster--utilities { gap: 5px; }

	body.nmg-game-view .nmg-toolbar-button,
	body.nmg-game-view .nmg-rating-picker > .nmg-toolbar-button {
		width: 38px;
		height: 38px;
		min-width: 38px;
		min-height: 38px;
		border-radius: 13px;
	}

	body.nmg-game-view .nmg-toolbar-cluster--reactions .nmg-toolbar-button {
		min-width: 56px;
		padding-inline: 8px;
	}

	body.nmg-game-view .nmg-toolbar-button .nmg-inline-icon,
	body.nmg-game-view .nmg-rating-picker > .nmg-toolbar-button .nmg-inline-icon {
		width: 17px;
		height: 17px;
	}

	body.nmg-game-view .nmg-toolbar-button__count { font-size: .74rem; }
}

@keyframes nmg-player-loading-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-4px); }
}

@keyframes nmg-player-loading-dot {
	0%, 60%, 100% { opacity: .28; transform: translateY(0); }
	30% { opacity: 1; transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
	body.nmg-game-view .nmg-player-loading__mark,
	body.nmg-game-view .nmg-player-loading__dots i {
		animation: none;
	}
}
