/* Joculus Studios — wiki-muehle-meister.css
   Nur für das Mühle-Meister-Wiki: spielbares Brett, Farbtafeln, Rätselpakete.
   Das Brett selbst zeichnet js/wiki-muehle-meister.js im Stil „Klassisch“ der App. */

/* ---------- Brett ---------- */
.mm-board { position: relative; margin: 20px 0 30px; max-width: 500px; }
.mm-board-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.86rem; color: var(--text-faint); min-height: 1.4em; }
.mm-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mm-hand { margin-left: 8px; opacity: 0.85; }
.mm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 4px 0 8px; vertical-align: -1px; }
.mm-dot.w { background: #F6F2E8; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35); }
.mm-dot.b { background: #1C1C1E; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.mm-stage { position: relative; transform-origin: center; }
.mm-svg { display: block; width: 100%; height: auto; border-radius: 4.5%; box-shadow: var(--shadow-card); touch-action: manipulation; user-select: none; -webkit-tap-highlight-color: transparent; }
.mm-hit { cursor: pointer; }
.mm-piece { will-change: transform; }
.mm-svg .tb { transform-box: fill-box; transform-origin: center; }
/* Anheben bei Auswahl (Stone.tsx: −4 px, 1,08) und Schweben in der Springphase (−3,5 px, 900 ms) */
.mm-lift { transition: transform 350ms cubic-bezier(0.2, 0.9, 0.3, 1); }
.mm-lift.gewaehlt { transform: translateY(-11px) scale(1.08); }
.mm-lift.schwebt { animation: mm-schweben 1.8s ease-in-out infinite; }
@keyframes mm-schweben { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
/* Schlagbar: Stein und Hof pulsieren 1 ↔ 1,08, je 750 ms */
.mm-piece-in.schlagbar, .mm-halo { animation: mm-schlagbar 1.5s ease-in-out infinite; }
@keyframes mm-schlagbar { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
/* Zielringe 0,85 ↔ 0,5 je 1 s, Coach-Ring 0,3 ↔ 0,6 je 0,8 s, Nebel 0,8 ↔ 1 je 2,2 s */
.mm-ziel { animation: mm-ziel 2s ease-in-out infinite; }
@keyframes mm-ziel { 0%, 100% { opacity: 0.85; } 50% { opacity: 0.5; } }
.mm-coach { animation: mm-coach 1.6s ease-in-out infinite; }
@keyframes mm-coach { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.6; } }
.mm-fog { animation: mm-nebel 4.4s ease-in-out infinite; }
@keyframes mm-nebel { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }
/* Ereignis-Banner (JuiceOverlay.tsx): Lage 36 % der Bretthöhe, Feder per Web Animations */
.mm-banner {
  position: absolute; left: 50%; top: 36%; transform: translate(-50%, 0); max-width: 86%; z-index: 3;
  padding: 10px 22px; border-radius: 18px; text-align: center; pointer-events: none; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.mm-banner b { display: block; font: 900 24px/1.1 var(--font-display); letter-spacing: 1px; }
.mm-banner.gross { padding: 14px 28px; border-radius: 22px; }
.mm-banner.gross b { font-size: 34px; letter-spacing: 2px; }
.mm-banner span { display: block; margin-top: 3px; font: 700 13px var(--font-body); opacity: 0.92; }
.mm-flash, .mm-vignette { position: absolute; inset: 0; border-radius: 4.5%; pointer-events: none; z-index: 2; opacity: 0; }
.mm-vignette { background: radial-gradient(circle at 50% 50%, rgba(90, 0, 0, 0) 55%, rgba(122, 10, 10, 0.75) 100%); }
.mm-board-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.mm-btn {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); cursor: pointer;
  background: var(--surface); color: var(--text); font: 600 0.88rem var(--font-body);
}
.mm-btn:hover { background: var(--surface-hover); }
.mm-btn:focus-visible, .mm-select select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.mm-btn[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mm-select { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--text-muted); }
.mm-select select { max-width: 100%; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--text); font: 600 0.88rem var(--font-body); }
.mm-board-msg { min-height: 1.6em; margin: 10px 0 0 !important; font-size: 0.9rem; color: var(--text-faint); }
.mm-sieg .mm-svg { box-shadow: 0 0 0 3px #FFC43C, 0 0 40px -6px rgba(255, 196, 60, 0.7); transition: box-shadow 0.6s; }

/* Zwei Bretter nebeneinander, wo Platz ist */
.mm-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 0 24px; }
.mm-pair .mm-board { margin-bottom: 10px; }

/* ---------- Farbtafeln (Bretter, Steine) ---------- */
.mm-swatch { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; margin-right: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.mm-swatch-pair { white-space: nowrap; }
.mm-swatch-board { display: inline-block; width: 34px; height: 34px; border-radius: 6px; vertical-align: middle; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }

/* ---------- Rätselpakete ---------- */
.wiki-content .mm-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; margin: 16px 0 26px; padding: 0; list-style: none; max-width: none !important; }
.mm-packs li { margin: 0 !important; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elevated); font-size: 0.88rem; line-height: 1.45; }
.mm-packs li b { display: block; color: var(--text); font-size: 1rem; margin-bottom: 2px; }
.mm-packs .mm-pack-meta { display: block; margin-top: 6px; color: var(--text-faint); font-size: 0.8rem; }

@media (max-width: 600px) {
  .mm-board { max-width: none; }
  .mm-select { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .mm-lift, .mm-lift.schwebt, .mm-piece-in.schlagbar, .mm-halo, .mm-ziel, .mm-coach, .mm-fog { animation: none; transition: none; }
}
