/* Compact instrument strip. Each existing world supplies its own accent. */
.app[data-game] > .header.game-header {
  position: relative;
  z-index: 20;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-direction: row !important;
  gap: 10px;
  height: 64px;
  min-height: 64px !important;
  max-height: none;
  padding: 0 12px !important;
  margin: 0 !important;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--game-accent, #aacfff) 26%, #172337) !important;
  border-radius: 14px !important;
  background: linear-gradient(110deg, color-mix(in srgb,var(--game-accent,#aacfff) 12%,var(--paper-ink,#112031)), var(--paper-ink,#0b1728) 65%) !important;
  box-shadow: inset 0 1px 0 #ffffff10, 0 4px 12px #03081242 !important;
}
.app[data-game] > .header.game-header::before,
.app[data-game] > .header.game-header::after { content: none !important; display: none !important; }
.header-zone-left, .header-zone-right { display: flex; flex: none; align-items: center; gap: 4px; }
.header-zone-right { margin-inline-start: auto; }
.app[data-game] > .game-header :is(.btn-lobby,.header-action-btn) {
  display: inline-flex;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
  color: #edf6ff;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  cursor: pointer;
  touch-action: manipulation;
}
.app[data-game] > .game-header :is(.btn-lobby,.header-action-btn) svg { display: block; }
.app[data-game] > .game-header .header-action-btn svg { width: 19px; height: 19px; }
.app[data-game] > .game-header :is(.btn-lobby,.header-action-btn):active { background: #ffffff22 !important; }
.app[data-game] > .game-header :is(.btn-lobby,.header-action-btn):focus-visible {
  outline: 2px solid var(--game-accent,#aacfff); outline-offset: -3px;
}
.app[data-game] > .header.game-header .header-brand {
  position: static !important;
  transform: none !important;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  max-width: none !important;
  gap: 8px;
}
.app[data-game] > .header.game-header .game-badge {
  flex: none;
  width: 46px !important;
  height: 34px !important;
  min-width: 0;
  object-fit: cover;
  filter: none;
  mix-blend-mode: normal;
  border: 1px solid #ffffff36 !important;
  border-radius: 5px !important;
  background: transparent !important;
  box-shadow: none !important;
}
.hud-identity, .hud-score { display: grid; min-width: 0; }
.hud-demo {
  justify-self: start;
  color: color-mix(in srgb, var(--game-accent,#aacfff) 65%, white);
  font-family: var(--font-display);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .12em;
}
.app[data-game] > .header.game-header h1 {
  display: block;
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  min-width: 0;
  margin: 1px 0 0;
  padding: 0;
  color: #f5f8ff;
  font: 850 clamp(15px,2.6vw,22px)/1.2 var(--font-display);
  letter-spacing: .015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app[data-game] > .game-header .status-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #8493a6; }
.app[data-game] > .game-header .status-dot.on { background: #59e7a6; }
.app[data-game] > .game-header .status-dot.off { background: #ff8e87; }
.app[data-game] > .header.game-header .header-asset {
  display: flex;
  align-items: center;
  flex: none;
  gap: 7px;
  min-height: 40px;
  padding: 2px 10px;
  box-sizing: border-box;
  background: #071422b8;
  border: 1px solid #ffffff18;
  border-radius: 9px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hud-score small { color: #bac9da; font: 600 10px/1.2 var(--font-ui); }
.hud-score strong { color: #f8e4aa; font: 800 16px/1.16 var(--font-display); letter-spacing: .025em; }
.app[data-game] > .game-header .header-coin { width: 14px; height: 14px; flex: none; }
@media (hover:hover) {
  .app[data-game] > .game-header :is(.btn-lobby,.header-action-btn):hover { background: #ffffff14 !important; border-color: #ffffff25 !important; }
}
@media (prefers-reduced-motion:no-preference) {
  .app[data-game] > .game-header :is(.btn-lobby,.header-action-btn) { transition: background-color .16s ease, border-color .16s ease; }
}
@media (max-width:520px) {
  .app[data-game] > .header.game-header { height: 56px; min-height: 56px !important; gap: 4px; padding: 0 4px !important; }
  .app[data-game] > .header.game-header .header-brand { gap: 6px; }
  .app[data-game] > .header.game-header .game-badge { width: 35px !important; height: 27px !important; }
  .app[data-game] > .header.game-header .header-asset { gap: 4px; padding-inline: 7px; }
  /* The same history and player tabs remain available inside the rules drawer. */
  .app[data-game="crash"] .header-zone-right:has(.header-rules) :is(.header-players,.header-history) { display: none; }
}
@media (max-width:350px) {
  .app[data-game] > .header.game-header { gap: 2px; }
  .app[data-game] > .header.game-header .header-brand { gap: 4px; }
  .hud-score strong { font-size: 14px; }
}

.game-header a[data-studio-portfolio] {
  min-height: 44px;
  border-radius: 5px;
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}
.game-header a[data-studio-portfolio]:focus-visible {
  outline: 2px solid var(--game-accent, #aacfff);
  outline-offset: -2px;
}
.game-header a[data-studio-portfolio] .hud-demo { letter-spacing: .025em; white-space: nowrap; }
@media (max-width: 460px) {
  .game-header .studio-demo-type { display: none; }
}
@media (hover: hover) {
  .game-header a[data-studio-portfolio]:hover .hud-demo { text-decoration: underline; }
}
