*,
*::before,
*::after {
  box-sizing: border-box;
}

.wm-elfmeter-page {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0 0 32px;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #fff;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  --wm-ui-scale: 1;
  --wm-fluid-font: clamp(15px, 2.6vw + 10px, 18px);
  --wm-goal-top: 12px;
  --wm-goal-h: 130px;
  font-size: var(--wm-fluid-font);
  background-color: #0b3d1f;
  background-image:
    linear-gradient(180deg, rgba(8, 42, 22, 0.42) 0%, rgba(8, 42, 22, 0.22) 42%, rgba(8, 42, 22, 0.48) 100%),
    url('../img/bg-wm-elfmeter.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.wm-test-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffe082 0%, #f5c842 100%);
  color: #1a1a1a;
  font-weight: 700;
  text-align: center;
  border: 2px solid rgba(0, 0, 0, 0.12);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #fff;
}

.wm-app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px 32px;
}

.wm-header {
  text-align: center;
  margin-bottom: 20px;
}

.wm-badge {
  display: inline-block;
  background: #d52b1e;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.wm-header h1 {
  margin: 0 0 6px;
  font-size: 1.75rem;
}

.wm-sub {
  margin: 0;
  opacity: 0.9;
  font-size: 0.95rem;
}

.wm-demo-bar {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
}

.wm-demo-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  min-height: 34px;
}

.wm-demo-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.wm-demo-switch-track {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  position: relative;
  transition: background 0.2s;
}

.wm-demo-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.wm-demo-switch input:checked + .wm-demo-switch-track {
  background: #d52b1e;
  border-color: #ffb4ae;
}

.wm-demo-switch input:checked + .wm-demo-switch-track::after {
  transform: translateX(20px);
}

.wm-demo-switch-label {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.wm-demo-hint {
  margin: 0;
  flex: 1 1 100%;
  font-size: 0.78rem;
  opacity: 0.85;
  color: #ffe082;
}

.wm-demo-bar .wm-btn-secondary {
  min-height: 34px;
}

.wm-demo-active .wm-badge::after {
  content: ' · DEMO';
  font-weight: 700;
}

.wm-screen {
  display: none;
}

.wm-screen.is-active {
  display: block;
}

.wm-panel {
  background: rgba(8, 38, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  padding: 24px 20px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.wm-panel-center {
  text-align: center;
}

.wm-panel h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.wm-access-message {
  margin: 0 0 18px;
  font-size: 1rem;
  line-height: 1.45;
}

.wm-access-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.wm-access-actions .wm-btn {
  min-width: 180px;
}

.wm-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  cursor: pointer;
  font-size: 0.95rem;
}

.wm-check input {
  width: 18px;
  height: 18px;
  accent-color: #d52b1e;
}

.wm-btn {
  min-height: 44px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transition: background 0.15s, transform 0.1s;
}

.wm-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.3);
}

.wm-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.wm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wm-btn-primary {
  background: #d52b1e;
}

.wm-btn-primary:hover:not(:disabled) {
  background: #b82419;
}

.wm-btn-shoot {
  width: 100%;
  margin-top: 4px;
}

.wm-btn-save {
  flex: 1;
  min-width: 0;
}

.wm-btn-save.is-selected {
  background: #ffe082;
  color: #1a1a1a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.wm-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.is-hidden {
  display: none !important;
}

.wm-timer {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 16px 0;
  color: #ffe082;
}

.wm-last-result {
  font-size: 0.9rem;
  opacity: 0.85;
}

.wm-scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.wm-scoreboard-compact {
  justify-content: space-between;
  font-size: 0.95rem;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
}

.wm-score-side {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wm-score-label {
  font-size: 0.8rem;
  opacity: 0.8;
}

.wm-score-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.wm-score-vs {
  font-size: 1.5rem;
  opacity: 0.7;
}

.wm-round-badge {
  background: #d52b1e;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.wm-pitch {
  background: linear-gradient(180deg, #2d8f4e 0%, #3cb371 60%, #2d8f4e 100%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  padding: 16px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.15);
}

.wm-field-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.wm-goal-area {
  position: relative;
  flex: 1;
  min-height: 260px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.02) 100%);
  overflow: hidden;
}

.wm-penalty-spot {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.8);
  z-index: 1;
}

.wm-goal {
  position: absolute;
  top: var(--wm-goal-top);
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 280px;
  height: var(--wm-goal-h);
  border-top: 5px solid #fff;
  border-left: 5px solid #fff;
  border-right: 5px solid #fff;
  cursor: crosshair;
  touch-action: none;
}

.wm-goal-area.is-keeper-mode .wm-goal {
  cursor: pointer;
  box-shadow: inset 0 0 0 3px rgba(255, 224, 130, 0.55);
}

.wm-goal-area.is-keeper-mode .wm-goal::after {
  content: "Tippen zum Halten";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  color: #ffe082;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
}

.wm-goal-net {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.18) 0,
    rgba(255, 255, 255, 0.18) 2px,
    transparent 2px,
    transparent 12px
  ),
  repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.18) 0,
    rgba(255, 255, 255, 0.18) 2px,
    transparent 2px,
    transparent 12px
  );
  pointer-events: none;
}

.wm-aim-marker {
  position: absolute;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  margin-top: -14px;
  border: 3px solid #ffe082;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 4;
  animation: wm-pulse 1s ease infinite;
}

@keyframes wm-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

.wm-keeper {
  position: absolute;
  top: calc(var(--wm-goal-top) + var(--wm-goal-h) - 98px);
  left: 50%;
  width: auto;
  height: 98px;
  transform: translateX(-50%);
  transform-origin: bottom center;
  transition: left 0.26s cubic-bezier(0.15, 0.95, 0.25, 1), top 0.26s ease, height 0.2s ease;
  z-index: 6;
  pointer-events: none;
}

.wm-keeper-img {
  display: block;
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.wm-keeper.is-ready {
  animation: wm-keeper-ready 0.55s ease-in-out infinite;
}

@keyframes wm-keeper-ready {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}

.wm-keeper.dive-left,
.wm-keeper.dive-right {
  height: 112px;
  top: calc(var(--wm-goal-top) + var(--wm-goal-h) - 112px);
  transform: translateX(-50%);
}

.wm-keeper.dive-center {
  height: 104px;
  top: calc(var(--wm-goal-top) + var(--wm-goal-h) - 104px);
  transform: translateX(-50%) scale(1.04);
}

.wm-keeper.dive-high {
  height: 128px;
  top: calc(var(--wm-goal-top) + var(--wm-goal-h) - 128px);
}

.wm-keeper.dive-left.dive-high,
.wm-keeper.dive-right.dive-high {
  height: 136px;
  top: calc(var(--wm-goal-top) + var(--wm-goal-h) - 136px);
}

.wm-keeper.dive-center.dive-high {
  height: 122px;
  top: calc(var(--wm-goal-top) + var(--wm-goal-h) - 122px);
  transform: translateX(-50%);
}

.wm-keeper.is-player .wm-keeper-img {
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45)) saturate(1.05) brightness(1.08);
}

.wm-ball {
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translateX(-50%);
  z-index: 7;
  transition: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  background: transparent;
  overflow: visible;
}

.wm-ball-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  background: transparent;
}

.wm-ball.is-flying .wm-ball-img {
  animation: wm-ball-spin 0.55s linear forwards;
}

.wm-ball.is-at-spot {
  animation: wm-ball-ready 0.8s ease-in-out infinite;
}

.wm-goal-area.is-shoot-mode {
  cursor: default;
  touch-action: none;
}

.wm-drag-guide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}

.wm-drag-guide line {
  stroke: #ffe082;
  stroke-width: 4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
}

.wm-ball.is-dragging {
  transform: scale(1.08);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.55));
}

.wm-power-bar-drag .wm-power-fill {
  opacity: 0.75;
  transition: height 0.05s linear;
}

@keyframes wm-ball-ready {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.wm-countdown {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 8;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
  color: #fff;
  pointer-events: none;
  border-radius: 12px;
}

.wm-countdown.is-go {
  color: #ffe082;
  font-size: 2.8rem;
  animation: wm-countdown-pulse 0.35s ease;
}

@keyframes wm-countdown-pulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.wm-countdown.is-tick {
  font-size: 4.2rem;
  color: #fff;
  animation: wm-countdown-tick 0.45s ease;
}

@keyframes wm-countdown-tick {
  0% { transform: scale(1.35); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes wm-ball-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(320deg); }
}

.wm-ball.is-weak {
  opacity: 0.75;
}

.wm-ball.is-over {
  opacity: 0.45;
}

.wm-power-bar.is-sweet {
  border-color: #ffe082;
  box-shadow: 0 0 14px rgba(255, 224, 130, 0.65);
}

.wm-power-cursor.is-sweet {
  background: #ffe082;
  box-shadow: 0 0 12px rgba(255, 224, 130, 1);
}

.wm-power-value {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-height: 1.2em;
  color: #ffe082;
}

.wm-pitch.shake-goal {
  /* deaktiviert — Tor/Pitch bleiben nach Schuss fix */
}

.wm-goal.net-hit .wm-goal-net {
  animation: wm-net-flash 0.45s ease;
}

@keyframes wm-net-flash {
  0%, 100% { opacity: 1; }
  40% { opacity: 0.55; }
  70% { opacity: 0.85; }
}

@keyframes wm-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.wm-play-stack {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: stretch;
}

.wm-play-stack .wm-field-row {
  flex: 1;
  min-width: 0;
}

.wm-play-stack .wm-power-col {
  width: 52px;
  flex-shrink: 0;
  align-items: center;
}

.wm-power-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  flex-shrink: 0;
  gap: 6px;
}

.wm-power-label,
.wm-power-hint {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.wm-power-bar {
  position: relative;
  width: 28px;
  height: 200px;
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.wm-power-sweet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 42%;
  height: 38%;
  background: rgba(255, 224, 130, 0.25);
  border-top: 2px dashed rgba(255, 224, 130, 0.7);
  border-bottom: 2px dashed rgba(255, 224, 130, 0.7);
  pointer-events: none;
  z-index: 1;
}

.wm-power-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(0deg, #2d8f4e 0%, #ffe082 55%, #d52b1e 100%);
  opacity: 0.45;
  z-index: 0;
  transition: none;
}

.wm-power-cursor {
  position: absolute;
  left: 2px;
  right: 2px;
  height: 6px;
  bottom: 0%;
  margin-bottom: -3px;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  z-index: 2;
  pointer-events: none;
}

.wm-power-bar.is-horizontal {
  width: 100%;
  max-width: 100%;
  height: 34px;
  min-height: 34px;
}

.wm-power-bar.is-horizontal .wm-power-sweet {
  top: 0;
  bottom: 0;
  left: 42%;
  width: 38%;
  height: auto;
  right: auto;
}

.wm-power-bar.is-horizontal .wm-power-fill {
  top: 0;
  bottom: 0;
  left: 0;
  right: auto;
  height: 100%;
  background: linear-gradient(90deg, #2d8f4e 0%, #ffe082 55%, #d52b1e 100%);
}

.wm-phase-text {
  text-align: center;
  font-weight: 600;
  margin: 12px 0 4px;
  min-height: 2.8em;
  font-size: 0.95rem;
  line-height: 1.35;
}

.wm-save-timer {
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
}

.wm-save-timer-fill {
  height: 100%;
  width: 100%;
  background: #ffe082;
  transform-origin: left;
  transition: transform 0.05s linear;
}

.wm-key-hint {
  text-align: center;
  font-size: 0.85rem;
  margin: 8px 0 0;
  opacity: 0.85;
  color: #ffe082;
}

.wm-result-score {
  font-size: 2rem;
  font-weight: 700;
  margin: 8px 0;
}

.wm-wheel-mode {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
  min-height: 28px;
  line-height: 1.2;
}

.wm-wheel-mode.is-badge-muted {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.wm-wheel-top-slot {
  min-height: 5.4rem;
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.wm-wheel-controls-slot {
  min-height: 7.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin-top: 4px;
}

.wm-wheel-controls-stack {
  position: relative;
  width: 100%;
  max-width: 460px;
  min-height: 4.6rem;
}

.wm-wheel-controls-stack .wm-wheel-actions,
.wm-wheel-controls-stack .wm-wheel-confirm-gamble {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  margin: 0;
}

.wm-wheel-controls-stack .wm-wheel-actions.is-hidden,
.wm-wheel-controls-stack .wm-wheel-confirm-gamble.is-hidden {
  display: flex !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.wm-wheel-controls-stack .wm-wheel-confirm-gamble {
  display: block;
}

.wm-wheel-mode.is-mode-first {
  background: #145a32;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.wm-wheel-mode.is-mode-gamble {
  background: #d52b1e;
  color: #fff;
  box-shadow: 0 0 0 2px #ffe082;
}

.wm-wheel-mode.is-mode-choose {
  background: #3d5a80;
  color: #fff;
}

.wm-wheel-rules {
  font-size: 0.88rem;
  line-height: 1.4;
  margin: 0 0 10px;
  opacity: 0.95;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.wm-wheel-stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 50px auto 16px;
}

.wm-wheel-wrap {
  position: relative;
  width: 100%;
  border-radius: 50%;
  padding: 10px;
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.wm-wheel-rotator {
  position: relative;
  width: 100%;
  border-radius: 50%;
  transform: rotate(0deg);
  will-change: transform;
}

.wm-wheel-wrap.is-mode-first {
  background: radial-gradient(circle at 50% 50%, rgba(45, 143, 78, 0.18) 0%, rgba(0, 0, 0, 0.35) 72%);
  box-shadow:
    0 0 0 3px rgba(120, 210, 255, 0.55),
    0 0 22px rgba(90, 180, 255, 0.45),
    0 0 40px rgba(45, 143, 78, 0.25);
}

.wm-wheel-wrap.is-mode-gamble {
  background: radial-gradient(circle at 50% 50%, rgba(213, 43, 30, 0.2) 0%, rgba(0, 0, 0, 0.38) 72%);
  box-shadow:
    0 0 0 3px rgba(255, 160, 90, 0.6),
    0 0 22px rgba(213, 43, 30, 0.55),
    0 0 38px rgba(255, 80, 40, 0.28);
}

.wm-wheel-wrap.is-mode-choose {
  background: radial-gradient(circle at 50% 50%, rgba(61, 90, 128, 0.2) 0%, rgba(0, 0, 0, 0.32) 72%);
  box-shadow:
    0 0 0 3px rgba(255, 224, 130, 0.65),
    0 0 18px rgba(255, 224, 130, 0.35);
}

.wm-wheel-neon-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.wm-wheel-neon-ring .wm-neon-arc {
  fill: none;
  stroke-width: 5;
  opacity: 0.85;
}

.wm-wheel-neon-ring.is-mode-first .wm-neon-arc {
  stroke: url(#wm-neon-stroke-first);
}

.wm-wheel-neon-ring.is-mode-gamble .wm-neon-arc {
  stroke: url(#wm-neon-stroke-gamble);
}

.wm-wheel-neon-ring.is-mode-choose .wm-neon-arc {
  stroke: url(#wm-neon-stroke-choose);
}

.wm-wheel-neon-ring .wm-neon-dot {
  fill: #ffffff;
  opacity: 0.55;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.85));
}

.wm-wheel-neon-ring .wm-neon-dot.is-bright {
  opacity: 1;
  animation: wm-neon-dot-pulse 1.4s ease-in-out infinite;
}

.wm-wheel-neon-ring.is-mode-gamble .wm-neon-dot.is-bright {
  animation-duration: 1.1s;
}

@keyframes wm-neon-dot-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.wm-wheel-legend {
  margin: 10px auto 0;
  max-width: 460px;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: left;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 10px;
  padding: 10px 12px;
}

.wm-wheel-legend-title {
  font-weight: 700;
  margin: 0 0 6px;
  color: #ffe082;
}

.wm-wheel-legend-list {
  margin: 0;
  padding-left: 1.1rem;
}

.wm-wheel-legend-list li {
  margin: 2px 0;
}

.wm-wheel-confirm {
  margin: 12px auto 0;
  max-width: 460px;
  text-align: left;
  background: rgba(0, 0, 0, 0.42);
  border: 2px solid #ffe082;
  border-radius: 12px;
  padding: 14px 16px;
}

.wm-wheel-confirm-gamble {
  text-align: center;
  padding: 0;
  background: transparent;
  border: 0;
  position: relative;
  z-index: 12;
  margin-top: 0;
  width: 100%;
  max-width: 460px;
}

.wm-wheel-confirm-gamble .wm-wheel-confirm-title {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffe082;
  letter-spacing: 0.03em;
  line-height: 1.25;
}

.wm-wheel-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.wm-wheel-confirm-actions .wm-btn {
  min-height: 38px;
  flex: 1 1 140px;
  max-width: 200px;
  font-size: 0.88rem;
  padding: 6px 10px;
}

.wm-btn-gamble-take {
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #3a9d5c 0%, #2d8f4e 55%, #1f6d3d 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 3px 0 #1a5c32,
    0 5px 12px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.wm-btn-gamble-take:hover:not(:disabled) {
  background: linear-gradient(180deg, #42ad66 0%, #329856 55%, #247844 100%);
  transform: translateY(-1px);
}

.wm-btn-gamble-risk {
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(180deg, #e04538 0%, #d52b1e 55%, #a82218 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 3px 0 #7a1a12,
    0 5px 12px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.wm-btn-gamble-risk:hover:not(:disabled) {
  background: linear-gradient(180deg, #e85548 0%, #df3428 55%, #b4281e 100%);
  transform: translateY(-1px);
}

.wm-wheel-confirm-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffe082;
}

.wm-wheel-confirm-text,
.wm-wheel-confirm-sub {
  margin: 0 0 8px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.wm-wheel-confirm-list {
  margin: 0 0 12px;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}

.wm-wheel-pointer {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 26px;
  height: 34px;
  margin-left: -13px;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(180deg, #7ec8ff 0%, #2b6fd6 55%, #1a4f9c 100%);
  border: 2px solid #ffe082;
  border-radius: 50% 50% 45% 45% / 35% 35% 65% 65%;
  box-shadow:
    0 0 10px rgba(126, 200, 255, 0.9),
    0 3px 8px rgba(0, 0, 0, 0.45);
}

.wm-wheel-pointer::after {
  content: '';
  position: absolute;
  top: 7px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.95);
}

#wheel-canvas {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.wm-wheel-spin-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 96px;
  margin-left: -48px;
  margin-top: -48px;
  border-radius: 50%;
  border: 4px solid #ffe082;
  background: linear-gradient(180deg, #7ec8ff 0%, #3d8fd9 45%, #1a5c9c 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  z-index: 30;
  cursor: pointer;
  pointer-events: auto;
  box-shadow:
    0 0 18px rgba(126, 200, 255, 0.65),
    0 6px 18px rgba(0, 0, 0, 0.5),
    inset 0 2px 8px rgba(255, 255, 255, 0.35);
  min-height: 96px;
  padding: 0;
  touch-action: manipulation;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  transform: none;
}

.wm-wheel-rotator.is-spinning {
  filter: saturate(1.08);
}

.wm-wheel-spin-center:not(.is-disabled):not(.is-hidden) {
  animation: wm-spin-pulse 2.2s ease-in-out infinite;
}

@keyframes wm-spin-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(126, 200, 255, 0.55),
      0 6px 18px rgba(0, 0, 0, 0.5),
      inset 0 2px 8px rgba(255, 255, 255, 0.35);
  }
  50% {
    box-shadow:
      0 0 0 10px rgba(126, 200, 255, 0),
      0 8px 22px rgba(0, 0, 0, 0.55),
      inset 0 2px 8px rgba(255, 255, 255, 0.4);
  }
}

.wm-wheel-spin-center:hover:not(.is-disabled) {
  filter: brightness(1.06);
}

.wm-wheel-spin-center.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.wm-wheel-spin-center.is-hidden {
  display: none;
}

.wm-wheel-spin-hint {
  margin: 0;
  min-height: 1.2rem;
  font-size: 0.78rem;
  opacity: 0.85;
  text-align: center;
}

.wm-wheel-current {
  margin: 2px 0 0;
  min-height: 3.4rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.wm-wheel-win-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  text-align: center;
}

.wm-wheel-win-sub {
  margin: 8px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: #ffe082;
  text-align: center;
}

.wm-wheel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 0;
  width: 100%;
  min-height: 38px;
}

.wm-wheel-actions .wm-btn {
  min-height: 38px;
  flex: 1 1 130px;
  max-width: 190px;
  font-size: 0.88rem;
  padding: 6px 10px;
}

.wm-btn-wheel-cash {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(180deg, #3a9d5c 0%, #2d8f4e 55%, #1f6d3d 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 3px 0 #1a5c32,
    0 5px 12px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

.wm-btn-wheel-cash:hover:not(:disabled) {
  background: linear-gradient(180deg, #42ad66 0%, #329856 55%, #247844 100%);
  transform: translateY(-1px);
  box-shadow:
    0 4px 0 #1a5c32,
    0 7px 14px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.wm-btn-wheel-cash:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 #1a5c32,
    0 3px 8px rgba(0, 0, 0, 0.24),
    inset 0 1px 3px rgba(0, 0, 0, 0.18);
}

.wm-btn-wheel-risk {
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(180deg, #e04538 0%, #d52b1e 55%, #a82218 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 3px 0 #7a1a12,
    0 5px 12px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

.wm-btn-wheel-risk:hover:not(:disabled) {
  background: linear-gradient(180deg, #e85548 0%, #df3428 55%, #b4281e 100%);
  transform: translateY(-1px);
  box-shadow:
    0 4px 0 #7a1a12,
    0 7px 14px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.wm-btn-wheel-risk:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 #7a1a12,
    0 3px 8px rgba(0, 0, 0, 0.24),
    inset 0 1px 3px rgba(0, 0, 0, 0.18);
}

.wm-wheel-hint {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-top: 10px;
  line-height: 1.35;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

#btn-wheel-done {
  margin-top: 12px;
}

.wm-prize-text {
  font-size: 0.92rem;
  font-weight: 700;
  margin-top: 0;
  min-height: 1.35rem;
  line-height: 1.32;
  color: #ffe082;
  text-align: center;
  max-width: 400px;
}

.wm-prize-text.is-win {
  color: #fff;
}

.wm-code-text {
  background: rgba(0, 0, 0, 0.35);
  padding: 12px 16px;
  border-radius: 10px;
  font-family: monospace;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  margin-top: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.wm-code-box {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
  max-width: 520px;
  flex-wrap: wrap;
}

.wm-btn-copy-code {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 18px;
  background: #d52b1e;
  color: #fff;
  font-size: 0.92rem;
  white-space: nowrap;
}

.wm-btn-copy-code:hover:not(:disabled) {
  background: #b82419;
}

.wm-btn-copy-code.is-copied {
  background: #2e7d32;
}

.wm-rules-details {
  margin: 18px auto 0;
  max-width: 640px;
  background: rgba(8, 38, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  overflow: hidden;
}

.wm-rules-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  min-height: 38px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffe082;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.wm-rules-summary-title {
  color: #ffe082;
}

.wm-rules-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

.wm-rules-read input {
  width: 18px;
  height: 18px;
  accent-color: #d52b1e;
  cursor: pointer;
}

.wm-rules-gate-hint {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: #ffe082;
  text-align: center;
}

.wm-rules-summary::-webkit-details-marker {
  display: none;
}

.wm-rules-summary::after {
  content: " ▾";
  font-size: 0.85rem;
  opacity: 0.85;
}

.wm-rules-details[open] .wm-rules-summary::after {
  content: " ▴";
}

.wm-rules-body {
  padding: 0 16px 16px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.wm-rules-heading {
  margin: 14px 0 6px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
}

.wm-rules-heading:first-child {
  margin-top: 12px;
}

.wm-rules-body p {
  margin: 0;
}

@media (max-width: 767px) {
  .wm-elfmeter-page {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0 10px calc(40px + env(safe-area-inset-bottom, 0px));
    min-height: 100vh;
    min-height: 100dvh;
    --wm-goal-top: clamp(10px, 2.8vw, 16px);
    --wm-goal-h: clamp(120px, 34vw, 168px);
  }

  .wm-elfmeter-page.is-mobile-scale .wm-app {
    transform: none;
    width: 100%;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .wm-elfmeter-page.is-mobile-scale {
    zoom: var(--wm-ui-scale, 1);
  }

  @supports not (zoom: 1) {
    .wm-elfmeter-page.is-mobile-scale .wm-app {
      transform: scale(var(--wm-ui-scale, 1));
      transform-origin: top center;
      width: calc(100% / var(--wm-ui-scale, 1));
    }
  }

  .wm-app {
    width: 100%;
    padding: 16px 10px 36px;
  }

  .wm-header {
    margin-bottom: 20px;
  }

  .wm-header h1 {
    font-size: clamp(1.65rem, 7.5vw, 2.2rem);
    line-height: 1.1;
  }

  .wm-sub {
    font-size: clamp(1rem, 4.2vw, 1.2rem);
    line-height: 1.35;
  }

  .wm-panel {
    padding: clamp(22px, 6vw, 30px) clamp(16px, 4.5vw, 22px);
    border-radius: 18px;
  }

  .wm-panel h2 {
    font-size: clamp(1.45rem, 6.5vw, 1.85rem);
    margin-bottom: 14px;
  }

  .wm-access-message {
    font-size: clamp(1.05rem, 4.6vw, 1.25rem);
    line-height: 1.5;
    margin-bottom: 20px;
  }

  .wm-access-actions .wm-btn {
    width: 100%;
    max-width: 320px;
    min-height: 50px;
    font-size: clamp(1rem, 4.4vw, 1.15rem);
  }

  .wm-btn {
    min-height: 50px;
    font-size: clamp(1rem, 4.2vw, 1.12rem);
  }

  .wm-timer {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .wm-goal-area {
    min-height: clamp(240px, 64vw, 360px);
  }

  .wm-goal {
    max-width: min(92%, 320px);
  }

  .wm-rules-summary-title {
    font-size: clamp(0.95rem, 4vw, 1.1rem);
  }

  .wm-rules-body p {
    font-size: clamp(0.88rem, 3.8vw, 1rem);
    line-height: 1.45;
  }
}

@media (max-width: 360px) {
  .wm-actions {
    flex-direction: column;
  }

  .wm-power-bar {
    height: 170px;
  }

  .wm-goal-area {
    min-height: 230px;
  }
}

/* --- 0.30/0.31: Viewport + Mobile Login (nur Gast) --- */
@media screen and (max-width: 768px) {
  .wm-elfmeter-page.wm-guest-view.wm-standalone {
    padding: 10px;
    width: 100% !important;
    box-sizing: border-box;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .wm-elfmeter-page.wm-guest-view .wm-app {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
  }

  #screen-access .wm-panel-center {
    width: 100% !important;
    max-width: 480px;
    margin: 20px auto;
    padding: 25px 20px !important;
    box-sizing: border-box;
  }

  #screen-access h2 {
    font-size: 24px !important;
    margin-bottom: 15px;
  }

  .wm-elfmeter-page.wm-guest-view .wm-access-message {
    font-size: 16px !important;
    line-height: 1.4;
    margin-bottom: 20px;
  }

  .wm-elfmeter-page.wm-guest-view .wm-access-actions .wm-btn-primary {
    display: block !important;
    width: 100% !important;
    padding: 15px 20px !important;
    font-size: 18px !important;
    text-align: center;
    box-sizing: border-box;
    min-height: 50px;
  }

  .wm-elfmeter-page.wm-guest-view .wm-header h1 {
    font-size: 1.75rem !important;
  }

  .wm-elfmeter-page.wm-guest-view .wm-sub {
    font-size: 1rem !important;
  }
}

/* --- 0.31: Hochformat-Spiel (eingeloggt) --- */
@media screen and (max-width: 768px) and (orientation: portrait) {
  .wm-elfmeter-page.wm-game-view {
    padding: 4px 8px calc(12px + env(safe-area-inset-bottom, 0px));
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .wm-elfmeter-page.wm-game-view.is-portrait,
  .wm-elfmeter-page.wm-game-view.is-portrait.is-mobile-scale {
    zoom: 1 !important;
  }

  .wm-elfmeter-page.wm-game-view .wm-app {
    width: 100%;
    max-width: 100%;
    padding: 8px 6px 20px;
  }

  .wm-elfmeter-page.wm-game-view .wm-header {
    margin-bottom: 10px;
  }

  .wm-elfmeter-page.wm-game-view .wm-header h1 {
    font-size: 1.35rem;
    margin-bottom: 4px;
  }

  .wm-elfmeter-page.wm-game-view .wm-sub {
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .wm-elfmeter-page.wm-game-view .wm-demo-bar {
    margin-top: 8px;
    gap: 4px;
  }

  .wm-elfmeter-page.wm-game-view .wm-demo-switch-label {
    font-size: 0.8rem;
  }

  #screen-play .wm-pitch {
    padding: 10px;
  }

  #screen-play .wm-scoreboard-compact {
    margin-bottom: 8px;
    font-size: 0.85rem;
  }

  #screen-play .wm-field-row {
    flex-direction: column;
    gap: 8px;
  }

  #screen-play .wm-goal-area {
    min-height: 38vh;
    max-height: 44vh;
    width: 100%;
  }

  #screen-play .wm-goal {
    max-width: 92%;
    height: clamp(100px, 22vh, 140px);
  }

  #screen-play .wm-power-col {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label value"
      "bar bar"
      "hint hint";
    gap: 6px 10px;
    padding: 4px 2px 0;
    align-items: center;
  }

  #screen-play .wm-power-label {
    grid-area: label;
    justify-self: start;
  }

  #screen-play .wm-power-value {
    grid-area: value;
    justify-self: end;
  }

  #screen-play .wm-power-bar {
    grid-area: bar;
  }

  #screen-play .wm-power-hint {
    grid-area: hint;
    text-align: center;
  }

  #screen-play .wm-power-label,
  #screen-play .wm-power-hint,
  #screen-play .wm-power-value {
    font-size: 0.78rem;
  }

  #screen-play .wm-power-bar.is-horizontal {
    width: 100%;
    height: 34px;
  }

  #screen-play .wm-phase-text {
    font-size: 0.82rem;
    margin: 8px 0 6px;
    line-height: 1.35;
    text-align: center;
  }

  #screen-play .wm-actions {
    gap: 8px;
  }

  #screen-play .wm-btn {
    min-height: 44px;
    font-size: 0.95rem;
    padding: 10px 14px;
  }

  #screen-play .wm-btn-save {
    flex: 1;
    min-width: 0;
  }
}

/* Querformat Handy: leichtes Scale erlaubt */
@media screen and (max-width: 768px) {
  #screen-play .wm-play-stack {
    flex-direction: column;
    gap: 8px;
  }

  #screen-play .wm-power-col {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label value"
      "bar bar"
      "hint hint";
    gap: 6px 10px;
    padding: 8px 4px 0;
    align-items: center;
  }

  #screen-play .wm-power-label {
    grid-area: label;
    justify-self: start;
  }

  #screen-play .wm-power-value {
    grid-area: value;
    justify-self: end;
  }

  #screen-play .wm-power-bar {
    grid-area: bar;
  }

  #screen-play .wm-power-hint {
    grid-area: hint;
    text-align: center;
  }

  #screen-play .wm-power-bar.is-horizontal {
    width: 100%;
    height: 34px;
  }

  #screen-play .wm-goal-area {
    touch-action: none;
  }
}

@media screen and (max-width: 900px) and (orientation: landscape) {
  .wm-elfmeter-page.wm-game-view .wm-app {
    max-width: 520px;
  }

  #screen-play .wm-goal-area {
    min-height: 52vh;
  }

  #screen-play .wm-power-bar {
    height: 150px;
  }
}
