/* Bananario-Ladder — Spielseiten-Styles. Dunkle Dschungel-Arkade-Optik (wie
   Pursuit/Backgammon/Hokm). Canvas ist intern fest 1040x676, skaliert nach außen
   responsiv; Steuerung über Tastatur/D-Pad (keine Klick-Koordinaten aufs Canvas),
   daher ist die CSS-Skalierung unproblematisch. */

.ld-hud {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: .6rem;
	max-width: 1040px;
	margin: 0 auto .6rem;
	padding: .6rem 1.1rem;
	background: linear-gradient(180deg, #22401f, #14260f);
	border: 2px solid #3c6b34;
	border-radius: 14px;
	box-shadow: 0 8px 22px rgba(10, 20, 6, .35);
	font-family: var(--font-display);
	color: #eaf5e6;
	flex-wrap: wrap;
}
.ld-hud-item { display: flex; flex-direction: column; align-items: center; min-width: 78px; }
.ld-hud-label { font-size: .68rem; letter-spacing: .06em; color: #7fae72; text-transform: uppercase; font-family: var(--font-body); }
.ld-hud-value { font-size: 1.4rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ld-hud-value.warn { color: #ff9a6b; }

.ld-wrap {
	max-width: 1040px;
	margin: 0 auto;
	position: relative;
	background: radial-gradient(ellipse at center, #16240f 0%, #0c1509 100%);
	border-radius: 16px;
	padding: 6px;
	box-shadow: 0 10px 30px rgba(10, 15, 6, .4);
}

#ldCanvas {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	user-select: none;
}

.ld-fs-btn {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 38px;
	height: 38px;
	border: 1px solid rgba(240, 200, 110, .5);
	border-radius: 10px;
	background: rgba(20, 20, 14, .65);
	color: #ffe9b0;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}
.ld-fs-btn:hover { background: rgba(45, 60, 38, .85); }

.ld-wrap:fullscreen { display: flex; align-items: center; justify-content: center; background: #0c1509; padding: 0; }
.ld-wrap:fullscreen #ldCanvas { width: auto; height: auto; max-width: 100vw; max-height: 100vh; border-radius: 0; }
.ld-wrap.ld-pseudo-fs {
	position: fixed; inset: 0; z-index: 9999; max-width: none; margin: 0; padding: 0;
	display: flex; align-items: center; justify-content: center; background: #0c1509;
}
.ld-wrap.ld-pseudo-fs #ldCanvas { width: auto; height: auto; max-width: 100vw; max-height: 100vh; border-radius: 0; }
body.ld-noscroll { overflow: hidden; }

.ld-status { text-align: center; margin: .8rem 0 0; font-weight: 600; min-height: 1.4em; color: #eaf5e6; }

/* Auswahl nach einem geschafften Level ("Nochmal" / "Nächstes Level").
   [hidden] muss explizit gesetzt werden, weil die eigene display-Regel sonst
   die UA-Regel [hidden]{display:none} schlägt (bekannte Falle, siehe
   CLAUDE.md Mahjong-Abschnitt). */
.ld-afterwin {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: .6rem;
	margin-top: .9rem;
}
.ld-afterwin[hidden] { display: none; }

.ld-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2rem;
	flex-wrap: wrap;
	margin-top: 1.1rem;
}
.ld-dpad {
	display: grid;
	grid-template-columns: repeat(3, 52px);
	grid-template-rows: repeat(3, 52px);
	gap: 5px;
}
.ld-dpad button {
	grid-column: var(--c); grid-row: var(--r);
	border: none; border-radius: 11px;
	background: var(--jungle, #2f7d33);
	color: #fff;
	font-size: 1.4rem;
	cursor: pointer;
	box-shadow: 0 3px 0 var(--jungle-dark, #1c5220);
	touch-action: manipulation;
}
.ld-dpad button:active { transform: translateY(2px); box-shadow: none; }
.ld-dpad-up { --c: 2; --r: 1; }
.ld-dpad-left { --c: 1; --r: 2; }
.ld-dpad-right { --c: 3; --r: 2; }
.ld-dpad-down { --c: 2; --r: 3; }

.ld-jump {
	border: 1px solid #b9820f;
	border-radius: 18px;
	background: linear-gradient(#f4c430, #e0a018);
	color: #4a3208;
	font-size: 1.05rem;
	font-weight: 800;
	padding: 16px 30px;
	cursor: pointer;
	box-shadow: 0 4px 0 #9c6e0c;
	line-height: 1.1;
	text-align: center;
	touch-action: manipulation;
}
.ld-jump span { font-size: .75rem; font-weight: 700; }
.ld-jump:active { transform: translateY(2px); box-shadow: none; }

/* ---- Werkstatt/Kampagne: Thumbnails + Status-Badges (2026-07-26) ---- */
.ld-thumb {
	display: block;
	width: 96px;
	max-width: none;
	height: auto;
	aspect-ratio: 40 / 26;
	border-radius: 6px;
	background: #16240f;
	border: 1px solid rgba(0, 0, 0, .15);
	object-fit: cover;
}
.ld-status-badge {
	display: inline-flex; align-items: center; gap: .3em;
	font-size: .72rem; font-weight: 700; text-transform: uppercase;
	border-radius: 999px; padding: .2em .7em; white-space: nowrap;
}
.ld-status-badge.entwurf { background: var(--sand); color: var(--ink-soft); border: 1px solid #e3d9b8; }
.ld-status-badge.veroeffentlicht { background: var(--jungle); color: var(--white); }
.ld-status-badge.kampagne { background: linear-gradient(180deg, var(--banana) 0%, var(--banana-dark) 100%); color: var(--ink); }

/* "✕ Entfernen" im Admin-Werkzeug (stats/ladder.php) — vorher ein Inline-Style,
   jetzt eine Klasse, weil die Knöpfe dort über einen gemeinsamen Helfer
   erzeugt werden. */
.ld-admin-entfernen { color: var(--danger); }
