.hup-game-toolbar {
  position: fixed;
  z-index: 2147483000;
  top: max(8px, env(safe-area-inset-top));
  left: 50%;
  display: flex;
  width: min(440px, calc(100% - 20px));
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 5px 7px 5px 12px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(15, 22, 28, .88);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  color: #f4f7f8;
  direction: rtl;
  font: 500 14px/1.2 system-ui, sans-serif;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hup-game-toolbar[hidden],
.hup-game-reveal[hidden] {
  display: none;
}

.hup-game-brand {
  flex: 0 0 auto;
  color: #b8ef68;
  font-weight: 800;
  text-decoration: none;
}

.hup-game-title {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: #f4f7f8;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hup-game-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.hup-game-fullscreen,
.hup-game-hide,
.hup-game-reveal {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  color: inherit;
  font: 22px/1 system-ui, sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hup-game-hide {
  font-size: 20px;
}

.hup-game-reveal {
  position: fixed;
  z-index: 2147483000;
  top: max(6px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  border-color: rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(15, 22, 28, .9);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .24);
  color: #f4f7f8;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hup-game-hide:focus-visible,
.hup-game-fullscreen:focus-visible,
.hup-game-brand:focus-visible,
.hup-game-reveal:focus-visible {
  outline: 2px solid #b8ef68;
  outline-offset: 2px;
}

#hup-game-ad-anchor {
  position: fixed;
  z-index: 2147482999;
  right: 0;
  bottom: max(2px, env(safe-area-inset-bottom));
  left: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

#hup-game-ad-anchor > .managed-ad-game-intro-banner {
  position: static;
  width: min(calc(100% - 16px), var(--ad-width));
  min-height: calc(var(--ad-height) + 18px);
  padding: 2px 0;
  transform: none;
  border-radius: 6px;
  background: rgba(15, 22, 28, .88);
  pointer-events: auto;
}

@media (max-width: 420px) {
  .hup-game-toolbar {
    gap: 8px;
    font-size: 13px;
  }
}