/* Main HUD optical alignment and 44px touch targets. */
.topbar {
  column-gap: 12px;
  row-gap: 0;
}

.world-level-hud {
  position: absolute;
  right: max(14px, var(--app-safe-right));
  bottom: -30px;
  z-index: 7;
  grid-template-columns: repeat(4, 44px);
  width: 176px;
  height: 44px;
  color: var(--time-accent);
  background:
    linear-gradient(90deg, transparent, var(--time-panel-deep) 11% 89%, transparent),
    var(--time-panel-deep);
  border-top: 1px solid color-mix(in srgb, var(--time-line) 54%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--time-line) 42%, transparent);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.42);
  isolation: isolate;
}

.world-level-hud button,
.world-level-hud input {
  position: static;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: inherit;
  background: transparent;
  opacity: 1;
  pointer-events: auto;
  text-align: center;
}

.world-level-hud button svg {
  width: 17px;
  height: 17px;
}

.world-level-hud input {
  font: 18px/1 var(--font-display);
  color: var(--time-text-strong);
  outline: 0;
  appearance: textfield;
}

.world-level-hud button:disabled {
  color: color-mix(in srgb, var(--time-muted) 48%, transparent);
}

.world-level-hud button:not(:disabled):focus-visible,
.world-level-hud input:focus-visible {
  color: var(--time-text-strong);
  outline: 1px solid color-mix(in srgb, var(--time-accent) 66%, transparent);
  outline-offset: -5px;
  text-shadow: 0 0 6px var(--time-glow);
}

@media (max-width: 390px) {
  .world-level-hud {
    right: max(8px, var(--app-safe-right));
    bottom: -28px;
  }
}

.hud-actions {
  gap: 0;
}

.coin-balance {
  height: 44px;
  gap: 8px;
  padding-right: 8px;
}

.hud-actions .hud-button,
.hud-actions .hud-button:last-child {
  width: 44px;
  min-width: 44px;
  flex-basis: 44px;
  display: grid;
  place-items: center;
  justify-items: center;
}

.currency-icon,
.topbar .ui-icon {
  width: 20px;
  height: 20px;
}

.level-progress {
  min-height: 44px;
  margin-top: 0;
  padding-block: 0;
}

.sync-status {
  position: absolute;
  right: max(14px, var(--app-safe-right));
  bottom: 6px;
  left: max(14px, var(--app-safe-left));
  overflow: hidden;
  color: var(--time-muted);
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.sync-status[hidden] {
  display: none;
}

.sync-status::before {
  content: "";
  width: 5px;
  height: 5px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
}

.sync-status[data-tone="pending"] {
  color: color-mix(in srgb, var(--time-accent) 84%, var(--time-text-strong));
  text-shadow: 0 0 6px color-mix(in srgb, var(--time-accent) 38%, transparent);
}

.sync-status[data-tone="offline"] {
  color: color-mix(in srgb, var(--status-rest, #d3ad58) 86%, var(--time-text));
  text-shadow: 0 0 6px color-mix(in srgb, var(--status-rest, #d3ad58) 36%, transparent);
}

.sync-status[data-tone="pending"]::before,
.sync-status[data-tone="offline"]::before {
  box-shadow: 0 0 6px currentColor;
}

.notification-dot {
  top: 7px;
  right: 4px;
  width: 9px;
  min-width: 9px;
  height: 9px;
  padding: 0;
  color: transparent;
  background: #8c2932;
  border: 1px solid color-mix(in srgb, #c57976 68%, var(--time-panel-deep, #080507));
  border-radius: 50%;
  clip-path: none;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--time-panel-deep, #080507) 82%, transparent),
    0 0 7px color-mix(in srgb, #9b3038 58%, transparent);
  filter: none;
  font-size: 0;
}

.notification-dot > span {
  display: none;
}
