/* X-P Mahjong – Aussehen der Spielfläche (Bühne, Leiste, Steine, Menü, Dialoge).
   Kopf und Fuß der Website stehen wie bei den anderen Spielen direkt in mahjong.php. */

main.mj-main { padding: 0; }
.mj {
  --gold: #ffc85a;
  --gold-glow: rgba(255, 200, 90, .55);
  --mj-shade: .55;
  position: relative;
  --mj-site-bottom: 0px;           /* Höhe einer festen Website-Leiste unten, misst xp-mahjong-safe.js */
  height: calc(100svh - 65px - env(safe-area-inset-top, 0px) - var(--mj-site-bottom));
  min-height: 420px;
  max-height: 1300px;
  overflow: hidden;
  background: #060919;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  isolation: isolate;
}

/* Hintergrund: leicht weichgezeichnet, Mitte dunkler (dort liegt der Stapel) */
.mj-bg {
  position: absolute;
  inset: -12px;
  background: #0b1030 center / cover no-repeat;
  filter: blur(2px) saturate(1.05);
  z-index: -2;
  transition: background-image .4s;
}
.mj-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 58% at 50% 55%,
      rgba(6, 9, 25, var(--mj-shade)) 0%,
      rgba(6, 9, 25, calc(var(--mj-shade) * .55)) 72%,
      rgba(6, 9, 25, calc(var(--mj-shade) * .9)) 100%);
}

/* ---------- obere Leiste ---------- */
.mj-top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px clamp(12px, 2vw, 28px);
  background: linear-gradient(rgba(6, 9, 25, .88), rgba(6, 9, 25, .45) 70%, rgba(6, 9, 25, 0));
}
.mj-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  color: var(--muted);
}
.mj-back:hover { color: var(--text); border-color: var(--cyan); }
.mj-title { flex: none; line-height: 1; }
.mj-title h1 {
  margin: 0;
  font: 800 1.3rem/1 var(--display);
  text-transform: none;
  letter-spacing: .01em;
  white-space: nowrap;
}
.mj-title h1 span { color: var(--pink); text-shadow: 0 0 14px var(--pink-glow); }
.mj-title p {
  margin: .3rem 0 0;
  font: 600 .66rem/1 var(--display);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--cyan);
  white-space: nowrap;
}
.mj-title img { display: block; height: 46px; width: auto; }

.mj-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; justify-content: flex-end; }
.mj-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(10, 14, 36, .72);
  border: 1px solid rgba(74, 216, 255, .25);
  border-radius: 999px;
  padding: 6px 13px;
  font: 400 .8rem/1.1 var(--display);
  color: var(--muted);
  white-space: nowrap;
}
.mj-chip b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 700; }
button.mj-chip { cursor: pointer; }
.mj-chip.is-daily { border-color: rgba(255, 200, 90, .5); color: var(--gold); }
.mj-ok { color: #7dffb0; margin-left: 2px; }

.mj-tools { display: flex; gap: 8px; flex: none; }
.mj-tb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(10, 14, 36, .8);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 10px;
  color: var(--text);
  padding: 9px 13px;
  font: 400 .86rem/1 var(--display);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s, box-shadow .2s, color .2s;
}
.mj-tb:hover { border-color: var(--cyan); box-shadow: 0 0 12px var(--cyan-glow); }
.mj-tb svg {
  width: 18px; height: 18px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.mj-tb.is-hint { border-color: rgba(255, 52, 217, .6); color: #ff7ae9; }
.mj-tb.is-icon { padding: 9px 10px; }
.mj :focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- untere Leiste (Handy) ---------- */
.mj-bar {
  display: none;
  position: absolute;
  inset: auto 0 0 0;
  z-index: 5;
  justify-content: space-around;
  gap: 8px;
  padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  background: linear-gradient(rgba(6, 9, 25, 0), rgba(6, 9, 25, .9) 45%);
}
/* Liegt unten eine Leiste der Website, hält diese schon den Abstand zur iPhone-Unterkante */
.mj.has-site-bar .mj-bar { padding-bottom: 10px; }
.mj-bar .mj-tb {
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 8px 0;
  font-size: .72rem;
  border-radius: 12px;
}
.mj-bar .mj-tb svg { width: 22px; height: 22px; }

/* ---------- Brett und Steine ---------- */
.mj-board, .mj-fx { position: absolute; inset: 0; z-index: 2; }
.mj-fx { z-index: 3; pointer-events: none; }
.mj-tile {
  position: absolute;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 8%;
  -webkit-tap-highlight-color: transparent;
}
.mj-tile.is-locked { cursor: default; }
.mj-tile:disabled { pointer-events: none; }
.mj-art {
  position: absolute;
  max-width: none;
  pointer-events: none;
  transition: opacity .28s ease, transform .28s ease;
  transform-origin: 40% 45%;
}
.mj-tile.is-sel .mj-art { transform: translate(-1px, -3px); }
.mj-tile.is-gone .mj-art { opacity: 0; transform: translateY(-10px) scale(1.06); }
.mj-tile.is-gone { visibility: hidden; transition: visibility 0s .3s; }
.mj-tile.no-anim .mj-art, .mj-tile.no-anim { transition: none !important; }
.mj-tile.is-shake .mj-art { animation: mjShake .32s; }
@keyframes mjShake { 25% { margin-left: -4px; } 75% { margin-left: 4px; } }

.mj-board.is-shuffle .mj-art { animation: mjFlip .45s ease; }
@keyframes mjFlip { 0% { opacity: 1; } 40% { opacity: .15; transform: scale(.94); } 100% { opacity: 1; } }

.mj-ring { position: absolute; max-width: none; pointer-events: none; }
.mj-ring-sel { transform: translate(-1px, -3px); animation: mjIn .15s ease; }
.mj-ring-hint { animation: mjPulse 1s ease-in-out infinite; }
@keyframes mjIn { from { opacity: 0; } }
@keyframes mjPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

.mj-spark {
  position: absolute;
  max-width: none;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: mjSpark .85s ease-out forwards;
}
@keyframes mjSpark {
  0% { opacity: 0; transform: scale(.35) rotate(0deg); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.25) rotate(25deg); }
}

/* ---------- Hinweise, Laden, Dialog ---------- */
.mj-toast {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 8;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: rgba(10, 14, 36, .92);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 16px;
  font-size: .9rem;
  color: var(--text);
  transition: opacity .2s, transform .2s;
  white-space: nowrap;
}
.mj-toast.show { opacity: 1; transform: translate(-50%, 0); }

.mj-loading {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: .95rem;
  letter-spacing: .04em;
}
.mj-loading[hidden] { display: none; }

.mj-dialog, .mj-menu {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(6, 9, 25, .55);
  padding: 16px;
}
.mj-dialog[hidden], .mj-menu[hidden] { display: none; }
.mj-dlg, .mj-menu-in {
  background: #0b1030;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 0 34px rgba(255, 52, 217, .22);
  padding: 1.3rem 1.4rem;
  width: min(420px, 100%);
  max-height: calc(100% - 8px);
  overflow-y: auto;
  text-align: center;
}
.mj-dlg h2 {
  margin: 0 0 .6rem;
  font: 800 1.7rem/1.1 var(--display);
  color: var(--pink);
  text-shadow: 0 0 16px var(--pink-glow);
}
.mj-dlg p { margin: .3rem 0; color: var(--text); }
.mj-rec { color: var(--gold); }
.mj-dlg-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1.1rem; }

.mj-btn {
  font: 600 .82rem/1 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: .85rem 1.1rem;
  cursor: pointer;
}
.mj-btn:hover { border-color: var(--cyan); }
.mj-primary {
  background: linear-gradient(180deg, #ff4fe0, #d61cb6);
  border-color: #ff7ae9;
  box-shadow: 0 0 20px var(--pink-glow);
  color: #fff;
}
.mj-wide { width: 100%; margin-top: 1rem; }

/* Menü */
.mj-menu { place-items: start end; padding: 64px clamp(12px, 2vw, 28px) 16px; background: rgba(6, 9, 25, .35); }
.mj-menu-in { width: min(360px, 100%); text-align: left; padding: 1rem 1.1rem 1.1rem; }
.mj-menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .2rem; }
.mj-menu-head h2 { margin: 0; font: 800 1.05rem/1 var(--display); text-transform: uppercase; letter-spacing: .06em; }
.mj-x {
  width: 34px; height: 34px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.mj-menu-in h3 {
  margin: .95rem 0 .45rem;
  font: 600 .68rem/1 var(--display);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}
.mj-seg { display: flex; gap: 6px; }
.mj-seg.mj-wrap { flex-wrap: wrap; }
.mj-seg button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, .03);
  border: 1.5px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font: 400 .84rem/1.15 var(--display);
  padding: .6rem .5rem;
  cursor: pointer;
}
.mj-seg.mj-wrap button { flex: 1 1 45%; }
.mj-seg button small { opacity: .6; }
.mj-seg button[aria-pressed="true"] {
  color: #fff;
  border-color: var(--pink);
  box-shadow: 0 0 10px var(--pink-glow), inset 0 0 8px rgba(255, 52, 217, .18);
}
.mj-woods button { flex-direction: column; font-size: .72rem; padding: .5rem .3rem; }
.mj-woods img { width: 34px; height: auto; display: block; }
.mj-check { display: flex; align-items: center; gap: .6rem; margin-top: .8rem; color: var(--text); font-size: .9rem; cursor: pointer; }
.mj-check input { width: 18px; height: 18px; accent-color: var(--pink); margin: 0; }
.mj-note { margin: .5rem 0 0; font-size: .8rem; color: var(--gold); }

/* ---------- Text unter dem Spiel ---------- */
.mj-about { padding: 1.6rem 0 2.5rem; color: var(--muted); max-width: 52rem; }
.mj-about h2 { font: 800 1.1rem/1.2 var(--display); text-transform: uppercase; color: var(--text); margin: 1rem 0 .5rem; }
.mj-about p { margin: .4rem 0; }

/* ---------- Handy hochkant ---------- */
@media (max-width: 760px) {
  .mj { height: calc(100svh - 65px - env(safe-area-inset-top, 0px) - var(--mj-site-bottom)); min-height: 420px; }
  .mj-top { flex-wrap: wrap; gap: 6px 10px; padding: 8px 12px 10px; }
  .mj-back { width: 30px; height: 30px; }
  .mj-title { display: flex; align-items: baseline; gap: 8px; }
  .mj-title h1 { font-size: 1.05rem; }
  .mj-title p { font-size: .56rem; margin: 0; }
  .mj-title img { height: 30px; }
  .mj-tools { display: none; }
  .mj-stats { gap: 6px; }
  .mj-chip { padding: 5px 10px; font-size: .74rem; }
  .mj-chip.mj-x2 { display: none; }
  .mj-bar { display: flex; }
  .mj-toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .mj-menu { place-items: end center; padding: 16px 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 420px) {
  .mj-stats { width: 100%; justify-content: flex-start; margin-left: 0; }
}

/* ---------- Handy quer: alles für das Brett ---------- */
@media (orientation: landscape) and (max-height: 560px) {
  header, footer, .mj-about { display: none !important; }
  .mj { height: calc(100svh - var(--mj-site-bottom)); min-height: 0; }
  .mj-top { flex-wrap: nowrap; padding: 6px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); }
  .mj-title p { display: none; }
  .mj-chip.mj-x2 { display: none; }
  .mj-tools { display: flex; }
  .mj-tb span { display: none; }
  .mj-tb { padding: 8px; }
  .mj-bar { display: none; }
  .mj-menu { place-items: center; padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .mj-art, .mj-tile { transition: none !important; }
  .mj-spark, .mj-ring-hint, .mj-board.is-shuffle .mj-art { animation: none !important; }
  .mj-spark { display: none; }
}

/* ---------- Sonderregeln: Zähler, Meldungen, Punkte (Stufe 2) ---------- */
.mj-tb { position: relative; }
.mj-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--pink);
  color: #fff;
  font: 700 .68rem/1 var(--display);
  white-space: nowrap;
}
.mj-badge[hidden] { display: none; }
.mj-badge.is-pen { background: rgba(255, 255, 255, .14); color: var(--muted); }
.mj-tb.is-off { opacity: .4; }
.mj-bar .mj-badge { position: absolute; top: 4px; right: 8px; }

.mj-chip[hidden] { display: none; }
.mj-chip.is-low { border-color: rgba(255, 90, 90, .75); color: #ff9a9a; }
.mj-chip.is-low b { color: #ffd0d0; }
.mj-chip.is-flash { animation: mjFlash .6s ease; }
@keyframes mjFlash { 30% { border-color: #ff5a5a; box-shadow: 0 0 14px rgba(255, 90, 90, .7); } }

/* Effekt-Meldung oben */
.mj-banner {
  position: absolute;
  left: 50%;
  top: calc(var(--mj-banner-top, 76px));
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 24px);
  padding: 9px 18px 9px 10px;
  border-radius: 14px;
  background: rgba(11, 16, 48, .94);
  border: 1px solid rgba(255, 52, 217, .6);
  box-shadow: 0 0 26px rgba(255, 52, 217, .45);
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -8px) scale(.96);
  transition: opacity .25s, transform .25s;
}
.mj-banner.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.mj-banner[hidden] { display: none; }
.mj-banner img { width: 36px; height: 36px; flex: none; }
.mj-banner b { display: block; font: 700 1rem/1.2 var(--display); }
.mj-banner small { display: block; font-size: .74rem; color: var(--muted); }

/* Punkte und Kombo am Paar */
.mj-pop {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  animation: mjPop 1.25s ease-out forwards;
}
.mj-pop b { display: block; font: 800 1.1rem/1 var(--display); color: #fff; text-shadow: 0 0 8px rgba(74, 216, 255, .9), 0 1px 2px #000; }
.mj-pop small { display: block; margin-top: 3px; font: 800 .72rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); text-shadow: 0 0 8px rgba(255, 200, 90, .8), 0 1px 2px #000; }
.mj-pop.is-combo b { font-size: 1.8rem; text-shadow: 0 0 14px var(--pink), 0 0 4px var(--pink), 0 1px 2px #000; }
@keyframes mjPop {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -110%) scale(1); }
}

/* Menü: Modi, Serie, Bestwerte */
.mj-seg.mj-modes { display: grid; grid-template-columns: 1fr 1fr; }
.mj-seg.mj-modes button { flex-direction: column; align-items: flex-start; text-align: left; padding: .55rem .6rem; }
.mj-seg.mj-modes b { font-weight: 600; color: var(--text); }
.mj-seg.mj-modes small { opacity: 1; font-size: .7rem; color: var(--muted); }
.mj-streak {
  margin: .7rem 0 0;
  padding: .5rem .7rem;
  border: 1px solid rgba(255, 200, 90, .5);
  border-radius: 9px;
  color: var(--gold);
  font-size: .84rem;
}
.mj-bests { list-style: none; margin: 0; padding: 0; font-size: .84rem; color: var(--muted); }
.mj-bests li { display: flex; justify-content: space-between; gap: 1rem; padding: .18rem 0; }
.mj-bests li span + span { color: var(--text); font-variant-numeric: tabular-nums; }

/* Gewinn-Dialog: Punkte-Aufstellung */
.mj-sum { margin: .6rem auto .2rem; border-collapse: collapse; font-size: .95rem; }
.mj-sum td { padding: .16rem .7rem; text-align: left; }
.mj-sum td + td { text-align: right; font-variant-numeric: tabular-nums; }
.mj-sum tr.tot td { border-top: 1px solid var(--line); font-weight: 800; color: #ff7ae9; font-size: 1.1rem; padding-top: .4rem; }
.mj-dlg .mj-streak { display: inline-block; margin-top: .5rem; }

@media (max-width: 760px) {
  .mj { --mj-banner-top: 92px; }
  .mj-banner b { font-size: .9rem; }
  .mj-banner img { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .mj-pop { animation: none; }
}

/* ---------- Song-Powers (Stufe 3) ---------- */
.mj-powers[hidden] { display: none !important; }
.mj-powers-side {
  position: absolute;
  z-index: 4;
  left: clamp(10px, 1.6vw, 24px);
  top: calc(var(--mj-top-h, 70px) + 6px);
  width: 214px;
  max-height: calc(100% - var(--mj-top-h, 70px) - 20px);
  overflow-y: auto;
  padding: 10px;
  border-radius: 14px;
  background: rgba(8, 12, 34, .78);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.mj-powers-row { display: none; }
.mj-pw-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mj-pw-head b { font: 800 .74rem/1 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); }
.mj-pw-help {
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font: 700 .8rem/1 var(--display);
  cursor: pointer;
}
.mj-pw-meter { display: flex; gap: 4px; }
.mj-pw-meter i { flex: 1; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .1); }
.mj-pw-meter i.on { background: linear-gradient(90deg, var(--cyan), var(--pink)); box-shadow: 0 0 8px var(--pink-glow); }
.mj-pw-state { margin: 5px 0 8px; font-size: .74rem; color: var(--muted); }
.mj-powers.is-ready .mj-pw-state { color: #ff7ae9; font-weight: 700; }
.mj-pw { margin-top: 6px; }
.mj-pw-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 6px;
  text-align: left;
  background: rgba(255, 255, 255, .03);
  border: 1.5px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, opacity .2s;
}
.mj-pw-btn img { width: 44px; height: 44px; flex: none; border-radius: 9px; object-fit: cover; background: #10173d; }
.mj-pw-btn b { display: block; font: 700 .8rem/1.15 var(--display); }
.mj-pw-btn small { display: block; margin-top: 2px; font-size: .68rem; line-height: 1.3; color: var(--muted); }
.mj-powers:not(.is-ready) .mj-pw-btn img { filter: saturate(.5) brightness(.75); }
.mj-powers.is-ready .mj-pw-btn { border-color: rgba(255, 52, 217, .7); box-shadow: 0 0 12px var(--pink-glow); }
.mj-powers.is-ready .mj-pw-btn:hover { border-color: var(--cyan); }
.mj-pw-btn.is-active { border-color: var(--cyan) !important; box-shadow: 0 0 14px var(--cyan-glow) !important; }
.mj-pw-song { display: inline-block; margin: 3px 0 0 6px; font-size: .68rem; color: var(--cyan); }
.mj-pw-song:hover { text-decoration: underline; }
.mj-pw-list { text-align: left; margin: .6rem 0 0; padding-left: 1.1rem; font-size: .9rem; line-height: 1.5; }
.mj-pw-list a { color: var(--cyan); font-size: .8rem; }
.mj.is-picking .mj-tile { cursor: crosshair; }

/* Hinweis bei langem Druck (Handy) */
.mj-pw-tip {
  position: absolute;
  z-index: 12;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0b1030;
  border: 1px solid rgba(255, 52, 217, .6);
  box-shadow: 0 0 22px rgba(255, 52, 217, .35);
  font-size: .85rem;
}
.mj-pw-tip[hidden] { display: none; }
.mj-pw-tip p { margin: .25rem 0 .4rem; color: var(--muted); }
.mj-pw-tip a { color: var(--cyan); }

/* Island of Dreams: Stein hebt sich an und wird durchsichtig */
.mj-tile.is-lift { z-index: 1; }
.mj-tile.is-lift .mj-art {
  opacity: .18;
  transform: translate(-8%, -34%);
  transition: opacity .35s ease, transform .35s ease;
}

/* Gewonnen-Fenster: Platz für Rangliste und Bewertung */
.mj-win .mj-dlg { width: min(460px, 100%); }

@media (max-width: 760px) {
  .mj-powers-side { display: none; }
  .mj-bar { flex-wrap: wrap; }
  .mj-powers-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 100%;
    padding: 0 2px 4px;
  }
  .mj-powers-row .mj-pw-meter { width: 46px; flex: none; flex-direction: column; gap: 3px; }
  .mj-powers-row .mj-pw-meter i { height: 6px; }
  .mj-powers-row .mj-pw-btn { width: auto; flex: 1; justify-content: center; padding: 3px; border-radius: 12px; }
  .mj-powers-row .mj-pw-btn img { width: 40px; height: 40px; }
  .mj-powers-row .mj-pw-help { width: 30px; height: 30px; }
  .mj-powers-row { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
}

/* Handy quer: schmale Seitenleiste nur mit Bildern */
@media (orientation: landscape) and (max-height: 560px) {
  .mj-powers-side { display: block; width: 70px; padding: 6px; }
  .mj-powers-side .mj-pw-head b, .mj-powers-side .mj-pw-state,
  .mj-powers-side .mj-pw-btn span, .mj-powers-side .mj-pw-song { display: none; }
  .mj-powers-side .mj-pw-btn { justify-content: center; padding: 3px; }
  .mj-powers-side .mj-pw-btn img { width: 40px; height: 40px; }
  .mj-powers-side .mj-pw-head { justify-content: center; }
}
