#demo-bar {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 12px;
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
  background: rgba(8, 12, 24, 0.95);
  border: 1px solid rgba(100, 160, 220, 0.28);
  font: 8px/1 "Press Start 2P", monospace;
  -webkit-font-smoothing: none;
  font-smooth: never;
  letter-spacing: 0;
  white-space: nowrap;
  color: rgba(130, 185, 255, 0.7);
  user-select: none;
  -webkit-user-select: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease-out, visibility 0s linear 0.4s;
}
.demo-ready #demo-bar {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease-out;
}
#demo-bar a {
  color: rgba(130, 185, 255, 0.62);
  text-decoration: none;
  padding: 4px 2px;
  margin: -4px -2px;
}
#demo-bar a:hover,
#demo-bar a:focus-visible {
  color: rgba(200, 225, 255, 0.98);
  outline: none;
}
#demo-bar .db-tag {
  color: rgba(255, 196, 60, 0.95);
  border: 1px solid rgba(255, 196, 60, 0.55);
  padding: 3px 5px;
}
#demo-bar .db-note {
  color: rgba(130, 185, 255, 0.5);
}
#demo-bar .db-providers {
  display: flex;
  gap: 10px;
}
#demo-bar .db-providers a[aria-current="page"] {
  color: rgba(50, 215, 120, 0.95);
}
#demo-bar .db-short {
  display: none;
}

@media (max-width: 620px) {
  #demo-bar { gap: 10px; padding: 7px 10px; }
  #demo-bar .db-note,
  #demo-bar .db-long { display: none; }
  #demo-bar .db-short { display: inline; }
  #demo-bar .db-providers { gap: 8px; }
}

/* Switching providers loads another page; crossfade instead of a hard cut, and keep the
   bar itself still. Browsers without cross-document view transitions just navigate. */
@view-transition { navigation: auto; }
html { background: #000; }
#demo-bar { view-transition-name: demo-bar; }
::view-transition-group(demo-bar) { animation: none; }
::view-transition-old(demo-bar) { display: none; }
::view-transition-new(demo-bar) { animation: none; }
/* Dip to black rather than crossfade: the new page boots with the HUD sliding in and the
   ship arriving, so a crossfade made them dim and come back. */
@keyframes db-out { to { opacity: 0; } }
@keyframes db-in { from { opacity: 0; } }
::view-transition-old(root) { animation: 150ms ease-in both db-out; }
::view-transition-new(root) { animation: 220ms ease-out 130ms both db-in; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}
