/* Global Nav & Canonical Header Styling */
:root {
  --nav-active-color: #f3d078;
  --header-bg: #14161a;
  --header-border: #2e333e;
  --header-height: 52px;
  --app-max-width: 480px;
}

/* Universal Glitch-Free Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  height: var(--header-height, 52px);
  background-color: var(--header-bg, #14161a);
  border-bottom: 1px solid var(--header-border, #2e333e);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-sizing: border-box;
  z-index: 1000;
  transition: all 0.2s ease;
}

.header-back-btn,
.header-history-btn,
.header-cancel-btn {
  color: #f3d078 !important;
  font-size: 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(243, 208, 120, 0.08);
  border: 1px solid rgba(243, 208, 120, 0.18);
  transition: background 0.15s ease, transform 0.1s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.header-back-btn:active,
.header-history-btn:active,
.header-cancel-btn:active {
  transform: scale(0.92);
  background: rgba(243, 208, 120, 0.22);
}

.header-nav-title {
  font-size: 16px;
  font-weight: 700;
  color: #f3d078;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  text-align: center;
}

.header-nav-title i {
  font-size: 17px;
  color: #f3d078;
}

@media (orientation: landscape), (min-width: 768px) {
  .header {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    max-width: var(--app-max-width, 480px) !important;
  }
}

