/* Mama Manu loading screen: the logo clip on the brand orange, over Godot's own status screen, from the first
   paint until the start menu is ready (removed by web/loading.js when the game calls mmLoad.done()). */
html, body { background: #fc5f00; }
@font-face { font-family: "Digitalt"; src: url("fonts/Digitalt.otf") format("opentype"); font-display: swap; }
#status { background: transparent !important; z-index: 20; }
#status-splash, #status-progress { display: none !important; }
#mm-load {
	position: fixed;
	inset: 0;
	z-index: 10;
	background: #fc5f00;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	transition: opacity 0.35s ease;
	pointer-events: none;
}
#mm-load.out { opacity: 0; }
/* A 9:16 frame. On phones it covers the whole screen (the logo sits well inside the clip, so the cropped edges
   are plain orange); on wide screens it fits the height and the page takes the clip's own orange (loading.js). */
#mm-frame {
	position: relative;
	flex: none;
	width: min(100vw, calc(100vh * 9 / 16));
	width: min(100vw, calc(100dvh * 9 / 16));
	aspect-ratio: 9 / 16;
}
/* Wide screens: fade the clip's side edges into the page orange. */
@media (min-aspect-ratio: 3/4) {
	#mm-frame > video, #mm-frame > img {
		-webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
		mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
	}
}
@media (max-aspect-ratio: 3/4) {
	#mm-frame {
		width: max(100vw, calc(100vh * 9 / 16));
		width: max(100vw, calc(100dvh * 9 / 16));
	}
}
#mm-frame > video, #mm-frame > img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
#mm-frame > img { display: none; }
#mm-frame.still > img { display: block; }
#mm-bar {
	position: absolute;
	left: 25%;
	width: 50%;
	top: 80.5%;
	height: 1.4%;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.22);
	overflow: hidden;
}
#mm-fill {
	width: 0;
	height: 100%;
	border-radius: 999px;
	background: #111;
	transition: width 0.25s linear;
}
/* Cards under the bar: how to win prizes, how to play (one at a time, fading). */
#mm-cards {
	position: absolute;
	/* Centred on the screen at a readable width, whatever the frame's crop: on tall phones the frame is wider
	   than the screen, on desktop much narrower. Anchored to the bottom so the card and its shadow stay in view. */
	left: 50%;
	width: min(380px, calc(100vw - 28px));
	transform: translateX(-50%);
	bottom: max(26px, 3.6%);
	display: flex;
	justify-content: center;
}
.mm-card {
	display: flex;
	align-items: center;
	gap: 12px;
	width: min(100%, 360px);
	box-sizing: border-box;
	padding: 9px 16px 9px 9px;
	border-radius: 20px;
	background: #fff4e2;
	border: 4px solid #f26a1b;
	/* the game's panels: an ink outline and a hard ink drop under the orange rim */
	box-shadow: 0 0 0 3px #1a120c, 0 7px 0 3px #1a120c;
	color: #1a120c;
	opacity: 0;
	transform: translateY(10px) scale(0.94) rotate(-1.5deg);
	transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mm-card.in { opacity: 1; transform: rotate(-1.5deg); }
/* The game's flat icon in an orange badge, like its buttons. */
.mm-card i {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: clamp(44px, 12vw, 54px);
	height: clamp(44px, 12vw, 54px);
	border-radius: 50%;
	background: #f26a1b;
	border: 3px solid #1a120c;
	box-shadow: 0 3px 0 #1a120c;
}
.mm-card img { width: 68%; height: 68%; object-fit: contain; }
.mm-card p { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mm-card b {
	font: 400 clamp(22px, 6.2vw, 28px) / 1 "Digitalt", "Arial Black", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #f26a1b;
	-webkit-text-stroke: 1.6px #1a120c;
	paint-order: stroke fill;
}
.mm-card span { font: 700 clamp(13px, 3.6vw, 16px) / 1.25 "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif; color: #3a2a1f; }
/* "Open in Safari / Chrome" over the loading clip in browsers built into apps. */
#mm-inapp, #mm-inapp * { box-sizing: border-box; }
#mm-inapp {
	position: fixed;
	inset: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(23, 17, 13, 0.72);
	font: 400 16px/1.4 "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif;
}
.mm-inapp-card {
	width: min(100%, 360px);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 24px 20px 18px;
	border-radius: 22px;
	background: #fff4e2;
	border: 4px solid #f26a1b;
	box-shadow: 0 6px 0 #1a120c;
	color: #1a120c;
	text-align: center;
}
.mm-inapp-card img { width: 56px; height: 56px; }
.mm-inapp-card h1 { margin: 0; font-size: 22px; line-height: 1.2; }
.mm-inapp-card p { margin: 0; }
.mm-inapp-how { font-size: 14px; color: #5a4b40; }
.mm-inapp-go, .mm-inapp-copy, .mm-inapp-stay {
	width: 100%;
	padding: 14px 16px;
	border-radius: 16px;
	font: 700 17px/1.2 "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif;
	text-decoration: none;
	cursor: pointer;
}
.mm-inapp-go { background: #f26a1b; color: #fff4e2; border: 3px solid #1a120c; box-shadow: 0 4px 0 #1a120c; }
.mm-inapp-copy { background: #17110d; color: #fff4e2; border: 3px solid #f26a1b; }
.mm-inapp-stay { background: none; border: 0; color: #5a4b40; font-weight: 600; text-decoration: underline; padding: 6px; }
