/* The arcade's bottom bar, the same component in every experience. It is
   Kepesh-Yakshi's bar (kepesh-yakshi/index.html keeps the same rules inline);
   buttons are neutral white glass so they look and behave the
   same everywhere. Classes are prefixed so they never meet a page's own .btn. */
.kbar {
  --kb-accent: 90, 150, 255;
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 15;
  display: flex; align-items: center; gap: 8px; padding: 7px; border-radius: 999px;
  /* soft glass: a light neutral tint over a wide blur; no stroke */
  background: rgba(36, 36, 40, 0.24); border: 0;
  backdrop-filter: blur(22px) saturate(1.15); -webkit-backdrop-filter: blur(22px) saturate(1.15);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  /* left: 50% would cap a shrink-to-fit width at half the screen and wrap the bar early */
  width: max-content; max-width: calc(100vw - 24px);
  font-family: "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
.kbar .kb {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  border: 0; background: rgba(255, 255, 255, 0.16);
  color: #e6f1ff; font: 500 13.5px/1 "Inter", system-ui, sans-serif; letter-spacing: -0.01em;
  padding: 10px 15px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s, color 0.2s;
}
.kbar .kb:hover { background: rgba(255, 255, 255, 0.24); }
.kbar .kb.ghost { background: transparent; border-color: transparent; color: rgba(255, 255, 255, 0.86); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); }
.kbar .kb.ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.kbar .kb:disabled { opacity: 0.35; pointer-events: none; }
.kbar .kseg { display: flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.kbar .kseg button {
  appearance: none; border: 0; background: transparent; color: rgba(255, 255, 255, 0.82);
  font: 500 13px/1 "Inter", system-ui, sans-serif; padding: 8px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.kbar .kseg button.on { background: rgba(255, 255, 255, 0.2); color: #fff; }
.kbar .kseg button:not(.on):hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.kbar .kseg button:disabled { opacity: 0.35; pointer-events: none; }
.kbar .ksep { display: none; }
.kbar .kmute { width: 36px; height: 36px; padding: 0; }
.kbar .kmute svg { width: 17px; height: 17px; }
.kbar .kmute .off { display: none; }
body.muted .kbar .kmute .on { display: none; }
body.muted .kbar .kmute .off { display: block; }

@media (max-width: 720px) {
  .kbar { gap: 4px; padding: 5px; flex-wrap: wrap; justify-content: center; border-radius: 22px; }
  .kbar .kb { padding: 9px 11px; font-size: 13px; }
  .kbar .kseg button { padding: 7px 8px; font-size: 12.5px; }
  .kbar .hide-s { display: none; }
}

/* hold the bar back until its game has set it up (labels, picked level, filled groups), then fade it in once,
   so the raw HTML never flashes; a page that never says it is ready still shows its bar after 3s */
body:not(.bar-ready) #bar { opacity: 0; animation: bar-late 0.25s 3s forwards; }
body.bar-ready #bar { animation: bar-in 0.25s backwards; }
@keyframes bar-in { from { opacity: 0; } }
@keyframes bar-late { to { opacity: 1; } }
