/* ==========================================================================
   BOSS-KACHEL
   Hochkant, Bossbild gross, darunter eine schlanke Lebensleiste.
   ========================================================================== */
.bm {
  /* Tief genug, damit die hoehere Kachel das Turnier-Widget nicht beruehrt. */
  position: fixed; top: 196px; right: 20px; z-index: 175;
  display: block; width: 108px; height: 132px;
  text-decoration: none; cursor: pointer;
  border-radius: 14px; overflow: hidden;
  background: #06060c;
  border: 1px solid color-mix(in srgb, var(--bf, #ff2f4f) 45%, transparent);
  box-shadow: 0 0 0 1px rgba(0,0,0,.7),
              0 10px 30px rgba(0,0,0,.65),
              0 0 22px color-mix(in srgb, var(--bf, #ff2f4f) 22%, transparent);
  transition: transform .25s cubic-bezier(.2,.9,.3,1),
              border-color .25s, box-shadow .25s;
}
.bm:hover, .bm:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--bf, #ff2f4f) 90%, transparent);
  box-shadow: 0 0 0 1px rgba(0,0,0,.7),
              0 14px 36px rgba(0,0,0,.7),
              0 0 34px color-mix(in srgb, var(--bf, #ff2f4f) 45%, transparent);
}
.bm:focus-visible { outline: 2px solid var(--bf, #ff2f4f); outline-offset: 3px; }
.bm.weg { display: none; }
.bm-lw { display: block; width: 108px; height: 132px; }

/* Schild links daneben beim Ueberfahren */
.bm-schild {
  position: absolute; top: 50%; right: 118px; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 3px; align-items: flex-end;
  padding: 10px 14px; border-radius: 11px; white-space: nowrap;
  background: rgba(6,6,12,.96);
  border: 1px solid color-mix(in srgb, var(--bf, #ff2f4f) 55%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--bf, #ff2f4f) 30%, transparent);
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.bm:hover .bm-schild, .bm:focus-visible .bm-schild {
  opacity: 1; transform: translateY(-50%) translateX(-4px);
}
.bm-schild b {
  font-family: 'Press Start 2P', monospace; font-size: 10px; line-height: 1.5;
  color: var(--bf, #ff2f4f);
}
.bm-schild span {
  font-family: 'FQ Ziffern','JetBrains Mono',ui-monospace,monospace;
  font-size: 10.5px; color: #a2a2ba;
}

@media (max-width: 760px) {
  /* Der Turnier-Countdown sitzt unten rechts - die Kachel kommt darueber. */
  .bm { top: auto; bottom: 76px; right: 12px; width: 84px; height: 102px; }
  .bm-lw { width: 84px; height: 102px; }
  .bm-schild { right: auto; left: 94px; align-items: flex-start; }
  .bm:hover .bm-schild, .bm:focus-visible .bm-schild {
    transform: translateY(-50%) translateX(4px);
  }
  .bm-schild b { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .bm { transition: none; }
  .bm:hover, .bm:focus-visible { transform: none; }
}

/* ---------- Lasche fuer das Handy ---------- */
.bm-lasche { display: none; }
.bm-lasche.weg { display: none !important; }

@media (max-width: 760px) {
  /* Zugeklappt faehrt die Kachel komplett aus dem Bild. */
  .bm {
    width: 84px; height: 102px; overflow: visible;
    background: transparent; border-color: transparent; box-shadow: none;
    transform: translateX(calc(100% + 40px));
    transition: transform .3s cubic-bezier(.2,.9,.3,1),
                border-color .25s, box-shadow .25s, background .25s;
  }
  .bm .bm-lw { opacity: 0; transition: opacity .25s; }

  /* Die Lasche selbst ist nur ein schmaler Griff, der ganz am Bildschirmrand
     klebt - keine eigene Flaeche in Richtung Bildmitte. Ein kurzer, senkrecht
     stehender Strich statt eines Knopfes mit Symbol. */
  .bm-lasche {
    position: fixed; right: 0; top: 50%; transform: translateY(-50%);
    z-index: 176; display: block; padding: 0;
    width: 14px; height: 64px;
    border: none; border-radius: 8px 0 0 8px;
    background: color-mix(in srgb, var(--bfl, #ff2f4f) 55%, #0a0a12);
    box-shadow: -2px 0 10px color-mix(in srgb, var(--bfl, #ff2f4f) 25%, transparent);
  }
  /* Griffrillen statt Symbol - wirkt wie eine Kante, die man greifen kann */
  .bm-lasche .sw { display: none; }
  .bm-lasche::before {
    content: ""; position: absolute; left: 5px; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 26px; border-radius: 2px;
    background: rgba(255,255,255,.55);
    box-shadow: 0 -9px 0 rgba(255,255,255,.4), 0 9px 0 rgba(255,255,255,.4);
  }

  /* Aufgeklappt: Kachel faehrt herein, die Lasche bleibt schmal an der
     Kachel-Oberkante statt daneben eine zweite Flaeche zu bilden. */
  .bm.offen {
    transform: translateX(0);
    background: #06060c;
    border-color: color-mix(in srgb, var(--bf, #ff2f4f) 55%, transparent);
    box-shadow: 0 0 0 1px rgba(0,0,0,.7), 0 10px 30px rgba(0,0,0,.65),
                0 0 24px color-mix(in srgb, var(--bf, #ff2f4f) 30%, transparent);
  }
  .bm.offen .bm-lw { opacity: 1; }

  /* Bei offener Kachel liegt der Griff nur noch als schmaler Streifen
     ueber ihrer Oberkante - flach, nicht als grosser Block daneben. */
  /* Die Kachel sitzt bei bottom:76px und ist 102px hoch, endet also bei
     178px. Der Griff kommt direkt darueber. Vorher wurde von der
     Elementhoehe gerechnet - dadurch landete er ausserhalb des Bildes. */
  .bm-lasche[aria-expanded="true"] {
    top: auto; bottom: 180px;
    left: auto; right: 12px; transform: none;
    width: 84px; height: 9px;
    border-radius: 5px 5px 0 0;
  }
  .bm-lasche[aria-expanded="true"]::before {
    left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(90deg);
    width: 3px; height: 18px;
    box-shadow: -9px 0 0 rgba(255,255,255,.4), 9px 0 0 rgba(255,255,255,.4);
  }

  .bm-schild { display: none; }
  .bm:hover, .bm:focus-visible { transform: translateX(calc(100% + 40px)); }
  .bm.offen:hover, .bm.offen:focus-visible { transform: translateX(0); }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .bm { transition: none; }
}
