    *,
    *::before,
    *::after {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      background: #1a1a2e;
      overflow: hidden;
      font-family: 'Segoe UI', Arial, sans-serif;
      user-select: none;
      -webkit-user-select: none;
      touch-action: none;
      -webkit-tap-highlight-color: transparent;
    }

    #canvas {
      display: block;
      position: fixed;
      top: 0;
      left: 0;
    }

    /* ── Overlay layer ── */
    #ui {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 52px;
      display: flex;
      align-items: center;
      justify-content: center;
      pointer-events: none;
    }

    .screen {
      /* Poliertes Glas / Metall-Panel */
      background:
        linear-gradient(160deg, rgba(25,20,50,0.94) 0%, rgba(10,8,28,0.96) 100%);
      backdrop-filter: blur(16px) saturate(1.4);
      -webkit-backdrop-filter: blur(16px) saturate(1.4);
      border: 1.5px solid rgba(255,140,0,0.42);
      border-radius: 22px;
      padding: 22px 24px;
      text-align: center;
      color: #fff;
      width: min(560px, 92vw);
      max-height: calc(100vh - 72px);
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
      pointer-events: all;
      position: relative;
      box-shadow:
        0 8px 40px rgba(0,0,0,0.65),
        0 0 70px rgba(255,140,0,0.10),
        0 1px 0 rgba(255,200,80,0.14) inset;   /* obere Glas-Kante */
      scrollbar-width: thin;
      scrollbar-color: rgba(255,140,0,.35) transparent;
    }
    /* Glas-Shine-Streifen oben */
    .screen::before {
      content: '';
      position: absolute;
      top: 0; left: 6%; width: 88%; height: 2px;
      background: linear-gradient(90deg, transparent, rgba(255,200,80,0.22), transparent);
      border-radius: 22px 22px 0 0;
      pointer-events: none;
    }

    .screen::-webkit-scrollbar {
      width: 4px;
    }

    .screen::-webkit-scrollbar-track {
      background: transparent;
    }

    .screen::-webkit-scrollbar-thumb {
      background: rgba(255, 140, 0, .35);
      border-radius: 2px;
    }

    .screen h1 {
      font-size: clamp(1.8em, 6vw, 2.8em);
      color: #FF8C00;
      text-shadow: 0 0 24px rgba(255, 140, 0, 0.7);
      margin-bottom: 4px;
      letter-spacing: -0.5px;
    }

    .subtitle {
      color: #aaa;
      font-size: 0.95em;
      margin-bottom: 18px;
    }

    .screen h2 {
      font-size: clamp(1.5em, 5vw, 2em);
      color: #ff4444;
      text-shadow: 0 0 16px rgba(255, 68, 68, 0.6);
      margin-bottom: 6px;
    }

    input[type="text"] {
      width: 100%;
      padding: 13px 16px;
      border-radius: 12px;
      border: 2px solid #FF8C00;
      background: rgba(255, 255, 255, 0.07);
      color: #fff;
      font-size: 1.05em;
      margin-bottom: 12px;
      outline: none;
      text-align: center;
      transition: border-color .2s, box-shadow .2s;
    }

    input[type="text"]:focus {
      border-color: #FFB347;
      box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.2);
    }

    input[type="text"]::placeholder {
      color: rgba(255, 255, 255, 0.35);
    }

    .btn {
      /* Poliertes Metall / Glas-Look */
      background: linear-gradient(160deg,
        rgba(255,160,30,0.95) 0%,
        #FF7200 38%,
        #E85000 72%,
        rgba(200,60,0,0.90) 100%
      );
      color: #fff;
      border: none;
      padding: 14px 20px;
      border-radius: 30px;
      font-size: 1.1em;
      font-weight: 700;
      cursor: pointer;
      width: 100%;
      margin-bottom: 8px;
      position: relative;
      overflow: hidden;
      text-shadow: 0 1px 3px rgba(0,0,0,0.35);
      box-shadow:
        0 4px 18px rgba(255,120,0,0.40),
        0 1px 0 rgba(255,200,80,0.25) inset,
        0 -2px 0 rgba(100,30,0,0.30) inset;
      transition: transform .12s, box-shadow .12s, filter .12s;
      letter-spacing: .3px;
    }
    /* Glas-Shine oben */
    .btn::before {
      content: '';
      position: absolute;
      top: 0; left: 8%; width: 84%; height: 46%;
      background: linear-gradient(180deg,
        rgba(255,255,255,0.22) 0%,
        rgba(255,255,255,0.04) 100%
      );
      border-radius: 30px 30px 50% 50%;
      pointer-events: none;
    }

    .btn:hover {
      transform: translateY(-2px);
      filter: brightness(1.08);
      box-shadow:
        0 8px 28px rgba(255,120,0,0.55),
        0 1px 0 rgba(255,200,80,0.30) inset,
        0 -2px 0 rgba(100,30,0,0.30) inset;
    }

    .btn:active {
      transform: translateY(1px);
      filter: brightness(0.95);
      box-shadow: 0 2px 10px rgba(255,100,0,0.30);
    }

    .btn-secondary {
      background: linear-gradient(160deg, #555 0%, #333 40%, #1A1A1A 100%);
      box-shadow:
        0 4px 14px rgba(0,0,0,0.45),
        0 1px 0 rgba(255,255,255,0.10) inset,
        0 -2px 0 rgba(0,0,0,0.35) inset;
    }
    .btn-secondary::before {
      background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.02) 100%);
    }

    .btn-secondary:hover {
      box-shadow:
        0 7px 20px rgba(0,0,0,0.55),
        0 1px 0 rgba(255,255,255,0.12) inset;
    }

    .btn-share {
      background: linear-gradient(135deg, #25D366, #128C7E);
      box-shadow: 0 4px 18px rgba(37, 211, 102, 0.35);
    }

    .btn-share:hover {
      box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
    }

    .share-fallback {
      margin-top: 8px;
      background: rgba(37, 211, 102, .06);
      border: 1px solid rgba(37, 211, 102, .25);
      border-radius: 14px;
      padding: 12px 14px;
    }

    #share-preview {
      width: 100%;
      border-radius: 10px;
      display: block;
      margin-bottom: 10px;
      border: 1px solid rgba(255, 140, 0, .2);
    }

    .share-hint {
      font-size: .78em;
      color: #888;
      margin-bottom: 8px;
      text-align: left;
    }

    .share-fallback .btn {
      font-size: .88em;
      padding: 10px 14px;
      margin-bottom: 0;
    }

    .share-dl-btn {
      background: linear-gradient(135deg, #555, #333);
      box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
    }

    .share-wa-btn {
      background: linear-gradient(135deg, #25D366, #128C7E);
      box-shadow: 0 4px 14px rgba(37, 211, 102, .3);
      margin-bottom: 0;
    }

    .share-ig-btn {
      background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
      box-shadow: 0 4px 14px rgba(220, 39, 67, .35);
      margin-bottom: 0;
    }

    .share-ig-btn:hover {
      box-shadow: 0 6px 22px rgba(220, 39, 67, .55);
    }

    .share-row {
      display: flex;
      gap: 8px;
      margin-top: 6px;
    }

    .share-row .btn {
      flex: 1;
      font-size: .82em;
      padding: 10px 6px;
      margin-bottom: 0;
    }

    .share-step {
      font-size: .76em;
      color: #999;
      text-align: center;
      background: rgba(255, 255, 255, .04);
      border-radius: 8px;
      padding: 7px 10px;
      margin-top: 8px;
      line-height: 1.5;
    }

    .share-step strong {
      color: #FFB347;
    }

    .hs-wrap {
      margin-top: 18px;
      text-align: left;
    }

    .hs-wrap h3 {
      color: #FF8C00;
      text-align: center;
      margin-bottom: 8px;
      font-size: 1em;
      letter-spacing: .5px;
    }

    /* ── Leaderboard Tabs ── */
    .hs-tabs {
      display: flex;
      gap: 4px;
      margin-bottom: 8px;
    }

    .hs-tab {
      flex: 1;
      background: rgba(255, 255, 255, .05);
      border: 1px solid rgba(255, 255, 255, .1);
      color: #777;
      font-size: .65em;
      font-weight: 700;
      padding: 6px 3px;
      border-radius: 8px;
      cursor: pointer;
      transition: all .15s;
      line-height: 1.3;
      text-align: center;
      pointer-events: all;
    }

    .hs-tab:hover {
      background: rgba(255, 140, 0, .1);
      color: #ccc;
    }

    .hs-tab.active {
      background: rgba(255, 140, 0, .18);
      border-color: rgba(255, 140, 0, .5);
      color: #FF8C00;
    }

    .hs-item {
      display: flex;
      align-items: center;
      padding: 7px 10px;
      border-radius: 9px;
      margin-bottom: 4px;
      background: rgba(255, 255, 255, 0.04);
      font-size: 0.92em;
      transition: background .15s;
    }

    .hs-item:first-child {
      background: rgba(255, 215, 0, 0.12);
      color: #FFD700;
    }

    .hs-item--me {
      background: rgba(255, 140, 0, 0.18) !important;
      color: #FFB347 !important;
    }

    .hs-item .rank {
      width: 26px;
      flex-shrink: 0;
    }

    .hs-item .name {
      flex: 1;
      padding: 0 8px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .hs-item .pts {
      color: #FF8C00;
      font-weight: 700;
      flex-shrink: 0;
    }

    /* ── Game Over Banner ── */
    #scr-over {
      padding-top: 0;
    }

    #scr-over.go-active {
      border-color: rgba(255, 50, 0, 0.6);
      box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7), 0 0 60px rgba(255, 60, 0, 0.22);
    }

    .go-img-wrap {
      position: relative;
      margin: 0 -24px 16px -24px;
      border-radius: 20px 20px 0 0;
      overflow: hidden;
      line-height: 0;
    }

    .go-img {
      width: 100%;
      display: block;
      height: clamp(180px, 48vw, 270px);
      object-fit: cover;
      object-position: top center;
      /* Bild aufhellen + Sättigung leicht erhöhen da Original sehr dunkel */
      filter: brightness(1.35) saturate(1.15) contrast(1.05);
    }

    .go-img-overlay {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 55%;
      background: linear-gradient(to bottom,
          rgba(10, 10, 30, 0) 0%,
          rgba(10, 10, 30, 0.65) 60%,
          rgba(10, 10, 30, 0.95) 100%);
    }

    /* Score + Name über dem Bild-Overlay positionieren */
    .go-over-title {
      position: absolute;
      bottom: 10px;
      left: 0;
      right: 0;
      text-align: center;
      pointer-events: none;
    }

    .go-over-title .go-title-text {
      font-size: clamp(1.3em, 5vw, 1.8em);
      font-weight: 900;
      color: #ff4444;
      text-shadow: 0 0 20px rgba(255, 50, 0, 0.9), 0 2px 4px rgba(0, 0, 0, 0.8);
      letter-spacing: 1px;
    }

    .final-score {
      font-size: clamp(1.6em, 6vw, 2.2em);
      color: #FF8C00;
      font-weight: 700;
      margin: 6px 0 4px;
    }

    .new-best {
      color: #FFD700;
      font-size: 1em;
      margin-bottom: 10px;
      animation: pulse 1s ease-in-out infinite;
    }

    @keyframes pulse {

      0%,
      100% {
        opacity: 1
      }

      50% {
        opacity: .45
      }
    }

    .hidden {
      display: none !important;
    }

    /* ── Changelog Panel ── */
    details.changelog-wrap {
      list-style: none;
    }
    details.changelog-wrap > summary {
      color: #FF8C00;
      font-size: 1em;
      font-weight: bold;
      text-align: center;
      padding: 8px 0 6px;
      cursor: pointer;
      list-style: none;
      user-select: none;
    }
    details.changelog-wrap > summary::-webkit-details-marker { display: none; }
    details.changelog-wrap > summary::before { content: '📰 '; }
    details.changelog-wrap > summary::after  { content: '  ▸'; opacity: 0.55; font-size: 0.85em; }
    details.changelog-wrap[open] > summary::after { content: '  ▾'; }
    .changelog-wrap {
      margin-top: 18px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid rgba(255, 140, 0, 0.18);
      border-radius: 14px;
      overflow: hidden;
    }

    .changelog-wrap h3 {
      display: none; /* ersetzt durch <summary> */
      color: #FF8C00;
      text-align: center;
      font-size: 1em;
      letter-spacing: .5px;
      padding: 12px 16px 8px;
      margin: 0;
      border-bottom: 1px solid rgba(255, 255, 255, .07);
    }

    .cl-entries {
      max-height: 220px;
      overflow-y: auto;
      padding: 8px 14px 10px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      scrollbar-width: thin;
      scrollbar-color: rgba(255, 140, 0, .3) transparent;
    }

    .cl-entry {
      border-left: 3px solid #FF8C00;
      padding: 6px 10px;
      background: rgba(255, 140, 0, .05);
      border-radius: 0 8px 8px 0;
    }

    .cl-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 4px;
      flex-wrap: wrap;
      gap: 3px;
    }

    .cl-date {
      color: #FF8C00;
      font-size: .72em;
      font-weight: 700;
    }

    .cl-author {
      color: #888;
      font-size: .68em;
    }

    .cl-title {
      color: #eee;
      font-size: .88em;
      font-weight: 700;
      margin-bottom: 3px;
    }

    .cl-items {
      color: #aaa;
      font-size: .78em;
      line-height: 1.5;
      margin: 0;
      padding-left: 14px;
    }

    /* Controls hint */
    .hint {
      color: #666;
      font-size: .8em;
      margin-top: 10px;
    }

    /* ── Shop (im Tab: kein extra margin oben) ── */
    .mn-pane .shop-wrap { margin-top: 0; }

    .shop-wrap {
      margin-top: 0;
    }

    .shop-wrap h3 {
      color: #FF8C00;
      text-align: center;
      margin-bottom: 10px;
      font-size: 1em;
      letter-spacing: .5px;
    }

    .total-carrots {
      text-align: center;
      color: #FF8C00;
      font-weight: 700;
      font-size: 1.05em;
      margin-bottom: 10px;
      background: rgba(255, 140, 0, .1);
      border: 1px solid rgba(255, 140, 0, .3);
      border-radius: 10px;
      padding: 7px;
    }

    .shop-grid {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px;
    }

    @media (max-width: 380px) {
      .shop-grid {
        grid-template-columns: 1fr 1fr;
      }
    }

    .shop-item {
      background: rgba(255, 255, 255, .05);
      border: 1px solid rgba(255, 255, 255, .1);
      border-radius: 12px;
      padding: 10px 8px;
      text-align: center;
      transition: border-color .2s;
    }

    .shop-item.owned {
      border-color: rgba(68, 221, 136, .4);
      background: rgba(68, 221, 136, .07);
    }

    .shop-item .si-icon {
      font-size: 1.6em;
      display: block;
      margin-bottom: 4px;
    }

    .shop-item .si-name {
      font-size: .78em;
      font-weight: 700;
      color: #ddd;
      display: block;
      margin-bottom: 3px;
    }

    .shop-item .si-desc {
      font-size: .68em;
      color: #777;
      display: block;
      margin-bottom: 6px;
    }

    .shop-btn {
      background: linear-gradient(135deg, #FF8C00, #FF4500);
      border: none;
      color: #fff;
      font-size: .72em;
      font-weight: 700;
      padding: 5px 8px;
      border-radius: 15px;
      cursor: pointer;
      width: 100%;
      transition: opacity .2s;
    }

    .shop-btn:hover {
      opacity: .85;
    }

    .shop-btn:disabled {
      background: #333;
      color: #666;
      cursor: default;
    }

    .shop-btn.owned-lbl {
      background: rgba(68, 221, 136, .2);
      color: #44dd88;
      cursor: default;
    }

    /* ── Push-Bell Button ── */
    #push-bell {
      display: none;
      align-items: center;
      gap: 5px;
      pointer-events: all;
      cursor: pointer;
      font-size: clamp(0.68em, 2vw, 0.82em);
      font-weight: 700;
      padding: 5px 12px;
      border-radius: 30px;
      background: rgba(255, 140, 0, 0.14);
      border: 1px solid rgba(255, 140, 0, 0.45);
      color: #FFB347;
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      white-space: nowrap;
      flex-shrink: 0;
      animation: bellPulse 2.4s ease-in-out infinite;
      -webkit-tap-highlight-color: transparent;
    }
    @keyframes bellPulse {
      0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,140,0,0); }
      50%      { transform: scale(1.04); box-shadow: 0 0 0 5px rgba(255,140,0,0.12); }
    }

    /* ── Social Footer ── */
    #ig-footer {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-wrap: wrap;
      gap: 7px 10px;
      padding: 8px 10px 10px;
      background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.55) 60%, rgba(0, 0, 0, 0) 100%);
      pointer-events: none;
      z-index: 9999; /* über dem Menü-Screen */
      animation: footerFadeIn 1.2s ease forwards;
    }

    @keyframes footerFadeIn {
      from {
        opacity: 0;
        transform: translateY(12px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .ig-link {
      display: flex;
      align-items: center;
      gap: 6px;
      pointer-events: all;
      text-decoration: none;
      color: #fff;
      font-size: clamp(0.68em, 2vw, 0.85em);
      font-weight: 600;
      padding: 5px 11px;
      border-radius: 30px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.15);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      transition: background .2s, transform .15s, box-shadow .2s;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .ig-link:hover,
    .ig-link:active {
      background: rgba(255, 255, 255, 0.18);
      transform: translateY(-2px);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }

    .ig-icon {
      width: 16px;
      height: 16px;
      flex-shrink: 0;
      background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .ig-icon svg {
      width: 11px;
      height: 11px;
      fill: #fff;
    }

    .ig-sep {
      width: 1px;
      height: 18px;
      background: rgba(255, 255, 255, 0.2);
    }

    @media (max-width: 600px) {
      /* Footer: eine saubere Zeile, kein Wrap */
      .ig-sep { display: none; }

      #ig-footer {
        flex-wrap: nowrap;
        gap: 5px;
        padding: 6px 8px 8px;
        justify-content: center;
      }

      /* "Made by" Text auf Mobile – sichtbar lassen */
      #ig-footer > span:first-child { display: block; font-size: 0.58em !important; }

      /* Push-Bell auf Mobile ausblenden */
      #push-bell { display: none !important; }

      /* ── Mobile: Content von oben + horizontal zentriert ── */
      #ui {
        align-items: center;       /* war flex-start → fehlende Zentrierung */
        justify-content: flex-start;
        padding-top: 6px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
      }

      /* ── Alle Screens auf Mobile kleiner & kompakter ── */
      .screen {
        padding: 16px 18px; /* Basis-Padding für alle Screens (Auth, Shop, Upgrades etc.) */
        max-height: none;
        width: min(420px, 96vw);
        border-radius: 18px;
        margin: 0 auto;
      }
      /* Hauptmenü braucht kein Padding — hat eigene Sections */
      #scr-start {
        padding: 0 !important;
      }
      .screen h1 {
        font-size: clamp(1.5em, 5.5vw, 2.2em);
        margin-bottom: 2px;
      }
      .subtitle {
        font-size: 0.78em;
        margin-bottom: 10px;
        line-height: 1.4;
      }
      /* Hauptmenü Mobile */
      .mn-hero   { padding: 8px 14px 8px; }
      #mn-logo   { width: 110px; height: 110px; margin-bottom: 8px; }
      .mn-player-card { margin-bottom: 8px; }
      .mn-level-badge, .mn-chips, .mn-account { font-size: .73em; padding: 3px 9px; }
      .mn-strip  { padding: 8px 14px; gap: 6px; }
      .mn-strip-btn { min-width: 54px; padding: 9px 5px; }
      .mn-strip-btn > span:first-child { font-size: 1.35em; }
      .mn-tab-body { padding: 10px 16px 6px; }
      .mn-footer { padding: 6px 16px 10px; }
      .mn-tab    { padding: 9px 4px; font-size: .78em; }
      /* Karotten-Shop kompakter */
      .shop-wrap { margin-top: 0; }
      .shop-grid { gap: 6px; }
      .shop-item { padding: 8px 6px; }
      .si-icon { font-size: 1.4em; }
      .si-name { font-size: .82em; }
      .si-desc { font-size: .72em; }
      .shop-btn { padding: 5px 8px; font-size: .78em; }
      /* Casino-Buttons kompakter (3er Grid bleibt, aber kleiner) */
      .casino-btns { gap: 5px; margin-top: 8px; }
      .btn-casino { padding: 8px 5px; font-size: .78em; min-height: 48px; }
      .chip-bar { padding: 5px 10px; margin-top: 6px; }
      /* Changelog einklappbar */
      .cl-entries-mobile-hidden { display: none; }
      .changelog-wrap summary {
        color: #FF8C00;
        font-size: 1em;
        font-weight: bold;
        text-align: center;
        padding: 8px 0 4px;
        cursor: pointer;
        list-style: none;
        user-select: none;
      }
      .changelog-wrap summary::-webkit-details-marker { display: none; }
      .changelog-wrap summary::before { content: '📰 '; }
      .changelog-wrap summary::after  { content: ' ▸'; opacity: 0.6; }
      details.changelog-wrap[open] summary::after { content: ' ▾'; }
      .changelog-wrap h3 { display: none; } /* summary ersetzt h3 */
    }

    @media (max-width: 380px) {
      .pkg-grid { grid-template-columns: 1fr; }
      .skin-btn { padding: 8px 10px; font-size: .74em; }
    }

    /* ── Pause-Button komplett deaktiviert ── */
    #pause-btn { display: none !important; }

    /* ── Mobile Pause-Button (inaktiv, bleibt für ESC-Logik im DOM) ── */
    #pause-btn-UNUSED {
      position: fixed;
      bottom: 88px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 200;
      border: none;
      cursor: pointer;
      outline: none;
      -webkit-tap-highlight-color: transparent;
      background: rgba(10, 10, 30, 0.65);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border-radius: 50px;
      padding: 6px 18px 6px 14px;
      border: 1.5px solid rgba(255, 140, 0, 0.5);
      box-shadow: 0 4px 20px rgba(255, 100, 0, 0.25);
      display: flex;
      align-items: center;
      gap: 8px;
      font-family: Arial, sans-serif;
      font-weight: 800;
      font-size: 13px;
      color: #FF8C00;
      letter-spacing: 0.08em;
      transition: background .15s, box-shadow .15s, transform .1s;
      user-select: none;
    }

    #pause-btn:active {
      transform: translateX(-50%) scale(0.93);
      box-shadow: 0 2px 10px rgba(255, 100, 0, 0.4);
    }

    #pause-btn .pb-bars {
      display: flex;
      gap: 3px;
      align-items: center;
    }

    #pause-btn .pb-bar {
      width: 4px;
      height: 16px;
      background: linear-gradient(180deg, #FFD060, #FF5500);
      border-radius: 2px;
      transition: transform .15s;
    }

    #pause-btn.is-paused .pb-bar:first-child {
      /* Play-Dreieck: zwei Balken zu einem Pfeil imitieren */
      transform: rotate(0deg);
    }

    /* Play-Icon via clip */
    #pause-btn .pb-play {
      display: none;
      width: 0;
      height: 0;
      border-style: solid;
      border-width: 8px 0 8px 14px;
      border-color: transparent transparent transparent #FF8C00;
      filter: drop-shadow(0 0 4px rgba(255, 140, 0, 0.7));
    }

    #pause-btn.is-paused .pb-bars {
      display: none;
    }

    #pause-btn.is-paused .pb-play {
      display: block;
    }

    /* ── Minigame UI ── */
    #mg-prompt {
      position: fixed;
      top: 18%;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(15, 10, 30, 0.95);
      border: 2px solid #AA44FF;
      border-radius: 16px;
      padding: 20px 24px;
      text-align: center;
      z-index: 250;
      box-shadow: 0 8px 32px rgba(170, 68, 255, 0.4);
      display: flex;
      flex-direction: column;
      gap: 12px;
      animation: popIn .3s cubic-bezier(.175, .885, .32, 1.275);
    }

    @keyframes popIn {
      0% {
        transform: translate(-50%, -20px) scale(0.8);
        opacity: 0;
      }

      100% {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
      }
    }

    .mg-p-title {
      color: #AA44FF;
      font-size: 1.4em;
      font-weight: 900;
      letter-spacing: 0.5px;
    }

    .mg-p-desc {
      color: #DDD;
      font-size: 0.95em;
      font-weight: 600;
    }

    .mg-p-btns {
      display: flex;
      gap: 10px;
      justify-content: center;
      margin-top: 5px;
    }

    .mg-btn {
      border: none;
      border-radius: 20px;
      font-weight: 800;
      font-size: 0.9em;
      padding: 10px 18px;
      cursor: pointer;
      transition: transform .1s, filter .15s;
      color: #fff;
      text-transform: uppercase;
    }

    .mg-btn:active {
      transform: scale(0.95);
    }

    .mg-btn.accept {
      background: linear-gradient(135deg, #AA44FF, #7700FF);
      box-shadow: 0 4px 14px rgba(170, 68, 255, 0.4);
    }

    .mg-btn.decline {
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .mg-btn:hover {
      filter: brightness(1.2);
    }

    #mg-timer-bar-wrap {
      width: 100%;
      height: 6px;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 3px;
      overflow: hidden;
      margin-top: 4px;
    }

    #mg-timer-bar {
      width: 100%;
      height: 100%;
      background: #AA44FF;
      transform-origin: left;
      transition: transform 0.1s linear;
    }

    #mg-hud {
      position: fixed;
      top: 14%;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(0, 0, 0, 0.7);
      border: 2px solid #44DD88;
      border-radius: 20px;
      padding: 10px 20px;
      color: #fff;
      z-index: 150;
      display: flex;
      gap: 12px;
      align-items: center;
      font-weight: 800;
      font-family: sans-serif;
      box-shadow: 0 4px 15px rgba(68, 221, 136, 0.3);
    }

    #mg-hud-prog {
      color: #44DD88;
      font-size: 1.1em;
    }

    #mg-toast {
      position: fixed;
      top: 120px;
      left: 50%;
      transform: translateX(-50%);
      padding: 12px 24px;
      border-radius: 12px;
      color: #fff;
      font-weight: 900;
      z-index: 300;
      transition: opacity 0.3s, transform 0.3s;
      opacity: 0;
      pointer-events: none;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
      font-size: 1.1em;
      text-align: center;
    }

    .mg-toast-show {
      opacity: 1 !important;
      transform: translate(-50%, 20px) !important;
    }
    /* ══════════════════════════════════════════
       CASINO CHIP / SKIN-SHOP STYLES
    ══════════════════════════════════════════ */

    /* ══════════════════════════════════════════════════════
       HAUPTMENÜ — REDESIGN v2 (mn-*)
    ══════════════════════════════════════════════════════ */

    #scr-start {
      padding: 0 !important;
      display: flex;
      flex-direction: column !important;
      overflow: hidden !important;
    }
    #scr-start.hidden { display: none !important; }

    /* ── Hero ── */
    .mn-hero {
      padding: 10px 22px 10px;
      text-align: center;
      flex-shrink: 0;
      position: relative;
    }
    /* Subtiler Radial-Glow hinter dem Logo */
    .mn-hero::before {
      content: '';
      position: absolute;
      top: 0; left: 50%; transform: translateX(-50%);
      width: 260px; height: 160px;
      background: radial-gradient(ellipse at top, rgba(255,160,0,.13) 0%, transparent 70%);
      pointer-events: none;
    }
    #mn-logo {
      width: 140px; height: 140px;
      object-fit: contain;
      display: block;
      margin: 0 auto 12px;
      filter: drop-shadow(0 4px 22px rgba(255,180,0,.55));
      position: relative;
    }

    /* ── Player Card — einheitliche HUD-Leiste ── */
    .mn-player-card {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0;
      margin: 0 0 10px;
      background: rgba(255,255,255,.055);
      border: 1px solid rgba(255,255,255,.11);
      border-radius: 50px;
      padding: 4px 5px;
      overflow: hidden;
    }
    /* Trennlinie zwischen den Pills via ::after */
    .mn-player-card > * + * { margin-left: 3px; }

    /* Level Badge innerhalb der Player Card */
    .mn-level-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: rgba(255,140,0,.18);
      border: 1px solid rgba(255,140,0,.38);
      border-radius: 50px;
      padding: 4px 11px;
      font-size: .78em;
      color: rgba(255,255,255,.9);
      flex-shrink: 0;
    }
    .mn-level-badge strong { color: #FFAA00; font-size: 1.08em; }
    .mn-level-icon { font-size: 1em; }

    /* Chips Pill */
    .mn-chips {
      display: flex; align-items: center; gap: 6px;
      cursor: pointer;
      padding: 4px 11px;
      border-radius: 50px;
      background: rgba(255,210,0,.1);
      border: 1px solid rgba(255,210,0,.25);
      color: #FFD700; font-weight: 800; font-size: .78em;
      flex-shrink: 0;
      transition: background .15s, border-color .15s;
    }
    .mn-chips:hover { background: rgba(255,210,0,.18); border-color: rgba(255,210,0,.4); }
    .mn-chips-icon { font-size: .95em; }
    .mn-chips-plus { color: rgba(255,140,0,.7); font-size: .88em; margin-left: 1px; }

    /* Account Pill */
    .mn-account {
      display: flex; align-items: center; gap: 7px;
      padding: 4px 11px;
      border-radius: 50px;
      background: rgba(255,255,255,.05);
      border: 1px solid rgba(255,255,255,.08);
      overflow: hidden; flex-shrink: 1; min-width: 0;
    }
    .mn-account-name {
      font-size: .77em; color: rgba(255,255,255,.75);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .mn-account-link {
      font-size: .74em; color: #FF8C00; cursor: pointer;
      text-decoration: none; white-space: nowrap; flex-shrink: 0;
      font-weight: 700;
    }
    .mn-account-link:hover { color: #FFB03A; text-decoration: underline; }

    /* Nick Input */
    .mn-hero input[type="text"] {
      margin-bottom: 8px;
    }

    /* Spielen Button */
    .mn-hero .btn { margin-bottom: 0; }

    /* Legacy sep (falls noch genutzt) */
    .mn-user-sep { display: none; }
    .mn-user-bar { display: none; }

    /* ── Feature Strip — Horizontal scroll ── */
    .mn-strip {
      display: flex; gap: 7px;
      padding: 10px 18px; flex-shrink: 0;
      overflow-x: auto; scrollbar-width: none;
      border-top: 1px solid rgba(255,255,255,.05);
      border-bottom: 1px solid rgba(255,255,255,.05);
    }
    .mn-strip::-webkit-scrollbar { display: none; }
    .mn-strip-btn {
      display: flex; flex-direction: column; align-items: center; gap: 5px;
      min-width: 60px; padding: 10px 7px;
      border-radius: 16px; flex-shrink: 0;
      background: rgba(255,255,255,.05);
      border: 1px solid rgba(255,255,255,.09);
      color: #fff;
      cursor: pointer;
      transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
      position: relative;
    }
    .mn-strip-btn:hover {
      background: rgba(255,140,0,.12);
      border-color: rgba(255,140,0,.4);
      transform: translateY(-2px);
      box-shadow: 0 4px 16px rgba(255,120,0,.18);
    }
    .mn-strip-btn:active { transform: translateY(0); box-shadow: none; }
    .mn-strip-btn > span:first-child { font-size: 1.5em; line-height: 1; }
    .mn-strip-btn > span:nth-child(2) { font-size: .61em; color: rgba(255,255,255,.6); font-weight: 700; white-space: nowrap; letter-spacing: .02em; }
    .mn-strip-badge {
      position: absolute; top: -5px; right: -5px;
      background: linear-gradient(135deg, #FF4500, #FF6A00);
      color: #fff;
      font-size: .47em; padding: 2px 5px;
      border-radius: 7px; font-weight: 900; letter-spacing: .03em;
      box-shadow: 0 2px 6px rgba(255,80,0,.4);
    }

    /* ── Tabs ── */
    .mn-tabs {
      display: flex; flex-shrink: 0;
      background: rgba(0,0,0,.15);
      border-bottom: 1px solid rgba(255,255,255,.07);
    }
    .mn-tab {
      flex: 1; padding: 10px 6px;
      background: none; border: none; border-bottom: 2px solid transparent;
      color: rgba(255,255,255,.38); font-size: .8em; font-weight: 700;
      cursor: pointer; transition: color .18s, border-color .18s, background .18s;
      margin-bottom: -1px; letter-spacing: .01em;
    }
    .mn-tab:hover { color: rgba(255,255,255,.7); background: rgba(255,255,255,.03); }
    .mn-tab.active {
      color: #FF8C00;
      border-bottom-color: #FF8C00;
      background: rgba(255,140,0,.06);
    }

    /* ── Tab Content ── */
    .mn-tab-body {
      flex: 1; overflow-y: auto; min-height: 0;
      padding: 12px 20px 8px;
      scrollbar-width: thin;
      scrollbar-color: rgba(255,140,0,.3) transparent;
    }
    .mn-tab-body::-webkit-scrollbar { width: 3px; }
    .mn-tab-body::-webkit-scrollbar-thumb { background: rgba(255,140,0,.3); border-radius: 2px; }
    .mn-pane { display: none; }
    .mn-pane.active { display: block; }

    /* ── Footer ── */
    .mn-footer {
      padding: 7px 22px 11px; flex-shrink: 0;
      border-top: 1px solid rgba(255,255,255,.05);
      display: flex; align-items: center; justify-content: center;
    }
    .mn-footer .hint { color: rgba(255,255,255,.25); font-size: .68em; margin: 0; text-align: center; }

    /* Legacy: chip-bar/account-bar/casino-btns */
    .chip-bar { display: none; }
    .account-bar { display: none; }
    .casino-btns { display: none; }
    .btn-casino { display: none; }

    /* ── PVP INVITE — Kompaktes Toast-Design ── */
    /* Desktop: oben-rechts / Mobile: unten-mittig — kein Vollbild-Overlay */
    #pvp-invite-overlay {
      display: none; position: fixed; z-index: 88888; pointer-events: none;
      /* Desktop-Position: oben rechts */
      top: 68px; right: 14px;
    }
    #pvp-invite-overlay.open { display: block; }
    #pvp-invite-box {
      background: rgba(8, 14, 28, 0.94);
      border: 1.5px solid rgba(255, 200, 0, .5);
      border-radius: 14px;
      padding: 10px 14px 8px;
      width: 260px;
      box-shadow: 0 4px 20px rgba(0,0,0,.7);
      pointer-events: all;
      animation: invitePop .25s cubic-bezier(.34,1.4,.64,1);
    }
    #pvp-invite-row1 {
      display: flex; align-items: center; gap: 6px;
      font-size: .9em; color: #eee; margin-bottom: 7px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    #pvp-invite-icon { font-size: 1.15em; flex-shrink: 0; }
    #pvp-invite-nick { color: #FF8C00; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
    #pvp-invite-label { color: #aaa; flex-shrink: 0; }
    #pvp-invite-row2 {
      display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
    }
    #pvp-invite-accept  { flex: 1; padding: 6px 0; border: none; border-radius: 20px; background: linear-gradient(135deg,#1a7a3a,#2ab85a); color: #fff; font-size: .82em; font-weight: 700; cursor: pointer; transition: opacity .15s; }
    #pvp-invite-decline { flex: 1; padding: 6px 0; border: 1px solid rgba(200,50,50,.6); border-radius: 20px; background: rgba(180,30,30,.18); color: #ff8888; font-size: .82em; font-weight: 700; cursor: pointer; transition: opacity .15s; }
    #pvp-invite-accept:hover, #pvp-invite-decline:hover { opacity: .78; }
    #pvp-invite-timer { font-size: .78em; color: #777; flex-shrink: 0; min-width: 28px; text-align: right; }
    #pvp-invite-bar-wrap { background: rgba(255,255,255,.1); border-radius: 3px; height: 3px; overflow: hidden; }
    #pvp-invite-bar      { height: 100%; background: linear-gradient(90deg,#FFD700,#FF8C00); border-radius: 3px; width: 100%; }

    /* Mobile: unten-mitte, schmaler Strip */
    @media (max-width: 720px) {
      #pvp-invite-overlay {
        top: auto; right: auto;
        bottom: 82px; left: 50%;
        transform: translateX(-50%);
      }
      #pvp-invite-box {
        width: min(340px, 92vw);
        padding: 9px 12px 7px;
      }
    }

    @keyframes invitePop {
      from { transform: scale(.88) translateY(8px); opacity: 0; }
      to   { transform: scale(1)   translateY(0);   opacity: 1; }
    }
    @keyframes betaPulse {
      0%,100% { box-shadow: 0 0 8px rgba(68,255,136,.3); }
      50%      { box-shadow: 0 0 22px rgba(68,255,136,.75); }
    }

    /* ── PVP SAFE-RESUME COUNTDOWN ── */
    #pvp-safe-resume-overlay {
      display: none; position: fixed; z-index: 88887;
      bottom: 82px; left: 50%; transform: translateX(-50%);
      pointer-events: none;
    }
    #pvp-safe-resume-overlay.open { display: block; }
    #pvp-safe-resume-box {
      background: rgba(0,0,0,.78);
      border: 1px solid rgba(255,255,255,.15);
      border-radius: 12px;
      padding: 10px 20px 8px;
      text-align: center;
      pointer-events: none;
    }
    #pvp-safe-resume-text { font-size: .82em; color: #aaa; }
    #pvp-safe-resume-num  { font-size: 2.2em; font-weight: 900; color: #FFD700; line-height: 1.1; }

    /* ── PVP OPT-OUT TOGGLE SWITCH ── */
    .pvp-toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
    .pvp-toggle-switch input { opacity: 0; width: 0; height: 0; }
    .pvp-toggle-slider {
      position: absolute; cursor: pointer; inset: 0;
      background: #333; border-radius: 24px; transition: .25s;
    }
    .pvp-toggle-slider:before {
      content: ''; position: absolute; height: 18px; width: 18px;
      left: 3px; bottom: 3px; background: #888; border-radius: 50%; transition: .25s;
    }
    .pvp-toggle-switch input:checked + .pvp-toggle-slider { background: #1a7a3a; }
    .pvp-toggle-switch input:checked + .pvp-toggle-slider:before { transform: translateX(18px); background: #fff; }

    /* ── UPDATE MODAL ── */
    #update-modal-overlay {
      display: none; position: fixed; inset: 0; z-index: 99999;
      background: rgba(0,0,8,0.88); backdrop-filter: blur(6px);
      align-items: center; justify-content: center;
    }
    #update-modal-overlay.open { display: flex; }
    #update-modal {
      background: linear-gradient(160deg, #0d0d24 0%, #12081e 100%);
      border: 2px solid rgba(255,140,0,0.55);
      border-radius: 22px; padding: 26px 24px;
      width: min(460px, 94vw); max-height: 88vh;
      overflow-y: auto; color: #fff; text-align: left;
      box-shadow: 0 0 80px rgba(255,100,0,0.2), 0 12px 50px rgba(0,0,0,0.7);
      scrollbar-width: thin; scrollbar-color: rgba(255,140,0,.3) transparent;
    }
    #update-modal::-webkit-scrollbar { width: 4px; }
    #update-modal::-webkit-scrollbar-thumb { background: rgba(255,140,0,.3); border-radius: 2px; }
    .upd-header { text-align: center; margin-bottom: 18px; }
    .upd-badge {
      display: inline-block; background: linear-gradient(135deg,#FF8C00,#FF4500);
      color: #fff; font-size: .7em; font-weight: 800; padding: 3px 11px;
      border-radius: 20px; letter-spacing: 1px; margin-bottom: 8px;
    }
    .upd-title { font-size: clamp(1.4em,5vw,2em); font-weight: 900; color: #FF8C00;
      text-shadow: 0 0 24px rgba(255,140,0,.6); margin-bottom: 4px; }
    .upd-sub { color: #888; font-size: .82em; }
    .upd-section { margin-bottom: 16px; }
    .upd-section-title {
      font-size: .78em; font-weight: 800; letter-spacing: 1.5px;
      color: #FF8C00; text-transform: uppercase; margin-bottom: 8px;
      border-bottom: 1px solid rgba(255,140,0,.2); padding-bottom: 4px;
    }
    .upd-item {
      display: flex; gap: 10px; align-items: flex-start;
      padding: 8px 10px; margin-bottom: 6px;
      background: rgba(255,255,255,.04); border-radius: 10px;
      border: 1px solid rgba(255,255,255,.06);
    }
    .upd-item-icon { font-size: 1.3em; flex-shrink: 0; margin-top: 1px; }
    .upd-item-text { flex: 1; }
    .upd-item-name { font-weight: 700; color: #fff; font-size: .9em; }
    .upd-item-desc { color: #999; font-size: .78em; margin-top: 2px; line-height: 1.4; }
    .upd-close-btn {
      width: 100%; padding: 13px; border: none; border-radius: 30px;
      background: linear-gradient(135deg,#FF8C00,#FF4500); color: #fff;
      font-size: 1.05em; font-weight: 800; cursor: pointer; margin-top: 8px;
      box-shadow: 0 4px 20px rgba(255,140,0,.4);
      transition: transform .1s, box-shadow .1s;
    }
    .upd-close-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(255,140,0,.55); }

    /* ── BETA MODAL ── */
    #beta-modal-overlay {
      display: none; position: fixed; inset: 0; z-index: 99998;
      background: rgba(0,0,8,0.88); backdrop-filter: blur(6px);
      align-items: center; justify-content: center;
    }
    #beta-modal-overlay.open { display: flex; }
    #beta-modal {
      background: linear-gradient(160deg, #050e1a 0%, #0a1628 100%);
      border: 2px solid rgba(0,180,255,0.45);
      border-radius: 22px; padding: 26px 24px;
      width: min(440px, 94vw); max-height: 88vh;
      overflow-y: auto; color: #fff; text-align: center;
      box-shadow: 0 0 80px rgba(0,150,255,0.15), 0 12px 50px rgba(0,0,0,0.7);
    }
    .beta-step { display: none; }
    .beta-step.active { display: block; }
    input[type="email"] {
      width: 100%; padding: 13px 16px; border-radius: 12px;
      border: 2px solid rgba(0,180,255,.5);
      background: rgba(255,255,255,.07); color: #fff;
      font-size: 1.05em; margin-bottom: 10px; outline: none;
      text-align: center; transition: border-color .2s, box-shadow .2s;
    }
    input[type="email"]:focus { border-color: #44CCFF; box-shadow: 0 0 0 3px rgba(0,180,255,.2); }
    input[type="email"]::placeholder { color: rgba(255,255,255,.35); }

    /* ── AUTH MODAL ── */
    .auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
    .auth-tab {
      flex: 1; padding: 8px; border-radius: 10px; border: 1.5px solid rgba(255,140,0,0.3);
      background: rgba(255,255,255,0.04); color: #aaa; cursor: pointer; font-size: 0.88em;
    }
    .auth-tab.active { background: rgba(255,140,0,0.18); border-color: #FF8C00; color: #fff; }
    .auth-input {
      width: 100%; padding: 11px 14px; border-radius: 12px; margin-bottom: 10px;
      background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,140,0,0.3);
      color: #fff; font-size: 0.95em; outline: none; box-sizing: border-box;
    }
    .auth-input:focus { border-color: #FF8C00; }
    /* ── SKIN-SHOP MODAL ── */
    .skin-grid { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
    .skin-card {
      background: rgba(255,255,255,0.04); border: 1.5px solid rgba(255,255,255,0.1);
      border-radius: 16px; padding: 14px 16px; text-align: left; cursor: pointer;
      transition: border-color .15s, box-shadow .15s, background .15s;
      display: flex; align-items: center; gap: 14px;
    }
    .skin-card:hover { border-color: rgba(255,215,0,.55); background: rgba(255,215,0,.04); box-shadow: 0 0 16px rgba(255,215,0,.15); }
    .skin-card.active { border-color: #44FF88; background: rgba(68,255,136,.05); box-shadow: 0 0 16px rgba(68,255,136,.25); }
    .skin-card.owned { border-color: rgba(255,215,0,.35); }
    /* Skin-Shop: horizontales Layout */
    .skin-img { width: 60px; height: 60px; object-fit: contain; border-radius: 10px; flex-shrink: 0; }
    .skin-img-placeholder { width: 60px; height: 60px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 2em; background: rgba(255,140,0,0.12); flex-shrink: 0; }
    .skin-name { font-weight: 800; color: #fff; font-size: .92em; margin-bottom: 2px; }
    .skin-desc { color: #888; font-size: .72em; margin-bottom: 4px; line-height: 1.3; }
    /* Badges */
    .skin-badge {
      display: inline-block; font-size: .7em; font-weight: 800;
      padding: 2px 8px; border-radius: 8px; margin-top: 2px;
    }
    .skin-badge-free  { background: rgba(68,255,136,.15); color: #44FF88; border: 1px solid rgba(68,255,136,.3); }
    .skin-badge-owned { background: rgba(68,255,136,.12); color: #44FF88; border: 1px solid rgba(68,255,136,.25); }
    .skin-badge-price { background: rgba(255,215,0,.12);  color: #FFD700;  border: 1px solid rgba(255,215,0,.3); }
    /* Buy / equip buttons */
    .skin-btn {
      flex-shrink: 0; padding: 9px 14px; border-radius: 12px;
      border: none; font-weight: 800; font-size: .8em; cursor: pointer;
      white-space: nowrap; transition: filter .15s;
    }
    .skin-btn:hover { filter: brightness(1.12); }
    .skin-btn.buy     { background: linear-gradient(135deg,#FFD700,#FF8C00); color: #000; box-shadow: 0 0 12px rgba(255,180,0,.3); }
    .skin-btn.equip   { background: linear-gradient(135deg,#44FF88,#00CC66); color: #000; }
    .skin-btn.equipped{ background: rgba(68,255,136,.15); color: #44FF88; border: 1px solid rgba(68,255,136,.4); cursor: default; }
    .skin-btn.locked  { background: rgba(255,255,255,.07); color: #555; cursor: not-allowed; }

    /* ── SKIN-AUSWAHL VOR DEM SPIEL ── */
    .skinsel-card {
      display: flex; align-items: center; gap: 14px;
      background: rgba(255,255,255,0.04); border: 2px solid rgba(255,255,255,0.12);
      border-radius: 14px; padding: 12px 16px; cursor: pointer;
      transition: border-color .15s, box-shadow .15s, background .15s;
    }
    .skinsel-card:hover { border-color: #FFD700; background: rgba(255,215,0,0.06); box-shadow: 0 0 18px rgba(255,215,0,0.2); }
    .skinsel-card.selected { border-color: #44FF88; background: rgba(68,255,136,0.08); box-shadow: 0 0 20px rgba(68,255,136,0.3); }
    .skinsel-img { width: 60px; height: 60px; object-fit: contain; border-radius: 10px; flex-shrink: 0; }
    .skinsel-emoji { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; font-size: 2.2em; border-radius: 10px; background: rgba(255,140,0,0.12); flex-shrink: 0; }
    .skinsel-info { flex: 1; text-align: left; }
    .skinsel-name { font-weight: bold; font-size: 1em; color: #fff; }
    .skinsel-ability { font-size: .75em; color: #FFD700; margin: 2px 0; }
    .skinsel-stats { font-size: .7em; color: #aaa; line-height: 1.5; }
    .skinsel-play-btn {
      padding: 10px 18px; border-radius: 12px; border: none; font-weight: bold;
      font-size: .9em; cursor: pointer;
      background: linear-gradient(135deg, #44FF88, #00CC66); color: #000;
      flex-shrink: 0;
    }
    .skinsel-play-btn:hover { filter: brightness(1.1); }

    /* ── CHIP-SHOP MODAL ── */
    .pkg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
    .pkg-card {
      background: rgba(255,215,0,0.06); border: 1.5px solid rgba(255,215,0,0.25);
      border-radius: 14px; padding: 12px 8px; text-align: center;
    }
    .pkg-card.best { border-color: #FF8C00; box-shadow: 0 0 14px rgba(255,140,0,0.25); }
    .pkg-chips { font-size: 1.4em; font-weight: bold; color: #FFD700; }
    .pkg-price { color: #aaa; font-size: 0.85em; margin: 2px 0 6px; }
    .pkg-bonus { color: #FF8C00; font-size: 0.75em; font-weight: bold; min-height: 16px; }
    #paypal-container > div { margin: 4px 0 !important; }

    /* ── Bug-Report Screen ── */
    #scr-bugreport h2 { margin-bottom: 8px; }
    #scr-bugreport > p { margin-bottom: 14px; }
    #scr-bugreport select.auth-input { margin-bottom: 10px; }
    #scr-bugreport textarea.auth-input { margin-bottom: 10px; }

    /* Select-Box: dunkler Hintergrund damit Text lesbar bleibt */
    select.auth-input {
      background: rgba(10, 10, 30, 0.92) !important;
      color: #ddd !important;
      appearance: auto;
    }
    select.auth-input option {
      background: #12122a;
      color: #ddd;
    }

    .modal-back-btn {
      background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,255,255,0.12);
      color: #aaa; border-radius: 12px; padding: 9px 20px; cursor: pointer;
      margin-top: 8px; font-size: 0.88em; width: 100%;
    }
    .modal-back-btn:hover { color: #fff; border-color: #FF8C00; }

    /* ══════════════════════════════════════════════════════
       PROFIL-SCREEN (neu gestaltet)
    ══════════════════════════════════════════════════════ */
    .profile-hero {
      display: flex; flex-direction: column; align-items: center;
      padding: 20px 0 16px;
    }
    .profile-avatar {
      font-size: 3.2em;
      width: 76px; height: 76px;
      background: radial-gradient(circle, rgba(255,140,0,.18) 0%, rgba(255,140,0,.06) 70%);
      border: 2px solid rgba(255,140,0,.4);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      margin-bottom: 12px;
      box-shadow: 0 0 24px rgba(255,140,0,.18);
    }
    .profile-name {
      font-size: 1.35em; font-weight: 800; color: #fff;
      letter-spacing: .5px; margin-bottom: 3px;
    }
    .profile-sub { font-size: .75em; color: rgba(255,140,0,.6); letter-spacing: .05em; }

    /* Chips-Card */
    .profile-chip-card {
      display: flex; align-items: center; justify-content: space-between;
      background: linear-gradient(135deg, rgba(255,215,0,.1) 0%, rgba(255,140,0,.06) 100%);
      border: 1.5px solid rgba(255,190,0,.3);
      border-radius: 16px; padding: 14px 16px; margin-bottom: 12px;
    }
    .pcc-left { display: flex; align-items: center; gap: 12px; }
    .pcc-icon { font-size: 1.8em; }
    .pcc-amount { font-size: 1.15em; font-weight: 800; color: #FFD700; }
    .pcc-label { font-size: .72em; color: rgba(255,200,80,.6); margin-top: 1px; }
    .pcc-buy-btn {
      background: linear-gradient(135deg,#FF8C00,#FF4500);
      border: none; border-radius: 10px; color: #fff;
      font-weight: 800; font-size: .82em; padding: 8px 14px;
      cursor: pointer; white-space: nowrap;
    }
    .pcc-buy-btn:hover { filter: brightness(1.1); }

    /* Setting Row (PvP Toggle) */
    .profile-setting-row {
      display: flex; align-items: center; justify-content: space-between;
      background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09);
      border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; gap: 12px;
    }
    .psr-text { flex: 1; text-align: left; }
    .psr-title { color: #ddd; font-size: .9em; font-weight: 700; margin-bottom: 2px; }
    .psr-sub { color: #777; font-size: .72em; line-height: 1.3; }

    /* Action Buttons */
    .profile-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
    .profile-action-btn {
      display: flex; align-items: center; gap: 12px;
      width: 100%; padding: 12px 16px; border-radius: 14px;
      border: 1.5px solid; cursor: pointer; font-size: .92em; font-weight: 700;
      transition: filter .15s, transform .1s;
    }
    .profile-action-btn:hover { filter: brightness(1.12); }
    .profile-action-btn:active { transform: scale(.98); }
    .profile-action-upgrade {
      background: rgba(68,200,255,.08);
      border-color: rgba(68,200,255,.3);
      color: #44CCFF;
    }
    .profile-action-bug {
      background: rgba(255,68,68,.08);
      border-color: rgba(255,68,68,.25);
      color: #ff9999;
    }
    .profile-action-logout {
      background: rgba(255,255,255,.05);
      border-color: rgba(255,255,255,.12);
      color: #bbb;
    }
    .profile-action-logout:hover { border-color: rgba(255,80,80,.5); color: #ff9999; }

    /* ══════════════════════════════════════════════════════
       AUTH LOGIN/REGISTER (neu gestaltet)
    ══════════════════════════════════════════════════════ */
    .auth-header {
      display: flex; flex-direction: column; align-items: center;
      padding: 16px 0 14px; margin-bottom: 4px;
    }
    .auth-header-icon { font-size: 2.8em; margin-bottom: 8px; }
    .auth-header-title {
      font-size: 1.4em; font-weight: 900; color: #fff;
      letter-spacing: .5px; margin-bottom: 4px;
    }
    .auth-header-sub { font-size: .78em; color: rgba(255,255,255,.4); }

    /* Tabs */
    .auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
    .auth-tab {
      flex: 1; padding: 10px 8px; border-radius: 12px;
      border: 1.5px solid rgba(255,140,0,.25);
      background: rgba(255,255,255,.03); color: #888;
      cursor: pointer; font-size: .88em; font-weight: 700;
      transition: all .2s;
    }
    .auth-tab:hover { background: rgba(255,140,0,.08); color: #ccc; }
    .auth-tab.active {
      background: rgba(255,140,0,.15);
      border-color: #FF8C00;
      color: #fff;
      box-shadow: 0 0 12px rgba(255,140,0,.15);
    }

    /* Field mit Icon */
    .auth-field {
      position: relative; margin-bottom: 10px;
    }
    .auth-field-icon {
      position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
      font-size: 1em; pointer-events: none; z-index: 1;
      line-height: 1;
    }
    .auth-input {
      width: 100%; padding: 12px 14px; border-radius: 12px; margin-bottom: 0;
      background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,140,0,.28);
      color: #fff; font-size: .95em; outline: none; box-sizing: border-box;
      transition: border-color .2s, box-shadow .2s;
    }
    .auth-input:focus {
      border-color: #FF8C00;
      box-shadow: 0 0 0 3px rgba(255,140,0,.12);
    }
    .auth-input-icon { padding-left: 40px; }

    /* Info Box */
    .auth-info-box {
      background: rgba(255,180,0,.08); border: 1px solid rgba(255,180,0,.25);
      border-radius: 10px; padding: 10px 12px; font-size: .8em;
      color: rgba(255,200,100,.85); line-height: 1.5; margin-bottom: 12px;
      text-align: left;
    }
    .auth-info-box strong { color: #FFD700; }

    /* Submit Button */
    .auth-submit-btn {
      margin-top: 4px;
      box-shadow: 0 4px 20px rgba(255,140,0,.25) !important;
    }

    .auth-error { color: #ff5555; font-size: .82em; min-height: 18px; margin: 4px 0 6px; text-align: left; }
    .auth-success { color: #44ff88; font-size: .82em; min-height: 18px; margin: 4px 0 6px; }

    /* Google Sign-In Divider + Button */
    .auth-or-divider {
      display: flex; align-items: center; gap: 10px;
      margin: 14px 0 12px; color: rgba(255,255,255,.3); font-size: .75em;
    }
    .auth-or-divider::before,
    .auth-or-divider::after {
      content: ''; flex: 1;
      height: 1px; background: rgba(255,255,255,.1);
    }
    #google-signin-container {
      display: flex; justify-content: center;
      min-height: 44px;
    }

    /* ── CHIP-UPGRADE-SHOP ── */
    .upg-grid { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
    .upg-card {
      background: rgba(100,200,255,0.06); border: 1.5px solid rgba(100,200,255,0.2);
      border-radius: 14px; padding: 10px 14px; display: flex; align-items: center; gap: 12px;
      text-align: left;
    }
    .upg-card.owned { border-color: #44FF88; background: rgba(68,255,136,0.07); }
    .upg-icon { font-size: 1.8em; flex-shrink: 0; width: 36px; text-align: center; }
    .upg-info { flex: 1; }
    .upg-name { font-weight: 700; color: #fff; font-size: .92em; }
    .upg-desc { color: #aaa; font-size: .78em; margin-top: 1px; }
    .upg-btn {
      background: linear-gradient(135deg,#FFD700,#FF8C00); color: #000;
      border: none; border-radius: 10px; padding: 7px 12px;
      font-weight: 800; font-size: .8em; cursor: pointer; white-space: nowrap; flex-shrink: 0;
    }
    .upg-btn:disabled { background: rgba(255,255,255,.1); color: #555; cursor: default; }
    .upg-btn.owned-lbl { background: rgba(68,255,136,.2); color: #44FF88; cursor: default; }
    .upg-section-header {
      font-size: .78em; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
      color: #888; margin: 12px 0 4px; text-align: left; padding-left: 4px;
      border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 4px;
    }
    .upg-section-header:first-child { margin-top: 0; }

    /* ── AFFILIATE PANEL ── */
    .aff-link-box {
      display: flex; align-items: center; gap: 8px;
      background: rgba(255,140,0,0.08); border: 1.5px solid rgba(255,140,0,0.35);
      border-radius: 12px; padding: 10px 12px; margin: 10px 0;
    }
    .aff-link-box input {
      flex: 1; background: transparent; border: none; outline: none;
      color: #FFD700; font-size: .85em; font-family: monospace; letter-spacing: 1px;
    }
    .aff-copy-btn {
      background: linear-gradient(135deg,#FF8C00,#cc6600); border: none;
      border-radius: 8px; color: #000; font-weight: 800; font-size: .78em;
      padding: 6px 10px; cursor: pointer; flex-shrink: 0; white-space: nowrap;
    }
    .aff-copy-btn:active { opacity: .7; }
    .aff-stats-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0;
    }
    .aff-stat-card {
      background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
      border-radius: 12px; padding: 10px 8px; text-align: center;
    }
    .aff-stat-card .asc-val { font-size: 1.5em; font-weight: 800; color: #FFD700; }
    .aff-stat-card .asc-lbl { font-size: .72em; color: #aaa; margin-top: 2px; }
    .aff-stat-card.rewarded { border-color: rgba(68,255,136,.35); background: rgba(68,255,136,.06); }
    .aff-stat-card.rewarded .asc-val { color: #44FF88; }
    .aff-how { background: rgba(255,255,255,.04); border-radius: 12px; padding: 12px 14px;
      text-align: left; font-size: .82em; color: #ccc; line-height: 1.7; margin: 10px 0; }
    .aff-how b { color: #FF8C00; }
    .aff-msg { font-size: .82em; min-height: 18px; text-align: center; margin: 4px 0; }

    /* ── REVIVE SYSTEM ── */
    @keyframes revivePulse {
      0%,100% { box-shadow: 0 0 18px rgba(255,215,0,.55), 0 4px 16px rgba(0,0,0,.5); transform: scale(1); }
      50%      { box-shadow: 0 0 38px rgba(255,215,0,.95), 0 4px 20px rgba(0,0,0,.6); transform: scale(1.025); }
    }
    @keyframes reviveFadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
    .revive-section {
      border-radius: 18px;
      padding: 14px 16px 12px;
      margin: 10px 0 6px;
      background: rgba(255,200,0,.07);
      animation: reviveFadeIn .35s ease;
    }
    .revive-btn {
      background: linear-gradient(135deg, #FFD700, #FF8C00) !important;
      color: #000 !important;
      font-weight: 900 !important;
      font-size: 1.08em !important;
      animation: revivePulse 1.3s ease-in-out infinite;
      border: none !important;
      letter-spacing: .2px;
    }
    .revive-btn:disabled { animation: none !important; opacity: .45; }
    #revive-cd-wrap {
      position: relative; height: 24px;
      background: rgba(255,255,255,.1); border-radius: 12px;
      overflow: hidden; margin-bottom: 10px;
    }
    #revive-cd-fill {
      height: 100%;
      background: linear-gradient(90deg, #FF4500, #FFD700);
      border-radius: 12px;
    }
    #revive-cd-num {
      position: absolute; right: 10px; top: 50%;
      transform: translateY(-50%);
      font-weight: 900; font-size: .92em; color: #fff;
      text-shadow: 0 1px 4px rgba(0,0,0,.8);
      pointer-events: none;
    }

    /* ── TUTORIAL OVERLAY ── */
    #tutorial-overlay {
      position: fixed; inset: 0; z-index: 9000;
      background: rgba(0,0,0,0.82); display: flex;
      align-items: center; justify-content: center;
      animation: fadeInTut .35s ease;
    }
    @keyframes fadeInTut { from { opacity:0; } to { opacity:1; } }
    #tutorial-overlay.hidden { display: none; }
    .tut-box {
      background: #0f0f1e; border: 2px solid rgba(255,140,0,.4);
      border-radius: 20px; padding: 28px 24px; width: min(370px, 94vw);
      text-align: center; box-shadow: 0 8px 48px rgba(0,0,0,.8);
    }
    .tut-step { display: none; }
    .tut-step.active { display: block; }
    .tut-icon { font-size: 3em; margin-bottom: 10px; }
    .tut-title { color: #FF8C00; font-size: 1.25em; font-weight: 800; margin-bottom: 8px; }
    .tut-desc { color: #ccc; font-size: .92em; line-height: 1.55; margin-bottom: 18px; }
    .tut-key {
      display: inline-block; background: rgba(255,255,255,.12);
      border: 1.5px solid rgba(255,255,255,.3); border-radius: 8px;
      padding: 3px 10px; font-family: monospace; font-size: .95em;
      color: #fff; margin: 0 2px;
    }
    .tut-dots { display: flex; justify-content: center; gap: 7px; margin-bottom: 18px; }
    .tut-dot {
      width: 8px; height: 8px; border-radius: 50%;
      background: rgba(255,255,255,.2); transition: background .2s;
    }
    .tut-dot.active { background: #FF8C00; }
    .tut-btn-row { display: flex; gap: 8px; justify-content: center; }
    .tut-btn {
      flex: 1; padding: 10px 14px; border-radius: 14px; border: none;
      font-weight: 700; font-size: .9em; cursor: pointer; transition: opacity .15s;
    }
    .tut-btn:hover { opacity: .85; }
    .tut-btn-next { background: linear-gradient(135deg,#FF8C00,#FF4500); color: #fff; }
    .tut-btn-skip { background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.14); color: #888; }
    .chips-balance-line {
      display: flex; align-items: center; justify-content: center; gap: 8px;
      color: #FFD700; font-weight: bold; font-size: 0.95em; margin-bottom: 10px;
    }
    .chips-balance-line a { color: #FF8C00; font-size: 0.8em; cursor: pointer; text-decoration: none; }
    .chips-balance-line a:hover { text-decoration: underline; }

    /* ── Mobile Shoot-Button (veraltet – durch Touch-Zonen ersetzt) ── */
    #shoot-btn { display: none !important; }

    /* ── Auto-Shoot Toggle (linke untere Ecke, nur Mobile beim Spielen) ── */
    #auto-shoot-btn {
      position: fixed;
      bottom: 70px;
      left: 16px;
      z-index: 200;
      width: 64px;
      height: 64px;
      border-radius: 50%;
      border: 2.5px solid rgba(100, 200, 255, 0.4);
      background: rgba(10, 10, 30, 0.72);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      box-shadow: 0 4px 18px rgba(100, 200, 255, 0.12);
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 1px;
      cursor: pointer;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
      transition: border-color .2s, box-shadow .2s, background .2s;
    }
    #auto-shoot-btn.active {
      border-color: rgba(255, 215, 0, 0.9);
      box-shadow: 0 4px 24px rgba(255, 215, 0, 0.5);
      background: rgba(255, 200, 0, 0.16);
    }
    #auto-shoot-btn .as-icon { font-size: 22px; line-height: 1; }
    #auto-shoot-btn .as-lbl  { font-size: 8px; color: rgba(255,255,255,0.65); letter-spacing: 0.5px; font-weight: bold; }
    #auto-shoot-btn.active .as-lbl { color: #FFD700; }

    /* ── Touch Zone Hint (einmalig beim ersten Spielen anzeigen) ── */
    #touch-hint {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      z-index: 185;
      pointer-events: none;
      display: flex;
      opacity: 0;
      transition: opacity .7s;
    }
    #touch-hint.visible { opacity: 1; }
    #touch-hint .th-left {
      flex: 0 0 45%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      background: rgba(0, 180, 255, 0.07);
      border-right: 1px dashed rgba(0, 180, 255, 0.22);
    }
    #touch-hint .th-right {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      background: rgba(255, 200, 0, 0.07);
    }
    #touch-hint .th-icon { font-size: clamp(28px, 8vw, 46px); }
    #touch-hint .th-lbl  {
      font-size: clamp(11px, 3.5vw, 17px);
      font-weight: bold;
      letter-spacing: 1px;
    }
    #touch-hint .th-left  .th-lbl { color: rgba(100, 210, 255, 0.8); }
    #touch-hint .th-right .th-lbl { color: rgba(255, 210, 0, 0.8); }
    #touch-hint .th-sub   {
      font-size: clamp(9px, 2.5vw, 13px);
      opacity: 0.6;
      text-align: center;
      padding: 0 8px;
    }
    #touch-hint .th-left  .th-sub { color: rgba(100, 210, 255, 1); }
    #touch-hint .th-right .th-sub { color: rgba(255, 210, 0, 1); }

    /* ════════════════════════════════════════════════════
       CARD SYSTEM – Overlays, Karten, Animationen
    ════════════════════════════════════════════════════ */

    /* ── Basis-Overlay ── */
    .cs-overlay-base {
      position: fixed; inset: 0; z-index: 9000;
      display: flex; align-items: center; justify-content: center;
      background: rgba(0,0,0,0.88);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      transition: opacity .25s ease;
    }
    .cs-hidden  { display: none !important; }
    .cs-visible { display: flex !important; }

    /* ── Einzelne Karte ── */
    .cs-card {
      position: relative; overflow: hidden;
      width: 100px; min-height: 140px;
      border-radius: 12px; padding: 8px 6px 10px;
      display: flex; flex-direction: column; align-items: center; gap: 4px;
      cursor: pointer; user-select: none;
      border: 1.5px solid rgba(255,255,255,0.18);
      /* box-shadow is set per-rarity below (NOT inline) so selected override works */
      box-shadow: 0 0 14px rgba(150,150,150,0.35), 0 4px 12px rgba(0,0,0,.55);
      transition: transform .18s, box-shadow .2s, outline .1s;
      flex-shrink: 0;
    }
    /* Per-rarity default glows (all set in CSS, never inline) */
    .cs-card.rarity-rare      { box-shadow: 0 0 18px rgba(33,150,243,.55),   0 4px 12px rgba(0,0,0,.5); }
    .cs-card.rarity-epic      { box-shadow: 0 0 20px rgba(156,39,176,.7),    0 4px 12px rgba(0,0,0,.5); }
    .cs-card.rarity-legendary { box-shadow: 0 0 26px rgba(255,160,0,.85),    0 4px 12px rgba(0,0,0,.5); }

    .cs-card:hover { transform: translateY(-4px) scale(1.04); }
    .cs-card.cs-card-selected {
      outline: 3px solid #FFD700;
      outline-offset: 3px;
      transform: translateY(-6px) scale(1.06);
      /* No !important needed — box-shadow is no longer inline */
      box-shadow: 0 0 0 4px #FFD700, 0 0 32px rgba(255,215,0,.85), 0 6px 20px rgba(0,0,0,.7);
    }
    /* Golden tint overlay when selected */
    .cs-card.cs-card-selected::before {
      content: '';
      position: absolute; inset: 0;
      background: rgba(255, 215, 0, 0.20);
      border-radius: 11px;
      z-index: 2; pointer-events: none;
    }
    /* Checkmark badge (top-left, avoids level badge at top-right) */
    .cs-card.cs-card-selected::after {
      content: '✓';
      position: absolute; top: 26px; left: 4px;
      background: #FFD700; color: #1a1a1a;
      border-radius: 50%; width: 16px; height: 16px;
      display: block; line-height: 16px;
      text-align: center;
      font-size: 10px; font-weight: 900;
      z-index: 10; pointer-events: none;
    }
    .cs-card.cs-card-unowned { opacity: .45; filter: grayscale(.55); }
    .cs-card-shine {
      position: absolute; top: -40%; left: -40%;
      width: 60%; height: 180%; pointer-events: none;
      background: linear-gradient(105deg,transparent 40%,rgba(255,255,255,.12) 50%,transparent 60%);
      transform: rotate(25deg);
    }
    .cs-card-rarity-bar {
      width: calc(100% + 12px); margin: -8px -6px 2px;
      padding: 2px 0; text-align: center;
      font-size: .58em; font-weight: 800; letter-spacing: .8px;
      color: #fff; text-transform: uppercase;
      border-radius: 10px 10px 0 0;
    }
    .cs-card-emoji   { font-size: 2.2em; line-height: 1; margin: 4px 0; }
    .cs-card-art     { width: 52px; height: 52px; margin: 4px auto 2px; display: flex; align-items: center; justify-content: center; }
    .cs-card-art img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
    .cs-card-name    { font-size: .66em; font-weight: 700; color: #fff; text-align: center; line-height: 1.2; }
    .cs-card-power   { font-size: .72em; font-weight: 800; color: #FFD700; margin-top: auto; }
    .cs-card-desc    { font-size: .52em; color: rgba(255,255,255,.55); text-align: center; line-height: 1.3; display: none; }
    .cs-card-level   { position: absolute; top: 4px; right: 4px; font-size: .55em; color: #FFD700; font-weight: 800; }
    .cs-card-selected-mark { position: absolute; bottom: 4px; right: 4px; color: #FFD700; font-size: .8em; }

    /* Rarity-spezifische Borders */
    .cs-card.rarity-rare      { border-color: rgba(66,165,245,.6); }
    .cs-card.rarity-epic      { border-color: rgba(206,147,216,.7); }
    .cs-card.rarity-legendary { border-color: rgba(255,215,0,.8); }

    /* ── Karten-Sammlung (Übersicht im Hauptmenü) ── */
    #cs-collection-overlay {
      position: fixed; inset: 0; z-index: 10000;
      background: rgba(0,0,0,.92);
      backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
      overflow-y: auto; -webkit-overflow-scrolling: touch;
    }
    #cs-coll-inner {
      max-width: 700px; margin: 0 auto;
      padding: 16px 14px 50px;
    }
    #cs-coll-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 6px; padding-top: 8px;
    }
    #cs-coll-title  { font-size: 1.35em; font-weight: 900; color: #fff; letter-spacing: .5px; }
    #cs-coll-stats  { font-size: .78em; color: #aaa; margin-bottom: 12px; }
    #cs-coll-close  {
      background: rgba(255,255,255,.12); border: none;
      border-radius: 50%; width: 36px; height: 36px;
      font-size: 1.1em; cursor: pointer; color: #fff; flex-shrink: 0;
      transition: background .15s;
    }
    #cs-coll-close:hover { background: rgba(255,255,255,.22); }
    #cs-coll-tabs   { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
    .cs-coll-tab {
      padding: 5px 11px; border-radius: 20px;
      border: 1px solid rgba(255,255,255,.18);
      background: rgba(255,255,255,.06); color: #bbb;
      font-size: .75em; cursor: pointer; white-space: nowrap;
      transition: background .15s, color .15s, border-color .15s;
    }
    .cs-coll-tab:hover   { background: rgba(255,255,255,.14); color: #fff; }
    .cs-coll-tab.active  { background: rgba(255,215,0,.15); border-color: #FFD700; color: #FFD700; }
    #cs-coll-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
      gap: 10px;
    }
    #cs-coll-grid .cs-card {
      width: 100%; min-width: 0;
      box-sizing: border-box;
    }
    #cs-coll-login-hint { display: none; text-align: center; color: #aaa; padding: 40px 0; }
    @media (max-width: 480px) {
      #cs-coll-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
      #cs-coll-inner { padding: 12px 10px 50px; }
    }

    /* ── Card-Invite Overlay ── */
    #cs-invite-overlay {
      position: fixed; z-index: 10100;
      bottom: 90px; left: 50%; transform: translateX(-50%);
      width: min(380px, 94vw);
      background: linear-gradient(135deg, rgba(20,10,40,.97), rgba(35,15,70,.97));
      border: 1.5px solid rgba(255,215,0,.5);
      border-radius: 16px; padding: 14px 18px;
      box-shadow: 0 0 30px rgba(255,160,0,.4), 0 6px 24px rgba(0,0,0,.7);
      backdrop-filter: blur(8px);
    }
    .cs-invite-row1 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
    .cs-invite-icon { font-size: 1.6em; }
    .cs-invite-text { flex: 1; }
    .cs-invite-title { font-size: .78em; font-weight: 800; color: #FFD700; letter-spacing: .5px; }
    #cs-invite-nick { font-size: .88em; font-weight: 700; color: #fff; }
    .cs-invite-row2 { display: flex; gap: 8px; align-items: center; }
    .cs-invite-btn  {
      flex: 1; padding: 9px 0; border: none; border-radius: 10px; cursor: pointer;
      font-size: .82em; font-weight: 800; letter-spacing: .3px; transition: transform .12s;
    }
    .cs-invite-btn:active { transform: scale(.96); }
    .cs-invite-btn-accept  { background: linear-gradient(135deg,#2E7D32,#43A047); color: #fff; }
    .cs-invite-btn-decline { background: rgba(255,255,255,.1); color: #aaa; border: 1px solid rgba(255,255,255,.15); }
    #cs-invite-timer { font-size: .75em; color: #FFD700; font-weight: 700; min-width: 24px; text-align: center; }
    .cs-invite-bar-wrap { height: 3px; background: rgba(255,255,255,.12); border-radius: 2px; margin-top: 8px; }
    #cs-invite-bar { height: 100%; background: #FFD700; border-radius: 2px; width: 100%; }

    /* ── Deck-Picker Overlay ── */
    /* ══════════════════════════════════════════════════
       DECK-PICKER OVERLAY – komplett neu
    ══════════════════════════════════════════════════ */
    #cs-deck-overlay {
      position: fixed; inset: 0; z-index: 10200;
      background: rgba(5, 0, 20, .97);
      backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
      display: flex; flex-direction: column;
      overflow: hidden;
    }

    /* ── Fester oberer Bereich ── */
    .cs-deck-top {
      flex: 0 0 auto;   /* NIEMALS flex-grow — verhindert den riesigen Gradient-Block */
      border-bottom: 1px solid rgba(255,255,255,.1);
    }
    .cs-deck-header {
      padding: 12px 16px 8px;
      display: flex; align-items: center; justify-content: space-between; gap: 10px;
    }
    .cs-deck-title {
      font-size: 1.05em; font-weight: 900; color: #FFD700;
      letter-spacing: .5px; white-space: nowrap;
    }
    .cs-deck-header-right {
      display: flex; align-items: center; gap: 10px;
    }
    #cs-deck-selected-count {
      font-size: .8em; font-weight: 700;
      color: rgba(255,255,255,.6);
      background: rgba(255,255,255,.07);
      border-radius: 8px; padding: 2px 8px;
      white-space: nowrap;
    }
    .cs-deck-cd-label {
      font-size: .8em; color: #FF7043; font-weight: 800;
      background: rgba(255,100,0,.12); border-radius: 8px; padding: 2px 8px;
      white-space: nowrap;
    }
    #cs-deck-countdown { font-weight: 900; }

    .cs-deck-hud {
      padding: 4px 16px 8px;
    }
    #cs-deck-power-preview {
      font-size: .85em; color: #FFD700; font-weight: 700;
    }

    /* Timer-Balken – NUR 4px hoch, kein flex-grow! */
    .cs-deck-timer-wrap {
      height: 4px;
      background: rgba(255,255,255,.08);
      flex: none;   /* ← der eigentliche Fix des Bugs */
      overflow: hidden;
    }
    #cs-deck-timer-bar {
      height: 100%;
      background: linear-gradient(90deg, #FF7043, #FFD700);
      border-radius: 0;
      transform-origin: left;
    }

    /* Fehler-Meldung direkt unter Timer */
    #cs-deck-error {
      color: #ff6b6b; font-size: .8em; font-weight: 700;
      text-align: center; padding: 4px 16px; min-height: 0;
      opacity: 0; transition: opacity .2s;
    }
    #cs-deck-error.cs-deck-error-visible { opacity: 1; min-height: 24px; }

    /* ── Scrollbarer Karten-Grid ── */
    #cs-deck-grid {
      flex: 1 1 auto;       /* nimmt den restlichen Platz */
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding: 16px 12px 90px; /* unten Platz für Footer */
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
      gap: 14px;
      align-content: flex-start;
    }
    /* Karten im Deck-Picker: volle Grid-Breite, größer */
    #cs-deck-grid .cs-card {
      width: 100%; min-width: 0;
      min-height: 178px;
      padding: 8px 7px 12px;
      box-sizing: border-box;
    }
    #cs-deck-grid .cs-card .cs-card-art   { width: 72px; height: 72px; }
    #cs-deck-grid .cs-card .cs-card-emoji { font-size: 3em; }
    #cs-deck-grid .cs-card .cs-card-name  { font-size: .75em; }
    #cs-deck-grid .cs-card .cs-card-power { font-size: .8em; }
    #cs-deck-grid .cs-card .cs-card-desc  { display: block; font-size: .58em; margin-top: 2px; }

    /* ── Fixer Footer ── */
    .cs-deck-footer {
      flex: 0 0 auto;
      /* NO position:sticky — flex layout keeps this at bottom naturally */
      padding: 10px 14px max(12px, env(safe-area-inset-bottom));
      background: rgba(5,0,20,.99);
      border-top: 1px solid rgba(255,255,255,.15);
      display: flex; gap: 10px;
      z-index: 5;
      min-height: 64px;
    }
    #cs-deck-submit-btn {
      flex: 1; padding: 14px 10px; border: none; border-radius: 14px;
      background: linear-gradient(135deg, #1B5E20, #43A047);
      color: #fff; font-size: .95em; font-weight: 800; cursor: pointer;
      transition: transform .1s, background .2s, box-shadow .2s;
      letter-spacing: .3px;
      box-shadow: 0 0 18px rgba(67,160,71,.5);
    }
    #cs-deck-submit-btn:disabled {
      cursor: not-allowed;
      background: rgba(255,255,255,.09);
      color: rgba(255,255,255,.55);
      box-shadow: none;
      border: 1px dashed rgba(255,255,255,.2);
    }
    #cs-deck-submit-btn:not(:disabled):hover {
      background: linear-gradient(135deg, #2E7D32, #66BB6A);
      box-shadow: 0 0 28px rgba(102,187,106,.7);
    }
    #cs-deck-submit-btn:not(:disabled):active { transform: scale(.97); }
    .cs-deck-close-btn {
      padding: 13px 14px; border: 1px solid rgba(255,255,255,.15);
      border-radius: 14px; background: rgba(255,255,255,.06);
      color: #aaa; font-size: .82em; cursor: pointer;
      white-space: nowrap;
    }
    .cs-deck-close-btn:active { background: rgba(255,255,255,.12); }

    /* ── Battle Overlay (FIFA-Style) ── */
    #cs-battle-overlay {
      position: fixed; inset: 0; z-index: 10400;
      background: rgba(0,0,0,.97);
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      gap: 14px;
      overflow-y: auto; -webkit-overflow-scrolling: touch;
      padding: 16px 10px 20px;
    }
    .cs-battle-title {
      font-size: clamp(1.6em, 5vw, 2.8em);
      font-weight: 900; color: #FFD700;
      text-shadow: 0 0 30px rgba(255,215,0,.8), 0 0 60px rgba(255,140,0,.5);
      letter-spacing: 2px; text-transform: uppercase;
    }
    .cs-battle-section { display: flex; flex-direction: column; align-items: center; gap: 8px; }
    .cs-battle-side-label {
      font-size: .72em; font-weight: 800; letter-spacing: 1px;
      color: rgba(255,255,255,.5); text-transform: uppercase;
    }
    .cs-battle-card-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
    .cs-battle-card-row .cs-card { width: 80px; min-height: 112px; font-size: .9em; }
    .cs-battle-clash {
      display: flex; align-items: center; gap: 20px;
      background: rgba(255,255,255,.04);
      border: 1px solid rgba(255,215,0,.3);
      border-radius: 18px; padding: 14px 28px;
      box-shadow: 0 0 40px rgba(255,160,0,.2);
    }
    .cs-battle-vs {
      font-size: 1.4em; font-weight: 900; color: #FF7043;
      text-shadow: 0 0 20px rgba(255,112,67,.9);
    }
    .cs-battle-power {
      font-size: clamp(1.4em, 4vw, 2.2em);
      font-weight: 900; position: relative;
      transform: scale(0); transition: transform .3s cubic-bezier(.2, 1.4, .4, 1);
    }
    .cs-battle-power.cs-slammed { transform: scale(1); }
    .cs-power-mine  { color: #66FF88; text-shadow: 0 0 20px rgba(100,255,136,.8); }
    .cs-power-enemy { color: #FF6666; text-shadow: 0 0 20px rgba(255,100,100,.8); }
    .cs-battle-crit {
      position: absolute; top: -14px; right: -14px;
      font-size: 11px; background: #FF7043;
      border-radius: 6px; padding: 2px 7px; color: #fff; font-weight: 800;
      white-space: nowrap; pointer-events: none;
      box-shadow: 0 0 10px rgba(255,112,67,.6);
    }
    .cs-battle-banner {
      font-size: clamp(2em, 6vw, 3.5em);
      font-weight: 900; text-transform: uppercase;
      letter-spacing: 3px;
    }
    .cs-banner-win  { color: #FFD700; text-shadow: 0 0 40px rgba(255,215,0,.9), 0 0 80px rgba(255,160,0,.6); }
    .cs-banner-lose { color: #FF5252; text-shadow: 0 0 40px rgba(255,82,82,.8); }

    /* ── Warten-Overlay ── */
    #cs-waiting-overlay {
      position: fixed; inset: 0; z-index: 10300;
      background: rgba(0,0,0,.85);
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
    }
    .cs-waiting-spinner {
      width: 48px; height: 48px; border-radius: 50%;
      border: 4px solid rgba(255,215,0,.2);
      border-top-color: #FFD700;
      animation: cs-spin 1s linear infinite;
    }
    #cs-waiting-text { font-size: .92em; color: rgba(255,255,255,.7); }
    @keyframes cs-spin { to { transform: rotate(360deg); } }

    /* ── Result-Screen ── */
    #cs-result-overlay {
      position: fixed; inset: 0; z-index: 10500;
      background: rgba(0,0,0,.92);
      display: flex; align-items: center; justify-content: center;
      backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    }
    .cs-result-box {
      width: min(400px, 92vw); border-radius: 20px;
      padding: 28px 24px; text-align: center;
      display: flex; flex-direction: column; align-items: center; gap: 14px;
      border: 2px solid;
    }
    .cs-result-win  { background: linear-gradient(145deg,#0A1F0A,#143314); border-color: rgba(255,215,0,.5); box-shadow: 0 0 50px rgba(255,215,0,.3); }
    .cs-result-lose { background: linear-gradient(145deg,#1F0A0A,#331414); border-color: rgba(255,82,82,.4);  box-shadow: 0 0 40px rgba(255,82,82,.2); }
    .cs-result-icon  { font-size: 3.5em; line-height: 1; }
    .cs-result-title { font-size: 1.8em; font-weight: 900; }
    .cs-result-win  .cs-result-title { color: #FFD700; text-shadow: 0 0 20px rgba(255,215,0,.7); }
    .cs-result-lose .cs-result-title { color: #FF5252; }
    .cs-result-powers {
      display: flex; gap: 12px; align-items: center;
      font-size: .85em; color: rgba(255,255,255,.7);
    }
    .cs-result-my-power  b { color: #66FF88; }
    .cs-result-en-power  b { color: #FF6666; }
    .cs-result-sep { color: rgba(255,255,255,.3); }
    .cs-result-reward { width: 100%; }
    .cs-result-reward-title { font-size: .8em; color: #FFD700; font-weight: 700; margin-bottom: 8px; }
    .cs-result-reward-cards { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
    .cs-reward-card-anim { animation: cs-reward-pop .5s cubic-bezier(.2,1.4,.4,1) both; }
    @keyframes cs-reward-pop { from { transform: scale(0) rotate(-12deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
    .cs-result-close-btn {
      width: 100%; padding: 13px; border: none; border-radius: 14px; cursor: pointer;
      font-size: .9em; font-weight: 800; color: #fff;
      background: linear-gradient(135deg,#1565C0,#1976D2);
      transition: transform .12s;
    }
    .cs-result-close-btn:active { transform: scale(.97); }

    /* ── Animationen ── */
    .cs-anim-pop {
      animation: cs-pop .4s cubic-bezier(.2,1.4,.4,1) both;
    }
    @keyframes cs-pop {
      from { transform: scale(0); opacity: 0; }
      to   { transform: scale(1); opacity: 1; }
    }
    .cs-anim-fly-left {
      transform: translateX(-120vw) rotate(-15deg);
      transition: transform .35s cubic-bezier(.2,1,.4,1), opacity .2s;
      opacity: 0;
    }
    .cs-anim-fly-right {
      transform: translateX(120vw) rotate(15deg);
      transition: transform .35s cubic-bezier(.2,1,.4,1), opacity .2s;
      opacity: 0;
    }
    .cs-anim-fly-left.cs-anim-landed,
    .cs-anim-fly-right.cs-anim-landed {
      transform: translateX(0) rotate(0);
      opacity: 1;
    }
    .cs-anim-slam {
      animation: cs-slam-in .35s cubic-bezier(.2,1.4,.3,1) both;
    }
    @keyframes cs-slam-in {
      from { transform: scale(3); opacity: 0; }
      to   { transform: scale(1); opacity: 1; }
    }

    /* ── Cards-Toggle im Profil ── */
    .cs-profile-toggle {
      display: flex; align-items: center; justify-content: space-between;
      padding: 10px 14px; background: rgba(255,255,255,.04);
      border: 1px solid rgba(255,255,255,.08); border-radius: 10px; margin: 6px 0;
    }
    .cs-profile-toggle label { font-size: .84em; color: rgba(255,255,255,.7); }

    /* ── Karten-Typ Badge ── */
    .cs-card-type-badge {
      position: absolute;
      bottom: 22px; right: 4px;
      font-size: .65em;
      padding: 1px 5px;
      border-radius: 6px;
      color: #fff;
      font-weight: 700;
      opacity: .9;
      pointer-events: none;
    }
    .cs-card { position: relative; }

    /* ── Deck-Picker: Fehler-Meldung ── */
    #cs-deck-error {
      color: #ff6b6b;
      font-size: .82em;
      font-weight: 600;
      text-align: center;
      padding: 4px 12px;
      min-height: 22px;
      opacity: 0;
      transition: opacity .2s;
    }
    #cs-deck-error.cs-deck-error-visible { opacity: 1; }

    /* ── 3-Runden Display ── */
    .cs-battle-rounds {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin: 10px 16px;
      background: rgba(0,0,0,.35);
      border-radius: 12px;
      padding: 10px 14px;
    }
    .cs-battle-round {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: .88em;
      opacity: 0;
    }
    /* Override cs-anim-pop for rounds: slide in from left */
    .cs-battle-round.cs-anim-pop {
      animation: cs-round-slide .4s cubic-bezier(.2,1.2,.4,1) forwards;
    }
    @keyframes cs-round-slide {
      from { opacity: 0; transform: translateX(-28px); }
      to   { opacity: 1; transform: translateX(0); }
    }
    .cs-round-label { flex: 1; font-weight: 700; color: rgba(255,255,255,.85); font-size: .85em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .cs-round-pow   { font-size: 1.05em; font-weight: 900; min-width: 36px; text-align: center; }
    .cs-round-my    { color: #66FF88; text-shadow: 0 0 8px rgba(100,255,136,.5); }
    .cs-round-en    { color: #FF6666; text-shadow: 0 0 8px rgba(255,100,100,.5); }
    .cs-round-sep   { color: rgba(255,255,255,.4); font-size: .78em; }
    .cs-round-result { font-size: 1.15em; min-width: 22px; text-align: center; }
    .cs-round-win  { color: #69f0ae; }
    .cs-round-lose { color: #ef5350; }
    .cs-round-draw { color: #ffeb3b; }

    /* ── Battle Arena Row ── */
    .cs-battle-arena-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      justify-content: center;
      width: 100%;
    }
    .cs-battle-arena-vs {
      font-size: 1.4em;
      font-weight: 900;
      color: #FFD700;
      align-self: center;
      padding: 0 4px;
      text-shadow: 0 0 12px rgba(255,200,0,.8);
    }

    /* ── Result: Runden-Chips ── */
    .cs-result-rounds {
      display: flex;
      gap: 6px;
      justify-content: center;
      flex-wrap: wrap;
      margin: 6px 0;
    }
    .cs-result-round-chip {
      font-size: .72em;
      padding: 3px 8px;
      border-radius: 8px;
      font-weight: 700;
    }
    .cs-rrc-win  { background: rgba(105,240,174,.2); color: #69f0ae; border: 1px solid #69f0ae; }
    .cs-rrc-lose { background: rgba(239,83,80,.2);   color: #ef5350; border: 1px solid #ef5350; }
    .cs-rrc-draw { background: rgba(255,235,59,.15); color: #ffeb3b; border: 1px solid #ffeb3b; }

    /* ── Lootbox Karten-Toast ── */
    .cs-card-loot-toast {
      position: fixed;
      bottom: 100px;
      left: 50%;
      transform: translateX(-50%);
      background: linear-gradient(135deg, #2E0050, #6A1B9A);
      color: #fff;
      border: 1px solid rgba(206,147,216,.6);
      border-radius: 20px;
      padding: 8px 18px;
      font-size: .88em;
      font-weight: 700;
      box-shadow: 0 0 20px rgba(156,39,176,.6);
      z-index: 9999;
      animation: cs-toast-pop .35s ease-out forwards, cs-toast-fade 1s ease-in 2.5s forwards;
      pointer-events: none;
    }
    @keyframes cs-toast-pop  { from { transform: translateX(-50%) scale(.7); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
    @keyframes cs-toast-fade { from { opacity: 1; } to { opacity: 0; } }

    /* ── Karten-Flip Animation ── */
    @keyframes cs-card-flip {
      0%   { transform: rotateY(0deg); }
      50%  { transform: rotateY(90deg); }
      100% { transform: rotateY(0deg); }
    }
    .cs-card-flip { animation: cs-card-flip .5s ease-in-out; }

    /* ═══════════════════════════════════════════════════
       CARD SYSTEM – Responsive Mobile
    ═══════════════════════════════════════════════════ */

    /* ── Alle Mobil ≤ 768px ── */
    @media (max-width: 768px) {
      /* Battle Overlay: scrollbar oben */
      #cs-battle-overlay {
        justify-content: flex-start;
        padding: 12px 8px 24px;
        gap: 10px;
      }
      .cs-battle-title  { font-size: 1.4em; letter-spacing: 1px; }
      .cs-battle-arena-row { gap: 6px; }
      .cs-battle-card-row { gap: 5px; }
      .cs-battle-card-row .cs-card { width: 72px; min-height: 100px; font-size: .8em; }
      .cs-battle-clash  { padding: 10px 18px; gap: 14px; }
      .cs-battle-rounds { padding: 8px 10px; gap: 7px; margin: 6px 8px; }
      .cs-battle-banner { font-size: 2em; }

      /* Result */
      .cs-result-box { padding: 22px 18px; gap: 10px; }
      .cs-result-icon  { font-size: 2.8em; }
      .cs-result-title { font-size: 1.5em; }
    }

    /* ── Kleine Phones ≤ 480px ── */
    @media (max-width: 480px) {
      /* Allgemeine Karten-Größe im Deck-Picker */
      #cs-deck-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 9px;
        padding: 10px 8px 80px;
      }
      #cs-deck-grid .cs-card { width: 100%; min-height: 148px; }
      #cs-deck-grid .cs-card .cs-card-art   { width: 56px; height: 56px; }
      #cs-deck-grid .cs-card .cs-card-emoji { font-size: 2.5em; }
      #cs-deck-grid .cs-card .cs-card-desc  { display: none; }

      /* Header kompakter */
      .cs-deck-title  { font-size: .88em; }
      .cs-deck-header { padding: 9px 11px 5px; }
      .cs-deck-hud    { padding: 3px 11px 5px; }
      #cs-deck-power-preview { font-size: .76em; }
      #cs-deck-selected-count { font-size: .72em; }
      .cs-deck-cd-label { font-size: .72em; }

      /* Footer kompakter */
      .cs-deck-footer { padding: 8px 9px max(8px, env(safe-area-inset-bottom)); gap: 7px; min-height: 58px; }
      #cs-deck-submit-btn { padding: 12px 8px; font-size: .86em; }
      .cs-deck-close-btn  { padding: 12px 10px; font-size: .75em; }

      /* Battle (noch kleiner) */
      .cs-battle-card-row .cs-card { width: 56px; min-height: 82px; font-size: .72em; }
      .cs-battle-card-row { gap: 3px; }
      .cs-battle-power { font-size: 1.6em; }
      .cs-battle-clash { padding: 8px 12px; gap: 10px; }
      .cs-battle-title { font-size: 1.2em; }

      /* Rounds auf kleinen Screens */
      .cs-battle-rounds { padding: 7px 8px; gap: 5px; }
      .cs-round-label   { font-size: .76em; }
      .cs-round-pow     { font-size: .92em; min-width: 28px; }

      /* Result */
      .cs-result-box    { padding: 18px 14px; gap: 8px; }
      .cs-result-icon   { font-size: 2.4em; }
      .cs-result-title  { font-size: 1.3em; }
      .cs-result-powers { flex-direction: column; gap: 4px; font-size: .8em; text-align: center; }
      .cs-result-sep    { display: none; }

      /* Invite */
      #cs-invite-overlay { bottom: 80px; }
    }

    /* ── Tablet / mittlere Screens (481–768px) ── */
    @media (min-width: 481px) and (max-width: 768px) {
      #cs-deck-grid {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
        gap: 11px;
      }
      #cs-deck-grid .cs-card { min-height: 158px; }
    }

    /* ═══════════════════════════════════════════
       VICTORY SCREEN  (scr-victory)
    ═══════════════════════════════════════════ */
    .vc-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 9999;
      align-items: center;
      justify-content: center;
      background: rgba(0,0,0,0.55);
      pointer-events: all;
      overflow-y: auto;
      padding: 16px 0;
    }

    /* ── Konfetti ── */
    .vc-confetti {
      position: fixed;
      inset: 0;
      pointer-events: none;
      overflow: hidden;
    }
    .vc-confetti span {
      position: absolute;
      top: -20px;
      width: 10px;
      height: 14px;
      border-radius: 2px;
      animation: vc-fall 3.2s ease-in infinite;
      opacity: 0;
    }
    .vc-confetti span:nth-child(1)  { left:8%;   background:#FF5E5E; animation-delay:.1s;  width:8px;  height:12px; }
    .vc-confetti span:nth-child(2)  { left:15%;  background:#FFD700; animation-delay:.5s;  width:7px;  }
    .vc-confetti span:nth-child(3)  { left:24%;  background:#5BFFB0; animation-delay:.9s;  }
    .vc-confetti span:nth-child(4)  { left:33%;  background:#A78BFA; animation-delay:.3s;  height:10px; }
    .vc-confetti span:nth-child(5)  { left:44%;  background:#FF8C00; animation-delay:.7s;  width:9px;  }
    .vc-confetti span:nth-child(6)  { left:55%;  background:#38BDF8; animation-delay:.2s;  }
    .vc-confetti span:nth-child(7)  { left:63%;  background:#FF5E5E; animation-delay:.6s;  width:7px;  height:11px; }
    .vc-confetti span:nth-child(8)  { left:72%;  background:#FFD700; animation-delay:1.1s; }
    .vc-confetti span:nth-child(9)  { left:80%;  background:#5BFFB0; animation-delay:.4s;  width:8px;  }
    .vc-confetti span:nth-child(10) { left:88%;  background:#A78BFA; animation-delay:.8s;  }
    .vc-confetti span:nth-child(11) { left:5%;   background:#38BDF8; animation-delay:1.4s; width:6px;  }
    .vc-confetti span:nth-child(12) { left:48%;  background:#FF5E5E; animation-delay:1.7s; height:9px; }
    .vc-confetti span:nth-child(13) { left:93%;  background:#FFD700; animation-delay:1.0s; }
    .vc-confetti span:nth-child(14) { left:37%;  background:#5BFFB0; animation-delay:2.1s; width:9px;  }
    .vc-confetti span:nth-child(15) { left:70%;  background:#FF8C00; animation-delay:1.6s; height:13px; }
    @keyframes vc-fall {
      0%   { transform: translateY(0) rotate(0deg);   opacity: 1; }
      80%  { opacity: 0.8; }
      100% { transform: translateY(110vh) rotate(540deg); opacity: 0; }
    }

    /* ── Karotte oben ── */
    .vc-top-icon {
      font-size: 2.6em;
      margin-bottom: -20px;
      position: relative;
      z-index: 1;
      filter: drop-shadow(0 4px 12px rgba(255,140,0,0.7));
      animation: vc-bounce 1s ease-in-out infinite alternate;
    }
    @keyframes vc-bounce {
      from { transform: translateY(0); }
      to   { transform: translateY(-8px); }
    }

    /* ── Karte ── */
    .vc-card {
      background: linear-gradient(170deg, #1E1B3A 0%, #12102A 100%);
      border: 1.5px solid rgba(255,140,0,0.35);
      border-radius: 24px;
      padding: 28px 24px 20px;
      width: min(420px, 92vw);
      text-align: center;
      color: #fff;
      font-family: 'Segoe UI', Arial, sans-serif;
      position: relative;
      box-shadow: 0 12px 50px rgba(0,0,0,0.75), 0 0 60px rgba(255,140,0,0.1);
    }
    /* Glanz-Linie oben */
    .vc-card::before {
      content: '';
      position: absolute;
      top: 0; left: 8%; width: 84%; height: 1.5px;
      background: linear-gradient(90deg, transparent, rgba(255,210,80,0.35), transparent);
      border-radius: 24px 24px 0 0;
    }

    /* ── Titel ── */
    .vc-title {
      font-size: clamp(2em, 8vw, 2.8em);
      font-weight: 900;
      line-height: 1.05;
      color: #FF8C00;
      text-shadow: 0 0 30px rgba(255,140,0,0.6), 0 2px 0 rgba(0,0,0,0.4);
      letter-spacing: -0.5px;
      margin-bottom: 6px;
    }
    .vc-subtitle {
      font-size: .9em;
      color: rgba(255,255,255,0.55);
      margin-bottom: 20px;
      letter-spacing: .3px;
    }

    /* ── Stats ── */
    .vc-stats {
      display: flex;
      align-items: stretch;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 16px;
      margin-bottom: 20px;
      overflow: hidden;
    }
    .vc-stat {
      flex: 1;
      padding: 14px 8px 12px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }
    .vc-stat-icon {
      font-size: 1.65em;
      line-height: 1;
    }
    .vc-stat-value {
      font-size: 1.5em;
      font-weight: 800;
      color: #FF9A00;
      line-height: 1;
    }
    .vc-stat-label {
      font-size: .68em;
      color: rgba(255,255,255,0.45);
      text-align: center;
      line-height: 1.25;
    }
    .vc-stat-divider {
      width: 1px;
      background: rgba(255,255,255,0.1);
      margin: 10px 0;
    }

    /* ── Sterne ── */
    .vc-stars {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
      margin-bottom: 10px;
    }
    .vc-star {
      font-size: clamp(2.2em, 9vw, 3em);
      line-height: 1;
      transition: transform .3s;
    }
    .vc-star-on {
      color: #FFD700;
      text-shadow: 0 0 18px rgba(255,215,0,0.8), 0 2px 0 rgba(180,100,0,0.5);
      transform: scale(1.08);
    }
    .vc-star-off {
      color: #333;
      text-shadow: none;
    }

    /* ── Neuer Rekord Badge ── */
    .vc-record-badge {
      display: inline-block;
      border: 1.5px solid #FF9A00;
      color: #FF9A00;
      border-radius: 20px;
      padding: 4px 18px;
      font-size: .8em;
      font-weight: 700;
      letter-spacing: .5px;
      margin-bottom: 18px;
    }

    /* ── Buttons ── */
    .vc-btn-primary {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      width: 100%;
      padding: 15px;
      font-size: 1.1em;
      font-weight: 800;
      letter-spacing: .4px;
      background: linear-gradient(135deg, #FF9A00 0%, #FF5F00 100%);
      color: #fff;
      border: none;
      border-radius: 50px;
      cursor: pointer;
      margin-bottom: 10px;
      box-shadow: 0 4px 20px rgba(255,140,0,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
      text-shadow: 0 1px 3px rgba(0,0,0,0.3);
      transition: transform .12s, box-shadow .12s;
    }
    .vc-btn-primary:active { transform: scale(0.97); }
    .vc-btn-play {
      font-size: 1em;
    }

    .vc-btn-row {
      display: flex;
      gap: 10px;
      margin-bottom: 14px;
    }
    .vc-btn-secondary {
      flex: 1;
      padding: 12px 8px;
      font-size: .92em;
      font-weight: 700;
      background: rgba(255,255,255,0.07);
      color: rgba(255,255,255,0.75);
      border: 1.5px solid rgba(255,255,255,0.14);
      border-radius: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: background .15s;
    }
    .vc-btn-secondary:active { background: rgba(255,255,255,0.13); }
    .vc-btn-secondary span { font-size: 1.1em; }

    /* ── Tipp ── */
    .vc-tip {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 14px;
      padding: 12px 14px;
      text-align: left;
      font-size: .8em;
      color: rgba(255,255,255,0.6);
      line-height: 1.45;
    }
    .vc-tip-icon {
      font-size: 1.5em;
      flex-shrink: 0;
      margin-top: 1px;
    }
    .vc-tip strong {
      color: #FF9A00;
    }

    /* ── Mobile Anpassungen ── */
    @media (max-width: 420px) {
      .vc-card { padding: 22px 16px 16px; }
      .vc-title { font-size: 2em; }
      .vc-stat-value { font-size: 1.3em; }
      .vc-star { font-size: 2.4em; }
    }

/* ════════════════════════════════════════════════════════
   BATTLE ORDER SCREEN
════════════════════════════════════════════════════════ */
#cs-battle-order-overlay {
  display: none; position: fixed; inset: 0; z-index: 9200;
  background: rgba(0,0,0,0.92);
  align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
#cs-battle-order-overlay.cs-visible { display: flex; animation: drFadeIn .3s ease-out; }
.cs-order-box {
  width: min(520px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(160deg,#0d001a,#1a0033);
  border: 1px solid rgba(200,100,255,0.35);
  border-radius: 18px;
  padding: 20px 18px;
  box-shadow: 0 0 40px rgba(150,50,255,0.4);
  display: flex; flex-direction: column; gap: 14px;
}
.cs-order-header { text-align: center; }
.cs-order-title {
  font-size: 1.5em; font-weight: 900; color: #FFD700;
  text-shadow: 0 0 16px rgba(255,200,0,.7);
  letter-spacing: 1px;
}
.cs-order-subtitle { font-size: .85em; color: rgba(255,255,255,.6); margin-top: 4px; }
.cs-order-timer-row { display: flex; align-items: center; gap: 8px; justify-content: center; }
.cs-order-timer-bar-wrap {
  height: 4px; flex: 1; background: rgba(255,255,255,.12); border-radius: 4px; overflow: hidden;
}
#cs-order-timer-bar { height: 100%; background: #FFD700; border-radius: 4px; width: 100%; }
#cs-order-timer { font-size: .85em; color: #FFD700; font-weight: 700; min-width: 20px; }

.cs-order-section-lbl {
  font-size: .75em; color: rgba(255,255,255,.5); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 4px;
}
.cs-order-slots {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.cs-order-slot {
  width: 86px; min-height: 96px;
  border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  font-size: .72em; text-align: center;
  padding: 6px 4px;
}
.cs-order-slot:hover { transform: scale(1.04); }
.cs-order-slot-empty {
  border: 2px dashed rgba(255,255,255,.25);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.3);
}
.cs-order-slot-filled {
  border: 2px solid rgba(255,200,0,.6);
  background: rgba(255,200,0,.08);
  box-shadow: 0 0 12px rgba(255,200,0,.3);
}
.cs-order-num {
  font-size: 1.5em; font-weight: 900;
  color: #FFD700; line-height: 1;
}
.cs-order-slot-hint { font-size: .85em; color: rgba(255,255,255,.3); }
.cs-order-thumb { width: 38px; height: 38px; object-fit: cover; border-radius: 5px; }
.cs-order-card-name { font-size: .78em; color: #fff; font-weight: 600; word-break: break-word; }

.cs-order-hand {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.cs-order-hand .cs-card { width: 82px; cursor: pointer; }
.cs-order-hand .cs-card:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 8px 20px rgba(0,0,0,.5); }

#cs-order-submit-btn {
  margin-top: 6px;
  width: 100%; padding: 14px;
  border: none; border-radius: 12px;
  background: linear-gradient(135deg,#FF6B00,#FFD700);
  color: #000; font-size: 1.05em; font-weight: 900;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
  letter-spacing: .5px;
}
#cs-order-submit-btn:not(:disabled):hover {
  transform: scale(1.02); box-shadow: 0 0 20px rgba(255,180,0,.5);
}
#cs-order-submit-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ════════════════════════════════════════════════════════
   BATTLE ARENA — Score-Bar & Runden-Banner
════════════════════════════════════════════════════════ */
.cs-battle-scorebar {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,.45); border-radius: 24px;
  padding: 8px 20px; margin: 0 auto 8px;
  border: 1px solid rgba(255,255,255,.12);
  font-size: 1em;
}
.cs-sb-label { font-size: .7em; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: 1px; }
.cs-sb-sep   { color: rgba(255,255,255,.3); }
.cs-sb-num   { font-size: 1.6em; font-weight: 900; color: #fff; min-width: 24px; text-align: center; transition: color .3s, text-shadow .3s; }
.cs-sb-num.cs-sb-leading { color: #FFD700; text-shadow: 0 0 12px #FFD700; }

.cs-rnd-banner {
  font-size: 1.6em; font-weight: 900; letter-spacing: 2px;
  color: #fff; text-align: center; padding: 6px 0;
  opacity: 0; transform: translateY(-20px);
  transition: opacity .3s, transform .3s;
}
.cs-rnd-banner-in { opacity: 1; transform: none; }
.cs-rnd-word  { font-size: .55em; letter-spacing: 4px; display: block; color: rgba(255,255,255,.5); }
.cs-rnd-total { font-size: .6em; color: rgba(255,255,255,.4); margin-left: 6px; }

/* ════════════════════════════════════════════════════════
   KARTEN-AUFDECKUNG
════════════════════════════════════════════════════════ */
.cs-reveal-area {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  width: 100%; max-width: 580px; margin: 0 auto;
}
.cs-reveal-slot {
  flex: 0 0 auto; width: 120px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transform: translateX(0); opacity: 1;
}
.cs-reveal-l { transform: translateX(-120vw); opacity: 0; transition: transform .55s cubic-bezier(.2,1,.4,1), opacity .4s; }
.cs-reveal-r { transform: translateX( 120vw); opacity: 0; transition: transform .55s cubic-bezier(.2,1,.4,1), opacity .4s; }
.cs-reveal-slide-l { transform: none; opacity: 1; }
.cs-reveal-slide-r { transform: none; opacity: 1; }

.cs-reveal-slot .cs-card { width: 120px; font-size: .8em; }

.cs-card-back {
  width: 120px; height: 168px;
  border-radius: 12px;
  background: linear-gradient(145deg,#1a0033,#33006b);
  border: 2px solid rgba(200,100,255,.5);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(150,50,255,.4);
}
.cs-card-back-inner { text-align: center; }
.cs-card-back-icon  { font-size: 2.8em; opacity: .6; }

/* Card flip-in animation */
@keyframes cs-flip-in {
  0%   { transform: rotateY(90deg) scale(.85); opacity: 0; }
  60%  { transform: rotateY(-8deg) scale(1.04); opacity: 1; }
  100% { transform: rotateY(0) scale(1); opacity: 1; }
}
.cs-card-flip-in { animation: cs-flip-in .55s cubic-bezier(.2,1,.4,1) both; }

/* VS label in reveal */
.cs-reveal-vs {
  font-size: 1.1em; font-weight: 900; color: rgba(255,255,255,.6);
  text-align: center; min-width: 90px;
  transition: color .3s, text-shadow .3s;
}
.cs-reveal-aufdecken { color: #FFD700; text-shadow: 0 0 16px #FFD700; animation: cs-pulse-text .4s ease infinite alternate; }
@keyframes cs-pulse-text { from { opacity:.7 } to { opacity:1; transform:scale(1.08) } }
.cs-rv-win  { color: #69ff69; text-shadow: 0 0 12px #00ff66; font-size: .95em; }
.cs-rv-lose { color: #ff6969; text-shadow: 0 0 12px #ff0000; font-size: .95em; }
.cs-rv-draw { color: #FFD700; font-size: .95em; }

/* Win / lose card states */
.cs-card-reveal-win {
  animation: cs-card-win-pop .4s cubic-bezier(.2,1.4,.4,1) forwards;
  box-shadow: 0 0 30px rgba(0,255,100,.7) !important;
}
.cs-card-reveal-lose {
  animation: cs-card-lose-shrink .4s ease forwards;
}
@keyframes cs-card-win-pop {
  0%   { transform: scale(1); }
  60%  { transform: scale(1.12) rotate(-2deg); }
  100% { transform: scale(1.07); }
}
@keyframes cs-card-lose-shrink {
  100% { transform: scale(.88); opacity: .45; filter: grayscale(.7); }
}

/* Power labels on revealed cards */
.cs-reveal-power {
  font-size: 1.1em; font-weight: 900; padding: 3px 10px;
  border-radius: 20px; margin-top: 4px;
}
.cs-rp-my { background: rgba(0,200,100,.25); color: #69ff69; border: 1px solid rgba(0,200,100,.4); }
.cs-rp-en { background: rgba(255,60,60,.2);  color: #ff7070; border: 1px solid rgba(255,60,60,.35); }

/* Unknown enemy card */
.cs-unknown-card { opacity: .85; }

/* ════════════════════════════════════════════════════════
   ARENA BACKGROUND PARTICLES
════════════════════════════════════════════════════════ */
.cs-arena-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
@keyframes cs-arena-float {
  0%,100% { transform: translateY(0) scale(1); opacity: .4; }
  50%      { transform: translateY(-18px) scale(1.2); opacity: .9; }
}
.cs-arena-p {
  position: absolute; border-radius: 50%;
  background: rgba(150,50,255,.6);
  animation: cs-arena-float 3s ease-in-out infinite;
}

/* Win confetti */
@keyframes cs-conf-fall {
  0%   { transform: translateY(-30px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
.cs-win-conf {
  position: absolute; top: 0; pointer-events: none;
  animation: cs-conf-fall 1.4s ease-in forwards;
}

/* ════════════════════════════════════════════════════════
   PER-CARD WINNER FX
════════════════════════════════════════════════════════ */
.cs-fx {
  position: absolute; inset: 0; pointer-events: none; z-index: 10;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  overflow: hidden;
}
.cs-fx-label {
  font-size: 1.15em; font-weight: 900; letter-spacing: 1.5px;
  text-shadow: 0 0 16px currentColor; z-index: 1;
  animation: cs-anim-pop .4s cubic-bezier(.2,1.4,.4,1) both;
}

/* ── CEO: Music Equalizer ── */
.cs-eq-bars {
  display: flex; align-items: flex-end; gap: 5px;
  height: 80px; margin-top: 10px;
}
@keyframes cs-eq-bounce {
  0%,100% { height: 16px; }
  50%     { height: var(--h); }
}
.cs-eq-bar {
  width: 12px; border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, #FF6B00, #FFD700);
  box-shadow: 0 0 8px #FF9900;
  animation: cs-eq-bounce .5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.06s);
  height: 16px;
}
@keyframes cs-mic-drop {
  0%   { transform: translateY(-60px) rotate(-30deg); opacity: 1; }
  70%  { transform: translateY(10px) rotate(5deg); }
  100% { transform: translateY(5px) rotate(0deg); opacity: .7; }
}
.cs-mic-drop {
  font-size: 2.2em; margin-top: 8px;
  animation: cs-mic-drop .7s cubic-bezier(.4,2,.6,1) .4s both;
}

/* ── FLER: Purple Smoke ── */
@keyframes cs-smoke-rise {
  0%   { transform: translateX(0) translateY(0) scale(1); opacity: .7; }
  100% { transform: translateX(var(--dx)) translateY(var(--dy)) scale(2.5); opacity: 0; }
}
.cs-smoke-p {
  position: absolute; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle, rgba(180,50,255,.8), rgba(100,0,200,0));
  animation: cs-smoke-rise .9s ease-out var(--del) both;
}
@keyframes cs-conf-ring {
  0%   { transform: scale(0); opacity: .8; }
  100% { transform: scale(3.5); opacity: 0; }
}
.cs-confusion-ring {
  position: absolute; width: 80px; height: 80px; border-radius: 50%;
  border: 3px solid rgba(180,50,255,.7);
  animation: cs-conf-ring .8s ease-out .2s both;
}

/* ── MARWAN: Scan Line + Data Rain ── */
@keyframes cs-scan {
  0%   { top: 0; }
  100% { top: 100%; }
}
.cs-scan-line {
  position: absolute; left: 0; right: 0; height: 3px;
  background: linear-gradient(to right, transparent, #00E5FF, transparent);
  box-shadow: 0 0 12px #00E5FF;
  animation: cs-scan .6s linear .1s both;
}
@keyframes cs-data-fall {
  0%   { transform: translateY(-20px); opacity: 1; }
  100% { transform: translateY(100%);  opacity: 0; }
}
.cs-data-rain { position: absolute; inset: 0; }
.cs-data-drop {
  position: absolute; top: 0; font-size: .7em; font-family: monospace;
  color: #00E5FF; opacity: .8;
  animation: cs-data-fall .8s linear var(--del) both;
}

/* ── MOK: Aura Rings ── */
@keyframes cs-aura-pulse {
  0%   { transform: scale(0); opacity: .9; }
  100% { transform: scale(3.5 + calc(var(--i) * .5)); opacity: 0; }
}
.cs-aura-ring {
  position: absolute; width: 70px; height: 70px; border-radius: 50%;
  border: 3px solid #FFB300;
  box-shadow: 0 0 12px #FFB300;
  animation: cs-aura-pulse .9s ease-out calc(var(--i) * 0.18s) both;
}

/* ── NOIR: Shadow Clones ── */
@keyframes cs-shadow-slide {
  0%   { transform: translateX(calc(var(--i) * 22px - 33px)); opacity: .6; }
  100% { transform: translateX(calc(var(--i) * 50px - 75px)); opacity: 0; }
}
.cs-shadow-clone {
  position: absolute; width: 60px; height: 100px;
  background: rgba(30,30,50,.7);
  border-radius: 8px;
  animation: cs-shadow-slide .7s ease-out calc(var(--i) * .12s) both;
  filter: blur(4px);
}
@keyframes cs-speed-blur {
  0%   { transform: scaleX(1); opacity: .5; }
  100% { transform: scaleX(4); opacity: 0; }
}
.cs-speed-trail {
  position: absolute; width: 100%; height: 4px;
  background: linear-gradient(to right, transparent, rgba(150,200,255,.6), transparent);
  animation: cs-speed-blur .5s ease-out .1s both;
}

/* ── SILLA: Shockwave ── */
@keyframes cs-shockwave {
  0%   { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}
.cs-shockwave {
  position: absolute; width: 60px; height: 60px; border-radius: 50%;
  border: 4px solid #90CAF9;
  box-shadow: 0 0 18px #42A5F5;
  animation: cs-shockwave .65s ease-out calc(var(--i) * 0.18s) both;
}
@keyframes cs-impact-flash {
  0%,100% { opacity: 0; }
  15%,25% { opacity: .6; }
}
.cs-impact-flash {
  position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(144,202,249,.4), transparent 70%);
  animation: cs-impact-flash .5s ease both;
}

/* ── SOLIDO: Lightning ── */
@keyframes cs-lightning-bolt {
  0%,100% { opacity: 0; }
  20%,30% { opacity: 1; }
}
.cs-lightning {
  position: absolute; width: 4px; height: 60px;
  background: linear-gradient(to bottom, #ff4444, transparent);
  box-shadow: 0 0 8px #ff4444;
  transform-origin: top center;
  transform: rotate(calc(var(--i) * 60deg));
  animation: cs-lightning-bolt .5s ease-out calc(var(--i) * 0.07s) both;
}
@keyframes cs-fist-bounce {
  0%   { transform: scale(0) rotate(-20deg); }
  60%  { transform: scale(1.3) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}
.cs-power-fist {
  font-size: 3em; margin-top: 6px;
  animation: cs-fist-bounce .5s cubic-bezier(.2,1.4,.4,1) .1s both;
}

/* ── Generic: Gold Star Burst ── */
@keyframes cs-star-shoot {
  0%   { transform: rotate(calc(var(--i)*45deg)) translateY(0) scale(1); opacity: 1; }
  100% { transform: rotate(calc(var(--i)*45deg)) translateY(-80px) scale(0); opacity: 0; }
}
.cs-star-ray {
  position: absolute; width: 6px; height: 40px;
  background: linear-gradient(to top, #FFD700, transparent);
  border-radius: 3px;
  transform-origin: bottom center;
  animation: cs-star-shoot .7s ease-out calc(var(--i) * .04s) both;
}

/* ═══════════════════════════════════════════════════════════
   INTERACTIVE BATTLE  (cs-ib-*)
   ═══════════════════════════════════════════════════════════ */

/* Battle overlay in IB mode: full-screen column layout */
#cs-battle-overlay.cs-ib-mode {
  padding: 0; gap: 0;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  overflow: hidden;
}

.cs-ib-wrap {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden;
  position: relative;
}

/* ── Header bar ── */
.cs-ib-header {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 16px 8px;
  background: rgba(0,0,0,.7);
  border-bottom: 1px solid rgba(255,215,0,.2);
  gap: 4px;
}
.cs-ib-title {
  font-size: 1em; font-weight: 900; color: #FFD700;
  letter-spacing: 2px; text-transform: uppercase;
  text-shadow: 0 0 16px rgba(255,215,0,.6);
}
.cs-ib-scoreline {
  display: flex; align-items: center; gap: 16px;
}
.cs-ib-s-num {
  font-size: 2.4em; font-weight: 900; color: #fff;
  min-width: 44px; text-align: center;
  transition: color .3s, transform .3s;
}
.cs-ib-s-sep { font-size: 1.5em; color: rgba(255,255,255,.3); }
.cs-ib-s-leading { color: #FFD700; transform: scale(1.18); text-shadow: 0 0 18px rgba(255,215,0,.8); }
.cs-ib-round-info {
  font-size: .74em; color: rgba(255,255,255,.45);
  font-weight: 700; letter-spacing: .5px;
}

/* ── Arena (CPU | mid | Player) ── */
.cs-ib-arena {
  flex: 1 1 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 10px;
  min-height: 0;
  background: radial-gradient(ellipse at 50% 60%, rgba(35,10,70,.85) 0%, rgba(5,0,18,.95) 100%);
}
.cs-ib-side {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; min-width: 100px;
}
.cs-ib-side-lbl {
  font-size: .62em; font-weight: 900; letter-spacing: 2px;
  color: rgba(255,255,255,.38); text-transform: uppercase;
}
.cs-ib-card-zone {
  min-height: 158px; min-width: 96px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px;
  border: 2px dashed rgba(255,255,255,.14);
  border-radius: 14px; padding: 6px;
  transition: border-color .3s;
}
.cs-ib-card-zone:not(:empty) { border-color: rgba(255,215,0,.28); }

/* ── Middle column with prompt ── */
.cs-ib-mid {
  flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center;
  padding: 0 6px; text-align: center;
}
.cs-ib-prompt {
  font-size: clamp(.9em, 3.8vw, 1.35em);
  font-weight: 900; color: #FFD700;
  text-shadow: 0 0 20px rgba(255,215,0,.6);
  letter-spacing: .5px; line-height: 1.3;
  transition: color .25s;
}
.cs-ib-prompt-win  { color: #69f0ae; text-shadow: 0 0 22px rgba(105,240,174,.75); }
.cs-ib-prompt-lose { color: #ff5252; text-shadow: 0 0 22px rgba(255,82,82,.75); }
.cs-ib-prompt-draw { color: rgba(255,255,255,.8); text-shadow: none; }

/* CPU thinking dots */
.cs-ib-thinking { color: rgba(255,255,255,.5); font-size: .85em; font-weight: 700; }
@keyframes cs-ib-dots-pulse {
  0%,100% { opacity: .25; }
  50%     { opacity: 1; }
}
.cs-ib-dots { display: inline-block; animation: cs-ib-dots-pulse .9s ease-in-out infinite; }

/* Power labels below cards */
.cs-ib-power {
  font-size: .76em; font-weight: 800; border-radius: 8px;
  padding: 2px 9px; letter-spacing: .3px;
}
.cs-ib-power-my  { background: rgba(105,240,174,.18); color: #69f0ae; }
.cs-ib-power-cpu { background: rgba(255,82,82,.18);   color: #ff7070; }

/* ── Hand strip (bottom) ── */
.cs-ib-hand-area {
  flex: 0 0 auto;
  background: rgba(0,0,0,.88);
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 8px 10px max(10px, env(safe-area-inset-bottom));
}
.cs-ib-hand-lbl {
  font-size: .66em; color: rgba(255,255,255,.38); font-weight: 700;
  margin-bottom: 6px; letter-spacing: .3px;
}
.cs-ib-hand {
  display: flex; gap: 10px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 4px; scrollbar-width: none;
}
.cs-ib-hand::-webkit-scrollbar { display: none; }
/* Cards in the hand strip */
.cs-ib-hand .cs-card { width: 90px; min-height: 126px; font-size: .9em; flex-shrink: 0; }

/* Chosen card: lifts and glows gold */
.cs-ib-card-chosen {
  outline: 3px solid #FFD700 !important;
  outline-offset: 3px !important;
  transform: translateY(-10px) scale(1.1) !important;
  box-shadow: 0 0 28px rgba(255,215,0,.9), 0 10px 28px rgba(0,0,0,.7) !important;
  z-index: 5; position: relative;
}

/* ── Final Battle Banner ── */
@keyframes cs-ib-banner-pop {
  0%   { transform: translateX(-50%) scale(.3) rotate(-10deg); opacity: 0; }
  65%  { transform: translateX(-50%) scale(1.14) rotate(2deg); opacity: 1; }
  100% { transform: translateX(-50%) scale(1) rotate(0); opacity: 1; }
}
.cs-ib-final-banner {
  position: absolute; left: 50%; top: 36%;
  transform: translateX(-50%);
  font-size: clamp(1.8em, 6vw, 3.6em); font-weight: 900;
  letter-spacing: 3px; text-transform: uppercase;
  padding: 14px 34px; border-radius: 18px;
  white-space: nowrap; pointer-events: none;
  animation: cs-ib-banner-pop .5s cubic-bezier(.2,1.3,.4,1) both;
  z-index: 20;
}
.cs-ib-final-banner.cs-banner-win {
  color: #FFD700; background: rgba(10,40,0,.93);
  border: 3px solid #69f0ae;
  text-shadow: 0 0 40px rgba(105,240,174,.8), 0 0 80px rgba(255,215,0,.4);
}
.cs-ib-final-banner.cs-banner-lose {
  color: #ff5252; background: rgba(35,0,0,.93);
  border: 3px solid #ff5252;
  text-shadow: 0 0 32px rgba(255,82,82,.8);
}

/* ── Mobile adjustments for IB ── */
@media (max-width: 480px) {
  .cs-ib-side { min-width: 82px; }
  .cs-ib-card-zone { min-height: 126px; min-width: 80px; }
  .cs-ib-hand .cs-card { width: 78px; min-height: 110px; }
  .cs-ib-s-num { font-size: 2em; }
  .cs-ib-arena { padding: 6px 6px; gap: 4px; }
}

/* ═══════════════════════════════════════════════════════════
   KARTEN-MENGE BADGE (×2, ×3 in Deck-Picker und Sammlung)
   ═══════════════════════════════════════════════════════════ */
.cs-card-amount-badge {
  position: absolute; bottom: 4px; left: 4px;
  background: rgba(0,0,0,.75); border: 1px solid rgba(255,215,0,.5);
  border-radius: 8px; padding: 1px 6px;
  font-size: .58em; color: #FFD700; font-weight: 900;
  z-index: 10; pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   BELOHNUNGS-BADGE in Result-Screen (NEU / ×N DOPPELT)
   ═══════════════════════════════════════════════════════════ */
.cs-reward-badge {
  position: absolute; top: 4px; right: 4px;
  border-radius: 10px; padding: 2px 7px;
  font-size: .58em; font-weight: 900; z-index: 10; pointer-events: none;
}
.cs-reward-badge-new {
  background: rgba(105,240,174,.25); color: #69f0ae;
  border: 1px solid rgba(105,240,174,.5);
  text-shadow: 0 0 8px rgba(105,240,174,.8);
}
.cs-reward-badge-dup {
  background: rgba(255,215,0,.2); color: #FFD700;
  border: 1px solid rgba(255,215,0,.4);
}

/* ═══════════════════════════════════════════════════════════
   FIFA LOOT REVEAL OVERLAY
   ═══════════════════════════════════════════════════════════ */
#cs-loot-overlay {
  position: fixed; inset: 0; z-index: 10700;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.97);
  backdrop-filter: blur(4px);
  overflow: hidden;
}

.cs-loot-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; position: relative; z-index: 2;
  padding: 20px 10px;
}

#cs-loot-particles {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1;
}

/* ── Card back ── */
.cs-loot-card-back {
  width: 120px; height: 168px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  transition: box-shadow .4s;
}
.cs-loot-qmark {
  font-size: 3.5em; font-weight: 900; color: rgba(255,255,255,.2);
  user-select: none;
}

/* Rarity-specific backs */
.cs-loot-back-common {
  background: linear-gradient(145deg,#3a3a3a,#555);
  box-shadow: 0 0 30px rgba(150,150,150,.7);
  animation: cs-loot-pulse-common 1.1s ease-in-out infinite;
}
.cs-loot-back-rare {
  background: linear-gradient(145deg,#0D2B5E,#1565C0);
  box-shadow: 0 0 60px rgba(33,150,243,.9), 0 0 120px rgba(33,150,243,.35);
  animation: cs-loot-pulse-rare 1s ease-in-out infinite;
}
.cs-loot-back-epic {
  background: linear-gradient(145deg,#2E0050,#6A1B9A);
  box-shadow: 0 0 80px rgba(156,39,176,.9), 0 0 180px rgba(156,39,176,.45);
  animation: cs-loot-pulse-epic .85s ease-in-out infinite;
}
.cs-loot-back-legendary {
  background: linear-gradient(145deg,#5D1500,#BF360C);
  box-shadow: 0 0 100px rgba(255,160,0,1), 0 0 220px rgba(255,215,0,.55);
  animation: cs-loot-pulse-legendary .7s ease-in-out infinite;
}

@keyframes cs-loot-pulse-common  { 0%,100%{transform:scale(1);} 50%{transform:scale(1.03);} }
@keyframes cs-loot-pulse-rare    { 0%,100%{transform:scale(1);box-shadow:0 0 60px rgba(33,150,243,.7);} 50%{transform:scale(1.06);box-shadow:0 0 100px rgba(33,150,243,1),0 0 200px rgba(33,150,243,.4);} }
@keyframes cs-loot-pulse-epic    { 0%,100%{transform:scale(1);box-shadow:0 0 80px rgba(156,39,176,.7);} 50%{transform:scale(1.08);box-shadow:0 0 130px rgba(156,39,176,1),0 0 260px rgba(156,39,176,.5);} }
@keyframes cs-loot-pulse-legendary { 0%,100%{transform:scale(1);box-shadow:0 0 100px rgba(255,160,0,.8);} 50%{transform:scale(1.1);box-shadow:0 0 160px rgba(255,160,0,1),0 0 320px rgba(255,215,0,.6);} }

/* ── Flip out animation ── */
@keyframes cs-loot-flip-out {
  0%   { transform: perspective(600px) rotateY(0) scale(1); }
  100% { transform: perspective(600px) rotateY(90deg) scale(.8); opacity: 0; }
}
.cs-loot-flipping {
  animation: cs-loot-flip-out .32s ease-in forwards !important;
}

/* ── Card reveal flip in ── */
@keyframes cs-loot-reveal-in {
  0%   { transform: perspective(600px) rotateY(-90deg) scale(.8); opacity: 0; }
  100% { transform: perspective(600px) rotateY(0) scale(1); opacity: 1; }
}
.cs-loot-card-reveal-in {
  animation: cs-loot-reveal-in .42s cubic-bezier(.2,1,.4,1) forwards;
}

/* ── Label (NEUE KARTE / DOPPELT) ── */
@keyframes cs-loot-label-pop {
  0%   { transform: scale(0) rotate(-6deg); opacity: 0; }
  65%  { transform: scale(1.18) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.cs-loot-label {
  font-size: clamp(1.4em, 5vw, 2em);
  font-weight: 900; letter-spacing: 2px; text-transform: uppercase;
  animation: cs-loot-label-pop .45s cubic-bezier(.2,1.3,.4,1) both;
}
.cs-loot-label-new  { color: #69f0ae; text-shadow: 0 0 28px rgba(105,240,174,.9); }
.cs-loot-label-dup  { color: #FFD700; text-shadow: 0 0 24px rgba(255,215,0,.8); }

/* ── Rarity text ── */
.cs-loot-rarity-text {
  font-size: .9em; font-weight: 800; letter-spacing: 3px;
  text-transform: uppercase; opacity: .85;
  animation: cs-loot-label-pop .5s .1s cubic-bezier(.2,1.3,.4,1) both;
}

/* ── Close button ── */
.cs-loot-close-btn {
  margin-top: 6px; padding: 13px 36px;
  border: none; border-radius: 50px;
  background: linear-gradient(135deg, #1B5E20, #43A047);
  color: #fff; font-size: 1.1em; font-weight: 900;
  cursor: pointer; letter-spacing: .5px;
  box-shadow: 0 0 24px rgba(67,160,71,.7);
  transition: transform .12s, box-shadow .2s;
  animation: cs-loot-label-pop .5s .3s cubic-bezier(.2,1.3,.4,1) both;
}
.cs-loot-close-btn:active { transform: scale(.95); }

/* ── Background glow per rarity ── */
.cs-loot-rarity-rare     { background: radial-gradient(ellipse at 50% 50%, rgba(13,43,94,.6) 0%, rgba(0,0,0,.97) 70%); }
.cs-loot-rarity-epic     { background: radial-gradient(ellipse at 50% 50%, rgba(46,0,80,.65) 0%, rgba(0,0,0,.97) 70%); }
.cs-loot-rarity-legendary{ background: radial-gradient(ellipse at 50% 50%, rgba(93,21,0,.65) 0%, rgba(0,0,0,.97) 70%); }

/* ── Particles ── */
.cs-loot-particle {
  position: absolute; margin-left: -4px; margin-top: -4px;
  border-radius: 50%; pointer-events: none;
  animation: cs-loot-particle-fly 1.2s ease-out forwards;
}
@keyframes cs-loot-particle-fly {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx),var(--dy)) scale(0); opacity: 0; }
}

/* ── Rarity overlay for the card in loot reveal ── */
#cs-loot-card-zone .cs-card { pointer-events: none; }

/* ═══════════════════════════════════════════════════════════
   VOLLSTÄNDIGE MOBILE RESPONSIVENESS — Card System
   Alle Breakpoints: ≤360px, ≤480px, ≤768px, ≥1200px
   ═══════════════════════════════════════════════════════════ */

/* ── Loot Reveal: Mobile ── */
@media (max-width: 480px) {
  .cs-loot-card-back { width: 100px; height: 142px; }
  .cs-loot-label { font-size: 1.3em; }
  .cs-loot-close-btn { padding: 11px 28px; font-size: 1em; }
  .cs-loot-inner { gap: 10px; padding: 14px 8px; }
}

/* ── Deck Picker: kleine Screens ── */
@media (max-width: 360px) {
  #cs-deck-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px; padding: 8px 6px 80px;
  }
  #cs-deck-grid .cs-card { min-height: 130px; }
  #cs-deck-grid .cs-card .cs-card-art  { width: 48px; height: 48px; }
  #cs-deck-grid .cs-card .cs-card-emoji { font-size: 2.2em; }
  #cs-deck-grid .cs-card .cs-card-desc { display: none; }
}

/* ── Interactive Battle: Hochformat Mobile ── */
@media (max-width: 480px) and (orientation: portrait) {
  .cs-ib-arena {
    flex-direction: column;
    align-items: center; gap: 8px;
    padding: 8px 8px;
  }
  .cs-ib-side { flex-direction: row; gap: 10px; min-width: 0; width: 100%; justify-content: center; }
  .cs-ib-mid { width: 100%; padding: 4px 0; }
  .cs-ib-side-lbl { min-width: 40px; }
  .cs-ib-card-zone { min-height: 110px; }
}

/* ── Battle Result: Mobile ── */
@media (max-width: 480px) {
  .cs-result-box    { padding: 16px 12px; gap: 10px; width: min(340px, 92vw); }
  .cs-result-icon   { font-size: 2.2em; }
  .cs-result-title  { font-size: 1.1em; }
  .cs-result-powers { font-size: .8em; }
  .cs-result-reward-cards { gap: 6px; }
  .cs-result-reward-cards .cs-card { width: 80px; min-height: 112px; font-size: .88em; }
}

/* ── Battle Order: Mobile ── */
@media (max-width: 480px) {
  #cs-battle-order-overlay {
    padding: 10px 8px;
  }
  .cs-order-box { padding: 12px 10px; gap: 10px; }
  .cs-order-slots { gap: 6px; }
  .cs-order-slot { width: 64px; min-height: 90px; }
  .cs-order-hand .cs-card { width: 72px; min-height: 100px; font-size: .82em; }
}

/* ── Waiting Overlay: Mobile ── */
@media (max-width: 480px) {
  #cs-waiting-overlay {
    padding: 20px 16px;
    font-size: .9em;
    text-align: center;
  }
}

/* ── Card: Landscape sehr klein ── */
@media (max-height: 500px) {
  .cs-ib-header { padding: 6px 12px 4px; }
  .cs-ib-scoreline { gap: 10px; }
  .cs-ib-s-num { font-size: 1.7em; }
  .cs-ib-hand-area { padding: 5px 8px 8px; }
  .cs-ib-hand-lbl { display: none; }
  .cs-ib-hand .cs-card { width: 72px; min-height: 100px; }
  .cs-loot-inner { gap: 8px; }
  .cs-loot-card-back { width: 86px; height: 120px; }
  .cs-loot-label { font-size: 1.1em; }
}

/* ── Großer Desktop: mehr Platz nutzen ── */
@media (min-width: 1024px) {
  #cs-deck-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }
  #cs-deck-grid .cs-card { min-height: 200px; }
  #cs-deck-grid .cs-card .cs-card-art  { width: 82px; height: 82px; }
  #cs-deck-grid .cs-card .cs-card-emoji { font-size: 3.4em; }

  .cs-ib-side { min-width: 130px; }
  .cs-ib-card-zone { min-height: 190px; min-width: 118px; }
  .cs-ib-hand .cs-card { width: 104px; min-height: 146px; }
  .cs-ib-s-num { font-size: 2.8em; }
  .cs-ib-title { font-size: 1.2em; }

  .cs-loot-card-back { width: 140px; height: 196px; }
  .cs-loot-label { font-size: 2.2em; }
}

/* ── Touch: größere Tap-Targets ── */
@media (hover: none) and (pointer: coarse) {
  .cs-ib-hand .cs-card { min-width: 80px; }
  #cs-deck-submit-btn,
  .cs-deck-close-btn,
  .cs-loot-close-btn { min-height: 48px; }
  .cs-result-close-btn { min-height: 52px; font-size: 1em; }
}

/* ════════════════════════════════════════════════════════════
   CHALLENGES OVERLAY  (v22)
════════════════════════════════════════════════════════════ */
#ch-overlay {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: ch-fade-in .2s ease;
}
@keyframes ch-fade-in { from { opacity:0; transform:scale(.96); } to { opacity:1; transform:scale(1); } }

#ch-box {
  background: linear-gradient(160deg,#12122a 0%,#1a1a3a 100%);
  border: 1px solid rgba(255,180,0,.25);
  border-radius: 20px;
  width: min(480px, 96vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 0 0 16px;
  display: flex; flex-direction: column;
}

#ch-header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  position: sticky; top: 0;
  background: linear-gradient(160deg,#12122a,#1a1a3a);
  z-index: 1;
}
#ch-title {
  font-size: 1.15em; font-weight: 800; color: #FFD700;
  letter-spacing: .5px; flex: 1;
}
#ch-reset-info {
  font-size: .72em; color: #666;
}
#ch-close {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  color: #aaa; border-radius: 50%; width: 32px; height: 32px;
  cursor: pointer; font-size: 1em; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
#ch-close:hover { background: rgba(255,255,255,.16); color: #fff; }

#ch-content { padding: 14px 16px 0; }
#ch-loading  { text-align: center; color: #666; padding: 40px; font-size: .9em; }

.ch-section-label {
  font-size: .72em; font-weight: 800; letter-spacing: 1.5px;
  color: #888; text-transform: uppercase; margin-bottom: 8px;
}

/* ── Challenge-Karte ── */
.ch-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px; padding: 13px 14px;
  margin-bottom: 8px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .2s;
}
.ch-card.ch-done   { border-color: rgba(67,160,71,.4);  background: rgba(46,125,50,.08); }
.ch-card.ch-claimed{ border-color: rgba(255,255,255,.05); opacity: .55; }

.ch-card-top { display: flex; align-items: center; gap: 10px; }
.ch-card-icon { font-size: 1.6em; flex-shrink: 0; }
.ch-card-info { flex: 1; min-width: 0; }
.ch-card-title {
  font-size: .88em; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ch-card-desc  { font-size: .75em; color: #888; margin-top: 1px; }

.ch-card-rewards {
  display: flex; gap: 6px; flex-shrink: 0; align-items: center;
}
.ch-reward-chip {
  background: rgba(255,215,0,.12); border: 1px solid rgba(255,215,0,.3);
  border-radius: 20px; padding: 3px 9px;
  font-size: .72em; font-weight: 700; color: #FFD700; white-space: nowrap;
}
.ch-reward-xp {
  background: rgba(100,180,255,.12); border: 1px solid rgba(100,180,255,.3);
  border-radius: 20px; padding: 3px 9px;
  font-size: .72em; font-weight: 700; color: #64B4FF; white-space: nowrap;
}

/* ── Fortschrittsbalken ── */
.ch-progress-wrap {
  height: 6px; border-radius: 3px;
  background: rgba(255,255,255,.08); overflow: hidden;
}
.ch-progress-bar {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #FF8C00, #FFD700);
  transition: width .4s ease;
}
.ch-card.ch-done .ch-progress-bar { background: #43A047; }
.ch-progress-label {
  font-size: .7em; color: #666; text-align: right; margin-top: 2px;
}

/* ── Claim-Button ── */
.ch-claim-btn {
  align-self: flex-end;
  background: linear-gradient(135deg,#FF8C00,#FFD700);
  border: none; border-radius: 20px;
  padding: 6px 18px; color: #000; font-weight: 800;
  font-size: .8em; cursor: pointer; white-space: nowrap;
  animation: ch-pulse 1.4s infinite;
}
@keyframes ch-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,180,0,.5); }
  50%      { box-shadow: 0 0 0 6px rgba(255,180,0,0); }
}
.ch-claim-btn:hover { filter: brightness(1.15); }

/* ── Login-Hinweis ── */
#ch-login-hint {
  text-align: center; color: #888; padding: 30px 20px;
  font-size: .88em; line-height: 1.6;
}
.ch-auth-btn {
  margin-top: 12px;
  background: linear-gradient(135deg,#FF8C00,#FF4500);
  border: none; border-radius: 20px;
  padding: 10px 24px; color: #fff;
  font-size: .9em; cursor: pointer; font-weight: 700;
}

/* ── Challenge-Abschluss Toast ── */
.ch-toast {
  position: fixed; bottom: 90px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg,#1a3a1a,#2E7D32);
  border: 1px solid #43A047; color: #81C784;
  border-radius: 14px; padding: 11px 22px;
  font-weight: 700; font-size: .88em;
  z-index: 9900; pointer-events: none;
  animation: ch-toast-in .3s ease;
  white-space: nowrap; max-width: 90vw; text-align: center;
}
@keyframes ch-toast-in {
  from { opacity:0; transform: translateX(-50%) translateY(12px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}

/* ── Mobile ── */
@media (max-width: 600px) {
  #ch-overlay {
    align-items: flex-start;
    justify-content: center;
    padding: max(8px, env(safe-area-inset-top, 8px)) 8px 8px;
  }
  #ch-box {
    border-radius: 16px;
    width: 100%;
    max-height: calc(100dvh - 24px);
    margin-top: 8px;
  }
  .ch-card-title { font-size: .82em; }
  .ch-card { padding: 10px 10px 8px; }
}

