* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* sonst gewinnt .overlay{display:flex} gegen das hidden-Attribut */
html, body { margin: 0; height: 100%; background: #0d1117; color: #e8eef5;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; }
body { display: flex; align-items: center; justify-content: center; }
#buehne { position: relative; width: min(100vw, 142vh); max-width: 100vw; }   /* füllt das Fenster (Seitenverhältnis 1024:720) */
canvas { display: block; width: 100%; height: auto; background: #20351f; touch-action: none; }

.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(8, 12, 18, .72); backdrop-filter: blur(3px); }
.box { background: #141b24; border: 1px solid #2b3747; border-radius: 16px; padding: 26px 30px;
  width: min(440px, 92vw); text-align: center; box-shadow: 0 18px 60px rgba(0, 0, 0, .55); }
h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: .5px; }
h2 { margin: 0 0 14px; font-size: 22px; }
.sub { color: #93a1b3; font-size: 14px; margin: 6px 0 16px; }
label { display: block; text-align: left; font-size: 13px; color: #93a1b3; margin: 14px 0; }
input { display: block; width: 100%; margin-top: 6px; padding: 11px 13px; font-size: 16px;
  background: #0e141c; border: 1px solid #2b3747; border-radius: 10px; color: #e8eef5; }
.btn { cursor: pointer; border: 0; border-radius: 11px; background: #2f6fd6; color: #fff;
  font-size: 15px; font-weight: 600; padding: 10px 18px; }
.btn:hover { background: #3a7eea; }
.btn.gross { width: 100%; padding: 13px; font-size: 17px; margin-top: 8px; }

.liste { list-style: none; margin: 0 0 14px; padding: 0; text-align: left; max-height: 320px; overflow: auto; }
.liste li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; background: #0e141c; margin-bottom: 6px; }
.liste .punkt { width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto; border: 2px solid rgba(255,255,255,.25); }
.liste .pl { margin-left: auto; color: #93a1b3; font-variant-numeric: tabular-nums; font-weight: 700; }
.liste .wirt { font-size: 11px; color: #f0b429; }
.trackctl { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0 10px; }
.trackbtn { padding: 5px 10px; border-radius: 8px; border: 1px solid #2b3747; background: #0e141c; color: #c7d0da; font-size: 12px; cursor: pointer; }
.trackbtn:hover { background: #1b2430; }
.trackbtn.an { background: #2f6fd6; border-color: #2f6fd6; color: #fff; font-weight: 600; }
.botctl { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 6px 0 12px; font-size: 14px; color: #c7d0da; }
.botctl b { min-width: 20px; text-align: center; font-size: 17px; color: #fff; }
.botbtn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid #2b3747; background: #0e141c; color: #fff; font-size: 20px; cursor: pointer; line-height: 1; }
.botbtn:hover { background: #1b2430; }

#hud { position: absolute; inset: 0; pointer-events: none; }
.hudbox { position: absolute; left: 12px; bottom: 12px; background: rgba(10, 16, 22, .82);
  border: 1px solid #3a4756; border-radius: 8px; padding: 8px 12px; min-width: 215px;
  font-family: "DejaVu Sans Mono", ui-monospace, "Courier New", monospace; }
.hname { color: #5ab0ff; font-weight: 800; font-size: 15px; margin-bottom: 5px; letter-spacing: .3px; }
.hrow { display: flex; justify-content: space-between; gap: 18px; font-size: 13px; color: #aeb9c6; line-height: 1.5; }
.hrow b { color: #fff; font-variant-numeric: tabular-nums; }
#boosthint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  color: #ffd54a; font-weight: 900; font-size: 26px; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }

.cd { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 150px; font-weight: 900; color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,.7); pointer-events: none; }
