/* Math Bubble Pop — the game embedded in the page, with the teacher-facing
   copy underneath. Explainer panels match the Math Jigsaw Puzzles page
   (page_files/jigsaw_puzzle/style.css) so the two game pages read as a pair. */

.bp{
	font-family: var(--sans_1);
	max-width: 1100px;
	margin: auto;
}

/* ---- the game ----
   The stage keeps the game's own 540x820 shape: pick a height first, then
   derive the width from it, so a tall window never leaves blue bands down
   the sides. In a narrow column the width caps at 100% instead and the game
   letterboxes itself — its fit() centres the stage either way. */
.bp_stage{
	--bp_h: min(78vh, 820px);
	height: var(--bp_h);
	width: min(100%, calc(var(--bp_h) * 540 / 820));
	margin: 0 auto;
	border: thin solid var(--accent_5);
	border-radius: 8px;
	overflow: hidden;
	background: #4bc4ff;            /* the game's own sky, so first paint matches */
	box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.bp_stage iframe{
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* browser fullscreen: the stage becomes the whole screen, so drop the framing */
.bp_stage:fullscreen{
	width: 100%;
	height: 100%;
	max-width: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.bp_bar{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 12px auto 0;
	justify-content: center;
}
.bp_barbtn{
	font-family: inherit;
	font-size: 0.88em;
	background: var(--accent_4);
	border: thin solid var(--accent_5);
	border-radius: 999px;
	padding: 6px 15px;
	cursor: pointer;
	color: #3d3d3d;
	text-decoration: none;
	transition: background .12s, border-color .12s;
}
.bp_barbtn:hover{ background: var(--accent_2); }
.bp_barnote{
	font-size: 0.82em;
	color: var(--text_over_accent_5, #736e6e);
}

/* ---- explainer panels ---- */
.bp_cols{
	display: grid;
	grid-template-columns: minmax(0,1fr) minmax(0,1fr);
	gap: 18px;
	align-items: start;
	margin-top: 26px;
}

.bp_panel{
	border: thin solid var(--accent_5);
	border-radius: 6px;
	padding: 4px 16px 14px;
	background: white;
}
.bp_panel h2{
	font-size: 1.02em;
	color: var(--accent_6);
	margin: 14px 0 8px;
}
.bp_panel p{ line-height: 1.55; margin: 0; color: #444; }
.bp_wide{ margin-top: 18px; }

.bp_list{
	margin: 0;
	padding-left: 18px;
	line-height: 1.55;
	color: #444;
}
.bp_list li{ margin-bottom: 6px; }

.bp_modes{ margin: 0; }
.bp_modes dt{
	font-weight: 600;
	color: #1f3348;
	margin-top: 9px;
}
.bp_modes dt:first-child{ margin-top: 0; }
.bp_modes dd{
	margin: 1px 0 0 0;
	color: #555;
	font-size: 0.93em;
	line-height: 1.45;
}

@media (max-width: 780px){
	.bp_cols{ grid-template-columns: minmax(0,1fr); }
	.bp_stage{ --bp_h: min(74vh, 820px); }
	.bp_barnote{ display: none; }
}
