* { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 0;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  font-family: system-ui, -apple-system, sans-serif;
  background: #0d0d10;
  color: #e0e0e0;
  min-height: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Menüleiste */
.menu-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  padding-top: calc(8px + env(safe-area-inset-top));
  background: #1a1a1e;
  border-bottom: 1px solid #333;
}
.menu-left, .menu-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.menu-left { flex: 1; min-width: 0; overflow: visible; }
.menu-stats-wrap { overflow: visible; }
.menu-stats-more { flex-shrink: 0; }
.logo { display: inline-block; height: 32px; line-height: 0; flex-shrink: 0; }
.logo .logo-svg { height: 32px; width: auto; display: block; vertical-align: top; }
.btn-lang {
  padding: 6px 10px;
  min-height: 36px;
  font-size: 12px;
  font-weight: 600;
  background: #2a2a30;
  color: #1E88E5;
  border: 1px solid #444;
  border-radius: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-lang:hover { background: #333; }
.menu-label { font-size: 11px; color: #9aa; margin-right: 2px; flex-shrink: 0; }
.menu-value {
  font-size: 12px;
  font-weight: 600;
  color: #1E88E5;
  margin-right: 10px;
  width: 5ch;
  min-width: 5ch;
  display: inline-block;
  text-align: right;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Stats-Bereich: Grundinfos + Pfeil + erweiterte Infos */
.menu-stats-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  margin-left: 4px;
}
.menu-stats-basic {
  display: flex;
  align-items: center;
  gap: 10px;
}
.menu-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: background 0.2s, border-color 0.2s;
}
.menu-stat-pill:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}
.menu-stat-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a8a9a;
}
.menu-stat-value {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #1E88E5;
  min-width: 2.5ch;
  text-align: right;
}
.menu-stats-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 6px;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #9aa;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.menu-stats-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e0e0e0;
}
.menu-stats-toggle .menu-stats-chevron {
  transition: transform 0.25s ease;
  /* Geschlossen: Pfeil nach rechts (Infos aufklappen) */
}
.menu-stats-toggle-open .menu-stats-chevron {
  transform: rotate(180deg); /* Offen: Pfeil nach links (Infos zuklappen) */
}
.menu-stats-more {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 0.35s ease, opacity 0.25s ease, padding 0.25s ease, margin 0.25s ease;
  flex-wrap: nowrap;
}
.menu-stats-more[aria-hidden="false"] {
  max-width: min(800px, calc(100vw - 260px));
  opacity: 1;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox: Scrollbar ausblenden */
  -ms-overflow-style: none; /* IE/Edge: Scrollbar ausblenden */
}
.menu-stats-more[aria-hidden="false"]::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera: Scrollbar ausblenden */
}
.menu-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.menu-stat-item .menu-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7a7a8a;
}
.menu-stat-item .menu-stat-value {
  font-size: 12px;
  font-weight: 600;
  min-width: 4ch;
  text-align: right;
}
.menu-stat-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.menu-right button {
  padding: 8px 12px;
  min-height: 36px;
  font-size: 12px;
  background: #2a2a30;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-right button:hover { background: #333; }
.menu-right button.btn-settings { background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%); color: #fff; border-color: #7c3aed; }
.menu-right button.btn-settings:hover { background: linear-gradient(180deg, #a78bfa 0%, #8b5cf6 100%); color: #fff; border-color: #8b5cf6; }
.menu-placeholder {
  display: inline-block;
  width: 6px;
  height: 20px;
  background: #444;
  border-radius: 3px;
  flex-shrink: 0;
}
.leaderboard-list { padding: 12px; max-height: 60vh; overflow-y: auto; }
.leaderboard-list table { width: 100%; border-collapse: collapse; }
.leaderboard-list th, .leaderboard-list td { padding: 8px 12px; text-align: left; border-bottom: 1px solid #333; }
.leaderboard-list th { color: #9aa; font-weight: 600; }
.leaderboard-list tr:hover { background: rgba(255,255,255,0.05); }
.leaderboard-avatar-cell { width: 1px; padding-right: 4px; vertical-align: middle; }
.leaderboard-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: #2a2a30; flex-shrink: 0; }
.leaderboard-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.leaderboard-avatar-placeholder { filter: grayscale(1); opacity: 0.7; }
.leaderboard-player { display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; margin: -4px 0; background: none; border: none; color: inherit; font: inherit; cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent; }
.leaderboard-player:hover { color: #1E88E5; text-decoration: underline; }
.leaderboard-player.leaderboard-avatar-only { padding: 0; margin: 0; }
.highscores-single { background: #16161a; border: 1px solid #2a2a30; border-radius: 8px; padding: 14px; }
.highscores-single p { margin: 0 0 6px 0; font-size: 13px; color: #c0c0c0; }
.highscores-single p:last-child { margin-bottom: 0; }
.highscores-single strong { color: #1E88E5; }
.profile-multiplayer-placeholder { margin: 0; font-size: 13px; color: #9aa; }
.player-profile-body .player-profile-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.player-profile-avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #2a2a30; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.player-profile-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.player-profile-avatar-placeholder { filter: grayscale(1); opacity: 0.7; }
.player-profile-name { font-size: 18px; font-weight: 600; color: #e0e0e0; }
.profile-check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; cursor: pointer; }
.profile-check input { width: 18px; height: 18px; }
/* Game-Over-Popup: klar, schön, Preis nicht änderbar (fest im Markup) */
.popup-box.popup-gameover {
  max-width: 420px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
}
.popup-gameover .gameover-header {
  text-align: center;
  padding: 28px 24px 20px;
  background: linear-gradient(180deg, rgba(220, 50, 50, 0.12) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.popup-gameover .gameover-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
  filter: grayscale(0.2);
}
.popup-gameover .gameover-title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.popup-gameover .gameover-subtitle {
  margin: 0;
  font-size: 15px;
  color: #b0b0b0;
  line-height: 1.4;
}
.popup-gameover .gameover-body {
  padding: 24px;
}
.popup-gameover .gameover-actions {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.btn-gameover-new {
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  background: #2a2a30;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-gameover-new:hover {
  background: #333;
  border-color: #555;
}
.popup-gameover .gameover-pay-card {
  background: #16161a;
  border: 1px solid #2a2a30;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.popup-gameover .gameover-pay-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.popup-gameover .gameover-pay-title {
  font-size: 15px;
  font-weight: 600;
  color: #e0e0e0;
}
.popup-gameover .gameover-price-block {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.popup-gameover .gameover-price-old {
  display: none;
  align-items: center;
}
.popup-gameover .gameover-price-old.gameover-price-old-visible {
  display: inline-flex;
}
.popup-gameover .gameover-price-strike {
  font-size: 1rem;
  font-weight: 600;
  color: #888;
  text-decoration: line-through;
}
.popup-gameover .gameover-price {
  display: inline-block;
  padding: 6px 14px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 8px;
  user-select: none;
  pointer-events: none;
}
.popup-gameover .gameover-price-old-visible + .gameover-price {
  color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}
.popup-gameover .gameover-pay-desc {
  margin: 0 0 16px;
  font-size: 12px;
  color: #8a8a9a;
  line-height: 1.45;
}
.popup-gameover .btn-paypal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, #0070ba 0%, #003087 100%);
  border: 1px solid #001c64;
  border-radius: 12px;
  cursor: pointer;
  transition: filter 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0, 112, 186, 0.4);
}
.popup-gameover .btn-paypal:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 16px rgba(0, 112, 186, 0.45);
}
.popup-gameover .btn-paypal-icon {
  font-family: "PayPal Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
}
.popup-gameover .gameover-promo-msg {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #86efac;
}
.popup-gameover .gameover-promo-msg.gameover-promo-hidden {
  display: none;
}
.map-overlay-gameover { position: absolute; inset: 0; z-index: 5; pointer-events: none; background: transparent; opacity: 0; transition: opacity 0.2s; }
.map-overlay-gameover.active { opacity: 1; background: rgba(0,0,0,0.75); pointer-events: auto; }

/* ========== Shop – 10000% Premium (Publisher-Level) ========== */
@keyframes shopBorderGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}
@keyframes shopHeroShine {
  0% { opacity: 0.4; }
  50% { opacity: 0.7; }
  100% { opacity: 0.4; }
}
@keyframes shopCardPulse {
  0%, 100% { box-shadow: 0 0 28px rgba(180, 120, 255, 0.35), inset 0 1px 0 rgba(180, 140, 255, 0.2); }
  50% { box-shadow: 0 0 36px rgba(180, 120, 255, 0.5), inset 0 1px 0 rgba(200, 160, 255, 0.25); }
}
@keyframes shopBtnShine {
  0% { transform: translateX(-100%) skewX(-12deg); }
  100% { transform: translateX(200%) skewX(-12deg); }
}

.popup-shop .popup-box {
  max-width: 1440px;
  width: 94vw;
  max-height: 90vh;
  position: relative;
  overflow: visible;
  flex-direction: column;
  align-items: stretch;
  border: none;
  box-shadow: none;
}
.popup-shop .shop-bg {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.popup-shop .shop-bg-glow {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(160, 100, 255, 0.28) 0%, rgba(120, 60, 200, 0.12) 40%, transparent 70%);
  animation: shopHeroShine 4s ease-in-out infinite;
}
.popup-shop .shop-bg-mesh {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, transparent 0%, rgba(180, 140, 255, 0.04) 50%, transparent 100%),
    linear-gradient(255deg, transparent 0%, rgba(120, 80, 200, 0.06) 50%, transparent 100%),
    linear-gradient(180deg, rgba(30, 18, 48, 0.97) 0%, rgba(20, 12, 35, 0.99) 100%);
}
.popup-shop .shop-bg-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.popup-shop .shop-border-wrap {
  position: relative;
  z-index: 1;
  padding: 2px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(200, 160, 255, 0.55) 0%, rgba(140, 90, 220, 0.35) 25%, rgba(100, 60, 180, 0.25) 50%, rgba(160, 120, 255, 0.45) 100%);
  box-shadow:
    0 0 0 1px rgba(140, 100, 220, 0.25),
    0 0 60px rgba(140, 80, 255, 0.2),
    0 20px 60px rgba(0,0,0,0.5);
  animation: shopBorderGlow 3s ease-in-out infinite;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.popup-shop .shop-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(28, 18, 42, 0.6) 0%, rgba(18, 12, 28, 0.95) 100%);
  box-shadow: inset 0 0 0 1px rgba(120, 80, 200, 0.2);
}

/* Hero-Header: links Hero-Box, rechts Guthaben + Tabs (Tabs unten bündig mit Hero) */
.popup-shop .shop-header {
  flex-shrink: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
.popup-shop .shop-hero {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 24px 16px;
  background: linear-gradient(160deg, rgba(100, 60, 180, 0.4) 0%, rgba(60, 35, 120, 0.5) 50%, rgba(40, 22, 80, 0.6) 100%);
  border-bottom: 1px solid rgba(200, 160, 255, 0.25);
  border-right: 1px solid rgba(200, 160, 255, 0.25);
}
.popup-shop .shop-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.popup-shop .shop-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff 0%, #e8dcff 35%, #c8b0ff 70%, #a080ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(180, 140, 255, 0.4));
}
.popup-shop .shop-tagline {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(220, 200, 255, 0.75);
}
.popup-shop .shop-close {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  color: #e0d0ff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s ease;
}
.popup-shop .shop-close:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
  transform: scale(1.05);
}

/* Rechte Spalte: Guthaben oben zentriert, Tabs unten bündig mit unterer Kante der Hero-Box */
.popup-shop .shop-header-right {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  background: linear-gradient(180deg, rgba(30, 20, 50, 0.9) 0%, rgba(22, 14, 38, 0.95) 100%);
  border-bottom: 1px solid rgba(160, 120, 255, 0.15);
}
.popup-shop .shop-balance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px 6px;
  font-size: 13px;
  color: rgba(220, 200, 255, 0.9);
}
.popup-shop .shop-balance-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.popup-shop .shop-balance-logo {
  display: block;
  vertical-align: middle;
}
.popup-shop .shop-balance-label {
  font-weight: 500;
  letter-spacing: 0.03em;
}
.popup-shop .shop-balance-value {
  color: #e8dcff;
  font-weight: 700;
}

/* Tabs – unten bündig mit Hero (kein top-Offset) */
.popup-shop .shop-tabs {
  display: flex;
  gap: 4px;
  padding: 0 20px 0 20px;
  justify-content: flex-start;
  align-items: flex-end;
  min-height: 48px;
  background: transparent;
  border-bottom: none;
  margin-top: auto;
}
.popup-shop .shop-tab {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  padding: 12px 18px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(220, 200, 255, 0.55);
  background: rgba(100, 80, 160, 0.15);
  border: 1px solid rgba(140, 100, 220, 0.2);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s ease;
  position: relative;
  top: 0;
  margin-right: 2px;
}
.popup-shop .shop-tab:hover {
  color: rgba(255, 240, 255, 0.9);
  background: rgba(120, 90, 180, 0.25);
  border-color: rgba(160, 120, 255, 0.3);
}
.popup-shop .shop-tab.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(28, 18, 42, 0.98) 0%, rgba(22, 14, 38, 0.99) 100%);
  border-color: rgba(160, 120, 255, 0.25);
  border-bottom: 1px solid transparent;
  padding-bottom: 15px;
  margin-bottom: -1px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.2), inset 0 1px 0 rgba(160, 120, 255, 0.15);
}

/* Content */
.popup-shop .shop-popup-body {
  padding: 28px 24px 24px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.popup-shop .shop-panel-desc {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(220, 205, 255, 0.85);
  letter-spacing: 0.02em;
}
.popup-shop .shop-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* Karten – Gradient-Rand, Hover-Lift, Sale-Ribbon */
.popup-shop .shop-tile {
  position: relative;
  padding: 20px;
  background: linear-gradient(155deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}
.popup-shop .shop-tile::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(200, 160, 255, 0.4), transparent 40%, transparent 60%, rgba(160, 120, 255, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.popup-shop .shop-tile:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(200, 160, 255, 0.2);
  border-color: rgba(200, 160, 255, 0.35);
}
.popup-shop .shop-tile:hover::before { opacity: 1; }
.popup-shop .shop-tile-sale {
  border-color: rgba(220, 180, 255, 0.5);
  background: linear-gradient(155deg, rgba(160, 100, 255, 0.25) 0%, rgba(100, 60, 180, 0.2) 100%);
  box-shadow: 0 0 28px rgba(180, 120, 255, 0.35), inset 0 1px 0 rgba(180, 140, 255, 0.2);
  animation: shopCardPulse 2.5s ease-in-out infinite;
}
.popup-shop .shop-tile-sale::after {
  content: 'SALE';
  position: absolute;
  top: 12px;
  right: -28px;
  padding: 4px 32px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #fff;
  background: linear-gradient(90deg, #d4785c, #e89b7a);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transform: rotate(45deg);
}
.popup-shop .shop-tile-sale:hover {
  box-shadow: 0 14px 44px rgba(0,0,0,0.45), 0 0 40px rgba(180, 120, 255, 0.4);
}
.popup-shop .shop-tile-title {
  font-weight: 700;
  font-size: 16px;
  color: #f5eeff;
  letter-spacing: 0.02em;
}
.popup-shop .shop-tile-migs { font-size: 13px; color: #c8b0ff; font-weight: 600; }
.popup-shop .shop-tile-price-block { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.popup-shop .shop-tile-price-old { text-decoration: line-through; color: #8a7aaa; font-size: 13px; }
.popup-shop .shop-tile-price {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 16px rgba(200, 180, 255, 0.35);
}
.popup-shop .shop-tile-timer { font-size: 11px; color: #c8b0ff; font-weight: 700; letter-spacing: 0.05em; }
.popup-shop .shop-tile-btn {
  position: relative;
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(145deg, #8b6bc5 0%, #6b4ba5 40%, #5a3d90 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 20px rgba(90, 60, 140, 0.5), inset 0 1px 0 rgba(180, 160, 255, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  overflow: hidden;
}
.popup-shop .shop-tile-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: translateX(-100%) skewX(-12deg);
  transition: none;
}
.popup-shop .shop-tile-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(90, 60, 140, 0.6), inset 0 1px 0 rgba(200, 180, 255, 0.3);
  filter: brightness(1.1);
}
.popup-shop .shop-tile-btn:hover::after {
  animation: shopBtnShine 0.6s ease-out;
}
.popup-shop .shop-tile-btn .btn-paypal-icon { font-family: "PayPal Sans", "Helvetica Neue", Arial, sans-serif; font-weight: 700; }
.popup-shop .shop-tiles-empty { margin: 0; color: #a090c0; font-size: 14px; }

.shop-panel { display: none; }
.shop-panel[aria-hidden="false"] { display: block; }
.popup-shop .shop-tile-sub { font-size: 12px; color: #b0a0d0; margin-bottom: 8px; }

/* Footer */
.popup-shop .shop-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 0;
  margin-top: 12px;
  border-top: 1px solid rgba(160, 120, 255, 0.2);
}
.popup-shop .shop-footer-icon { font-size: 14px; opacity: 0.8; }
.popup-shop .shop-footer-hint {
  font-size: 12px;
  color: rgba(180, 160, 220, 0.8);
  letter-spacing: 0.04em;
}

/* Sandbox Premium-Overlay (lila Schleier) */
#settingsBodyWrap { position: relative; }
.sandbox-premium-overlay {
  position: absolute;
  inset: 0;
  background: rgba(100, 60, 140, 0.85);
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}
.sandbox-premium-overlay.visible { display: flex; }
.sandbox-premium-overlay[aria-hidden="false"] { display: flex; }
.sandbox-premium-overlay[aria-hidden="true"] { display: none; }
.sandbox-premium-overlay-inner {
  max-width: 320px;
  text-align: center;
  color: #fff;
}
.sandbox-premium-title { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.sandbox-premium-desc { font-size: 14px; line-height: 1.5; margin: 0 0 20px; opacity: 0.95; }
.btn-sandbox-premium {
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #e89b7a 0%, #d4785c 100%);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.btn-sandbox-premium:hover { filter: brightness(1.08); }

/* Karte: gleiche Helligkeit wie Menüleiste (#1a1a1e), Abdunklung nur bei Game-Over-Overlay */
.map-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 8px;
  background: #1a1a1e;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  min-height: 120px;
}
.map-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #1a1a1e;
}
.btn-info {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 11;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #444;
  background: rgba(30, 136, 229, 0.9);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  font-family: system-ui, sans-serif;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.btn-info:hover {
  background: #1E88E5;
  border-color: #5eb;
}
.zoom-controls {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.7);
  border: 1px solid #444;
  border-radius: 6px;
  z-index: 10;
}
.zoom-controls button {
  width: 32px;
  height: 28px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  background: #2a2a30;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.zoom-controls button:hover { background: #333; }
.zoom-controls #zoomLevel {
  min-width: 42px;
  font-size: 12px;
  text-align: center;
  color: #9aa;
}
.zoom-controls #btnZoomReset {
  width: auto;
  padding: 4px 8px;
  font-size: 11px;
  margin-left: 4px;
}

/* Popup Live-Konsole */
.popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.popup[aria-hidden="false"].popup-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}
.popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  cursor: pointer;
}
.popup-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  background: #1a1a1e;
  border: 1px solid #444;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s;
}
.popup-box.popup-dragging { box-shadow: 0 12px 40px rgba(0,0,0,0.6); }
.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}
.popup-drag-handle {
  cursor: move;
  user-select: none;
}
.popup-drag-handle:active { cursor: grabbing; }
.popup-box.popup-dragging .popup-drag-handle { cursor: grabbing; }
.popup-header h2 { margin: 0; font-size: 1.1rem; }
.popup-close {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  background: transparent;
  border: none;
  color: #9aa;
  cursor: pointer;
  border-radius: 4px;
}
.popup-close:hover { color: #fff; background: #333; }

/* Codes-Popup (groß) */
.popup-codes { max-width: 680px; max-height: 90vh; }
.popup-codes .codes-popup-body { padding: 16px; overflow-y: auto; flex: 1; min-height: 0; }
.btn-codes-list {
  display: block;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 600;
  background: #2a2a30;
  color: #1E88E5;
  border: 1px solid #444;
  border-radius: 8px;
  cursor: pointer;
}
.btn-codes-list:hover { background: #333; border-color: #555; }
.codes-form h3 { margin: 0 0 12px 0; font-size: 14px; color: #e0e0e0; }
.codes-form h4 { margin: 12px 0 8px 0; font-size: 12px; color: #9aa; font-weight: 600; }
.codes-form-section { margin-bottom: 16px; }
.codes-form-row { margin-bottom: 10px; }
.codes-form-row label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.codes-form-row input[type="text"],
.codes-form-row input[type="number"],
.codes-form-row input[type="datetime-local"] { min-width: 120px; padding: 6px 10px; background: #25252a; border: 1px solid #444; border-radius: 6px; color: #e0e0e0; }
.codes-form-inline { display: flex; flex-wrap: wrap; gap: 16px; }
.codes-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 16px; }
.codes-form-grid label { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.codes-form-grid input { width: 56px; padding: 4px 8px; background: #25252a; border: 1px solid #444; border-radius: 4px; color: #e0e0e0; }
.codes-form-actions { margin-top: 16px; }
.codes-form-actions button { padding: 10px 20px; font-size: 13px; font-weight: 600; background: #1E88E5; color: #fff; border: none; border-radius: 8px; cursor: pointer; }
.codes-form-actions button:hover { background: #1565C0; }

/* Rabattcodes-Liste-Popup */
.popup-codes-list { max-width: 520px; max-height: 85vh; }
.codes-list-body { padding: 16px; overflow-y: auto; flex: 1; min-height: 0; }
.codes-list-loading { margin: 0 0 12px 0; color: #9aa; font-size: 13px; }
.codes-list-ul { list-style: none; margin: 0; padding: 0; }
.codes-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #25252a;
  border: 1px solid #333;
  border-radius: 8px;
  flex-wrap: wrap;
}
.codes-list-code { font-weight: 600; color: #1E88E5; min-width: 120px; }
.codes-list-redemptions { font-size: 12px; color: #8a8a9a; }
.codes-list-switch-wrap { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #9aa; }
.codes-list-switch-wrap input { width: 18px; height: 18px; cursor: pointer; }
.codes-list-delete { margin-left: auto; padding: 6px 12px; font-size: 12px; background: #dc3232; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.codes-list-delete:hover { background: #b52a2a; }
.codes-list-empty { padding: 12px; color: #8a8a9a; font-size: 13px; }

/* Admin: Shopitems-Popup – gleiches Lila-Design wie Shop */
.popup-shop-items .popup-box { max-width: 1260px; max-height: 90vh; }

/* Header + Tabs als eine schicke Einheit: linker Hero und Tabs fließend verbunden */
.popup-shop-items .shop-header {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex-shrink: 0;
  padding: 0;
  border-bottom: 1px solid rgba(160, 120, 255, 0.22);
  min-height: 72px;
}
.popup-shop-items .shop-hero {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 260px;
  padding: 16px 20px 16px 24px;
  border-bottom: none;
  border-radius: 18px 0 0 0;
  background: linear-gradient(160deg, rgba(100, 60, 180, 0.42) 0%, rgba(65, 38, 130, 0.5) 50%, rgba(45, 25, 90, 0.58) 100%);
  box-shadow: inset 0 1px 0 rgba(200, 160, 255, 0.12);
}
.popup-shop-items .shop-tabs {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 0 24px 0 16px;
  min-height: 0;
  border-bottom: none;
  border-radius: 0 18px 0 0;
  background: linear-gradient(90deg, rgba(75, 48, 135, 0.48) 0%, rgba(50, 32, 95, 0.65) 35%, rgba(32, 20, 55, 0.88) 100%);
  box-shadow: inset 1px 0 0 rgba(160, 120, 255, 0.12);
}
.popup-shop-items .shop-tab {
  position: relative;
  top: 0;
  margin-right: 0;
  margin-bottom: 0;
  min-width: 72px;
  padding: 10px 14px 12px;
  border-radius: 8px 8px 0 0;
  border: 1px solid rgba(140, 100, 220, 0.25);
  border-bottom: none;
  background: rgba(80, 55, 130, 0.35);
  color: rgba(220, 200, 255, 0.6);
  flex-shrink: 0;
}
.popup-shop-items .shop-tab:hover {
  background: rgba(95, 70, 150, 0.45);
  color: rgba(255, 240, 255, 0.9);
  border-color: rgba(160, 120, 255, 0.35);
}
.popup-shop-items .shop-tab.active {
  padding-bottom: 13px;
  margin-bottom: -1px;
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(28, 18, 42, 0.98) 0%, rgba(22, 14, 38, 0.99) 100%);
  border-color: rgba(180, 140, 255, 0.35);
  color: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.15), inset 0 1px 0 rgba(180, 140, 255, 0.12);
}
.popup-shop-items .shop-tagline {
  margin: 6px 0 0;
}

.popup-shop-items .shop-items-body { padding: 28px 24px 24px; }

.popup-shop-items .shop-item-form {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(160, 120, 255, 0.2);
}
.popup-shop-items .shop-items-form-title,
.popup-shop-items .shop-items-list-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: #e8e0ff;
  letter-spacing: 0.02em;
}

/* Hauptzeile: Typ, Name, Preis, Aktionspreis, Aktion bis, Reihenfolge in einer Linie */
.popup-shop-items .shop-item-form-main-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

/* Feld-Boxen wie Menüleiste: farbig, Label + Feld in einer Box */
.popup-shop-items .shop-items-field-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(60, 40, 100, 0.35);
  border: 1px solid rgba(160, 120, 255, 0.3);
  border-radius: 8px;
  transition: background 0.2s, border-color 0.2s;
}
.popup-shop-items .shop-items-field-box:hover {
  background: rgba(70, 50, 120, 0.45);
  border-color: rgba(180, 140, 255, 0.4);
}
.popup-shop-items .shop-items-field-box label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: rgba(220, 205, 255, 0.95);
}
.popup-shop-items .shop-items-field-box label span {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(200, 180, 255, 0.9);
}
.popup-shop-items .shop-items-field-box input[type="text"],
.popup-shop-items .shop-items-field-box input[type="number"],
.popup-shop-items .shop-items-field-box input[type="datetime-local"],
.popup-shop-items .shop-items-field-box select {
  min-width: 72px;
  width: auto;
  height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(30, 20, 50, 0.8);
  border: 1px solid rgba(140, 100, 220, 0.35);
  border-radius: 6px;
  color: #f0e8ff;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.popup-shop-items .shop-items-field-box input[type="text"] { min-width: 120px; }
.popup-shop-items .shop-items-field-box input[type="datetime-local"] { min-width: 140px; }
.popup-shop-items .shop-items-field-box input::placeholder { color: rgba(180, 160, 220, 0.5); }
.popup-shop-items .shop-items-field-box select option { background: #2a2040; color: #e8e0ff; }
.popup-shop-items .shop-items-field-box-wide { display: flex; max-width: 280px; }
.popup-shop-items .shop-items-field-box-wide input { flex: 1; min-width: 0; }
.popup-shop-items .shop-item-form-migs-row { margin-bottom: 14px; }

.popup-shop-items .shop-item-form-row { margin-bottom: 12px; }
.popup-shop-items .shop-item-form-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(220, 205, 255, 0.9);
}
.popup-shop-items .shop-item-form-row label span {
  min-width: 10ch;
  font-weight: 500;
}
.popup-shop-items .shop-item-form-row input[type="text"],
.popup-shop-items .shop-item-form-row input[type="number"],
.popup-shop-items .shop-item-form-row input[type="datetime-local"],
.popup-shop-items .shop-item-form-row select {
  min-width: 140px;
  padding: 8px 12px;
  font-size: 13px;
  background: rgba(40, 28, 60, 0.8);
  border: 1px solid rgba(160, 120, 255, 0.3);
  border-radius: 8px;
  color: #f0e8ff;
  -webkit-tap-highlight-color: transparent;
}
.popup-shop-items .shop-item-form-row input::placeholder { color: rgba(180, 160, 220, 0.5); }
.popup-shop-items .shop-item-form-row select option { background: #2a2040; color: #e8e0ff; }
.popup-shop-items .shop-item-form-inline { display: flex; flex-wrap: wrap; gap: 20px; }
.popup-shop-items .shop-item-form-section h4,
.popup-shop-items .shop-item-section-head {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(200, 180, 255, 0.9);
}
.popup-shop-items .shop-items-rewards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.popup-shop-items .shop-items-rewards-grid .shop-items-field-box { min-width: 100px; }
.popup-shop-items .shop-items-rewards-grid .shop-items-field-box input {
  width: 56px;
  min-width: 56px;
  text-align: right;
}
.popup-shop-items .shop-item-form-actions { margin-top: 20px; }
.popup-shop-items .shop-item-submit-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(145deg, #7a5bb5 0%, #5c4290 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(90, 60, 140, 0.4), inset 0 1px 0 rgba(180, 160, 255, 0.2);
  transition: filter 0.2s, box-shadow 0.2s;
}
.popup-shop-items .shop-item-submit-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(90, 60, 140, 0.5);
}

.popup-shop-items .shop-items-loading { margin: 0 0 12px; font-size: 13px; color: #a090c8; }
.popup-shop-items .shop-items-list-ul { list-style: none; margin: 0; padding: 0; }
.popup-shop-items .shop-items-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: linear-gradient(155deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(160, 120, 255, 0.2);
  border-radius: 10px;
  flex-wrap: wrap;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.popup-shop-items .shop-items-list-item:hover { border-color: rgba(180, 140, 255, 0.35); }
.popup-shop-items .shop-items-list-name { font-weight: 600; color: #f0e8ff; min-width: 140px; }
.popup-shop-items .shop-items-list-price { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.popup-shop-items .shop-items-price-standard { color: #b8a0e8; }
.popup-shop-items .shop-items-price-action { color: #c8f0a0; font-weight: 700; }
.popup-shop-items .shop-items-list-sale-end { font-size: 11px; color: #a090c8; }
.popup-shop-items .shop-items-list-switch { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #b8a8d0; }
.popup-shop-items .shop-items-list-switch input { width: 18px; height: 18px; cursor: pointer; accent-color: #8b6bc5; }
.popup-shop-items .shop-items-list-delete {
  margin-left: auto;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(200, 80, 80, 0.9);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: filter 0.2s;
}
.popup-shop-items .shop-items-list-delete:hover { filter: brightness(1.15); }
.popup-shop-items .shop-items-list-empty { padding: 14px; color: #9a8ab8; font-size: 13px; }

/* Mig-Auswahl-Popup (Mitte, kleine Kacheln mit Emojis) */
.popup-mig-select { max-width: 280px; }
.popup-mig-select-header { justify-content: flex-end; border-bottom: none; padding: 8px 8px 0 0; }
.popup-mig-select-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px;
}
.mig-select-tile {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: #25252a;
  border: 1px solid #fff;
  border-radius: 8px;
  cursor: pointer;
  color: inherit;
}
.mig-select-tile:hover { background: #333; }

/* Info / Anleitung Popup */
.popup-info { max-width: 440px; max-height: 85vh; }
.info-body { padding: 16px; overflow-y: auto; }
.info-section { margin-bottom: 18px; }
.info-section:last-child { margin-bottom: 0; }
.info-section h3 { margin: 0 0 10px 0; font-size: 14px; color: #1E88E5; }
.info-section p { margin: 0; font-size: 13px; line-height: 1.5; color: #c0c0c0; }
.info-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 16px; }
.info-legend li { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #b0b0b0; }
.legend-swatch { display: inline-block; width: 20px; height: 20px; border-radius: 4px; border: 1px solid #444; flex-shrink: 0; }
.info-tools-list { margin: 0 0 10px 0; padding-left: 20px; color: #c0c0c0; font-size: 13px; line-height: 1.6; }
.info-tools-list li { margin-bottom: 6px; }
.info-tools-list strong { color: #9cc; }

/* Aufgaben-Menü (schwebend unten Mitte) – modernes Glass-Design */
.task-bar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  padding: 8px 6px 8px 16px;
  background: linear-gradient(145deg, rgba(28, 28, 34, 0.92) 0%, rgba(22, 22, 28, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 0, 0, 0.2) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.task-bar-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 12px;
  margin-right: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.task-bar-select,
.task-bar-speed {
  display: flex;
  align-items: center;
  gap: 2px;
}
.task-arrow {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  color: #9aa;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.task-arrow:hover { color: #e0e0e0; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.1); }
.task-label-wrap {
  font-size: 12px;
  color: #9aa;
  padding: 0 12px;
  min-width: 130px;
  text-align: center;
}
.task-display { color: #e8e8ec; font-weight: 600; }
.btn-task-play, .btn-task-reset {
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.btn-task-play:active, .btn-task-reset:active { transform: scale(0.96); }
.btn-task-play {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.45);
}
.btn-task-play:hover { filter: brightness(1.12); box-shadow: 0 4px 16px rgba(34, 197, 94, 0.5); }
.btn-task-play:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
.btn-task-reset {
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(220, 38, 38, 0.4);
}
.btn-task-reset:hover { filter: brightness(1.1); box-shadow: 0 4px 16px rgba(220, 38, 38, 0.5); }

/* Reset-Bestätigung (Schieberegler 3 Sek halten) */
.popup-reset-confirm { max-width: 420px; }
.reset-confirm-body { padding: 16px; }
.reset-confirm-warning { font-size: 13px; line-height: 1.5; color: #c0c0c0; margin: 0 0 16px 0; }
.reset-confirm-slider-label { font-size: 12px; color: #9aa; margin: 0 0 12px 0; }
.reset-confirm-slider-wrap { position: relative; margin-bottom: 12px; }
.reset-confirm-slider-track {
  height: 40px;
  background: #2a2a30;
  border-radius: 20px;
  border: 1px solid #444;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.reset-confirm-slider-thumb {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  pointer-events: none;
  transition: left 0.08s ease-out;
}
.reset-confirm-slider-thumb.holding { transition: none; }
.reset-confirm-hold-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: rgba(220, 38, 38, 0.25);
  border-radius: 20px 0 0 20px;
  pointer-events: none;
  transition: width 0.1s linear;
}
.reset-confirm-hold-hint { font-size: 12px; color: #9aa; margin: 0; min-height: 1.2em; }

/* Einstellungs-Modal */
.popup-settings { max-width: 560px; max-height: 90vh; }
.settings-body { overflow-y: auto; padding: 16px; flex: 1; min-height: 0; }
.settings-mode-toggle { display: flex; gap: 0; margin-bottom: 16px; background: #222; border-radius: 8px; padding: 3px; }
.mode-btn { flex: 1; padding: 8px 16px; font-size: 13px; font-weight: 500; background: transparent; color: #9aa; border: none; border-radius: 6px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.mode-btn:hover { color: #e0e0e0; }
.mode-btn.active { background: #1E88E5; color: #fff; }
.settings-card { background: #16161a; border: 1px solid #2a2a30; border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; }
.settings-card h3 { margin: 0 0 10px 0; font-size: 13px; font-weight: 600; color: #1E88E5; }
.settings-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 8px; }
.settings-row:last-child { margin-bottom: 0; }
.settings-row label { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.settings-row label span { min-width: 100px; color: #b0b0b0; }
.settings-row input[type="number"], .settings-row input[type="text"], .settings-row select { width: 72px; padding: 6px 8px; font-size: 12px; background: #1a1a1e; border: 1px solid #333; border-radius: 6px; color: #e0e0e0; }
  .settings-row select.settings-select-wide { width: auto; min-width: 200px; max-width: 280px; }
  .settings-row input[type="checkbox"] { width: auto; }
.settings-advanced-sub { margin-top: 6px; }
.settings-hint { font-size: 11px; color: #888; margin: 0 0 10px 0; line-height: 1.4; }
.settings-buttons { margin-top: 8px; }
.settings-buttons button { margin-right: 8px; padding: 6px 12px; font-size: 12px; cursor: pointer; background: #2a2a30; color: #e0e0e0; border: 1px solid #444; border-radius: 6px; }
.settings-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 16px; border-top: 1px solid #2a2a30; flex-shrink: 0; background: #16161a; }
.settings-actions button { padding: 8px 14px; font-size: 12px; border-radius: 6px; cursor: pointer; background: #2a2a30; color: #e0e0e0; border: 1px solid #444; }
.settings-actions button:last-child { background: #1565C0; color: #fff; border-color: #1E88E5; }
.settings-actions button:last-child:hover { background: #1E88E5; }
#setSeed { width: 100%; max-width: 100%; padding: 8px; font-family: monospace; font-size: 11px; background: #111; color: #ccc; border: 1px solid #333; border-radius: 6px; margin-bottom: 8px; resize: vertical; }
.settings-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.settings-colors label { display: flex; align-items: center; gap: 8px; margin-bottom: 0; }
.settings-colors label span { min-width: 70px; font-size: 11px; }
.settings-colors input[type="color"] { width: 36px; height: 28px; padding: 2px; border: 1px solid #444; border-radius: 6px; background: #111; cursor: pointer; }
.settings-advanced { display: none; }

/* Map-Editor Popup – füllt die ganze Seite mit Rand */
#editorPopup {
  align-items: stretch;
  justify-content: stretch;
  padding: 20px;
  box-sizing: border-box;
}
#editorPopup .popup-box.popup-editor {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid #444;
  border-radius: 12px;
  overflow: hidden;
  box-sizing: border-box;
}
.popup-editor .popup-header { border-bottom: 1px solid #333; flex-shrink: 0; }
.editor-hint { font-size: 11px; color: #888; margin: 0 16px 8px; padding: 0; flex-shrink: 0; }
.editor-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0 16px 16px;
  background: #0d0d10;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.editor-canvas-wrap {
  aspect-ratio: 400 / 250;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.editor-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: crosshair;
}
.editor-zoom-controls { position: absolute; bottom: 10px; right: 10px; display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: rgba(0,0,0,0.8); border-radius: 8px; border: 1px solid #333; }
.editor-zoom-controls button { width: 32px; height: 28px; padding: 0; font-size: 18px; background: #2a2a30; color: #e0e0e0; border: 1px solid #444; border-radius: 6px; cursor: pointer; }
.editor-zoom-controls #editorZoomLevel { min-width: 42px; font-size: 12px; text-align: center; color: #9aa; }
.editor-zoom-controls #btnEditorZoomReset { width: auto; padding: 4px 8px; font-size: 11px; }
.editor-actions { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #333; flex-shrink: 0; }
.editor-actions button { padding: 8px 14px; font-size: 12px; background: #2a2a30; color: #e0e0e0; border: 1px solid #444; border-radius: 6px; cursor: pointer; }
.editor-actions button:hover { background: #333; }

/* Tablet / kleines Fenster */
@media (max-width: 768px) {
  .menu-bar { padding: 6px 10px; gap: 8px; }
  .menu-left, .menu-right { gap: 6px; }
  .logo { height: 28px; }
  .logo .logo-svg { height: 28px; }
  .menu-value { margin-right: 8px; }
  .map-wrap { margin: 6px; border-radius: 4px; min-height: 100px; }
  .menu-right button { padding: 6px 10px; font-size: 11px; min-height: 40px; }
  .btn-lang { min-height: 40px; }
  .popup { padding: 12px; }
  .popup-box { max-width: 100%; max-height: 85vh; }
}

/* Handy / sehr schmal */
@media (max-width: 480px) {
  .menu-bar { flex-wrap: wrap; padding: 6px 8px; }
  .menu-left { width: 100%; order: 1; justify-content: flex-start; }
  .menu-right { width: 100%; order: 2; justify-content: flex-start; padding-top: 4px; border-top: 1px solid #2a2a30; }
  .menu-sep { display: none; }
  .menu-label { font-size: 10px; }
  .menu-value { font-size: 11px; margin-right: 6px; }
  .logo { height: 26px; }
  .logo .logo-svg { height: 26px; }
  .map-wrap { margin: 4px; border-radius: 4px; min-height: 80px; }
  .menu-right button { flex: 1; min-width: 0; min-height: 44px; font-size: 11px; padding: 10px 6px; }
  .btn-lang { min-height: 44px; padding: 8px 12px; }
  .popup { padding: 8px; align-items: flex-end; }
  .popup-box { max-height: 90vh; border-radius: 12px 12px 0 0; }
  .popup-header { padding: 14px 16px; }
  .popup-close { width: 44px; height: 44px; font-size: 28px; }
}

/* Nur wenn angemeldet sichtbar */
body.guest-mode .auth-required,
body.guest-mode .task-bar-auth { display: none !important; }
body.guest-mode .menu-stats-wrap,
body.guest-mode .zoom-controls { display: none !important; }

/* Login-Popup (Startseite) – nur über der Karte, Menüleiste bleibt sichtbar */
.popup-login {
  position: absolute;
  inset: 0;
  border-radius: 6px;
}
/* Wenn eingeloggt: Login-Popup komplett ausblenden, damit die Karte nicht abgedunkelt wirkt */
#loginPopup[aria-hidden="true"] {
  display: none !important;
}
.popup-login-box { max-width: 400px; }
.login-body { padding: 28px 24px 24px; text-align: center; }
.login-text { margin: 0 0 20px 0; font-size: 14px; line-height: 1.5; color: #b0b0b0; }
.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #5865F2;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, filter 0.2s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.4);
}
.btn-discord:hover { background: #4752c4; filter: brightness(1.05); box-shadow: 0 4px 12px rgba(88, 101, 242, 0.45); }
.btn-discord-icon { flex-shrink: 0; }

/* User-Avatar (links: zwischen migs.space und | Schritte, rund als Kreis) */
.user-avatar-wrap { position: relative; margin-left: 10px; margin-right: 4px; flex-shrink: 0; }
.user-avatar-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  overflow: hidden;
  background: #2a2a30;
  cursor: pointer;
  display: block;
  -webkit-tap-highlight-color: transparent;
  border: 2px solid #444;
  border-radius: 50%;
}
.user-avatar-btn:hover { border-color: #1E88E5; }
.user-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
/* User-Dropdown: warm, freundlich, Migs-Stil */
.user-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  min-width: 300px;
  max-width: 92vw;
  padding: 14px 0;
  background: linear-gradient(180deg, #2d2a2f 0%, #252228 100%);
  border: 1px solid rgba(255, 240, 230, 0.08);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  z-index: 1001;
  display: none;
  overflow: visible;
}
.user-dropdown[aria-hidden="false"] { display: block; }

/* Kontostand-Karte: süß, weich, mit Mig-Dots */
.user-dropdown-konto {
  position: relative;
  margin: 0 14px 16px;
  border-radius: 18px;
  overflow: visible;
  background: linear-gradient(160deg, rgba(255, 235, 220, 0.09) 0%, rgba(255, 225, 210, 0.05) 100%);
  border: 1px solid rgba(255, 220, 200, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.user-dropdown-konto-inner { padding: 18px 20px 20px; position: relative; z-index: 1; }
.user-dropdown-konto-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 245, 235, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.user-dropdown-konto-balance {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}
.user-dropdown-konto-value {
  font-size: 30px;
  font-weight: 800;
  color: #fff5ee;
  letter-spacing: -0.02em;
  line-height: 1;
}
.user-dropdown-konto-unit {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 245, 235, 0.75);
}
.user-dropdown-konto-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.btn-konto-inventar {
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #f0ebe8;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease;
}
.btn-konto-inventar:hover { color: #1E88E5; }

/* Shop-Button: kein Rand, Hover = Lila wie Sandbox */
.btn-migs-kaufen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #f0ebe8;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease;
}
.btn-migs-kaufen:hover { color: #b8a0d8; }
.btn-migs-kaufen:active { opacity: 0.9; }
.btn-migs-kaufen-icon {
  font-size: 16px;
  line-height: 1;
  opacity: 0.95;
}
.btn-migs-kaufen-text { position: relative; z-index: 1; }

.user-dropdown button {
  display: block;
  width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  text-align: left;
  background: transparent;
  color: #f0ebe8;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease;
  border-radius: 0;
}
.user-dropdown button:hover { background: rgba(255, 235, 220, 0.06); color: #ffd4b8; }
.user-dropdown-admin { border-top: 1px solid rgba(255, 235, 220, 0.08); padding: 0; margin-top: 8px; }
.user-dropdown-admin-header {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  gap: 0;
  border-bottom: 1px solid rgba(255, 235, 220, 0.06);
  min-height: 48px;
  box-sizing: border-box;
}
.user-dropdown-admin-label {
  font-size: 11px;
  font-weight: 600;
  color: #9aa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.user-dropdown-admin-spacer {
  flex: 1;
  min-width: 12px;
}
.user-dropdown-admin-header .admin-toggle {
  flex-shrink: 0;
  margin-left: 0;
}
.user-dropdown-admin-actions { padding: 6px 0 8px; }
.user-dropdown-admin-actions button { padding: 12px 20px; font-size: 14px; }
.user-dropdown-admin-actions.hidden { display: none; }
.admin-toggle {
  padding: 0;
  width: 36px;
  height: 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.admin-toggle .admin-toggle-track {
  display: block;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: #333;
  border: 1px solid #444;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.admin-toggle:hover .admin-toggle-track { background: #3a3a40; border-color: #555; }
.admin-toggle[aria-checked="true"] .admin-toggle-track { background: rgba(30, 136, 229, 0.3); border-color: #1E88E5; }
.admin-toggle .admin-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #888;
  transition: transform 0.2s ease;
}
.admin-toggle[aria-checked="true"] .admin-toggle-thumb {
  background: #1E88E5;
  transform: translateX(16px);
}
.user-dropdown-admin button { padding: 8px 16px; font-size: 12px; color: #e0e0e0; }
.user-dropdown-admin button:hover { background: #2a2a30; color: #dc3232; }

.codes-redeem-hint { margin: 0 0 12px; font-size: 13px; color: #9aa; line-height: 1.4; }
.codes-redeem-form { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.codes-redeem-input { flex: 1; padding: 10px 12px; font-size: 14px; background: #25252a; border: 1px solid #444; border-radius: 8px; color: #e0e0e0; }
.codes-redeem-form button { padding: 10px 20px; font-size: 13px; font-weight: 600; background: #1E88E5; color: #fff; border: none; border-radius: 8px; cursor: pointer; }
.codes-redeem-form button:hover { background: #1565C0; }
.codes-redeem-message { margin: 0; font-size: 13px; min-height: 1.4em; }
.codes-redeem-message.success { color: #22c55e; }
.codes-redeem-message.error { color: #dc3232; }

.inventar-body { padding: 16px; }
.inventar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.inventar-item { padding: 10px 12px; background: #25252a; border: 1px solid #333; border-radius: 8px; text-align: center; }
.inventar-item-label { font-size: 11px; color: #9aa; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.inventar-item-value { font-size: 16px; font-weight: 700; color: #1E88E5; }

/* Profil-Popup Highscores */
.profile-body { padding: 16px; }
.save-popup-body { padding: 16px; }
.save-popup-info { margin: 0 0 14px; font-size: 13px; color: #b0b0b0; }
.save-popup-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.save-popup-buttons button { padding: 8px 16px; font-size: 13px; cursor: pointer; background: #2a2a30; color: #e0e0e0; border: 1px solid #444; border-radius: 6px; }
.save-popup-buttons button:hover { background: #333; }
.save-popup-buttons button:first-child { background: #1565C0; border-color: #1E88E5; color: #fff; }
.save-popup-buttons button:first-child:hover { background: #1E88E5; }
.profile-section h3 { margin: 0 0 12px 0; font-size: 14px; color: #1E88E5; }
.highscores-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.highscores-lang { background: #16161a; border: 1px solid #2a2a30; border-radius: 8px; padding: 14px; }
.highscores-lang h4 { margin: 0 0 10px 0; font-size: 13px; color: #9aa; }
.highscores-lang p { margin: 0 0 6px 0; font-size: 13px; color: #c0c0c0; }
.highscores-lang p:last-child { margin-bottom: 0; }
.highscores-lang strong { color: #1E88E5; }
@media (max-width: 480px) { .highscores-grid { grid-template-columns: 1fr; } }

/* Tutorial-Popup */
.popup-tutorial .popup-tutorial-backdrop { background: rgba(0,0,0,0.75); }
.popup-tutorial-box {
  max-width: 420px;
  padding: 24px;
  text-align: center;
}
.tutorial-progress {
  font-size: 12px;
  color: #9aa;
  margin-bottom: 16px;
}
.tutorial-title {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: #1E88E5;
}
.tutorial-text {
  margin: 0 0 16px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #c0c0c0;
}
.tutorial-preview {
  min-height: 100px;
  margin: 0 0 20px 0;
  background: #1a1a1e;
  border: 1px solid #333;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.tutorial-choice-wrap {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.tutorial-choice-option {
  flex: 1;
  min-width: 120px;
  max-width: 180px;
  padding: 0;
  background: #1a1a1e;
  border: 2px solid #444;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: border-color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.tutorial-choice-option:hover {
  border-color: #1E88E5;
  background: #222228;
}
.tutorial-choice-option canvas {
  border-radius: 8px 8px 0 0;
}
.tutorial-choice-label {
  padding: 10px 8px;
  font-size: 13px;
  color: #e0e0e0;
  text-align: center;
}
.tutorial-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.tutorial-btn {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #444;
  -webkit-tap-highlight-color: transparent;
}
.tutorial-skip {
  background: #2a2a30;
  color: #9aa;
}
.tutorial-skip:hover { background: #333; color: #e0e0e0; }
.tutorial-next {
  background: #1565C0;
  color: #fff;
  border-color: #1E88E5;
}
.tutorial-next:hover { background: #1E88E5; }
.game-settings-rendering { margin-top: 8px; }
.game-settings-rendering .profile-check { display: block; margin-bottom: 6px; }
