/*
 * BRODROIDS COINSTORM — Rahmen des Spiels.
 *
 * BEWUSST WENIG: Punktestand, Leben, Welle, Combo, Warp, Steuerkreise,
 * Titel- und Ergebnisbild werden ALLE auf der Leinwand gezeichnet (siehe
 * coinstorm-world.js). Ein zweites HUD aus DOM-Elementen daruebergelegt
 * waere eine zweite Wahrheit — und jeder Weichzeichner darueber muesste in
 * JEDEM Bild neu berechnet werden. Hier stehen nur der Rahmen, die Leinwand
 * und der Schliessen-Knopf.
 */

#tbcsGame[hidden] { display: none !important; }

/* Das Spiel liegt ueber der Seite, aber unter BRO RUN (2147480000) und
   unter dem Onboarding-Overlay (2147482500). */
#tbcsGame {
	position: fixed;
	inset: 0;
	z-index: 2147479900;
	background: #02050a;
	color: #eaffff;
	overflow: hidden;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#tbcsCanvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	outline: none;
	touch-action: none;   /* sonst scrollt die Seite beim Steuern mit */
}

/* Sichtbarer Fokusring fuer die Tastatur — die Leinwand ist bedienbar und
   muss zeigen, wenn sie den Fokus hat. */
#tbcsCanvas:focus-visible { outline: 2px solid rgba(0, 229, 255, .8); outline-offset: -4px; }

.tbcs-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 30;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	line-height: 1;
	color: #d5fbff;
	background: rgba(3, 15, 30, .86);
	border: 1px solid rgba(82, 214, 227, .55);
	border-radius: 12px;
	cursor: pointer;
	transition: background .15s, border-color .15s;
}

.tbcs-close:hover,
.tbcs-close:focus-visible {
	background: rgba(0, 229, 255, .18);
	border-color: #00e5ff;
}

/*
 * DAS DASHBOARD-MASKOTTCHEN WIRD NUR AUSGEBLENDET, NICHT ANGEFASST.
 * Kein Inline-Stil, keine Klasse an ihm, keine Drehung — nach dem Spiel ist
 * er unveraendert wieder da.
 */
html.tbcs-aktiv #tbbro-host { display: none !important; }

/*
 * Die Seite HINTER dem Spiel ruht. `content-visibility` ueberspringt
 * Zeichnen UND Layout des Inhalts, ohne ihn aus dem Dokument zu nehmen:
 * keine fremden Skripte werden gestoppt, kein Zustand geht verloren.
 */
html.tbcs-aktiv body > *:not(#tbcsGame):not(#tbbro-host):not(script):not(style) {
	content-visibility: hidden;
}
