/* =========================================================================
   PARKMEISTER – Game-Oberfläche
   Eigenständige Spiel-Optik in der Farbwelt von ihr-parkplatz.de:
   Dunkelblau als Grund, Orange für Auswahl/Fortschritt/CTA, Weiß für
   Typografie. Keine Website-Formulare, keine Karten-Sammlungen – Game-UI.
   Alle Klassen tragen das Präfix pmg- und leben NUR in der Spiel-Ebene.
   ========================================================================= */

.pmg {
	position: fixed;
	inset: 0;
	z-index: 2100;
	background: #10324e;
	color: #fff;
	font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
	overflow: hidden;
}
.pmg input,
.pmg textarea { -webkit-user-select: text; user-select: text; }
.pmg button { font: inherit; cursor: pointer; }
.pmg :focus-visible { outline: 3px solid #018f97; outline-offset: 2px; }

body.iph-pm-locked { overflow: hidden; }
body.iph-pm-locked .iph-header,
body.iph-pm-locked .iph-cookie { display: none; }

.pmg-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

/* -------------------- Szenen-Container -------------------- */

.pmg-scene {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	overflow-y: auto;
	padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
		max(1.2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
	opacity: 0;
	transform: translateY(8px);
}
.pmg-scene.is-in {
	opacity: 1;
	transform: none;
	transition: opacity .28s ease, transform .28s ease;
}
.pmg-scene > * { width: min(680px, 100%); }

@media (prefers-reduced-motion: reduce) {
	.pmg-scene, .pmg-scene.is-in { transition: none; transform: none; opacity: 1; }
}

/* -------------------- Logo (Cover-Stil) -------------------- */

.pmg-logowrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .45rem;
	margin: .8rem 0 0;
}
.pmg-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .12em;
	margin: 0;
	font-weight: 800;
}
.pmg-logo__sign {
	display: inline-flex;
	align-items: flex-end;
	gap: 0;
	padding: .12em .2em .1em .16em;
	border-radius: .26em;
	background: linear-gradient(165deg, #4b8fe0 0%, #1e57ab 48%, #123a7c 100%);
	border: .085em solid #fff;
	box-shadow:
		inset 0 .08em .16em rgba(255, 255, 255, .35),
		0 .16em 0 rgba(4, 12, 26, .45),
		0 .5em 1.4em rgba(0, 0, 0, .4);
	color: #fff;
	transform: rotate(-4deg);
	line-height: .9;
}
.pmg-logo__p { font-size: 1.35em; }
/* „ark" schmiegt sich unter den Bogen des P – wie auf dem Cover: das a
   beginnt unterhalb der P-Rundung, nicht daneben. */
.pmg-logo__ark {
	font-size: .48em;
	margin-left: -1.05em;
	padding-bottom: .1em;
	letter-spacing: .01em;
	position: relative;
}
.pmg-logo__meister {
	position: relative;
	font-size: 1.35em;
	font-style: italic;
	letter-spacing: .01em;
	color: #fff;
	padding: .1em .12em .2em .06em;
	text-shadow:
		.05em .07em 0 #0b2038,
		-.02em -.02em 0 #0b2038, .02em -.02em 0 #0b2038,
		-.02em .02em 0 #0b2038, .03em .03em 0 #0b2038,
		0 .35em .9em rgba(0, 0, 0, .5);
}
/* Oranger Schwung unter „Meister" – wie auf dem Cover. */
.pmg-logo__meister::after {
	content: '';
	position: absolute;
	left: .08em;
	right: .12em;
	bottom: .02em;
	height: .13em;
	border-radius: .1em;
	background: linear-gradient(90deg, #0b9aa1, #016f76);
	transform: skewX(-24deg) rotate(-1.5deg);
	box-shadow: 0 .1em .3em rgba(0, 0, 0, .35);
}
/* Die Krone ersetzt den i-Punkt: „Meıster" mit punktlosem ı, die Krone
   sitzt zentriert darüber, wo sonst der Punkt stünde. */
.pmg-logo__i { position: relative; display: inline-block; font-style: inherit; }
.pmg-logo__crown {
	position: absolute;
	top: -.34em;
	left: 58%;
	width: .52em;
	height: auto;
	transform: translateX(-50%) rotate(-6deg);
	filter: drop-shadow(0 .05em .09em rgba(0, 0, 0, .4));
}
.pmg-boot .pmg-logo, .pmg-menu .pmg-logo { font-size: clamp(1.7rem, 6vmin, 2.8rem); }

/* Bild-Logo (parkmeister-logo.webp): zentriert, Krone und Byline sind
   Teil der Grafik. Größe über die Bildbreite, nicht über die Schrift. */
.pmg-logo--img { font-size: 1rem !important; }
.pmg-logo--img img {
	display: block;
	width: min(380px, 72vw);
	height: auto;
	filter: drop-shadow(0 14px 34px rgba(0, 0, 0, .45));
}
.pmg-boot .pmg-logo--img img { width: min(420px, 76vw); }

/* Herkunftszeile: reiner Text, rechtsbündig an der Logo-Kante. */
.pmg-byline {
	display: flex;
	align-items: baseline;
	gap: .3rem;
	align-self: flex-end;
	margin-top: -.1rem;
	padding-right: .2rem;
	font-size: .72rem;
	color: rgba(255, 255, 255, .65);
}
.pmg-byline__text { font-weight: 700; color: #fff; }
.pmg-byline__text b { color: #2aa7ad; }

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Hinweiszeile in der Garage (Gespann). */
.pmg-garage__note {
	max-width: 480px;
	margin: -.3rem 0 .7rem;
	text-align: center;
	font-size: .76rem;
	color: #5fc9cd;
}

.pmg-tagline {
	text-align: center;
	margin: .5rem 0 1.2rem;
	color: rgba(255, 255, 255, .78);
	letter-spacing: .14em;
	text-transform: uppercase;
	font-size: .78rem;
	font-weight: 600;
}

/* -------------------- Boot -------------------- */

.pmg-boot {
	margin: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 60vh;
}
.pmg-bootbar {
	width: min(300px, 70vw);
	height: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .14);
	overflow: hidden;
	margin-top: 1.6rem;
}
.pmg-bootbar__fill {
	display: block;
	height: 100%;
	width: 8%;
	border-radius: 999px;
	background: linear-gradient(90deg, #018f97, #5fc9cd);
	transition: width .7s cubic-bezier(.3, .7, .3, 1);
}
.pmg-bootnote {
	margin-top: .8rem;
	font-size: .8rem;
	color: rgba(255, 255, 255, .55);
}

/* -------------------- Hauptmenü -------------------- */

.pmg-menu {
	margin: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-bottom: 1rem;
}

.pmg-playerlvl {
	display: flex;
	align-items: center;
	gap: .6rem;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .06em;
	color: rgba(255, 255, 255, .85);
	margin-bottom: 1.2rem;
}
.pmg-playerlvl__bar {
	width: 130px;
	height: 7px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .16);
	overflow: hidden;
}
.pmg-playerlvl__bar > span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, #018f97, #5fc9cd);
	border-radius: 999px;
}
.pmg-playerlvl__xp { font-weight: 500; color: rgba(255, 255, 255, .55); }

.pmg-menulist {
	display: flex;
	flex-direction: column;
	gap: .55rem;
	width: min(340px, 100%);
}
.pmg-menubtn {
	display: flex;
	align-items: center;
	gap: .8rem;
	min-height: 54px;
	padding: .6rem 1.2rem;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, .16);
	background: rgba(10, 34, 62, .72);
	color: #fff;
	font-weight: 700;
	letter-spacing: .08em;
	font-size: .92rem;
	backdrop-filter: blur(4px);
	transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.pmg-menubtn:hover { transform: translateY(-2px); border-color: rgba(255, 153, 51, .8); }
.pmg-menubtn__icon { width: 1.5rem; text-align: center; }
.pmg-menubtn--primary {
	background: linear-gradient(135deg, #018f97 0%, #016f76 100%);
	border-color: transparent;
	box-shadow: 0 10px 26px rgba(1, 143, 151, .35);
	min-height: 60px;
	font-size: 1rem;
}
.pmg-menubtn--primary:hover { filter: brightness(1.07); }

.pmg-dailycard {
	margin-top: 1.3rem;
	width: min(340px, 100%);
	display: flex;
	flex-direction: column;
	gap: .3rem;
	padding: .9rem 1.1rem 1rem;
	border-radius: 14px;
	border: 1px solid rgba(255, 178, 94, .35);
	background: rgba(20, 46, 78, .8);
}
.pmg-dailycard__eyebrow {
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #5fc9cd;
}
.pmg-dailycard strong { font-size: .95rem; }
.pmg-dailycard__best { font-size: .78rem; color: rgba(255, 255, 255, .6); }
.pmg-dailycard .pmg-btn { margin-top: .5rem; }

.pmg-exitlink {
	margin-top: 1.4rem;
	background: none;
	border: none;
	color: rgba(255, 255, 255, .55);
	font-size: .78rem;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.pmg-exitlink:hover { color: #5fc9cd; }

/* -------------------- Szenen-Kopf -------------------- */

.pmg-scenehead {
	display: flex;
	align-items: center;
	gap: .8rem;
	margin: .4rem 0 1.1rem;
}
.pmg-scenehead__titles h2 {
	margin: 0;
	font-size: 1.25rem;
	letter-spacing: .06em;
}
.pmg-scenehead__sub { font-size: .74rem; color: rgba(255, 255, 255, .55); letter-spacing: .08em; text-transform: uppercase; }
.pmg-backbtn {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, .2);
	background: rgba(10, 34, 62, .7);
	color: #fff;
	font-size: 1.4rem;
	line-height: 1;
}
.pmg-backbtn:hover { border-color: #018f97; color: #5fc9cd; }

/* -------------------- Schaltflächen -------------------- */

.pmg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45rem;
	min-height: 48px;
	padding: .55rem 1.3rem;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, .22);
	background: rgba(16, 42, 72, .85);
	color: #fff;
	font-weight: 700;
	transition: transform .15s ease, filter .15s ease, border-color .15s ease;
}
.pmg-btn:hover { transform: translateY(-1px); border-color: rgba(255, 153, 51, .7); }
.pmg-btn--primary {
	background: linear-gradient(135deg, #018f97 0%, #016f76 100%);
	border-color: transparent;
	box-shadow: 0 8px 22px rgba(1, 143, 151, .32);
}
.pmg-btn--primary:hover { filter: brightness(1.07); }
.pmg-btn--ghost { background: transparent; }
.pmg-btn--big { min-height: 56px; padding: .7rem 2.2rem; font-size: 1.05rem; }

/* -------------------- Garage -------------------- */

.pmg-garage { display: flex; flex-direction: column; align-items: center; margin: auto; }
.pmg-garage__floor {
	display: flex;
	align-items: center;
	gap: .6rem;
	width: 100%;
	justify-content: center;
}
.pmg-garage__slot {
	position: relative;
	width: min(460px, 72vw);
	padding: 1.4rem 1rem 1rem;
	border-radius: 18px;
	background:
		radial-gradient(ellipse 70% 45% at 50% 78%, rgba(255, 178, 94, .18), rgba(255, 178, 94, 0) 70%),
		linear-gradient(180deg, rgba(12, 34, 60, .6), rgba(8, 24, 44, .9));
	border: 1px solid rgba(255, 255, 255, .12);
}
.pmg-garage__slot::after {
	content: '';
	position: absolute;
	left: 12%;
	right: 12%;
	bottom: .55rem;
	height: 3px;
	border-radius: 3px;
	background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 18px, transparent 18px 30px);
	opacity: .5;
}
.pmg-garage__car { display: block; width: 100%; height: auto; }
.pmg-garage__slot.is-slidein .pmg-garage__car { animation: pmgSlideIn .35s cubic-bezier(.2, .8, .3, 1); }
@keyframes pmgSlideIn {
	from { transform: translateX(34px); opacity: .2; }
	to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.pmg-garage__slot.is-slidein .pmg-garage__car { animation: none; }
}

.pmg-navarrow {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .25);
	background: rgba(10, 34, 62, .8);
	color: #fff;
	font-size: 1.6rem;
	line-height: 1;
	flex: 0 0 auto;
}
.pmg-navarrow:hover { border-color: #018f97; color: #5fc9cd; }

.pmg-garage__name { margin: .9rem 0 .4rem; font-size: 1.3rem; letter-spacing: .04em; }
.pmg-garage__stats { display: flex; gap: 1.4rem; flex-wrap: wrap; justify-content: center; margin-bottom: .8rem; }
.pmg-stat { display: flex; flex-direction: column; align-items: center; gap: .2rem; font-size: .72rem; color: rgba(255, 255, 255, .65); }
.pmg-dots { display: inline-flex; gap: .22rem; }
.pmg-dots i {
	width: .55rem;
	height: .55rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, .18);
}
.pmg-dots i.is-on { background: #018f97; box-shadow: 0 0 6px rgba(1, 143, 151, .6); }

.pmg-garage__strip { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1rem; }
.pmg-chip {
	padding: .4rem .8rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, .2);
	background: transparent;
	color: rgba(255, 255, 255, .75);
	font-size: .78rem;
	font-weight: 600;
}
.pmg-chip.is-active { background: #018f97; border-color: #018f97; color: #fff; }

/* -------------------- Schwierigkeit -------------------- */

.pmg-diff { margin: auto; width: min(880px, 100%); }
.pmg-diff__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
	gap: .9rem;
}
/* Zweier-Wahl (Trainieren/Spielen): größere Karten, mehr Luft. */
.pmg-diff__grid--two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.pmg-diff__grid--two .pmg-diffcard { padding: 1.5rem 1.3rem 1.3rem; }
.pmg-diff__grid--two .pmg-diffcard__icon { font-size: 1.8rem; }
.pmg-diff__grid--two .pmg-diffcard strong { font-size: 1.2rem; }
.pmg-diffcard {
	display: flex;
	flex-direction: column;
	gap: .3rem;
	padding: 1.2rem 1.1rem 1rem;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, .14);
	background: rgba(10, 32, 58, .8);
	color: #fff;
	text-align: left;
	transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.pmg-diffcard:hover { transform: translateY(-3px); border-color: rgba(255, 153, 51, .8); box-shadow: 0 14px 30px rgba(0, 0, 0, .35); }
.pmg-diffcard__icon { font-size: 1.4rem; }
.pmg-diffcard strong { font-size: 1.05rem; letter-spacing: .1em; margin: .2rem 0 .3rem; }
.pmg-diffcard span { font-size: .82rem; color: rgba(255, 255, 255, .72); }
.pmg-diffcard__done { margin-top: .6rem; font-size: .72rem !important; color: #5fc9cd !important; font-weight: 700; }
.pmg-diffcard--green strong { color: #7fe0a8; }
.pmg-diffcard--orange strong { color: #5fc9cd; }
.pmg-diffcard--red strong { color: #ff8d8d; }

/* -------------------- Levelauswahl -------------------- */

.pmg-levels { margin: auto; }
.pmg-levels__track { display: flex; flex-direction: column; align-items: stretch; gap: .15rem; padding-bottom: 1rem; }
.pmg-levels__link { text-align: center; color: rgba(255, 255, 255, .3); font-size: .9rem; line-height: 1.1; }
.pmg-levelnode {
	display: flex;
	align-items: center;
	gap: .9rem;
	padding: .75rem .95rem;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, .14);
	background: rgba(10, 32, 58, .82);
	color: #fff;
	text-align: left;
	transition: transform .15s ease, border-color .15s ease;
}
.pmg-levelnode:hover:not(:disabled) { transform: translateX(4px); border-color: rgba(255, 153, 51, .8); }
.pmg-levelnode.is-done { border-color: rgba(127, 224, 168, .4); }
.pmg-levelnode.is-locked { opacity: .45; cursor: not-allowed; }
.pmg-levelnode__no {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.6rem;
	height: 2.6rem;
	border-radius: 12px;
	background: rgba(1, 143, 151, .16);
	color: #5fc9cd;
	font-weight: 800;
	letter-spacing: .04em;
}
.pmg-levelnode.is-done .pmg-levelnode__no { background: rgba(127, 224, 168, .16); color: #7fe0a8; }
.pmg-levelnode__body { display: flex; flex-direction: column; gap: .12rem; min-width: 0; flex: 1; }
.pmg-levelnode__body strong { font-size: .95rem; }
.pmg-levelnode__hint { font-size: .76rem; color: rgba(255, 255, 255, .6); }
.pmg-levelnode__best { font-size: .72rem; color: #5fc9cd; font-weight: 600; }
.pmg-levelnode__stars { flex: 0 0 auto; color: #ffb200; letter-spacing: .1em; font-size: .95rem; }

/* -------------------- Bestleistungen -------------------- */

.pmg-records { margin: 0 auto auto; }
.pmg-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pmg-tab {
	padding: .5rem .85rem;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, .18);
	background: transparent;
	color: rgba(255, 255, 255, .7);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .08em;
}
.pmg-tab.is-active { background: #018f97; border-color: #018f97; color: #fff; }
.pmg-records__group { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: #5fc9cd; margin: 1rem 0 .4rem; }
.pmg-recrow {
	display: flex;
	align-items: center;
	gap: .8rem;
	padding: .55rem .8rem;
	border-radius: 10px;
	background: rgba(10, 32, 58, .7);
	margin-bottom: .3rem;
	font-size: .84rem;
}
.pmg-recrow__name { flex: 1; min-width: 0; }
.pmg-recrow__stars { color: #ffb200; }
.pmg-recrow__score { color: rgba(255, 255, 255, .75); font-variant-numeric: tabular-nums; }
.pmg-empty { color: rgba(255, 255, 255, .6); font-size: .86rem; }

.pmg-mastercard {
	display: flex;
	flex-direction: column;
	gap: .3rem;
	padding: 1.1rem 1.2rem;
	border-radius: 16px;
	border: 1px solid rgba(255, 178, 94, .4);
	background: rgba(20, 46, 78, .85);
	margin-bottom: .8rem;
}
.pmg-mastercard__icon { font-size: 1.6rem; }

.pmg-achievement {
	display: flex;
	align-items: center;
	gap: .9rem;
	padding: .7rem .9rem;
	border-radius: 12px;
	background: rgba(10, 32, 58, .7);
	margin-bottom: .35rem;
	opacity: .55;
}
.pmg-achievement.is-unlocked { opacity: 1; border: 1px solid rgba(255, 178, 94, .4); }
.pmg-achievement__icon { font-size: 1.4rem; }
.pmg-achievement > span:nth-child(2) { display: flex; flex-direction: column; gap: .1rem; flex: 1; }
.pmg-achievement strong { font-size: .88rem; }
.pmg-achievement span span { font-size: .74rem; color: rgba(255, 255, 255, .6); }
.pmg-achievement__state { font-size: .72rem; color: rgba(255, 255, 255, .5); }

/* -------------------- Einstellungen -------------------- */

.pmg-settings { margin: 0 auto auto; }
.pmg-settings__body { padding-bottom: 1.4rem; }
.pmg-settings__group {
	font-size: .78rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #5fc9cd;
	margin: 1.2rem 0 .5rem;
}
.pmg-settings__note { font-size: .74rem; color: rgba(255, 255, 255, .55); margin: .2rem 0 .6rem; }
.pmg-setrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem .9rem;
	margin-bottom: .55rem;
}
.pmg-setrow__label { flex: 0 0 9.5rem; font-size: .84rem; color: rgba(255, 255, 255, .85); }
.pmg-setrow__opts { display: flex; flex-wrap: wrap; gap: .3rem; }
.pmg-opt {
	padding: .42rem .75rem;
	border-radius: 9px;
	border: 1px solid rgba(255, 255, 255, .2);
	background: transparent;
	color: rgba(255, 255, 255, .75);
	font-size: .78rem;
	font-weight: 600;
	transition: background .12s ease, border-color .12s ease;
}
.pmg-opt.is-active { background: #018f97; border-color: #018f97; color: #fff; }
.pmg-slider {
	flex: 1 1 10rem;
	max-width: 240px;
	accent-color: #018f97;
	min-height: 32px;
}
.pmg-keytable {
	display: grid;
	grid-template-columns: auto auto;
	gap: .3rem 1.2rem;
	justify-content: start;
	font-size: .82rem;
	margin-bottom: .5rem;
}
.pmg-keytable kbd {
	background: rgba(255, 255, 255, .12);
	border-radius: 6px;
	padding: .1rem .5rem;
	font-family: inherit;
	font-size: .78rem;
}

/* -------------------- Spielinfo -------------------- */

.pmg-info { margin: 0 auto auto; }
.pmg-info__body { font-size: .9rem; line-height: 1.7; color: rgba(255, 255, 255, .85); }
.pmg-info__body p { margin: 0 0 .9rem; }
.pmg-info__fine { font-size: .74rem; color: rgba(255, 255, 255, .5); }

/* -------------------- Spielbühne -------------------- */

.pmg-stage { position: absolute; inset: 0; display: flex; flex-direction: column; }
.pmg-canvaswrap { flex: 1; min-height: 0; }
.pmg-canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.pmg-hud {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: .8rem;
	padding: max(.6rem, env(safe-area-inset-top)) max(.7rem, env(safe-area-inset-right)) 0 max(.7rem, env(safe-area-inset-left));
	pointer-events: none;
}
.pmg-hud__left { display: flex; flex-direction: column; gap: .35rem; }
.pmg-hud__level {
	display: flex;
	flex-direction: column;
	padding: .35rem .7rem;
	border-radius: 10px;
	background: rgba(7, 24, 46, .82);
	backdrop-filter: blur(3px);
	max-width: min(46vw, 280px);
}
.pmg-hud__lvlno { font-size: .66rem; font-weight: 800; letter-spacing: .12em; color: #5fc9cd; }
.pmg-hud__lvlname { font-size: .78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmg-hud__stats { display: flex; gap: .35rem; flex-wrap: wrap; }
.pmg-hud__stat {
	padding: .28rem .55rem;
	border-radius: 9px;
	background: rgba(7, 24, 46, .82);
	font-size: .74rem;
	font-variant-numeric: tabular-nums;
}
.pmg-hud__stat b { font-weight: 700; }
.pmg-hud__stat--warn { background: rgba(140, 32, 32, .85); }
.pmg-hud__right { display: flex; gap: .45rem; pointer-events: auto; }
.pmg-iconbtn {
	width: 46px;
	height: 46px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, .2);
	background: rgba(7, 24, 46, .85);
	color: #fff;
	font-size: 1.15rem;
	line-height: 1;
	backdrop-filter: blur(3px);
}
.pmg-iconbtn:hover { border-color: #018f97; }

.pmg-hint {
	position: absolute;
	top: max(3.6rem, calc(env(safe-area-inset-top) + 3.4rem));
	left: 50%;
	transform: translateX(-50%);
	max-width: min(92vw, 560px);
	margin: 0;
	padding: .45rem .9rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, .94);
	color: #0f2238;
	font-size: .82rem;
	font-weight: 600;
	text-align: center;
	box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}
.pmg-hint.is-warn { background: #d6efef; color: #8f4300; }
.pmg-hint.is-good { background: #d9f5e5; color: #14603b; }

.pmg-settle {
	position: absolute;
	bottom: 24%;
	left: 50%;
	transform: translateX(-50%);
	margin: 0;
	padding: .4rem .9rem;
	border-radius: 999px;
	background: rgba(46, 158, 107, .92);
	color: #fff;
	font-size: .8rem;
	font-weight: 700;
}

.pmg-repeat {
	position: absolute;
	top: max(6.4rem, calc(env(safe-area-inset-top) + 6.2rem));
	left: 50%;
	transform: translateX(-50%);
	padding: .45rem .95rem;
	min-height: 40px;
	border-radius: 999px;
	border: none;
	background: #018f97;
	color: #fff;
	font-size: .8rem;
	font-weight: 700;
	box-shadow: 0 8px 20px rgba(1, 143, 151, .4);
}

.pmg-steer {
	position: absolute;
	left: 50%;
	bottom: max(.7rem, env(safe-area-inset-bottom));
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: .3rem .7rem;
	border-radius: 999px;
	background: rgba(7, 24, 46, .8);
	font-size: .64rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .6);
}
.pmg-steer__track {
	position: relative;
	width: 90px;
	height: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .18);
}
.pmg-steer__track::after {
	content: '';
	position: absolute;
	left: 50%;
	top: -2px;
	width: 1px;
	height: 10px;
	background: rgba(255, 255, 255, .4);
}
.pmg-steer__dot {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #018f97;
	transform: translate(-50%, -50%);
}
.pmg-steer__gear { font-weight: 800; color: #fff; font-size: .8rem; }
.pmg-steer__gear.is-reverse { color: #ffb200; }

/* Touch-Flächen: nur auf Geräten mit grobem Zeiger. */
.pmg-pads {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: none;
	justify-content: space-between;
	padding: 0 max(.8rem, env(safe-area-inset-left)) max(.8rem, env(safe-area-inset-bottom)) max(.8rem, env(safe-area-inset-right));
	pointer-events: none;
}
@media (pointer: coarse) {
	.pmg-pads { display: flex; }
	/* Unter die HUD-Pillen, nicht daneben – sonst überlappt die Zeitanzeige. */
	.pmg-steer { bottom: auto; top: max(6.5rem, calc(env(safe-area-inset-top) + 6.3rem)); left: max(.8rem, env(safe-area-inset-left)); transform: none; }
	.pmg-hint { top: max(6.2rem, calc(env(safe-area-inset-top) + 6rem)); }
	.pmg-repeat { top: max(9rem, calc(env(safe-area-inset-top) + 8.8rem)); }
}
.pmg-pad { display: flex; gap: .5rem; pointer-events: auto; }
.pmg-key {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, .88);
	color: #10324e;
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
	touch-action: none;
	user-select: none;
}
.pmg-key small { font-size: .58rem; font-weight: 700; color: rgba(16, 50, 78, .6); }
.pmg-key.is-down { background: #10324e; color: #fff; transform: translateY(1px); }
.pmg-key.is-down small { color: rgba(255, 255, 255, .7); }
.pmg-key--go { background: linear-gradient(135deg, #018f97 0%, #016f76 100%); color: #fff; }
.pmg-key--go small { color: rgba(255, 255, 255, .85); }
.pmg-key--go.is-down { filter: brightness(1.15); background: #016f76; }
@media (orientation: portrait) and (max-width: 575.98px) {
	.pmg-key { width: 56px; height: 56px; font-size: 1.15rem; }
	.pmg-pad { gap: .35rem; }
}

.pmg-keyhint {
	position: absolute;
	bottom: max(.7rem, env(safe-area-inset-bottom));
	left: max(.9rem, env(safe-area-inset-left));
	margin: 0;
	font-size: .7rem;
	color: rgba(255, 255, 255, .55);
}

/* -------------------- Overlay (Pause / Ergebnis) -------------------- */

.pmg-overlay {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: max(.9rem, env(safe-area-inset-top)) .9rem max(.9rem, env(safe-area-inset-bottom));
	background: rgba(4, 14, 28, .72);
	backdrop-filter: blur(4px);
}
/* Betreiber-Vorgabe: Im Vollbild keine runden Ecken an den großen Karten. */
.pmg-overlay__card {
	width: min(560px, 100%);
	max-height: 100%;
	overflow-y: auto;
	border-radius: 0;
	background: linear-gradient(180deg, #0d2748 0%, #0a1e38 100%);
	border: 1px solid rgba(255, 255, 255, .12);
	box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
	padding: 1.2rem 1.3rem 1.3rem;
}

.pmg-overlaytitle {
	margin: 0 0 1rem;
	text-align: center;
	font-size: 1.15rem;
	letter-spacing: .3em;
}

.pmg-pauselist { display: flex; flex-direction: column; gap: .4rem; }
.pmg-pausebtn {
	display: flex;
	align-items: center;
	gap: .7rem;
	min-height: 48px;
	padding: .5rem .9rem;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, .14);
	background: rgba(255, 255, 255, .06);
	color: #fff;
	font-weight: 600;
	font-size: .9rem;
	transition: border-color .14s ease, background .14s ease;
}
.pmg-pausebtn:hover { border-color: rgba(255, 153, 51, .8); background: rgba(1, 143, 151, .12); }
.pmg-pausebtn__icon { width: 1.4rem; text-align: center; }
.pmg-pausebtn__value { margin-left: auto; font-size: .76rem; color: #5fc9cd; font-weight: 700; }

/* Einstellungen im Overlay nutzen dieselben Bausteine. */
.pmg-overlay__card .pmg-scenehead { margin-top: 0; }
.pmg-overlay__card .pmg-settings__body { padding-bottom: 0; }

/* -------------------- Ergebnis -------------------- */

.pmg-result { text-align: center; }
.pmg-result__training {
	margin: 0 0 .8rem;
	padding: .45rem .8rem;
	border-radius: 10px;
	background: rgba(255, 178, 94, .16);
	color: #5fc9cd;
	font-size: .76rem;
	font-weight: 600;
}
.pmg-result__rank { margin: 0; font-size: 1.5rem; letter-spacing: .04em; }
.pmg-result__quip { margin: .15rem 0 .5rem; color: #5fc9cd; font-weight: 600; font-size: .9rem; }
.pmg-result__stars { display: flex; justify-content: center; gap: .3rem; font-size: 1.9rem; margin: .2rem 0; }
.pmg-star { color: rgba(255, 255, 255, .18); transform: scale(.6); transition: transform .35s cubic-bezier(.2, 1.6, .4, 1), color .35s ease; }
.pmg-result__stars.is-go .pmg-star.is-earned { color: #ffb200; transform: scale(1); text-shadow: 0 0 18px rgba(255, 178, 0, .55); }
.pmg-result__score { font-size: 2.6rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pmg-result__scorelabel { margin: 0 0 .4rem; font-size: .66rem; letter-spacing: .3em; color: rgba(255, 255, 255, .55); }
.pmg-result__record {
	display: inline-block;
	margin: .1rem 0 .4rem;
	padding: .3rem .8rem;
	border-radius: 999px;
	background: linear-gradient(135deg, #018f97, #016f76);
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .06em;
	animation: pmgPulse 1.6s ease infinite;
}
@keyframes pmgPulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) { .pmg-result__record { animation: none; } }

.pmg-result__statgrid { display: flex; flex-direction: column; gap: .35rem; margin: .6rem 0; text-align: left; }
.pmg-resstat {
	display: flex;
	align-items: center;
	gap: .7rem;
	font-size: .8rem;
}
.pmg-resstat > span:first-child { flex: 0 0 7.2rem; color: rgba(255, 255, 255, .7); }
.pmg-resstat b { margin-left: auto; font-variant-numeric: tabular-nums; }
.pmg-resstat__bar {
	flex: 1;
	height: 7px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .12);
	overflow: hidden;
}
.pmg-resstat__bar > span {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: linear-gradient(90deg, #018f97, #5fc9cd);
	transition: width .8s cubic-bezier(.25, .8, .3, 1);
}

.pmg-result__xp { margin: .3rem 0 .6rem; font-size: .78rem; font-weight: 700; color: #7fe0a8; }

.pmg-nameform { display: flex; gap: .45rem; margin: .4rem 0 .8rem; }
.pmg-nameform input {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	padding: .4rem .8rem;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, .25);
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font: inherit;
}
.pmg-nameform input::placeholder { color: rgba(255, 255, 255, .45); }
.pmg-nameform__ok { margin: .3rem 0; font-size: .78rem; color: #7fe0a8; }

.pmg-result__actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .5rem; }

/* -------------------- Toasts -------------------- */

.pmg-toasts {
	position: absolute;
	top: max(.8rem, env(safe-area-inset-top));
	left: 50%;
	transform: translateX(-50%);
	z-index: 8;
	display: flex;
	flex-direction: column;
	gap: .4rem;
	align-items: center;
	pointer-events: none;
}
.pmg-toast {
	padding: .5rem 1rem;
	border-radius: 999px;
	background: rgba(13, 39, 72, .95);
	border: 1px solid rgba(255, 178, 94, .5);
	color: #fff;
	font-size: .8rem;
	font-weight: 600;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity .3s ease, transform .3s ease;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.pmg-toast.is-in { opacity: 1; transform: none; }

/* Entwickler-Overlay (F3) – für Spieler unsichtbar. */
.pmg-debug {
	position: absolute;
	left: max(.6rem, env(safe-area-inset-left));
	bottom: max(.6rem, env(safe-area-inset-bottom));
	z-index: 9;
	padding: .25rem .55rem;
	border-radius: 8px;
	background: rgba(4, 12, 24, .8);
	color: #7fe0a8;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: .68rem;
	pointer-events: none;
}
