/* AssistUK Bowling — nur was über kern/css/spiel.css hinausgeht */
html, body { background: radial-gradient(ellipse at 50% 25%, #1c2a5e 0%, var(--grund) 70%); }
#buehne { position: fixed; inset: 0; }
#bahn { position: fixed; inset: 0; z-index: 1; }
#bahn[hidden] { display: none; }
#spiel { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
#spiel[hidden] { display: none; }
#spiel > * { pointer-events: none; }
#spiel > .knopf { pointer-events: auto; }

/* Punktezettel oben (Mitte), fängt keine Klicks */
.zettel { position: absolute; left: 50%; transform: translateX(-50%); top: max(10px, env(safe-area-inset-top));
  max-width: min(96vw, 1180px); width: max-content; font-family: "DM Sans", system-ui, sans-serif; color: #fff; pointer-events: none; }
.zettel .tabelle { display: grid; gap: 4px; }
.zettel .sp { display: grid; grid-template-columns: minmax(64px, auto) repeat(var(--n), minmax(0, 1fr)) auto; align-items: stretch; gap: 3px;
  background: rgba(8, 12, 32, .78); border-radius: 14px; padding: 4px; border: 2px solid transparent; }
.zettel .sp.dran { border-color: var(--farbe); box-shadow: 0 0 18px color-mix(in srgb, var(--farbe) 60%, transparent); }
.zettel .name { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 6px; font-weight: 800; font-size: clamp(14px, .7vw + .8vh, 21px); white-space: nowrap; }
.zettel .name i { width: 16px; height: 16px; border-radius: 50%; background: var(--farbe); box-shadow: inset -3px -3px 5px #0006; }
.zettel .fr { position: relative; min-width: clamp(34px, 3.6vw, 64px); background: rgba(255, 255, 255, .08); border-radius: 8px; display: flex; flex-direction: column; align-items: stretch; }
.zettel .fr.jetzt { background: color-mix(in srgb, var(--farbe) 40%, rgba(255, 255, 255, .08)); }
.zettel .fr .nr { position: absolute; left: 4px; top: 1px; font-size: 10px; opacity: .55; }
.zettel .mk { display: flex; justify-content: flex-end; }
.zettel .mk em { font-style: normal; width: 1.25em; height: 1.35em; text-align: center; font-weight: 800; font-size: clamp(12px, .55vw + .7vh, 18px); line-height: 1.35em; border-left: 1px solid rgba(255, 255, 255, .15); }
.zettel .mk em.x { color: #ffd400; } .zettel .mk em.s { color: #37e0ff; }
.zettel .fr b { text-align: center; font-size: clamp(14px, .7vw + .8vh, 22px); line-height: 1.2; min-height: 1.2em; padding-bottom: 2px; }
.zettel .ges { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 10px; background: rgba(255, 255, 255, .12); border-radius: 8px; }
.zettel .ges span { font-size: 11px; opacity: .7; } .zettel .ges b { font-size: clamp(18px, 1vw + 1vh, 30px); }
.zettel .aufgabe { display: flex; align-items: center; gap: 14px; background: rgba(8, 12, 32, .8); border-radius: 16px; padding: 8px 18px 8px 10px;
  font-size: clamp(15px, .7vw + .9vh, 24px); }
.zettel .aufgabe b { display: block; } .zettel .aufgabe span { opacity: .85; font-size: .85em; }
.kegelbild { position: relative; width: 92px; height: 70px; }
.kegelbild i { position: absolute; width: 13px; height: 13px; margin: -6.5px; border-radius: 50%; background: #ffffff26; }
.kegelbild i.an { background: #fff6d8; box-shadow: 0 0 8px #ffd400; }

/* Ansage in der Mitte: Strike! groß und leuchtend */
.ansage { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%) scale(.9); padding: .35em 1em; border-radius: 22px;
  background: rgba(8, 12, 32, .72); color: #fff; font: 800 clamp(22px, 2vw + 2vh, 46px)/1.15 "DM Sans", system-ui, sans-serif; text-align: center;
  max-width: 86vw; white-space: pre-line; opacity: 0; transition: opacity .35s, transform .35s; pointer-events: none; }
.ansage.an { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ansage.strike { font-size: clamp(48px, 6vw + 5vh, 140px); background: none; color: #ffd400; letter-spacing: .04em;
  text-shadow: 0 0 22px #ff4fd8, 0 0 48px #37e0ff, 0 4px 0 #000; }
.ansage.strike.an { animation: strike-puls 1.1s ease-out; }
.ansage.spare { font-size: clamp(40px, 4.5vw + 4vh, 110px); background: none; color: #37e0ff; text-shadow: 0 0 22px #37e0ff, 0 4px 0 #000; }
@keyframes strike-puls { 0% { transform: translate(-50%, -50%) scale(.3) rotate(-6deg); } 55% { transform: translate(-50%, -50%) scale(1.15) rotate(2deg); } 100% { transform: translate(-50%, -50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .ansage, .ansage.strike.an { animation: none; transition: none; } }

/* Hilfe unten links, Werfen unten rechts (≥ 220 × 140), Stärke daneben */
.hilfe-text { position: absolute; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); max-width: min(46vw, 560px);
  padding: 12px 18px; border-radius: 16px; background: rgba(8, 12, 32, .78); color: #fff; font: 600 clamp(15px, .6vw + .9vh, 22px)/1.3 "DM Sans", system-ui, sans-serif; pointer-events: none; }
.hilfe-text[hidden] { display: none; }
.werfen-knopf { position: absolute; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  width: auto !important; max-width: 46vw; min-width: 240px; min-height: 140px; padding: 0 34px; font-size: clamp(22px, 1vw + 1.4vh, 34px); }
.werfen-knopf svg { width: 56px; height: 56px; }
.werfen-knopf[hidden] { display: none; }
.staerke { position: absolute; right: calc(max(16px, env(safe-area-inset-right)) + 290px); bottom: max(16px, env(safe-area-inset-bottom));
  width: 64px; height: 190px; border-radius: 18px; background: rgba(8, 12, 32, .8); border: 3px solid #ffffff40; overflow: hidden; pointer-events: none; }
.staerke[hidden] { display: none; }
.staerke-fenster { position: absolute; left: 0; right: 0; bottom: 38%; height: 52%; background: rgba(124, 255, 107, .22); border-block: 2px dashed #7cff6b88; }
.staerke-wert { position: absolute; left: 6px; right: 6px; bottom: 6px; max-height: calc(100% - 12px); border-radius: 12px;
  background: linear-gradient(0deg, #37e0ff, #ffd400 70%, #ff4f6d); }
.staerke span { position: absolute; left: 0; right: 0; top: 4px; text-align: center; font: 800 13px "DM Sans", system-ui, sans-serif; color: #fff; text-shadow: 0 1px 2px #000; }
body.bf-cvi .staerke-wert { background: #ffd400; } body.bf-cvi .staerke-fenster { background: #ffffff22; border-color: #fff; }
body.bf-cvi .zettel .sp, body.bf-cvi .hilfe-text, body.bf-cvi .ansage { background: #000; border: 3px solid #ffd400; color: #ffd400; }
body.bf-cvi .ansage.strike, body.bf-cvi .ansage.spare { color: #ffd400; text-shadow: none; }
.blende { position: absolute; inset: 0; background: #05060d; opacity: 0; pointer-events: none; }
.blickpunkt-bowling { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; pointer-events: none;
  border: 4px solid #ffd23f; box-shadow: 0 0 0 3px #000; }
.blickpunkt-bowling[hidden] { display: none; }
/* Pause oben links unter dem Rand, Zettel daneben frei */
#spiel .pause-knopf { z-index: 2; }

/* Startseite: Kachel „Freies Spiel“ */
.level-knopf.modus { flex-direction: column; gap: 4px; }
.level-knopf.modus .modus-text { font-size: clamp(15px, .6vw + .9vh, 22px); line-height: 1.1; text-align: center; }
.level-knopf.modus svg { width: 40px; height: 40px; }
.gross-sterne i { width: 64px; height: 64px; }
.ergebnis-liste { display: grid; gap: 8px; margin: 8px auto 12px; min-width: min(80vw, 420px); }
.ergebnis-liste p { display: flex; align-items: center; gap: 12px; margin: 0; padding: 8px 16px; border-radius: 14px; background: #ffffff14; font-size: var(--s-h3); }
.ergebnis-liste i { width: 22px; height: 22px; border-radius: 50%; }
.ergebnis-liste b { margin-left: auto; font-size: 1.3em; }

/* Grid-3 / Handy quer (1024×600 und darunter): Zettel + Werfen kompakter, Treffer ≥ 120 × 96 */
@media (max-height: 600px) {
  .werfen-knopf { min-width: 170px; max-width: 200px; min-height: 100px; padding: 0 14px; gap: 10px; }
  .werfen-knopf svg { width: 40px; height: 40px; }
  .staerke { height: 140px; width: 52px; right: calc(max(16px, env(safe-area-inset-right)) + 210px); }
  .zettel { top: max(8px, env(safe-area-inset-top)); }
  .zettel .fr { min-width: 30px; } .zettel .fr .nr { display: none; }
  .zettel .name { font-size: clamp(13px, .6vw + .7vh, 18px); }
  .hilfe-text { max-width: 40vw; font-size: 14px; padding: 8px 12px; }
  .weg-anzeige { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 120px); }
}
@media (max-height: 500px) {
  .werfen-knopf { min-width: 170px; max-width: 170px; min-height: 100px; padding: 0 14px; gap: 10px; }
  .werfen-knopf svg { width: 40px; height: 40px; }
  .staerke { height: 120px; width: 52px; right: calc(max(16px, env(safe-area-inset-right)) + 186px); }
  .zettel .fr { min-width: 30px; } .zettel .fr .nr { display: none; }
  .hilfe-text { max-width: 40vw; font-size: 14px; padding: 8px 12px; }
}
@media (max-width: 560px) {
  .werfen-knopf { min-width: 150px; min-height: 110px; padding: 0 20px; }
  .zettel { top: calc(max(10px, env(safe-area-inset-top)) + 104px); max-width: 98vw; }
  .zettel .name { padding: 0 4px; font-size: 13px; } .zettel .name span { max-width: 52px; overflow: hidden; text-overflow: ellipsis; }
  .zettel .fr { min-width: 0; } .zettel .mk em { width: 1em; font-size: 11px; }
  .hilfe-text { max-width: calc(100vw - 32px); bottom: auto; top: calc(max(10px, env(safe-area-inset-top)) + 196px); font-size: 15px; }
  .staerke { right: max(16px, env(safe-area-inset-right)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 130px); height: 140px; }
  .ansage { top: 42%; }
}
body.bf-cvi .zettel .sp { --farbe: #ffd400; }

/* Wandernde Pilze: Weg frei (grün) / Pilz im Weg (rot), über der Bahn */
.weg-anzeige { position: absolute; left: 50%; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 150px); transform: translateX(-50%);
  padding: 10px 22px; border-radius: 999px; background: rgba(120, 20, 10, .85); border: 3px solid #ff4a3c; color: #fff;
  font: 800 clamp(16px, .8vw + 1vh, 26px) "DM Sans", system-ui, sans-serif; pointer-events: none; }
.weg-anzeige.frei { background: rgba(10, 80, 30, .85); border-color: #3cff7a; }
.weg-anzeige[hidden] { display: none; }
body.bf-cvi .weg-anzeige { background: #000; border-color: #ff2020; color: #ff2020; }
body.bf-cvi .weg-anzeige.frei { border-color: #ffd400; color: #ffd400; }
@media (max-height: 500px) { .weg-anzeige { bottom: auto; top: 46%; } }
