/* =====================================================
   MYSTERIES & MISCHIEF – FRONTEND
   Nutzt die --owlh-* Variablen des aktuellen Styles.
===================================================== */

.mm-front {
	max-width: 1180px;
	margin: 28px auto 42px;
	padding: 0 16px;
	box-sizing: border-box;
	font-family: var(--owlh-font-body, Tahoma, Verdana, Arial, sans-serif);
	color: var(--owlh-text, #39342e);
}

.mm-front *,
.mm-front *::before,
.mm-front *::after {
	box-sizing: border-box;
}

.mm-hero {
	margin-bottom: 26px;
	padding: 20px 22px;
	background: var(--owlh-surface, #f5f1e9);
	border: 1px solid var(--owlh-border, #d7cdbf);
	border-left: 4px solid var(--owlh-accent, #b85d2b);
	border-radius: var(--owlh-radius-soft, 5px);
}

.mm-hero h1 {
	margin: 0 0 7px;
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 29px;
	font-weight: normal;
	line-height: 1.15;
	color: var(--owlh-heading, #2f2a25);
}

.mm-hero p {
	max-width: 800px;
	margin: 0;
	color: var(--owlh-text-soft, #766d61);
	line-height: 1.55;
}

.mm-section {
	margin: 30px 0;
}

.mm-section-title {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
	padding-bottom: 9px;
	border-bottom: 1px solid var(--owlh-border, #d7cdbf);
}

.mm-section-title h2 {
	margin: 0;
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 21px;
	font-weight: normal;
	color: var(--owlh-heading, #2f2a25);
}

.mm-muted {
	color: var(--owlh-text-soft, #766d61);
}

.mm-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
	gap: 18px;
}

.mm-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
	gap: 10px;
}

.mm-card,
.mm-stat,
.mm-panel {
	background: var(--owlh-surface, #f5f1e9);
	border: 1px solid var(--owlh-border, #d7cdbf);
	border-radius: var(--owlh-radius-soft, 5px);
}

.mm-card {
	overflow: hidden;
}

.mm-card-image {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 8;
	object-fit: cover;
	background: var(--owlh-surface-deep, #ded5c6);
	border-bottom: 1px solid var(--owlh-border, #d7cdbf);
}

.mm-card-body {
	padding: 16px;
}

.mm-card h3 {
	margin: 0 0 7px;
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 19px;
	font-weight: normal;
	color: var(--owlh-heading, #2f2a25);
}

.mm-card p {
	margin: 0 0 12px;
	line-height: 1.45;
}

.mm-card-meta {
	display: flex;
	gap: 7px;
	flex-wrap: wrap;
	margin: 11px 0 13px;
}

.mm-badge {
	display: inline-block;
	padding: 4px 8px;
	border: 1px solid var(--owlh-border, #d7cdbf);
	border-radius: 999px;
	background: var(--owlh-surface-soft, #eee8dd);
	color: var(--owlh-text-soft, #766d61);
	font-size: 11px;
	line-height: 1.2;
}

.mm-badge.open {
	background: var(--owlh-success-bg, #e7eee2);
	border-color: var(--owlh-success-border, #b8c9ad);
	color: var(--owlh-success, #54704f);
}

.mm-badge.active {
	background: var(--owlh-warning-bg, #f4ead0);
	border-color: var(--owlh-warning-border, #d8bd78);
	color: var(--owlh-warning, #8a651f);
}

.mm-stat {
	padding: 15px 12px;
	text-align: center;
	background: var(--owlh-surface-raised, #faf7f0);
}

.mm-stat strong {
	display: block;
	margin-bottom: 5px;
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 26px;
	font-weight: normal;
	line-height: 1.1;
	color: var(--owlh-accent, #b85d2b);
}

.mm-stat span {
	font-size: 12px;
	color: var(--owlh-text-soft, #766d61);
}

.mm-btn {
	display: inline-block;
	padding: 9px 14px;
	border: 1px solid var(--owlh-accent, #b85d2b);
	border-radius: var(--owlh-radius, 2px);
	background: var(--owlh-accent, #b85d2b);
	color: #fff !important;
	font: inherit;
	font-size: 12px;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}

.mm-btn:hover {
	background: var(--owlh-accent-hover, #93451f);
	border-color: var(--owlh-accent-hover, #93451f);
}

.mm-btn.secondary {
	background: var(--owlh-surface-soft, #eee8dd);
	border-color: var(--owlh-border-strong, #c5b7a5);
	color: var(--owlh-text, #39342e) !important;
}

.mm-btn.secondary:hover {
	background: var(--owlh-surface-deep, #ded5c6);
	border-color: var(--owlh-border-strong, #c5b7a5);
}

.mm-btn.danger {
	background: var(--owlh-error, #98483f);
	border-color: var(--owlh-error, #98483f);
}

.mm-btn.danger:hover {
	filter: brightness(.92);
}

.mm-btn[disabled] {
	opacity: .45;
	cursor: not-allowed;
}

.mm-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.mm-panel {
	padding: 17px;
}

.mm-login-note {
	padding: 25px;
	text-align: center;
}

/* =====================================================
   CHARAKTERAUSWAHL
===================================================== */

.mm-character-grid {
	display: grid;
	grid-template-columns: repeat(3, 250px);
	justify-content: center;
	align-items: stretch;
	gap: 22px;
}

.mm-character {
	display: flex;
	flex-direction: column;
	width: 250px;
	min-width: 0;
	overflow: hidden;
	background: var(--owlh-surface, #f5f1e9);
	border: 1px solid var(--owlh-border, #d7cdbf);
	border-radius: var(--owlh-radius-soft, 5px);
}

.mm-character.mine {
	border-color: var(--owlh-selected-border, #d7bd73);
	background: var(--owlh-selected-bg, #efe5c8);
}

.mm-character.taken {
	opacity: .58;
}

.mm-character > img,
.mm-character > .mm-character-placeholder {
	display: block;
	width: 250px;
	height: 250px;
	flex: 0 0 250px;
	object-fit: cover;
	background: var(--owlh-surface-deep, #ded5c6);
	border: 0;
	border-bottom: 1px solid var(--owlh-border, #d7cdbf);
}

.mm-character-placeholder {
	display: flex !important;
	align-items: center;
	justify-content: center;
	padding: 12px;
	text-align: center;
	color: var(--owlh-text-muted, #9b8f7f);
}

.mm-character-info {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	padding: 15px;
	text-align: left;
}

.mm-character-info h3 {
	margin: 0 0 9px;
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 19px;
	font-weight: normal;
	line-height: 1.2;
	color: var(--owlh-heading, #2f2a25);
}

.mm-character-info p {
	margin: 0 0 14px;
	color: var(--owlh-text-soft, #766d61);
	line-height: 1.5;
}

.mm-character-actions {
	margin-top: auto;
	padding-top: 4px;
}

.mm-character-actions form,
.mm-character-actions .mm-btn {
	width: 100%;
}

.mm-character-actions .mm-btn {
	text-align: center;
}

.mm-selected {
	margin: 0 0 20px;
	padding: 15px 16px;
	background: var(--owlh-selected-bg, #efe5c8);
	border: 1px solid var(--owlh-selected-border, #d7bd73);
	border-left: 4px solid var(--owlh-gold, #b18a55);
	border-radius: var(--owlh-radius-soft, 5px);
}

.mm-selected strong {
	font-size: 16px;
	color: var(--owlh-heading, #2f2a25);
}

.mm-empty {
	padding: 20px;
	background: var(--owlh-surface-soft, #eee8dd);
	border: 1px dashed var(--owlh-border-strong, #c5b7a5);
	border-radius: var(--owlh-radius-soft, 5px);
	text-align: center;
	color: var(--owlh-text-soft, #766d61);
}


/* =====================================================
   STARTSEITE – OFFENE RUNS
===================================================== */

.mm-run-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.mm-run-card {
	display: grid;
	grid-template-columns: minmax(280px, 42%) minmax(0, 1fr);
	min-height: 220px;
	overflow: hidden;
	background: var(--owlh-surface, #f5f1e9);
	border: 1px solid var(--owlh-border, #d7cdbf);
	border-radius: var(--owlh-radius-soft, 5px);
}

.mm-run-card-visual {
	min-width: 0;
	background: var(--owlh-surface-deep, #ded5c6);
	border-right: 1px solid var(--owlh-border, #d7cdbf);
}

.mm-run-card-visual img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 220px;
	object-fit: cover;
}

.mm-run-card-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 220px;
	padding: 20px;
	color: var(--owlh-text-muted, #9b8f7f);
	text-align: center;
}

.mm-run-card-content {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 18px 20px;
}

.mm-run-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--owlh-border, #d7cdbf);
}

.mm-run-card-head h3 {
	margin: 2px 0 0;
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 20px;
	font-weight: normal;
	line-height: 1.2;
	color: var(--owlh-heading, #2f2a25);
}

.mm-run-kicker {
	display: block;
	color: var(--owlh-text-muted, #9b8f7f);
	font-size: 11px;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.mm-run-card-head .mm-card-meta {
	justify-content: flex-end;
	margin: 0;
}

.mm-run-intro {
	margin: 13px 0 16px;
	color: var(--owlh-text-soft, #766d61);
	line-height: 1.55;
}

.mm-run-card-actions {
	margin-top: auto;
}

@media (max-width: 880px) {
	.mm-run-card {
		grid-template-columns: 240px minmax(0, 1fr);
	}

	.mm-run-card-head {
		flex-direction: column;
		gap: 8px;
	}

	.mm-run-card-head .mm-card-meta {
		justify-content: flex-start;
	}

	.mm-character-grid {
		grid-template-columns: repeat(2, 250px);
	}
}

@media (max-width: 600px) {
	.mm-run-card {
		grid-template-columns: 1fr;
	}

	.mm-run-card-visual {
		border-right: 0;
		border-bottom: 1px solid var(--owlh-border, #d7cdbf);
	}

	.mm-run-card-visual img,
	.mm-run-card-placeholder {
		min-height: 0;
		height: auto;
		aspect-ratio: 16 / 7;
	}

	.mm-front {
		padding: 0 10px;
	}

	.mm-section-title {
		align-items: flex-start;
		flex-direction: column;
	}

	.mm-character-grid {
		grid-template-columns: 250px;
	}

	.mm-hero h1 {
		font-size: 24px;
	}
}

/* =====================================================
   AKTIVER RUN – CHARAKTERKARTE
===================================================== */

.mm-game-character {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	gap: 0;
	overflow: hidden;
	margin: 0 0 30px;
	background: var(--owlh-surface, #f5f1e9);
	border: 1px solid var(--owlh-border, #d7cdbf);
	border-radius: var(--owlh-radius-soft, 5px);
}

.mm-game-character-avatar {
	display: block;
	width: 250px;
	height: 250px;
	object-fit: cover;
	background: var(--owlh-surface-deep, #ded5c6);
	border-right: 1px solid var(--owlh-border, #d7cdbf);
}

.mm-game-character-content {
	min-width: 0;
	padding: 18px 20px;
}

.mm-game-character-content h2 {
	margin: 2px 0 8px;
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 24px;
	font-weight: normal;
	color: var(--owlh-heading, #2f2a25);
}

.mm-game-character-description {
	margin-bottom: 16px;
	color: var(--owlh-text-soft, #766d61);
	line-height: 1.5;
}

.mm-secret-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.mm-secret-card {
	padding: 12px 13px;
	background: var(--owlh-surface-soft, #eee8dd);
	border: 1px solid var(--owlh-border-soft, #e5ddd2);
	border-radius: var(--owlh-radius, 2px);
	line-height: 1.45;
}

.mm-secret-card > span {
	display: block;
	margin-bottom: 5px;
	color: var(--owlh-text-muted, #9b8f7f);
	font-size: 10px;
	font-weight: bold;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.mm-secret-card strong {
	display: block;
	margin-bottom: 5px;
	color: var(--owlh-heading, #2f2a25);
}

.mm-ability-card {
	border-left: 3px solid var(--owlh-olive, #6e7050);
}

/* =====================================================
   AKTIVER RUN – SPIELFELD / GRUNDRISS
===================================================== */

.mm-game-map {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: var(--owlh-nav-bg, #35312c);
	border: 1px solid var(--owlh-border-strong, #c5b7a5);
	border-radius: var(--owlh-radius-soft, 5px);
}

.mm-game-map > img {
	display: block;
	width: 100%;
	height: auto;
}

.mm-game-room {
	position: absolute;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	pointer-events: none;
}

.mm-game-room-clickable {
	pointer-events: auto;
}

.mm-room-hotspot {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.mm-room-hotspot:focus-visible {
	outline: 2px solid var(--owlh-gold, #b18a55);
	outline-offset: -2px;
}

.mm-game-room-current {
	display: flex;
	align-items: center;
	justify-content: center;
}

.mm-game-current-marker {
	display: inline-block;
	padding: 4px 7px;
	border-radius: var(--owlh-radius, 2px);
	background: rgba(47,42,37,.78);
	color: var(--owlh-hero-text, #fffaf1);
	font-size: 10px;
	line-height: 1.2;
	pointer-events: none;
}

.mm-game-room-note {
	display: block;
	max-width: 88%;
	padding: 4px 6px;
	border-radius: var(--owlh-radius, 2px);
	background: rgba(47,42,37,.84);
	color: var(--owlh-hero-muted, #e8ddcc);
	font-size: 10px;
	line-height: 1.3;
	text-align: center;
	pointer-events: none;
}

.mm-game-room-note.murmur {
	font-style: italic;
}

@media (hover: hover) and (pointer: fine) {
	.mm-room-hotspot:hover {
		background: rgba(177,138,85,.08);
	}
}


.mm-game-room-soundonly {
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.mm-game-room-note.voices-soft {
	background: rgba(47,42,37,.82);
}

.mm-game-room-note.voices-medium {
	background: rgba(110,112,80,.88);
	color: var(--owlh-hero-text, #fffaf1);
}

.mm-game-room-note.voices-loud {
	background: rgba(184,93,43,.92);
	color: #fff;
	font-weight: bold;
}

.mm-game-room-note.voices-distant {
	background: rgba(47,42,37,.68);
	color: var(--owlh-hero-muted, #e8ddcc);
	font-style: italic;
	opacity: .88;
}

.mm-ghost-pin {
	position: absolute;
	z-index: 12;
	width: 22px;
	height: 22px;
	transform: translate(-50%, -50%);
	outline: none;
	text-decoration: none !important;
}

.mm-ghost-pin-dot {
	position: absolute;
	inset: 0;
	display: block;
	border: 2px solid var(--owlh-surface-raised, #faf7f0);
	border-radius: 50% 50% 50% 0;
	background: var(--owlh-accent, #b85d2b);
	box-shadow: 0 1px 4px var(--owlh-shadow-deep, rgba(58,45,32,.18));
	transform: rotate(-45deg);
}

.mm-ghost-pin-dot::after {
	content: "";
	position: absolute;
	top: 6px;
	left: 6px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--owlh-surface-raised, #faf7f0);
}

.mm-ghost-pin-label {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	display: none;
	width: max-content;
	max-width: 180px;
	padding: 4px 7px;
	transform: translateX(-50%);
	background: rgba(47,42,37,.90);
	border-radius: var(--owlh-radius, 2px);
	color: var(--owlh-hero-text, #fffaf1);
	font-size: 11px;
	line-height: 1.2;
	white-space: nowrap;
	pointer-events: none;
}

.mm-ghost-pin:hover .mm-ghost-pin-label,
.mm-ghost-pin:focus .mm-ghost-pin-label {
	display: block;
}

.mm-room-company {
	margin-top: 14px;
	padding: 15px 16px;
	background: var(--owlh-surface, #f5f1e9);
	border: 1px solid var(--owlh-border, #d7cdbf);
	border-radius: var(--owlh-radius-soft, 5px);
}

.mm-room-company h3 {
	margin: 0 0 11px;
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 17px;
	font-weight: normal;
	color: var(--owlh-heading, #2f2a25);
}

.mm-room-company p {
	margin: 0;
}

.mm-room-ghosts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 12px;
}

.mm-room-ghost {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	padding: 10px;
	scroll-margin-top: 20px;
	background: var(--owlh-surface-soft, #eee8dd);
	border: 1px solid var(--owlh-border-soft, #e5ddd2);
	border-radius: var(--owlh-radius, 2px);
}

.mm-room-ghost:target {
	border-color: var(--owlh-selected-border, #d7bd73);
	background: var(--owlh-selected-bg, #efe5c8);
}

.mm-room-ghost img,
.mm-room-ghost-placeholder {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 50%;
	background: var(--owlh-surface-deep, #ded5c6);
}

.mm-room-ghost-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--owlh-text-muted, #9b8f7f);
}

.mm-room-ghost-info {
	min-width: 0;
}

.mm-room-ghost-info strong {
	display: block;
	margin-bottom: 5px;
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 15px;
	font-weight: normal;
	color: var(--owlh-heading, #2f2a25);
}

.mm-room-ghost-info div {
	color: var(--owlh-text-soft, #766d61);
	font-size: 12px;
	line-height: 1.45;
}

@media (max-width: 850px) {
	.mm-game-character {
		grid-template-columns: 180px minmax(0, 1fr);
	}

	.mm-game-character-avatar {
		width: 180px;
		height: 180px;
	}

	.mm-secret-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.mm-game-character {
		grid-template-columns: 1fr;
	}

	.mm-game-character-avatar {
		width: 100%;
		height: auto;
		aspect-ratio: 1 / 1;
		border-right: 0;
		border-bottom: 1px solid var(--owlh-border, #d7cdbf);
	}


	.mm-game-room-note {
		font-size: 8px;
		padding: 2px 3px;
	}
}

