/**
 * Name: runtime_ui.css
 * Pfad: /games/global/runtime_ui.css
 * Version: 1.9.2
 * Datum: 2026-03-15
 * Zweck: Konsolidierte Runtime-Optik mit getrennten Zuständen für Laufen, Pause und Menü,
 *        klickbarem Pad-Status und sauber integrierter Installations-Aktion im Geräte-Tab.
 */
:root{
  --kubo-bg: rgba(18, 24, 36, 0.54);
  --kubo-panel: rgba(18, 28, 44, 0.84);
  --kubo-panel-soft: rgba(18, 28, 44, 0.76);
  --kubo-border: rgba(255,255,255,0.12);
  --kubo-text: rgba(255,255,255,0.93);
  --kubo-muted: rgba(255,255,255,0.72);
  --kubo-accent: rgba(86,173,255,0.96);
  --kubo-warn: rgba(255,210,90,0.95);
  --kubo-bad: rgba(255,85,85,0.95);
  --kubo-good: rgba(40,160,90,0.95);
  --kubo-radius: 14px;
  --kubo-shadow: 0 8px 28px rgba(0,0,0,0.34);
  --kubo-font: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #0f1116;
  color: var(--kubo-text);
  font-family: var(--kubo-font);
  overflow: hidden;
}

canvas { display: block; }

.arcade-runtime {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  font-family: var(--kubo-font);
  color: var(--kubo-text);
}

.runtime-overlay[hidden] { display: none !important; }

.runtime-hud {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 10px;
  z-index: 2;
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--kubo-bg);
  border: 1px solid var(--kubo-border);
  border-radius: var(--kubo-radius);
  padding: 8px 10px;
  box-shadow: var(--kubo-shadow);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, left 140ms ease, right 140ms ease, padding 140ms ease;
}

.runtime-hud-left,
.runtime-hud-center,
.runtime-hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.runtime-hud-left { flex: 1; min-width: 0; }
.runtime-hud-center { flex-wrap: wrap; justify-content: center; }
.runtime-hud-right { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.runtime-titlewrap { min-width: 0; }
.runtime-hud-title,
.runtime-hud-subtitle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28vw;
}
.runtime-hud-title { font-weight: 700; letter-spacing: .2px; }
.runtime-hud-subtitle { font-size: 12px; color: var(--kubo-muted); }

.runtime-mini-btn,
.runtime-btn,
.runtime-star {
  appearance: none;
  border: 1px solid var(--kubo-border);
  background: rgba(255,255,255,0.07);
  color: var(--kubo-text);
  border-radius: 12px;
  padding: 8px 11px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  user-select: none;
  touch-action: manipulation;
}
.runtime-mini-btn:hover,
.runtime-btn:hover:not(:disabled),
.runtime-star:hover { background: rgba(255,255,255,0.10); }
.runtime-mini-btn:active,
.runtime-btn:active:not(:disabled),
.runtime-star:active { transform: translateY(1px); }
.runtime-mini-btn.runtime-danger { border-color: rgba(255,85,85,0.35); }
.runtime-mini-btn.runtime-accent,
.runtime-btn-primary,
.runtime-pill-accent,
.runtime-star.is-active { border-color: rgba(90,160,255,0.40); }
.runtime-btn {
  border-radius: 999px;
  padding: 13px 18px;
  font-size: 15px;
}
.runtime-btn-primary {
  min-width: 170px;
  background: linear-gradient(135deg, rgba(38,181,255,0.92), rgba(79,124,255,0.92));
}
.runtime-btn-small { padding: 10px 14px; font-size: 14px; }
.runtime-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.runtime-mini-btn.is-locked,
.runtime-btn.is-locked {
  border-color: rgba(255, 88, 88, 0.72);
  background: rgba(120, 10, 10, 0.24);
  color: #ff9e9e;
}
.runtime-mini-btn.is-locked:disabled,
.runtime-btn.is-locked:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.runtime-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--kubo-border);
  background: rgba(255,255,255,0.07);
  font-weight: 800;
  font-size: 12px;
  color: var(--kubo-text);
}
.runtime-pill strong { font-size: 12px; }
.runtime-pill-button {
  appearance: none;
  cursor: pointer;
  touch-action: manipulation;
  color: var(--kubo-text);
}
.runtime-pill-button:hover { background: rgba(255,255,255,0.10); }
.runtime-pill-button:active { transform: translateY(1px); }

.arcade-runtime.runtime-compact-hud .runtime-hud {
  gap: 8px;
  padding: 7px 9px;
}
.arcade-runtime.runtime-compact-hud .runtime-mini-btn {
  padding: 7px 10px;
}

.runtime-toastwrap {
  position: fixed;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 12000;
  pointer-events: none;
}
.runtime-toast {
  min-width: min(360px, calc(100vw - 28px));
  max-width: min(420px, calc(100vw - 28px));
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--kubo-border);
  background: rgba(16, 22, 34, 0.92);
  box-shadow: var(--kubo-shadow);
  color: var(--kubo-text);
  font-size: 13px;
  line-height: 1.4;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 160ms ease, transform 160ms ease;
}
.runtime-toast.good { border-color: rgba(40,160,90,0.42); }
.runtime-toast.warn { border-color: rgba(255,210,90,0.42); }
.runtime-toast.bad { border-color: rgba(255,85,85,0.42); }
.runtime-toast.is-leaving { opacity: 0; transform: translateY(6px); }

.arcade-runtime.runtime-started:not(.runtime-menu-open):not(.runtime-paused) .runtime-hud {
  left: auto;
  right: 12px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}
.arcade-runtime.runtime-started:not(.runtime-menu-open):not(.runtime-paused) .runtime-hud-left,
.arcade-runtime.runtime-started:not(.runtime-menu-open):not(.runtime-paused) .runtime-hud-center,
.arcade-runtime.runtime-started:not(.runtime-menu-open):not(.runtime-paused) .runtime-hud-right > :not([data-role="hudMenu"]):not([data-role="hudPause"]) {
  display: none !important;
}
.arcade-runtime.runtime-started:not(.runtime-menu-open):not(.runtime-paused) .runtime-hud-right {
  margin-left: 0;
  gap: 8px;
}
.arcade-runtime.runtime-started:not(.runtime-menu-open):not(.runtime-paused) .runtime-mini-btn[data-role="hudMenu"],
.arcade-runtime.runtime-started:not(.runtime-menu-open):not(.runtime-paused) .runtime-mini-btn[data-role="hudPause"] {
  display: inline-flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(13, 17, 24, 0.56);
  box-shadow: var(--kubo-shadow);
}
.arcade-runtime.runtime-show-pausehud .runtime-hud {
  left: 12px;
  right: 12px;
  background: rgba(9, 14, 22, 0.86);
  border-color: rgba(255,255,255,0.14);
  box-shadow: var(--kubo-shadow);
  backdrop-filter: blur(8px);
}
.arcade-runtime.runtime-show-pausehud .runtime-hud-right > :not([data-role="hudMenu"]):not([data-role="hudPause"]):not([data-role="hudRestart"]):not([data-role="hudMute"]):not([data-role="hudFullscreen"]) {
  display: none !important;
}
.arcade-runtime.runtime-show-pausehud .runtime-hud-center > :not([data-role="hudStatus"]):not([data-role="hudScore"]):not([data-role="hudBest"]) {
  display: none !important;
}
.runtime-mini-btn[data-role="hudController"],
.runtime-btn[data-role="quickController"] { display: none !important; }

.runtime-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(6,10,18,0.24);
  backdrop-filter: blur(4px);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 150ms ease, visibility 150ms ease;
}
.arcade-runtime.runtime-menu-open .runtime-overlay {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.runtime-rotate-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 3;
  min-width: min(320px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(14, 18, 27, 0.88);
  border: 1px solid rgba(255,210,90,0.38);
  color: var(--kubo-text);
  box-shadow: var(--kubo-shadow);
  text-align: center;
  pointer-events: none;
}
.arcade-runtime.runtime-needs-rotate .runtime-rotate-hint {
  display: block;
}

.runtime-panel {
  width: min(760px, 100%);
  max-height: calc(100dvh - 110px);
  overflow: auto;
  padding: 16px;
  border-radius: 18px;
  background: var(--kubo-panel-soft);
  border: 1px solid var(--kubo-border);
  box-shadow: var(--kubo-shadow);
}

.runtime-panel-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.runtime-panel-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.runtime-panel-close {
  min-width: 48px;
  min-height: 48px;
  border-radius: 999px;
  font-size: 24px;
  background: rgba(255,85,85,0.18);
  border-color: rgba(255,85,85,0.45);
}
.runtime-storage-notice {
  margin: 0 0 12px 0;
  color: var(--kubo-muted);
  font-size: 13px;
  line-height: 1.45;
}
.runtime-pill.runtime-pill-storage-local {
  border-color: rgba(255,210,90,0.35);
}
.runtime-pill.runtime-pill-storage-server {
  border-color: rgba(40,160,90,0.35);
}

.runtime-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.runtime-panel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.runtime-kicker {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.78;
  color: rgba(170,214,255,0.92);
}
.runtime-title {
  margin: 0 0 8px 0;
  font-size: clamp(24px, 4.2vw, 34px);
  line-height: 1.08;
}
.runtime-lead {
  margin: 0 0 14px 0;
  color: var(--kubo-muted);
  font-size: 14px;
  line-height: 1.45;
}

.runtime-menu-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px 0;
}
.runtime-tab-btn {
  appearance: none;
  border: 1px solid var(--kubo-border);
  background: rgba(255,255,255,0.05);
  color: var(--kubo-text);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}
.runtime-tab-btn.is-active {
  background: rgba(86,173,255,0.18);
  border-color: rgba(86,173,255,0.42);
}
.runtime-tab-panels { display: grid; gap: 14px; }
.runtime-tab-panel[hidden] { display:none !important; }
.runtime-quick-actions-stack { flex-direction: column; align-items: stretch; }
.runtime-game-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.runtime-score-value-small { font-size: 15px; line-height: 1.35; }
.runtime-actions,
.runtime-quick-actions,
.runtime-slot-actions,
.runtime-gameover-actions,
.runtime-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.runtime-actions { margin-bottom: 12px; }
.runtime-quick-actions { margin-bottom: 14px; }
.runtime-save-section { margin-bottom: 14px; }
.runtime-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.runtime-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.runtime-slot-card {
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
}
.runtime-slot-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.runtime-slot-head span,
.runtime-section-head span {
  display: block;
  font-size: 12px;
  opacity: 0.7;
}
.runtime-slot-meta {
  margin: 10px 0 12px;
  font-size: 14px;
  line-height: 1.35;
  opacity: 0.9;
}
.runtime-help {
  font-size: 14px;
  line-height: 1.45;
  opacity: 0.86;
}
.runtime-help p { margin: 10px 0 0 0; }

.runtime-gameover-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 28px));
  border-radius: 18px;
  padding: 18px;
  background: rgba(17, 24, 35, 0.82);
  border: 1px solid var(--kubo-border);
  box-shadow: var(--kubo-shadow);
  pointer-events: auto;
  text-align: center;
  display: none;
}
.arcade-runtime.runtime-show-gameover .runtime-gameover-card {
  display: block;
}
.runtime-gameover-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.72;
  margin-bottom: 10px;
}
.runtime-gameover-title {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 10px;
}
.runtime-gameover-lead {
  color: var(--kubo-muted);
  margin-bottom: 14px;
  line-height: 1.45;
}
.runtime-gameover-actions { justify-content: center; }

.runtime-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,0.42);
  pointer-events: auto;
}
.runtime-modal {
  width: min(620px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border-radius: 18px;
  background: rgba(17,24,35,0.96);
  border: 1px solid var(--kubo-border);
  box-shadow: var(--kubo-shadow);
  padding: 18px;
}
.runtime-modal-backdrop.runtime-modal-backdrop-scroll { align-items: flex-start; overflow: auto; }
.runtime-modal h3 { margin: 0 0 10px 0; }
.runtime-modal p { margin: 0 0 12px 0; color: var(--kubo-muted); line-height: 1.45; }
.runtime-textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid var(--kubo-border);
  background: rgba(255,255,255,0.05);
  color: var(--kubo-text);
  padding: 12px 14px;
  font: inherit;
  margin: 0 0 12px 0;
}
.runtime-textarea-lg { min-height: 180px; }
.runtime-stars { display: flex; gap: 8px; margin: 0 0 12px 0; flex-wrap: wrap; }
.runtime-star {
  width: 56px;
  height: 56px;
  font-size: 24px;
  border-radius: 14px;
}
.runtime-star.is-active {
  background: rgba(90,160,255,0.22);
}
.runtime-stars-readonly .runtime-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}
.runtime-modal-note,
.runtime-hof-note {
  font-size: 13px;
  color: var(--kubo-muted);
  line-height: 1.45;
  margin: 0 0 12px 0;
}

.arcade-touch-controls {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 18px;
  pointer-events: none;
  z-index: 8500;
}
.arcade-touch-cluster,
.arcade-touch-actions {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}
.arcade-touch-btn {
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: #f5f7fb;
  font-size: 22px;
  font-weight: 700;
  background: rgba(15, 18, 28, 0.52);
  backdrop-filter: blur(4px);
  touch-action: none;
  user-select: none;
  pointer-events: auto;
}
.arcade-touch-btn:active,
.arcade-touch-btn.is-active {
  background: rgba(90,160,255,0.38);
  border-color: rgba(90,160,255,0.55);
}
.arcade-runtime.runtime-menu-open ~ .arcade-touch-controls,
.arcade-runtime.runtime-show-pausehud ~ .arcade-touch-controls,
.arcade-runtime.runtime-show-gameover ~ .arcade-touch-controls { display: none; }

@media (max-width: 960px) {
  .runtime-hud { flex-wrap: wrap; }
  .runtime-hud-center { order: 3; width: 100%; justify-content: flex-start; }
}
@media (max-width: 760px) {
  .runtime-panel { width: min(100%, 700px); max-height: calc(100dvh - 78px); padding: 14px; border-radius: 16px; }
  .runtime-panel-topbar,
  .runtime-panel-head,
  .runtime-actions,
  .runtime-quick-actions,
  .runtime-slot-actions,
  .runtime-gameover-actions,
  .runtime-modal-actions { flex-direction: column; }
  .runtime-panel-pills,
  .runtime-slot-grid,
  .runtime-game-stats-grid { grid-template-columns: 1fr; }
  .runtime-btn,
  .runtime-btn-small,
  .runtime-star,
  .runtime-tab-btn { width: 100%; justify-content: center; }
  .runtime-help { font-size: 13px; }
  .runtime-modal-backdrop { align-items: flex-start; }
}
@media (max-width: 600px) {
  .runtime-hud { left: 8px; right: 8px; top: 8px; padding: 8px; gap: 8px; }
  .runtime-hud-left { min-width: 100%; }
  .runtime-hud-center { width: 100%; order: 2; justify-content: flex-start; gap: 6px; }
  .runtime-hud-right { width: 100%; order: 3; justify-content: flex-end; gap: 6px; }
  .runtime-mini-btn { min-width: 46px; min-height: 46px; }
  .runtime-hud-title,
  .runtime-hud-subtitle { max-width: 60vw; }
  .runtime-panel-topbar { position: sticky; top: 0; z-index: 2; padding-bottom: 4px; background: linear-gradient(180deg, rgba(18,28,44,0.96), rgba(18,28,44,0.68)); }
  .runtime-rotate-hint { bottom: 90px; font-size: 13px; }
}
@media (max-width: 520px) {
  .arcade-touch-controls { padding: 12px 10px; gap: 10px; }
  .arcade-touch-cluster, .arcade-touch-actions { gap: 8px; }
  .arcade-touch-btn { width: 64px; height: 64px; font-size: 20px; }
  .runtime-gameover-title { font-size: 28px; }
  .runtime-title { font-size: 26px; }
  .runtime-lead, .runtime-storage-notice { font-size: 13px; }
}
@media (max-width: 390px) {
  .runtime-hud-title, .runtime-hud-subtitle { max-width: 52vw; }
  .runtime-pill { font-size: 11px; padding: 5px 8px; }
  .arcade-touch-btn { width: 58px; height: 58px; font-size: 18px; }
}

.runtime-score-section {
  margin-bottom: 14px;
}
.runtime-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.runtime-score-card,
.runtime-hof-panel {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 12px;
}
.runtime-score-label,
.runtime-hof-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.72;
  margin-bottom: 6px;
}
.runtime-score-value {
  font-size: 28px;
  font-weight: 700;
}
.runtime-hof-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.runtime-hof-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,0.16);
}
.runtime-hof-player {
  display: flex;
  align-items: center;
  gap: 8px;
}
.runtime-hof-rank {
  min-width: 24px;
}
.runtime-hof-score {
  font-weight: 700;
}
.runtime-hof-empty {
  opacity: 0.72;
  font-size: 13px;
}
@media (max-width: 720px) {
  .runtime-score-grid {
    grid-template-columns: 1fr;
  }
}


.runtime-controller-status,
.runtime-controller-live {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--kubo-border);
  background: rgba(255,255,255,0.05);
}
.runtime-controller-actions-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.runtime-controller-grid {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.runtime-controller-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1.2fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.runtime-controller-label { font-weight: 700; }
.runtime-controller-binding {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--kubo-warn);
}
.runtime-controller-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.runtime-controller-live-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  color: var(--kubo-muted);
}
.runtime-modal-actions-wrap {
  flex-wrap: wrap;
}
@media (max-width: 820px) {
  .runtime-controller-row {
    grid-template-columns: 1fr;
  }
  .runtime-controller-tools {
    justify-content: flex-start;
  }
}

.runtime-achievement-layer {
  position: fixed;
  top: 84px;
  right: 16px;
  z-index: 99998;
  display: grid;
  gap: 10px;
  pointer-events: none;
}
.runtime-achievement-pop {
  min-width: 280px;
  max-width: min(420px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(18,22,30,0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 48px rgba(0,0,0,0.35);
  transform: translateY(-10px) scale(0.96);
  opacity: 0;
  transition: transform .24s ease, opacity .24s ease;
  overflow: hidden;
}
.runtime-achievement-pop::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .18;
}
.runtime-achievement-pop.is-visible { transform: translateY(0) scale(1); opacity: 1; }
.runtime-achievement-pop.is-leaving { transform: translateY(-8px) scale(.97); opacity: 0; }
.runtime-achievement-pop.effect-confetti::after { background: linear-gradient(135deg, rgba(255,215,0,.4), rgba(255,105,180,.18), rgba(0,191,255,.18)); }
.runtime-achievement-pop.effect-fireworks::after { background: radial-gradient(circle at 20% 20%, rgba(255,215,0,.55), transparent 40%), radial-gradient(circle at 80% 25%, rgba(255,99,71,.42), transparent 42%), radial-gradient(circle at 50% 80%, rgba(0,191,255,.35), transparent 44%); }
.runtime-achievement-pop.effect-shockwave::after { background: radial-gradient(circle, rgba(0,255,255,.22), transparent 58%); }
.runtime-achievement-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: rgba(255,255,255,0.08);
}
.runtime-achievement-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--kubo-warn); }
.runtime-achievement-title { font-size: 18px; font-weight: 800; line-height: 1.15; }
.runtime-achievement-text { font-size: 13px; color: var(--kubo-muted); line-height: 1.4; margin-top: 4px; }
.runtime-achievement-meta { font-size: 12px; font-weight: 700; margin-top: 8px; color: #ffe08a; }
@media (max-width: 720px) {
  .runtime-achievement-layer { top: 64px; left: 12px; right: 12px; }
  .runtime-achievement-pop { max-width: 100%; min-width: 0; }
}


.runtime-rewards-section {
  margin-top: 18px;
  border: 1px solid var(--kubo-border);
  background: rgba(255,255,255,0.04);
  border-radius: 16px;
  padding: 14px;
}
.runtime-rewards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.runtime-reward-card {
  border: 1px solid var(--kubo-border);
  background: rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 12px;
}
.runtime-reward-card-status { grid-column: span 3; }
.runtime-reward-label {
  font-size: 12px;
  color: var(--kubo-muted);
  margin-bottom: 6px;
}
.runtime-reward-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}
.runtime-reward-card-status small {
  display: block;
  color: var(--kubo-muted);
  margin-top: 4px;
}
.runtime-progress {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.runtime-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(67,170,255,0.9), rgba(116,255,189,0.95));
  transition: width 180ms ease;
}
.runtime-progress-text {
  margin-top: 8px;
  font-size: 12px;
  color: var(--kubo-muted);
  text-align: right;
}
.runtime-recent-rewards {
  margin-top: 14px;
}
.runtime-reward-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.runtime-reward-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--kubo-border);
}
.runtime-reward-list li.is-empty {
  justify-content: center;
  color: var(--kubo-muted);
}
.runtime-reward-list-icon {
  font-size: 18px;
  line-height: 1;
}
.runtime-reward-list li strong {
  display: block;
  font-size: 14px;
}
.runtime-reward-list li small {
  display: block;
  margin-top: 2px;
  color: var(--kubo-muted);
  line-height: 1.35;
}
@media (max-width: 820px) {
  .runtime-rewards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .runtime-reward-card-status { grid-column: span 2; }
}
@media (max-width: 560px) {
  .runtime-rewards-grid { grid-template-columns: 1fr; }
  .runtime-reward-card-status { grid-column: span 1; }
}


/* Rewards / Achievements – stärkere Celebration-Optik */
.runtime-achievement-pop.rarity-common { border-color: rgba(255,255,255,.14); }
.runtime-achievement-pop.rarity-rare { border-color: rgba(56,189,248,.45); box-shadow: 0 18px 40px rgba(56,189,248,.18), var(--kubo-shadow); }
.runtime-achievement-pop.rarity-epic { border-color: rgba(168,85,247,.5); box-shadow: 0 18px 42px rgba(168,85,247,.22), var(--kubo-shadow); }
.runtime-achievement-pop.rarity-legendary { border-color: rgba(250,204,21,.65); box-shadow: 0 22px 54px rgba(250,204,21,.28), var(--kubo-shadow); }
.runtime-achievement-pop.rarity-legendary .runtime-achievement-icon { box-shadow: 0 0 0 3px rgba(250,204,21,.16), 0 14px 24px rgba(250,204,21,.2); }
.runtime-achievement-pop.effect-confetti::before,
.runtime-achievement-pop.effect-fireworks::before,
.runtime-achievement-pop.effect-shockwave::before {
  content: '';
  position: absolute;
  inset: -18% -8%;
  pointer-events: none;
  opacity: .7;
}
.runtime-achievement-pop.effect-confetti::before {
  background-image:
    radial-gradient(circle at 12% 24%, rgba(250,204,21,.95) 0 3px, transparent 4px),
    radial-gradient(circle at 32% 12%, rgba(244,114,182,.9) 0 3px, transparent 4px),
    radial-gradient(circle at 74% 16%, rgba(56,189,248,.9) 0 3px, transparent 4px),
    radial-gradient(circle at 88% 34%, rgba(52,211,153,.9) 0 3px, transparent 4px),
    radial-gradient(circle at 18% 82%, rgba(251,146,60,.9) 0 3px, transparent 4px),
    radial-gradient(circle at 82% 78%, rgba(168,85,247,.9) 0 3px, transparent 4px);
  animation: runtimeConfettiFloat 2.6s ease-out both;
}
.runtime-achievement-pop.effect-fireworks::before {
  background:
    radial-gradient(circle at 18% 28%, rgba(250,204,21,.75), transparent 20%),
    radial-gradient(circle at 78% 22%, rgba(244,114,182,.55), transparent 22%),
    radial-gradient(circle at 50% 78%, rgba(56,189,248,.45), transparent 24%);
  filter: blur(2px);
  animation: runtimePulseBurst 2.2s ease-out both;
}
.runtime-achievement-pop.effect-shockwave::before {
  border: 2px solid rgba(34,211,238,.35);
  border-radius: 28px;
  animation: runtimeShockExpand 1.4s ease-out both;
}
.runtime-achievement-kicker { text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.runtime-achievement-title { text-wrap: balance; }
@keyframes runtimeConfettiFloat {
  0% { transform: translateY(-10px) scale(.98); opacity: 0; }
  12% { opacity: .95; }
  100% { transform: translateY(12px) scale(1.04); opacity: 0; }
}
@keyframes runtimePulseBurst {
  0% { transform: scale(.86); opacity: 0; }
  18% { opacity: .9; }
  100% { transform: scale(1.18); opacity: 0; }
}
@keyframes runtimeShockExpand {
  0% { transform: scale(.82); opacity: 0; }
  20% { opacity: .9; }
  100% { transform: scale(1.24); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .runtime-achievement-pop.effect-confetti::before,
  .runtime-achievement-pop.effect-fireworks::before,
  .runtime-achievement-pop.effect-shockwave::before { animation: none !important; opacity: .22; }
}


.runtime-rewards-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
.runtime-details-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 14px;
}
.runtime-detail-pill {
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.runtime-detail-pill b {
  font-size: 12px;
  color: var(--kubo-muted);
}
.runtime-detail-pill span {
  font-size: 16px;
  font-weight: 800;
}
.runtime-details-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.runtime-detail-section h4 {
  margin: 0 0 8px;
  font-size: 15px;
}
.runtime-achievement-entries {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 42vh;
  overflow: auto;
}
.runtime-achievement-entry,
.runtime-progress-entry,
.runtime-achievement-entries li.is-empty {
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  padding: 10px 12px;
}
.runtime-achievement-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.runtime-achievement-entry-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.08);
  font-size: 18px;
  flex: 0 0 36px;
}
.runtime-achievement-entry-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.runtime-achievement-entry-copy strong {
  font-size: 14px;
}
.runtime-achievement-entry-copy small,
.runtime-achievement-entry-copy em {
  color: var(--kubo-muted);
  font-size: 12px;
  font-style: normal;
}
.runtime-achievement-entry.rarity-rare { border-color: rgba(56,189,248,.35); }
.runtime-achievement-entry.rarity-epic { border-color: rgba(168,85,247,.4); }
.runtime-achievement-entry.rarity-legendary { border-color: rgba(250,204,21,.5); }
.runtime-progress-entry-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.runtime-progress-entry-value {
  margin-left: auto;
  font-weight: 800;
  font-size: 13px;
}
.runtime-progress-inline {
  margin-top: 8px;
}
@media (max-width: 640px) {
  .runtime-details-summary { grid-template-columns: 1fr; }
}


.runtime-celebration-bit {
  position: absolute;
  z-index: 9999;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(135deg, rgba(250,204,21,.96), rgba(244,114,182,.92));
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
  transform: translate(-50%, -50%);
  animation: runtimeConfettiBurst 1.45s cubic-bezier(.19,.89,.24,1) forwards;
  animation-delay: var(--delay, 0ms);
}
.runtime-celebration-bit.effect-fireworks {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,.95), rgba(250,204,21,.95) 42%, rgba(249,115,22,.9) 68%, rgba(244,63,94,.86) 100%);
  animation-duration: 1.7s;
}
.runtime-celebration-bit.effect-shockwave {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,.95), rgba(34,211,238,.92) 35%, rgba(59,130,246,.86) 100%);
  animation-duration: 1.35s;
}
@keyframes runtimeConfettiBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.35) rotate(0deg); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + (var(--x, 0) * 240px)), calc(-50% + (var(--y, -1) * 220px))) rotate(var(--r, 260deg)) scale(.9); }
}
@media (prefers-reduced-motion: reduce) {
  .runtime-celebration-bit { animation: none !important; opacity: .0; }
}

.runtime-fieldset{display:grid;gap:.5rem;margin:.75rem 0 1rem;}
.runtime-fieldset label{display:flex;align-items:center;gap:.5rem;}

/* Nur die Konto/Gast-Zeile in der HUD ausblenden, Menü-Hinweis bleibt */
.runtime-hud [data-role="hudStorage"]{
  display:none !important;
}
